diku-dk / futhark-playground

Futhark playground

Home Page:http://playground.futhark-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

futhark-playground.org- a web service for interacting with futhark literate

A simple playground for running and sharing futhark snippets. The playground runs futhark literate code and outputs the corresponding markdown and images.

The playground consists of a Python flask server, and a Python socket server. The code submitted by users is not run by the flask server, but is instead run by one of the clients connected to the socket server.

Running the project

To run the project you need to install Python and install the dependencies found in requirements.txt (with pip: pip install -r requirements.txt).

You also need Futhark on the system running the compute server.

Running the web server

$ cd web-server && python flask_server.py

Listens to HTTP connections on 127.0.0.1:5050.

When the web-server also starts a socket server at 127.0.0.1:44372. Compute servers can connect to this port.

Running a compute client

$ cd compute-client && python compute-client.py

Connects to the socket server at 127.0.0.1:44372, and awaits requests, which contains Futhark code, and some instructions, which it will use to run the code. The compute_server will fail to run if there are no servers listening on port 44372.

There is also a Dockerfile in compute-client as well as a script run-compute-client.sh in the root of the repository that builds a Docker image and runs the client.

Cached files

The Futhark literate code output is saved by the web server upon successful executions. It is saved in ./web-server/static/literate-files, which might be relevant if you are running the web server in docker and want the cache to persist.

About

Futhark playground

http://playground.futhark-lang.org

License:GNU General Public License v3.0


Languages

Language:JavaScript 99.0%Language:CSS 0.4%Language:HTML 0.1%Language:Python 0.1%Language:LiveScript 0.0%Language:Makefile 0.0%Language:Zeek 0.0%Language:Kotlin 0.0%Language:Java 0.0%Language:Dockerfile 0.0%Language:Objective-C 0.0%Language:PLpgSQL 0.0%Language:Smithy 0.0%Language:R 0.0%Language:ASL 0.0%Language:Raku 0.0%Language:Nix 0.0%Language:LSL 0.0%Language:HCL 0.0%Language:Red 0.0%Language:Liquid 0.0%Language:Blade 0.0%Language:M4 0.0%Language:TypeScript 0.0%Language:Scala 0.0%Language:COBOL 0.0%Language:Shell 0.0%Language:Pascal 0.0%Language:TeX 0.0%Language:Haml 0.0%Language:ActionScript 0.0%Language:Groovy 0.0%Language:Csound 0.0%Language:Closure Templates 0.0%Language:ABAP 0.0%Language:FreeMarker 0.0%Language:Lua 0.0%Language:Forth 0.0%Language:VBScript 0.0%Language:Tcl 0.0%Language:C++ 0.0%Language:Clojure 0.0%Language:Latte 0.0%Language:Sass 0.0%Language:Slim 0.0%Language:Twig 0.0%Language:EJS 0.0%Language:Crystal 0.0%Language:AutoHotkey 0.0%Language:Fortran 0.0%Language:Perl 0.0%Language:Gherkin 0.0%Language:Elixir 0.0%Language:Stylus 0.0%Language:Go 0.0%Language:Common Lisp 0.0%Language:Logtalk 0.0%Language:Mask 0.0%Language:Pug 0.0%Language:Scheme 0.0%Language:Less 0.0%Language:OCaml 0.0%Language:Ruby 0.0%Language:G-code 0.0%Language:Cirru 0.0%Language:GLSL 0.0%Language:Haskell 0.0%Language:Assembly 0.0%Language:Rust 0.0%Language:Dart 0.0%Language:Elm 0.0%Language:Erlang 0.0%Language:NSIS 0.0%Language:Vala 0.0%Language:Swift 0.0%Language:Haxe 0.0%Language:QML 0.0%Language:Vim Snippet 0.0%Language:PowerShell 0.0%Language:CoffeeScript 0.0%Language:SCSS 0.0%Language:F# 0.0%Language:Eiffel 0.0%Language:Nim 0.0%Language:PHP 0.0%Language:OpenSCAD 0.0%Language:D 0.0%Language:Csound Score 0.0%Language:PigLatin 0.0%Language:Verilog 0.0%Language:Batchfile 0.0%Language:Julia 0.0%Language:MATLAB 0.0%Language:Csound Document 0.0%Language:Handlebars 0.0%Language:Io 0.0%Language:Ada 0.0%Language:ColdFusion 0.0%Language:C# 0.0%Language:jq 0.0%