Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dherman
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
dherman
14y ago
It's a lot harder to add types to a general purpose programming language. Your types have to match actual programming idioms, and if you care about them being safe (which, to be fair, recent languages like Dart and TypeScript don't), you
62.
▲
by
dherman
14y ago
Yes, the observable semantics is 100% identical to running the same code in an existing JS engine. That's the genius behind Emscripten (i.e., the genius of Alon Zakai) -- he figured out that you can effectively simulate the semantics of mac
63.
▲
by
dherman
14y ago
Nobody is going to agree to standardize the internals of their JS implementation. Competition for JS performance remains high, engines change their implementations all the time. Engine implementors do not want to, and should not, expose the
64.
▲
by
dherman
14y ago
Best of luck... ;-P Seriously, asm.js already comes pretty close to a standardized VM at a low level. But we intend to grow it to include integration with structured binary data and GC, to the point where it'll provide very similar function
65.
▲
by
dherman
14y ago
Don't think I haven't explicitly referenced you in my talks already! :D http://vimeo.com/43380479
66.
▲
by
dherman
14y ago
Compilers like Emscripten and Mandreel, which already generate code similar to asm.js, can be modified (we already have it implemented for Emscripten, it's not a big change) to generate valid asm.js. Then engines that recognize it can optim
67.
▲
by
dherman
14y ago
It's a term used far more by enthusiasts than by actual PL researchers. It supposedly stands for "theory," but that confuses the wide range of PL research, some of which is theory, but much of which is not. There's a very good discussion ab
68.
▲
by
dherman
14y ago
All abstractions can make your code unreadable; the key, as always, is to create good abstractions and document them clearly. Macros are syntactic abstractions. It's just as important to document them as it is for functions or objects. Of c
69.
▲
by
dherman
14y ago
> or like with Brendan's slide that desaturates a picture of salt as if (P)NaCl is going to come for your children in the night. Really now. I created that slide, taking the picture from Google's own NaCl web site: https://developers.g
70.
▲
by
dherman
14y ago
> Is it just me or does the proposed ES6-standard smell of heavy feature creep? I've been on TC39 for years and the vast majority of what we do is cut. > we get classes _and_ modules _and_ typed objects. Classes are syntactic sugar
71.
▲
by
dherman
14y ago
Though the expression version of => comes pretty close to TCP. Dave
72.
▲
by
dherman
14y ago
> The presentation focused on what it perceived as missing features: structs (seriously?), classes, modules, syntactic sugar, macros, etc. The nature of a widely-used technology is that you can't remove features, you can only add. And y
73.
▲
by
dherman
14y ago
I'd forgotten about the whole Lisp tradition of expanding + evaluating one form at a time -- once again betraying my Scheme biases. :) That's making it hard for me to think about how to compare the two. I'm really not familiar enough with t
74.
▲
by
dherman
14y ago
Interesting. I don't see how this works. I wonder, is it different if you do this? (let [thing "outer thing"] (defmacro foo [prefix] `(str ~prefix thing)) (let [thing "inner thing"] (prn (foo "should sa
75.
▲
by
dherman
14y ago
> Ok, so are you are concerned with the case where the person defining the macro uses a symbol from the namespace of the person using the macro but that symbol has been rebound by the user inside of a let surrounding the aforementioned
76.
▲
by
dherman
14y ago
> Clojure does not have these issues: when the macro is called, the symbols are already attributed with the full namespace qualification, and usage of quasi-quote inside of the macro definition will also apply namespace qualification to
77.
▲
by
dherman
14y ago
That was me. :) Caveat: I know more about hygienic macros than I do about Clojure, so I'm not in a position to critique Clojure specifically. Hygiene is (roughly speaking) about getting scope right by default but has never been about forc
78.
▲
by
dherman
14y ago
[Disclaimer: I have decades of first-hand knowledge of Hilary's awesomeness, going back to when we were CS students together in college. So yeah, I'm defending my friend.] I'd like to ask you to think twice before publicly questioning someo
79.
▲
No single benchmark for the web
(hacks.mozilla.org)
67 points
by
dherman
14y ago
|
11 comments
80.
▲
by
dherman
14y ago
Unfortunately, his tricks no longer work in current JS engines; it relies on using [].sort.call() which I believe used to return the global object but now throws an exception. AFAICT, you need to add {} to make this work in current J
81.
▲
by
dherman
14y ago
I think if you wanted to make this really robust, you could use more techniques to beef it up. One technique would be to store verbose or commonly-used string constants in accessible locations like Array.prototype.f. Then you could access,
82.
▲
by
dherman
14y ago
PS I flipped the logic in my explanation; whitespace coerces to 0 and letters coerce to NaN. Which is why filter removes the whitespace and not the letters.
83.
▲
by
dherman
14y ago
Funky! Luckily that bug doesn't interfere with this trick, since it's only relying on pretty-printing integers. Dave
84.
▲
by
dherman
14y ago
Arg, scooped! I was working on this exact same thing! :D Since you've beat me to it, let me offer up a couple additional tricks you might want to use. If you want to make this completely independent of browser API's, you can eliminate the
85.
▲
by
dherman
14y ago
That's at least partly because SpiderMonkey supports a superset of the ES5 language, including Mozilla-specific extensions and candidate features for future versions of the standard. Dave
86.
▲
by
dherman
14y ago
It's not so much a reduced subset as a kernel language: the full ECMAScript Edition 5 language can be translated down to the kernel language, so in principle they can actually model the behavior of any program that the language defined by t
87.
▲
by
dherman
14y ago
This headline is misleading, especially given how much people love to argue about semicolon insertion. This has nothing to do with semicolon insertion. It's just about an artificial constant limit in how large a certain type of parse node (
88.
▲
by
dherman
14y ago
It's easy to say "X is not cheap, Y is slow". Yeah, I probably wouldn't have worded it that way. I think the better way to look at it is, it's hard to know how to predict the performance of JavaScript, given the complex, dynamic,
89.
▲
by
dherman
14y ago
JS JITs are wonders of modern engineering, for sure. But there's a weird paradox in that as they get smarter, it doesn't get easier to write optimized code, it actually gets harder! Nobody really understands how to write optimizable code. N
90.
▲
by
dherman
14y ago
Just a temporary name. We're tossing around name ideas. Michael's a true hacker. He writes code first, asks questions later. I'm more useless, so I like to think about names. ;-)
More ›