Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Drup
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
91.
▲
by
Drup
9y ago
Not the author, but: Awesome visualizations: https://bost.ocks.org/mike/algorithms/#maze-generation Explanation of most maze-generation algorithms: http://weblog.jamisbuck.org/2011/2/7&#x
92.
▲
by
Drup
9y ago
I simply made my peace with the fact that popularity has little to do with merit. :)
93.
▲
by
Drup
9y ago
I would actually argue the opposite: ML languages propose the sweet spot of having functional features but still being flexible. Mutability, OO and various other feature are all there just when you need them. You don't need, like in Ha
94.
▲
by
Drup
9y ago
Since the author likes both F# and structural typing, he might be interested in OCaml. F# took a lot of stuff from OCaml, but avoided both the object system and most of the module system, which both feature different flavor of structural ty
95.
▲
by
Drup
10y ago
Well, multisets, multimaps and a lot of other things are also provided in containers and core. It's nice that you (already!) adopted that style of iterator. I'm not sure what an "OCaml compatibility layer" would mean. It
96.
▲
by
Drup
10y ago
Oh, great, yet another library of data structures that introduce incompatible abstractions with both the standard library and the 3 other big libraries of data structures[1,2,3], that is exactly what the OCaml ecosystem needs! :D More serio
97.
▲
by
Drup
10y ago
As an (aspirant) programming language theorist, we have a really great advantage in this field: advances in the field of prog lang have a natural distillation process: getting into a "real" programming language. And it's grea
98.
▲
by
Drup
10y ago
It's actually faster to separate things, because you will be able to implement them cleanly. Having a good pipeline such as "text -> AST -> typed AST -> IR -> .... -> ASM/VM code" is very valuable. The cos
99.
▲
by
Drup
10y ago
While I agree with you those 3 points are extremely important, it turns out there is at least one parser generator that can do all of it: http://gallium.inria.fr/~fpottier/menhir/ It supports both incremental pars
100.
▲
by
Drup
10y ago
Raw lisp is obviously very easy, not sure about the various schemes. OCaml, the whole SML family are easy to parse (just an LR grammar that is easy to copy). I think Rust is the same. IIRC, Java is LL(k), so very easy. C is not LR(1) for an
101.
▲
by
Drup
10y ago
My point is precisely that, if you are creating your language from scratch, you shouldn't have to do that. Those are mistake needed because the C grammar is full of cruft (and the C++ one is even worse). It's much better, for a ne
102.
▲
by
Drup
10y ago
I don't understand why so many people glorify hand-written parsers. Maybe because they never used good parser generators (not unlike type systems and Java) ? Personal opinion: writing parsers is the least interesting part of an interpr
103.
▲
by
Drup
10y ago
Agda's type system is not turing complete, you can only run on the type-level functions that are proven to be terminating [1] (using well-founded induction or co-induction). Same for Coq, and probably Idris. [1]: http://wiki
104.
▲
by
Drup
10y ago
I would tend to say: It's the basis of everything. Here are some examples that were not given in other comments: - Graph theory is pretty algebra-heavy, and graphs are everywhere. - Static analysis, in particular abstract interpretatio
105.
▲
by
Drup
10y ago
For all those propositions, I have only one question: Why would I use that instead of OCaml ? OCaml is far from being perfect, but it has lot's of features and a decent community (especially compared to all those hobby/research la
106.
▲
by
Drup
10y ago
Nim always looked to me as a modern version of OCaml made by someone who has no idea how to do static type systems properly. The language as a whole might have a nice feeling and convenient features, but the type system is really not good .
107.
▲
by
Drup
10y ago
This exist for (part of) the french legal code: https://github.com/steeve/france.code-civil , https://github.com/Legilibre/Archeo-Lex This uses open data published by the governments at https:
108.
▲
by
Drup
10y ago
This is quite old. MetaOCaml has been rewritten since (the new version is linked in another comment) A better ressource to learn about multi stage metaprog in OCaml is Jeremy Yallop's course on advanced functional programming: See &quo
109.
▲
by
Drup
10y ago
Actually, you do, and rather comfortably. (Sources: me, 22k/year after taxes. Or my parents who raised two children in a big flat in paris, both 35k/year)
110.
▲
by
Drup
10y ago
I've wanted to write a blog post for a while, that would list the various advanced usage of the module system in OCaml. Mirage has already been cited, see also [1]. Another example is ocamlgraph [2]. I have an old reddit post that atte
111.
▲
by
Drup
10y ago
People gave you the part in favor of bucklescript, so I'll give you the other side of the story: bucklescript doesn't respect the OCaml memory model and runtime semantics, which makes it incompatible with some part of the ecosyste
112.
▲
by
Drup
10y ago
If you want to use the OCaml ecosystem, use js_of_ocaml. It has much better compatibility and there is no perf difference. In particular, js_of_ocaml works with both core_kernel and async_kernel.
113.
▲
by
Drup
10y ago
Uh, given that you don't respect ocaml's memory model and force -safe-string, that's just not true. Any Obj.magic that is correct in OCaml is probably not going to be correct in bucklescript. Did you actually tried to compile
114.
▲
by
Drup
10y ago
I think you misunderstand what "regex combinators" means. In particular, SRL is not regex combinators. TAForObvReasons in another answer posted this[1] that would explain it to you. [1]: https://groups.csail.mit.edu&
115.
▲
by
Drup
10y ago
Sure, but 1. It's pretty easy to expose a similar API, those are all functions 2. The documentation tools for the language naturally document the combinators. Even if the actual combinators are different, it's still a much better
116.
▲
by
Drup
10y ago
Regex combinators are a much better solution to that problem, for which I gave various arguments here[1]: - You don't need to remember which regex syntax the library is using. Is it using the emacs one ? The perl one ? The javascript o
117.
▲
by
Drup
10y ago
According to the internet, NYC-Montreal by car is 595 km Paris-Marseille, in france, by car is 774.92km Paris-Marseille in train is 3h17. The trains are comfortable, you arrive in the middle of the city and you don't have to park. Conc
118.
▲
On Monsters, Role Playing, and Blackness
(giantbomb.com)
1 points
by
Drup
10y ago
|
0 comments
119.
▲
by
Drup
10y ago
If you look at the API of ocaml-re (and tyre), you'll see it's pretty much equivalent to regex-applicative. Regex combinators are nice. "Parser combinators", for me, denotes actual parsers, for non-contextual or contextu
120.
▲
by
Drup
10y ago
If I understand your question correctly, no, it doesn't. Actually, the thing that you "unparse" doesn't even have to come from a regex matching to begin with. As long as the type matches, everything is fine. If you are i
More ›