Simpler "Hello World" Demonstrated In C
An anonymous reader writes "Wondering where all that bloat comes from, causing even the classic 'Hello world' to weigh in at 11 KB? An MIT programmer decided to make a Linux C program so simple, she could explain every byte of the assembly. She found that gcc was including libc even when you don't ask for it. The blog shows how to compile a much simpler 'Hello world,' using no libraries at all. This takes me back to the days of programming bare-metal on DOS!"
Interesting, but she does sort of sidestep the whole 'Hello World!' part of a hello world program.
FYI, Steve Jobs came up with the idea for the "Hello World" app.
He also holds the design patent on the touch wheel interface for it.
I'm sure "SlashdotMedia" will improve on all the wonders that Dice Holdings blessed us all with
45 bytes, huh? I can do it in....
#!/bin/sh
exit 42
18 bytes and it's portable across all Unices. Maybe the assembler version is faster, though?
Thank God we have finally crossed this hurdle. The baffling complexity of helloworld.c is no longer an obstacle to world domination.
I think we can now finally say once and for all that 2010 will be the year of Linux on the desktop.
OK, when I first read this, I thought to myself, "now why in the hell would anyone care to do this?"
Then it dawned on me. One stoned programmer said to another....Yeah, that's probably how it went down. Both now, and back in 1979, when you could still smoke in the Data Center...
Waiting for someone to crack this new hello world code and post it on bittorrent. Any links appreciated.
Seth
$5 / month hosted VPS on linux = awesome!
... and pile up on 64x8 TTL Proms!
No Steve Jobs designed "iHello World", which is actually one byte larger than the standard hello world app, but he's litigating against everyone who creates "Hello World" since 100% of it is quite obviously a subset of "iHello World".
I drink to make other people interesting!
FYI, Steve Jobs came up with the idea for the "Hello World" app.
He also holds the design patent on the touch wheel interface for it.
His was a variant that was tradmarkable. "iHello iWorld". Sadly it being an executable file means it to won't run on an iphone.
It's just a 20th-century digital processing appliance.
Mine is a 21st-century appliance, thank you very much!
You're right! I'm going to throw my laptop out the windows right now! Reading slashdot will be so much more fun on a computer smaller than a sunflower seed.
"A week in the lab saves an hour in the library"
Guy reminds me of an old joke.
What's the difference between a bitch and a whore?
A whore fucks everyone. A bitch fucks everyone but you.
One of the earliest processors I used had only 256 bits of RAM (Yes, that's right 256 B I T S of memory)
Why do you hate women so much? Is it out of self loathing that you had to become one?
Hahaha, wtf? That was actually an apt car analogy.
Now, get off my lawn!
That's just the Lords of Cobol being pissed that the Lords of Fortran did it first.
Step four, leave out step four to save time.
The fact that people would even still use C at all for anything anywhere ever shocks me.
I started writing device drivers in Ruby, and have never looked back.
In order to get Ruby to run on my system, I run it in an interpreter. The interpreter is written in Java, which is a much faster language and therefore more suitable as an interpreter.
The JVM on my system is written in C#. I know that C# is comparable to Java in terms of efficiency, but since this is a Windows machine, I figure it's "closer to the metal."
The implementation of the .NET framework on my computer (and the Windows operating system itself) is written in Ruby. Since I already have a Ruby interpreter on my system, this presents no problems.
I don't believe in time. It's a grand conspiracy designed to sell watches.
I remember those. We used to have to carry them around in the snow, uphill both ways. ;-)
I don't believe in time. It's a grand conspiracy designed to sell watches.
Indeed.
At 11kB each, my 1TB harddrive would only fit some 97 million programs.
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
"Hello World" uses over 90% of his "iHello World" work. You would be hard pressed to make a fair use argument here. ;-)
You know, there is a difference between trolling and pointing out the flaws in your reasoning. Just saying.
... and I read it in 2002. On slashdot.
XML is like violence. If it doesn't solve the problem, use more.
One of the earliest machines I learned programming on only had 256 bytes of memory.
You lucky bastard.
My parents could never afford such computer. I had to learn programming on a computer with only 1 bit of memory (Yes that's right: 1 B I T of memory!)
Those were the days. And you tell the kids these stories and they won't believe you...
My God, are you saying that people should use the right tools and techniques for the job at hand, rather than applying the same limited ones to every problem they come across?
It's official. Most of you are morons.
I have a suggestion: If you write your JVM in Visual Basic instead of C#, it'll be portable, since most old microcomputers included BASIC in ROM. And, of course, .NET already brings Visual Basic.NET!
-dZ.
Carol vs. Ghost
I've fallen off your lawn, and I can't get up.
But you're including that bloated library DOS. Much better to bypass all that cruft and just use the hardware directly. Also, why write the whole string. The user will just have to know that 'h' stands for hello world. It's a training issue!
mov ax,0b800h
mov ds,ax
xor di,di
mov byte ptr[di],'h'
ret
Why did you put it in your porn folder?
Nope! Now, hand me that pickaxe, I need to dig myself a memory upgrade.
http://df.magmawiki.com/index.php/Computing
I use Windows... like a two dollar wh.. why don't I just go ahead and not finish that sentence.