4 ms·
Show HN: Hacker Typer [joke]
Ever wanted to type as fast as those amazing hackers in the movies? now you can! just write something.
Yes, i was really bored.
To change writing speed: javascript:writer.speed=10;
- chad_oliver 16y agoHow is the code generated? Is is scraped from publicly-accessible repositories (e.g. on github), or is it somehow generated on demand?
- zacharydanger 16y agoLooks like it's pulling from http://duiker101.tk/hackertyper/text.txt http://duiker101.tk/hackertyper/text.txt
- deleted 16y ago[deleted]
- duiker101 16y agorandom code taken from github, i think it was clone of some kernel from linus.
- hayeah 16y agoit would be cool if you do ngram analysis that generates code based on keystrokes
- sp332 16y agoGoogle says it's from the Linux kernel, http://ftp.kernel.org/pub/scm/linux/kernel/git/jejb/storage-tree/kernel/groups.c http://ftp.kernel.org/pub/scm/linux/kernel/git/jejb/storage-...
- hayeah 16y agowow, he exactly duplicated my sentient EMACS setup! My job is jeopardize.
- ignifero 16y agoWow, my typing speed has improved lately ...
- palish 16y agoThis is brilliant.
- s0urceror 16y agoNow I can be a Hollywood movie hacker too!
- chopsueyar 16y agoWhere's the GUI?
- schallis 16y agoYou need Visual Basic for that http://www.youtube.com/watch?v=hkDD03yeLnU http://www.youtube.com/watch?v=hkDD03yeLnU
- fedd 16y agoand this code should be projected on the hacker's face somehow
- johncoltrane 16y agoNice! My son loves to type random gibberish in a Vim window and now he is going to type "real" code!
- ludwigvan 16y agoHow 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.)
- statictype 16y agostruct 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?
- duiker101 16y agohttp://lxr.free-electrons.com/source/kernel/groups.c http://lxr.free-electrons.com/source/kernel/groups.c this should be the file i used. seems correct that way.
- ramchip 16y agoYes, it's C99. http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/topic/com.ibm.xlcpp8l.doc/language/ref/designators.htm#designators http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/top...
- deleted 16y ago[deleted]
- teraflop 16y agoIf 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 http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf section 6.7.8)
- hbz 16y agoI loved this. Could you please specify a monospaced font? It just feels so wrong otherwise.
- Humourisok 16y agoAwesome. Humour! Great post in this gray serious community. I bet people will start discussing the design pattern flaws.
- Humourisok 16y agoGreat for bad-paying programming jobs while listening to podcasts. Awesome. Humour! in this so-serious community! I bet people will start discussing the design pattern flaws.
- lsb 16y agoThere looks like a syntax error early on with the ternary operator: nblocks = nblocks ? : 1;
- yuvadam 16y agoFeature request: make every "enter" key press complete the current line.
- michaelpaul 16y agoOk boss, i'm working hard here!
- olalonde 16y agoReminds me of good old hexdump -C < /dev/urandom | grep "ca fe"
- pavel_lishin 16y agoFor 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 http://i.imgur.com/bSkoX.png
- sp332 16y agoI'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"?
- bxr 16y agoThe 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).
- skimbrel 16y agoIs 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.
- incredimike 16y agoThis 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.
- incredimike 16y agoThis is BS.. Hackers don't write comments!