"Unlike ordinary JIT compilers for other languages, Ruby’s JIT compiler does JIT compilation in a unique way, which prints C code to a disk and spawns common C compiler process to generate native code."
what the fuck
@revenant Take a look at the parser for some fun times (read: "parser" as in 8000 lines of yacc grammar)
@revenant life hacks
@revenant That's...not what JIT means.........
@Skirmisher @revenant it implements just-in-time Ruby compilation in terms of ahead-of-time C compilation 🤓
@revenant @Jo wow. i thought that had to be a joke, but no, here it is corroborated: https://www.johnhawthorn.com/2018/02/playing-with-ruby-jit-mjit/
😱
@revenant wow, that's got to be a new low in lazy programming
@revenant oh so it's basically like pyximport!
@revenant wtf the fuck
@revenant proper unix philosophy means you don't write your own compiler.
just hand your code to someone else's.
@revenant (I'm not joking, this is actually nice!)
@SoniEx2 if your JIT involves saving files to disk and passing them to third-party processes then your JIT is a huge hack
@revenant this is the plan 9 way.
@SoniEx2 not really sure what this has to do with anything
@revenant if something (managing native code) is too complex then shell out (to a C compiler + the dynamic linker). it follows UNIX philosophy and is probably how you'd do it in plan 9.
@revenant also this is actually way more portable than conventional JITs.
@SoniEx2 @revenant it might be portable but this Rube Goldberg device lacks the benefits of JIT, which are low latency and small startup times. Not to mention that using gcc/clang means you can't predict the latency in a consistent manner.
Honestly this is not JIT and it's not really related to Plan 9's philosophy either. So to sum this thing up: wat 
@polychrome @revenant This is a JIT. It could be a better JIT if the target C code did some extra checks and inlined some values.
@SoniEx2 @revenant
You don't even NEED a JIT-ed high level language on Plan 9 because the dynamism is in the FS, not the language. The few dynamic languages you use are already perfectly suitable for what they were built for and probably wouldn't benefit enough from JIT to make it worth the effort and complexity.
@grainloom @revenant let me JIT the FS.
@revenant Our reaction went from, haha funny, to wtf, to ick.
@revenant this sounds like an IOCCC entry
yeah, it's pretty much exactly what a winning entry from 2014 did
@revenant So it doesn't depend on LLVM. 😂
.@revenant most people thinking: "omg that's horrible"
Me thinking: "Oh interesting, I might consider that now that I know it's robust enough for ruby..."
@revenant
Isn't this what ghc did for the first few years too?
@revenant unique: read ad-hoc and badly designed
@revenant *blinks* 0.o