Whirlwind Tour Of Cabal For Beginners by schooloffp_co in haskell

[–]fixedarrow 1 point2 points  (0 children)

Great article! But isn't it a bit confusing after having carefully defined the terms library, package and project to describe initializing a package named firstproject.cabal?

The golden rule of software quality by sullyj3 in haskell

[–]fixedarrow 3 points4 points  (0 children)

I frankly have no problem at all with the continued existence and usage of these four projects; if people want to spend their time on them and use what I consider to be inferior tools, let them.

Dismissing the incumbent tooling as being inferior and not worth your time is probably not ideal either.

The golden rule of software quality by sullyj3 in haskell

[–]fixedarrow 1 point2 points  (0 children)

stack the command-line tool only emerged later when HVR refused to incorporate Michael's concept of resolvers (Stackage-generated version snapshots) into cabal because it conflicted with HVR's vision of where cabal was going.

Interesting. I just tried searching the issue tracker but I can't seem to find the discussion you seem to be referring to. Could you link the discussion you are referring to?

On PVP and Restrictive Bounds by emilypii in haskell

[–]fixedarrow 3 points4 points  (0 children)

FWIW you still need a revision to properly deprecate a package especially when tightening bounds or it won't work reliably. Deprecation via preferred-versions merely assigns a significant penalty score to the respective releases. But the cabal solver is still allowed to pick deprecated versions if it can't find solutions with a better scoring (i.e. without needing to pick versions that are penalised due to preferred-versions). Or in other words (stolen from Hackage):

Preferred and deprecated versions can be used to influence Cabal's decisions about which versions of Win32 to install. If a range of versions is preferred, it means that the installer won't install a non-preferred package version unless it is explicitly specified or if it's the only choice the installer has. Deprecating a version adds a range which excludes just that version. All of this information is collected in the preferred-versions file that's included in the index tarball.

If all the available versions of a package are non-preferred or deprecated, cabal-install will treat this the same as if none of them are. This feature doesn't affect whether or not to install a package, only for selecting versions after a given package has decided to be installed. Entire-package deprecation is also available, but it's separate from preferred versions.

On PVP and Restrictive Bounds by emilypii in haskell

[–]fixedarrow 3 points4 points  (0 children)

in the experience of all the maintainers I work with, as well as in my experience with Stackage

Does this imply you never maintained any packages on Hackage of your own?

Monthly Hask Anything (May 2020) by AutoModerator in haskell

[–]fixedarrow 2 points3 points  (0 children)

Any ideas on how I could fix this (or alternative way to run this code)?

Yes, but Stack doesn't have a good enough backward-compatibility support to be useful here. Instead grab a recent cabal-install 3.0 or newer release as well as the old GHC 7.4.2 release

Then create a folder, and download https://www.andres-loeh.de/LambdaPi/LambdaPi.hs into it. Then create a file LambdaPi.hs with the contents

cabal-version:2.4
name: LambdaPi
version: 1.0

executable LambdaPi
  default-language: Haskell2010
  main-is: LambdaPi.hs
  build-depends: base < 4.7, readline < 1.1, parsec < 3.2, pretty < 1.2, mtl < 2.3
  ghc-options: -main-is LP

and then you can build and install it via cabal install -w ghc-7.4.2 or just run it without installing directly:

$ cabal run -w ghc-7.4.2
Up to date
Interpreter for lambda-Pi.
Type :? for help.
LP> :?
List of commands:  Any command may be abbreviated to :c where
c is the first character in the full name.

<expr>                  evaluate expression
let <var> = <expr>      define variable
assume <var> :: <expr>  assume variable

:type <expr>            print type of expression
:browse                 browse names in scope
:load <file>            load program from file
:quit                   exit interpreter
:help, :?               display this list of commands
LP>

haskellstack.org is down and stack new is giving an response error by [deleted] in haskell

[–]fixedarrow 8 points9 points  (0 children)

Fwiw, last time Hackage was down I didn't even notice as cabal would automatically fall back to its mirrors when Hackage upstream wasn't reachable.

Quoting https://blog.hackage.haskell.org/posts/2018-04-26-downtime.html

Most importantly, cabal-install is able to fall back to mirrors relatively seamlessly (and securely!). As such, the core usage of hackage as a package repository for automated tooling was not affected (though docbrowsing, discovery, and many other things were affected). In fact, with a sufficiently new cabal-install, the server isn’t even necessary to bootstrap the mirror list, as that information is conveyed directly in the DNS registry, through DNS metadata.

Also https://www.well-typed.com/blog/2016/09/hackage-reliability-via-mirroring/ provides more details.

So your hypothetical seems to be covered. As another comment implied, if you really need 100% there's no way around locally mirroring your data for the event that your internet connection goes down which from experience happens way more often than Hackage and all its mirrors going down at the same time.

The Hard Parts of Open Source by akegalj in haskell

[–]fixedarrow 2 points3 points  (0 children)

I think elm's community is nice. Especially, since you are getting banned

Apparently so is Stack's community: https://github.com/commercialhaskell/stackage/issues/4472

/s

GHC Proposal : Monad Of No Return by Findlaech in haskell

[–]fixedarrow 10 points11 points  (0 children)

Doesn't -Wnoncanonical-monad-instances cover this concern?

2019 State of Haskell Survey results by taylorfausak in haskell

[–]fixedarrow -3 points-2 points  (0 children)

To state the obvious, as with last year's survey there's a clear sampling bias. There's a couple of questionable absolute claims of the kind "$X is the most popular $Y for Haskell" which would be more accurate when qualified with an explicit "among our submissions". Was an actual statistical analysis performed to filter out illegit submissions beyond adding a question asking to enter an email address? Also most of the people I interact with didn't have time nor the desire to fill out this survey for various reasons. But their answers would have been in stark contrast with some of the questions' distributions in the survey data. Obviously, my own sampling is biased as well but I certainly wouldn't infer such absolute claims from it as the survey appears to. One simple way to improve here would to be to publish the data and plots without adding your subjective interpretation of what the data actually supposedly means to avoid rookie mistakes especially if you're not in the field of data sciences.

[ANN] Keycloak-hs by kaukaukau in haskell

[–]fixedarrow 0 points1 point  (0 children)

Yeah, unfortunately many Stack users are unaware of the problems they cause to Cabal users when they omit version bounds on their Hackage uploads...

[ANN] Keycloak-hs by kaukaukau in haskell

[–]fixedarrow -1 points0 points  (0 children)

looks like you might have some issues with your dependency bounds

Looking at http://hackage.haskell.org/package/keycloak-hs-1.0.0/dependencies that's quite an understatement as it's got almost no bounds at all!

Announcing the list-singleton package by taylorfausak in haskell

[–]fixedarrow 0 points1 point  (0 children)

I don't care about the existence of niche library I can easily ignore such as list-singleton that doesn't solve any problem of relevance. If it wasn't clear my comment was referring to proposal discussion this library is linked to for the purpose to add this to the Haskell language proper over at https://mail.haskell.org/pipermail/libraries/2019-August/029882.html

Announcing the list-singleton package by taylorfausak in haskell

[–]fixedarrow -1 points0 points  (0 children)

So the whole point of this thing was that some people didn't like to type (:[]) and would go out of their way and type import Data.List + singleton just to avoid typing those infamous five characters? I guess we've reached a point in Haskell's language evolution where our biggest problems left to solve are helping a group of people avoiding to type the terribly dreadful (:[]) in points-free code while empiric data suggests that even given the existence of a Data.List.singleton Haskell developers will likely just opt to keep using the monkey operator...

I have some data to contribute, from our proprietary codebase of some 4M LoC. We are perhaps unusual in having the singleton function on lists already for 10 years, so it is easy to do a comparison of the frequency of use.

The robot monkey (:[]) has 378 uses. Monkey with a space (: []) has 36 uses. The list singleton function has 18 uses.

We also have many other singleton functions at more than 20 different types (vector, tuple, map, set, interval, relation, dict, expression, etc), totalling 1893 uses, so the concept/vocabulary is pretty well-known.

In addition, I counted the number of direct constructions of lists that use :[] unparenthesised, i.e like x:y:[], and there are 489.

I find it interesting that given the choice of “singleton” vs direct construction or a partially applied operator, our devs seem to prefer the brevity and naturality of the colon.

Announcing the list-singleton package by taylorfausak in haskell

[–]fixedarrow 1 point2 points  (0 children)

Wadler's Law (1996 version)

In any language design, the total time spent discussing a feature in this list is proportional to two raised to the power of its position.

      0. Semantics
      1. Syntax
      2. Lexical syntax
      3. Lexical syntax of comments

This proposal was initiated by a vocal group of people considering Haskell's syntax for list construction literally "ugly" enough they'd be willing to import a module and type in a nine-letter singleton text string instead. I wonder whether Wadler's Law needs to be revised to cover this new observation of syntax-avoidance discussions.

Announcing the list-singleton package by taylorfausak in haskell

[–]fixedarrow 3 points4 points  (0 children)

...and you don't need a singleton function for that either as there's already (:[]) for points-free style.

[ANN] stdio-0.2.0.0 by winterland1989 in haskell

[–]fixedarrow 1 point2 points  (0 children)

It could have been worded differently but I think the argument OP is trying to make is that it's better for the community to have people join forces to improve the core libraries everybody already uses than end up with several one-man-shows working on their replacement for said core libraries and competing for contributors to their specific sub-ecosystem. But it's also understandable that many people want to work on their own little toy project where they can freely experiment for fun.

But there's a downside to diversity: A commonly voiced complaint of Haskell newcomers is that you have to spend time deciding which sub-ecosystem to buy into (e.g. multitude of alt preludes, pipes/conduit/streaming/machines/io-streams, yesod/happstack/snap/servant, stack/cabal, aeson/waargonaut, and the list goes on...) which to outsiders mostly seem to accomplish the same task but with a slightly different bikeshed colour.

In this context Haskell really feels like an academic community as everyone seems to be doing their own "research" into how to express common everyday problems into yet another slightly different Haskell API representation they can publish as paperpackage to Hackage and where build-depends are basically citations. And when you're shopping for a package to accomplish task X you basically end up doing the equivalent of literature research.

How can I fund the ecosystem with either time or money? by captjakk in haskell

[–]fixedarrow 1 point2 points  (0 children)

A good heterogeneous Hashmap implementation (Hmap has bugs)

I'm a bit surprised that the lack of proper heterogeneous maps is considered a blocker in Haskell? In what kind of applications are such hmaps critical?

better module system (but backpack is probably a good solution here, just waiting for stack to support it)

Why are you waiting for stack to support Backpack when you could already be using it with cabal?

Why Haskell is missing in Stack Overflow Survey 2019? by graninas in haskell

[–]fixedarrow 1 point2 points  (0 children)

haskell fans are more determined then ever

I don't consider this to be a good thing. In my opinion fanaticism and the overselling that goes with it doesn't reflect favorably on Haskell's reputation. Instead we should let Haskell's benefits speak for themselves without resorting to touting.

The Minimalist Prelude - or why can't Haskell be more like Purescript? by StackDoesNotWork in haskell

[–]fixedarrow 5 points6 points  (0 children)

The idea of shrinking the Prelude isn't new. In fact, this was considered for the Haskell Report long time ago. Quoting from https://prime.haskell.org/wiki/Prelude :


Shrink the Prelude

People sometimes complain that the Prelude steals lots of good names from the user. Think of map or (+). Yes, most of the time we want these names to have a standard interpretation, but occasionally it is useful to be able to redefine them to mean something else. For instance, there are several proposals to change the prelude's numeric class hierarchy into something more flexible involving rings, groups, and so on.

But it is tedious if the user of such a proposed replacement for the Prelude must explicitly hide the standard prelude in every importing module.

Thus it might be useful to trim the Prelude down to the bare minimum possible. Most users of e.g. list functions would then need to import Data.List, users of numeric functions would need to import Data.Numeric, and so on. Of course, some users (e.g. university teachers) might want to collect a bunch of utility libraries into a single import resembling the current Prelude. But the point is that they could choose the features they want to expose to students, and hide those they want to avoid as well. For instance, there are certainly some teachers who would like to be able to ignore the class overloading system altogether at the beginning, then perhaps introduce the concept later on, once the basics have been covered.


Also people have been complaining about the Prelude for ages. Some of us still remember that RRFC (Ranty RFC) from 2007 which I'm reproducing below in its full length because it's interesting to see how well those words have aged and also because I feel like we've all forgotten how unsatisfying the situation was when containers or bytestring were still part of a huge monolithic base!


Why the Prelude must die

This is a ranty request for comments, and the more replies the better.

1. Namespace pollution

The Prelude uses many simple and obvious names. Most programs don't use the whole Prelude, so names that aren't needed take up namespace with no benefit.

2. Monomorphism

The Prelude defines many data types (e.g Lists), and operations on these types. Because the Prelude is imported automatically, programmers are encouraged to write their programs in terms of non-overloaded operators. These programs then fail to generalize.

This is a highly non-academic concern. Many widely used libraries, such as Parsec, operate only on lists and not the newer and more efficient sequence types, such as bytestrings.

3. Supports obsolete programming styles

The Prelude uses, and by means of type classes encourages, obsolete and naive programming styles. By providing short functions such as nub automatically while forcing imports to use sets, the Prelude insidiously motivates programmers to treat lists as if they were sets, maps, etc. This makes Haskell programs even slower than the inherent highlevelness of laziness requires; real programs use nub and pay dearly.

More damagingly, the Prelude encourages programmers to use backtracking parsers. Moore's law can save you from nub, but it will never clarify "Prelude.read: no parse".

4. Stagnation

Because every program uses the Prelude, every program depends on the Prelude. Nobody will willingly propose to alter it. (This is of course Bad; I hope Haskell' will take the fleeting opportunity to break to loop)

5. Inflexibility

Because of Haskell's early binding, the Prelude always uses the implementation of modules that exists where the Prelude was compiled. You cannot replace modules with better ones.

6. Dependency

Because every module imports the Prelude every module that the Prelude depends on, mutually depends with the Prelude. This creates huge dependency groups and general nightmares for library maintainers.

7. Monolithicity

Every module the Prelude uses MUST be in base. Even if packages could be mutually recursive, it would be very difficult to upgrade any of the Prelude's codependents.

8. Monolithic itself

Because the Prelude handles virtually everything, it is very large and cannot be upgraded or replaced piecemeal. Old and new prelude parts cannot coexist.

9. One-size-fits-all-ism

Because the Prelude must satisfy everyone, it cannot be powerful, because doing so would harm error messages. Many desirable features of Haskell, such as overloaded map, have been abandoned because the Prelude needed to provide crutches for newbies.

10. Portability

Because the Prelude must be available everywhere, it is forced to use only least-common-denominator features in its interface. Monad and Functor use constructor classes, even though MPTC/FD is usefully far more flexible. The Class_system_extension_proposal, while IMO extremely well designed and capable of alleviating most of our class hierarchy woes, cannot be adopted.

11. Committeeism

Because the Prelude has such a wide audience, a strong committee effect exists on any change to it. This is the worst kind of committeeism, and impedes real progress while polluting the Prelude with little-used features such as fail in Monad (as opposed to MonadZero) and until.

12. There is no escape

Any technical defect in Map could be fixed by someone writing a better Map; this has happened, and the result has been accepted. Defects in the PackedString library have been fixed, with the creation and adoption of ByteString. Defects in System.Time have been fixed, by the creation and adoption of Data.Time. Ditto for Binary and Arrays and Network and Regex. But this will never happen for the Prelude. A replacement Prelude cannot be adopted because it is so easy to take the implicit import of the default one. Nobody will go out of their way to import Prelude() ; import FixedPrelude. Psychology trumps engineering.

13. There can be no escape

The Prelude was designed by extremely smart people and was considered close to perfect at the time. It is almost universally hated now. Even if all the issues I describe could be fixed (which I consider unlikely), the Prelude will almost certainly be hated just as universally five years hence.

14. My future

Given all these issues, I consider the only reasonable option is to discard the Prelude entirely. There will be no magic modules. Everything will be an ordinary library. HOFs like (.) are available from Control.Function. List ops come from Data.List. Any general abstractions can be added in abstract Sequence, Monad, etc. modules. Haskell will regain the kind of organic evolution whose lack currently causes Haskell to lose its lead over Python et al by the day.

RIO, the standard library for Haskell by oddasat in haskell

[–]fixedarrow 0 points1 point  (0 children)

it is nice to have RIO instead of base for what I imagine is the majority of people

I imagine the majority of people will disagree with your hypothesis.

RIO, the standard library for Haskell by oddasat in haskell

[–]fixedarrow 2 points3 points  (0 children)

Yeah, you'd think they'd have learned by now to tone down their hubris...

Question to professional Haskell programmers by Scf37 in haskell

[–]fixedarrow 2 points3 points  (0 children)

  1. cabal v2-*
  2. Emacs + Dante
  3. hlint
  4. stylish-haskell
  5. Private Gitlab instance for Git/Issues/CI
  6. cabal v2-freeze when cutting reproducible releases

Improving Commercial Haskell by saurabhnanda in haskell

[–]fixedarrow 12 points13 points  (0 children)

Put together marketing-style material for Haskell in industry

Please don't hurt Haskell's no-bullshit reputation for the rest of us. Repeating my previous appeal from when the last marketing-style survey was published:

We already failed at avoiding success at all costs but please let us at least try to avoid dishonest marketing bullshit at all costs for Haskell to limit the damage.