IRC channel logs
2025-04-08.log
back to list of logs
<matrix_bridge><gtker> oriansj: There's an issue in M2-Planet because of how "//" comments have to be tokenized unlike "/*" comments. Would you be open to replacing the "//CONSTANT" syntax with either "enum { CONSTANT = 1 }" or "#define CONSTANT 1"? <matrix_bridge><Andrius Štikonas> gtker: all cc_* compilers only support //CONSTANT <matrix_bridge><gtker> Ah yeah, I was missing "in the "cc_*" compilers" at the end of my question <matrix_bridge><Andrius Štikonas> Well, there are quite a few.of them though <matrix_bridge><gtker> I'm not really looking forward to doing it but it would IMO be better long term if the language was just actual-subset-of-C and not subset-of-C-but-with-additions-as-comments <matrix_bridge><gtker> Is that because there's no bootstrap chain for armv7l? <matrix_bridge><Andrius Štikonas> But //CONSTANT only works in bootstrap mode? <matrix_bridge><gtker> Yes, but the tokenizer doesn't treat "//" as comments at any point, so it has to tokenize everything that comes afterwards <matrix_bridge><Andrius Štikonas> Can we adjust tokenizer for non bootstrap mode? <matrix_bridge><Andrius Štikonas> If non bootstrap then treat // as comments <matrix_bridge><gtker> It probably is, although I would still like to remove it from the other compilers since it's incredibly unexpected for everybody, even if you're aware of the extra CONSTANT syntax <matrix_bridge><gtker> It would also allows us to use a single constant in M2-Planet rather than needing both, which I like 😄 <matrix_bridge><gtker> stikonas: It seems the "--bootstrap-mode" flag has to be on the command line before the file name otherwise it doesn't take effect. There are at least some tests where we don't do this and they fail. I think for now we should just leave the old behavior and optimally just add the proper behavior to (all the many) prior compilers. It's not super critical that we fix it now although I think it makes sense to... <matrix_bridge><Andrius Štikonas> Hopefully it won't make assembly far more complex... <matrix_bridge><gtker> My hope is that it will just slot in neatly next to the other functionality, although I have only looked at the amd64 briefly