HNHacker News
TopNewBestAskShowJobs

ainar-g

3,755 karma · joined June 7, 2015

submissionscomments
ainar-g··on Vulnerability Management for Go
The pattern to check the package and all subpackages for pretty much all Go tools is "./...". So:

  govulncheck ./...
ainar-g··on Vulnerability Management for Go
It's not a lockfile. It contains hashes of packages so that you could fetch them from any proxy and not worry about proxies doing funny business.
ainar-g··on Maintaining Files on Plan 9 with Mk
What do you mean by “make from Go”?
ainar-g··on SQLite 3.39.3
I consider these to be reminders that even with a state-of-the-art testing suite and 100 % branch coverage, bugs still find a way, heh.
ainar-g··on Ubuntu: “How are we improving Firefox snap performance?”
It's pretty stable, too. In a few years I've been using it, there were just two major issues. One could be fixed by removing an addon, and the other was fixed within a day.
ainar-g··on Ubuntu: “How are we improving Firefox snap performance?”
It wouldn't be as infuriating if Snap weren't such an awful product, both for the user and for the developer. Just off the top of my head:

1. Sometimes it will warn you when uninstalling a snap will break other snaps; most of the time it doesn't. I removed some snap recently, and Firefox stopped launching.

2. The snapcraft CLI is awful. No way to disable colours, no man pages, no proper error codes, etc.

3. Every time you need some non-trivial piece of functionality, you have to go to ask Canonical for permission. The permission is, most of the time, granted relatively easily, but still.

4. The plug (permission, basically) system is confusing. The documentation is sparse and often doesn't actually answer, which plug you need. And you pretty much have to install snappy-debug (using snap, of course!) to find out approximately, which plug you'd need to add. Thru Canonical, of course. See 3.

5. No way to have your own instance of snap store. If you want to find out, why the upload fails or if the plug will work properly, you have to actually upload a snap to the actual Snap™ Store®.

6. Firefox cannot access /tmp/. A truly baffling thing.

The day Mark&co. finally realize that this thing won't work, no matter how many things they force into snap, is the day I will start a three-day party, heh.

ainar-g··on Ubuntu: “How are we improving Firefox snap performance?”
> The whole Snap thing is a great example of why Linux will never become mainstream.

A generalization too broad, as pretty much no other distro except Ubuntu uses it. If anything, it's more emblematic of Canonical's neverending desire to reinvent the world and the NIH syndrome.

> Semi related, why are all the Remote Desktop solutions on Linux so awful?

I've never had any issues with plain old X forwarding over SSH. As long as you have compression enabled, performance for most applications is fine.

ainar-g··on Learn PWA
You are technically correct, but removing a feature for a large number of important platforms is still a weird move, especially in the context of PWAs becoming more and more widely used on all platforms.
ainar-g··on Learn PWA
Have we ever found out, why did Mozilla actually remove PWA support from Firefox? Apart from the buzzwordey stuff like “focusing on delivering real value to our users” that the C-levels have been spouting. Between this and their abandonment of Servo, it really seems like they keep shooting themselves in the feet, which, considering their position on the market, just really baffles me.
ainar-g··on History of Zero-Based Months?
Probably because most calendars started as lunar or lunar-based. There is also the case that separating the year by month could be beneficial for farmers back in the day to plan different activities throughout the year. I've always like the names of the months in the French Republican Calendar[1] because of that.

[1]: https://en.wikipedia.org/wiki/French_Republican_calendar#Mon...

ainar-g··on Gravity Payments CEO Dan Price resigns
The moment you define “rich people”, though, all people who fit that definition will suddenly transfer all of their assets to their spouses and immediately divorce them, heh. Assessing a person's actual worth is not an easy task. Not impossible, mind you, but not easy.
ainar-g··on JiraCLI
Is there any documentation with actual examples of using it? The “Usage” section only mentions Bash completion, the Wiki is empty, there is no doc/ directory, and the rest of the README seems to be about setting custom commands (which is good to have, but probably not for it to basically be the entire README).
ainar-g··on “Autistic people can’t acknowledge when they’re wrong”
> It's much more likely that the manager was actually asking if the author had reviewed the technology stack recently and considered whether it was still optimal.

Then why didn't the manager ask that instead of mentioning some article some other company?

ainar-g··on The problem with Go’s default HTTP handlers
Another possible extension of that design is using error types for HTTP codes. Something like:

  type HTTPError struct {
          Err  error
          Code int
  }
And then, with a couple of wrappers like this:

  func errorNotFound(err error) (wrapped error) {
          return &HTTPError{
                  Err:  err,
                  Code: http.StatusNotFound,
          }
  }
you could do something like this:

  return errorNotFound(err)
or this:

  return errorInternal(err) // 500 Internal Server Error
ainar-g··on ANSIArt

  Uncaught ReferenceError: OffscreenCanvas is not defined
Testing Only In Chrome strikes again!
ainar-g··on Go 1.19 Released
The new generic atomic.Pointer[T] has been added[1]. More general improvements for slices and maps are being prototyped in the x/exp repos[2][3] to get it right and not get stuck with a sucky implementation in the stdlib.

[1]: https://pkg.go.dev/sync/atomic@master#Pointer

[2]: https://pkg.go.dev/golang.org/x/exp/maps

[3]: https://pkg.go.dev/golang.org/x/exp/slices

ainar-g··on Go 1.19 Released
I think, they refer to the fact that you have to sign a CLA in order to contribute[1]. And the CLA[2] includes a “Grant of Patent License” clause.

[1]: https://go.dev/doc/contribute#contributor

[2]: https://cla.developers.google.com/about/google-individual

ainar-g··on Public domain POSIX make
To be fair, if you need conditionals in target bodies, you're probably better off putting the body into a separate file as a shell script. And if you need conditionals in macros, there's the old macro-in-macro approach:

  DEBUG = 0
  DEBUG_FLAG_0 =
  DEBUG_FLAG_1 = --debug

  # …

  main.bin: 1.o 2.o # …
          build $(DEBUG_FLAG_$(DEBUG)) -o main.bin # …
I'm not saying that it's a good way, but it is a way.
ainar-g··on Public domain POSIX make
To answer my own question, if this[1] StackExchange to be believed, you need to join the mailing list of something called “The Austin Group”. Although some fairly informative meeting minutes are available publicly here[2].

[1]: https://unix.stackexchange.com/q/607333/105635

[2]: https://www.opengroup.org/austin/docreg.html

ainar-g··on Public domain POSIX make
That's pretty neat! But is there a link to the “future POSIX standard”? A few months ago I tried looking for it on https://pubs.opengroup.org/, but couldn't.
ainar-g··on The History of ‘Ampersand’ (2020)
Which is consistent with many Romance languages, where it's called a variation of “commercial and”. Including the Italian “e commerciale”, Portuguese “e comercial”, and Spanish “y comercial”.
ainar-g··on Me and Monotropism: A unified theory of autism (2018)
The reframing of executive dysfunction as a kind of mental inertia is interesting and consistent with my personal experience with the phenomenon. They say that the beginning is the hardest part, but it has always been almost unbearably hard for me. On the other hand, once I start doing the thing I wanted-but-wouldn't, I usually go on with it for quite some time.

This also reminded me of the article[1] about the “Bayesian interpretation” of Autism and several others mental conditions. I'm not sure how much rigorous study there is behind such theories, but they do provide an interesting framework to think about these conditions.

[1]: https://slatestarcodex.com/2016/09/12/its-bayes-all-the-way-...

ainar-g··on Six programming languages I’d like to see
The D programming language, too.

https://dlang.org/spec/function#contracts

ainar-g··on Perl is still relevant
It's a okay article, but they really should have mentioned the Perl 7 initiative as well as the fact that Perl is still installed by default on OpenBSD and some other BSD and Linux-based OSes.
ainar-g··on ASCIIToSVG – Create beautiful SVG renderings of ASCII diagrams
I've tried it with the logo diagram:

  .-------------------------.
  |                         |
  | .---.-. .-----. .-----. |
  | | .-. | +-->  | |  <--| |
  | | '-' | |  <--| +-->  | |
  | '---'-' '-----' '-----' |
  |  ascii     2      svg   |
  |                         |
  '-------------------------'
A screenshot of the resulting SVG in the GNOME Image Viewer: https://imgur.com/I6NySZp.
ainar-g··on StrictYAML
There are basically two types of YAML file I've seen:

1. Application configuration. That would be better off as environment variables and/or JSON(5) for structured data.

2. CI/CD configuration. Those should really be scripts, because basically every such configuration file I've seen invents its own way of making conditionals anyway.

ainar-g··on Forebruary is a wall calendar that you do not need to replace every year (2013)
Ilya Birman's work is greatly underappreciated. His Moscow Metro map proposal[1] was pretty cool, and his commuter rail map[2] summarizes the routes much better than its predecessors.

[1]: https://ilyabirman.net/moscow/metro/map/2016/

[2]: https://ilyabirman.net/moscow/rail/

ainar-g··on Whatever happened to SHA-256 support in Git?
Hah! I guess there should be one about smarter search as well, heh. Thanks!
ainar-g··on Whatever happened to SHA-256 support in Git?
The article mentions that “none of the Git hosting providers appear to be supporting SHA-256”, but what about self-hosted solutions? In particular, sr.ht. Seems to be nothing[1] in their issue tracker.

[1]: https://todo.sr.ht/~sircmpwn/git.sr.ht?search=sha-256

ainar-g··on How I would sell OpenBSD as a salesperson
You can enable hyper-threading at runtime though.

  sysctl hw.smt=1
← PreviousPage 4 of 21Next →