mangoiv, to random
@mangoiv@functional.cafe avatar

The Haskell :transHaskell: foundation is searching for a new Executive Director after the departure of David Thrane Christiansen.

https://haskell.foundation/careers/executive-director.html

kosmikus, to random
@kosmikus@functional.cafe avatar

Exceptions, especially asynchronous exceptions, can be tricky to reason about. That's why Edsko and I are going to talk about the bracket and generalBracket functions in today's 10th episode of the Unfolder! Join us live on YouTube, 2023-08-30 at 1830 UTC (or watch the recording later).

https://www.youtube.com/watch?v=_PlSAWOYgbE&list=PLD8gywOEY4HaG5VSrKVnHxCptlJv2GAn7&index=10

Gert, to random
@Gert@mastodon.world avatar

Loving this book. Explanations are very clear, exercises make you think. #haskell #book Had the itch to dive into Haskell again, it’s been 13 years or so. Can’t hurt starting from the beginning again.

dpwiz, to random
@dpwiz@qoto.org avatar

I should write a huge text about how is a great language and is getting better all the time.
Just to dilute the stream of negativity constantly appearing on feeds.

Maybe you should too.

dpwiz, to random
@dpwiz@qoto.org avatar

Gosh, I sometimes hate that the LSPs are a thing now. People really like to dunk on and its “toolchain” for LSP deficiencies.

Come on, people, this stuff is barely mature by itself.

And you really can do without it.

kosmikus, to random
@kosmikus@functional.cafe avatar

The Interlude episode with Ranjit Jhala is now published: https://haskell.foundation/podcast/32/

nomeata, to random
@nomeata@mastodon.online avatar

The HaskelI Interlude just published a nice interview of Ranjit Rhala by Andres Löh and Matthías Páll Gissurarson:
https://haskell.foundation/podcast/32

sanityinc, to random
@sanityinc@hachyderm.io avatar

This article very much echoes my own position on these days. From what I can tell after a number of years in the space, many practical Haskell-in-industry folks are gradually dispersing to other language communities. https://journal.infinitenegativeutility.com/leaving-haskell-behind

ocramz,
@ocramz@sigmoid.social avatar

@sanityinc strange to write a whole love letter to the language and concluding that others too should refrain from using it.

the language everyone loves to h8 on. 🤷‍♂️

marhop, to random
@marhop@digipres.club avatar

Thank you @suppi for writing https://lhbg-book.link/ - a great practical introduction to with everything you need to know to get started with real-world projects! Really enjoyed reading it and wish I had found this earlier. 👍

robinp, to random Hungarian
@robinp@mastodon.social avatar

I often see in #Haskell codebases foo $ bar $ baz $ 5. Let's put it aside that I mostly agree with https://www.haskellforall.com/2015/09/how-to-make-your-haskell-code-more.html suggestion on foo (bar (baz 5)) and try to stick it whenever I can. But for the original, I always found foo . bar . baz $ 5 easier to read, and easier to refactor (just copy the dotty part to a helper). Don't be so $-oriented ;)

jaror,
@jaror@kbin.social avatar

@robinp One thing that you can more easily do with foo $ bar $ baz 5 is make it strict: foo $! bar $! baz 5.

jaror, (edited ) to haskell
@jaror@kbin.social avatar

Brzozowski derivatives are neat, but good old denotational semantics of regular expressions can be very elegant too:

data RE = Empty | Eps | Ch Char | App RE RE | Alt RE RE | Star RE

foldRE :: p -> p -> (Char -> p) -> (p -> p -> p) -> (p -> p -> p) -> (p -> p) -> RE -> p
foldRE emp eps ch app alt star = go where
  go = case
    Empty -> emp
    Eps -> eps
    Ch c -> ch c
    App p q -> app (go p) (go q)
    Alt p q -> alt (go p) (go q)
    Star p -> star (go p)

recognise :: RE -> String -> [String]
recognise =
  foldRE (pure empty) pure (c -> case x : xs | c == x -> [xs]; _ -> [])
    (>=>) (liftA2 (<|>)) (p -> fix (t -> liftA2 (<|>) pure (p >=> t)))

jaror,
@jaror@kbin.social avatar

@mangoiv perhaps it is slightly easier to read like this?

data RE = Empty | Eps | Ch Char | App RE RE | Alt RE RE | Star RE

data REalg a = REalg
  { emp :: a
  , eps :: a
  , ch :: Char -> a
  , app :: a -> a -> a
  , alt :: a -> a -> a
  , star :: a -> a
  }

foldRE :: REalg a -> RE -> a
foldRE alg = go where
  go = case
    Empty -> emp alg
    Eps -> eps alg
    Ch c -> ch alg c
    App p q -> app alg (go p) (go q)
    Alt p q -> alt alg (go p) (go q)
    Star p -> star alg (go p)

recognise :: RE -> StateT String [] ()
recognise = foldRE REalg
  { emp = empty
  , eps = pure ()
  , ch = c -> StateT (case x : xs | c == x -> [((), xs)]; _ -> [])
  , app = (*>)
  , alt = (<|>)
  , star = p -> fix (t -> p *> t <|> pure ())
  }

mangoiv,
@mangoiv@functional.cafe avatar

@jaror oh yeah much better. Lovely, thanks ;)

nixos_org, to random
@nixos_org@chaos.social avatar

The Nixpkgs Haskell team is seeking assistance from users to address malfunctioning Haskell packages https://discourse.nixos.org/t/bump-haskellpackages-to-ghc-9-4-lts-21-in-nixpkgs/30146

alios, to random
@alios@chaos.social avatar

I've written a small introductory article on the Alternative type class in

https://serokell.io/blog/whats-that-typeclass-alternative

hrefna, to random
@hrefna@hachyderm.io avatar

I really end up frustrated by both extremes of operator overloading in languages and language cultures.

Both the Java approach of "NEVER OVERLOAD THE OPERATORS" as well as the approach favored in and of NO GODS NO MASTERS OPERATOR OVERLOADING FOR ALL.

jaror,
@jaror@kbin.social avatar

@hrefna what I like about 's "operator overloading" (type classes) is that it is customary to group operators together and give them laws which give them a coherent meaning across all instances. So you can't just abuse + for list concatenation.

lupyuen, to random
@lupyuen@qoto.org avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • Ask_kbincafe
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines