3 ms·
> Which language can do anything without some asm and support as many platforms as C? I wouldn't be surprised if someone figured out how to do the interrupts a
by oliverkwebb 2y ago
> Which language can do anything without some asm and support as many platforms as C?
I wouldn't be surprised if someone figured out how to do the interrupts and register control necessary to invoke syscalls with pure LISP/Scheme/CL :P
P.S. anything that compiles with LLVM and has an ingrained way to do print() that doesn't invoke libc, although there's a blurry line here between "pure asm"/"compiles to asm" that involves trusting-trust-style bootstrapping of features into the compiler
- oguz-ismail 2y agoYou don't know what you're talking about
- nolist_policy 2y ago> > Which language can do anything without some asm and support as many platforms as C? > I wouldn't be surprised if someone figured out how to do the interrupts and register control necessary to invoke syscalls with pure LISP/Scheme/CL :P Haha > P.S. anything that compiles with LLVM and has an ingrained way to do print() that doesn't invoke libc, although there's a blurry line here between "pure asm"/"compiles to asm" that involves trusting-trust-style bootstrapping of features into the compiler Actually LLVM IR has no concept of syscalls, you have to use inline assembly inside your IR to issue syscalls.
- kazinator 2y agoWhat haha; we had that decades ago: systems programmed in Lisp from the bare metal. Here is what assembly code looks like in (ccl) Clozure Common Lisp: https://github.com/Clozure/ccl/blob/master/level-0/X86/x86-hash.lisp https://github.com/Clozure/ccl/blob/master/level-0/X86/x86-h... ARM version of same file: https://github.com/Clozure/ccl/blob/master/level-0/ARM/arm-hash.lisp https://github.com/Clozure/ccl/blob/master/level-0/ARM/arm-h...