Commit Graph

141 Commits

Author SHA1 Message Date
Pekka Laiho
894bd96e06 fix bug from optimization 2020-12-05 09:48:17 +07:00
Pekka Laiho
ff1ae7b2d4 move core functions to separate file 2020-12-05 09:41:27 +07:00
Pekka Laiho
90f4d7860d add toggle for debug output 2020-12-05 08:42:56 +07:00
Pekka Laiho
1ece3649bc add support for userfuncs to meta 2020-12-05 08:13:17 +07:00
Pekka Laiho
5bb2b458b3 Optimization: skip one function call in CoreFunc::call 2020-12-03 20:23:26 +07:00
Pekka Laiho
b360e213bf Optimization: use normal for-loops in basic math functions 2020-12-03 20:09:23 +07:00
Pekka Laiho
60726f0923 Optimization: read astData to memory instead of calling get() many times in eval 2020-12-03 17:27:26 +07:00
Pekka Laiho
3c9885c7f9 Optimization: read ast length to variable in eval 2020-12-03 10:18:22 +07:00
Pekka Laiho
a86fd77b45 Optimization: read symbol name to variable in eval 2020-12-03 10:08:11 +07:00
Pekka Laiho
d6127e6821 Optimization: skip call to 'has' method when possible 2020-12-03 09:58:58 +07:00
Pekka Laiho
330fda6715 support for init file 2020-10-24 14:27:02 +07:00
Pekka Laiho
2f48754902 add special constants __FILE__ and __DIR__ 2020-10-24 12:27:28 +07:00
Pekka Laiho
c110522f3b add meta function 2020-10-24 10:02:50 +07:00
Pekka Laiho
1e33e4d146 change syntax of readline functions 2020-10-18 14:45:49 +07:00
Pekka Laiho
06acb47c72 add Regex lib 2020-10-18 14:33:27 +07:00
Pekka Laiho
c0fb53742a capitalize constants 2020-10-18 13:32:20 +07:00
Pekka Laiho
a38ef23e17 add functions: loop, coinflip, rand 2020-10-18 10:24:18 +07:00
Pekka Laiho
80a72b616b support strings for empty? 2020-10-18 09:30:21 +07:00
Pekka Laiho
d65fb5a58a add readline functions 2020-10-18 09:18:07 +07:00
Pekka Laiho
656f805a5c split function now returns a Vector instead of a List 2020-10-17 17:44:47 +07:00
Pekka Laiho
c3d99d60ef add function: filterh 2020-10-17 17:08:53 +07:00
Pekka Laiho
6475c5a253 add functions: prefix? suffix? 2020-10-17 16:11:33 +07:00
Pekka Laiho
72dc10f369 add function: exit 2020-10-17 14:47:30 +07:00
Pekka Laiho
5b2691d475 add function: timer 2020-10-17 14:36:02 +07:00
Pekka Laiho
9209b8dd92 add function: slice 2020-10-17 13:53:09 +07:00
Pekka Laiho
a7e4524470 add usort 2020-10-17 13:32:57 +07:00
Pekka Laiho
0937042e07 added function for http requests 2020-06-20 10:33:15 +07:00
Pekka Laiho
ad2aea9c70 add database functions 2020-06-19 19:09:07 +07:00
Pekka Laiho
51bc382413 add more IO functions 2020-06-19 14:13:21 +07:00
Pekka Laiho
3b58f280f7 handle invalid types in json 2020-06-19 13:50:22 +07:00
Pekka Laiho
838313fa9c support for object and resource types 2020-06-19 13:46:52 +07:00
Pekka Laiho
599ebd303f added Json serialization 2020-06-19 10:50:44 +07:00
Pekka Laiho
871df1f691 separate coreLibs and userLibs for LispFactory 2020-06-17 18:31:13 +07:00
Pekka Laiho
90a9b3aa53 add some directory functions and constants 2020-06-17 18:28:25 +07:00
Pekka Laiho
d32ca9a4b6 remove bootstrap, add LispFactory 2020-06-17 17:24:15 +07:00
Pekka Laiho
0ecc4a7b73 add values for PI and newline to library 2020-06-16 20:43:47 +07:00
Pekka Laiho
427327003d handle special characters correctly in printing 2020-06-16 20:38:46 +07:00
Pekka Laiho
ad70c6dbd0 handle special characters in strings 2020-06-16 20:15:57 +07:00
Pekka Laiho
37ad2ec0bf support for command line arguments 2020-06-10 20:40:15 +07:00
Pekka Laiho
0a21f890ae add more math functions 2020-06-08 10:14:32 +07:00
Pekka Laiho
ddac856ed4 add functions second, penult 2020-06-08 10:02:59 +07:00
Pekka Laiho
aa71b4da36 debugging support for eval 2020-06-06 21:02:02 +07:00
Pekka Laiho
7348ec3229 load and eval in correct env 2020-06-06 15:31:09 +07:00
Pekka Laiho
fae099d659 error function, loadf function 2020-06-06 09:39:12 +07:00
Pekka Laiho
24ba1caf02 add apply function 2020-06-06 08:42:38 +07:00
Pekka Laiho
18277d9566 optimize: remove array_map 2020-06-05 15:55:38 +07:00
Pekka Laiho
7331cbe874 tail call optimization for function calls 2020-06-05 15:33:52 +07:00
Pekka Laiho
8cf2dbeeec tco for case 2020-06-04 21:39:26 +07:00
Pekka Laiho
cb1a03e9bd start tail call optimization 2020-06-04 21:26:00 +07:00
Pekka Laiho
291a7d6521 handle no input 2020-06-04 18:27:47 +07:00
Pekka Laiho
91eba046bc add special form: case 2020-06-04 18:26:26 +07:00
Pekka Laiho
2f6409ce72 special forms and, or 2020-06-04 18:00:30 +07:00
Pekka Laiho
463025d43d add not function 2020-06-04 17:51:01 +07:00
Pekka Laiho
8ec2ad4596 support argument for env 2020-06-04 17:36:01 +07:00
Pekka Laiho
cf9af2b5fe chunk function 2020-06-04 16:22:13 +07:00
Pekka Laiho
6146f3b475 rename type? to type 2020-06-04 16:10:15 +07:00
Pekka Laiho
7c9ed7ca27 overwrite protection for root env 2020-06-04 16:06:56 +07:00
Pekka Laiho
42441e78c2 add string replace 2020-06-04 09:27:09 +07:00
Pekka Laiho
b568ece8f0 convert symbol to string 2020-06-04 09:15:40 +07:00
Pekka Laiho
437bf252c5 simplify code 2020-06-04 09:10:48 +07:00
Pekka Laiho
3463024a07 ignore colon in tokenizer 2020-06-04 08:28:54 +07:00
Pekka Laiho
c633d39b07 add IO functions 2020-06-03 19:57:58 +07:00
Pekka Laiho
e1298ba5ec fix argument validation messages 2020-06-03 19:39:11 +07:00
Pekka Laiho
0f64d24074 add func for convert to symbol 2020-06-03 18:25:16 +07:00
Pekka Laiho
53730d16ef add some time functions 2020-06-03 18:15:36 +07:00
Pekka Laiho
a0a049fe91 even more funcs for collections 2020-06-03 17:55:59 +07:00
Pekka Laiho
adc9664c69 add 3 new functions for collections 2020-06-03 14:37:04 +07:00
Pekka Laiho
5e49f724fa added more functions for collections 2020-06-02 19:17:18 +07:00
Pekka Laiho
190696db9b add string functions 2020-06-02 18:03:05 +07:00
Pekka Laiho
64a7f19b8b functions for collections 2020-06-02 09:51:21 +07:00
Pekka Laiho
9e4dffef2b support for (doc) 2020-06-01 20:19:26 +07:00
Pekka Laiho
9e113faf78 compare equality for collections, concat strings with str 2020-06-01 20:12:26 +07:00
Pekka Laiho
69918f3300 print null as empty string, enable functions eval and print 2020-05-31 21:16:20 +07:00
Pekka Laiho
b0f22a19fe conversion functions 2020-05-31 20:55:22 +07:00
Pekka Laiho
bde31f9eb3 add Types library, delete Core 2020-05-31 19:16:40 +07:00
Pekka Laiho
4aa2a79a7b add Compare functions 2020-05-31 19:02:21 +07:00
Pekka Laiho
cc9fa06117 new classes for functions, not finished 2020-05-31 17:50:29 +07:00
Pekka Laiho
c3c5934c57 fn keyword 2020-05-31 16:35:03 +07:00
Pekka Laiho
51058b18d3 shortcut for quote 2020-05-31 11:50:53 +07:00
Pekka Laiho
9e03179650 add Vector, other improvements 2020-05-31 11:34:24 +07:00
Pekka Laiho
5869b2f483 improve tokenizer 2020-05-31 09:56:23 +07:00
Pekka Laiho
debda2e602 add do 2020-05-30 19:19:37 +07:00
Pekka Laiho
a4182f7d8e add if 2020-05-30 19:02:41 +07:00
Pekka Laiho
01e5c4b198 let and eval 2020-05-30 18:47:54 +07:00
Pekka Laiho
c1224fb66f quote and eval hash 2020-05-28 20:30:37 +07:00
Pekka Laiho
773f195f37 eval according to example 2020-05-28 19:41:41 +07:00
Pekka Laiho
80faff86f5 split code to multiple classes 2020-05-28 17:10:00 +07:00
Pekka Laiho
311d074546 add if 2020-05-28 16:49:32 +07:00
Pekka Laiho
26b3456595 update print 2020-05-28 14:40:54 +07:00
Pekka Laiho
2acdde303a improve eval, add env/quote 2020-05-28 13:59:36 +07:00
Pekka Laiho
adc6ab99c3 classes 2020-05-28 11:55:58 +07:00