Skip to content

Conversation

@sancarn
Copy link

@sancarn sancarn commented Nov 14, 2025

Closes #1528 -> Allows multiple implementations per language resolving this issue.
Closes #1527 -> This becomes a feature rather than a bug.

This refactor updates the repository structure to organize hello-world examples by programming language, ensuring clarity and preserving history with git mv. It standardizes folder naming, separates language versions, and ensures file names are valid across platforms (including Windows-safe character replacements) as existing.

The old structure was as follows:

Root
|- [language initial (or # for all symbol initials)]
|  |- [langName and extension if required]

The new proposed structure is as follows:

Root
|- [language initial (or # for all symbol initials)]
|  |- [language name]
|  |  |- [printed how](.[extension])?
|  |  |- ...

Example:

root
|- c
|  |- c
|  |  |- stdout.c
|  |  |- dialog.c
|  |  |- lib-qt.c
|  |  |- ...
|  |- c#
|  |  |- stdout.cs
|  |  |- dialog.cs
|  |  |- lib-qt.cs
|- p
|  |- python3
|  |  |- stdout.py
|  |  |- dialog.py
|  |  |- lib-qt.py
|  |  |- app-blender.py
|  |  |- ...
|- v
|  |- vba
|  |  |- stdout.bas
|  |  |- dialog.bas
|  |  |- lib-qt.bas
|  |  |- ...
|  |- ...

The lib- Prefix has been used when a non-standard library has been used to perform the "hello world" task. For instance:

# lib-gui-kivy.py

import kivy
kivy.require('1.0.6')

from kivy.app import App
from kivy.uix.label import Label


class MyApp(App):
    def build(self):
        return Label(text='Hello World')

if __name__ == '__main__':
    MyApp().run()

Because kivy is a non-standard library, it has been included with the lib- prefix.

It should also be noted that some have a impl- prefix... I am uncertain these should stay in the repo generally, however hello-world\c\c\impl-web-cgi.c - as far as I can tell CGI (Common Gateway Interface) is simply a binary specification. I.E. Any binary with this specification can act as a web server. It definitely belongs in c however it simply requires implementation of an interface, and it doesn't do anything other than outputing html to stdout... Again, unsure whether this really sits within this repo, as it's a very different thing than a standalone example (it requires a separate CGI host).

A list of all prefixes used are as follows:

cli
dialog
document
graphics
gui
notebook
stdout
stylesheet
transcript
ui
hardware
impl-web
lib-android
lib-animation
lib-app
lib-bot
lib
lib-gui
lib-mobile
lib-vr
lib-web
lib-worker

Known Limitations

File purposes have been assumed, not verified

It has to be said that generally speaking file purposes/output type has been assumed from inspecting file name and contents, but for some esolangs this has been with great difficulty... E.G. does:

<:48:x<:65:=<:6C:$=$=$$~<:03:+
$~<:ffffffffffffffb1:+$<:77:~$
~<:fffffffffffff8:x+$~<:03:+$~
<:06:x-$x<:0e:x-$=x<:43:x-$

Print to stdout, or some other location like a javascript console? It's unclear without knowing the ins and outs of the specification. In these cases stdout has been assumed, and these can be moved at a later stage with git mv by someone more in-the-know.

Additionally I would recommend we include a readme under each language folder, which at the very least links to the language specification, source code or evidence that it exists, because while trying to determine what the specifications were, I found numerous languages which have been removed from the internet. E.G FOG/master appears to have been removed and https://fog.falkirks.com/ 404s. I did at the very least find cfog though, which appears to be a C implementation of FOG...

Further issues

During this process I've identified numerous issues with the repo, however I'd like to get this PR out of the way first if possible as it will affect all future PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should "Hello world" be standardised? Why are there 20 seperate Python implmentations?!

1 participant