RSSAmplifier

Blog

mochiro.moe

a blog

mochiro.moeRSS feed ↗11 posts

Latest posts

Improving Muon's Output

Cleaning up the output from muon setup muon setup usually does what most C build system configurations do: spam a bunch of compiler and environment information to your terminal. I did a lot of clean up to try and make the output prettier and more consistent, but it is still just spam at the end of the day. This is okay, but we could do better. Most people probably only care about setup output when…

Muon's shiny new interpreter

For the past year I had been seriously thinking of doing a major refactor of muon's internals. In particular, the entire parser/interpreter was the first I had ever written and I felt like there were a lot of things I would have done differently if given the opportunity to start over. Bytecode interpreter The biggest change was porting muon over to using a bytecode interpreter rather…

A pure-meson ray tracer

git repository One of the defining features of meson is its lack of turing-completeness. An oft-cited example of why this is bad to have in your build system is a ray tracer implemented in pure cmake , with the argument being that this proves the build language is too general. For some reason I took this as a challenge, and felt the need to see just how difficult it would be to implement a ray…

Generating flamegraphs of your meson.build

While doing some memory profiling work on muon recently, I revisited some old tracy integrations. After adding instrumentation for object allocations, I realized it would be trivial to instrument each meson builtin function call by wrapping the dispatch site in a few lines of tracy markup. The result is that you can now view a flamegraph of your meson.build scripts if you build muon with tracy…

A few reasons why you shouldn't use regular expressions in your parser

Given the search query string: 'field:value other_field:other_value keyword' How would you go about extracting the various fields, values, and plain keywords? A regular expression based solution could be to define a regex for each field, e.g. field:([^ ]+) , and then match all occurrences in the input, removing the match after it has been processed. While this approach has several obvious…

Introducing muon, a C implementation of the meson build system

Meson is an awesome build system for C (it can be used for many languages, but I think that the most common use case is for primarily C and C++ projects). Although it is not without its flaws, I have yet to see a better alternative. The syntax is simple, it is cross platform (runs on windows too), it supports complex builds with ease. If you want to learn more about meson I recommend going through…

How to make pathfinding fast

(note: this is how I made pathfinding fast, your mileage may vary) A central component of my game is pathfinding. Since the only way to interact with your minions is by giving them commands, they have to figure out how to actually carry out those commands by themselves. A big part of this is finding out how to get to/from places, e.g. pathfinding. For instance, if you give them a command to…

Terrain Generation

Noise When I first approached the problem of terrain generation, my initial research led me to implement a simple perlin noise generator. This got me up and generating some pretty decent looking terrain in just about a day. For several months I was happy. After a while though, I began to notice some problems. At first, I considered just using a better noise function, say simplex noise. Eventually…

I'm making a game

Its been awhile since my last post, and I've been busy. In late November of 2019 I started working on what has become my most ambitious personal project to date: a computer game. Early screenshot Currently I only have vague ideas for gameplay. In fact I wouldn't even call it a game yet, thats just the easiest way to explain it to people. I just started it with the goal of writing…

A simple rss reader

A while ago I went looking for good rss / atom readers. I had a few requirements: a terminal based user interface keeps track of what you have/haven't read archive everything so you can read offline ability group rss feeds by category lightweight, preferably with no dependencies I don't already have installed The first software I found that might fit my requirements was…

Using jq and curl to check the weather

Have you ever wondered what the weather was like, but not wondered enough to run some web app that takes 120 seconds to load a bunch of tracking javascript and ads, let alone actually go outside. In this post I'll show you what is in my opinion the best way to get your weather report. First though, we need some tools. jq From the man page, jq is a "Command-line JSON processor." Actually, jq…