Skip to content

Releases: grain-lang/grain

Grain v0.3.0 - Barley

21 Apr 22:31
19f44b5
Compare
Choose a tag to compare

⚠ BREAKING CHANGES

  • cli: Remove -f CLI option
  • compiler: Remove --principal-types and --recursive-types compiler flags
  • compiler: Rename --cdebug to --verbose
  • cli: Pass compiler flags from the CLI to grainc directly (#613)
  • Correct type signature for _start
  • Introduce _gmain for old behavior of _start
  • Tail calls must be enabled explicitly via --experimental-wasm-tail-call
  • Static linking of Grain modules (#584)
  • stdlib: Replace JS entrypoint with locator file (#586)
  • Streamline runtime dependencies & entrypoints (#585)
  • Rename registerBasePrinter to dangerouslyRegisterBasePrinter in runtime/exception
  • Use Grain exceptions instead of JS exceptions (#565)
  • Update assignment semantics (#560)
  • Grain implementation of memory allocator (#530)
  • Refactor value tags (#526)
  • stdlib: Ensure string methods are data-last (#494)
  • runtime: Print strings without quotes (#495)
  • Char literals (#477)
  • Char (#474)
  • Rework memory management (#461)
  • convert fallible List methods to return Option (#460)
  • change return type of Array.find/findIndex to Option (#459)
  • upgrade binaryen to 0.4.0 & update test invocation to work with it (#435)
  • Add support for bitwise operators (#425)
  • remove ^ as unbox operator (fixes #183) (#426)

Features

Read more

@grain/cli cli-v0.3.0

21 Apr 22:31
19f44b5
Compare
Choose a tag to compare

⚠ BREAKING CHANGES

  • cli: Remove -f CLI option
  • compiler: Remove --principal-types and --recursive-types compiler flags
  • compiler: Rename --cdebug to --verbose
  • cli: Pass compiler flags from the CLI to grainc directly (#613)
  • Rework memory management (#461)

Features

  • allow setting the initial memory via CLI option (#448) (213ee5a)
  • cli: Pass compiler flags from the CLI to grainc directly (#613) (8f40383)
  • Compile grainc to JS & create binaries with pkg (#570) (f4919bd)
  • Grain implementation of memory manager (#534) (cea6dcc)
  • Grain implementation of toString/print (#540) (8c77905)
  • Use real wasm tail call instruction (#510) (9c9ffe4)

Bug Fixes

  • replace shebang trick with flagged-respawn to support Windows (#430) (4ea2602)
  • Rework memory management (#461) (84318b0)

Miscellaneous Chores

  • cli: Remove -f CLI option (8f40383)
  • compiler: Remove --principal-types and --recursive-types compiler flags (8f40383)
  • compiler: Rename --cdebug to --verbose (8f40383)

@grain/compiler @grain/compiler-v0.3.0

21 Apr 22:31
19f44b5
Compare
Choose a tag to compare

⚠ BREAKING CHANGES

  • cli: Remove -f CLI option
  • compiler: Remove --principal-types and --recursive-types compiler flags
  • compiler: Rename --cdebug to --verbose
  • cli: Pass compiler flags from the CLI to grainc directly (#613)
  • Correct type signature for _start
  • Introduce _gmain for old behavior of _start
  • Tail calls must be enabled explicitly via --experimental-wasm-tail-call
  • Static linking of Grain modules (#584)
  • Rename registerBasePrinter to dangerouslyRegisterBasePrinter in runtime/exception
  • Use Grain exceptions instead of JS exceptions (#565)
  • Update assignment semantics (#560)
  • Grain implementation of memory allocator (#530)
  • Refactor value tags (#526)
  • stdlib: Ensure string methods are data-last (#494)
  • runtime: Print strings without quotes (#495)
  • Char literals (#477)
  • Char (#474)
  • convert fallible List methods to return Option (#460)
  • change return type of Array.find/findIndex to Option (#459)
  • upgrade binaryen to 0.4.0 & update test invocation to work with it (#435)
  • Add support for bitwise operators (#425)
  • remove ^ as unbox operator (fixes #183) (#426)

Features

  • for loops (#525) (1032a3d)
  • Add ability to throw exceptions (1f1cd4a)
  • Add ability to register custom exception printers (1f1cd4a)
  • add command line option to disable garbage collector (#239) (7f27a0a)
  • Add Exception stdlib with Exception.registerPrinter (1f1cd4a)
  • add initial Range stdlib module (#456) (508f23c)
  • add List.init to stdlib (#465) (6b833d8)
  • add reduce/flatMap/every/some to Array stdlib (#455) (51a7a80)
  • add reducei/counti/filter/filteri/unique to Array stdlib (#473) (3e70cd5)
  • add Set stdlib module (#466) (2eb2604)
  • Add support for bitwise operators (#425) (5c2b8bf)
  • add support for LSP lenses (#416) (753a0dc)
  • add update method to map stdlib (#421) (292b5f9)
  • Allow newline when creating array (#447) (114cb1a)
  • Allow pattern matching on unsafe wasm i32s (#532) (8839c55)
  • Allow unsafe wasm values in globals (#519) (111b549)
  • Better lenses and hover for LSP (#501) (1223e9a)
  • change return type of Array.find/findIndex to Option (#459) (aa3767d)
  • Char (#474) (c9422f8)
  • Char literals (#477) (cf7eaa5)
  • cli: Pass compiler flags from the CLI to grainc directly (#613) (8f40383)
  • Compile grainc to JS & create binaries with pkg (#570) (f4919bd)
  • convert fallible List methods to return Option (#460) (a08768e)
  • Enable Binaryen optimizations (#556) (50ebf74)
  • Export compiled functions from modules (#529) (e302049)
  • Grain implementation of Char and String libraries (#559) (7424cc5)
  • Grain implementation of equals (#538) (09617bc)
  • Grain implementation of hashing (#557) (40723fc)
  • Grain implementation of memory allocator (#530) (fd8faaa)
  • Grain implementation of memory manager (#534) (cea6dcc)
  • Grain implementation of number runtime (#537) (94460c0)
  • Grain implementation of toString/print (#540) (8c77905)
  • Grain wasi bindings (#562) (323006b)
  • Implement low-level wasm i32/i64/f32/f64 libraries (#517) (721d011)
  • Implement String.indexOf, String.explode, and String.split (#450) (6dc5466)
  • Implement support for printing in Grain (#561) (bfe471c)
  • Normalized wasm exports for linked modules (3d4ac6e)
  • Optimize local mutations (#527) (65a1947)
  • Optimize number to string conversions by writing UTF8 directly (#539) (f18d26e)
  • Pattern matching on arrays (#478) (681dddf)
  • Static linking of Grain modules (#584) (3d4ac6e)
  • statically link MinGW libraries on Windows (#438) (a154ac3)
  • stdlib: add Stack module (#491) (8310d33)
  • stdlib: Implement Char toString (#481) (37ba683)
  • stdlib: String.implode (#489) (045077b)
  • Support for...
Read more

v0.2.0 - Amaranth

27 Oct 21:05
Compare
Choose a tag to compare

Breaking

  • Introduce new C-style comment syntax. # Example becomes // Example.
  • Remove import * as Foo from "foo" syntax. Instead use import *, Foo from "foo".
  • Change data type syntax to enum for variants and record for record types. Check out https://grain-lang.org to see these syntax updates!
  • Renamed wasm files generated by Grain to .gr.wasm.

New

  • Brand new Number system! Inspired by Racket's number system. Operations can be performed across number types, including rationals.
  • Allow mutable (boxed) values with let mut syntax. This avoids the need to explicit boxing and unboxing in most code!
  • Sourcemap support with a --source-map command line option.
  • Added ++ operator for String concatenation.
  • Support guards for pattern matching - e.g. Some(a) when a < 1.
  • Support pattern matching on constants - e.g. match (a) { 1 => true }.
  • Docker support which can be pulled from https://hub.docker.com/r/grainlang/grain.
  • Many standard library improvements, including Option, Result, Map, Queue, tons of new methods, and cleanup.
  • Exception support, but currently no way to create or catch them yet.
  • Added isnt operator to check if things are not the same memory reference.
  • Support trailing commas in data structures, like list, record, tuple, etc.
  • Add an "LSP mode" to the command line for Grain Language Server.
  • Block comment support - e.g. /* Example */.

Fixes

  • Fixed cross-module type checking bug.
  • Fixed & documented operator precedence.

Initial release

26 Jun 22:06
c1ca91e
Compare
Choose a tag to compare

Grain's first release! 🎉

This release marks the first version of Grain as a proper language.