• R/O
  • SSH

Joypy: Commit

Main interpreter and library.


Commit MetaInfo

Revision1b71bc8986c40106583299d8b73a53e2481bee7f (tree)
Time2018-07-22 12:19:38
AuthorSimon Forman <sforman@hush...>
CommiterSimon Forman

Log Message

Rework the default JOY_HOME contents.

Change Summary

Incremental Difference

diff -r 1f58e8050272 -r 1b71bc8986c4 joy/gui/default_joy_home/definitions.txt
--- a/joy/gui/default_joy_home/definitions.txt Sat Jul 21 17:56:53 2018 -0700
+++ b/joy/gui/default_joy_home/definitions.txt Sat Jul 21 20:19:38 2018 -0700
@@ -1,17 +1,49 @@
1-see_stack == good_viewer_location open_stack
2-see_resources == list_resources good_viewer_location open_viewer
3-open_resource_at_good_location == good_viewer_location open_resource
4-see_log == "log.txt" open_resource_at_good_location
5-see_definitions == "definitions.txt" open_resource_at_good_location
1+
62 round_to_cents == 100 * ++ floor 100 /
7-reset_log == "del log.lines[1:] ; log.at_line = 0" evaluate
8-see_menu == "menu.txt" good_viewer_location open_resource
93
10-# Ordered Binary Tree datastructure functions.
11-BTree-new == swap [[] []] cons cons
12- _BTree-P == over [popop popop first] nullary
13- _BTree-T> == [cons cons dipdd] cons cons cons infra
14- _BTree-T< == [cons cons dipd] cons cons cons infra
15- _BTree-E == pop swap roll< rest rest cons cons
16- _BTree-recur == _BTree-P [_BTree-T>] [_BTree-E] [_BTree-T<] cmp
17-BTree-add == [popop not] [[pop] dipd BTree-new] [] [_BTree-recur] genrec
4+
5+Ordered Binary Tree datastructure functions.
6+
7+fourth == rest_two rest first
8+?fourth == [] [fourth] [] ifte
9+first_two == uncons uncons pop
10+ccons == cons cons
11+cinf == cons infra
12+rest_two == rest rest
13+
14+_Tree_T> == [dipd] cinf
15+_Tree_T< == [dipdd] cinf
16+
17+_Tree_add_P == over [popop popop first] nullary
18+_Tree_add_T> == ccons _Tree_T<
19+_Tree_add_T< == ccons _Tree_T>
20+_Tree_add_Ee = = pop swap roll< rest_two ccons
21+_Tree_add_R == _Tree_add_P [_Tree_add_T>] [_Tree_add_Ee] [_Tree_add_T<] cmp
22+_Tree_add_E == [pop] dipd Tree-new
23+
24+_Tree_iter_order_left == [cons dip] dupdip
25+_Tree_iter_order_current == [[F] dupdip] dip
26+_Tree_iter_order_right == [fourth] dip i
27+_Tree_iter_order_R == _Tree_iter_order_left _Tree_iter_order_current _Tree_iter_order_right
28+
29+_Tree_get_P == over [pop popop first] nullary
30+_Tree_get_T> == [fourth] dipd i
31+_Tree_get_T< == [third] dipd i
32+_Tree_get_E = = popop second
33+_Tree_get_R == _Tree_get_P [_Tree_get_T>] [_Tree_get_E] [_Tree_get_T<] cmp
34+
35+_Tree_delete_rightmost == [?fourth] [fourth] while
36+_Tree_delete_clear_stuff = = roll> popop rest
37+_Tree_delete_del == dip cons dipd swap
38+_Tree_delete_W == dup _Tree_delete_rightmost first_two over
39+_Tree_delete_E.0 == _Tree_delete_clear_stuff [_Tree_delete_W] _Tree_delete_del
40+_Tree_delete_E == [[[pop third not] pop fourth] [[pop fourth not] pop third] [[_Tree_delete_E.0] cinf]] cond
41+_Tree_delete_R0 = = over first swap dup
42+_Tree_delete_R1 == cons roll> [_Tree_T>] [_Tree_delete_E] [_Tree_T<] cmp
43+
44+Tree-new == swap [[] []] ccons
45+Tree-add == [popop not] [_Tree_add_E] [] [_Tree_add_R] genrec
46+Tree-iter == [not] [pop] roll< [dupdip rest_two] cons [step] genrec
47+Tree-iter-order == [not] [pop] [dup third] [_Tree_iter_order_R] genrec
48+Tree-get == [pop not] swap [] [_Tree_get_R] genrec
49+Tree-delete == [pop not] [pop] [_Tree_delete_R0] [_Tree_delete_R1] genrec
\ No newline at end of file
diff -r 1f58e8050272 -r 1b71bc8986c4 joy/gui/default_joy_home/scratch.txt
--- a/joy/gui/default_joy_home/scratch.txt Sat Jul 21 17:56:53 2018 -0700
+++ b/joy/gui/default_joy_home/scratch.txt Sat Jul 21 20:19:38 2018 -0700
@@ -57,64 +57,3 @@
5757 stuncons stununcons
5858 swaack
5959 void
60-
61-
62-[ ] Add logging?
63-[ ] INI file?
64-[ ] definitions.txt
65-[ ] Integrate inference
66-[ ] command to (re-)run with trace
67-[ ] Backtime button?
68-
69-
70-------------------------------------------
71-[23 18] [unit i]
72-
73-sqr foo == uncons mul
74-
75- swaack
76-
77- over [[[neg] dupdip sqr 4] dipd * * - sqrt pm] dip 2 * [/] cons app2
78-
79-5 sqrt 2 / 0.5 +
80-5 sqrt 1 + 2 /
81-phi == 5 sqrt ++ 2 /
82-phi == 1.618033988749895
83-(But this is Lambda Abstaction sneaking in the back door.)
84-=
85-clear
86-
87-(n1 n2 -- ☯)
88-
89-2018 20 18 20 23 0.5
90-472 83 / -7
91-100
92-
93-100 * floor 100 / show_log
94-
95-[2 3] [swap truediv] infra
96-
97-dup infra key_bindings divmod
98-
99- 1 [dup 1 <<] make_generator 23 [x popd] times first
100-
101-mcc91 == [100 >] [10 -] [11 + mcc91 mcc91] ifte
102- == [100 >] [10 -] [11 + [mcc91] [mcc91] b] ifte
103- == [100 >] [10 -] [11 + [mcc91] dup b] ifte
104-mcc91 == [100 >] [10 -] [11 +] [dup b] genrec
105-
106-279841 20 20 20 202318 279841 279841 27984127984120202318
107-
108-inscribe
109-
110-round_to_cents == 100 * ++ floor 100 /
111-
112-
113- [12 18] [[pm] infra] make_generator
114-
115- [12 18] [[[+] [3 /] fork popopdd] infra] make_generator
116-
117- [stack] [pop] while
118-
119-
120-
diff -r 1f58e8050272 -r 1b71bc8986c4 joy/gui/default_joy_home/thun.config
--- a/joy/gui/default_joy_home/thun.config Sat Jul 21 17:56:53 2018 -0700
+++ b/joy/gui/default_joy_home/thun.config Sat Jul 21 20:19:38 2018 -0700
@@ -13,41 +13,3 @@
1313 <Control-Delete> = pop
1414 <Control-i> = i
1515
16-
17-[Definitions]
18-of = swap at
19-product = 1 swap [*] step
20-flatten = [] swap [concat] step
21-quoted = [unit] dip
22-unquoted = [i] dip
23-enstacken = stack [clear] dip
24-? = dup truthy
25-disenstacken = ? [uncons ?] loop pop
26-dinfrirst = dip infra first
27-nullary = [stack] dinfrirst
28-unary = nullary popd
29-binary = nullary [popop] dip
30-ternary = unary [popop] dip
31-pam = [i] map
32-run = [] swap infra
33-sqr = dup mul
34-size = 0 swap [pop ++] step
35-fork = [i] app2
36-cleave = fork [popd] dip
37-average = [sum 1.0 *] [size] cleave /
38-gcd = 1 [tuck modulus dup 0 >] loop pop
39-least_fraction = dup [gcd] infra [div] concat map
40-*fraction = [uncons] dip uncons [swap] dip concat [*] infra [*] dip cons
41-*fraction0 = concat [[swap] dip * [*] dip] infra
42-down_to_zero = [0 >] [dup --] while
43-range_to_zero = unit [down_to_zero] infra
44-anamorphism = [pop []] swap [dip swons] genrec
45-range = [0 <=] [1 - dup] anamorphism
46-while = swap [nullary] cons dup dipd concat loop
47-dupdipd = dup dipd
48-primrec = [i] genrec
49-step_zero = 0 roll> step
50-codireco = cons dip rest cons
51-make_generator = [codireco] ccons
52-ifte = [nullary not] dipd branch
53-
diff -r 1f58e8050272 -r 1b71bc8986c4 joy/gui/init_joy_home.py
--- a/joy/gui/init_joy_home.py Sat Jul 21 17:56:53 2018 -0700
+++ b/joy/gui/init_joy_home.py Sat Jul 21 20:19:38 2018 -0700
@@ -27,7 +27,7 @@
2727
2828
2929 Z = zipfile.ZipFile(StringIO.StringIO(base64.decodestring('''\
30-UEsDBBQAAAAAAKW29EyLEfLTUQgAAFEIAAALAAAAc2NyYXRjaC50eHRyZXNldF9sb2cgd29yZHMg
30+UEsDBBQAAAAAAJKh9Uw/yHAgFQQAABUEAAALAAAAc2NyYXRjaC50eHRyZXNldF9sb2cgd29yZHMg
3131 bW91c2VfYmluZGluZ3Mga2V5X2JpbmRpbmdzCgpTdGFjayBDaGF0dGVyCgogZHVwIGR1cGQgZHVw
3232 ZGQgb3ZlciB0dWNrCiBwb3AgcG9wZCBwb3BkZCBwb3BvcCBwb3BvcGQgcG9wb3BkZAogc3dhcCBy
3333 b2xsPCByb2xsPiByb2xsZG93biByb2xsdXAgCiB1bml0IGNsZ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94+X1IwXSBbX1RyZWVfZGVsZXRlX1IxXSBnZW5yZWNQSwECFAMUAAAAAACSofVMP8hwIBUEAAAVBAAA
95+CwAAAAAAAAAAAAAAgIEAAAAAc2NyYXRjaC50eHRQSwECFAMUAAAAAABAQfVM5+RkR1EBAABRAQAA
96+BwAAAAAAAAAAAAAAgIE+BAAAbG9nLnR4dFBLAQIUAxQAAAAAAEFB9Ux3f5peAwAAAAMAAAAMAAAA
97+AAAAAAAAAACAgbQFAABzdGFjay5waWNrbGVQSwECFAMUAAAAAACmofVM0vhrz+wAAADsAAAACwAA
98+AAAAAAAAAAAAtIHhBQAAdGh1bi5jb25maWdQSwECFAMUAAAAAABzofVMkFCeCjoHAAA6BwAADwAA
99+AAAAAAAAAAAAtIH2BgAAZGVmaW5pdGlvbnMudHh0UEsFBgAAAAAFAAUAHgEAAF0OAAAAAA==''')))
121100
122101
123102 if __name__ == '__main__':
diff -r 1f58e8050272 -r 1b71bc8986c4 joy/gui/main.py
--- a/joy/gui/main.py Sat Jul 21 17:56:53 2018 -0700
+++ b/joy/gui/main.py Sat Jul 21 20:19:38 2018 -0700
@@ -15,6 +15,7 @@
1515
1616 args = argparser.parse_args()
1717 JOY_HOME = args.joy_home
18+repo = init_home(JOY_HOME)
1819
1920
2021 _log = logging.getLogger(__name__)
@@ -25,9 +26,6 @@
2526 )
2627
2728
28-repo = init_home(JOY_HOME)
29-
30-
3129 from joy.gui.textwidget import TextViewerWidget, tk, get_font, TEXT_BINDINGS
3230 from joy.gui.world import StackDisplayWorld
3331 from joy.library import initialize
diff -r 1f58e8050272 -r 1b71bc8986c4 joy/gui/utils.py
--- a/joy/gui/utils.py Sat Jul 21 17:56:53 2018 -0700
+++ b/joy/gui/utils.py Sat Jul 21 20:19:38 2018 -0700
@@ -55,11 +55,7 @@
5555 repo = Repo.init(repo_dir)
5656 import joy.gui.init_joy_home
5757 joy.gui.init_joy_home.initialize(repo_dir)
58- repo.stage([
59- fn
60- for fn in listdir(repo_dir)
61- if isfile(join(repo_dir, fn))
62- ])
58+ repo.stage([fn for fn in listdir(repo_dir) if isfile(join(repo_dir, fn))])
6359 repo.do_commit('Initial commit.', committer=COMMITTER)
6460 return repo
6561
Show on old repository browser