I have spent the last couple of years of my life trying to make sense of fsync() and bringing OpenZFS up to code. I’ve read a lot of horror stories about this apparently-simple syscall in that time, usually written by people who tried very hard to get it right but ended up losing data in different ways. I hesitate to say I enjoy reading these things, because they usually start with some catastrophic data loss situation and that’s just miserably unfair. At least, I think they’re importan...| despair labs
OpenZFS 2.3.0-rc1 was just tagged. This was the first full development cycle I was involved in and there’s lots I’m excited about beyond the headline items. Here’s a few less obvious things that I think are very nice! Better userspace debugging Better task queue stats The endless kernel update treadmill Linux IO submission rewrite Credit where it’s due JSON everywhere Most of this is stuff I had a hand in myself, because a lot of what I do is scratching my own itches, and I like to ta...| despair labs
In a couple of days I’ll back on a plane, taking the travelling circus to BSDCan 2024 in Ottawa. I’ll be presenting two sessions: Why fsync() on OpenZFS can’t fail, and what happens when it does, which despite having exactly the same title as my AsiaBSDCon 2024 presentation, is actually more like the sequel. Then, we were making fsync() block instead of returning success. This time, we’re making it return failure instead of blocking. The duality of man. quiz: tiny VMs for kernel devel...| despair labs
AsiaBSDCon 2024 starts next week in Taipei, and I’ll be there! I’ll be presenting two sessions (working titles): Dirty deals: the story of a data corruption bug in OpenZFS, on last year’s exciting (apparent) data corruption bug and its resolution. The talk is probably going to be mostly a rehash of the blog post, but that’s ok; not everyone has heard about it, and it’s a good story with some important conclusions. Why fsync() on OpenZFS can’t fail, and what happens when it does, w...| despair labs
My preferred programming style is highly interactive and exploratory, which requires a fast edit-compile-test cycle. But then a year ago I started working on OpenZFS, which is a big chunk of kernel code. Kernel code means developing on either real hardware or a VM, which tend to be awkward to get real code on to, and then, being kernel code, it’s pretty easy to crash, wedge or otherwise damage the kernel, requiring a reboot.| despair labs
The Thanksgiving long weekend (23-26 November) in 2023 was an interesting one for OpenZFS, that I managed to land myself in the middle of. The short version of events is that an apparent silent data corruption bug was discovered, which is kind of the worst case scenario for a data storage system. It was a pretty intense few days for me, initially one of a few people looking into the bug, and then later being involved in working out a fix, talking to downstream vendors, responding to private a...| despair labs
I don’t remember where I first heard about Rust, but I know it was a long time ago, likely back in 2012. At the time, I was the unofficial project lead and heavy contributor to Pioneer, a space exploration game in the spirit of Frontier: Elite II. I had landed here in my usual way, spending my free time bouncing from open-source project to open-source project, messing with whatever took my interest and invariably ended up deeply entrenched. As it was, this was my first outing with any kind ...| despair labs
2022-01-16 20:04 last couple of weeks I tried my hand at designing a board for GOOD COMPUTER. had to resist the urge to add features and just stick with what I know. they arrived today, the five I ordered and siz bonuses. exciting! --- 2022-01-16 20:05 starting assembly. I ordered parts to fill them this week but totally forgot about chip sockets. so they’re on their way, and meanwhile I’m improvising| despair labs
2022-01-12 20:05 back in 2020 I had some time at home (!) so I built a little computer. this year I’ve also had some time at home (!) so I pulled it back out and started work on an SD card driver --- 2022-01-12 20:36 as is usual for small embedded devices, SD cards mostly do the right thing for whatever bus they’re on (SPI in this case), but have some interesting quirks and timings. documentation is available in the form of the “simplified” specs, which are missing important details| despair labs
I’ve been hearing about io_uring on and off for the last couple of years. Its a relatively new technology in Linux to allow high-performance IO with very few overheads. Whenever its been mentioned, its usually been presented as a new alternative to select, poll and epoll. This led me to believe that it was just the next iteration of those facilities, which is to say, another facility to inform a program that something has happened on a file or network socket or whatever, so that it can take...| despair labs
2024-03-30: this post has moved to /presentations/good-computer/.| despair labs
2020-08-17 21:16 hey look, it’s GOOD COMPUTER mk2. totally rebuilt with an atmega88 after a minor voltage incident took out my remaining 8s. I like the smaller board though its pretty cramped. might receive further layout changes as I try to add peripherals, but for now it’d quite nice! --- This was once a thread on the bird site. It’s a shame it no longer exists.| despair labs
2020-07-27 21:06 lol so I fucked up while getting the XIAO toolchain running and trashed the bootloader. so a new GOOD COMPUTER project begins: just enough JTAG/SWD to reflash the bootloader and make it usable again --- 2020-08-01 18:12 “just enough JTAG/SWD” seems too be too much for me. mostly, the chip is not responding in the way I’d expect, and I don’t have any real way of discovering the problem, and there’s just not enough info out there. so next order will include a JTAG ada...| despair labs
2020-07-24 20:56 this is a XIAO, a tiny ARM dev board. gonna do another round of GOOD COMPUTER type work on it. more memory and tiny size are appealing, learning a new instruction set less so. I always like it once I get going though, so we’ll see where we end up --- 2020-07-24 20:57 374 pages off we go then --- This was once a thread on the bird site. It’s a shame it no longer exists.| despair labs
2020-07-12 13:29 started messing with this SD card module. seems it’s not properly SPI compliant, as it’s driving CIPO low even when not selected. I think I found the bug; the buffer on that line has its enable pin tied to ground, so it never stops. gonna try lifting it and tying it to CS instead --- 2020-07-12 14:26 super pro environment lol --- 2020-07-12 17:11 nothing to it. just gotta use these enormous ham hands to lift pin 13 (4/OE) of U1 and connect it to pin 9 (3A) with a trace. n...| despair labs
2020-07-07 22:02 --- This was once a thread on the bird site. It’s a shame it no longer exists.| despair labs
2020-07-06 19:44 I had an idea --- 2020-07-06 23:31 not a real clock, just text layout tests I have several ideas --- 2020-07-07 19:24 dropped in this 5x8 font to get 25 chars per line. I love my C64 but really I’ve got limited space and this is quite readable (this is the very pleasant “klostro” font by Anton Lazarev https://gitlab.com/antonok/klostro) --- 2020-07-08 19:28 building up 2D primitives. here’s line drawing --- 2020-07-08 20:34 PSA| despair labs
2020-07-05 17:30 I used a pair of ‘595 shift registers to hook this up to the SPI bus. it works fine, but needs constantly refreshed and on the bus permanently. if I did it “for real” I’d just drive it with another AVR, but that’s maybe just my software head talking. experiment over for now --- This was once a thread on the bird site. It’s a shame it no longer exists.| despair labs
2020-07-02 12:30 I decided to take a short break and add a LCD screen to GOOD COMPUTER, but it ended up taking a very late night and a morning to get it going. the timing is quite important and there’s not much example code around, so lots of study and experimenting required --- This was once a thread on the bird site. It’s a shame it no longer exists.| despair labs
2020-06-22 15:09 GOOD COMPUTER continues! I got bored with BASIC, and I’m waiting for parts to arrive, so I started something new: a Z-machine implementation, in AVR assembly, so we can play Zork! https://gitlab.com/good-computer/zap --- 2020-06-22 15:20 my typical workspace layout for this stuff, if you’re interested. code and test setup on one, data inspection and other fiddling on another, and CPU docs on another. it’s not complicated --- 2020-06-24 16:18 enough stuff in place to get...| despair labs
2020-06-02 12:35 I am making a GOOD COMPUTER, my take on a 70/80s-style approach to building a computer! Current focus: the BASIC interpreter Here’s the code and more info: https://gitlab.com/good-computer/basic --- 2020-06-03 15:47 I made a function! it turns out that functions can be parsed as just a special kind of parens. I’m really happy with how cleanly it came out --- 2020-06-03 15:52 meanwhile, some 128K SPI SRAMs arrived today, a month ahead of of the ETA, so soon I’ll be able ...| despair labs
2020-04-28 20:19 I started building a little computer this week. The idea/constraint is: what if we built a late-70s-early-80s-style 8-bit computer in 2020 This pic is extremely early, mostly just getting a toolchain and workflow into place --- 2020-05-03 21:16 While I wait for some parts to arrive, I’ve been working on the BASIC interpreter, and have gained an appreciation for the people writing firmware back in the 70s, often without actual hardware. I’ve got it easy!| despair labs
Like most (all?) desktops, elementary OS has a date & time widget. You click it and it shows calendar stuff. Mine currently looks like this: The elementary OS date widget, showing the month and two events for the day(The world clocks are not standard; that’s something else I’m working on, but I’ll write about that some other time). It gets its data from the Evolution Data Server, the backend store for the Evolution groupware client (and others stuff). This thing has a bunch of backends ...| despair labs
As I said before, I spend most much of my life in terminal windows, being a sysadmin or a programmer or anything else like that. So naturally, where my terminal windows are positioned on the screen is kind of a big deal to me. Back when I ran XFCE, I got used to using its keyboard shortcuts to position windows. They were pretty simple: you could tap keys to make a window use the left half, right half or entire screen. Not maximize, but more like what you’d get if you used the mouse to resiz...| despair labs
So I’m switching from macOS to elementary OS. Why am I doing this? History time! Long ago, when I was small, I received a Commodore 64 for my 9th birthday. It started as a toy, but became the main thing I spent my time on right up until I was 18. Its where I learned my trade: hardware, operating systems, programming. It’s also at least partially responsible for my poor posture and damaged fingers. More on that later.| despair labs
2024-03-30: this post has moved to /presentations/consul/.| despair labs
2024-03-30: this post has moved to /presentations/u2f/.| despair labs
From 1-3 October 2016 I was at CompCon Australia 2016, a technical conference aimed at tertiary computing students. I had a great time, in ways I didn’t expect. I’m currently on the flight home and thought I should write down a few thoughts while its still fresh in my mind. Setup 🔗 Its not a conference that I’d ever heard of before, and even if I had I probably wouldn’t have figured it was the right place for me to attend. But my friend Ducky brought it to my attention and very ent...| despair labs
2024-03-30: this post has moved to /presentations/passwords/.| despair labs
2024-03-30: this post has moved to /presentations/u2f-l/.| despair labs
Secret level huh? How hard can it be… Not too hard once you study the numbers for a while. If it had had instructions it’d probably been about equivalent to one of the mid-game levels.| despair labs
New release of salada, my JMAP server. CRUD methods for Calendar, CalendarEvent and Mailbox objects and a massive pile of internal cleanup and tooling to make adding new object types trivial. Next up, some actual logic! robn/salada| despair labs
I was happy with this one| despair labs
Settling in for an evening of programming puzzles…| despair labs
Nicolas Grégoire’s excellent presentation from AppSecEU 2015 on various terrifying SSRF exploits. I was thrillied to see Fastmail, and particularly Hopscotch (my image proxy), mentioned as potential targets, but then not actually feature in any of the exploits presented. I hope that means nothing of interest was found! Interestingly, I did discover after reading it that Hopscotch was actually vulnerable to a redirect attack. It only did its DNS paranoia checks on the input URL, not on the ...| despair labs
If you’re going to provide OAuth access to your non-web protocols (eg XOAUTH, OAUTHBEARER, etc to IMAP, SMTP, whatever) then you need to give me a way to convert an access token into a username. By design, the standard OAuth handshake yields a token at the end. Nothing more. You do not get any identity information, and you can’t assume anything because in a multi-user system (eg Google), you have no idea which account has been used.| despair labs
Success! With this you can configure Postfix (or any other thing that uses libsasl2) to OAuth to Google’s SMTP server. Coming soon to a near you :) robn/sasl2-oauth For those interested, I wrote a quickstart for getting it running with Postfix: https://github.com/robn/sasl2-oauth/issues/1| despair labs
First release of salada, my JMAP server. Only supports a tiny corner of the API but the data model is there and it should be enough to get you started. Rust is taking some learning but mostly I’m loving it :) [ANN] salada 0.0.1 release - a standalone JMAP server| despair labs
Here’s the start of a fully type-checked JMAP parser/generator in Rust. I’m sure its not good idiomatic Rust yet, but I’m still pretty proud of it. Mostly I like how concise you can make things and still get pretty solid guarantees about the quality of the data you get back from the parser. If the object parses, you know its good and don’t need to do any further checking. Partial objects are going to be interesting. Not hard, but I’m really curious to see how much I can reuse.| despair labs
With so much cricket going on at the moment, SixFour has seen quite a bit a work. Some layout tweaks have opened up space at the bottom for anther line of text, which I’m intending to use to show some match details as they come up (boundary, wicket, etc). So far its only showing the current break state. Its got a clock at last! :) There’s also a bunch more defense around weird data, and its far less likely to break the layout on long names. Still lots more work needed, particularly on th...| despair labs
Making things like this excites and terrifies me in equal measure. robn/everybody-root| despair labs
I had no choice. Had to make a skanky name shortener for players in minor teams that don’t have a short name in the Cricinfo database. varshorten=function (n) { varbits=n.split(' '); for (vari=0; i<bits.length-1; i++) bits[i] =bits[i].substr(0,1); returnbits.join('.'); };| despair labs
So today I want to tell you about a little side project that I worked on over the Christmas break in between eating, watching cricket and napping. I added XMPP termination and proxy support to nginx. This is a big post because I want to cover everything: background, rationale, implementation detail and so on. As I wrote the outline it occurred to me that this would make a really interesting talk. Maybe one day if I find an appropriate venue that could happen!| despair labs
A small tweak to the Pioneer build system has turned into building a dummy renderer for headless environments (for tools). Very strange to be writing Pioneer code after so many months!| despair labs
Always interesting to find weird broken shit in wire protocols. This from a hopscotch debugging session: $ curl -I http://www.ibm.com/social-business/us/en/newway/images/email/ipad_image.jpg HTTP/1.1 200 OK ... epKe-Alive: timeout=10, max=76 All other headers are correct. So I started poking around a bit: $ curl -I http://www.ibm.com/social-business/us/en/ HTTP/1.1 200 OK ... Kp-eeAlive: timeout=10, max=81 $ curl -I http://www.ibm.com/ HTTP/1.1 302 Moved Temporarily Server: AkamaiGHost Dunno ...| despair labs
Inside the NBN box of mystery. The coil of insulated whatever has been brought inside, and then a single (blue) fibre has been brought out to the green connector to be hooked up to the next thing when the time comes.| despair labs
NBN tech came by to “test” the installation and appears to have put the wire away and locked up the box. As soon as I get around to finding the right screw bit I’ll open it up and take a look.| despair labs
Here’s what you get for your no money. A bare piece of fibre (seems like two actually, but I dunno how fibre works really) and an empty box with a bag of cable ties, screws and a couple of terminators for the next guy. Most importantly: “LASER BEAM HAZARD INSIDE”. The map on my ISP website says that the area is still “building” so not available yet, but the latest data from the government authority responsible for the rollout says it was live for service on 26 September. So I emaile...| despair labs
A few months ago I bought a Pebble smartwatch. At the time the current craziness of smartwatches was just about to start up. Android Wear was not long announced, everyone was excited about the Moto 360 and the Apple Watch was still a rumour. Now that the world is mad for smartwatches I’ve had a chance to consider if the Pebble is still the right choice, and I’ve come to the same conclusion - it is still the only smartwatch I want. So lets talk about why I got it.| despair labs
DB<1> $data ="abc" DB<2> x join(' ', unpack('H*', $data) =~m/../g) 0'61 62 63'| despair labs
Something I’ve been fiddling with today. Object::Anon - Create objects on the fly| despair labs
| despair labs
Long names may prove to be a problem. I’ll have to find an algorithm for trimming that makes sense. I guess its based on sound groups? What I’ve done for now is that if a name is longer than 10 characters, I use Cricinfo’s “popular name”, which is a heavily shortened version they use in graphs etc. For these, Jayawardene would become “DPMD” (his initials) and Sangakkara becomes “Sanga”. I don’t want to use it all the time because it seems really hit-and-miss, but its bette...| despair labs
Pebble-owning cricket lovers, its your lucky day. Here’s my live scoreboard app. robn/sixfour| despair labs
Innings change worked perfectly :)| despair labs
First screenshot from my Pebble cricket app :)| despair labs
I think that’s all I need. Just enough room for a tiny clock in the bottom corner - this is still a clock face after all, I might still need the time! Then again, there’s just enough room for an extra line of text at the bottom, I could use it to write the current match status (“Day 2, session 3”, “Drinks”, “Stumps”) or something else, dunno what. The difference between the real device and a screenshot is remarkable. While technically the screenshot is a pixel-perfect reproduc...| despair labs
I spent my weekend on a new project I’m calling hopscotch. Its a tiny, high-performance HTTP image proxy. When you include unsecured (HTTP) content (usually images) inside a secured (HTTPS) page, you effectively make the whole page “unsecure”. The browser will usually tell you when this happens in some way. Older versions of IE at least used to present an obnoxious dialog box. Chrome will change the state of the padlock icon and remove the green EV badge on an EV site. Its a pretty horr...| despair labs
The latest fancy tool for deploying things is Docker. I’ve been following it for about a year with some interest, but after deploying GitLab with Docker last week in about two hours (no exaggeration), I figured it was time to see how to drive this thing. I did this by “dockerising” a simple but non-trivial Perl application. The point of all this 🔗 As I’ve been working on this I realised what Docker gives everyone, including the Perl community, and I wanted to put it up here so that...| despair labs
towncrier is now deployable with Carton. Best case you can have it running with three commands. Next up, deploying it with one command with Docker :) Its really nice to have a small, focused but non-trivial application to try out new tools and ideas with. robn/towncrier| despair labs
There’s a class of attacks that don’t get a lot of attention called Server-Side Request Forgeries. We recently started protecting against this universally at FastMail (rather than the ad-hoc arrangement we had before). Here’s how we did it. First, lets talk about SSRF. Think of a webapp that lets you give it a URL that it will do something with. Examples are imgur’s “upload image from URL” function, or any feed aggregator (eg feedly) or podcast application (eg PlayerFM) that lets ...| despair labs
This week Google announced their new Gmail API. Predictably, certain segments of the internet went insane. My response was “oh, its about time”. To understand its purpose, and why its not (yet) a replacement for IMAP, you have to understand how it fits with the rest of the integration points Gmail offers to developers. Years ago Gmail started offering a feature called contextual gadgets. They were actually quite clever. As well as the code, you’d write a manifest that described a bunch ...| despair labs
Perl and etcd? I can help! https://metacpan.org/pod/Etcd| despair labs
So I’ve finished my OAuth2 dance and am ready to use my new access token to get at some protected resource. The spec explicitly states that errors while accessing protected resources are “out of scope”. That includes the “error” where the access token has expired. Since there’s no way to tell if its a real request error (like the caller trying to get at something that doesn’t exist) or something that would succeed with a correct access token, my solution is to trap 400-series er...| despair labs
My super-secret spare time project this week is a notifier app for Fastmail, to cover the main failing in the mobile web client: no access to platform notifications. Tonight I got the server-side stuff working, which is a small daemon that subscribes to your mailbox event channel and pushes change notifications through Google’s notification system to the client. The next step is to make the client respond by connecting back to the FastMail API and using the modseq (“modification sequence...| despair labs
If you’re still running DJabberd as your XMPP server, then you’re likely having a hard time coping with the new mandatory TLS policy that many XMPP server operators implemented yesterday. Here’s the patch you need to make it work. fastmail/DJabberd| despair labs
A couple of weeks ago I had a big sook about how I wanted to deploy Stashboard as a service dashboard for Fastmail. There’s a link to it at the bottom of this post, if you like a rant. So I’ve spent most evenings and train rides since then writing a clone that I call “towncrier”. Hear ye, hear ye, stuff is broken! Its mostly API-compatible with Stashboard, though I did file off a couple of sharp corners. It doesn’t have admin screens or OAuth support, though I expect that could come...| despair labs
I’m slightly concerned that I wrote this without really thinking about it. classLuaSlot { public:staticinline sigc::slot<void> Wrap(lua_State *l) { lua_getfield(l, LUA_REGISTRYINDEX, "_slot"); if (lua_isnil(l, -1)) { lua_newtable(l); lua_pushvalue(l, -1); lua_setfield(l, LUA_REGISTRYINDEX, "_slot"); } lua_pushvalue(l, -2); int ref = luaL_ref(l, -2); lua_pop(l, 1); return sigc::bind(sigc::ptr_fun(&trampoline), l, ref); } private:staticinlinevoid trampoline(lua_State *l, int ref) { lua_getfie...| despair labs
Experimenting with easing functions. Sometimes the plain old console is the best prototyping tool in the box :)| despair labs
When good glyph atlases go bad.| despair labs
Today I moved Fastmail’s image processing backend (used for attachment thumbnailing and image galleries) from Graphics::Magick to Imager, due to the former’s tendency to crash on some kinds of bogus input, leaving core and data files lying around, filling the disk. If you are doing image processing in Perl and you’re using GD, Graphics::Magick, Image::Imlib2 or anything else that’s not Imager, you are almost certainly doing wrong. Reasons to like it:| despair labs
That will do for tonight.| despair labs
Particle systems are fun :) I’ve been wanting to do a particle system for a long time. If I’d realised how simple it would be to get something basic up and running I might have had a go sooner!| despair labs
Some days you can’t help yourself. You just have to write a particle system.| despair labs
The problem with pulling cricket commentary into IRC is that I want to kickban players when they screw up (ie all day today).| despair labs
Here’s a work-in-progress of the new ship market screen for Pioneer. (Coding in the evening, bit of an oddity for me recently).| despair labs
We might be on to something here… “The purpose of this paper is to describe the solution we implemented to manage the translation cost of the localisation of a massively multiplayer online text based role playing game (MMORPG). The problem we faced was the translation of large sets of sentences that were structured very similarly, contained similar content and that needed to be scalable. In this context, the scalability of the translation content referred to the ability to add more conten...| despair labs
Fastmail’s XMPP server is receiving some bogus crap from Google at the moment. First we get a connection from a Google IP, and then a dialback challenge: <db:resultfrom='gmail.com'to='********'>********</db:result> All good so far. But then, before we even get chance to connect back and do the dialback validation, we get: <nsp0:messagefrom='conserver.google.com'to='********'xmlns:nsp0='jabber:server'><push:pushchannel='babel'xmlns:push='google:push'><push:recipientto='********'/><push:data>...| despair labs
Here’s a question that I’m having trouble finding the answer too, probably because I don’t have the right terminology. I’m currently converting ’s language engine to use the Chrome messages.json style of language files: https://developer.chrome.com/docs/webstore/i18n/ We’re doing this so we can use to let our users and anyone else contribute translations without having to deal with our somewhat-obscure Lua-based translation file format, not to mention not needing to learn Git.| despair labs
Today I’m preparing a Code::Blocks project for Pioneer. We’re about to start allowing C++11 stuff into the codebase, which means that Visual Studio 2008 and 2010 are now going to be pretty much unusable. And while Pioneer builds just fine with 2012 and 2013, and free versions of both exist, neither of them work on Windows XP. Now I don’t personally care about XP users, nor about people using a compiler four releases old. But it is a bit sucky that the only practical way to build your ow...| despair labs
Experiments with librocket, November 2011The first UI written for Pioneer was already in place when I joined the project in early 2011. At the time of writing (October 2013) its still driving much of the game UI, though we are slowly replacing it. Station services screen on the old UI, October 2013Obviously it worked well enough for what it was, but it has some fairly serious limitations which only became really apparent once we started trying to build more sophisticated interfaces with it.| despair labs
Upgrading the office servers. These are actually more effort than my production servers, which have remote consoles. In our production environment, everything is installed from FAI and git - literally <10 minutes from blank machine to production-ready (as in, press one button to start fully-configured production services and start taking traffic). In the office we have three hand-installed squeeze machines. Its a crappy way to manage things. So I’m rebuilding them as a miniature “datacent...| despair labs
The Pioneer UI has long had a problem laying out multi-line text. The problem is that each widget is required to report its ideal size, but that’s always seemed a difficult thing for an arbitrary body of text, which has many valid layouts. Since it was first written its always reported an “I don’t care” sizing, meaning the container should choose. Some containers (like Align, which collapses around its content and then positions) rely on its content to report a sane size. Leading to a...| despair labs
Start of the new bulletin board & chat form. The new modal layers we added to the UI engine last week turned out to be perfect for this!| despair labs
Lets talk about GCC’s maybe-unitialized warning. So I have this code: double v; p.Get(k, v); SetValue(Clamp(v, 0.0, 1.0)); It works great. With optimisations disabled, it compiles nicely. With optimisations enabled, the SetValue line warns: Gauge.cpp:113:36: warning: ‘v’ may be used uninitialized in this function [-Wmaybe-uninitialized] Naively I feel like the warning shouldn’t be there. Everything here is visible to the compiler in this compilation unit. But its ok, its compiler sayi...| despair labs
The secret truth of cross-platform development is that code is easy, but building is hard. My morning’s work: https://github.com/mxe/mxe/pull/247https://github.com/pioneerspacesim/pioneer/pull/2444https://code.google.com/p/miniz/issues/detail?id=18https://bugzilla.libsdl.org/show_bug.cgi?id=2120 With all these workarounds in place, is now really close to running on SDL2 :) Convert to SDL2| despair labs
Finally got the thrusters looking the way I want from behind!| despair labs
Pioneer main menu, August 2013In the evenings, after I get home from work, I work on a game. This is about as close to the opposite you can get from my day job while still being a computer nerd. I do it to relax, and to learn some things that I can’t learn at work. Pioneer is the game in question. It’s an open-ended space game, where you can fly around doing whatever you like. Exploring, trading, looting, pillaging and so on. It began life in 2008 as an open-source clone of Frontier: Elit...| despair labs
Some techniques for randomly choosing colours that don’t clash. Ships in Pioneer have three colours: “primary”, “secondary” and “trim”. My stupid colour selection algorithm is to choose primary at random, but avoiding very dark and very bright because they tend to be pretty horrid. Secondary is then the inverse of that, so it has equivalent hue and blends nicely. Then trim is just a darkened version of the primary, which works well for its intended use (thin edges and such).| despair labs
I bisected a kernel problem! Maybe not a bug, but certainly not working right. Feeling smart :) Linux-Kernel Archive: Re: PROBLEM: modprobe hang at startup (3.8.x, 3.9.x, IBM x3550)| despair labs
My first Rust program is a port of Joe Groff’s “Hello World” sample from his Modern OpenGL tutorial. That’s here, and worth reading: http://duriansoftware.com/joe/An-intro-to-modern-OpenGL.-Chapter-2:-Hello-World:-The-Slideshow.html My first trick was to port the original from GLUT and GL2 to somehing closer to what I would have available in Rust. That means SDL and GLES2. That was pretty straightforward, because I know SDL pretty well already. Here you go: https://github.com/robn/hel...| despair labs
My first Rust code is a contribution to the SDL bindings. Its the first step towards getting OpenGL working properly there, which I need for the gratifying eyecandy experiments I want to do. So far I’m liking the language, not that I’m seeing much of the high-level stuff down while working down near the FFI layer. Its very much like Scala, without the complications that the JVM and Java toolchains add.| despair labs
Over the last couple of weeks I’ve been working on integrating remote filestores into FastMail. We’ve had our own online file storage facility for years (long before it was cool), and you’ve always been able to attach a file in your store to an email and save an email attachment to your store. We’ve been extending that to allow you to use a “cloud” file storage service in exactly the same way.| despair labs
Its looking pretty nice!| despair labs
A conversation with Marc Bradshaw about a Lua puzzle I found myself in. Lua 5.2.1 Copyright (C) 1994-2012 Lua.org, PUC-Rio >functionx() return'a','b','c'end> print(x()) a b c > print(x(),'d') a d A variant of this (table.unpack shenanigans) screwed me for about half an hour this morning. I’m sure there’s a logical explanation, but I’m not seeing it. Could the second print be prototyping as a 2 element list and then dumping the second and third elements of the first argument?| despair labs
Not bad. Getting it going on Debian is a pain (libc6 is too old, even on unstable). The fine gamer forums recommend installing libc6 direct from Ubuntu, which is a ridiculously stupid thing to do. Here’s a nice little workaround: https://gist.github.com/grindars/4231563. It grabs the Ubuntu packages, extracts them locally, and sets up LD_LIBRARY_PATH shenanigans to make things work. That’s the right way to do it. Rob N. - 2013-02-16T21:29:14+1100To be fair, they don’t claim to support ...| despair labs
A couple of weeks ago I fixed a nasty bug in this function in OpenZFS:| despair labs
OpenZFS 2.3.0 will be released any day now, and it includes the new “Fast Dedup” feature. My team at Klara spent many months in 2023 and 2024 working on it, and we reckon it’s pretty good, a huge step up from the old dedup as well as being a solid base for further improvements. I’ve been watching various forums and mailing lists since it was announced, and the thing I kept seeing was people saying something like “it has the same problems as the old dedup; needs too much memory, nuke...| despair labs
OpenZFS has some extremely nice tools and you can do a lot with them, but they start to struggle once you need to do more complicated things with your storage, or scale your OpenZFS installation out to tens or hundreds of pools, or use it as a component of a larger product. That’s usually when people turn up looking for better ways to “program” OpenZFS, and it’s usually not long before they’re disappointed, horrified or both.| despair labs