News for hackers. Stuff that matters.
Re:Show HN: CLI for executing code in many different languag... by M8 on Wednesday April 08, 2015 @05:54AM (#9339664)
Re:Show HN: CLI for executing code in many different languag... by andystanton on Wednesday April 08, 2015 @09:06AM (#9340447)
Haha, I was going for the latter.
Re:Show HN: CLI for executing code in many different languag... by gizzlon on Wednesday April 08, 2015 @09:55AM (#9340760)
Cool!

The Perl one seems to be perl6, not perl5: https://github.com/docker-exec/perl/blob/master/Dockerfile

Maybe you should rename it to Perl6? Perl 5 is still the standard in the Perl world..

Re:Show HN: CLI for executing code in many different languag... by andystanton on Sunday April 19, 2015 @06:27PM (#9405140)
@gizzlon @senorsmile perl 5 is now the default in the latest 1.0.1 release. perl6 is available too, either by using .p6 extension or specifying an override image with: dexec foo.pl --specify-image dexec/perl6
Re:Show HN: CLI for executing code in many different languag... by andystanton on Wednesday April 08, 2015 @10:34AM (#9341009)
I didn't do my research @gizzlon - I assumed it was backwards compatible!

Perhaps you can help - a quick Google suggests that a reasonable Perl 6 file extension is .p6 - is that standard in the Perl world?

dexec chooses a Docker image based on file extension. I'm planning to allow this to be overridden anyway, but it would be great if there is an easy way to distinguish between Perl 5 and 6 source files.

Re:Show HN: CLI for executing code in many different languag... by senorsmile on Wednesday April 08, 2015 @02:12PM (#9342681)
perl6 will definitely not backwards compatible. AFAICT, if any extension is used, it will probably still be '.pl'. the hash bang line (at least in unix land) determines the specific interpreter to use. Besides that, perl6 is not quite production ready (although this it is supposed to be christmas this year). Perl6 doesn't even have one specific implementation, although it sounds like the first production ready version will be rakudo on top of the MoarVM.

Perl5 would be a much saner default. I would worry about supporting some version of perl6 at a later time.

btw, cool tool!

Re:Show HN: CLI for executing code in many different languag... by gizzlon on Wednesday April 08, 2015 @06:24PM (#9344515)
Sure, I'll take a look at it tomorrow
Re:Show HN: CLI for executing code in many different languag... by gnur on Wednesday April 08, 2015 @05:33AM (#9339586)
As someone who wants to try a new language every month this is awesome!

It is literally every language I ever tried, and then some, this certainly lowers the bar for me to try some more.

Re:Show HN: CLI for executing code in many different languag... by andystanton on Wednesday April 08, 2015 @09:04AM (#9340437)
Polygluttony was my original reason for making this too - I wanted an easy way to run solutions to Project Euler problems in different languages.

If you're interested each of the Docker Exec image repositories contains examples e.g.

https://github.com/docker-exec/haskell/tree/v1.0.0/test https://github.com/docker-exec/d/tree/v1.0.0/test https://github.com/docker-exec/racket/tree/v1.0.0/test etc

Re:Show HN: CLI for executing code in many different languag... by shark234 on Wednesday April 08, 2015 @05:19AM (#9339541)
Interesting. IMHO it seems useful for playing around with different languages, but not for using it more seriously. Anyway, it looks fun, good job :)
Re:Show HN: CLI for executing code in many different languag... by andystanton on Wednesday April 08, 2015 @09:05AM (#9340443)
Thanks! And you're right - it is not intended as a production tool.
Re:Show HN: CLI for executing code in many different languag... by ericmo on Wednesday April 08, 2015 @09:25AM (#9340563)
Is the C# code built with Mono?
Re:Show HN: CLI for executing code in many different languag... by andystanton on Wednesday April 08, 2015 @09:41AM (#9340680)
That's right @ericmo. The C# and F# Dockerfiles are derived from this Mono base image:

https://github.com/docker-exec/base-mono/blob/v1.0.0/Dockerf...

as can be seen from their respective Dockerfiles:

https://github.com/docker-exec/csharp/blob/v1.0.0/Dockerfile https://github.com/docker-exec/fsharp/blob/v1.0.0/Dockerfile

The actual execution invokes this script which calls mcs or fsharpc to compile, and then executes using the Mono runtime:

https://github.com/docker-exec/image-common/blob/v1.0.0/dexe...

Re:Show HN: CLI for executing code in many different languag... by fit2rule on Wednesday April 08, 2015 @03:19PM (#9343162)
Needs more Lua! :)
Re:Show HN: CLI for executing code in many different languag... by andystanton on Sunday April 19, 2015 @06:26PM (#9405131)
@fit2rule Support for Lua has been added in version 1.0.1