HNHacker News
TopNewBestAskShowJobs

gurgeous

2,133 karma · joined June 13, 2008

Hacker - many startups
submissionscomments
gurgeous··on Redis array: short story of a long development process
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.
gurgeous··on Ultrasonic Chef's Knife
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

gurgeous··on Ultrasonic Chef's Knife
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.

gurgeous··on First Ultrasonic Chef's Knife Vibrates 40,000X/Second for Easy Cutting
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.
gurgeous··on Rv, a new kind of Ruby management tool
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
gurgeous··on Show HN: I built a Ruby gem that handles memoization with a ttl
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
gurgeous··on Show HN: TableTennis, a new rubygem for printing stylish tables in your terminal
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.

gurgeous··on Implementing a Game Boy emulator in Ruby
Love the play by play.
gurgeous··on Show HN: Interactive systemd – a better way to work with systemd units
This is incredible! I will use this a ton. Only thing missing is a deb package...
gurgeous··on Just: Just a Command Runner
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.
gurgeous··on Just: Just a Command Runner
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.
gurgeous··on Just: Just a Command Runner
Question - mise is also incorporating a command runner. Anyone tried it yet? We love just, of course. Always curious about new tools.
gurgeous··on Just: Just a Command Runner
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.

gurgeous··on Show HN: Scooter – Interactive find and replace in the terminal
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
gurgeous··on The Unreasonable Effectiveness of Makefiles
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.
gurgeous··on We analyzed 425k favicons
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...

gurgeous··on We analyzed 425k favicons
It's one icon per domain. Try hovering (on desktop) and you'll see that many domains have the same favicon.
gurgeous··on We analyzed 425k favicons
Also see the gigantic map - https://iconmap.io

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

gurgeous··on We Analyzed 425,909 Favicons
try "ycombinator.com" :P
gurgeous··on We Analyzed 425,909 Favicons
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

gurgeous··on Show HN: Tidy Viewer – a cross-platform CSV pretty printer for viewer enjoyment
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!

gurgeous··on Ask HN: What problem are you close to solving and how can we help?
I have worked on this problem many times, at many companies. I am working on it again, actually. Usually some combination of scoring and persisting results in CSVs for human review.

(edit: I am at a desktop now and I can say a bit more)

Here is the process in a nutshell:

1. Create a fast hashing algorithm to find rows that might be dups. It needs to be fast because you have lots of rows. This is where SimHash, MinHash, etc. come into play. I've had good luck using simhash(name) and persisting it. Unfortunately you need to measure the hamming distance between simhashes to calculate a similarity score. This can be slow depending on your approach.

2. Create a slower scoring algorithm that measures the similarity between two rows. Think about a weighted average of diffs, where you pick the weights based on your intuition about the fields. In your case you have handy discrete fields, so this won't be too hard. The hardest field is name. Start with something simple and improve it over time. Blank fields can be scored as 0.5, meaning "unknown". Hashing photos can help here too.

3. Use (1) to find things that might be dups, then score them with (2). Dump your potential dups to a CSV for human review. As another poster indicated, I've found human review to be essential. It's easy for a human to see that "Super Mario 2" and "Super Mario 3" are very different.

4. Parse your CSV to resolve the dups as you see fit.

Have fun!

gurgeous··on Launch HN: Text Blaze (YC W21) Programmable snippets to automate tedious typing
Looks great! Can you fill out web forms? We would use this for creating fake accounts in our test environment, for example.
gurgeous··on Ask HN: IDs that are URL-friendly and fairly short?
Depends how much randomness you need. I usually just use a rand alpha of length 6-8. You can also use dictionary words (see gfycat).

Sample Ruby code:

  8.times.map { (('a'..'z').to_a + (0..9).to_a).sample }.join
It's less collision resistant than UUID, of course.
gurgeous··on Covid-19 Is Killing Small Businesses in Seattle
This is so sad. From the survey we ran - Closure is looming for 35% of small businesses in Seattle. More in TFA
gurgeous··on Imgix Status – Elevated Rendering Errors
This is the third outage this month for imgix. What's going on over there? Can anyone recommend an alternative?
gurgeous··on 150k Website Teardown Part Three: WordPress
A high percentage, I would guess.
gurgeous··on 150k Website Teardown Part Three: WordPress
I am the author - happy to answer questions here.
gurgeous··on 150k SMB Website Teardown Part Two: Website Builders, Speed and Google Rank
Mostly it comes down to the number of requests and the amount of soul sucking tracking/javascript that runs before the page renders fully. Wix is a particularly bad actor here.
gurgeous··on 150k SMB Website Teardown Part Two: Website Builders, Speed and Google Rank
Part one was quite popular on HN. This chapter focuses on website builders that are used heavily by small businesses - Squarespace, Wix, Weebly, GoDaddy, etc. How fast are they? Which websites tend to rank well on Google? Also found a great Google bug. I'll be checking this thread to answer questions, naturally.
Page 1 of 4Next →