Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
grayrest
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
58 ms
·
571.
▲
by
grayrest
16y ago
I get the feeling I'm missing something, but... var ctx = document.getElementById('canvas').getContext('2d'); var img = new Image(); img.onload = function(){ ctx.drawImage(img,0,0); } img.src = 'path/to/the/nodejs/generate
572.
▲
by
grayrest
16y ago
The problem is that you're applying C++ sensibilities to a prototype OO language. `this` doesn't refer to the current class, but to the current object. There are no classes and no methods. Functions don't even really belong to the object th
573.
▲
by
grayrest
16y ago
> why do people think Javascript is trying to be Lisp in particular? The reason I said lisp is because Brendan more or less always mentions he wanted to implement a scheme interpreter but Netscape marketing insisted that it look like Ja
574.
▲
by
grayrest
16y ago
`this` is not a code smell, but trying to do variable hiding/encapsulation of attributes through closures leads to grotty code. Use the leading underscore convention. It's worked in Python for years. The article author will also be a lot ha
575.
▲
by
grayrest
16y ago
If you're on OS X, bortherbard's fork of gitx might work if you're looking for a graphical option: http://github.com/brotherbard/gitx/downloads I don't actually use it to commit because I have a screwy commit flow, but I'd expect it to wo
576.
▲
by
grayrest
16y ago
Wouldn't that be considered progress? Most programmers today don't really understand how a compiler/interpreter works, how to write assembler, how to allocate/free memory, or even a solid understanding of data structures yet work somehow ge
577.
▲
by
grayrest
16y ago
There are actually a number of server side JS runtimes, but node.js (or nodejs or NodeJS, the naming is semi-inconsistent) has the most buzz/momentum. I'm confident that you'll see a number of frameworks/libraries that can take advantage of
578.
▲
by
grayrest
16y ago
CSS is actually the tweakiest part of the frontend triumvirate. The syntax isn't hard (selector + bag of key/value pairs) but putting it together so it reliably renders on all browsers takes weeks/months. I'd recommend doing sass/compass in
579.
▲
by
grayrest
16y ago
YUI2. yui3 is considerably more sane about the namespacing.
580.
▲
by
grayrest
16y ago
> Node.js (which admittedly I've never used) would appear to be available only on a tiny minority of machines you would encounter "in the wild". Given that it really only hit the public consciousness last November or so, that's more or
581.
▲
by
grayrest
16y ago
> nobody really, really cared until Google did V8 Tamarin and Squirrelfish were benchmark battling before Chrome was publicly released. I think the current focus on performance to be sparked by the CSS selector engine battle between th
582.
▲
by
grayrest
16y ago
> still awful at CSS I recommend you look into SASS/Compass. You have to learn the abstractions on top of CSS but from there you can leverage other people's knowledge of the tricks/hacks involved in putting together a good CSS layout. I
583.
▲
by
grayrest
16y ago
I'm not a dad, but I had a guy in the office put together a wiimote whiteboard with his 8 year old. He supplied the following links: http://johnnylee.net/projects/wii/ http://www.uweschmidt.org/wiimote-whiteboard
584.
▲
by
grayrest
16y ago
...it's written in Java†. † Yeah, yeah, but I'll take my chances on this one.
585.
▲
by
grayrest
16y ago
I've been in your position, quit, and failed horribly. My primary weakness as a programmer is lack of focus/tendency to get distracted and as such I was forced to recognize that I work best in a (preferably small) company. As such, here's m
586.
▲
by
grayrest
16y ago
Thanks for releasing this DocumentCloud. I've been ranting about bound models with jQuery for months. It's nice to throw away the start I've made and use someone else's code.
587.
▲
by
grayrest
16y ago
You gain the ability to downvote once you've crossed a certain karma threshold.
588.
▲
by
grayrest
16y ago
> Is that a logo fail or a me fail? They're pretty consistent with their green robot, so I'd think it's you.
589.
▲
by
grayrest
16y ago
> except perhaps storing the length -- although I'd like to check that it makes a difference first) It makes a difference in the IEs. I don't remember it making much of a difference one way or the other with the JITted engines, though i
590.
▲
by
grayrest
16y ago
This job description reads, at least to me, like the minimum requirements for any frontend developer position. It's not clear to me what makes this a lead position. I started to go on a rant about what job descriptions are generally missing
591.
▲
by
grayrest
16y ago
In your after/syntax/javascript.vim: syntax match javascriptReturnError /return\s*\n\r\?\s*\w.*$/ ... highlight link javascriptReturnError Error Obviously you can play around with the regex to tweak what matches.
592.
▲
by
grayrest
16y ago
Working fine for me in the FF 4 beta.
593.
▲
by
grayrest
16y ago
"hey! Please install a plugin[1]?" http://code.google.com/chrome/chromeframe/
594.
▲
by
grayrest
16y ago
Couple tricks: " this splits a netrw window in the directory of the current file, :Vexplore for vsplit. nnoremap - :Sexplore<CR> " I use surround.vim all the time. The default mapping for s is terrible. nmap s ysi
595.
▲
by
grayrest
16y ago
Promises are definitely gone. The pattern now is that functions taking a callback always take it as the last parameter. The callback always has an error argument as its first parameter. Since the pattern is predictable, it's easy to write a
596.
▲
by
grayrest
16y ago
When chrome frame gets officially greenlighted, I'm immediately dropping all IE 6-8 support and campaigning as hard as I can at work for them to do the same.
597.
▲
by
grayrest
16y ago
The point wasn't to make it not look like Clojure, the point was to express querying constructs in a way that's natural to the language. This isn't impossible in any language and is actually fairly common within the domain (e.g. SQLAlchemy
598.
▲
by
grayrest
16y ago
Seems like CommonJS but with keywrords added to the language instead of magic functions/free variables. As such it's six of one, half dozen the other as far as I can tell.
599.
▲
by
grayrest
16y ago
You use vi/emacs when you care enough to not want to learn yet another editor.
600.
▲
by
grayrest
16y ago
While it's relatively immature in terms of widgets available, I like yui3 (NOT 2) for building application type sites. It has a strong component model and the attributes/events system and widget base are excellent and I believe it's the onl
More ›