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…
It is well known that Binance, among many other crimes, runs many internal trading desks which trade against Binance's own customers.
> 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…
> much faster than zsh script completions I'm curious where did you get that from. Edit: I read the note in your dotfiles repo. Yes calling `compinit` on each shell invocation is going to be really slow. That's not how…
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…
> What if you forget, not in quotes, to give the second argument? I will get a type error and it will take me 2-3 seconds to figure out what it is about. > Why on earth would you want to get a type error in a completely…
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…
So basically the idea here is that you want to have TS-style untagged unions, but instead they're also tagged, but still unify and compose the way they do in TS? Then why couldn't you just do `{ tag: A, data: … } | {…
> 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.
> because Either<A, Either<A, B>> cannot type check as Either<A, B> Why would you want the former to type check as the latter? Where do you see the complexity?
> 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…
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…
It is well known that Binance, among many other crimes, runs many internal trading desks which trade against Binance's own customers.
> 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…
> much faster than zsh script completions I'm curious where did you get that from. Edit: I read the note in your dotfiles repo. Yes calling `compinit` on each shell invocation is going to be really slow. That's not how…
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…
> What if you forget, not in quotes, to give the second argument? I will get a type error and it will take me 2-3 seconds to figure out what it is about. > Why on earth would you want to get a type error in a completely…
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…
So basically the idea here is that you want to have TS-style untagged unions, but instead they're also tagged, but still unify and compose the way they do in TS? Then why couldn't you just do `{ tag: A, data: … } | {…
> 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.
> because Either<A, Either<A, B>> cannot type check as Either<A, B> Why would you want the former to type check as the latter? Where do you see the complexity?
> 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…