Sweet, Askama PR is merged!
Pretty happy with the result. It's also net -900 LOC, which is always nice to see.
24.5.2025 13:48Sweet, Askama PR is merged!Pretty happy with the result. It's also net -900 LOC, which is always nice to see."I don't like Rust, it has such a small standard library"
Yeah ok, but C can't even print a bool natively...
23.5.2025 12:33"I don't like Rust, it has such a small standard library"Yeah ok, but C can't even print a bool natively...Is (jinja-like) templating perfect?
Well no. It can get pretty messy. But it's messy in a structured way I guess.
I think this is easier to touch by a newcomer than the current quote and syn backend.
Alright, rewriting the device-driver backend with askama. I've set it up so the old backend is still leading but the new one is run in parallel. Then it prints a diff between the two so I can see if I've got all of the details right.
Pretty chill workflow for converting :D
22.5.2025 12:06Alright, rewriting the device-driver backend with askama. I've set it up so the old backend is still leading but the new one is run in...Askama let's go!
21.5.2025 20:57Askama let's go!Maybe my gripe is not having a template engine. All the popular ones in Rust have examples with html templates and say they're inspired by jinja. (I don't know jinja)
Maybe I should look into Askama. It looks nice...?
19.5.2025 22:03Maybe my gripe is not having a template engine. All the popular ones in Rust have examples with html templates and say they're inspired...If you do codegen, what's the best way to generate the final text output?
Right now I'm using quote, syn and proc_macro2, but I want to leave the TCU and maybe generate C code in the future too.
So I've been replacing quote with format! and tokenstream with String. But that feels wrong...
Is there a better way to structure this?
19.5.2025 21:44If you do codegen, what's the best way to generate the final text output?Right now I'm using quote, syn and proc_macro2, but I want...Oh cool, WSL is open source now! It's MIT licensed.
19.5.2025 19:25Oh cool, WSL is open source now! It's MIT...Idea for anyone to steal:
Cargo review. Like crate? 5 stars. Crate is middle of the road and misses some docs? 3 stars.
Literally the worst crate ever? 1 star
Ok! KDL is pretty nice! Little test of how device-driver in KDL could look like. Almost as nice to write as the existing DSL, but it's still a real document format.
Maybe maybe this is nice enough to get rid of the DLS and yaml/json. (Though I'd have to provide a good upgrade path)
14.5.2025 22:21Ok! KDL is pretty nice! Little test of how device-driver in KDL could look like. Almost as nice to write as the existing DSL, but it's...Me: "I wonder if you can put comments on nodes in KDL"
James Munns: " https://github.com/kdl-org/kdl/discussions/68#discussioncomment-12736183 "
It seems like James is living a month ahead of me... :P
14.5.2025 21:15Me: "I wonder if you can put comments on nodes in KDL"James Munns: "...My talk is gonna start now!
14.5.2025 14:17My talk is gonna start now!Obviously I meant to write 'peak' and not 'peek'. Anybody who suggests I'm bad at English is wrong. This is the peak of sneakiness, obviously.
13.5.2025 05:31Obviously I meant to write 'peak' and not 'peek'. Anybody who suggests I'm bad at English is wrong. This is the peak of...On my way to @rustnl! See you there!
13.5.2025 05:19On my way to @rustnl! See you there!Hmmmm yes
Sneak peak!
12.5.2025 11:52Hmmmm yesSneak peak!Simulation results of how much a home battery could've saved me last year (with 2027 prices). No trading, just a simple charge when exporting and discharge when importing.
These results are... disappointing. A 10 kWh battery saves €190, but costs ~€4000. So it'd take 21 years to recoup.
3.5.2025 20:20Simulation results of how much a home battery could've saved me last year (with 2027 prices). No trading, just a simple charge when...The answer is about 15 seconds (when file is already loaded into RAM).
Not good, but not too bad I guess
3.5.2025 16:14The answer is about 15 seconds (when file is already loaded into RAM).Not good, but not too bad I guessLet's see how fast serde-json can deserialize 9gb of json :P
3.5.2025 13:33Let's see how fast serde-json can deserialize 9gb of json :PMaybe silly idea?
What if device-driver could also generate C headers? Maybe 'normal' embedded people would use it and publish it. Then we (the crab people) would get low level drivers for (almost) free!
26.4.2025 23:45Maybe silly idea?What if device-driver could also generate C headers? Maybe 'normal' embedded people would use it and publish it....⬆️
⬇️