Hello,
I found some time to write an interactive test environment for crystal functions.
It has a CLI which can be used to manage vars and start functions and procs stored in a hash table.
>ls functions
procs: typeof,print,puts,p,eval,ceval,after,def,return,+,-,*,/,inc,dec,<,>,if,eq,while,end,every,ls,vars,let,=,delete,clear,!,now,date,test,sleep,pass,cls,load,run,split_run,help,debug,singlestep,breakpoint,inject,system,exit,Array,append,size,list,log,clear_log,insert_line,write_line,delete_line,open_ipc,send_ipc,receive_ipc,send_receive_ipc,show_ipc_results,read_int_var
https://crystalshards.xyz/?filter=tree
While it is a sort of text interpreter its not that slow:
Example test script:
Welcome to tree
load counter2.txt
Loaded: counter2.txt Number of lines: 11
run
23:43:57.337687
0
1000000
23:44:00.273736
reached end of file
# ~ 5 sec with scripter
now
counter = 0
p counter
while counter < 1000000
counter+= 1
#p counter
end
p counter
now
Best Regards,
Peter