HNHacker News
TopNewBestAskShowJobs

b5n

382 karma · joined September 23, 2019

submissionscomments
b5n··on Oils 0.17.0 – YSH Is Becoming Real
> Also when you do that you get all the benefits of using your riced-out, LSP-enabled editor

https://github.com/bash-lsp/bash-language-server

https://github.com/koalaman/shellcheck

https://github.com/idank/explainshell

b5n··on Intel x86 documentation has more pages than the 6502 has transistors (2013)
There are parts that should be read, but when you only need a reference a good lookup tool is invaluable:

https://github.com/skeeto/x86-lookup

b5n··on Bored? How about trying a Linux speedrun? (2020)
For physical machines I maintain a debian preseed that runs an ansible playbook post install. Install + setup is fully unattended and generally takes about 15 minutes.

https://wiki.debian.org/DebianInstaller/Preseed

Quite different than bootstrapping a system as described in the OP, but relevant in the context of your comment.

b5n··on How VSCode made bracket pair colorization faster (2021)
It's always entertaining to me to see 'new'(ish) IDE features being lauded that have already been available in emacs for years, if not decades.
b5n··on Reddit’s blackout protest is set to continue indefinitely
It's a bit confusing because it doesn't notify you that a verification email has been sent when you sign up. If you've already checked your email maybe try the spam folder.
b5n··on Removing support for forwarded ports
All depends on who it is that is deciding what is questionable and what is not.
b5n··on Downtown San Francisco Whole Foods Closing a Year After Opening
San Fran is just reverting back to San Fran pre tech bro era, and the gentrimmigrants are baffled.

It's interesting to see so much 'the city is changing' type messaging when this is just how San Fran has always been.

Thanks for your stay, we hope you had a good time. Try not to get stabbed or shot on your way out.

b5n··on C Strings and my slow descent to madness
String literals in C are simply a pointer to an array of bytes (generally speaking), and that's how they should be treated. Considering them as strings in the HLL sense is the entire issue here.
b5n··on Show HN: Regex.ai – AI-powered regular expression generator
Once you know regex well enough to replace regex you realize that regex is pretty well developed.

There are certainly cases where different parsing methods/grammars are a better fit, but regex shines in many places.

b5n··on Introducing ChatGPT and Whisper APIs
The future is now:

    gptask() {
    data=$(jq -n \
              --arg message "$1" \
              '{model: "gpt-3.5-turbo",
                max_tokens: 4000,
                messages: [{role: "user", content: $message}]}')

    response=$(curl -s https://api.openai.com/v1/chat/completions \
                    -H "Content-Type: application/json" \
                    -H "Authorization: Bearer $OAIKEY" \
                    -d "$data")

    message=$(echo "$response" \
                  | jq '.choices[].message.content' \
                  | sed 's/^\"\\n\\n//;s/\"$//')

    echo -e "$message"
    }

    export OAIKEY=<YOUR_KEY>
    gptask "what is the url for hackernews"
b5n··on Sociopathy as a Lifestyle Brand
Awareness helps create consumer demand. Without a market or significant cost savings (which is incredibly difficult given existing investment and infrastructure) there are no incentives for corporations to do better, the bottom line is all that matters.

'Influencers' will always exist in some form, and I prefer Gretas to the likes of Tates, Trumps, etc.

I find it interesting that her name inspired such a passionate response from you.

b5n··on Natural language is the lazy user interface
I'm not sure how much time you spent on SO, but this only took me a couple of minutes of digging and I don't work with node.

    git clone https://github.com/nodejs/node.git
    grep -E -A 1 -R "Add(Option|Alias)" node/src/node_options.cc
There may be options I've missed because I haven't dedicated more than a couple minutes to it, but I think this demonstrates a straightforward approach to diving a little deeper when necessary and should be easy to adjust/build upon depending on your case. Your gripe regarding documentation is legitimate, but if you're an engineer responsible for deployments who needs to go past typical usage consulting the source should be in your bag of tricks. Having a deeper understanding of the tools you use and rely on isn't going to hurt you or your career.

https://www.gnu.org/software/gawk/manual/html_node/Undocumen...

b5n··on Git-sim: Visually simulate Git operations in your own repos
If your fs already supports snapshots/versioning it might be convenient, but it doesn't solve the actual hard part which generally comes after changes have been merged upstream.

If we're only concerned with local changes I'd rather introduce beginners to `reset`, experts will already be doing something similar dependent on circumstance.

    git reset --hard

    git tag BEFORE
    git reset --hard BEFORE

    git reset --hard ORIG_HEAD

    git reflog
    git reset --hard HEAD@{<N>}
b5n··on Awk equivalents to SQL query data manipulation
FPAT will get you pretty far, for instances where FPAT doesn't quite cut it gawk-csv is included in gawkextlib.
b5n··on Awk: Power and Promise of a 40 yr old language (2021)
You can get pretty far with FPAT, and as mentioned elsewhere, gawkextlib is available when FPAT doesn't quite cut it.
b5n··on Wyoming senators want to phase out sales of EVs
There are plenty of valid criticisms of CA, but you're clearly suffering from an advanced case of Murdoch brain worms. Please show us on the doll where CA touched you ;)
b5n··on Summary: “No: The Only Negotiating System You Need for Work and Home” – Jim Camp
> 21. Talking is often an overt showing of need. Therefore this rule: No talking.

I'd argue that silence is even more powerful than 'no'. Learning to wield it properly has served me incredibly well.

b5n··on An M1 for Curl
Ahh yes, Daniel Stenberg, best known for 'ragebait'.

You're welcome to confirm your assertion at anytime thanks to Daniel and nearly 1k others generosity. Feel free to let us know what you find.

https://github.com/curl/curl

b5n··on Endless Horse
http://endless.horse/legs.html
b5n··on Moving the Ctrl Key
I have a fairly extensive emacs config, and for the most part I am still using the default keybinds. I find the readline bindings to be ergonomic and easy to use.

Assuming average case, most of the complaints in this thread can be solved by using the side of the palm (top of fifth metacarpal) to engage C. Requires no remaps, doesn't take long to get used to, is totally comfortable, and leaves you on the home row.

b5n··on Moving the Ctrl Key
> The only way to hit the ctrl key ergonomically

I just just use the side of my palm (top of fifth metacarpal) to engage C.

Super comfortable, low effort, no leaving the home row.

b5n··on Advent of Code 2022 is nigh
Elixir ended up being a great choice last year. I contemplated using ocaml, sbcl, or guile this go round but ultimately decided to see how far I can get with awk. I'm feeling confident I can get by with awk using getline as needed, we'll see how long I endure...

Best of luck to everyone!

b5n··on Snap Store administrators removed signal-desktop from Ubuntu Snap
> you might prefer to go downstream from Ubuntu to get newer features sooner.

  sudo apt update
  sudo apt upgrade
  sudo sed -i 's/bullseye/sid/g' /etc/apt/sources.list
  sudo apt dist-upgrade
b5n··on Show HN: Restfox – Open source lightweight alternative to Postman
Although I mainly stick with curl or requests due to muscle memory, there's also restclient.el https://github.com/pashky/restclient.el. I imagine having builtin org support is super convenient, thanks for sharing.
b5n··on Why study functional programming? (2012)
> Sometimes I just agree with people so they can stop talking.

- Jet Li

b5n··on ExifLooter – finds geolocation info on all URLs and directories
What is the difference between `exiftool --image image.jpeg --remove` and `exiftool -all= image.jpeg`? It sounds like there is a benefit in adding the `--remove` flag but it's not clear to me what it is. Thanks!
b5n··on ExifLooter – finds geolocation info on all URLs and directories
How does this differ from `exiftool -all= image.jpeg`? Would it actually _remove_ the data rather than overwriting it? The difference isn't apparent to me from the parent comment or skimming the exifcleaner site/readme.
b5n··on Ask HN: Is there other software similar to Vim and Emacs?
> Emacs are only for text, obviously.

I don't know if I missed something in your post, but this couldn't be further from the truth. It's cliche to refer to emacs as it's own OS, and it is not uncommon for users to do all of their computing inside of emacs - web browsing, email, note taking, documentation, writing, version control, terminal, ide, window manager, remote admin, etc. Based on your criteria emacs seems like a perfect fit, I encourage you take take a deeper look at emacs if you're interested.

https://github.com/emacs-tw/awesome-emacs

b5n··on Where is there more livestock than people?
'freely' is being a bit generous, they're all destined for the slaughterhouse or glue factory. Dairy cows are routinely bred to keep them producing milk and their calves taken away for other purposes such as veal.
b5n··on Transporting food generates whopping amounts of carbon dioxide
With such a dismissive attitude towards the first item on 'the list' it's hard to believe there would be any benefit to engaging you further on the subject.
← PreviousPage 3 of 6Next →