Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sonyandy
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
1.
▲
by
sonyandy
8y ago
That's the joke.
2.
▲
by
sonyandy
10y ago
I'd be very interested in a low level FP without GC (including reference counting), as well. I believe a major difficulty is how do deal with closures. Obvious solutions include region inference and copying the closure, both with obv
3.
▲
by
sonyandy
11y ago
It is in fact incorrect. The incorrect assumption is nested structure implies nested destructor calls. This can be avoided by ensuring each node in the structure does not destroy the next node_ptr (explicitly or more likely implicitly).
4.
▲
by
sonyandy
11y ago
How would you perform destruction of a tree with more than one child tail recursively? I mean this as an honest question - my current implementation of array_mapped_trie performs this operation via non-tail recursive calls. EDIT: I also do
5.
▲
by
sonyandy
11y ago
Luckily, you can do the rewrite manually. I recently implemented an array mapped trie that shared structure when copied. `find`, `erase`, and `at` were all rewritten to use loops after first implementing them recursively (and profiling in
6.
▲
by
sonyandy
12y ago
To "what's the point of immutable objects?": runtime polymorphism + maintaining invariants (since immutable, at the time of construction).
7.
▲
by
sonyandy
12y ago
In addition to Compiling with Continuations, I found Compiling with Continuations, Continued by Andrew Kennedy very useful, as well. http://research.microsoft.com/pubs/64044/compilingwithcontin...
8.
▲
by
sonyandy
12y ago
What about function nothing() { return { match: function(cases) { return cases.nothing(); } }; } function just(x) { return { match: function(cases) { return cases.just(x); } }; } just(1).match({
9.
▲
by
sonyandy
12y ago
"survival of the fittest" is closer to "not survival of the not fittest" than "not survival of the not-fit", which is not the same as "death to the weakest".
10.
▲
by
sonyandy
12y ago
In C++, duck typing (structural typing) could be represented explicitly using type erasure (explicit in how you have to declare what the structure is) or using templates, which do not require declaration of the structure beyond the actual u
11.
▲
by
sonyandy
12y ago
Just because it's C doesn't mean it's the minimal library. Additionally, just because it's header-only C++ doesn't mean it's the minimal interface.
12.
▲
by
sonyandy
14y ago
Simple syntax is not the same as simple semantics.
13.
▲
Javascript, Underscore, and type class emulation
(reddit.com)
1 points
by
sonyandy
14y ago
|
0 comments
14.
▲
by
sonyandy
14y ago
An extension that GHC provides, and therefore part of the effective standard, is Safe Haskell ( http://www.haskell.org/ghc/docs/7.4.2/html/users_guide/safe-... ). A Safe (compiled with -XSafe, containing the LANGUAGE Safe pragma, or inferr