curl -fsSL https://its-pointless.github.io/setup-pointless-repo.sh | bash -
apt install git clang binutils make autoconf flex bison python3
git clone http://git.veripool.org/git/verilator
cd verilator
autoconf
./configure --prefix=${PREFIX}
make
make install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MyHDL + MyHDLPeek + NBWaveDrom | |
# replace the last htmldata += ... line by a <style onload> | |
def _draw_wavedrom_javascript(data, width): | |
style = "" | |
if width != None: | |
style = ' style="width: ' + str(int(width)) + 'px' | |
htmldata = '<script>' + open(_get_js_path('wavedromskin.js')).read() + '</script>' | |
htmldata += '<script>' + open(_get_js_path('wavedrom.min.js')).read() + '</script>' | |
htmldata += '<div' + style + '><script type="WaveDrom">' + data + '</script></div>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -f main.lua ]; then | |
DATA=`grep -zoP "(?s)(-- <TILES>.+)" main.lua` | |
rm main.lua | |
fi | |
cat src/_meta.lua > main.lua | |
find src/libs/ -name '*.lua' -exec cat {} \; >> main.lua | |
find src/objs/ -name '*.lua' -exec cat {} \; >> main.lua | |
cat src/main.lua >> main.lua | |
echo "\n$DATA" >> main.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local FlowVF = {} | |
-- getWeight: callback (x, y) and should return a weight between 0 and 1 | |
-- setvector: callback (x, y, angle) called on each cell | |
-- the function returns the weight table | |
function FlowVF:createVectors(px, py, w, h, getWeight, setVector) | |
local neighbors = {{0, -1}, {-1, 0}, {1, 0}, {0, 1}} | |
local done = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local major, minor, revision, codename = love.getVersion() | |
local color = love.graphics.setColor | |
love.graphics.setColor = function(r, g, b, a) | |
if type(r) == 'table' then r, g, b, a = unpack(r) end | |
a = a or 1 | |
if r <= 1 and g <= 1 and b <= 1 and a <= 1 then | |
if major >= 11 then | |
color(r, g, b, a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Action = (...args) => { | |
[name, effects = {}, conditions = {}, weight = 1] = args | |
return { name, effects, conditions, weight } | |
} | |
const Planner = (...args) => { | |
let actions = args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Node = function(...nodes) { | |
let children = nodes | |
let node = { | |
addChild: n => children.push(n), | |
register: (name, callback) => { | |
this[name] = callback | |
return node | |
}, | |
call: (name, ...args) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const World = function() { | |
let entities = [] | |
let systems = [] | |
return { | |
addEntity: function(e) { | |
entities.push(e) | |
systems.forEach(s => { | |
if (s.require.every(p => p in e)) s.entities.push(e) | |
}) | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- project directory in /storage/emulated/0/Download/projects/... | |
- sshd is running in termux and storage mounted | |
- files are edited with DroidEdit through ssh: ~/storage/downloads/projects/... | |
- external Löve command: | |
cd ${path} && zip -r test.love * -x test.love && am start -t org.love2d.android -a android.intent.action.VIEW -d "file://${path}/test.love" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tests = [] | |
running = false | |
done = function() { | |
test = tests.shift() | |
if (test) test(done) | |
} | |
const it = function(name, test) { | |
tests.push(test) |