jbr on v0.5.6
jbr on main
push v tag (compare)
jbr on main
prefix tag with v (compare)
delete-merged-branch[bot] on 0.5.6
jbr on main
bump version (compare)
jbr on 0.5.6
bump version (compare)
(var tasks (hash "task 1" "task dependent 1" "task2" "task dependant2"))
(get tasks “task 1”)
or similar
tasks[“task 1”]
. if the keys are like ”task1"
instead of ”task 1
”, you can access them with dot notation (tasks.task1
), just like in javascript
(def ordered-tasks (task-list current-task)
(var tasks-in-order [])
(while (> (length tasks-in-order) 3)
(var dependent-task (get task-list current-task))
(if
(= "" (get task-list dependent-task))
(append dependent-task tasks-in-order)
(append current-task tasks-in-order)
)
)
(console.log tasks-in-order)
)
(ordered-tasks(tasks "make a sandwich"))
TypeError: orderedTasks(...) is not a function
tasks
argument is a hash type object as pointed out above
(each item item-list (
(
set item "listed" false
)
(item)
)
)
works like a charm
(each item item-list (
(
set item "listed" false
set dict (get item "name") item
)
(item)
)
)
(and various variations) all seem to not work
SyntaxError: Unexpected token ;
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at runInSandbox$ (/home/felipe/.nvm/versions/node/v6.10.2/lib/node_modules/sibilant/maps/src/cli.sibilant:16:7)
at /home/felipe/.nvm/versions/node/v6.10.2/lib/node_modules/sibilant/maps/src/cli.sibilant:116:9
at /home/felipe/.nvm/versions/node/v6.10.2/lib/node_modules/sibilant/maps/src/cli.sibilant:105:7
at Array.forEach (native)
at Object.<anonymous> (/home/felipe/.nvm/versions/node/v6.10.2/lib/node_modules/sibilant/maps/src/macros/lists.sibilant:101:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
npm install -g sibilant
, then sibilant
) or locally from the project directory (npm install sibilant
, then npx sibilant
).npx sibilant
Setting up environment with C:\Users\jrickman\env.bat
Error: ENOENT: no such file or directory, open 'undefined/.sibilant.history'
at Object.openSync (fs.js:462:3)
at Object.<anonymous> (C:\Main\Tresor\Dev\stitch-sibilant-challenge\node_modules\sibilant\maps\src\repl.sibilant:26:12)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.cli$repl$ [as repl] (C:\Main\Tresor\Dev\stitch-sibilant-challenge\node_modules\sibilant\maps\src\cli.sibilant:37:7)
at Object.<anonymous> (C:\Main\Tresor\Dev\stitch-sibilant-challenge\node_modules\sibilant\maps\src\cli.sibilant:78:8)