HNHacker News
TopNewBestAskShowJobs

1337p337

924 karma · joined September 19, 2010

Personal site is debu.gs.

Activity stream (mostly code) is at stream.debu.gs.

submissionscomments
1337p337··on The patented IBM multi-pipe: the evolution of Unix pipes
It's even bolder to use a time machine to send software back in time. Of course Plan 9 has a time machine built in, it's just that people can't get used to rio(1) and the lack of readline support, so they tend not to get far enough into the OS to avail themselves of it.
1337p337··on Hacker News Parody Thread
Well, random sorting might be a bit of an annoyance due to HN's other annoyance, the "Unknown or expired link" problem, which seems to crop up more often if I do actual work and then pop over to HN when I have to wait for tests/compilation/etc. Locating the comment you were replying to with random or date-based sorting (so that you can click "reply" again, paste your previous reply, and then resubmit) would be a serious pain in combination with that.

But you're correct in that the current algorithm (or any sufficiently transparent algorithm) does lend itself to gaming. It might be harder to game if you didn't mind penalizing comments based on the quality[1] of replies they generate, then sorting based on the thread's average quality would mean that there's less incentive to post in the top thread just to get exposure, since your new, karma-less post will drag down its average and subsequently could drag down the thread. That could get prohibitively expensive to calculate for huge threads, but would be less prone to gaming, I think.

[1] If we can hand-wave "karma" to mean "quality"; I get way more upvotes when I am flippant but technically correct than I do when I try to be thoughtful.

1337p337··on Nintendo games on a Mac
I was a bit more annoyed that it seems to have been written and submitted just to drive traffic through the affiliate links.

I do agree, though, that the USB adapters are nice. I have a couple of PSX adapters and an SNES adapter. The Japanese console manufacturers seem to do a much better job with input devices than the PC-oriented crowd over here. (Although that could just be personal bias; I did almost all my gaming on consoles and in arcades before the first time I tried plugging something made by Gravis into my MIDI port.)

1337p337··on Nintendo games on a Mac
Shilling hardware with affiliate links?
1337p337··on Primeval C: two very early compilers
The situation with x86 specifically is a little weirder than that: http://www.emulators.com/docs/nx06_rmw.htm . It's a bit of a long read, but the summary is that on some x86s, single-instruction adds to memory are faster, and on others, load/increment/store in three instructions is faster.

Compiler optimization be a harsh mistress.

1337p337··on Primeval C: two very early compilers
Firefox and Webkit both allow a user-specified stylesheet, although it is buried a bit in Firefox.
1337p337··on Name.com hijacks non-existent subdomains and redirects to their servers
Sorry for the omission; I think Bind is actually a bit tricky to configure by comparison to the other three mentioned.
1337p337··on Primeval C: two very early compilers
> It can get exhausting keeping up with all of the silly CSS/JS web trends

This is DMR's website. Good job criticizing a dead man on not "keeping up" or writing CSS so that you don't have to customize your default styles.

1337p337··on Name.com hijacks non-existent subdomains and redirects to their servers
I don't quite understand why people have this allergy to running their own DNS. If you just want a single text file and don't need anything major, dnsmasq will serve records out of /etc/hosts. Slightly up the chain in terms of power, MaraDNS lets you use a text file, and finally there's PowerDNS (which I use) lets you use SQL databases, embed Lua, or read from a pipe. (Being able to use a regular RDBMS is nice for things like writing a little cron job to do your own dynamic DNS, or doing self-service hosting for people.)

If you've never done it, it is a couple of hours of reading and fiddling, but very quick if you have set up DNS before. I'm actually a bit curious about why people (even some sysadmins!) tend to spend time clicking on some clunky web interface to update records manually when it's actually easier to do it yourself. (Mail servers, on the other hand...)

1337p337··on Name.com hijacks non-existent subdomains and redirects to their servers
example.com isn't just better: it's actually specified in RFC 2606 as one of the domains "reserved for use in private testing, as examples in documentation, and the like."
1337p337··on New Anti-Piracy System to Hit U.S. Internet Users on Monday
Agreed; a link that discusses what it actually entails would be great. Or does no one actually know, outside the companies that implemented it?
1337p337··on Stop Using Small Font Sizes
Fretting over actual pixels is counter to trying to stay display-independent, as a web site ought to. The actual thing to worry about here is apparent DPI. A TV at 1080p viewed from ten feet away needs much larger text than a monitor at 1080p viewed from two feet away, and the variance in cell phone resolutions is even more drastic.

I had hopes that all these different resolutions/DPIs/sizes for screens would stop designers trying to force a pixel-perfect layout into a browser, but the end result seems to have just been "CSS media queries".

1337p337··on Stop Using Small Font Sizes
I hadn't noticed that the font is so small here; I've set the minimum text size in all my browsers to something reasonable, which works fine in Webkit and Firefox, so that I don't get eye strain reading Wikipedia's ridiculously small text.

The price paid is that sometimes a poorly designed site has text that spills out of a fixed-size box, but I can cope with that much more easily than with trying to read something that is 7px tall.

1337p337··on Is the next second language JavaScript?
Personal opinions about Javascript aside, it does cover several fundamentals, is available on every platform, and is established enough that it will probably (sadly) not be going away any time soon. If you're going to teach kids a language, maybe one that isn't gone by the time they're out of school (which is a distinct possibility for the languages you've named; a lot of good languages died within years of their arrival) would be best.
1337p337··on Show HN: Quickly copy a file between computers
s/always/usually/. Depending on the disks involved and your network hardware (either a super-fast link, or even a system with a slow CPU and cheap network hardware that expects the drivers to do the heavy lifting in software), it actually could end up CPU-constrained.

But for the usual case where it is I/O-constrained, you can often get files across more quickly by throwing CPU at reducing the total amount of bandwidth required by, e.g., using something like bzip or pbzip:

  pbzip2 < file | nc $host $port
And on the other side:

  nc -l $port | pbzip2 -d > file
1337p337··on Ruby MRI Source Code Idioms #1: Accessing Data Via Macros
Once you can read some C, I'd recommend reading over another bytecode interpreter, like mawk (Mike's AWK): http://invisible-island.net/mawk/ . Another good read is the TinyCC compiler (originally by Fabrice Bellard, who did QEMU among other things): http://savannah.nongnu.org/projects/tinycc . It's a small, mostly readable, fully functional C compiler.
1337p337··on A single line of Basic sends readers into a labyrinth
After reading the article, I was really hoping the comments would be full of ports, glad to see this thread! Here's a version for the Inferno shell, because I couldn't resist:

wm/sh -c 'load std mpexpr;while{}{unicode -t ${expr 2571 1 rand +}}'

1337p337··on The Worst
I don't know where you shop, but the "traditional flatware" of my people is whatever was cheap enough at the department store. Our rich native customs dictate that we spend $15 on a set, and then use it until there are not enough non-bent spoons, and then to spend another $15.
1337p337··on Using Inferno at Work
Previous entries on the blog cover introductions to the OS in a bit more depth. Introductions for it are not too difficult to find overall, but anything past scratching the surface is less easy to find; that's the gap I was attempting to fill.
1337p337··on WTFM - Write The Freaking Manual
"The whole point of the Doomsday Device is lost if you keep it a secret. Why didn't you tell the world?"

I can't be the only one to hear Dr. Strangelove's voice every time documentation is missing, can I?

1337p337··on Perl/Linux, a Linux distribution where all programs are written in Perl
At the speed Linux changes, a 5-year-old Inferno would not even build. The lates available tarball is from 2010, but the reason a tarball is even provided is because it speeds up a pull from Mercurial. If you are interested in the current goings on, I've summarized some of them: http://debu.gs/entries/plan-9-and-inferno
1337p337··on Perl/Linux, a Linux distribution where all programs are written in Perl
Well, there's BSD, Plan 9, Inferno. If you don't want the "same old GNU tools", there are plenty of places to go.
1337p337··on The Linux Talent Draft is On
Of course. If you love programming, an OS whose primary interface is a programmable shell is going to be very appealing. On top of that, the large number of small programming languages that come with typical installs of the OS (awk, sed, dc, bc, sh) make Linux a very comfortable place for programmers.
1337p337··on Go is boring
This is largely spot-on. Of course, the author's assertion (that having all of these things in one place is novel) is incorrect for some programmers, but the sheer boringness of the language is a virtue. Go's features as bullet points are unimpressive; the set of features is the impressive part. Putting in features that are solidly understood, that are desirable, and that don't clash with each other make for a simple, solid, nice language.

I've tried without success to dig up an email from Linus Torvalds (on the LKML?) where, responding to an email complaining that a particular implementation of ARM does not breaking any interesting ground, he goes on a mini-tirade about the lack of appreciation for a simple thing done well. I think Go fits the description nicely.

1337p337··on ESR: Cisco provides a lesson
> I really don't think that this has anything whatsoever to do with closed vs. open source.

[...]

> Would open-source prevent this kind of thing? Probably.

I don't think I could have made the argument better than you have.

The point isn't that all closed source software does this, or even that most does it. The point is that when you cannot control the software, the abuse can happen. Anyone who has power can abuse it, which means that if you cede control over software in your router to Cisco, you have to trust Cisco not to abuse it. If you don't, then you don't have to worry.

1337p337··on Things I like about programming in Go
> I think a language should be developed together with its tools.

A lot of people will probably not like this answer, but Go's "tools" are the Acme editor and the shell. If you're running on Windows, Acme-SAC (https://code.google.com/p/acme-sac/, or just running Acme under "vanilla" Inferno) is a viable option, and is written in Limbo, a precursor to Go. (It still has some features Go lacks, but is roughly comparable.)

I wouldn't hold my breath on getting former Bell Labs guys to work on a graphical debugger or Eclipse support, so the language is somewhat unlikely to be developed together with those tools.

1337p337··on G-WAN - Web Application Server
If CGI is dead, I had not noticed. :) I'll admit that I don't write CGI programs often, but I do still write them.

I think, though, that the database interacting, templating, etc., are things that you will very nearly always do in PHP because they're there. File-backed storage (if any storage is even needed) is more than adequate for most cases where one might write a CGI program in C. The last time I had occasion to write something from scratch and target CGI, I was generating graphs. No templating, no database, very fast.

The major pain of templating lies in C's string handling, though, and if you aren't worrying about freeing memory, there's not much pain. As far as HTTP goes, if the protocol was designed to be parsed in C, it's not often difficult to parse in C. But for all of those things, there's a library.

I can't comment specifically about whether or not mod_php would be faster (since I used PHP only briefly and several years ago) but I suspect very strongly that the overhead of firing up a small, statically linked C program beats it.

As I said previously, I don't think it's usually a good idea, but it's a more than viable tool and nice to keep in the box.

1337p337··on G-WAN - Web Application Server
Based on the graphs, the contents, and the over-the-top design, I was wondering if this was a joke or something until seeing this thread. So I'd agree that alarm bells may be warranted.

On the other hand, I have written a few web applications in C. It's not that bad! :) The nice thing about it is that if you link statically, write CGI programs, and ignore memory management (or, rather, malloc all you care to and delegate garbage collection to the OS when your process goes away), you can get something that runs quickly with minimal hassle on a small device. I don't recommend it unless you have some bizarre constraints, but it's really not that bad! That approach doesn't seem possible with this server, sadly.

1337p337··on The Inferno Shell, an Introduction with Examples
Your profile is fairly sparse; I wonder if you'd mind emailing me; there are a couple of things I wanted to chat about. (Address is on my site.)
1337p337··on The Inferno Shell, an Introduction with Examples
I'd rather see Go ported to Inferno. :)
← PreviousPage 2 of 7Next →