Repository navigation
This release brings a lot of useful tools to write buzz code (LSP, formatter and
DAP support) along with Windows support.
Note
This release builds with zig 0.17.0. We will only use tagged version
of zig from now on.
Added
- Windows support (#74)
- First working version of a LSP thanks to
lsp-kit
(#16) - First working version of the debugger that implements the
Debugger Adapter Protocol
thanks to buzz-language/dap-kit
(#88) - Code formatter (
buzz format)
(#96) - Package manager (#85)
- Package manifests with
manifest.buzzand the newbuzz:manifeststd lib
definitions - Package scaffolding with
buzz init - Dependency fetching with
buzz fetch, supporting git repositories, archives
and local directories manifest.lock.buzzlock files with resolved refs and dependency content
hashes
- Package manifests with
matchstatement/expression for value matching with type-specific condition
semantics (#80)- Enum name can be omitted if it can be inferred
(final list: [Locale] = [ .fr, .it, .en ])
(#360) - Object initialization name can be omitted if it can be inferred
(final payload: Payload = .{ data "..." };)
(#373) - When function call as one anonymous object literal argument, the parentheses
can be omitted (callMe(.{ data = "..." })becomes
callMe .{ data = "..." }) (#372) - File polling API:
File.getPoller,FilePoller(see example
https://github.com/buzz-language/buzz/blob/main/tests/manual/007-fd-poller.buzz) - Shortcut operators:
+=,-=,*=, etc.
(#78) rg.containsmap.hasKey- REPL highlights input as it's being written and format it once submitted
- Added
C header file
for the buzz API (#309) as!operator to force a cast and raise a runtime error when it fails
Changed
- buzz binary now uses subcommands for tools and direct paths for execution
buzz <script.buzz>runs a standalone scriptbuzz -t <script.buzz>becomesbuzz test <script.buzz>buzz -f <script.buzz>becomesbuzz format <script.buzz>buzz <directory>runssrc/main.buzzfrom a buzz package directorybuzz initandbuzz fetchmanage package scaffolding and dependenciesbuzzwill start the REPL
- Extern libraries now must expose only one function which will be called by the
compiler to lookup the functions of the library intare nowi48instead ofi32
(#306). If you're wondering why,
it's because all buzz values live in a NaN boxed f64 and the maximum bits
available for an integer in there is 48. However, C ABI does not understand
i48so we're still stuck withi32in FFI for now.mainsignature can omitargsargument- Maximum number of enum cases is now 16 777 215 instead of 255
pattern.matchAgainstreturns now a list of
obj{ start: int, end: int, capture: str }andmatchAllAgainsta list of
those lists- Tuples no longer require free form identifier to access their properties:
tuple.@"0"can now betuple.0 as?now warns when the cast target is already optional, andas!warns when
used with an optional target- Removed
map.next
Imports
- Import don't rely on searchers any more, instead the import path provides a
deterministic way of finding the imported scriptbuzz:<name>will look for a buzz's standard library<name>pkg:<name>/path/to/<script.buzz>will look for the script under
vendors/<name>/src/path/to/<script.buzz>
- Selective import erases the imported namespace:
import print from "buzz:std"; ... print("hello world"); - Common part of imported namespace gets erased: if imported file as namespace
a\b\cand importing script has namespacea\b, onlyc\remains
Internal
- JIT compiler works in a separate thread
- Better JIT thresholds based of functions/hotspots complexity scores
- The standard librairies are now statically loaded which gives a small speed
boost - Build option
-Dshow_perfnow shows detailed rundown of the time spent in
each component of buzz