removequotes
junk throughout utils.js and AST.jsidentifier identifier
should be identifier(identifier)
; and identifier(identifier identifier)
should be identifier(identifier(identifier))
bin
functionIn[0,Counter()-1]
. Perhaps re-write?TEST <- lookup [choose["foo","bizz"], ["bizz","bazz"] => 0, ["foo", "bar"] => 1]
but p(TEST)
doesn't, likely owing to to quotes around strings.lookup
MagicItem ← [object Object]
instead of MagicItem ← {"magic":"debug"}
[X] Get rid of quotes around values in r_str in utils.js, e.g.,
In[24] := 'TreasureTypeA1
Out[24] := {"cp":"d6 ≥ 5 ? A1CP : 0","sp":"d6 ≥ 5 ? A1SP : 0","gp":"d6 ≥ 5 ? A1GP : 0","gems":"d6 ≥ 4 ? A1Gems : 0","jewels":"d6 ≥ 4 ? A1Jewelry : 0"}
Maybe convert leading and trailing quotes and medial quotes without a backslash prefix to nothing first, then convert \\" to quotes
[X] Implement lookup
function, distinct from if
:
<s>lookup [z100, [1--9] => Invisibility, [10--15] => Mammal_Control, ...99 => Spell_Storing, 00 => Many_Wishes]</s>
lookup [z100, 01--09 => Invisibility, 10--15 => Mammal_Control, ..., 99 => Spell_Storing, 00 => Many_Wishes]
[X] Make !>
and <!
operators synonyms for :>
and <:
_
. Example: map({_^2}, [1..10])
map {_^2}, [1..10]
???{_^2}
or a function like square
_
becomes a synonym for id
so that {_^2}
is just {id^2}
. That way myfunc <- 2*(id^2 + 1)
can be written more simply as myfunc <- 2*(_^2 + 1)
||>
and backwards version <||
- `[1..10] | > map {_^2}` |
---|
/@
shortcut for map/infix so we can write the above more simply as{_^2} /@ [1..10]
_^2 /@ [1..10]
???square /@ [1..10]
take(5, [1..10])
[1..10] ||> take 5
take 5 <|| [1..10]
take 5, [1..10]
???Help()
function. Internally, there will be a help key in each function's JSON. It can be a string or a function.Help
Help Help
Help function_name
License()
: Add new object/function for license, not (just) external license file[X] Time()
function to time how long it takes to run a function
For some reason, jison now produces a function called dice rather than parser. This must be changed to parser in dice_min.js or the web interface won't load the javascript correctly. This didn't happen a year ago with the last release, a57. But I have updated all my nodejs packages, including jison, so something changed. In the build.sh, I use a short sed script to change this:
var dice=function(){function
to this:
var parser=function(){function
Fix solve
function. NB. solve(ξ^2 + 2 ξ - 1, ξ, 0) |> exact
produces -1+√2
ok, but won't find positive root √2 - 1
solve(ξ^2 + 2 ξ - 1, ξ, [-5:5:0.5]) |> uniq |> exact
should produce -1±√2
set base=2
and use juxtaposition.//
from |>
//
bind tightly|>
bind looselyLots to do here! These TODOs may be broken up into several builds.
These TODOs will turn Palamedes into a full-fledged programming language and finally bring the alpha-stage to an end.
After these TODOs, features will be frozen, and the next build will be beta 1.
Last update: Fri Sep 23 2016