219 results for "":

Thumbnail for {{ page.title }}

Doing geo-location and keeping analytics

I sold you on some additional functionality for catscii last chapter, and we got caught up in private registry / docker shenanigans, so, now, let’s resume web development as promised.

Adding geolocation

We kinda left the locat crate stubby, it doesn’t actually do any IP to location lookups. It doesn’t even have a dependency on a crate that can do that.

Program in C (Parody song)

Once upon a time, @Cinememer wrote some alternative lyrics to “Under The Sea”. I couldn’t resist singing them!

I unfortunately lost the audio files for this. Oh well.

Thumbnail for {{ page.title }}

Dynamic linker speed and correctness

In the last article, we managed to load a program (hello-dl) that uses a single dynamic library (libmsg.so) containing a single exported symbol, msg.

Our program, hello-dl.asm, looked like this:

global _start extern msg section .text _start: mov rdi, 1 ; stdout fd mov rsi, msg mov rdx, 38 ; 37 chars + newline mov rax, 1 ; write syscall syscall xor rdi, rdi ; return code 0 mov rax, 60 ; exit syscall syscall

An ooc quine

While preparing my next post about ooc documentation yet again, I stumbled upon an old ooc quine of mine. Here it is in integrality for your pleasure:

q := 34 as Char l := [ "q := 34 as Char" "l := [" "]" "for (i in 0..2) {" " l[i] println()" "}" "for (i in 0..12) {" " q print(); l[i] print(); q println()" "}" "for (i in 2..12) {" " l[i] println()" "}" ] for (i in 0..2) { l[i] println() } for (i in 0..12) { q print(); l[i] print(); q println() } for (i in 2..12) { l[i] println() }

Ludum Dare #25 Post-mortem

Last week-end, I participated to Ludum Dare for the fourth time in a row!

Downloads: Linux (64) | OS/X | Windows

Story

So here is our entry: Legithief. The backstory is simple, yet cunning: you are an ordinary thief practicing ordinary acts of thievery in the houses of ordinary people to make a living. But one day.. you are quietly robbing yet another home, when you are suddenly smashed in the head with a bat.

Thumbnail for {{ page.title }}

The case for sans-io

The most popular option to decompress ZIP files from the Rust programming language is a crate simply named zip — At the time of this writing, it has 48 million downloads. It’s fully-featured, supporting various compression methods, encryption, and even supports writing zip files.

However, that’s not the crate everyone uses to read ZIP files. Some applications benefit from using asynchronous I/O, especially if they decompress archives that they download from the network.

Happy stay with us day

I didn’t really know what to do for “World Suicide Prevention Day 2014”.

First off, I didn’t know it existed at all. Like, c’mon, know your audience, if you have a party like that, I want in!

Second, it’s a terrible name: I hereby propose “stay with us day” in place. Nevermind the “world” part because, hey, we’re on the internet, the “suicide” part because, well, avoiding that is just the very start of a long uphill battle, and let’s keep the “day” part because, honest, if we can attract people’s attention for even a single day per year, it’ll be nothing short of a miracle.

Thumbnail for {{ page.title }}

Making a dev shell with nix flakes

In the previous chapter, we’ve made a nix “dev shell” that contained the fly.io command-line utility, “flyctl”.

That said, that’s not how I want us to define a dev shell.

Our current solution has issues. I don’t like that it has import <nixpkgs>. Which version of nixpkgs is that? The one you’re on? Who knows what that is.

Also, we haven’t really seen a mechanism to use .nix files from elsewhere.

Thumbnail for {{ page.title }}

Don't shell out!

In this series, I change a critical component of this website’s asset pipeline from “just calling a bunch of external tools” to statically linking with everything I need to process assets. It involves autoconf, CMake, Meson, CI, pkg-config, and some code crimes.

Thumbnail for {{ page.title }}

Running an executable without exec

In part 1, we’ve looked at three executables:

  • sample, an assembly program that prints “hi there” using the write system call.
  • entry_point, a C program that prints the address of main using printf
  • The /bin/true executable, probably also a C program (because it’s part of GNU coreutils), and which just exits with code 0.

We noticed that when running entry_point through GDB, it always printed the same address. But when we ran it directly, it printed a different address on every run.