the surrounding stuff for my next set with

It basically just prints emoji for a vim buffer but with more livecode

gwen fc28fe01e4 Update '' 1 year ago
constellations @ 95eb6b2345 17bea080df Stuf from hex90 1 year ago
examples 17bea080df Stuf from hex90 1 year ago
plugin 05fac25e26 moved the sets into main.lua 1 year ago
.gitignore c4d71b5369 Initial commit 2 years ago
.gitmodules 89d3f78369 add submodule 1 year ago
LICENSE c4d71b5369 Initial commit 2 years ago fc28fe01e4 Update '' 1 year ago
frame.lua ec32e35fab fix the get in lut 1 year ago
main.lua 17bea080df Stuf from hex90 1 year ago
ustring.lua b187178454 got the stamp thingy working, its like most of the way to a livecode set now :) 2 years ago

Its a livecode framework for spewing emoji into vim buffers a 60fps. surprisingly satisfying visuals ensue.

Quick start

  1. clone the repo with git clone --recursive
  2. navigate to the polonium/examples directory
  3. open an example file with the following command nvim -c "so ../plugin/plugin.vim" example.po.lua
  4. run :Polonium
  5. save the file :w
  6. start livecoding!


you can install this with a plugin manage now!! I use packer like this:


you should still be able to source the file the old way!

:so plugin.vim

then you can use this command to start it:


So all together

$ cd polonium
$ nvim example.po.lua

# if you are not using a plugin manager
:so plugin.vim


These are the vim commands you can run once the plugin is running


Starts the show!


Inserts a blank polonium function for oyu to start framework


Re-open the code window if you :q by accident

Frame Library

create(width, height, fill)

makes a frame and sets every character to whatever is in fill (default characteris 🖤)

local f = require('frame').create(30,60, '🌿')


serializes a frame to a flat utf8 string with newlines. basically you use this to pass the frame out of your main function

return function(time, frameNumber)
    local frame = require('frame').create(35, 35)
    return frame:toString()

There is one other maybe useful trick in that you can make a small frame then use it as a stamp in a bigger frame.

local stamp = require('frame').create(5, 5, '💵')
local frame = require('frame').create(35, 35)


used to blank out a frame.

frame:clear('  ')


sets a single character or applies a stamp to the supplied XY position



return the current value

local currentVal = frame:get(2,2)


⚠I basically havent tested this at all so 💁‍♀️ It should apply a "lookup table" where in you give it a table and each key is replaced with it's value

local tbl = {}
tbl['🅰] = '🅱
frame:lut(tbl) -- all the 🅰 will become 🅱


calls the callback once for each slot in the frame. Mostly just saves you from writing a bunch of double-fors the callback should have the signature function(oldCharacter, x, y, xPercent, yPercent)

frame:forEach(function(oldCharacter, x, y, xPercent, yPercent)
    return '🆙' -- will set the character ar X,Y to 🆙


run a marquee like the old HTML tag 😎 not that the argument is a table with named things

    time = time, -- should be the number of seconds since an epoch, but you ncan do fun stuff by patching a sine or something from the constellations beat library into it
    text = 'hello ',
    position = 4, -- the row to apply the marquee


Constelations is my go-everywhere lua library. I dont have a ton of docs right now but you can look at comments in the files