Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lowboy
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
49 ms
·
481.
▲
by
lowboy
14y ago
CS is more than just syntactic sugar, but speaking in terms of syntax it has a more minimal mindset like Python or Ruby. The difference between source and compiled code is much much closer. CS has been designed as a pure abstraction of JS,
482.
▲
by
lowboy
14y ago
In practice, the scoping difference that you run into 99% of the time is that implicit var keywords are in front of variables that haven't been seen in the current scope, and you have to assign globals to your top level scope ( window in
483.
▲
by
lowboy
14y ago
From a comment on the other HN thread ( http://news.ycombinator.com/item?id=4534863 ) string interpolation multi-line strings comprehensions guarded loops (hasOwn...) easy constructor/prototype definition (class)
484.
▲
by
lowboy
14y ago
As I wrote in the other recent CS thread here, I think your coding style must be ill-suited to coffeescript. I've had a few situations where I've had to test things out for myself, but nothing like what you put forth. I just write CS as I w
485.
▲
by
lowboy
14y ago
Nope, and I don't miss having to have all of the var statements everywhere. Can you provide an example in js where knowing whether it's a new var vs. reassignment is useful? I can't think of a case, but it could just be me.
486.
▲
by
lowboy
14y ago
I have situations like this quite frequently where I need to turn vars into members of an object: title = getTheTitle() img = (shouldWeGetImg) ? getImg() : "placeholder.jpg" body = ... # 8 lines of code to define body,
487.
▲
by
lowboy
14y ago
Perhaps a style guide should be put up at coffeescript.org, or at least linked to.
488.
▲
by
lowboy
14y ago
> If you are young 20 something, have asian friends, and on any sort of social network Absent supporting data, the bit about asian friends seems a bit prejudiced.
489.
▲
by
lowboy
14y ago
It's not necessary to have the markup in a textarea on the demo page either when someone could just view the source and copy+paste it from there. But it's not about what's necessary, it's about what will be of utility to people. Consider
490.
▲
by
lowboy
14y ago
vim, vim, and vim
491.
▲
by
lowboy
14y ago
Why not add it? It's not a standard as in browsers won't use it, but haml is probably one of the most widely-used html templating systems.
492.
▲
by
lowboy
14y ago
The only time you should use a "creative" interface is when absolutely no other standard interface pattern is available. Otherwise you're throwing away a great deal of learned behaviour in your users and forcing them to consciously hunt for
493.
▲
by
lowboy
14y ago
Halfway decent is better than completely unstyled mess of Times New Roman because the dev doesn't give a shit about design. Bootstrap can be considered the start of a website (hence the name) and you can style Bootstrap to not look like Boo
494.
▲
by
lowboy
14y ago
"It's just javascript" !== "You don't have to change your workflow at all"
495.
▲
by
lowboy
14y ago
I think parent's point is that s/he wants b,c,d on different lines if they were long variable names.
496.
▲
by
lowboy
14y ago
1) Destructuring assignment: http://coffeescript.org/#destructuring (although they lack an object example). 2) This has to do with the unary plus operator more than just cs - since +varname is an expression, it treats it as such. Fair co
497.
▲
by
lowboy
14y ago
Yeah, I'm with you on this one. However, you can add brackets if you want (and I often do): coffee.height(drink(coffee, e.angle))
498.
▲
by
lowboy
14y ago
I didn't come away with that impression - what sections of the article made you lean that way?
499.
▲
by
lowboy
14y ago
Pardon? The coffeescript site has pretty comprehensive info that describes the syntax. If you don't find a specific example on the site, "it's just Javascript" has rung true for me in almost every case. Yes, there is a learning curve and it
500.
▲
by
lowboy
14y ago
Why are you bringing reduce() into this? Seems to fly in the face of its common purpose, stated on the MDN page: Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value. B
501.
▲
by
lowboy
14y ago
It's not a LoC in terms of code complexity, but it is another line with symbols to parse when you're reading code and it's another few keystrokes to type out each time you have a function or object.
502.
▲
by
lowboy
14y ago
> The Dropbox devs apparently didn't want to go through that learning curve That's not a fair statement. I'm a competent js developer, having trudged up that curve, and I still love cs. Not for lack of learning, but because I value brev
503.
▲
by
lowboy
14y ago
I'd just get my ideal tape out (waterproof, no residue) and strap those ads down and enjoy my free jetski time. But this comparison will always be flawed, like so many digital/real world ones are today. I don't see running AdBlock as immora
504.
▲
by
lowboy
14y ago
You would think, but I imagine some will be swayed by the numbers even if they do think about that.
505.
▲
by
lowboy
14y ago
It's not that they're offensive, it's that they slow my browser down and often distract from the content of the site itself. I'm also wary of third party cookies and scripts running that don't strictly need to be. I don't disagree with his
506.
▲
by
lowboy
14y ago
To make that comparison more fair, the ads need to be canvas that flapped in the wind, slowing you down occasionally (as ads on websites will do) and every once and a while one would lift up in front of the control panel so you had to clear
507.
▲
by
lowboy
14y ago
Having "UX fixes for various sites" is too generic and varied in description - it would be a hard sell. However, I could see it working if you were to drill down to one specific feature, like hiding the login prompt for a selection of sites
508.
▲
by
lowboy
14y ago
If they didn't want to see ads on site X, they just shouldn't go on site X? How do you feel about people who change the TV channel when a commercial comes on? What about PVRs that automatically skip commercials on playback?
509.
▲
by
lowboy
14y ago
Although it's the site and not the example, I found it somewhat ironic that I had to whitelist javascript to view something in pure CSS.
510.
▲
by
lowboy
14y ago
I've used both Makefiles and Grunt for projects and I much prefer Grunt: * I find the js syntax of gruntfiles much cleaner and harmonious with the js code I'm writing for my projects * From what I've seen, Makefiles are meant to create outp
More ›