2026/03/07

Newest at the top

2026-03-07 14:02:24 +0100 <haskellbridge> <loonycyborg> is there a way to interact with lambabot from matrix?
2026-03-07 14:01:45 +0100 <__monty__> loonycyborg: No, the Matrix bridge is a single bot IRC-side. So your messages are prefixed with your nick.
2026-03-07 14:01:38 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2026-03-07 14:01:22 +0100 <int-e> (Unpacking isn't completely free: If you unpack and later repack a value, that means a new heap object has to be created for it. This is why for data, GHC only does it when you give it a hint to do so.)
2026-03-07 14:00:59 +0100 <Guest89> and I guess the same if you have strict data in another type?
2026-03-07 14:00:43 +0100 <haskellbridge> <loonycyborg> it ate '>'
2026-03-07 14:00:31 +0100 <haskellbridge> <loonycyborg> hmm
2026-03-07 14:00:24 +0100 <haskellbridge> <loonycyborg> > length [undefined, undefined, undefined]
2026-03-07 14:00:13 +0100 <Guest89> makes sense I suppose
2026-03-07 14:00:03 +0100 <int-e> yes, usually
2026-03-07 13:59:45 +0100 <Guest89> I guess the point is that you prefer strict data when it contains primitives?
2026-03-07 13:58:56 +0100 <Guest89> guess I assumed it to be semantically different from an exception but I think I get what you mean
2026-03-07 13:58:31 +0100 <int-e> (Those are the usual manifestations in Haskell: an explicit error value, or nontermination)
2026-03-07 13:58:29 +0100 <Guest89> fair point
2026-03-07 13:58:12 +0100 <lambdabot> *Exception: <<timeout>>
2026-03-07 13:58:05 +0100 <int-e> > fix id
2026-03-07 13:58:03 +0100 <lambdabot> undefined, called at <interactive>:3:1 in interactive:Ghci1
2026-03-07 13:58:03 +0100 <lambdabot> CallStack (from HasCallStack):
2026-03-07 13:58:03 +0100 <lambdabot> *Exception: Prelude.undefined
2026-03-07 13:58:02 +0100 <int-e> > undefined
2026-03-07 13:57:54 +0100 <int-e> And for a lazy language, you can also have thunks whereever bottoms can go, so you can't unpack anything in those places.
2026-03-07 13:57:27 +0100 <Guest89> I haven't really figured how you can even get bottom in practice
2026-03-07 13:57:07 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-03-07 13:56:55 +0100 <int-e> But you can still have Y (bottom, bottom)
2026-03-07 13:56:38 +0100 <int-e> if you have data X = X (Int,Int) and data Y = Y !(Int,Int) then the difference is that you can have an `X bottom` value that's distinct from bottom, but `Y bottom` is just bottom.
2026-03-07 13:56:06 +0100 <Guest89> I will play around and see what changes
2026-03-07 13:55:36 +0100 <Leary> Yes.
2026-03-07 13:55:10 +0100 <Guest89> right, but bangs force a semantics change?
2026-03-07 13:54:24 +0100 <Leary> `UNPACK` is only a hint for the compiler; it can't fundamentally change the semantics, which include the fields of `(,)` being lazy---that blocks any further unpacking.
2026-03-07 13:54:20 +0100 <int-e> yes
2026-03-07 13:54:07 +0100 <Guest89> does it just transform the constructor into another one with the same arity as the tuples?
2026-03-07 13:53:38 +0100 <Guest89> so what does unpack do in this case?
2026-03-07 13:53:19 +0100 <Leary> No, the data constructors. `data Uid = Uid !Int !Int`; `data Ptr = PtrLeaf !Bool | PtrNode !Uid`; etc.
2026-03-07 13:51:34 +0100 <Guest89> I assumed the unpack itself made it strict
2026-03-07 13:51:29 +0100 <Guest89> I presume you mean at a function level?
2026-03-07 13:48:05 +0100arandombit(~arandombi@user/arandombit) arandombit
2026-03-07 13:46:08 +0100merijn(~merijn@62.45.136.136) (Ping timeout: 252 seconds)
2026-03-07 13:45:36 +0100 <Leary> Guest89: All of your data is lazy, even `Uid`; `data Uid = Uid {-# UNPACK #-} !(Int, Int)` is essentially equivalent to `data Uid = Uid Int Int`. If you're not utilising that laziness, kill it with strictness annotations.
2026-03-07 13:43:53 +0100wootehfoot(~wootehfoo@user/wootehfoot) wootehfoot
2026-03-07 13:39:11 +0100merijn(~merijn@62.45.136.136) merijn
2026-03-07 13:36:52 +0100Tuplanolla(~Tuplanoll@88-114-89-88.elisa-laajakaista.fi) Tuplanolla
2026-03-07 13:29:55 +0100 <Guest89> if anyone else has any suggestions in the meantime, this is how my comparators are defined for the busiest functions https://paste.tomsmeding.com/jSnEEitE
2026-03-07 13:28:20 +0100 <Guest89> darn
2026-03-07 13:28:16 +0100merijn(~merijn@62.45.136.136) (Ping timeout: 244 seconds)
2026-03-07 13:28:10 +0100 <int-e> no, but also: <+haskellbridge> <sm> got to go.. good luck
2026-03-07 13:27:09 +0100 <Guest89> sorry I think I lost connection; I posted some replies to you sm but I'm not sure if they got through?
2026-03-07 13:26:35 +0100Guest89(~Guest89@185.45.21.144)
2026-03-07 13:23:39 +0100merijn(~merijn@62.45.136.136) merijn
2026-03-07 13:19:46 +0100target_i(~target_i@user/target-i/x-6023099) target_i
2026-03-07 13:14:10 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)