Releases: aNNiMON/Own-Programming-Language-Tutorial
v2.1.0
Changes
- Add
ownpackage manager. Usage examples:own,own init,own add openai. - Use relative path in include statement.
Fixes
- Fix passing command-line arguments to scripts.
- Fix
thisin non-static class methods. - Fix program is not finished if using any http call (okhttp issue).
- Fix visitor and linter checks inside functions.
Modules
- [okhttp] Added
okhttp.newClient()andHttpClientBuilderValue. - [canvasfx] Updated JavaFX version.
v2.0.0
Breaking changes
- Minimal Java version is 17.
- Simplified use statement.
use std, mathinstead ofuse ["std", "math"]. - Change
case [x]behavior in list pattern matching to match single element. - More strict lexer. Fixed escaping backslash in strings. Fixed HEX numbers
println 0x0123456789,0x०१२३४५६७८९.
Changes
- Introducing Constants. Constant can be imported only when using a module.
- Support for long number declaration:
700L,0xABL - Fixed variables scope in shadowing.
- Better error visualizing. Parse errors shows exact line in which an error occurs. Same for Linter and Runtime errors.
- Semantic linter as a required stage.
- Preserve the order of Map elements by default.
- Ability to run programs from resources by adding "resource:" prefix to path.
- Added internal scripts and command
ownlang runto run them. Added scriptcheckUpdatethat checks app updates. - Updated documentation. New documentation engine based on vuepress.
Modules
- [std] Added parseDouble, nanotime, exit, getenv, getprop functions.
- [http] Added httpSync function.
- [functional] Added groupby, tomap, Stream.groupBy, Stream.filterNot, Stream.forEachIndexed, Stream::toMap, Stream.anyMatch, Stream.allMatch, Stream.noneMatch operators.
- [canvasfx] Works for Java 17+ with Java FX 17 (Windows only).
- [server] New server module.
v1.5.0
- Added modules zip, gzip, okhttp
- Added functions std::getBytes, std::stringFromBytes, std::stripMargin
- Added JProgressBar, JTextArea, JScrollPane to forms, methods for JButton, JTextField and WindowListener
- Added function
joiningto functional::stream - Added array properties:
arr.length,arr.isEmpty(),arr.joinToString(...) - Added null coalesce operator
?? - Added basic support for classes
- Strict string to number conversion
forsupports iterating strings and arrays with index:
for ch : "test"
for ch, code : "test"
for el : arr
for el, index : arr- Pretty-print for
jsonencode:
jsonencode(obj)— minified json
jsonencode(obj, 2)— pretty-print json with 2 spaces indent - Ability to set options for yaml parser/dumper
- Fixed mysql connection in
jdbc - Fixed
str::rangefor reversed ranges - Fixed files::readBytes with offset and length
- Fixed matching class constructor in
java::new. Ability to instantiate classes withnewoperator - Other minor changes
v1.4.0
- Added modules
downloader,regex - Added functions
std::arraySplice,std::default - Added constant
std::OwnLangwhich stores language version and platform metadata - Added
peek,sortedto StreamValue - An ability to import several modules
use ["std", "types", "math"] - String internal fields support (length, lower, upper, chars, trim(), startsWith(s), endsWith(s), matches(s), contains(s), equalsIgnoreCase(s), isEmpty()). Also support for extensions:
"%d. %s".sprintf(1, "OwnLang")->sprintf("%d. %s", 1, "OwnLang") - Added kawaii-operator ^^
- Improved REPL mode. Now command history (up key) supported on all platforms. Added autocompletion by Tab key.
- Improved error output
- Updated examples
v1.3.0
Function and function call chaining support (func().func() and func()())
Added takewhile, dropwhile, stream functions to functional module
Added parseInt, parseLong, toHexString functions to std module
Added copy function to files module
Improved optimization
Added socket, base64, java, forms, jdbc modules
Updated examples
Minor fixes and improvements
v1.2.0
Added canvasfx, date, yml, aimp module
Updated std, math, files, functional module
Added std::ARGS constant for accessing command-line arguments
Added REPL mode, Beautifier, Linter, Optimizer
Fixed error recovering in parser and deadlock in lexer
Added merging objects operation map1 + map2
Fixed variables scope
Speeded up files reading
Added NumberValue cache
Updated Netbeans Plugin
Added examples and help