December Adventure

So I felt I couldn’t really bring myself to do Advent of Code this year since I have more than enough other things to do (and watch and play) and with work and the kids, it’s always pretty miserable to keep up.

I saw this thing called December Adventure though and that fits in nicely with my current push to release a major update for Cuppings. If I’m going to be programming until late this month, then I’d prefer it to be on something that I can release.

I can’t promise that I won’t do any AoC (Factor is looking mighty cool) but I won’t force myself to do anything. With that, let’s get going.

1/12

I started working on the map view which clicking around looked like it could be really annoying. I found some dead ends and was afraid I’d have to hack in Leaflet support myself but I found a dioxus example hidden in the leaflet-rs repository.

Yes, I’m writing this website in Rust/WASM, why do you ask?

That example required a bunch of fiddling with the configuration and a couple of false starts, but now I have a vanilla map view.

I can say that I’m amazed that in this ecosystem 1. an example exists 2. that example works 3. it works in my project with a bit of diffing and 4. it seems to do what I need.

I raised a PR to the project to advertise this example on its README just like it does the others so that others wouldn’t have to search like I did. That PR got merged:

https://github.com/slowtec/leaflet-rs/pull/36

2/12

Today I’ll see if I can tweak the map view to show the location of the cafe we tapped and get things to a point where I can commit the change.

To do this I need to figure out how to pass information along to a router when we tap a venue. That should be easy enough but the Dioxus documentation is between 0.5 and 0.6 now and a lot of it is broken.

A tip from the Discord said I need to put the data into a context from a parent and then get it out again in a child. It’s a bit roundabout and required some refactoring, but it works.

Done on time even for a reasonable bed time.

3/12

Turns out my changes from yesterday did not make it to the staging server. I’ll fix that and manually run the job again.

That’s these annoying wasm-bindgen version errors that keep happening and that require a reinstall of this: cargo install -f wasm-bindgen-cli --version 0.2.97 and the dioxus-cli. Dioxus which by the way is preparing its long awaited 0.6.0 release.

Yes, I build this on the same Hetzner box that hosts it. So here you go: https://staging.cuppin.gs

Other than that not that much will happen today since I spent most of the evening noodling around with Factor (despite my intention not to do any weird programming). It’s a nice language that’s very similar to Uiua which I tried out a while back but not being an array programming language makes it feel somewhat more ergonomic.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.