Recent submissions

Comment · 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.

Comment · 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.

Comment · 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?

Comment · 11 years ago
It exists in other languages, too, like PHP.
Comment · 11 years ago
Comment · 11 years ago
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.

Comment · 11 years ago
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"

Comment · 11 years ago
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.

Comment · 11 years ago
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.

Comment · 11 years ago
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? -_-

Comment · 11 years ago
I agree. Its just they could add a class to css, and instead of setting font tag to each element, just add the class. But of course, since they are generated in a loop anyway, there's no practical difference.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton