The morning and RC itself

The first half of the day was overwhelming because there were a lot of people to meet and talk to. But RC is really nice! Lots of nice people, and nice in a way I hadn’t experienced before.

First, there were a few intro speeches. I really liked the Social Rules sketches because it’s one thing to hear “no well actuallies”, it’s another to watch an example play out. I also liked how James had us practice calling them out.

Also there was an exercise where they took a whiteboard split into two sections, “Nervous” and “Excited”, and wrote whatever we called out: “Nervous to go into Debt”, “Nervous to sleep too much”. or “Excited to meet a lot of people” (followed by “Nervous to meet a lot of people”). This was great, it made me realize that everyone has very similar worries and excitements about this place.

Then there was a Meet and Greet where they had a neat command line application that paired people up in a random room in the space for ~5 minutes at time, for about half an hour. It was a nice way to shuffle the meetings initial conversations and seed some connections between people. I think Meetups should do this too. It sounds like Speed Dating but Speed Dating has these negative/needy connotations, this just a really nice way to quickly meet a lot of people and seed the social network of the batch.

In the afternoon the coding started. Here are some things I learned:

Coding Learnings

Windows emoji keyboard

Windows has a emoji keyboard under WindowsKey + . (Period) . It’s not as good as Mac’s (you can’t insert more than one character at a time) but it works, you don’t have to memorize Unicode code points anymore.

I’m starting by trying to make a Paint By Numbers app. So I found this app PBNify.js, written by Dan Munro, which is open-source and relatively simple that I’m going to port to Rust.

I started by git cloning pbnify. It doesn’t have any depencies, which should make it really easy to run!

Local files can’t open other local files anymore (CORS)

However, since 3 weeks ago, the big browsers decided that local files shouldn’t be able to open other other local files in CORS (even in a subdirectory!), which I find frustrating. This app was trying to include a local file in a subdirecty, but CORS doesn’t allow it. I worked around this entirely by making my system more insecure. I went into about:settings in Firefo and set privacy.local_file_unique_origin to false. I was then able to use the app locally!

Rust wasming and images

Then I looked into image-rs, a crate for image manipulation in rust, so as to start off with the right Image and Pixel types. Got it to compile and to use it in a blur() function.

The goal should be to piecewise replace functions in the app. How do we do that?

Turned out I had set up wasm-pack wrong. I had it set up for publishing an npm package, whereas I simply wanted to import my rust/wasm functions into my web app. There’s a wasm-pack setting called Hybrid apps for this. Great, I came to RC to look into wasm and Rust and feel like I’m learning about it.

But the setup script npm init rust-webpack just plain didn’t work? And buried in an issue it said you need git 2.20, whereas the default ubuntu 18 version came with git 2.17, which I felt was a bit un-nice to require a new version of a tool that is probably rarely updated. I followed these 3 steps (basically getting git from a PPA) to get the newest possible git, which is 2.24. Turns out I also needed to upgrade npm/node (which ubuntu 18 had stuck on version 8?)

I’m not mad though, new git has added some really nice UX features, which make some arcane subcommands unnecessary/better worded!

A nice new git subcommand

For example, before to switch branches and to restore/modify files, you’d use git checkout.

Now they’ve added git switch to switch branches and git restore to change files to different versions, which is more semantic! I think there’s also a more intuitive wording of the git diff --cached flag too.

I’m glad I bought this 6 core computer, because I was re-compiling the default wasm-pack app several times, and it pulls ~100 crates! It would pin my 6 cores to 100% for only 1.5 minutes instead of the ~20 minutes on my old computer.

Windows Terminal

At the end, I found the “Windows Terminal” app which has tabs and feels pretty ergonomic. Also I disabled this infuriating Firefox behavor of “backspace when the window is unfocused goes Back” which goes back all the time when I haven’t realized my text box is unfocused, by setting browser.backspace_action to 2 in about:settings.

Ok, now it’s 6pm, I’m going to go try out a gym (crucial last element of the next 3 months for me)!

comments powered by Disqus