Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,799,313 events total
2026-02-05 18:32:03 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-05 18:33:55 × peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 264 seconds)
2026-02-05 18:36:31 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2026-02-05 18:40:02 × Googulator quits (~Googulato@2a01-036d-0106-216f-0081-f2ad-9e0f-9d89.pool6.digikabel.hu) (Quit: Client closed)
2026-02-05 18:40:18 Googulator joins (~Googulato@2a01-036d-0106-216f-0081-f2ad-9e0f-9d89.pool6.digikabel.hu)
2026-02-05 18:47:21 <EvanR> we love types for reasons... but type signatures are sometimes optional... and it's possible to get away with various dilutions of type safety in haskell. I.e. using strings in tuples instead of constructors, and the literal Dynamic type
2026-02-05 18:47:34 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-05 18:47:35 <EvanR> I wonder if it would make code smaller, or "even worse" trying to use this style xD
2026-02-05 18:47:55 <EvanR> (more code)
2026-02-05 18:50:24 <[exa]> EvanR: you mean like, ("Just", "five") and ("Nothing", "")
2026-02-05 18:51:00 <EvanR> I guess ("Nothing", undefined) xD
2026-02-05 18:51:05 <EvanR> ok it's not a great start
2026-02-05 18:52:15 Tuplanolla joins (~Tuplanoll@85-156-32-207.elisa-laajakaista.fi)
2026-02-05 18:52:18 <EvanR> ["Just", "five"] vs ["Nothing"]
2026-02-05 18:52:44 <[exa]> ah yes the List Technology
2026-02-05 18:54:01 <[exa]> well anyway you can go `data Scheme = Cons Scheme Scheme | Num Int | Symbol String | Nil | ...` and get wild
2026-02-05 18:54:07 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2026-02-05 18:55:37 <EvanR> would seem to expand the code vs idiomatic haskell.... maybe
2026-02-05 18:55:43 <tomsmeding> EvanR: we have our own brand of that, try church encodings
2026-02-05 18:55:57 <EvanR> oh?
2026-02-05 18:56:01 <tomsmeding> may need to embed in `newtype X = X (X -> X)` for proper typelessness
2026-02-05 18:56:30 <tomsmeding> it's all a function! Why throw an error if you pass 5 to a function expecting a Maybe String? It will just... do something!
2026-02-05 18:56:36 <[exa]> EvanR: not really; you add instance Monad and overloaded lists and strings and labels, and you're generating this for free
2026-02-05 18:56:55 <EvanR> tomsmeding, now you're talking
2026-02-05 18:57:21 lisbeths joins (uid135845@id-135845.lymington.irccloud.com)
2026-02-05 18:57:40 <[exa]> tomsmeding: I love that
2026-02-05 18:57:54 × __monty__ quits (~toonn@user/toonn) (Ping timeout: 244 seconds)
2026-02-05 18:58:06 <tomsmeding> I like how I get the most agreement here when I post the stupidest suggestions
2026-02-05 18:58:11 <Clint> speaking of getting wild, is there any type magic which would let me do something like data Thingy = ConstructorV1 a | ConstructorV2 a b and be able to pattern-match a ConstructorV2 value with (ConstructorV1 a)?
2026-02-05 18:58:35 <EvanR> o_O
2026-02-05 18:58:45 <tomsmeding> pattern synonyms?
2026-02-05 18:59:04 <tomsmeding> have ConstructorV{1,2} actually be pattern synonyms that do whatever you want with the underlying Thingy definition
2026-02-05 18:59:50 Clint reads.
2026-02-05 19:00:24 <[exa]> yeah, view patterns or pattern synonyms
2026-02-05 19:01:32 <Clint> i'll give it a shot, thanks
2026-02-05 19:05:27 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2026-02-05 19:05:37 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-05 19:06:06 × akegalj quits (~akegalj@173-245.dsl.iskon.hr) (Quit: leaving)
2026-02-05 19:06:55 hellwolf joins (~user@13cd-fe1e-a030-6e4e-0f00-4d40-07d0-2001.sta.estpak.ee)
2026-02-05 19:08:37 <[exa]> can one do such a multi-target pattern synonym without going through a view pattern?
2026-02-05 19:09:05 <tomsmeding> essentially all interesting usecases of a pattern synonym require a view pattern to define the synonym
2026-02-05 19:09:11 <tomsmeding> perhaps not all, but many
2026-02-05 19:11:47 <[exa]> Clint: btw if you didn't google it yet, this probably does it https://stackoverflow.com/a/43839121
2026-02-05 19:11:55 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 250 seconds)
2026-02-05 19:12:38 <haskellbridge> <Morj> Should I suggest to instead encode the thingy as data Thingy = Thingy a (Maybe b)?
2026-02-05 19:12:52 <[exa]> ( s/google/find/ )
2026-02-05 19:13:16 <[exa]> Morj: I assume the main issue is that the types would get more complex
2026-02-05 19:13:45 <[exa]> e.g. add a few constructors that don't actually have the `a`
2026-02-05 19:14:02 <int-e> [exa]: it's fine, you can google (most) things with DuckDuckGo :P
2026-02-05 19:14:06 <Clint> Morj: the whole point is that i want to add a field to the type without breaking the API
2026-02-05 19:14:30 <tomsmeding> "I want to modify constructors of a data type without modifying the API" is one of the design usecases of pattern synonyms
2026-02-05 19:14:39 <[exa]> int-e: nah the original sentence I wrote sounded a bit too much like "oh lemme google that for you" which I didn't intend
2026-02-05 19:15:02 <Clint> i was just reading https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/pattern_synonyms.html
2026-02-05 19:15:49 <int-e> [exa]: Ah. FWIW to me it sounded like you did google it out of curiosity and shared the result and method, without judgement. I could see it being read differently of course.
2026-02-05 19:16:07 <[exa]> yap. :]
2026-02-05 19:16:59 <Clint> i did not read it differently, ftr
2026-02-05 19:21:18 × tromp quits (~textual@2001:1c00:3487:1b00:4842:24c6:bd5c:fe37) (Quit: My iMac has gone to sleep. ZZZzzz…)
2026-02-05 19:22:45 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-05 19:27:33 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2026-02-05 19:38:25 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-05 19:42:15 × wickedjargon quits (~user@24.83.46.194) (Remote host closed the connection)
2026-02-05 19:43:24 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
2026-02-05 19:43:42 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2026-02-05 19:43:42 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
2026-02-05 19:44:41 × kuribas quits (~user@2a02-1810-2825-6000-6394-e629-adac-ea24.ip6.access.telenet.be) (Remote host closed the connection)
2026-02-05 19:44:45 Lord_of_Life_ is now known as Lord_of_Life
2026-02-05 19:45:32 Square2 joins (~Square@user/square)
2026-02-05 19:49:09 × Square3 quits (~Square4@user/square) (Ping timeout: 244 seconds)
2026-02-05 19:52:33 Umeaboy joins (~Umeaboy@h77-53-243-72.cust.bredband2.com)
2026-02-05 19:54:13 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-05 19:59:25 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-02-05 20:02:29 × CiaoSen quits (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 260 seconds)
2026-02-05 20:06:06 L29Ah joins (~L29Ah@wikipedia/L29Ah)
2026-02-05 20:07:44 × xal quits (~xal@mx1.xal.systems) (Quit: bye)
2026-02-05 20:08:22 xal joins (~xal@mx1.xal.systems)
2026-02-05 20:08:24 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-05 20:08:50 × yin quits (~zero@user/zero) (Remote host closed the connection)
2026-02-05 20:10:02 target_i joins (~target_i@user/target-i/x-6023099)
2026-02-05 20:13:31 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-02-05 20:17:45 × redshuffle quits (~quassel@45.43.70.75) (Remote host closed the connection)
2026-02-05 20:17:52 redshuffle joins (~quassel@45.43.70.75)
2026-02-05 20:20:06 <EvanR> after adding postgresql-simple to my cabal file, and doing cabal build, this weird behavior where the build ends at a random dependency, says "completed" and just hangs
2026-02-05 20:20:21 <EvanR> control C and doing the command again seems to start from another place and hang somewhere else each time
2026-02-05 20:20:57 <EvanR> if it "hangs" on "building" I wouldn't be as suspicious
2026-02-05 20:21:24 Square3 joins (~Square4@user/square)
2026-02-05 20:22:32 <EvanR> looks like it eventually completed... the long running build might have been vector
2026-02-05 20:23:15 × Square2 quits (~Square@user/square) (Ping timeout: 245 seconds)
2026-02-05 20:23:39 × machinedgod quits (~machinedg@d75-159-126-101.abhsia.telus.net) (Ping timeout: 252 seconds)
2026-02-05 20:23:50 <EvanR> I'm wrong still going
2026-02-05 20:24:11 merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl)
2026-02-05 20:24:19 <EvanR> I see, the reports are asynchronous
2026-02-05 20:25:58 <haskellbridge> <Morj> If you build with -j1, I think this would tell you which exact package is freezing
2026-02-05 20:26:05 <haskellbridge> <Morj> If cabal-install has -j
2026-02-05 20:31:13 × merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2026-02-05 20:31:51 peterbecich joins (~Thunderbi@71.84.33.135)
2026-02-05 20:31:55 <tomsmeding> yes, `cabal build -j1` is a thing
2026-02-05 20:35:14 <EvanR> stupid question, when you are cabal building something, is there are most 1 version of each dependency "in use" for that build. And so if the same package comes up multiple ways, there needs to be an overlapping version bound
2026-02-05 20:35:46 <haskellbridge> <Morj> Yes, there can only be one version of each package in the whole build tree
2026-02-05 20:36:10 <EvanR> that explains a lot xD
2026-02-05 20:38:50 Carlodiociottene joins (~Carlodioc@host51.141-13-31.as49605.net)

All times are in UTC.