-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathCHANGELOG
771 lines (640 loc) · 29.7 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
Release 0.1.13
--------------
8th November 2024
Additions:
- Unwrap operator, `x!`.
- Similar to try operator (`x?`), but panics if value is not present.
- "Field update" syntax. A shorthand to change a field of a structure.
- `.{ ..old_value, field = new_value }`
- `onyx watch` now works on MacOS.
- `onyx run-watch` to automatically re-run the program on changes.
- `#wasm_section` directive to add custom sections to the WASM binary.
- Custom commands per project
- Installed in a `.onyx` directory
- `onyx pkg build` can now run shell commands and multi-stage builds.
- `Stalled` compiler hook to allow for code injection when the compiler stalls.
- `Slice.map`
- `Slice.map_inplace`
- `Slice.fold1`
- `Slice.get_opt`
- `Iterator.from`
- `iter.group_by`
- `core.alloc.debug`
- `core.os.args`
- `core.crypto.hmac`
- `core.crypto.keys`
- `core.encoding.json.Value.as_entry_array`
- `core.encoding.base64 { encode_url, decode_url }`
- `core.encoding.xml`
Removals:
Changes:
- Capture/closure syntax is now `(params) use (captures) ...`.
- `(x: i32) use (variable) -> str { ... }`
- `(x) use (variable) => { ... }`
- `&&` and `||` now short-circuit.
- Fixed-sized arrays (`[N] T`) are now passed by value.
- The size of tag field for unions is now dependent on the number of variants.
- Parsing structs no longer sometimes needs `#type`.
- Renamed `core.alloc.memdebug` to `core.alloc.memwatch`.
Bugfixes:
- Bug when injecting into a `#distinct` type.
- Many, many random bugs.
Release 0.1.12
--------------
19th May 2024
Additions:
- Ability to pipe into a method call.
- `x |> y->z() === y->z(x)`
- Ability to pipe into a try operator.
- `x |> y()?` === y(x)?`
- Ability to use `_` where `#auto` is used.
- This will be come the default soon and `#auto` will be removed.
- `return #from_proc` to return all the way from the procedure.
- Variant of `new` that accepts an r-value and places it in the heap.
- Builtin `panic` procedure that is equivalent to `assert(false, ...)`
- Format parameter "a" that unpacks an `any` and formats its internal value.
- `--generate-name-section` CLI flag
Removals:
- `Optional.try` as it is incompatible with new semantics of `?`.
Changes:
- `str.as_str` is now preferred over `string.as_str`
- `str.compare` is now preferred over `string.compare`
- `str.to_cstr_on_stack` is now preferred over `string.to_cstr_on_stack`
- `str.join` is now preferred over `string.join`
- Implementation of `?` for `Optional` and `Result` to return from the enclosing procedure.
- JavaScript file generated by `-r js` is no longer an ES6 module.
Bugfixes:
- Fixed WASI compilation due to syntax issue.
- Fixed WASI platform `__file_open` implementation for wasmtime.
- Weird edge case when using multiple placeholder arguments in a quick procedure.
Contributors:
Release 0.1.11
--------------
21st April 2024
Additions:
- Ability specify where piped arguments are placed using `_`.
- `x |> foo(y, _) == foo(y, x)`
- Alternative syntax for `case #default ...`. You can now just write `case _ ...`.
- Alternative syntax for binding documentation using `///`.
- **Experimental** compiler extensions feature, currently used to create procedural macros.
- `core.misc.any_deep_copy`
- Ability to explicitly specify tag value for tagged unions.
- `Variant as value: type`, i.e. `Foo as 3: i32`
Removals:
- Deprecated the use of `#default` in case statements. Use `_` instead.
- Removed `iter.take_one`. Use `iter.next` instead.
Changes:
There are several *breaking* changes in this release related to core library APIs.
- `Iterator.next` now returns `? T` instead of `(T, bool)`
- `io.Stream` uses `Result(T, Error)` for return types instead of `(Error, T)`
- `switch` over a `range` is no longer inclusive by default, since `..=` exists now.
- Enabled optional semicolons by default.
- `//+optional-semicolons` is no longer necessary.
There are also several non-breaking changes.
- The internal memory layout is different. See pull request #133 for details.
Bugfixes:
Contributors:
Release 0.1.10
---------------
30th March 2024
Additions:
- JavaScript interop
- `core.js` package for JS FFI.
- `#js` directive to build a JavaScript file during compilation.
- Implicit injections
- `#inject` is no longer required in some cases
- Named return values
- Official builds for Linux AARCH64
- `Slice` and `Array` structures for placing methods on slices and dynamic arrays.
- Range type improvements
- `range64` type
- `..=` operator that is a range, with an inclusive upper end.
- New alternate error format that may become the default in the future.
- Use `--error-format v2` or set environment variable `ONYX_ERROR_FORMAT` to be `v2`.
- Auto-disposing locals (experimental)
- `use x := ...`
- Core library functions
- New process spawning API with builder pattern (`os.command`)
- `sync.MutexGuard`
- `sync.Channel`
- `hash.sha1`
- `net.dial`
- `net.resolve`
- integer constants `i8.MIN`, `i64.MAX`, etc.
Removals:
Changes:
- Revamped CLI
- Shorthand commands (r for run, b for build, etc.)
- Improved appearance
- Better help pages
- Note: flags must now appear before all files
- Better error messages for common issues
- `Array` should be preferred over `core.array`
- `Slice` should be preferred over `core.slice`
- `str` should be preferred over `core.string`
Bugfixes:
- Fixed compiler crash when trying to iterate over something that is not iterable.
- Fixed wrong implementation of futexes on MacOS.
- Fixed implementation of `platform.__time()`
Contributors:
- @Syuparn (1 pull request)
Release 0.1.9
--------------
February 19th 2024
This release has some interesting new features and general usability improvements.
It does have a couple rather LARGE syntax changes that will affect nearly every program
written in Onyx. The two major syntax changes:
For loops:
for x in array instead of for x: array
Cases with captures:
case Value as capture instead of case capture: Value
Interfaces:
X :: interface (T: type_expr) {
t as T;
}
instead of
X :: interface (t: $T) { ... }
These syntax changes help improve readability and makes the language more friendly to newcomers.
These changes also introduce two new keywords into the language that could see use in other places
in the future. This is a small improvement to make, but it is better to make it now while a
(relatively) small amount of Onyx code has been written.
Additions:
- OVM-Wasm support on MacOS (thanks to @judah-caruso).
- This enables debugging support when on MacOS.
- Available from installer.
- `.*` as a postfix alternative to `*`.
- `where` clauses can contain arbitrary boolean expressions (thanks to @judah-caruso).
- Small arrays (4 or fewer elements) have special accessors for their components.
- Tree-shaking is performed prior to code generation, reducing binary size drastically in some cases.
- Operation overloads for `+`, `-` and `*` for small arrays.
- `where defer` as a cleaner alternative to `where #bottom_test`
- `core.intrinsics.wasm.memory_equal`
- `core.iter.counter`
- `core.iter.sum`
- `core.iter.fold1`
- `make(List(T))`
- `core.list.from_array`
- `core.list.pop_begin_opt`
- `core.list.pop_end_opt`
- `core.list.empty`
- `core.conv.parse`
- `core.conv.parse_with_allocator`
- `core.encoding.json.encode_string_opt`
- `core.encoding.json.as_any` overload
Removals:
- Compiler test cases are no longer shipped with toolchain.
Changes:
- Due to tree shaking, the `methods` member of `Type_Info_Struct` and `Type_Info_Union` is not populated by default anymore.
- Use the `--generate-method-info` CLI flag to add this information back in.
- Due to `as` being a keyword now, `cptr.as` was renamed to `cptr.as_unsafe`.
Bugfixes:
- Error reporting in many cases saw a lot of improvements.
- Especially with polymorphic procedures, l-values, and code blocks.
- Implementation of `core.array.remove`.
Contributors:
- @judah-caruso (10 pull requests)
- @stagas (2 pull requests)
- @magnetenstad (1 pull request)
- @jtakakura (1 pull request)
- @hatappo (1 pull request)
- @Syuparn (1 pull request)
- @benstt (1 pull request)
Release v0.1.8
--------------
November 28th, 2023
Additions:
- MacOS compatibility
- Using Wasmer runtime, MacOS on ARM and AMD64 are supported.
- Memory debugger
- A custom allocator that intercepts allocations and frees and reports them
to a client for visualizations and debugging.
- New installation script
- sh <(curl https://get.onyxlang.io -sSfL)
- Works on Linux and MacOS
- KDL document parsing support
- Used as the new format for the package manager.
- See https://kdl.dev for details
- `os.chdir` for changing the current directory
- Supported on WASIX and Onyx runtime
- `os.getcwd` for getting the current directory
- Supported on WASIX and Onyx runtime
- Basic build configurations into package manager.
- Configure sources files, runtime, target file,
included files, and CLI arguments
- Multiple configurations per project.
- Build with 'onyx package build <config_name>'
Removals:
Changes:
- Simplified using union variants of type `void`.
- Now instead of `.{ Foo = .{} }`, use `.Foo` instead.
- Renamed `--no-std` flag to `--no-core`, since Onyx does not call its standard
library "std", the name did not make any sense.
- `net.make_ipv4_address` now has a reasonable definition using a string for the IP,
instead of an integer.
Bugfixes:
- Formatting of days and months were incorrect `time.strftime`.
- Infinite loop in TCP server when a client disconnects.
Release v0.1.7
--------------
October 25th, 2023
Additions:
- Support for WASIX, a new, extended standard to WASI, popularized by Wasmer.
- Define `WASIX` in `runtime.vars` to enable it. (`-DWASIX` on the CLI)
- Adds support for networking, futexes, and TTY control in WASI.
- `switch` expressions.
- `switch` can appear at the expression level, and uses `case X => value` to
specify cases.
- `cbindgen` now supports passing functions as arguments.
- Internally uses dyncallback
- Only for OVM-wasm and Linux, for now.
- Scoped values in interfaces. `X :: ...` is allowed in an interface now.
- `#inject` works on interfaces.
- Polling to the `io.Stream` functionality.
- Used to query when data is read/write-able from a stream, for supported streams.
- `io.stream_poll`
- `misc.any_unwrap` to unwrap an `any` containing an optional.
- `json.decode_with_result`
- `json.decode_into`
- `slice.group_by`
Removals:
Changes:
- Complete overhaul of networking in the core library.
- Backwards compatiblity was not strictly maintained, but common functions did
not change, like `socket_send` and `socket_recv`.
- When debugging, `/ 0` or `% 0` will trigger an exception to debug the error.
Bugfixes:
- `alloc.atomic` package was broken when `sync` package was missing.
- `X.foo` would not work if `X` was a pointer to a union.
- Captures by pointer would break if the value was a primitive whose address wasn't
taken anywhere else.
- Symbol name reported by documentation generation was incorrect for some methods.
Release v0.1.6
-----------
24th September 2023
Additions:
- Tagging global variables.
- Just like procedure and structure tags.
- Use `runtime.info.tagged_globals` and `runtime.info.get_globals_with_tag()`
- `logf` for formatted logging.
- This is only present if `conv.format` is present.
- Ability to debug GC allocator by defining `runtime.vars.Enable_GC_Debug`.
- Ability to set allocator on `Map`.
- `string.to_cstr_on_stack`
- `Date.day_of_week()`
Removals:
Changes:
- `misc.any_to_map` now returns `? Map(str, any)`.
- Build scripts on Linux no longer internally use `sudo`, requiring the script to be run with `sudo` instead.
- This makes it possible to easily build Onyx into a container image.
- Parse errors with an unexpected symbol now say the symbol's name instead of TOKEN_TYPE_SYMBOL.
Bugfixes:
- `alloc.arena.clear` would not leave the arena in a proper state for further allocations.
- `array.filter` was implemented incorrectly.
- `runtime.platform.__get_env` was implemented incorrectly on Onyx runtime.
- `Result.is_ok` and `Result.is_err` were implemented with incorrect return types.
- `Timestamp.from_date` was implemented incorrectly.
- `Date.add_months` was implemented incorrectly.
- `alloc.atomic` was left untested.
- `Reader.read_bytes` was implemented incorrectly.
- `string.last_index_of` was implemented incorrectly.
Release v0.1.5
-----------
18th July 2023
Additions:
- Added ability to control the size of the tag type for tagged unions.
- `union #tag_type u8`
- Infrastructure to have custom sub-commands.
- Any `*.wasm` file in `$ONYX_PATH/tools` is available to run with `onyx <cmd>`
- `__futex_wait` and `__futex_wake` to platform layer.
- This allows for non-busy-waiting on mutexes and semaphores.
- Currently implemented for Onyx and JS platforms; WASI is impossible, but WASIX will come soon.
- `--skip-native` flag to `onyx pkg sync` to skip compiling native libraries.
- Ability to tag methods on structures.
- `tty_get` and `tty_set` functions in `core.os`
- Allows for controlling raw and echoed input
- Currently only for `onyx` runtime and on Linux only.
- `-Dno_entrypoint` for programs that do not have a `main` function.
Removals:
- `Wait_Notify_Available` global in `runtime` package.
- This is no longer needed as futexes are preferred instead of wait/notify.
Changes:
Bugfixes:
- Fixed bug in `json.encode` that caused arrays of structures to not be outputted correctly.
- Fixed bug in `onyx pkg` that caused `onyx pkg new` to not work as intended.
Release v0.1.4
-----------
22nd June 2023
Additions:
Removals:
- Deprecated `map.get_opt`.
- This is unnecessary with the new semantics of `map.get`.
Changes:
- `onyx pkg` now stores synchronized packages in a different folder hierarchy.
- This is a transparent change so long as you use the `lib/packages.onyx` file.
- `Map` implementation no longer holds a default value. Instead, it returns an optional from `map.get`.
- This is a significant breaking change that will affect many programs.
Bugfixes:
- Fixed a bug that made relative imports not always relative to the current file.
- This may break some programs that were accidentally using this "feature".
- Fixed a bug with small a `union` over small data types, such as booleans.
- There was an alignment issue, which caused the union to be smaller than expected.
Release v0.1.3
-----------
19th June 2023
Additions:
- New syntax for declaring quoted code blocks.
- `[captures] { body }` for blocks.
- `[captures] ( expr )` for expressions.
- User-level stack trace.
- Enable with `--stack-trace`
- Use `runtime.info.get_stack_trace()` to get the current stack trace.
- Used in assertions and heap allocator for better error reporting
- `Optional.with` for running a block of code with the value in an Optional, if one is present.
- `-Dvariable=value` command line option to add symbols to the `runtime.vars` package.
- `--no-type-info` command line option to omit type information from the binary.
- `Allocator.move`. Moves a value into an allocator, returning a pointer to it.
- This is a copy operation (and might be renamed later)
- `core.encoding.hex` package
- Quickly convert a byte array to and from its hex equivalent.
- `os.path_clean`
- `os.path_directory`
- `os.path_extension`
- `os.path_split`
- `slice.equal`
- `iter.find`
- `iter.flatten`
Removals:
- Remove old syntax for quoted blocks, `#quote` and `#()`.
- Switch to `[] {}` and `[] ()` respectively.
- Old WASI specific modules for time and environment variables.
- `Result.return_err` and `Result.return_ok`.
- Unnecessary with new union features.
Changes:
- Much faster backend (approximate 1.3-1.4x speedup for most programs)
- Added support for optionals in `json.encode`, `json.from_any`, and `json.as_any`.
- Added support for optionals in `conv.parse_any`.
- `Set` implementation no longer contains a "default value". Instead, an optional is returned from `get`.
- A similar thing may happen to `Map` soon, but that is a significant breaking change.
- Indexing for union tag types starts at 0 now, instead of 1.
- There were many annoyances where Zero-Is-Initialization (ZII) was not followed and
that was causing too many bugs to be worth it.
Bugfixes:
- Numerous bugs related to polymorphic procedures
Release v0.1.2
-----------
30th May 2023
Additions:
* Tagged unions (`union` type)
* String literals can have unicode code points.
- '\uXXXX' for small code points (less than U+FFFF)
- '\UXXXXXX' for large code points
- Does not support UTF-16 surrogate pairs
* `iter.next_opt`
* `memory.ptr_add`
* `misc.any_member`
Removals:
Changes:
* `Optional` is now a tagged-union
* `Result` is now a tagged-union
* `iter.single` can take a `dispose` function, which is called on close of the
iterator, with the single value yielded.
* `io.write_escaped_str` supports escaping "\\" now.
* In Javascript runtime, made `__read_from_input` not defined right away, so
it can be overridden depending on the needs of the program.
Bugfixes:
* `json` encoder was wrongly not encoding strings when using `encode` on an `any`.
Release v0.1.1a
-----------
15th May 2023
Additions:
Removals:
Changes:
* Javascript now supports time at the platform layer.
- Expects import "host.time"
Bugfixes:
* Fixed javascript runtime not compiling due to missing dependency on `core.os`.
Release v0.1.1
-----------
15th May 2023
Additions:
* Ability to have tags on `#foreign` block procedures.
- This will enable the creation different binding generators, such jsbindgen.
* WASI support for threads at the platform layer.
- Requires passing '--multi-threaded' CLI flag.
* `#distinct` types can now be made over any type.
- Used to be only primitives.
* New `logo-new-256.ico` for favicon on website.
* `u8.to_upper` and `u8.to_lower`
* `iter.empty`
* `json.Value->as_array_iter()`, `json.Value->as_map_iter()`
* `onyx pkg new` for creating a project from a template
* `#load_all_recursive` to recursively load all `.onyx` files in a directory.
Removals:
Changes:
* Undefined function imports in `onyx run` no longer cause an immediate error.
- Instead, an error is produced when the function is called.
* API for time remains the same, but reduced dependencies on external time things,
like strftime, localtime and mktime.
* Ergnomic improvements to `onyx pkg`.
* Not relying on time for random number seeding, if cryptographic random number generation is possible.
- Using `getrandom` on Linux, and `BcryptGenRandom` on Windows.
- Using `random_get` on WASI.
Bugfixes:
* Fixed missing `use core` in `optional.onyx`.
- Fixes `Optional.reset` and `Optional.hash`
* Fixed missing newline in `onyx help build` documentation.
* Fixed WASI compilation due to misconfigured environment code.
* Fixed WASI `__dir_open` permissions.
* Fixed `core.encoding.ini` clearing the temporary allocator.
Release v0.1.0
--------------
This release contains MANY CHANGES because I am terrible at keeping up to date with a
proper changelog and release schedule. Basically, this is the first release where I
feel like the language is at a good place. Many "gotcha" bugs have been resolved and
the language is much more powerful now for it. There are still plenty of things that
are going to be changed and added in the future, but first I want to get this better
version out there in a packaged format.
Additions:
* Multi-threading for the JS backend (--use-multi-threading)
* Running Onyx directly from the compiler using 'onyx run'
- This internally links with libwasmer to provide the WASM runtime.
* threading primitives (mutex, semaphore, etc.)
* atomic intrinsics
* Quick-Functions
* do-expressions
* typeof
* interfaces and where clauses
* '#auto' return type
* Macros and paste-able code blocks
* overloaded procedures can have polymorphic and overloaded procedures as overloads. This makes them MUCH more powerful.
* types are not required on struct members that have default values. This is still very experimental so there are some
noticable bugs with it. You can always specify the type explicitly if you have issues.
* structure definitions act like name spaces and can have top-level expressions defined within them, such as procedures
or other structures.
* structures can be "used" to bring in the aforementioned top-level expressions into the current scope.
* experimental method call syntax using ->.
* compound declarations for procedure locals and struct members that are of the same type.
* custom iterators using the builtin structure, Iterator(T). This the semantics will be written out elsewhere but long
story short, you can have custom iterators using the language's 'for' statement.
* '--print-function-mappings' to see where a wasm function comes from in the source text.
* logging allocator. Wraps any allocator and prints what kind of allocations are happening.
* many math functions.
* basics of reading environment variables
* Relative file inclusion using "./" at the start of the path
Removals:
* the "proc" keyword.
Changes:
* initialization statements on if/while/switch are a lot more powerful.
* operator overloading is now done as a top level declaration handled through the entity
system, instead of relying on creating a procedure. This lets you use an existing
procedure as an operator overload. Take a look at '#operator ==' in string.onyx.
* easier to write types in expressions
* Tons of internal code cleanup relating to structures and code generation.
Bug fixes:
* Too many more to even start listing them all.
Release v0.0.6
--------------
Additions:
* Compilation on Windows. All you should need is `cl.exe` in the current environment,
and then simply run `build.bat`. I haven't thoroughly tested this, but I believe
it will work on many systems. ARM / PowerPC may not work correctly.
* procedures can be polymorphic on an array size.
* structures can be polymorphic on any compile-time known value.
* procedures can be polymorphic on any compile-time known value, including type expressions.
* basics of operator overloading using `#operator +`.
* multiple return values and multiple assignment / declarations.
* #solidify directive for explicitly specifying type variables in polymorphic procs.
* properly different kinds of allocators in core/alloc/.
* `null_proc` in builtin.onyx type matches against all procedure types, allowing for a
'null' procedure.
* '-VV' and '-VVV' for very verbose printing. Easier to nail down compiler issues because it stops
printing in the entity where the problem is.
* `io.Stream` API with `io.Reader` and `io.Writer`.
* ranges on switch cases, i.e. `case 4 .. 10`. Note, this is inclusive on the upper end,
unlike most other uses of the range literal.
* miscellaneous core library functions
Removals:
* struct literals can no longer specify values for members brought in through a `use`.
* Makefile; just use ./build.sh or ./build.bat
Changes:
* `::` declarations in a procedure are treated differently now. They used to represent a constant
value, but one that was still computed at the assignment site. Now, they instead are used to
declare top level expressions in the procedure scope. This means that things like structs and
enums can be declared at any block scope. The top-level expressions currently do not have
access to polymorphic variables in the procedure.
* `#include_file` is now `#load` and `#include_folder` is now `#load_path`. I like the shorter names.
* enum values are compile time known.
* struct literals are compile time known can be used at top level scope.
* range literals are proper things in the compiler code now.
* polymorphic procedure generation code is much cleaner now, making new polymorphic features easier.
* procedures can be part of top-level struct literals.
* `raw_alloc` and `raw_resize` take alignment arguments, with defaults provided.
Bug fixes:
* polymorphic procedures would get 'confused' when two structs in the program had the same name.
* function argument type mismatch would give wrong function name.
* `structs` with `use`d members caused all sorts of problems.
* bug fix with field access of unknown type causing infinite loop.
* auto-cast in overloaded function call resulted in no match found, even though there was one.
* struct member defaults were processed too early in the pipeline, causing errors.
* assignment of array type with array literal optimization.
* probably many more since everything is compiled with warnings now.
* deferred statements are correctly executed with break, continue and fallthrough.
* `0..10` was not parsed correctly.
Release v0.0.5
--------------
Additions:
* array literals; use (type).[ (vals) ] as the syntax; They work as global variables, and
local variables, and as intermediates (such as function arguments).
* polymorphic procedures can be instantiated in many more places now due to clean up.
* added #context_scope block. It automatically stores and restores the context at the beginning
and the end of the block respectively.
* 'use' statements work on pointers to structures.
* '--fun' flag displays a bar graph of where each of the entities in the compilation
pipeline are. Compiles the program slower purely to make it look better.
* --verbose prints statistics about the compilation including time taken, lines
processed and token processed.
* 'abs' function in core/math.onyx.
* 'read_word' in core.string.reader.
* Better error reporting for invaild binary operators.
Removals:
* field accesses on things that are not lvals. This was a bug anyway, so it
should not require any code changes, but the feature is gone.
* i32map, strmap, ptrmap modules. Use generic map in map.onyx instead.
Changes:
* BREAKING: The type name 'string', and the package name 'str', have been swapped.
* 'use' statements are more powerful. 'use package' can occur at any scope level,
and 'use <value>' can occur at file scope.
* struct literals can now have arbitrary package prefixes on them, i.e.
some.deeply.nested.packages.Struct.{ ... };
* struct literals can have arbitrary expressions as their type, i.e.
(#type [] void).{ ... };
* cleaned up CLI
* assignment over an array type copies the array instead of just the pointer.
Bug fixes:
* globals that were #foreign caused several bugs, which have been squashed.
* field accesses can only happen on lvals.
* Bitwise NOT on unsigned integers did not work.
* 'use' statements now work in polymorphic procedures
* resizing heap allocated memory at the end of memory would not grow underlying memory.
* stack position variables introduced from for loops, ifs, whiles, or switchs would produce
very bad side effects if they were not in a stack based function.
* array.remove was broken when the semantics of `for: lo .. hi` changed.
Release v0.0.4
--------------
Additions:
* Ability to pass complicated structs by value. Very useful in polymorphic data types.
* bitwise not operator, ~
* auto cast operator, ~~. In many circumstances, will automatically determine what to cast to.
- Will also report errors in the cast is not possible.
* Arbitrarily typed varargs. They behave similar to C-style varargs.
* vararg_get builtin procedure to retrieve a value from a ... vararg.
* #local directive for placing a symbol at file scope.
* a basic implentation of printf in the standard library.
* use statements at the function level.
* nested packages, i.e. 'core.array'
- Still testing it out; could change at in the future
* basic printf implementation
* core.str.reader library
Removals:
Changes:
* Massive renaming of packages, since nested packages are now allowed.
- Most collections of function simply were put into a package, instead of being prefixed,
i.e. array_map -> array.map
* Numeric literals now no longer have a concrete type; they become whatever type is needed,
reporting an error if that is not possible.
* Procedure definitions now require parentheses, even if there are no arguments. This was
done to allow for `proc { foo, bar }` to be the overload syntax.
* array.map takes an arbitrary parameter of polymorphic type to make up for the fact that
anonymous procs do not have closure. New type signature is:
array_map :: proc (arr: ^[..] $T, data: $R, f: proc (T, R) -> T)
* better syntax highlighting for VIM.
* Compiler internals changed to make it easier to do advanced things in the future.
Bug fixes:
* many bugs related to var args and procedure calls in general.
* polymorphic structs caused segmentation fault when trying to produce an error message.
* polymorhpic structs caused scope to change when using a struct literal of a polymorphic type.
* #char "\"" did not work.
* nested function calls returning non-basic types would simply be wrong.
* Recursive structs are no longer possible.
* For loop array/slice/dynarray used to use signed indicies, which was wrong.
Release v0.0.3
--------------
Additions:
* Added polymorphic structs.
* Added polymorphic structs to polymorphic pattern matching.
* Added I32Map polymorphic structure to core library.
* Added println to core library; print followed by a newline.
* Added tests/ folder and runtests.sh which will compile and execute the programs in the
folder and test against their expected output.
* #local for specifying symbols at the file scope.
Removals:
Changes:
* BREAKING: 'use package' now places included symbols at the file scope, not package scope.
* Switched to using TCC as the primary compiler, while maintaining support for GCC.
* boolean literals are compile time known so they can be used at top level.
* #file_contents now results in [] u8, not *u8.
Bug fixes:
* Fixed error message index for struct literal member type mismatch.
* Added struct member name in struct literal member type mismatch.
* Fixed freeing non-allocated memory when generating documentation.
* Fixed alignment issue with struct members.