2023-03-08 00:00:31 +0100 | dekster | (~Albina_Pa@2603-7000-1203-4d7c-413b-439c-1900-10c5.res6.spectrum.com) |
2023-03-08 00:00:34 +0100 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) |
2023-03-08 00:02:26 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds) |
2023-03-08 00:03:39 +0100 | Albina_Pavlovna | (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) (Ping timeout: 248 seconds) |
2023-03-08 00:04:59 +0100 | Albina_Pavlovna | (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) |
2023-03-08 00:06:51 +0100 | dekster | (~Albina_Pa@2603-7000-1203-4d7c-413b-439c-1900-10c5.res6.spectrum.com) (Ping timeout: 248 seconds) |
2023-03-08 00:07:54 +0100 | ctyjr | (~ctyjr@95.107.235.112) |
2023-03-08 00:07:55 +0100 | dekster | (~Albina_Pa@2603-7000-1203-4d7c-40cf-a70c-7c21-82e8.res6.spectrum.com) |
2023-03-08 00:09:11 +0100 | dekster_ | (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) |
2023-03-08 00:09:19 +0100 | Albina_Pavlovna | (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) (Ping timeout: 248 seconds) |
2023-03-08 00:09:42 +0100 | seriously_ | (~seriously@2001:1c06:2715:c200:3edc:a4c7:c4c6:1c9e) |
2023-03-08 00:12:24 +0100 | EsoAlgo8 | (~EsoAlgo@129.146.136.145) (Remote host closed the connection) |
2023-03-08 00:12:32 +0100 | dekster | (~Albina_Pa@2603-7000-1203-4d7c-40cf-a70c-7c21-82e8.res6.spectrum.com) (Ping timeout: 248 seconds) |
2023-03-08 00:13:38 +0100 | EsoAlgo8 | (~EsoAlgo@129.146.136.145) |
2023-03-08 00:13:50 +0100 | <seriously_> | Hey all; Im reading "Purely Functional Data Structures" by okasaki, and im hung up on a concept. Specifically, I'm looking at the purely functional implementation of queues. He mentions that one of his queue implementations is inefficient if you "persistently". I'm struggling with the context of the word "persistent" here. If a function that |
2023-03-08 00:13:50 +0100 | <seriously_> | returns IO Int, reads an MVar thats a [Int], reverses that MVar, then removes 2 elements, then returns the first element in the list, I would effectively have created 3 versions in the lifespan of that function. |
2023-03-08 00:14:08 +0100 | <seriously_> | **if you use it "persistently" |
2023-03-08 00:14:28 +0100 | <seriously_> | reverses that list** |
2023-03-08 00:15:49 +0100 | <seriously_> | But when that IO method has ran, those versions will be garbage collected and only one version will remain in state technically; so Im confused if thats still innefficient by his defintion. |
2023-03-08 00:19:31 +0100 | <seriously_> | My intuition is "yes, since we created 3 versions of this list then its innefficient" but I thought that unchanged data points are shared between versions of a data structure so whats the fuss? |
2023-03-08 00:21:28 +0100 | <mauke> | I have no idea what you mean by that IO stuff, but "used persistently" means using multiple versions of the data structure in parallel, basically |
2023-03-08 00:22:39 +0100 | <mauke> | also, reads an MVar how? |
2023-03-08 00:22:48 +0100 | Lumia | (~Lumia@user/Lumia) |
2023-03-08 00:24:24 +0100 | <mauke> | as for reversing a list, that recreates the spine of the list, so it can't share any structure with the original list |
2023-03-08 00:26:46 +0100 | <monochrom> | Suppose I use the easy "(front-list, back-list)" implementation. Suppose I have done a ton of enqueues, so I have ([], [1, 2 ,3, 4, ..., 10^10]). Suppose I give that to a backtracking algorithm that holds on to that forever and reuses it a million times. |
2023-03-08 00:27:14 +0100 | Guest88 | (~Guest88@2601:547:500:4e80:405:ede5:9691:e21) |
2023-03-08 00:27:17 +0100 | <monochrom> | First time we do a dequeue, so we spend 10^10 steps reversing that back list. |
2023-03-08 00:27:47 +0100 | Qudit | (~user@user/Qudit) (Read error: Connection reset by peer) |
2023-03-08 00:28:03 +0100 | <monochrom> | Second time we backtrack back to that (i.e., the original ([], [1, 2 ,3, 4, ..., 10^10])), dequeue again, so we spend 10^10 steps again. |
2023-03-08 00:28:04 +0100 | malte | (~malte@mal.tc) |
2023-03-08 00:28:10 +0100 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
2023-03-08 00:28:11 +0100 | <monochrom> | Third time... you get the point. |
2023-03-08 00:28:46 +0100 | <mauke> | more abstractly, this is about amortized performance. if you have N steps that take O(1) each and then one step that takes O(N), the whole sequence is amortized O(N) still |
2023-03-08 00:28:46 +0100 | <monochrom> | ([], [1, 2 ,3, 4, ..., 10^10]) persists. This is persistence. This kills the amortization benefit. |
2023-03-08 00:28:59 +0100 | <mauke> | as long as you don't repeat any previous steps |
2023-03-08 00:29:46 +0100 | <mauke> | but if you hold on to the data structure after the first N steps and then perform the O(N) step repeatedly on it (say M times), it becomes O(M*N) |
2023-03-08 00:30:41 +0100 | <Guest88> | Quick question: map is to Functor as foldl is to ...? |
2023-03-08 00:30:50 +0100 | <Guest88> | Is there an analogue? |
2023-03-08 00:30:54 +0100 | <monochrom> | No. |
2023-03-08 00:31:31 +0100 | <mauke> | in the ephemeral case, every step is amortized O(1). in the persistent case (where you reuse data structures), every step is O(N) in the worst case |
2023-03-08 00:31:46 +0100 | <mauke> | Foldable? |
2023-03-08 00:31:53 +0100 | <jackdk> | Guest88: Foldable |
2023-03-08 00:31:58 +0100 | <jackdk> | oh mauke got there first |
2023-03-08 00:32:23 +0100 | xff0x | (~xff0x@ai098135.d.east.v6connect.net) (Ping timeout: 260 seconds) |
2023-03-08 00:32:47 +0100 | malte | (~malte@mal.tc) (Ping timeout: 248 seconds) |
2023-03-08 00:33:36 +0100 | <Guest88> | Thanks, that's what I was looking for. |
2023-03-08 00:34:21 +0100 | xff0x | (~xff0x@178.255.149.135) |
2023-03-08 00:39:20 +0100 | <seriously_> | So correct me mauke & monochrom, the key here is the "reuse" of a previous version? Persistence in this case means using previous versions |
2023-03-08 00:39:31 +0100 | Guest88 | (~Guest88@2601:547:500:4e80:405:ede5:9691:e21) (Quit: Client closed) |
2023-03-08 00:39:47 +0100 | <monochrom> | Yes. |
2023-03-08 00:40:19 +0100 | <mauke> | that's the point of "functional updates" |
2023-03-08 00:40:33 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-03-08 00:40:47 +0100 | <mauke> | in a typical imperative language, all data structures are ephemeral because they're updated in place |
2023-03-08 00:41:30 +0100 | <mauke> | in a functional setting, structures are not modified; instead all operations return new versions of the data structure |
2023-03-08 00:42:10 +0100 | <mauke> | that's persistent because you get versioning "for free" just by holding on to old values |
2023-03-08 00:42:35 +0100 | xff0x | (~xff0x@178.255.149.135) (Ping timeout: 248 seconds) |
2023-03-08 00:42:37 +0100 | <seriously_> | but if I'm just reversing a list, then removing the first to elements from the reversed result, then returning the first n elements of that result; technically the list has three versions so it's technically persistent |
2023-03-08 00:43:02 +0100 | <seriously_> | All in the scope of a function f :: [a] -> [a]; im not holding onto the first 2 versions? |
2023-03-08 00:43:48 +0100 | <seriously_> | I think im confused on the use of the word persistent in multiple contexts |
2023-03-08 00:43:54 +0100 | <mauke> | that's an O(n) operation (in the length of the list) |
2023-03-08 00:44:25 +0100 | <mauke> | because reversing the list traverses the whole thing anyway |
2023-03-08 00:44:33 +0100 | xff0x | (~xff0x@2405:6580:b080:900:c9db:48d9:400c:36fe) |
2023-03-08 00:44:58 +0100 | <seriously_> | true, but was my use of the list "persistent"? |
2023-03-08 00:45:19 +0100 | <monochrom> | I think you are attempting a local analysis where local analyses are inappropriate. |
2023-03-08 00:45:29 +0100 | <mauke> | I'd say yes because f does not modify the list in place |
2023-03-08 00:45:48 +0100 | <monochrom> | If you say "f xs = drop 10 (reverse xs)" then sure f doesn't persist the original xs. |
2023-03-08 00:46:14 +0100 | <monochrom> | But what if I have "for i=1 to 10^100; print (f [1..10^10])" |
2023-03-08 00:46:34 +0100 | <monochrom> | f doesn't persist the original list. My for-loop does. |
2023-03-08 00:46:54 +0100 | <mauke> | ... it does? |
2023-03-08 00:47:02 +0100 | <monochrom> | You now have to think like the GC algorithm. |
2023-03-08 00:47:34 +0100 | <monochrom> | Yeah! That handwritten [1..10^10] becomes a top-level CAF. |
2023-03-08 00:47:42 +0100 | <mauke> | oh, you're assuming CAFs |
2023-03-08 00:47:59 +0100 | <mauke> | that's kind of weird in an imperative language |
2023-03-08 00:49:48 +0100 | <monochrom> | GHC totally does it. Haskell is a weird imperative language. :) |
2023-03-08 00:50:50 +0100 | xff0x | (~xff0x@2405:6580:b080:900:c9db:48d9:400c:36fe) (Ping timeout: 260 seconds) |
2023-03-08 00:51:20 +0100 | <seriously_> | "If you say "f xs = drop 10 (reverse xs)" then sure f doesn't persist the original xs." -- do you have an example where f would persist the original xs? |
2023-03-08 00:51:38 +0100 | <monochrom> | (xs, drop 10 (reverse xs)) |
2023-03-08 00:51:56 +0100 | a_coll | (~acoll@45.92.120.189) (Remote host closed the connection) |
2023-03-08 00:52:41 +0100 | dekster_ | (~Albina_Pa@cpe-66-65-40-132.nyc.res.rr.com) (Quit: ZZZzzz…) |
2023-03-08 00:52:48 +0100 | <mauke> | since we can't store anything in an external reference (f is a pure function), the only way to "persist" things beyond f itself is to return it as part of the result |
2023-03-08 00:52:49 +0100 | <monochrom> | f xs = y where y = ... code that ends up re-computing drop 10 (reverse xs) a million times rather than memoizing for some reason ... |
2023-03-08 00:52:50 +0100 | xff0x | (~xff0x@ai098135.d.east.v6connect.net) |
2023-03-08 00:52:52 +0100 | <mauke> | such as a tuple |
2023-03-08 00:54:10 +0100 | Albina_Pavlovna | (~Albina_Pa@2603-7000-1203-4d7c-7018-4867-79af-ff6f.res6.spectrum.com) |
2023-03-08 00:54:27 +0100 | <monochrom> | In closing I'll just reduce this to understanding GC. |
2023-03-08 00:54:40 +0100 | <monochrom> | If your value isn't GC'ed then it persists. |
2023-03-08 00:55:35 +0100 | <seriously_> | that makes sense to me! |
2023-03-08 00:57:01 +0100 | catern | (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407) |
2023-03-08 00:57:21 +0100 | <seriously_> | For me, saying "datastructures are persistent in haskell" means something different then, "Using a data stucture persistently" |
2023-03-08 00:57:31 +0100 | Albina_Pavlovna | (~Albina_Pa@2603-7000-1203-4d7c-7018-4867-79af-ff6f.res6.spectrum.com) (Client Quit) |
2023-03-08 00:58:08 +0100 | <seriously_> | the former is just saying that all datastructures are immutable and therefor a new version is created whenever modifying a datastructure |
2023-03-08 00:58:35 +0100 | <monochrom> | I have never heard "data structures are persistent in haskell". |
2023-03-08 00:59:00 +0100 | <monochrom> | Therefore there is no need to worry about what it would mean. |
2023-03-08 00:59:21 +0100 | <monochrom> | But I have heard "data structures are immutable in haskell" which is precisely right. |
2023-03-08 00:59:39 +0100 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) (Ping timeout: 248 seconds) |
2023-03-08 01:01:54 +0100 | <seriously_> | sorry thats probably my brain not reading it correctly! but this statement "A data structure that supports multiple versions is called 'persistent' while a data structure that allows only a single version at a time is called 'ephemeral'" reads to me that "datastructures are persistent" |
2023-03-08 01:02:35 +0100 | <mauke> | seriously_: no, you're right |
2023-03-08 01:03:37 +0100 | <mauke> | "supports multiple versions" could also be phrased as "can be used persistently" |
2023-03-08 01:04:26 +0100 | <monochrom> | Given the context of the whole book, you will have to redefine "support" and "allow" to not mean "does Haskell allow it?", but instead "sure Haskell allows it, but if you actually do it, will it kill efficiency?" |
2023-03-08 01:04:41 +0100 | <monochrom> | So: |
2023-03-08 01:05:27 +0100 | <monochrom> | A data structure that still have efficient operations even when you have multiple versions lying around is called "persistent". |
2023-03-08 01:05:36 +0100 | <monochrom> | Similarly for the other one. |
2023-03-08 01:05:54 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.) |
2023-03-08 01:06:19 +0100 | mauke_ | (~mauke@user/mauke) |
2023-03-08 01:07:25 +0100 | <mauke_> | no, a data structure with inefficient operations can still be persistent |
2023-03-08 01:08:00 +0100 | mauke | (~mauke@user/mauke) (Ping timeout: 248 seconds) |
2023-03-08 01:08:00 +0100 | mauke_ | mauke |
2023-03-08 01:08:04 +0100 | Midjak | (~Midjak@82.66.147.146) |
2023-03-08 01:09:22 +0100 | <seriously_> | thanks ... so to answer my original question for directly; we would say that function "f :: MVar [Int] -> IO [Int]; f stateVar = do; xs <- readMVar stateVar; return $ drop 10 (reverse xs). |
2023-03-08 01:09:31 +0100 | <seriously_> | more directly** |
2023-03-08 01:09:57 +0100 | <seriously_> | is NOT using the list versions persistently |
2023-03-08 01:10:12 +0100 | <mauke> | readMVar is take + put, right? |
2023-03-08 01:10:21 +0100 | <seriously_> | just take |
2023-03-08 01:11:34 +0100 | <mauke> | "Prior to base 4.7, readMVar was a combination of takeMVar and putMVar." |
2023-03-08 01:12:10 +0100 | <mauke> | OK, so it's not literally take + put anymore, but it still leaves the original contents in the MVar |
2023-03-08 01:12:37 +0100 | <mauke> | so that's a persistent use |
2023-03-08 01:12:56 +0100 | <seriously_> | Well yes the MVar itself is persisted in the state of the running system |
2023-03-08 01:13:17 +0100 | <seriously_> | But I mean; the 3 versions created in line: return $ drop 10 (r....; |
2023-03-08 01:13:23 +0100 | Albina_Pavlovna | (~Albina_Pa@2603-7000-1203-4d7c-7018-4867-79af-ff6f.res6.spectrum.com) |
2023-03-08 01:13:24 +0100 | <seriously_> | are not persisted |
2023-03-08 01:13:44 +0100 | <mauke> | I'm not talking about the mvar |
2023-03-08 01:14:17 +0100 | <mauke> | also, that line only creates 2 versions |
2023-03-08 01:14:30 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
2023-03-08 01:14:41 +0100 | <mauke> | there is an original version (xs), which is still reachable through the MVar |
2023-03-08 01:14:55 +0100 | <mauke> | reverse xs is ephemeral |
2023-03-08 01:15:05 +0100 | <seriously_> | yes apololgies!! |
2023-03-08 01:15:17 +0100 | <seriously_> | Gotcha!! thanks |
2023-03-08 01:15:18 +0100 | <mauke> | drop 10 (reverse xs) can be used persistently because it is returned to the caller |
2023-03-08 01:15:53 +0100 | <mauke> | but drop 10 is cheap because of sharing |
2023-03-08 01:16:17 +0100 | <mauke> | (essentially drop 10 just returns a substructure of its input) |
2023-03-08 01:16:52 +0100 | <seriously_> | cool i think im on the same page.. off to bed; gn |
2023-03-08 01:17:07 +0100 | seriously_ | (~seriously@2001:1c06:2715:c200:3edc:a4c7:c4c6:1c9e) (Quit: Client closed) |
2023-03-08 01:17:11 +0100 | Albina_Pavlovna | (~Albina_Pa@2603-7000-1203-4d7c-7018-4867-79af-ff6f.res6.spectrum.com) (Client Quit) |
2023-03-08 01:38:21 +0100 | ddellacosta | (~ddellacos@146.70.166.10) (Quit: WeeChat 3.8) |
2023-03-08 01:39:35 +0100 | ddellacosta | (~ddellacos@146.70.166.10) |
2023-03-08 01:40:10 +0100 | <Inst> | wait, GHC's type system is turing complete, right? |
2023-03-08 01:40:24 +0100 | zeenk | (~zeenk@2a02:2f04:a20d:f900::7fe) (Quit: Konversation terminated!) |
2023-03-08 01:40:26 +0100 | <davean> | With extensions, sure, sorta |
2023-03-08 01:40:57 +0100 | <davean> | Not normal types though |
2023-03-08 01:41:04 +0100 | <davean> | well, generally |
2023-03-08 01:42:20 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2023-03-08 01:45:33 +0100 | ctyjr | (~ctyjr@95.107.235.112) (Ping timeout: 260 seconds) |
2023-03-08 01:51:26 +0100 | mastarija | (~mastarija@188.252.198.44) (Quit: WeeChat 3.7.1) |
2023-03-08 02:04:22 +0100 | Axman6 | (~Axman6@user/axman6) (Ping timeout: 246 seconds) |
2023-03-08 02:06:30 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2023-03-08 02:06:30 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2023-03-08 02:06:30 +0100 | wroathe | (~wroathe@user/wroathe) |
2023-03-08 02:09:41 +0100 | pieguy128_ | (~pieguy128@bras-base-mtrlpq5031w-grc-43-67-70-144-160.dsl.bell.ca) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-03-08 02:11:01 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2023-03-08 02:16:12 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) |
2023-03-08 02:16:51 +0100 | talismanick | (~talismani@2601:200:c000:f7a0::5321) |
2023-03-08 02:17:08 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2023-03-08 02:18:30 +0100 | pieguy128 | (~pieguy128@bras-base-mtrlpq5031w-grc-43-67-70-144-160.dsl.bell.ca) |
2023-03-08 02:20:39 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Ping timeout: 260 seconds) |
2023-03-08 02:23:40 +0100 | Lumia | (~Lumia@user/Lumia) (Quit: ,-) |
2023-03-08 02:33:59 +0100 | inversed | (~inversed@bcdcac82.skybroadband.com) (Ping timeout: 255 seconds) |
2023-03-08 02:37:47 +0100 | inversed | (~inversed@bcdcac82.skybroadband.com) |
2023-03-08 02:45:30 +0100 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) |
2023-03-08 02:51:55 +0100 | talismanick | (~talismani@2601:200:c000:f7a0::5321) (Ping timeout: 260 seconds) |
2023-03-08 02:53:57 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 02:56:27 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 248 seconds) |
2023-03-08 02:56:32 +0100 | cheater_ | cheater |
2023-03-08 02:57:01 +0100 | Midjak | (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
2023-03-08 03:03:37 +0100 | slack1256 | (~slack1256@186.11.99.146) |
2023-03-08 03:05:31 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 248 seconds) |
2023-03-08 03:11:04 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-03-08 03:15:57 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 255 seconds) |
2023-03-08 03:19:03 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 03:19:29 +0100 | natto | (~natto@140.238.225.67) (Quit: a.) |
2023-03-08 03:20:22 +0100 | natto | (~natto@140.238.225.67) |
2023-03-08 03:21:52 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 248 seconds) |
2023-03-08 03:21:59 +0100 | cheater_ | cheater |
2023-03-08 03:24:03 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds) |
2023-03-08 03:24:25 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2023-03-08 03:30:02 +0100 | meinside | (uid24933@id-24933.helmsley.irccloud.com) |
2023-03-08 03:31:39 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 248 seconds) |
2023-03-08 03:35:45 +0100 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) (Ping timeout: 255 seconds) |
2023-03-08 03:36:59 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 248 seconds) |
2023-03-08 03:37:06 +0100 | dcoutts | (~duncan@host86-175-43-163.range86-175.btcentralplus.com) (Ping timeout: 255 seconds) |
2023-03-08 03:39:11 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 03:39:39 +0100 | ix | (~ix@213.205.192.69) |
2023-03-08 03:41:36 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 248 seconds) |
2023-03-08 03:41:37 +0100 | cheater_ | cheater |
2023-03-08 03:46:08 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2023-03-08 03:48:06 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 03:48:45 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 260 seconds) |
2023-03-08 03:48:52 +0100 | cheater_ | cheater |
2023-03-08 03:50:07 +0100 | vglfr | (~vglfr@145.224.100.65) (Ping timeout: 248 seconds) |
2023-03-08 03:55:06 +0100 | ix | (~ix@213.205.192.69) (Ping timeout: 255 seconds) |
2023-03-08 03:55:23 +0100 | Inst | (~Inst@2601:6c4:4081:54f0:a1f8:4ef8:3abb:c29) (Ping timeout: 260 seconds) |
2023-03-08 03:55:25 +0100 | gmg | (~user@user/gehmehgeh) (Remote host closed the connection) |
2023-03-08 03:55:36 +0100 | Inst | (~Inst@2601:6c4:4081:54f0:c803:a9ae:2b63:4b93) |
2023-03-08 03:56:05 +0100 | gmg | (~user@user/gehmehgeh) |
2023-03-08 04:04:51 +0100 | finn_elija | (~finn_elij@user/finn-elija/x-0085643) |
2023-03-08 04:04:51 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
2023-03-08 04:04:51 +0100 | finn_elija | FinnElija |
2023-03-08 04:05:17 +0100 | razetime | (~Thunderbi@117.193.2.191) |
2023-03-08 04:06:53 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2023-03-08 04:07:23 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
2023-03-08 04:17:22 +0100 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) |
2023-03-08 04:17:53 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) |
2023-03-08 04:18:56 +0100 | gastus | (~gastus@185.6.123.242) |
2023-03-08 04:22:19 +0100 | gastus_ | (~gastus@5.83.191.63) (Ping timeout: 248 seconds) |
2023-03-08 04:22:35 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Ping timeout: 260 seconds) |
2023-03-08 04:29:47 +0100 | td_ | (~td@i53870905.versanet.de) (Ping timeout: 248 seconds) |
2023-03-08 04:31:35 +0100 | td_ | (~td@i53870915.versanet.de) |
2023-03-08 04:35:34 +0100 | falafel | (~falafel@50.27.155.66) |
2023-03-08 04:43:41 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 04:45:04 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 248 seconds) |
2023-03-08 04:49:19 +0100 | cheater_ | (~Username@user/cheater) (Ping timeout: 248 seconds) |
2023-03-08 04:49:59 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2023-03-08 04:50:26 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2023-03-08 04:51:25 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 04:51:25 +0100 | cheater_ | cheater |
2023-03-08 04:57:25 +0100 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 246 seconds) |
2023-03-08 04:57:50 +0100 | jero98772 | (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection) |
2023-03-08 04:59:07 +0100 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) |
2023-03-08 05:00:49 +0100 | npmania | (~Thunderbi@45.8.223.206) (Ping timeout: 268 seconds) |
2023-03-08 05:00:53 +0100 | npmania1 | (~Thunderbi@91.193.7.59) |
2023-03-08 05:03:11 +0100 | npmania1 | npmania |
2023-03-08 05:06:39 +0100 | razetime | (~Thunderbi@117.193.2.191) (Ping timeout: 255 seconds) |
2023-03-08 05:11:45 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-03-08 05:13:13 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) |
2023-03-08 05:13:35 +0100 | talismanick | (~talismani@2601:200:c000:f7a0::5321) |
2023-03-08 05:19:23 +0100 | codaraxis | (~codaraxis@user/codaraxis) (Ping timeout: 248 seconds) |
2023-03-08 05:19:37 +0100 | xelxebar_ | xelxebar |
2023-03-08 05:30:01 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2023-03-08 05:38:20 +0100 | trev | (~trev@user/trev) |
2023-03-08 05:45:20 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
2023-03-08 05:45:52 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) |
2023-03-08 05:46:03 +0100 | freeside | (~mengwong@103.252.202.85) (Ping timeout: 248 seconds) |
2023-03-08 05:46:31 +0100 | freeside | (~mengwong@103.252.202.85) |
2023-03-08 05:50:51 +0100 | freeside | (~mengwong@103.252.202.85) (Ping timeout: 248 seconds) |
2023-03-08 05:54:22 +0100 | ix | (~ix@213.205.192.69) |
2023-03-08 05:58:28 +0100 | Square2 | (~Square4@user/square) |
2023-03-08 05:59:46 +0100 | johnw | (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in) |
2023-03-08 05:59:46 +0100 | jwiegley | (~jwiegley@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in) |
2023-03-08 06:03:55 +0100 | codaraxis | (~codaraxis@user/codaraxis) |
2023-03-08 06:18:05 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 255 seconds) |
2023-03-08 06:23:45 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
2023-03-08 06:24:01 +0100 | biberu | (~biberu@user/biberu) (Read error: Connection reset by peer) |
2023-03-08 06:25:52 +0100 | mrcsno | (~mrcsno@user/mrcsno) (Ping timeout: 248 seconds) |
2023-03-08 06:29:04 +0100 | razetime | (~Thunderbi@117.193.2.191) |
2023-03-08 06:29:47 +0100 | falafel | (~falafel@50.27.155.66) (Ping timeout: 248 seconds) |
2023-03-08 06:29:57 +0100 | biberu | (~biberu@user/biberu) |
2023-03-08 06:31:28 +0100 | slack1256 | (~slack1256@186.11.99.146) (Remote host closed the connection) |
2023-03-08 06:35:05 +0100 | phma | (~phma@host-67-44-208-170.hnremote.net) (Read error: Connection reset by peer) |
2023-03-08 06:36:07 +0100 | phma | (~phma@host-67-44-208-170.hnremote.net) |
2023-03-08 06:37:01 +0100 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) (Ping timeout: 268 seconds) |
2023-03-08 06:51:32 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2023-03-08 06:51:32 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2023-03-08 06:51:32 +0100 | wroathe | (~wroathe@user/wroathe) |
2023-03-08 06:55:07 +0100 | falafel | (~falafel@50.27.155.66) |
2023-03-08 06:56:31 +0100 | bgs | (~bgs@212-85-160-171.dynamic.telemach.net) |
2023-03-08 06:58:24 +0100 | thegeekinside | (~thegeekin@189.141.115.134) (Ping timeout: 248 seconds) |
2023-03-08 07:08:35 +0100 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2023-03-08 07:09:06 +0100 | kimiamania | (~65804703@user/kimiamania) (Read error: Connection reset by peer) |
2023-03-08 07:11:20 +0100 | kimiamania | (~65804703@user/kimiamania) |
2023-03-08 07:13:03 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2023-03-08 07:14:01 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
2023-03-08 07:15:43 +0100 | Square2 | Square |
2023-03-08 07:20:06 +0100 | theproffesor | (~theproffe@c-73-217-58-76.hsd1.co.comcast.net) |
2023-03-08 07:20:06 +0100 | theproffesor | (~theproffe@c-73-217-58-76.hsd1.co.comcast.net) (Changing host) |
2023-03-08 07:20:06 +0100 | theproffesor | (~theproffe@user/theproffesor) |
2023-03-08 07:23:05 +0100 | harveypwca | (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
2023-03-08 07:25:36 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:3577:7d35:34e6:6624) (Remote host closed the connection) |
2023-03-08 07:25:43 +0100 | mrcsno | (~mrcsno@user/mrcsno) |
2023-03-08 07:25:55 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
2023-03-08 07:28:41 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-03-08 07:30:07 +0100 | codaraxis | (~codaraxis@user/codaraxis) (Quit: Leaving) |
2023-03-08 07:30:40 +0100 | falafel | (~falafel@50.27.155.66) (Ping timeout: 268 seconds) |
2023-03-08 07:35:35 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) |
2023-03-08 07:36:55 +0100 | chomwitt | (~chomwitt@2a02:587:7a18:6d00:1ac0:4dff:fedb:a3f1) |
2023-03-08 07:37:47 +0100 | whatsupdoc | (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2023-03-08 07:42:29 +0100 | johnw | (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) |
2023-03-08 07:42:59 +0100 | jwiegley | (~jwiegley@76-234-69-149.lightspeed.frokca.sbcglobal.net) |
2023-03-08 07:45:59 +0100 | bgs | (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
2023-03-08 07:46:44 +0100 | Everything | (~Everythin@37.115.210.57) |
2023-03-08 08:02:03 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
2023-03-08 08:07:59 +0100 | incertia | (~incertia@209.122.71.127) (Ping timeout: 264 seconds) |
2023-03-08 08:11:00 +0100 | kenran | (~user@user/kenran) |
2023-03-08 08:14:17 +0100 | azimut_ | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
2023-03-08 08:15:04 +0100 | ix | (~ix@213.205.192.69) (Ping timeout: 268 seconds) |
2023-03-08 08:16:26 +0100 | theproffesor | (~theproffe@user/theproffesor) (Ping timeout: 255 seconds) |
2023-03-08 08:26:10 +0100 | shriekingnoise | (~shrieking@186.137.175.87) (Ping timeout: 268 seconds) |
2023-03-08 08:30:03 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2023-03-08 08:31:24 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) |
2023-03-08 08:35:54 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) (Client Quit) |
2023-03-08 08:35:55 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
2023-03-08 08:36:55 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) |
2023-03-08 08:38:22 +0100 | coot_ | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
2023-03-08 08:38:25 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) (Client Quit) |
2023-03-08 08:41:35 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Ping timeout: 256 seconds) |
2023-03-08 08:41:35 +0100 | coot_ | coot |
2023-03-08 08:42:01 +0100 | michalz | (~michalz@185.246.204.105) |
2023-03-08 08:43:06 +0100 | incertia | (~incertia@209.122.71.127) |
2023-03-08 08:46:27 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:8685:41f8:504d:c8e6) |
2023-03-08 08:49:45 +0100 | mauke | (~mauke@user/mauke) (Quit: leaving) |
2023-03-08 09:00:43 +0100 | Midjak | (~Midjak@82.66.147.146) |
2023-03-08 09:01:13 +0100 | Inst_ | (~Inst@2601:6c4:4081:54f0:2ca2:b1c3:7f96:1e03) |
2023-03-08 09:03:30 +0100 | vpan | (~0@212.117.1.172) |
2023-03-08 09:04:16 +0100 | Inst | (~Inst@2601:6c4:4081:54f0:c803:a9ae:2b63:4b93) (Ping timeout: 248 seconds) |
2023-03-08 09:04:31 +0100 | jludwig | (~justin@li657-110.members.linode.com) (Ping timeout: 246 seconds) |
2023-03-08 09:04:46 +0100 | jludwig | (~justin@li657-110.members.linode.com) |
2023-03-08 09:07:35 +0100 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) |
2023-03-08 09:08:21 +0100 | kenran | (~user@user/kenran) (Remote host closed the connection) |
2023-03-08 09:08:35 +0100 | kenran | (~user@user/kenran) |
2023-03-08 09:14:06 +0100 | gurkenglas | (~gurkengla@dynamic-046-114-176-174.46.114.pool.telefonica.de) |
2023-03-08 09:21:41 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) |
2023-03-08 09:23:58 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-03-08 09:24:32 +0100 | razetime | (~Thunderbi@117.193.2.191) (Ping timeout: 248 seconds) |
2023-03-08 09:24:53 +0100 | gnalzo | (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
2023-03-08 09:35:43 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 09:35:55 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 248 seconds) |
2023-03-08 09:36:12 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) (Quit: Textual IRC Client: www.textualapp.com) |
2023-03-08 09:36:27 +0100 | gurkenglas | (~gurkengla@dynamic-046-114-176-174.46.114.pool.telefonica.de) (Ping timeout: 248 seconds) |
2023-03-08 09:36:42 +0100 | cheater__ | (~Username@user/cheater) |
2023-03-08 09:36:42 +0100 | cheater__ | cheater |
2023-03-08 09:39:57 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2023-03-08 09:40:01 +0100 | razetime | (~Thunderbi@117.193.2.191) |
2023-03-08 09:40:16 +0100 | cheater_ | (~Username@user/cheater) (Ping timeout: 252 seconds) |
2023-03-08 09:40:35 +0100 | fnurglewitz | (uid263868@id-263868.lymington.irccloud.com) |
2023-03-08 09:42:13 +0100 | ix | (~ix@213.205.192.69) |
2023-03-08 09:43:15 +0100 | dsrt^ | (~dsrt@c-24-30-76-89.hsd1.ga.comcast.net) (Remote host closed the connection) |
2023-03-08 09:43:38 +0100 | dsrt^ | (~dsrt@c-24-30-76-89.hsd1.ga.comcast.net) |
2023-03-08 09:44:55 +0100 | vglfr | (~vglfr@145.224.100.102) |
2023-03-08 09:45:52 +0100 | cassiopea | (~cassiopea@user/cassiopea) (Ping timeout: 248 seconds) |
2023-03-08 09:51:37 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-03-08 09:52:48 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection) |
2023-03-08 09:56:29 +0100 | jtomas | (~user@84.78.228.192) |
2023-03-08 09:58:13 +0100 | gurkenglas | (~gurkengla@dynamic-046-114-176-174.46.114.pool.telefonica.de) |
2023-03-08 10:00:20 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
2023-03-08 10:01:09 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Remote host closed the connection) |
2023-03-08 10:01:49 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-03-08 10:03:11 +0100 | vglfr | (~vglfr@145.224.100.102) (Ping timeout: 256 seconds) |
2023-03-08 10:05:53 +0100 | vglfr | (~vglfr@209.198.138.162) |
2023-03-08 10:06:18 +0100 | wagle | (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
2023-03-08 10:06:48 +0100 | wagle | (~wagle@quassel.wagle.io) |
2023-03-08 10:09:46 +0100 | mbuf | (~Shakthi@49.207.178.186) |
2023-03-08 10:14:54 +0100 | kosmikus[m] | (~andresloe@2001:470:69fc:105::95d) |
2023-03-08 10:15:17 +0100 | CiaoSen | (~Jura@p200300c9570e91002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2023-03-08 10:22:07 +0100 | vglfr | (~vglfr@209.198.138.162) (Ping timeout: 248 seconds) |
2023-03-08 10:22:20 +0100 | vglfr | (~vglfr@145.224.100.102) |
2023-03-08 10:23:20 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 268 seconds) |
2023-03-08 10:23:53 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) |
2023-03-08 10:27:18 +0100 | koolazer | (~koo@user/koolazer) (Read error: Connection reset by peer) |
2023-03-08 10:28:27 +0100 | harveypwca | (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
2023-03-08 10:35:07 +0100 | vglfr | (~vglfr@145.224.100.102) (Ping timeout: 248 seconds) |
2023-03-08 10:35:39 +0100 | ix | (~ix@213.205.192.69) (Ping timeout: 248 seconds) |
2023-03-08 10:36:56 +0100 | vglfr | (~vglfr@209.198.138.162) |
2023-03-08 10:37:15 +0100 | jtomas | (~user@84.78.228.192) (Remote host closed the connection) |
2023-03-08 10:50:22 +0100 | NiceBird | (~NiceBird@185.133.111.196) |
2023-03-08 10:54:57 +0100 | gurkenglas | (~gurkengla@dynamic-046-114-176-174.46.114.pool.telefonica.de) (Ping timeout: 255 seconds) |
2023-03-08 10:55:03 +0100 | ft | (~ft@p3e9bc443.dip0.t-ipconnect.de) (Quit: leaving) |
2023-03-08 10:58:13 +0100 | zeenk | (~zeenk@2a02:2f04:a20d:f900::7fe) |
2023-03-08 11:01:40 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) |
2023-03-08 11:04:57 +0100 | razetime | (~Thunderbi@117.193.2.191) (Remote host closed the connection) |
2023-03-08 11:06:03 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Ping timeout: 248 seconds) |
2023-03-08 11:08:07 +0100 | zer0bitz | (~zer0bitz@2001:2003:f443:d600:708c:56bf:7019:7d0d) (Quit: No Ping reply in 180 seconds.) |
2023-03-08 11:09:32 +0100 | zer0bitz | (~zer0bitz@2001:2003:f443:d600:e115:5557:8b72:4710) |
2023-03-08 11:14:20 +0100 | lxi | (~quassel@2a02:2f08:4d1c:400:52fd:5712:b83c:ca48) |
2023-03-08 11:16:07 +0100 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2023-03-08 11:16:27 +0100 | nattiestnate | (~nate@202.138.250.46) |
2023-03-08 11:22:24 +0100 | pwntips | (~user@24-113-98-114.wavecable.com) (Ping timeout: 255 seconds) |
2023-03-08 11:27:18 +0100 | dcoutts | (~duncan@host81-156-211-236.range81-156.btcentralplus.com) |
2023-03-08 11:28:02 +0100 | theproffesor | (~theproffe@c-73-217-58-76.hsd1.co.comcast.net) |
2023-03-08 11:28:03 +0100 | theproffesor | (~theproffe@c-73-217-58-76.hsd1.co.comcast.net) (Changing host) |
2023-03-08 11:28:03 +0100 | theproffesor | (~theproffe@user/theproffesor) |
2023-03-08 11:31:12 +0100 | Axman6 | (~Axman6@user/axman6) |
2023-03-08 11:32:05 +0100 | <kenran> | Maybe I'm overlooking something obvious here: when using Async a from the async library, why is there no built-in operation that looks like bind? |
2023-03-08 11:33:56 +0100 | <Axman6> | you want Async to be a monad? |
2023-03-08 11:34:49 +0100 | lxi | (~quassel@2a02:2f08:4d1c:400:52fd:5712:b83c:ca48) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
2023-03-08 11:35:07 +0100 | <kenran> | No. But wouldn't a separate operation of type: Async a -> (a -> Async b) -> Async b make sense? I mean, I can write something like that, I'm just wondering what I'm overlooking. |
2023-03-08 11:35:54 +0100 | <kenran> | I'd like to do something with the result of an async (impurely, or I could use fmap) after it finished, and have a single handle to that "composed operation", if that makes sense. |
2023-03-08 11:36:04 +0100 | <Axman6> | well, that would make it a monad, unless that function didn't obey the monad laws somehow |
2023-03-08 11:36:29 +0100 | <lyxia> | can you write that function though? |
2023-03-08 11:36:53 +0100 | <kenran> | oh, wait, there might be an IO missing |
2023-03-08 11:37:07 +0100 | <kenran> | let me try :) |
2023-03-08 11:37:23 +0100 | <Axman6> | yes, and now you have IO to do what you want anyay |
2023-03-08 11:37:29 +0100 | <Axman6> | anyway* |
2023-03-08 11:37:38 +0100 | <lyxia> | Yeah you can wait on it and then async the resulting action, but there's an IO in the middle |
2023-03-08 11:38:05 +0100 | <lyxia> | There's probably a monad hiding there but it's not Async |
2023-03-08 11:39:07 +0100 | <ncf> | i wonder if it's a right IO-module or something |
2023-03-08 11:39:10 +0100 | <kenran> | yeah, you're right. I found my implementation from Thursday and it's of type Async a -> (a -> Async b) -> IO (Async b). |
2023-03-08 11:39:14 +0100 | <kenran> | thanks! |
2023-03-08 11:39:49 +0100 | <Axman6> | feels a little like monad par |
2023-03-08 11:40:15 +0100 | <Axman6> | https://hackage.haskell.org/package/monad-par-0.3.5/docs/Control-Monad-Par.html |
2023-03-08 11:40:54 +0100 | MajorBiscuit | (~MajorBisc@145.94.156.212) |
2023-03-08 11:41:52 +0100 | <Axman6> | which does have a Monad instance, and lets youi define the dependencies between many parallel computations |
2023-03-08 11:42:33 +0100 | <Axman6> | uh, Par does, but not IVar |
2023-03-08 11:43:49 +0100 | <Axman6> | qwould be intersting to see linear types applied to it to see if you can enforce only write can happen to each IVar |
2023-03-08 11:44:10 +0100 | chomwitt | (~chomwitt@2a02:587:7a18:6d00:1ac0:4dff:fedb:a3f1) (Ping timeout: 260 seconds) |
2023-03-08 11:44:24 +0100 | meinside | (uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2023-03-08 11:53:31 +0100 | mechap_ | (~mechap@user/mechap) (Ping timeout: 248 seconds) |
2023-03-08 11:56:23 +0100 | mechap | (~mechap@user/mechap) |
2023-03-08 12:00:11 +0100 | Fischmiep | (~Fischmiep@user/Fischmiep) (Quit: WeeChat 3.0) |
2023-03-08 12:02:33 +0100 | kuribas | (~user@ptr-17d51enjoamlmzvg4fw.18120a2.ip6.access.telenet.be) |
2023-03-08 12:03:08 +0100 | ix | (~ix@213.205.192.69) |
2023-03-08 12:08:40 +0100 | freeside | (~mengwong@103.252.202.85) |
2023-03-08 12:08:56 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
2023-03-08 12:15:56 +0100 | jinsl- | (~jinsl@2408:8207:2557:5df0:211:32ff:fec8:6aea) |
2023-03-08 12:16:22 +0100 | Fischmiep | (~Fischmiep@user/Fischmiep) |
2023-03-08 12:16:51 +0100 | jinsl | (~jinsl@123.120.184.53) (Ping timeout: 255 seconds) |
2023-03-08 12:20:14 +0100 | xiliuya | (~xiliuya@user/xiliuya) |
2023-03-08 12:23:34 +0100 | Fischmiep | (~Fischmiep@user/Fischmiep) (Quit: WeeChat 3.0) |
2023-03-08 12:25:34 +0100 | mmhat | (~mmh@p200300f1c71b21bfee086bfffe095315.dip0.t-ipconnect.de) |
2023-03-08 12:26:05 +0100 | statusbot | (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Remote host closed the connection) |
2023-03-08 12:26:07 +0100 | hugo | (znc@verdigris.lysator.liu.se) (Ping timeout: 246 seconds) |
2023-03-08 12:26:12 +0100 | statusbot5 | (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) |
2023-03-08 12:35:20 +0100 | hugo | (znc@verdigris.lysator.liu.se) |
2023-03-08 12:37:57 +0100 | ccapndave | (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2023-03-08 12:43:21 +0100 | __monty__ | (~toonn@user/toonn) |
2023-03-08 12:54:26 +0100 | CiaoSen | (~Jura@p200300c9570e91002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
2023-03-08 12:55:03 +0100 | Guest19 | (~Guest19@c-73-32-119-4.hsd1.tx.comcast.net) |
2023-03-08 12:58:15 +0100 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) |
2023-03-08 12:59:59 +0100 | notzmv | (~zmv@user/notzmv) |
2023-03-08 13:02:12 +0100 | xiliuya | (~xiliuya@user/xiliuya) (Ping timeout: 255 seconds) |
2023-03-08 13:02:48 +0100 | xiliuya | (~xiliuya@user/xiliuya) |
2023-03-08 13:07:25 +0100 | notzmv | (~zmv@user/notzmv) (Ping timeout: 246 seconds) |
2023-03-08 13:08:44 +0100 | Guest42 | (~Guest@2409:4073:4d84:b3d6:37ae:8eb7:768:6501) |
2023-03-08 13:12:12 +0100 | Guest19 | (~Guest19@c-73-32-119-4.hsd1.tx.comcast.net) (Quit: Client closed) |
2023-03-08 13:12:49 +0100 | ccapndave | (~ccapndave@mob-194-230-146-218.cgn.sunrise.net) |
2023-03-08 13:14:24 +0100 | Guest42 | (~Guest@2409:4073:4d84:b3d6:37ae:8eb7:768:6501) (Quit: Client closed) |
2023-03-08 13:14:31 +0100 | ccapndave | (~ccapndave@mob-194-230-146-218.cgn.sunrise.net) (Client Quit) |
2023-03-08 13:16:42 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 255 seconds) |
2023-03-08 13:19:37 +0100 | notzmv | (~zmv@user/notzmv) |
2023-03-08 13:21:50 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) () |
2023-03-08 13:24:30 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) |
2023-03-08 13:25:41 +0100 | CiaoSen | (~Jura@p200300c9570e91002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2023-03-08 13:26:55 +0100 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
2023-03-08 13:29:13 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2023-03-08 13:30:36 +0100 | <absence> | disregarding the suboptimal design of the types, is there a better way to match two sum types when one of them is inside a Maybe? https://play.haskell.org/saved/j7iBVDuV |
2023-03-08 13:31:21 +0100 | <absence> | in particular the Tag type is problematic, since it can't be reused in a situation where Sum1 is the Maybe one |
2023-03-08 13:33:47 +0100 | xiliuya | (~xiliuya@user/xiliuya) (Ping timeout: 248 seconds) |
2023-03-08 13:35:36 +0100 | xiliuya | (~xiliuya@user/xiliuya) |
2023-03-08 13:37:15 +0100 | lyle | (~lyle@104.246.145.237) |
2023-03-08 13:40:10 +0100 | <__monty__> | absence: How about having a separate case for Nothing and for (Just sum2)? |
2023-03-08 13:42:27 +0100 | <absence> | __monty__: then i have to duplicate the match for Sum1 in both cases, if I understand you correctly? |
2023-03-08 13:43:04 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-03-08 13:45:20 +0100 | <__monty__> | If you have to distinguish even in that case I usually just nest case-ofs or let-ins. |
2023-03-08 13:47:16 +0100 | <absence> | i haven't found a way to do that without duplicating code |
2023-03-08 13:47:18 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 13:48:40 +0100 | <__monty__> | Then you'll have to more clearly explain what the problem is you're running into. |
2023-03-08 13:50:15 +0100 | Lycurgus | (~juan@user/Lycurgus) |
2023-03-08 13:50:35 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 264 seconds) |
2023-03-08 13:53:31 +0100 | cheater_ | (~Username@user/cheater) (Ping timeout: 248 seconds) |
2023-03-08 13:53:52 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 13:53:52 +0100 | cheater_ | cheater |
2023-03-08 13:58:08 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
2023-03-08 13:59:51 +0100 | <absence> | __monty__: if i start by matching on Maybe Sum2, i can't decide whether to call fa or fb right away, due to the Nothing case. i also can't defer the choice to a function similar to g, because it would have to take a Maybe Sum2 parameter, and then i've just shoved the problem to a different place. if I change g so it takes Sum2 instead of Maybe Sum2, i can easily match Sum1 and Sum2 and decide fa vs fb, |
2023-03-08 13:59:57 +0100 | <absence> | but i can't call g when Maybe Sum2 is Nothing, so i need duplicate logic that decides fa vs fb from Sum1 only |
2023-03-08 14:07:20 +0100 | <absence> | __monty__: the trivial solution is this, but i would like to avoid the duplication: https://play.haskell.org/saved/qJXOq2It |
2023-03-08 14:09:08 +0100 | stackdroid18 | (14094@de1.hashbang.sh) |
2023-03-08 14:10:34 +0100 | <absence> | __monty__: i'm not sure what you mean by nested case-ofs or let-ins in this case |
2023-03-08 14:11:10 +0100 | Everything | (~Everythin@37.115.210.57) (Ping timeout: 260 seconds) |
2023-03-08 14:12:00 +0100 | Everything | (~Everythin@37.115.210.57) |
2023-03-08 14:13:01 +0100 | biberu | (~biberu@user/biberu) (Read error: Connection reset by peer) |
2023-03-08 14:13:21 +0100 | biberu | (~biberu@user/biberu) |
2023-03-08 14:24:32 +0100 | gurkenglas | (~gurkengla@dynamic-046-114-178-105.46.114.pool.telefonica.de) |
2023-03-08 14:27:39 +0100 | gastus | (~gastus@185.6.123.242) (Ping timeout: 248 seconds) |
2023-03-08 14:29:19 +0100 | gastus | (~gastus@185.6.123.242) |
2023-03-08 14:36:54 +0100 | Cale | (~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com) (Ping timeout: 252 seconds) |
2023-03-08 14:38:10 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-03-08 14:41:44 +0100 | Lycurgus | (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz) |
2023-03-08 14:43:07 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
2023-03-08 14:43:34 +0100 | xiliuya | (~xiliuya@user/xiliuya) (Ping timeout: 268 seconds) |
2023-03-08 14:45:24 +0100 | xiliuya | (~xiliuya@user/xiliuya) |
2023-03-08 14:50:13 +0100 | Cale | (~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com) |
2023-03-08 14:51:36 +0100 | gnalzo | (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
2023-03-08 14:54:05 +0100 | <__monty__> | absence: That looks like you could do `InA1 a1 -> Right . fa a1 . fmap projA2 $ sum2` where you would've defined Sum2 as `InA2 { projA2 :: A2 } | InB2 { projB2 :: B2 }` to get the projection functions. |
2023-03-08 14:54:30 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2023-03-08 14:55:08 +0100 | jero98772 | (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) |
2023-03-08 14:56:47 +0100 | gurkenglas | (~gurkengla@dynamic-046-114-178-105.46.114.pool.telefonica.de) (Ping timeout: 248 seconds) |
2023-03-08 15:02:43 +0100 | npmania | (~Thunderbi@91.193.7.59) (Quit: npmania) |
2023-03-08 15:03:46 +0100 | dsrt^ | (~dsrt@c-24-30-76-89.hsd1.ga.comcast.net) (Remote host closed the connection) |
2023-03-08 15:03:51 +0100 | <absence> | __monty__: won't projA2 cause an exception if sum2 is InB2? |
2023-03-08 15:04:10 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2023-03-08 15:04:58 +0100 | <__monty__> | Ah, you're right. |
2023-03-08 15:07:50 +0100 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2023-03-08 15:08:54 +0100 | <__monty__> | Yeah, I don't have a better suggestion than abstracting the body. |
2023-03-08 15:11:04 +0100 | <AWizzArd> | monochrom: okay, I guess it's nothing trivial. But I got the idea, so thx! |
2023-03-08 15:11:38 +0100 | thegeekinside | (~thegeekin@189.141.115.134) |
2023-03-08 15:13:53 +0100 | gurkenglas | (~gurkengla@dynamic-046-114-178-105.46.114.pool.telefonica.de) |
2023-03-08 15:16:14 +0100 | <absence> | __monty__: abstracting the body? |
2023-03-08 15:19:17 +0100 | <__monty__> | absence: Yes, into a function, like you did before. |
2023-03-08 15:23:12 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 15:25:46 +0100 | <absence> | __monty__: ah right. i wish i could get around having that Tag type hard-wired to A2 and B2 though |
2023-03-08 15:26:45 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 255 seconds) |
2023-03-08 15:26:49 +0100 | cheater_ | cheater |
2023-03-08 15:31:39 +0100 | polyphem_ | (~rod@2a02:810d:840:8754:224e:f6ff:fe5e:bc17) (Ping timeout: 248 seconds) |
2023-03-08 15:35:32 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 15:38:19 +0100 | polyphem_ | (~rod@2a02:810d:840:8754:cd05:594e:46be:28d3) |
2023-03-08 15:39:04 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 268 seconds) |
2023-03-08 15:39:07 +0100 | cheater_ | cheater |
2023-03-08 15:44:00 +0100 | xiliuya | (~xiliuya@user/xiliuya) (Ping timeout: 268 seconds) |
2023-03-08 15:44:22 +0100 | xiliuya | (~xiliuya@user/xiliuya) |
2023-03-08 15:45:47 +0100 | ix | (~ix@213.205.192.69) (Ping timeout: 264 seconds) |
2023-03-08 15:47:58 +0100 | chexum_ | (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
2023-03-08 15:48:20 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2023-03-08 15:49:27 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2023-03-08 15:49:27 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2023-03-08 15:49:27 +0100 | wroathe | (~wroathe@user/wroathe) |
2023-03-08 15:51:30 +0100 | <jean-paul[m]> | is there a way to search haskell for type constraints that include some other type constraint |
2023-03-08 15:54:58 +0100 | talismanick | (~talismani@2601:200:c000:f7a0::5321) (Remote host closed the connection) |
2023-03-08 15:55:43 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
2023-03-08 15:56:01 +0100 | talismanick | (~talismani@2601:200:c000:f7a0::5321) |
2023-03-08 15:56:58 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:8685:41f8:504d:c8e6) (Quit: WeeChat 2.8) |
2023-03-08 15:59:39 +0100 | stef204 | (~stef204@user/stef204) |
2023-03-08 15:59:53 +0100 | <jean-paul[m]> | ahem, search hoogle is what I meant to say |
2023-03-08 16:01:31 +0100 | polyphem_ | (~rod@2a02:810d:840:8754:cd05:594e:46be:28d3) (Ping timeout: 248 seconds) |
2023-03-08 16:08:03 +0100 | mechap | (~mechap@user/mechap) (Ping timeout: 268 seconds) |
2023-03-08 16:08:23 +0100 | Ranhir | (~Ranhir@157.97.53.139) (Read error: Connection reset by peer) |
2023-03-08 16:09:45 +0100 | mechap | (~mechap@user/mechap) |
2023-03-08 16:10:21 +0100 | fnurglewitz | (uid263868@id-263868.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2023-03-08 16:18:15 +0100 | img_ | (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-03-08 16:18:40 +0100 | EvanR | (~EvanR@user/evanr) |
2023-03-08 16:18:47 +0100 | mei | (~mei@user/mei) (Ping timeout: 264 seconds) |
2023-03-08 16:19:59 +0100 | gmg | (~user@user/gehmehgeh) (Remote host closed the connection) |
2023-03-08 16:20:33 +0100 | <AWizzArd> | :t Proxy => Proxy :: forall {k} (t :: k). Proxy t Because {k} is inferred we can't use TypeApplications on it. By using the GADT syntax we could declare the signature for the data constructor like this: Proxy :: forall k (a :: k). Proxy a now we are able to let x = Proxy @Symbol "Hi" |
2023-03-08 16:20:35 +0100 | <lambdabot> | error: parse error on input ‘=>’ |
2023-03-08 16:20:40 +0100 | ix | (~ix@213.205.192.69) |
2023-03-08 16:20:42 +0100 | gmg | (~user@user/gehmehgeh) |
2023-03-08 16:21:07 +0100 | img | (~img@user/img) |
2023-03-08 16:21:27 +0100 | <AWizzArd> | But... how can we specify that Proxy should be poly-kinded *and* not let the compiler infer this? |
2023-03-08 16:23:06 +0100 | <AWizzArd> | data Proxy :: a -> Type where here GHC infers that a has the kind k. But is there a way (and would it even make sense) to try this: data Proxy :: forall k (a :: k). a -> Type where |
2023-03-08 16:23:50 +0100 | <geekosaur> | have you tried it? |
2023-03-08 16:23:55 +0100 | mei | (~mei@user/mei) |
2023-03-08 16:24:28 +0100 | polyphem_ | (~rod@2a02:810d:840:8754:262:cef:4a21:78fd) |
2023-03-08 16:24:59 +0100 | <AWizzArd> | geekosaur: yes. It gave me: Expected a type, but ‘a’ has kind ‘k’ ‘k’ is a rigid type variable bound by an explicit forall k (a :: k) |
2023-03-08 16:26:25 +0100 | <geekosaur> | interesting. it's certainly tried to do it (which is good, I recalled that being how you did it) but I don't know why it then rejects the result |
2023-03-08 16:27:26 +0100 | <AWizzArd> | I could get the data constructor to accept kind-application (the manual told me that this is possible, and in the end: kinds are also just types). |
2023-03-08 16:27:32 +0100 | Sgeo | (~Sgeo@user/sgeo) |
2023-03-08 16:27:51 +0100 | <AWizzArd> | But the type constructor... here I don't know how to tell it explicitly about the poly-kindedness, without inferred vars. |
2023-03-08 16:28:21 +0100 | <geekosaur> | sadly it's slightly lying there, it means specifically things of kind Type (formerly kind * but that's deprecated) |
2023-03-08 16:30:38 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds) |
2023-03-08 16:31:07 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2023-03-08 16:34:42 +0100 | gurkenglas | (~gurkengla@dynamic-046-114-178-105.46.114.pool.telefonica.de) (Ping timeout: 255 seconds) |
2023-03-08 16:35:40 +0100 | janus | (janus@anubis.0x90.dk) () |
2023-03-08 16:36:19 +0100 | <[Leary]> | % data Proxy k (a :: k) = Proxy |
2023-03-08 16:36:19 +0100 | <yahb2> | <no output> |
2023-03-08 16:36:23 +0100 | <[Leary]> | % :k Proxy |
2023-03-08 16:36:24 +0100 | <yahb2> | Proxy :: forall k -> k -> * |
2023-03-08 16:36:30 +0100 | <[Leary]> | AWizzArd: Like that? |
2023-03-08 16:36:45 +0100 | gurkenglas | (~gurkengla@dynamic-046-114-178-105.46.114.pool.telefonica.de) |
2023-03-08 16:37:59 +0100 | <AWizzArd> | [Leary]: it's similar. But here your Proxy really seems to have two phantom vars. |
2023-03-08 16:39:39 +0100 | <AWizzArd> | I am not even convinced that what I want makes sense. I guess that when we talk about the type constructor then all vars are poly-kinded. |
2023-03-08 16:40:11 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-03-08 16:40:14 +0100 | <AWizzArd> | If I don't want them to be poly-kinded I could as well say: data Proxy :: Bool -> Type where ... |
2023-03-08 16:41:15 +0100 | razetime | (~Thunderbi@117.193.2.191) |
2023-03-08 16:43:48 +0100 | <AWizzArd> | Perhaps declaring explicit kinds in the forall-section of a type constructor is simply meaningless. |
2023-03-08 16:44:40 +0100 | shriekingnoise | (~shrieking@186.137.175.87) |
2023-03-08 16:49:19 +0100 | dolio | (~dolio@130.44.134.54) (Read error: Connection reset by peer) |
2023-03-08 16:49:24 +0100 | codolio | (~dolio@130.44.134.54) |
2023-03-08 16:54:30 +0100 | Ranhir | (~Ranhir@157.97.53.139) |
2023-03-08 16:55:09 +0100 | pt | (~user@89.233.20.46) |
2023-03-08 16:59:53 +0100 | califax | (~califax@user/califx) (Ping timeout: 255 seconds) |
2023-03-08 17:00:03 +0100 | Orbstheorem | (~orbstheor@2001:470:69fc:105::a56) (Quit: You have been kicked for being idle) |
2023-03-08 17:02:57 +0100 | califax | (~califax@user/califx) |
2023-03-08 17:03:02 +0100 | gmg | (~user@user/gehmehgeh) (Remote host closed the connection) |
2023-03-08 17:04:25 +0100 | xiliuya | (~xiliuya@user/xiliuya) (Ping timeout: 260 seconds) |
2023-03-08 17:05:10 +0100 | gnalzo | (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
2023-03-08 17:05:33 +0100 | kenran | (~user@user/kenran) (Remote host closed the connection) |
2023-03-08 17:05:45 +0100 | gmg | (~user@user/gehmehgeh) |
2023-03-08 17:06:18 +0100 | xiliuya | (~xiliuya@user/xiliuya) |
2023-03-08 17:10:08 +0100 | vpan | (~0@212.117.1.172) (Quit: Leaving.) |
2023-03-08 17:11:36 +0100 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) |
2023-03-08 17:11:46 +0100 | <EvanR> | looking for an ill-advised trick which treats a mutable resource as pure in such a way that if an "old version" is incorrectly accessed it crashes instead of using the wrong version |
2023-03-08 17:13:51 +0100 | mbuf | (~Shakthi@49.207.178.186) (Quit: Leaving) |
2023-03-08 17:13:51 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 255 seconds) |
2023-03-08 17:15:29 +0100 | <EvanR> | I guess linear types would be the non ill-advised thing to check at some point |
2023-03-08 17:17:45 +0100 | <int-e> | Take diffarray and replace the code that copies the array by an error? |
2023-03-08 17:18:14 +0100 | <int-e> | (You *are* comfortable with unsafePerformIO, right?) |
2023-03-08 17:19:14 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
2023-03-08 17:20:34 +0100 | int-e | would be scared by the premise here... invalidating old versions of data and lazy evaluation sound like a disaster waiting to happen. |
2023-03-08 17:21:20 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2023-03-08 17:21:21 +0100 | <int-e> | Linear types may make this sane, because one thing they'll achieve is to sequence the accesses to your data, including reads. |
2023-03-08 17:22:05 +0100 | <EvanR> | as long as the disaster happens instead of shenanigans |
2023-03-08 17:22:12 +0100 | <int-e> | But you can get similar guarantees already from the ST monad. |
2023-03-08 17:22:37 +0100 | Guest13 | (~Guest13@250.79-105-213.static.virginmediabusiness.co.uk) |
2023-03-08 17:22:46 +0100 | <Guest13> | hi |
2023-03-08 17:22:51 +0100 | <int-e> | I know you said "pure", but... when you're trying to sequence operations (and you are, unless you really want those crashes), a monad sounds appropriate to me. |
2023-03-08 17:22:56 +0100 | <EvanR> | well, if you use a monad at all, it kind of defeats the purpose |
2023-03-08 17:23:48 +0100 | califax | (~califax@user/califx) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-03-08 17:24:00 +0100 | <geekosaur> | Guest13, hello |
2023-03-08 17:24:08 +0100 | califax | (~califax@user/califx) |
2023-03-08 17:24:13 +0100 | <EvanR> | I want to use an SQLite file which stays up to date with the program state. Which you can do by having everything in IO |
2023-03-08 17:24:27 +0100 | <Guest13> | i was speaking with a CS student yesterday and said comonad and he looked shocked, so i was just like "if youv got a list of lists and you can turn it into a list, thats a monad, and if you have a list and can turn it into a list of lists its a comonad" and then just continued on with what i was describing |
2023-03-08 17:24:42 +0100 | <Guest13> | i said it so fast and he obviously understood i just moved on |
2023-03-08 17:24:59 +0100 | <Guest13> | i think all this burito business is because we try and teach bind instead of join |
2023-03-08 17:25:00 +0100 | <EvanR> | but if I know I will only access the latest state it's possible to construed each database "version" as a pure value |
2023-03-08 17:25:42 +0100 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
2023-03-08 17:26:10 +0100 | <Guest13> | i understand why, because of the historical precedent in the use of the IO monad in the "real world" haskell view |
2023-03-08 17:26:23 +0100 | <geekosaur> | there's something to be said for that, but join is most easily understood for lists, not other monads |
2023-03-08 17:26:45 +0100 | <Guest13> | but its led to so much needless difficulty teaching haskell, i think it deserves consideration to adapt the approach |
2023-03-08 17:26:45 +0100 | xiliuya | (~xiliuya@user/xiliuya) (Quit: Lost terminal) |
2023-03-08 17:26:52 +0100 | <cstml[m]> | EvanR: have you looked or know about the ST monad? |
2023-03-08 17:27:10 +0100 | <Guest13> | geekosaur: either scare off a student, or teach them something basically trivial to understand |
2023-03-08 17:27:45 +0100 | <Guest13> | list is *a* monad. whats wrong with using it as the cannonical example? |
2023-03-08 17:29:18 +0100 | <Guest13> | even the suggestion that it might not be the correct approach, is confusing. we can discuss it, but these are more involved concepts than an introduction can allow for |
2023-03-08 17:29:35 +0100 | tusko | (~yeurt@user/tusko) (Ping timeout: 255 seconds) |
2023-03-08 17:29:40 +0100 | <Guest13> | it makes monads seem "difficult", they arent, and the issue holds back the language |
2023-03-08 17:30:06 +0100 | <Guest13> | they are applied in creative ways. you can do a lot with join. eg. implement bind |
2023-03-08 17:30:19 +0100 | <Guest13> | but that seems like lesson 2 |
2023-03-08 17:30:47 +0100 | <geekosaur> | the bigger problem is that word has gotten out already. we don't really have control over it any more |
2023-03-08 17:30:50 +0100 | <Guest13> | even eluding to "but secretly they are more complicated than that" i would discourage |
2023-03-08 17:31:13 +0100 | <EvanR> | when I learned monads the "canonical" example was the random number generator which was a subexample of State |
2023-03-08 17:31:16 +0100 | <Guest13> | geekosaur: sure, but like, as the teaching community, well, i thought id saay something anyway |
2023-03-08 17:31:48 +0100 | <EvanR> | it made sense but didn't help with other monads, so canonical isn't that great an objective I think |
2023-03-08 17:31:55 +0100 | <Guest13> | EvanR: exactly, indicative of the work done (moggi?) in sequential transducers using monads |
2023-03-08 17:31:56 +0100 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2023-03-08 17:32:11 +0100 | <Guest13> | lists are cannonical for other reasons |
2023-03-08 17:32:14 +0100 | tusko | (~yeurt@user/tusko) |
2023-03-08 17:33:04 +0100 | <Guest13> | (tail recursive datatype with null index) |
2023-03-08 17:33:39 +0100 | <Guest13> | trees have (Int,Int) structure directing index, the data required to retain on deconstruction to enable reconstruction |
2023-03-08 17:34:06 +0100 | <cstml[m]> | Guest13: I think teaching monads via Lists is a great idea - once you get the intuition from the trivial case you can build up knowledge on the other ones. |
2023-03-08 17:34:07 +0100 | <Guest13> | this is a different issue thought, to do with lenses, and generic approaches (the canonical thing) |
2023-03-08 17:34:45 +0100 | <EvanR> | the list monad seems unlike any other Monad in common use |
2023-03-08 17:34:55 +0100 | <Guest13> | cstml[m]: good! and yeah, after introducing bind after, can then do the state example |
2023-03-08 17:35:20 +0100 | <EvanR> | it's useful in itself but I'm not sure it illuminates "monadness" in general |
2023-03-08 17:35:24 +0100 | <EvanR> | which everyone is always after |
2023-03-08 17:35:27 +0100 | <Guest13> | EvanR: thats because it covers this huge case of flattenable containers |
2023-03-08 17:35:30 +0100 | <cstml[m]> | Guest13: Potentially Identity is even easier though? |
2023-03-08 17:35:48 +0100 | <Guest13> | EvanR: i think we hitthe crux here |
2023-03-08 17:36:04 +0100 | <Guest13> | what *does* a monad mean (to you) |
2023-03-08 17:36:21 +0100 | <EvanR> | the interface, including the laws |
2023-03-08 17:36:52 +0100 | <EvanR> | give me a good interface and I'm good. I don't even care if there's nothing on either sides of it xD |
2023-03-08 17:36:56 +0100 | <Guest13> | if your intuition is based on the sequential approach, or if its more to do with deep nested datatype structures |
2023-03-08 17:37:18 +0100 | <Guest13> | EvanR: we are talking about lesson 1 in haskell. |
2023-03-08 17:37:23 +0100 | <EvanR> | I never got any intuition generally, but it's interesting you present two options |
2023-03-08 17:37:25 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2023-03-08 17:37:34 +0100 | ph88 | (~ph88@ip5b426553.dynamic.kabel-deutschland.de) |
2023-03-08 17:37:37 +0100 | califax_ | (~califax@user/califx) |
2023-03-08 17:38:00 +0100 | <Guest13> | i basically had to discover join after using haskell for years, by chance! |
2023-03-08 17:38:03 +0100 | <EvanR> | lesson 1 back in the day for me was Here's Your Typeclass and Here's Your Laws And You'll like it |
2023-03-08 17:38:49 +0100 | <Guest13> | lesson 1 for me introduces tree traversals via a geti and seti instance |
2023-03-08 17:38:50 +0100 | <EvanR> | one of my majors was math so I didn't question this approach |
2023-03-08 17:39:14 +0100 | <Guest13> | and "functional pointers" based on tree zippers |
2023-03-08 17:39:15 +0100 | califax_ | califax |
2023-03-08 17:39:28 +0100 | <EvanR> | if I demanded a real application of everything I probably wouldn't be able to stay with math |
2023-03-08 17:39:49 +0100 | <Guest13> | because geti+seti give functor, foldable, traversable, alternative, applicative, monad and comonad for free |
2023-03-08 17:40:51 +0100 | <Guest13> | EvanR: right. my first question to the student when he didnt have haskell as his preferred language (choosing go instead), was "do you not like maths?" and he was like, "nah" |
2023-03-08 17:41:13 +0100 | <Guest13> | and then he started talking about how go was good because you can import from github |
2023-03-08 17:41:16 +0100 | <Guest13> | CS students |
2023-03-08 17:41:44 +0100 | qhong_ | (~qhong@rescomp-21-400677.stanford.edu) |
2023-03-08 17:41:46 +0100 | anatta_ | (~AdiIRC@h-155-4-132-216.na.cust.bahnhof.se) |
2023-03-08 17:42:22 +0100 | xstill_5 | (xstill@fimu/xstill) |
2023-03-08 17:42:33 +0100 | raoul9 | (~raoul@95.179.203.88) |
2023-03-08 17:42:36 +0100 | raoul | (~raoul@95.179.203.88) (Read error: Connection reset by peer) |
2023-03-08 17:42:36 +0100 | xstill_ | (xstill@fimu/xstill) (Read error: Connection reset by peer) |
2023-03-08 17:42:36 +0100 | raoul9 | raoul |
2023-03-08 17:42:37 +0100 | xstill_5 | xstill_ |
2023-03-08 17:42:45 +0100 | <Guest13> | so basically i start with set giving concatinate for the monad, and then with the tree deconstruction for seti+geti with the (Int,Int) structure directing index, for traversable |
2023-03-08 17:42:49 +0100 | aforemny | (~aforemny@static.248.158.34.188.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-03-08 17:42:55 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) |
2023-03-08 17:43:01 +0100 | razetime | (~Thunderbi@117.193.2.191) (Ping timeout: 268 seconds) |
2023-03-08 17:43:01 +0100 | pieguy128 | (~pieguy128@bras-base-mtrlpq5031w-grc-43-67-70-144-160.dsl.bell.ca) (Ping timeout: 268 seconds) |
2023-03-08 17:43:02 +0100 | tstat_ | (~tstat@user/tstat) (Ping timeout: 268 seconds) |
2023-03-08 17:43:10 +0100 | aforemny | (~aforemny@static.248.158.34.188.clients.your-server.de) |
2023-03-08 17:43:23 +0100 | razetime | (~Thunderbi@117.193.2.191) |
2023-03-08 17:43:38 +0100 | tstat | (~tstat@user/tstat) |
2023-03-08 17:43:40 +0100 | <Guest13> | then having done traversable and monad, and sequential deconstruction, can then construct a zipper to give an example of a comonad that is "a container where the values have beer replaced by a pointer over that container pointing to those values" |
2023-03-08 17:43:41 +0100 | pieguy128 | (~pieguy128@bras-base-mtrlpq5031w-grc-43-67-70-144-160.dsl.bell.ca) |
2023-03-08 17:44:15 +0100 | <Guest13> | i can rattle all this off in about 5 mins |
2023-03-08 17:44:42 +0100 | <Guest13> | sure its not a formal lesson plan, but how much more insight is gleaned from that compared to some tired discussion about burritos |
2023-03-08 17:44:53 +0100 | anatta | (~AdiIRC@h-155-4-132-216.NA.cust.bahnhof.se) (Ping timeout: 268 seconds) |
2023-03-08 17:44:54 +0100 | anatta_ | anatta |
2023-03-08 17:45:29 +0100 | qhong | (~qhong@rescomp-21-400677.stanford.edu) (Ping timeout: 268 seconds) |
2023-03-08 17:45:50 +0100 | <EvanR> | the only time I see burritos mentioned is how it's silly tbh |
2023-03-08 17:46:11 +0100 | <Guest13> | "what? pointers? like in C?" - "noo, pointers in C just have an Int for the position index. the concept of pointers in a functional language is way more powerful, eg. the (Int,Int) for how long the branch you deconstruct and how far up the side it was" |
2023-03-08 17:47:01 +0100 | <EvanR> | (Int,Int) has two ways to go out of bounds instead of one, twice as powerful xD |
2023-03-08 17:47:04 +0100 | CiaoSen | (~Jura@p200300c9570e91002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2023-03-08 17:47:20 +0100 | <Guest13> | EvanR: i saw stefanie weilch lecturing and a student asked about monads, and she was like "oh, its pretty complicated, there is like a simple way to understand them and its not complete and the more rigorous approach is more complicated than i have time for now" |
2023-03-08 17:47:40 +0100 | <Guest13> | instead of just like "a list is an example because you can flatten it" |
2023-03-08 17:48:12 +0100 | <Guest13> | EvanR: lol |
2023-03-08 17:48:34 +0100 | <Guest13> | its not a poistion index though, its a structure directing index |
2023-03-08 17:48:43 +0100 | <Guest13> | like how Int is a list of () |
2023-03-08 17:49:06 +0100 | <Guest13> | the up and down Ints cancel if you put them in a list |
2023-03-08 17:49:39 +0100 | <Guest13> | so the position index is basically [(Int,Int)], but thats wasteful navigation |
2023-03-08 17:49:49 +0100 | gmg | (~user@user/gehmehgeh) (Remote host closed the connection) |
2023-03-08 17:50:16 +0100 | <Guest13> | list having structure directing index of () |
2023-03-08 17:50:30 +0100 | <Guest13> | giving rise to the Int position index as [()], if that makes sense |
2023-03-08 17:50:31 +0100 | gmg | (~user@user/gehmehgeh) |
2023-03-08 17:51:31 +0100 | <Guest13> | so actually you can go out of bounds many times on your way to the indicated value! |
2023-03-08 17:53:23 +0100 | <Guest13> | i get jumbled up when i try to explain how because haskell at top level supports recursive implementations, that while it is difficult to express the *cyclic* canonical datatype, ... and then how trees as the acyclic version are basically *the* canonical datatype |
2023-03-08 17:53:44 +0100 | <ph88> | is it possible or how would i add a type annotation to this line so that the compiler can know the right type? https://bpa.st/PJXHS |
2023-03-08 17:53:46 +0100 | <Guest13> | and try not to start talking about bridges using the credit card transform |
2023-03-08 17:54:46 +0100 | <Guest13> | such that lists forming trees via the free monad means this (Int,Int) business is basically job done |
2023-03-08 17:55:17 +0100 | <Guest13> | one structure directing index to rule them all |
2023-03-08 17:55:30 +0100 | <Guest13> | ill explain that properly one day im sure |
2023-03-08 18:00:01 +0100 | <cstml[m]> | <ph88> "is it possible or how would i..." <- qualify your import or hide the one you don't want to use. |
2023-03-08 18:01:31 +0100 | Square | (~Square4@user/square) (Ping timeout: 248 seconds) |
2023-03-08 18:01:55 +0100 | <EvanR> | query :: Q w a -> Db w -> a, update :: U w -> Db w -> Db w, I wonder what the prospects for making this "persistent" (on disk) are |
2023-03-08 18:02:43 +0100 | <EvanR> | as it stands I guess it requires at least a temporal database |
2023-03-08 18:03:03 +0100 | <EvanR> | but if you just throw a linear arrow on the update maybe it can just be a regular database? |
2023-03-08 18:03:28 +0100 | ix | (~ix@213.205.192.69) (Ping timeout: 248 seconds) |
2023-03-08 18:04:50 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Remote host closed the connection) |
2023-03-08 18:05:31 +0100 | segfaultfizzbuzz | (~segfaultf@12.172.217.142) (Quit: segfaultfizzbuzz) |
2023-03-08 18:15:31 +0100 | mauke | (~mauke@user/mauke) |
2023-03-08 18:18:01 +0100 | lechner | (~lechner@debian/lechner) |
2023-03-08 18:18:07 +0100 | <EvanR> | it involves actual IO so the prospects look grim to non-existent |
2023-03-08 18:18:28 +0100 | <lechner> | Hi, is Cabal-syntax shipped as part of ghc, as part of Cabal, or totally separately, please? https://hackage.haskell.org/package/Cabal-syntax |
2023-03-08 18:19:01 +0100 | <sclv> | its a dependency of Cabal, so if you have Cabal the library installed, you will also have Cabal-syntax the library installed |
2023-03-08 18:19:08 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
2023-03-08 18:19:11 +0100 | <sclv> | so its a boot-lib for ghc |
2023-03-08 18:20:33 +0100 | <sclv> | but only as of 9.4, because that's when it was split out https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history |
2023-03-08 18:21:32 +0100 | <sclv> | note that Cabal the library reexports modules from Cabal-syntax the library, so you don't need to use or depend on Cabal-syntax directly unless you specifically want to _not_ depend on Cabal |
2023-03-08 18:22:16 +0100 | <lechner> | so in ghc 9.2.5 it was part of ghc? |
2023-03-08 18:22:31 +0100 | <sclv> | no, in 9.2.5 it was part of Cabal |
2023-03-08 18:23:01 +0100 | <sclv> | basically Cabal split out some modules that just addressed its syntax and structures into Cabal-syntax, which it depends on |
2023-03-08 18:23:17 +0100 | <sclv> | so the most uniform way to consume those modules is just to get them directly from Cabal |
2023-03-08 18:23:48 +0100 | <lechner> | i see a Distribution.Utils.Structured as missing (among many other errors) after Guix upgraded ghc to 9.2.5 and Cabal to 3.6.4. My initial suspicion is that our 'haskell-build-system' was not upgraded properly. Could anyone offer a clue as to what causes these unusual build errors? https://ci.guix.gnu.org/build/516127/log/raw |
2023-03-08 18:23:55 +0100 | polyphem_ | (~rod@2a02:810d:840:8754:262:cef:4a21:78fd) (Ping timeout: 252 seconds) |
2023-03-08 18:24:27 +0100 | <lechner> | i think they upgraded Ghc, but not Cabal or something like that. Setup is looking for Distribution.Utils.Structured |
2023-03-08 18:24:54 +0100 | polyphem_ | (~rod@2a02:810d:840:8754:224e:f6ff:fe5e:bc17) |
2023-03-08 18:25:07 +0100 | <lechner> | Warning: Distribution.Types.ForeignLibType: could not find link destinations for: |
2023-03-08 18:26:32 +0100 | razetime | (~Thunderbi@117.193.2.191) (Remote host closed the connection) |
2023-03-08 18:26:42 +0100 | <sclv> | those are just warnings, idk |
2023-03-08 18:26:52 +0100 | <lechner> | okay, thanks! |
2023-03-08 18:27:01 +0100 | <sclv> | my read of that log, which is huge, is that the error at the end is its a huge build and it just... timeso out |
2023-03-08 18:28:17 +0100 | <sclv> | and i think those warnings are not "linker" destinations, but literally "link" destinations for hyperlinks as its building haddocks |
2023-03-08 18:28:38 +0100 | <ph88> | EvanR, was that comment for me ? |
2023-03-08 18:29:03 +0100 | <EvanR> | haha no just a coincidence! |
2023-03-08 18:29:03 +0100 | MajorBiscuit | (~MajorBisc@145.94.156.212) (Quit: WeeChat 3.6) |
2023-03-08 18:29:22 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) () |
2023-03-08 18:30:16 +0100 | Guest13 | (~Guest13@250.79-105-213.static.virginmediabusiness.co.uk) (Quit: Connection closed) |
2023-03-08 18:31:08 +0100 | <ph88> | cstml[m], afaik it is not possible to qualify or alias functions on import |
2023-03-08 18:32:24 +0100 | <lechner> | sclv / okay, thanks! the timeout observation is consistent with ~2000 other failures |
2023-03-08 18:34:11 +0100 | <EvanR> | import qualified The.Good.Stuff as Original |
2023-03-08 18:34:23 +0100 | <EvanR> | todaysName = Original.originalName |
2023-03-08 18:35:18 +0100 | <EvanR> | import qualified The.Good.Stuff |
2023-03-08 18:35:25 +0100 | <EvanR> | todaysName = The.Good.Stuff.originalName |
2023-03-08 18:35:54 +0100 | <cstml[m]> | ph88: ph88: you qualify the module: https://paste.tomsmeding.com/69bigWn3 |
2023-03-08 18:36:06 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) |
2023-03-08 18:36:48 +0100 | chomwitt | (~chomwitt@2a02:587:7a18:6d00:1ac0:4dff:fedb:a3f1) |
2023-03-08 18:37:17 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
2023-03-08 18:38:38 +0100 | <ph88> | cstml[m], ye the module can be qualified .. but since the import was from the same module the conflict persists https://bpa.st/32NOQ i would like to solve the conflict by using type signatures if possible |
2023-03-08 18:41:38 +0100 | econo | (uid147250@user/econo) |
2023-03-08 18:42:32 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) |
2023-03-08 18:43:15 +0100 | <geekosaur> | ghc user guide suggests it can't be done |
2023-03-08 18:46:46 +0100 | <cstml[m]> | You can do it if you use that variable somewhere where ghc can see which of the two it is clearly. |
2023-03-08 18:48:06 +0100 | <cstml[m]> | Or potentially you could use a TypeApplication in the place where you use it to force it to be one of the types. |
2023-03-08 18:49:21 +0100 | <[Leary]> | ph88: https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/disambiguate_record_fields.html |
2023-03-08 18:52:43 +0100 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 248 seconds) |
2023-03-08 18:53:13 +0100 | chomwitt | (~chomwitt@2a02:587:7a18:6d00:1ac0:4dff:fedb:a3f1) (Ping timeout: 246 seconds) |
2023-03-08 18:54:53 +0100 | <cstml[m]> | ph88: I looked again (more carefully) and my suggestions are actually bogus (as you are already indicating the type when you bind) - my apologies [Leary]'s link is spot-on. |
2023-03-08 18:55:07 +0100 | waleee | (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) |
2023-03-08 18:55:37 +0100 | <gurkenglas> | On its face it looks like parametricity can only ever produce free theorems that are, in a sense, useless. Can you give an example that doesn't look like "it doesn't matter whether you rename the forall'd type's elements before or after"? |
2023-03-08 18:55:38 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-03-08 19:01:51 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 255 seconds) |
2023-03-08 19:02:18 +0100 | Everything | (~Everythin@37.115.210.57) (Quit: leaving) |
2023-03-08 19:04:02 +0100 | <ph88> | [Leary], thanks with that extension and a change in code i got it to work https://bpa.st/3FOMO maybe not the most pretty code but i'm happy with it |
2023-03-08 19:04:13 +0100 | <ph88> | cstml[m], thank you for trying to help ! |
2023-03-08 19:05:17 +0100 | <ph88> | by the way for the ones interested i found this related bug https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8686 |
2023-03-08 19:06:43 +0100 | pt` | (~user@89.233.20.46) |
2023-03-08 19:08:14 +0100 | pt | (~user@89.233.20.46) (Ping timeout: 246 seconds) |
2023-03-08 19:11:01 +0100 | <gurkenglas> | Is every value of type (forall a. a->a) one of 1. functionally equal to id 2. functionally equal to some expression of a different inferred type? |
2023-03-08 19:12:34 +0100 | <ncf> | forgetting about ⊥, every element of forall a. a → a is equal to id |
2023-03-08 19:12:46 +0100 | <dminuoso> | What does `equal` even mean? |
2023-03-08 19:13:08 +0100 | <dminuoso> | Since my chat log denotes that homotopy type theory entered the room, surely they can answer this! |
2023-03-08 19:13:10 +0100 | <EvanR> | functionally equal, in other words, effectively the same function, in other words, does the same thing |
2023-03-08 19:13:25 +0100 | <EvanR> | homotopy type theory would be overkill here xd |
2023-03-08 19:13:30 +0100 | <dminuoso> | EvanR: Oh that wasnt quite meant as a genuine question. :> |
2023-03-08 19:13:37 +0100 | <gurkenglas> | ncf: i was deliberately not forgetting about that |
2023-03-08 19:13:55 +0100 | <ncf> | you could probably come up with some notion of observational equality that works |
2023-03-08 19:14:39 +0100 | <dminuoso> | That brings an interesting question, are there more than one extensionally equivalent but intentionally different ways to write `id`? |
2023-03-08 19:15:05 +0100 | <dminuoso> | Things that come to mind is `id x = x` vs `id x = x `seq` x` |
2023-03-08 19:15:16 +0100 | kuribas | (~user@ptr-17d51enjoamlmzvg4fw.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 27.1)) |
2023-03-08 19:15:46 +0100 | <ncf> | gurkenglas: i guess there's also ⊥ and const ⊥ then. you may want to look at https://libres.uncg.edu/ir/asu/f/Johann_Patricia_2006_Impact%20of%20seq.pdf |
2023-03-08 19:15:55 +0100 | pt`` | (~user@89.233.20.46) |
2023-03-08 19:16:17 +0100 | <gurkenglas> | I'll be brave and try to define "functionally equal" as "you can substitute one expression for the other in any piece of Haskell code without changing anything", does that work already? |
2023-03-08 19:16:40 +0100 | <ncf> | that's how observational equality usually works |
2023-03-08 19:16:43 +0100 | <dminuoso> | What does "without changing any thing" even mean, though? |
2023-03-08 19:16:46 +0100 | <ncf> | you'd have to define- that |
2023-03-08 19:16:59 +0100 | <dminuoso> | This only makes sense if we have some semantics |
2023-03-08 19:17:02 +0100 | <dminuoso> | Say denotational semantics |
2023-03-08 19:17:09 +0100 | <dminuoso> | With some mathematical model |
2023-03-08 19:17:10 +0100 | <EvanR> | const bottom => let f = const in f bottom xD |
2023-03-08 19:17:24 +0100 | <EvanR> | it's totally different! |
2023-03-08 19:17:25 +0100 | <gurkenglas> | ncf: bottom and const bottom were why I have clause "2." |
2023-03-08 19:17:39 +0100 | <ncf> | i don't understand 2. |
2023-03-08 19:17:45 +0100 | pt`` | (~user@89.233.20.46) () |
2023-03-08 19:17:47 +0100 | pt` | (~user@89.233.20.46) (Ping timeout: 248 seconds) |
2023-03-08 19:17:57 +0100 | jespada | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2023-03-08 19:18:02 +0100 | <EvanR> | id => let f = id in f => snd (id,id) |
2023-03-08 19:18:26 +0100 | <gurkenglas> | ncf: "const bottom isn't (forall a. a->a), it's (forall a b. a->b)" |
2023-03-08 19:19:02 +0100 | <ncf> | i can be typed with both |
2023-03-08 19:19:04 +0100 | <ncf> | it* |
2023-03-08 19:19:27 +0100 | <gurkenglas> | ncf: and id can't, so it has a different infered type :D |
2023-03-08 19:20:13 +0100 | <gurkenglas> | EvanR: yes those two => lines count as substitutions you can do without changing anything |
2023-03-08 19:20:31 +0100 | <dminuoso> | % :t const undefined |
2023-03-08 19:20:31 +0100 | <yahb2> | const undefined :: b -> a |
2023-03-08 19:20:49 +0100 | <dminuoso> | That can be typed as `forall a. a -> a` just fine. |
2023-03-08 19:20:58 +0100 | <dminuoso> | % :t const undefined :: forall a. a -> a |
2023-03-08 19:20:58 +0100 | <yahb2> | const undefined :: forall a. a -> a :: a -> a |
2023-03-08 19:20:59 +0100 | <gurkenglas> | dminuoso: and id can't, so it has a different infered type :D |
2023-03-08 19:21:05 +0100 | <dminuoso> | gurkenglas: So? |
2023-03-08 19:21:20 +0100 | <dminuoso> | If its more general, that means you specialize it. |
2023-03-08 19:21:25 +0100 | <gurkenglas> | dminuoso: so it's addressed by my clause "2." |
2023-03-08 19:26:16 +0100 | <gurkenglas> | "id x = x `seq` x" <- yeah okay that does answer my original question in the negative, welp |
2023-03-08 19:27:11 +0100 | <EvanR> | x `seq` x = x |
2023-03-08 19:28:03 +0100 | <gurkenglas> | ah, the magic of seq is still deferred to when the result is inspected? fair enough. |
2023-03-08 19:28:30 +0100 | <geekosaur> | it means "x is evaluated when x is evaluated" |
2023-03-08 19:28:48 +0100 | <geekosaur> | which is kinda useless |
2023-03-08 19:28:59 +0100 | <gurkenglas> | the alternative would have been "when a thunk is generated that contains seq, the next thing that happens is, its first argument is poked" |
2023-03-08 19:29:33 +0100 | <EvanR> | when the program starts, all occurrences of seq anywhere are located and evaluated before main starts? xD |
2023-03-08 19:29:54 +0100 | <EvanR> | can o worms |
2023-03-08 19:30:26 +0100 | <gurkenglas> | that's megasec. teraseq does it when the program is compiled. |
2023-03-08 19:30:44 +0100 | <geekosaur> | how do you even do that if the evaluation depends on a runtime value? |
2023-03-08 19:31:01 +0100 | <EvanR> | two words |
2023-03-08 19:31:07 +0100 | <EvanR> | dependency injection! |
2023-03-08 19:31:25 +0100 | <ncf> | when you type `seq` in your text editor, it forces the LHS and expands it inline |
2023-03-08 19:31:39 +0100 | talismanick | (~talismani@2601:200:c000:f7a0::5321) (Ping timeout: 248 seconds) |
2023-03-08 19:31:57 +0100 | <gurkenglas> | when you open the docs to the seq page, it takes whatever code you were planning to write and executes it |
2023-03-08 19:32:14 +0100 | notzmv | (~zmv@user/notzmv) (Remote host closed the connection) |
2023-03-08 19:35:51 +0100 | <ncf> | "seq is the fourth Futamura projection", coming soon to a journal near you |
2023-03-08 19:36:55 +0100 | notzmv | (~zmv@user/notzmv) |
2023-03-08 19:37:34 +0100 | <gurkenglas> | it would have come soon, but now it is already come, since you said seq. |
2023-03-08 19:42:31 +0100 | <mauke> | dependently injected types |
2023-03-08 19:45:45 +0100 | <dminuoso> | Before I dive into the assembly myself, how much overhead is there in GHC compiled programs at startup? |
2023-03-08 19:45:56 +0100 | <dminuoso> | Is there meaningful costs during RTS startup? |
2023-03-08 19:49:06 +0100 | <geekosaur> | just look into hs_init |
2023-03-08 19:50:05 +0100 | mauke | (~mauke@user/mauke) (Quit: argh) |
2023-03-08 19:53:32 +0100 | <dminuoso> | Oh nice, that's some very good spine code |
2023-03-08 19:54:28 +0100 | <dminuoso> | Thanks geekosaur |
2023-03-08 19:57:47 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 248 seconds) |
2023-03-08 20:00:36 +0100 | jespada | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) |
2023-03-08 20:01:29 +0100 | learner-monad | (~ehanneken@cpe-174-105-47-100.columbus.res.rr.com) |
2023-03-08 20:02:12 +0100 | mauke | (~mauke@user/mauke) |
2023-03-08 20:02:29 +0100 | chomwitt | (~chomwitt@2a02:587:7a18:6d00:1ac0:4dff:fedb:a3f1) |
2023-03-08 20:02:34 +0100 | learner-monad | (~ehanneken@cpe-174-105-47-100.columbus.res.rr.com) (Client Quit) |
2023-03-08 20:03:14 +0100 | <monochrom> | gurkenglas: Leibniz was ahead of you in characterizing equality by drop-in replacement. |
2023-03-08 20:04:00 +0100 | <monochrom> | And yes it's really why functional programming looks much easier to reason about. |
2023-03-08 20:04:52 +0100 | <mauke> | non-fungible terms |
2023-03-08 20:05:15 +0100 | jespada | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Ping timeout: 248 seconds) |
2023-03-08 20:07:44 +0100 | <monochrom> | I naughtily call it "The Leibniz Substitutability Principle" because it stole from a cool name >:) |
2023-03-08 20:07:48 +0100 | vgtw_ | (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in) |
2023-03-08 20:08:58 +0100 | chomwitt | (~chomwitt@2a02:587:7a18:6d00:1ac0:4dff:fedb:a3f1) (Ping timeout: 252 seconds) |
2023-03-08 20:10:05 +0100 | Maeda | (~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving) |
2023-03-08 20:11:45 +0100 | Maeda | (~Maeda@91-161-10-149.subs.proxad.net) |
2023-03-08 20:12:19 +0100 | vgtw | (~vgtw@user/vgtw) |
2023-03-08 20:13:04 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Remote host closed the connection) |
2023-03-08 20:14:31 +0100 | <EvanR> | is that the principle by which newton can be substituted for leibniz as the inventor of calculus |
2023-03-08 20:15:30 +0100 | ddellacosta | (~ddellacos@146.70.166.10) (Quit: WeeChat 3.8) |
2023-03-08 20:17:36 +0100 | ddellacosta | (~ddellacos@146.70.166.10) |
2023-03-08 20:18:42 +0100 | <monochrom> | hahaha |
2023-03-08 20:19:43 +0100 | <monochrom> | I think they are not equal so you will have to wait until Liskov's version which requires only interface compatibility in context. >:) |
2023-03-08 20:20:55 +0100 | <mauke> | https://www.germanshop24.com/sweets/cookies-and-waffles/leibniz-choco-milk-chocolate-4.41-oz/ |
2023-03-08 20:21:46 +0100 | <monochrom> | out of stock :) |
2023-03-08 20:21:46 +0100 | ix | (~ix@213.205.192.69) |
2023-03-08 20:23:33 +0100 | <gurkenglas> | oh, my conjecture shrinks to: every expression of type (forall a.a->a) can be replaced, without changing anything, by either id or by some expression of a different type. |
2023-03-08 20:26:06 +0100 | <mauke> | every expression of type (forall a. a -> a) can be replaced by the word "scrumptious" |
2023-03-08 20:26:44 +0100 | <EvanR> | what is this some expression of a different type you speak of |
2023-03-08 20:27:18 +0100 | <mauke> | are we assuming that _|_ does not exist? |
2023-03-08 20:28:00 +0100 | <EvanR> | alright, id or bottom |
2023-03-08 20:29:45 +0100 | <mauke> | > "" ++ head [error "hmm", id] (read "\"\"") |
2023-03-08 20:29:47 +0100 | <lambdabot> | "*Exception: hmm |
2023-03-08 20:30:27 +0100 | <mauke> | :t head [error "hmm", id] |
2023-03-08 20:30:28 +0100 | <lambdabot> | a -> a |
2023-03-08 20:30:40 +0100 | npm_i_kurbus | (~npm_i_kur@user/kurbus) |
2023-03-08 20:30:49 +0100 | <EvanR> | now we can pick on gurkenglas's use of the phrase "can be replaced by" |
2023-03-08 20:31:06 +0100 | <gurkenglas> | EvanR: id or bottom or const bottom |
2023-03-08 20:31:34 +0100 | <mauke> | > "" ++ id (read "\"\"") |
2023-03-08 20:31:36 +0100 | <lambdabot> | "" |
2023-03-08 20:31:45 +0100 | <mauke> | > "" ++ undefined (read "\"\"") |
2023-03-08 20:31:46 +0100 | <lambdabot> | error: |
2023-03-08 20:31:46 +0100 | <lambdabot> | • Ambiguous type variable ‘t0’ arising from a use of ‘read’ |
2023-03-08 20:31:46 +0100 | <lambdabot> | prevents the constraint ‘(Read t0)’ from being solved. |
2023-03-08 20:31:49 +0100 | <mauke> | > "" ++ const undefined (read "\"\"") |
2023-03-08 20:31:51 +0100 | <lambdabot> | error: |
2023-03-08 20:31:51 +0100 | <lambdabot> | • Ambiguous type variable ‘b0’ arising from a use of ‘read’ |
2023-03-08 20:31:51 +0100 | <lambdabot> | prevents the constraint ‘(Read b0)’ from being solved. |
2023-03-08 20:31:59 +0100 | <mauke> | none of those match the original result |
2023-03-08 20:32:08 +0100 | <gurkenglas> | mauke: (head [error "hmm", id]) can be replaced by (error "hmm") |
2023-03-08 20:32:18 +0100 | <mauke> | > "" ++ error "hmm" (read "\"\"") |
2023-03-08 20:32:20 +0100 | <lambdabot> | error: |
2023-03-08 20:32:20 +0100 | <lambdabot> | • Ambiguous type variable ‘t0’ arising from a use of ‘read’ |
2023-03-08 20:32:20 +0100 | <lambdabot> | prevents the constraint ‘(Read t0)’ from being solved. |
2023-03-08 20:32:23 +0100 | <mauke> | no, it can't |
2023-03-08 20:32:45 +0100 | Cale | (~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com) (Ping timeout: 256 seconds) |
2023-03-08 20:33:08 +0100 | <gurkenglas> | mauke: why not? it has a more general type, which lets it be plugged in anywhere (head [error "hmm", id]) can be plugged in |
2023-03-08 20:33:51 +0100 | Cale | (~cale@cpe80d04ade0a03-cm80d04ade0a01.cpe.net.cable.rogers.com) |
2023-03-08 20:33:56 +0100 | <mauke> | uh. look at what lambdabot tells you? |
2023-03-08 20:33:56 +0100 | <EvanR> | because of the appearance of ambiguous types, in that example |
2023-03-08 20:34:18 +0100 | <Inst_> | question for irc: is getStdGen safe / reliable in System.Random? Or should I use initStdGen every time? |
2023-03-08 20:34:21 +0100 | <EvanR> | originally ghc knows what you're talking about, now it doesn't |
2023-03-08 20:34:24 +0100 | <Inst_> | because initStdGen imposes a 6x slowdown |
2023-03-08 20:34:25 +0100 | <gurkenglas> | oh noes |
2023-03-08 20:34:48 +0100 | <gurkenglas> | yeah okay that sends me back to the drawing board |
2023-03-08 20:34:54 +0100 | Lycurgus | (~juan@user/Lycurgus) |
2023-03-08 20:35:22 +0100 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2023-03-08 20:35:51 +0100 | <gurkenglas> | how about: every expression of form (_ :: forall a. a->a) lets you replace the _ part with either id or some expression of a different type, without changing anything. |
2023-03-08 20:36:19 +0100 | <EvanR> | how is that version different really |
2023-03-08 20:36:34 +0100 | npm_i_kurbus | (~npm_i_kur@user/kurbus) () |
2023-03-08 20:36:53 +0100 | <EvanR> | also when you replace id with bottom, how is that "not changing anything" xD |
2023-03-08 20:37:04 +0100 | <mauke> | now there is an explicit type signature |
2023-03-08 20:37:25 +0100 | <gurkenglas> | EvanR: replacing id with bottom changes something! |
2023-03-08 20:37:51 +0100 | <gurkenglas> | i mean "either you can replace it with id or you can replace it with some expression of a different type, without changing anything" |
2023-03-08 20:37:51 +0100 | <EvanR> | oh, that's the actual type sig. then how would you replace it with something of a different type |
2023-03-08 20:37:53 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) |
2023-03-08 20:38:09 +0100 | <mauke> | supertype |
2023-03-08 20:38:18 +0100 | vgtw | (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in) |
2023-03-08 20:38:36 +0100 | Lycurgus | (~juan@user/Lycurgus) (Client Quit) |
2023-03-08 20:40:21 +0100 | <EvanR> | > "" ++ (undefined :: forall a . a -> a) (read "\"\"") |
2023-03-08 20:40:22 +0100 | <lambdabot> | "*Exception: Prelude.undefined |
2023-03-08 20:40:27 +0100 | <EvanR> | whoa |
2023-03-08 20:42:16 +0100 | <EvanR> | ok it's still different |
2023-03-08 20:42:59 +0100 | vgtw | (~vgtw@user/vgtw) |
2023-03-08 20:43:07 +0100 | <gurkenglas> | (and by "different type" i mean "different than forall a. a->a") |
2023-03-08 20:43:50 +0100 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht) |
2023-03-08 20:44:15 +0100 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2023-03-08 20:44:24 +0100 | <ncf> | \ a -> undefined `seq` a |
2023-03-08 20:44:32 +0100 | <EvanR> | well the _ part is the undefined |
2023-03-08 20:45:12 +0100 | <gurkenglas> | ncf: that can be replaced by const undefined without changing anything, yes? |
2023-03-08 20:46:21 +0100 | <ncf> | i guess |
2023-03-08 20:46:42 +0100 | <ncf> | so really you're trying to characterise the expressions involving bottom as being those that can have more general types than the one under consideration |
2023-03-08 20:46:58 +0100 | <gurkenglas> | yep |
2023-03-08 20:47:45 +0100 | a_coll | (~acoll@45.92.120.189) |
2023-03-08 20:48:38 +0100 | <EvanR> | I got one |
2023-03-08 20:48:46 +0100 | <gurkenglas> | and even without bottom, this technique would let me say that forall a. a->a->a is "empty" |
2023-03-08 20:48:51 +0100 | <EvanR> | \x -> error "specific bottom" `seq` x |
2023-03-08 20:48:59 +0100 | <gurkenglas> | EvanR: hehehehe |
2023-03-08 20:49:09 +0100 | <gurkenglas> | can be replaced by const (error "specific bottom") |
2023-03-08 20:49:38 +0100 | vgtw | (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in) |
2023-03-08 20:50:19 +0100 | <EvanR> | er |
2023-03-08 20:50:31 +0100 | <EvanR> | \x -> x `seq` error "specific bottom" |
2023-03-08 20:51:05 +0100 | <gurkenglas> | :t \x -> x `seq` error "specific bottom" |
2023-03-08 20:51:06 +0100 | <lambdabot> | a -> b |
2023-03-08 20:51:29 +0100 | <EvanR> | :t \x -> x `seq` error "specific bottom" :: forall a . a -> a |
2023-03-08 20:51:30 +0100 | <lambdabot> | p -> a -> a |
2023-03-08 20:51:38 +0100 | <EvanR> | :t (\x -> x `seq` error "specific bottom") :: forall a . a -> a |
2023-03-08 20:51:39 +0100 | <lambdabot> | a -> a |
2023-03-08 20:51:53 +0100 | <gurkenglas> | EvanR: can be replaced by *checks notes* \x -> x `seq` error "specific bottom" |
2023-03-08 20:53:01 +0100 | <EvanR> | k that is "so/ame expression" of a different type |
2023-03-08 20:53:15 +0100 | notzmv | (~zmv@user/notzmv) (Ping timeout: 248 seconds) |
2023-03-08 20:53:25 +0100 | <EvanR> | I can't tell if this is totally wrong or totally trivial yet xD |
2023-03-08 20:55:52 +0100 | <ncf> | without a carefully defined semantics, neither |
2023-03-08 20:56:24 +0100 | <ncf> | what do you mean forall a. a → a → a is empty? |
2023-03-08 20:57:01 +0100 | <gurkenglas> | ncf: every expression of form (_ :: forall a. a -> a -> a) lets you replace the _ by an expression of a different type than forall a. a -> a -> a without changing anything |
2023-03-08 20:57:46 +0100 | schnirz | (~martin@host86-134-138-119.range86-134.btcentralplus.com) |
2023-03-08 20:58:39 +0100 | <EvanR> | so a -> a -> a is unnecessarily specific |
2023-03-08 20:59:29 +0100 | <gurkenglas> | EvanR: while [forall a. a->a->a] isn't :D |
2023-03-08 21:00:33 +0100 | <gurkenglas> | [Void] is, though. |
2023-03-08 21:03:36 +0100 | <ncf> | so by "empty" you mean that all its inhabitants can be given more general types? seems a bit like saying that the union of two sets is empty because each element is a member of a different set |
2023-03-08 21:05:37 +0100 | schnirz | (~martin@host86-134-138-119.range86-134.btcentralplus.com) (Ping timeout: 276 seconds) |
2023-03-08 21:07:04 +0100 | <gurkenglas> | ncf: i say "empty" because it is to the usual notion of empty as "forall a.a->a has one inhabitant" is to the forall a.a->a version |
2023-03-08 21:07:18 +0100 | <gurkenglas> | feel free to call it "brings no new inhabitants to the table" |
2023-03-08 21:07:34 +0100 | <EvanR> | in some metaphysics types aren't absolute but arise from applying type systems to programs, which exist already |
2023-03-08 21:09:02 +0100 | <gurkenglas> | is any type more general than itself? |
2023-03-08 21:09:20 +0100 | vgtw | (~vgtw@user/vgtw) |
2023-03-08 21:09:22 +0100 | <EvanR> | type classes makes that weird in haskell. Another view is that first comes types which spell out explicitly what you can write as programs and no other programs exist. Polymorphic types makes this weird in haskell? |
2023-03-08 21:09:39 +0100 | <EvanR> | also bottoms |
2023-03-08 21:10:24 +0100 | <Jade[m]1> | gurkenglas: wouldn't that make that type infinitely general |
2023-03-08 21:12:29 +0100 | <gurkenglas> | Jade[m]1: there are already infinite chains of ever more specialized types, it doesn't mean that the start of the chain has to be more general than *everything* |
2023-03-08 21:12:32 +0100 | fnurglewitz | (uid263868@id-263868.lymington.irccloud.com) |
2023-03-08 21:13:37 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) |
2023-03-08 21:13:44 +0100 | <Jade[m]1> | but if a type is more general than itself it, it would imply that it is also more general than more general etc. |
2023-03-08 21:13:51 +0100 | <Jade[m]1> | if that makes any sense |
2023-03-08 21:14:03 +0100 | <Jade[m]1> | basically n = n + 1 but as a type |
2023-03-08 21:14:20 +0100 | <gurkenglas> | Jade[m]1: yeah, you could repeat this, and would keep going in a cycle. couldn't necessarily get anywhere else in particular |
2023-03-08 21:15:35 +0100 | <EvanR> | a type that is more general than itself? |
2023-03-08 21:16:43 +0100 | caryhartline | (~caryhartl@2603-8080-6a0e-8d88-a1ba-6507-fbe0-b7b7.res6.spectrum.com) |
2023-03-08 21:18:02 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) (Ping timeout: 252 seconds) |
2023-03-08 21:19:33 +0100 | pavonia | (~user@user/siracusa) |
2023-03-08 21:19:56 +0100 | <gurkenglas> | yeah. take universally quantified type variables, replace them with types of your choice, and keep going until you end up where you started |
2023-03-08 21:20:48 +0100 | schnirz | (~martin@host86-134-138-119.range86-134.btcentralplus.com) |
2023-03-08 21:22:30 +0100 | <gurkenglas> | (note that you're allowed to go the other way whenever you're on the left side of (->)) |
2023-03-08 21:23:53 +0100 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection) |
2023-03-08 21:24:07 +0100 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
2023-03-08 21:24:20 +0100 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2023-03-08 21:25:04 +0100 | caryhartline | (~caryhartl@2603-8080-6a0e-8d88-a1ba-6507-fbe0-b7b7.res6.spectrum.com) (Ping timeout: 248 seconds) |
2023-03-08 21:25:06 +0100 | <gurkenglas> | I may need to allow you to apply coerce on the way, so you can make use of newtypes? |
2023-03-08 21:27:33 +0100 | talismanick | (~talismani@168.150.96.238) |
2023-03-08 21:31:16 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
2023-03-08 21:31:35 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
2023-03-08 21:32:52 +0100 | irrgit_ | (~irrgit@146.70.27.250) |
2023-03-08 21:40:29 +0100 | tomboy64 | (~tomboy64@user/tomboy64) (Ping timeout: 246 seconds) |
2023-03-08 21:44:27 +0100 | schnirz | (~martin@host86-134-138-119.range86-134.btcentralplus.com) (Ping timeout: 248 seconds) |
2023-03-08 21:49:23 +0100 | euandreh | (~Thunderbi@189.6.18.7) (Remote host closed the connection) |
2023-03-08 21:53:43 +0100 | talismanick | (~talismani@168.150.96.238) (Ping timeout: 276 seconds) |
2023-03-08 21:53:57 +0100 | malte | (~malte@mal.tc) |
2023-03-08 21:54:06 +0100 | tomboy64 | (~tomboy64@user/tomboy64) |
2023-03-08 21:56:23 +0100 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection) |
2023-03-08 21:56:58 +0100 | ft | (~ft@p3e9bc443.dip0.t-ipconnect.de) |
2023-03-08 21:57:13 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2023-03-08 21:59:13 +0100 | <Unicorn_Princess> | remind me - it's best practice to put all the ~library types i define for a project into a Types module, right? e.g. if I wanted to define a Date {year month day} type, i'd put it into src/Types/Datetime.hs module? |
2023-03-08 21:59:38 +0100 | stackdroid18 | (14094@de1.hashbang.sh) (Quit: Lost terminal) |
2023-03-08 21:59:50 +0100 | <Unicorn_Princess> | iirc one tends to run into annoying circular dependencies trying to stick functions and types into the same module |
2023-03-08 22:00:45 +0100 | Fischmiep | (~Fischmiep@user/Fischmiep) |
2023-03-08 22:00:48 +0100 | <Unicorn_Princess> | when inevitably one makes functions that operate on types of distinct modules |
2023-03-08 22:01:35 +0100 | <dminuoso> | "best practice" fsvo of "best practice" |
2023-03-08 22:01:51 +0100 | <dminuoso> | Unicorn_Princess: You can also use boot modules to break circular dependencies |
2023-03-08 22:01:59 +0100 | <Unicorn_Princess> | fsvo? |
2023-03-08 22:02:13 +0100 | <geekosaur> | "for some value of" |
2023-03-08 22:02:19 +0100 | <dminuoso> | Well, its debatable whether thats good practice in the first place |
2023-03-08 22:02:26 +0100 | <EvanR> | well you only get circular issues when there are actual circular dependencies |
2023-03-08 22:02:30 +0100 | <dminuoso> | It's a pretty poor coping technique |
2023-03-08 22:02:38 +0100 | <dminuoso> | Not something I would consider good. |
2023-03-08 22:02:54 +0100 | <EvanR> | if it's a self contained module the support functions can go in the same module as the type for example |
2023-03-08 22:03:17 +0100 | <EvanR> | if it uses a second module and there is no circular issue, they can go in the same module |
2023-03-08 22:03:19 +0100 | <monochrom> | I don't see it as best practice, I see it as a way to avoid mutually recursive modules. |
2023-03-08 22:03:24 +0100 | cheater_ | (~Username@user/cheater) |
2023-03-08 22:04:11 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 248 seconds) |
2023-03-08 22:04:19 +0100 | cheater_ | cheater |
2023-03-08 22:04:29 +0100 | <EvanR> | "always put types in their own module" might not even work |
2023-03-08 22:04:43 +0100 | <Unicorn_Princess> | hm. in that case i guess first of all, if i do run into mutual recursion of modules, i should probably resolve it with Datetime.Types, instead of Types.Datetime. but you're right, i probably won't run into recursion in this case, so i can skip that splitting... |
2023-03-08 22:04:47 +0100 | <monochrom> | So for example the SML and OCaml people don't do that, precisely because mutually recursive modules are just fine there, because they are not afraid of writing module signature files, which in Haskell-land is called "hs-boot" which somehow Haskellers fear and I don't understand why. |
2023-03-08 22:04:52 +0100 | <EvanR> | and kind of sounds like that ill advised scheme where every type is named T and every class is named C and module names are used to discriminate xD |
2023-03-08 22:06:06 +0100 | <geekosaur> | EvanR, I think putting all types in one module is not quite the same thing? |
2023-03-08 22:06:07 +0100 | <monochrom> | Yeah it came from that. |
2023-03-08 22:06:20 +0100 | ix | (~ix@213.205.192.69) (Ping timeout: 268 seconds) |
2023-03-08 22:06:26 +0100 | <monochrom> | That guy came from SML/OCaml alright. |
2023-03-08 22:06:32 +0100 | lyle | (~lyle@104.246.145.237) (Quit: WeeChat 3.8) |
2023-03-08 22:06:45 +0100 | ix | (~ix@213.205.192.69) |
2023-03-08 22:07:05 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-03-08 22:07:11 +0100 | mrcsno | (~mrcsno@user/mrcsno) (Quit: WeeChat 3.5) |
2023-03-08 22:07:22 +0100 | <EvanR> | all types in one module would work, or all types and all functions in one module, i.e. don't use modules xD |
2023-03-08 22:07:53 +0100 | <EvanR> | text editor will help navigate the million line file |
2023-03-08 22:07:59 +0100 | <geekosaur> | xmonad has all types in one module, but it's pretty small to begin with |
2023-03-08 22:08:18 +0100 | <monochrom> | But even then many SML/OCaml people give better names to types. Foo.foo is more common than Foo.t |
2023-03-08 22:08:58 +0100 | <monochrom> | Yeah "ctags", "etags", "ftags", "gtags"... exist for a reason >:) |
2023-03-08 22:10:19 +0100 | <dminuoso> | Unicorn_Princess: I think a better approach is to just use hs-boot modules. |
2023-03-08 22:10:39 +0100 | <dminuoso> | They are mildly annoying mostly because it adds some boilerplate that feels so unnecessary |
2023-03-08 22:10:52 +0100 | <dminuoso> | (And it would be great if GHC could do what boot modules do out of the box, magically) |
2023-03-08 22:11:07 +0100 | phma | (~phma@host-67-44-208-170.hnremote.net) (Read error: Connection reset by peer) |
2023-03-08 22:11:12 +0100 | <dminuoso> | But they let you structure code way better and expressively |
2023-03-08 22:11:44 +0100 | <EvanR> | speaking of things that might not even work... my attempt to put phantom type tags on IntMap to keep different classes of Ints straight https://paste.tomsmeding.com/WJccNUR3 |
2023-03-08 22:12:08 +0100 | <EvanR> | also speaking of boilerplate |
2023-03-08 22:12:30 +0100 | ix | (~ix@213.205.192.69) (Ping timeout: 268 seconds) |
2023-03-08 22:12:43 +0100 | <Unicorn_Princess> | i think i can avoid recursive modules, as i'll go with that first, thanks all :) |
2023-03-08 22:12:49 +0100 | ix | (~ix@213.205.192.69) |
2023-03-08 22:13:00 +0100 | <dminuoso> | I think recursive modules are not indicative of a problem, really. |
2023-03-08 22:13:12 +0100 | phma | (phma@2001:5b0:215d:c698:2a3:1662:71f8:9a54) |
2023-03-08 22:13:34 +0100 | <EvanR> | if they're really unnecessary it could be misorganization |
2023-03-08 22:13:36 +0100 | <dminuoso> | In fact, there's nothing in the Haskell standard that forbids them |
2023-03-08 22:13:43 +0100 | <dminuoso> | its just GHC that somehow doesnt automagically alow it. |
2023-03-08 22:14:29 +0100 | <EvanR> | but if monochrom says "How I learned to stop worrying and love hs-boot files" then maybe it's good |
2023-03-08 22:14:32 +0100 | <geekosaur> | in fact the standard specifically permits them but notes that compilers may need help implementing them, iirc |
2023-03-08 22:14:54 +0100 | <monochrom> | I don't think humanity knows how to do it automagically at all. All languages that support mutual module dependency requires handwritten signature files. In C it's called "header files". |
2023-03-08 22:15:22 +0100 | <dminuoso> | monochrom: to be fair, in C its not called header files, its called header guard discipline. |
2023-03-08 22:15:26 +0100 | <monochrom> | Well, either that or being untyped altogether. (Javascript is doing fine) |
2023-03-08 22:15:33 +0100 | <dminuoso> | So its not a language feature, its a discipline. |
2023-03-08 22:15:38 +0100 | <int-e> | you could give up separate compilation instead |
2023-03-08 22:16:01 +0100 | <EvanR> | it's not clear to me why C headers can be generated from the source file |
2023-03-08 22:16:05 +0100 | <EvanR> | can't* |
2023-03-08 22:16:15 +0100 | <EvanR> | at least in basic usage |
2023-03-08 22:16:25 +0100 | <int-e> | though, hmm, doesn't this also go for hs-boot files |
2023-03-08 22:16:27 +0100 | <monochrom> | Or yeah, whole-program compilation. Or no compilation at all. (Javascript is doing fine) |
2023-03-08 22:16:37 +0100 | <geekosaur> | section 5.7 |
2023-03-08 22:17:35 +0100 | <int-e> | I mean that, in principle, and possibly in the absence of TemplateHaskell, you could infer them from the .hs file? |
2023-03-08 22:18:01 +0100 | <monochrom> | I think the user guide example doesn't use TH. |
2023-03-08 22:18:26 +0100 | <monochrom> | and shows an example of needing human guidance. |
2023-03-08 22:18:52 +0100 | talismanick | (~talismani@168.150.96.238) |
2023-03-08 22:19:00 +0100 | <geekosaur> | you could import {-# SOURCE #-} every module as needed to resolve mutual recursion though, and upgrade it to a full import as needed |
2023-03-08 22:21:05 +0100 | codaraxis | (~codaraxis@user/codaraxis) |
2023-03-08 22:21:48 +0100 | <monochrom> | There is also a cultural divide between the SML people and the Haskell people. |
2023-03-08 22:22:02 +0100 | <int-e> | Circular modules with TH are easily inconsistent. |
2023-03-08 22:22:07 +0100 | <monochrom> | Both agree that handwriting types for top-level values are a good idea. |
2023-03-08 22:22:27 +0100 | <monochrom> | But the SML people write them in the module sig file, not the module impl file. |
2023-03-08 22:23:14 +0100 | <int-e> | I found this annoying when working on an ocaml project. |
2023-03-08 22:23:31 +0100 | <monochrom> | The Haskell people have been writing them in the module impl file, so when you tell them to write again in hs-boot, that feels like boilerplate and extra maintenance. |
2023-03-08 22:23:47 +0100 | <monochrom> | Well the SML people still writes them only once so no boilerplate! |
2023-03-08 22:24:28 +0100 | <int-e> | The fact that they're in two separate locations is mental overhead to me. |
2023-03-08 22:24:49 +0100 | int-e | shrugs |
2023-03-08 22:25:12 +0100 | <int-e> | Not contradicting you, I obviously agree that there are two camps :P |
2023-03-08 22:26:15 +0100 | <dminuoso> | int-e: Heh with TemplateHaskell so many things become subtly complicated. |
2023-03-08 22:26:22 +0100 | <dminuoso> | The sheer number of linkage problems and bugs comes to mind. |
2023-03-08 22:26:46 +0100 | vgtw | (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in) |
2023-03-08 22:27:14 +0100 | <monochrom> | mauke relates this great pic about fundamental cultural divides :) https://i.imgur.com/tILWA1z.png |
2023-03-08 22:27:24 +0100 | <monochrom> | err s/relates/related/ |
2023-03-08 22:27:51 +0100 | <int-e> | okay that's funny |
2023-03-08 22:28:32 +0100 | <monochrom> | Last time I was talking about "don't translate between Haskell and Python, don't translate between chopsticks and forks". |
2023-03-08 22:29:07 +0100 | npmania | (~Thunderbi@91.193.7.59) |
2023-03-08 22:29:13 +0100 | irrgit__ | (~irrgit@176.113.74.138) |
2023-03-08 22:29:42 +0100 | <Unicorn_Princess> | seeing how happy that fork is just cheers me up |
2023-03-08 22:29:49 +0100 | <monochrom> | I love that pic very much, it challenges so many prejudices at so many levels in one go. |
2023-03-08 22:30:42 +0100 | <int-e> | all four can be used for stabbing |
2023-03-08 22:31:02 +0100 | <int-e> | not so different after all? scnr |
2023-03-08 22:32:21 +0100 | <monochrom> | haha |
2023-03-08 22:32:43 +0100 | irrgit_ | (~irrgit@146.70.27.250) (Ping timeout: 276 seconds) |
2023-03-08 22:33:28 +0100 | talismanick | (~talismani@168.150.96.238) (Ping timeout: 268 seconds) |
2023-03-08 22:34:06 +0100 | <Unicorn_Princess> | they kinda are both the fork tho |
2023-03-08 22:34:13 +0100 | pwntips | (~user@24-113-98-114.wavecable.com) |
2023-03-08 22:34:15 +0100 | <Unicorn_Princess> | they cannot act as spoon nor knife |
2023-03-08 22:34:21 +0100 | <Unicorn_Princess> | only fork |
2023-03-08 22:38:23 +0100 | vgtw | (~vgtw@user/vgtw) |
2023-03-08 22:39:20 +0100 | <int-e> | But it's poor etiquette to use the chopsticks that way. |
2023-03-08 22:40:28 +0100 | <darkling> | Carry, not impale. |
2023-03-08 22:41:07 +0100 | <int-e> | Oh right, fork have that use too. |
2023-03-08 22:41:53 +0100 | int-e | is looking at this through a s t a b-by lens. |
2023-03-08 22:42:08 +0100 | <darkling> | There's also wrapping noodles around it, Italian style -- probably not so easy with chopsticks. :) |
2023-03-08 22:42:36 +0100 | <Unicorn_Princess> | noodles are tricky even with a fork :S |
2023-03-08 22:42:38 +0100 | <dminuoso> | I recall some lambabot quote about `Getting a s t a b` |
2023-03-08 22:42:41 +0100 | <dminuoso> | type Getting r s a = (a -> Const r a) -> s -> Const r s |
2023-03-08 22:42:47 +0100 | <dminuoso> | Was that with an earlier version of Getting? |
2023-03-08 22:43:00 +0100 | <geekosaur> | I've eaten lo mein that way |
2023-03-08 22:55:41 +0100 | mmhat | (~mmh@p200300f1c71b21bfee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.8) |
2023-03-08 22:58:05 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2023-03-08 23:01:56 +0100 | yahb2 | (~yahb2@static.56.27.47.78.clients.your-server.de) (Remote host closed the connection) |
2023-03-08 23:02:07 +0100 | ell | (~ellie@user/ellie) (Quit: Ping timeout (120 seconds)) |
2023-03-08 23:02:08 +0100 | yahb2 | (~yahb2@2a01:4f8:c0c:5c7b::2) |
2023-03-08 23:02:29 +0100 | ell | (~ellie@user/ellie) |
2023-03-08 23:02:41 +0100 | vgtw | (~vgtw@user/vgtw) (Quit: ZNC - https://znc.in) |
2023-03-08 23:02:54 +0100 | notzmv | (~zmv@user/notzmv) |
2023-03-08 23:03:16 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 276 seconds) |
2023-03-08 23:03:49 +0100 | azimut_ | (~azimut@gateway/tor-sasl/azimut) |
2023-03-08 23:05:44 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
2023-03-08 23:08:32 +0100 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2023-03-08 23:11:28 +0100 | seriously_guest | (~seriously@80-115-77-151.cable.dynamic.v4.ziggo.nl) |
2023-03-08 23:12:59 +0100 | <ph88> | did anyone here try this package ? https://github.com/NorfairKing/sydtest |
2023-03-08 23:13:39 +0100 | gnalzo | (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
2023-03-08 23:14:29 +0100 | seriously_guest | (~seriously@80-115-77-151.cable.dynamic.v4.ziggo.nl) (Client Quit) |
2023-03-08 23:20:27 +0100 | michalz | (~michalz@185.246.204.105) (Remote host closed the connection) |
2023-03-08 23:20:37 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:182e:ca34:e210:1559) |
2023-03-08 23:21:11 +0100 | trev | (~trev@user/trev) (Remote host closed the connection) |
2023-03-08 23:24:55 +0100 | <int-e> | dminuoso: I got curious enough to check: Getting used to be type Getting r a b c d = (c -> Accessor r d) -> a -> Accessor r b up to version 1.7 of lens |
2023-03-08 23:25:19 +0100 | <int-e> | where `Accessor` is isomorphic to `Const`. |
2023-03-08 23:33:47 +0100 | a_coll | (~acoll@45.92.120.189) (Remote host closed the connection) |
2023-03-08 23:41:03 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2023-03-08 23:45:08 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2023-03-08 23:45:08 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2023-03-08 23:45:08 +0100 | wroathe | (~wroathe@user/wroathe) |
2023-03-08 23:45:25 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
2023-03-08 23:46:43 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2023-03-08 23:47:01 +0100 | shriekingnoise | (~shrieking@186.137.175.87) (Quit: Quit) |
2023-03-08 23:47:10 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2023-03-08 23:56:06 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |