What's Ruby?
An interpreted, multi-paradigm, high-level, general-purpose programming language. You need Rust to build it.
What's Rust?
A compiled, multi-paradigm, high-level, general-purpose programming language. You need Python to build it.
What's Python?
An interpreted, multi-paradigm, high-level, general-purpose programming language.
Do I need, uhm, Perl to build it?
No, but you need Perl to build Rust.
I knew it. What's Perl?
An interpreted, multi-paradigm, high-level, general-
@jschauma FFS when can folks stop making these gratuitous compounding build/bootstrapping dependencies? Ruby needing Rust is probably reasonable. Rust needing Python and Perl is nothing but laziness and cost externalization.
@cbehopkins @dr2chase @jschauma It's the main compiler involved in the only reduced binary bootstrap seed project (https://guix.gnu.org/en/blog/2020/guix-further-reduces-bootstrap-seed-to-25/) I'm aware of.
As for Golang specifically, it weakens the Google domination, which I find valuable in itself.
Of course, making an interpreter instead of a GCC frontend & using that to compile a self-hosting compiler works too (you still need to compile that interpreter too at some point unless you write in assembler I guess, then you assemble it).
@cbehopkins @dr2chase @jschauma But then that begs the question, why make yet another compiler instead of reusing the optimization & portability work already done by others before you?
Having a compiler implemented in a safe language is a valid answer to that question, but it does mean you're willing to trade-off portability (or a lot more work to be done) in exchange for it.
@lispi314 I'm sorry I'm missing something here with you referring to an interpreter in the context of GCC and Go.
If I understand you correctly, the interest is to bootstrap from the minimal possible outside dependencies. (Rather than the ability to bring up the toolchain in a cross platform situation with minimal complications?)
I guess the concern for me in bootstrapping is simplicity, not code size.
@cbehopkins Unauditable code-size, more specifically.
Golang requires Golang to build.
Currently that means that Guix, in order to not accept arbitrary binary blobs from Google to build Golang, has to start from Golang 1.4 & iteratively build each following one up to the current version.
A Golang interpreter or sufficent GCC frontend (like GCCGO is intended to be) would also short-circuit that chain of builds so that one could build the final Go compiler (in Golang) directly.
@cbehopkins @lispi314 @dr2chase @jschauma I'd add portability. You generally need (and already have, by the time you're porting a second language) C anyway, and GCC provides that nicely, so it's probably already there.
Go is available for fewer platforms than GCC, and seems equally difficult to port (never touched it, so IDK). If your language porting story begins with “port the Go compiler and libs first”, you're not going anywhere.
@lispi314 Do you mean something like #GCCrs?
That got a lot of backlash (from lots of people who said that the approach is bad and completely ignored bootstrapping), but they are going through with it and are making good progress: https://rust-gcc.github.io/
(me and others told them again and again that what they are doing is great work and two years ago they finally got funding)
@ArneBab @dalias @jschauma That certainly does look like what I'm suggesting.
It'd make for an alternative bootstrap option usable for instance in #Guix (https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/rust.scm), but from the project goals it would also eventually become an entirely distinct valid compiler for Rust, which seems quite desirable for me.
@lispi314 sidenote: that #guile bootstrap path was developed for #guix :
GNU Mes (maxwell equations of software) provides a minimal #scheme interpreter and C #compiler with tooling to build #tinycc that can be used with the Mes C library to compile glibc-2.2.5, binutils-2.20.1, gcc-2.95.3 with which you can build the whole #GNU system.
Thanks to #GCCrs that will soon include #Rust
Thanks to #Python on Guile it includes a shortcut for compatible Python-based tooling.
#GCC
@dalias @jschauma
@lispi314 and Mes was created by @janneke and in later stages supported by NLnet: https://nlnet.nl/project/GNUMes/ @dalias @jschauma
That makes me want to write an ultimately self-hosting language with a bootstrap path that looks something like
assembly -> mini-forth -> minimal language -> full language (and then optionally "full language compiler built by a full language compiler", since the full compiler might have optimizations the minimal language compiler doesn't have)
@jschauma It's turtles - I mean - interpreted, multi-paradigm, high-level, general-purpose programming languages all the way down...
@cstross@wandering.shop @miksi@techhub.social @jschauma@mstdn.social Or the corresponding BSD licence stack on say FreeBSD. (which is as complete, but runs clang)
@jschauma Tcl is still self-hosting.
@farcaller @jschauma :) Pretty sure Jan knows Perl
@farcaller @jschauma your computer should have perl installed in the same way that it should have awk: in case someone else was mad enough to use it to build a tool you want, not to actually use yourself.
@petealexharris @jschauma wait, awk is illegal too, now? What's the modern solution to printing the 3rd column of whatever the output is?
@farcaller @petealexharris @jschauma cut -d <delimiter> -f 3
@ives @petealexharris @jschauma cut kinda sucks at the job when it's space-padded. Or if I can't visually tell if that's a space or a tab. Awk works all the time every time.
@farcaller @ives @jschauma
I do quite like awk, but I always have Python handy anyway, so unless something is super trivial, it'll be quicker for me to pop up a Python shell than re-read the awk man page.
@farcaller
cat FILE | tr -s ' \t' '\t' | cut ...
heh
@hornlo the lengths people would go for only not to use awk!
@lanodan @jschauma s/it's/its/
Yes, but there’s no better alternative that’s widespread/portable enough, and writing it in the shell-under-test, if even possible, would somewhat defeat the purpose. I’m sure we could add a py3k-based test runner as alternative and keep it up to date wrt. the test spec format, but I’m not volunteering.
You also don’t need to run the tests. (But you really ought to, from what all I’ve seen break…)
@ukko @MercurialBlack @jschauma
This is a reasonable history. B was inspired by BCPL, and was running on Multics first, then moved onto UNUX, where it was continually bootstrapped to become C.
https://en.m.wikipedia.org/wiki/B_(programming_language)
@jschauma turtles all the way down
@jschauma
I recursion.
@jschauma Last time I looked, GHC (the Haskell compiler) had Perl as a build dependency. But then GHC is written in Haskell, so it already depends on itself ...
@jschauma wow, how did we end up in this mess?
@jschauma I feel like this is the right time to introduce ppl to the Ken Thompson hack: http://wiki.c2.com/?TheKenThompsonHack
@ives @jschauma
A short thread on the Thompson hack.
I think our group was the only one to detect it.
https://mstdn.social/@JohnMashey/109991275086879095
Let me introduce #julialang, it's a compiled, interactive, multi-paradigm high level computer programming language which builds from C / C++ (it uses LLVM). They are close to removing the scheme interpreter that does the parsing (which is included, and written in C) in favor of a parser in Julia (JuliaSyntax.jl). The vast majority of Julia is written in Julia.