Tagged: all | software | 3dprinting | electronics | bitcoin | cpu | puzzle | smsprivacy | cnc | chess | keyboard | lawnmower | cryptography | pikon | rc2014 | science | tor | ipfs | steganography | ricochet
Sat 3 April 2021
Thanks to the excellent Build Your Own Text Editor tutorial, SCAMP/os now has an editor. It's pretty bare-bones, but perfect for what I need. Read more »
Sun 21 March 2021
I have reached a good milestone on the SCAMP hardware: it can now execute code! It runs all the way through the test program correctly. Read more »
Sat 27 February 2021
You might think it's a bit early to be working on an operating system, given that I don't have a CPU to run it on. Maybe you're right. But working on software is easy and working on hardware is time-consuming, so here we are. Read more »
Fri 19 February 2021
I've been working on a compiler for the SCAMP CPU. It compiles a language I'm calling "SLANG" (which just stands for "SCAMP Language" pending a better backronym) into SCAMP assembly language. Read more »
Wed 17 February 2021
The AT28C16 EEPROM stores 2048 bytes, which means to access it all you need to control 11 address lines and 8 data lines. You also need to operate "chip enable" (pull low to enable the AT28C16), "output enable" (pull low to enable output), and "write enable" (pull low to enable writing). That means in total you need to control 22 pins, but the Arduino Uno only has 12 general-purpose digital IO pins. Problem. Fortunately, there are some tricks that make it workable. Read more »
Fri 12 February 2021
I'm going to get most of the PCBs for SCAMP made by JLCPCB, but I'd like to try to mill the backplane on the CNC machine because it is both large (expensive at JLCPCB) and simple (single-sided, no vias, easy to make). Yesterday some small pieces of copper-clad board arrived and today I had a first attempt to see what would go wrong. Read more »
Sun 31 January 2021
I (believe I) am making good progress on designing the TTL CPU. Most of the actual CPU design is relatively stable now, and bug discoveries in the hardware design are infrequent, so now I get to move up a level and work on the instruction set. After that, it's just the bootloader, operating system, and application software. Oh, and the small matter of the physical hardware assembly... Read more »
Fri 15 January 2021
On Graham's recommendation, I recently bought an iCE40 FPGA and have been learning a bit about how to use it. The iCE40 is good to get because there is good open-source tooling that supports it. I was originally going to get the iCEstick evaluation board, but there are other alternatives available more cheaply and with more logic elements. I ended up getting an iceFun and have found it to be quite easy to use. The example projects are helpful. Read more »
Tue 29 December 2020
Literate Programming is "a programming paradigm introduced by Donald Knuth in which a computer program is given an explanation of its logic in a natural language". It's something I've wanted to have a go at for a while but never got around to. Yesterday, for fun, I wrote a brainfuck compiler for the RC2014 and it seemed like a good fit for Literate Programming because it's short enough to get my feet wet but has enough detail that there is some interesting stuff to explain. Read more »
Sat 26 December 2020
4.40am. The alarm wakes me up, but I was pretty much awake already. I get out of bed, put on my dressing gown, make a cup of tea, and sit down at the computer. I warm up my fingers with a few rounds of 10fastfingers. I open up vim and type out my template: #!/usr/bin/perl, use strict; use warnings; while (<>) { chomp; }. I drink a sip of the tea and wait for the clock to tick down. 4:59:40. Almost time. My heart races. 4:59:55. I hover the mouse cursor over the number 22. 4:59:58. Why is time passing so slowly? The wait is agonising. 5:00:00. Finally. I click the left mouse button and off we go. Day 22 part 1: Crab Combat. The next 4 minutes and 58 seconds pass in a furious blur of reading, thinking, and typing. I submit my answer. 158th place. Gah, close. On to part 2. More reading, thinking, coding, debugging, until at 5:22:55 I submit my part 2 answer. 139th place. 0 points. Better luck next time. I browse Hacker News and /r/adventofcode for half an hour while the adrenaline wears off, and then go back to bed. Read more »
Fri 6 November 2020
I've been working on a project that gives a CSS colour scheme that varies based on the day of the year, with a vague attempt to match the colour to the season. In case you're wondering why my blog has a new purple colour scheme (at time of writing): this is why. Have another look tomorrow if you want to see the same content in an imperceptibly-different purple. Read more »
Sat 24 October 2020
I've been struggling with generating complex toolpaths in FreeCAD and thought that an easy approach would be to render a heightmap of the part, and then generating a toolpath from that should be easy. I understand that this is already a recognised technique, although I could not find an open source tool that would do it for me. Most of the heightmap-related stuff I found on DuckDuckGo was to do with auto-levelling the bed. And, anyway, it's a relatively simple idea and a fun challenge, so I did it myself. Read more »
Sun 26 July 2020
I've been playing a bit of Mini Motor Racing X on the Oculus Quest recently. It's good. The experience of driving a car in virtual reality is amazing, but this particular game is too much "game" and not enough "simulator" for my taste. I've always preferred Gran Turismo to Mario Kart, for example. Unfortunately, the Quest is quite an unusual platform, and none of the popular racing games are available for it. I recently discovered that the open source game engine Godot has Oculus Quest support, so I'd like to make a basic car racing simulator for Oculus Quest. Read more »
Sun 28 June 2020
24a2 is an "ultra-minimalist" game engine. It was posted on Hacker News this morning and I found it so interesting that I decided to take a day off from breaking keyboard switches and make a tiny game instead. Read more »
Sat 16 May 2020
The right way to package Perl programs is with RPM, or DEB, or on CPAN with ExtUtils::MakeMaker or similar. But this is a hassle. Read more »
Thu 14 May 2020
Docker doesn't let you reassign port mappings while containers are running. That means if you want to deploy a new version of your application, you need to stop the old one and then start the new one, and there is a brief period of downtime in between. I wrote Ngindock to solve this problem. Read more »
Tue 10 December 2019
I wrote a web server for my RC2014. It runs from CP/M, which has no built-in concept of networking, so I had to implement every layer of the networking stack, which in this case is SLIP, IP, TCP, and HTTP. It totals about 1200 lines of C, all of which was written on the RC2014 in the ZDE 1.6 text editor, and compiled with the Hi-Tech C compiler. Read more »
Wed 23 January 2019
The Earth rotates around its axis at a rate of ~360°/day, or ~15°/hr (it's actually slightly slower than this because "1 day" is the amount of time it takes for the sun to come around again, but we are also moving around the sun, so we don't need to rotate a full 360° per day). When zoomed in with a field-of-view only 0.25° wide, objects that are not very close to the North star appear to move quite quickly across the frame. For this reason, my telescope control software continually updates the coordinates that it wants to point at, in order to keep the scope pointed at the same part of the sky. Read more »
Tue 9 October 2018
I designed a steganography system that encodes data as a chess game. A convenient way to communicate chess games is PGN, but any means of communicating the moves of the game would work, as the information is encoded conceptually in the moves themselves, rather than taking advantage of any redundancy in the PGN format. Read more »
Fri 25 May 2018
Yesterday I had an idea for a simple Rock-Paper-Scissors AI based on Markov chains. The "state" would be what the opponent played in the last N rounds, and would be used to predict the probability that the opponent would play Rock, Paper, or Scissors next. The AI would choose what to play, to beat what the opponent is expected to play, weighted by the expected probability for each possible action. Read more »
Mon 26 February 2018
Last month I ran a small puzzle in which, after having picked up an SSH key in one of the rounds, a subsequent round involved connecting to a (supposed) web server using an SSH client. It's quite a neat trick so I thought it deserved sharing. Read more »
Sun 9 July 2017
Back in April I wrote about the Large Bitcoin Collider and how it is probably malware. Well, now there's another (even more blatant) piece of malware being spread via reddit. Read more »
Fri 19 May 2017
Over the past week I've been working on hardbin. Hardbin is an encrypted pastebin, with the decryption key passed in the URL fragment, and the code and data served securely with IPFS. (IPFS is a distributed content-addressable storage system that is web-compatible; it's basically bittorrent for the web). Read more »
Wed 22 February 2017
I made a tool, stegoseed, to generate sentences which steganographically encode Bitcoin wallet seeds, and to decode such sentences to retrieve wallet seeds. It comes with an example BIP39 seed to play with. Read more »
Mon 23 May 2016
I've been working with Wordpress a little lately. I learnt that you're supposed to create a child theme in order to make modifications to it, but I'd already modified the theme settings (colours, etc.) using the Wordpress 'Customise' tool and couldn't see how to copy these settings to the child theme. Read more »
Wed 27 April 2016
As a teenager, I wrote a C program to do image steganography. It hid the secret image in the least significant bits of the cover image. I also made a PHP web interface to it, which now sees about 3,000 users per month. So I've made a better version, it gives previews of the input images, doesn't upload the images to my server (privacy, yo), and is faster. Read more »
Fri 15 April 2016
Have you ever been bothered by how slowly your webapp loads, but never profiled it? Much like test-driven development and A/B tests, performance profiling almost always throws up surprises and big wins, and yet most people never bother to do it. If you have anything that runs too slowly, you should profile it today, you will find improvements to make. Read more »
Thu 11 June 2015
The logrotate tool has a mode called copytruncate which copies the log file and truncates the original, rather than renaming the original, so that the daemon doesn't need to reopen the log file. Read more »
Thu 9 April 2015
I had a problem this morning of a process that was stuck waiting for an HTTP fetch to complete, and had been stuck for 8 hours. Obviously the fetch had not been successful, and additionally some sort of timeout had broken, but I wanted the process to continue executing for the time being. What to do? Read more »
Fri 18 July 2014
I've recently written a West Country Place Name Generator. Read more »
Sun 29 June 2014
In about 3 weeks' time I'm setting off on the Mongol Rally as one half of team Yurt Lush. Read more »