alert!!! site for the old dublang version 0.6.x, see the latest version here
home - plugins - tutorials - history - manual - design
dublang is a multi-language live coding system with support for multiple programing 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
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
with those goals in mind dublang provides
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
shebang are lines starting by the two characters #! followed by the dublang plugin name
shebang defines regions in dublang language and can be added at any place, multiple times
for instance, the line #!supercollider
defines a region
to write SuperCollider code
plugins extends dublang adding new languages, new services and new tools, available plugins
requirements
= 5.1
>= 0.5.1
>= 1.36.0
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
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 an interface to manage Tidal Cycles service and a way to live coding on it
the same idea is true for all dublang plugins
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 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
Joenio Marques da Costa <joenio@joenio.me>