6 ms·
I wrote a finished software once. It printed “hello world” to the console.
by codeTired 3y ago
I wrote a finished software once. It printed “hello world” to the console.
- fohara 3y agoDid it compile to wasm and run at the edge at scale?
- adhesive_wombat 3y agoAre you sure it's finished? Did it handle the case where the output stream couldn't be written to, for example?
- alexvitkov 3y agoLikely no, just like any other software ever written.
- OkayPhysicist 3y agoThat's outside of scope. Most programs should fail when faced with situations outside their purview.
- adhesive_wombat 3y agoYes, but if you don't check the printf return code (in C, say) the program won't fail. It'll return 0 (i.e. report success) but it did not do what it promised to do on the tin. If you only check its non-negativity, you might only have written "Hell" and again the program merrily carries on and says "all OK: 0!"
- 0x000xca0xfe 3y agoAre you sure it is linked against the latest glibc? Also, how do you handle locales - "Bonjour le monde" and "Hola Mundo" should be table stakes for an actually finished hello world program.
- zabzonk 3y agobut didn't you feel the urge to give an option specifying which font to use?
- smokel 3y agoUnless you wrote it in HQ9+ [1], I wouldn't be so sure that it's finished. If you wrote it in C, I wouldn't be surprised that in a few years time you'd have to check a few security policies before you can actually write to the stdout file descriptor. And in JavaScript, the top level "console" object will probably be removed to avoid possible namespace clashes. [1] https://esolangs.org/wiki/HQ9%2B https://esolangs.org/wiki/HQ9%2B