Jupyter language kernel generator for DSLs developed using the Rascal Language Workbench.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you need to install the software and how to install them
A step by step series of examples that tell you have to get a development env running
Say what the step will be
Give the example
End with an example of getting some data out of the system or using it for a little demo
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
- Mauricio Verano Merino - Initial work -
- Jurgen Vinju
See also the list of contributors who participated in this project.
- Hat tip to anyone who's code was used
DSL Dockerization using Bacatá
In order to execute Notebooks for DSLs using Bacatá you need to fulfill the follow prerequisites:
In order to Dockerize a Rascal DSL, you need a Rascal DSL Project with:
- A module that defines a REPL ADT (details about REPL defitinion)
NOTE: From the command line syntactic auto-completion is not supported nor the Codemirror mode generation.
java -Drascal.path="Path to Bacatá Rascal jar" -jar <Rascal jar> bacata::Generator docker <language Name> <Path to DSL project src folder> <module that contains REPL> <binding REPL adt> <path to the language logo>
The following command will work with a DSL implemented using the Rascal Language workbench called QL.
java -Drascal.path="/Users/mveranom/Downloads/bacata-rascal.jar" -jar /Users/mveranom/Downloads/rascal.jar bacata::Generator docker qlLanguage home:///Documents/RascalProjects/QL/src lang::ql::QLREPL qlREPL home:///ql-logo.jpg
After executing this command Bacatá generates the following artifacts in the root folder of the DSL project:
- A folder called kernel that contains other folder with the name of the language.
- kernel.json: this file contains the Jupyter Language kernel of the DSL that works with the Docker Bacata Image.
- logo-64x64.png: this file is optional and represents the logo of the language.
Dockerfile Image Build
In order to create the Docker image that does the DSL Dockerization, the user needs to execute the following command two commands from the command line:
docker build -t <name-of-image> .
The later command will read the Dockerfile and produces a Docker image with the DSL project source code.
<name-of-image>: is an identifier for the Docker image.
docker build -t qlLanguage .
Dockerfile Image Execution
Now we are going to run the Docker image built in the previous step. To run the Docker image you have to execute this command in the command line:
docker run -p <port>:8888 <image-name>
<port> is an available port in your machine.
<image-name> should be the same name used in the previous step.
After running this command, you will get some output:
Now, you have to follow the next two steps:
- Copy the
tokenfrom the output
- Open a browser and type
Then you will see an interface like this: