HN user

Stormcaller

343 karma
Posts0
Comments32
View on HN
No posts found.
[dead] 10 years ago

I had some minor "issues" after I installed ShellStatus and its dependency StatusMessage using package manager. These may be true for rest of the packages as well, luckily they are all 1-2 minute fixes at most, so they are just small quirks.

https://github.com/shagabutdinov/sublime-shell-status

The installation instruction said: "There is 'sublime-status' file in this package. Put it in your 'bin' folder..."

I put it in my bin folder, but it didn't read it. This was because on line 20 at shell_status.py, you -only- looked into package folder(and none of "bin") if the default wasn't changed. so unless I changed the settings and put some other name as my command, putting "shell-status" file in my bin folders wouldn't work, thus putting the default file in "bin" doesn't do any good. Just a mismatch between the documentation and code I suppose.

It also didn't create a ShellStatus/ folder under Packages/, which is the place you look for commands, so I had to create that as well.

There was also no entry for settings under "Package Settings", so I had to find the settings at Packages/User/ShellStatus.sublime-settings, it would've been better if I could go Prefences>Package Settings>ShellStatus like I can do with other packages.

Also the example on that page doesn't work, but again this is a minor detail too. There is no "<?php", so it just prints the file content itself. If you just add "<?php" after the comment it works. http://hastebin.com/ezirazekaf.php

I also have a request for anyone developing sublime plugins: I want to execute a shell command while I am working on the file, in-line. This is similar to some of your plugins, so I thought you may be interested. The output could be a comment. This would be useful when developing cli files, or just standard files if we can call it with "php arg1 arg2" or just "arg1 arg2" and have this file run with the correct path, get its output. Some plugins offer terminal access, but it is done in a separate/embedded window and the output is in console or a new file, and they offer no shortcuts to "just run the current file"

Anyways, thanks for the plugin. I will be using some of this.

HTML5 Deck of Cards 11 years ago

Literally the first example on that page:

Math.floor( 45.95); // 45

Math.floor(-45.95); // -46

Its not like its hidden or anything... Its in the center of the page on my 1920x1080 screen.

HTML5 Deck of Cards 11 years ago

It is not much worse than using it in javascript. People do this in js because it saves a few keystrokes and its faster, not that it matters. Its a small thing. Its dirtier, for sure.

I just tested it in PHP and it seems it is 20% faster in PHP compared to casting to int. Maybe someone out there will have a weird use case for that, or someone doesn't want to put more effort into writing code into terminal and doesn't care about his code being unreadable. I think its useful to know it exists.

Btw, do you or someone else know why its faster in php too? Its a bitwise operation and I assume under the hood its casting to int, its weird to have it faster than casting it to int, why does this happen? It makes sense in javascript to that its faster than functions, but why it is faster than a cast in PHP?

HTML5 Deck of Cards 11 years ago

Its because they don't do the same thing

Math.floor() favors the number equal to/less than the parameter, Math.floor(-15.5) is -16 while (-15.5 | 0) is -15

Also because the returned value is int32[0],

Math.floor(2147483648.5) is 2147483648 while (2147483648.5 | 0) is -2147483648

You are fine if you know the input is less than (2^31) + 1 and you want to truncate, rather than floor.

[0] http://www.ecma-international.org/ecma-262/6.0/#sec-binary-b...

I wonder if there was an idea of a "strict mode" at any point? When making sure every site works surely you guys will have to render invalid code "correctly", I assume.

For example I am willing to develop in your browser if it meant I wouldn't broke some rules and the browser would care about that. Of course html validators exist and browsers display invalid css in their inspectors but I am asking for something like that would expect valid code. throw an error in my face if I didn't close a html tag or used an invalid css value, at any point.

Like if a javascript code resulted in my page getting invalid layout then browser could yell at me that causes an invalid layout. Maybe even a small performance improvement if my code conformed to every layout rule.

also these text contain double-quotes so I wouldn't be surprised if they aren't even considered

few examples:

Its mission statement from the outset was "to organize the world's information and make it universally accessible and useful,"

140-character messages called "tweets"

LinkedIn filed for an initial public offering in January 2011 and traded its first shares on May 19, 2011, under the NYSE symbol "LNKD"

Ok, I think this doesn't mean much and is a flawed experiment. The test url is: https://devx.lt/en/node/9 which contains ALL the content used in this experiment. All 9 tests are done on the same page, at once.

in the 4th experiment, he searches for "site:devx.lt GetJar is an independent mobile phone app store founded in Lithuania in..." and the result is returned WITHOUT any bold text. So this was a "most relevant" result, not a "found" case. Now the problem is, these paragraphs contain same words. Google returns "LinkedIn /ˌlɪŋkt.ˈɪn/ is a business-oriented social networking service. Founded in..." because, for one it at least contains "founded" part and further the paragraph I'm sure there is more. Since the results are limited to "site:divx.lt", and paragraphs contain same words, of course all 9 tests end with "found", as it is the only page close to being relevant.

I'd like to see the same test repeated, -NOT- all tests on the same page.

Some tests return bolded results, so I consider them to be true. I think 1-2-4-5 are false positives.

I'm not sure how much views get lost, but I wonder is it worth it? There is a short video as introduction which doesn't tell much, I'd much prefer a random video from the series.

Now by making these private, no one will find this from youtube, other sites won't link it and there is no playlist so I will have to click each url every 5 minutes or so, which is not the end of the world, but not fun.

He could have asked for my email for the project files(videos and project files get sent to your email currently as I understand it), and gave videos for free. Anyone actually interested in this would definitely give their email for the files. If he wants my email to teach me something else later -- or sell me something, I think someone who entered their mail while watching the series will be more interested in what he could use the emails for, and now he won't be able to reach these kinds of people from random views, in exchange for the initial email count.

I don't think this is a nice deal, but I have no data, so just an opinion. Maybe something to consider.

Because max value should be "mt_getrandmax()" instead of "PHP_INT_MAX", it just gets a 32 bit number then scales it up.

see: http://php.net/manual/en/function.mt-rand.php

Under caution:

The distribution of mt_rand() return values is biased towards even numbers on 64-bit builds of PHP when max is beyond 2^32. This is because if max is greater than the value returned by mt_getrandmax(), the output of the random number generator must be scaled up.

edit: this post went from 5 points to 1, which I don't care about(in ~500 days I posted less than 10 times and I have ~35 points), but who downvotes documentation, seriously? -_-

<font>, I don't think there's an excuse. we know for sure that it is not out of incompetence but it was probably easier to write at the time and nobody bothered to fix it because it doesn't really matter.

For the <center>, it is probably not the case here as this is just a text based site but sometimes it is easier to center an image by that tag when your site is partitioned in many margins it is not as easy to center some stuff, or you might just prefer to add a tag.

I also like <br>, it really makes more sense to me and easier to write. It doesn't really break anything either.

I wonder how many there are, like me, think that <center> and <br> are actually really nice things to have?

I am the fold 11 years ago

Well the data sent is "window.innerHeight" so if 1920x1080 is a popular screen resolution, some people will be using windows XP which will have 30 px taskbar size, and some people will be using 40 px taskbars with windows 7. Then some people will have browsers "not maximized" so they will be missing a few pixels too, and so on.

So from single height value, we have many variations differing by few pixels. Then, I think, we can gather some popularity info from this, if there is many variation around 1080 and less around 1200, this would mean the former is more popular.

So we don't need devices with different sizes but just a few different software choices.

or so I think.

Btw, can someone explain to me how they can have ads?

I mean, if US is willing to go far enough that they seem to have obvious influence on other countries and these countries punish these individuals, when normally they don't(or so I think), surely they very interested in taking down TPB or finding out who runs it?

And they had ads when there were no bitcoin etc.

So what I'm wondering is that, if I were interested in putting my ads on TPB, I would have to put/give money to somewhere/someone.

So if I'm working at NSA, why I don't just go to tpb, look at what companies they advertise on tpb, then look at where that companies sent their money. Surely we are not talking about $10-15 here, at some point they should see "yeaah, you guys seem to give these guys $xxxx(more x?) each month" or "$xxxxx once, why?"

To transfer that amount of money I can send via my bank, or transfer it via my personal account. I can use several layers inbetween, and use other people also. Maybe I won't even take money from company but do it personally. I can make it incredibly hard to be found.

But looking at how TOR services seem to go down and the lengths they go to make sure they don't stay alive, surely if NSA actually wanted they could track them down? Surely NSA doesn't lack the power to see our transactions and surely they don't lack the power to personally track basically everyone related with whoever gave the ads. Or maybe they do, but they still know what companies TPB advertises.

Anyway, if they are not very careful, I could find who currently runs TPB. and if they are, I still might have a shot.

Or maybe I'm not interested in finding out who runs TPB, just taking or down/making it harder. Why I(government) don't go to these porn sites and say "well, if we keep seeing your ads there we will have to do something". They did threaten yahoo and others without legal basis(or so I think), why stop now?

Then considering they can't easily find new companies to take ads from considering what happened to the first 3 companies that gave ads, no one sane would want to work with tpb, and they couldn't buy or maintain servers, then finally in current form they would go down.

Of course some methods to keep it alive(fake ads, donations etc.) will be found, and of course someone else will just create a new one but they seem to be interested in making tpb very hard to maintain, take it down even if it is only for days and make sure no one in their right mind would want to create a torrent site.

Now, why I'm wrong and why they don't do just what I said?

Dropbox.com hacked? 12 years ago

why is hotmail so popular in this list? I thought gmail was the most used and even yahoo seems to go on par with gmail here.

May it be because they didn't actually hack dropbox but just hacked about 400 accounts and hotmail users were easier targets because that demographic was more like our parents?

Also the list skips from b-e to b-i in 400 users, surely if there were 7 million email addresses this shouldn't be the case?

The Bézier Game 12 years ago

Not sure if considered bug or "feature" but after first level, on levels that require you to go to your starting point, i.e.: draw a heart or circle, you can click on your starting point again, winning the level with all your nodes remaining. This can be used to skip levels.

A bit off topic but, if I were to scrape such data except without intention of selling it, instead using it myself... How fast are stock markets? Surely, I would know that the price of stock will increase in the next few days too and buying that stock after 1 hour, say, news hit a major news site, that would still profit me? If not, why? I mean surely you can find someone selling that said stock at all times, no ?

edit: replaced mysql with myself

Does it not work though? They are known for being shitty yet they are one most popular(if not the most[1])

With this bad reputation and even some boycotts like "leave godaddy, they support sopa" it is obvious they don't have a good reputation and their service is "good enough to not bother switching"

I don't think they'd grow without massive marketing.

[1] I dont know how accurate this data is, although it doesn't look too far from truth http://www.webhosting.info/registrars/top-registrars/global/...

Hey, I think sending some cash is cheap too. It is that "you are worth exactly $25" I hate. If it were - - a public thanks, that would be way better than anything. Either send nothing, or do something good. This bug is not major, but as you said "went above and beyond" some cheap giftcard only implies "you got your $25 that you worked so hard for and we are not grateful anymore, it was a nice trade." These people usually do this because they like it.

This is my point of view and not necessarily right nor wrong.

there also have been subreddits banned without violation of laws(/r/pcmasterrace), or still stays while its clearly a voting ring because some of admins decided to support them(/r/shitredditsays)

Dont get me wrong I like reddit, but free speech and rule enforcement? no, the site is a mess.

for those interested, I did look at it a bit and before I touched it was 116k~ lines. After I removed all the "bot", "spider"(but not "google" or "mozilla" or anything that might be used by real useragents)(and yes I am aware chrome doesnt use google and mozilla is used 99% of those strings, I just couldnt give any better examples) It went down to 1k~. I scrolled thru and most of those requests came from "216.151.137.36" so I removed that too. I had 500~ that wasn't "obviously" coming from bots. After this I stopped as what I wondered was "did this site get significant amount of real visits?" and the answer at that point was clearly no, or if any, less than 500.

Btw, does anyone know who this ip(216.151.137.36) belongs to? All I get is spam reports when I google it and doesnt seem to belong to any (major) spider. http://stopforumspam.com/ipcheck/216.151.137.36

Also on another question, how does google deal with web apps that have unlimited pages(dynamic urls based on get and so)? As in, how does it say "this is legit" and this site here is not. Surely backlinks are one thing, but these can be "faked", too?