IRC channel logs

2024-09-09.log

back to list of logs

<pabs3> https://github.com/twolodzko/prolog-rs - Prolog in Rust
<lanodan>Was there issues bootstrapping prolog? (never used prolog, although often heard about it)
<pabs3>ACTION not sure
<nimaje>I'm pretty sure common prolog implementations aren't written in prolog (or even depend on prolog to build), so should be ok-ish to absolutly no problem to bootstrap
<nimaje>swi-pl is written in c (not sure which version) and uses cmake to build
<matrix_bridge><cosinusoidally> I've written a C to awk translator program (in awk) that can take a subset of C (that is also a subset of JS) and translate it into awk. I have a minimal C compiler written in this subset (based on a heavily cut down version of M2_planet) that can serve as an initial bootstrap compiler on a bootstrap chain all the way up to tcc-0.9.27. On my machine it takes around 8 mins for awk to build the initial...
<matrix_bridge>... C compiler.
<matrix_bridge><cosinusoidally> The idea is to have an alternative bootstrap path on a system that only has awk (which is pretty universal on unix systems).
<matrix_bridge><cosinusoidally> At the moment I still need a C preprocessor to strip out comments and substitute a couple of symbols, but I'm planning to replace that with another awk program.
<matrix_bridge><cosinusoidally> https://github.com/cosinusoidally/tcc_bootstrap_alt/blob/dev/m2min/mk_awk_m2
<matrix_bridge><cosinusoidally> I also need to optimise. I have to emulate bitwise operations as posix awk doesn't support them.
<matrix_bridge><cosinusoidally> Emulating these bitwise operations is pretty slow.
<matrix_bridge><cosinusoidally> tested on mawk from Ubuntu 18.04 and gawk from Ubuntu 22.04