News for hackers. Stuff that matters.
Re:1001 Things To Hack Before You Die by drblast on Thursday November 11, 2010 @08:00PM (#1896083)
Some things I'm glad to have done:

1. Write a Hello World application from scratch. No C library, compiler, linker, nothing. You get a hex editor.

2. Write a non-bootstrapped compiler or interpreter using assembler.

3. Write a program that learns to play a game.

4. Develop a network protocol.

5. Write a web server. You can use the language of your choice, but nothing is allowed except a socket library.

6. Write a platform game that performs at least as well as the original Super Mario Brothers.

7. Design a circuit that has some sort of non-trivial purpose and build it.

8. Write Tetris in Javascript.

Re:1001 Things To Hack Before You Die by scorpion032 on Friday November 12, 2010 @05:07AM (#1897186)
> Write a Hello World application from scratch. No C library, compiler, linker, nothing. You get a hex editor.

"To prepare a donut from scratch, you have to first create the universe."

Re:1001 Things To Hack Before You Die by bingaman on Friday November 12, 2010 @02:37PM (#1898914)
Same with apple pie.
Re:1001 Things To Hack Before You Die by jrockway on Thursday November 11, 2010 @10:03PM (#1896346)
1. Write a Hello World application from scratch. No C library, compiler, linker, nothing. You get a hex editor.

Does this involve anything more than loading "Hello, world" into memory, setting up the registers/stack in a certain way, and invoking the syscall interrupt? (All the cool stuff happens in your terminal emulator. That's where 0x41 gets turned into the pixels that look like "A" on your screen, after all.)

Re:1001 Things To Hack Before You Die by angusgr on Thursday November 11, 2010 @10:15PM (#1896385)
At least part of the "fun" on a loosely modern operating system is learning the nuts and bolts of the executable format and loading conventions.

I've never spent much time there, but some of the ideas are laid out well in this two part post: http://blog.ksplice.com/2010/04/libc-free-world-2/

Doing it with _just_ a hex editor (ie writing out the ELF headers and sections yourself) may not be exactly what the commenter did, though. Cos that sounds really tedious.

I imagine that even writing "Hello, World" in the simpler way that you describe, on a simpler system (Apple IIe or so), would probably teach me something. I remember trying to write 6502 machine code in hex (no assembler) on my IIe when I was about 10 years old. It never worked then, I wonder if it would work now?

Re:1001 Things To Hack Before You Die by drblast on Friday November 12, 2010 @07:19AM (#1897405)
It's not that difficult or tedious, but it does require that you read the elf specification, or write your own "OS" from scratch.

http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm...

The idea is that you strip away everything that does something for you so that you are sure to completely understand the entire process with no "pushing the green compile button."

Re:1001 Things To Hack Before You Die by derefr on Friday November 12, 2010 @04:06AM (#1897052)
Write it for a system that doesn't have a terminal (or a character mode.) A Super Nintendo (65c816 CPU with the most thoroughly-tested emulators on the planet), say.
Re:1001 Things To Hack Before You Die by jrockway on Friday November 12, 2010 @05:10AM (#1897191)
Then it's just setting some bits in the video memory to "on".
Re:1001 Things To Hack Before You Die by niktech on Thursday November 11, 2010 @09:18PM (#1896259)
You can also take 1. to the extreme and write a mini-OS from scratch. Bootloader and all.

http://news.ycombinator.com/item?id=1605119

Re:1001 Things To Hack Before You Die by jrockway on Thursday November 11, 2010 @10:04PM (#1896351)
Orthogonal. They are using gcc there, which is not the same as his #1.
Re:1001 Things To Hack Before You Die by dgulledge on Thursday November 11, 2010 @10:13PM (#1896376)
A variant on 4 that I've been meaning to get to for a little while now is to implement the same network protocol in several languages.