Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

Below you can see a traditional unix init script. It's long, but if you're familiar with shell-script you can figure out what is going on. There is a lot of redundancy here, most init scripts have a switch that runs an option based on the first command-line parameter, for example. One solution is to put common code in a function, but Poettering decided to use config files.

Let's examine the general tradeoff between putting code in a function, and using config files (a form of declarative programming). Config files are fine as long as there aren't too many special cases. If there are too many special cases, you end up with so many options and keywords that it would have been easier to just use a scripting language.

The good side is systemd saves a lot of typing. Way down at the bottom, is a unit file for the same init script. It's clearly shorter, and easier to type.

The bad side is it has arcane keywords which are are not discoverable merely by looking at the file. This is a pattern that repeats itself over and over in systemd, things are easier if you know how to do them, but the system itself is inscrutable without arcane knowledge.

Ideal systems fulfill the requirements while making it easy for those who want to dig deeper. The system opens like the petals of a rose.

Here are the major complaints he has with the traditional startup system:

* Lack of integration with kernel-level events to properly order startup.* No mechanism for process monitoring and restarting beyond inittab.* Heavy reliance on shell scripting rather than declarative syntax.* A fork and exit with PID file model for daemon startup.

He furthermore points out these problems with startup scripts:

The model of fork and exit without clear synchronization points is inherently racy, the boot model encoded into sysvinit doesn't reflect a modern system boot, and maintaining large and complex init scripts as conffiles has been painful for years. Nearly every init script, including the ones in my own packages, have various edge-case bugs or problems because it's very hard to write robust service startup in shell, even with the excellent helper programs and shell libraries that Debian has available.

Those are the main things that systemd fixes for a distro builder, and probably why so many distros have switched to systemd, because it was built for them.

OSX has an excellent inter-processing message system, part of the mach kernel (which they got from CMU). Because of this, many times processes talk to each other through the standard messaging queues. If you use a library to launch a browser window, or query wifi strength, it will communicate through a message queue (although the library takes care of the details).

The interesting thing is that launchd can open a message queue before the recipient is running. So launchd doesn't launch services until they are needed, and if they aren't needed, they never get launched. The benefit is that resources are preserved, things don't get launched until someone sends a message.

The benefit here is dependency resolution. Instead of forcing a deep calculation of what depends on what, or forcing the server script to declare everything it depends on, you can say "manage all these thousand services!" and only the few that are needed will be used, when they are needed.

Another thing I think Lennart copied from launchd is the declarative config files. You don't need to write a shell script, you merely need to indicate what should be launched, and maybe give it configuration options like "relaunch on failure" or "launch completely before receiving message." Of course, some people like config files, others prefer scripts.....that's not an argument I want to get into here, I'm merely pointing out things that seem to have come from launchd. (

What is bad:

Launchd is utterly undiscoverable. It would have been nice of them to put a README in/etc/rc/ or something saying, "hey, all your startup scripts are gone, look elsewhere."

Launchd has a complex hierarchy of directories that it searches for startup scripts. They have justifications for why, and a reason behind each one.......but justifications and reasons are not the same as good design. Every bad design decision ever made had a justification and a reason.

Seen rather a lot of the "Parents are evil because they did something wrong because they believed that something was right" meme that's going around at the moment.

Worst case: massive harassment and threats against the parents of a trans teenager who killed herself blaming their insistence on "Christian" therapy. Horrible case, entirely the wrong approach by the parents, but at the same time if the parents hadn't cared, there wouldn't have been any therapy to begin with, bogus or not. The parents were convinced by people they trusted that the wrong thing was the right thing. Screaming at them, particularly at a time when they are mourning, that they are evil and heartless is evil and heartless.

Now seeing it in the vaccine "debate". Not the only problem I'm having with the pro-vax side (Reminder: yes, I'm pro-vax, and yes, I'm in favor of it being mandatory for the obvious deadly common diseases), but there's a world of difference between a lazy parent not having their kid vaccinated because they can't be bothered, and a parent being too scared to vaccinate their child because they've heard from convincing sources that vaccinations can cause terrible things.

He said, "On my system the scripts in/etc/init.d call grep at least 77 times.... that has to be incredibly slow...., and should be rewritten in C."

You can time it yourself, with this command:

time for i in {1..77}; do grep user/etc/passwd >/dev/null; done

On my machine it takes 0.229 seconds.

Lennart didn't get the speed increase he wanted. From his benchmark report, "booting up with Upstart takes 27s, with systemd we reach 24s." This result isn't too bad: when I've made a similar mistake of writing code before timing anything, ignoring Pike's rules for programming, once I actually slowed the system down.

If you don't measure, you can't optimize.

For entertainment and enlightenment, here is a quote by Ken Thompson talking vaguely about Pike's rules for programming:

Early Unix programmers became good at modularity because they had to be. An OS is one of the most complicated pieces of code around. If it is not well structured, it will fall apart. There were a couple of early failures at building Unix that were scrapped. One can blame the early (structureless) C for this, but basically it was because the OS was too complicated to write. We needed both refinements in tools (like C structures) and good practice in using them (like Rob Pike's rules for programming) before we could tame that complexity.

DISCLAIMER: THIS CODE REVIEW IS A LONG WORK IN PROGRESS, I COULD BE COMPLETELY WRONG IN ANYTHING I SAY.

To do a proper code review, you need to understand the purpose of the code, what all the stakeholders want. From my own perspective, init scripts work fine, but since Unix companies keep trying to create new init systems, they must have different needs than I do.

Here's a list of the stakeholders. I need to figure out what their goals are.1) System admins.2) Desktop users.3) Distro builders.5) Android (if systemd turns out to be good enough).4) Programmers

My suspicion is that systemd has taken over because it makes things easier for 3.

At its core, Unix is a system for programmers. What other system comes with a compiler and multiple interpreters by default? Bash is so much more useable than DOS, or even powershell (yeah, go ahead and flame me but I'm right, Powershell doesn't even have < working). Unix was designed by programmers and for programmers.

The reason I'm talking about it is the traditional init process is incredibly discoverable. All you have to do is look in the/etc/rc directories, and you can figure out how your system boots. You can see it all. For a programmer it's easy. Poking around in the system to understand it is one thing that makes Unix great (and what I like about Slackware: the whole thing is lovingly crafted).

So that describes the approach I am taking to code review, and to the init process. Hopefully Systemd is an improvement.

Thoughts related to the Windows 10 "Desktop is a desktop, no "Start" screen" thing:

From 1984 to 1990, there was a serious debate as to which was better, the command line or the WIMP (Window/Icon/Mouse/Pointer) UI. Why? Well, because Mac OS's Systems 1-4 were user friendly in the sense people knew how to use them, but user unfriendly in the sense that they got in the way, were kludgy, awkward to use, and offered zero advantages - beyond a lack of training for users - over the command line. At best you could say some applications needed a mouse, but some, such as word processors, were actually harder to use in the prehistoric era of WIMP user interfaces than the keyboard based versions.

What changed? Microsoft Windows. From Windows 1.0 onwards, Microsoft offered a vision, initially a very, very, ugly vision, as to how a computer could be more, not less useful with a WIMP UI. The critical feature was multitasking. Windows offered a better way to multitask than command line based systems, because each Window, representing an application or document, could co-exist in the same "world", the desktop.

Windows wasn't anything like the best implementation, but it was the only implementation of the concept available on standard PCs.

When Microsoft pretty much forced manufacturers to provide Windows and a mouse with all MS DOS based computers, users had a straight choice of using one UI or the other, and they overwhelmingly chose Windows. By comparison, when GEM was bundled with many PCs in the late nineties, GEM was a nice to have that was ignored by most users (anecdotally, outside of stores, I never saw an Amstrad PC1512 running GEM in the wild, despite it becoming with it and being a major advertised feature.) GEM, a Mac OS UI clone, did not offer multitasking.

So: timeline:

1. Mac OS released around 1984. Causes schism between WIMP and command line users
2. Windows 1.0 released 1985ish. Most users recognize it's a very powerful system, but are put off by user interface and memory requirements.
3. DOS vs WIMP rages for next five years largely because Windows is crippled by other factors.
4. Finally PCs are forced to be powerful enough to run Windows in 1990, and Windows UI improved enough to be "good enough" compared to Mac OS. Everyone jumps to Windows. End of DOS vs WIMP debate.

Touch UIs? Where is the touch UI that is more powerful, as opposed to being easier to use, than the WIMP UI? It took Microsoft (and Commodore too) less than a year to come up with something that was actually an improvement on the command line having seen WIMP. It's been nearly a decade now, who has come up with a touch UI that is more versatile than a WIMP desktop?

Apropos of nothing, just some thoughts in the shower this morning: I see people getting very upset when they hear Doom being described as "3D". "It's 2.5D!" they scream, pointing out that the maps are two dimensional albeit augmented with a height map.

The thing is while I kinda see their point, it essentially puts Doom in the same category as, say, Isometric games, while Quake is in the same category as numerous 1980s Flight Simulators. And then there's "First Person" vs "Third Person" where, again, the latter is so overly broad that it puts, uhm, a lot of isometric games in the same category as modern 3D games that are clearly "nearly" FPS but with a view of the protagonist.

Me, I'm kind of wondering if any of it is ever going to be anything but misleading anyway. 3D Monster Maze (for the ZX81), Hired Guns, the various flight simulators, Quake, Doom, Wolfenstein... all with slightly different takes on technologies that were ultimately trying to converge on the idea that you could see something broadly real, rather than an abstraction. The classifying makes it harder, not easier, to see the leaps forward each type of game engine made.

GamerGate targeted the most active editors on the Gamergate Controversy article for abuse for several months. They also abused the article itself, inserting blatant violations of WP:BLP (the policy that stops the Wikimedia Foundation from being sued for libel every five minutes) During this time the trolls, in parallel, continually leveled complaints at the relevant Wikipedia admin authorities.

Finally, the combination of forum shopping and driving well meaning editors into the ground has paid off: the vast majority of editors in question are to be banned not just from editing the GamerGate Controversy article but from even discussing gender related issues on Wikipedia. Some token throwaway accounts on the GG side are being banned too.

What good faith editor in their right mind will want to touch any article covering an issue affected by well organized trolls after this?

Oh, and don't expect Jimbo to step in. He's actually been telling editors being harassed to step away from the article for several months now.

The backdoor password to the constitution is "terrorism". The backdoor password to Wikipedia is "Civility".

It's kind of annoying that when there's an active hate campaign against a group of people you're largely sympathetic to, it becomes harder to call out abuse and extremism by individuals within that group lest you play into the agenda of the hate campaign.

Another way of saying the same thing: GamerGate and similar mobs make it hard to have rational discussions about anything.

(If you're after specifics, no, I won't give any directly, the nearest I'd mention is that I thought Pax Dickinson was treated abysmally back when he was essentially fired for alleged over-enthusiastic dudebroism.)

The legal right to be offensive aside (and likewise the right to be offensive without suffering death or severe violence), which is an entirely different issue and one I wholeheartedly support, I'm not going to promote punching down and re-enforcing hatred simply because terrorists brutally attack and murder some people who are doing that.

And the fact such an act has been perpetrated may mean condemnation from me, but it doesn't mean I'm going to lionize the victims or even worse promote their rotten cartoons.

You cannot attack extremism with extremism. It doesn't work that way.

Also as a former resident of Britain, which had plenty of Christian terrorism while I was living there, and which was subject to, albeit overseas, Jewish terrorism a mere 35ish years before I was born (interestingly by groups so nutty that they even, on occasion, sided with Nazi Germany seeing it as "less terrible" than the colonial British Empire), can we cut out the "Islam has a special problem" crap?

(Not that I'm saying religion can't be peaceful, Buddhist terrorists are fairly rare for example, though not non-existent, but Islam doesn't seem to be worse historically than any other Judao-Christian movement. It's just large right now, and over-represented in areas currently ruled by corrupt dictatorships propped up by the West and countries that are former examples thereof.)

Unfortunately third party support for it sucks. It's the AmigaOS of tablet operating systems, kinda sorta. Hey, Microsoft, have you heard of this new, 30 year old, technology called MVC? Developers love it, and it makes it relatively easy to produce frameworks that allow completely different user interfaces that use entirely different paradigms to be targeted by the same application. There's another company that makes both desktop and tablet operating systems (ironically, currently not merged though apparently from the same code base) that supports MVC quite heavily. Can't remember their name though...

It'd be nice for a FOSS equivalent of the "Tablet + Desktop" system Microsoft is doing, vs "Let's try to create a merged interface that sucks" approach of Ubuntu and GNOME. I would have been very happy with a Ubuntu for Android system, but Ubuntu and Google never seemed to go anywhere with that one.

systemd - think it's a good idea. init sucks. init scripts suck. I mean, have you ever written one? Something that uses cgroups to track and manage daemons seems an unbelievably great idea.

Slashdot Beta - For as long as I can remember, Slashdot's commenting system has been broken. Now they're trying to fix it. Not perfect, but seems in line with what others are doing successfully. If they can get it feature complete, it'll definitely be an improvement.

xfinitywifi - What a great idea! Comcast, you guys need to provide those of us who don't rent your routers with a free box that, without interrupting our networks, provides an xfinitywifi connection. Costs nothing, provides a huge amount of roaming Wifi coverage, it's a great idea.

Eich? He was a dick. People had concerns about his ability to work with a diverse group, his response was to insult everyone with concerns rather than address them. He was not CEO material.

Pax Dickinson? Honestly, I think he was stitched up and shouldn't have been fired/pushed/whatever. Buuuttt.... he's now associating himself with GG, so screw him.

Not trolling (mostly) but I do seem to be at odds with most of Slashdot these days.

Really enjoying it. I got it for $15 on Steam a few days ago, a day or two before they dropped the price to $5. Yeah. $5. *sigh* Well $15 was a good price.

Anyway, if you liked 3 (loved it myself), you'll almost certainly like 4. However there's some controversy over SR1/2 and SR3, as the game changed significantly between 2 and 3. My friend who doesn't care for 3 for that reason still loves 4, so read into that whatever you want.

What is it? Well, it's a big open-world thing. SR3 was a "take over the city from hostile gangs" thing that was incredibly over the top and funny. SR4... many of the same concepts, but you're now in a simulation of a city, and you're also the President, but still a gang leader, but you have superpowers, and it's still over the top and hilarious. There's a lot of references to other games/media and there's some meta stuff in there too. I thought on reading the synopsis that it wouldn't work, but it really does. Said friend who doesn't like SR3 described it as the best superhero game out there.

Must be miserable being a female gamedev right now, but I think there are genuinely some long term positives that may come out of this - none of which, I admit, are as positive as what might have happened if a powerful minority of men weren't complete bastards.

1. Men know it's happening now.

Call it projection, call it being blind to the obvious, but if anyone had come to me in August and told me how a sizable proportion of men absolutely hate women with a passion, with the abuse being entirely one-way, I would have nodded but not understood, because I like to think there's good in everyone. I would have poo-poo'd the more extreme examples of "one or two bad apples". Now I understand. Reading prominent GamerGate figureheads writing articles like "How to rape a woman and get away with it" or "How to break a woman" (no direct links but more information on this anti-misogyny site: http://wehuntedthemammoth.com/) is eye opening for those of us sheltered behind a general assumption of human decency in most people, even the ones we see as sexist. Yes, I've worked with at least one obviously sexist co-worker. No, I thought this was just mommy issues and that the guy was OK underneath. I don't think I'd treat him the same way now.

I had no idea the situation was this bad. I had no idea such evil attracted support from such a large and diverse group of people. I know better now. I have some idea of what to say to my daughter - when she's a little older, obviously - to ensure she can defend herself when the time comes. I know what to look out for from colleagues and "friends." I know what to tell friends who deny that the situation exists.

2. More women are speaking up, and being heard

GamerGate isn't happening because misogynists are slut-shaming a female gamedev who produced a game that wasn't to their liking, it's happening because women - and men - are rallying behind her. The superficial "Actually it's about ethics in gaming journalism" trope exists because those who attempted to intimidate said gamedev out of gaming found themselves the target of an overwhelmingly negative press, with large numbers of developers and other people in the gaming industry, especially women, standing up and saying stop.

It would be nice to go further and claim that this is universal, that women are exclusively looking at GamerGate as a chance to stand up and be heard, but alas, Zoe Quinn, Brianna Wu, and others are reporting that they're talking to many women devs who have headed in the other direction, seeing GamerGate as a reason to want out and to leave. This is terrible.

Meanwhile, I wonder how many men have actually sat down and forced themselves to watch Anita Sarkeesian's videos on tropes in video games (caution: part six is actually fairly hard to watch), simply because of the controversy over the last few months? I know I did. It's hard to believe more coverage of this kind of constructive, concrete, criticism cannot lead to both less sexism in video games, and stronger, more original, video games in future.

4. Final thought

I'm not saying GamerGate is good or has been positive. It hasn't. We can choose to build in the ashes, or we can get angry about the loss of the city we once had. Or we can do both. I think I'm feeling both right now.