[Poll] What programming language would you like CodinGame to support next?

create VM at codeanywhere.com, edit source, compile it (mobile, web, desktop ssh)
and then give SSH url to VM with program path/name to CG
CG connect over SSH, run program, send data, receive answer…

pro: u can compile with any language just need command line for starting program
contra: price is 3$/mo and security - to give CG access to VM that registered to u and paid by ur card…

ok. another version without security holes.
need TCP-Redirector for Windows and Linux (for others just source code) that listen some port on client machine and redirects input network data to some program and send output of program to socket back.
with some simple GUI: listened port, program path/name with args (if needed).
and home router can be configured by port forwarding to client machine.
CG connects by TCP and do job: send data, receive answers and calcs points.

if CG will send task name before data, then it can be automated. for example for all CC tasks redirector can call any programs automatically. not fair. and CC will lose interest for people… so names should not be send… Redirector should be configured manually for each program

pro: not need add any langs to list with waiting dozen months for each
contra: sources stays at player machines. but Redirector can send source if player allow it and point source file.

PS writing such Redirector… probably 100-200LOC… so waiting CG decision

PPS sorry for my English :slight_smile:

You realize that let alone many other concerns, this is much more work for the staff than either just adding more languages or officially supporting binaries compiled locally, right?

1 Like

not really
for lang u need right install it, learn args for compiling, dependents and others, workers should know/fix problems with lang and etc.
writing simple TCP-socket (or WebSocket… doesnt matter… some channel) program is easiest in such case. need change some site details for such redirections (as new lang).
and all problems with installation and compilation lays on player shoulders. but they are usually can setup stuff in right way.
current langs list is not changed so “noobs” can write code as usual on site.

CG can use Redirector for [Practice] only for example.
I want solve problems with new lang but I dont want wait 6-12 month with unknown result: maybe it will be Typescript maybe Haxe maybe D…

There is a much simpler solution. Codingame just needs to provide a form field for entering the code and a second field where you can enter a docker image uri. This would be a very flexible and secure solution.

It’s not that easy to add or update a language, as you can see below. In short CodinGame is a little oder than docker, so they built their own docker-like system.


While CG has built their own Docker solution due to historic reasons, it should be still possible to add in addition docker side by side.
There are multiple and cheap solutions if CG want to support more languages.
My suggestion was to have a light integration for languages not supported so far: user specifies the source code and a docker image, able to run the source code. Therefore the existing solution does not need to be touched, or only once for the new “generic language”.

@TwoSteps what do you think?

Honestly, I lack the technical knowledge of Docker and of our infrastructure to tell you if it’s feasible. I’ve learned though that there usually is no simple solution to any problem like this.

If there was a simple way to use the Docker technology (that we actually use for Tech.io) for CodinGame, we would have done it already.

1 Like

Use a docker technology like andre2007 says will be used by a very small part of the community. And it won’t be supported during contest since codingame need an access to the source code to read it and you can add any file you want in your docker image. We will be limited at 100kb for the whole docker image (and not the dockerfile) because codingame won’t increase the size limit just for this feature (i hope you can run your code in alpine).

Too much efforts for a useless feature.

Yes, docker and Kubernetes is my day to day businesses. To be very clear, my request is not about changing anything in your existing infrastructure, but about adding an additional component which compiled the given source code to an linux executable which then can be used by your existing infrastructure.

With this rather small enhancement you can hold your promise from the front page “we speak them all!”

@Magus your answer sounds like you misunderstood my proposal. CG has fully access over the source code and user does not have access to the docker image.
The community can create new images for new languages but CG will enable them at the end.

Please see my last answer to @TwoSteps

I would propose following work flow. In CG editor you choose D as language and write as usual your source code. For D there is a mapping defined to a specific docker image. Therefore the source code is passed to the docker container and the docker container willl return a linux executable. The linix executable is then executed using the existing CG infrastructure.

With this approach CG can support almost any language which compiles to a linux executable. Adding new languages would become very easy.

Quoted for emphasis.


In my opinion CG wants to transport the philosophy:

  • Tackle software problems from complete new angles.
  • Bring developers together to discuss problems as fresh minds will lead to innovative solutions.

If my understanding of CG philosophy is correct, it would be very strange if CG developer are not aligned to this philosophy.

I made a proposal and hopefully it is a fresh idea which can be evaluated.

I’m sorry, but your suggestion is neither a new angle or being innovative. You are relentlessly hammering the same point about using Docker for D support when it has already been addressed many times already.

When the staff is ready to add D support, it will happen. Until then you can only be patient and understanding of a task that might be more difficult than it first seems.

1 Like

In case you do not belong to CG developer we might wait on an official answer of CG developer support.
@TwoSteps ?

The proposal I gave supports not only D but literal all compiled languages.

It’s an official answer.

Hello @andre2007

I’m sorry to disappoint you but, as I wrote earlier, there is just no simple way of doing what you propose. Our current system isn’t compatible with Docker and won’t be without huge development efforts. Currently, there is just no way for us to dedicate time on this.

However, I still intend on pushing things internally for the support of a new language (could be D) before the end of the year.

I appreciate the enthusiasm and I’ll try to work on a blog article explaining how CodinGame works.

1 Like

Hello @TwoSteps,
Thanks for working on this topic. Yes, maybe D is added this year, but also it could be D is not added this year or the next years at all
I think I found a completely other solution, which will cost CG only a half hour to implement and makes D available:
From @eulerscheZahl I got the info that there is a C++ hack which enables loading arbitrary executables as long as they are small (https://github.com/Agade09/CG-Send-Binary). I tried it and failed as the D executable is too big. A D executable consists of 3 parts: DRuntime, the standard library Phobos and the actual user code.

Instead of compiling the DRuntime and Phobos into the executable, it is possible to just link (shared objects) agsinst them. This will reduce a 800kb application to 15kb.

What I ask you: is it possible to add the 2 shared objects DRuntime and Phobos to the environment you use for C++? Technically it is nothing more than just copying these 2 files to /usr/lib.

Could you ask your technical engineers about this solution? Even this is the most cumbersome way of using CG for D users, it is a way to use a sane, fantastic programming language. Every line you write with D is fun, if we now even could add CG to that, it will be unbelievable great!

No entreprise ever will just add a “simple hack” to cover a new feature for just few users. The feature is done in a complete state for everyone or not at all.

1 Like

@Magus The request is not about the hack. The hack is already there and is working fine as long as you have a rather small executable (100_000 lines limit).
I asked for another thing: Including 2 shared objects from the D language (https://github.com/ldc-developers/ldc/releases/download/v1.16.0/ldc2-1.16.0-linux-x86_64.tar.xz). CG could either copy 2 shared objects into the /usr/lib folder or if they want they can just install from the Gnu Compiler Collection gdc-9 to have the libraries.