4 ms·
This is crazy! It actually generates C++ code on the fly by translating AST nodes one to one https://github.com/cosmo-ethz/hope/blob/master/hope/_generator.py h
by bouk 12y ago
This is crazy! It actually generates C++ code on the fly by translating AST nodes one to one https://github.com/cosmo-ethz/hope/blob/master/hope/_generator.py https://github.com/cosmo-ethz/hope/blob/master/hope/_generat...
- orbifold 12y agoThis precisely what I would a physicist expect to do, Cern has >16 million lines of C++ and you can be sure that the analysis code written by non-programmers barely works and not nescessarily uses sane programming principles.
- rurban 12y agoIt's basically the same strategy rperl uses, compiling a restricted and typed subset of perl5 to C++11 on the fly, via Inline::CPP http://rperl.org http://rperl.org I wouldn't call that JIT, because the term JIT is normally used for direct compilation to machine code, and all those other compile-to-c|c++-on-the-fly languages don't call it JIT neither.
- acqq 12y agoI'm sure clicked the upvote, but your comment is gray now. :( Please, other readers, try to correct, upvoting the parent comment! It's a good comment, and it deserves to be upvoted. I can't do anything more. Thanks. Edit: I've found the culprit: believe or not, the older Opera browser can have the "down" linked area in the middle of the up arrow! On the same hight (same Y) just changing the X position of the mouse will change between the UP and DOWN vote! The down vote area extends from the down arrow up to the top of the up arrow(!) and is of the same width (a few pixels at most). Weird. I must avoid that browser for HN. http://s4.postimg.org/nyec1bmvh/badlink.jpg http://s4.postimg.org/nyec1bmvh/badlink.jpg Anybody knows how this is possible?