212 results for "":

The Choice Ep. 1: Debriefing

To the programmers

It’s too easy! Where’s the documentation for the API? I found an injection vulnerability! Global functions from ‘window’ leak! I tried to attack your server then realized nginx was ignoring me!

Keep struggling, my pretties. The game is not meant for you, but you are good guinea pigs nonetheless. Just because the game involved programming, you found yourself so, so terribly wrong about one thing: that you understood at all what was happening.

Game Design: The Binding of Isaac

In hours, I have played more of The Binding of Isaac than any other game in my Steam library. Edmund McMillen said he wasn’t expecting it to be a hit, and has since proceeded to be proven thoroughly wrong.

It is kind of a big deal among a certain crowd: as I’m writing this, the second season of the Binding of Isaac Racing League, hosted and commented by Crumps, is in full swing - even though the game was certainly not designed for that!

The thumbnail for this page

Printing ASCII cats to the terminal

Now that our development environment is all set up, let’s make something useful!

Creating the catscii crate

From a VS Code window connected to our VM (as we just set up), let’s make a new Rust project:

amos@miles:~$ cargo new catscii Created binary (application) `catscii` package

And open it in a new VSCode window:

amos@miles:~$ code catscii

Even though we’re running this “code” command in the VM guest, VSCode set up enough plumbing that it communicates back to the host, telling it to open another VSCode window, connected to the same SSH remote, in the right folder.

The thumbnail for this page

Day 4 (Advent of Code 2020)

It’s time for Day 4 of the Advent of Code 2020!

Now, I’ve already had a look at the problem statement, at least for part 1, and I’m not particularly excited.

But it will allow me to underline some of the points I’ve recently been *trying to make about types and correctness.

Cool bear

Ah, yes, the novel.

The problem is to parse passports, with fields like these:

Aiming for correctness with types

The Nature weekly journal of science was first published in 1869. And after one and a half century, it has finally completed one cycle of carcinization, by publishing an article about the Rust programming language.

It’s a really good article.

What I liked about this article is that it didn’t just talk about performance, or even just memory safety - it also talked about correctness.

The thumbnail for this page

Fine, we'll relocate our own binary!

Welcome back to the eighteenth and final part of “Making our own executable packer”.

In the last article, we had a lot of fun. We already had a “packer” executable, minipak, which joined together stage1 (a launcher), and a compressed version of whichever executable we wanted to pack.

What we added, was a whole bunch of abstractions to parse ELF headers using deku, which we used from stage1 to be able to launch the guest executable from memory, instead of writing it to a file and using execve on it.

So you want to live-reload Rust

Good morning! It is still 2020, and the world is literally on fire, so I guess we could all use a distraction.

This article continues the tradition of me getting shamelessly nerd-sniped - once by Pascal about small strings, then again by a twitch viewer about Rust enum sizes.

This time, Ana was handing out free nerdsnipes, so I got in line, and mine was:

The thumbnail for this page

Cut for time

This series has to end somewhere, so let’s end it here!

However, here is a list of some things I’d like to come back to:

Bundling & TypeScript

Using a bundler like Parcel so I can write some of the client-side logic in TypeScript, have it take care of building the SCSS, etc.

I do that to great effect in another project of mine and I’d like to show you how I did it!

The thumbnail for this page

Position-independent code

In the last article, we found where code was hiding in our samples/hello executable, by disassembling the whole file and then looking for syscalls.

Later on, we learned how to inspect which memory ranges are mapped for a given PID (process identifier). We saw that memory areas weren’t all equal: they can be readable, writable, and/or executable.

oocdoc, Part 4 — sourcepath

In , We’ve built a nagaqueen-based tool that can parse one ooc file, detect class declarations and print its doc strings. Today, we’re making a bit of infrastructure for our app to support more sizable projects.

Source path and lib folders

Parsing a single file was a nice milestone, but it’s not nearly enough. We want to generate documentation for a whole project at a time: and since we’ll want to cross-link the various bits of documentation we generate, we’ll also need to parse the various dependencies (such as the ooc sdk, and any used library) so that we can resolve argument types and link them properly.