Hack-a-Day, Day 15: Vibe Chat

Today's project was a vibe-coded chat program. For those unfamiliar, "vibe coding" is programming where an AI does the majority of the coding, and in fact is often undertaken by non-programmers. In my case I took an approach a bit closer to "architect" than entirely hands-off, but an LLM did all the heavy lifting.

The code is here -- roughly one commit per interaction, with a few combined. The prompts are not included.

I've mostly been using AI very little during hack-a-day... sometimes to help debug, and in one case to write another "boring bit" (convert Minecraft world to JSON, for the voxel engine). It might get stuff done, but it's not going to improve the same set of skills to do stuff with an AI. And I'm generally a bit wary of using AI, because it can really just spew some absolute bullshit, which is in my head afterwards.

I've had a relatively better experience using Anthropic's Claude than most other products (for which I have a paid plan). Unfortunately they have very opaque usage caps, and I'd hit limits repeatedly during this project. Then it would say "please try again at 4pm" (in 3 hours). So I pretty much ran out of LLM usage on this one.

Overall I'd say I got to do some coding I usually wouldn't. The project was a curses frontend for a chat (and backend, but that didn't really get done yet). Something like making a curses interface would usually be a bit too boring for me--being able to collaborate with an LLM, who doesn't find such things boring, is great. Other than tooling issues, the main problem is that Claude doesn't write the best code. It generally has a very "junior programmer" vibe, with no use of abstraction, and tends toward the verbose.

My general take on AI though is that someone showed me a horse than can write an essay, and I'm complaining its penmanship is atrocious. It's pretty amazing stuff, and we're probably all going to be dead soon.

In the meantime it's pretty fun to mess about with.

PS: I do plan to update this one further, it just will require a bit of work each day given the rate limits. I had really grand plans, but we only got the bare minimum done.

Peace out!

Tagged , , , ,
leave comment

Repulsive Dots

Lately I’ve been messing about in Godot, a framework for making video games (similar to Unity).

I wanted to make a 3D game. In my game, you live in a geodesic dome, and can’t go outside, because mumble mumble mumble poisonous atmosphere?.

A geodesic dome, I learned, is related to the icosahedron, or d20 from RPGs.

A simple dome is the top half of the icosahedron. As they get more complex, you divide each triangle into more and more smaller triangles.

Icosahedron getting more and more detailed. Geodesic domes are the top half of each sphere.
Icosahedron getting more and more detailed. Geodesic domes are the top half of each sphere.

So to make a nice geodesic dome, we could find one (I failed), make one in Blender (too hard), or use some math to generate one in Godot. And to do that math, we need to know the list of 20 icosahedron faces. Which basically just needs the list of the 12 vertices!

Now, obviously you could look up the vertices, but I thought of a more fun way. Let’s put 12 points on a sphere, make them all repel each other (think magnetically, I guess), and see where on the sphere they slide to. Maybe they will all be spaced out evenly in the right places. Well, here’s what it looks like:

So… kinda? It was certainly entertaining.

By the way, the correct coordinates for the vertices of an icosahedron inside a unit sphere are:

  • the top at (0, 1, 0)
  • the bottom at (0, -1, 0)
  • 10 equally spaced points around a circle. they alternate going up and down below the center line.
    (±1/√5, sin(angle), cos(angle)) [projected onto the sphere]
Tagged , ,
leave comment

Hack-A-Day, Day 13: Blueprint Maker

Hack-A-Day is a challenge to try and finish 30 projects in 30 days in November.

Today I tried to write a tool to make a floorplan. You can try it here. As usual the source code is on github.

This was an ambitious project for one day, and I didn’t finish everything I wanted. My original goal was to support

  • drawing and erasing rectangles (done)
  • adding, editing, deleting, and moving text labels (not done)
  • adding, deleting, and moving icons (mostly not done)
  • autosave (done)
  • undo support (done)
  • zoom and pan (not done)
  • sharing finished projects (stretch goal, not done)

What I did do was pleasantly high-quality, and I made pretty good progress.

Tagged , ,
leave comment

Hack-A-Day: Hack-A-TV-Guide

It’s no longer november, but I’m still doing a project a day. It’s an all-month hack-a-thon!

Yesterday’s project was Hack-A-TV-Guide (demo, source). It’s a TV Guide generated from Wikipedia. I got the idea from having written isrickandmortyout.com. Why not do the same thing, but for every show?

I’m going to call this one a flop. There’s a good version of this project, but I ran out of time. Basically all it does is display info about a show, which is not very useful.

Tagged , , , ,
leave comment