221 results for "":

rock 0.9.7 + new website

This is going to be a short one.

Basically, since February, both shamanas, fredreichbier and I have putting way too much work into the latest iteration of rock, an ooc compiler written in ooc.

I have the pleasure to announce that version 0.9.7, codename pacino is now out, as you can plainly see on the new website: https://ooc-lang.github.io

You can read the release notes to learn what has changed, but basically expect a lot of fixes, some new APIs, and awesome backtraces.

Thumbnail for Running an executable without exec

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.

itch.io app timeline 2016

I’ve been working on the itch.io desktop app for about a year now, so I thought I’d make a quick recap:

At the time of this writing, the app has been downloaded about 460K times (including updates). Not counting the back-end, the app and its various components are made up of around 100K lines of code (mostly javascript and golang), most of which is open-source.

Thumbnail for Day 11 (Advent of Code 2022)

Day 11 (Advent of Code 2022)

It’s a new day, it’s a new advent of code puzzle.

In that one, we have to apparently cosplay as an IBM mainframe and just.. crunch them numbers. This doesn’t look fun, and I can’t think of a clever twist to make it fun, so let’s try to make it short and sweet.

Parsing

Our input looks like this:

Monkey 0: Starting items: 79, 98 Operation new = old divisible by true throw to monkey false throw to monkey items new = old + divisible by true throw to monkey false throw to monkey etc

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.

A terminal case of Linux

Has this ever happened to you?

You want to look at a JSON file in your terminal, so you pipe it into jq so you can look at it with colors and stuff.

Cool bear Cool Bear's hot tip

That’s a useless use of cat.

…oh hey cool bear. No warm-up today huh.

Sure, fine, okay, I’ll read the darn man page for jq… okay it takes a “filter” and then some files. And the filter we want is.. . which, just like files, means “the current thing”:

Thumbnail for Day 1 (Advent of Code 2020)

Day 1 (Advent of Code 2020)

I was not planning on doing anything specific this December, but a lot of folks around me (on Twitter, at work) have chosen this Advent of Code to pick up Rust, and I’ve got big FOMO energy, so, let’s see where this goes.

I’ll be doing all of these on Linux, so there may be some command-line tools involved, but don’t worry about them - the code itself should run on all platforms no problem.

Thumbnail for Day 12 (Advent of Code 2020)

Day 12 (Advent of Code 2020)

Time for the Day 12 problem!

In this problem, we have a ship. And we have navigation instructions:

  • Action N means to move north by the given value.
  • Action S means to move south by the given value.
  • Action E means to move east by the given value.
  • Action W means to move west by the given value.
  • Action L means to turn left the given number of degrees.
  • Action R means to turn right the given number of degrees.
Thumbnail for Day 12 (Advent of Code 2022)

Day 12 (Advent of Code 2022)

Alright! The day 12 puzzle involves path finding, and it seems like a good time to lean more heavily on the WASM embeds I’ve set up for the previous parts.

Let’s start by setting up the types we’ll want!

Types and parsing

Our input is a heightmap, like so:

Sabqponm abcryxxl accszExk acctuvwj abdefghi

Where 'a'..='z' is a square with a given elevation (from lowest to highest), S is the start, and E is the end.

Cross-compilation notes

I’ll keep updating this article as I go, just to put stuff in all the same place.

Platforms

Cross-compiling for Linux

I’m pretty sure it’s possible to cross-compile for Linux on other OSes, seeing as everything is open-source, but I have never done it - and why would I want to? Linux is the friendliest to build on, so it’s better to use it as a build environment.