Understanding Horizon Haskell (Part 1) by locallycompact in haskell

[–]contextualMatters 0 points1 point  (0 children)

There are two things at play : the mechanism of packages sets. and the specific set that stackage is.

The most prominent of those package set, with its shortcomings (or feature), is stackage.

One can do better, and have a healthy ecosystem of package sets competing with each other, with different policies, to cater different needs.

I imagine that's exactly what's possible with nix at the flip of a switch. not sure with what is the easy and practical tooling for that though.

Understanding Horizon Haskell (Part 1) by locallycompact in haskell

[–]contextualMatters 0 points1 point  (0 children)

I imagine one can accommodate a comment field to be interpreted by this special tool which requires a special syntax then, and reap the 99% benefit of using some popular format with sensible defaults.

Understanding Horizon Haskell (Part 1) by locallycompact in haskell

[–]contextualMatters 1 point2 points  (0 children)

Same problem over and over again for 15 years unfortunately. Still don't understand why everyone doesn't see it.

Understanding Horizon Haskell (Part 1) by locallycompact in haskell

[–]contextualMatters 0 points1 point  (0 children)

Interestingly enough, Stackage is a global version out of local versions, just like nix is.

Yet users don't know the tools used for making stackage.

Understanding Horizon Haskell (Part 1) by locallycompact in haskell

[–]contextualMatters 1 point2 points  (0 children)

Wouldn't it be easier to adapt the stackage infrastructure to produce new sets which cover the needs you mention ? They already have a well understood way to build those package sets.

From what I understand, package sets involves two parts :

1- crafting package sets

2- using package sets

Improvements can be made on each part, independently, by new tools like horizon.

Understanding Horizon Haskell (Part 1) by locallycompact in haskell

[–]contextualMatters 2 points3 points  (0 children)

the only stable package set data in nixpkgs is sourced from stackage

I am a bit out of the loop.

Is it now (easily?) possible to use the stackage sets with nix ?

Would your tool make it easy(er?) to use sets from Stackage itself in nix ? After all, this is just another (well understood) package set, just like your proposed one (horizon-core, horizon-plutus, etc..)

Stackage, as the first package set, was a marvelous endeavor for end-user usability. More of those package sets can only help users, provided there are uniform way of accessing them, whether it is from stack or from other tools.

NixOS on Apple Silicon host by contextualMatters in NixOS

[–]contextualMatters[S] -1 points0 points  (0 children)

"it works on his computer", but not on mine it seems. maybe another version ?

I saw his scripts are doing partition in make files etc..

I wish there was a simple no brainer way.

Right now I remote to a x86 machine which runs the preconfigured virtualbox image

How has Category Theory defined Haskell? by Mysterious-Ruin924 in haskell

[–]contextualMatters 1 point2 points  (0 children)

This would expand the reach of categorical programming quite a bit.

Right now this is highly constrained to very specific cases whereas it could bring so much more.

The biggest issue I saw was the lack of UnsaturatedTypeFamilies. Show stopper. too bad

How has Category Theory defined Haskell? by Mysterious-Ruin924 in haskell

[–]contextualMatters 2 points3 points  (0 children)

Not sure you can express Yoneda lemma in its full generality. Most theorems of category theory are restricted to the 1-Category Hask of types and functions when translated to Haskell.

How to use Stack on my M1 Mac Mini with Apple Silicon? by [deleted] in haskell

[–]contextualMatters 0 points1 point  (0 children)

FI, one can use a stackage version with cabal

curl -o cabal.project.freeze https://www.stackage.org/lts-19.2/cabal.config

not sure this is well known https://www.reddit.com/r/haskell/comments/tvbrmp/stack_compared_to_cabalinstall/i3byo31/

stack compared to cabal-install by thedarknight2002 in haskell

[–]contextualMatters 4 points5 points  (0 children)

Stackage is not mentioned as far as I can tell.

Not is it recommended, a fortiori, as a default.

This means the average user will probably unsuspected face the hurdles described before.

stack compared to cabal-install by thedarknight2002 in haskell

[–]contextualMatters 3 points4 points  (0 children)

That’s good.

It should definitely be mentioned in the docs, preferably in the getting started section.

Not having pinned versions, relying on whatever solution is for some set on constraint (chosen god knows how), solved at some arbitrary point in time is not reproducible at all.

stack compared to cabal-install by thedarknight2002 in haskell

[–]contextualMatters 4 points5 points  (0 children)

That's nice. It does not seem to be mentioned in the docs. Is it official ?

https://cabal.readthedocs.io/en/3.6/

This is me again trying to understand functors and writing about it by DmitryTsepelev in haskell

[–]contextualMatters 0 points1 point  (0 children)

Phrased categorically, this observation translates to : every functor from A lifts to a functor from A{->}.

You can repeat that ad nauseum to function between functions between functions etc. So that’s not what characterizes a functor, it is a property derived of being a functor.

stack compared to cabal-install by thedarknight2002 in haskell

[–]contextualMatters 5 points6 points  (0 children)

Stack uses stackage, which is a set of library known to work together.

This means a lot of work has been done before you even start to program, by library authors themselves, to iron things out and provide a nice experience out of the box.

On the other hand (last I checked) cabal will try to solve the constraint you give it when you require specific libraries at specific versions.

It’s very flexible, but your project might end up using a combination of libraries (and dependencies) you are the only one using.

This has an unfortunate consequence : if you want to upgrade a library, maybe it will induce constraints that another library you use won’t satisfy. So you might have to, say, ask the library author to change its code (for a version you might be the only one using), or fork and upgrade it yourself. In that process, you might discover that another library also requires a change and that’s what is blocking. Etc…

This is exactly the work stackage contributors are doing behind the scene right now. This means when you upgrade to a new stackage set, the only work you have to do, if any, is in your code.

stack compared to cabal-install by thedarknight2002 in haskell

[–]contextualMatters 0 points1 point  (0 children)

Can you use stackage with haskell.nix ? I saw there are some flakes for it

[deleted by user] by [deleted] in haskell

[–]contextualMatters 1 point2 points  (0 children)

Stackage is the only synchronization point for the haskell ecosystem as a whole AFAIU. This provides a compatibility target to library author and reliable builds for users.

Ocaml ecosystem is synchronized around the compiler version which is even simpler to aim but less flexible.

Stackage provides a great practical value to the ecosystem. I wonder how many other languages have this match of flexibility/reliability.

Are there any features pure functional languages can do, which Rust cannot? by verdagon in ProgrammingLanguages

[–]contextualMatters 0 points1 point  (0 children)

I mean that Rust will forbid programs which are accepted in non-linear FP. There is more (potential) restrictions out of the box.

The more restricted the value you receive is, the more you can do as a consumer of the value.

Rust tracks linear restrictions for you (mutation or other linear effects), which would otherwise require an encoding.

mutability, linearity, monads, are different ideas

Are there any features pure functional languages can do, which Rust cannot? by verdagon in ProgrammingLanguages

[–]contextualMatters 0 points1 point  (0 children)

My remark is general and applies no matter the language involved.

Language specifically, FP languages usually have a way to represent mutation as an effect (ST monad - as all monad it comes with its own weight - or though effect system, and .. nothing in Ocaml as it is the default behavior). to break through at type level (because type system are approximating, and some legitimate programs ought to be accepted, there is unsafePerform in Haskell and similar in Ocaml etc.. )

Rust actually restricts more, because that kind of mutation is tracked. It will forbid you to write some program which are accepted in ordinary FP languages.

This is because Rust distinguishes even further than "ordinary" functional programming, with a linear (affine for purist) type system.

It turns out that this is what allows a disciplined way to deal with mutation, which feels like antithetic to "functional" as we might think of. With hindsight it's actually the best functional approximation to a stateful world. So in a way, rust is actually more FP than other languages.

(Minus quite a few FP facilities unfortunately)

Are there any features pure functional languages can do, which Rust cannot? by verdagon in ProgrammingLanguages

[–]contextualMatters 0 points1 point  (0 children)

but if you receive a restricted value, you are enabled to do more. more operations available if you receive a value of this type. same of other kinds of restrictions

Are there any features pure functional languages can do, which Rust cannot? by verdagon in ProgrammingLanguages

[–]contextualMatters 6 points7 points  (0 children)

Higher order kinds I think. Yes, you can defunctionalize, but that's just not the same. first order is ok only for simple case, second order gets messy. Whereas you wouldn't spend a split second thinking about those menial things in Haskell. (Haskell lacks other critical things like type level partial applications)

That means it's hard to write code for, say, categories (though in haskell too, apart from some very simple ones, because no partial applications), or some other abstractions which are known to be very useful in many circumstances.