News for hackers. Stuff that matters.

gurgeous

Show HN: Ansi.md – Everything I know about building modern CLI apps

https://ansi.md

Somewhere between a brain dump, custom toolset, think piece and hacker toy. This is pretty much everything I know about ansi color in the terminal and building cli apps. Includes my own fumbling attempt to finally name the ansi256 color palette.AI statement: I like my writing voice and I do not use LLMs to write.

( Read More... | no comments | on HN )
Thanks for adding this. Excited about array/regex, also very interested in your experience using LLMs to stretch your abilities. There are many of us laboring quietly on various projects attempting the same. "Vibe coding" (and the backlash) doesn't really capture how we work.

Show HN: AnsiColor, resilient ANSI color codes for your TUI

https://ansicolor.com

Hi HN. AnsiColor constructs resilient ANSI color codes for your TUI, cli app or prompt. Colors that will work regardless of the user's terminal theme.I built this after experiencing the hilarious illegibility of Codex CLI when running with Solarized Dark. If a zillion dollar company can't get it right, we need better tools.It comes with these themes: Andromeda Ayu Dark/Light Bearded...

( Read More... | no comments | 2 points | on HN )
Re:Seattle Ultrasonics: Ultrasonic Chef's Knife on Saturday September 20, 2025 @09:32PM (#45319237)
In Rand's video he does an "old" lime, mozzarella, and a shallot. It's just a quick vid he did in like five minutes but it shows some prep. Rand is a prolific amateur chef...

https://www.linkedin.com/feed/update/urn:li:activity:7374472...

Disclaimer: I've enjoyed many delicious meals at Rand's table

Re:Seattle Ultrasonics: Ultrasonic Chef's Knife on Saturday September 20, 2025 @08:35PM (#45318936)
I personally watched Scott spend years working on the project and obsessively iterating on the steel, the vibration pattern, the circuitry, the handle, and the form factor. Scott is a hacker, one of us for sure. I mean, the guy built a custom robot just to measure cutting efficiency...

The knife is amazing and exactly as shown in the video. Rand Fishkin has a nice short on LinkedIn trying out the knife too. I think he shows one his (sharp) kitchen knives slicing through a lemon, then the Ultrasonic. It's astounding.

Disclaimer: I am a (tiny) angel investor in Seattle Ultrasonics.

I have used this knife, I am an angel investor in Scott's company. The thing is legit amazing. He labored for years to bring this to market and it shows.
Re:Rv, a new kind of Ruby management tool on Tuesday August 26, 2025 @11:10PM (#45035053)
I am so excited about this!! Ruby tooling is already pretty good, but we can do better. I will try to contribute. Now we just need types
This is neat, thanks for posting. I am using memo_wise in my current project (TableTennis) in part because it allows memoization of module functions. This is a requirement for my library.

Anyway, I ended up with a hack like this, which works fine but didn't feel great.

   def some_method(arg)
     @_memo_wise[__method__].tap { _1.clear if _1.length > 100 }
     ...
   end
   memo_wise :some_method
This got some attention in r/ruby so I figured I'd post it here too..

TableTennis is a new gem for printing stylish tables in your terminal. We've used ad-hoc versions of this in our data projects for years, and I decided to bite the bullet and release it as a proper gem.

- auto-theme to pick light or dark based on your terminal background - auto-layout to fit your terminal window - auto-format floats and dates - auto-color numeric columns - titles, row numbers, zebra stripes...

By far the hardest part is detecting the terminal background color so we can pick light vs dark theme for the table. This requires putting the console into raw mode and sending some magic queries. These queries are widely supported but not universal. There are some great libraries for doing this in Go & Rust, but as far as I know nothing like it exists for Ruby. Check out the long comment at the bottom of this helper if you are curious:

https://github.com/gurgeous/table_tennis/blob/main/lib/table...

As always, feedback, feature requests and contributions are welcome.

Re:Implementing a Game Boy Emulator in Ruby on Friday February 07, 2025 @11:01PM (#42980262)
Love the play by play.
This is incredible! I will use this a ton. Only thing missing is a deb package...
Re:Just: Just a Command Runner on Saturday December 07, 2024 @06:41PM (#42353753)
Hi Jeff, thanks for creating mise! I am gearing up to migrate from asdf, very excited to check it out. Not totally sure we can adopt mise for tasks (we use just) but willing to give it a whirl. Putting run commands into toml sounds like it might be challenging, I wonder if there's syntactic sugar that would help.
Re:Just: Just a Command Runner on Saturday December 07, 2024 @03:31PM (#42352656)
Actually, it was package.json scripts that pushed me toward just! I wanted that stuff in non-node projects (python/ruby/~), I wanted more complicated scripts, I wanted more logging output, I wanted comments... For whatever reason every project seems to have 10-20 little commands (often interdependent) and just makes that a breeze.
Re:Just: Just a Command Runner on Saturday December 07, 2024 @03:01PM (#42352433)
Question - mise is also incorporating a command runner. Anyone tried it yet? We love just, of course. Always curious about new tools.
Re:Just: Just a Command Runner on Saturday December 07, 2024 @12:39PM (#42351310)
We love just and are using it in all projects now. So great. Our typical justfile has around ~20 rules. Here is an example rule (and helper) to illustrate how we use it in ci:

  export PATH := justfile_directory() + "/node_modules/.bin:" + env_var('PATH')

  ci:
    @just banner yarn install
    yarn install
    @just banner tsc
    tsc --noEmit
    @just banner lint
    eslint src
    prettier --check src
    @just banner vitest
    vitest --run
    @just banner done!
  
  banner *ARGS:
    @printf '\e[42;37;1m[%s] %-72s \e[m\n' "$(date +%H:%M:%S)" "{{ARGS}}"
This example is a bit contrived, more typically we would have a rule like "just lint" and you might call it from "just ci".

One of the best features is that just always runs from the project root directory. Little things like that add up after you've spent years wrestling with bash scripts.

Re:Scooter: interactive find and replace in the terminal on Friday November 15, 2024 @01:06PM (#42149337)
Also see the excellent https://github.com/your-tools/ruplacer.

For more advanced needs, I have a custom thing called greprep that let's you make changes using your favorite editor. Workflow is like this:

  1. $ rg -n .... > /tmp/lines.txt
  2. (edit lines.txt in vscode)
  3. $ greprep /tmp/lines.txt to apply the changes

Show HN: Everything you ever wanted to know about smoke detectors

https://fireball.xyz

I find smoke detectors pretty interesting, especially after debugging many false alarms in the middle of the night. There isn't much detail out there due to the ongoing enshittification of the internet. Maybe this will help? Feedback pls!Surprising quantity of tech used, definitely overkill. Vite/Vue/Tailwind/Daisyui hosted on Vercel behind Cloudflare. We used Markdown-it for the content with...

( Read More... | no comments | 2 points | on HN )
Re:The Unreasonable Effectiveness of Makefiles on Friday August 12, 2022 @04:26PM (#32443475)
Seconded - I love just & Justfile. Such an upgrade after trying to force things into package.json scripts. Chaining commands, optional CLI arguments, comments, simple variables, etc. Very simple and a breath of fresh air.
Re:We analyzed 425k favicons on Wednesday October 20, 2021 @03:32PM (#28935097)
Also, we turned up 2,000 domains that redirect to a very shady site called happyfamilymedstore[dot]com. Stuff like avanafill[dot]com, pfzviagra[dot]com, prednisoloneotc[dot]com. These domains made it into the Tranco 100k somehow.

Full list here - https://gist.github.com/gurgeous/bcb3e851087763efe4b2f4b992f...

Re:We analyzed 425k favicons on Wednesday October 20, 2021 @03:18PM (#28934926)
It's one icon per domain. Try hovering (on desktop) and you'll see that many domains have the same favicon.
Re:We analyzed 425k favicons on Wednesday October 20, 2021 @02:56PM (#28934623)
Also see the gigantic map - https://iconmap.io

The blog post is the analysis of the data set, the map is the visualization.

Re:We Analyzed 425,909 Favicons on Tuesday October 19, 2021 @02:05PM (#28921336)
try "ycombinator.com" :P
Re:We Analyzed 425,909 Favicons on Tuesday October 19, 2021 @01:38PM (#28921009)
The map is pretty neat. Also see the giant analysis for the dataset at https://iconmap.io/blog. Turns out that a lot of folks have messed up their favicons.

Disclosure: I am one of the authors

Hey, great start. I spend half my day in CSVs and I am definitely your target audience. Most of the time I use bat, visidata or tabview. In many ways tabview is the best, though recently the project has been abandoned.

tv looks excellent. Fun name. I think if you added a couple of features it would ascend to my toolbox:

(1) scrolling (horizontal and vertical)

(2) better command line parsing. Running "tv" without stdin or arguments should produce an error/help. Running "tv xyz.csv" should read that file.

Good luck!

Older »