Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Roboprog
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
59 ms
·
571.
▲
by
Roboprog
10y ago
DHH did make a good point about taking Google down a peg :-) Google has had some goofs as well as hits, and at the end of the day, they are just a marketing company that forces their employees to write in Java and C++. Eeeeooohw. (I have f
572.
▲
by
Roboprog
10y ago
Not shown: assertions :-) (which, for kernal code, would be turned off later, anyway) In languages other than C, with exceptions and stack traces, most precondition checks just become clutter, anyway. Although it would be nice to have &qu
573.
▲
by
Roboprog
10y ago
Not sayin' you're wrong, but... I'm going to go sit in the corner and weep, now.
574.
▲
by
Roboprog
10y ago
Pretty much nailed it in the first line :-) I prefer the shorter version for being shorter, and for generalizing the update point at the end (and giving it a name), which stresses that there will be an update (delete). Alas, most of my
575.
▲
by
Roboprog
10y ago
$3000? It had better be really something. I wonder how well VST synth modules work on it? I like my iPad synth toys, but they are not compatible with Mac.
576.
▲
by
Roboprog
10y ago
Javascript closures are like Ruby blocks and closures: you get to "touch", as well as "look" - and also see "touches" that happened in between times elsewhere.
577.
▲
by
Roboprog
10y ago
Javascript (in browser) is async, but not concurrent (like say, threads). JS will run the code in an event handler to completion (or not - while(1){}) before starting the code for the next event. Thus, code from one execution path cannot
578.
▲
by
Roboprog
10y ago
Close. Assigning "foo" without var will look up the lexical scope stack from most nested to global. If nothing exists, it will indeed make a new global. However, if there is a "foo" somewhere in that scope stack, it w
579.
▲
by
Roboprog
10y ago
Ehw. Yeah, I sort of assumed that you had a top level function / IIFE (in a .js file, FWIW) in which the var's were nested. Somebody writing stuff, into the global namespace, directly in <script> tags, has bigger problems :
580.
▲
by
Roboprog
10y ago
Living in the Age of Software <<expletive as adjective-ish noun>>
581.
▲
by
Roboprog
10y ago
The block which is long enough to need block scope is long enough to be a function. Special bonus to couple decomposing assignment with IIFE so that any variables/symbols which "escape" from the nested function are explicit (
582.
▲
by
Roboprog
10y ago
I think you meant "out[ key ] = deepFreeze( out[ key ] )" in the innermost step :-) (recursive)
583.
▲
by
Roboprog
10y ago
oops, yes. (sum vs some)
584.
▲
by
Roboprog
10y ago
Aww. Somebody changed the title on the link. :-( Yeah, it was rude. But it does some up the end of some weeks.
585.
▲
by
Roboprog
10y ago
Ugh. All this "make Javascript like Java" stuff needs to stop. Cool stuff: Tail call elimination. Arrow functions. Assignment spread for multiple return values and "rest" / default parameters. Proxying (combine
586.
▲
by
Roboprog
10y ago
Any popular "deep freeze" utilities around?
587.
▲
by
Roboprog
10y ago
This one is a useful reference, as well: http://es6-features.org/#Constants
588.
▲
by
Roboprog
10y ago
The deep matching gets too cluttered, but the simple case I find to be quite readable and useful: http://es6-features.org/#ObjectMatchingShorthandNotation
589.
▲
by
Roboprog
10y ago
I also did a lightning talk demo on Nashorn vs Node performance a few months ago (local JS user group). For the little string mashing benchmark I put together (originally to compare sequential / fork / thread performance in variou
590.
▲
by
Roboprog
10y ago
I did a presentation on using Nashorn (and jjs) about a year ago at SacJUG (our local Java user group). It's pretty interesting the level at which you can intermix Java and Javascript in Nashorn. I tinkered with the idea of using a li
591.
▲
by
Roboprog
10y ago
I realize you are critical of that viewpoint, but point 2 seems really wacky to me. Current big project at work has a back end that is not in JS, but we still have a way to run the same validation code on both sides, which is run in an embe
592.
▲
by
Roboprog
10y ago
I hear you. JSX sounds like the wrong thing to me, as well. (but I'm also working on a long Angular 1 project at my job, so I "may" be biased) I REALLY like that Angular 1 allows you to simply make a mockup, then add the &qu
593.
▲
by
Roboprog
10y ago
Thanks. I wonder if somebody has a good comparison of the Lodash vs Ramda written up. Probably, but I haven't done the google and evaluation yet :-(
594.
▲
by
Roboprog
10y ago
Worse & Worserer: Windows and C++, which even more people run :-( (with apologies to the Dumb and Dumber movies)
595.
▲
by
Roboprog
10y ago
Sorry. Generally, when I hear people complain about the lack of "types" in a dynamic language, I'm pretty sure what they mean is [static] "classes", so that "intellisense" (auto-complete, for non-MS/
596.
▲
by
Roboprog
10y ago
Operator overloading is doubly evil :-) FWIW, I mentioned that I think even the built it infix operators are a bad idea, rather than functions, such as variadic add(...), multiply(...), or(...), and(...). (subtract() and divide() really sh
597.
▲
by
Roboprog
10y ago
Compile time types are nice to have, if they stay out of my way (type inference, the ability to easily opt out for certain "tricky" code...) Types keep things (except for database column names or JSON import...) from blowing up th
598.
▲
by
Roboprog
10y ago
Why use an OOP language when you can use an FP one? I must have missed the memo that proved that Java / C# / C++ / Simula 67 are the one true path to productivity. Async I/O is clumsy on the server side, though.
599.
▲
by
Roboprog
10y ago
There are IDEs that support JS. Use JS to do FP (functional), rather than OOP, and it totally rocks. Refactoring stuff works pretty well with nested functions - function names have to be "real" (if avoiding eval()), as opposed to
600.
▲
by
Roboprog
10y ago
"/s" [End] Sarcasm :-)
More ›