fp-hello-world
A simple yet elegant Free Pascal project that prints "Hello World" in style!
- Active · last change 6-12-2025
- ★ 7 on GitHub
README
✨ FP Hello World 🌍
The Fanciest Hello World in Free Pascal
)
======================================
???? Welcome to FP Hello World! ????
======================================
The most elegant "Hello, World!"
implementation in Free Pascal
======================================Welcome to FP Hello World, a simple yet elegant Free Pascal project that prints "Hello World" in style!
This project serves as a test case for the upcoming new Free Pascal package manager, or simply, a fancy way of doing Hello World.
Why Use This? 🤔
✅ Simple - Just one unit with one procedure
✅ Well-Documented - Clear examples and documentation
✅ Extensible - Easy to modify and build upon
✅ Modern - Follows modern Pascal best practices
Quick Start 🚀
- Include the unit in your project
- Call
PrintHelloWorld - Be amazed by the output!
- Question your life choices
- Realise this is peak programming
- Profit 💰
"I wrote a 'Hello, World' program, but I'm not sure what to do next."
— Every programmer ever
program QuickExample;
uses
HelloWorld;
begin
PrintHelloWorld; // That's it!
end.Features ✨
| Feature | Description |
|---|---|
| 🎯 Simple API | One function to rule them all - just call PrintHelloWorld |
| 🕒 Dynamic Greeting | Time-based greetings (morning/afternoon/evening) |
| 🌙 Moon Phase | Shows current moon phase with emoji |
| 💡 Fun Facts | Random programming facts and jokes |
| 📦 Modular | Clean, reusable unit structure |
| 🧪 Well-Tested | Example included to demonstrate usage |
| 🏗️ Extensible | Easy to modify and build upon |
| 📚 Well-Documented | Clear comments and examples |
Demo
======================================
??????? Running the example program... ???????
======================================
Good evening, Hello World from Free Pascal!
-------------------------------------------
?????? Time: 06:54:04 PM
???? Date: 2025-06-11
???? Moon Phase: ????
???? Did you know? The first computer bug was a real bug (a moth) found in 1947!
Have a great day! ????Note: The greeting changes based on the time of day, and you'll see different moon phases and random facts each time you run the program!
📂 Project Structure
fp-hello-world/
????????? src/ # Source code
??? ????????? HelloWorld.pas # The reusable unit
????????? examples/ # Example programs
??? ????????? main.pas # Basic usage example
????????? README.md # This documentation
????????? LICENSE.md # MIT License
????????? CONTRIBUTING.md # How to contribute🧩 Usage in Your Project
Basic Usage
program MyAwesomeApp;
uses
HelloWorld;
begin
PrintHelloWorld; // It's that simple!
end.The first known "Hello, World!" program appeared in 1972 in a book by Brian Kernighan. Back then, it took 5 lines of code - now optimized it to just 1 procedure call! #Progress
— Author
Advanced Usage
You can also use individual functions:
// Get just the moon phase emoji
moon := GetMoonPhaseEmoji;
// Print a random fact
PrintRandomFactOrJoke;🛠️ Installation
Prerequisites
- Free Pascal Compiler (FPC) 3.2.2 or higher
- (Optional) Lazarus IDE for visual development
Installation Steps
- Clone the repository:
git clone https://github.com/ikelaiah/fp-hello-world.git cd fp-hello-world - Compile the example:
cd examples fpc -Fu../src main.pas - Run the example:
# Windows .\main.exe # Linux/macOS ./main
🤝 Contributing
Contributions are what make the open source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
📜 License
Distributed under the MIT License. See LICENSE.md for more information.
"I'm not a lawyer, but I'm pretty sure this license means you can do whatever you want with this code. Just don't blame me if your toaster starts printing 'Hello, World!'"
— Author
📊 Project Stats (100% Accurate)
??? Code Quality: [##########] 100%
??? Documentation: [##########] 100%
??? Fancy Factor: [####### ] 70% (needs more emojis)
??? Bugs: [ ] 0% (I hope)🤔 Why Pascal?
| Feature | Pascal | Other Languages |
|---|---|---|
| Syntax | begin/end |
{/} (Did you close them? 😉) |
| Speed | Blazing fast | Still compiling... |
| Fun | procedure DinnerWithFriends; |
const fun = require('not-as-much-fun') |
| Error Messages | Helpful and clear | undefined is not a function |
| Compilation | Once and done | Now downloading: 1,237 dependencies |
| Type Safety | Strongly typed | '2' + 2 = '22' 🤔 |
| Learning Curve | Gentle slope | npm install learning-curve --save-dev |
| Legacy Code | Still runs perfectly | Deprecated: Use the new framework |
| Code Readability | SelfDocumentingCode |
x = a ? b : c ?? d?.e ?? f() |
| Memory Management | You're in control | GarbageCollector.exe has stopped responding |
| Build Tool | fpc hello.pas (or just F9/F10 in Lazarus) |
webpack.config.js (500+ lines) |
P.S. The author of this project loves all languages (except the ones he doesn't). No developers were harmed in the making of this comparison.
— Author
🚨 Troubleshooting
Program won't print "Hello, World!"
- Solution: Check if your keyboard is plugged in. If that doesn't work, try turning it off and on again.
Too many emojis in README
- Solution: Impossible. The optimal emoji-to-text ratio is approximately 1:3. We're currently at 1:5 - room for improvement! 🎯
Your toaster now runs Pascal
- Solution: Congratulations! You've reached peak programming. Please submit a PR with benchmarks against your microwave.
🥚 Easter Eggs
- The Magic Number
Try callingPrintHelloWorldexactly 42 times. Just kidding... or am I? 🤔 - Hidden Message
The number of 'e's in this README is a prime number. Probably. - The Secret Feature
If you read this section aloud three times in front of a mirror, nothing will happen. But wouldn't it be cool if it did? 🪞 - For Future Archaeologists
Hello from 2025! We still don't have flying cars, but we do have this fancy Pascal project!
🙏 Acknowledgments
- Thanks to the Free Pascal team for an amazing compiler
- Everyone who has ever written a "Hello, World!" program
- You, for checking out this project! 🎉
"I came for the 'Hello World', I stayed for the README."
— Probably Someone, Somewhere
Made with ❤️ and Free Pascal
Give a ⭐️ if you enjoyed this project!

