HackerTrans
TopNewTrendsCommentsPastAskShowJobs

gurgeous

no profile record

Submissions

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

ansicolor.com
4 points·by gurgeous·قبل 5 أشهر·0 comments

Show HN: TableTennis, a new rubygem for printing stylish tables in your terminal

github.com
5 points·by gurgeous·السنة الماضية·1 comments

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

fireball.xyz
4 points·by gurgeous·قبل سنتين·0 comments

comments

gurgeous
·قبل شهرين·discuss
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
·قبل 10 أشهر·discuss
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
·قبل 10 أشهر·discuss
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
·قبل 10 أشهر·discuss
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
·قبل 11 شهرًا·discuss
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
·السنة الماضية·discuss
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
·السنة الماضية·discuss
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
·السنة الماضية·discuss
Love the play by play.
gurgeous
·السنة الماضية·discuss
This is incredible! I will use this a ton. Only thing missing is a deb package...
gurgeous
·قبل سنتين·discuss
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
·قبل سنتين·discuss
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
·قبل سنتين·discuss
Question - mise is also incorporating a command runner. Anyone tried it yet? We love just, of course. Always curious about new tools.
gurgeous
·قبل سنتين·discuss
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
·قبل سنتين·discuss
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