mangoiv, to haskell
@mangoiv@functional.cafe avatar

this was a lot of fun (named arguments in #haskell by using -XOverloadedRecordUpdate)

https://bin.mangoiv.com/note?id=837d3a48-e34e-48e8-b519-8c775f146262

mangoiv, to haskell
@mangoiv@functional.cafe avatar

Behold: cursed non-sense that doesn’t work well but is conceivable to work well with a few more minutes (sorry for not putting them in)

https://bin.mangoiv.com/note?id=95b5b823-05fe-4806-ab40-88c35892936a

mangoiv,
@mangoiv@functional.cafe avatar

I think the only thing that needs to be done is to come up with a clever type class that does some flipping for you, based on the arguments. It’s not entirely trivial but might work.

tristanC, to haskell
@tristanC@functional.cafe avatar
leanpub, to FunctionalProgramming
@leanpub@mastodon.social avatar

The Art of Functional Programming by Minh Quang Tran, PhD is on sale on Leanpub! Its suggested price is $24.99; get it for $17.99 with this coupon: https://leanpub.com/sh/3zIkUubg

abcdw, to haskell
@abcdw@fosstodon.org avatar
tristanC, to haskell
@tristanC@functional.cafe avatar
DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar
6d03, to haskell
@6d03@mathstodon.xyz avatar

Why is there no MonadFail instance for Either String in the prelude?

#haskell

Jose_A_Alonso, to FunctionalProgramming
@Jose_A_Alonso@mathstodon.xyz avatar

Free foil: Generating efficient and scope-safe abstract syntax. ~ Nikolai Kudasov, Renata Shakirova, Egor Shalagin, Karina Tyulebaeva. https://arxiv.org/abs/2405.16384

sgraf,
@sgraf@mastodon.online avatar

@Jose_A_Alonso Hmm, interesting. To me, the benchmarks especially so. If it was only for normalisation, it's pretty clear that NbE is and always will be the winner. But if I understand correctly, NbE has limits; for example it would not be so simple to implement a transformation pass like GHC's Simplifier using NbE, where you apply peephole optimisations such as case-of-case, inlining etc. to the program while traversing it. I wonder if @AndrasKovacs has tried NbE for such a pass?

mangoiv, to haskell
@mangoiv@functional.cafe avatar

Removing the reexports from mtl was, while I really like it conceptually, quite the breaking change, apparently it had become a habit in my team to just import Control.Monad.Except to get access to Control.Monad and Control.Monad.IO.Class… On that note: why’s there no Control.Monad.IO, why do I have to type .Class all the time.

#haskell

koz, to haskell
@koz@chaos.social avatar

Someone who knows and ML: is there a writeup somewhere explaining how first-class modules (a la ML) can do similar things to Haskell type classes? I'm finding it hard to figure that out.

To give a more concrete case: suppose I wanted to write something like Control.Applicative, which provides an 'interface' Applicative with some methods, as well as functions that work for any Applicative. How would I do this with ML-style first-class modules?

jaror,
jaror avatar

@koz I would like to see such a comparison post too. In the meantime I found this stackoverflow question which contains a way to do it using an ML functor: https://stackoverflow.com/questions/48989663/monads-and-sml-modules. The obvious downside is that you have to explicitly state which monad to use at some point.

Another lesser known difference is that I believe you can't instantiate an ML signature with a polymorphic type. For example you can't write an instance of that MAPPABLE signature for a type like Map k v. At least not such that it is still polymorphic over the key type k.

dpwiz,
@dpwiz@qoto.org avatar

@koz Not quite your case, but “The next 500 module systems” paper gives a nice overview of the problem, bridging modules, type classes and records (and scopes!).

cdelord, to haskell French
@cdelord@piaille.fr avatar

One of the great modules provided by LuaX is F.
F is inspired by some modules (List and Map) and implements functional programming functions to deal with Lua tables.

https://github.com/CDSoft/luax/blob/master/doc/F.md

lxsameer, to haskell
@lxsameer@social.lxsameer.com avatar

I recently came across https://simplex.chat. I really liked it just by reading how it works. But I took a look at the source code today, and I was like: “Oh coool it's in #haskell. Oh, daaaamn they're using #nix quite heavily. I love it. 😍 “

Kudos folks.

@simplex

ultima12, to MaxMSP German

Hi, I am a sound designer and engineer.

I like programming sounds with #pd, #maxmsp and hardware synths, DAW's, etc. But tools don't matter in the end as you probably know, aesthetics do -- and reverb algorithms. Do you know any?

I spent too much time with #linux and #haskell. I reaaaally don't like commercial ads. After all, is the internet post-modern?

My favorite emoticon is the smiling face with tear.

I toyed around with gabber:
https://susengchannel.bandcamp.com/album/anthem-of-scham

#introduction

leanpub, to haskell
@leanpub@mastodon.social avatar

Pragmatic Type-Level Design: Practical introduction into type-level programming: design principles, design patterns, methodologies, approaches https://leanpub.com/pragmatic-type-level-design by Alexander Granin is the featured book on the Leanpub homepage! https://leanpub.com #Haskell

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • DreamBathrooms
  • cisconetworking
  • khanakhh
  • mdbf
  • magazineikmin
  • modclub
  • InstantRegret
  • rosin
  • Youngstown
  • slotface
  • Durango
  • tacticalgear
  • megavids
  • ngwrru68w68
  • everett
  • tester
  • cubers
  • normalnudes
  • thenastyranch
  • osvaldo12
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • lostlight
  • All magazines