codewars / runner

Issue tracker for Code Runner
33 stars 8 forks source link

Add Wolfram Language #232

Open arnoudbuzing opened 1 year ago

arnoudbuzing commented 1 year ago

Please complete the following information about the language:

The following are optional, but will help us add the language:



:+1: reaction might help to get this request prioritized.

kazk commented 1 year ago

I don't think we can add this because of the licensing and the cost.

  1. Node-locked licensing won't work for us because we use many VMs and containers.
  2. On-demand licensing will allow us to generate a reusable key for all of our machines. But I don't think they allow us to have that many Wolfram Engine kernels running concurrently. I couldn't find the pricing, but I'm sure it's not cheap, and pay as you go is too risky. I also don't know if the kernel started with the key is designed to be safe to evaluate arbitrary code.
arnoudbuzing commented 1 year ago

Hi @kazk -- I work for Wolfram Research and we should be able to help you with free licenses (for Wolfram Engine) both for the website and yourself as well. If that's acceptable, let me know, and we can take it from there.

kazk commented 1 year ago

Hi @arnoudbuzing. That's awesome, I didn't expect that :laughing:

Let's start looking into how to add Wolfram Language, then. Can you create a repository similar to https://github.com/codewars/riscv?

The repo should include:

  1. Dockerfile: FROM wolframresearch/wolframengine:13.2 then add a user codewarrior and /workspace.
  2. bin/run: A Bash script with commands to run an example kata in a container. I'm guessing the command to execute in the container is something like wolframscript -file tests.wls (with WOLFRAMSCRIPT_ENTITLEMENTID environment variable set).
  3. examples/*: Some example kata with passing tests, failing tests, errors, etc.
  4. Running the tests should produce outputs described in CodeRunner Messages. If that's not possible, we can discuss alternatives.

You can test how the output is rendered on Codewars with Kumite.

  1. Open https://www.codewars.com/kumite/new?language=python
  2. Disable tests
  3. Print the output

    print("""
    
    <PASTE THE OUTPUT HERE>
    
    """)
  4. Run

Please let me know if you have any questions or need help.

arnoudbuzing commented 1 year ago

Thanks! I will try to work on this, this week.

arnoudbuzing commented 1 year ago

@kazk Do I need special permissions if I want to create this repo:

https://github.com/codewars/wolfram

?

hobovsky commented 1 year ago

Usual workflow is to fork the repo, introduce changes to your private fork, and when done, submit a pull request.

arnoudbuzing commented 1 year ago

@hobovsky Thank you, but there is no repo to fork here: https://github.com/codewars/wolfram I understand that once there is a repo, then I can fork it privately and make changes and submit a pull request.

kazk commented 1 year ago

@arnoudbuzing Please create it under your account for now. We can transfer the repo when it's ready.

arnoudbuzing commented 1 year ago

@kazk Thanks for that clarification

jfioasd commented 1 year ago

There is also Mathics