someodd, Please share with me your wisdom on packaging and distributing software made with #Haskell.
DiazCarrete, When building #haskell Servant applications with persistence, a common (?) pattern is to request a database connection from a pool in the callback we pass to "hoistServer" https://hackage.haskell.org/package/servant-server-0.20/docs/Servant-Server.html#v:hoistServer and then pass the connection down to the handler using ReaderT https://github.com/danidiaz/comments-project/blob/3bb720124b31f0a8e351751bdcc6651ed75d9e27/comments/lib/Comments/Runner.hs#L57
It works, but I'm kinda unhappy about it because it forces you to use ReaderT in those intermediate components that lie between the top-level handler and the repository component which actually uses the connection. 😕
DiazCarrete, You might say "Well, that's not a problem, just make those intermediate components that don't care about the connection polymorphic over MonadUnliftIO! Later, when composing the application, they will be injected a repository that does know about the ReaderT and the connection. Problem solved."
That's true, but what if I wanted those intermediate components to be as dumb as possible? Just plain records of functions in IO, no monad transformers, and no polymorphism over the monad, either?
DiazCarrete, (edited ) "I got rid of
ReaderT
and now my application is hanging by a thread"
https://discourse.haskell.org/t/i-got-rid-of-readert-and-now-my-application-is-hanging-by-a-thread/9330
leanpub, Finding Success (and Failure) in Haskell by Type Classes is on sale on Leanpub! Its suggested price is $35.00; get it for $12.50 with this coupon: https://leanpub.com/sh/4sG8LBPo #Haskell
kosmikus, At Well-Typed, we are currently looking for a new #Haskell developer (possibly more) to join our team: https://well-typed.com/blog/2024/04/haskell-development-job-with-well-typed/
nmeum, Here is a preprint of fun paper that I've been working on which investigates the utilization of formal descriptions of instruction semantics to perform symbolic binary-level program analysis: https://doi.org/10.48550/arXiv.2404.04132
It includes a prototype implementation in Haskell which performs symbolic execution of RISC-V binary code without requiring the transformation to an intermediate representation (like LLVM IR).
nmeum, This paper also includes an empirical comparison with prior work which I attempted to design in a reproducible way by using #Guix for the evaluation artifacts: https://doi.org/10.5281/zenodo.10925791
nmeum, The latest and greatest GHC version (9.8.2) is now available in the Alpine Linux Edge repositories and will be included in the upcoming 3.20 stable release.
DiazCarrete, Rel8 is a #Haskell library that teeters between "looking at the instances provides much useful information" and "looking at the instances causes psychic damage".
https://hackage.haskell.org/package/rel8-1.5.0.0/docs/Rel8.html#t:Table
DiazCarrete, Relatedly, it would be a nice feature for Haddock if the instances local to a module could be sorted and grouped for the purposes of documentation and telling a story.
Like "These are the instances for tuples of various sizes" or "this is the base case and these are some instances that recurse".
DiazCarrete, How to check from the REPL that a given constraint is satisfied?
https://stackoverflow.com/questions/78284550/how-to-check-from-the-repl-that-a-given-constraint-is-satisfied
someodd, Is there any future in languages like #haskell where AI makes code a factor of small frequently and easily replaced glue and scraps, where whatever is most trained on and most hackable, most easily replaced/iterable is king?
Are big pieces of software that benefit from the architectural assurances Haskell brings a dead paradigm?
AI is here to stay and I feel if something was not already in or out of orbit, it may never reach escape velocity
haskell_foundation, effectfully describes #Haskell as a beautiful and amazing language. In episode 46 of #TheHaskellInterlude, Wouter Swierstra and Joachim Breitner asked effectfully about how he found a new passion for programming. Listen to the episode here: https://haskell.foundation/podcast/46/
DiazCarrete,
DiazCarrete, I have wondered about this myself:
(24:30) https://youtu.be/fFCcvsbCrH8?t=1468
"registry"-like approaches do seem to make it easier to reuse previously assembled application contexts because the wiring is done through a dictionary-like data structure. You can easily overwrite any key with a different implementation, or with a mock.
Relatedly, they also seem to make it easier to draw diagrams of component dependencies:
https://hackage.haskell.org/package/registry-0.6.1.0/docs/Data-Registry-Dot.html
https://github.com/danidiaz/cauldron/blob/700dafb64ed932eee8b66356e35196c586d7e24c/lib/Cauldron.hs#L123
jaror, @DiazCarrete That slide seems to misrepresent effect systems. It is easy to replace just
runInputConst
:runAllEffects (runInputDifferently program)
The
runInputDifferently
effect handles theInput Config
effect and it leaves an unusedInput Config
in the list of effects. So therunInputConst config
handler inrunAllEffects
will not be used.
Issue 414 :: Haskell Weekly newsletter (haskellweekly.news)
News about the Haskell programming language from 2024-04-04.
someodd, Could I get some love, please?
I feel I'm developing lots of software in #haskell for #gopher and cool things.
A showcase of some of my projects: https://www.someodd.com/showcase
My GitHub (please follow, star): https://github.com/someodd
someodd, @jaror I edited the link in the original toot or whatever. Is it not updated for you? Thank you for your help.
jaror, @someodd Yeah, I think kbin.social doesn't federate edits yet.
Haskell Interlude 46: effectfully (haskell.foundation)
Roman, known better online as effectfully, is interviewed by Wouter and Joachim. On his path to becoming a Plutus language developer at IOG, he learned English to read Software Foundations, has encountered many spaceleaks, and used Haskell to prevent robots from killing people.
DiazCarrete,
dneaves, Types in a programming language are important.
Compatible types across programming languages are also important.
What if you could easily make universal types across the languages in your stack, at the same time?
That's what I'm hoping to achieve with DataTypeTool. Still a very early product, but we're getting there. Currently producing valid (albeit not-yet-serializable) #elmlang #haskell and #gleam
BoydStephenSmithJr, @dneaves Any plans for how to support dependent types? TDD with Idris contains some practical uses for such types.
haskell, #Haskell users! Get ready for the next major cabal version by installing the nightly build with ghcup:
ghcup install cabal --force -u https://github.com/haskell/cabal/releases/download/cabal-head/cabal-head-Linux-static-x86_64.tar.gz head
macOS users can use https://github.com/haskell/cabal/releases/download/cabal-head/cabal-head-macOS-x86_64.tar.gz and Windows users can use https://github.com/haskell/cabal/releases/download/cabal-head/cabal-head-Windows-x86_64.tar.gz
haskell, You can always try out #haskell snippets on https://play.haskell.org! Many libraries, like aeson, containers, vector, effectful, text and text-builder-linear, are readily available!
mangoiv, (edited ) Is it just me or is this whole thing about „don’t do X if you don’t really know what you’re doing“ really counter productive? Many people live in fear of X now and don’t start thinking if X is an actual problem or learn what the problems are that could rise from X.
I see this very often in the #haskell ecosystem where the solution to doing X properly is often learnt in a few minutes investigation.
jaror, @mangoiv I know I've said that a few times. Two examples I can think of:
AllowAmbiguousTypes
, GHC suggests this but you should probably just use Proxy arguments instead.Typeable
, people coming from OOP languages often want atypeof
function, but 99% of the time there is a better way to structure your programs using simple ADTs.I still think these are not learnt in a few minutes. Even if that was the case, the most important thing you should learn is that you shouldn't use them very often.
mangoiv, @jaror then perhaps it’d be nicer to tell them that, I think that’d be much nicer. I think there’s nuance to it.
maralorn, POV: Everytime I am starting a new #Haskell app.
"Okay, let's just write a quick minimally featured proof of concept. So that I have something to build on. I can alwaye refactor this later."
...
10h later
"Wait, I just need to read this one more blog post so that I can complete my pro and con list about the 7 effect systems in question."
nikhil, Do Not Enter, Ye Imperators! Submit to The Monad, the One Way! #Haskell
BoydStephenSmithJr, data SignsT m a {-# LANGUAGE EmptyDataDecls #-}
instance Monad (SignsT m) where
pure _ = error "DO NOT ENTER"
join _ = error "ONE WAY"
haskell, (edited ) Thanks to @bgamari and the rest of the GHC release engineering team, #Haskell GHC 9.10.1-alpha2 is available now!
https://discourse.haskell.org/t/ghc-9-10-1-alpha2-is-now-available/9197
Issue 413 :: Haskell Weekly newsletter (haskellweekly.news)
News about the Haskell programming language from 2024-03-28.
underlap, Adding Haddocks to Haskell code is deeply satisfying. I like the British humour too.
maralorn, @underlap would you be so kind and explain the humour for a non British person?
underlap, @maralorn It's just a pun - haddocks are fish, often sold in fish and chips shops.
flora_pm, (edited ) You asked for it, and it's here!
Flora v1.0.17 now allows you to look up executable names to find their package! No more wondering which package exposes gen-hie, refactor, or pandoc (it's pandoc-cli).