I'd like to believe this too, but given that medieval peasants and antique slaves worked more or less the same hours as we do I'm quite pessimistic. Whenever we automate something they just come up with a new bullshit…
> And defining a function that will only accept particular variant is nice This is possible to achieve (or hack your way through, if you will) by parameterizing the type and using a nullary type (a type which is…
> so I eventually gave up and just made fish itself my nushell's completion engine That's an interesting idea. Do you have a link to show how you did this?
> BTW I believe `-C` will disable some cache checking, caching is enabled by default You're right, my memory has let me down. > Do you have any pointers for the "load on tab" idea? I didn't turn up any good results in…
I'm shifting towards simply "not having" a home directory. Actual data is stored on other partitions, eg `~/git/project1` => `/git/project1`, `~/Pictures/Wallpapers` => `/data/Pictures/Wallpapers`, etc. The shell can be…
Not fast at all in my experience. Just running (for the first time) what would take seconds with something like `asdf` could take up to half an hour with Nix.
Gnome terminal would also need some unicode handling improvements, its current score in `ucs-detect` rating is D-[0]. [0] https://ucs-detect.readthedocs.io/results.html
This function would use an anonymous record: splitString :: { pattern :: String, string :: String } -> Array String splitString { pattern, string } = ... This function would use positional arguments: splitString ::…
> Because possibly you return the partial assuming it's a number, and try to use it somewhere else, possibly even in another file. Sorry, I must've been more explicit instead of implying certain usage patterns. What I…
I don't really understand the distinction between "multi-arity" and "unary" functions. In my mental model, all functions are unary, it's just that in "traditional", non-FP languages it's more common to pack arguments…
In Gleam it also seems to be done well: https://tour.gleam.run/functions/function-captures/
> After like ten or fifteen hours of trying to understand what currying is, I still have no idea Maybe you could recall which learning materials you used?
Tree-sitter optimizes for performance (to use in editors), not for correctness. In fact even TS' core developers advocate for not bothering too much with correctness of grammars[1]. I imagine this constraint would be a…
> If you have pickRandom<A|B, B|C> x y you would get nested Either's If this wasn't the case, how would the information about what you got be retained? It's either positional, or by a tag/key (row-polymorphic variants),…
> Either<Either<A,B>,A>> doesn't express our intent for a function return or parameter type if we don't care about the position of A, just whether it is an A > so we'd want all nested variations normalized to…
> Because your code might not need to care about the position you insert your A or B This is understandable. But what does it have to do with "collapsing" `a | a` into `a`? Throughout your post I think you're talking…
You can try Kakoune or Helix.
There's also a Chez backend in development for PureScript.
> To be concrete, I am talking about tagged, disjoint union type But you just said "For example `A | B | A` is the same type as `A | B`". How would this be possible for tagged union types? > that does not require naming…
So you're talking about untagged unions? > This is useful as a shorthand when you don't want/need a new type to represent your problem, similar to tuples. Yes this is handled perfectly by the generic sum type, you don't…
fact n = do let n' = n - 1 if n <= 1 then 1 else n * fact n' Here you go. Not sure about Haskell but in PureScript it compiles. Use "<-" for functions which return a value in IO type constructor, otherwise use "let".
> How would you create a non-strong monad in Haskell, and why might you want to, or is it impossible? I think the article implies it clear enough that it's impossible. Even if your monad has nonsensical (but lawful)…
I got curious and decided to google around. I din't find anything from Pike specifically, but my overall impression is that the maintainers simply refuse to see significant value in sum types. They do acknowledge the…
Safe destructuring could be achieved with Church encoding.
Clean also has WASM as the compile target via its IR, and its tooling is great. Unfortunately though I couldn't find any sort of a community when I was looking into it, but other than this the language looks quite…
I'd like to believe this too, but given that medieval peasants and antique slaves worked more or less the same hours as we do I'm quite pessimistic. Whenever we automate something they just come up with a new bullshit…
> And defining a function that will only accept particular variant is nice This is possible to achieve (or hack your way through, if you will) by parameterizing the type and using a nullary type (a type which is…
> so I eventually gave up and just made fish itself my nushell's completion engine That's an interesting idea. Do you have a link to show how you did this?
> BTW I believe `-C` will disable some cache checking, caching is enabled by default You're right, my memory has let me down. > Do you have any pointers for the "load on tab" idea? I didn't turn up any good results in…
I'm shifting towards simply "not having" a home directory. Actual data is stored on other partitions, eg `~/git/project1` => `/git/project1`, `~/Pictures/Wallpapers` => `/data/Pictures/Wallpapers`, etc. The shell can be…
Not fast at all in my experience. Just running (for the first time) what would take seconds with something like `asdf` could take up to half an hour with Nix.
Gnome terminal would also need some unicode handling improvements, its current score in `ucs-detect` rating is D-[0]. [0] https://ucs-detect.readthedocs.io/results.html
This function would use an anonymous record: splitString :: { pattern :: String, string :: String } -> Array String splitString { pattern, string } = ... This function would use positional arguments: splitString ::…
> Because possibly you return the partial assuming it's a number, and try to use it somewhere else, possibly even in another file. Sorry, I must've been more explicit instead of implying certain usage patterns. What I…
I don't really understand the distinction between "multi-arity" and "unary" functions. In my mental model, all functions are unary, it's just that in "traditional", non-FP languages it's more common to pack arguments…
In Gleam it also seems to be done well: https://tour.gleam.run/functions/function-captures/
> After like ten or fifteen hours of trying to understand what currying is, I still have no idea Maybe you could recall which learning materials you used?
Tree-sitter optimizes for performance (to use in editors), not for correctness. In fact even TS' core developers advocate for not bothering too much with correctness of grammars[1]. I imagine this constraint would be a…
> If you have pickRandom<A|B, B|C> x y you would get nested Either's If this wasn't the case, how would the information about what you got be retained? It's either positional, or by a tag/key (row-polymorphic variants),…
> Either<Either<A,B>,A>> doesn't express our intent for a function return or parameter type if we don't care about the position of A, just whether it is an A > so we'd want all nested variations normalized to…
> Because your code might not need to care about the position you insert your A or B This is understandable. But what does it have to do with "collapsing" `a | a` into `a`? Throughout your post I think you're talking…
You can try Kakoune or Helix.
There's also a Chez backend in development for PureScript.
> To be concrete, I am talking about tagged, disjoint union type But you just said "For example `A | B | A` is the same type as `A | B`". How would this be possible for tagged union types? > that does not require naming…
So you're talking about untagged unions? > This is useful as a shorthand when you don't want/need a new type to represent your problem, similar to tuples. Yes this is handled perfectly by the generic sum type, you don't…
fact n = do let n' = n - 1 if n <= 1 then 1 else n * fact n' Here you go. Not sure about Haskell but in PureScript it compiles. Use "<-" for functions which return a value in IO type constructor, otherwise use "let".
> How would you create a non-strong monad in Haskell, and why might you want to, or is it impossible? I think the article implies it clear enough that it's impossible. Even if your monad has nonsensical (but lawful)…
I got curious and decided to google around. I din't find anything from Pike specifically, but my overall impression is that the maintainers simply refuse to see significant value in sum types. They do acknowledge the…
Safe destructuring could be achieved with Church encoding.
Clean also has WASM as the compile target via its IR, and its tooling is great. Unfortunately though I couldn't find any sort of a community when I was looking into it, but other than this the language looks quite…