runner icon indicating copy to clipboard operation
runner copied to clipboard

Add Wolfram Language

Open arnoudbuzing opened this issue 2 years ago • 10 comments

Please complete the following information about the language:

  • Name: Wolfram Language
  • Website: https://www.wolfram.com/language/
  • Language Version: 13.2

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

  • Test Frameworks: Built-in unit testing framework: VerificationTest (https://reference.wolfram.com/language/ref/VerificationTest.html)

  • How to install: Docker Hub: https://hub.docker.com/r/wolframresearch/wolframengine or via (free) Wolfram Engine install: https://www.wolfram.com/engine/ or via Wolfram Cloud API calls: https://www.wolfram.com/cloud/

  • How to compile/run: Wolfram Language code can be run from command line scripts (e.g. https://www.wolfram.com/wolframscript/)

  • Any comments: Wolfram Language is a high-level computational language that excels at solving programming challenges in a clear and concise manner


  • [x] License/Cost
  • [ ] Image
  • [x] Running (wolframscript)
  • [ ] Testing and output (VerificationTest)
  • [x] CodeMirror mode (Mathematica mode)
  • [ ] Icon

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

arnoudbuzing avatar Feb 01 '23 18:02 arnoudbuzing

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.

kazk avatar Feb 01 '23 21:02 kazk

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.

arnoudbuzing avatar Feb 01 '23 21:02 arnoudbuzing

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.

kazk avatar Feb 01 '23 22:02 kazk

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

arnoudbuzing avatar Feb 01 '23 23:02 arnoudbuzing

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

https://github.com/codewars/wolfram

?

arnoudbuzing avatar Feb 02 '23 16:02 arnoudbuzing

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

hobovsky avatar Feb 02 '23 16:02 hobovsky

@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.

arnoudbuzing avatar Feb 02 '23 16:02 arnoudbuzing

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

kazk avatar Feb 02 '23 18:02 kazk

@kazk Thanks for that clarification

arnoudbuzing avatar Feb 02 '23 18:02 arnoudbuzing

There is also Mathics

jfioasd avatar Jul 11 '23 13:07 jfioasd