underscores

joined 1 year ago
[–] [email protected] 4 points 2 weeks ago

It makes sense that if you're designing a language, you'd like the language you made and would want to use it. It's fine for compilers like that to exist, and even be the main one used, but ideally it shouldn't be the only compiler.

But there are technically ways to bootstrap a language without writing it in another language (other than a small core in assembly or something). You could design a tiny compiler that only handles a small subset of your language, then write a better compiler using only the features available in that subset. You can do this for several layers of compilers until you have the full language.

[–] [email protected] 8 points 2 weeks ago (2 children)

That's already how it is now, we just don't usually think of it that way. You can't compile rust unless you already have a rust compiler. The current version was compiled in a previous version, which was compiled in a previous version, going through a chain of older versions and other languages. Anything along that chain could've theoretically had an influence on the current compiler.

It's not about the code itself being more trustworthy. The point is that when you bootstrap, you don't have to blindly trust any of the binaries, since it's source code the whole way down. Someone could bootstrap rustc like this, compare it to the binaries that already exist, and ideally they would be identical.

[–] [email protected] 18 points 3 weeks ago (4 children)

A lot of this bootstrapping stuff comes back to the 'trusting trust' attack. You could write a compiler that adds some malicious code to programs it compiles. But the thing is, it could also insert it's own malicious code when compiling a compiler. So you look at your code, and the code of your compiler, and everything looks fine, but the exploit is still there. Someone wrote an example in rust.

Theoretically there could also be bugs that propagate this way. So to fully trust your code is doing what you think it is, you'd need a chain of compilers back to hand coded assembly.

[–] [email protected] 1 points 3 weeks ago* (last edited 3 weeks ago)

Yeah, I wrote the wrong language. I tend to lump those together in my head as 'big multi-paradigm languages I haven't bothered to learn yet.'

[–] [email protected] 11 points 3 weeks ago* (last edited 3 weeks ago) (3 children)

You can technically do it, but it's a convoluted path. The article talks about it. Basically to bootstrap that way you need to go through a lot of versions of rust, compile rust 0.7 in ocaml, compile ocaml in scheme, and compile scheme in C using gcc. For gcc you need to compile a chain of versions back to when it was written in C instead of C++, plus the whole TinyCC bootstrapping path.

edit: had listed scala instead of ocaml

[–] [email protected] 29 points 3 weeks ago

The main thing is that TinyCC has already been bootstrapped.

Check out this page on bootstrappable.org. Basically they start with a 200 something byte binary (hex0) that can act as an assembler, then using a bunch of layers of tools and compilers you can bootstrap a whole system. I think they use stage0 to build M2-Planet, use that to build GNU Mes, and use that to build TinyCC.

So a project like this fits neatly into that bootstrapping path. It could be done other ways, but starting from a fairly complete C compiler makes it a lot easier than building an entire path from scratch.

[–] [email protected] 10 points 3 weeks ago

The biggest thing is probably non-destructive editing, so you can do stuff like apply filters without them changing the underlying image. Gtk3 should add better support for tablets and wayland. There's also better layer tools and font support. A lot of it was on the backend, which should eventually allow for using other color spaces like cmyk natively.

[–] [email protected] 10 points 3 weeks ago (1 children)

It's too bad that GLIMPSE fork never took off.

[–] [email protected] 10 points 3 weeks ago (2 children)

They've been working on porting it since back in 2012, and didn't want to redo a bunch of the porting work before they even released it.

[–] [email protected] 2 points 1 month ago

I'm not sure if it's directly mapping the input. I think it's getting the other keys input and binding it to the same commands. Also, Emacs was around even before the X windowing system, so they probably came up with the mappings before a lot of these common defaults came about.

[–] [email protected] 4 points 1 month ago (3 children)

Meta, Hyper, and Super were all originally different keys. See this lisp machine keyboard from in the 70s that had 7 modifiers, including all of those. Most of the time Hyper or Super are mapped to the Windows key. With Meta it varies more from program to program. A lot of desktop software maps it to the Windows key. In Emacs its usually mapped as Alt or the Esc key.

view more: next ›