HNHacker News
TopNewBestAskShowJobs

LaLaLand122

119 karma · joined November 5, 2019

submissionscomments
LaLaLand122··on Show HN: Uscope, a new Linux debugger written from scratch
> a terrible API which makes all the frontends terrible in turn

I don't know the details. But nowadays gdb supports DAP, as any other debugger: https://www.sourceware.org/gdb/current/onlinedocs/gdb.html/D...

Are you talking about this, or the old https://www.sourceware.org/gdb/current/onlinedocs/gdb.html/G... ?

LaLaLand122··on Personal VPN services are snake oil
In the UK, at least, it isn't the default (because of "the children"/"terrorism"). But it's still just a setting in Firefox/Chrome to change (and I guess in Edge too).
LaLaLand122··on Cisco Acquires Splunk
What's the problem with ThousandEyes? They got their agent into Cisco equipment, and just recently gave them SamKnows.
LaLaLand122··on SUSE to go private
What's exactly "the enterprise world"?

Honestly, all the distributions "just work" and are "stable" (i.e. they don't crash and corrupt your data). You could just pick up a random one. You will find some specific problems affecting you, sure... you will report (or even fix) them and, after a while, the distro will be perfect for you (it will still have some problems, but none affecting you because you have reported/fixed them).

The main thing about RHEL is that it's "stable" (i.e. it doesn't change) over a crazy long period of time. If you are selling software, the lack of change makes it easy to support. If you are buying software, it's a good platform to use because developers support it.

RHEL being historically the most popular "doesn't change" distro, I have never seen a big point in using other. Nowadays your vendor is probably also supporting Ubuntu, though. SUSE? A lot of them will support it, but not all. As long as the vendors you use support the distro you use it doesn't matter, I guess.

LaLaLand122··on Musl 1.2.4 adds TCP DNS fallback
I really hope it does some things differently than glibc: https://sourceware.org/bugzilla/show_bug.cgi?id=19643

In any case glibc uses NSS, so what glibc does depends on the configuration. It may well just forward the request to systemd-resolved.

LaLaLand122··on Atari VCS Myst “Demake”
The 2600 was also my first game console. I played it a lot, even after the Spectrum 128K arrived home. But, as much fun as I had with it, I have a similar issue with it now: I would happily play a SNES game now, but I have zero interest in playing an Atari 2600 game. I mean, I would play Qbert, but the graphics/sound would put me off enough to try the Commodore 64 version instead, and I have never touched a C64.

In fact, I have the same problem with the NES. For me the SNES is exactly the sweet spot.

LaLaLand122··on Death by design patterns, or On the cognitive load of abstractions in the code
I doubt it's yet implemented in any standard library. But it has been in the fmt namespace for close to a decade: https://fmt.dev/ . I do use it in a C++11-only codebase.
LaLaLand122··on Death by design patterns, or On the cognitive load of abstractions in the code
I will never type this:

    printf("You have %d items of type %s.\n", itemCount, itemType.c_str());
When I could do this:

    std::println("You have {} items of type {}.", itemCount, itemType); 

    https://en.cppreference.com/w/cpp/io/print
LaLaLand122··on Protocol Wars
> I wonder if we will see more of the network layer move into the application layer, like what I think happened with QUIC.

https://lwn.net/Articles/169961/

LaLaLand122··on The GTK+3 port of GIMP is officially finished
- https://man.archlinux.org/man/aoss.1.en

- https://man.archlinux.org/man/padsp.1.en

LaLaLand122··on Why did 250k Britons die sooner than expected?
Not exactly what you ask for, but "the NHS budget has traditionally risen by an average of 4% above inflation each year." (https://www.bbc.co.uk/news/health-64190440)
LaLaLand122··on “Clean Code, Horrible Performance” Discussion
What you say makes a lot of sense.

Now, to give a concrete example. There was a C++ PR introducing an interface taking an argument of type int representing a duration. I suggested using std::chrono::duration (https://en.cppreference.com/w/cpp/chrono/duration), and I was overruled on the basis that "an int is simpler". To have context if you are not too familiar with C++:

- std::chrono::duration is part of the C++ standard library

- It's a wrapper on top of an arithmetic type just giving it "duration" meaning. It's of the same size as the wrapped arithmetic type.

- Yes, you can argue it's more complex since it adds a bunch of templated code on top of a language built-in type.

I'm going to guess that's not what you had in mind with your "Simple > Complex" advise. If so, that's what happens with any advice, even with simple one liners: somebody will take it to justify some crazy decision.

LaLaLand122··on Dropping support for old C++ standards
The customer

- "Wants" "stable", i.e. the default gcc

- Doesn't care what Boost version is used

- Pays the developer

The developer

- Wants the latest toolchain

- Wants the latest Boost

- Makes money

The developer

- Accepts using an old compiler because Boost keeps compatibility with it

- Does not pay Boost developers for it

There is no single entity that wants old compiler (other than to satisfy others) and new Boost.

LaLaLand122··on Dropping support for old C++ standards
Exactly!

People point out RedHat provide newer compilers (and newer patched C++ standard libraries depending on the default one!) and he says "It's not us, it's our customers. And no, they won't use any compiler which isn't the system default".

Either you only use the system defaults, and that includes the old Boost included with RHEL, or you don't. I guess he includes a private Boost copy as part of his project. Well, include a private GCC too then. A dependency is a dependency

Those customers have silly requirements for no reason. The whole world shouldn't make efforts to accommodate them.

I am going to bet those customers are going to argue about "stability". All this comes from people reading "stable" as "rock solid, never crashes, always works as expected" when in the case of RHEL it actually means "it doesn't change, no new bugs introduced, and you can relly on the old bugs staying there". Those customers just need educating.

LaLaLand122··on Will Carbon Replace C++?
Sure. I agree. I was just arguing that it's good span doesn't have at(), I was not trying to say C++ is memory safe.
LaLaLand122··on Will Carbon Replace C++?
That's just sad.
LaLaLand122··on Will Carbon Replace C++?
I have just taken a look... https://wg21.link/p1179 is actually still not there, right? I see some interesting stuff in https://discourse.llvm.org/t/rfc-lifetime-annotations-for-c/... from last year. But, in general... once Herb started the whole Lifetime safety profile thing, there seemed to be a lot of interest, but for the last few years things seems to have died? I think things are better with Visual Studio, but being on Linux... I may need to start developing for Linux from Visual Studio with WSL2 :-(
LaLaLand122··on Will Carbon Replace C++?
That's cool.

Last I remember, the lifetime profile stuff was there, but there was still no way to add your own annotations. For some reason, I didn't hear too much about any of this, it was

- clang is working on it

- clang is working on it

- clang is working on it

- Visual Studio has it

- clang is working on it

- Silence

gcc still has nothing, right?

LaLaLand122··on Will Carbon Replace C++?
Arguably an explicit type would have made the bug a little bit more obvious. You basically expect, by default, this kind of string manipulation functions to return a std::string. Obviously in this specific case you can return a view, and that makes it more performant; but it's kind of unexpected and using auto leaves the surprise a bit more hidden.

But sure, you can still make the error with expiclit types.

LaLaLand122··on Will Carbon Replace C++?
A citation of what's "Modern C++"? The term is a made up concept with no proper definition...

But "Herb Sutter says you should use it, he even gave it a catchy name/acronym" is as good as it gets. And he does so AFAIK in the same place he created the "Almost Always Auto" name: https://herbsutter.com/2013/08/12/gotw-94-solution-aaa-style...

Notice that he says "the main reasons to declare variables using auto are for correctness, performance, maintainability, and robustness—and, yes, convenience, but that’s in last place on the list.". He is arguing literally the opposite of what you do, that using auto avoids bugs ("for correctness").

I'm not going to argue in favour or against "Almost Always Auto". But I see no problem calling it "Modern C++".

* Herb Sutter being the convener of ISO WG21

LaLaLand122··on Will Carbon Replace C++?
std::span doesn't have at() because std::logic_error was a mistake. Using std::vector's at() is a mistake (you could use it as a helper method and make it as if it throwed std::runtime_error, but it doesn't, that wasn't its intended usage).

All three major C++ standard library implementations have an option to enable assertion checks in both std::vector and std::span operator[]. Enable them unless you are in such a resource limited environment that you can't afford the checks (unlikely). The only reason the standard doesn't require the checks is to allow C++ to be usable in those resource limited environments. You could argue the checks should be enabled by default, but that's not something for the standard to decide, complain to your standard library vendor.

LaLaLand122··on Will Carbon Replace C++?
And yet "Almost Always Auto" is "Modern C++"...
LaLaLand122··on Will Carbon Replace C++?
It's good that you can solve this with 100% of the team following 100% of the time the rules/guides.

It's even better if your language has a way to express "the return value points to data from the input argument, so it's a compile error to pass a rvalue string to this function". The second we got a language able to do that, usable everywhere where C++ is, (yes, that one) the incapacity of C++ to express this became "a problem with C++". Our expectations have just increased.

Surely it can be catched via static analysis if you suppose the common case that the return value is a function of the argument, and not pointing to some static global data. But you will get false positives when somebody does the uncommon case. There is a lack of expressiveness in C++ here.

LaLaLand122··on Golang disables Nagle's Algorithm by default
To be fair, "getaddrinfo is _the_ path" is a shitty situation.

- It's a synchronous interface. Things like getaddrinfo_a are barely better. It has forced people to do stuff like https://c-ares.org/ for ages, which has suffered from "is not _the_ path" issues for as long

- It's a less featured interface than, for example, https://wiki.freedesktop.org/www/Software/systemd/writing-re...

LaLaLand122··on Windows 95 went the extra mile to ensure compatibility of SimCity, other games
There was still a need for webcam drivers when Vista was released? https://en.m.wikipedia.org/wiki/USB_video_device_class
LaLaLand122··on I started taking English classes at the age of 46
I would never understand it as "but you said you would do it", I would say "would" is safe to use with non-natives. But it may depend on the native language of the other person. There are some really weird languages out there!

The other day Duolingo did show me you can say "и A и B" ("и" being "and") to say "both A and B". Start a sentence with "and", a conjunction, without anything before to... "conjunt"... I still can't parse it without raising an exception.

LaLaLand122··on Play Windows Pinball (Space Cadet) on the Web
Aren't there pinball games any more? I remember spending a lot of hours playing Pinball Fantasies and Pinball Illusions in an Amiga 1200.
LaLaLand122··on Mom handcuffed, jailed for 8-year-old son walking half a mile
I have visited nurseries that don't let kids go out to the playground when it rains... in the UK! I suspect some of my child classmates were Gremlins.
LaLaLand122··on Wiring my home with fiber
FWIW last time I checked, central London did indeed have slow connectivity, but it didn't extrapolate to the rest of the UK. No idea why the center of the capital was equivalent to a remote small town in this regard.
LaLaLand122··on Epoll is fundamentally broken (2017)
> you have to use multiple rings and do everything else yourself

Since you are supposed to use liburing, not the kernel interface directly, I guess somebody could add multithreading "support" to it.

Or at least add documentation/examples of the most common/performant options: https://github.com/shuveb/loti/issues/4

AFAIR Windows IOCP handles multithreading by:

- Handling locking at kernel level, the syscall is thread safe

- Making it LIFO, to keep things in the same threads, to have a decent cache behaviour.

It's as simple as it gets.

Page 1 of 2Next →