HNHacker News
TopNewBestAskShowJobs

maggit

1,755 karma · joined October 14, 2008

https://magnushoff.com
submissionscomments
maggit··on This should never happen
To elaborate a bit, in C++ the relevant exception class is called `std::logic_error` (contrast with `std::runtime_error`). I like it. It is a bit more descriptive of the actual situation than "this should never happen".
maggit··on Why I stopped using StartSSL (Hint: it involves a Chinese company)
Can you pin leaf certificates?

Quoting https://developer.mozilla.org/en/docs/Web/Security/Public_Ke...:

> Firefox (and Chrome) disable Pin Validation for Pinned Hosts whose validated certificate chain terminates at a user-defined trust anchor (rather than a built-in trust anchor).

I understand this as "when using HPKP, you have to pin a CA certificate, not your site's leaf certificate". If this understanding is correct, I think your comment about HPKP is wrong and it is in fact a good idea to use a CA you find trustworthy and pin its certificate. Agree?

maggit··on Rust 1.5
You can certainly try it out for web applications. It has shortcomings, but I assume that by "try Rust" you don't mean "immediately develop something for production"? :)

I have a deamon running that does a specific reverse proxy thing. I wrote it in Rust, and that has been a very pleasant experience. For example, the excellent support for serialization and deserialization makes working with JSON a breeze :)

maggit··on Fwupd: Updating Firmware in Linux
> By default, any users are able to install firmware to removable hardware. The logic here is that if the hardware can be removed, it can easily be moved to a device that the user already has root access on, and asking for authentication would just be security theatre.

- http://www.fwupd.org/users.html

But it is not given that a user has physical access to the machine, is it?

Well... I guess that's why it says "By default", and you can configure it? Seems targeted at desktop installations?

maggit··on GNU Guile site redesign
I don't think it is simple to do successfully, but it is certainly a way to make difficult stuff more approachable. If you want to convey difficult stuff, you should make it approachable. Feynman, for example, was a master of using simple words to explain complex matters. We should try to do the same with graphic design.

(Carbonmade seems maybe to have aimed for "childish" rather than "simple", though, turning at least me a bit off)

maggit··on Facebook is able to identify music and TV when writing status update
I am currently running Android 6 (Marshmallow), the official version pushed to my phone as an OTA update, and I am able to turn on and off individual permissions for apps. When installing a new app, it initially has zero permissions enabled.

Let's see how this works in practice, but so far I am hopeful that this is in fact solved in Android. (Modulo actually disseminating the fix)

maggit··on Python bytecode is heavily trusted by CPython
Isn't Google's Native Client exactly an example of a safe bytecode? Moreover, it is a safe subset of an already existing really large byte code language (x86 machine code), which inspires me to believe that it should be possible to identify similar subsets that are statically verifiable for other, especially simpler, byte code languages.
maggit··on Mattermost: Open-source, on-premises, Slack alternative
Slack "supports" IRC in that you can allow IRC connections, and then people can connect to your Slack instance via IRC. This might also be the case for some of the alternatives.

And it's a pain in the neck! It means that some of the participants in the channel are not able to read what's happened while they were away. Some of them get encoding errors. The IRC people do not get the same graphical elements as everybody else. They can't use custom /-commands.

In conclusion, in order to communicate the most effectively, you have to know who's on IRC and think about the differences in user experience for these people versus everybody else.

IRC has weaknesses (namely lack of centralized logging and unspecified text encoding) and fixing these weaknesses means forgoing support for existing IRC clients.

maggit··on Gradify turns the most prominent colors in an image into a CSS gradient
Is the author of this around? There's a rather prominent spelling mistake in the first sentence; it says "prominant" where it should say "prominent" :)
maggit··on The Making of Lemmings
I remember it was possible to play Settlers 2 in two-player split screen with two mice in DOS, and it seems possible to recreate in Dosbox: https://www.youtube.com/watch?v=Vfpx0siF5TU

If I remember correctly, the trick here was to not start the mouse driver (mouse.com), but let Settlers' internal mouse driver have control :)

I have no idea about two player Lemmings in DOS. I have never played it, at least.

maggit··on Computing at the speed of light
I'm unsure of what you mean to be confused about, but maybe I can attempt to clear it up anyway.

There are both kinds of waves.

Sound waves, propagating from mouths and into ears, and waves in a spring along the direction of the spring, are longitudinal: http://en.wikipedia.org/wiki/Longitudinal_wave

Electromagnetic waves (in an appropriate physical model) and waves on the ocean are transverse: http://en.wikipedia.org/wiki/Transverse_wave

maggit··on Norwegian butter crisis (2011)
Cream was more available than butter. I guess most people would rather drive to Sweden than whip cream.

However, cream was also in high demand for Christmas, so I suspect that it couldn't offset much of the demand for butter anyway.

maggit··on Google Sued by Job Candidate for Age Discrimination
Is it a trend? Note that this is the Wall Street Journal. I think they are targeting a readership that is particularly interested in stock information.
maggit··on The state and rate of HTTP/2 adoption
As I've heard it explained, the server will push what it thinks is relevant [1] and if the resource is already cached in the client, the client will ask the server to stop the push.

The relevant mechanism seems to be described here: https://http2.github.io/http2-spec/#PushResponses

[1]: By some criteria. I don't have details here.

maggit··on Paradoxes That Threaten to Tear Modern Cosmology Apart
> If quantum mechanics makes Newtonian mechanics (NM) "obsolete", then what does that imply for Special relativity (SR)?

Ah. That's unsatisfying :)

It would be super satisfying to have one coherent theory of everything. [1] Why hasn't anybody thought of that before? ;)

[1]: And then, again, it is of course useful to have efficient ways to work within subsets of the grand theory, such as NM.

maggit··on Paradoxes That Threaten to Tear Modern Cosmology Apart
(Disclaimer: I don't know Special relativity, so I might make mistakes that betray that fact ;)

We are certainly in agreement about the facts of the matter :)

The thing I find unsatisfying is specifically the phrasing "Newtonian mechanics breaks down". Breaks down how? Breaks down why? "There is a regime (...), which is determined by the Planck constant." to me reads like, and I am adding color here for effect, "The governor has decreed that on Mondays, Quantum Mechanics shall be in effect. All other days are to be executed with Newtonian mechanics only, except when Max Planck has a belly ache!"

You make it look like QM is a special case of NM, while in reality, QM describes all the phenomena that NM does, not the other way around; NM is a special case of QM. I'm trying to explain it that way instead:

Quantum mechanics is correct. Always, always, always[1] use Quantum mechanics!!! Newtonian mechanics is obsolete!

[1]: Well, this is where my lack of knowledge about Special relativity comes in.

PS: Did you know that in specific circumstances you can use these much simpler formulae instead: (...), and the error is within these totally acceptable bounds: ... ?

PPS: Did you know that these simplified formulae were already known under the silly name "Newtonian mechanics"? The more you know! :)

The reason that I am adding it as a comment is not to correct you -- you are already right -- but to maybe help other readers. QM vs NM did not sit right with me until I understood that NM's equations actually fall out of QM's equations in specific, nameable, circumstances :)

maggit··on Paradoxes That Threaten to Tear Modern Cosmology Apart
> we can't measure what we don't know.

I guess another interpretation of that statement is more along the lines of "We can't measure how much we are currently unaware of", which seems to make more sense.

----

> But one should say: There is a regime where Newtonian mechanics breaks down and Quantum mechanics governs, which is determined by the Planck constant.

I find this completely unsatisfying. I used to think that a theory is either proven wrong or not proven wrong, and Newtonian mechanics is proven wrong. However, I got a new confidence in Newtonian mechanics when I had explained to me that Quantum mechanics yields Newtonian mechanics in a make-believe world where Plack's constant is exactly zero. So, while Newtonian mechanics is proven wrong, it is also (nearly) identical to our best current theory in many circumstances.

That is: According to Quantum mechanics, Newtonian mechanics is correct within the bounds of this exact forumla: insert super complicated formula here

In yet simpler terms: Newtonian mechanics is Quantum mechanics (except that it is always off by a miniscule, totally ignorable, amount. Except in extreme circumstances)

maggit··on Plan 9 from Bell Labs
Your comparison to OS/2 may be apt. The details are a bit murky for me, but as far as I can tell from Wikipedia[1], OS/2 3.0 was at some point simply renamed to Windows NT, which of course is the underlying technology for Windows as we know it today.

That is; Plan 9 is a research project and it is relevant the way research is relevant: For the future.

[1]: http://en.wikipedia.org/wiki/OS/2

maggit··on What does the NSA think of academic cryptographers?
It is presumably being down-voted because it is off-topic; This is not a post about web design.

Sure, CSS is on-topic on HN, just like this article about cryptography is on-topic. However, commenting on the HTTPS certificate particulars of a site with a blog post about CSS would be similarly off-topic in a discussion about that blog post :)

(Personally, I am on the fence about the appropriateness of the comment, but I hope I have shed some light on why others would down-vote it)

maggit··on Google Inbox
An unfortunate reality is that IMAP is a really bad protocol. I encourage you to try implementing a client to get a feel for how difficult and quirky the protocol is. (Be sure to try implementing IDLE)

I'd love to see a better base protocol with a clean extension mechanism and a culture of documenting and publishing such extenstions. One can dream :)

maggit··on Drug cheats in sport could benefit 'for decades', scientists find
Hmm, let me try to make my point clearer.

What's happening now is a competition in taking the most drugs while avoiding getting caught. The possibility of getting caught limits what you can do. Isn't the idea here to remove this limitation, to open up for experimenting with more things? This is certainly a good way to find out how to manipulate human bodies with drugs, but it does seem to be at the (cynical) expense of the guinea pigs.

maggit··on Drug cheats in sport could benefit 'for decades', scientists find
I know there's a lot of "drugs aren't that dangerous" and "certain currently illegal drugs are entirely risk free" sentiment on this site, and there's probably some truth to it.

However, organizing world wide sanctioned competitions in who can take the most drugs (the most advanced, the most risky, the largest volume) is bound to lead to horrible results for most of the participants.

maggit··on Poll: Did you “drop Dropbox”?
I would have loved to switch away from Dropbox (for example because of Rice, but also because of NSA), but I haven't been able to find anything that works for me with as little hassle as Dropbox. Lock-in by delivering a superior product. Those bastards.
maggit··on NASA’s Balance Mass Challenge
> The most expensive rare earth element you can currently send to Mars is platinum (...)

> All other things you could send either decay quickly (platinum) (...)

I don't understand. Did you mean platinum in both places? In that case, I got confused by the "other". Or did you mean something other than platinum in one of the cases? Or am I just failing to comprehend? :)

maggit··on Moto 360 review
Maybe it is not always on after all:

"One of the cool things about Android Wear smartwatches so far has been the always-on dimmed mode, so you can always flip up and see what time it is. The Moto 360, however, doesn't roll that way. When the screen's not on, the screen's not on. The one exception is when it's on the dock, charging." - http://www.androidcentral.com/moto-360-hands-redux

maggit··on Moto 360 review
From what I gather, it is always on. Do you have a citation to the contrary?

"Like both already-released Android Wear watches, Moto 360 will feature an always-on screen, which is a power-saving dimmed display that still tells the time like a traditional watch." - http://www.techradar.com/news/portable-devices/moto-360-rele...

maggit··on Gamma error in picture scaling (2007)
> Also, forcing the user to include manual gamma correction for a format that already has a known gamma curve is not ideal.

To this point, ImageMagick has built in understanding of colorspaces:

    convert lama.jpg -colorspace RGB -resize '50%' -colorspace sRGB slama.jpg
In English: Read lama.jpg, convert it to a linear RGB colorspace, rescale to 50%, convert it to sRGB, write to slama.jpg

This is apparently also covered in the article, more as an aside, but it should be the first and foremost way to do it with ImageMagick.

maggit··on The unified control group hierarchy in Linux kernel 3.16
I had no idea what a control group is, so here is a short summary for others in my position:

- cgroups (abbreviated from control groups) is a Linux kernel feature to limit, account, and isolate resource usage (CPU, memory, disk I/O, etc.) of process groups.

- Various projects are using cgroups as their basis, including Docker

http://en.wikipedia.org/wiki/Cgroups

maggit··on Technical preview of Kubuntu Linux ISO with KDE Plasma 5.0
shadeslayer, how about a PPA for testing Plasma 5 in Kubuntu 14.04? I'd love to try it, but rebooting seems a great inconvenience :)
maggit··on TinyGL: A Small, Free and Fast Subset of OpenGL
Related, and also interesting (especially as a response to "TinyGL is a lot faster than Mesa"), is Mesa's llvm rendering backend llvmpipe. It compiles the rendering pipeline to llvm bitcode which is then compiled to machine code. It makes use of multiple CPU cores and SIMD instructions. The result is surprisingly quick software rendering of anything OpenGL.

Key differences to TinyGL: Mesa llvmpipe implements "all" of OpenGL and GLES2 (That is, everything that is implemented in Mesa works with this backend) and the rendering is accurate.

I have not done a head-to-head benchmark, and I don't think it would be that interesting since the two libraries are from entirely different ages.

The existence of llvmpipe was part of the rationale for Qt5 to require OpenGL (GLES?) for rendering [1]. Qt5 has no other rendering backend.

[1]: I remember this from the beginning of Qt5 development, which is so long ago that I have a hard time finding a quotation. Maybe I can use this Phoronix article as backup: http://www.phoronix.com/scan.php?page=news_item&px=MTA5ODc "The Qt developers praised the CPU-based Gallium3D driver and will be relying upon LLVMpipe when no GPU hardware driver is available. They say that using LLVMpipe is working better than any software rasterizer of their own. " "LLVMpipe remains too slow for OpenGL gaming (...), but it's good enough for a tool-kit and composited desktop."

← PreviousPage 4 of 11Next →