Hacker Newsnew | past | comments | ask | show | jobs | submit | dexen's commentslogin

At my old uni there were a couple public terminals running DOS, most of the time sitting idle at the prompt. It was bespoke kiosk cabinets only exposing keyboard and screen. One April Fool's I had the bright idea to change PROMPT to something along the lines of "This terminal out of service." - and to increase the confusion, also to change PATH to a non-existent directory, so that most commands wouldn't work and instead flash "Bad command or file name.".

For a couple minutes observed people coming up to a terminal, trying a few things, and stepping away in frustration.

I sure hope administration did restart the terminals overnight to return regular function; normal users were unable to access the power & reset controls.


In which Jerf longs for PHP. Every single point has been in, and actively used, for a long while. The __call() & friends is particularly nifty - simple mental model, broad applicability, in practice used sparingly to great effect.

All in all a very enjoyable post.


>printing also will likely impact timing and can change concurrent behaviour as well.

I've had a bug like that and the intuitive way to handle it turned out to be entirely sufficient.

The bug (deep in networking stack, linux kernel on embedded device) was timing sensitive enough that printk() introduced unsuitable shifts. Instead I appended single-character traces into pre-allocated ring buffer memory. The overhead was down to one memory read and two memory writes, plus associated TLB misses if any; not even a function call. Very little infra was needed, and the naive, intuitive implementation sufficed.

An unrelated process would read the ring buffer (exposed as /proc/ file) at opportune time and hand over to the developer.

tl;dr know which steps introduce significant processing, timing delays, or synchronization events and push them out of critical path


>I appended (...) traces into (...) memory. (...) An unrelated process would read (...) at opportune time and hand over to the developer.

I did something similar to debug concurrent treatments in Java, that allows to accumulate log statements in thread-local or instance-local collections and then publish them with possibly just a lazySet():

https://github.com/jeffhain/jolikit/blob/master/src/main/jav...


>government getting private property snatched in transit by extending letters of marque to ISPs

Yep, that is piracy indeed, even if done under the figleaf of "privateering".


For sake of example: a "locale-aware" number conversion routine would be the worst possible choice for parsing incoming network traffic. Beyond the performance concerns, there's the significant semantic difference in number formatting across cultures. Different conventions of decimal or thousands coma easily leading to subtle data errors or even security concerns.

Lastly, having a simple and narrowly specified conversion routines allows one to create a small sub-set of C++ standard library fit for constrained environments like embedded systems.


I get that. However then they should name the function and put highly visible disclaimers in the documentation. Something like "from_ascii" instead of "from_chars". Also the documentation, including this blog post should be very clear that this function is only suitable for parsing machine to machine communications and should never be used for human input data. There is clearly a place for this type of function, however this blog post miscommunicates this in a potentially harmful way. When I read the post I presumed that this was a replacement for atoi() even though it had a confusing "non-locale" bullet point.


>Unless it's one of those cursed things installed at the customer thousands of miles away that never happens back in the lab.

I had a bug like that in my previous (telcom embedded dev) career. Ended up driving to the customer premises (luckily mere 200km), working two weeks on collecting traces for the repro, and a day on the patch. Once I figured out how to trace the repro, the rest was trivial - the bug was glaringly obvious in the trace. Which in hindsight means I didn't really need to drive there at all, I merely needed to properly implement tracing the repro, and send the built artifact to the customer.

The problem would have been trivially solved if I had sufficient experience with tracing, or found a colleague with sufficient experience. However this one time the experience was bought & paid for with the trip.


> Which in hindsight means I didn't really need to drive there at all, I merely needed to properly implement tracing the repro, and send the built artifact to the customer.

In the alternate reality where you chose not to drive there, you'd now be complaining how it took 3 weeks to troubleshoot with the customer and how you should have really driven there instead.


The brevity carried over to Plan 9. Re-posting my older comment (https://news.ycombinator.com/item?id=4023385):

http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs follows the Unix philosophy. A lot of legacy has been shed. I can count 13 options to ls, 11 options to sed and just 5 to sed.

The standard Plan 9 shell, Rc, is described in mere ~500 lines of manpage, while Bash takes whooping ~5400 lines.

Oh, and there is no `dll hell' in P9 :-)


To further expand upon this, quickly ascending to high altitude (flying airplane or balloon) after diving is also dangerous, for the very same reason. Pilots are trained to wait out at least 24 hours after a dive, or at least 12 hours if the dive didn't require decompression steps.


Author states "i feel disrespected in my own ~home.". And funnily enough "~" is exactly what he's looking for:

    df -h ~


It is sad to see the correct reply grayed out. This kind of regulation is known to breed corruption & abuse, tilting the field heavily towards the highest spenders. Can only be enacted when ideology trumps well established knowledge & experience.


Zürich resident here. In this specific case the abuse is even pretty openly stated :(

> The Supreme Court’s ruling cements a decision to remove more than three-fourths of its once-standing 172 billboards from the town, keeping the remainder available for culture and sports ads.

By "culture and sports ads" they surely mean adverts by the government for its own subsidized services. Local government is a huge spender on billboard advertising around here, often for its own state run sports or events (invariably stuff that's popular with lefty civil service types like obscure dance performances).

Lately they also love to paint trains and trams in garish colors, in an open advert for diversity ideology:

https://www.bahnonline.ch/27379/mit-dem-zvv-gemeinsam-vorwae...

Die Farben und Formen des neuen visuellen Auftritts widerspiegeln die Buntheit und Diversität des gesamten ZVV-Netzes.

... and they don't seem to have a problem either with all the posters that get glued everywhere advertising May Day, Feminists for Anarchism and so on.

The idea cantonal governments have a problem with "visual pollution" is kind of absurd, really. If that's actually the motivation then step one would be to stop buying billboard space with taxpayer money, stop flooding the city with rainbows, clean up all the pro-Gaza graffiti and go entirely without any of that for a few years. Once they've proven they have the discipline to clean up the sort of visual pollution they themselves tend to like, then they might have a moral leg to stand on for banning other forms of advertising.


This has to be one of the stranges political segway rants I've seen on this site and that's saying something.

We can't ban billboards on Bahnhofstrasse and rest of the city just because you've seen some graffiti supporting Palestine? What?


> We can't ban billboards on Bahnhofstrasse and rest of the city just because you've seen some graffiti supporting Palestine? What?

Of all the text the op wrote that is definitely a personal and unfair interpretation and not what he written.

His point is clear: If the goal is reducing visual pollution then a state advertisement is just as polluting as a commercial one.


I see very little "state advertisements" in Zurich these days, which is why the whole post is so bizarre.


You might not be recognizing them as state adverts, because Switzerland has the largest amount of government advertising of any place I've ever been. By far. If you can't see that you're either unfamiliar with other places or not recognizing the ads as coming from the state. Recall that the definition of the state also includes government-owned companies like SBB, ZVV, EWZ, ZKB. Adverts by any of these companies is an advert by the state. That's a generously narrow definition: it's not including advertising for parties or referendum positions, which saturate billboards any time there's an upcoming vote, nor advertising by state subsidized industries like farming.

Here are some examples.

Walk down to Bellevue. Start to walk along the lake to the China Garden. You will walk past some of the most prime advertising real estate in the city. There are several billboard signs in a row right at the top corner of the lake. Highest footfall of anywhere in the city outside of Bahnhofstrasse itself. When I did this yesterday every single ad was by government, for government. For example, one of them is currently advertising the government-run Native American Museum:

https://www.stadt-zuerich.ch/kultur/de/index/institutionen/n...

Walk down the lake and you'll encounter more such billboards, all showing government ads. In fact I don't think I've ever seen a non-state advert on any of these places.

Go to a Filmfluss event. It starts with 10 minutes of ads. On Saturday when I went to a showing with my wife, I counted and around half of the ads were by the state. Amongst others: multiple recruiting ads for the Stadtpolizei, ads for ZKB, multiple ads for EWZ, ads for state-funded cultural events etc.

Get on the train or tram. Look at the billboards inside the carriage. Many of them will be ads for the SBB's own services or offers, or recruiting ads for drivers (especially popular at the moment), or the Gemeinsam Vorwarts campaign. These are all state advertising.

If you see all this and really think it's very little then I don't know what to say. Go spend some time in other places of comparable size and pay close attention to how many ads are by the state or state owned companies. It will be lower.


GP has several examples of the government itself contributing to visual pollution. Including for purposes that don't match the interests of many citizens.

I don't thinkg this should mean that ads can't be banned but the government should absolutely be called out for planning to continue its own ads.


Except that vast majority of Zurich is covered by commercial ads and they're massively visually distracting in a way the "government ads" they're trying to call out aren't.

It just has no connection to reality.


The train example is extremely visually distracting. You are free to provide examples of your own to underline your point.


You are rather self-righteous for someone that uses words incorrectly.


I love the idea of acoustic and visual hygiene, fighting the acoustic and visual pollution. The flaw is in human nature and the attitude "but _we_ are allowed, _our_ case is different". If the enforcers will be local authorities, they will be unable to resist displaying out their message. If there is at least one CHF and one person in the promotion and marketing department, the idea will pop out. Hey look at the bright side, at least they didn't cover the tram's windows!


> Hey look at the bright side, at least they didn't cover the tram's windows!

They did though, if only partially. While the parts overlapping the windows are not 100% opaque, in my experience such ads do significantly worsen the viewing view from inside the vehicles.


Interesting, thank you. Especially the point about government being a huge spender where it has reduced regular commerce.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: