HNHacker News
TopNewBestAskShowJobs

kbd

3,459 karma · joined October 26, 2010

https://github.com/kbd
submissionscomments
kbd··on Ask HN: How common is developer burnout? Have you ever been burnt out?
Yes. Multiple times. Senior software engineer. Still recovering from last burnout after being laid off last year. I tend to get a job, work there for a number of years, then we either get acquired or I get laid off and I take a year or two off to recuperate in between...

I've started seriously starting coding again though so there is light at the end of the tunnel. It sucks to not do what you enjoy doing because you're burnt out from doing it for pay for the man.

kbd··on Multi – Multiplayer Collaboration for macOS
Seems similar to https://www.coscreen.co/
kbd··on Discord is laying off 17 percent of employees
More government is not the solution to all problems.
kbd··on Apple pulls plug on Goldman credit-card partnership
Agree it became my primary card when I recently spent three months in London because of that and the ubiquity of Apple Pay.
kbd··on M3 Macs: there's more to performance than counting cores
Tiny? My M2 Air has 24g, which is more ram than any other laptop video card I've had.
kbd··on Why Fennel?
I moved my Hammerspoon config to Fennel and haven't looked back either. The code becomes much more concise vs Lua.

https://github.com/kbd/setup/blob/master/HOME/.hammerspoon/i...

kbd··on Exa Is Deprecated
Thanks for your comment. I have broot installed, but it never sticks in my workflow. I didn't know you could use it as a tree replacement like that, adding file stats & exiting.

It almost works to replace the way I use exa tree, with these caveats:

- I want to not have it elide files ("7 unlisted") at each level. I have my et1, et2, etc. aliases to customize how many levels of detail I get with exa's tree replacement, and then I scroll that with my pager.

- I want it to support LS_COLORS so the files look the same as they do in `ls`

- I want the git status display that exa gives (eg. it shows I if the file is ignored).

- is it possible to customize the order in which the stats are shown? It'd be nice if they match ls more closely. Exa feels like `ls` with extra colors and a tree, broot feels different.

kbd··on Exa Is Deprecated
I never used exa as a general `ls` replacement, but I did use it as a `tree` replacement. Its tree view that gives you file stats from ls alongside a `tree`-like view I haven't found replicated in any other tool.

Here are the aliases I use:

    et() { exa -alT --git -I'.git|node_modules|.mypy_cache|.pytest_cache|.venv' --color=always "$@" | less -R; }
    alias et1='et -L1'
    alias et2='et -L2'
    alias et3='et -L3'
exa never handled git ignores correctly so I had to manually provide common ignores with -I. But the above alias provides a scrollable tree view, with files colorized according to LS_COLORS, with file stats like `ls -l`, that I haven't found provided by any other tool. Suggestions for replacements welcome.
kbd··on ToDesktop – Web app to desktop app in minutes
> Orion Browser works pretty well for SSBs.

Wow! I've been a fan of Orion for a while and I didn't know it did that. Lo and behold, "Tools -> Install This Site as an App". Thank you for the pointer!

kbd··on ToDesktop – Web app to desktop app in minutes
It's been frustrating that for years Mac has had no native way to create a site-specific browser. Chrome can do it for you on Windows. On Mac there is stuff like Fluid, but for reasons I don't remember every time I try it I wind up being frustrated. Finally the Mac is getting a built-in way to create a SSB in Sonoma.
kbd··on Qalculate – A multi-purpose cross-platform desktop calculator

    $ qalc 10W*(8h/day)*1year to kWh
    zsh: bad pattern: 10W*(8h/day)*1year
    $:1 noglob qalc 10W*(8h/day)*1year to kWh
    (10 watts) × (8 hours/day) × (1 year) = 29.22 kW·h
Amazing. I use qalc frequently and you just improved my life, thank you!
kbd··on Qalculate – A multi-purpose cross-platform desktop calculator
> $ qalc 10W(8h/day)1year to kWh

Question: why didn't you need quotes around the first expression? Both Zsh and Bash error on that command without quotes. Are you using nushell?

kbd··on What hallucinogens will make you see
> We’ve recently completed a trial involving hour long sessions in extended DMT state

That's fascinating, since that's not something someone could do on their own. One of my biggest questions is whether the "DMT world" really connects you with another part of reality, or whether it's just "what the brain does" when exposed to the chemical.

Have there been any controlled experiments on whether we can pass messages via the DMT elves? That would persuade me that the entities could be real.

kbd··on Fakespot Is Acquired by Mozilla
I wonder how things would be different if Microsoft never gave them that life-line when they needed it.
kbd··on Red Canary Mac Monitor
Activity Monitor is the closest built-in: https://support.apple.com/guide/activity-monitor/welcome/mac
kbd··on Show HN: Frogmouth – A Markdown browser for the terminal
Had this discussion recently with someone advocating IDE debuggers over CLI debuggers. I'm like, don't you realize that the CLI debugger is used underneath inside your IDE? And by using it from the CLI you get an entire HISTORY of your debug sessions you can refer to.
kbd··on Using io_uring for network I/O
I learned about io_uring from King Protty in his super informative presentation: https://youtu.be/Ul8OO4vQMTw
kbd··on FerretDB: open-source MongoDB alternative
Ok, old man yelling at clouds moment finally coming for me. Now that we've been through the document-database heyday and are out the other end, what have we learned about where document databases are a good fit?

At the time I looked at them like a fad. "These script kiddies want to write javascript and ignore schemas. Let's see how well that works out for them." As expected, most of what I ever hear is regret.

Today, MongoDB has grown out of the reliability issues it had in the past, and Postgres has json features for the occasional times it's useful to store some loosely structured data along with otherwise relational data. Question is, what applications is a document-first database good for, outside of prototyping?

Edit: and to make sure I understand, FerretDB is a layer reimplementing MongoDB on top of Postgres and its json features?

kbd··on So you've installed `fzf` – now what?
Agree I use fzf extensively in my git aliases:

https://github.com/kbd/setup/blob/master/HOME/.config/git/co...

Perfect example: my "cherry pick" alias:

    cp = !git pick-branch | xargs git pick-commits | tac | xargs -t git cherry-pick
Those "pick-" aliases pop up fzf to let me choose a branch, then commits to cherry pick. No more copying hashes anywhere.

Similarly, my alias for git add lets me fzf-select a list of files to stage based on what "git status" reports.

kbd··on So you've installed `fzf` – now what?
To show off the power of fzf, I should share my fzr ("fzf repl") script:

https://github.com/kbd/setup/blob/master/HOME/bin/fzr

Basically, prefix any jq command (or rg, or anything you can think of) with fzr and it'll give you an interactive interpreter for your query. People have written a number of dedicated jq interactive repls, but not much is needed beyond fzf.

kbd··on Bog – small, strongly typed, embeddable language
Embed the whole .NET runtime? Huh?
kbd··on CamelCase vs. underscores revisited (2013)
Came here to say this. Underscore/dash is on the home row in Dvorak, making snake_case/kebab-case way more natural to type.

Cool trick about mapping shift keys with Karabiner-Elements. I do that with my caps lock to create a "hyper" key: tapping it brings up Alfred, using it in a chord is "hyper", and long pressing caps lock maintains its default behavior.

kbd··on Show HN: Unblob – extraction suite for 30+ file formats
For years and years I've used `dtrx` ("do the right extraction") (https://github.com/dtrx-py/dtrx/). Maybe I should switch to unblob?

It looks like unblob has the right behavior by default that I have to alias for `dtrx`:

    alias dtrx='dtrx --one=inside'
But I'll probably want to create an alias for unblob to change default depth to 1.
kbd··on Show HN: Ov – feature rich terminal pager
Yeah I experimented with it, seemed to work out of the box. I used `ov -f` so it starts at the end of the scrollback. Searching behaves strangely (different from vim). Seems to run fast but I haven't tried it on giant scrollbacks yet.
kbd··on Function keys productivity trick
I use Karabiner-Elements and Hammerspoon to map caps lock to a "hyper" key, so browser is hyper+b, text editor is hyper+t, terminal is hyper+s, notes/tasks (Obsidian) is hyper+k, etc.
kbd··on Show HN: Ov – feature rich terminal pager
Anyone tried using this for a scrollback pager for kitty terminal? I have a convoluted nvim incantation right now I’d love to replace.
kbd··on Show HN: Obsidian Canvas – An infinite space for your ideas
Hey, cool, thanks for pointing out they're working on task management. I currently use the Tasks plugin and it works ok, but it took some fiddling with queries to get the right display, it's a little flaky (doesn't update results all the time), and there's no concept of subtasks. I still haven't found my perfect task management system... really interested to see how Obsidian folks tackle this as a core plugin.
kbd··on Sapling: A new source control system with Git-compatible client
I'm glad you mentioned Jujutsu. Given that it's also a git-compatible SCM my first thought upon seeing this post was how Sapling and Jujutsu compare.
kbd··on Zig Is Self-Hosted Now, What's Next?
Thanks for confirming. So what does Zig actually do to execute async functions? Green threads in the background? An event loop? Is there documentation on the implementation?
kbd··on Zig Is Self-Hosted Now, What's Next?
> Saying that Zig does not have function colors because it hides them at compile time is a little disingenuous, in my opinion.

Not to impugn your character, but I feel the same way about the points you're making.

> So you admit that Zig does have function colors?

Not in any meaningful way, no. Again, the runtime representation of async vs sync functions is unavoidably different, and has nothing to do with the language. The fact that Zig lets you write one function definition that can be called in sync vs async contexts (unless you're specifically choosing to do sync vs async things) is what it means to be colorless!

> Also, according to the actual Zig documentation, which I quote in my post, there is only one version of every function; if a function is used in an async context, even if it is sync otherwise, the compiler makes the function async and continues on its merry way, so there is only one runtime representation of a function.

I dunno if that's accurate? Someone with more knowledge of Zig internals would have to confirm, but I assume if the same codebase uses a function in each context it'll be monomorphized into the specific version needed, same as generics. I don't think that's contradicted by what you quoted.

← PreviousPage 2 of 28Next →