HNHacker News
TopNewBestAskShowJobs

notalaser

1,343 karma · joined December 11, 2015

submissionscomments
notalaser··on The BSD family tree
> Linux, with has a viral license which essentially forces people to work on the same code base

If this were so, my life would be so much easier. Maybe things are like this on higher-end servers, in DevOps and so on, but the other side of Linux deployment -- in embedded systems, consumer hardware, various gizmos, phones and so on -- it's very much not true.

Virtually no device that's actually being sold somewhere runs a vanilla Linux kernel when you take it off the shelf. Companies comply with GPL technically -- they publish their changes and they'll even mail you the CD if you ask nicely -- but there's no community work of any kind, really. Sometimes you'll have manufacturers working with funky hardware from obscure companies that never bothered to update their drivers past 2.6.32 (or, best case scenario, 3.2) and the forward-porting dance begins -- that is, if you're lucky and the driver isn't a binary blob. Sometimes the opposite happens -- you're working with shiny new stuff but a Really Smart Manager heard that older kernels are more stable and now the backporting from 4.10 to 3.16 dance begins. The "same codebase" thing is pretty much just a distant dream now -- and you don't want to see most of the codebases out there.

Granted, there is a common(-ish) core -- the differences are not on the magnitude of FreeBSD vs. OpenBSD (different vmm systems etc.), but IRL, there's rarely a "single" Linux.

Edit: oh, and don't even get me started on all the innuvashon that happens in the layers above the kernel.

notalaser··on Scrolling on the web: A primer
> What if I have accessibility requirements and want to customise how software that I run on my own computer works?

The modern web cares very little about such requirements, since they are unlikely to be correlated with making money.

I don't like where things are going :-(.

notalaser··on Was object-oriented programming a failure? (2015)
> Because there are many low skill, poorly-informed people who write code still believe these things. In particular that "OOP" is automatically equivalent to "better quality code."

This about sums up my experience with these discussions, too. I know a lot of people who are absolutely convinced that C++ "is better" than C because you can write object-oriented code in it -- you have native support for "classes and stuff".

The whole "is better than" thing is a little childish to begin with, but this argument is on the thin and confusing border between "meaningless" and "but why?"

notalaser··on Ask HN: Are you using a non-systemd desktop Linux distro?
I hope I'm not too late to the party: you might like Void Linux. It's an independent distro, maintained by a bunch of very sane people, with a very sane approach to most things.
notalaser··on Window Maker 0.95.8 released
Some of them can still be found if you look around on Google. Unfortunately, they haven't aged well -- their wallpapers are mostly for 4:3 monitors and low resolutions, the textures are for low-res screens etc..

box-look.org has a few more recent ones.

notalaser··on Window Maker 0.95.8 released
Pretty much a complete rewrite. Wayland is nothing like X11.
notalaser··on Windows 10 Tip: Turn Off File Explorer Advertising
It's also needlessly frickin' huge. It's worse than Industrial (oh, the memories...). It's like it was designed for touch screens and tablets, not monitors and real computers.

Someone built a "smaller" version a while ago, but it hasn't been updated, so it no longer works on recent GTK versions.

notalaser··on Windows 10 Tip: Turn Off File Explorer Advertising
> I can't stand the trend toward flat design.

You're not gonna like 2017 Linux then. The superflat, super-trendy themes have the most users and are pretty much the only ones that see regular updates. Which are required because tl;dr GTK3.

Vertex and -- honest to God! -- a Win 3.x lookalike are virtually the only decent alternatives that work for more than six months.

notalaser··on Vim plugin to disapprove deeply indented code
> In the embedded world, I imagine it would be a good standard to force people to consider refactoring functions to their truth table.

It's not only a "good standard". It helps with verification: you can verify that the truth table is correct, and then that the function correctly implements that truth table. At least the former can sometimes be done formally.

> Curious how MISRA works out in practice.

Like every other standard, it depends on who's implementing it and with what tools, but it generally works out pretty well.

notalaser··on The Unix-Haters Handbook (1994) [pdf]
OpenVMS: distributed locking (we're barely catching up with it, in 2017!) -- see e.g. http://download.oracle.com/otndocs/products/rdb/pdf/rdbtf05_... , filesystem versioning (we still have nothing like it, and applications like ClearCase (very poorly) try to implement their own over filesystems that don't support it). ASTs (see https://en.wikipedia.org/wiki/Asynchronous_System_Trap ) are also great, but I think something akin to them exists in Windows.
notalaser··on Two Indian engineers at Garmin in Kansas shot, one killed
To be fair, the map you linked to was entirely unhelpful, seeing how it didn't display big bald eagles and a star-spangled banner next to the Ochoco National Forest, the Warm Springs Reservations and Camp Sherman.
notalaser··on What Are the Tricky Parts of Embedded Development?
Oops :-). Sorry if I seemed overly pedantic. I was bit by the EEs who literally "just route them" a long time ago and I'm not very sympathetic towards them. I'm one of the weirdoes who are programmers by profession but have an EE degree (not that I'm a good electrical engineer -- I just know enough to troubleshoot my way around hardware bringups and talk to the real EEs), so I find the whole "just tell me what connections you need" attitude particularly infuriating and conducive to terrible designs.
notalaser··on What Are the Tricky Parts of Embedded Development?
I'll chime in with a confirmation that, in my experience, too, an EE who "just routes them" is either not very good, or working in a dysfunctional organization. Performance isn't something that exists in its own bubble, it comes with clock and power requirements and the devices that offer "more" of it than other devices have to compromise on other things. If a company insists on enforcing a strict hardware/software team separation, both teams have to be involved in these decisions, otherwise the results are borderline catastrophic -- boards that can barely be programmed and debugged, or sub-optimal component choice, bad analog chains, difficult clock distribution etc., depending on who is more involved in the decisions.

Just like, past a certain point, it's impossible to do good embedded development on the software side without at least some basic knowledge of EE, there's no way you can come up with a good hardware design if you're completely ignorant about software development. It's no coincidence that the best engineers are the ones who can do both.

notalaser··on Thoughts on the Late 2016 MacBook Pro
Cynically, I'd say it breaks because the only mistakes that we live with, try to work around or fix are the ones made no later than the mid-90s. Everything else, we live with for a while, then boldly proclaim that they're outdated, junk from another age, no longer appropriate for a modern system and then promptly rewrite -- so unsurprisingly, a lot of components of a major Linux desktop are basically beta-quality and/or in a continuous state of flux.

Look at the Gnome 3.22 changelog. It lists things like support for multiple renaming, being able to set alarms for events in Calendar and seamless photo sharing via Google Photos and email. I remember being excited about all these features (except Google Photos, for obvious reasons) when I was using Windows. 2000. I was using Windows 2000.

That's why we're rejoicing that we'll soon have ASLR in all mainstream distros and support for a display server/compositor where windows can't snoop on other windows is just around the corner, while Microsoft is perfecting call-flow integrity and has had a proper compositor since the days when we were barely able to bolt our applications on top of an X11 compositor.

Edit: Non-cynically: most of the breakage happens because the level of complexity involved in a most modern technologies is way over the level that can be meaningfully managed by a community. systemd, xdg-everything, they're all very useful tools, but only a handful of people can properly use them, and it doesn't help that so many of them work for Red Hat and aren't exactly transparent about a lot of things. This breeds mistrust and brings about a lot of unjustified criticism along with the justified one.

As for why PulseAudio in particular keeps breaking, I'm not familiar enough with its source code to say. My problems revolve around things like randomly deciding to use another output device. I work around it by not using it, really. Every couple of months I take KDE and Gnome for a ride, they keep breaking, I open up the page of my local Apple dealer, I gaze incredulously at how much money they want for that hardware, close the page, pacman -Rcs plasma-meta and get back to WindowMaker.

notalaser··on Thoughts on the Late 2016 MacBook Pro
It has been exactly two days since the last time I had to dig down and figure out what broke in PulseAudio this time. Things are certainly bad for non-technical users, but those of us who write Linux software for a living don't have it much better, either.
notalaser··on Thoughts on the Late 2016 MacBook Pro
Historically, the side effect this tends to have is that a lot of programmers flock to a new platform but bring the way they use and write programs with them. Fifteen years ago we ended up with CORBA- and Window Registry-like components bolted on top of Linux desktops. On the other hand, seeing how nowadays the Linux "community" is mostly a bunch of big cloud, automotive and IoT/vaporware companies, this could be the closest the Linux desktop has to salvation.

So far, the attempts to bring elements of the OS X experience to the Linux desktop have been very... cargo cult, in the absence of a more forgiving word. Fetishizing design choices and simplicity has made it very unpleasant to deal with a modern Linux system. Many users of tiling-wm-and-terminal-only desktops don't do so "just" because it's the most efficient option, they do it because the alternatives are horrifyingly bad.

notalaser··on Microsoft’s February security update release delayed to March
> (Open)VMS

It'll eventually get reinvented :-).

notalaser··on Microsoft’s February security update release delayed to March
Unfortunately, the last time I had to do system-level Windows programming was such a long time that all I remember are a bunch of things starting with hwndsomethingsomething, so I certainly don't remember if this is the case, nor the specifics (if I ever knew them, I was very young and therefore very stupid at the time).

However, the opposite problem - that of (thread-safely) ensuring that you're not stepping on another process' file when you're writing, wiping or moving it - is pretty tedious under Unix. The only way to do it reliably - that I know of - is via flock, which is opt-in and therefore not always an option (e.g. the other process is a third-party application that doesn't lock its files), and doesn't work on remote filesystems

There is no design decision without at least one compromise hanging on its tail.

notalaser··on Microsoft’s February security update release delayed to March
Like I said, it's not entirely impossible (a while ago I was using checkrestart on my Debian machine with pretty good results), but the result is still somewhat clunky. There are a lot of things that aren't so easily checked: changes in interpreted code (needrestart can, fortunately, deal with Java, Perl, Python and Ruby, but I don't know how well, and there's no shortage of packages that rely on old-fashioned bash scripts or -- hey, Polkit! -- JavaScript), changes in configuration files and so on.

This is a reasonable solution if you're running relatively non-critical processes on a single machine. If you really want to avoid downtime, a cluster with rolling updates seems like a solution with far fewer headaches.

Non-critical covers a lot these days, fortunately :-).

notalaser··on Microsoft’s February security update release delayed to March
This is a somewhat unpleasant semi-misconception. You can, indeed, update everything but the kernel without rebooting. In fact, I suspect you could even replace the kernel image and the modules while they're running (but this will certainly break any attempt to load modules at a later point without rebooting first). (Edit: most distributions choose to keep the old image along in case the new one breaks. It's relatively unfrequent now, but back in 2003...)

Generally, however, processes don't get restarted after updates and libraries don't get reloaded, so without rebooting, you're still running the unpatched versions.

I don't know if RHEL has a clever way to figure out what needs to be restarted (it's not entirely impossible, thanks to systemd), but pretty much everyone under "et al." has this problem.

See Peter Larsen's comment here: https://lwn.net/Articles/702664/ for a more authoritative take on this, I deserted to BSD land long ago...

tl;dr Rolling out the updates without restarting is one thing, and it's done, and Microsoft could do it too, they just take the easy route. Applying them without restarting is a very different and far murkier story.

notalaser··on Releases for XFCE
I'm pretty sure that whatever Gnome saved with CSDs has been more than offset by the huge Adwaita widgets. It's bloody hilarious, Firefox's menubar is almost as thick as a GTK2 menubar + a relatively thin decoration just because of the huge space around the text. It's great on all the three tablets that can run Gnome and on the super high-DPI touchscreens that I presume its developers are runings. The rest of us plebs, however, have to stare at the bulkiest widgets since the days when the Industrial GTK theme was a thing.

(Certainly, that could be solved with a different them, if a different theme would work for more than three frickin' months...)

It also doesn't help that the menubar-toolbar-titlebar mix works great for full-screen windows, and anything but if you're running several non-maximized windows side by side. It's like someone shoved several small iPads on my desktop.

It's pretty difficult to even make a decent case that window decorations were broken; I find it much, much harder to make a case that this is the proper way to fix it.

Edit: it's also going to be so "fun" to get a desktop where some applications have CSDs and some don't, which is pretty much what we're heading to. Just like back in the days when Xlib and Athena widgets were a thing, I am so totally nostalgic for that.

notalaser··on Posix Has Become Outdated (2016) [pdf]
There is a great deal of effort involved in backporting updates to frequently-updated packages. Debian, for instance, doesn't update WebKit (or at least didn't last time I checked, and had a policy for it). Consequently, things like Evolution (which uses WebKit internally) are a walking CVE museum on Debian stable. The situation is similar for a lot of other packages, on a lot of other distributions with long-term support (Debian actually has a large enough community of skilled enough developers that they're faring well in this regard).

I don't want to minimize or belittle the work that they're doing, I only mention Debian because it's been my go-to distro for a very long time. They're also alleviating the problem in the most common use cases (e.g. they do update Chromium if you need a webkit browser). Codebases like WebKit's are simply too large, too complex and too quickly-shifting for a community-driven project to be able to backport fixes.

Even where the codebase is small enough, backporting is a nasty business. I've seen it done commercially, so with proper funding and proper teams and whatnot, and the success rate is not something that I'd consider encouraging. I've shot myself in the foot while doing it, too.

There are certain types of setups that lend themselves well to long-term support models. Server systems, up to a certain degree of complexity, embedded systems with a restricted set of packages -- maybe. A modern Linux desktop is not one of these systems IMO. A Linux desktop with four year-old packages is very likely to be very buggy in very nasty ways.

notalaser··on Posix Has Become Outdated (2016) [pdf]
Sadly, the choice wasn't quite mine to make, so I had to follow the regular Ubuntu releases. What can I say, I looked at non-LTS releases and looked and looked but didn't see the beta marking and I thought they were actually production-ready...

I used to run Debian stable at home a while ago and did like the stability, but the security update situation is not exactly something I'm happy with.

notalaser··on Rust on AVR: Safer microcontrollers almost here
The opportunity for off-by-one errors is at the other end of the pipe, when you grab data from that same buffer and munch it in the application. Depending on how unlucky you are, that ends up involving crap like CRs and LFs and totally sane protocols that include the header length in the byte count for some packets, but not for other packets.

It's probably not the best of examples, but the mistakes pop up the same way as for dynamically-allocated buffers -- you pick the wrong offset or count up to the wrong limit, and it doesn't make much of a difference if the buffer was statically allocated or not.

notalaser··on Posix Has Become Outdated (2016) [pdf]
Let me paint this in a more interesting colour: at $work, most of our development work is very POSIX-y software (it only runs on Linux, but historically, at least portions of it used to run on a bunch of BSDs, too, and they probably still do, but no one tried it in years). Almost no one in the office uses Unix on their computer, not even those of us who use Linux at home.

Most of us have Windows stations. We can install anything on them, but most of us didn't bother. They're glorified remote terminals anyway (the code is compiled and edited on a bunch of build servers). The servers do run Linux, but if we were to start from scratch now, we could probably pull off a decent build system under Windows as well. I'm using Emacs and relying on a bunch of Unix tools, either directly (grep) or indirectly (cscope through xcscope), but my colleagues who use Eclipse wouldn't feel much of a difference if the servers ran Windows.

I used to run Linux at my previous $workplace, but I definitely lost more time than my employer would be comfortable knowing disentangling things that regularly broke after updates (mostly Gnome- and systemd-related, really, but thanks to xdg's lovely practices, using a Linux system without something that can perform the black magic associated with sessions, seats, file associations and whatnot is very unpleasant).

My Windows laptop hasn't crashed once, the applications I need haven't broken once, and I haven't had to do the restart your computer to install this driver dance at all, I literally started it and hacked away. Plus, doing systems programming on a Windows system isn't all that bad, thanks to Dave Cutler and his colleagues being brilliant engineers.

I'm torn about using Windows at home, largely because I now have fifteen years' worth of BSD and Linux-managed files and countless convenience scripts to migrate, because I don't really trust Microsoft and because I think fighting my OS so that it will stop giving me ads and sending my stuff to Redmond is about as productive as wrestling with a modern Linux systems' innuvashon. But, much unlike 15 years ago, I probably could.

> my home office where I keep an Octane for nostalgia's sake, and the wife has her old SPARCstation.

I wish I had neighbours like you :-(

notalaser··on Rust on AVR: Safer microcontrollers almost here
Bugs that occur due to dynamic memory allocation and freeing are definitely not a concern for 99.99% of well-written embedded software. We avoid dynamic memory tricks not because of memory size constraints, but because it makes verification difficult and introduces additional uncertainty in the program's behaviour and timing. Even in systems where there's plenty of memory to support it, dynamic memory allocation is done sparingly -- sparingly enough that it can be properly managed via code reviews and the like.

Real-life, but somewhat extreme metric: in my last project, there were two instances of dynamic memory allocation, in about 100k lines of code, and both were in third-party code (we could have replaced them but you know, not broken, nothing to fix). At the other end of the spectrum, I think we had about one dynamic memory allocation at every 6-700 lines of code, but almost all of them were confined to a single scope, and they were largely due to code smell. (Edit: I think at one time we got really pissed when we saw how out of hand it had gotten and we went back and replaced most of these occurences, but I don't remember the metrics.)

In any case, lifetime management at the lexical level should not be a problem in most embedded applications, because there should not be much lifetime to manage. By "lexical level", I mean "things that are exposed to the language and manipulated through its primary means" -- variables, functions and so on. (Edit: there are legitimate exceptions to "should not be much lifetime to manage", but they are very few; the non-legitimate ones are in code of such poor quality that Rust won't help: what those codebases need isn't a new language but different managers, different programmers, or both.)

Unfortunately, this retains a whole class of errors that, to my knowledge, Rust (or any other language, frankly) can't manage. Off-by-one errors, for instance, can be handled if they occur at the end of the buffer (because you'd be spilling out of the container) but there's no way to handle off-by-one errors inside a buffer (you meant to say "read from the beginning of the buffer up to the last character that's been read from the serial line" but you actually ended up including one more character because you wrote off + 1 instead of off).

It's still up to the programmer to manage these things, and sloppy programmers will still write sloppy code that does this sloppily.

However, and this is a very big and very important however, we're talking about a level where any kind of additional safety helps. Returning to the previous example, off-by-one access errors inside a statically-allocated buffer are generally easy to spot and get caught very quickly during QA (since ooh, let's look at the buffer is the first thing you say when you get a bug about repeatedly garbled data when reading data from the serial interface). Off-by-one access errors outside the buffer (accidentally zeroing all the TX buffer, oh, and the first byte of the structure next to it that's used by an entirely different module) are the icky ones that sometimes fly under the QA radar for months.

I don't think the safety gains are on the level that the Rust fandom expects, but no one in their right mind is in a position to not welcome them. No, Rust won't solve everything, and bad programmers will continue to productively shoot themselves in the foot in Rust, too, just as they can productively shoot themselves in the foot in pseudocode. But for people who realize that there's a pretty big chance their next bug is going to get somebody killed, anything that reduces the bug population is a welcome addition.

tl;dr In most embedded scenarios, this will help less than the Rust community wants to think, but enough that sane people welcome it!

notalaser··on Is the Linux Desktop less secure than Windows 10? [pdf]
Baloo, KDE's indexing engine is apparently hit by the same vulnerability that hits Tracker (except they didn't fix it, according to the article). Also, are you sure Firefox and none of the KDE applications are using gstreamer for the backend (e.g. for HTML5 videos)?

I dislike this idea that the Linux desktop is all Gnome and systemd, too, but the situation is pretty disastrous. Things that have an X in them, from X11 to (especially...) XDG shouldn't be trusted too much...

notalaser··on Is the Linux Desktop less secure than Windows 10? [pdf]
Unfortunately, while SELinux itself is good, the tooling around it has to be the most atrocious, useless steaming pile of thrash in this niche. From setroubleshootd randomly deciding to eat up 100% of CPU time (and no one being able to explain exactly what it does) to the endless fun of figuring out what policycoreutils-python & friends do and how, actually doing something useful with it is somewhere between "painful" and "frustrating". If Microsoft had published something like this, they'd have been the laughing stock of the whole Linux community.

I don't know anyone in my immediate circle of peers - not even people who use SELinux on servers or in products that they develop - who doesn't disable SELinux on their desktop. They're not idiots, either, nor re-booted Windows programmers that the IoT and DevOps craze has thrown into the Linux world, many of us have been using Linux since back when there was no E in RHEL.

notalaser··on Use of Ad-Blocking Software Rises by 30% Worldwide
The guys who spent money building on, say, the Colossus of Rhodos, on the development of scientific instruments and the pursuit of science itself, and generally, in every aspect of science and culture would beg to differ.

Besides, nobody is bashing advertising because it's advertising things. We're bashing that advertising activity that's based on lies and deceit -- you know, like the flashing neon signs that invite you to buy this pill that's gonna make you beautiful like the other girls and it's basically half a gram of sugar mixed with ten grams of Matcha tea, and the sort of dubious activity that it mixes up in this scheme, like user tracking and outright malware (remember Forbes' blunder?). And I'm not even going to get into the part where it advertises stuff like cigarettes (and I'm a smoker, I'd just rather not see this vice being frickin' advertised!). I have every intention to keep bashing this shitty industry until it grows a spine.

notalaser··on What Is the Oldest Computer Program Still in Use?
As "more recent technologies", probably not. (At least as good) as the non-native, slowly-responding, glitchy web UIs that are so hip lately, most likely yes, especially when it comes to tasks like data entry and the like.
← PreviousPage 3 of 11Next →