changeset 1147db49b48f in joypy/Joypy details: http://hg.osdn.jp/view/joypy/Joypy?cmd=changeset;node=1147db49b48f user: Simon Forman <sform****@hushm*****> date: Fri May 15 07:34:47 2020 -0700 description: Trying out a different dsiplay format. changeset 8524240a65b7 in joypy/Joypy details: http://hg.osdn.jp/view/joypy/Joypy?cmd=changeset;node=8524240a65b7 user: Simon Forman <sform****@hushm*****> date: Fri May 15 07:35:16 2020 -0700 description: It must be a BytesIO. changeset 0e6ed4693bcd in joypy/Joypy details: http://hg.osdn.jp/view/joypy/Joypy?cmd=changeset;node=0e6ed4693bcd user: Simon Forman <sform****@hushm*****> date: Fri May 15 07:36:25 2020 -0700 description: How to start Thun under i3. Needs the filename corrected. changeset ca0096e2bf94 in joypy/Joypy details: http://hg.osdn.jp/view/joypy/Joypy?cmd=changeset;node=ca0096e2bf94 user: Simon Forman <sform****@hushm*****> date: Sat May 16 09:52:56 2020 -0700 description: Python 3. diffstat: joy/gui/init_joy_home.py | 2 +- joy/gui/utils.py | 4 ++-- joy/gui/world.py | 7 +++++-- joy/library.py | 2 ++ start-with-i3.sh | 1 + 5 files changed, 11 insertions(+), 5 deletions(-) diffs (82 lines): diff -r 13e8a9645d55 -r ca0096e2bf94 joy/gui/init_joy_home.py --- a/joy/gui/init_joy_home.py Sun May 10 12:46:33 2020 -0700 +++ b/joy/gui/init_joy_home.py Sat May 16 09:52:56 2020 -0700 @@ -29,7 +29,7 @@ return base64.encodestring(f.getvalue()) -Z = zipfile.ZipFile(io.StringIO(base64.decodestring('''\ +Z = zipfile.ZipFile(io.BytesIO(base64.decodestring(b'''\ UEsDBBQAAAAAAJKh9Uw/yHAgFQQAABUEAAALAAAAc2NyYXRjaC50eHRyZXNldF9sb2cgd29yZHMg bW91c2VfYmluZGluZ3Mga2V5X2JpbmRpbmdzCgpTdGFjayBDaGF0dGVyCgogZHVwIGR1cGQgZHVw ZGQgb3ZlciB0dWNrCiBwb3AgcG9wZCBwb3BkZCBwb3BvcCBwb3BvcGQgcG9wb3BkZAogc3dhcCBy diff -r 13e8a9645d55 -r ca0096e2bf94 joy/gui/utils.py --- a/joy/gui/utils.py Sun May 10 12:46:33 2020 -0700 +++ b/joy/gui/utils.py Sat May 16 09:52:56 2020 -0700 @@ -8,7 +8,7 @@ from dulwich.repo import Repo -COMMITTER = 'Joy <auto-****@examp*****>' +COMMITTER = b'Joy <auto-****@examp*****>' DEFAULT_JOY_HOME = expanduser(join('~', '.joypy')) @@ -66,7 +66,7 @@ import joy.gui.init_joy_home joy.gui.init_joy_home.initialize(repo_dir) repo.stage([fn for fn in listdir(repo_dir) if isfile(join(repo_dir, fn))]) - repo.do_commit('Initial commit.', committer=COMMITTER) + repo.do_commit(b'Initial commit.', committer=COMMITTER) return repo diff -r 13e8a9645d55 -r ca0096e2bf94 joy/gui/world.py --- a/joy/gui/world.py Sun May 10 12:46:33 2020 -0700 +++ b/joy/gui/world.py Sat May 16 09:52:56 2020 -0700 @@ -130,8 +130,11 @@ if self.has(command) and self.check(command) == False: # not in {True, None}: return # print('\njoy?', command) + self.print_command(command) + super(StackDisplayWorld, self).interpret(command) + + def print_command(self, command): print(command) - super(StackDisplayWorld, self).interpret(command) def print_stack(self): print('\n%s <-' % stack_to_string(self.stack)) @@ -164,7 +167,7 @@ self.viewer.update_stack(self.stack) def print_stack(self): - # StackDisplayWorld.print_stack(self) + print('%s . ' % stack_to_string(self.stack), end='') if self.viewer: self.viewer.update_stack(self.stack) diff -r 13e8a9645d55 -r ca0096e2bf94 joy/library.py --- a/joy/library.py Sun May 10 12:46:33 2020 -0700 +++ b/joy/library.py Sat May 16 09:52:56 2020 -0700 @@ -102,6 +102,7 @@ Ss = list(map(StackStarJoyType, _R)) +# "sec": stack effect comment, like in Forth. sec0 = stack_effect(t1)() sec1 = stack_effect(s0, i1)(s1) sec2 = stack_effect(s0, i1)(a1) @@ -113,6 +114,7 @@ sec_unary_math = stack_effect(n1)(n2) sec_Ns_math = stack_effect((Ns[1], s1),)(n0) +# This is the main dict we're building. _dictionary = {} diff -r 13e8a9645d55 -r ca0096e2bf94 start-with-i3.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/start-with-i3.sh Sat May 16 09:52:56 2020 -0700 @@ -0,0 +1,1 @@ +i3-msg "workspace 1; append_layout /home/sforman/Desktop/ArchLayer/System/source/Thun/i3.json" && python -m joy.gui &