Logs on 2021-02-28 (freenode/#haskell)
| 00:04:14 | <hyiltiz-M> | But how in seven hells did you put yourself in such a situation? Sounds like you needed a bunch of custom type classes instead, no? |
| 00:09:02 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:44cd:7ec7:332d:f0ab) (Ping timeout: 264 seconds) |
| 00:12:19 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:b84a:c23b:9840:733b) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:13:00 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 00:17:35 | × | hiroaki_ quits (~hiroaki@2a02:908:4b18:8c40:331:1c71:e87e:3061) (Ping timeout: 272 seconds) |
| 00:17:55 | × | perrier-jouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.0) |
| 00:19:57 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:22:14 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 00:25:36 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 00:25:52 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 276 seconds) |
| 00:26:37 | → | ddellacosta joins (~ddellacos@86.106.143.58) |
| 00:31:09 | × | ddellacosta quits (~ddellacos@86.106.143.58) (Ping timeout: 260 seconds) |
| 00:31:45 | × | darjeeling_ quits (~darjeelin@122.245.218.150) (Ping timeout: 264 seconds) |
| 00:37:59 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:44cd:7ec7:332d:f0ab) |
| 00:40:34 | → | elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 00:40:48 | → | bennofs_ joins (~quassel@dslb-188-106-243-069.188.106.pools.vodafone-ip.de) |
| 00:43:00 | × | hendursa1 quits (~weechat@gateway/tor-sasl/hendursaga) (Quit: hendursa1) |
| 00:43:23 | → | hendursaga joins (~weechat@gateway/tor-sasl/hendursaga) |
| 00:44:13 | → | Wuzzy joins (~Wuzzy@p5b0df7c2.dip0.t-ipconnect.de) |
| 00:44:57 | × | bennofs__ quits (~quassel@dslb-094-222-055-234.094.222.pools.vodafone-ip.de) (Ping timeout: 264 seconds) |
| 00:45:43 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 00:46:15 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:c8ae:4c2c:c3c0:6062:2fc9) |
| 00:46:23 | × | conal quits (~conal@192.145.118.121) (Quit: Computer has gone to sleep.) |
| 00:48:37 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 276 seconds) |
| 00:48:58 | → | darjeeling_ joins (~darjeelin@122.245.218.150) |
| 00:52:29 | → | gitgoood joins (~gitgood@80-44-13-166.dynamic.dsl.as9105.com) |
| 00:52:47 | × | gitgood quits (~gitgood@80-44-13-166.dynamic.dsl.as9105.com) (Ping timeout: 265 seconds) |
| 00:57:23 | → | conal joins (~conal@198.8.81.202) |
| 01:01:54 | → | supercoven joins (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) |
| 01:04:52 | × | supercoven_ quits (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) (Ping timeout: 276 seconds) |
| 01:05:36 | → | remby joins (4c437c1b@bras-base-london1483w-grc-21-76-67-124-27.dsl.bell.ca) |
| 01:07:01 | × | Rudd0 quits (~Rudd0@185.189.115.108) (Remote host closed the connection) |
| 01:07:08 | → | ddellacosta joins (~ddellacos@86.106.143.201) |
| 01:07:18 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 01:11:36 | × | ddellacosta quits (~ddellacos@86.106.143.201) (Ping timeout: 240 seconds) |
| 01:11:39 | × | whataday quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:57 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 01:12:47 | → | whataday joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:13:48 | → | MidAutumnHotaru0 joins (~MidAutumn@unaffiliated/midautumnhotaru) |
| 01:15:55 | × | MidAutumnHotaru quits (~MidAutumn@unaffiliated/midautumnhotaru) (Ping timeout: 260 seconds) |
| 01:15:55 | MidAutumnHotaru0 | is now known as MidAutumnHotaru |
| 01:16:45 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 264 seconds) |
| 01:17:11 | → | Tario joins (~Tario@201.192.165.173) |
| 01:18:50 | × | klardotsh quits (~klardotsh@75-172-17-41.tukw.qwest.net) (Quit: WeeChat 3.0.1) |
| 01:25:50 | × | aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
| 01:25:56 | → | aplainze1akind joins (~johndoe@captainludd.powered.by.lunarbnc.net) |
| 01:26:21 | aplainze1akind | is now known as aplainzetakind |
| 01:26:23 | × | Feuermagier quits (~Feuermagi@2a02:2488:4211:3400:246e:bf09:8453:9d6) (Remote host closed the connection) |
| 01:26:40 | → | Feuermagier joins (~Feuermagi@2a02:2488:4211:3400:246e:bf09:8453:9d6) |
| 01:26:58 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Ping timeout: 276 seconds) |
| 01:27:35 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 265 seconds) |
| 01:28:24 | ← | remby parts (4c437c1b@bras-base-london1483w-grc-21-76-67-124-27.dsl.bell.ca) () |
| 01:28:32 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:b84a:c23b:9840:733b) |
| 01:30:24 | → | int80h joins (uid148779@gateway/web/irccloud.com/x-byitmqwoaqxynwkn) |
| 01:38:06 | → | cheater joins (~user@unaffiliated/cheater) |
| 01:38:14 | × | elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 260 seconds) |
| 01:41:36 | × | vicfred quits (vicfred@gateway/vpn/mullvad/vicfred) (Ping timeout: 265 seconds) |
| 01:47:21 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 01:50:47 | × | Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:2494:eb54:ea13:73ca) (Quit: Leaving) |
| 01:52:19 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 276 seconds) |
| 01:56:36 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 02:00:19 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 02:00:58 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 260 seconds) |
| 02:04:36 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 02:09:19 | × | conal quits (~conal@198.8.81.202) (Quit: Computer has gone to sleep.) |
| 02:10:27 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 02:10:52 | × | jpds_ quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 02:11:16 | → | jpds_ joins (~jpds@gateway/tor-sasl/jpds) |
| 02:12:18 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:c8ae:4c2c:c3c0:6062:2fc9) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:13:14 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 02:15:51 | → | banyanRob joins (49f11cfb@c-73-241-28-251.hsd1.ca.comcast.net) |
| 02:16:09 | × | geowiesnot_bis quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 264 seconds) |
| 02:16:21 | → | conal joins (~conal@192.145.118.137) |
| 02:16:59 | → | Tario joins (~Tario@201.192.165.173) |
| 02:19:04 | → | slack1256 joins (~slack1256@45.4.2.52) |
| 02:20:21 | → | sakirious5 joins (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) |
| 02:20:43 | × | conal quits (~conal@192.145.118.137) (Client Quit) |
| 02:20:48 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:21:51 | → | conal joins (~conal@192.145.118.137) |
| 02:22:29 | × | conal quits (~conal@192.145.118.137) (Client Quit) |
| 02:23:35 | × | sakirious quits (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Ping timeout: 260 seconds) |
| 02:23:35 | sakirious5 | is now known as sakirious |
| 02:24:39 | → | vchlup_ joins (~vchlup@115.128.broadband17.iol.cz) |
| 02:27:02 | × | vchlup quits (~vchlup@115.128.broadband17.iol.cz) (Ping timeout: 265 seconds) |
| 02:29:24 | × | MidAutumnHotaru quits (~MidAutumn@unaffiliated/midautumnhotaru) (Quit: Quit 啾) |
| 02:29:32 | × | banyanRob quits (49f11cfb@c-73-241-28-251.hsd1.ca.comcast.net) (Quit: Connection closed) |
| 02:30:17 | → | MidAutumnHotaru joins (~MidAutumn@unaffiliated/midautumnhotaru) |
| 02:30:35 | → | perrier-jouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 02:31:06 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@184.22.157.95) |
| 02:33:01 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 02:36:37 | → | conal joins (~conal@66.115.157.135) |
| 02:39:12 | → | Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 02:40:36 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 02:40:36 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 240 seconds) |
| 02:40:36 | Lord_of_Life_ | is now known as Lord_of_Life |
| 02:44:56 | → | zq joins (~zq@xorshift.org) |
| 02:45:01 | <minoru_shiraeesh> | NieDzejkob: if you were to describe it to a child, a child would ask: "why do you want to merge all the contexts into a single context if they are separate from each other?" |
| 02:45:18 | <zq> | :t foldl |
| 02:45:19 | <lambdabot> | Foldable t => (b -> a -> b) -> b -> t a -> b |
| 02:45:56 | <zq> | how to prove that foldl (:) ys xs == concat (reverse xs) ys? |
| 02:46:38 | <koz_> | Start with the definitions of 'foldl', 'concat' and 'reverse'. |
| 02:46:49 | <koz_> | Then inline those and see what you get. |
| 02:46:58 | <koz_> | Then apply reductions until LHS and RHS look the same. |
| 02:47:27 | <zq> | um, let me correct my statement: foldl (:) ys xs == reverse xs ++ ys |
| 02:47:39 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 02:50:11 | <minoru_shiraeesh> | and then a child would say: "it would make sense to use different states for different contexts and to have a way of switching from one context to another, like a bridge or something" |
| 02:50:28 | <koz_> | zq: My answer is unchanged, modulo the fact you no longer need 'concat'. |
| 02:52:49 | <minoru_shiraeesh> | but how do you do that with monad stacks, I don't know |
| 02:53:10 | × | kupi quits (uid212005@gateway/web/irccloud.com/x-vvucditfymkrygow) (Quit: Connection closed for inactivity) |
| 02:53:42 | <koz_> | minoru_shiraeesh: Is the goal to go from StateT s m a to StateT s' m a or something? |
| 02:54:07 | × | Wuzzy quits (~Wuzzy@p5b0df7c2.dip0.t-ipconnect.de) (Quit: Wuzzy) |
| 02:54:21 | <minoru_shiraeesh> | koz_: Is NieDzeijkob's earlier description visible to you? |
| 02:54:43 | <minoru_shiraeesh> | it was posted at 05:35 |
| 02:54:48 | <koz_> | minoru_shiraeesh: No, but I recall vaguely that the issue was the MonadState s (State s) fundep. |
| 02:55:19 | <minoru_shiraeesh> | here is his message: |
| 02:55:22 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 276 seconds) |
| 02:55:25 | <minoru_shiraeesh> | Okay, let me try explaining what I'm trying to do again. Let's say I have a set of modules, and each of them defines a data type. I want to create a state monad that holds one of each type (the Context), and write operations in the Context monad, where each module uses its own part. I'm currently using a type-indexed map, and the simple-somewhat-ugly approach of just defining a record with all of the types doesn't work because of an import |
| 02:55:27 | <minoru_shiraeesh> | cycle. Any |
| 02:55:32 | <minoru_shiraeesh> | other options? |
| 02:55:54 | → | rajivr joins (uid269651@gateway/web/irccloud.com/x-nydprmgitcsjloxf) |
| 02:55:54 | × | mrchampion quits (~mrchampio@38.18.109.23) (Read error: Connection reset by peer) |
| 02:56:23 | <koz_> | 'One of each type' - one what of each type? |
| 02:57:47 | × | conal quits (~conal@66.115.157.135) (Quit: Computer has gone to sleep.) |
| 02:59:04 | <minoru_shiraeesh> | one record holding a state I guess |
| 02:59:33 | <koz_> | I read that as 'one value of each data type'. |
| 02:59:49 | → | mrchampion joins (~mrchampio@38.18.109.23) |
| 02:59:52 | <koz_> | So you basically have a closed set of values, one of each type. |
| 02:59:57 | <zq> | koz_: what reductions should i be applying? |
| 03:00:10 | <koz_> | zq: Like, evaluations? |
| 03:00:16 | <koz_> | Or equivalences from laws. |
| 03:00:31 | <koz_> | Look at how we demonstrate things like type class laws for examples if you need to see this in action. |
| 03:00:33 | × | m0rphism1 quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 264 seconds) |
| 03:00:33 | → | ddellacosta joins (~ddellacos@86.106.143.32) |
| 03:00:37 | → | conal joins (~conal@192.145.118.103) |
| 03:00:44 | <zq> | that's pretty much my question. i'm not clear on which equivalences i should be using |
| 03:00:52 | <koz_> | zq: There isn't a magic formula. |
| 03:01:00 | <koz_> | It's like solving an equation. |
| 03:01:02 | × | slack1256 quits (~slack1256@45.4.2.52) (Remote host closed the connection) |
| 03:01:15 | <koz_> | You need to see what transformations are available and work towards making the two sides the same. |
| 03:01:21 | <koz_> | It's different every time. |
| 03:01:37 | <koz_> | Proofs are not automatable in general. If they were, mathematics would cease to be a science. |
| 03:01:44 | <koz_> | Try some and see what happens? |
| 03:01:53 | <zq> | so, foldl f ys (x:xs) = foldl f (x:ys) xs where f = reverse (:) -- where do i go from here? |
| 03:02:19 | <koz_> | zq: You apply reductions to the whole equality you want to prove. |
| 03:02:22 | <koz_> | it's a substitution. |
| 03:02:29 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 03:02:29 | <koz_> | You're not substituting. |
| 03:02:38 | <zq> | what wasnt substituted? |
| 03:02:53 | × | xff0x quits (~xff0x@2001:1a81:5311:f400:9a7d:6852:57d4:8353) (Ping timeout: 272 seconds) |
| 03:03:05 | <zq> | it's trivial when xs == [] so i've assumed that it isn't |
| 03:03:24 | <koz_> | Your goal is 'prove that 'foldl (:) ys xs == reverse xs ++ ys' |
| 03:03:37 | <koz_> | So first, replace the entire LHS with the definition of foldl, renaming parameters as appropriate. |
| 03:03:40 | <koz_> | Ditto reverse. |
| 03:03:43 | <koz_> | (except RHS) |
| 03:03:57 | <koz_> | Maintain the ==, maintain variable names, ensure the == stays intact through each trnasformation. |
| 03:04:00 | <koz_> | Then see what you get. |
| 03:04:09 | <zq> | isn't that exactly what i've done on the lhs? |
| 03:04:27 | <koz_> | Except I don't see 'reverse xs ++ ys' anywhere in the thing you just posted. |
| 03:04:30 | <zq> | the definition of foldl is recursive |
| 03:04:38 | → | xff0x joins (~xff0x@2001:1a81:5349:9200:4bab:e866:1730:4463) |
| 03:04:38 | × | ddellacosta quits (~ddellacos@86.106.143.32) (Ping timeout: 245 seconds) |
| 03:04:39 | <koz_> | So do one step, keep the recursive part. |
| 03:04:53 | <koz_> | (also, is this homework?) |
| 03:04:54 | <zq> | that's what the above is? |
| 03:05:00 | <zq> | no, it's weekend fun |
| 03:05:07 | <koz_> | OK, let me try. |
| 03:05:22 | <zq> | i know i should be proving some side property of (++) but it's unclear to me which |
| 03:05:45 | <zq> | for reference, this is the haskellified version of ex 4f in https://www.fstar-lang.org/tutorial/ |
| 03:07:56 | × | darjeeling_ quits (~darjeelin@122.245.218.150) (Ping timeout: 240 seconds) |
| 03:08:29 | → | banyanRob joins (49f11cfb@c-73-241-28-251.hsd1.ca.comcast.net) |
| 03:08:44 | <minoru_shiraeesh> | how about proving by induction? |
| 03:10:08 | <minoru_shiraeesh> | prove for empty list, then prove that if it holds for some list, then it holds for incremented (consed) list |
| 03:10:30 | × | lawid quits (~quassel@dslb-090-186-099-002.090.186.pools.vodafone-ip.de) (Ping timeout: 246 seconds) |
| 03:10:47 | <koz_> | I don't think it even compiles, as foldl (:) ys xs won't work when ys is a list, because the args are in the wrong order. |
| 03:11:21 | <zq> | koz_: yeah, that was the second mistake in my original question. should isntead be `reverse (:)` |
| 03:11:29 | → | lawid joins (~quassel@dslb-090-186-208-048.090.186.pools.vodafone-ip.de) |
| 03:11:33 | <koz_> | reverse (:) also makes no sense |
| 03:11:35 | <zq> | reflected in 03:01:53 < zq> so, foldl f ys (x:xs) = foldl f (x:ys) xs where f = reverse (:) -- where do i go from here? |
| 03:11:37 | <koz_> | You can't reverse a function. |
| 03:11:52 | <koz_> | So first, we need a _compiling_ LHS. |
| 03:12:22 | <zq> | flip (:) -- it's been a while since i've haskelled |
| 03:12:30 | <koz_> | OK, so our goal is |
| 03:12:41 | <koz_> | foldl (flip (:)) ys xs == reverse xs ++ ys |
| 03:12:43 | <koz_> | Right? |
| 03:13:08 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Remote host closed the connection) |
| 03:13:19 | <zq> | yessir, and if proving inductively then this trivially holds when xs == [] so i've skipped ahead to xs == (s:ss) |
| 03:13:54 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 03:15:24 | <zq> | i think i get it, rhs has to be expanded first and then leverage associativity of (++) |
| 03:15:54 | <koz_> | zq: Here's a start: https://paste.tomsmeding.com/vbSX0vE2 |
| 03:16:26 | <koz_> | This should help you see the next steps. |
| 03:16:39 | <koz_> | Now, onto the other problem. |
| 03:17:03 | <koz_> | How I see it is this - your Context monad is actually parameterized over what particular type you are examining at the moment. |
| 03:17:14 | <koz_> | So it makes sense to talk about Context s a, not Context a. |
| 03:17:28 | <koz_> | So you can have a Context a, which 'forgets' what state it's focused on. |
| 03:17:47 | <koz_> | And then you have a function that turns a Context a into Context s a for some s. |
| 03:17:54 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 03:18:00 | <koz_> | Problem is, you can't have this be universal, because there might not _be_ an 's' to project into. |
| 03:18:20 | <koz_> | So you want one function per projection, as well as a 'forgetting' function. |
| 03:18:20 | → | kw joins (d4662d5d@212.102.45.93) |
| 03:18:27 | → | FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) |
| 03:18:27 | finn_elija | is now known as Guest72499 |
| 03:18:27 | FinnElija | is now known as finn_elija |
| 03:18:32 | <koz_> | Then you can define MonadState s (Context s) and live your happy life. |
| 03:18:35 | <minoru_shiraeesh> | you're talking about State s a? |
| 03:18:47 | <koz_> | Context s would be equivalent to State s, yes. |
| 03:18:59 | × | theelous3 quits (~theelous3@unaffiliated/theelous3) (Read error: Connection reset by peer) |
| 03:19:45 | <minoru_shiraeesh> | but why forget what state it's focused on? that's just sugaring anyway |
| 03:20:02 | <koz_> | Because then you can't have a Context which _doesn't_ know what type it's focusing on. |
| 03:20:06 | <minoru_shiraeesh> | how do you glue them together? |
| 03:20:07 | <koz_> | Which I assumed was the get-go goal. |
| 03:20:15 | <koz_> | That is exactly how you glue them together. |
| 03:20:44 | <minoru_shiraeesh> | but the module doesn't care about other contexts |
| 03:20:50 | <minoru_shiraeesh> | and it's not going to use them |
| 03:20:56 | <koz_> | So then what's the problem? |
| 03:21:00 | <koz_> | I'm genuinely confused now. |
| 03:21:12 | <kw> | What are the dangers of using `unsafePerformIO` with `newIORef` at the top level to create a cache? Values that aren't in the cache will be calculated, inserted into the cache, and returned as needed (in IO). |
| 03:21:27 | × | Guest72499 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds) |
| 03:21:40 | <koz_> | Why do you think you need this kw? |
| 03:21:42 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: gone to sleep. ZZZzzz…) |
| 03:21:45 | <minoru_shiraeesh> | why don't we just provide a module with a simple State ModuleSpecificState a |
| 03:22:02 | <koz_> | minoru_shiraeesh: I dunno, I'm just answering the posed question, as I understood it. |
| 03:22:14 | <koz_> | If I misunderstood the posed question, NieDzejkob needs to clarify what they want. |
| 03:22:47 | <kw> | koz_: It's a shared cache for data that has to be accessed from an external (C) library. |
| 03:23:11 | <koz_> | If you're calling a C library, aren't you in IO already? |
| 03:23:14 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 03:23:21 | × | redmp_ quits (~redmp@172.58.35.206) (Ping timeout: 264 seconds) |
| 03:23:30 | → | darjeeling_ joins (~darjeelin@122.245.218.150) |
| 03:23:40 | <minoru_shiraeesh> | I answered that it would make sense to provide each module with its own State s a, and then create a bridge between those states somehow, I don't know how |
| 03:23:51 | <koz_> | That is the bridge. |
| 03:23:53 | <kw> | Right, but the lookups will be through individual calls in IO. I don't want each call to make a new empty cache. |
| 03:23:57 | <koz_> | You define a thing that 'forgets' its focus. |
| 03:24:09 | <koz_> | If your calls are in IO, your cache can be in IO as well. |
| 03:24:25 | <koz_> | You can just have 'cache :: IORef whatever'. |
| 03:25:17 | <kw> | :t newIORef |
| 03:25:18 | <lambdabot> | error: |
| 03:25:18 | <lambdabot> | • Variable not in scope: newIORef |
| 03:25:18 | <lambdabot> | • Perhaps you meant ‘newSTRef’ (imported from Data.STRef) |
| 03:25:25 | <zq> | koz_: you're right about substituting then reducing |
| 03:25:26 | <koz_> | % :t newIORef |
| 03:25:26 | <yahb> | koz_: a -> IO (IORef a) |
| 03:25:35 | <zq> | i grok it now |
| 03:25:46 | <koz_> | zq: It's just like solving an equation. |
| 03:26:01 | <koz_> | This at least helps you see some similarities if nothing else. |
| 03:26:10 | <kw> | :t Data.IORef.newIORef |
| 03:26:11 | <lambdabot> | a -> IO (GHC.IORef.IORef a) |
| 03:27:44 | <koz_> | So you create your cache in main (hence in IO), bind that, then pass the resulting IORef as an extra parameter where needed. |
| 03:27:52 | <koz_> | If you want this to be 'seamless', use ReaderT. |
| 03:29:48 | <kw> | This is library code, not app code. If possible I'd like to avoid forcing users to put 'initializeCache' in their `main` . At that point I'd probably just give up on caching and just suck up the performance hit. |
| 03:30:22 | <koz_> | If it's a library, just assume they did it for you. |
| 03:30:27 | <koz_> | Just take an extra parameter. |
| 03:30:58 | → | jacks2 joins (~bc8134e3@217.29.117.252) |
| 03:31:01 | <koz_> | Or make a monad involving ReaderT myCacheType IO or whatever in a newtype, and write everything in that. |
| 03:31:17 | <kw> | So, getting back to my original question, why are we trying so hard to avoid `unsafePerformIO` ? |
| 03:31:22 | <koz_> | And provide a 'runMyMonad :: MyMonad a -> cacheType -> IO a' |
| 03:31:44 | <koz_> | There's a reason for the 'unsafe' in that name. |
| 03:31:51 | <koz_> | Other folks in here can tell you what gore to anticipate. |
| 03:32:14 | <kw> | In this case it should be transparent to the user: The caller of the function will get the same value regardless of whether it's in the cache. |
| 03:32:32 | <koz_> | Yeah, but the functions are in IO, correct? |
| 03:32:54 | <koz_> | So your users can already assume funky stuff will happen, and you have to say if not. |
| 03:33:16 | <koz_> | Honestly, just carry around an extra argument for the IORef cacheType. |
| 03:33:20 | <koz_> | It's not that onerous. |
| 03:33:32 | <koz_> | You can provide a function that gives back an initialized cache for convenience. |
| 03:33:38 | <koz_> | And then your users can wrap it or w/e. |
| 03:34:15 | <jacks2> | top level IORef is not unheard of, random uses it for randomIO to update seed |
| 03:34:40 | <koz_> | jacks2: But it's not initialized with unsafePerformIO right? |
| 03:34:43 | <kw> | I'm not going to create a shitty API for performance reasons. As I said, forcing folks to thread an extra cache parameter is not going to happen. |
| 03:34:49 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 03:35:01 | <koz_> | kw: Why do you consider it that bad? |
| 03:35:02 | <jacks2> | koz_, I did not check the source, but I'm not sure how else it would be created |
| 03:35:11 | <kw> | If it's 10 to 50 times slower, OK. Haskell is still reasonably fast. |
| 03:35:33 | <koz_> | jacks2: Then how do you know about the top level IORef and what it updates? |
| 03:35:35 | <jacks2> | yep, they are using unsafePerformIO |
| 03:35:37 | <kw> | I consider it bad because the cache is an implementation artifact, not a part of the semantics of the function. |
| 03:35:38 | <jacks2> | theStdGen = unsafePerformIO $ SM.initSMGen >>= newIORef . StdGen |
| 03:35:49 | <jacks2> | koz_, because that is the only way to do it |
| 03:35:49 | <infinisil> | zq: Just dug up this proof of `reverse (xs ++ reverse ys) == ys ++ reverse xs` from my university notes. Should be relatively self-explanatory, and will be very similar to what you want to prove: https://paste.infinisil.com/_FAwpWitJg.txt |
| 03:35:50 | <koz_> | OK, well, there you go kw, go right ahead. |
| 03:36:29 | <jacks2> | {-# NOINLINE theStdGen #-} is also the important part of |
| 03:37:23 | <kw> | Oh, yeah. Forgot about NOINLINE. It actually wouldn't be terrible to have multiple caches floating around, but it would be a lot less useful. |
| 03:37:29 | × | viluon quits (uid453725@gateway/web/irccloud.com/x-ignoxmynamzxzkoi) (Quit: Connection closed for inactivity) |
| 03:38:31 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 03:39:13 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 245 seconds) |
| 03:39:28 | → | POGtastic joins (~POGtastic@2601:1c0:6000:fe1:6f92:35eb:b863:d90a) |
| 03:39:58 | <POGtastic> | > pl \x -> map (x:) [[]] |
| 03:39:59 | <lambdabot> | error: |
| 03:39:59 | <lambdabot> | Unexpected lambda expression in function application: |
| 03:39:59 | <lambdabot> | \ x -> map (x :) [[]] |
| 03:40:29 | <minoru_shiraeesh> | kw: you can take a look at lambdabot, the approach you described is used there |
| 03:42:34 | <infinisil> | POGtastic: It's `@pl <expr>` or the , but don't do it in the channel unless you have a relevant question, PM lambdabot instead |
| 03:42:43 | <infinisil> | s/or the // |
| 03:42:50 | <jacks2> | kw, see this for all the things you should watch out for if you're going that route. http://hackage.haskell.org/package/base-4.14.1.0/docs/System-IO-Unsafe.html |
| 03:43:59 | <POGtastic> | infinisil: gotcha, thanks! |
| 03:44:46 | × | POGtastic quits (~POGtastic@2601:1c0:6000:fe1:6f92:35eb:b863:d90a) (Quit: WeeChat 2.9) |
| 03:46:02 | <kw> | jacks2: thanks. |
| 03:47:57 | × | theDon quits (~td@94.134.91.67) (Ping timeout: 264 seconds) |
| 03:49:19 | → | theDon joins (~td@muedsl-82-207-238-016.citykom.de) |
| 03:49:36 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 03:52:19 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 03:52:46 | × | HarveyPwca quits (~HarveyPwc@2601:246:c180:a570:29df:3b00:ad0e:3a06) (Quit: Leaving) |
| 03:54:16 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 03:55:55 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 03:57:10 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 03:57:36 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 240 seconds) |
| 03:57:42 | × | soft-warm quits (44695313@ip68-105-83-19.sd.sd.cox.net) (Ping timeout: 240 seconds) |
| 04:00:28 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 04:00:54 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 04:01:17 | × | jacks2 quits (~bc8134e3@217.29.117.252) (Quit: http://www.okay.uz/) |
| 04:02:35 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 04:02:39 | × | hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Remote host closed the connection) |
| 04:05:01 | → | hendursaga joins (~weechat@gateway/tor-sasl/hendursaga) |
| 04:07:42 | × | andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Ping timeout: 268 seconds) |
| 04:09:06 | → | andreas303 joins (~andreas@gateway/tor-sasl/andreas303) |
| 04:11:19 | → | ddellacosta joins (~ddellacos@86.106.143.10) |
| 04:15:58 | × | ddellacosta quits (~ddellacos@86.106.143.10) (Ping timeout: 276 seconds) |
| 04:21:46 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@184.22.157.95) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:27:17 | × | banyanRob quits (49f11cfb@c-73-241-28-251.hsd1.ca.comcast.net) (Quit: Connection closed) |
| 04:27:42 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 04:30:21 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:b84a:c23b:9840:733b) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:32:32 | × | supercoven quits (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 04:32:49 | → | supercoven joins (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) |
| 04:32:50 | × | supercoven quits (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) (Max SendQ exceeded) |
| 04:33:04 | → | supercoven joins (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) |
| 04:33:05 | × | supercoven quits (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) (Max SendQ exceeded) |
| 04:33:19 | → | supercoven joins (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) |
| 04:33:20 | × | supercoven quits (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) (Max SendQ exceeded) |
| 04:33:24 | × | egp_ quits (~egp_@2.95.74.168) (Quit: EXIT) |
| 04:33:34 | → | supercoven joins (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) |
| 04:33:35 | × | supercoven quits (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) (Max SendQ exceeded) |
| 04:34:34 | → | banyanRob joins (49f11cfb@c-73-241-28-251.hsd1.ca.comcast.net) |
| 04:35:21 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 04:35:54 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 04:36:19 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 04:47:13 | → | ddellacosta joins (~ddellacos@83.143.246.102) |
| 04:51:16 | × | ddellacosta quits (~ddellacos@83.143.246.102) (Ping timeout: 240 seconds) |
| 04:51:48 | → | mrioqueiroz joins (~mrioqueir@186.251.19.98) |
| 04:52:26 | → | kevin__ joins (~kevin@pool-100-37-189-79.nycmny.fios.verizon.net) |
| 04:54:10 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 04:56:11 | × | MidAutumnHotaru quits (~MidAutumn@unaffiliated/midautumnhotaru) (Quit: Ping timeout (120 seconds)) |
| 04:56:29 | → | MidAutumnHotaru joins (~MidAutumn@unaffiliated/midautumnhotaru) |
| 04:56:39 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 04:58:13 | × | kevin__ quits (~kevin@pool-100-37-189-79.nycmny.fios.verizon.net) (Ping timeout: 276 seconds) |
| 04:59:47 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 1.9.1) |
| 05:00:52 | retlo1 | is now known as \2E0KNO |
| 05:11:12 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:13:19 | → | egp_ joins (~egp_@2.95.74.168) |
| 05:13:56 | × | roconnor quits (~roconnor@host-104-157-194-235.dyn.295.ca) (Quit: Konversation terminated!) |
| 05:16:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 05:18:45 | → | Pooky joins (~Pooky@84.203.101.64) |
| 05:19:57 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 05:21:56 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 05:24:35 | → | kit joins (~kit@144.138.56.36) |
| 05:24:50 | × | kit quits (~kit@144.138.56.36) (Client Quit) |
| 05:24:55 | → | elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 05:25:43 | → | kit joins (~kit@144.138.56.36) |
| 05:25:43 | × | kit quits (~kit@144.138.56.36) (Client Quit) |
| 05:31:01 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 05:32:01 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 05:33:38 | → | Tops2 joins (~Tobias@dyndsl-095-033-017-115.ewe-ip-backbone.de) |
| 05:35:55 | → | kit joins (~kit@144.138.56.36) |
| 05:36:37 | → | haya joins (~haya@ec2-18-231-117-140.sa-east-1.compute.amazonaws.com) |
| 05:36:59 | × | Tops21 quits (~Tobias@dyndsl-095-033-025-207.ewe-ip-backbone.de) (Ping timeout: 265 seconds) |
| 05:37:27 | × | Pooky quits (~Pooky@84.203.101.64) (Quit: Leaving) |
| 05:40:28 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 276 seconds) |
| 05:40:36 | → | drbean_ joins (~drbean@TC210-63-209-142.static.apol.com.tw) |
| 05:42:33 | × | minoru_shiraeesh quits (~shiraeesh@109.166.56.139) (Ping timeout: 264 seconds) |
| 05:48:09 | × | banyanRob quits (49f11cfb@c-73-241-28-251.hsd1.ca.comcast.net) (Quit: Connection closed) |
| 05:51:48 | × | int80h quits (uid148779@gateway/web/irccloud.com/x-byitmqwoaqxynwkn) (Quit: Connection closed for inactivity) |
| 05:51:53 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 1.9.1) |
| 05:53:49 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 05:58:59 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 06:10:02 | × | kw quits (d4662d5d@212.102.45.93) (Ping timeout: 240 seconds) |
| 06:10:12 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Remote host closed the connection) |
| 06:10:40 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 06:11:26 | × | xff0x quits (~xff0x@2001:1a81:5349:9200:4bab:e866:1730:4463) (Ping timeout: 264 seconds) |
| 06:11:40 | × | elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 276 seconds) |
| 06:11:48 | → | xff0x joins (~xff0x@2001:1a81:5349:9200:adc4:69eb:c86a:66d9) |
| 06:13:04 | → | redmp joins (~redmp@172.58.35.206) |
| 06:13:23 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 06:15:30 | <hyiltiz> | koz_: I fed your quotes into bellard.org/textsynth/ (GPT-2) and got a poem-like thing that is fun to read: https://bellard.org/textsynth/ |
| 06:15:45 | <hyiltiz> | Wait this link: http://ix.io/2Rac |
| 06:16:25 | <koz_> | hyiltiz: Lol. |
| 06:16:45 | × | mrioqueiroz quits (~mrioqueir@186.251.19.98) (Ping timeout: 264 seconds) |
| 06:16:47 | <koz_> | Due to limited data, this model makes me sound like some kind of IORef fetishist. |
| 06:17:16 | <hyiltiz> | yeah it reads like someone read about haskell and half drunk in a bar |
| 06:17:32 | <hyiltiz> | feeding more data... |
| 06:17:32 | <koz_> | Lol. |
| 06:17:41 | <koz_> | That's not an unusual combination to be fair. |
| 06:17:51 | <koz_> | I don't doubt a lot of Haskell papers began as drunken academic benders. |
| 06:17:57 | <koz_> | monochrom can confirm. |
| 06:21:27 | <hyiltiz> | http://ix.io/2Rad with more data and user ids, it invented new users, among whom kaz is an extreme narcissist and kl is a re-incarnation of koz+kw+lambdabot afaict |
| 06:22:25 | <koz_> | hyiltiz: That is hilarious, since I know someone (not here) who goes by kaz. |
| 06:22:27 | <hyiltiz> | well it was a low day for me today, and I am having fun feeding #haskell into GTP-2 through bellard. Speak of a nerd |
| 06:23:04 | <hyiltiz> | LMFAO esp. if kaz the real shares similarities with kaz the re-incarnate |
| 06:23:50 | <koz_> | "<koz_> Maybe a class is better, but it shouldn't be an object." LOLZOR |
| 06:24:10 | <koz_> | "<kaz> I agree with kaz." I AM DED |
| 06:25:01 | × | average quits (uid473595@gateway/web/irccloud.com/x-vkybhfbovzssiwuk) (Quit: Connection closed for inactivity) |
| 06:28:46 | <hyiltiz> | and here comes a completely new character called matthewjr out of nowhere and preaches about C++ but never used it himself and only read a few C who apparently replaces you out from the conversation. Reality in AI's mind is bleak http://ix.io/2Raf |
| 06:29:02 | <hyiltiz> | Now I'll stop hijacking #haskell with GPT-2 funsies |
| 06:29:53 | <hyiltiz> | Hmm, I am going to feed it my love letter to my gf (hope I won't regret it...) |
| 06:30:19 | <koz_> | "<matthewjr> I'd say I would never have expected to see *anything* out of the ordinary from C++ code |
| 06:30:21 | <koz_> | " |
| 06:30:33 | <koz_> | Sounds _exactly_ like something I expect to hear from a C++ person. |
| 06:30:58 | <koz_> | hyiltiz: Feed it all of Edward Kmett's articles. |
| 06:31:11 | <koz_> | I wanna see what kind of category-theory-driven stuff it can design. |
| 06:31:14 | <koz_> | (and whether it compiles) |
| 06:31:25 | <boxscape> | is there a difference between love letters and ed kmett articles? |
| 06:31:28 | <hyiltiz> | haha! That is gonna be so fun |
| 06:32:17 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:32:29 | <koz_> | boxscape: Yes. In direction. |
| 06:32:41 | <boxscape> | I see! |
| 06:32:53 | <hyiltiz> | hmm GTP-2 thinks she has a boyfriend... |
| 06:33:00 | <hyiltiz> | I already regret it |
| 06:33:12 | <hyiltiz> | didn't took GPT-2 5 sentences to say that out loud |
| 06:34:28 | <hyiltiz> | The next day she asked me for my address because her boyfriend had not arrived yet. i took a long time. Finally i replied that i don't have an address. She said maybe her boyfriend can call her. i said i didn't have an address. She said i never promised i would see her again. i said i'm sorry. |
| 06:34:53 | <hyiltiz> | Does anyone have the tex or lhs files for edwardk's articles? |
| 06:35:02 | <koz_> | No, sadly. |
| 06:35:11 | <koz_> | edwardk: Could you contribute to a good cause? ^ |
| 06:35:32 | <hyiltiz> | Well I can tesseract them out from PDF's or pandoc out from HTML if necessary |
| 06:36:08 | <koz_> | hyiltiz: You can look through Comonad Reader. |
| 06:36:17 | <koz_> | Or School of Haskell. |
| 06:36:22 | <koz_> | Here's one to get you started: https://www.schoolofhaskell.com/user/edwardk/heap-of-successes |
| 06:36:29 | <hyiltiz> | Would be so funny if the next big idea in FP comes from GPT-2 |
| 06:38:00 | <boxscape> | OpenAI has used a specially trained version of GPT-3 to implement relatively simple python functions, on reason you couldn't do that with haskell, at least, assuming you have millions of dollars worth of compute |
| 06:38:09 | <boxscape> | s/on/no |
| 06:41:33 | <hyiltiz> | http://ix.io/2Rah seems like it needs more code to be able to innovate |
| 06:42:41 | <hyiltiz> | I once fed it the debian and BSD handbook trying to learn more about the Unix/Linux sysadmin stuff |
| 06:43:24 | <hyiltiz> | and fed GRRM's ASOIAF series as I couldn't wait for the Winds of Winter |
| 06:43:55 | <hyiltiz> | cant recall if I learned anything new tho |
| 06:47:36 | × | kam1 quits (~kam1@5.125.126.175) (Ping timeout: 240 seconds) |
| 06:50:15 | <koz_> | Keep feeding it until we get Robo-Edward. |
| 06:51:10 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 06:51:39 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:d719:7006:9537:bdbe:8690) |
| 06:51:39 | <boxscape> | The kmettinator |
| 06:55:39 | × | gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Quit: WeeChat 3.0) |
| 07:03:33 | × | xff0x quits (~xff0x@2001:1a81:5349:9200:adc4:69eb:c86a:66d9) (Ping timeout: 272 seconds) |
| 07:04:01 | → | xff0x joins (~xff0x@2001:1a81:5349:9200:616f:f9e7:ca53:6ba3) |
| 07:05:02 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:d719:7006:9537:bdbe:8690) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 07:12:04 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:23:23 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 245 seconds) |
| 07:23:55 | ski | . o O ( "<vixey> this is fabricatino" ) |
| 07:23:58 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 07:26:57 | × | darjeeling_ quits (~darjeelin@122.245.218.150) (Ping timeout: 264 seconds) |
| 07:32:40 | × | jpds_ quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 07:33:13 | → | jpds_ joins (~jpds@gateway/tor-sasl/jpds) |
| 07:33:28 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 265 seconds) |
| 07:34:06 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8) |
| 07:39:39 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 245 seconds) |
| 07:41:10 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:d719:a529:2602:758:74a6) |
| 07:42:17 | → | darjeeling_ joins (~darjeelin@122.245.218.150) |
| 07:46:19 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 07:48:47 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:44cd:7ec7:332d:f0ab) (Remote host closed the connection) |
| 07:49:24 | × | kit quits (~kit@144.138.56.36) (Quit: leaving) |
| 07:52:44 | × | egp_ quits (~egp_@2.95.74.168) (Remote host closed the connection) |
| 07:52:44 | × | egp__ quits (~egp_@2.95.74.168) (Remote host closed the connection) |
| 07:54:44 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 07:55:52 | → | kit joins (~kit@144.138.56.36) |
| 07:57:04 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 07:58:09 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 07:58:44 | × | kit quits (~kit@144.138.56.36) (Client Quit) |
| 07:59:39 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 245 seconds) |
| 08:03:19 | → | toorevitimirp joins (~tooreviti@117.182.182.60) |
| 08:03:22 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 08:04:34 | → | kit joins (~kit@144.138.56.36) |
| 08:05:30 | × | kit quits (~kit@144.138.56.36) (Client Quit) |
| 08:07:56 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 08:08:44 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 08:11:52 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 08:13:04 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 08:13:17 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 08:21:25 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 08:22:06 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 08:23:26 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 08:26:33 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 260 seconds) |
| 08:26:39 | × | sablib quits (~sablib@59.173.155.233) (Ping timeout: 260 seconds) |
| 08:27:58 | → | MKirisame joins (~MarisaKir@c-98-237-240-11.hsd1.wa.comcast.net) |
| 08:28:30 | → | sablib joins (~sablib@59.173.152.160) |
| 08:28:56 | × | redmp quits (~redmp@172.58.35.206) (Ping timeout: 240 seconds) |
| 08:37:07 | → | forgottenone joins (~forgotten@176.42.27.254) |
| 08:40:09 | × | Svet_ quits (~svet@90.200.185.163) (Ping timeout: 264 seconds) |
| 08:42:08 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 08:44:28 | × | I440r quits (~I440r@217.146.82.202) (Remote host closed the connection) |
| 08:46:36 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 08:48:14 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 08:48:33 | → | mananamenos_ joins (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net) |
| 08:49:11 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:44cd:7ec7:332d:f0ab) |
| 08:50:03 | → | mhw0 joins (~mhw0@213.230.119.134) |
| 08:54:02 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:44cd:7ec7:332d:f0ab) (Ping timeout: 264 seconds) |
| 08:55:47 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 08:56:40 | × | bitmapper quits (uid464869@gateway/web/irccloud.com/x-kykpxwvfcawrxiyd) (Quit: Connection closed for inactivity) |
| 08:56:55 | × | xff0x quits (~xff0x@2001:1a81:5349:9200:616f:f9e7:ca53:6ba3) (Ping timeout: 272 seconds) |
| 08:57:06 | → | James_F1 joins (~James_F@139.28.218.148) |
| 08:57:14 | → | xff0x joins (~xff0x@2001:1a81:5349:9200:2ca8:4ef3:12c9:ba81) |
| 08:57:57 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 08:58:36 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 08:59:28 | × | carlomagno quits (~cararell@148.87.23.6) (Quit: Leaving.) |
| 08:59:56 | × | darjeeling_ quits (~darjeelin@122.245.218.150) (Ping timeout: 240 seconds) |
| 09:00:59 | ← | mhw0 parts (~mhw0@213.230.119.134) ("leaving") |
| 09:01:18 | → | kuribas joins (~user@ptr-25vy0i8a0npfg024kq6.18120a2.ip6.access.telenet.be) |
| 09:01:37 | × | danso quits (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 258 seconds) |
| 09:02:20 | → | inerkick joins (~rohit@2402:8100:2828:ff35:c014:d64c:1ae3:c0a0) |
| 09:02:56 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 240 seconds) |
| 09:03:02 | → | Svet_ joins (~svet@90.200.185.163) |
| 09:03:19 | → | mananamenos joins (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net) |
| 09:06:08 | → | egp_ joins (~egp_@2.95.74.168) |
| 09:06:11 | → | egp__ joins (~egp_@2.95.74.168) |
| 09:06:49 | × | mananamenos_ quits (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
| 09:08:11 | → | tanuki_ joins (~quassel@173.168.154.189) |
| 09:08:34 | × | Svet_ quits (~svet@90.200.185.163) (Ping timeout: 260 seconds) |
| 09:09:17 | → | hendursa1 joins (~weechat@gateway/tor-sasl/hendursaga) |
| 09:10:02 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 09:11:06 | × | hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 268 seconds) |
| 09:11:38 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 09:11:59 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 09:12:35 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 09:13:46 | → | danso joins (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 09:14:10 | → | darjeeling_ joins (~darjeelin@122.245.218.150) |
| 09:14:20 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 09:17:11 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 272 seconds) |
| 09:17:52 | → | son0p joins (~son0p@181.58.39.182) |
| 09:22:22 | → | Svet_ joins (~svet@90.200.185.163) |
| 09:23:33 | → | mananamenos_ joins (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net) |
| 09:23:43 | × | drbean_ quits (~drbean@TC210-63-209-142.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in) |
| 09:24:19 | × | mananamenos quits (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
| 09:31:02 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 09:32:11 | <edwardk> | boxscape: the problem with producing clones of me is that i have to feed them, and we still only have the one tax id, so it raises some serious eyebrows when we're forced to explain things to the IRS. GPT-3 me seems easier on that front, but seems even more dubious from an AI safety and alignment perspective. |
| 09:32:43 | <boxscape> | those are some good points |
| 09:34:47 | → | zaquest joins (~notzaques@5.128.210.178) |
| 09:34:47 | <edwardk> | a friend of mine posted this to facebook https://www.irccloud.com/pastebin/dZzR4f7u/clones.txt |
| 09:36:06 | <edwardk> | My response was that the number I'd pick would be very large to the point where I'll be calling on government assistance to deal with the refugee problem that I'd be creating, but that I didn't suspect it be quite to the point of overwhelming the western seaboard. |
| 09:36:26 | <boxscape> | tempted to choose a number high enough that they don't fit into the observable universe to check if I can break the system |
| 09:37:08 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 245 seconds) |
| 09:37:09 | × | Guest77245 quits (~textual@zrcout.mskcc.org) (Ping timeout: 264 seconds) |
| 09:37:27 | × | danso quits (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 272 seconds) |
| 09:37:49 | <edwardk> | from the standpoint of many decision theories that seems pretty suboptimal as you'd be condemning a near total fraction of you to die. |
| 09:38:08 | <boxscape> | I admit it's more of a "fun" choice than a smart choice |
| 09:38:51 | × | inerkick quits (~rohit@2402:8100:2828:ff35:c014:d64c:1ae3:c0a0) (Quit: Leaving) |
| 09:40:48 | <boxscape> | edwardk though I'm still working out on whether or not I should care about versions of myself ceasing to exist |
| 09:40:57 | <boxscape> | s/on// |
| 09:41:50 | <boxscape> | s/versions/instantiations |
| 09:42:15 | → | m0rphism1 joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
| 09:42:21 | → | danso joins (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 09:42:41 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:43:29 | <edwardk> | well, if you want to play a simple first order version of the game, assume you could instantiate another copy of yourself, but one of you gets executed, but you have a 50% chance of "you" being the copy, do you care? delay the execution 10 years so it takes with it 10 years of memories, do you care then? |
| 09:44:12 | <boxscape> | My current best guess is I wouldn't care in the first case, but would in the second case |
| 09:44:42 | <edwardk> | caring about this tends to bite folks who are looking for consistent ethical frameworks harder, folks who care about utilitarianism and variants and the like. |
| 09:45:18 | <boxscape> | I've been meaning to read Bostrom's paper about infinities in ethics because that seems where this tends to break down, but haven't gotten around to it |
| 09:45:25 | <boxscape> | s/seems/seems to be |
| 09:45:27 | → | ixlun joins (~user@213.205.241.12) |
| 09:45:30 | <edwardk> | fair |
| 09:45:39 | → | catt joins (~r@31.127.31.99) |
| 09:46:05 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 09:47:00 | <edwardk> | i don't personally tend to think it takes infinities for that to come up, a "Heat Signature" grade teleporter malfunction seems to hit all the same salient points |
| 09:47:32 | <boxscape> | hm I'm not sure what that means |
| 09:47:47 | <edwardk> | (Heat Signature the game has an npc who is a clone of herself created by a teleporter accident, who was contractually/culturally obligated to off either her original self or the cloned copy, but then reneged.) |
| 09:48:04 | <boxscape> | I see |
| 09:48:49 | × | mananamenos_ quits (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
| 09:49:29 | edwardk | should go to bed or write more code. not sure which |
| 09:49:51 | <ixlun> | Hi all, if I've got `data Foo = Foo {num :: String, val :: Int, map :: Map String Int}' and I want to insert a new value into the map, is there a short hand I can use for constructing a new Foo with the new map returned from Map.insert? |
| 09:50:19 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 09:50:41 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 09:51:04 | <edwardk> | ixlun: foo = Foo "hello" mempty; bar = foo { map = Map.insert 1 2 (map foo) } -- is the common way to do this. you can shave a little bit by using RecordWildcards but they aren't popular. lenses is another way to make it more concise |
| 09:51:36 | <edwardk> | er foo = Foo "hello" 14 mempty -- missed your 'val' member |
| 09:52:31 | <ixlun> | Ah, didn't know about the `bar = foo {map = ... }' syntax |
| 09:52:50 | <edwardk> | with lenses you can get that down to something like foo & map.at 1 ?~ 2 |
| 09:53:22 | <ixlun> | I remember starting to take a look at lenses and I got scared! |
| 09:53:48 | <edwardk> | there are some pretty gentle introductions, and a bunch of folks here and over in #haskell-lens happy to answer questions about them |
| 09:54:18 | → | knupfer joins (~Thunderbi@200116b82cc9eb004cd887aa2955feba.dip.versatel-1u1.de) |
| 09:54:26 | <edwardk> | unlike most haskell i recommend trying to get a feel for them from examples rather than studying the types super hard. then once you have the intuion the types peel themselves apart much easier when you go to try to figure out how they are actually implemented |
| 09:54:37 | <edwardk> | otherwise you spend a lot of time staring a trees and not seeing the forest |
| 09:55:09 | → | mananamenos joins (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net) |
| 09:55:14 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) (Ping timeout: 264 seconds) |
| 09:55:37 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 09:55:41 | <ixlun> | to be honest, that's kind of how I got to grips with applicative syntax. I brushed up on the types but it wasn't until I used parser combinators that I really got it. |
| 09:56:03 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 258 seconds) |
| 09:56:40 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 09:57:03 | <ixlun> | Just one question, the brace syntax that you used above, do I need a language extension for that? |
| 09:57:49 | <tomsmeding> | that syntax is ancient haskell :) |
| 09:58:52 | <ixlun> | Cool, thanks :) |
| 09:58:53 | <edwardk> | ixlun: that has been around since dirt |
| 09:59:20 | <hyiltiz> | cd |
| 09:59:53 | tomsmeding | thinks somebody went home |
| 10:00:07 | <edwardk> | there's no place like $HOME |
| 10:00:16 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 240 seconds) |
| 10:02:45 | → | mayleesia joins (4d0db908@dynamic-077-013-185-008.77.13.pool.telefonica.de) |
| 10:03:41 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 10:04:52 | <edwardk> | hyiltiz: i could maybe scrape the content code out of comonad.com, but i think john wiegley already has a script for doing that. |
| 10:05:09 | × | mananamenos quits (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
| 10:05:40 | <hyiltiz> | yeah i accidentally tried to go home in #haskell |
| 10:05:48 | <hyiltiz> | but #haskell is home so that is good |
| 10:06:22 | <hyiltiz> | edwardk: don't wanna bother u with that; if u dont have anything ready to dump at me, I can look up john wiegley's script |
| 10:07:04 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Read error: Connection timed out) |
| 10:07:34 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 10:07:36 | <edwardk> | ai dungeon's dragon model managed to perform a pretty convincing impression of me a few times |
| 10:09:07 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:d719:a529:2602:758:74a6) (Quit: Textual IRC Client: www.textualapp.com) |
| 10:10:03 | ← | m4lvin parts (~m4lvin@w4eg.de) () |
| 10:12:05 | <edwardk> | https://gist.github.com/ekmett/38513c7894e2d28863f8202acb1a3447 https://gist.github.com/ekmett/1b9ad5c361dfd1f23887ce1ab11a23fe -- it did a better job of staying in genre in the former |
| 10:12:44 | <kuribas> | ixlun: you can also write `set (map . at 1) 2 foo`, which I find more readable that the operators. |
| 10:13:56 | <kuribas> | There is a logic to the way lens operators are constructed, but I still find them ugly... |
| 10:14:11 | × | danso quits (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 272 seconds) |
| 10:14:36 | <hyiltiz> | those conversations look really fun |
| 10:14:56 | × | Svet_ quits (~svet@90.200.185.163) (Ping timeout: 240 seconds) |
| 10:16:04 | <kuribas> | ixlun: I also find the documentation for micro-lens (which is lens-compatible) a bit more beginner-friendly. |
| 10:16:43 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 10:17:00 | <hyiltiz-M> | Or optics |
| 10:17:11 | <olligobber> | when I do `cabal repl' it loads one of my 16 module's functions, is there a way of not loading any? |
| 10:17:35 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer) |
| 10:18:25 | <boxscape> | edwardk were the "Edward:" parts in the first one generated as well or only the "Eliezer:" parts? |
| 10:20:18 | <olligobber> | ah, found this: https://github.com/haskell/cabal/issues/5374 |
| 10:20:52 | → | danso joins (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 10:21:12 | <edwardk> | everything below the -- End Prompt is generated |
| 10:21:20 | <boxscape> | Huh, in that case I'm really impressed it came up with "I thought you didn't believe in ascribing zero or one hundred percent odds to anything?" and "So how many significant digits are there in that one hundred percent estimate?" |
| 10:21:31 | <edwardk> | both of them shocked me |
| 10:21:46 | <edwardk> | it does seem to have read a lot of yudkowsky though |
| 10:21:55 | <edwardk> | so i'm not surprised it put some of his style of words into my mouth |
| 10:22:03 | <boxscape> | hm, makes sense |
| 10:22:54 | <edwardk> | another example of confusing personalities between characters is this one https://gist.github.com/ekmett/6cd785180659e3c2f9284e5128c11025 it makes him out to be much more of a bad-ass than he is in real life ;) |
| 10:24:46 | <olligobber> | maybe I'll just use stack instead of cabal |
| 10:25:32 | <edwardk> | olligobber: in theory you can set you a .ghci file, but iirc cabal repl loads the first (or is it the last) module in the library |
| 10:26:25 | <edwardk> | olligobber: i guess you could add a second sublibrary with no modules and load it instead? |
| 10:27:28 | <olligobber> | it loads the first |
| 10:27:34 | <olligobber> | that seems hacky |
| 10:29:10 | <edwardk> | olligobber: i think the mindset is if you list things in alphabetical order you'll tend to place Foo at the top of the list before Foo.Bar Foo.Baz, etc. |
| 10:29:22 | <edwardk> | so it'll load a nice top level module |
| 10:29:36 | <olligobber> | I don't want it to load any module... |
| 10:29:51 | <olligobber> | hmm, stack won't load validated-literals |
| 10:29:54 | <edwardk> | i understand that. just giving a general sense of what it picks what it picks |
| 10:33:18 | × | toorevitimirp quits (~tooreviti@117.182.182.60) (Remote host closed the connection) |
| 10:33:46 | × | todda7 quits (~torstein@athedsl-258913.home.otenet.gr) (Read error: Connection reset by peer) |
| 10:33:58 | <olligobber> | ugh, best solution seems to be a dummy Empty module |
| 10:33:59 | <olligobber> | :( |
| 10:34:02 | → | todda7 joins (~torstein@athedsl-258913.home.otenet.gr) |
| 10:34:12 | → | average joins (uid473595@gateway/web/irccloud.com/x-fxgddkvvlaaxcpgp) |
| 10:34:51 | → | toorevitimirp joins (~tooreviti@117.182.182.60) |
| 10:35:29 | <edwardk> | adding another package to your cabal project that depends on the project you want the guts of but which doesn't export any modules? |
| 10:35:46 | → | Ishutin_ joins (~ishutin@80-95-70-202.pool.digikabel.hu) |
| 10:35:46 | <edwardk> | then cabal repl yourdummyproject ? |
| 10:35:57 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 10:39:13 | × | hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-ssveckbgtfjmjehe) (Quit: Connection closed for inactivity) |
| 10:39:37 | × | Ishutin quits (~ishutin@92-249-193-15.pool.digikabel.hu) (Ping timeout: 272 seconds) |
| 10:39:47 | → | daffy joins (01c8aa98@1.200.170.152) |
| 10:40:50 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 264 seconds) |
| 10:44:03 | → | hiroaki_ joins (~hiroaki@2a02:908:4b18:8c40:cc64:29af:c80:536f) |
| 10:44:04 | × | kuribas quits (~user@ptr-25vy0i8a0npfg024kq6.18120a2.ip6.access.telenet.be) (Remote host closed the connection) |
| 10:48:11 | → | fendor joins (~fendor@078132053193.public.t-mobile.at) |
| 10:48:33 | <tomsmeding> | olligobber: you know that ':m' will unfocus all modules? |
| 10:48:56 | → | rdivyanshu joins (uid322626@gateway/web/irccloud.com/x-qtewvwtwengjftbg) |
| 10:50:00 | <olligobber> | tomsmeding, a way to do `:m' automatically after cabal loads the modules would be good, but I don't think it's possible |
| 10:51:21 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 10:51:49 | × | todda7 quits (~torstein@athedsl-258913.home.otenet.gr) (Ping timeout: 260 seconds) |
| 10:54:06 | <tomsmeding> | olligobber: it doesn't seem so; you can inject additional ghci startup scripts, but those run before the modules are loaded |
| 10:55:46 | <olligobber> | yeah :( |
| 10:55:50 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) (Ping timeout: 264 seconds) |
| 10:57:36 | <tomsmeding> | olligobber: for a nice hack, you can take the command line that cabal uses to start ghci, remove all the modules from it, and then pass a -ghci-script that :add's those modules and then does :m |
| 10:57:44 | <tomsmeding> | that seems to work for me on a simple project |
| 10:57:51 | <daffy> | what does the error message "ambiguous type variable" mean? i using a function that is supposed to output four types, and the actual output seems to contain "Any" as one of the types. I'm assuming the "Any" type is where the ambiguity is coming from but I can't tell why it's one of the types |
| 11:08:37 | <olligobber> | so in my .cabal file, I have an executable that includes the library in the build-depends, and the library includes a bunch of things in its build-depends, but when it builds the executable it doesn't have the things in the library's build-depends |
| 11:10:47 | → | todda7 joins (~torstein@athedsl-258913.home.otenet.gr) |
| 11:11:24 | → | kiwi_3697 joins (51f28de3@gateway/web/cgi-irc/kiwiirc.com/ip.81.242.141.227) |
| 11:12:32 | → | Franciman joins (~francesco@host-82-49-79-189.retail.telecomitalia.it) |
| 11:13:42 | ← | kiwi_3697 parts (51f28de3@gateway/web/cgi-irc/kiwiirc.com/ip.81.242.141.227) () |
| 11:14:33 | <boxscape> | daffy "ambiguous type variable" means there is not enough context to determine how a type variable should be instantiated. For example, in `read :: Read a => String -> a`, `a` is a type variable, and if you try to just do `read "42"` without context, you'll get such an error because it doesn't know what `a` should be. `Any` is a special type that |
| 11:14:33 | <boxscape> | ghc uses in certain contexts to instantiate type variables if it doesn't know how else it should instantiate them - but Any should be a consequence, not the source of the issue here, I would think. |
| 11:14:52 | <daffy> | hmmm |
| 11:15:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:15:10 | <daffy> | i see |
| 11:15:18 | → | psutcliffe joins (~psutcliff@2a00:801:3f2:4b56:e93e:1663:ff0c:6c42) |
| 11:17:03 | <boxscape> | daffy feel free to post a link to code if you need more specific help |
| 11:17:16 | <xsperry> | if you pass the result of read "42" to some function, though, it will use the type of the argument to that function to determine what read should return |
| 11:18:48 | <daffy> | I'm using the function fromLists from hip, and I'm passing it something of type [[Pixel Y Double]]. |
| 11:18:59 | <daffy> | fromLists :: forall arr cs e. Array arr cs e => [[Pixel cs e]] -> Image arr cs e |
| 11:19:06 | <daffy> | this is the type of fromLists |
| 11:19:36 | <daffy> | _ :: [[Pixel Y Double]] -> Image Any Y Double and i believe this is the type of the variable I'm storing the result of fromLists to |
| 11:19:49 | × | todda7 quits (~torstein@athedsl-258913.home.otenet.gr) (Ping timeout: 260 seconds) |
| 11:21:00 | <boxscape> | hm so it doesn't know what `arr` should be |
| 11:21:18 | <daffy> | which arr is it talking about? I'm a bit confused about the type signature |
| 11:24:55 | <boxscape> | I haven't used hip unfortunately so I'm not 100% sure how it works, it looks like there's a BaseArray class which has instances for various array types like `VU` (unboxed vectors) and others, and this is what `arr` should be filled with as well |
| 11:25:06 | <boxscape> | in Image |
| 11:25:13 | <boxscape> | 's argument |
| 11:26:26 | <boxscape> | daffy can you try adding a type signature `[[Pixel Y Double]] -> Image VU Y Double`? |
| 11:27:22 | <boxscape> | basically arr determines which underlying array representation you use |
| 11:27:37 | <daffy> | when I read the image originally i specific VS |
| 11:27:44 | <daffy> | as the array representation |
| 11:27:49 | <daffy> | *specified |
| 11:27:50 | <boxscape> | ah, okay, in that case use VS |
| 11:28:25 | <daffy> | the type signature right now is IO (Inte.Image GHC.Types.Any Y Double) though |
| 11:28:29 | <daffy> | I'm doing this in main |
| 11:28:33 | <daffy> | and the function is in a do block |
| 11:29:23 | <boxscape> | in that case, can you try IO (Image VS Y Double)? |
| 11:29:34 | <boxscape> | though I'm not sure why it would be "Inte.Image" |
| 11:29:58 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 11:30:20 | <daffy> | oh Inte is just an alias for one of the packages |
| 11:30:26 | <boxscape> | ah, that makes sense |
| 11:30:40 | <olligobber> | cabal is such a pain |
| 11:32:03 | <[exa]> | olligobber: if I got your previous message right, you'd expect that dependencies are imported transitively? |
| 11:32:15 | <[exa]> | s/imported/exposed/ |
| 11:32:27 | <olligobber> | yeah |
| 11:32:41 | <olligobber> | if a needs b and b needs c, then a needs c, right? |
| 11:33:20 | <[exa]> | yeah, and the package is not getting installed for you? |
| 11:33:32 | <[exa]> | ie. the middle library compilation dies with not having a dependency? |
| 11:33:33 | <olligobber> | I'll share my .cabal and the error |
| 11:33:41 | <olligobber> | but yeah, that's what's happening |
| 11:34:09 | <daffy> | boxscape it worked |
| 11:34:42 | <daffy> | so the problem was that i had to specify what arr? |
| 11:34:48 | <olligobber> | https://gist.github.com/olligobber/6ba9cfba3953f7320eb350db621b16fb |
| 11:35:03 | <boxscape> | daffy: nice. I can't really tell you without more context why it didn't know what that variable should be, but generally speaking you can always get rid of "ambiguous type variable" errors by adding type signatures |
| 11:35:20 | <daffy> | ah, ok |
| 11:35:38 | <daffy> | so are the type signatures automatically generated by vscode no good? |
| 11:35:52 | <boxscape> | daffy ah, the "Any" was generated by VSCode? |
| 11:36:34 | <daffy> | uhhh no the the "Any" was when I hovered over the function |
| 11:36:49 | <daffy> | and it said it had Any as one of the types |
| 11:37:08 | <daffy> | IO (Inte.Image GHC.Types.Any Y Double) was what was generated by vscode |
| 11:38:20 | → | minoru_shiraeesh joins (~shiraeesh@109.166.56.139) |
| 11:39:15 | × | dsrt^ quits (dsrt@ip98-184-89-2.mc.at.cox.net) () |
| 11:39:39 | <[exa]> | olligobber: well so it's thinking that you want to import the library file as a source of the executable |
| 11:39:39 | <boxscape> | daffy I would guess that VSCode should generally produce decent type signatures, though I haven't tried it. In this particular case though it's unhelpful, because it also doesn't know how to properly fill the ambiguous type variable. |
| 11:40:03 | <xsperry> | do you get the same type in ghci with your old code? |
| 11:40:12 | <[exa]> | olligobber: which is kinda hard to explain to the compiler. Suggest separating src/ and lib/ ? |
| 11:40:27 | → | vs^ joins (vs@ip98-184-89-2.mc.at.cox.net) |
| 11:40:30 | <olligobber> | [exa], use src for the executables and lib for the library? |
| 11:40:32 | <boxscape> | xsperry keep in mind that this is inside an IO block so not trivial to ask for a type in ghci |
| 11:40:55 | × | srk quits (~sorki@gateway/tor-sasl/sorki) (Remote host closed the connection) |
| 11:40:55 | × | hexo quits (~hexo@gateway/tor-sasl/hexo) (Remote host closed the connection) |
| 11:41:00 | <xsperry> | type holes would work |
| 11:41:06 | <xsperry> | typed* |
| 11:41:09 | <[exa]> | olligobber: yeah. Just to make this perfectly unambiguous for the downstream compiler |
| 11:41:10 | → | srk joins (~sorki@gateway/tor-sasl/sorki) |
| 11:41:15 | → | hexo joins (~hexo@gateway/tor-sasl/hexo) |
| 11:41:53 | → | daffy80 joins (01c8aa98@1.200.170.152) |
| 11:41:59 | <[exa]> | unfortunately the `import` statements cannot easily distinguish between external library and local file |
| 11:42:03 | <daffy80> | boxscape ah okay I see |
| 11:42:04 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 11:42:08 | <olligobber> | oh I see |
| 11:42:56 | <[exa]> | olligobber: to fix that, cabal would need to pass explicit file lists of files that should not be touched in the build, which becomes rather clumsy with growing projects |
| 11:43:18 | <olligobber> | yay it compiled |
| 11:43:40 | <olligobber> | though my ghc-options got ignored... |
| 11:44:46 | <daffy> | boxscape if I wanted to display the image, I would have to do in a separate function? because displayImage outputs type IO() but that doesn't match the type signature i added |
| 11:45:05 | × | cartwright quits (~chatting@gateway/tor-sasl/cantstanya) (Remote host closed the connection) |
| 11:46:18 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds) |
| 11:46:24 | <[exa]> | olligobber: actually I never used shared options like this so cannot tell (blind suggestion: bump cabal req version to one that supports it) |
| 11:47:04 | <[exa]> | `common` is supported only since 2.2 |
| 11:47:23 | <boxscape> | daffy you should be able to do it in the same function. displayImage has type `Image arr cs e -> IO ()` I'm guessing? |
| 11:47:26 | → | cartwright joins (~chatting@gateway/tor-sasl/cantstanya) |
| 11:47:38 | <daffy80> | yessir |
| 11:48:17 | <olligobber> | [exa], ah, ty |
| 11:48:54 | <[exa]> | olligobber: anyway, packaging is hard and the amount of surprise is often surprising. |
| 11:49:54 | <boxscape> | daffy80 and you want this function you're in to return `IO (Image VS Y Double)`? |
| 11:50:33 | <daffy80> | yeap, the same type that I read it as |
| 11:52:23 | <boxscape> | daffy the last line in your do block should be a value of that type then, so if you want to display it first, you can write `do <first few lines> ioImg <- lastLine; displayImage lastLine; return lastLine` |
| 11:52:27 | × | James_F1 quits (~James_F@139.28.218.148) (Remote host closed the connection) |
| 11:52:29 | <boxscape> | where semicolons are newlines |
| 11:52:58 | <boxscape> | ehh |
| 11:52:59 | <boxscape> | wait |
| 11:53:12 | <boxscape> | `do <first few lines> img <- lastLine; displayImage img; return lastLine` |
| 11:53:18 | <boxscape> | ^ should have been this daffy80 |
| 11:53:42 | × | daffy quits (01c8aa98@1.200.170.152) (Ping timeout: 240 seconds) |
| 11:54:03 | <boxscape> | do let me know if that's not a comprehensible way of sharing code |
| 11:54:29 | <daffy80> | sorry what is lastLine? |
| 11:54:46 | <boxscape> | daffy80 just referring to the last line of your current do block in that function |
| 11:54:52 | <daffy80> | oh haha |
| 11:55:07 | <boxscape> | daffy80 oh sorry it's still wrong |
| 11:55:15 | <boxscape> | `do <first few lines> img <- lastLine; displayImage img; return img` |
| 11:55:20 | <boxscape> | should have been this.. |
| 11:56:15 | <daffy80> | Ahh okay |
| 11:56:30 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 11:56:31 | <daffy80> | Do I need to change the type signature accordingly? |
| 11:56:41 | <daffy80> | Because I'm outputting something different |
| 11:57:51 | <boxscape> | daffy80 you shouldn't have to - the type of displayImage is different, but if the last line is `return img`, that's what the type of that function is (the type of a do block is always the type of the last line). `<-` unwraps it from `IO` and `return` rewraps `img` into IO, so the type ought to be the same as before |
| 11:57:55 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 11:59:32 | <daffy80> | I meant like before when I was working on getting fromList to work, I changed the type signature , do I keep that? |
| 11:59:57 | <boxscape> | daffy80 if my mental image of what your code looks like is correct then yes, you keep that |
| 12:00:16 | <daffy80> | ok I see |
| 12:00:53 | <daffy80> | So <- allows you to extract something from IO? |
| 12:01:08 | <daffy80> | But when the do block ends it still outputs as IO? |
| 12:01:35 | × | sphalerite quits (~sphalerit@NixOS/user/lheckemann) (Quit: updates!) |
| 12:01:45 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 264 seconds) |
| 12:02:49 | <boxscape> | daffy80 technically <- is syntactic sugar for the >>= function, but you'll learn about that when you learn about monads. The type of an IO do block is always `IO (something)`, but inside the IO block, you can "get rid" of the IO wrapping with `<-`. But the type of the last line has to be `IO (something)`, so in this case we have to use the `return` |
| 12:02:49 | <boxscape> | function to wrap it back into IO so the type is correct. |
| 12:03:17 | <boxscape> | (to be clear, it has very little to do with the `return` keyword in other languages) |
| 12:03:56 | <daffy80> | oh |
| 12:04:02 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 12:04:12 | <daffy80> | Yeah I've been treating <- as an assignment operator |
| 12:04:42 | <boxscape> | it is meant to be reminiscent of that though it works fairly differently |
| 12:05:24 | <boxscape> | do-blocks are meant to look like imperative code, hence also the choice of the `return` name |
| 12:05:38 | <daffy80> | I see |
| 12:05:48 | → | int80h joins (uid148779@gateway/web/irccloud.com/x-xjmwrihbawesmufs) |
| 12:06:57 | <daffy80> | what is the difference between = and <- then? I guess you can use <- to work in the IO monad while = doesn't allow you to? |
| 12:07:47 | <boxscape> | you can use `let x = something` inside a do block. This is somewhat similar to `y <- something`, but if something has type `IO A`, then `x :: IO A` and `y :: A`. |
| 12:08:26 | <daffy80> | ahh ok |
| 12:08:34 | <boxscape> | (so if you want to pass `something` to a function that expects an A, not an IO A, you need to use <- to get access to it) |
| 12:08:47 | <daffy80> | I see |
| 12:08:54 | <daffy80> | This kind of reminds me of pointer access |
| 12:09:11 | <__monty__> | That's very different. |
| 12:09:11 | → | sphalerite joins (~sphalerit@NixOS/user/lheckemann) |
| 12:09:22 | <__monty__> | Think of it as passing an argument to a function. |
| 12:09:26 | <hugo> | 'do x <- something; return x' is equal to 'something >>= (\x -> return x)' |
| 12:09:31 | <__monty__> | Don't try to equate it with concepts you have from other languages. |
| 12:09:45 | <xsperry> | which is equal to 'something' :) |
| 12:09:48 | <hugo> | As people have said above, bind (>>=) unwraps the monad context from a value |
| 12:10:07 | <hugo> | xsperry: I know, but minimum viable example ;) |
| 12:10:18 | <daffy80> | and <- is just syntactic sugar for bind? |
| 12:10:41 | <hugo> | daffy80: yes. The entire 'do' notatation is just syntactic sugar for bind |
| 12:10:47 | <boxscape> | @undo do x <- something; return x |
| 12:10:47 | <lambdabot> | something >>= \ x -> return x |
| 12:11:31 | <boxscape> | @undo img <- lastLine; displayImage img; return img |
| 12:11:31 | <lambdabot> | <unknown>.hs:1:5:Parse error: <- |
| 12:11:37 | <boxscape> | @undo do img <- lastLine; displayImage img; return img |
| 12:11:37 | <lambdabot> | lastLine >>= \ img -> displayImage img >> return img |
| 12:11:45 | <xsperry> | daffy80, did you try using do and <- with monads other than IO? |
| 12:11:59 | × | xff0x quits (~xff0x@2001:1a81:5349:9200:2ca8:4ef3:12c9:ba81) (Ping timeout: 272 seconds) |
| 12:12:00 | <daffy80> | no, im just getting into haskell |
| 12:12:28 | → | xff0x joins (~xff0x@2001:1a81:5349:9200:2806:fad1:e222:a1c8) |
| 12:12:40 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8) |
| 12:12:44 | × | knupfer quits (~Thunderbi@200116b82cc9eb004cd887aa2955feba.dip.versatel-1u1.de) (Ping timeout: 240 seconds) |
| 12:13:23 | <hugo> | Try 'do Just 10; Nothing; Just 20' |
| 12:13:56 | <Aleksejs> | can I define types in lambdabot expressions? |
| 12:14:08 | <boxscape> | daffy80 are you familiar with list comprehensions? |
| 12:14:38 | <boxscape> | @let data Foo124 = Foo124 |
| 12:14:40 | <daffy80> | I've heard of the term yes |
| 12:14:40 | <lambdabot> | Defined. |
| 12:14:52 | <boxscape> | ^ Aleksejs |
| 12:14:59 | <Aleksejs> | nice |
| 12:15:58 | <daffy80> | hugo in GHCi? |
| 12:16:08 | <boxscape> | daffy80 list comprehensions in haskell are also more or less do notation, i.e. [ x + y | x <- [1..5] , y <- [1..6] ] is the same as `do x <- [1..5]; y <- [1..6]; return x + y`, so lists are another example of where do notation can be nice |
| 12:16:31 | <boxscape> | IO is just the place where it comes up most often |
| 12:17:07 | <daffy80> | So the do notation is just for readability? |
| 12:17:12 | <boxscape> | yes |
| 12:17:33 | <daffy80> | Ahh |
| 12:17:47 | → | clog joins (~nef@bespin.org) |
| 12:18:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 12:19:12 | <hugo> | daffy80: Raw do-notations in GHCi is clumsy. Try writing the following to a file and compiling it instead: |
| 12:19:15 | <hugo> | main :: IO () |
| 12:19:17 | <hugo> | main = putStrLn . show $ do Just 10; Nothing; Just 20 |
| 12:19:21 | <boxscape> | Aleksejs fwiw you may find yahb more convenient which is just directly a bridge to ghci |
| 12:19:31 | <boxscape> | % data Foo123 = FOo123 |
| 12:19:31 | <yahb> | boxscape: |
| 12:21:00 | <daffy80> | it returns Nothing when I run that hugo |
| 12:21:59 | <hugo> | daffy80: That's expected. I wanted to show an example of do (and bind) on a different monad than IO |
| 12:22:19 | → | Deide joins (~Deide@217.155.19.23) |
| 12:23:02 | <xsperry> | > do x <- Just 10; y <- Just 20; return (x+y) |
| 12:23:04 | <lambdabot> | Just 30 |
| 12:23:09 | <xsperry> | > do x <- Nothing; y <- Just 20; return (x+y) |
| 12:23:11 | <daffy80> | Hmm what is Just doing? |
| 12:23:11 | <lambdabot> | Nothing |
| 12:23:47 | <hugo> | daffy80: Just and Nothing are the two instances of the Maybe datatype. Which represent the posibility of a value being there |
| 12:24:03 | <xsperry> | Nothing is roughly equivalent to null reference in other languages. and Just is a constructor that indicates there's a value in Maybe |
| 12:24:19 | <daffy80> | I see |
| 12:24:38 | <daffy80> | So Maybe is a monad? |
| 12:24:44 | <xsperry> | yes |
| 12:25:02 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 12:25:28 | <xsperry> | difference being that there's no all-encompassing null that is included in every type, you have to use Maybe to get null (Nothing) |
| 12:27:02 | → | SchwarzeLocke joins (~SchwarzeL@178.239.168.171) |
| 12:27:46 | ← | int80h parts (uid148779@gateway/web/irccloud.com/x-xjmwrihbawesmufs) () |
| 12:27:46 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 12:28:01 | <daffy80> | right |
| 12:28:22 | <xsperry> | notice the similarity to IO do block, Just 20 is Maybe a, and x <- Just 20, x is a (where a is Num a => a, some numerical type) |
| 12:30:21 | <daffy80> | so any instance of a Monad can be used in a do block ? |
| 12:30:33 | <xsperry> | yes |
| 12:31:10 | <daffy80> | ic ic |
| 12:31:34 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 260 seconds) |
| 12:32:52 | <boxscape> | (though only one Monad per do block) |
| 12:33:24 | <boxscape> | i.e. you can't use <- to unwrap `IO String` if the do Block is supposed to return `Maybe Int` in the end |
| 12:33:46 | → | knupfer joins (~Thunderbi@200116b82cc9eb0070e901fffe4f30ff.dip.versatel-1u1.de) |
| 12:34:00 | <daffy80> | what determines what is supposed to return ? |
| 12:34:06 | <daffy80> | whichever one comes first? |
| 12:34:23 | <boxscape> | the type of the last line is the type of the do block |
| 12:34:26 | × | knupfer quits (~Thunderbi@200116b82cc9eb0070e901fffe4f30ff.dip.versatel-1u1.de) (Remote host closed the connection) |
| 12:34:31 | <daffy80> | oh |
| 12:34:44 | <boxscape> | so if you write `putStrLn "hi"` as last line, it will be a IO do block |
| 12:34:51 | <daffy80> | Ah ok |
| 12:35:09 | <hugo> | For me to properly get my head around all the intricacies of bind I had to reimplement it in a different language |
| 12:35:14 | <boxscape> | though on the other hand if you write `line <- getLine` somewhere in the middle, it will also infer that it should be an IO do block, it'll just complain if the last line doesn't match that |
| 12:35:44 | <daffy80> | hugo yeah I feel like I'm thinking of everything in terms of other languages |
| 12:36:26 | <daffy80> | right so the main thing to remember is to only have one monad per do block |
| 12:36:39 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 12:36:40 | <hugo> | daffy |
| 12:36:40 | <boxscape> | right |
| 12:37:52 | <hugo> | daffy80: reimplementing bind in a different language was mostly to avoid implementing bind in terms of bind |
| 12:38:52 | <hugo> | Also, the much more relaxed type system of scheme (which was what I wrote it in) allowed me to experiment with mixing types inside a do block, and got to see why it doesn't work |
| 12:40:17 | <daffy80> | I find the type system in haskell tough to get used to |
| 12:40:39 | <boxscape> | I find it so hard to go back to less strict systems at this point |
| 12:40:55 | <daffy80> | oh really |
| 12:41:02 | <Uniaika> | yeah it's a pain :/ |
| 12:41:15 | <daffy80> | Shouldn't it go the other way |
| 12:41:24 | <Uniaika> | you benefit from so much without having to compromise because you also have powerful abstractions |
| 12:41:26 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 264 seconds) |
| 12:41:26 | × | ixlun quits (~user@213.205.241.12) (Read error: Connection reset by peer) |
| 12:41:29 | <hugo> | The type system can be a hindrance until you get your head around it. |
| 12:41:51 | <boxscape> | every time I make a silly mistake I think "-.- this wouldn't have happened with haskell" |
| 12:41:51 | → | cheater joins (~user@unaffiliated/cheater) |
| 12:42:12 | <boxscape> | (except for the silly mistakes that still coul have happened with haskell :P) |
| 12:42:15 | <hugo> | I only just recently learned to actually leaverage the type system to my advantage |
| 12:43:31 | <daffy80> | what are some of those advantages? |
| 12:45:13 | <hugo> | In my current project I needed to parse messages of varying type. My code more or less looks like 'decoder = F <$> decoder <*> decoder <*> decoder' |
| 12:45:36 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
| 12:45:54 | → | ixlun joins (~user@213.205.241.12) |
| 12:45:54 | <hugo> | Where each instance of decoder has a different return type. Decided by F's type |
| 12:46:33 | → | o1lo01ol1o joins (~o1lo01ol1@89.214.221.60) |
| 12:46:33 | × | o1lo01ol1o quits (~o1lo01ol1@89.214.221.60) (Client Quit) |
| 12:46:39 | <Uniaika> | hugo: applicative functors <3 |
| 12:47:05 | → | daffy joins (01c8aa98@1.200.170.152) |
| 12:47:22 | × | daffy80 quits (01c8aa98@1.200.170.152) (Quit: Connection closed) |
| 12:48:01 | → | o1lo01ol1o joins (~o1lo01ol1@89.214.221.60) |
| 12:49:36 | → | kam1 joins (~kam1@5.125.126.175) |
| 12:51:38 | <daffy> | @boxs |
| 12:51:38 | <lambdabot> | Maybe you meant: docs b52s |
| 12:51:42 | <daffy> | oops |
| 12:51:56 | <daffy> | boxscape i tried your suggestion but vscode is screaming at me |
| 12:52:07 | <boxscape> | oh no! |
| 12:52:10 | <boxscape> | can you paste the code? |
| 12:52:11 | <daffy> | i think i misunderstood what you were saying lol |
| 12:52:24 | <boxscape> | on https://paste.tomsmeding.com/ or similar |
| 12:52:48 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 12:53:59 | <daffy> | https://paste.tomsmeding.com/GP2eJ91K |
| 12:55:10 | → | viluon joins (uid453725@gateway/web/irccloud.com/x-nrcpcvymghsotxnv) |
| 12:55:25 | <boxscape> | daffy ah, looks like you just need `return fin` instead of `return img` |
| 12:56:51 | <boxscape> | daffy since displayImage returns `IO ()`, the type of `img` in this case becomes `()`, and the type of `return img` is `IO ()` again, whereas the type of `fin` is `Image ...`, so `return fin` gives you `IO (Image ...)`, which is what you need |
| 12:56:56 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) (Ping timeout: 240 seconds) |
| 12:57:01 | <daffy> | it worked but how come? isn't img holding the result of displayImage |
| 12:57:11 | <boxscape> | indeed |
| 12:57:17 | <boxscape> | but you want to return the result of fromLists |
| 12:57:21 | <boxscape> | not the result of displayImage |
| 12:57:54 | <boxscape> | the useful part of displayImage is that it has a side effect (i.e. displaying the image), not that it returns something interesting |
| 12:58:49 | → | ambiso9 joins (~ambiso@209.182.239.205) |
| 12:58:59 | <boxscape> | in fact, its return value doesn't contain any interesting information, since there's only one possible value that's in `()` -- that value is also called `()`. functions that have return type `IO ()` are like functions that have return type void in C or Java |
| 12:59:10 | <daffy> | hmm but if i'm not returning img how come the image is still displayed? |
| 12:59:31 | <xsperry> | in the same way putStrLn doesn't return the string it prints |
| 12:59:37 | <daffy> | oh wait fin itself is an image |
| 12:59:54 | <daffy> | oh okay i see what u mean |
| 13:01:17 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 13:01:29 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 13:02:12 | <boxscape> | daffy since you're not using img you can also replace `img <- displayImage fin` with just `displayImage fin` |
| 13:02:21 | × | fendor quits (~fendor@078132053193.public.t-mobile.at) (Ping timeout: 264 seconds) |
| 13:02:51 | <Clint> | and is there a purpose in not having main :: IO () ? |
| 13:03:22 | <boxscape> | ah that's a good point |
| 13:04:02 | <daffy> | not having? or having |
| 13:04:42 | <boxscape> | daffy `main` typically has the type `IO ()`, since its only purpose (usually) is to perform an IO action, not to return anything |
| 13:05:17 | <boxscape> | daffy in your case that would mean having the last line be `displayImage fin` instead of adding `return fin` at the end |
| 13:05:44 | <daffy> | oh |
| 13:06:22 | <boxscape> | daffy though then you would have to make sure that it knows it should be using `VS` somewhere else, for example by adding the signature to `let fin = I.fromLists a :: Inte.Image I.VS Y Double` |
| 13:06:38 | <infinisil> | It probably would make sense for main to be `IO ExitCode` |
| 13:07:15 | <xsperry> | it would make average main longer though, since you want to return 0 in most cases |
| 13:07:18 | <boxscape> | infinisil does that work, as in, will the OS accept that as exit code? |
| 13:07:34 | <infinisil> | Oh no it doesn't work currently, I'm pretty sure at least |
| 13:07:38 | <boxscape> | I see |
| 13:07:39 | <xsperry> | no, return of main is ignored (except in ghci) |
| 13:08:24 | <daffy> | ok |
| 13:09:06 | <daffy> | if i'm writing to a single folder, does the forward slash go before or after the name of the folder? i've tried both but both give me errros |
| 13:09:23 | <boxscape> | writing what? |
| 13:09:55 | <daffy> | writing image to a file |
| 13:10:01 | <daffy> | i mean |
| 13:10:16 | <daffy> | yeah writing image to a file lol |
| 13:10:21 | <enikar> | is it possible to have a different type for main than IO ()? |
| 13:10:34 | <boxscape> | enikar I think `IO t` works, for any t |
| 13:11:07 | <enikar> | ok. That wonders me. |
| 13:11:12 | <boxscape> | daffy hm, in principle I would think something like "foldrName/fileName" should work, though I haven't used the hip functions |
| 13:11:44 | <boxscape> | enikar I'm pretty sure that's mostly just so you can use IO actions as the last line in main without having to explicitly discard the result |
| 13:11:55 | <boxscape> | s/IO actions/IO actions which don't have type IO () |
| 13:19:13 | <enikar> | but nothing can read this result. For what is it usefull? |
| 13:21:11 | <boxscape> | enikar say you want to end your program with saying "press enter to exit the program" and then wait for enter to be pressed. You can do that by writing `do putStrLn "press enter"; getLine`. But the type of this is `IO String` - so you couldn't do this if the type had to be IO () |
| 13:21:55 | <daffy> | oh i'm an idiot i just forgot to specify the name of the file |
| 13:22:01 | <daffy> | thanks boxscape for the help |
| 13:22:07 | <boxscape> | you're welcome |
| 13:22:55 | <boxscape> | enikar if it had to be IO () the last line would have to be `void getLine` instead - not a huge difference, I admit |
| 13:24:59 | <xsperry> | enikar, ghci can read the result. I sometimes take advantage of that (though rarely) |
| 13:25:38 | <boxscape> | I wonder if a haskell REPL was assumed to become a thing when the committee came up with this rule |
| 13:25:56 | <boxscape> | I imagine probably? |
| 13:26:11 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 13:28:12 | <boxscape> | hm can't figure out whether Miranda has a REPL |
| 13:32:32 | <enikar> | boxscape: I see. But for continuing the programm, IO () should also work, I bet. am I wrong? To Continue, I just call main recursively. |
| 13:32:43 | <enikar> | but never mind. |
| 13:32:48 | <boxscape> | yeah |
| 13:35:46 | → | Sheilong joins (uid293653@gateway/web/irccloud.com/x-lljagtdqleuggsro) |
| 13:35:49 | × | son0p quits (~son0p@181.58.39.182) (Quit: leaving) |
| 13:36:16 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 268 seconds) |
| 13:38:30 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 13:51:54 | × | hiroaki_ quits (~hiroaki@2a02:908:4b18:8c40:cc64:29af:c80:536f) (Ping timeout: 246 seconds) |
| 13:52:20 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 13:53:22 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 13:56:36 | → | bitmagie joins (~Thunderbi@200116b806dcda002112473b8db035bd.dip.versatel-1u1.de) |
| 13:57:23 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 13:58:14 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) (Ping timeout: 264 seconds) |
| 13:58:25 | → | soft-warm joins (44695313@ip68-105-83-19.sd.sd.cox.net) |
| 13:59:26 | → | hendi joins (uid489601@gateway/web/irccloud.com/x-cyumymliypkvjqpl) |
| 13:59:52 | × | soft-warm quits (44695313@ip68-105-83-19.sd.sd.cox.net) (Client Quit) |
| 14:01:04 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection) |
| 14:01:23 | × | dxld quits (~dxld@rush.pub.dxld.at) (Remote host closed the connection) |
| 14:02:34 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 14:02:54 | → | soft-warm joins (44695313@ip68-105-83-19.sd.sd.cox.net) |
| 14:02:56 | × | ambiso9 quits (~ambiso@209.182.239.205) (Quit: The Lounge - https://thelounge.chat) |
| 14:03:36 | → | svet_ joins (~svet@90.200.185.163) |
| 14:04:38 | → | ambiso9 joins (~ambiso@209.182.239.205) |
| 14:05:17 | → | ADG1089__ joins (~aditya@110.226.222.179) |
| 14:05:22 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) |
| 14:05:39 | <ADG1089__> | anyone running haskell on arch? |
| 14:07:49 | × | forgottenone quits (~forgotten@176.42.27.254) (Remote host closed the connection) |
| 14:08:55 | → | forgottenone joins (~forgotten@176.42.27.254) |
| 14:10:48 | <ADG1089__> | how to automatically add extra deps based on hints from stack build? |
| 14:11:20 | <int-e> | ADG1089__: I've done that for a while... I recommend only using the distro compiler to compile your own |
| 14:11:43 | <int-e> | stack works I suppose |
| 14:12:01 | → | carlomagno joins (~cararell@148.87.23.10) |
| 14:12:02 | <nshepperd2> | step 1 of using haskell on arch is to uninstall all haskell-related arch packages |
| 14:12:07 | <int-e> | but then it shouyld no longer matter that you're on arch |
| 14:13:11 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 14:14:31 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 14:15:15 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 14:15:17 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 14:15:35 | <ADG1089__> | problem is llvm is v11 on arch, latest ghc supports v10 or 9 i think |
| 14:15:57 | × | minoru_shiraeesh quits (~shiraeesh@109.166.56.139) (Remote host closed the connection) |
| 14:17:18 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-fhpztltksioqsdcb) |
| 14:18:03 | × | deja quits (~deja@212095008174.public.telering.at) (Quit: requested) |
| 14:18:38 | → | renzhi joins (~renzhi@2607:fa49:653f:eb00::5bc7) |
| 14:19:02 | → | minoru_shiraeesh joins (~shiraeesh@109.166.56.139) |
| 14:19:14 | → | mk2048 joins (3e85a292@h62-133-162-146.dyn.bashtel.ru) |
| 14:19:24 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 240 seconds) |
| 14:19:33 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 14:19:44 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 14:21:17 | <int-e> | ADG1089__: Oh, that may be a problem, but I can't help. I only used the native code generator (on x86-64)... |
| 14:23:36 | × | hendursa1 quits (~weechat@gateway/tor-sasl/hendursaga) (Quit: hendursa1) |
| 14:23:49 | <int-e> | Arch just isn't a very nice distribution, I'm afraid... some packages just need slots to be used sanely, and llvm is one of them. not to mention the insanity of continually updating haskell packages shipped as shared libraries with no promise of binary compatibility between versions |
| 14:23:57 | → | hendursaga joins (~weechat@gateway/tor-sasl/hendursaga) |
| 14:25:15 | × | luigy quits (~luigy@104.236.106.229) (*.net *.split) |
| 14:25:15 | × | xcin quits (~x@159.203.132.140) (*.net *.split) |
| 14:25:15 | × | debugloop quits (~danieln@unaffiliated/debugloop) (*.net *.split) |
| 14:25:22 | → | luigy joins (~luigy@104.236.106.229) |
| 14:25:33 | → | debugloop joins (~danieln@unaffiliated/debugloop) |
| 14:25:48 | × | hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Remote host closed the connection) |
| 14:25:52 | × | mk2048 quits (3e85a292@h62-133-162-146.dyn.bashtel.ru) (Quit: Connection closed) |
| 14:26:07 | → | xcin joins (~x@159.203.132.140) |
| 14:27:31 | × | daffy quits (01c8aa98@1.200.170.152) (Quit: Connection closed) |
| 14:28:11 | → | hendursaga joins (~weechat@gateway/tor-sasl/hendursaga) |
| 14:28:52 | <ADG1089__> | int-e: what distro would you recommend then? |
| 14:29:40 | <nshepperd2> | ADG1089__: you can install llvm10 to roll back |
| 14:32:21 | <hpc> | whatever you're most comfortable installing ghcup on, probably |
| 14:32:33 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 245 seconds) |
| 14:34:40 | <ADG1089__> | I usually install ghcup and use it to install cabal, hls, ghc. Also install stack using wget for projects that require it. |
| 14:34:50 | <ADG1089__> | Install global libraries using cabal |
| 14:34:54 | <int-e> | ADG1089__: I don't know, I'm on debian unstable for development needs but still manage my own ghc installations. it can definitely install several llvm versions though |
| 14:35:09 | <hpc> | bleh, stack |
| 14:35:27 | <ADG1089__> | hpc: what do you recommend? |
| 14:35:32 | <hpc> | if a project is so delicate that only stack can handle its build environment, i don't want to touch it |
| 14:35:53 | → | dxld joins (~dxld@rush.pub.dxld.at) |
| 14:36:24 | <ADG1089__> | this i smy project: https://github.com/adityagupta1089/Project-Euler-Haskell |
| 14:38:44 | × | kosmikus_ quits (~kosmikus@nullzig.kosmikus.org) (Remote host closed the connection) |
| 14:40:30 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 14:40:52 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) |
| 14:46:45 | → | kosmikus joins (~kosmikus@haskell/developer/kosmikus) |
| 14:49:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 14:51:06 | → | geekosaur joins (ae68c070@cpe-174-104-192-112.neo.res.rr.com) |
| 14:51:29 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 14:53:57 | × | kam1 quits (~kam1@5.125.126.175) (Ping timeout: 264 seconds) |
| 14:54:55 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 14:56:18 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 245 seconds) |
| 14:59:43 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) (Ping timeout: 260 seconds) |
| 15:00:49 | × | minoru_shiraeesh quits (~shiraeesh@109.166.56.139) (Read error: Connection reset by peer) |
| 15:01:25 | → | minoru_shiraeesh joins (~shiraeesh@109.166.56.139) |
| 15:02:12 | → | redcherri joins (bab724e7@186.183.36.231) |
| 15:04:02 | × | p8m quits (p8m@gateway/vpn/protonvpn/p8m) (Remote host closed the connection) |
| 15:04:44 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 15:05:06 | → | p8m joins (p8m@gateway/vpn/protonvpn/p8m) |
| 15:05:45 | → | eoyath joins (uid489605@gateway/web/irccloud.com/x-jbebfqsuczylpppq) |
| 15:06:00 | × | tv quits (~tv@unaffiliated/tv) (Read error: Connection reset by peer) |
| 15:06:43 | → | ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 15:08:06 | × | ADG1089__ quits (~aditya@110.226.222.179) (Quit: Konversation terminated!) |
| 15:08:10 | → | Tario joins (~Tario@201.192.165.173) |
| 15:11:33 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 15:14:39 | ← | redcherri parts (bab724e7@186.183.36.231) () |
| 15:15:05 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 15:16:03 | <BigLama> | tomsmeding: hi |
| 15:17:54 | <BigLama> | tomsmeding: Here's a follow-up about my issue with the Req library. The author answered me by email : "HTTP connections are indeed reused in Req, but this is just to make HTTP |
| 15:17:54 | <BigLama> | calls happen faster." |
| 15:18:20 | <BigLama> | tomsmeding: I switched to wreq which solved my issue (it has a session mechanism) |
| 15:19:12 | <BigLama> | He also said to do like you suggested by passing the cookieJar manually |
| 15:21:00 | <__monty__> | That was my suspicion, connection sharing and sessions are two different things. |
| 15:21:24 | → | systemhalted joins (~aqualogic@71-129-231-253.lightspeed.rcsntx.sbcglobal.net) |
| 15:21:47 | <BigLama> | Right. So I don't know exactly how session are preserved, except that there are cookiese involved |
| 15:22:02 | <BigLama> | cookies* |
| 15:23:14 | → | tv joins (~tv@unaffiliated/tv) |
| 15:24:45 | × | mayleesia quits (4d0db908@dynamic-077-013-185-008.77.13.pool.telefonica.de) (Quit: Connection closed) |
| 15:25:02 | → | hiroaki_ joins (~hiroaki@2a02:908:4b18:8c40:de89:ba5e:8412:9d71) |
| 15:25:32 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 15:26:34 | × | systemhalted quits (~aqualogic@71-129-231-253.lightspeed.rcsntx.sbcglobal.net) (Ping timeout: 260 seconds) |
| 15:27:39 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 15:29:55 | × | dolio quits (~dolio@haskell/developer/dolio) (Quit: ZNC 1.8.2 - https://znc.in) |
| 15:32:22 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 260 seconds) |
| 15:33:45 | → | dolio joins (~dolio@haskell/developer/dolio) |
| 15:36:31 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:98b:c360:694b:b651) |
| 15:38:19 | × | cyphase quits (~cyphase@unaffiliated/cyphase) (Ping timeout: 260 seconds) |
| 15:38:44 | → | neiluj joins (~jco@91-167-203-101.subs.proxad.net) |
| 15:38:44 | × | neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Changing host) |
| 15:38:44 | → | neiluj joins (~jco@unaffiliated/neiluj) |
| 15:39:59 | × | vchlup_ quits (~vchlup@115.128.broadband17.iol.cz) (Ping timeout: 260 seconds) |
| 15:41:06 | → | sQVe joins (~sQVe@unaffiliated/sqve) |
| 15:41:47 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 15:42:23 | × | sQVe quits (~sQVe@unaffiliated/sqve) (Client Quit) |
| 15:42:50 | → | mrioqueiroz joins (~mrioqueir@186.251.19.98) |
| 15:43:48 | <__monty__> | Afaik there's many mechanisms so cookies don't technically have to be involved. |
| 15:45:19 | → | kam1 joins (~kam1@5.125.126.175) |
| 15:46:10 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:98b:c360:694b:b651) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:48:37 | <Philonous> | What's the best practice for wrapping C libraries? c2sh still? |
| 15:49:14 | <geekosaur> | I don't think c2hs has ever been a best practice; it fails in too many cases |
| 15:49:25 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:98b:c360:694b:b651) |
| 15:49:30 | <geekosaur> | hsc2hs is the usual way |
| 15:55:20 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 15:56:35 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 15:58:43 | × | z0k quits (~user@115-186-141-91.nayatel.pk) (Ping timeout: 272 seconds) |
| 15:59:55 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) (Ping timeout: 240 seconds) |
| 15:59:57 | × | sdrodge quits (~sdrodge@unaffiliated/sdrodge) (Quit: WeeChat 3.0) |
| 16:01:01 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 16:01:04 | → | sdrodge joins (~sdrodge@unaffiliated/sdrodge) |
| 16:01:08 | → | swarmcollective joins (~joseph@cpe-65-31-18-174.insight.res.rr.com) |
| 16:01:53 | × | vnz quits (~vnz@unaffiliated/vnz) (Quit: ZNC - http://znc.in) |
| 16:01:53 | × | hiroaki_ quits (~hiroaki@2a02:908:4b18:8c40:de89:ba5e:8412:9d71) (Ping timeout: 272 seconds) |
| 16:01:57 | <davean> | Philonous: I would agree that c2hs is not a good idea. |
| 16:03:06 | <geekosaur> | there's also inline-c |
| 16:03:17 | <davean> | inline-c is rather different. Great for its uses! |
| 16:03:36 | <davean> | I don't think of it at all as solving the same problem, but who knows what their actual problem is. |
| 16:03:50 | → | vnz joins (~vnz@51.15.143.225) |
| 16:03:50 | × | vnz quits (~vnz@51.15.143.225) (Changing host) |
| 16:03:50 | → | vnz joins (~vnz@unaffiliated/vnz) |
| 16:03:58 | <davean> | actually the best binding solution I knows involves mixing hsc2hs and inline-c |
| 16:07:16 | <swarmcollective> | I'm trying to find a way to replicate this functionality with Data.Text: last $ concat $ sortOn length $ group $ sort "abacad" |
| 16:07:57 | <swarmcollective> | However, it seems as though Data.Text does not have a `sort`, so the following does not produce the same output: T.last $ T.concat $ sortOn T.length $ T.group $ T.pack "abacad" |
| 16:08:07 | <davean> | No, of course it doesn't |
| 16:08:17 | <davean> | But that doesn't cause a problem persay. |
| 16:08:31 | <davean> | You'd get a list of texts, because texts contain charactures, and you'd sort the list |
| 16:08:47 | → | Alleria joins (~textual@zrcout.mskcc.org) |
| 16:08:55 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 16:09:07 | <davean> | You just need to keep straight what you're talking about |
| 16:09:11 | Alleria | is now known as Guest50271 |
| 16:09:32 | <swarmcollective> | Is T.unpack the simplest solution? |
| 16:09:41 | <EvanR> | yeah sorting a packed text seems tricky at best |
| 16:10:01 | <dolio> | Is this just getting the most frequent character? |
| 16:10:03 | <davean> | group :: Text -> [Text] |
| 16:10:07 | <davean> | No, that should be fine |
| 16:10:19 | <dolio> | There's probably a better way than that code. |
| 16:10:23 | <swarmcollective> | Right, the character that occurs most often. |
| 16:10:50 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 16:11:17 | <EvanR> | walk through the text updating a map representing a histogram |
| 16:11:39 | <davean> | Right |
| 16:11:53 | <dolio> | For instance, it's rebuilding the string just to take the last character, but you could drop all but the last group instead. But also yeah, keeping track of a map or something is probably better than that. |
| 16:12:35 | <swarmcollective> | I'll give it a try with the Map Char Int (or similar) |
| 16:12:51 | <dolio> | Oh, sorting and then taking the last character is worse than sorting by the opposite order, most likely, as well. |
| 16:13:15 | <dolio> | But that won't matter for a map. |
| 16:13:39 | <Philonous> | davean, inline-c seems convenient, however, I'm mostly look for a way to automatically convert C-enums to Haskell data including the Enum instance |
| 16:14:32 | <minoru_shiraeesh> | serialize and then deserialize? |
| 16:14:35 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 240 seconds) |
| 16:14:39 | <davean> | Right, Philonous, different tasks. |
| 16:15:11 | <Philonous> | Treating unicode strings as a list of code points can lead you astray, since you're most likely interested in grapheme clusters rather than code points. |
| 16:15:48 | <davean> | Yah, theres never a right way to do anything with unicode :/ |
| 16:16:06 | <EvanR> | there's the old fallback, "my data is mainly ascii anyway" xD |
| 16:16:21 | Uniaika | hisses in French alphabet |
| 16:16:37 | <davean> | I like that Uniaika only uses ASCII to hiss in french. |
| 16:16:41 | Uniaika | can also hiss in German -> ßßßßßßßßß |
| 16:16:55 | <minoru_shiraeesh> | Philonous: why would you want to automatically convert C-enums to Haskell data? you invoke C code from Haskell, or the opposite way? |
| 16:17:11 | <Uniaika> | what's up davean? :) |
| 16:17:23 | <Philonous> | I want to call into C |
| 16:17:33 | jlamothe_ | is now known as jlamothe |
| 16:17:41 | <EvanR> | for french, you could execute a graven rite to ensure your data is precomposed |
| 16:19:00 | <davean> | Uniaika: I don't know, I've been avoiding checking in for the day to find out whats up because then I'd have to start dealing with it. |
| 16:19:39 | <Uniaika> | davean: eh, I feel you |
| 16:19:42 | <Uniaika> | <3 <3 |
| 16:21:33 | × | boxscape quits (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Ping timeout: 264 seconds) |
| 16:22:42 | → | kevin__ joins (~kevin@pool-100-37-189-79.nycmny.fios.verizon.net) |
| 16:25:39 | × | bitmagie quits (~Thunderbi@200116b806dcda002112473b8db035bd.dip.versatel-1u1.de) (Quit: bitmagie) |
| 16:29:10 | → | jumper149 joins (~jumper149@130.75.103.194) |
| 16:31:40 | → | dropFM joins (~dropFM@cpc1-brnt3-2-0-cust108.4-2.cable.virginm.net) |
| 16:31:41 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 16:32:37 | → | lazyshrk joins (~lazyshrk@128.199.58.13) |
| 16:32:48 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 16:33:19 | × | Franciman quits (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving) |
| 16:33:31 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:33:44 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Client Quit) |
| 16:36:25 | → | ezrakilty joins (~ezrakilty@97-113-55-149.tukw.qwest.net) |
| 16:39:46 | × | conal quits (~conal@192.145.118.103) (Quit: Computer has gone to sleep.) |
| 16:40:16 | → | dyeplexer joins (~lol@unaffiliated/terpin) |
| 16:40:35 | × | ezrakilty quits (~ezrakilty@97-113-55-149.tukw.qwest.net) (Ping timeout: 240 seconds) |
| 16:40:47 | × | dropFM quits (~dropFM@cpc1-brnt3-2-0-cust108.4-2.cable.virginm.net) (Quit: Leaving) |
| 16:41:55 | × | poscat quits (~poscat@114.243.61.85) (Quit: ZNC 1.8.2 - https://znc.in) |
| 16:43:57 | → | poscat joins (~poscat@114.243.61.85) |
| 16:44:05 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 16:44:56 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 16:45:12 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 16:45:13 | → | jamm__ joins (~jamm@unaffiliated/jamm) |
| 16:47:00 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 16:47:35 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 16:48:15 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 240 seconds) |
| 16:49:24 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
| 16:49:29 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 16:51:03 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:98b:c360:694b:b651) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 16:51:55 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 240 seconds) |
| 16:51:55 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:98b:c360:694b:b651) |
| 16:54:14 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 245 seconds) |
| 16:55:24 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 16:55:56 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.8.2 - https://znc.in) |
| 16:56:54 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 17:02:24 | <swarmcollective> | The map as histogram works well: fst (M.foldlWithKey most (' ', 0 :: Int) (T.foldl hist M.empty (T.pack "abacad"))) Thanks for the help! |
| 17:03:37 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 17:12:23 | → | dora joins (~irfan@117.222.64.138) |
| 17:16:18 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 17:16:34 | <hololeap> | extensible effects seems like a cool concept, but it seems mostly unused. why is that? |
| 17:17:33 | <geekosaur> | very slow, iirc |
| 17:18:14 | <geekosaur> | the existing effect systems are all fairly heavyweight |
| 17:19:23 | <dmj`> | hololeap: some use free monads, free monads allocate a lot, lots of allocations increases GC time, GC time slows you down. Not easy to optimize away either. |
| 17:19:28 | <c_wraith> | Not convinced the utility is actually there |
| 17:21:03 | → | hiroaki_ joins (~hiroaki@2a02:908:4b18:8c40:a3ba:befb:e670:2e90) |
| 17:21:24 | <[exa]> | hololeap: sometimes it's easier to just write your monad in the right way from scratch, and there's no software I know of that would really gain much from using the extensible effects. Also haskell people _love_ simple exercises, such as writing the right monad. |
| 17:21:36 | × | dora quits (~irfan@117.222.64.138) (Quit: leaving) |
| 17:21:56 | <[exa]> | hololeap: anyway there's Eff and it has users and some performance benefits, it might be interesting to look around there |
| 17:22:05 | → | fendor joins (~fendor@178.115.128.216.wireless.dyn.drei.com) |
| 17:23:13 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 17:23:17 | <hololeap> | fair enough |
| 17:23:22 | <swarmcollective> | hololeap, have you looked at fused-effects? (It is on my todo list) |
| 17:23:49 | <hololeap> | i started learning purescript and it sounds like they use it quite a bit |
| 17:24:57 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 17:25:00 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 17:25:01 | <maerwald> | hololeap: https://github.com/hasura/eff |
| 17:25:05 | → | pera joins (~pera@unaffiliated/pera) |
| 17:25:08 | <dolio> | Extensible effects are actually used all the time, in the form of mtl. |
| 17:25:11 | <maerwald> | that's a WIP zero-cost (or so) one |
| 17:25:30 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:98b:c360:694b:b651) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 17:25:32 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 17:25:40 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 17:25:43 | <[exa]> | hololeap: btw check out the tagless final encoding (first 3 googles should do), IMHO it's a pretty good alternative, feels a bit more lightweight |
| 17:26:00 | <maerwald> | hololeap: you might also wanna watch https://www.youtube.com/watch?v=0jI-AlWEwYI |
| 17:26:32 | → | d34df00d joins (~d34df00d@104-14-27-213.lightspeed.austtx.sbcglobal.net) |
| 17:26:37 | <d34df00d> | Hi! |
| 17:26:59 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 17:27:20 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:90e2:dd27:98b8:d1b2) |
| 17:27:33 | <d34df00d> | I want to contribute to a project that uses tasty for tests (and tasty's quickcheck integration in particular). One of the tests involves a property over bytestrings. What's the right way to ensure that quickcheck also checks sufficiently large bytestrings? |
| 17:27:51 | × | Kaeipi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 17:27:54 | <d34df00d> | My modification introduces branching for strings longer than N, so I want to make sure that those are indeed checked. |
| 17:29:29 | <tomsmeding> | BigLama: indeed, in the vast majority of cases, website sessions are kept using a cookie on the client side; cookies have nothing to do with connection sharing, but require you to keep a cookie jar. Some libraries do that for you, some don't; notably, plain 'curl' in the terminal also doesn't, but can be configured to use a cookie jar |
| 17:29:36 | <tomsmeding> | browsers, of course, store cookies automatically |
| 17:29:37 | <[exa]> | d34df00d: you can make an extra test with a predicate like `length str > N ==> myfunctionWorksOn str` |
| 17:29:37 | × | mrioqueiroz quits (~mrioqueir@186.251.19.98) (Ping timeout: 276 seconds) |
| 17:29:57 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 264 seconds) |
| 17:29:59 | × | jumper149 quits (~jumper149@130.75.103.194) (Quit: WeeChat 3.0.1) |
| 17:30:13 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 260 seconds) |
| 17:30:26 | <[exa]> | d34df00d: alternatively there might be some quickcheck tooling for generating longer strings; similar to the NonEmpty that it has for lists. Or you can write your own. |
| 17:30:44 | <d34df00d> | [exa]: oh, that's a good idea! I remember seeing something for rejecting inputs in raw quickcheck. What's the right way to do that in tasty-speak? |
| 17:30:59 | <d34df00d> | I'm rather lost at the "and" in "tasty and quickcheck". |
| 17:31:26 | × | usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving) |
| 17:31:44 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 245 seconds) |
| 17:32:03 | <maerwald> | dolio: there was a lengthy argument by alexis why mtl isn't really an effects system, but I got lost in all the arguments |
| 17:33:18 | <shapr> | where was that discussion? |
| 17:33:23 | <maerwald> | here on IRC |
| 17:33:31 | <maerwald> | I think I have it somewhere |
| 17:35:23 | <maerwald> | shapr: https://paste.tomsmeding.com/ds5KKItJ |
| 17:35:35 | <maerwald> | I think it was that |
| 17:35:52 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 17:35:55 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 17:36:28 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 17:36:29 | <[exa]> | d34df00d: well not sure how much tasty modifies that, I don't know it at all. The advice was plain quickcheckish. :D |
| 17:40:11 | → | knupfer joins (~Thunderbi@200116b82cc9eb00a0beb8f34ef315a0.dip.versatel-1u1.de) |
| 17:40:56 | <tomsmeding> | d34df00d: what tasty interface are you using, exactly? |
| 17:41:19 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds) |
| 17:41:55 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Remote host closed the connection) |
| 17:42:10 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 17:42:11 | <tomsmeding> | in particular, if you're using tasty-quickcheck: that package just re-exports (most of) quickcheck's functionality, I believe |
| 17:42:15 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 17:42:20 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 17:42:29 | <d34df00d> | [exa]: that's still a good advice! I completely forgot about samples rejection and was only looking at the modifiers. |
| 17:42:34 | <d34df00d> | tomsmeding: https://github.com/haskell/bytestring/blob/master/tests/Properties/ByteString.hs#L285-L286 this one. |
| 17:42:47 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 17:43:18 | <tomsmeding> | I see 'import Test.Tasty.QuickCheck' -- it seems my suspicion was correct :) |
| 17:44:19 | × | toorevitimirp quits (~tooreviti@117.182.182.60) (Remote host closed the connection) |
| 17:46:26 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 17:47:09 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 245 seconds) |
| 17:49:19 | → | geowiesnot_bis joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 17:50:05 | → | ddellacosta joins (~ddellacos@86.106.143.201) |
| 17:51:25 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 17:54:18 | × | kevin__ quits (~kevin@pool-100-37-189-79.nycmny.fios.verizon.net) (Quit: Leaving) |
| 17:55:21 | → | conal joins (~conal@192.145.118.163) |
| 17:55:54 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds) |
| 17:56:43 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:01:09 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 264 seconds) |
| 18:01:29 | → | ClaudiusMaximus joins (~claude@191.123.199.146.dyn.plus.net) |
| 18:01:29 | × | ClaudiusMaximus quits (~claude@191.123.199.146.dyn.plus.net) (Changing host) |
| 18:01:29 | → | ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus) |
| 18:02:03 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:02:19 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 260 seconds) |
| 18:02:21 | → | ADG1089__ joins (~aditya@110.226.222.179) |
| 18:04:37 | × | dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection) |
| 18:06:33 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 264 seconds) |
| 18:07:27 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:07:30 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 18:08:29 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:08:34 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 18:09:36 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:09:51 | → | redmp joins (~redmp@172.58.38.148) |
| 18:10:45 | × | geowiesnot_bis quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 264 seconds) |
| 18:12:01 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:90e2:dd27:98b8:d1b2) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 18:13:59 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds) |
| 18:14:55 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:15:01 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 18:15:40 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 18:16:03 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:17:23 | × | rajivr quits (uid269651@gateway/web/irccloud.com/x-nydprmgitcsjloxf) (Quit: Connection closed for inactivity) |
| 18:18:03 | → | mayleesia joins (4d0db908@dynamic-077-013-185-008.77.13.pool.telefonica.de) |
| 18:20:57 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 264 seconds) |
| 18:21:19 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:22:14 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 18:23:06 | × | mayleesia quits (4d0db908@dynamic-077-013-185-008.77.13.pool.telefonica.de) (Quit: Connection closed) |
| 18:25:34 | → | Tops21 joins (~Tobias@dyndsl-095-033-017-115.ewe-ip-backbone.de) |
| 18:26:36 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 18:27:40 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:27:46 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 18:28:07 | × | Codaraxis quits (Codaraxis@gateway/vpn/mullvad/codaraxis) (Ping timeout: 276 seconds) |
| 18:28:48 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:29:25 | × | Tops2 quits (~Tobias@dyndsl-095-033-017-115.ewe-ip-backbone.de) (Ping timeout: 276 seconds) |
| 18:30:02 | → | aveltras joins (uid364989@gateway/web/irccloud.com/x-miyjlxdpioeuznoz) |
| 18:30:18 | × | sakirious quits (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Quit: The Lounge - https://thelounge.chat) |
| 18:30:58 | → | Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis) |
| 18:31:17 | × | akasha quits (~user@unaffiliated/akasha) (Read error: Connection reset by peer) |
| 18:31:56 | × | tanuki_ quits (~quassel@173.168.154.189) (Ping timeout: 240 seconds) |
| 18:32:28 | → | epicte7us joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 18:33:33 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 264 seconds) |
| 18:33:36 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 240 seconds) |
| 18:35:07 | → | tanuki joins (~quassel@173.168.154.189) |
| 18:35:11 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:36:56 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 240 seconds) |
| 18:37:16 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 18:39:06 | × | emmanuel_erc quits (~user@cpe-74-71-106-64.nyc.res.rr.com) (Remote host closed the connection) |
| 18:39:39 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 245 seconds) |
| 18:40:26 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:40:33 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 18:40:53 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) |
| 18:41:35 | → | Franciman joins (~francesco@host-82-49-79-189.retail.telecomitalia.it) |
| 18:42:17 | × | vs^ quits (vs@ip98-184-89-2.mc.at.cox.net) () |
| 18:42:21 | × | Codaraxis quits (Codaraxis@gateway/vpn/mullvad/codaraxis) (Remote host closed the connection) |
| 18:42:42 | → | Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis) |
| 18:42:49 | → | seneca joins (~epictetus@152.89.204.185) |
| 18:43:09 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 18:44:45 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:44:54 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds) |
| 18:45:54 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:45:55 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 18:46:39 | × | epicte7us quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 260 seconds) |
| 18:46:52 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:46:56 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 18:47:28 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 18:48:23 | × | seneca quits (~epictetus@152.89.204.185) (Quit: Leaving) |
| 18:48:24 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 18:49:02 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:49:04 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 18:50:06 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:50:09 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 18:51:10 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:55:16 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 240 seconds) |
| 18:55:20 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 18:55:28 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 18:55:51 | → | __minoru__shirae joins (~shiraeesh@5.101.59.4) |
| 18:56:04 | × | minoru_shiraeesh quits (~shiraeesh@109.166.56.139) (Ping timeout: 276 seconds) |
| 18:56:39 | × | ADG1089__ quits (~aditya@110.226.222.179) (Remote host closed the connection) |
| 18:58:23 | → | deja joins (~deja@212095008174.public.telering.at) |
| 18:59:57 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 264 seconds) |
| 19:00:45 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:03:32 | → | berberman_ joins (~berberman@unaffiliated/berberman) |
| 19:04:55 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds) |
| 19:05:19 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds) |
| 19:08:02 | × | dxld quits (~dxld@rush.pub.dxld.at) (Remote host closed the connection) |
| 19:11:22 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:11:40 | × | Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 276 seconds) |
| 19:12:09 | → | elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 19:13:01 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 19:16:09 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 264 seconds) |
| 19:16:37 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:16:40 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 19:17:39 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:17:40 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 19:18:49 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 19:18:54 | × | fendor quits (~fendor@178.115.128.216.wireless.dyn.drei.com) (Remote host closed the connection) |
| 19:18:55 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Read error: Connection reset by peer) |
| 19:20:01 | → | fendor joins (~fendor@178.115.128.216.wireless.dyn.drei.com) |
| 19:22:49 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 19:24:34 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 260 seconds) |
| 19:25:55 | → | tsrt^ joins (tsrt@ip98-184-89-2.mc.at.cox.net) |
| 19:26:21 | → | raul782 joins (~raul782@190.239.55.127) |
| 19:27:50 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 19:29:27 | × | conal quits (~conal@192.145.118.163) (Quit: Computer has gone to sleep.) |
| 19:30:15 | × | hiroaki_ quits (~hiroaki@2a02:908:4b18:8c40:a3ba:befb:e670:2e90) (Ping timeout: 272 seconds) |
| 19:30:21 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:30:26 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 19:31:28 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:31:29 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 19:32:35 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 240 seconds) |
| 19:33:31 | × | raul782 quits (~raul782@190.239.55.127) () |
| 19:33:36 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:37:18 | → | nullniverse joins (~null@unaffiliated/nullniverse) |
| 19:37:59 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds) |
| 19:38:51 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:40:32 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 19:40:45 | × | tanuki quits (~quassel@173.168.154.189) (Ping timeout: 264 seconds) |
| 19:40:49 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) (Remote host closed the connection) |
| 19:40:52 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) |
| 19:40:56 | → | Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 19:41:14 | → | conal joins (~conal@192.145.118.119) |
| 19:42:55 | → | tanuki joins (~quassel@173.168.154.189) |
| 19:43:02 | → | hiroaki_ joins (~hiroaki@2a02:908:4b18:8c40:2d1:b436:dd9b:cc7) |
| 19:43:42 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 19:43:49 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds) |
| 19:44:10 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:44:14 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 19:45:15 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:45:55 | × | jamm__ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 19:48:09 | × | hendi quits (uid489601@gateway/web/irccloud.com/x-cyumymliypkvjqpl) () |
| 19:48:21 | → | hendi joins (uid489601@gateway/web/irccloud.com/x-ftqhmsnmlpiygdyy) |
| 19:49:15 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 240 seconds) |
| 19:49:30 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:53:10 | × | Tene quits (~tene@poipu/supporter/slacker/tene) (Ping timeout: 272 seconds) |
| 19:53:36 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 240 seconds) |
| 19:53:45 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:53:47 | × | ByronJohnson quits (~bairyn@unaffiliated/bob0) (Ping timeout: 272 seconds) |
| 19:53:49 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 19:54:54 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds) |
| 19:54:55 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 19:55:50 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:55:57 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 19:56:36 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 19:56:50 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 19:57:00 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:57:01 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 19:57:37 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 19:57:56 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 19:57:59 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 19:58:05 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 20:00:01 | → | mynickisrandom joins (uid148779@gateway/web/irccloud.com/x-rsvsinemprsbzqpy) |
| 20:01:00 | → | drakonis joins (~drakonis@unaffiliated/drakonis) |
| 20:02:28 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 260 seconds) |
| 20:03:44 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:03:50 | → | banyanRob joins (49f11cfb@c-73-241-28-251.hsd1.ca.comcast.net) |
| 20:04:14 | → | Tene joins (~tene@mail.digitalkingdom.org) |
| 20:04:14 | × | Tene quits (~tene@mail.digitalkingdom.org) (Changing host) |
| 20:04:14 | → | Tene joins (~tene@poipu/supporter/slacker/tene) |
| 20:04:53 | → | ByronJohnson joins (~bairyn@unaffiliated/bob0) |
| 20:05:09 | × | petersen quits (~petersen@redhat/juhp) (Ping timeout: 246 seconds) |
| 20:06:18 | × | elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 245 seconds) |
| 20:07:01 | × | buggymcbugfix quits (sid432603@gateway/web/irccloud.com/x-naqvoueakkcopuie) (Quit: Connection closed for inactivity) |
| 20:07:13 | → | petersen joins (~petersen@redhat/juhp) |
| 20:07:40 | → | jack1909 joins (~qpls@cpeb4750e67d202-cmf81d0fad5840.cpe.net.fido.ca) |
| 20:08:54 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 20:09:22 | → | elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 20:11:36 | → | errst joins (~errst@unaffiliated/tirej) |
| 20:11:54 | × | ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->) |
| 20:12:48 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:256c:b3b1:f90:ff2a) |
| 20:14:02 | → | geowiesnot_bis joins (~user@87-89-181-157.abo.bbox.fr) |
| 20:14:25 | → | son0p joins (~son0p@181.136.122.143) |
| 20:16:00 | × | psutcliffe quits (~psutcliff@2a00:801:3f2:4b56:e93e:1663:ff0c:6c42) (Quit: Leaving) |
| 20:16:12 | → | kenran joins (~kenran@i59F67BBA.versanet.de) |
| 20:16:15 | <amx> | do we apply the PVP rules regarding removed/changed datatypes to Internal modules too? |
| 20:16:46 | <edwardk> | amx: my usual rule of thumb is to state that any .Internal module explicitly does not follow the PVP |
| 20:16:46 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 20:16:59 | <edwardk> | amx: otherwise we actively disincentivize library authors from providing them. |
| 20:17:23 | <amx> | agreed |
| 20:17:24 | <edwardk> | the cost of accessing guts is your code becomes more sensitive to minor changes that way, but its not 'free' from disincentive for library authors |
| 20:17:30 | <edwardk> | er now |
| 20:17:56 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:18:13 | × | rdivyanshu quits (uid322626@gateway/web/irccloud.com/x-qtewvwtwengjftbg) (Quit: Connection closed for inactivity) |
| 20:18:52 | → | cyphase joins (~cyphase@unaffiliated/cyphase) |
| 20:20:10 | ← | coot parts (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) () |
| 20:20:40 | → | coot_ joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 20:27:10 | → | invent[m] joins (inventmatr@gateway/shell/matrix.org/x-jrwragskqrfqezvh) |
| 20:29:45 | × | average quits (uid473595@gateway/web/irccloud.com/x-fxgddkvvlaaxcpgp) (Quit: Connection closed for inactivity) |
| 20:31:21 | × | kenran quits (~kenran@i59F67BBA.versanet.de) (Remote host closed the connection) |
| 20:31:35 | × | knupfer quits (~Thunderbi@200116b82cc9eb00a0beb8f34ef315a0.dip.versatel-1u1.de) (Quit: knupfer) |
| 20:31:39 | → | kenran joins (~kenran@i59F67BBA.versanet.de) |
| 20:31:42 | → | knupfer1 joins (~Thunderbi@200116b82cc9eb00ed7c90a7ebf5ce01.dip.versatel-1u1.de) |
| 20:33:13 | × | knupfer1 quits (~Thunderbi@200116b82cc9eb00ed7c90a7ebf5ce01.dip.versatel-1u1.de) (Client Quit) |
| 20:35:02 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 20:35:09 | × | pera quits (~pera@unaffiliated/pera) (Ping timeout: 260 seconds) |
| 20:36:53 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 20:37:10 | → | kderme joins (4fa758c1@ppp079167088193.access.hol.gr) |
| 20:39:25 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 20:39:47 | × | aveltras quits (uid364989@gateway/web/irccloud.com/x-miyjlxdpioeuznoz) (Quit: Connection closed for inactivity) |
| 20:39:49 | <hyiltiz-M> | Is there a Haskell library (or wrapper) that provides cross-platform (including mobile devices such as android and iOS) UI support? Kind of like flutter, libui, qt and the like, but without requiring the dev to write boilerplate to marshal stuff around. |
| 20:40:17 | <Uniaika> | no |
| 20:40:26 | <Uniaika> | this is an incredibly hard problem |
| 20:40:27 | <hyiltiz-M> | Would be awesome to abstract away the platforms inside a monad :D |
| 20:40:33 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 20:40:36 | × | tanuki quits (~quassel@173.168.154.189) (Ping timeout: 240 seconds) |
| 20:40:52 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) |
| 20:41:29 | <hyiltiz-M> | Wire seems to have cross platform apps some of which are written in Haskell and almost all in FP languages |
| 20:41:29 | × | ixlun quits (~user@213.205.241.12) (Read error: Connection reset by peer) |
| 20:42:33 | × | redmp quits (~redmp@172.58.38.148) (Ping timeout: 264 seconds) |
| 20:42:57 | <hyiltiz-M> | Since they are switching languages and hence projects, I guess their “monad” is at the project level |
| 20:43:35 | → | ixlun joins (~user@213.205.241.12) |
| 20:43:35 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 240 seconds) |
| 20:46:22 | <Uniaika> | a monad is not the proper abstraction here |
| 20:46:44 | <BigLama> | tomsmeding: " website sessions are kept using a cookie on the client side; cookies have nothing to do with connection sharing" => what is the difference between sessions and connection sharing then ? |
| 20:46:49 | <BigLama> | I'm confused :/ |
| 20:47:22 | → | tanuki joins (~quassel@173.168.154.189) |
| 20:48:43 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 20:48:48 | <alexfmpe> | hyiltiz-M: depends on what you mean, I guess - reflex-platform has a bunch of cross-compiling stuff (some has been upstreamed to nixpkgs) so you can compile reflex-dom apps to web/desktop/mobile, but the common UI abstraction is really the DOM (though outside of the web version, the only JS involved is for rendering) |
| 20:49:56 | → | dxld joins (~dxld@rush.pub.dxld.at) |
| 20:50:39 | <alexfmpe> | Miso might also have mobile targets - I could have sworn I remember seeing that in the readme but can't find it |
| 20:51:11 | × | banyanRob quits (49f11cfb@c-73-241-28-251.hsd1.ca.comcast.net) (Quit: Connection closed) |
| 20:52:24 | × | xff0x quits (~xff0x@2001:1a81:5349:9200:2806:fad1:e222:a1c8) (Ping timeout: 240 seconds) |
| 20:52:42 | → | xff0x joins (xff0x@gateway/vpn/mullvad/xff0x) |
| 20:53:11 | → | slack1256 joins (~slack1256@45.4.2.52) |
| 20:54:32 | → | hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-vdnrjtitbesdywow) |
| 20:54:33 | × | nullniverse quits (~null@unaffiliated/nullniverse) (Read error: Connection reset by peer) |
| 20:54:54 | → | nullniverse joins (~null@unaffiliated/nullniverse) |
| 20:55:12 | → | pera joins (~pera@unaffiliated/pera) |
| 20:55:41 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 20:56:37 | → | sparsity joins (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) |
| 20:57:12 | → | rednaZ[m] joins (r3dnazmatr@gateway/shell/matrix.org/x-welbcejgukwlyvmz) |
| 20:57:13 | <rednaZ[m]> | Does anybody know why core coercion arguments exist at run time? What run time information to they contain? |
| 20:57:36 | × | tanuki quits (~quassel@173.168.154.189) (Ping timeout: 240 seconds) |
| 21:00:16 | × | elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 21:00:29 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) (Remote host closed the connection) |
| 21:00:49 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 21:00:54 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds) |
| 21:03:53 | × | Sheilong quits (uid293653@gateway/web/irccloud.com/x-lljagtdqleuggsro) () |
| 21:04:54 | × | nullniverse quits (~null@unaffiliated/nullniverse) (Read error: Connection reset by peer) |
| 21:05:10 | → | nullniverse joins (~null@unaffiliated/nullniverse) |
| 21:05:12 | × | nullniverse quits (~null@unaffiliated/nullniverse) (Max SendQ exceeded) |
| 21:05:46 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 21:06:11 | → | tanuki joins (~quassel@173.168.154.189) |
| 21:06:20 | <Cale> | rednaZ[m]: How do they exist at runtime? I was pretty sure coercions got erased when core is translated to stg |
| 21:06:54 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:07:00 | <rednaZ[m]> | -ddump-stg disagrees. |
| 21:07:00 | <edwardk> | hyiltiz-M: maybe the qt-quick bindings? or using threepenny-gui to drive an electron app? |
| 21:07:09 | × | xff0x quits (xff0x@gateway/vpn/mullvad/xff0x) (Ping timeout: 264 seconds) |
| 21:07:20 | <edwardk> | hyiltiz-M: both of those are broadly portable and 'write once' for the most part from the haskell side |
| 21:07:29 | <dolio> | stg isn't runtime, either, though. |
| 21:07:40 | <Cale> | true |
| 21:08:00 | <rednaZ[m]> | There is also the indicator that they can form a lambda that kills sharing. |
| 21:08:01 | <dolio> | Isn't stg still possible to type check? |
| 21:08:02 | <edwardk> | beyond that you start hitting things like linking out to imgui and wrapping vulkan/opengl/directx as a shallow interaction layer, but none of those except qt-quick looks very native |
| 21:08:03 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 21:08:40 | <Cale> | dolio: It's imperative-ish code, but... maybe? |
| 21:08:43 | <rednaZ[m]> | dolio: type arguments are not in stg |
| 21:08:44 | <edwardk> | dolio: i thought we'd started adding those branch coalescing moves where it takes Left a -> Left a -- even when the types don't match, etc. to STG |
| 21:08:54 | → | xff0x joins (~xff0x@2001:1a81:5349:9200:2806:fad1:e222:a1c8) |
| 21:09:16 | <dolio> | Ah, perhaps. |
| 21:09:27 | <rednaZ[m]> | If I have `binder = \ coercion -> f x`, f x is not memoized. |
| 21:09:37 | <rednaZ[m]> | So this tells me that the coercion argument either exists at run time or there is a crazy bug in GHC. |
| 21:10:18 | <dolio> | Just because sharing is lost doesn't mean coercions are explicitly represented at runtime. |
| 21:10:31 | <rednaZ[m]> | ? |
| 21:10:51 | <Cale> | Causing things to be shared when they otherwise wouldn't be, would itself be regarded as a bug, I think |
| 21:11:03 | <edwardk> | rednaz[m]: i can make things that take a 0-width argument and still turn the result into call-by-name. |
| 21:11:20 | <edwardk> | e.g. (##) -> Int# |
| 21:11:37 | <edwardk> | so even if the argument is erased it can affect 'memoization' |
| 21:11:49 | <rednaZ[m]> | Why would you want that though? |
| 21:11:54 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 21:12:06 | <edwardk> | rednaZ[m]: funny you should ask. i actually _have_ to use it in code i'm writing now ;) |
| 21:12:08 | <Cale> | Because sharing things can result in exponentially increasing the amount of memory required |
| 21:12:23 | <edwardk> | i use type Lev (a :: TYPE r) = (()~()) => a -- in practice |
| 21:12:46 | <edwardk> | ifThenElse :: Bool -> Lev a -> Lev a -> a; ifThenElse True a _ = a; ifThenElse False _ b = b |
| 21:12:50 | <dolio> | There are probably situations where code needs to be emitted for an infinite loop that involves carrying around formal 0-width parameters that are only eliminated at a sufficiently low level for everything to already be sequential. |
| 21:13:04 | <edwardk> | gives me a levity polymorphic if then else in RebindableSyntax that works for all runtimereps with one implementation that is properly laze |
| 21:13:21 | <edwardk> | er lazy |
| 21:13:45 | <Cale> | Here's an example (though I don't have one with a zero-width argument off-hand): permutations [] = [[]]; permutations (x:xs) = permutations xs ++ map (x:) (permutations xs) |
| 21:13:50 | <Cale> | oops |
| 21:13:55 | <Cale> | that should be combinations |
| 21:13:56 | <edwardk> | so e.g. if you ifThenElse True 1# undefined -- it evaluates to 1# not undefined, like you'd get if you magically passed arguments 'a' at the right runtimerep. |
| 21:13:57 | <Cale> | of course |
| 21:14:14 | <dolio> | Because otherwise an equation that gets proved by an infinite loop might be 'optimized' to and unsound function. |
| 21:14:34 | <Cale> | If we change it to share: combinations (x:xs) = let cs = combinations xs in cs ++ map (x:) cs |
| 21:14:36 | <edwardk> | yeah dolio demonstrated this to me when i was trying to do a similar batch of tricks back when we worked together |
| 21:15:01 | <edwardk> | now i make my newtype based versions of these things using evil pattern synonym tricks to regenerate the ~''s |
| 21:15:34 | <Cale> | Then we have a space leak, where we have to hang on to cs at least until halfway through the list (and sublists of cs until much later) |
| 21:15:37 | → | fendor_ joins (~fendor@178.165.129.154.wireless.dyn.drei.com) |
| 21:15:57 | <rednaZ[m]> | Unfortunately I have a case where I wish the equality constraint would not destroy sharing. |
| 21:16:03 | <rednaZ[m]> | Is there a way to tell GHC that? |
| 21:16:08 | × | Codaraxis quits (Codaraxis@gateway/vpn/mullvad/codaraxis) (Remote host closed the connection) |
| 21:16:29 | → | Codaraxis joins (Codaraxis@gateway/vpn/mullvad/codaraxis) |
| 21:17:57 | × | fendor quits (~fendor@178.115.128.216.wireless.dyn.drei.com) (Ping timeout: 264 seconds) |
| 21:17:58 | <edwardk> | rednaZ[m]: the pattern i'd probably use is to do something like capture the f x outside of the lambda that is taking the equality witness by computing y = f (unsafeCoerce x) or whatever. then inside the lambda prove the type of x matches the type of f's arguments using your equality then return y, otherwise leave it alone |
| 21:17:59 | <Cale> | Maybe, though it seems like it would be tricky in practice -- if you can somehow define the body outside the coercion lambda |
| 21:18:13 | <edwardk> | its a thunk with an invalid type but you never force it except when the types line up |
| 21:18:19 | × | tanuki quits (~quassel@173.168.154.189) (Ping timeout: 260 seconds) |
| 21:18:22 | <Cale> | Ah yeah |
| 21:18:30 | → | elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 21:19:00 | <edwardk> | that should restore sharing |
| 21:20:26 | → | tanuki joins (~quassel@173.168.154.189) |
| 21:21:10 | <rednaZ[m]> | I have to think about whether I can apply that to my case. I have just uploaded my case too if you are curious, https://github.com/prednaz/open-sum/blob/type_equality/app/Main.hs#L38 . |
| 21:21:44 | <rednaZ[m]> | It is about checked exceptions and what happens if you evaluate a computation twice catching the exceptions in different order. |
| 21:22:06 | <rednaZ[m]> | Than you would want sharing. |
| 21:22:37 | × | xlei quits (znc@unaffiliated/xlei) (Ping timeout: 256 seconds) |
| 21:22:37 | <rednaZ[m]> | The type variable of OpenSum is a phantom type. |
| 21:23:11 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:256c:b3b1:f90:ff2a) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 21:23:15 | → | nullniverse joins (~null@unaffiliated/nullniverse) |
| 21:23:47 | → | elfets joins (~elfets@37.201.23.96) |
| 21:24:20 | × | sparsity quits (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Quit: Connection closed) |
| 21:24:29 | <edwardk> | OpenSum = Dynamic? |
| 21:25:25 | <edwardk> | oh, no, there's a list argument |
| 21:25:34 | edwardk | goes and reads |
| 21:25:41 | <rednaZ[m]> | data OpenSum list = forall value. Typeable value => OpenSum value |
| 21:26:07 | <rednaZ[m]> | `list` is a phantom type-level list |
| 21:26:10 | <edwardk> | why do you need the Typeable btw, rather than just the list index? |
| 21:26:29 | <rednaZ[m]> | Because then the run-time representation is different |
| 21:26:43 | <rednaZ[m]> | for different list orders |
| 21:26:59 | <rednaZ[m]> | and the list order has to be determined by the order of catching |
| 21:27:04 | <edwardk> | fair |
| 21:27:10 | <rednaZ[m]> | because it cannot stay undetermined |
| 21:27:29 | <rednaZ[m]> | which is kind of funny |
| 21:28:09 | <rednaZ[m]> | there is no other reason why I can only catch the type at the head of the list |
| 21:28:43 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 21:29:05 | × | gienah quits (~mwright@gentoo/developer/gienah) (Quit: Lost terminal) |
| 21:29:15 | <rednaZ[m]> | I am still in the process of trying your idea out but I am afraid, it is probably only effective if I apply it to user code. |
| 21:33:33 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 264 seconds) |
| 21:34:03 | × | nf quits (~n@monade.li) (Ping timeout: 260 seconds) |
| 21:34:04 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 21:34:12 | → | nf__ joins (~n@monade.li) |
| 21:34:46 | nf__ | is now known as nf |
| 21:36:21 | <edwardk> | ok, if you're using this to hold Exceptions anyways, you'll always have a Typeable constraint, i guess my grumbles there are mostly sated |
| 21:36:58 | → | nullniv15 joins (~null@unaffiliated/nullniverse) |
| 21:37:20 | × | nullniverse quits (~null@unaffiliated/nullniverse) (Read error: No route to host) |
| 21:37:21 | × | nullniv15 quits (~null@unaffiliated/nullniverse) (Read error: Connection reset by peer) |
| 21:37:45 | → | nullniverse joins (~null@unaffiliated/nullniverse) |
| 21:37:46 | × | nullniverse quits (~null@unaffiliated/nullniverse) (Max SendQ exceeded) |
| 21:38:00 | × | geekosaur quits (ae68c070@cpe-174-104-192-112.neo.res.rr.com) (Quit: Connection closed) |
| 21:38:42 | <NieDzejkob> | I have a set of tuples (a, b, c) and I need to retrieve the ones with matching a or b at different moments. Is there a better way to do this than multiple Maps that I have to keep in sync manually? |
| 21:39:20 | → | Tario joins (~Tario@200.119.184.155) |
| 21:40:33 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 21:40:48 | <rednaZ[m]> | edwardk: I would not have the Typeable constraint if it did not seem like the most promising approach right now. GHC is actually often floating the expensive computation out from under the coercion argument lambda recovering sharing already. But it is not often enough. |
| 21:40:52 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) |
| 21:41:01 | → | redmp joins (~redmp@172.58.38.156) |
| 21:43:06 | → | psutcliffe joins (~psutcliff@2a00:801:3f2:4b56:e93e:1663:ff0c:6c42) |
| 21:44:02 | <hololeap> | NieDzejkob: define "better" |
| 21:44:11 | <NieDzejkob> | less error-prone |
| 21:44:52 | <NieDzejkob> | Making illegal states unrepresentable and all that |
| 21:45:08 | <hololeap> | i'm actually having a hard time imagining what you're talking about |
| 21:45:30 | <edwardk> | rednaZ[m]: generally whenever i see a Typeable constraint i try to move to atze van der ploeg's keys or find some other way to recover type information, just a rule of thumb, because Typeable is quite the blunt instrument and gets in the way when i want region parameters for things like ST s, etc. |
| 21:46:10 | <edwardk> | rednaZ[m]: not saying that this is doable in your circumstance, just giving you my mental model |
| 21:46:31 | <hololeap> | it almost sounds like you would need dependent types to do this at the type level, but, again, i'm not really understanding what you're trying to do |
| 21:46:39 | <dolio> | Create a type that represents the set of triples, with the operations you want. Implement it however, and use it in the dependent code. |
| 21:47:58 | <ij> | Can a type become concrete by adding more typeclass constraints? |
| 21:48:18 | <edwardk> | ij: is one of them x ~ MyConcreteType ? |
| 21:49:40 | <hololeap> | edwardk: that doesn't really make it concrete though, does it? it will just fail on anything except one specific type. |
| 21:50:01 | <ij> | No, it doesn't look like it. hip's "e" pixel channel type is first constrained by Elevator e, which doesn't compile when given to writeImage, but then, if I add (Elevator e, Fractional e) by "image / 400" (or similar), then it compiles |
| 21:50:20 | <ij> | well, maybe I ought to check what the involved typeclass definitions look like |
| 21:50:31 | <ij> | maybe they have that "a ~ b" |
| 21:50:54 | <hololeap> | (/) requires Fractional |
| 21:50:59 | <hololeap> | :t (/) |
| 21:51:00 | <lambdabot> | Fractional a => a -> a -> a |
| 21:51:21 | <ij> | right, but why would it make it choose a concrete type? that I don't understand or how rather |
| 21:51:25 | <edwardk> | hololeap: Bool isn't really concrete, it just fails if the type is anything except Bool ;) |
| 21:52:04 | <edwardk> | ij: guessing what you have is defaulting kicking in when Fractional is applied |
| 21:52:39 | <hololeap> | edwardk: while `foo :: x ~ Bool => x` is semantically the same as `x :: Bool`, i would think they are not the same at the compiler/technical level |
| 21:53:01 | <edwardk> | hololeap: they are the same modulo a core coercion you can't see |
| 21:53:41 | <edwardk> | every GADT you've ever used has compiled the latter into the former in the different constructor definitions |
| 21:53:57 | <ij> | https://kseo.github.io/posts/2017-01-04-type-defaulting-in-haskell.html |
| 21:53:58 | <hololeap> | ok, fair enough. so will `main :: x ~ IO () => x` compile? |
| 21:54:05 | <ij> | Fractional defaults to Double indeed |
| 21:54:26 | → | vchlup_ joins (~vchlup@nat.brnet.cz) |
| 21:54:30 | <edwardk> | data Foo a where Foo :: Foo Int; makes Foo :: forall a. (a ~ Int) => Foo a |
| 21:54:31 | <hololeap> | (with a definition for main, obviously) |
| 21:55:05 | → | kderme48 joins (4fa758c1@ppp079167088193.access.hol.gr) |
| 21:55:09 | <edwardk> | hololeap: yes |
| 21:55:31 | <hololeap> | good to know :) |
| 21:55:32 | <edwardk> | {-# Language TypeFamilies #-}; main :: x ~ IO () => x; main = print "hello" runhaskell main.hs ===> "hello" |
| 21:57:03 | × | kderme quits (4fa758c1@ppp079167088193.access.hol.gr) (Ping timeout: 240 seconds) |
| 21:57:25 | → | dansho joins (~dansho@ec2-52-69-229-22.ap-northeast-1.compute.amazonaws.com) |
| 21:57:30 | → | nullniverse joins (~null@unaffiliated/nullniverse) |
| 21:57:31 | × | nullniverse quits (~null@unaffiliated/nullniverse) (Max SendQ exceeded) |
| 21:57:33 | <rednaZ[m]> | edwardk: The fundamental problem when trying to get a OpenSum type is that Haskell does not have type-level sets. This makes me think of row polymorphism. What happened to ermine? |
| 21:57:57 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Quit: Lost terminal) |
| 21:58:52 | <edwardk> | rednaZ[m]: i got cancer and eventually left the company right as corporate will to carry it to completion flagged. |
| 21:59:49 | <edwardk> | then i got better and landed at digital asset for a while and worked on daml instead |
| 21:59:56 | <dansho> | does this look like an unreasonable amount of allocations? if im reading right its about 1G/s http://codepad.org/7MbUjQ21 |
| 21:59:57 | <rednaZ[m]> | edwardk: Sorry to heart that. I hope you are o.k. |
| 22:00:26 | <edwardk> | rednaZ[m]: afaict its all good now. I take a pill or two a day, but everything seems fine |
| 22:00:28 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 22:00:50 | <rednaZ[m]> | edwardk: In PureScript row's can contain the same label multiple times. Was this different in ermine? |
| 22:00:56 | <edwardk> | yes |
| 22:01:00 | <rednaZ[m]> | nice |
| 22:01:09 | <dolio> | It really isn't nice. |
| 22:01:11 | <rednaZ[m]> | That is how I understood it from that one youtube video. |
| 22:01:23 | <edwardk> | ermine rowtypes used 'can be partitioned into' constraints. which are apparently their own brand of crazy. |
| 22:01:36 | <tomsmeding> | BigLama: "connection" in "connection sharing" refers to the TCP connection, as in a TCP socket (or perhaps TLS connection if you're using https). If you give the header 'Connection: keep-alive' in a HTTP request, you can send another request on the same connection. This is advantageous since you don't have to setup the connection multiple times, which is fairly expensive when using TLS (https). |
| 22:01:36 | <tomsmeding> | It's not so expensive when using plain http, but still removes some overhead. |
| 22:01:45 | <rednaZ[m]> | edwardk: Seems like the way to avoid label duplication. |
| 22:01:48 | <edwardk> | Elem e es becomes 'exists x. such that es can be parititoned into e and x. |
| 22:02:10 | <edwardk> | similarly Lacks e es becomes exists y. such that y can be partitioned into e and es |
| 22:02:11 | <tomsmeding> | BigLama: this is purely a performance thing; this has nothing to do with logins or anything on that level. |
| 22:02:23 | <edwardk> | that part i liked. the practical aspects of typechecking it? not so much |
| 22:03:02 | <rednaZ[m]> | edwardk: I think of rows as type-level maps from type-level strings to types. |
| 22:03:21 | <edwardk> | xplat had a nice scheme involving describing such row types in terms of complete atomic boolean algebras, but we never got around to switching from the ad hoc pile of rules we made up to that. |
| 22:03:54 | <rednaZ[m]> | edwardk: Have you ever thought about general type-level maps from types to types? |
| 22:04:13 | × | cyphase quits (~cyphase@unaffiliated/cyphase) (Read error: Connection reset by peer) |
| 22:04:16 | <rednaZ[m]> | Than I could encode type-level sets as maps with index type unit. |
| 22:04:17 | <edwardk> | rednaZ[m]: have you look at ur/web? |
| 22:04:30 | <rednaZ[m]> | What is that? |
| 22:04:32 | <edwardk> | rednaZ[m]: you're basically reinventiong adam chlipala's baby |
| 22:04:36 | <edwardk> | er reinventing |
| 22:05:12 | × | kenran quits (~kenran@i59F67BBA.versanet.de) (Quit: leaving) |
| 22:05:49 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 22:06:23 | <rednaZ[m]> | Thanks for the pointer at adam chlipala. What is ur/web? |
| 22:06:37 | × | SchwarzeLocke quits (~SchwarzeL@178.239.168.171) (Remote host closed the connection) |
| 22:06:50 | <rednaZ[m]> | Ah, found it. http://www.impredicative.com/ur/ |
| 22:07:41 | <dolio> | I kind of think that, in real retrospect, the rows in ermine were a fundemantally wrong choice for the use case. |
| 22:07:54 | <edwardk> | i agree |
| 22:08:05 | <edwardk> | lots of heavy lifting put to poor use |
| 22:08:07 | dcoutts_ | is now known as dcoutts |
| 22:08:11 | <dolio> | The databases don't actually do natural joins automatically. |
| 22:08:47 | <dolio> | So the real underlying rows automatically introduce duplicate fields that are only eliminated by further operations. |
| 22:08:48 | <rednaZ[m]> | Do you think allowing label duplication is the better choice? |
| 22:09:03 | <dolio> | In some situations, yes. |
| 22:09:29 | <rednaZ[m]> | In a general-purpose language? |
| 22:09:49 | <edwardk> | the joinOn (or joinWith, i forget the names) were the real workhorse of the language. |
| 22:10:03 | <edwardk> | and that didn't lean on 'natural' joins at all |
| 22:10:33 | <dolio> | That doesn't have an answer. You don't need rows for "general purpose". You need them for various features of a general purpose language, and which feature they're for might make duplicates or non-duplicates better. |
| 22:10:55 | <dolio> | I would say people under-estimate duplicates, though. |
| 22:10:57 | <edwardk> | in retrospect a more natural fit to sql would probably have been to have fully qualified Table.FieldName names or something, and then allow FieldName access to those when they were unambiguous, or something awful like that. |
| 22:10:58 | <rednaZ[m]> | I feel like I need checked exceptions pretty badly. |
| 22:11:01 | → | cyphase joins (~cyphase@unaffiliated/cyphase) |
| 22:11:15 | <slack1256> | Does anyone know if "space invariants" were developed onto a full theory? link: https://apfelmus.nfshost.com/blog/2013/08/21-space-invariants.html |
| 22:11:21 | <edwardk> | rednaZ[m]: when i throw an exception at you, what do you do then? |
| 22:11:40 | <dolio> | Okay, well, checked exceptions are actually an example where duplicates are good. |
| 22:11:46 | <edwardk> | i used to be more bullish on checked exceptions |
| 22:11:58 | <BigLama> | tomsmeding: thanks a lot :) |
| 22:12:20 | <rednaZ[m]> | edwardk: I handle it if I can. I `error` if I know it cannot happen effectively turning the exception into an unchecked one. |
| 22:12:35 | <dolio> | Because there's a problem with checked exceptions and polymorphism/abstraction. |
| 22:12:37 | <edwardk> | but given i can basically throw anything at any thread i've since become a bit more prosaic about the fact that checked exceptions just means the more exotic code path never gets tested and that exotic code path is super important in most concurrent programming situations |
| 22:13:11 | <rednaZ[m]> | I would already be happy about checked exceptions in pure code. |
| 22:13:29 | <rednaZ[m]> | instead of using `Either SomeException` or similar |
| 22:14:25 | <edwardk> | same issue arises there. you wind up with an Either case for things you are manually putting in expensive boxes and then taking out and putting back in expensive boxes all the time, and 'real exceptions' which blow up your leaky abstraction and are sadly cheaper. |
| 22:14:41 | <dolio> | If you have `f : (a -> b throws e) -> ...` where `f g = try ... g x ... catch { Exn1 -> ... }`, then the naive way for that to work violates the abstraction of `e`, because if `e` happens to contain `Exn1`, your handler will actually catch it. |
| 22:14:51 | <edwardk> | it _galls_ me that ReaderT (IORef s) IO -- is generally cheaper/faster than StateT s IO |
| 22:14:59 | × | tsrt^ quits (tsrt@ip98-184-89-2.mc.at.cox.net) () |
| 22:15:01 | <edwardk> | same diff for EitherT variants |
| 22:16:03 | <rednaZ[m]> | I do not care that much about performance. |
| 22:16:05 | → | nrh^ joins (nrh@ip98-184-89-2.mc.at.cox.net) |
| 22:16:06 | <dolio> | So, either you muck about with lacks predicates for `e`, or you say that `e` is properly abstract, and you cannot catch `Exn1` from `e` even if it's there. But that is equivalent to being able to push on a duplicate `Exn1` field that gets caught by your handler. |
| 22:16:29 | × | coot_ quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 22:16:36 | <rednaZ[m]> | But I think you can even track "real exceptions" if you had row types. |
| 22:16:39 | × | catt quits (~r@31.127.31.99) (Ping timeout: 260 seconds) |
| 22:16:41 | <dolio> | The duplicate fields is how Koka does this for algebraic effects. |
| 22:16:52 | <edwardk> | rednaZ[m]: i get angry when i pay asymptotically more garbage because of administrative details in my language, the extra garbage then becomes additional heap walks slowly my program asymptotically. |
| 22:17:05 | <edwardk> | er slowing |
| 22:17:47 | <dolio> | It automatically had duplicate effects because it was written by Daan Liejen, and he just reused his records stuff. |
| 22:18:36 | <dolio> | So early papers say things like, "we haven't come up with a good use for this." But it turns out to be a way of solving a problem. |
| 22:18:51 | <rednaZ[m]> | edwardk: "asymptotically" in which argument? |
| 22:19:24 | × | orion quits (~orion@unaffiliated/orion) (Quit: "") |
| 22:20:19 | <dolio> | This is apparently called "tunnelling" when people were just talking about exceptions. |
| 22:20:25 | → | alx741 joins (~alx741@181.196.68.52) |
| 22:20:28 | × | tanuki quits (~quassel@173.168.154.189) (Ping timeout: 245 seconds) |
| 22:20:33 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 22:20:58 | <edwardk> | rednaZ[m]: i do a bunch of state operations, especially abstract ones using MonadState s m, and i shed the carcasses of discarded (a, s) tuples all throughout my program, growing my heap. now i pay proportional to the size of my youngest generation (plus some occasional large collections) to clean up after myself. |
| 22:21:47 | <edwardk> | rednaZ[m]: its why i get annoyed at times working in haskekl. e.g. if i build a queue and put things in and take them off the other end of the job queue because of gc i have to pay proportional to the size of the queue, rather than the churn in the queue. (there's some tricks i keep playing with with compact regions to mitigate that) |
| 22:21:47 | → | tanuki joins (~quassel@173.168.154.189) |
| 22:21:52 | <edwardk> | er haskell |
| 22:22:28 | → | SatanX joins (~SatanX@185.204.1.185) |
| 22:22:29 | <edwardk> | with epoch based memory reclamation i can usually pay 'gc' overhead proportional to the churn, but i can't use that here directly. |
| 22:22:49 | SatanX | is now known as Guest68145 |
| 22:22:58 | <rednaZ[m]> | I agree. |
| 22:23:24 | × | __minoru__shirae quits (~shiraeesh@5.101.59.4) (Ping timeout: 245 seconds) |
| 22:23:36 | <edwardk> | the win in the ReaderT case is that its not constantly shedding tuple carcasses to the heap. you pay to deref when you access it. |
| 22:24:27 | <edwardk> | it annoys me that this is the path to the fastest haskell code i can write =) |
| 22:25:04 | <dolio> | I guess if I were pressed, I'd say that set-like records are always the wrong semantics. Deduplication and reordering of fields are convenience features for local interaction of a particular presentation of a row, but expecting abstract rows to deduplicate and reorder gets you in a lot of trouble. |
| 22:25:28 | × | svet_ quits (~svet@90.200.185.163) (Ping timeout: 245 seconds) |
| 22:25:38 | → | xlei joins (znc@unaffiliated/xlei) |
| 22:25:58 | <rednaZ[m]> | edwardk: But what is the problem with `ReaderT (IORef s) IO`? |
| 22:26:21 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 22:27:22 | <edwardk> | rednaZ[m]: honestly not much other than you get stuck with the IO on the bottom driving the computation forward unlike the lazier state monad which has super powers |
| 22:27:48 | <edwardk> | on the plus side this fixes the fail issues with state |
| 22:28:08 | <edwardk> | on the minus side all the cool brain bending state tricks fall away like they do in everyone's effect systems |
| 22:28:10 | <nshepperd> | is there a continuation based StateT which doesn't make any tuples? |
| 22:28:21 | → | __minoru__shirae joins (~shiraeesh@5.101.59.4) |
| 22:28:22 | <edwardk> | nshepperd: yes |
| 22:28:43 | <edwardk> | still has the exception safety problems that the "ReaderT IO" pattern advocates complain about |
| 22:29:03 | <edwardk> | and ghc is not always great about seeing through the cps to optimize it |
| 22:29:05 | <nshepperd> | oh, sure |
| 22:29:09 | <edwardk> | especially when abstract |
| 22:29:18 | <nshepperd> | exception safety is futile :) |
| 22:29:38 | <edwardk> | nshepperd: you never write any code that needs to use more than one core do you? =) |
| 22:32:16 | → | curiousgay joins (~AdminUser@178.217.208.8) |
| 22:32:37 | × | Franciman quits (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving) |
| 22:35:46 | <nshepperd> | sometimes i do |
| 22:35:59 | <rednaZ[m]> | dolio: I do not understand your point with the `throws e` example. |
| 22:36:09 | <edwardk> | fair, i was being mildly facetious |
| 22:36:40 | <nshepperd> | speaking of, is there any ghc flag to make my program default to +RTS -N |
| 22:36:44 | <rednaZ[m]> | dolio: Surely, you should not be able to write a function `f` that catches all possible exceptions. |
| 22:36:59 | <dolio> | f catches a single exception. |
| 22:37:19 | → | kupi joins (uid212005@gateway/web/irccloud.com/x-qxtkrwfdkyjvofwt) |
| 22:37:21 | <edwardk> | you meam like -threaded -rtsopts -with-rtsopts=-N ? |
| 22:37:37 | <nshepperd> | that sounds like what i want |
| 22:37:48 | <rednaZ[m]> | dolio: `f : (a -> b throws e) -> b` would have to catch all, would it not? |
| 22:37:48 | <dolio> | Oh, I actually wrote a misleading signature, I guess. It should be: `f : (a -> b throw e) -> c throw e` |
| 22:38:21 | × | danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
| 22:39:18 | <dolio> | The point is that abstraction is broken, because the details of the exceptions used in the implementation of `f` leak into the type of its argument. |
| 22:39:31 | <rednaZ[m]> | You can write `f : (a -> b throws {Exn1 | r}) -> b throws r`, can you not? |
| 22:39:35 | <dolio> | Or the type is imprecise/unsound. |
| 22:39:38 | <nshepperd> | i wrote a gloss application that seems to be poorly responsive without -N (which i didn't think was meant to happen and maybe means some ffi call is "unsafe" that shouldn't be?) |
| 22:40:15 | × | __minoru__shirae quits (~shiraeesh@5.101.59.4) (Ping timeout: 240 seconds) |
| 22:41:08 | <nshepperd> | playing with writing a gui toolkit in gloss and reactive-banana |
| 22:41:10 | <dolio> | You can do that if you want your checked exceptions to be anti-modular. |
| 22:41:40 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 22:44:15 | <rednaZ[m]> | Why is that anti-modular? |
| 22:44:33 | <rednaZ[m]> | Because "the details of the exceptions used in the implementation of `f` leak into the type of its argument"? |
| 22:45:14 | <dolio> | Because the implementation details of `f` affect how it behaves on a parameter that would otherwise have an abstract type. |
| 22:45:26 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 22:46:00 | <dolio> | It means that `g` can't throw Exn1 exceptions without them accidentally getting handled by `f`, which uses them for its own purposes. |
| 22:47:09 | × | vchlup_ quits (~vchlup@nat.brnet.cz) (Ping timeout: 245 seconds) |
| 22:50:06 | → | usr25_tm joins (~usr25@unaffiliated/usr25) |
| 22:50:09 | <dolio> | Another way of explaining the problem is that exception handlers are usually dynamically scoped, and dynamic scoping is anti-modular. |
| 22:50:28 | <dolio> | For perhaps more obvious reasons. |
| 22:51:13 | <dolio> | And the answer in that presentation is to make handlers statically scoped. |
| 22:51:14 | <rednaZ[m]> | Either g's or f's module defines and owns the Exn1 type. The Exn1 type becomes part of that modules specification. |
| 22:51:23 | <rednaZ[m]> | If the other module acts in a way that causes problems it is violating what the first modules specification is asking from a user. |
| 22:51:37 | <rednaZ[m]> | ...of that module. |
| 22:52:00 | <rednaZ[m]> | All specifications are expecting some preconditions. |
| 22:52:21 | <rednaZ[m]> | That is normal, is it not? |
| 22:52:35 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 22:53:49 | × | usr25 quits (~usr25@unaffiliated/usr25) (Ping timeout: 245 seconds) |
| 22:54:20 | → | aarvar joins (~foewfoiew@2601:602:a080:fa0:d4c5:1ad7:b189:949e) |
| 22:56:28 | <dolio> | Well, that probably isn't a good assumption. But even if f's implementation 'owns' the exception, its type is cluttered with implementation details. |
| 22:57:08 | <dolio> | And those implementation details will build more and more clutter in the types that are just saying details that aren't supposed to matter about the implementations. |
| 22:57:29 | <slack1256> | Is there an update for https://www.slideshare.net/tibbe/highperformance-haskell ? |
| 22:57:43 | <NieDzejkob> | Is there a shorter way of writing r { field = f (field r) }? |
| 22:57:59 | <dibblego> | over f |
| 22:58:22 | <slack1256> | I was thinking on how to approach a project from the ground up with performance in mind (I have to show numbers :P ). This is an alternative to first writing it and then make it performant. |
| 22:59:18 | → | __minoru__shirae joins (~shiraeesh@5.101.59.4) |
| 22:59:20 | <dolio> | If you represent checked exceptions with `Either`, for instance, it's not possible for `f :: (a -> Either e b) -> Either e c` to accidentally catch the exceptions from the argument, via parametricity. |
| 22:59:22 | <rednaZ[m]> | NieDzejkob: `over #field f` if you are using https://hackage.haskell.org/package/optics or https://hackage.haskell.org/package/lens. |
| 22:59:54 | <NieDzejkob> | I don't use either yet, any opinions on optics vs lens vs microlens? |
| 23:00:01 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 23:00:19 | <dolio> | And correspondingly, no detail needs to be specified about `e` in the type that is incidentally revealing information about the implementation of `f`. |
| 23:01:59 | <rednaZ[m]> | NieDzejkob: Whatever you use, I recommend the # labels. |
| 23:02:08 | ← | mynickisrandom parts (uid148779@gateway/web/irccloud.com/x-rsvsinemprsbzqpy) () |
| 23:02:24 | <rednaZ[m]> | ...overloaded labels. |
| 23:03:01 | <rednaZ[m]> | and NoFieldSelectors |
| 23:03:37 | <rednaZ[m]> | or DuplicateRecordFields until you have access to NoFieldSelectors |
| 23:04:17 | <BigLama> | « |
| 23:04:23 | → | pavonia joins (~user@unaffiliated/siracusa) |
| 23:07:05 | <rednaZ[m]> | dolio: I am trying to achieve checked exceptions by something like `(Exn1 `Elem` list) => Either (OpenSum list) a`. |
| 23:07:33 | <rednaZ[m]> | Does you criticism even apply to this? |
| 23:09:20 | <rednaZ[m]> | But even when I think about something like `f : (a -> b throws e) -> b throws e`, your criticism does not seem to apply. |
| 23:09:34 | <dolio> | I'm not sure. It might depend on implementation details. |
| 23:11:13 | <rednaZ[m]> | `f : (a -> b throws e) -> b throws e` is equivalent to `f :: (a -> Either e b) -> Either e c`, is it not? |
| 23:11:19 | <rednaZ[m]> | Just as good. |
| 23:11:43 | <dolio> | It depends why that type is accepted. |
| 23:11:44 | × | Tario quits (~Tario@200.119.184.155) (Read error: Connection reset by peer) |
| 23:12:13 | <rednaZ[m]> | The implementation of f cannot catch anything. |
| 23:12:35 | → | Tario joins (~Tario@201.192.165.173) |
| 23:12:38 | <dolio> | If it's accepted because `f` handles `Exn1` from g, but `e - Exn1` can automatically be promoted to `e` because it is a subtype, then the type is imprecise. |
| 23:12:55 | × | tanuki quits (~quassel@173.168.154.189) (Ping timeout: 240 seconds) |
| 23:13:39 | <dolio> | For the type to be precise, there has to be a mechanism for `Exn1` exceptions from `g` to go past the handler in `f`. |
| 23:13:44 | <rednaZ[m]> | Huh |
| 23:14:13 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds) |
| 23:14:56 | <dolio> | And one way for that to work is to be able to add a redundant `Exn1` to the e row, even if it already contains `Exn1`. |
| 23:15:15 | × | elfets quits (~elfets@37.201.23.96) (Ping timeout: 240 seconds) |
| 23:15:32 | <dolio> | Then you can promote g to `a -> b throws {Exn1|e}`, and `f` only handles the first Exn1, which g doesn't actually throw. |
| 23:18:11 | × | BigLama quits (~alex@static-176-165-167-17.ftth.abo.bbox.fr) (Remote host closed the connection) |
| 23:18:51 | <dolio> | The imprecise type could even make the type system unsound, depending on the exact combination of features. |
| 23:19:48 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 23:20:07 | × | Pickchea quits (~private@unaffiliated/pickchea) (Quit: Leaving) |
| 23:20:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 23:24:23 | × | fendor_ quits (~fendor@178.165.129.154.wireless.dyn.drei.com) (Read error: Connection reset by peer) |
| 23:24:54 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 23:24:54 | × | geowiesnot_bis quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds) |
| 23:25:47 | → | vicfred joins (vicfred@gateway/vpn/mullvad/vicfred) |
| 23:26:16 | → | tanuki joins (~quassel@173.168.154.189) |
| 23:26:38 | × | forgottenone quits (~forgotten@176.42.27.254) (Quit: Konversation terminated!) |
| 23:26:39 | → | svet joins (~svet@90.200.185.163) |
| 23:28:14 | <rednaZ[m]> | Is there any problem with saying that `f : (a -> b throws e) -> b throws e` cannot catch anything and `f : (a -> b throws {Exn1 | r}) -> b throws r` necessarily catches any `Exn1`? |
| 23:28:30 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 23:28:44 | <dolio> | What do you mean 'any'? |
| 23:29:11 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
| 23:29:17 | <d34df00d> | rednaZ[m]: not directly answering your question, but I think I've seen a post exploring questions similar to yours. |
| 23:29:19 | <d34df00d> | Let me dig that up. |
| 23:29:21 | <rednaZ[m]> | alll |
| 23:29:28 | <rednaZ[m]> | dolio: all |
| 23:29:35 | <d34df00d> | rednaZ[m]: https://www.parsonsmatt.org/2020/10/27/plucking_in_plucking_out.html |
| 23:29:39 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 23:29:40 | <Axman6> | doliall |
| 23:29:49 | × | son0p quits (~son0p@181.136.122.143) (Quit: Lost terminal) |
| 23:29:52 | <dolio> | That is an accurate type. But `r` could contain `Exn1`, and it is lying about the fact that it might still throw it. |
| 23:30:08 | <dolio> | Or, maybe I should say, it's imprecise, but sound. |
| 23:30:11 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 23:30:22 | <d34df00d> | dolio: unless | guarantees disjointness? |
| 23:30:24 | <dolio> | The other one is imprecise and possibly unsound. |
| 23:30:46 | <d34df00d> | I might be out of context though, so pardon that) |
| 23:30:55 | × | hiroaki_ quits (~hiroaki@2a02:908:4b18:8c40:2d1:b436:dd9b:cc7) (Ping timeout: 272 seconds) |
| 23:31:34 | × | pera quits (~pera@unaffiliated/pera) (Quit: leaving) |
| 23:32:39 | <dolio> | It could, but {E|e} cannot be the only source of that constraint, because I think it's possible to get into situations where `E` is only relevant in a local scope, so there needs to be a way of saying that `f : (... throws r) -> ... throws r` may only be instantiated with `r` that lack `Exn1`. |
| 23:32:42 | → | bob87 joins (62940397@098-148-003-151.res.spectrum.com) |
| 23:33:10 | <dolio> | And then the implementation details are leaking into the type. |
| 23:33:15 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 23:34:06 | <rednaZ[m]> | "But `r` could contain `Exn1`". I can imagine semantics prohibiting this. |
| 23:34:14 | <dolio> | That is the anti-modular case, where the implementation details of `f` are visible in the type. |
| 23:34:21 | × | bob87 quits (62940397@098-148-003-151.res.spectrum.com) (Client Quit) |
| 23:34:29 | <d34df00d> | Welcome to the world of dependent types. |
| 23:34:31 | <nshepperd> | disjointedness would require | to introduce some sort of implicit 'does not contain' constraint which must be bubbled up, so that you get a type error if you try invoke it at r ~ {Exn1} |
| 23:34:49 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 23:34:51 | <rednaZ[m]> | d34df00d: Any types really. |
| 23:35:20 | <d34df00d> | I'd argue the only case where the implementation details (that is, terms) leak into types is when types depend on terms. |
| 23:35:56 | × | kam1 quits (~kam1@5.125.126.175) (Ping timeout: 240 seconds) |
| 23:37:01 | <d34df00d> | Maybe we should just learn to accept that, dunno. |
| 23:37:07 | <dolio> | It's not a dependent type. |
| 23:37:14 | <d34df00d> | In this case, no, it's not. |
| 23:37:14 | <nshepperd> | it doesn't seem bad for it to be imprecise though |
| 23:37:16 | <dolio> | And it's not a good type. |
| 23:38:13 | <d34df00d> | But I think what we're trying to emulate here is a function that says "I can handle any error of type Exn1 and produce a sum type which does not have any Exn1". |
| 23:38:28 | <d34df00d> | Not sure if that qualifies as a bad kind of leak. |
| 23:38:50 | <nshepperd> | if you invoke such a function at r containing Exn1, that doesn't necessarily mean that you expect it to throw Exn1, it just means you don't care if it does |
| 23:38:59 | <d34df00d> | (I've scrolled above a little and maybe I've missed the original question or important details, but that's my take) |
| 23:40:32 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) (Read error: Connection reset by peer) |
| 23:40:40 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:715d:5350:d8ba:9302) |
| 23:40:53 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) |
| 23:41:04 | <dolio> | If your take is that modularity is unnecessary, it doesn't seem like a very realistic take. |
| 23:42:10 | <nshepperd> | modularity? |
| 23:42:34 | <dolio> | Abstraction such that particular implementation details don't matter. |
| 23:42:59 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 260 seconds) |
| 23:43:05 | <d34df00d> | I just refactored a piece of code in one module, it typechecks, but a completely different module now fails because constraint solver now sees a more complicated problem that it cannot solve anymore. |
| 23:43:10 | <d34df00d> | Modularity is a myth. |
| 23:43:16 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) (Client Quit) |
| 23:43:27 | <absence> | is there a way to treat a vector as its reverse (via a newtype?) that would make e.g. dropWhile start from the end, or should i just do reverse . dropWhile p . reverse? |
| 23:45:57 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-83-46.w86-212.abo.wanadoo.fr) |
| 23:46:17 | <absence> | or maybe with lens? |
| 23:46:56 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 23:47:59 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 23:48:17 | <nshepperd> | i don't understand the argument that it's anti modular |
| 23:48:50 | <Axman6> | @hoogle dropWhileEnd |
| 23:48:50 | <lambdabot> | Data.List dropWhileEnd :: (a -> Bool) -> [a] -> [a] |
| 23:48:50 | <lambdabot> | GHC.OldList dropWhileEnd :: (a -> Bool) -> [a] -> [a] |
| 23:48:50 | <lambdabot> | Data.ByteString dropWhileEnd :: (Word8 -> Bool) -> ByteString -> ByteString |
| 23:48:51 | <nshepperd> | but i do think checked exceptions aren't worth the administrative overhead given how little they offer |
| 23:49:16 | <Axman6> | I'm pretty sure Vector has that function, Text and ByteString do IIRC |
| 23:49:51 | <Axman6> | absence: Repa would also allow you to do that |
| 23:51:55 | <rednaZ[m]> | "i don't understand the argument that it's anti modular". I was already wondering if it was just me. |
| 23:52:22 | <dolio> | nshepperd: The fact that `f` uses exceptions in its implementation shouldn't matter as long as it catches those exceptions. |
| 23:52:31 | <rednaZ[m]> | But I do understand "administrative overhead". |
| 23:53:02 | <c_wraith> | absence: if you are using the lensy approach, https://hackage.haskell.org/package/lens-5.0.1/docs/Control-Lens-Combinators.html#v:reversed |
| 23:53:23 | <absence> | Axman6: vector doesn't have dropWhileEnd it seems |
| 23:53:29 | <rednaZ[m]> | Any type safety brings "administrative overhead". It is subjective, which one you consider worth it. |
| 23:53:34 | <dolio> | However, it is forced to be distinct from an implementation that doesn't use exceptions because there is no way to be properly abstract with respect to exceptions. |
| 23:53:49 | <nshepperd> | i thought the point of f's type is that it catches the exception thrown by g |
| 23:53:57 | <Axman6> | I guess dropWhileEnd doesn't make sense with fusion |
| 23:55:08 | <absence> | Axman6: hm, that's a good point |
| 23:55:13 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Quit: mputz) |
| 23:55:27 | <dolio> | nshepperd: It cannot avoid catching an exception from `g` that matches the exception it uses in its internal implementation. |
| 23:56:24 | <nshepperd> | I'm lost |
| 23:57:12 | <nshepperd> | if the exception is meant to be 'internal' why does its type say it catches it from the externally provided function |
| 23:58:40 | → | Tario joins (~Tario@201.192.165.173) |
| 23:59:01 | → | remby joins (4c437c1b@bras-base-london1483w-grc-21-76-67-124-27.dsl.bell.ca) |
| 23:59:20 | <dolio> | The point is that there's no way to say, "don't handle any exceptions from `g`" in most systems. So if you call `g` inside a local exception handler, that pollutes the type. |
All times are in UTC on 2021-02-28.