!hskonBonfjiIefqLUV:matrix.org

Haskell

2804 Members
An advanced, purely functional programming language, haskell.org • log: https://view.matrix.org/room/!hskonBonfjiIefqLUV:matrix.org • spam ? call @mods • more rooms: #haskell-irc:matrix.org, #haskell-space:matrix.org • see also: haskell-links.org, twitter.com/HaskellOrg234 Servers

Load older messages


SenderMessageTime
25 Apr 2024
@zeroidone:matrix.orgzeroidAlex, the "problem" is not GHC's (error) messages. The problem is that I am an analphabet with respect to its language. But ... I will and want to master this language. 19:09:06
@alex:tunstall.xyzAlex Yes, reading them takes some getting used to.
That will come with experience.
19:09:29
@zeroidone:matrix.orgzeroid
In reply to @alex:tunstall.xyz
This comment about time-travelling is surprisingly fitting.
See http://web.archive.org/web/20190430061601/https://lukepalmer.wordpress.com/2008/08/10/mindfuck-the-reverse-state-monad/
Just opened the link.
"Mindfuck: The Reverse State Monad" ???
Definitely something I will look into tomorrow. Thxs.
19:15:41
@alex:tunstall.xyzAlex
In reply to @zeroidone:matrix.org
Just opened the link.
"Mindfuck: The Reverse State Monad" ???
Definitely something I will look into tomorrow. Thxs.
If after reading it you find yourself in need of a more thorough explanation of how reverse state works, you may want to read this detailed blog post about time travelling state.
19:22:01
@geekosaur:matrix.orggeekosaur https://math.andrej.com/2007/09/28/seemingly-impossible-functional-programs/ is another good one, although it's not about reverse state per se 20:26:32
@geekosaur:matrix.orggeekosaur https://github.com/quchen/articles/blob/master/loeb-moeb.md is another fun one, if you're looking for "impossible" data/control flow 21:19:53
@zeroidone:matrix.orgzeroidzeroid sends best greetings to geekosaur.22:01:46
@jecxjo:matrix.sh0.xyzjecxjo changed their profile picture.22:38:40
@tzlil:tzlil.nettzlil changed their profile picture.22:52:43
@rupalibangla_rahat:matrix.orgrupalibangla_rahat joined the room.23:43:48
26 Apr 2024
@bowuigi---now-more-based:kde.orgBowuigi
In reply to @zeroidone:matrix.org
I am 63 years "old". When I play in ghci I feel like 16 or even younger (under 10).
My Haskell-learning of today.
runState ((,) <$> (get >>= put . succ >> return "hello" ) <*> (get >>= put . negate >> return "applicative")) 3
I wish we've had Haskell when in school.
17yo here, having Haskell at a "school age" (didn't have Haskell at school) is pretty eye-opening. You can do crazy stuff with simple rules
03:36:43
@bowuigi---now-more-based:kde.orgBowuigiThe downside is that I dislike imperative and OOP langs now because I try to do functional stuff there and it doesn't work as intended lol03:37:38
@bowuigi---now-more-based:kde.orgBowuigiIt also makes the first few years of uni (or similar) way easier, because you see a lot more patterns03:40:24
@simonmic:matrix.orgsmsmalltalk or self are the good OOP, like haskell is the good FP03:40:34
@bowuigi---now-more-based:kde.orgBowuigiYeah, you can extend it to Ruby/Cristal perhaps, but they teach Java here03:41:20
@bowuigi---now-more-based:kde.orgBowuigiWell, my first year here (not a uni, I'm going for a "lower" degree and then maxing my curriculum to get a PhD quicker, I hope that works lol), we are learning Pascal so yeah, a breeze so far03:43:20
@bowuigi---now-more-based:kde.orgBowuigi Speaking about crazy stuff, messing around with catamorphisms, mutual recursion, church encoding, and the "list foldr lambda encoding" I managed to discover not just one, but an infinite family of lambda encodings that encode catamorphisms and mutual structural recursion efficiently. Sadly, single step (pattern matching / Scott style) can't be done on the recursive parts of the ADT 03:45:28
@bowuigi---now-more-based:kde.orgBowuigiApparently no one thought about that, which is weird because List seems to be the only datatype that was translated to that encoding03:50:08
@ach:nitro.chatach
In reply to @bowuigi---now-more-based:kde.org
The downside is that I dislike imperative and OOP langs now because I try to do functional stuff there and it doesn't work as intended lol
I have had similar experiences. When I try to work with Java and other practical nonsense, I find myself swearing quite a bit and saying "with Haskell, all of this would be so easy". :-)
03:59:41
@irregularsphere:matrix.orgirregularsphereHighschooler here, having a "first glance" on functional programming (only tried Haskell). It looks great, could've been more popular ;)07:39:13
@irregularsphere:matrix.orgirregularsphere* Highschooler here, having a "first glance" on functional programming (only tried Haskell). It looks great, could have had more recognition ;)07:42:40
@irregularsphere:matrix.orgirregularsphereRedacted or Malformed Event07:47:57
@irregularsphere:matrix.orgirregularsphere (well I guess it did have more recognition... not sure how but I guess that died out unfortunately) 07:50:53
@alex:tunstall.xyzAlex
In reply to @bowuigi---now-more-based:kde.org
Speaking about crazy stuff, messing around with catamorphisms, mutual recursion, church encoding, and the "list foldr lambda encoding" I managed to discover not just one, but an infinite family of lambda encodings that encode catamorphisms and mutual structural recursion efficiently. Sadly, single step (pattern matching / Scott style) can't be done on the recursive parts of the ADT

Translating any covariant recursive data type is very straightforward: add a type argument t, replace any self-reference with t, then use a fixed point type constructor (e.g. Fix, Mu, or Nu) to tie the knot.

This encoding always produces a Functor, which I'll call f. The catamorphism over f is of type forall a. Mu f -> (f a -> a) -> a and the anamorphism is of type forall a. (a -> f a) -> a -> Nu f. Other recursion schemes can be derived from these two (with hylomorphism-like ones requiring a partial Nu f -> Mu f function).

The type of foldr is equivalent to the catamorphism given by the above encoding.

The efficiency of this encoding is entirely dependant on the implementation of the lambda calculus. GHC struggles to optimise lambdas, so Fix tends to be faster than Mu and Nu.

Are you suggesting you've found a different encoding?

09:40:35
@yajaru:matrix.orgyajaru joined the room.10:41:08
@mangoiv.:matrix.orgMangoIV

https://arxiv.org/abs/2404.16062

Someone here asked.

10:46:34
@mangoiv.:matrix.orgMangoIV This is about parallel QC tests 10:46:43
@geekosaur:matrix.orggeekosaur shapr ⬆️ 11:02:11
@geekosaur:matrix.orggeekosaur * shapr, flip101 ⬆️ 11:08:52
@shapr:cofree.coffeeshaprooh, exciting12:02:40

There are no newer messages yet.


Back to Room ListRoom Version: 5