| ▲ | A new C++ back end for ocamlc(github.com) | ||||||||||||||||
| 142 points by glittershark 6 hours ago | 9 comments | |||||||||||||||||
| ▲ | anitil 6 minutes ago | parent | next [-] | ||||||||||||||||
> Using these more sophisticated data structures, g++ is able to compute the prime numbers below 10000 in only 8 seconds, using a modest 3.1 GiB of memory. Finally, I can get some primes on my laptop! | |||||||||||||||||
| ▲ | QuadmasterXLII 6 hours ago | parent | prev | next [-] | ||||||||||||||||
Brilliant stuff. A tip for writing long-running C++: bizzarely, the C++ interpreter completely lacks tail call optimization. As a result, most idiomatic C++ code implements and uses reverse, map, range, filter etc, which don’t blow the stack if you implement them like (forgive the pseudo-code)
Whoever has to maintain your code after you are gone will apprrciate that you used the idiomatic, portable approach instrad of relying on command line flags. | |||||||||||||||||
| ▲ | Caum an hour ago | parent | prev | next [-] | ||||||||||||||||
This is a really interesting direction for OCaml. A formal C++ backend could significantly simplify embedding OCaml into existing C++ codebases, especially where linking against the standard OCaml runtime might be tricky. I wonder how the performance compares to the existing native backend in long-running processes. | |||||||||||||||||
| ▲ | zorobo 4 hours ago | parent | prev | next [-] | ||||||||||||||||
This made my day, thank you! | |||||||||||||||||
| ▲ | dnmc 5 hours ago | parent | prev | next [-] | ||||||||||||||||
Is this the Stephen Dolan of "mov is Turing Complete" fame? | |||||||||||||||||
| |||||||||||||||||
| ▲ | hudsonhs 4 hours ago | parent | prev [-] | ||||||||||||||||
She (Jane Street) is not gonna notice you, bro | |||||||||||||||||
| |||||||||||||||||