Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
strager
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
151.
▲
by
strager
15y ago
Care to give an example? Are you referring to Unix tools (grep, awk, sed, cat, etc.), piping and redirection, or shell scripting overall?
152.
▲
by
strager
15y ago
On object looping: Object.keys(obj).forEach(function (key) { var value = obj[key]; // ... }); Not the best thing, but it works in less lines than: var key; for (key in obj) { if (!Object.protot
153.
▲
by
strager
15y ago
Yes; just give me something; I don't care what it really is, as long as it works with how I use it (i.e. adheres to some interface).
154.
▲
by
strager
15y ago
Exactly. This is my problem with the `new` syntax . There are still other problems (in my opinion) with the concept of constructor functions. It basically boils down to mixing data (prototype) and code (constructor funciton). Side-effect
155.
▲
by
strager
15y ago
Ah; I definitely understand that (and I've felt the pain).
156.
▲
by
strager
15y ago
list($firstElement) = $this->method(); array_map(array($this, 'doSomething'), $array); Yes, neither is intuitive. And the syntax sucks. And it's not as easy to read (except sometimes where a method returns a tuple; `list
157.
▲
by
strager
15y ago
What's wrong with `data Foo = Bar | Baz { a :: Int }` ? I'm not a day-to-day Haskeller, but I find the record syntax very nice and succinct.
158.
▲
by
strager
15y ago
JavaScript. Kill the "new" operator. Make prototypes less magical (i.e. use something like `Object.create` to construct). Secondarily, kill getters and setters. (That includes `Array#length`.) I want code and data, not code, data, and co
159.
▲
by
strager
15y ago
Similar, but more speedy, less comprehensive (ES5-only), and doesn't break your back button: http://www.javascripture.com/
160.
▲
by
strager
15y ago
> Just dump everyone in one Circle To me, this is shit work (that the author was talking about).
161.
▲
by
strager
15y ago
I only realized there were examples on the front page after visiting HN. They're completely below the fold for me (1440x900). The examples page had a similar problem. The examples (pretty close to the fold) looked like comments. I went t
162.
▲
by
strager
15y ago
Okay, I missed "The mouse will be anchored to that position" part. I really disagree with this part of the proposal. Thanks for pointing it out. However, the comment about the cursor moving to the centre of the screen is an implementatio
163.
▲
by
strager
15y ago
The article's suggestion does not say the mouse would be moved or locked by the web program. The program would be able to hide the cursor (which it can already do) and receive 'virtual' mouse coordinates. My main concern is number overflow
164.
▲
by
strager
15y ago
Sprite sheets?
165.
▲
by
strager
15y ago
That's how I do things (unless a semicolon follows the keyword, as in `return;`). Exception: `typeof` in C# (`typeof(Object)`, for example).
166.
▲
by
strager
15y ago
Either Javascript or JavaScript is acceptable.
167.
▲
by
strager
15y ago
JSLint complained when I had two `var` statements; it wanted me to merge the two into one. I repeat `var`, so this annoyed me. (Of course, it wasn't hard to fix, but the examples didn't show any multi-`var` usage so it may be a problem fo
168.
▲
by
strager
15y ago
I don't have an iOS device, so I can't comment on the app itself. The flavour the site's design adds is excellent. Major props for that. I think it'd be cool if the background was `position: fixed;`. I also really like the social aspect on
169.
▲
by
strager
15y ago
What's the e-mail address the message will be sent from? I want to be sure I receive the message; I don't want it ending up in my spam box.
170.
▲
by
strager
15y ago
It took me a while to figure out this was a slideshow, and that only part of the page is clickable. (Plus, keyboard keys do nothing.)
171.
▲
by
strager
15y ago
Reddit discussion: http://www.reddit.com/r/javascript/comments/hpg3g/a_javascri...
172.
▲
by
strager
16y ago
I think the author intended to say "iterating" instead, for example.
173.
▲
by
strager
16y ago
Maybe it'll work if you send the appropriate `Content-type`?
174.
▲
by
strager
16y ago
I didn't check, but I think the 681 includes the CSS and such. The "doctype" part is case-insensitive, according to the pseudostandard on WhatWG.org: http://www.whatwg.org/specs/web-apps/current-work/multipage/... I guess your editor was
175.
▲
by
strager
16y ago
DuckDuckGo: !mdc date, or !mdn date, or !js date. Woo!
176.
▲
by
strager
16y ago
Three bug reports: In Opera 11, the blog post doesn't show tags, but the main site does show tags. This may be the problem @tsanzer was experiencing. When zooming (ctrl-scrollwheel, e.g.), the tags are not in their correct positions (at le
177.
▲
by
strager
16y ago
Mirror without obnoxious BOLD : http://strager.net/POL
178.
▲
by
strager
16y ago
That's not really clear; it should be better stated.
179.
▲
by
strager
16y ago
Good points, but it seems some of that (scrolling, selection, form data, etc.) should be left to the browsers to fix/implement/deal with. Granted, it is a really bad user experience. Seems like this should be made a JS library in the mea
180.
▲
by
strager
16y ago
Nice remark; thanks! Full (unbroken) link: http://calendar.perfplanet.com/2010/thoughts-on-performance/
More ›