grain icon indicating copy to clipboard operation
grain copied to clipboard

The Grain compiler toolchain and CLI. Home of the modern web staple. 🌾

Results 236 grain issues
Sort by recently updated
recently updated
newest added

This pr updates the compiler walkthrough docs as they have gotten quite out of date, I think there are quite a few places where more detail could be added but...

documentation

Currently `toString` in the `runtime/string` module rely's on `concat` for building the output string, this often incurs a performance penality from the many allocations done especially with more complex data...

runtime

Our bitwise operators work on all integral types (simple ints, Int64) in Grain. At the moment, they are implemented by converting the numbers to i64s, doing the operation, and converting...

investigation

In the stdlib, there are some methods (such as `List.insert`, `List.take`, `List.drop`, etc) that fail upon receiving a negative number. This is different than the behavior of something like `String.slice`,...

question
stdlib

In python there is the [input](https://docs.python.org/3/library/functions.html#input) function which makes reading inputs syncronously from the command line super easy. This helps to position python in an especially useful place for learning...

enhancement
stdlib
blocked

It would be really nice from a code perspective if we could do something like `arr[1l]` or `arr[1ul]`. This would require allowing us to override the array get syntax which...

enhancement

Fixes #2110. I didn't compile nor test this change.

The method [`Set.intersect`](https://github.com/grain-lang/grain/blob/fc19761e9f7e6c3d1cb54a308de721b17d25e12e/stdlib/set.gr#L441) is implemented as: ``` provide let intersect = (set1, set2) => { let set = make() forEach(key => { if (contains(key, set2)) { add(key, set) } },...

When the compiler is compiled to JavaScript, large lists/arrays can experience stack overflows in various parts of the compiler.

compiler

Hey there! This is my first contribution to the Grain project so I wanted to start with something easy to write, debug and review. This module is just a collection...