Home liberachat/#haskell: Logs Calendar

Logs on 2022-06-03 (liberachat/#haskell)

00:00:04 Γ— littlebo1eep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
00:00:59 <geekosaur> > let x πŸ˜› f = f x; infixr 1 πŸ˜› in 2 πŸ˜› 3 πŸ˜› (-)
00:01:01 <lambdabot> 1
00:01:14 <Bulby[m]> wtf
00:01:34 Γ— jpds1 quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
00:03:04 β†’ littlebo1eep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
00:03:04 Γ— littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
00:03:21 <Guest58> I want to compare each element of tuple in the lists to a constant number depending on the second element of tuple:
00:03:21 <Guest58> For exemple : [ [(3,2),(17,2)] , [(50,3),(64,3)] ]
00:03:22 <Guest58> if the second element of tuple is 2 so i compare with 15.
00:03:22 <Guest58> if the second element of tuple is 3 so i compare with 30.
00:03:23 <Guest58> The expected result is [[TRUE, FALSE], [FALSE, FALSE]].
00:03:23 <Guest58> What changes i have to make on my function so it gives me the good result ?
00:03:24 <Guest58> comparAttente :: [[(Int,Int)]] -> [[Bool]]
00:03:24 <Guest58> Β  Β  comparAttente [[(a,b)]] | b == 2 && a > priorite2 = [[False]]
00:03:25 <Guest58> Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  | b == 3 && a > priorite3 = [[False]]
00:04:36 <dsal> Get rid of some of those [], I think.
00:04:52 <dsal> And also get rid of Bool.
00:04:59 <Guest13> geekosaur: Obviously we need a strict version too.
00:05:44 <dsal> Guest13: this is a huge XY problem, though. You seem to have a solution to a problem that doesn't make a lot of sense and I'm trying to imagine what your problem is.
00:05:45 <Guest13> > let (πŸ€‘) !x f = f x; infixr 1 πŸ€‘ in 2 πŸ€‘ 3 πŸ€‘ (*)
00:05:48 <lambdabot> 6
00:06:24 <Guest13> :t (πŸ€‘)
00:06:26 <lambdabot> error: Variable not in scope: πŸ€‘
00:06:49 <geekosaur> @let (πŸ€‘) !x f = f x; infixr 1 πŸ€‘
00:06:51 <lambdabot> Defined.
00:07:01 <geekosaur> :t (πŸ€‘)
00:07:03 <lambdabot> t1 -> (t1 -> t2) -> t2
00:07:13 <dsal> Super cool that my irc client decides to make emojis out of most of these code snippets.
00:07:17 <Guest13> Oh, right, can't use levity polymorphism because it uses seq.
00:07:51 <geekosaur> dsal, they are emojis :)
00:08:00 <geekosaur> perfectly valid Symbol characters
00:08:11 <dsal> Ooh. Haha. I was just digging through settings.
00:08:50 <dsal> My message to Guest13 was meant for Guest58
00:09:00 <Guest58> dsal I'm going to need it later, because I'm going to count the number of True and divide it by the number of booleans in my list, so I don't want to merge everything
00:09:17 <geekosaur> Guest13 mentioned they did most of their programming on their phone, and if there's one thing it's easy to type on a modern smartphone it's an emoji
00:09:27 <geekosaur> whoile new class of operators there for the taking
00:09:51 <Guest13> let (🍻) x = x
00:09:54 <dsal> Guest58: I'm not sure what you're doing, but `Bool` isn't usually the right answer.
00:09:57 <Guest13> > let (🍻) x = x
00:09:59 <lambdabot> <no location info>: error: not an expression: β€˜let (🍻) x = x’
00:10:18 <dsal> Guest58: e.g., based on your description, I'd just use a semigroup and do all those things in one pass.
00:10:24 <Guest13> Is there a way to set PostfixOperators in lambdabot?
00:10:31 <geekosaur> Guest13, lambdabot's "> " only supports expressions. use @let for definitions
00:11:00 <Guest13> @let (🍻) x = x
00:11:02 <lambdabot> Defined.
00:11:10 <Guest13> :t (🍻)
00:11:11 <lambdabot> p -> p
00:11:42 <Guest13> geekosaur: Thanks.
00:12:07 <geekosaur> @let {-# LANGUAGE PostfixOperators #-}
00:12:08 <lambdabot> Defined.
00:13:09 <Guest13> Speaking of PostfixOperators, with all the SimplifiedSubsumption rigamarole, should we all be putting it on by default to improve eta equivalence?
00:13:46 Γ— Guest17 quits (~Guest17@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 252 seconds)
00:15:24 <jackdk> https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/1080317/birthday-honours-list-2022.csv/preview search "PEYTON JONES"
00:15:57 Γ— justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4)
00:16:10 <monochrom> OMG OBE
00:19:26 <Guest13> That's pretty cool if you're into monarchy.
00:20:04 <Guest13> I mean, not as cool as the 'Professor' title he already had but cool.
00:20:17 β†’ azimut_ joins (~azimut@gateway/tor-sasl/azimut)
00:20:34 Γ— azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
00:22:49 <monochrom> I'm pretty sure republics such as France have completely equivalent hierarchies of medals and officers and commanders.
00:23:35 <monochrom> I heard of one Colonel Sanders who was made a Colonel of the US for his successful food business.
00:24:42 <Guest13> > True
00:24:45 <lambdabot> True
00:31:03 Γ— vorpuni quits (~pvorp@2001:861:3881:c690:a8fb:3878:c020:66f7) (Remote host closed the connection)
00:31:48 β†’ maroloccio joins (~marolocci@109.107.115.46)
00:31:52 Γ— vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
00:32:23 <jackdk> Regardless of one's feelings about the monarchy, it's very cool that a CS educator has been given a high civilian honour.
00:38:28 <EvanR> you have to excuse Guest13 they are visiting from the 18th century
00:42:57 Γ— xff0x quits (~xff0x@b133147.ppp.asahi-net.or.jp) (Ping timeout: 276 seconds)
00:43:15 β†’ xff0x joins (~xff0x@b133147.ppp.asahi-net.or.jp)
00:43:46 β†’ jinsun__ joins (~jinsun@user/jinsun)
00:44:30 Γ— jinsun quits (~jinsun@user/jinsun) (Ping timeout: 246 seconds)
00:46:37 Γ— Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 258 seconds)
00:47:24 β†’ Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915)
00:48:58 β†’ bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
00:49:34 <Guest13> > True
00:49:36 <lambdabot> True
00:50:10 <Bulby[m]> um, how can I make a monadic action strict
00:50:44 <monochrom> In that rich context, "strict" is ambiguous.
00:50:48 <Bulby[m]> i'm currently using `=<<` which is lazy
00:51:15 <geekosaur> whether >>= or its reversal is strict or lazy is up to the monad
00:51:22 Γ— Guest13 quits (~Guest13@136.56.140.2) (Quit: Back to the eighteenth century)
00:51:26 <geekosaur> and you usually can't change it
00:51:38 <Bulby[m]> ...
00:52:41 <dsal> Do you have a specific problem you're trying to solve for which you think the solution involves answering your question?
00:52:54 <Bulby[m]> https://paste.tomsmeding.com/V0CZJ6xm
00:52:58 <Bulby[m]> closure shenanagins
00:53:04 Γ— Chai-T-Rex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 240 seconds)
00:53:12 <Bulby[m]> the `get @LxEnv` is a closure
00:54:10 <dsal> You mean you want that to be whnf?
00:54:18 <Bulby[m]> and because it's haskell I assumed it was immutable, but it still produces a bug (at the end of the first section)
00:54:41 <Bulby[m]> https://craftinginterpreters.com/resolving-and-binding.html
00:54:42 <Bulby[m]> yes, WHNF
00:54:56 <dsal> Wait, so lazy and immutable don't seem to be antonyms. I might be misunderstanding a lot here, though.
00:55:23 <Bulby[m]> they aren't, but the issue was described in the book as stemming from mutability
00:55:28 β†’ Chai-T-Rex joins (~ChaiTRex@user/chaitrex)
00:55:54 <Bulby[m]> oh, I have an idea, and i will be very mad if it's correct
00:56:17 <dsal> I'm mad regardless of correctness.
00:56:25 <Bulby[m]> wym
00:56:29 <dsal> We're all mad here.
00:56:34 Γ— bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
00:58:48 <Bulby[m]> oh this is becoming a mess
00:58:58 β†’ bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
00:59:53 <Bulby[m]> this probably needs do notation to fix (in a not insane way)
01:00:40 β†’ fryguybob joins (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com)
01:02:06 <dsal> I'll sometimes use do notation when I don't feel smart doing something simple that's not working. It's nice having a different notation to try to express the same problem.
01:02:40 <EvanR> sounds like you're still on step 1 understand the problem
01:03:13 <Bulby[m]> i think I am starting to understand, I am failing to switch to the closure
01:04:31 β†’ gurkenglas joins (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de)
01:04:46 <jackdk> EvanR: Polya was wise.
01:07:54 β†’ Ram-Z joins (Ram-Z@2a01:7e01::f03c:91ff:fe57:d2df)
01:08:35 Γ— xff0x quits (~xff0x@b133147.ppp.asahi-net.or.jp) (Ping timeout: 255 seconds)
01:09:29 <Bulby[m]> https://paste.tomsmeding.com/ImAxcMd4
01:09:33 <Bulby[m]> πŸ₯³
01:09:41 <Bulby[m]> i fixed it
01:10:56 Γ— pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
01:11:55 <Bulby[m]> now I don't have to do scope analysis
01:17:10 <Bulby[m]> altho I have no idea how to support recursive functions now
01:19:39 <EvanR> recursion, the goto of functional programming
01:20:51 <monochrom> lambda, the ultimate goto
01:21:01 <monochrom> (actual paper title)
01:21:54 <Bulby[m]> how am I supposed to define a sane closure that includes it's own name?
01:22:18 <Bulby[m]> i have a function type `LoxFunction :: _ _ Env`
01:22:21 <geekosaur> there's always fix. look, ma, no names!
01:22:59 <monochrom> "zs = 0 : zs" on steroid
01:23:16 <monochrom> I used to teach students how to make that cyclic self-referencing closure.
01:23:38 <Bulby[m]> i'm talking about parsing πŸ™‚
01:23:55 <Bulby[m]> interpreting, rather
01:24:35 <monochrom> It didn't go too well. I now follow Essentials of Programming Languages and use the interpreter's own recursion instead.
01:26:00 <monochrom> Am I not talking about interpreting?
01:26:16 <Bulby[m]> i can't tell
01:26:39 <monochrom> You could have asked.
01:28:10 <EvanR> if your interpreter was implemented as a graph, then you could implement cyclic reference with... a cycle
01:28:40 <Bulby[m]> i think it's more like a tree
01:28:49 β†’ nate3 joins (~nate@98.45.169.16)
01:28:55 <EvanR> that... seems problematic then xD
01:30:06 <monochrom> I now teach the Unix file system by starting with "approximately a tree". Because by the end you know that there are deviations left right and centre.
01:30:56 <EvanR> myths... useful myths
01:30:58 <monochrom> But no one would call "tree" wrong there. In many local scopes you do have a tree.
01:31:32 Γ— gurkenglas quits (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 255 seconds)
01:32:11 <EvanR> the poor OS programmer knows the truth
01:32:14 <monochrom> Very much the same way we have a flat linear address model of memory (even disk), we have Newtonian gravity, we say that a[i] takes O(1) time.
01:33:20 <EvanR> I was recently told that the dictionary structure available in (whatever language) was O(1)
01:33:53 <EvanR> I suddenly didn't know if I didn't know anything
01:34:07 Γ— nate3 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds)
01:34:41 <monochrom> At some point an old joke about car salespersons vs computer salespersons applies.
01:35:06 <monochrom> "What's the difference between them? Answer: the car salesperson knows they're lying."
01:35:58 <monochrom> You can have two people making that O(1)-time claim, and one of them know it's a simplification, and the other actually believe in it.
01:37:26 ← moonsheep parts (~user@user/moonsheep) (ERC 5.4 (IRC client for GNU Emacs 28.1))
01:38:02 <EvanR> a hash function is O(1). followed by an array lookup O(1). followed by a linked list, which shouldn't grow too big in practice, O(1). Adds up to O(1) right
01:38:16 <Bulby[m]> πŸ˜„
01:38:57 <EvanR> talk about leak abstractions
01:38:58 <EvanR> leaky
01:41:38 <Bulby[m]> we've talked about this before - what is something that can only do pure called? pointed?
01:41:57 <jackdk> yes, but you can't really define sensible laws for it on its own IIRC
01:42:23 Γ— nahcetan quits (~nate@98.45.169.16) (Ping timeout: 256 seconds)
01:43:24 Γ— stackdroid18 quits (14094@user/stackdroid) (Quit: hasta la vista... tchau!)
01:46:07 β†’ pottsy joins (~pottsy@129.227.183.244)
01:46:31 Γ— Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
01:48:32 β†’ Sgeo joins (~Sgeo@user/sgeo)
01:49:15 Γ— Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 246 seconds)
01:51:47 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-943a-e90b-acbe-4f74.res6.spectrum.com) (Ping timeout: 255 seconds)
01:52:59 β†’ andrey__ joins (~andrey@p200300dbcf0c6600f65a5485c0e2d33f.dip0.t-ipconnect.de)
01:53:00 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-943a-e90b-acbe-4f74.res6.spectrum.com) (Ping timeout: 260 seconds)
01:55:50 Γ— andrey_ quits (~andrey@p200300dbcf13c9006e615432230a2497.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
01:58:19 β†’ xff0x joins (~xff0x@s5.HtokyoFL1.vectant.ne.jp)
01:59:49 Γ— zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
02:05:43 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
02:06:06 β†’ TonyStone joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
02:09:11 Γ— maroloccio quits (~marolocci@109.107.115.46) (Quit: WeeChat 3.0)
02:17:16 Γ— kenaryn quits (~aurele@89-88-44-27.abo.bbox.fr) (Quit: leaving)
02:25:18 Γ— td_ quits (~td@muedsl-82-207-238-179.citykom.de) (Ping timeout: 246 seconds)
02:25:31 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 258 seconds)
02:25:44 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 272 seconds)
02:27:09 β†’ td_ joins (~td@muedsl-82-207-238-121.citykom.de)
02:28:58 β†’ nate3 joins (~nate@98.45.169.16)
02:31:05 <Bulby[m]> god, writing an interpreter for a procedural language has caused polysemy State/Error/Fail vomit
02:34:05 Γ— nate3 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds)
02:34:39 <Bulby[m]> maybe a bytecode generator would be more sane and allow me to write in rust for the interpreting
02:35:20 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Remote host closed the connection)
02:37:31 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
02:37:50 β†’ TonyStone joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
02:40:22 Γ— holmes quits (~holmes@user/holmes) (Quit: holmes)
02:40:23 Γ— waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 255 seconds)
02:48:32 Γ— rekahsoft quits (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Ping timeout: 272 seconds)
02:48:37 Γ— FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
02:48:39 β†’ FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
02:54:24 <Guest58> how to print a function that return a floating number ?
02:57:34 Γ— littlebo1eep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
02:58:47 <dsal> Guest58: You can't print functions in general.
02:58:51 <Guest58> > printf "%s, %d, %.4f" "hello" 123 pi
02:58:53 <lambdabot> error:
02:58:53 <lambdabot> β€’ Ambiguous type variable β€˜a0’ arising from a use of β€˜show_M994368985285...
02:58:54 <lambdabot> prevents the constraint β€˜(Show a0)’ from being solved.
03:01:33 β†’ forell joins (~forell@user/forell)
03:01:53 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
03:02:35 <EvanR> > printf "%s, %d, %.4f" "hello" 123 pi :: String
03:02:37 <lambdabot> "hello, 123, 3.1416"
03:03:27 <EvanR> printf's type is ambiguous without context
03:03:34 <EvanR> (moreso than usual)
03:04:37 β†’ Guest72 joins (~Guest72@240e:341:3834:600:c40c:924c:6b2a:838f)
03:07:22 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 250 seconds)
03:07:23 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 255 seconds)
03:08:50 β†’ Kaiepi joins (~Kaiepi@156.34.47.253)
03:12:44 Γ— [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
03:13:52 <Guest58> EvanR actaully a have a function that return IO() and i want to concatenate the output of thsi function with a string
03:14:13 <Guest58> is the (+++) a solution ?
03:19:05 Γ— mvk quits (~mvk@2607:fea8:5ce3:8500::ba9a) (Ping timeout: 255 seconds)
03:19:44 β†’ TonyStone joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
03:20:15 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
03:20:57 <dsal> :t fmap (<>)
03:20:58 <lambdabot> (Functor f, Semigroup a) => f a -> f (a -> a)
03:21:33 <dsal> Actually, that doesn't make sense. If the function returns `IO ()` then it returns an action that will produce unit, so there's no string to concatenate.
03:24:05 <Guest58> i have this two functions :
03:24:05 <Guest58> firstRule :: String -> IO ()
03:24:06 <Guest58> algoTriage ::Int -> String -> Double
03:24:06 <Guest58> And i want a function to print the result of these two functions.
03:24:07 <Guest58> what i do :
03:24:07 <Guest58> printResult :: Int -> String -> String
03:24:08 <Guest58> printResult a chaine = printf "%s, %.4f" getContents premiereRegle chaine algoTriage a chaine :: String
03:24:17 <Guest58> is this correct ? please can someone help
03:24:41 <Guest58> premiereRegle is firstRule, i forget to change it
03:25:31 <dsal> Guest58: the result of the first function is an action that will produce `()` -- your question doesn't quite make sense.
03:27:08 <Cale> Guest58: It seems like you've got a lot of arguments to printf there, are you sure that's what you meant?
03:27:58 <Guest58> printResult :: Int -> String -> String
03:27:58 <Guest58> printResult a chaine = printf "%s, %.4f" (firstRule chaine) (algoTriage a chaine :: String)
03:28:11 <Guest58> i made some parentheses so it can be more clear
03:28:22 <Cale> That means something completely different
03:28:25 <dsal> Note that the parens change the meaning entirely.
03:28:40 <dsal> But also, you can't just declare a Double to be a String like that.
03:28:51 <dsal> Again, it's not clear what your goal is because the thing you're saying doesn't make any sense.
03:29:07 <Cale> and also, there's no way to show the IO action firstRule chaine
03:29:16 <dsal> Break it into smaller parts. You said you want to print the result of `firstRule` which takes an argument and returns `IO ()` -- what, exactly, are you hoping to print there?
03:29:45 β†’ abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
03:31:48 <Guest58> the function that returns IO().
03:31:49 <Guest58> When I run it it returns a list:
03:31:49 <Guest58> Example :
03:31:50 <Guest58> 4568 2
03:31:50 <Guest58> 6987 3
03:31:51 <Guest58> 3214 7
03:31:51 <Guest58> 3658 1
03:31:52 <Guest58> The second function returns a double:
03:31:52 <Guest58> Example:
03:31:53 <Guest58> 0.98754647856
03:31:53 <Guest58> All I want is to concatenate the two functions to have something:
03:31:54 <Guest58> 4568 2
03:31:54 <Guest58> 6987 3
03:31:55 <Guest58> 3214 7
03:31:55 <Guest58> 3658 1
03:31:56 <Guest58> --------
03:31:56 <Guest58> 0.98754647856
03:32:37 β†’ nahcetan joins (~nate@98.45.169.16)
03:32:45 <energizer> is it ever useful to define a function with a parameter of type bottom?
03:33:07 <Guest58> I hope this is more clear if not I can try to ask the question
03:33:19 <dsal> Guest58: It's not returning that.
03:33:24 <dsal> It's emitting it as a side effect.
03:33:37 <dsal> It sounds like that's not what you want it to do.
03:34:43 <dsal> The first one should presumably return `[SomePairOfNumbers]` and you should have a function `SomePairOfNumbers -> String` and then you can worry about IO later.
03:35:05 Γ— bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 260 seconds)
03:36:36 <Guest58> This is the function thats been used in firstRule see it returns an IO()display :: [(Int, Int, Int)] -> IO ()
03:36:37 <Guest58> display = mapM_ (\(a,b,c) -> putStrLn (show a++" "++show b++" "++show c))
03:36:45 <jackdk> energizer: by "type bottom" do you mean an uninhabited type?
03:36:50 <energizer> jackdk: yes
03:37:02 <Guest58> display :: [(Int, Int, Int)] -> IO ()
03:37:03 <Guest58> display = mapM_ (\(a,b,c) -> putStrLn (show a++" "++show b++" "++show c))
03:37:10 <dsal> Guest58: Yes. Don't do that. It appears to be not what you want at all.
03:37:15 <jackdk> energizer: consider the function of type `Either Void a -> a`
03:37:50 Γ— motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 240 seconds)
03:37:57 <jackdk> energizer: I used this with a lib "run a DB transaction wot might fail", but if it can't fail, then we can say its error type is `Void` and escape the `Either1
03:38:26 Γ— nahcetan quits (~nate@98.45.169.16) (Ping timeout: 255 seconds)
03:38:53 <dsal> Guest58: Otherwise, you've got `premiereRegle chaine *> print (algoTriage a chaine)`
03:41:14 <energizer> jackdk: i see
03:42:40 <Guest58> dsal thanks
03:42:48 Γ— indiana-bones quits (~indignant@23.27.44.157) (Quit: Leaving)
03:46:13 Γ— jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Read error: Connection reset by peer)
03:48:03 β†’ jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
03:50:14 β†’ littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
03:50:17 β†’ mvk joins (~mvk@2607:fea8:5ce3:8500::ba9a)
03:51:30 β†’ motherfsck joins (~motherfsc@user/motherfsck)
03:55:33 Γ— jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
03:56:16 β†’ jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
03:56:55 β†’ fluxit joins (~fluxit@techsmix.net)
04:02:59 Γ— jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
04:05:06 <Guest58> dsal i made some changes in my function so now it return a [String]
04:05:06 <Guest58> display' :: [(Int, Int, Int)] -> [String]
04:05:07 <Guest58> ["1 43525 5","2 7455 3","3 25545 7"]
04:05:18 <Guest58> is there a way to display the string line by line
04:05:31 <dsal> :t traverse_ putStrLn
04:05:33 <lambdabot> Foldable t => t String -> IO ()
04:05:51 <dsal> But you can also add your other messages to that.
04:05:59 <Guest58> but traverse return an IO
04:06:00 <dsal> :t putStrLn . fmap unlines
04:06:01 <lambdabot> error:
04:06:01 <lambdabot> β€’ Couldn't match type β€˜[Char]’ with β€˜Char’
04:06:02 <lambdabot> Expected type: [[String]] -> String
04:06:03 <Guest58> so i can't use it
04:06:09 <dsal> If you want to print something, you're going to need IO
04:06:34 <dsal> That's a different part of your program, though. One part computes stuff and another part deals with IO.
04:07:13 <Guest58> okeey i see thanks
04:07:23 β†’ Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net)
04:08:53 β†’ nahcetan joins (~nate@98.45.169.16)
04:15:03 β†’ dsrt^ joins (~dsrt@128-092-173-218.biz.spectrum.com)
04:21:34 Γ— pottsy quits (~pottsy@129.227.183.244) (Ping timeout: 265 seconds)
04:22:33 β†’ pottsy joins (~pottsy@129.227.183.244)
04:22:34 β†’ takuan joins (~takuan@178-116-218-225.access.telenet.be)
04:25:03 β†’ Infinite joins (~Infinite@49.39.116.10)
04:25:22 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 250 seconds)
04:25:48 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 250 seconds)
04:38:17 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
04:39:26 β†’ TonyStone joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
04:48:27 β†’ acidjnk joins (~acidjnk@p200300d0c7068b541d0d8c43393e2baa.dip0.t-ipconnect.de)
05:02:23 Γ— russruss quits (~russruss@my.russellmcc.com) (Quit: The Lounge - https://thelounge.chat)
05:04:32 β†’ russruss joins (~russruss@my.russellmcc.com)
05:05:08 β†’ mbuf joins (~Shakthi@136.185.67.112)
05:05:52 Γ— Guest72 quits (~Guest72@240e:341:3834:600:c40c:924c:6b2a:838f) (Quit: Client closed)
05:09:39 Γ— acidjnk quits (~acidjnk@p200300d0c7068b541d0d8c43393e2baa.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
05:15:50 Γ— nahcetan quits (~nate@98.45.169.16) (Ping timeout: 240 seconds)
05:16:59 ← jakalx parts (~jakalx@base.jakalx.net) ()
05:17:40 β†’ chomwitt joins (~chomwitt@2a02:587:dc0e:3e00:8d09:3de9:107a:d1d4)
05:19:00 β†’ jakalx joins (~jakalx@base.jakalx.net)
05:26:12 β†’ odnes joins (~odnes@5-203-147-232.pat.nym.cosmote.net)
05:34:11 Γ— zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection)
05:34:50 β†’ bilegeek joins (~bilegeek@2600:1008:b04d:98d6:c648:4dbb:39b5:27a6)
05:35:39 β†’ zaquest joins (~notzaques@5.130.79.72)
05:39:10 Γ— img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
05:39:27 β†’ img joins (~img@user/img)
05:40:50 Γ— mvk quits (~mvk@2607:fea8:5ce3:8500::ba9a) (Ping timeout: 255 seconds)
05:42:26 β†’ Qudit joins (~user@user/Qudit)
05:47:05 Γ— Guest58 quits (~Guest58@modemcable048.16-160-184.mc.videotron.ca) (Quit: Client closed)
06:00:06 β†’ nahcetan joins (~nate@98.45.169.16)
06:04:03 Γ— Kaiepi quits (~Kaiepi@156.34.47.253) (Ping timeout: 276 seconds)
06:04:24 Γ— nahcetan quits (~nate@98.45.169.16) (Ping timeout: 246 seconds)
06:04:34 Γ— littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
06:05:06 β†’ vysn joins (~vysn@user/vysn)
06:11:59 β†’ kuribas joins (~user@ptr-17d51epjxsvdsap3t84.18120a2.ip6.access.telenet.be)
06:15:25 β†’ coot joins (~coot@213.134.190.95)
06:16:19 β†’ trillp joins (~trillp@104.238.146.219)
06:24:28 Γ— Qudit quits (~user@user/Qudit) (Remote host closed the connection)
06:25:19 β†’ michalz joins (~michalz@185.246.204.101)
06:27:44 β†’ _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl)
06:30:29 β†’ nate3 joins (~nate@98.45.169.16)
06:34:12 Γ— Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
06:35:12 Γ— nate3 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds)
06:37:07 β†’ `2jt joins (~jtomas@182.red-88-17-61.dynamicip.rima-tde.net)
06:45:47 Γ— califax quits (~califax@user/califx) (Remote host closed the connection)
06:46:58 β†’ califax joins (~califax@user/califx)
06:55:11 Γ— _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
07:07:46 β†’ chele joins (~chele@user/chele)
07:12:28 Γ— mbuf quits (~Shakthi@136.185.67.112) (Quit: Leaving)
07:17:14 β†’ vpan joins (~0@212.117.1.172)
07:23:13 β†’ gehmehgeh joins (~user@user/gehmehgeh)
07:28:13 β†’ Qudit joins (~user@user/Qudit)
07:29:36 β†’ Pickchea joins (~private@user/pickchea)
07:30:32 Γ— tcard quits (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving)
07:30:52 β†’ trisolaran joins (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
07:31:08 Γ— shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit)
07:32:21 β†’ dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
07:35:23 β†’ tcard joins (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
07:37:52 Γ— dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.5)
07:39:04 Γ— tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
07:43:27 Γ— perrierjouet quits (~perrier-j@62.182.99.39) (Ping timeout: 246 seconds)
07:47:32 Γ— gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
07:48:06 β†’ machinedgod joins (~machinedg@24.105.81.50)
07:53:04 Furor is now known as Colere
07:58:08 β†’ jgeerds joins (~jgeerds@55d45f48.access.ecotel.net)
07:58:48 β†’ perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
08:00:40 Γ— HotblackDesiato quits (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection)
08:01:01 β†’ HotblackDesiato joins (~HotblackD@gateway/tor-sasl/hotblackdesiato)
08:08:43 Γ— Qudit quits (~user@user/Qudit) (Remote host closed the connection)
08:09:08 Γ— fluxit quits (~fluxit@techsmix.net) (Quit: Bye!)
08:09:46 β†’ fluxit joins (~fluxit@techsmix.net)
08:09:58 β†’ Qudit joins (~user@user/Qudit)
08:10:59 Γ— coot quits (~coot@213.134.190.95) (Quit: coot)
08:11:31 β†’ coot joins (~coot@213.134.190.95)
08:13:50 Γ— bilegeek quits (~bilegeek@2600:1008:b04d:98d6:c648:4dbb:39b5:27a6) (Ping timeout: 255 seconds)
08:16:26 β†’ alp joins (~alp@user/alp)
08:30:39 Γ— Pickchea quits (~private@user/pickchea) (Quit: Leaving)
08:30:45 β†’ bilegeek joins (~bilegeek@2600:1008:b015:fe62:945b:c76f:8130:b04c)
08:34:54 Γ— vpan quits (~0@212.117.1.172) (Ping timeout: 246 seconds)
08:39:39 Γ— jgeerds quits (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 258 seconds)
08:58:50 Γ— dsrt^ quits (~dsrt@128-092-173-218.biz.spectrum.com) (Ping timeout: 255 seconds)
09:00:29 β†’ odnes_ joins (~odnes@5-203-147-232.pat.nym.cosmote.net)
09:00:44 Γ— odnes quits (~odnes@5-203-147-232.pat.nym.cosmote.net) (Read error: Connection reset by peer)
09:03:33 β†’ ubert joins (~Thunderbi@2a02:8109:abc0:6434:61f4:5b76:26c2:daca)
09:07:24 Γ— causal quits (~user@50.35.83.177) (Quit: WeeChat 3.5)
09:13:51 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Remote host closed the connection)
09:14:44 Γ— bilegeek quits (~bilegeek@2600:1008:b015:fe62:945b:c76f:8130:b04c) (Quit: Leaving)
09:18:10 Γ— jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 244 seconds)
09:30:38 Γ— `2jt quits (~jtomas@182.red-88-17-61.dynamicip.rima-tde.net) (Ping timeout: 258 seconds)
09:49:34 Γ— bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
09:52:49 β†’ bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
10:00:07 Γ— econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:02:11 Γ— trisolaran quits (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds)
10:07:43 β†’ __monty__ joins (~toonn@user/toonn)
10:08:24 β†’ gurkenglas joins (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de)
10:09:37 Γ— pottsy quits (~pottsy@129.227.183.244) (Quit: Leaving)
10:14:16 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
10:18:11 β†’ vpan joins (~0@212.117.1.172)
10:18:12 β†’ nahcetan joins (~nate@98.45.169.16)
10:18:22 β†’ gehmehgeh joins (~user@user/gehmehgeh)
10:18:56 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Ping timeout: 255 seconds)
10:25:51 Γ— nahcetan quits (~nate@98.45.169.16) (Ping timeout: 246 seconds)
10:31:05 Γ— xff0x quits (~xff0x@s5.HtokyoFL1.vectant.ne.jp) (Ping timeout: 256 seconds)
10:32:00 β†’ nate3 joins (~nate@98.45.169.16)
10:33:05 <vpan> hi, I got
10:33:05 <vpan> > cabal: Failed to build hedgehog-1.0.5 (which is required by test:iplookup-test from hid-examples-0.5 and exe:ipgen from hid-examples-0.5). The build process terminated with exit code -6
10:33:05 <vpan> but I did not find exit code values in the user guide. Even more strange is that the error is not reproducible - I reran `cabal build` without any changes and hedgehog-1.0.5 was built successfully. Is it "normal" to have such non-repeatable build errors?
10:33:07 <lambdabot> error: Variable not in scope: cabalerror:
10:33:07 <lambdabot> β€’ Data constructor not in scope:
10:33:07 <lambdabot> Failed
10:34:36 <geekosaur> it's not normal, no. and the real error should have preceded that, although possibly you would need to dig out the build log to find it (I would classify that as a bug though)
10:36:30 <vpan> ok, at least that's not considered normal. :) I'll try to resist developing the habit to rerun after a build failure to make sure it does not go away automagically
10:36:42 Γ— nate3 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds)
10:38:18 <geekosaur> I think we'd like to figure out why it failed so we can try to fix it
10:38:23 <vpan> I used cabal 3.0.0 and GHC 8.8.4 for the build, I suppose a potentially useful bug report would have to be made against the latest versions?
10:38:28 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 250 seconds)
10:38:53 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
10:39:31 <geekosaur> I know cabal builds stuff in parallel and, while Haskell related stuff is normally resistant, it's very common for parallel builds to lead to crashes due to undeclared dependency issues or etc. such that a restart just happens to make things happen in the right order the secodn time
10:40:37 <vpan> right, I intuitively suspected something of that nature as the error seemed non-deterministic
10:44:56 Γ— kuribas quits (~user@ptr-17d51epjxsvdsap3t84.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
10:46:11 <geekosaur> and yes, you'd want to reproduce this with latest versions. note that cabal-3.8.1.0-rc1 was released yesterday (https://discourse.haskell.org/t/cabal-3-8-pre-released/4631)
10:46:30 <geekosaur> I'd test against that rather than 3.6.2.0
10:52:41 Γ— vpan quits (~0@212.117.1.172) (Read error: Connection reset by peer)
10:53:56 β†’ vpan joins (~0@212.117.1.172)
11:04:35 β†’ `2jt joins (~jtomas@79.116.75.126)
11:10:04 Γ— bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
11:18:24 β†’ littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
11:25:34 Γ— littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
11:26:53 Γ— `2jt quits (~jtomas@79.116.75.126) (Ping timeout: 255 seconds)
11:28:56 β†’ xff0x joins (~xff0x@b133147.ppp.asahi-net.or.jp)
11:31:05 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
11:31:49 β†’ lyle joins (~lyle@104.246.145.85)
11:35:26 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Ping timeout: 255 seconds)
11:37:07 β†’ littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
11:38:39 β†’ bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
11:41:06 β†’ nschoe joins (~quassel@2a01:e0a:8e:a190:b9b8:93ca:1f99:9d71)
11:45:53 β†’ jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net)
11:51:37 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 244 seconds)
11:52:08 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 250 seconds)
12:00:18 Γ— coot quits (~coot@213.134.190.95) (Quit: coot)
12:02:36 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
12:03:53 β†’ Kaiepi joins (~Kaiepi@156.34.47.253)
12:04:31 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
12:05:19 β†’ TonyStone joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
12:05:43 β†’ AlexNoo_ joins (~AlexNoo@178.34.151.152)
12:06:50 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Ping timeout: 252 seconds)
12:07:31 Γ— sloorush quits (~sloorush@52.187.184.81) (Quit: ZNC 1.7.5+deb4 - https://znc.in)
12:07:42 Γ— AlexZenon quits (~alzenon@178.34.150.59) (Ping timeout: 246 seconds)
12:07:47 β†’ sloorush joins (~sloorush@52.187.184.81)
12:07:55 Γ— sloorush quits (~sloorush@52.187.184.81) (Remote host closed the connection)
12:08:17 Γ— Alex_test quits (~al_test@178.34.150.59) (Ping timeout: 255 seconds)
12:08:30 β†’ sloorush joins (~sloorush@52.187.184.81)
12:08:53 Γ— newhoggy quits (sid198874@id-198874.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
12:09:06 Γ— AlexNoo quits (~AlexNoo@178.34.150.59) (Ping timeout: 246 seconds)
12:09:26 Γ— sloorush quits (~sloorush@52.187.184.81) (Client Quit)
12:11:32 β†’ sloorush joins (~sloorush@52.187.184.81)
12:12:04 Γ— bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
12:12:47 β†’ AlexZenon joins (~alzenon@178.34.151.152)
12:12:54 β†’ Alex_test joins (~al_test@178.34.151.152)
12:13:03 Γ— sloorush quits (~sloorush@52.187.184.81) (Client Quit)
12:16:03 β†’ sloorush joins (~sloorush@52.187.184.81)
12:17:10 Γ— sloorush quits (~sloorush@52.187.184.81) (Client Quit)
12:18:01 β†’ sloorush joins (~sloorush@52.187.184.81)
12:18:28 Γ— jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
12:21:55 Γ— Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
12:25:05 Γ— geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving)
12:26:29 β†’ geekosaur joins (~geekosaur@xmonad/geekosaur)
12:33:05 β†’ dcleonarski joins (~user@2804:d51:4704:e400:680:84d0:9355:7c5b)
12:33:40 β†’ trisolaran joins (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
12:37:05 Γ— raym quits (~raym@user/raym) (Ping timeout: 255 seconds)
12:37:43 β†’ raym joins (~raym@user/raym)
12:43:45 Γ— odnes_ quits (~odnes@5-203-147-232.pat.nym.cosmote.net) (Ping timeout: 246 seconds)
12:56:22 β†’ spacenautx joins (~spacenaut@user/spacenautx)
13:01:29 <mesaoptimizer> https://lexi-lambda.github.io/blog/2020/01/19/no-dynamic-type-systems-are-not-inherently-more-open/
13:02:04 <mesaoptimizer> I had the exact misconceptions about supposed advantages of dynamic typing, that are debunked in this post
13:04:34 Γ— califax quits (~califax@user/califx) (Ping timeout: 240 seconds)
13:04:46 β†’ califax joins (~califax@user/califx)
13:09:26 Γ— sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Remote host closed the connection)
13:09:54 β†’ jgeerds joins (~jgeerds@55d45f48.access.ecotel.net)
13:12:53 β†’ fendor joins (~fendor@178.115.49.232.wireless.dyn.drei.com)
13:14:04 β†’ sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
13:14:59 β†’ bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
13:17:47 Γ— jgeerds quits (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 240 seconds)
13:18:12 β†’ vicfred joins (~vicfred@user/vicfred)
13:30:10 β†’ jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
13:34:04 Γ— littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
13:35:30 β†’ zeenk joins (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980)
13:36:04 <tomsmeding> I have a C file in my haskell project that uses rtsConfig, a symbol from GHC's RTS. ( https://gitlab.haskell.org/ghc/ghc/-/blob/master/rts/include/RtsAPI.h#L123 ) Normally this works quite fine, but if the Haskell code uses a TH splice, I get a link error by ghc saying that 'rtsConfig' is an undefined symbol.
13:36:32 <tomsmeding> Presumably this is when linking the TH splice, because the error disappears if I remove the splice (which does not do anything -- $(return [])) from the source
13:37:01 <tomsmeding> does anyone happen to know if this is fixable? I don't need my C code to be available in the splice
13:37:20 <tomsmeding> so somehow conditionally enabling the .c file only if ghc is _not_ compiling a TH splice would be fine
13:39:07 Γ— nschoe quits (~quassel@2a01:e0a:8e:a190:b9b8:93ca:1f99:9d71) (Ping timeout: 240 seconds)
13:39:24 Γ— trisolaran quits (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 246 seconds)
13:45:50 <jean-paul[m]> When is `22.05pre` going to change to `22.05`? Or am I using the wrong branch or something? If I build with a revision from either nixos-22.05 or release-22.05, I get `22.05pre`.
13:46:27 Γ— cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds)
13:46:29 <tomsmeding> jean-paul[m]: #nixos ?
13:49:48 <jean-paul[m]> yes sorry, wasn't paying attention to where I was
13:50:11 β†’ cheater joins (~Username@user/cheater)
13:52:04 Γ— Cale quits (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Ping timeout: 258 seconds)
13:52:44 β†’ Cale joins (~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com)
13:53:28 AlexNoo_ is now known as AlexNoo
13:55:56 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
14:00:24 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Ping timeout: 250 seconds)
14:01:16 β†’ nschoe joins (~quassel@2a01:e0a:8e:a190:75f7:546e:234f:6b81)
14:05:44 Γ— Infinite quits (~Infinite@49.39.116.10) (Ping timeout: 252 seconds)
14:05:45 β†’ coot joins (~coot@213.134.190.95)
14:05:55 <maralorn> What do I do to convert a "Q String" into a "Code Q String"?
14:06:38 <tomsmeding> maralorn: that sounds fishy, are you not just looking for (>>=) :: Q a -> (a -> Q b) -> Q b?
14:08:21 <maralorn> Note sure.
14:08:46 <maralorn> It’s years that I wrote that code. But with newest base it doesnβ€˜t type check anymore.
14:09:03 <maralorn> newest template-haskell rather.
14:09:30 <tomsmeding> maralorn: maybe share the full error?
14:10:48 <maralorn> tomsmeding: https://paste.lossy.network/IU
14:11:54 <maralorn> My problem is pretty basic.
14:12:31 <maralorn> I have an `IO a`, an `a -> b` and then I want to liftTyped the resulting b
14:15:21 <tomsmeding> maralorn: ah, I think the thing is that previously that =<< was in the Q monad, but now liftTyped returns something with type 'Code ...'
14:15:33 <tomsmeding> but this makes no sense anyway because Code is not a monad
14:15:42 <maralorn> Yep
14:16:00 <maralorn> Oh, thats sad.^^
14:16:57 β†’ shriekingnoise joins (~shrieking@201.231.16.156)
14:17:09 <maralorn> Ah, I think I need to apply the lifted to the whole Q now.
14:17:27 <tomsmeding> maralorn: use `lift` instead of `liftTyped`, and `unsafeCodeCoerce` the whole thing
14:18:04 <maralorn> Well, what’s the point of typed TH then.^^
14:18:12 <tomsmeding> `unsafeCodeCoerce (runIO pathBinsAbs >>= lift . mapMaybe ...))`
14:18:13 <tomsmeding> maralorn: none
14:18:22 <tomsmeding> well, the point of typed TH is give a typed external interface
14:18:31 <tomsmeding> within your TH splices you're up to your own devices again
14:19:32 β†’ `2jt joins (~jtomas@182.red-88-17-61.dynamicip.rima-tde.net)
14:19:36 <tomsmeding> maralorn: if you look here you'll see that the definition of liftTyped is mostly just unsafeCodeCoerce.lift anyway https://hackage.haskell.org/package/template-haskell-2.18.0.0/docs/src/Language.Haskell.TH.Syntax.html#liftTyped
14:21:02 β†’ raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
14:24:07 β†’ [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
14:26:41 Γ— trillp quits (~trillp@104.238.146.219) (Quit: nyaa~)
14:27:09 Γ— `2jt quits (~jtomas@182.red-88-17-61.dynamicip.rima-tde.net) (Ping timeout: 276 seconds)
14:27:18 tomsmeding has no idea how one is even supposed to use liftTyped; with the given type it looks like it's only usable as $$(liftTyped _)), without _anything_ else
14:31:35 β†’ Sgeo joins (~Sgeo@user/sgeo)
14:33:30 β†’ nate3 joins (~nate@98.45.169.16)
14:33:54 β†’ odnes joins (~odnes@5-203-248-246.pat.nym.cosmote.net)
14:35:21 β†’ merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
14:36:02 <adamCS> When cabal dependency resolution fails because "constraint from user target requires
14:36:02 <adamCS> ==...) where do I look to figure out which thing is actually requiring that? I am trying to get 9.2.3 working and so chasing all sorts of bad upper bounds, nearly all mine. But I'm not sure where to look for "user target". It doesn't seem to be from the cabal file of the thing I am building.
14:36:32 <maralorn> tomsmeding: Found the solution: `bindCode :: forall m a (r :: RuntimeRep) (b :: TYPE r). Monad m => m a -> (a -> Code m b) -> Code m b`
14:38:27 Γ— nate3 quits (~nate@98.45.169.16) (Ping timeout: 258 seconds)
14:50:13 β†’ slack1256 joins (~slack1256@191.125.227.85)
14:51:01 <slack1256> Is there updated documentation on how `cabal-install` resolve the constraints on a package?
14:51:06 Γ— odnes quits (~odnes@5-203-248-246.pat.nym.cosmote.net) (Ping timeout: 258 seconds)
14:52:05 <slack1256> Old docs affirmed that it took in consideration what you had currently installed as reported by `ghc-pkg`. That blogpost is from 2008, maybe things have change? It would be awesome if resolution was deterministic dependending on base version and correct PVP bounds.
14:55:27 <c_wraith> it also depends on the current state of the cabal index
14:55:54 <c_wraith> (sort of obviously, as that is what stores most of the necessary constraint information)
14:56:49 Γ— vpan quits (~0@212.117.1.172) (Quit: Leaving.)
14:56:50 <c_wraith> what you have currently installed is not considered with v2 build commands
14:56:59 β†’ odnes joins (~odnes@5-203-248-246.pat.nym.cosmote.net)
14:57:00 <slack1256> !!!
14:57:16 <c_wraith> also, "currently installed" doesn't mean much of anything with v2 build commands
14:57:20 <slack1256> That, what is the most up to date docs on how constraint resolution proceeds on the new/v2 commands?
14:58:00 <slack1256> I should have specified that, that I meant under the v2- commands.
15:00:08 β†’ epolanski joins (uid312403@id-312403.helmsley.irccloud.com)
15:01:54 Γ— pavonia quits (~user@user/siracusa) (Quit: Bye!)
15:02:21 β†’ zincy joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com)
15:07:30 Γ— zincy quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Ping timeout: 240 seconds)
15:08:46 Γ— ubert quits (~Thunderbi@2a02:8109:abc0:6434:61f4:5b76:26c2:daca) (Read error: Connection reset by peer)
15:08:47 Γ— mjrosenb quits (~mjrosenb@pool-108-54-97-96.nycmny.fios.verizon.net) (Ping timeout: 240 seconds)
15:11:21 Γ— raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 276 seconds)
15:12:05 <adamCS> I figured it out. I was being silly; pulling the package from a git repo rather than hackage and forgot that. The perils of shifting from 8.10.7 to 9.2.3: lot's of weird "allow-newer" and versions from repos...
15:12:31 β†’ raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
15:15:49 β†’ pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
15:20:56 β†’ mjrosenb joins (~mjrosenb@pool-108-54-97-96.nycmny.fios.verizon.net)
15:22:18 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
15:26:44 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Ping timeout: 255 seconds)
15:31:13 β†’ nahcetan joins (~nate@98.45.169.16)
15:31:52 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
15:32:45 <darkling> I'm trying to write something where the main data structure is a map from strings to either strings or integers (or, ultimately, a few other types, but I'm starting small). As a complete beginner in Haskell, I'm having some trouble streamlining it.
15:32:56 <darkling> My current code: https://paste.tomsmeding.com/AZGHmcxr
15:33:35 β†’ zincy joins (~zincy@2a00:23c8:970c:4801:10b4:e123:1cab:7458)
15:34:26 <darkling> I was trying to unify updateObjectNumber and updateObjectText, but I haven't been able to write anything that passes the compiler.
15:35:51 Γ— zincy quits (~zincy@2a00:23c8:970c:4801:10b4:e123:1cab:7458) (Remote host closed the connection)
15:35:54 <geekosaur> you'll have trouble doing so, I think
15:36:03 β†’ zincy joins (~zincy@2a00:23c8:970c:4801:10b4:e123:1cab:7458)
15:36:18 Γ— ashln quits (~ashln@98.38.236.123) (Ping timeout: 246 seconds)
15:36:23 <darkling> Ah, OK, that would explain why I couldn't manage it. :)
15:36:53 <geekosaur> for one, what would you expect that function parameter's type to be?
15:38:55 <darkling> Possibly Updater -> String -> ObjectData -> ObjectData, where Updater = Num (Int -> Int) | Text (String -> String)
15:39:27 <darkling> but then is there some similarity between Updater and Item that can be expressed in the code?
15:40:25 <geekosaur> you can't reuse the constructor names
15:42:21 β†’ ashln joins (~ashln@98.38.236.123)
15:44:12 β†’ trisolaran joins (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
15:45:38 Γ— polezaivsani quits (~polezaivs@orangeshoelaces.net) (Ping timeout: 255 seconds)
15:45:41 <darkling> Got it. Is there anything I can do about the unwrap/apply/wrap pattern in the updater functions? Feels like something that a functor would help with, but again, I couldn't find an appropriate form of words to make the compiler (or me) happy.
15:46:46 <darkling> Maybe that's inappropriate here (or too advanced for me right now; or just too trivial a case to care)
15:47:34 <geekosaur> it can't be a functor
15:47:37 <geekosaur> :t fmap
15:47:38 <lambdabot> Functor f => (a -> b) -> f a -> f b
15:47:58 <[Leary]> If you declare `data Item a b = Num a | Text b`, then `Item` is a Bifunctor and the two cases become `first f` and `second f`. But that won't scale to more constructors.
15:48:15 <[Leary]> It might be better just to write your own `mapNum` and `mapText` functions.
15:48:32 <geekosaur> yes, this seems like the wrong approach
15:48:39 <[Leary]> Currently, those patterns will crash on the wrong constructor.
15:48:58 Γ— chomwitt quits (~chomwitt@2a02:587:dc0e:3e00:8d09:3de9:107a:d1d4) (Quit: Leaving)
15:49:11 <geekosaur> yeh, that caught my eye too. especially since fixing getNumber in particular is trivial
15:49:28 β†’ tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
15:50:34 <[exa]> darkling: should the updates be able to "switch" the type of your data from String to Int (or the other way) ?
15:50:46 <tomsmeding> maralorn: interesting! I wonder why there is no `pureCode`
15:51:10 Γ— bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 240 seconds)
15:52:28 β†’ rekahsoft joins (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca)
15:53:34 geekosaur was wondering if the dependent-map package might be helpful here since the examples seem to assume that suchh switching is not possible
15:53:58 <geekosaur> flip side, throwing dependent-map at a beginner is not the best of ideas :)
15:54:04 <darkling> [exa]: No, a given key will always be the same type
15:54:20 <[exa]> darkling: anyway it's quite usual to make the unwrap/wrap functions yourself, but ideally for the base types. In this case I'd go for something like `updateItem :: (Int->Int) -> (String->String) -> Item -> Item` and then expand it
15:54:55 <geekosaur> isn't that kind of the Bifunctor approach done manually?
15:55:00 <[exa]> notice how you may easily specialize that function to string-only or int-only case, such as `updateItem (+1) id someItem`
15:55:18 β†’ Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net)
15:55:32 <slack1256> I think I am loving linear-base. More reasons to not learn rust </s> hahahaha
15:55:34 <[exa]> geekosaur: yeah but it was hinted that the stuff would eventually get updated to trifunctors.. :]
15:56:33 <darkling> [exa]: So I pattern match on the first Item, and decide which of the two functions to use on it?
15:57:47 <[exa]> yes
15:58:02 <[exa]> oh wait, first item? that is only for 1 item right?
15:58:40 <geekosaur> I think they're going by your type signature which has two (one in, one out)
15:58:54 <darkling> Yeah, sorry, that's what I meant.
15:59:16 <[exa]> ah yes, sorry, misinterpreted :D
16:00:12 <darkling> Of course, there's only one Item as a parameter to the function, so my qualification was unnecessary. :)
16:02:19 β†’ zebrag joins (~chris@user/zebrag)
16:04:42 bgamari_ is now known as bgamari
16:05:02 <[exa]> also, you could technically use lenses to do this, because they kinda capture this rewrapping
16:06:06 β†’ ec joins (~ec@gateway/tor-sasl/ec)
16:06:12 <darkling> Sounds like an opportunity for a refactor... maybe in a couple of years once I'm more comfortable with the basics. :)
16:06:36 β†’ Topsi joins (~Topsi@dyndsl-095-033-023-128.ewe-ip-backbone.de)
16:06:40 <darkling> Good to know that I'm not completely off-piste with what little I've manged so far.
16:06:43 <darkling> Thanks, all.
16:07:32 <[exa]> yeah like, lenses might be confusing for beginners, but imo the stuff is pretty intuitive
16:08:31 <[exa]> (unless you get a 10page error message about a rank2 type that you have never seen, which sometimes happens :D )
16:08:53 <darkling> I'm trying to limit the required rate of learning, to avoid educational yak shaving.
16:09:16 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Remote host closed the connection)
16:10:32 β†’ Feuermagier_ joins (~Feuermagi@84.17.49.18)
16:10:42 β†’ jbrechtel joins (~Srain@162-226-201-119.lightspeed.tukrga.sbcglobal.net)
16:12:17 <[exa]> reasonable. :]
16:13:05 Γ— Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 255 seconds)
16:13:09 β†’ bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
16:18:57 β†’ z0k joins (~z0k@206.84.141.40)
16:19:29 Γ— z0k quits (~z0k@206.84.141.40) (Client Quit)
16:21:36 β†’ benin joins (~benin@183.82.27.240)
16:23:16 Γ— coot quits (~coot@213.134.190.95) (Quit: coot)
16:24:46 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
16:28:27 Γ— machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
16:29:11 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Ping timeout: 252 seconds)
16:30:04 β†’ littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
16:34:13 Γ— nahcetan quits (~nate@98.45.169.16) (Ping timeout: 258 seconds)
16:34:29 β†’ z0k joins (~z0k@206.84.141.40)
16:40:09 Γ— zincy quits (~zincy@2a00:23c8:970c:4801:10b4:e123:1cab:7458) (Remote host closed the connection)
16:46:46 β†’ waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
16:47:34 Γ— littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
16:48:47 Γ— nschoe quits (~quassel@2a01:e0a:8e:a190:75f7:546e:234f:6b81) (Ping timeout: 260 seconds)
16:54:50 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 260 seconds)
16:55:17 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
16:56:08 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 252 seconds)
16:56:40 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
16:58:04 Γ— ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds)
16:58:54 Γ— zeenk quits (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) (Quit: Konversation terminated!)
17:00:15 β†’ TonyStone joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
17:03:35 β†’ sagax joins (~sagax_nb@user/sagax)
17:04:02 β†’ littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
17:05:17 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 255 seconds)
17:05:17 Γ— vysn quits (~vysn@user/vysn) (Ping timeout: 255 seconds)
17:05:44 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 255 seconds)
17:06:35 β†’ acidjnk joins (~acidjnk@p200300d0c7068b544073bd7649ab66e5.dip0.t-ipconnect.de)
17:08:34 Γ— littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
17:10:34 β†’ econo joins (uid147250@user/econo)
17:10:37 β†’ jgeerds joins (~jgeerds@55d45f48.access.ecotel.net)
17:11:56 Γ— [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 250 seconds)
17:13:33 β†’ [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
17:17:56 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
17:18:01 Γ— gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection)
17:18:52 β†’ TonyStone joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
17:19:12 β†’ gehmehgeh joins (~user@user/gehmehgeh)
17:24:53 β†’ zer0bitz joins (~zer0bitz@2001:2003:f444:8f00:a9b0:33d4:b0a2:7015)
17:26:25 Γ— acidjnk quits (~acidjnk@p200300d0c7068b544073bd7649ab66e5.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
17:26:26 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 255 seconds)
17:26:26 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 255 seconds)
17:29:40 β†’ littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
17:30:54 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
17:40:32 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 250 seconds)
17:40:48 β†’ odnes_ joins (~odnes@5-203-183-6.pat.nym.cosmote.net)
17:41:09 Γ— odnes quits (~odnes@5-203-248-246.pat.nym.cosmote.net) (Read error: Connection reset by peer)
17:41:36 β†’ fef joins (~thedawn@user/thedawn)
17:41:57 β†’ TonyStone joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
17:42:06 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
17:43:37 <maerwald> hmm.. quite peculiar: https://hackage.haskell.org/package/focus-1.0.1.4/docs/Focus.html#t:Focus
17:48:02 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 255 seconds)
17:48:02 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 255 seconds)
17:52:59 Γ— Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
17:58:19 ← obviyus parts (sid415299@user/obviyus) ()
17:59:52 β†’ TonyStone joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
18:01:32 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Max SendQ exceeded)
18:01:45 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
18:01:57 β†’ TonyStone joins (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com)
18:05:47 Γ— slack1256 quits (~slack1256@191.125.227.85) (Read error: Connection reset by peer)
18:05:58 β†’ slack1256 joins (~slack1256@186.11.14.234)
18:07:38 β†’ slac47205 joins (~slack1256@191.126.227.85)
18:07:41 β†’ _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl)
18:08:47 Γ— TonyStone quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 240 seconds)
18:09:20 β†’ moonsheep joins (~user@user/moonsheep)
18:10:18 Γ— slack1256 quits (~slack1256@186.11.14.234) (Ping timeout: 246 seconds)
18:10:39 Γ— z0k quits (~z0k@206.84.141.40) (Ping timeout: 246 seconds)
18:11:01 <moonsheep> When buiding llvm-hs I get the following error: "llvm-config: error: libLLVM-9.so is missing"
18:11:10 β†’ nahcetan joins (~nate@98.45.169.16)
18:11:14 <moonsheep> I installed llvm 9 from source because my distro doesn't provide binary packages
18:12:47 β†’ z0k joins (~z0k@206.84.141.40)
18:15:00 Γ— jgeerds quits (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 248 seconds)
18:16:04 Γ— littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
18:18:01 β†’ causal joins (~user@50.35.83.177)
18:19:16 Γ— trisolaran quits (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 248 seconds)
18:24:10 β†’ littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
18:26:03 Γ— vglfr quits (~vglfr@coupling.penchant.volia.net) (Ping timeout: 246 seconds)
18:33:09 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Remote host closed the connection)
18:34:30 β†’ fetsorn joins (~fetsorn@87.241.189.9)
18:34:58 β†’ nate3 joins (~nate@98.45.169.16)
18:35:01 Γ— fetsorn quits (~fetsorn@87.241.189.9) (Client Quit)
18:35:43 β†’ fetsorn joins (~fetsorn@87.241.189.9)
18:35:57 <geekosaur> is llvm-config looking in the right place for it?
18:38:56 Γ— fetsorn quits (~fetsorn@87.241.189.9) (Client Quit)
18:39:42 Γ— nate3 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds)
18:48:26 β†’ vglfr joins (~vglfr@coupling.penchant.volia.net)
18:48:54 Γ— z0k quits (~z0k@206.84.141.40) (Quit: WeeChat 3.5)
18:49:16 <ashln> how might one abort a recursive function on SIGINT?
18:49:17 β†’ jmdaemon joins (~jmdaemon@user/jmdaemon)
18:50:21 <geekosaur> normally it should just work. but if the function isn't doing any allocations you may need to compile with -fno-omit-yields
18:51:13 <ashln> ah, i mean return normally from the function to continue with a graceful cleanup, not abort the whole program, if that's what you're saying
18:51:30 Γ— raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
18:52:41 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
18:54:08 <geekosaur> then you have to trap it. you'll want to use System.Posix.Signals since Windows does something almost completely different with signals; if you are in fact on Windows then you need to look at SetCtrlCHandler, for which I think a binding is somewhere under System.Win32
18:54:45 <geekosaur> npote that trapping signals means running in IO; for a pure function there's not even a way to be aware of signals
18:55:10 <ashln> oh thanks, i'll look more into that!
18:56:14 <geekosaur> (and this may lead you into ContT IO or some other tarpit)
18:57:48 β†’ whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
18:57:48 <ashln> would setting an mVar on SIGINT be an appropriate solution?
18:58:34 <monochrom> w00t ContT IO. Not a tarpit. :)
18:58:43 <geekosaur> I'm thinking more about what you do to abort the recursion, that might require ContT
18:59:21 <geekosaur> how you forward the signal to the function could be MVar or TVar or a few other ways
19:02:19 <ashln> ah okay
19:05:04 <hololeap> perhaps rio might be helpful at that point
19:06:41 <EvanR> System.Timeout has some thoughts on aborting a computation, in that case by timing out
19:07:25 β†’ vysn joins (~vysn@user/vysn)
19:08:37 β†’ agumonkey joins (~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7)
19:10:36 <EvanR> the basic principle and the issues associated with it should work for signals
19:19:36 β†’ fetsorn joins (~fetsorn@87.241.189.9)
19:19:46 Γ— epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
19:23:04 Γ— fef quits (~thedawn@user/thedawn) (Ping timeout: 240 seconds)
19:23:49 Γ— moonsheep quits (~user@user/moonsheep) (Remote host closed the connection)
19:25:21 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Remote host closed the connection)
19:27:02 Γ— fetsorn quits (~fetsorn@87.241.189.9) (Ping timeout: 255 seconds)
19:30:54 β†’ jgeerds joins (~jgeerds@55d45f48.access.ecotel.net)
19:33:14 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-b0b9-880e-c5d8-6c3e.res6.spectrum.com) (Ping timeout: 258 seconds)
19:34:04 <maerwald> ContT, the mother of all monads.
19:41:02 β†’ stackdroid18 joins (~stackdroi@user/stackdroid)
19:42:28 β†’ pavonia joins (~user@user/siracusa)
19:43:12 β†’ coot joins (~coot@213.134.190.95)
19:46:26 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-a177-c39b-f0e5-4ebe.res6.spectrum.com)
19:47:12 β†’ MajorBiscuit joins (~MajorBisc@2a02-a461-129d-1-6d4c-38a4-18b7-4b48.fixed6.kpn.net)
19:47:54 Γ— bjobjo quits (~bjobjo@user/bjobjo) (Quit: leaving)
19:50:35 β†’ chomwitt joins (~chomwitt@2a02:587:dc0e:3e00:aef5:6b9f:ef2:cb1f)
20:03:48 β†’ acidjnk joins (~acidjnk@p200300d0c7068b54b0b45aacebca8e8e.dip0.t-ipconnect.de)
20:05:15 Γ— MajorBiscuit quits (~MajorBisc@2a02-a461-129d-1-6d4c-38a4-18b7-4b48.fixed6.kpn.net) (Quit: WeeChat 3.5)
20:08:30 Γ— waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds)
20:11:16 Γ— _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
20:13:29 β†’ trisolaran joins (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
20:14:34 Γ— littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
20:16:24 Γ— coot quits (~coot@213.134.190.95) (Quit: coot)
20:16:24 Γ— slac47205 quits (~slack1256@191.126.227.85) (Read error: Connection reset by peer)
20:16:43 Γ— lyle quits (~lyle@104.246.145.85) (Quit: Lost terminal)
20:17:04 Γ— HotblackDesiato quits (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Ping timeout: 240 seconds)
20:17:21 β†’ slack1256 joins (~slack1256@186.11.9.106)
20:17:44 β†’ HotblackDesiato joins (~HotblackD@gateway/tor-sasl/hotblackdesiato)
20:18:57 Γ— odnes_ quits (~odnes@5-203-183-6.pat.nym.cosmote.net) (Quit: Leaving)
20:19:13 β†’ waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
20:19:16 Γ— waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Client Quit)
20:21:34 β†’ fendor_ joins (~fendor@178.165.192.249.wireless.dyn.drei.com)
20:23:50 Γ— fendor quits (~fendor@178.115.49.232.wireless.dyn.drei.com) (Ping timeout: 240 seconds)
20:25:45 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
20:25:57 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Remote host closed the connection)
20:26:05 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
20:26:23 β†’ littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
20:27:14 <hololeap> ew
20:28:20 <Bulby[m]> ContT??!? wait, is that jumping? I used polysemy's error for that 😱
20:29:54 ← jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
20:31:54 Γ— alp quits (~alp@user/alp) (Ping timeout: 272 seconds)
20:32:32 β†’ chazza joins (~igloo@cpc72417-sotn15-2-0-cust121.15-1.cable.virginm.net)
20:33:04 β†’ bjobjo joins (~bjobjo@user/bjobjo)
20:35:17 Γ— sagax quits (~sagax_nb@user/sagax) (Remote host closed the connection)
20:36:04 Γ— littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
20:36:28 Γ— chazza quits (~igloo@cpc72417-sotn15-2-0-cust121.15-1.cable.virginm.net) (Remote host closed the connection)
20:39:42 <maerwald> Bulby[m]: you use polysemy for everything
20:39:54 <Bulby[m]> \o/
20:39:56 <Bulby[m]> we have fun here
20:40:20 <EvanR> I'm getting the impression that polysemy is like haskell's jQuery. Is this wrong xD
20:40:30 <Bulby[m]> what is jQuery
20:40:36 <EvanR> forget it
20:40:50 <Bulby[m]> i don't write in stupid javascript
20:42:12 <geekosaur> polysemy is like a replacement for mtl and half the ecosystem based on mtl
20:42:46 Γ— vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
20:43:06 <Bulby[m]> can I record update with fmaping
20:43:21 β†’ littlebobeep joins (~alMalsamo@gateway/tor-sasl/almalsamo)
20:43:27 <Bulby[m]> I only update one field, but conditionally
20:43:50 Γ— cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds)
20:43:54 <Bulby[m]> thru Maybe
20:44:28 <Bulby[m]> meh, I'll just use case of statements
20:45:27 β†’ nate3 joins (~nate@98.45.169.16)
20:45:27 <maerwald> I find it interesting that Haskellers tend to favor abstraction over clear semantics
20:45:42 <Bulby[m]> wym
20:47:30 β†’ cheater joins (~Username@user/cheater)
20:47:43 <EvanR> the great thing about semantics is there's so many to choose from
20:48:04 <Rembane> maerwald: Any particular abstractions?
20:49:12 <maerwald> Rembane: polysemy
20:49:58 <Rembane> maerwald: I haven't really seen the meaning of that one, but maybe I'm not a Haskeller.
20:50:15 <maerwald> xD
20:53:09 <Bulby[m]> my computer is melting ☹️
20:53:17 Γ— takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
20:53:38 <EvanR> a melting computer is not very abstract
20:53:48 <Rembane> It's extremely concrete
20:53:51 <EvanR> lol
20:54:13 <darkling> Not sure I'd want to build with melting concrete.
20:54:50 <Rembane> As long as you reverse time it's cool
20:55:03 <Rembane> But generally, avoid non-causal concrete.
20:59:24 β†’ liz_ joins (~liz@host86-159-158-175.range86-159.btcentralplus.com)
21:01:37 β†’ waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
21:06:05 β†’ bilegeek joins (~bilegeek@2600:1008:b01f:31f8:a3e:b12c:dd8e:8844)
21:06:42 Γ— trisolaran quits (~ye@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 246 seconds)
21:08:30 Γ— ashln quits (~ashln@98.38.236.123) (Ping timeout: 240 seconds)
21:20:52 β†’ jakalx joins (~jakalx@base.jakalx.net)
21:23:48 Γ— chomwitt quits (~chomwitt@2a02:587:dc0e:3e00:aef5:6b9f:ef2:cb1f) (Ping timeout: 248 seconds)
21:26:09 Γ— michalz quits (~michalz@185.246.204.101) (Remote host closed the connection)
21:27:06 <dsal> Bulby[m]: updating like that is pretty easy with lens and StateT. Maybe there a polysemy stressful lens like thing
21:27:32 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-a177-c39b-f0e5-4ebe.res6.spectrum.com) (Ping timeout: 248 seconds)
21:39:12 β†’ fetsorn joins (~fetsorn@87.241.189.8)
21:40:05 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-a177-c39b-f0e5-4ebe.res6.spectrum.com)
21:40:34 Γ— fetsorn quits (~fetsorn@87.241.189.8) (Client Quit)
21:40:54 β†’ fetsorn joins (~fetsorn@87.241.189.8)
21:41:05 β†’ sagax joins (~sagax_nb@user/sagax)
21:41:37 Γ— agumonkey quits (~user@2a01:e0a:8f9:d3e0:b117:81a8:33f6:93e7) (Ping timeout: 260 seconds)
21:41:47 Γ— dolio quits (~dolio@130.44.130.54) (Quit: ZNC 1.8.2 - https://znc.in)
21:42:09 Γ— fetsorn quits (~fetsorn@87.241.189.8) (Remote host closed the connection)
21:44:04 β†’ dolio joins (~dolio@130.44.130.54)
21:44:38 β†’ ashln joins (~ashln@98.38.236.123)
21:45:43 Γ— dolio quits (~dolio@130.44.130.54) (Client Quit)
21:45:57 Γ— __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:46:41 Γ— chele quits (~chele@user/chele) (Remote host closed the connection)
21:47:35 β†’ dolio joins (~dolio@130.44.130.54)
21:48:46 β†’ alp joins (~alp@user/alp)
21:48:47 Γ— nate3 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds)
21:57:20 Γ— abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds)
22:00:57 Γ— eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110) (Remote host closed the connection)
22:01:48 Γ— dcoutts__ quits (~duncan@host86-144-78-203.range86-144.btcentralplus.com) (Ping timeout: 244 seconds)
22:03:07 Γ— slack1256 quits (~slack1256@186.11.9.106) (Ping timeout: 240 seconds)
22:07:17 Γ— lottaquestions quits (~nick@2607:fa49:5041:a200:3daf:9139:3014:7a17) (Quit: Konversation terminated!)
22:08:27 Γ— dcleonarski quits (~user@2804:d51:4704:e400:680:84d0:9355:7c5b) (Ping timeout: 260 seconds)
22:08:41 Γ— azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
22:09:07 β†’ azimut joins (~azimut@gateway/tor-sasl/azimut)
22:10:53 β†’ lottaquestions joins (~nick@2607:fa49:5041:a200:a394:e3c:d4d7:cf13)
22:11:05 β†’ zeenk joins (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980)
22:18:54 Γ— gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:19:34 Γ— acidjnk quits (~acidjnk@p200300d0c7068b54b0b45aacebca8e8e.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
22:20:52 Γ— jgeerds quits (~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 248 seconds)
22:24:07 β†’ Tuplanolla joins (~Tuplanoll@91-159-68-39.elisa-laajakaista.fi)
22:25:41 Γ— whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
22:27:44 β†’ eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:8199:e7da:e3d1:110)
23:00:04 Γ— littlebobeep quits (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds)
23:08:27 Γ— vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds)
23:14:17 Γ— spacenautx quits (~spacenaut@user/spacenautx) (Quit: WeeChat 3.0)
23:23:26 <Bulby[m]> <dsal> "Bulby: updating like that is..." <- what are you refering to
23:23:36 <Bulby[m]> sorry for the irc mess 😭
23:24:25 <dsal> Bulby[m]: lens has stateful update things.
23:24:25 <Bulby[m]> you mean record update with fmap?
23:24:29 <dsal> :t (+=)
23:24:31 <lambdabot> (MonadState s m, Num a) => ASetter' s a -> a -> m ()
23:24:59 <dsal> > flip execState (2,4) $ do { _1 += 11; _2 *= 6 }
23:25:02 <lambdabot> (13,24)
23:25:58 <Bulby[m]> :t execState
23:26:00 <lambdabot> State s a -> s -> s
23:26:32 <Bulby[m]> polysemy has basically that
23:26:34 <Bulby[m]> function
23:26:57 <dsal> I don't know polysemy, but I was talking mostly about `+=` and family.
23:27:02 <dsal> :t (%=)
23:27:04 <lambdabot> MonadState s m => ASetter s s a b -> (a -> b) -> m ()
23:28:00 <Bulby[m]> It doesn't implement monad state, but it should be fairly easy to implement
23:28:23 <Bulby[m]> given it's almost the same interface as StateT
23:29:26 β†’ _xor joins (~xor@72.49.198.103)
23:30:21 <dsal> I realize telling someone working within a polysemy bonfire to throw in some lens accelerant might be a destructive, but it sounded like what you were asking for.
23:30:46 <Bulby[m]> ... bonfire, accelerant? in what way?
23:31:22 <dsal> Like polysemy is nearly another language on Haskell, lens is another language on haskell.
23:31:33 Γ— zeenk quits (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) (Quit: Konversation terminated!)
23:31:57 Γ— bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 256 seconds)
23:32:01 <Bulby[m]> polysemy plugin is fun, it's nearly mandatory if you don't want verbose polysemy code
23:32:03 <dsal> And is slightly controversial. So it might be a struggle to wrap your brain around, but it's a pretty easy way in, for example, a state monad to do some deep manipulations.
23:32:55 <dsal> You can do weird stuff like this:
23:32:57 <dsal> > flip execState (2, Just (4, 27)) $ do { _1 += 11; _2 . _Just . _1 *= 6 }
23:32:59 <Bulby[m]> if you know a lot about this, is there a more sane way to "return" in an interpreter other than throwing and catching
23:33:00 <lambdabot> (13,Just (24,27))
23:33:12 <dsal> I'm using tuples which makes it a little uglier.
23:33:28 <dsal> There's stuff like ContT.
23:33:47 <dsal> In general, that's what a bind does. They short-circuit by either continuing or aborting at every decision point.
23:35:37 <Bulby[m]> I really need to write a test suite
23:36:24 <dsal> That's basically what happens when you do something like this:
23:36:26 <dsal> > do { a <- readMaybe "1"; b <- readMaybe "2"; pure (a + b) } :: Maybe Int
23:36:28 <lambdabot> Just 3
23:36:31 <dsal> > do { a <- readMaybe "one"; b <- readMaybe "2"; pure (a + b) } :: Maybe Int
23:36:33 <lambdabot> Nothing
23:36:56 <dsal> The bind itself moves considers `b` in the first case, and doesn't in the second because it already knows it's gone.
23:37:08 <dsal> `ExceptT` is one easy way to do this in mtl. Or ContT if you're fancy.
23:41:17 Γ— TonyStone31 quits (~TonyStone@2603-7080-8607-c36a-a177-c39b-f0e5-4ebe.res6.spectrum.com) (Ping timeout: 255 seconds)
23:51:53 <EvanR> an interpreter loop could also just use recursion at every step
23:52:20 <EvanR> then moving ahead one statement, jumping out of a loop, and returning would be the same
23:52:43 Γ— Tuplanolla quits (~Tuplanoll@91-159-68-39.elisa-laajakaista.fi) (Quit: Leaving.)
23:53:24 Γ— rekahsoft quits (~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Ping timeout: 244 seconds)
23:54:18 β†’ TonyStone31 joins (~TonyStone@2603-7080-8607-c36a-a177-c39b-f0e5-4ebe.res6.spectrum.com)
23:54:45 Γ— stackdroid18 quits (~stackdroi@user/stackdroid) (Quit: hasta la vista... tchau!)
23:54:48 β†’ raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)

All times are in UTC on 2022-06-03.