Andy Balaam's Blog

https://artificialworlds.net/blog

17 posts

Tech 94% · Culture 6%

Subscribe via RSS

  1. LLMs produce plausible noise

    I know everyone and their dog is writing about LLMs, and since I refuse to use them you probably shouldn't listen to me, but I have recently solidified some of my thinking about them and thought it might be useful to share. None of this makes any difference to the disastrous ethical position of LLMs, but it has helped me understand them a bit more, and fear them a bit less. Background: the shape of search spaces My PhD was in using artificial evolution to design neural networks that performed…

    0
  2. Parsing SGF files for fun

    SGF files describe a board game like Go, including all the possible variations someone wants to talk about. Let's write Rust to parse one of these files! They look something like this: (;FF[4]GM[1]SZ[19];B[aa];W[bb];B[cc];W[dd];B[ad];W[bd]) Follow me on mastodon: @andybalaam@mastodon.social

    0
  3. A full (slow) solution to the Billion Row Challenge

    We've been picking off small sub-tasks of the Billion Row Challenge, which asks us to summarise a large amount of data as quickly as we can. This time we complete the whole challenge, but in a slow way, to make sure we understand it. In future videos we will attack the last remaining sub-tasks, which concern how to collect together the information (probably in a hashmap) and print a summary. The code is at https://codeberg.org/andybalaam/brrmbrrm Follow me on mastodon:…

    0
  4. The billion row challenge: do we have a bug?

    A couple of people contacted me with feedback about the SIMD implementation we used to find newlines in the billion-row file. One suggested a possible bug (shock!) and one suggested a way that might be more efficient. We'll take a look at both, obviously starting by writing a test that checks for the bug. After the stream I made another attempt at using the information about all newlines in a 64-byte chunk, instead of just the first one. I did it with no Vecs at all, unifying the two functions…

    0
  5. Writing a bit-wise iterator (with Jez!) for our gunzip implementation

    More Jez+Andy coding, working on our gunzip clone. Jez figured out we need to iterate byte by byte through the input, so we write a Biterator to do that. The code is at https://codeberg.org/andybalaam/ggunzip Read Jez's blog at https://www.jezuk.co.uk/ Read my blog at https://artificialworlds.net/blog Follow Jez on mastodon: @jezhiggins@mastodon.me.uk Follow me on mastodon: @andybalaam@mastodon.social

    0
  6. Keep the faith

    This is mainly a message to myself. I have spent the last few weeks feeling more and more depressed about "the tech industry". I am sad that social media companies are manipulating us, making us angry and ignorant. I am sad that AI is becoming more pervasive when I feel it is fundamentally unethical. I am worried that I may lose my job if I don't use AI, or feel pressured to use it. I am worried that the craft to which I have dedicated my life, and which I love, (programming) is going to die.…

    0
  7. Implementing gunzip from scratch in Rust

    Jez and Andy get together for crazy programming hijinks, trying to figure out from scratch how gzip compressions works, starting by making a valid minimal gzipped file, then trying to unzip it. Read Jez's blog at https://www.jezuk.co.uk/ Read my blog at https://artificialworlds.net/blog Follow Jez on mastodon: @jezhiggins@mastodon.me.uk Follow me on mastodon: @andybalaam@mastodon.social

    0
  8. Jez returns for programming language chat!

    Veteran super-coder Jez is back, and claims he has "finished" implementing Cell, Andy's toy language, in Rust. Jez and Andy basically gossip a bit, about code type stuff. Read Jez's blog at https://www.jezuk.co.uk/ Read my blog at https://artificialworlds.net/blog Follow Jez on mastodon: @jezhiggins@mastodon.me.uk Follow me on mastodon: @andybalaam@mastodon.social

    0
  9. Announcing Changelog Builder - a towncrier clone for building changelogs

    I really enjoy re-implementing things that already exist. Sometimes it's just out of interest, sometimes it's to make it faster, or work in a different way, or improve the code quality, but I love having that concrete expectation of what the code does to work from. So, when a colleague suggested we might use towncrier to handle our release notes, but I knew its Python implementation might be tricky to deploy, I saw an opportunity to make a little Rust version. Thus Changelog Builder was born!…

    0
  10. Using anyhow to handle errors in my Rust changelog builder

    Let's fix our messy error handling in our Rust towncrier clone by using the anyhow library and adding context() calls to describe what went wrong. Can we match the output of towncrier in different circumstances? Do we actually want to match it exactly, or can we do better? You can find the code at https://codeberg.org/andybalaam/changelog-builder Follow me on mastodon: @andybalaam@mastodon.social

    0
  11. A simpler blog comment system

    Since I made this blog statically-generated using Zola I've been using Remark42 as my comment system. I wanted something self-hosted and simple, and it worked. These days I get a comment every couple of months, and about half of them are spam. Remark42 seemed to forget who I was each time, so deleting the spam involved me remembering where Remark42 was deployed, editing and re-uploading a config file each time just to become an admin user to delete the comment. It occurred to me the other day…

    0
  12. Building a Rust commandline tool: a towncrier clone

    Enthusiastically embracing test-driven development as always, we attempt to write a minimal clone of a useful tool, towncrier, which allows us to build changelogs out of individual "newsfragment" files. By the end we have the outline of a decent solution that passes our first and only testcase! You can find the code at https://codeberg.org/andybalaam/changelog-builder Follow me on mastodon: @andybalaam@mastodon.social

    0
  13. The billion row challenge: splitting lines using SIMD in Rust

    I was scared to do it, but it was actually fine! This time we look at the quickest way to split up massive text files into separate lines, first by implementing our own zero-copy version of BufReader::lines and later using SIMD, which allows us to process 64 bytes simultaneously, using a single CPU instruction! I'm pretty sure this is the first time we've ventured into nightly Rust on this channel... Follow me on mastodon: @andybalaam@mastodon.social

    0
  14. Rust: reading very large files for the billion row challenge

    Checking out whether memmap can help us read very large files as fast as possible, and wondering how wc manages to be so fast. This is the next bit of the Billion Row Challenge, and probably the closest part to black magic. Follow me on mastodon: @andybalaam@mastodon.social

    0
  15. Parsing whole lines of the Billion Row Challenge

    Excitingly, our temperature parser can be trivially extended to find the start of the temperature, so we can use it to parse the whole line! Follow me on mastodon: @andybalaam@mastodon.social

    0
  16. Improving our billion-row parsers and benchmarks

    Improving the benchmarks of our Billion Row Challenge, and playing with some improved implementations. Follow me on mastodon: @andybalaam@mastodon.social

    0
  17. Making our own String type in Rust

    Implementing our own versions of standard types can help us understand how they work a bit better. This time we'll make a new string type called AsciiString, and make it handle all its memory itself. Lots of unsafe, and probably lots of bugs! Follow me on mastodon: @andybalaam@mastodon.social

    0