HNHacker News
TopNewBestAskShowJobs

phaker

373 karma · joined May 30, 2011

submissionscomments
phaker··on Linux-ng
> I don't think you can create a github repo over ssh.

Oops, docs say you're right, i didn't think of that.

phaker··on Linux-ng
Appears so, the page is already gone.

Or maybe they stole linus' key? Anyone cloned the repository before it was deleted? If so, i think the repo could help in figuring out how it was done.

phaker··on On Asm.js
> As they currently exist both asm.js and PNaCl frontends are LLVM (...)

I don't think it's fair to call LLVM a frontend for asm.js just because LLVM can compile to asm.js. By that logic LLVM is also a frontend for x86. That doesn't mean anything. Asm.js is a platform, LLVM is a compiler, it's expected that LLVM can target it asm.js, so can other compilers. Hopefully both asm.js and PNaCl will be targeted by multiple compilers not using LLVM.

> It is definitely possible to implement a non LLVM back end for PNaCl.

Anything's possible. Reimplementing PNaCl from scratch (custom everything) obviously will take much more work than implementing it on top of LLVM. However i honestly think that there would be a large chasm between PNaCl on top of LLVM and PNaCl on top of any other virtual machine. And this is a problem.

EDIT:

I think i'm too focused on LLVM, sorry about that. What I should have written but didn't: PNaCl is hard to reimplement, and not only because it's a large project. For example iirc Chrome doesn't explicitly support the asm.js pragma and doesn't try to be compliant, but it already performs many of the optimizations from the its spec and the Chrome team appears receptive of changes that make this sorta support better. If things continue that way, soon it won't matter if Chrome supports the pragma or not. I.e. right now Chrome supports (say) 10% asm.js and eventually it could support up to 90% with no problems. On the other hand can Firefox implement PNaCl piecemally? What would a 10% reimplementation of PNaCl look like? I think even a 90% or anything else short of a full implementation will not be interoperable.

phaker··on On Asm.js
> So asm.js took a beeline - leveraging existing Javascript machinery for security/JIT and shoehorning a way to run executable LLVM on top of it.

A big advantage of asm.js over PNaCl is that it's not LLVM.

On the other hand PNaCl is very tightly coupled to LLVM. Any time I find myself checking if a some $feature is available in PNaCl, the discussion revolves around what LLVM can or can't do and how LLVM does it, see [1] for most recent example.

I just can't see how PNaCl could be meaningfully reimplemented. Reimplementing it from scratch would require implementing something bug-for-bug compatible with LLVM. That's a gargantuan task. On the other end of the spectrum, why not just use the original implementation? Then it would work very much like any other plugin. I don't think it's a good solution. It seems the only remaining option is implementing it on top of LLVM. But then you still share all potential limitations (e.g. in portability) and all security issues with all other LLVM-based implementations. It could end up being not that bad -- it means more work on LLVM itself, making it better -- but I'm not sure if that would offset the other problems. How many features that appeared first in chrome or webkit were then reimplemented elsewhere in a different, better way? Do we want to end up with only one browser? No, there are lots of things we wouldn't have if Firefox didn't happen, there are lots of things we wouldn't have if Chrome didn't happen. Do we want to end up with only one PNaCl runtime?

[1]: https://code.google.com/p/nativeclient/issues/detail?id=3475

phaker··on That 60W-equivalent LED: What no one will tell you
> A regular light bulb converts about 2% of its energy input into light, and 98% into heat.

This isn't relevant to your argument, but that actually isn't true, that figure is about 6~8 percent.

* The "luminous efficiency" as commonly reported is just the lumen/W luminous efficacy divided by the peak value of 683lm/W. The value of 683lm/W is the peak of human eye sensitivity curve and occurs at 555nm. The only light source that can achieve 100% "efficiency" by that measure is a 100%-efficient radiator that emits monochromatic 555nm (bright green) light, the best a perfect white light source can do is about 37%. (see [1])

* That "perfect white light source" would be a 100%-efficient radiator emulating the Sun spectrum bandlimited to visible light (zero infrared, uv and no other losses).

* It's possible to make a light source that appears white to human eye and is more efficient than that by emitting mostly at wavelengths the human eye is more sensitive to, and emitting less at wavelengths it's less sensitive to. That's part of the reason why manufacturers often offer CFLs with high efficiency but poor color rendering and lower efficiency but higher color rendering. (And don't get me started on the color rendering index.)

* That definition of "efficiency" is obviously not what most people think it is when they hear that word (useful work / total work spent), some prefer to call it "luminous coefficient". But it's not all lies, it was defined that way because it's easy to compute and understand and because this is the value of interest if e.g. you're making a LCD backlight or if you're designing an interior lighting setup.

[1]: https://en.wikipedia.org/wiki/Luminous_efficacy

phaker··on Wireless HDMI for Everyone
Sadly DLNA is only for sharing and streaming files. If all you want is playing movies from your laptop, it should work. If you want to play e.g. something from youtube, it will work only if you find a player that supports DLNA. If you want to play a game, it just won't work because it's not intended for it.

Second, while it looks good on paper, last time I've tried even playing movies sucked:

* it's buggy and "almost, but not really" compatible. Getting a Sony TV to see anything non-Sony took an entire evening. There were no error messages, the only feedback was "it works" vs "it hangs up for 30 seconds and then timeouts".

* Because it's build around sharing files, if you want to play a movie you need to make sure it's using a codec supported by your TV or it'll need to be transcoded it on the fly. Only some DLNA servers support transcoding, user-friendly ones and the servers built into devices often don't. Then the only video codec that works reliably with all/most devices is MPEG2 with limited bitrate. There was a small but perceptible loss in quality when playing high bit-rate x264 video.

* There's a difference between a DLNA "server" and a DLNA "controller", the "server" serves files, the "controller" is the user interface you use to select a movie to play, play/pause/stop, change volume etc. Many apps support one but not the other. If the app you put on your phone is a "dumb" DLNA server without a controller, then you can select the movies/music/pictures only by navigating the menus on your TV (which hopefully has a controller built in).

* All problems have workarounds, but these cause more problems. E.g. in the server i settled on the, transcoding data was saved to disk to a separate video file that grew and grew until i ran out of disk space. Would you know that before playing a movie you need to make sure you have 100GB of free disk space? Yes, in theory the software could hide all this from me, but it isn't there yet and it doesn't look like it ever will be.

phaker··on This is a valid ipv4 address
I use this one all the time:

127.0.0.1 == 127.1

10.0.0.1 == 10.1

192.168.0.1 == 192.168.1

phaker··on Show HN: Ditch Black Text to Read Faster, Easier
2 Suggestions:

1. It'd be very nice if you had a version that tweaks text colors and doesn't touch anything else, i.e. just like on the demo page. When I tested your bookmarklet and it tore up the page I thought something was broken. I only found out that it uses readability because I started digging when it 'broke', you never mention 'readability' in your copy.

2. People will want it enabled by default. You can't do that if you use readability.

phaker··on xkcd Time - at your own pace
You could scrape them, if you want to. http://xkcd.mscha.org/ has direct links to all images (and cached copies and more).

If you do, remember to upload the results somewhere.

phaker··on xkcd Time - at your own pace
All is in the giant forum thread (51k posts and counting).

During the night scene several readers tried to use the stars to determine location and date:

* Diurnal motion matches 39.5° north.

* Proper motion and the position within milky way indicate far future.

* Eventually someone matched everything to Tuesday, 10 April 13291 and that estimate stuck (but it could be off by several hundred years).

http://xkcd-time.wikia.com/wiki/Astronomy

phaker··on TCP simultaneous open and peer to peer networking
Then you are using NAT as a simple firewall. You could have the firewall part without the translation part (or with deterministic two-way translation), which would eliminate 99% of problems. let me explain:

A NAT "hides the network" behind it because it does two things:

1. drops incoming connections (or more precisely, incoming traffic when there was no outgoing traffic from that ip:port on that protocol)

2. obscures internal network addresses

Dropping incoming connections is what makes it a simple firewall and you could set up a "real" firewall to do the same (there are probably products doing that out of the box). Most firewalls are more complex than that, but they don't _have to be_.

What makes NATs different is the address translation that obscures the structure of the network behind it. Traditionally this is needed because you have lots of internal addresses and few external addresses (often just one). But if you have more hosts than external IPs then you can't have a static mapping without collisions because you have more internal ip:port pairs than external ip:port pairs. Which is why NAT generates internal-external mappings as it goes and why old mappings need to be discarded and why it needs to drop incoming connections (it can't know where to forwarded it to if there is no mapping). THIS is the part people hate, because it means you can't reliably connect two NATed hosts. If hole punching worked reliably it wouldn't be a problem, it feels like a hack, but the internet is a patchwork of much worse hacks.

phaker··on Blog Or Get Off The Pot (2006)
You shouldn't have to go to Reddit to get a decent directory of my blog. Anyway, you can't; anything that makes it onto Digg or Reddit or del.icio.us is mixed in with everything else, and gets bumped down into oblivion by stuff that's newer and/or better.

Actually you can "unmix" it:

http://www.reddit.com/domain/steve-yegge.blogspot.com/top/

I know this is a far cry from what he's asking for, but it's still damn useful.

phaker··on Googling a musician and their song brings up a new track listing UI
Looks like it's your browser: http://i.imgur.com/xsWgk.png (or maybe they are a/b-testing it?)
phaker··on A SSD in Your Pocket
The USB spec defines maximum plug sizes and minimum port spacings, different for all connector series (A/B/mini x/micro x). USB A plug/device dimensions are specified as 16x8mm MAX, i don't remember minimum spacing between A ports and google isn't cooperating, but it's also defined somewhere in there. There are some problems however:

If you don't want to put an USB logo on your device or otherwise use USB trademarks you don't need to follow the spec to the letter and USB IF can't do anything about it (see every other usb novelty device like lamps, fans etc).

If your device is too large you just need to ship it with an extension cable and it's ok.

phaker··on Is Facebook “broken on purpose” to sell promoted posts?
"IKEA" is a network of many different companies. Some of them are registered as nonprofits (not charities) as a tax optimization which is probably what you are remembering. There is also the charitable organization that was mentioned above but afaik that's not for tax purposes.
phaker··on Critical Linux bug that leads 100% CPU (leap second)
If you want something that looks like UTC minus the leap second trouble, then there is TAI. Right now TAI and UTC differ by about 30 seconds.
phaker··on Challenge: Implement CLI interface like that?
As I said I was nitpicking. :)
phaker··on Challenge: Implement CLI interface like that?
One nitpick:

Note that there is a conflict between the subcommands in the example:

    naval_fate ship new <name>...
    naval_fate ship <name> move <x> <y> [--speed=<kn>]
    naval_fate ship shoot <x> <y>
Users can't name their ships 'new' or 'shoot' and you can't safely add more 'ship something' commands in new versions as you risk colliding with some user's ship name.

You could try to warn of such conflicts, but that sounds like a lot of work... :)

phaker··on Web pages can sniff to see what Chrome extensions you have installed
The ha.ckers.org test is not working for me :( so it appears that this particular hole is fixed.
phaker··on GoFlow: a DIY tDCS brain-boosting kit
The article I linked references lots of research that had shown measurable results, including research on stimulation of large brain areas, which is all that you'd be able to do with this $99 kit.

I was looking for something, anything, that would tell me if there's significant research in the area and if simple procedures that could be carried out using this kit would work.

(Also you might note that the Nature article was linked 9 hours after my post :) In some ways it does give a better overview of the technique, I'd link it if I had found it.)

phaker··on GoFlow: a DIY tDCS brain-boosting kit
A MRI machine is probably not included in the $99 kit. :)

I was skeptical that simple, unguided tDCS could have significant effects so I searched some more and found a very nice overview paper: http://www.aipass.org/files/TDCS_State%20of%20the%20art.pdf "Transcranial direct current stimulation: State of the art 2008"

phaker··on GoFlow: a DIY tDCS brain-boosting kit
Lots of people worry a great deal about these things as well

But they don't advocate delegalizing them either.

phaker··on Did GitHub Suspend Egor Homakov account?
Are you planning to unban him later?

I see why you'd want to suspend his account while you are fixing the hole. And I can see that it sucks that you got caught in the crossfire. And that reporting the bug quietly instead of announcing it to the whole world would cause much less headache.

OTOH after reading the rails bug report I think that homakov's only option was to make a high profile demonstration and basically shame the Rails devs into fixing it. I realize that it's incredibly shitty for you, but I'm afraid they'd just write it off if he kept it quiet.

phaker··on Valid JavaScript variable names
Specifically this works only in GTK apps.
phaker··on Command line tools for web developers
Did you check? GNU tar will guess based on file suffix.
phaker··on Ask HN: Career Change to something without computers
> international photojournalism is practical/useful

True, I was looking for a right word, but couldn't find it.

What I meant was that people and businesses need programmers. For most flavors of 'programmer' the demand is quite stable, and it isn't going away because "the economy is bad!". If you are e.g. a freelance webdeveloper (at least a reasonably good one) you can be sure that in the next year demand for your work will be comparable to this year's.

On the other hand, AFAICT demand for photographs is much more volatile (at least for most kinds of photographs), and I think it's because people find it much easier to do without them than without webpages when they need to cut something. I know it works this way for artwork. I might be wrong, just sayin'.

phaker··on Ask HN: Career Change to something without computers
The problem with any "art-related" work is that it's not something practical / useful / necessary for anyone. People need programs, but no one needs photos, most often they want one, but could do perfectly without it. (There are some photos that people will really need done, but that's the worst kind of work, and not really profitable, so I assume you that's not what you want to do.)

If you are someone who makes stuff people want, but don't really need you'll be hit much worse by budget cuts, recessions etc. because your work is one they can do without easily.

I draw (and do some design stuff). I get some money out of this once in a while, but it's not much. I know that I could get more out of it if I tried harder. But that wouldn't mean doing more of what I like doing, I'd have to take work that I enjoy much less than programming. And I'd probably have trouble making ends meet, even if I was successful It'd wouldn't be a very dependable source of income.

phaker··on Silence: Because I talked so rarely, people took the time to listen to me
the whole tone of the post just rubs me completely the wrong way

I could say the same thing about the blog post. It's seems to me it's not saying anything except "I'm a smart guy".

Very often, posts of that character are rooted in personal vendettas.

Now THIS is uncalled for. As is saying his post is smearing, worthless, and constitutes a personal attack, but this is most uncalled for.

I think onan_barbarian just thought that the idea from this blog post isn't really novel or interesting enough to be submitted here and that the author stated it in a way that makes him sound a little full of himself. He was being a little mean while making his point but people often react like that when something "rubs them the wrong way", no?

phaker··on The BBC’s fundamental misunderstanding of copyright
I recall that fair use laws in some countries explicitly mention issue of using copyrighted content in news stories / for public information.

Unfortunately quick googling didn't find anything useful, and the wikipedia article is surprisingly worthless:

While many other countries recognize similar exceptions to copyright, only the United States and Israel fully recognize the concept of fair use.

Seriously?

phaker··on Silence: Because I talked so rarely, people took the time to listen to me
The word "epic" can be used to describe tone, not only length.
← PreviousPage 3 of 4Next →