219 results for "":

Celebrating Mario Maker

I’ve been watching a lot of Super Mario Maker videos this past month. Probably a hundred hours! This game is like a world onto itself, and it was fascinating to learn its design language and patterns.

With Super Mario Maker 2 coming out soon, I thought I’d show off some of the cool stuff I’ve seen, to celebrate Mario Maker.

We’ll start with some basic elements of Mario Maker (with screenshots), and then move on to a lot of video clips showing cool stuff.

Thumbnail for {{ page.title }}

Learning Nix from the bottom up

Remember the snapshot we made allll the way back in Part 1? Now’s the time to use it.

Well, make sure you’ve committed and pushed all your changes, but when you’re ready, let’s go back in time to before we installed anything catscii-specific in our VM.

This should emulate the experience of a colleague onboarding onto the project well enough!

(I didn’t actually use VirtualBox’s snapshot feature for this, I actually set up a Ubuntu 22.10 VM on another computer entirely, but the effect should be much the same).

Things I struggle with

Putting thoughts in bits

I think about lots of things but when it comes down to writing them, drawing them, implementing them, it’s not that easy. Even with years of practice in each of these trades, it’s still an uphill battle.

Which is why I am not going to read that article after I wrote it and will go straight to publication.

Not assuming nobody cares

The quest for ooc.vim

I’ve spent the past few weeks after rock 0.9.8’s release working on some of the neglected aspects of ooc, namely tooling support and performance.

My kingdom for a vim plug-in!

Well, technically, ooc.vim is a few years old, and it was even updated a few times to match new ooc features. But unfortunately, so far, it was limited to syntax highlighting.

The shortest ooc quine

A few days ago I posted an ooc quine. But while browing HackerNews, I found an even shorter one. The shortest!

Here it is, in its full glory

Can’t see anything? That’s an empty file. It will compile and run just fine. ooc doesn’t require a main function - you can just shove code in there that will run at the program’s initialization. If there’s none, no big deal! It’ll just not run anything.

Thumbnail for {{ page.title }}

Day 4 (Advent of Code 2022)

Part 1

Let’s tackle the day 4 challenge!

In this one, we get an input like this:

2-4,6-8 2-3,4-5 5-7,7-9 2-8,3-7 6-6,4-6 2-6,4-8

Each line has two ranges: the first line has ranges containing 2, 3, 4, and 6, 7, 8. We must count how many pairs have ranges where one fully contains the other.

In Rust, we can express this with “inclusive ranges” (std::ops::RangeInclusive), and those implement Iterator, so we can do:

Damian Sommer on The Yawhg

Damian Sommer did a casual AMA on Reddit recently, about his upcoming game, The Yawhg. I got to ask him a few questions. Here’s what he had to say.

What brought you out of your usual “let’s make fucked up platformers” style?

“I was just kind of tired of them. There’s still one more platformer I really want to finish, (The Clown Who Wanted Everything), but besides that, I’m just extremely bored of them now.”

Thumbnail for {{ page.title }}

Developing over SSH

With the previous part’s VM still running, let’s try connecting to our machine over SSH.

Network addresses, loopback and IP nets

Normally, to connect to a machine, you’d find its IP address. On Linux, a decade ago, you would’ve used ifconfig. Nowadays you can use ip addr:

The ip addr command output, run in VirtualBox

The loopback interface (lo) is local, so it’s not useful to reach the box from the outside: you can see it can be accessed over IPv4 at address 127.0.0.1 but not just! What we’re reading here is 127.0.0.1/8, which corresponds to the range 127.0.0.1 - 127.255.255.255

Thumbnail for {{ page.title }}

One funny way to bundle assets

Cool bear

There’s one thing that bothers me. In part 1, why are we using hyper-staticfile? Couldn’t we just use file:/// URLs?

Well, first off: showing off how easy it is to serve some static files, even in a “scary” language like Rust, is just not something I could pass up.

But also: think about distributing salvage as a tool. Will we want to distribute all those HTML/CSS/JS/font files alongside it?

Thumbnail for {{ page.title }}

Day 15 (Advent of Code 2022)

The day 15 puzzle falls into the “math puzzle” territory more than “let’s learn something new about Rust”, but since several folks asked if I was going to continue… let’s continue.

The sample input is as follows:

Sensor at x=2, y=18: closest beacon is at x=-2, y=15 Sensor at x=9, y=16: closest beacon is at x=10, y=16 Sensor at x=13, y=2: closest beacon is at x=15, y=3 Sensor at x=12, y=14: closest beacon is at x=10, y=16 Sensor at x=10, y=20: closest beacon is at x=10, y=16 Sensor at x=14, y=17: closest beacon is at x=10, y=16 Sensor at x=8, y=7: closest beacon is at x=2, y=10 Sensor at x=2, y=0: closest beacon is at x=2, y=10 Sensor at x=0, y=11: closest beacon is at x=2, y=10 Sensor at x=20, y=14: closest beacon is at x=25, y=17 Sensor at x=17, y=20: closest beacon is at x=21, y=22 Sensor at x=16, y=7: closest beacon is at x=15, y=3 Sensor at x=14, y=3: closest beacon is at x=15, y=3 Sensor at x=20, y=1: closest beacon is at x=15, y=3