3 ms·
> I was inspired to investigate the original HELLO.C for Windows 1.0, a 125 line behemoth that was talked about in hush tones. Should that have been "125k line
by smitty1e 6y ago
> I was inspired to investigate the original HELLO.C for Windows 1.0, a 125 line behemoth that was talked about in hush tones.
Should that have been "125k line"? Not to get too pedantic, but the units seem needful for "behemoth".
- CyberDildonics 6y agoNo, windows did not require a 125 thousand line program to display hello world.
- smitty1e 6y agoThe question was serious; the repercussions, severe; the message, received.
- billforsternz 6y agoVery nice, grace under pressure. Upvoted, along with the original question.
- smitty1e 6y agoThanks!
- saagarjha 6y agoHotel, Trivago.
- NCommander 6y agoEven for Windows 1.0, I can see ways to cut this thing down to size. The point though is that this is what MSFT actually included in the SDK, and I remember reading about in "Programming Windows" and other sources. It just took me a few years (or maybe decades) from reading about it to actually try it.
- billforsternz 6y agoNo, at the time it did seem monstrous and barbaric to need 125 lines for hello.c, when 5 or 6 was quite properly considered the norm. "Behemoth" is a relative term in this case. Edit: In the decades since nothing has changed in my mind. The messy Windows boilerplate code that made up the other 120 lines or so should have been refactored architecturally and hidden by a framework, API call, something, anything.
- grawprog 6y ago125 lines seems fairly 'behemoth' for a hello world C program to me. This for example is a hello world for sdl: #include <SDL/SDL.h> int main(int argc, char *argv[]) { int gogogo = 1; SDL_Event event; SDL_Init(SDL_INIT_EVERYTHING); SDL_WM_SetCaption("Hello World! :D", NULL); SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE); while (gogogo) { SDL_WaitEvent(&event); if (event.type == SDL_QUIT) gogogo = 0; } SDL_Quit(); return 0; } https://www.badprog.com/c-sdl-simple-directmedia-layer-hello-world https://www.badprog.com/c-sdl-simple-directmedia-layer-hello...
- krapp 6y agoBecause all of the platform-specific code is offloaded to the library and compiled in. It's still there, hidden behind the abstractions.