News for hackers. Stuff that matters.
Re:Show HN: Hacker Typer [joke] by olalonde on Monday April 25, 2011 @09:49AM (#2481211)
Reminds me of good old

    hexdump -C < /dev/urandom | grep "ca fe"
Re:Show HN: Hacker Typer [joke] by pavel_lishin on Monday April 25, 2011 @10:55AM (#2481417)
For awhile, I'd run

    hexdump -C < /dev/urandom | grep "c0 ff ee"
as a fake screensaver if I walked away from the computer for awhile, but it seems to eat processor cycles like crazy. :/

http://i.imgur.com/bSkoX.png

Re:Show HN: Hacker Typer [joke] by yuvadam on Monday April 25, 2011 @09:12AM (#2481139)
Feature request: make every "enter" key press complete the current line.
Re:Show HN: Hacker Typer [joke] by s0urceror on Monday April 25, 2011 @08:04AM (#2481021)
Now I can be a Hollywood movie hacker too!
Re:Show HN: Hacker Typer [joke] by fedd on Monday April 25, 2011 @10:37AM (#2481353)
and this code should be projected on the hacker's face somehow
Re:Show HN: Hacker Typer [joke] by chopsueyar on Monday April 25, 2011 @08:30AM (#2481065)
Where's the GUI?
Re:Show HN: Hacker Typer [joke] by schallis on Monday April 25, 2011 @09:59AM (#2481233)
You need Visual Basic for that http://www.youtube.com/watch?v=hkDD03yeLnU
Re:Show HN: Hacker Typer [joke] by lsb on Monday April 25, 2011 @09:00AM (#2481122)
There looks like a syntax error early on with the ternary operator:

  nblocks = nblocks ? : 1;
Re:Show HN: Hacker Typer [joke] by brodd on Monday April 25, 2011 @09:06AM (#2481135)
that's actually valid C through a GCC extension: http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Conditionals.htm...
Re:Show HN: Hacker Typer [joke] by wnoise on Monday April 25, 2011 @01:37PM (#2482125)
valid "C".
Re:Show HN: Hacker Typer [joke] by johncoltrane on Monday April 25, 2011 @08:11AM (#2481036)
Nice! My son loves to type random gibberish in a Vim window and now he is going to type "real" code!
Re:Show HN: Hacker Typer [joke] by ludwigvan on Monday April 25, 2011 @09:13AM (#2481141)
How does one generate random data in a computer? Put a new cs student in front of a vim screen.

(Not my joke, but can't find the original one at the moment, I guess I read it on twitter recently.)

Re:Show HN: Hacker Typer [joke] by chad_oliver on Monday April 25, 2011 @07:35AM (#2480976)
How is the code generated? Is is scraped from publicly-accessible repositories (e.g. on github), or is it somehow generated on demand?
Re:Show HN: Hacker Typer [joke] by zacharydanger on Monday April 25, 2011 @07:44AM (#2480991)
Looks like it's pulling from

http://duiker101.tk/hackertyper/text.txt

Re:Show HN: Hacker Typer [joke] by sp332 on Monday April 25, 2011 @10:20AM (#2481297)
Re:Show HN: Hacker Typer [joke] by duiker101 on Monday April 25, 2011 @07:47AM (#2480996)
random code taken from github, i think it was clone of some kernel from linus.
Re:Show HN: Hacker Typer [joke] by hayeah on Monday April 25, 2011 @07:49AM (#2481000)
it would be cool if you do ngram analysis that generates code based on keystrokes
Re:Show HN: Hacker Typer [joke] by sp332 on Monday April 25, 2011 @10:18AM (#2481292)
I'm not sure how, but I knew this was kernel code about halfway through the first function. It's strange, because I've never written any kernel code before. Is there any dead giveaway in the first function that says, "This is code from the kernel"?
Re:Show HN: Hacker Typer [joke] by bxr on Monday April 25, 2011 @10:44AM (#2481376)
The things that stuck out to me were a kmalloc/kfree and a goto/label (which isn't the biggest giveaway, but the only C I've seen that used gotos and wasn't terrible code is the linux kernel, the goto is also used in the same style as they are in the kernel).
Re:Show HN: Hacker Typer [joke] by statictype on Monday April 25, 2011 @08:23AM (#2481051)

    struct group_info init_groups = { .usage = ATOMIC_INIT(2) };
Is this legal ANSI C?

You can initialize structs using .field = value ? Or is something else going on here?

Re:Show HN: Hacker Typer [joke] by ramchip on Monday April 25, 2011 @08:49AM (#2481096)
Re:Show HN: Hacker Typer [joke] by duiker101 on Monday April 25, 2011 @08:25AM (#2481053)
http://lxr.free-electrons.com/source/kernel/groups.c

this should be the file i used. seems correct that way.

Re:Show HN: Hacker Typer [joke] by teraflop on Monday April 25, 2011 @08:51AM (#2481101)
If by ANSI C you mean C89, then no. It was added in C99. I believe the feature is technically known as a "designated initializer".

(http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf section 6.7.8)

Re:Show HN: Hacker Typer [joke] by hbz on Monday April 25, 2011 @08:41AM (#2481077)
I loved this.

Could you please specify a monospaced font? It just feels so wrong otherwise.

Re:Show HN: Hacker Typer [joke] by duiker101 on Monday April 25, 2011 @08:43AM (#2481082)
done!
Re:Show HN: Hacker Typer [joke] by tga on Tuesday April 26, 2011 @11:31AM (#2485653)
not done!

the font is still my browser's beautiful Serif (not overridden)

Re:Show HN: Hacker Typer [joke] by duiker101 on Tuesday April 26, 2011 @12:56PM (#2486096)
extreamly strange, a lot of things changed in the last 24hrs might i ask you what browser are you using?

EDIT: you were correct, my mistke, too hurry, can you check now? Thanks

Re:Show HN: Hacker Typer [joke] by skimbrel on Monday April 25, 2011 @10:55AM (#2481416)
Is there any reason this shouldn't work on an iOS device? It's all Javascript. I just can't get my iPad to pop up a keyboard to start triggering keypress events.
Re:Show HN: Hacker Typer [joke] by incredimike on Monday April 25, 2011 @12:47PM (#2481914)
This js simply binds an "KeyDown" event listener to the document. There are no actual input fields so an iOS device.. that's why you don't get a keyboard.
Re:Show HN: Hacker Typer [joke] by hayeah on Monday April 25, 2011 @07:47AM (#2480997)
wow, he exactly duplicated my sentient EMACS setup! My job is jeopardize.
Re:Show HN: Hacker Typer [joke] by palish on Monday April 25, 2011 @08:00AM (#2481015)
This is brilliant.
Re:Show HN: Hacker Typer [joke] by incredimike on Monday April 25, 2011 @12:41PM (#2481886)
This is BS.. Hackers don't write comments!
Re:Show HN: Hacker Typer [joke] by michaelpaul on Monday April 25, 2011 @09:19AM (#2481159)
Ok boss, i'm working hard here!
Re:Show HN: Hacker Typer [joke] by ignifero on Monday April 25, 2011 @07:51AM (#2481003)
Wow, my typing speed has improved lately ...