IRC channel logs

2024-08-18.log

back to list of logs

<mid-kid>scheme's syntax is exacly what makes it so easy to implement
<mid-kid>you can't have everything
<Googulator>I get the underlying idea, but please, break compatibility with emacs's lisp mode :(
<Googulator>use anything other than ()
<Googulator>S-expressions are not the problem, the culture around them is
<Googulator>tbh, this would be perfectly readable:
<Googulator>(a (b c) (d
<Googulator>                  (e f)
<Googulator>                )
<Googulator>)
<Googulator>this isn't:
<Googulator>(a (b c) (d
<Googulator>                  (e f)))
<Googulator>(toy example, so it doesn't really come across)
<Googulator>imagine a similar scenario where the ending would have 13 parens rather than 3
<Googulator>and then try to figure out where the form beginning with (d ends
<Googulator>as in, how many parens do you need to select at the end to correctly copy the form to a different context
<Googulator>pure pain
<Googulator>vs if everything were aligned K&R-style: easy
<andydude>Googulator: you would probably like Wren
<andydude>Also, you would probably like this https://gist.github.com/andydude/50c81f693cc74c366070be62149aad02
<lanodan>stikonas: Last time I did an strace on tcc it was in fact generating assembly for some reason (and I guess just pipes to itself).
<stikonas>lanodan: no, it really does not
<stikonas>you can easily see it in the source
<stikonas>let me find
<stikonas>e.g. https://repo.or.cz/tinycc.git/blob/HEAD:/i386-gen.c#l822
<stikonas>but it's full of these, this is just one example
<stikonas>its assembly backend is separate
<stikonas>so there is C->bin and asm->bin parts
<stikonas>so there is some duplication...
<lanodan>Uh indeed doesn't for at least simple C files, I wonder if I misread strace or was a case of like inline assembly
<oriansj>well M2-Planet's output is just a direct 1:1 state machine translation from C to assembly; so we do miss out on many potential optimizations but honestly running at 70% of TCC's compiled output isn't half bad for a self-hosting compiler that can do 1MLoC/second
<oriansj>but yeah, fixing TCC's poor readability could take years of work but would give a path forward to making it a much better compiler.
<andydude>I like improving readability
<andydude>what is constraint_priority
<andydude>the phrase "constraint priority" appears zero times in the tcc docs
<andydude>I found something, but not in the tcc docs, it was in the GCC docs
<andydude> https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html
<matrix_bridge><cosinusoidally> tbh I don't think tcc's poor readability will ever be fixed. Unless there is a hard fork under a completely different name.
<matrix_bridge><cosinusoidally> The current maintainer of tcc doesn't seem to have the time or motivation to fix the readability issues.
<matrix_bridge><cosinusoidally> Which is fair enough if they have other priorities.
<matrix_bridge><cosinusoidally> (and they are volunteering)
<matrix_bridge><cosinusoidally> a volunteer I mean
<matrix_bridge><cosinusoidally> Interestingly the pnut devs are working on the ability to compile tcc https://github.com/udem-dlteam/pnut/issues/63#issuecomment-2294154308
<matrix_bridge><cosinusoidally> so that could eventually be another compiler capable of compiling tcc
<lrvick>Has anyone managed to bootstrap haskell yet?
<lrvick>I think it is going to need some mrustc heroics last I checked.
<oriansj>lrvick: only a subset of the haskell language thus far (as far as I am aware)
<oriansj>with the blynn-compiler being the current leader (but very far from GHC compatibility and able to be used to bootstrap GHC)
<lrvick>Shame. It seems like the only major language we -can't- bootstrap right now.
<lrvick>but we have a hard requirement for bootstrappability/reproducibility in stagex, so will just tell people to file issues with the haskell team, not me. ha ha.
<lrvick>I thought guix had a similar requirement, which is why I was suprised to see it in guix.