HNHacker News
TopNewBestAskShowJobs

ainar-g

3,755 karma · joined June 7, 2015

submissionscomments
ainar-g··on Ubuntu 24.04 LTS Committing to Netplan for Network Configuration
I was hoping that Canonical has higher standards when it comes to server software, as opposed to something like Snapcraft, but reading this makes me think that maybe they both were developed by the same team.
ainar-g··on HTML Optional Tags
At least the people who named it understood the silliness of the issue, heh.
ainar-g··on jq 1.7
Ah, understandable.
ainar-g··on jq 1.7
Depending on whether or not the resulting YAML is supposed to be human-readable[1], you can just produce JSON output, since YAML 1.2 is a superset of JSON. I did that at one of the places I worked in at the time, and it worked very well.

[1]: I personally think that JSON is plenty readable, but a lot of people seem to disagree.

ainar-g··on jq 1.7
What are you using yq for? Unless you use YAML-only features (e.g. integers, arrays, and objects as object keys), it seems like it would be easier to just pipe-convert your YAML to JSON and process it with jq.
ainar-g··on RFC 3339 vs. ISO 8601
There are a few ways to represent that in the database, see[1]. Unless I misunderstood what you mean by “no way to specify”.

[1]: https://codeblog.jonskeet.uk/2019/03/27/storing-utc-is-not-a...

ainar-g··on Portable OpenBSD vi for Unix systems
I'll be able to try a bit later, but does it handle UTF-8 correctly? I remember having some versions of nvi split characters through the middle when doing e.g. folding back in the day.

EDIT: Sorry, I'm a dum-dum, it's written in the README:

> No support for Unicode / UTF-8 / wide character display

> Multibyte support is planned, but is unfortunately non-trivial, […]

ainar-g··on Backward Compatibility, Go 1.21, and Go 2
https://github.com/golang/proposal/blob/d661ed19a203000b7c54...

About five years too late, heh.

ainar-g··on Backward Compatibility, Go 1.21, and Go 2
It's in the original:

> […] Similarly, function pointers should be used only if there is a very strong justification for doing so because they can seriously restrict the types of automated checks that code checkers can perform. For example, if function pointers are used, it can become impossible for a tool to prove the absence of recursion, requiring alternate guarantees to make up for this loss in checking power.

In other words, static analysis beats code cleanliness, in this perspective.

ainar-g··on Backward Compatibility, Go 1.21, and Go 2
Based on the discussions I've seen, Go2 is considered to be the name for the process of extending the language, not an exact release version.

With that said, the label seems to “work” by allowing people to first think of a backwards-incompatible way to solve a problem and then, possibly, arrive at a much more compatible solution in the process of discussion.

ainar-g··on Backward Compatibility, Go 1.21, and Go 2
> I honestly don't really know of a story where a source-incompatible update killed a language.

Death may not come as swiftly (heh) as you think. I know a few people (including myself) who, when deciding which language to add to their toolbox, had decided against Swift because of its reputation as “that language that always breaks code”, among other reasons. There are just a few anecdotal data points, of course, but I don't think it's controversial to say that a history of messy updates definitely makes new people less likely to learn a language without an absolute necessity.

ainar-g··on Backward Compatibility, Go 1.21, and Go 2
It can, by setting GOGC=0 or from within the program. And yes, you would. It's essentially like writing in C, but not being able to call free(); i.e. allocating a fixed amount of resources at the start of the program and work on them. Which is also a recommendation[1] for safety-critical C code made by a NASA person, incidentally, heh.

[1]: https://en.wikipedia.org/wiki/The_Power_of_10:_Rules_for_Dev...

ainar-g··on Backward Compatibility, Go 1.21, and Go 2
> I wonder: why not go further and say "there will never be a Go 2" in order to eliminate ambiguity about this?

They did, five years ago. Albeit with an “if”.

https://github.com/golang/proposal/blob/d661ed19a203000b7c54...

> If the above process works as planned, then in an important sense there never will be a Go 2. Or, to put it a different way, we will slowly transition to new language and library features. We could at any point during the transition decide that now we are Go 2, which might be good marketing. Or we could just skip it (there has never been a C 2.0, why have a Go 2.0?).

> Popular languages like C, C++, and Java never have a version 2. In effect, they are always at version 1.N, although they use different names for that state. I believe that we should emulate them. In truth, a Go 2 in the full sense of the word, in the sense of an incompatible new version of the language or core libraries, would not be a good option for our users. A real Go 2 would, perhaps unsurprisingly, be harmful.

ainar-g··on Nyxt: The Hacker's Browser
https://nyxt.atlas.engineer/faq

> Nyxt is a browser with deeply integrated AI and semantic document tools that work as a second brain to help you process and understand more, more quickly.

It'd be nice if they elaborated on what this “integrated A.I.” thing actually is in that or another FAQ entry.

ainar-g··on Show HN: Learn German with Short Stories
Not exactly stories in text, but there is a YouTube channel called “Deutsch Lernen Durch Hören”[1] (“Learning German Through Listening”), which has hundreds of stories for all levels.

[1]: https://www.youtube.com/@DldH

ainar-g··on Ways to shoot yourself in the foot with Postgres
Can I ask why? I generally only see the “I switched from MySQL to PostgreSQL and loving it” comments in my info-bubble, so it'd be interesting to know what people who prefer to use MySQL feel is still lacking in PostgreSQL.
ainar-g··on Ways to shoot yourself in the foot with Postgres
PostgreSQL has been around for almost 27 years (and even longer, if you include the Ingress and Post-Ingress eras). And things, well things, they tend to accumulate, to quote Trent Reznor, heh.

On a related note, one could say that the C++ Core Guidelines[1] at least partially represent such a list. 55 matches for “don't use” and 247 for “avoid”, although not all of them are about language features, obviously.

[1]: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines

ainar-g··on PSKoans: A simple, fun, and interactive way to learn the PowerShell language
I'll share a bit of personal experience for those who hate PowerShell to maybe make them look at it from a new point of view.

As a devoted Unix fanatic, I used to hate PowerShell, because I initially came in with the expectation that it's going to be “just another POSIX-like shell”. After all, it's right in the name! And it uses dollar signs! So every little thing that differed from my unixey expectations made me angry. (Them using awful aliases like wget and curl didn't help. Seriously, what were they thinking?)

But once I've realized that PowerShell is much closer to AWK and Perl, I kind of started to almost enjoy it. Don't get me wrong, it's not my favourite language or anything. But these days I think that it is a formidable scripting language with most of the stuff you'd normally need in place, at least in the recent versions.

One thing that I still dislike is the absence of something like the Unix manual pages. For some reason, help pages require additional installation, and the learn.microsoft.com search is so awful that it's often quicker to use DDG with "site:learn.microsoft.com".

ainar-g··on Ask HN: What is the future of Go beyond tooling and cloud infrastructure?
> There was a time when people would get excited about choosing Go for a new project, regardless of it being a CLI tool, a Web application, or some system-level infrastructure. Looks like all three are getting well-covered by Rust these days. On the other hand, good old stacks like Java and .NET are not sleeping either, and improving all the time.

YMMV, obviously, but in companies within my personal bubble Go is still the go-to (heh) tool for creating both CLI tools and all kinds of API services. These kinds of choices, in my experience, mostly boil down to what kind of personnel a company has at the time, as well as personal preferences of the tech leads. And while some of them do appreciate Rust, finding good Rust devs still seems harder than good Go devs.

> Will people be as excited in building new applications with it, or will it niche itself into "that cloud and microservice thing" made by Google that we have to maintain, because a few large projects decided to use it a decade ago?

I love Go, and has been working with it for about ten years now, but I don't think it was ever an “exciting” language, once you remove the initial hype. Go has always been reductive and boring, and that has always been its greatest strength (and, in the eyes of many, its greatest weakness). You've mentioned Java and .NET, and I feel like Go has almost entered that company of languages. Boring technology, with good tooling and lots of libraries, supported by large corporations, that can deliver results within predictable time scales.

So if I had to predict the future of Go based on the current trends, I'd say it's almost definitely “more of the same”, which is, in a way, the “bright future” for the language. The tooling is going to be improved. The type system is going to get improvements too, but very slowly (my personal prediction is that we'll get sum types around 1.22–1.24; long overdue, imo). The stdlib is going to be expanded to accommodate these changes. Nothing exciting, but that's how a lot of people want it.

ainar-g··on Show HN: Gut – An easy-to-use CLI for Git
Weird that nobody has mentioned Game Of Trees[1] (aka got), which is developed by OpenBSD-related people and “prioritizes ease of use and simplicity over flexibility”, according to their main page.

[1]: https://gameoftrees.org/

ainar-g··on Rust – Are We Game Yet?
A bit off-topic, but is there a list of these “Are We X Yet?” sites? I think I've seen at least five by now, and most of them were somehow Mozilla- and Rust-related, but are there others?
ainar-g··on The Yaml document from hell
People often forget about the environment, and I feel like a lot of the simpler services and applications could be configured through it easily.

For anything that requires more complex structures, JSON5 (https://json5.org/) has been gaining traction. It's basically JSON that allows a couple of more things, including comments, trailing commas, and even unquoted keys, if you're into that.

ainar-g··on The Yaml document from hell
“YAML evangelist” sounds terrifying, and I have never met one in real life. Most people who used YAML basically resorted to the old argument of “Well JSON doesn't have comments, so YAML it is”.
ainar-g··on C23 Implications for C Libraries
Depending on your definition of “using”, you may not actually be able to, at least for now. If CPPReference's table[1] to be believed, there are still important features that are either missing from GCC and Clang or implemented “partially”, which may mean different things for different features and compilers.

In my personal opinion, unless you're doing the project just for fun, it seems better to stick to C11/C17, at least for the next few years.

[1]: https://en.cppreference.com/w/c/23#C23_core_language_feature...

ainar-g··on Linux Desktop Environments System Usage
A surprising thing is that the gap between XFCE and MATE isn't large. Maybe it's because of the modern GNOME 3's initial infamy, but I kind of assumed that MATE would be a bit more of a resource hog, but I am very happy to see that it isn't!
ainar-g··on Mozilla acquires the team behind Pulse, an automated status updater for Slack
Reminds me of the (in?)famous Dropbox comment: https://news.ycombinator.com/item?id=9224.

It's one thing to implement something. It's another thing to implement it in a way that makes other people want to use it.

ainar-g··on The sad history of Unicode printf-style format specifiers in Visual C++ (2019)
I feel like you're confusing it with UTF-32, which is fixed-length. UTF-16 is neither fixed-length, like UTF-32, nor compatible with the old ASCII encoding, like UTF-8.

The historical reasons of why UTF-16 exists are fully understandable, but by now it is clear that it's the worst of both worlds.

ainar-g··on OpenBSD for Linux Users
One command that I've used a lot that's missing is:

  pkg_info -Q str
It allows searching for packages with substring str in their name. Very useful when you want to see, which additional packages are available for a thing, for examlpe:

  pkg_info -Q xfce
ainar-g··on Intel on Demand
tl;dr: pay extra to actually use the CPU you have already bought.
ainar-g··on C23 Implications for C Libraries
It's especially weird considering that the Markdown file is publicly available:

https://icube-forge.unistra.fr/icps/c23-library/-/blob/main/...

Raw Markdown, for no-JS readers:

https://icube-forge.unistra.fr/icps/c23-library/-/raw/main/R...

← PreviousPage 2 of 21Next →