Commit graph

162 commits

Author SHA1 Message Date
Gwenhael Le Moine
dc5159cf11
Merge branch 'trunk' of ssh://src.le-moine.org:38172/gwh/rpl.rb into trunk 2022-02-16 16:25:14 +01:00
Gwenhael Le Moine
603a1627df
RPL's lists are enclosed in {} 2022-02-16 16:21:37 +01:00
Gwenhael Le Moine
42244c7106
Merge branch 'trunk' of ssh://src.le-moine.org:38172/gwh/rpl.rb into trunk 2022-02-15 18:48:27 +01:00
Gwenhael Le Moine
df32808ae0
xpon 2022-02-15 18:48:19 +01:00
Gwenhael Le Moine
8b07724e50
make it a gem 2022-02-15 17:06:19 +01:00
Gwenhael Le Moine
fece818539
dangling lines 2022-02-15 11:15:10 +01:00
Gwenhael Le Moine
8f1f871904
continue to prepare implementation 2022-02-11 16:30:49 +01:00
Gwenhael Le Moine
a704d57a4f
prepare implementation 2022-02-11 16:15:38 +01:00
Gwenhael Le Moine
2eb8fa91ef
logs → logarithm 2022-02-11 16:15:01 +01:00
Gwenhael Le Moine
0f09f57f5d
change semantic of TIMES and LOOP 2022-02-11 16:06:57 +01:00
Gwenhael Le Moine
2d94127444
refactoring, make comment active documentation 2022-02-11 15:46:47 +01:00
Gwenhael Le Moine
80fbf082b2
fix stack_extract 2022-02-10 18:37:44 +01:00
Gwenhael Le Moine
e9e44f7d69
extracting from stack in 2 steps to leave stack intact in case of error 2022-02-10 14:57:14 +01:00
Gwenhael Le Moine
b8724a4a1c
refactoring: split interpreter 2022-02-10 14:50:59 +01:00
Gwenhael Le Moine
3ebec3e4b0
biggest refactoring, OOP 2022-02-10 14:33:09 +01:00
Gwenhael Le Moine
195ebb37b7
implement HELP 2022-02-09 16:38:09 +01:00
Gwenhael Le Moine
6e77c313b2
implement VERSION and UNAME 2022-02-09 16:35:54 +01:00
Gwenhael Le Moine
9ebdb707c5
parser a static method of Interpreter 2022-02-09 16:33:47 +01:00
Gwenhael Le Moine
b98a97b6b8
all :numerics need to be BigDecimal 2022-02-09 16:29:01 +01:00
Gwenhael Le Moine
922ecf1bb6
stringify infinites and NaN 2022-02-09 16:28:35 +01:00
Gwenhael Le Moine
4413146f52
version 0.1 2022-02-09 16:28:07 +01:00
Gwenhael Le Moine
6dae5e3eb0
refactoring: inline parser & runner into Interpreter 2022-02-09 13:38:32 +01:00
Gwenhael Le Moine
3158851685
finally pass d→r test 2022-02-09 10:58:13 +01:00
Gwenhael Le Moine
36283d6d4b
generalize use of BigDecimal in :numeric's 2022-02-09 10:53:00 +01:00
Gwenhael Le Moine
8c5657db42
big refactoring 2022-02-08 15:45:36 +01:00
Gwenhael Le Moine
217a4e98ee
todo 2022-02-02 16:54:25 +01:00
Gwenhael Le Moine
a512979e91
simplify D→R and R→D, fix R→D test 2022-02-02 16:29:23 +01:00
Gwenhael Le Moine
77946e56f7
fix ACOS and pass some tests (still fragile) 2022-02-02 16:15:44 +01:00
Gwenhael Le Moine
9619dba3cf
clean kludge from a merge 2022-02-02 15:48:21 +01:00
Gwenhael Le Moine
a8dec5f2a4
implement LSTO 2022-02-02 15:20:24 +01:00
Gwenhael Le Moine
6907e8b9dc
don't store surrounding '' "" «» in value, eliminate [1..-2] in value use 2022-01-26 18:30:51 +01:00
Gwenhael Le Moine
2cd462e2de
Merge branch 'trunk' of ssh://src.le-moine.org:38172/gwh/rpl.rb into trunk 2022-01-26 16:15:26 +01:00
Gwenhael Le Moine
212ef879f3
fix TODO 2022-01-26 16:15:12 +01:00
Gwenhael Le Moine
7a97361514
rpl code formatting 2022-01-20 11:56:38 +01:00
Gwenhael Le Moine
f8c36f9e41
pi → 𝛑 2022-01-20 10:55:13 +01:00
Gwenhael Le Moine
0e7fbcc341
source and string formatting 2022-01-18 22:30:34 +01:00
Gwenhael Le Moine
de89407e41
allow leading and closing empty lines and spaces before delimiters in
string and programs
2022-01-18 22:29:29 +01:00
Gwenhael Le Moine
3e53cb9715
Merge branch 'trunk' of ssh://src.le-moine.org:38172/gwh/rpl.rb into trunk 2022-01-18 17:11:38 +01:00
Gwenhael Le Moine
8bd4055f90
implement trig operations 2022-01-18 17:07:25 +01:00
Gwenhael Le Moine
442e1cc34e
infer numeric result's base from operand(s) 2022-01-18 17:06:43 +01:00
Gwenhael Le Moine
f1a2947e8e
review/rationalize ADD 2021-12-16 16:34:59 +01:00
Gwenhael Le Moine
02db2cc6bf
DUP by copy instead of reference 2021-12-16 15:22:33 +01:00
Gwenhael Le Moine
3a0d7217b3
add __ppstack for debugging 2021-12-16 15:22:14 +01:00
Gwenhael Le Moine
3401f98eb9
implement →LIST and LIST→; display lists, REV and + lists 2021-12-16 15:21:23 +01:00
Gwenhael Le Moine
f27f485c8c
implement FWRITE, test FEVAL too 2021-12-16 11:02:42 +01:00
Gwenhael Le Moine
2c9203f079
implement FEVAL & FWRITE (wip) 2021-12-15 16:36:11 +01:00
Gwenhael Le Moine
5dc798f830
remove \n before eval 2021-12-15 16:35:23 +01:00
Gwenhael Le Moine
90415fc07e
properly enclose strings in "" 2021-12-15 16:34:57 +01:00
Gwenhael Le Moine
f234dffa59
add FREAD 2021-12-15 13:33:52 +01:00
Gwenhael Le Moine
080bac161f
logic 2021-12-15 13:33:40 +01:00
Gwenhael Le Moine
59c40c5bf9
Rpl::Core ⇒ Rpl::Lang::Core 2021-12-15 13:33:06 +01:00
Gwenhael Le Moine
68c8a4e178
add string REV & SPLIT 2021-12-15 13:32:48 +01:00
Gwenhael Le Moine
a341cdf570
move loadgin core words in Language 2021-12-15 13:32:21 +01:00
Gwenhael Le Moine
9a08ce176f
useless code 2021-12-15 13:31:14 +01:00
Gwenhael Le Moine
5e0043879a
fix parsing " " word 2021-12-15 13:30:57 +01:00
Gwenhael Le Moine
96ffa142dc
moving comments 2021-12-09 17:03:33 +01:00
Gwenhael Le Moine
4f824fe900
new words ideas / todo 2021-12-09 16:32:33 +01:00
Gwenhael Le Moine
cbcaeea510
formatting 2021-12-09 16:32:19 +01:00
Gwenhael Le Moine
f3ca267a93
EVAL can eval anything 2021-12-09 16:32:03 +01:00
Gwenhael Le Moine
dca6825602
add and implement LOOP and TIMES loops 2021-12-09 16:31:29 +01:00
Gwenhael Le Moine
c49e79ae1c
s/_or_equal_than/_than_or_equal/g 2021-12-09 09:12:51 +01:00
Gwenhael Le Moine
464b1c511e
I prefer .lookup() rather than [] 2021-12-08 16:38:46 +01:00
Gwenhael Le Moine
50f36fa5c3
new alias 2021-12-08 16:38:31 +01:00
Gwenhael Le Moine
490dfa5583
INV result is a Float 2021-12-08 16:08:14 +01:00
Gwenhael Le Moine
e7532a3559
EVAL all the things!!! 2021-12-08 16:07:56 +01:00
Gwenhael Le Moine
dd8edd627d
better implementation leveraging CHS and INV 2021-12-08 16:07:16 +01:00
Gwenhael Le Moine
6b57d03627
trim "" from strings before use 2021-12-08 16:06:35 +01:00
Gwenhael Le Moine
5d4c978c76
parse 5.0 as a Float 2021-12-08 16:06:10 +01:00
Gwenhael Le Moine
63da2d408b
moer aliases 2021-12-08 16:05:30 +01:00
Gwenhael Le Moine
6cc8fb0cd6
implement more words in pure Rpl 2021-12-08 13:46:06 +01:00
Gwenhael Le Moine
d9a4a13eb9
repl handles exceptions nicelier 2021-12-08 13:45:29 +01:00
Gwenhael Le Moine
f50528223c
comment not-yet-implemented words 2021-12-08 13:16:27 +01:00
Gwenhael Le Moine
9aba355ee6
not even sure we're ever going to implement EDIT 2021-12-08 13:15:52 +01:00
Gwenhael Le Moine
21b090aa9f
implement in pure Rpl 2021-12-08 13:15:33 +01:00
Gwenhael Le Moine
8ac18e6517
convert to Integer before using .times 2021-12-08 13:14:42 +01:00
Gwenhael Le Moine
8816e6ce32
implement store.* (STO, RCL, PURGE, ...) 2021-12-08 12:46:57 +01:00
Gwenhael Le Moine
169e5249db
format type's string correctly 2021-12-08 12:35:19 +01:00
Gwenhael Le Moine
e318296e29
all words expect ( stack, dictionary ) 2021-12-08 12:34:12 +01:00
Gwenhael Le Moine
300e061beb
[WIP] store 2021-12-07 16:51:33 +01:00
Gwenhael Le Moine
67a4213eb4
all words take and return stack & dictionary 2021-12-07 16:46:33 +01:00
Gwenhael Le Moine
c13692c030
fix merge 2021-12-07 16:19:23 +01:00
Gwenhael Le Moine
d537087088
merge
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2021-12-07 16:17:28 +01:00
Gwenhael Le Moine
c6fc0b3bc8
Rpl::Repl → RplRepl 2021-12-07 16:09:17 +01:00
Gwenhael Le Moine
ff48cef22a
split language and REPL; lib/language → lib/core 2021-12-07 16:03:03 +01:00
Gwenhael Le Moine
cfcbcc7ce5
Rpl:: → Rpl::Lang:: 2021-12-07 15:50:58 +01:00
Gwenhael Le Moine
ca6b79a8ad
implement pi, e and some operations 2021-12-02 15:33:22 +01:00
Gwenhael Le Moine
803036b89e
note alias for STO 2021-11-24 16:48:51 +01:00
Gwenhael Le Moine
b7d748ac5d
implement IFTE and IFT 2021-11-24 16:34:13 +01:00
Gwenhael Le Moine
a26c059394
implement test words (untested) 2021-11-24 16:09:57 +01:00
Gwenhael Le Moine
09c44b684d
implement string words 2021-11-24 15:04:56 +01:00
Gwenhael Le Moine
ac7cab6490
fix parsing error on program-closer » 2021-11-24 15:04:27 +01:00
Gwenhael Le Moine
3809c4b58b
reverse extracted stack order to match needs, +String 2021-11-24 13:33:44 +01:00
Gwenhael Le Moine
706f767aaa
parse 0xyz000 numbers 2021-11-23 16:54:23 +01:00
Gwenhael Le Moine
e2abe0899c
implement BASE&co, store numeric's base and adapt display 2021-11-23 16:16:21 +01:00
Gwenhael Le Moine
66f622ac68
[refactoring] rename to Rpl; unsplit core 2021-11-23 13:10:03 +01:00
Gwenhael Le Moine
fe799845aa
remove Core.init, default precision is actually a default 2021-11-23 12:59:45 +01:00
Gwenhael Le Moine
655a14e36e
implement SIGN 2021-11-18 15:58:59 +01:00
Gwenhael Le Moine
1e4dafb1d4
implements SQRT PREC DEFAULT TYPE TIME DATE TICKS 2021-11-18 15:44:09 +01:00
Gwenhael Le Moine
db02abb114
also EVAL names and words 2021-11-18 14:23:56 +01:00
Gwenhael Le Moine
cc99b517a7
fix EVAL test 2021-11-18 12:11:19 +01:00