home - plugins - tutorials - showcase - history - manual - design


dublang

dublang is a multi-language live coding system with support for multiple programming languages in a single and integrated live coding session

the name dublang is inspired by the musical style dub, dub consists of remixes of existing music, and just like the dub, dublang consists of remixes of existing software tools

overview

dublang is a live coding system designed to integrates multiple live coding languages and tools in a unified user interface, without reinventing the wheel

dublang goals

  1. separation of concerns: splits the user interface from the live coding languages, services and servers
  2. single and unified textual user interface to interact with many different live coding programming languages and tools
  3. integrate not only live coding languages but also any software tool available through text user interface, command lines, APIs, etc
  4. organize and manage artwork live coding projects using software engineering good practices

with those goals in mind dublang provides

dublang language

files with extension .dub are recognized as dublang code, below we can see an example including code in SuperCollider and Tidal Cycles

#!supercollider

{ SinOsc.ar([220, 140]) }.play

#!tidalcycles

d1 $ sound "808bd(3,8)"
   # shape 0.2

when code under the region #!supercollider is evaluated by pressing "CTRL + e" it is executed by the SuperCollider language, when code in #!tidalcycles is evaluated then Tidal Cycles is used

plugins

plugins extends dublang adding new languages, new services and new tools, such as puredata, supercollider and tidalcycles, see all the available plugins here

install

requirements

install dublang, requires root user

luarocks install dublang

luarocks will get dublang package from https://luarocks.org/modules/joenio/dublang

now, let's install dublang-nvim and the recommended neovim plugins, add to ~/.config/nvim/init.vim

call plug#begin()
Plug 'https://codeberg.org/joenio/dublang-nvim.git', { 'branch': 'main' }

" rcarriga/nvim-notify provides a fancy way to display user messages
Plug 'rcarriga/nvim-notify'

" supercollider/scvim is needed for syntax highlight
Plug 'supercollider/scvim'
call plug#end()

and run :PlugInstall inside neovim, depends on vim-plug

vim-plug gif animation

see how to setup neovim to connect on dublang remote servers here

plugins requirements

usually dublang plugins depends on other tools, but the installation of those tools are out of scope of dublang

for example, Tidal Cycles depends on SuperCollider, SuperDirt and Tidal haskell library, the setup of a fully-functional Tidal Cycles environment is out of scope of dublang

but once that the Tidal Cycles is installed and functional, dublang provides a command line-interface (cli) to manage the Tidal Cycles service, and a client text editor based on neovim to do live coding

the same idea is true for all dublang plugins

usage

as the first step is good to run the dublang echo plugin, this plugin just send back the message evaluated with "CTRL + e" and is useful to validate that the dublang installation is working properly

the dublang provides a command line interface to manage the services provided by plugins, to enable and run the dublang echo plugin open a terminal and run

dublang enable echo
dublang start echo

now open the neovim with a new file helloworld.dub

nvim helloworld.dub

type the following code inside the file helloworld.dub

#!echo

Hello World

type "CTRL + e" with the cursor under the "Hello World" message

you should see a notification "Hello World" inside the neovim

dublang echo plugin gif animation

source code

dublang is free software released under GNU GPL v3.0

source code and development documentation can be found at dublang-dev, dublang, dublang-nvim, dublang-doc and dublang-ci

author

Joenio Marques da Costa <joenio@joenio.me>

contributors

you can see all the dublang contributors in the CONTRIBUTORS.md file


home - plugins - tutorials - showcase - history - manual - design