IRC channel logs

2023-06-15.log

back to list of logs

<ccx>Noted. Thanks again. :−)
<stikonas>hmm, riscv64 assembler in tcc is very primitive...
<stikonas>it doesn't even know about jal instruction
<muurkha>hmm, does that mean you don't have subroutines?
<stikonas>no, that's assembler
<stikonas>compiler emits jumps directly using binary opcodes
<stikonas>e.g. https://github.com/TinyCC/tinycc/blob/mob/riscv64-gen.c#L422
<stikonas>that's really ugly design...
<stikonas>even cc_*, M2, mescc compilers have clear separation between compiling and assembling
<stikonas>and of course tcc riscv64 assembler has syntax that is incompatible with gcc
<stikonas>I guess that's no different from our early M1 based compilers
<stikonas>but it will make it hard to build any C library
<muurkha>oh, I see
<muurkha>I think it's pretty common to write compilers that emit machine code directly instead of textual assembly, just not on Unix
<oriansj>muurkha: well it is much easier to write compilers that emit text than compilers that have to deal with the ugly low level bit encoding details.
<oriansj>It just happens to have the added benefit of being easier to debug and reason about
<muurkha>hmm, I've done both, but maybe not enough to have an informed opinion
<muurkha>I feel like maybe which is easier might depend on how fast the compiler has to go
<muurkha>and maybe also how much diversity of instruction formats you have
<oriansj>well that is entirely valid, if one doesn't need to do optimizations (like M2-Planet) doing 1MLoC/second isn't a hard target on modern hardware.
<oriansj>and supporting dozens of architectures really quickly explodes the number of bits your compiler has to know and embed.
<muurkha>the particular thing I'm procrastinating on right now is a very simple compiler and bytecode interpreter with some tricky parts, pretty similar to Smalltalk-80 in some ways
<kerravon>hello. i saw a bootstrappable wiki where the author says he prefers to enter the boot sector in using switches. i wasn't aware that there were computers still sold that have switches.
<kerravon>i know there was in the 1980s
<kerravon> https://bootstrapping.miraheze.org/wiki/Stage0
<kerravon>Stage0 starts with only 1 thing:
<kerravon>1) A sub 500 byte hex monitor [How you create it is up to you; I like toggling it in manually myself]
<stikonas[m]>kerravon: no there are no computers made with switches, you would have to make one yourself
<pabs3>they left before your answer stikonas[m]
<stikonas[m]>Oh indeed
<oriansj>but perhaps kerravon will look at the logs and realize not everyone lives in the same timezone