HNHacker News
TopNewBestAskShowJobs

mbwgh

385 karma · joined May 24, 2021

submissionscomments
mbwgh··on Stack Overflow is laying off another 28%
I find they are linked frequently on GitHub pages for projects. If not as part of the README, then somewhere on the right-hand side.

There are also dedicated Discord search engines like disbord.org.

mbwgh··on Interactive GCC (igcc) is a read-eval-print loop (REPL) for C/C++
Interesting to see that I had a C++ REPL on my system, installed with clang by default, all along.

From the documentation, it seems this is primarily aimed at incremental compilation on demand via Compiler As A Service.

Indeed, for an end-user, calling this a REPL seems to be a stretch. There's no auto-completion or special commands like showing docs or the checking the type of things, you even have to #include <iostream> to manually print the results of simple expressions.

So I guess read-eval-loop would be more fitting :)

mbwgh··on Rethinking the Luddites
Reading through these comments (and not being from the US), I think I'll play it safe and just never use this "luddite" term, ever.
mbwgh··on Sidenotes in Web Design
Since the article mentions the sidenotes package for LaTeX, I would like to mention the sidenotesplus and snotez packages as well.

Both aim to improve over some perceived shortcomings of the original sidenotes package. The snotez-package is probably easier to use, while sidenotesplus has more batteries included.

mbwgh··on Unlimited Kagi searches for $10 per month
This resonates with me. Whenever I use a windows machine, it really doesn't feel like I am in control and treated as a adult. Adding to the list, click-baity AI-aggregated sex&crime news delivered to you by default. It offends me.

While your list of changes is impressive, I noticed it took you years. So maybe you're a little like me: I find change hard, a cognitive burden that needs a good-enough reason above a certain pain threshold.

I was lucky enough to have been forced to work with Linux in Uni, and when I first set it up myself (trying out two or three distros because I actually managed to bork the first installation somehow), it was in an environment that embraced discovery and I wasn't on my own. Now at work, it's an uphill battle you don't use Windows. Confidence is a must.

mbwgh··on Ask HN: 6 months later. How is Bard doing?
I use Kagi's FastGPT (which is really Anthropic Claude I think) for queries I have only a fuzzy idea of how I should put it into words.

It's not very verbose and gives you a search summary, consisting of something like four paragraphs, each with a citation at the end.

As others have stated, asking it yes/no questions is not really a use case though.

mbwgh··on The Tyranny of the Marginal User
I think you may both be right. Assume you start off with a small niche product and keep increasing your userbase.

Then the characteristics of the users at the fringes will change the more you grow. That is to say, the former Marls in the middle are different (and likely not so shallow) from the next-generation Marls on the outside. Eventually, your notion of what is the average user, and OP's notion of what is the Marl that finally kills the UX, will align.

mbwgh··on Kagi Small Web
Kagi is the ten bucks per month that just keep giving.
mbwgh··on The low, low cost of committing cybercrime
I am probably going to get flak for this, but this "scam flow" including a forged Microsoft login, is pretty much the problem I had when I first encountered OAuth and the "Login with XY" concept.

Aside from the fact that I can't keep the way the auth flow works in my head for longer than 2 days before my understanding of it becomes fuzzy again, a layman is not supposed to understand what's going on at all. Because if they were, they would ask "does this service get my XY password if I enter it here?" and unfortunately, trying to get this answer will lead them down a rabbit hole of auth flows, OAuth2 vs. OpenIDConnect and whatnot, because it's only ever documented for implementers.

The normal user is to just believe in its trustworthiness, which may on a technical level be warranted or not, that's not the point. If you keep logging in with XY to different services, you become conditioned to not question anymore whether it's correct to enter your password right now, and where the login form, which always looks the same across different services, comes from.

But oh well, I don't know what the solution should be here, maybe mandatory 2FA yet again, or passkeys. The market will decide.

mbwgh··on The end of cool small cars
I didn't know about this, looks pretty neat.

Unfortunately, 90 km/h top speed is a hard sell here in Germany, since that means that you will get in other people's way when driving on federal roads or the Autobahn, provoking people into dangerous overtaking manoeuvres.

In addition to cars having become noticeably larger in the last years, people's driving styles has (imo) become more aggressive also.

mbwgh··on CLI text processing with GNU awk
Thanks for sharing this, it is pleasantly obvious you put a lot of work into this. I especially like the TUI application!

Will the web version of this book remain free even after August 31st?

mbwgh··on Mastercard ends Binance card partnership in latest blow to crypto giant
This is subjective, but my impression was rather the tide shifted when ChatGPT came out.

Case in point: https://news.ycombinator.com/item?id=37290356 As I am writing this, three comments. One by the author, the other two about ChatGPT.

mbwgh··on Awk programming language 2nd edition
Nope :) Still not available.
mbwgh··on The Age of the Clever Fool
Seems multiple users have problems using desktop FF on Linux, but I can't confirm that. I use uBlock Origin (advanced mode), privacy badger (which might be redundant to some extent, but eh...), decentraleyes.

It works with these, but also if I turn these off, open the site with a clean FF profile, or if I install an unconfigured uBlock Origin (which maybe is more easily detected).

mbwgh··on How should I read type system notation?
The notation goes back to Frege. It's not easy to google if you don't know what you're looking for, but this seems like a reasonable summary: https://plato.stanford.edu/entries/frege-logic

You can see that the turnstile symbol |- was already used, and the horizontal line (which was called "Fregescher Schlussstrich", Frege's Conclusion Stroke) in my class, was apparently somehow part of the turnstile itself and only became a separated element in modern notation it seems.

mbwgh··on How to run a miserable code review
Over time, a programmer gathers a personal set of quality heuristics that has worked for them. A code review is an opportunity to sanity-check your changes by running your code against another person's set of heuristics.

There will be legitimate warnings and false-positives. You can gain some insights into how other people perceive and model the world, and in the process learn something, from both.

It's sad how a lot of people (including in the comments here) choose waste this opportunity by taking offense, and assuming that other people expressing their thoughts (which is an error-prone, lossy convertion process) are generally not well-intentioned.

mbwgh··on The Carrot Problem
As a German, I can at least say that the propaganda worked here, as intended :)
mbwgh··on New BitForge cryptocurrency wallet flaws lets hackers steal crypto
I tried to check out the Fireblocks "BitForge Status Checker": https://www.fireblocks.com/BitForge

It turns out you can not actually see which vendor is affected, you have to "Contact them" (by which means is unspecified, email?) to query if you are affected.

In their FAQ it then reads: > In the blockchain industry, we’re all building towards the same goals. With some of the recent hacks, the positive takeaway was that if you’re in a community that is banded together toward a common goal, it makes a huge difference.

> It’s part of the DNA of the industry to work together to be stronger out of the public eye rather than calling companies out publicly and harming their credibility before giving them the chance to make any fixes.

But they had that chance since May?

mbwgh··on Throw away your first draft of your code
> * Gradually pull out visually awkward chunks of code and put them into functions with no arguments at the top of the file.

I have seen scientific code written in this manner written in both Python and Fortran. This may be some intuitive way to start off, and even complete the task at hand.

But for people trying to read, understand, and realistically, debug your code, this complicates things.

Because each no-argument function can only work via its side effects. Your script becomes a succession of state transitions, and to understand it, you have to keep the intended state after each step in your head.

And in case of a mistake, you can't even call these functions individually via passing their intended arguments using the REPL. You have to set up all the state beforehand manually, call your no-arg function, observe the state afterwards. Which becomes more awkward the further down you are in your script, since all your dependencies are implicit and possibly even completely undocumented.

mbwgh··on The shell and its crappy handling of whitespace
For filesystem operations like batch renames at least, I am usually happy with `vidir` (part of `moreutils`: https://joeyh.name/code/moreutils/).

`vidir [path]` will open an editor with the given directory as buffer contents. Editing and saving will translate to a sequence of `mv` invocations.

mbwgh··on The shell and its crappy handling of whitespace
Or they stick to bash to keep their skills honed for when they have to understand some third-party script, or you ssh into some system and can't just quickly install fish first.
mbwgh··on The shell and its crappy handling of whitespace
fzf comes with some bash completions (https://wiki.archlinux.org/title/fzf), including Ctrl+r for basically `history | fzf`.
mbwgh··on Chicago95 – Windows 95 Theme for Linux
For me, my Ctrl+S moment was with Apple's Writer, on my first Macbook back in 2005 or so. Lost a whole evening's worth of work due to a crash.

I'm mostly in the `:w` camp now, but still...

mbwgh··on Diablo
I got a SSL_NO_CIPHER_OVERLAP for the archive.X links here, which was a first. Since curl worked, I configured Firefox to use NextDNS instead of Cloudflare for DNS over HTTPS, and it worked.

So, is Cloudflare blocking archive.ph since today?

mbwgh··on Nobody cares about your blog
See my reply to another commentor [0]. In short, the situation is a little confusing since even though your private blog may not be commercial, it may be regarded "businesslike" nontheless [1].

That being said, this legislation has been in place for some years now. I am not aware of any private person actually having had to face legal ramifications because of this and personally I would just omit it and say bring it.

Still, you see lots of private German blogs which do have an inprint, if you look out for it.

[0] https://news.ycombinator.com/item?id=36745481

[1] https://www-checkdomain-de.translate.goog/blog/bloggen/fortg...

mbwgh··on Nobody cares about your blog
I am not sure about that. Even for conventional blogs, I would say that the legal situation is not really clear.

Non-legal advice often is "if it's non-commercial, you don't need an imprint", see e.g. documentation by Hetzner [0].

On the other hand, if you visit pages that do offer legal advice, the situation is suddenly way more nuanced. This page ([1], German, but you will surely be able to translate it) makes the following points and describes the situation as I remember it:

    * Commercial page targeting a German market or residing in Germany: you need an imprint
    * Some blog that generates 1 cent of ad revenue: you need an imprint
    * Private blog which reaches a large audience and publishes on a regular basis: You need an imprint
The last one is of course not well-defined (what is a large audience, at what point do you publish regularly). And I think you can always assume that you have the "intention" of reaching a large audience, e.g. if you blog about anything that is not obviously irrelevant to the majority of people, like something technical.

So in summary, many lawyers advice you to add an imprint section even for a private blog, just to be on the safe side.

[0] https://docs.hetzner.com/general/others/impressum-faq/ [1] https://www.abmahnung.org/blog-impressum/

mbwgh··on Nobody cares about your blog
> You can say whatever the fuck you want. It’s your blog, you don’t need to follow any rules. I just cursed and you can’t do nothing about it, because this is my blog and I do what I want. This will give you a sense of freedom that’s really cool imho.

This is unfortunately not true in many parts of the world. Even here in Germany, any blog, including private ones, need to come with an imprint section including your full name, residential address, mobile phone number et cetera.

Even though realistically, nobody would care if I omitted this imprint section, it makes you think again whether you should actually go trough with self-hosting a blog.

In other countries it's of course way worse (think censorship and social scoring), so blogging just because you can seems to me as good a reason as any.

mbwgh··on Demystifying Text Data with the Unstructured Python Library
I second this, there is absolutely no easily discoverable entry point to the documentation. In the end if you want to get a feeling of what this is you search for "tika tutorial" and get a rough idea via (in my case) some medium article I guess.
mbwgh··on Defer for Shell (2020)
Yeah my use case is unfortunately the latter.

Maybe the out-of-band cleanup you suggest might be something like a simple daemon which is invoked with `$$` and `path/to/myscript.lock`. Which would then poll for the presence of a process with the given PID and deletes the lock file.

mbwgh··on Defer for Shell (2020)
Can you use something similar for lock files?

For instance, I have some script which looks like this:

    function cleanup() {
        pkill -P $$  # Kill child processes.
        rm -f myscript.lock
    }
    trap cleanup exit

    lockfile -r 0 myscript.lock  # Try to create lock file once.
    if [[ $? != 0 ]]; then
        echo ":("
        exit 1
    fi
    
    # Work work...
    cleanup
Like you said, the cleanup handler is not invoked if the script receives a SIGKILL. Since the lock file needs to be present in the FS (contrary to a tmp file), maybe this is some inherent limitation, but I would be curious if some better approach exists.
← PreviousPage 2 of 3Next →