Dialect of Python with explicit variable declaration and block scoping, with a lightweight and easy-to-embed bytecode compiler and interpreter.
This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos
on Libera.chat to discuss the problem.
This release features major changes to object construction and more compatibility with Python.
__new__
is now supported.__init__
is now expected to return None
.__init_subclass__
is now supported.__class__
can be reassigned in some cases./
(end of positional-only arguments) and *
(start of keyword-only arguments)*
and **
expansions are now supported in list, set, and tuple, and dict expressions, respectively.set.update
range.__contains__
ceil
, floor
, trunc
functions from the math
module can now return long
values where appropriate.function
objects now expose their Cell
-typed upvalue cells.staticmethod
and classmethod
can be applied to native (C) function objects.__bool__
is now supported.__new__
will necessitate downstream changes in C extensions.krk_isSubClass
is now exposed and may be used to check a single subclass relationship.krk_parseArgs
now supports ?
to determine if an argument as provided, :
to override the function name displayed in exceptions, float conversion for f
and d
KRK_NO_FLOAT
.STATIC_ONLY
define has been renamed to KRK_STATIC_ONLY
.KRK_HEAP_TAG_BYTE=0xb4
when building for this functionality.import
raising the wrong exception when trying to import a non-existent member__new__
when using the default __init__
True
and False
instead of 1
and 0
socket
module has experimental support for UNIX and INET6.kuroko.members()
has been added, providing similar functionality to __dict__
, though read-only.onload
function name has been resolved.This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos
on Libera.chat to discuss the problem.
This is a beta release.
This release features major changes to object construction and more compatibility with Python.
__new__
is now supported.__init__
is now expected to return None
.__init_subclass__
is now supported.__class__
can be reassigned in some cases./
(end of positional-only arguments) and *
(start of keyword-only arguments)*
and **
expansions are now supported in list, set, and tuple, and dict expressions, respectively.set.update
range.__contains__
ceil
, floor
, trunc
functions from the math
module can now return long
values where appropriate.function
objects now expose their Cell
-typed upvalue cells.staticmethod
and classmethod
can be applied to native (C) function objects.__bool__
is now supported.__new__
will necessitate downstream changes in C extensions.krk_isSubClass
is now exposed and may be used to check a single subclass relationship.krk_parseArgs
now supports ?
to determine if an argument as provided, :
to override the function name displayed in exceptions, float conversion for f
and d
KRK_NO_FLOAT
.STATIC_ONLY
define has been renamed to KRK_STATIC_ONLY
.KRK_HEAP_TAG_BYTE=0xb4
when building for this functionality.import
raising the wrong exception when trying to import a non-existent member__new__
when using the default __init__
True
and False
instead of 1
and 0
socket
module has experimental support for UNIX and INET6.kuroko.members()
has been added, providing similar functionality to __dict__
, though read-only.This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos
on Libera.chat to discuss the problem.
This is a beta release.
This release features major changes to object construction and more compatibility with Python.
__new__
is now supported.__init__
is now expected to return None
.__init_subclass__
is now supported.__class__
can be reassigned in some cases./
(end of positional-only arguments) and *
(start of keyword-only arguments)*
and **
expansions are now supported in list, set, and tuple, and dict expressions, respectively.set.update
range.__contains__
ceil
, floor
, trunc
functions from the math
module can now return long
values where appropriate.function
objects now expose their Cell
-typed upvalue cells.staticmethod
and classmethod
can be applied to native (C) function objects.__bool__
is now supported.__new__
will necessitate downstream changes in C extensions.krk_isSubClass
is now exposed and may be used to check a single subclass relationship.krk_parseArgs
now supports ?
to determine if an argument as provided, :
to override the function name displayed in exceptions, float conversion for f
and d
KRK_NO_FLOAT
.STATIC_ONLY
define has been renamed to KRK_STATIC_ONLY
.KRK_HEAP_TAG_BYTE=0xb4
when building for this functionality.This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos
on Libera.chat to discuss the problem.
This release brings a few minor feature improvements and some bug fixes.
/
and *
in function definitions to mark positional-only and required keyword-only parameters.long
s could result in uninitialized data being exposed leading to incorrect results has been resolved.long
with its negation resulted in incorrect results has been resolved.zip
incorrectly raised an exception about keyword arguments has been resolved.property
objects has been resolved.va_args
were used in an undefined manner resulting in incorrect results in krk_parseArgs
has been resolved.This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos
on Libera.chat to discuss the problem.
Over 200 commits have been made since 1.2.5, including several major feature additions, bug fixes, and C API improvements.
+=
, etc.), unary +
, infix @
(__matmul__
)else
branches in for
, while
, try
for branches to execute upon successful completion.long
type, using an integrated bigint implementation and with seamless switchover from small int
s.except
block or with raise ... from ...
.=
in f-strings with the addition of __format__
.__setattr__
and __set_name__
methodscodecs
module
list
s and tuple
s.dis
module can now be used with -m
to compile and print a disassembly of source inputs, recursively, without running them.**
has been corrected to match Python, binding to the right, so 2 ** 3 ** 4
is equivalent to 2 ** (3 ** 4)
instead of (2 ** 3) ** 4
.break
ing or continue
ing from within a with
or try
, __exit__
handlers and finally:
blocks are now executed correctly.krk_runfile()
now provides the exit frame guarantees krk_callfile
provided, making krk_callfile
redundant; it has been removed.krk_runtimeError
, supporting several common usecases such as printing the type name of an object, directly printing KrkString*
objects, and calling repr
on arguments.__pow__
is now supported on int
s by default. (float.__pow__
still requires import math
to be bound to a libm implementation of pow()
)let
is now a simple statement and can be chained with semicolons and used in a -c
argument.long
s.math
functions have been changed.krk_parseArgs
, krk_pushStringBuilderFormat
, have been added to the C API.File
, BinaryFile
, Directory
are now part of fileio
.DYNAMIC_PROPERTY
has been removed from the C API.float
and log
.__options__
import to disable implicit 'self'int.__eq__
, float.__eq__
__exit__
, finally on break or continuetuple.__mul__
__format__
str.__format__
int.__format__
, long.__format__
with as close to Python semantics as I can be botheredobject.__format__()
__format__
method__setattr__
supportdict.__eq__
__set_name__
__pos__
)__matmul__
)__set_name__
tuple.__init__
should not call tupleOftuple.__add__(tuple)
Exception.__str__()
__cause__
, __context__
to exceptions; support 'raise ... from ...'long.__abs__
__pow__
loop order, missing scratch reg__pow__
for integers using method described by HAC 14.79, as CPython doesset.__xor__
__call__
must be one of these, let's skip the extra jumps and switch...dict.__ior__
__options__
' psuedo-module with compile-time changes__args__
directly on codeobject__main__.krk
NotImplemented.__hash__
resolving to object.__hash__
and segfaultinglistiterator.__call__
instanceof checkobject.__eq__
callThis is a release candidate and not a final release.
This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos
on Libera.chat to discuss the problem.
Over 200 commits have been made since 1.2.5, including several major feature additions, bug fixes, and C API improvements.
+=
, etc.), unary +
, infix @
(__matmul__
)else
branches in for
, while
, try
for branches to execute upon successful completion.long
type, using an integrated bigint implementation and with seamless switchover from small int
s.except
block or with raise ... from ...
.=
in f-strings with the addition of __format__
.__setattr__
and __set_name__
methodscodecs
module
list
s and tuple
s.dis
module can now be used with -m
to compile and print a disassembly of source inputs, recursively, without running them.**
has been corrected to match Python, binding to the right, so 2 ** 3 ** 4
is equivalent to 2 ** (3 ** 4)
instead of (2 ** 3) ** 4
.break
ing or continue
ing from within a with
or try
, __exit__
handlers and finally:
blocks are now executed correctly.krk_runfile()
now provides the exit frame guarantees krk_callfile
provided, making krk_callfile
redundant; it has been removed.krk_runtimeError
, supporting several common usecases such as printing the type name of an object, directly printing KrkString*
objects, and calling repr
on arguments.__pow__
is now supported on int
s by default. (float.__pow__
still requires import math
to be bound to a libm implementation of pow()
)This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos
on Libera.chat to discuss the problem.
else
, except
, etc.KUROKOPATH
environment variable can be set to specify module paths on startup, similar to PYTHONPATH
random.seed()
, os.get_terminal_size()
.str.replace()
when strings had \x00
bytes.str.__add__
.__builtins__._
(if it's non-None
)slice
objects have been added__getslice__
, __setslice__
, and __delslice__
have been removed; slice objects are passed to __getitem__
, etc., as in Python 3.[]
expressions has been corrected to match Python 3 (eg., 1:2,3:4
is (slice(1,2),slice(3,4))
, not slice(1,(2,3),4)
)print()
is passed keyword arguments but no positional arguments.os
module.__setitem__
on list
and dict
should return the set value.abs()
as a built-in.dict
s.dict
s are now iterable, aliasing dict.keys()
.dict.values
, and the dictvalues
iterator class.float
s and int
s.del
on table entries did not correctly update table sizes.tuple
hash algorithm has been improved with some inspiration from CPython.list.__eq__
.With apologies, I have neglected to mark off releases despite bumping version numbers internally. -klange
This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos
on Libera.chat to discuss the problem.
random
module has been added.log1p
, expm1
) have been fixed, and some new constants have been added.codecs
package has received some updates.wcwidth
implementation provided for Windows has been updated with the latest data from the Unicode databases, and a wcwidth
module has been added to expose the function. Note that the system libc wcwidth
will be used where available.This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos
on Libera.chat to discuss the problem.
lambda
functions.rline
has been updated with support for ^R
history search.str
type.\r\n
line endings has been fixed.exec*
family of functions were not properly NULL terminated has been fixed.char
types has been fixed.$PATH
environment variable has been fixed.This is Kuroko, a dynamic, bytecode-compiled, interpreted language with significant whitespace and familiar syntax.
For a complete tutorial and sample code, please visit kuroko-lang.github.io.
If you believe you have discovered a bug in this release, please file an issue report here on Github or join #toaruos
on Freenode to discuss the problem.
This is a bug fix release to address issues found in 1.1.0:
rline
has been fixed.any
and all
corrupted the stack when passed iterators has been fixed.dict.capacity
expected an unused argument has been fixed.set.__eq__
was not implemented has been fixed.timeit
module was not included in the bundle list has been fixed.src/modules/
.tcmalloc
is no longer used on Windows, as the issue it was added to solve was resolved previously. This change was quietly applied to the release archive for Windows provided for 1.1.0.tcc
.