@lispi314 @Makura [tech.lgbt] @ipg
it's also needed when you gotta go fast and the compiler doesn't know how to use the fancy special case CPU instructions that are only useful for FFT
@lispi314 @Makura [tech.lgbt] @ipg Eh, it’s easier to bootstrap a forth from machine code directly than write an assembler in machine code first.
@lispi314 @Makura [tech.lgbt] @ipg i mean, you’d immediately throw out the interpreter written in machine code in favor of an interpreter compiled from (or built with an embedded dsl in) forth - just like you would with the assembly version. making the initial version a throwaway lets it be very simple - fixed sizes and linear searches for everything is just fine.
anyway, i basically disagree that c and assembly (or things equivalent to them) are fundamentally necessary, they’re just the prevalent solution to particular types of problems.
@lispi314 @Makura [tech.lgbt] @ipg Would have Ariane-5 NOT gone boom on its maiden flight, if its software had NOT been written in Ada?
@lispi314 @Makura [tech.lgbt] @ipg what ultimately triggered the flight abort system were the integer overflow error debug messages produced by the Ada runtime being sent to a receptor that did expect to arrive just numeric values over that channel. At that particular moment in the flight the number values arriving there were ignored even.
@ipg nah fuck c lmfao, there's absolutely no reason to cling to it other than sentimentality
asm makes sense as a direct representation of machine code, it's not like there's any other way to do it, but C is just another high level language (albeit a very old and influential one)
@halva writing in assembly does not make sense in a cross-architecture world - C acts as a higher abstraction onto that without abstracting core behaviours away from you as a programmer
it's not high level by any means, for any given C code you can fairly trivially understand what it gets compiled down to when you build it and you don't have to guess at what it could be doing in the background
what you write is what you get, it hides nothing from you
@ipg @halva The other day, I stumbled upon an article which nuances the idea of C compiling down to something obvious:
C Is Not a Low-level Language
https://queue.acm.org/detail.cfm?id=3212479
@melunaka @ipg @halva yeah, they mean that c compilers can optimize i++ to format c: and lots of babble about UB.
But I dont agree. With some very practical conditions a C compiler can be tamed into emitting previsible asm opcodes. Disable (some) optimization if you need. Check the generated assembly for sanity. Avoid UB by writing sensible C code.
Thats what I say when I also describe C as high level assembly. In no way I trust the compiler.
I would rather say that C is no low level python.
@lanodan @halva @ipg What do you mean by core here? Neither Rust nor Go have a C core as I would understand it. Not like the typical Java runtimes do (or Haskell).
Rust will link to libc et a on Linux, but that’s an artifact of how “std” support is added, an alternate “std” could target the Linux ABI directly, and x86_64-unknown-none
(which does not have the std crate) links in no C.
Go produces static binaries by default, with no C code linked in at all.
If you’re talking about applications and libraries written in those languages… both have cultures of implementing as much as practical in the language itself. For example, the fuse library for rust [lib.rs] only calls to C for mount/unmount (which requires system specific elevated privileges).
@ipg hell yea!
(am mostly a C dev so I'm biased)
@ipg would love if they're saying "we are hiring/paying someone to do this" then
@ipg hot take
@ipg@wetdry.world so true, I like whoever runs the ffmpeg twitter
@ipg nah, world needs more useless JS frameworks and overpaid python juniors /s
@ipg yeah they're posting based stuff that makes me think that me being hyperobsessed with low level and c and similar langs doesn't make me worthless in the modern sea of webdev and high level stuff
@ipg Are they also on here or only on the Twitter?
@ipg ffmpeg namesearches themself on twitter and brigades anyone who says anything remotely negative about them it's incredibly toxic