From 147089dc23963620087c164ecd7af7d2a8ba01c4 Mon Sep 17 00:00:00 2001 From: Luxferre Date: Tue, 7 Jul 2026 08:19:13 +0300 Subject: [PATCH] =?UTF-8?q?v0.3.3:=20is=20lib=20word,=20UTF=E2=80=938=20st?= =?UTF-8?q?ring=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clyx-go/clyx.go | 2 +- clyx-python/clyx/clyx.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clyx-go/clyx.go b/clyx-go/clyx.go index 778ee22..3a11fc5 100644 --- a/clyx-go/clyx.go +++ b/clyx-go/clyx.go @@ -396,7 +396,7 @@ func NewClyx(libfname string, libCode string) *Clyx { c.words["type"] = func() { c.cmdType() } c.words["next"] = func() { c.stack = append(c.stack, c.popCallerToken()) } c.words["."] = func() { printVal(c.pop()) } - c.words["emit"] = func() { fmt.Printf("%c", rune(toInt(c.pop()))) } + c.words["emit"] = func() { os.Stdout.Write([]byte{byte(toInt(c.pop()))}) } c.words["fopen"] = func() { mode, fileVal := c.pop().(string), c.pop() isStdin := false diff --git a/clyx-python/clyx/clyx.py b/clyx-python/clyx/clyx.py index 5a02e08..59c7f91 100755 --- a/clyx-python/clyx/clyx.py +++ b/clyx-python/clyx/clyx.py @@ -47,7 +47,7 @@ class Clyx: def default_in(): try: return input() except: return 'exit' - self._in_str, self._out_num, self._out_char = in_str or default_in, out_num or (lambda v: (sys.stdout.write(str(v)+'\n'), getattr(sys.stdout, 'flush', lambda: None)())), out_char or (lambda v: (sys.stdout.write(chr(int(v))), getattr(sys.stdout, 'flush', lambda: None)())) + self._in_str, self._out_num, self._out_char = in_str or default_in, out_num or (lambda v: (sys.stdout.write(str(v)+'\n'), getattr(sys.stdout, 'flush', lambda: None)())), out_char or (lambda v: (sys.stdout.buffer.write(bytes([int(v)])) if hasattr(sys.stdout, 'buffer') else sys.stdout.write(chr(int(v))), getattr(sys.stdout, 'flush', lambda: None)())) self._stack, self._tokens, self._token_streams = [], [], [] self._words = { 'dup': lambda: self._stack.append(self._stack[-1]), 'drop': lambda: self._stack.pop(), 'swap': lambda: self._stack.extend([self._stack.pop(), self._stack.pop()]), 'i': lambda: self._eval(self._stack.pop()),