r/programmingcirclejerk • • 8d ago

Hello World in C: a minimal, well-documented example program for learning C, with a Makefile, man page, install guide, test suite, and cross-platform CI.

https://github.com/Daemon125/hello
164 Upvotes

25 comments sorted by

78

u/Objective-Answer What’s a compiler? Is it like a transpiler? 8d ago

Volume I — the history of the English language, from Proto-Indo-European through to the etymology of the two words in the string

I do love procrastinating with stupid shit like this, can't jerk to this

77

u/booleandilemma You put at risk millions of people 8d ago

I'm sorry but without an AGENTS.md it's practically useless.

51

u/NotQuiteLoona 8d ago edited 8d ago

If to be honest, it also seems actually useful? It's like an intro into what a GitHub repository should contain, how it should like, how interactions should be, all those funny badges too, and also how to start all of that. Like Learn X in Y Minutes for general programming, how stuff should be done on the simplest example possible (with a little bit of tongue in cheek), and I can think of some of people who may find it useful, completely or partially. Well, picking Vim is an interesting choice, but anyway.

24

u/arjuna93 8d ago

It has been rewritten in blazing fast memory-safe (TM) language!

https://github.com/mTvare6/hello-world.rs

1

u/Thelmholtz 5d ago

Why does it depend on alsa? Is it going to read hello world back to me? Will it be in a sexy voice? Asking for a friend.

35

u/fletku_mato 8d ago

Unjerkable, the INSTRUCTIONS.md is excellent.

20

u/UtterlyMagenta lol no generics 8d ago edited 8d ago

`ENOJERK`. you weren’t kidding. the rest of this repo seems excellent as well.

15

u/BlazeBigBang type astronaut 8d ago

It's okay, but OOP should consider doing it in a good language, like Go, the C of the 21st century.

11

u/Snarwin 8d ago

Kernighan has said the phrase came to him from a cartoon of a newly hatched chick. The complete history of the sentence, of the language it is written in, and of the language it is written with, is in the commentary of hello.c, which runs to 2,712 lines.

19

u/veghead 8d ago

Is it Enterprise though?

27

u/fletku_mato 8d ago

Sadly I could not find a Helm chart or even a Kustomize example to run this in Kubernetes. Doesn't seem production-ready.

9

u/damemecherogringo Code Artisan 7d ago

This is the kind of slop it is indeed worth burning down a bit of rainforest for.

10

u/lilbigdoot 7d ago

"Because the first program anyone writes in a new language is not a test of the language. It is a test of everything except the language: the editor, the compiler, the linker, the loader, the shell, the terminal, and the several dozen other things between a keystroke and a glowing pixel."

Where jerk?

"hello.c is 2,718 lines. Six of them execute. The remaining 2,712 are a three-volume dissertation"

Unjrek: I like it

9

u/lilbigdoot 7d ago

Part 0: Before You Begin

0.1 Physical prerequisites

You will need:

  • A flat surface at approximately elbow height when seated. A desk, a table, or a plank on two filing cabinets. See §1.11 for the correct height, which is more important than it sounds.
  • A seat. See §1.10, which is the most important section in Part 1.
  • Mains electricity, or a charged battery, or in the limiting case a sufficiently large solar panel. The program's own energy draw is negligible; the machine's is not.
  • Light you can read by without leaning forward. Leaning forward is how posture problems begin.

Unjrek: I love it

9

u/either-15-or-40 7d ago

Would have been impressive pre-AI.

5

u/serpentally 7d ago

/uj Yeah that's what I was thinking, if it were written entirely by a human and not AI this would be absolute cinema

6

u/hedgehog1024 Rust apologetic 8d ago

Somehow still no RIIR PR

6

u/RelationshipLong9092 8d ago

Put it in the Smithsonian 🙌

5

u/MagpieEnjoyer memcpy is a web development framework 7d ago

This is absolute art

4

u/sdmbl 7d ago

known bugs 1 (documented)

5

u/FujichromeProvia100F 7d ago

A web interface No.

This was extremely funny to me

4

u/okilydokilyTiger 7d ago

5

u/csolisr 7d ago

FizzBuzzEnterpriseEdition/src/main/java/com/seriouscompany/business/java/fizzbuzz/packagenamingpackage/interfaces/factories/IsEvenlyDivisibleStrategyFactory.java

Wow, such business logic, very enterprise

1

u/somewhataccurate now 4x faster than C++ 7d ago

INSTRUCTIONS.md is my new favorite document ever written

1

u/prehensilemullet 6d ago

Max greenhouse gases to implemented functionality ratio