IRC channel logs
2025-03-10.log
back to list of logs
<fossy>evrial: GCC, and clang, and that's all. <fossy>Firefox is an *incredibly* complex beast <fossy>i don't know that firefox even builds without rust these days <fossy>tl;dr you cannot get Firefox with anything that is reasonably auditable by an individual, or even a small team of people <lanodan>Yeah would probably make more sense to grab a *much* smaller browser for auditing concerns, like netsurf/dillo or even elinks/lynx/w3m/… <janus>fossy: is rust hard to audit? why? <matrix_bridge><Andrius Štikonas> gtker: yes, prefixes work i n a different way there <matrix_bridge><Andrius Štikonas> janus: cause you need to audit rust source for 10 versions of rust <matrix_bridge><Andrius Štikonas> Well, that's if our hard to audit metric is source size <lanodan>And having stared in the code of rust stdlib few times… good luck auditing it. <matrix_bridge><gtker> Stikonas: OK, I changed it in a later commit to the single byte prefix, does that also work differently? <fossy>as stikonas said, and rust is at least as complicated as c/c++ backends of gcc, janus <matrix_bridge><Andrius Štikonas> In risc-v prefix specifies riscv instruction encoding <matrix_bridge><Andrius Štikonas> E.g. addi is I type instruction and uses ! <matrix_bridge><gtker> Ah. So I'll need to convert them all to 32bit % prefixes? <matrix_bridge><gtker> So a raw !1 !2 !3 !4 wouldn't be the same as %0x01020304? <matrix_bridge><Andrius Štikonas> So I type (!) means take 11 bits and shift to the appropriate location <matrix_bridge><Andrius Štikonas> Or almost the same, I this on x86 they are little endian <matrix_bridge><gtker> % is the same as 4 literal bytes on all platforms? Otherwise what is the recommended way of inserting literal bytes <janus>what's the most bootstrappable of the typed languages? would it be some typing system for guile? <matrix_bridge><Andrius Štikonas> gtker: I'll check in the evening % might be fine <matrix_bridge><Andrius Štikonas> If not, it might be why we were doing byte by byte... <lanodan>Go is probably the easiest strongly typed language in wide use today to bootstrap & audit, less stages to get a modern compiler and much smaller compiler/stdlib <lanodan>And personally I found trying to bootstrap Java to be a pain, way too many enterprise software nobody touched in the last 10~15 years. <matrix_bridge><Andrius Štikonas> Just need to use C only GCC 4 and rebuild itself with C++ <matrix_bridge><Andrius Štikonas> I guess C itself too. It is even easier to bootstrap <lanodan>C++ isn't really hard to bootstrap but I wouldn't really say GCC (or $DEITY forbid, LLVM/Clang) is auditable <matrix_bridge><Andrius Štikonas> But that needs to be audited for any other language anyway <matrix_bridge><Andrius Štikonas> Almost no other language is bootstrappable without GCC <matrix_bridge><Andrius Štikonas> Maybe some can be done with tcc but tcc is not any easier to audit <lanodan>Well it's a bootstrap chain, gcc is effectively extra to tcc or any other c compiler since you can't directly bootstrap gcc. <janus>It sounds like there are no good options, so if the easy bootstrapping/auditing is a requirement, I suppose optionally type checked langauges are options too <janus>Now that Python and TypeScript have a blessed syntax for type annotations, it becomes a better option <janus>Right, what I mean is that since there is now a blessed syntax, there is a subset of TypeScript that involves no code-generation, only correctness checks <janus>So one could imagine a type-stripper, written in an arbitrary language, which would emit a JavaScript program to be evaluated <janus>I know it sounds a bit handwavy ;) I think Python should be easier since it seems like Mypy/Pyright programs always execute with the vanilla interpreter <matrix_bridge><Andrius Štikonas> janus but for bootstrapping Python you still need C <matrix_bridge><Andrius Štikonas> most of the bootstrapping relies having C (or more languages) first <matrix_bridge><Andrius Štikonas> there are very few compilers/interpreters written in assembly <matrix_bridge><Andrius Štikonas> at least not many that can go all the way to usable system rather than some toy ones that can't be used to go all the way <mihi>gtker: The preferred way (for me) to output literal bytes in M1 is to put hex bytes in single quotes, e.g. 'CA FE BA BE' <mihi>everything in single quotes is passed as-is to hex2 <mihi>(or whatever you are using for processing the output of M1) <stikonas>gtker is doing a very nice job at tremendous speed but so far it's just me reviewing the changes <mihi>when looking at that PR, I have to admit I am unsure whether M2-Planet supports any big endian architectures - the shuffling of ints into initializer_list_values and later back out will not work like this... <mihi>in general, I think M2-Planet tries to keep bytes as bytes and ints as ints and lets hex2 take care of endianness. <mihi>(in other words, "literal bytes" built from ints are not literal bytes in my opinion :D)