HackerTrans
TopNewTrendsCommentsPastAskShowJobs

DougHaber

no profile record

Submissions

Show HN: Lair – CLI Tools for working with generative AI

github.com
2 points·by DougHaber·w zeszłym roku·0 comments

comments

DougHaber
·30 dni temu·discuss
I have two projects that I'm hoping to release in the months ahead. These are both pretty pointless but fun projects.

One is a TRS-80 Model I emulator in JavaScript called Trash80. About 10 months ago I started this project just for fun while experimenting with what now seems to be called agentic loops. I got things working pretty well with the Z80 passing the ZEXALL suite and a lot of real TRS-80 software running fine. It sat for months untouched before I decided it is worth releasing and recently started it up again.

I didn't want to release it without a ROM, so I rigged up some agents to build a clean-room style L2 ROM w/ a fairly complete BASIC and even readline-style control commands, history, and a proper cursor. That went very well, but the agents cheated on floating point and implemented some weird Q5.2 like-thing. I told them to fix it, but I guess I didn't give clear enough instructions because they replaced it with a BCD hybrid monstrosity instead of proper floating point. The proper floating point is now underway, but I'm mostly using excess Codex credits before they expire, so it's only moving forward when I have credits I don't need.

I also built a silly ASCII fractal browser in Z80 assembly so that I can ship with a virtual disk that has software on it. The emulator works in the browser and the terminal. Unicode sextant block graphics map very well to TRS-80 Model I semigraphiccs/squots, so it really does run everything very well in the terminal, even games. I also added a line-mode for line-based applications, so you can use a readline-like interface and feel like it's native terminal app as well, though that has some issues I need to fix. And of course, you can shebang TRS-80 BASIC files and run them through the emulator too.

Another project was a demo of chromesthesia, a form of synesthesia where sounds trigger experiences of color. I thought it was done and ready to release, but then I had a new idea. The visualization while cool, was kind of boring. I decided to replace it with an attempt at a semi-physically accurate cymatics simulation with artificial coloring based on chromesthesia. Cymatics is the practice of making sounds visible by vibrating a surface, such as a plate with sand on it. As the sound changes, symmetrically interesting patterns form and evolve. I've got something working now with wave generation and microphone input, but sometimes it gets a bit stuck and stops evolving as it should, so I have to find time to figure that out.

Currently all unreleased, but when they do release it will be at www.leshylabs.com. I sometimes post updates on X, but not too often. (https://x.com/LeshyLabs)
DougHaber
·12 miesięcy temu·discuss
Years ago, I made one of these at an hackathon style event for developing HTML5 gamedev tools. I didn't know much about audio programming at the time, so I read descriptions of what parameters were and then wrote code that I thought would work similarly. I got enough wrong where the end results sound a bit different than other tools, occasionally in a good way.

This predates the WebAudio API, and so it builds data URLs as WAVs instead. Every sound can be represented as a short string, and the tool can be used as a library that procedurally generates the sounds from the strings. It also has a "song mode" where notes can be provided to guide the sound, which makes certain types of more complicated sounds possible to make, including jingles and short songs.

It's definitely dated now, but if anyone is interested, you can find it here

https://www.leshylabs.com/apps/sfMaker/

See the "Example Sounds" at the bottom of the page to hear what it can do.
DougHaber
·w zeszłym roku·discuss
I did some experimenting with this a little while back and was disappointed in how poorly LLMs played games.

I made some AI tools (https://github.com/DougHaber/lair) and added in a tmux tool so that LLMs could interact with terminals. First, I tried Nethack. As expected, it's not good at understanding text "screenshots" and failed miserably.

https://x.com/LeshyLabs/status/1895842345376944454

After that I tried a bunch of the "bsdgames" text games.

Here is a video of it playing a few minutes of Colossal Cave Adventure:

https://www.youtube.com/watch?v=7BMxkWUON70

With this, it could play, but not very well. It gets confused a lot. I was using gpt-4o-mini. Smaller models I could run at home work much worse. It would be interesting to try one of the bigger state of the art models to see how much it helps.

To give it an easier one I also had it hunt the Wumpus:

https://x.com/LeshyLabs/status/1896443294005317701

I didn't try improving this much, so there might be some low hanging fruit even in providing better instructions and tuning what is sent to the LLM. For these, I was hoping I could just hand it a terminal with a game in it and have it play decently. We'll probably get there, but so far it's not that simple.