HNHacker News
TopNewBestAskShowJobs

Avernar

397 karma · joined November 5, 2014

submissionscomments
Avernar··on Why do you use Firefox?
The main reason I use Firefox over Chrome is that the Chrome devs are very against users having a choice on how the browser operates. They also tend to over-engineer solutions to problems.

Here's an example. There has been a bug report asking that Chrome ask to overwrite files instead of silently adding a number to the filename. Instead of making Chrome operate like every other browser and every other program out there they instead came up with a scheme to track all file downloads in the download history and if etags and dates match to "snap" to the location where the file already exists on the user's drive.

Countless of users have said they don't want that. All they want is to be asked to overwrite. Nope, not going to happen. So give us an option in the settings. Nope. Apparently too many options is a bad thing to have.

That's why I don't use Chrome.

Avernar··on HDMI 2.1 Announced: 10Kp120, Dynamic HDR, New Color Spaces, New 48G Cable
I had to use an optical cable between my TV and AVR to get audio. The only thin ARC did was allow me to control the AVR volume control using thr TV's remote. Not very useful when no audio is coming back.
Avernar··on A flight was late because someone named their Wi-Fi hotspot ‘Galaxy Note 7’
If you announce verbally on a plane you have something that can explode even if you do not you will still get arrested/jailed.

What difference does it make that you decided to do so electronically?

Avernar··on Obscure C++ Features
More eadable as in "I can read english"? Yes.

More readable as in "I want to read code fast"? No.

I much prefer C style languages over Pascal style languages.

Avernar··on Galileo navigation satellite system goes live
Thanks, nice to know.
Avernar··on Galileo navigation satellite system goes live
While the features of IIIA are nice, it will be a while until all the existing ones are replaced by IIIA.

The more immediate nice thing about the IIIA launches are that it adds more satellites that can transmit the L2 signal. Currently there are 18 healthy IIR-M and IIF satellites which can transmit L2. I believe you need about 24 minimum for full coverage.

Once we have full L2 and we get civilian dual band L1/L2 receivers it will get rid of one of the biggest sources of inaccuracy which is ionospheric delay. A dual band L1/L2 receiver will be able to measure ionospheric delay directly. This means the delay calculated will be for that specific point instead of the area covered by a WAAS ground station. Plus you won't need a direct view of the WAAS satellites.

Avernar··on Galileo navigation satellite system goes live
As long as you have an unobstructed view of the equator. To get 2-4m accuracy with commercial GPS you must use WAAS. The sattelites that tansmit the WAAS signal are geostationary.

So if you have buildings, hills or mountains blocking your view you're back to 7-15m accuracy. It gets worse thr furer north you go as your angle to the WAAS sattelites gets closer to he ground.

Plus it's North America only. Not sure if Garmin units support EGNOS which is the system in Europe.

Avernar··on UEFI boot: how does that actually work, then? (2014)
You may not agree with me but don't call it nonsense.

From the article about the fallback path: "This mechanism is not designed for booting permanently-installed OSes."

Plus there is only one fallback path so we're back to the situation of multiple OSes fighting over the fallback path.

And from the article a disadvantage of the BIOS: "It’s inconvenient to deal with – you need special utilities to write the MBR, and just about the only way to find out what’s in one is to dd the contents out and examine them."

But now with UEFI we need a special utility to manipulate the EFI NVRAM variables. The motherboard setup only lists the names of the entries. No editing and no listing of the details.

So my criticism is valid. The information stored in the UEFI bootmanager NVRAM should have been in a file(s) in the system partition.

Avernar··on UEFI boot: how does that actually work, then? (2014)
The flaw with UEFI is that the list of installed operating systems is stored in the motherboard's NVRAM and not in the EFI system partion on the disk itself.

When your motherboard dies and you need to put in a new one, now you have to boot off a CD/DVD/USB Stick to get to the boot manager utility. Then you have to figure out the command line parameters since the first time the OS installer did it for you.

At minimum the motherboard setup menu should give you FULL editing cabability of the NVRAM variables. I should be able to add, modify and delete any and all entries without having to boot something first.

Last motherboard I tried using the efibootmgr on got bricked. And there was no way to clear it like you can with normal BIOS NVRAM.

Avernar··on Solid metallic hydrogen has been produced in the laboratory
So that's how Spaceball 1 could reach ludicrous speed. You learn something new every day...
Avernar··on 5 Simple Math Problems No One Can Solve
Solved the sofa problem getting a large couch into my basement about half a year ago. Still haven't got around to fixing the drywall...
Avernar··on CFO Backed Tips for How to Systemise Your Business
Anyone have "systemise" on their bullshit bingo card?
Avernar··on 4WD vs. AWD. What's the Difference?
In my Jeep Wrangler, I can instantly tell I forgot to switch from 4WD to 2WD as I turn onto pavement from a dirt road.
Avernar··on Microsoft REST API Guidelines
All those examples are hard coded algorithms in the bulk copy category. They pretty much just use the GET method to download all or a specific subset of a site.

To truly drive a REST API requires a human or an AI. The AI doesn't need to be human equivalent, just smart enough to inteligently interpret the hypermedia. If the API changes the AI would be able to adapt.

I'm talking about the complexity of the computer on the Enterprise in ST:TNG. You give it a command and it figures out how to go about solving it.

Avernar··on Building a C Compiler Type System – Part 1: The Formidable Declarator
That's why I declare pointer variables one to a line. Wish the language would work the other way with the asterisk associativity. Mainly because this just looks wrong to me:

  int *p, *q;

  typedef int *intp;
  intp p, q;
That just screams that the * belongs to the type and not the variable name.
Avernar··on Apple Fires Back at Spotify for Asking for 'Preferential Treatment'
Not disagreeing with you. But those people had a choice and they chose a subsidised and/or cheaper phone that was locked down.
Avernar··on Apple Fires Back at Spotify for Asking for 'Preferential Treatment'
For the carrier specific models, yes. But you can get a non-carrier specific one.

Nexus models get updates direct from Google. Otherwise you have to wait for the manufacturer to do their customizations.

Or you just install one of the many other firmwares out there.

Avernar··on Apple Fires Back at Spotify for Asking for 'Preferential Treatment'
I think he meant cell carrier, not ISP.

But I disagree with him on this one. I'm glad Apple was able to get "special treatment" for many things from the carriers. They were more draconian than Apple with their rules.

Now Android can also install firmware and applications without the carriers saying no so that was a good thing.

Avernar··on The Elevator Button Problem
> no more pranking anyone by pushing all the buttons (because you can only do that while waiting for one and the system will dispatch the demanded floors to the pool)

While it would stop pranking it opens it up to denial of service. Most new elevators don't let you select more floors than the persoson capacity of the cab. With the external keypad system someone could hide on a floor with nobody around and keep entering floor numbers.

Incidentslly, I was on a full elevator when a kid pressed all the buttons and ran out (this was before the protection I mentioned became popular). I could hear the groans of my fellow passengers. Fortunately I was shown a trick by an elevator tech for that brand a few weeks ago. I held the door open and reached up and tripped the door switch. All the lit buttons went out and I just aelected my floor again. Got a round of thank yous as everyone else selected their floor again.

> you can't change your mind once you're in. Best case is you can stop at an intermediate floor if someone is going there or called the elevator.

That could be rage inducing. Imagine forgetting something in your car and being stuck going up to the top of a very tall building. And then going all the way back down.

There really should be a button for "let me off at the next valid floor". I'd hate to be stuck in an elevator when someone gets sick and has to hurl or worse shit their pants.

Avernar··on The Elevator Button Problem
> There's nothing to stop you contradicting yourself by indicating a different direction of travel. Which makes you wonder why you had to indicate the direction in the first place.

You had to indicate the direction in the first place because the system can give you a cab that's already going in that direction. Even if nobody is in the cab it may be going to another floor that someone has pressed the call button before you. If you press a button for the opposite direction it will still go in it's original direction.

Eventually it will change direction and go your way but that just ensures you'll spend the maximum time in the elevator. During your ride in the wrong direction another cab may have freed up or there could have been one already free but a few floors further than the one going in the other direction.

That's also why elevators have the up and down lit arrows at the top of the door to indicate which way it's going. This keeps you from getting on one going the wrong way if it come to your floor first to either drop off or if both call buttons were pressed.

Avernar··on South Korea: The Truth about the Dog Meat Business
And there is still one tribe of people that are canibals. But that's just a cultural issue the rest of the world has with the tribe, but seriously, what's the issue other than they're people in almost the entire world and a protein source in the other?

Just as pretty much everyone has an issue with canibalism, the west has an issue with people eating dogs. It has nothing to do with anthropomorphism. We are not attributing human behaviour or charactaristics to the dogs. The dogs do in fact posses many traits that make them a companion animal and not a food animal.

Avernar··on UTF-8 Everywhere (2012)
Bad example. If you want to embed that string in your code you have to type those 6 characters anyways.

A better example is if you want to find a newline in a string. If you do a find it in a UTF-16 string it may be position 8 and a find in UTF-8 may be position 12. Does it matter what the actual number is? NO. You just pass it to the next function or whatever.

Avernar··on UTF-8 Everywhere (2012)
Why? Why should it be conceptually different if it's easy to work with the encoded form?

Many unicode languages work with UTF-8 or UTF-16 internally. So working with the "transfer format" is common practice.

While it may not be necessary to know who the languages your program in work under the hood, expert programmers do want/need to know. That way they can write better code, or switch to another language or get the language devs to improve their internal handling.

Avernar··on UTF-8 Everywhere (2012)
That's what they were hoping for. Didn't tuen out thst way. From icu-project.org:

"As with glyphs, there is no one-to-one relationship between characters and code points. What an end-user thinks of as a single character (grapheme) may in fact be represented by multiple code points; conversely, a single code point may correspond to multiple characters."

Avernar··on UTF-8 Everywhere (2012)
> Clear win.

I'd call it a slight improvement. And after the major step back of using 2 to 4 times more memory for strings I'd call it a net loss.

> A code point string has other niceties, like being indexed by simple integers.

Again, no benefit of this. The only argument I've heard here is to prevent bad slicing and I've shown a way to prevent that.

> Also, we mustn't lose sight of what the T means in UTF-8: transfer. It's not called UPF-8 (the Unicode processing format in 8 bits).

By this argument we can't use UTF-16 or UTF-32 for internal processing of strings either. Back to code pages then.

Avernar··on UTF-8 Everywhere (2012)
> Plain text is friendly towards developers. But it’s neither interop-friendly nor user friendly.

Kind of got off track here. You can process a lot of formats as text (html, css, xml, etc). So a BOM there is unnecessary and sometimes detrimental. On the unix side there are a lot of text utilities that do useful things that you can do on these formats. That's probably why BOMs are non existent there.

> MS can’t change the compiler because backward compatibility.

You care to tell MS that? Every single time I've done a major VS upgrade my code had to be changed because something that was valid before stopped being valid.

> And there aren’t any.

If you can't see any benefit of using UTF-8 then I'm done debating with you.

Avernar··on UTF-8 Everywhere (2012)
Looks like Javascript source code is required to be processed as UTF-16:

ECMAScript source text is represented as a sequence of characters in the Unicode character encoding, version 3.0 or later. [...] ECMAScript source text is assumed to be a sequence of 16-bit code units for the purposes of this specification. [...] If an actual source text is encoded in a form other than 16-bit code units it must be processed as if it was first converted to UTF-16.

Avernar··on UTF-8 Everywhere (2012)
State machines would have to operate on the byte level. Otherwise each state would have to have have 65536 entries per state. The trick to handle UTF-8 would be to have 0-127 run as a state machine and > 127 break out to functions to handle the various unicode ranges that are valid for identifiers.

For languages that only allow non ascii in string literals a pure state machine would suffice.

Not sure why you're mentioning parsers. At that point you you're dealing with tokens.

As for UTF-16 it's an ugly hack that never should have existed in the first place. Unfortunately the unicode people had to fix their UCS-2 mistake.

Since Javascript is standardised to be either UCS-2 or UTF-16 it probably made sense to make the scanner use UTF-16.

Avernar··on UTF-8 Everywhere (2012)
Upvote for that comment.

The stuff I've seen in some people's multithreaded code just makes me want to cry.

Avernar··on UTF-8 Everywhere (2012)
> I get your point, it just doesn't apply to many real world situations I've seen where you don't have the luxury of just using a higher level language or a library that takes care of all these things

No, I still think your missing some of it. I am not advocating that what I said is the solution for everything.

Someone said that slicing UTF-8 strings leads to string corruption and endorsed the Python 3 frankenstien unicode type as a way to avoid it. I just gave a way of preventing that.

Now you argued that a novice programmer would fail to implement it properly. So you're comparing my method implemented by a novice programmer to a method implemented by profesional compiler writers. That hardly seems fair. :)

So my argument is that if my method were to be implemented by professional compiler writers it would prevent corrupted strings while still using UTF-8 as the internal representation.

> I basically undid all his changes, and wrapped all COBOL string splicing to call a function that always split a string at a valid position - truncating invalid bytes at the start/end as necessary.

> luckily for them they'd accidentally hired someone who had done lots of multilingual programming before.

So an expert programmer implemented a string splitting function that didn't corrupt strings. :D

> but even you made a mistake in your first example of what to do

I writing this on an iPad while watching TV and playing a game on another android tablet while looking at the wikipedia UTF-8 article on a tiny phone screen while a little white dog is trying to bite my fingers (wish I was making this up). Not exactly my usual programming environment. ;)

← PreviousPage 5 of 9Next →