3 ms·
I'd already written a lot of it in ObjC, thinking it would be "just for me" before I moved to wanting it running on the FPGA. Three options - Port the ObjC run
by spacedcowboy 18d ago
I'd already written a lot of it in ObjC, thinking it would be "just for me" before I moved to wanting it running on the FPGA. Three options
- Port the ObjC runtime to my little OS on the FPGA ?
- Rewrite everything in C so the native FPGA tools could compile it
- Make it compile itself and treat the ObjC version as a bootstrap.
#3 seemed the best option :)
Blewit is a reasonably-sized project, but it's not on the same order as the compiler. It did shake out a few bugs in the compiler that the unit-tests etc. didn't find. At least, when you own the compiler, you don't submit a bug report to the developers and wait for a patch :)
Yep, I'm happy with the optimisation - and I think most of the areas left are actually vectorisation - clang is very eager to vectorise (for good reason, it makes a difference)
As for the spec, the original one is https://github.com/ThrudTheBarbarian/xc/blob/main/compiler/docs/xtc.bnf https://github.com/ThrudTheBarbarian/xc/blob/main/compiler/d... but that's now quite out of date (despite claiming to be the reference :) I'll update it, and also add a readable version to the website..
We've really only added things that haven't broken fundamentals recently. The main recent additions were the block type (and since I agree with the thinking that spawned "http://goshdarnblocksyntax.com http://goshdarnblocksyntax.com", we use 'block' not some convoluted ^ notation). Similarly a callback is a 'callback', the types were added and obey the usual grammar rules.
The GEM desktop lives on: https://0x0000ff.co.uk/mov/xt/xtos-aug-11.mov https://0x0000ff.co.uk/mov/xt/xtos-aug-11.mov :)
- if you look at the bottom you'll see 2 icons (ST, XE) and clicking on that launches the emulation in a window, but since the actual desktop also uses GEM, you can run a GEM app (actually on either the ST or the XL) and open windows, drag them around etc.
- There's a lot to do to get this desktop to be as useful as Magic! or Thing, but for various reasons it's on hold atm - mainly that I'm waiting on a physical garage to be built, which (today!) got rafters put on. Once that's in place, I'll have all the electronics stuff set up, and I can debug the motherboard that the FPGA plugs into.
- Rochus 18d agoCool. Amazing to see what AI (Claude Code?) can do when the operator is an expert. It's like working as a lead engineer with a team. I never touched Claude code so far and am hesitant to give this tool direct access to my machine. I made some good experience with Google AiStudio when implementing my compilers and oberon system migration this year (see e.g. https://github.com/rochus-keller/oberonsystem3native/ https://github.com/rochus-keller/oberonsystem3native/); it's fascinating that you can give it a bunch of sources with an error description and there is a very good chance that it points to the bug.
- spacedcowboy 18d agoIt is actually pretty amazing what it can do, though sometimes it feels like herding cats. As I said, now and then I just dip into the code, rewrite something and tell it to adopt that pattern going forward. It takes a lot of the grunt-work out of writing something, and it actually is very much like running a team of junior engineers. I tend to run multiple threads at once (compiler, blewit, docs, framework), and often overnight I just give them a bunch of tasks to do, with files (/tmp/compiler, /tmp/blewit, …) to shout on, if they need input from, or have found relevant bugs for, another thread. I come down in the morning and spend the first hour or so just reviewing code. Or sometimes I come down and discover that one of them has proclaimed “it’s 3am (it wasn’t) and I’m not going to make a change at this hour”. Like, what ? You’re a machine! You don’t get sleepy…
- Rochus 18d agoI see, thanks; but what about the cost? Is this just a fixed subscription? If so, what level is necessary for such kinds of large projects? Can you just let it run ad infinitum, or are there daily or weekly limits, or do you even have to spend money by effort?
- spacedcowboy 18d agoI run Claude code (though I’m told open code runs better, I’m used to Claude) through deepseek, which costs me about £45 per month. That’s fine for me, though I realise everyone has their own limits.
- Rochus 18d agoWow, that's far from expensive; actually incredible to get a full language with compiler and optimzier and a bunch of targets for just a few hundered dollars. That makes me feel like a movie theater pianist back when sound films first came out.
- spacedcowboy 16d ago