You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beta 0.0.4 is the most stable and reliable Jule release yet. This release, which solves many problems, does not have any bugs that we are not aware of for now. Many bug fixes, improvements, and expansions are in this version.
Of course, for the best experience, we recommend upgrading to the latest version, Beta 0.0.4.
Featured Improvements
Add namespace directive
The namespace directive facilitates access to C++ definitions located in the namespace. Before, you had to write a wrapper for them. Now this obligation has decreased even more and namespace support has added. This feature can also be used to access static definitions of structures.
//jule:namespace std::numeric_limits<jule::Int>
cpp fn max(): int
fn main() {
let int_max = cpp.max()
outln(int_max)
}
Compiler Optimization Improvements
Noticeable bugs in compiler optimizations have been fixed. This is accompanied by a few minor improvements.
The --opt-math optimization flag added for math operations. When this optimization is enabled, cost optimization is performed by skipping the division-by-zero condition check in division and modulo operations, if it can be checked at compile-time.
The --opt-access optimization flag added for memory accesses. When this optimization is enabled, cost optimization is performed by skipping bounds checking for array accesses, if it can be checked at compile-time.
The --opt-append optimization flag added for built-in append function. When this optimization is enabled, cost optimization is performed by avoid slice allocations. If it possible, appends elements one-by-one without allocating a temporary slice for variadic append elements.
Improved Compiler Messages
Compiler messages have been improved. Now you can get a better idea of what to do by getting a suggestion when possible and see the location of the error marked on the relevant line.
For example:
error: global variables must be static
--> foo/bar/main.jule:1:5
1 | let a: int = 20
| ^
| suggestion: use "static" keyword to define
Add Alias Support for Use Declarations
For Use declaration, it became possible to add a short nickname. This is now the first use declation method we recommend.
See manual page for more information.
For example:
use fmt for std::fmt
fn main() {
fmt::println("Hello, World!")
}
Implement Unicode Library
The std::unicode library has been implemented. Thus, processing unicode characters has become much more comfortable and possible with Pure Jule.
use unicode for std::unicode
fn main() {
outln(unicode::is_letter('ç'))
outln(unicode::is_letter('片'))
}
Unicode Identifier Support
With the implementation of the std::unicode library, which has been waiting to be implemented since Beta 0.0.1, Jule has gained significant support in processing unicode characters. In addition, support for identifiers that can use unicode characters has been added to the compiler. Identifiers can now contain unicode characters.
For example:
fn main() {
let kuş = "bird"
let bird = "bird"
let طائر = "bird"
let 鳥 = "bird"
outln(kuş)
outln(bird)
outln(طائر)
outln(鳥)
}
Add Destructors
We added the built-in Dispose trait. When applied, this trait applies a destructor to structures. Since it is a trait, it also provides a common interface for all structures with destructors.
struct MyStruct {}
impl Dispose for MyStruct {
pub fn dispose(mut self) {
outln("Disposed!")
}
}
fn main() {
let ms = MyStruct{}
outln(ms)
}
Library for Integrated Jule
For integrated Jule, we added the std::jule::integrated library, which simplifies and standardizes things. This library is designed to speed up, simplify and standardize your work within Jule when working with integrated Jule. Contains tools and C-linked definitions.
use integrated for std::jule::integrated
// void exit(int code)
cpp fn exit(code: integrated::Int)
fn main() {
cpp.exit(0)
}
Add Formatting Library
We added the std::fmt library for formatting. This library will develop even more in the future. String interpolation etc. It can be considered as an important alternative for those looking for it.
use fmt for std::fmt
fn main() {
outln(fmt::format("Hello, {}", "Formatting Library!"))
fmt::printf("Hello, {}\n", "Formatting Library!")
}
Reimplement IO Library
We implemented it from scratch by destroying the std::io library. We made it more functional and usable. Stream processing is now easier and makes working with the file system more comfortable. In addition, it offers a common usage interface by adding file interfaces for stdin, stdout and stderr.
use fmt for std::fmt
use io for std::io
fn main() {
let scanner = io::Scanner.newf(io::STDIN)
iter:
for {
fmt::print("Input: ")
if !scanner.scan() {
break
}
let s = scanner.text()
fmt::println(s)
match s {
| "exit": break iter
}
}
}
Changes
compiler: misc performance improvements
compiler: add cross-transpile support for build directive
compiler: fix code generation of heap struct-literal for generic structures
compiler: fix variable ordering for code generation
compiler: improve structure ordering algorithm
compiler: fix define processing for ordering
compiler: catch divide-by-zero undefined behavior for assignment operators such as /=
compiler: improve code generation for floating-point literals
compiler: add —opt-append, —opt-access, and —opt-math options
compiler: additionally passes —opt-append, —opt-access, and —opt-math for —opt L1
compiler: catch undefined behavior of zero modulo
compiler: fix code generation for passed global functions as anonymous functions
Compiler Packages
use namespace directive for cpp-links whenever possible
sema: fix cpp-linked type alias eval
sema: complete namespace support of type analyzer
sema: optimize memory footprint of TypeKind struct
sema: remove unnecessary casting for constant indexing expressions
sema: minor improvements and optimizations for type compatibility checking
sema: check array indexing bounds when constant expression
sema: fix and improve type safety checking
sema: catch variadic expressions for type inference
sema: catch enum casting with any type
sema: catch integer literal overflows
sema: avoid duplicated tuple-type errors of variables
sema: catch invalid types of structure methods
sema: fix array-size checking
sema: improve mutability checking for range iterations
sema: fix mutability checking for arrays
sema: add infinity iteration support to return statement checking
sema: fix constant variable eval
sema: fix error catching of indexing eval
sema: fix constant processing
sema: cloning support checking for array types
sema: fix catching invalid tuple expressions for built-in out, and outln functions
sema: add reference type support to dynamic type annotation
sema: fix cpp-linked functions are useable as anonymous function
sema: fix error duplication when variable initialized with type annotation
sema: fix type-alias eval
sema: fix immutability safety of traits
sema: fix immutability safety of structure literals
sema: fix scope checking for interior mutability
parser: improve error positioning of enum item parsing logs
parser: fix match-case parsing
parser: improve statement split algorithm
parser: fix detection of incomplete binary expression
types: fix floting-point type compatibility
API
add: configuration preprocessor define to disable safety
fix: method name of Error trait mask
jule::Fn: std::ostream uses address of function now instead of “” string
add: div, mod, unsafe_div, and unsafe_mod functions
types: add std::ostream operator to jule::I8 and jule::U8 types as integer by default
Standard Library
add: std::jule::integrated
add: std::thread
add: std::fmt
reimplement: std::io
std::unicode: complete implementation
std::mem: add Heap[T] struct
move content: std::mem::c to std::jule::integrated
stop using Vector[T]
builtin: add Dispose trait
std::jule::build: add Namespace field to Directive enum
std::jule::sema: add BUILTIN_TRAIT_DISPOSE global
std::jule::sema: remove cpp_linked field of TypeKind struct
std::jule::sema: add cpp_linked, lvalue, mutable, nil_compatible, supports_cloning, and variadicable methods to TypeKind struct
std::jule::sema: rename is_void method as void of TypeKind struct
std::jule::sema: rename is_cpp_linked method as cpp_linked of TypeKind struct
std::jule::sema: add directives field to Var struct
std::jule::ast: add directives filed to VarDecl struct
runtimeRelated with std/runtime or compiled behaviorcompilerRelated with comptime or compilation problems
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Beta 0.0.4 Release
Beta 0.0.4 is the most stable and reliable Jule release yet. This release, which solves many problems, does not have any bugs that we are not aware of for now. Many bug fixes, improvements, and expansions are in this version.
Of course, for the best experience, we recommend upgrading to the latest version, Beta 0.0.4.
Featured Improvements
Add
namespace
directiveThe
namespace
directive facilitates access to C++ definitions located in the namespace. Before, you had to write a wrapper for them. Now this obligation has decreased even more and namespace support has added. This feature can also be used to access static definitions of structures.See manual page for more information.
For example:
Compiler Optimization Improvements
Noticeable bugs in compiler optimizations have been fixed. This is accompanied by a few minor improvements.
The
--opt-math
optimization flag added for math operations. When this optimization is enabled, cost optimization is performed by skipping the division-by-zero condition check in division and modulo operations, if it can be checked at compile-time.The
--opt-access
optimization flag added for memory accesses. When this optimization is enabled, cost optimization is performed by skipping bounds checking for array accesses, if it can be checked at compile-time.The
--opt-append
optimization flag added for built-inappend
function. When this optimization is enabled, cost optimization is performed by avoid slice allocations. If it possible, appends elements one-by-one without allocating a temporary slice for variadic append elements.Improved Compiler Messages
Compiler messages have been improved. Now you can get a better idea of what to do by getting a suggestion when possible and see the location of the error marked on the relevant line.
For example:
Add Alias Support for Use Declarations
For Use declaration, it became possible to add a short nickname. This is now the first use declation method we recommend.
See manual page for more information.
For example:
Implement Unicode Library
The
std::unicode
library has been implemented. Thus, processing unicode characters has become much more comfortable and possible with Pure Jule.See manual page for more information.
For example:
Unicode Identifier Support
With the implementation of the
std::unicode
library, which has been waiting to be implemented since Beta 0.0.1, Jule has gained significant support in processing unicode characters. In addition, support for identifiers that can use unicode characters has been added to the compiler. Identifiers can now contain unicode characters.For example:
Add Destructors
We added the built-in
Dispose
trait. When applied, this trait applies a destructor to structures. Since it is a trait, it also provides a common interface for all structures with destructors.See manual page for more information.
For example:
Library for Integrated Jule
For integrated Jule, we added the
std::jule::integrated
library, which simplifies and standardizes things. This library is designed to speed up, simplify and standardize your work within Jule when working with integrated Jule. Contains tools and C-linked definitions.See manual page for more information.
For example:
Add Formatting Library
We added the
std::fmt
library for formatting. This library will develop even more in the future. String interpolation etc. It can be considered as an important alternative for those looking for it.See manual page for more information.
For example:
Reimplement IO Library
We implemented it from scratch by destroying the
std::io
library. We made it more functional and usable. Stream processing is now easier and makes working with the file system more comfortable. In addition, it offers a common usage interface by adding file interfaces for stdin, stdout and stderr.See manual page for more information.
For example:
Changes
/=
—opt-append
,—opt-access
, and—opt-math
options—opt-append
,—opt-access
, and—opt-math
for—opt L1
Compiler Packages
namespace
directive for cpp-links whenever possibleTypeKind
structany
typeout
, andoutln
functionsAPI
Error
trait maskdiv
,mod
,unsafe_div
, andunsafe_mod
functionsstd::ostream
operator tojule::I8
andjule::U8
types as integer by defaultStandard Library
Heap[T]
structVector[T]
Dispose
traitNamespace
field toDirective
enumBUILTIN_TRAIT_DISPOSE
globalcpp_linked
field ofTypeKind
structcpp_linked
,lvalue
,mutable
,nil_compatible
,supports_cloning
, andvariadicable
methods toTypeKind
structis_void
method asvoid
ofTypeKind
structis_cpp_linked
method ascpp_linked
ofTypeKind
structdirectives
field toVar
structdirectives
filed toVarDecl
structBuiltinAppendCallExprModel
structERRORS
globalLogMsg
enumerrorf
function aslogf
Log
structnew
static method toReferenceStack
structpush_front
andremove
methods ofReferenceStack
structnew
static method toFile
structFile
structAtomicInt
,AtomicUint
, andAtomicUintptr
typeschar_ptr_to_str
,u16_ptr_to_str
,utf16_to_str
, andutf16_from_str
functions tostd::jule::integrated
write_console
, andread_console
functions for Windowsget_console_mode
, andset_console_mode
functions for WindowsBeta Was this translation helpful? Give feedback.
All reactions