Readit News logoReadit News
statico commented on Show HN: Forget bash, write your shell scripts in plain English   github.com/statico/llmscr... · Posted by u/statico
statico · 5 months ago
Hey folks, a few days ago I wondered: Given all this LLM availability, why can’t I write shell scripts like this?

  #!/usr/bin/env llmscript
  
  Count all files in the current directory and its subdirectories
  Group them by file extension
  Print a summary showing the count for each extension
  Sort the results by count in descending order
So I made it a reality in an evening an it kinda works: https://github.com/statico/llmscript

It generates a script and a test suite, and then it attempts to fix the script until it passes the tests.

It’s written in Go, but I hardly know Go, and used Cursor to generate most of it in a few hours. It works with Ollama and Claude, and I added support for OpenAI but haven’t tested it. You can also run it in Docker if you want to sandbox it.

statico commented on Show HN: Imposter Attack – Among Us-themed infrared game made with ESP32   blog.langworth.com/impost... · Posted by u/statico
bschwindHN · 9 months ago
Nice work! I got into electronics with infrared remote decoding and ESP chips, so this was a bit nostalgic and fun to read :)

Making a PCB is the next step, and it's quite easy to get started with KiCAD, especially if you're just mounting header sockets to pop in the various boards you're using. Good luck!

statico · 9 months ago
Thanks! That's what I'm hoping. I'm already going down the YouTube hole of KiCAD...
statico commented on Show HN: Imposter Attack – Among Us-themed infrared game made with ESP32   blog.langworth.com/impost... · Posted by u/statico
jackschultz · 9 months ago
Great timing. I've been wanting to learn how to do projects like this, but been so unsure what types of microcontroller I should get and what else could be needed. Similar in the software world where we all have our preferred tech stacks, I was so uncertain of what stack to use for these projects that it definitely causes a hurdle.

His mention of the ESP32 and how

>While working on the game I used my newfound ESP32 skills to do some other projects, such as automating the remote-controlled blinds in our bedroom as well as a motion sensor that would send Pushover notifications to my phone.

is absolutely what I'm wanting to be able to do. Learn the tech needed for one controller that can be used on tons of different places. That, plus that talk with MicroPython (and other parts) gives some confidence about learning this hardware stack.

statico · 9 months ago
I'd say you're on the right track, then! It's kind of like software — figure out how the components talk to each other and figure out where to hook in. Instead of APIs, you've got multimeters and oscilloscopes.

In the case of the blind automation, the remote uses some kind of proprietary wireless signal. Instead of figuring that out, I soldered some leads into the remote's momentary button terminals, which I connected to transistors on a breadboard. The ESP32 simply pretends to press a button and complete a connection on the remote.

Also check out ESPHome (https://esphome.io), a firmware for ESP32 that lets you more easily integrate with home automation systems.

statico commented on Show HN: Imposter Attack – Among Us-themed infrared game made with ESP32   blog.langworth.com/impost... · Posted by u/statico
dang · 9 months ago
We put Show HN in the title (the convention for sharing your own work on HN, which this certainly is! - https://news.ycombinator.com/showhn.html). But putting that in pushed MicroPython out the end of the buffer (which is fixed to 80 chars).

If MicroPython is more interesting than ESP32, we can swap them...

(Submitted title was "Imposter Attack – Among Us-themed infrared game made with ESP32 and MicroPython")

statico · 9 months ago
Thanks, dang. It's been a while and I forgot the rules.
statico commented on Show HN: Imposter Attack – Among Us-themed infrared game made with ESP32   blog.langworth.com/impost... · Posted by u/statico
ryanisnan · 9 months ago
This is awesome! I may try to get this working locally with my 6 year old son!
statico · 9 months ago
Shoot me a message if you need any help!
statico commented on Show HN: Imposter Attack – Among Us-themed infrared game made with ESP32   blog.langworth.com/impost... · Posted by u/statico
starkparker · 9 months ago
> I might try a different theme than Among Us

This might've been thrown out for being too obvious, but did you consider Ghostbusters? Swap the magic wand for a proton pack wand and it seems to fit almost too well.

statico · 9 months ago
Wow, I never considered a Ghostbusters theme. I'll keep that in mind for next year.
statico commented on Show HN: Imposter Attack – Among Us-themed infrared game made with ESP32   blog.langworth.com/impost... · Posted by u/statico
duxup · 9 months ago
This might be one of the coolest maker projects I've seen. Congratulations!
statico · 9 months ago
Thanks!
statico commented on Show HN: Imposter Attack – Among Us-themed infrared game made with ESP32   blog.langworth.com/impost... · Posted by u/statico
t_mann · 9 months ago
> I was told that I had the second biggest crowd, second only to a Pokémon bean bag game (which did look pretty cool). Some adults were curious, but most importantly, a handful of questions from kids who wanted to know how I built it. It was especially rewarding to show one off one of the extra targets I brought. One kid even recognized the ESP32 chips and said, “Oh, these are the ones you can make drones out of!”

That paragraph really stood out to me. Apparently, where OP lives, people casually make stuff even cooler than a laser shooting game for a one-off school event, and elementary-school-age kids recognize specific types of microcontrollers.

statico · 9 months ago
Part of me wants to say, "Well, that's Silicon Valley for you," but I'm confident there are many other places you could say something similar about.

Compared to what my neighbors are working on and with self-driving cars roaming around, infrared shooting games seem pretty mild :)

statico commented on Show HN: Imposter Attack – Among Us-themed infrared game made with ESP32   blog.langworth.com/impost... · Posted by u/statico
statico · 9 months ago
This took a few evenings to make :)

Full source code is on GitHub: https://github.com/statico/imposter-attack-2024

u/statico

KarmaCake day1911January 24, 2012
About
Ian Langworth

Home page and text adventure game: https://langworth.com/

GitHub: https://github.com/statico

Blog: https://statico.link/blog

LinkedIn: https://statico.link/linkedin

Bookmarks: https://statico.link

Email: ian@langworth.com

Pronouns: he/him

View Original