Skip to main content

Computer Science

Posts about computer science

The cover of "ChatGPT: An AI that can write Minetest mods... kinda"

ChatGPT: An AI that can write Minetest mods... kinda

OpenAI’s GPT-3 is a powerful new Artificial Intelligence model that uses deep learning to produce human-like text. It was trained on a large body of text, with sources including websites, Wikipedia, and books. It doesn’t just understand natural language, it can also work with programming languages.

This topic is especially relevant with the recent introduction of GitHub Copilot. Copilot is an “AI pair programmer” for your IDE that suggests code and entire new functions. It’s based on same technology as GPT-3, but with a model derived from GPT-3 and optimised for code called Codex. This article will use GPT-3 and Codex, as I wasn’t able to get GitHub Copilot, but the results will be identical.

In this article, I will ask GPT-3 to write Minetest code and explore how much it knows about modding, creating simple and advanced Minetest mods. I will finish by using it to convert Minecraft mods to Minetest.

Read more of "ChatGPT: An AI that can write Minetest mods... kinda"

Rubix: My Simple Kernel written in C for arm

During the second year of university, I created a kernel for the ARMv7 instruction set. I went above and beyond what was required on this project, achieving a clean design and features such as a blocked process queue, piping, kill, and a simple filesystem. This was my favourite coursework so far. I found it very interesting to learn about and implement the things that we take for granted as programmers.

I tried to stick to POSIX as much as possible, and stuck to the Linux method of having everything as either a file or process. Because pipes and standard in/out were both “files”, I was able to implement both popen and piping of the output of a process to another process.

Read more of "Rubix: My Simple Kernel written in C for arm"

3D Projection

Hello 2015! Recently I have created an implementation of the 3D projection algorithm. It is just wireframe models. It works pretty well, except it doesn’t do frustum culling. You still see things that are behind you, but upside down.

The source code of this implementation is available under the WTFPL or CC0 licenses - you can choose which one you want to use. Use WASD to move, arrow keys to rotate, space to ascend and shift to descend.

Read more of "3D Projection"