leachim6 / hello-world

Hello world in every computer language. Thanks to everyone who contributes to this, make sure to see contributing.md for contribution instructions!
http://github.com/leachim6/hello-world/wikis
MIT License
10.99k stars 1.92k forks source link

Add a way to run the examples #316

Open camerondavison opened 8 years ago

camerondavison commented 8 years ago

maybe a docker container for each?

deanturpin commented 8 years ago

Nice idea.

vdun commented 8 years ago

or create a folder named 'test' where it contains a test/run for each file and have a CI (travis, ...) for testing.

leachim6 commented 7 years ago

implemting CI on this is a great idea and I'm working on this

leachim6 commented 7 years ago

BUMP Does anyone have any ideas how we would build out something like this? The problem here is that there isn't a single OS that will run every single one of these examples. I have several servers I could host an application like this on, but I wouldn't even know where to start.

thathexa commented 7 years ago

So it also turns out not all of these languages actually have compilers/interpreters (damn you, awesome esolangs!). Which makes sense, maybe someone just wanted to make a proof of concept but didn't want to go through the complication of writing a way to actually execute it. Or maybe it's just stupid ol' me who hasn't found a BIT compiler :P

Either way, I guess the problem still remains... I am pretty certain there is no possible way to run all of the assemblies on one machine (unless someone will find some kind of super-assembler), but as for the rest... It's just a matter of spending hours googling for all the compilers/interpreters and writing a very simple script to execute them (it will be really easy if the name of the compiler file will be the same as the name of the source file, e.g. the c compiler will be renamed from gcc to c in order to compile c.c). Though something as huge as this should just be it's own repo...

Potherca commented 7 years ago

I might be speaking out of turn here, but I would strongly suggest creating a separate repository to get this started. It could always be merged back into this repo when it is stable but until it is, you're going to end up with a lot of non-hello-world related discussions and PR's.

As far as infrastructure goes, one container per language seems most sensible. If a container can not be created for a specific language, a virtual machine might be available. Languages that can not be run could simple be marked as such (to avoid effort being wasted), stating the reason (missing compiler, hardware not virtualizable, etc.)

I'd say it is certainly possible to create a executable version for most languages but it will be quite an undertaking.

Maybe we should check other "Hello world" collections to see if we can get more people onboard with this idea?

NightMachinery commented 3 years ago

Adding shebang line runners for the languages that support it can be quite helpful.

Tyler887 commented 2 years ago

You can clone the repo using git clone https://github.com/leachim6/hello-world.git.

If you do not have Git, download it.

gnuhead-chieb commented 2 years ago

The problem here is that there isn't a single OS that will run every single one of these examples.

Use emulator/simulators such as qemu,wine,darling