Select some tags above to show the matching posts.
Introducing Grex: Reactive GTK4 UIs
I’ve long been a fan of the GTK GUI library, using it on various personal projects. Despite this, I’ve started to find myself missing a more reactive UI development approach, as seen in modern web frameworks. In these libraries, you don’t mutate your UI; instead, you mutate the state that’s used to build the UI, and the framework updates the UI to match.
A few years ago, I started analyzing the way these frameworks work internally, trying to determine the best way of bringing it to GTK. After various failed ideas, I finally settled on one that I think has the potential to be fully usable: Grex.
Oh, did I mention it has hot reload?
When a glibc update accidentally breaks Chromium's audio
A few weeks ago, I merged in a pull request to update the Chromium Flatpak to use runtime version 21.08. I had given it some testing without running into any issues, plus the binary-compiled Chromium variants like Chrome, Brave, and Edge were all already on runtime 21.08, thus it seemed like an easy merge. What could go wrong?
So, it turns out, a lot could go wrong.
How Do Computers Store Audio?
Lately I’ve been working with audio formats quite a bit, and the concepts behind the digitizing of sound itself are incredibly fascinating. In this post, we’ll take a whirlwind run through how audio data is saved onto computers and the terminology behind it, as well as a brief overview of various audio codecs.
We Don't Need to Boycott Wayland
If you couldn’t tell by the title, this is a response to this gist, stating that we should boycott Wayland because something something Red Hat evil and breakage and…global menus? Well, there were quite a few exaggerations and misrepresentations in the gist, which will be shown and explained here.
Getting rid of version warnings: an experiment at hacking the Linux/glibc dynamic linker to shut up
If you use a non-Debian/Ubuntu distro (I recently switched to Arch), you've probably had a moment where you downloaded some binaries and tried running them, only to get an error like this:
$ lldb-argdumper -h usr/bin/lldb-argdumper: /usr/lib/libtinfo.so.5: no version information available (required by usr/bin/lldb-argdumper) usr/bin/lldb-argdumper: /usr/lib/libtinfo.so.5: no version information available (required by /tmp/tmp.8oiyW382Pu/usr/bin/../lib/liblldb.so.4) usr/bin/lldb-argdumper: /usr/lib/libtinfo.so.5: no version information available (required by /tmp/tmp.8oiyW382Pu/usr/bin/../lib/liblldb.so.4) usr/bin/lldb-argdumper: /usr/lib/libpanel.so.5: no version information available (required by /tmp/tmp.8oiyW382Pu/usr/bin/../lib/liblldb.so.4)
Ugh. Normally these warnings are nothing more than an annoyance. However, recently I started trying to get Swift working on my new Arch install. With Swift, the warnings suddenly turned much more lethal: some part of
swift package build assumes that, if one of the commands outputs anything (including these warnings), it has failed, and the build will be aborted.
Obviously, I couldn't stand for this. I mean, how hard could this be to fix?
(Spoiler alert: if you want to cut to the chase, I created a tool called qldv that does everything listed below already.)
VueDart 0.3 released! Featuring scoped styles, mixins, a CLI, and more!
After a few months of quiet, I'm super proud to announce VueDart 0.3! Unlike 0.2 (which should've been a minor release, except I wasn't thinking clearly), 0.3 brings an enormous amount of new features, bugfixes, and more.
Remember the post a while back where I rewrote my website in Polymer? Yeah?
Well, I rewrote it. Again.
When replacing a hard drive turns into a fried motherboard, a VM mess, and a slow USB stick
Have you ever tried to do something simple, like changing a lightbulb, but in the end you end up rewiring your house, the neighbor's house, and the governer's ice box? Yeah, that's how I felt. It all started with...
Moving from Nikola to...Polymer!?
EDIT: Yup, I rewrote it again. More info here.
We've all done those things before. You know it's a horrible idea, but it just sounds so cool that you can't resist.
Well, that's why I decided to move away from Nikola (which is awesome BTW) and roll a home-made website using Polymer and the paper components.
An idea for concise, checked error handling in imperative languages
Yes, the post title sucks. However, I can't think of anything better...
This is an idea I've had for a while on an error handling model that tries to combine safe, checked code with the conciseness of unchecked exceptions. It's somewhat of a "rough draft", so to speak, and the syntax I'm using is just an example.
Implementing a (sort of) generic, (sort of) type-safe array in C
I've been using C for a project I've been working on, and one thing I find annoying are manually-managed arrays. Ever since watching Bjarne Stroustrup's talk on linked lists , I try to avoid using those as much as possible. Therefore, I prefer using a container roughly equivalent to C++'s vector.
The obvious thing to do here would be to use something like glib's GArray type or qlibc's qvector type . However, both APIs require using
sizeof and are completely not-type-safe; it's easy to add a char to an array/vector of ints. This made me wonder: is it possible to implement a type-safe, generic array type in C?
Now, I mean the C version of type-safe, which basically means that your compiler has to show either a warning or an error (probably if compiling with
-Werror ) when you try to append the wrong type to an array.
A farmer couldn't figure out how to maintain his web servers, so he gave it to his animals. However, they simply couldn't agree on what tools to use.
The Magic of RPython
RPython is a really nice translation framework that converts a (very) restricted subset of Python 2 to C code. Better yet, RPython will generate JITs for your interpreters. Although there are very good articles on how to write interpreters with RPython, I don't often find anything that describes the language itself. My goal with this post is to do just that: describe RPython itself. I'm going to leave out the things about the JITs; the RPython FAQ links to a good tutorial about that.
The top 5 programming languages you've never heard of (part 2)
Yesterday, I wrote a post about the top 5 programming languages you've never heard of . Well, since it was kind of short (I didn't have too much time to write), I'm going to put a little more info here.
The top 5 programming languages you've never heard of
Lately, there's been a large surge in new programming languages as projects such as Rust have been taking the spotlight and showing lots of promise. However, there are some programming languages few have heard of that deserve to be more popular. Here's a brief listing of some of my favorite languages that aren't common sights.
Using AppVeyor to distribute Python wheels
Wheels are the future of distribution. No more messy broken setup.py scripts or need for a compiler to build C extensions! Of course, this has a glaring issue: a Linux user can't build Wheels of their C extension for Windows. Unless, of course, you use Travis CI , install the MinGW compilers, define the compiler variables, etc. However, there is an easier way: AppVeyor .
Overloading functions with the C preprocessor
Let's have an imaginary scenario: you're trying to make a library that has a special function,
myfunc . Now, this functions needs to have two possible ways to invoke it. One way takes one int parameter, the other takes two. Here's how you might do that in C++:
This website is my first ever web page. It's written using the excellent Nikola and reStructuredText. ( EDIT: Well now it's completely different. It uses Polymer; see this post .) ( EDIT 2: Aaaand I changed it again. It's now written using Vue.) The majority of its content is going to revolve around programming: tutorials, experiments, and lots and lots of rants. :)
Have fun browsing!