Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jfecher
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
jfecher
4y ago
The plan is to give users control through the Allocate effect which can be handled in any way desired as long as it returns some memory. It is similar, but easier to use since it is an effect, to zig's approach of "pass the alloca
32.
▲
by
jfecher
4y ago
Rust-style with Vecs+Iterators is the current style, yes. So the map+sum example creates an iterator rather than copying the array. I'd like to remove iterators in favor of Generators (implemented with Algebraic effects) in the future
33.
▲
by
jfecher
4y ago
map2 is indeed another name for zipWith. I believe I got that name from Racket if memory serves. Compared to zipWith I like its symmetry with the 1 argument map. I also wasn't aware of bimap! I can't seem to find a function of tha
34.
▲
by
jfecher
4y ago
Whoops, typo. I'll update the website
35.
▲
by
jfecher
4y ago
Thanks! IMO it is very important effects have an easy syntax to read/understand since they will be both used pervasively and be foreign to most new users. I do have an idea for "traits as types" which would cover static and d
36.
▲
by
jfecher
4y ago
Ah, yes. The carousel has been a source of frustration especially on mobile for designing the website. Perhaps disabling swiping to scroll on the carousel on mobile would help. Or defaulting to use a dropdown to select the example on mobile
37.
▲
by
jfecher
4y ago
I'm not a fan of python (it handles significant whitespace somewhat poorly). Cases like mixed tab-space whitespace and single-line only lambdas are python-specific problems for example. I chose it mainly because I like the style and I
38.
▲
by
jfecher
4y ago
Lifetime inference compiles to destination passing so for most cases a single stack allocation in a prior function can be used. For your example of mutually recursive functions allocating in a loop the destination would be a region that wil
39.
▲
by
jfecher
4y ago
Hello, author here! Closures are implemented with the environment parameter as an extra parameter on a function type. So internally a function `i32 - i32 -> i32` (wonky function type syntax currently with - separating arguments) which us
40.
▲
by
jfecher
4y ago
Author here, to me the lack of a pervasive tracing GC and values not being boxed by default are important for low level languages. That and maintaining the ability to drop down and use low level constructs like raw pointers for optimization
41.
▲
by
jfecher
4y ago
Author here, that is the purpose lifetime inference is meant to serve. It automatically extends lifetimes of `ref`s so that they are long enough. A key advantage of these is avoiding lifetime annotations in code, at the cost of some lack of
42.
▲
by
jfecher
4y ago
It does not! It was meant to be a rather simple example showing what using iterators look like. Perhaps interesting to note that I'll likely be removing iterators in favor of generators which are easier to use. With monomorphisation of
43.
▲
by
jfecher
4y ago
String interpolation works by expanding to the concatenation of several strings. So a string like "the ${foo}." is expanded to "the " ++ foo ++ ".". There are some things I'd like to change about the curre
44.
▲
by
jfecher
4y ago
Author here, a good way to understand algebraic effects is as "resumeable exceptions." In this case the expected_value handler says to run `f ()` and whenever that computation "throws" a `flip ()` effect to handle it by
45.
▲
by
jfecher
4y ago
Hello, author here! As the website says, the compiler itself is still in a very early state where basic things like functions, types, traits, inference, monomorphisation, and codegen are implemented. The fun stuff of algebraic effects, life
46.
▲
by
jfecher
9y ago
That's completely fine, negativity isn't inherently bad in the first place. I have done some work with a garbage collector for an interpreted language I had previously worked on before. It was very basic as far as garbage collec
47.
▲
by
jfecher
9y ago
Hello, author of the language here. You are correct that the project is an early state, I wasn't planning on spreading the word publicly for some time but as long as it was posted here I can answer some questions. You can extend the c
48.
▲
by
jfecher
9y ago
I decided to use it largely because of its proven track record, optimization passes, and its ability to act as a JIT compiler. LLVM is very competitive with other compiler's backends in terms of speed (see clang and gcc), and it is we
49.
▲
by
jfecher
9y ago
The Ante code to generate each portion of llvm-ir is checked as normal but there is no checking done on the llvm-ir that is generated. It is expected for each extension producing ir to generate valid output. That being said, one of the co
50.
▲
by
jfecher
9y ago
Hello, I have been working on this project for a while now and would love to take any questions anyone may have.