Logs on 2021-03-21 (freenode/#haskell)
| 00:00:26 | <monochrom> | It's full of fun. When discussing free will: "My brain makes me say that I believe in free will. What choice do I have?" |
| 00:02:43 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving) |
| 00:03:15 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 00:03:18 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: Textual IRC Client: www.textualapp.com) |
| 00:03:35 | <ski> | hehe :) |
| 00:03:53 | × | dunj3 quits (~dunj3@2001:16b8:3058:3200:341d:cba6:b01f:d85d) (Quit: Leaving) |
| 00:05:00 | → | matryoshka` joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 00:05:04 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
| 00:06:48 | × | codygman` quits (~user@47.186.207.161) (Remote host closed the connection) |
| 00:07:30 | → | codygman` joins (~user@47.186.207.161) |
| 00:07:59 | × | mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew) |
| 00:08:16 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:08:34 | <__minoru__shirae> | maybe it's like an infinite list ...a,b,a,b... |
| 00:09:01 | <__minoru__shirae> | where a translates to "I made my brain to ..." |
| 00:09:08 | → | perrier-jouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 00:09:14 | <__minoru__shirae> | and b translates to "my brain made me ..." |
| 00:09:26 | × | perrier-jouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Client Quit) |
| 00:10:10 | <__minoru__shirae> | so you have something like "I made my brain to make me say that I believe in free will" |
| 00:11:17 | <__minoru__shirae> | and if you go deeper you have "my brain made make my brain to make me say ..." |
| 00:11:38 | ski | . o O ( "Zhuangzi, butterfly and referential transparency" by Maria Kovalyova,Roman Cheplyaka in 2010-05-15 at <https://ro-che.info/ccc/9> ) |
| 00:11:46 | <monochrom> | Yeah, that. :) |
| 00:12:22 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 00:12:46 | ski | . o O ( <https://en.wikipedia.org/wiki/Rectification_of_names> ) |
| 00:12:55 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 00:16:34 | → | chenshen joins (~chenshen@2620:10d:c090:400::5:d9c5) |
| 00:16:54 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 246 seconds) |
| 00:17:44 | × | chenshen quits (~chenshen@2620:10d:c090:400::5:d9c5) (Client Quit) |
| 00:18:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:19:25 | <slack1256> | https://ro-che.info/ccc/21 haha |
| 00:22:59 | <monochrom> | heh |
| 00:25:12 | → | cabpa joins (~cabpa@180.190.168.108) |
| 00:25:34 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 00:25:53 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) |
| 00:26:05 | <__minoru__shirae> | ski: how is "rectification of names" related to the subject of infinite lists of propositions? |
| 00:26:26 | × | aarvar quits (~foewfoiew@2601:602:a080:fa0:114e:cbb2:413:961f) (Ping timeout: 264 seconds) |
| 00:27:57 | <ski> | only very indirectly |
| 00:28:11 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) (Remote host closed the connection) |
| 00:28:33 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 00:29:56 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 00:32:18 | → | conal joins (~conal@64.71.133.70) |
| 00:33:47 | → | niHiggim joins (~niHiggim@99-140-243-194.lightspeed.rlghnc.sbcglobal.net) |
| 00:34:45 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds) |
| 00:36:09 | × | niHiggim quits (~niHiggim@99-140-243-194.lightspeed.rlghnc.sbcglobal.net) (Remote host closed the connection) |
| 00:36:51 | × | cyberlard quits (~cyberlard@unaffiliated/jludwig) (Ping timeout: 246 seconds) |
| 00:37:26 | → | cyberlard joins (~cyberlard@unaffiliated/jludwig) |
| 00:38:07 | × | acidjnk_new quits (~acidjnk@p200300d0c72b959874ac6c8157d63e67.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 00:40:26 | → | aarvar joins (~foewfoiew@2601:602:a080:fa0:75fb:cea1:4d26:9157) |
| 00:43:00 | <__minoru__shirae> | ski: what is this indirect relation? idk, sounds like it has nothing to do with the subject of free will or infinite lists. |
| 00:45:17 | → | W3BV1P3R joins (~W3BV1P3R@c-73-5-91-226.hsd1.tn.comcast.net) |
| 00:48:23 | × | twk- quits (~thewormki@unaffiliated/twk-) (Ping timeout: 272 seconds) |
| 00:48:38 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
| 00:52:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 00:54:17 | × | W3BV1P3R quits (~W3BV1P3R@c-73-5-91-226.hsd1.tn.comcast.net) (Quit: Igloo IRC: https://iglooirc.com) |
| 00:54:51 | <ski> | __minoru__shirae : being related to chinese culture. also being (slightly) related to earlier topics of length of identifiers, and of clearing up terminological and conceptual confusion |
| 00:54:57 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 00:57:15 | × | ezrakilty quits (~ezrakilty@97-113-58-224.tukw.qwest.net) (Remote host closed the connection) |
| 00:59:44 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 01:01:00 | × | dhil quits (~dhil@80.208.56.181) (Ping timeout: 246 seconds) |
| 01:01:22 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:01:26 | → | twk- joins (~thewormki@unaffiliated/twk-) |
| 01:03:13 | × | elliott_ quits (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 260 seconds) |
| 01:09:20 | <hololeap> | i'm thinking about an API written in haskell, which would be the backend for a collaborative to-do list, accessed through a browser. when an item is in the process of being edited, access to the item should be restricted to that person. |
| 01:09:56 | <hololeap> | my question is: would STM be suitable for locking items in the backend or would i need to use a more traditional locking system |
| 01:10:14 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 01:10:41 | × | forgottenone quits (~forgotten@176.42.24.127) (Quit: Konversation terminated!) |
| 01:12:08 | <__minoru__shirae> | hololeap: how would you detect getting in and out of an editing process? |
| 01:12:34 | × | cartwright quits (~chatting@gateway/tor-sasl/cantstanya) (Quit: WeeChat 2.5) |
| 01:12:47 | <__minoru__shirae> | if you decide to add a button called "start editing", then you could just store the status in a db |
| 01:13:40 | <__minoru__shirae> | and reject later attempts to edit that item based on that value extracted from db |
| 01:14:37 | → | cantstanya joins (~chatting@gateway/tor-sasl/cantstanya) |
| 01:14:38 | <__minoru__shirae> | that would mean that you delegated the task of managing concurrency to the db |
| 01:14:56 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 01:15:08 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 01:15:10 | <bbhoss> | ski: sorry I stepped away, thanks for clarifying. I am coming from Elixir/Erlang so that's the sort of thing I am used to. With elixir there is the pin operator ^ that allows you to specify you want matching instead of shadowing. But it seems like in Haskell's case, it will just shadow and there is no pin operator, so it's probably best to use a guard? |
| 01:16:12 | <ski> | yes |
| 01:16:31 | <hololeap> | __minoru__shirae: it would probably be triggered by clicking on an item, but i see now that i need to flesh out all the details |
| 01:16:46 | <ski> | (technically, you could also use a view pattern .. but it would be a bit ugly .. `(x ==) -> True') |
| 01:16:47 | × | nf quits (~n@monade.li) (Remote host closed the connection) |
| 01:16:56 | → | nf joins (~n@monade.li) |
| 01:17:17 | → | LogicUpgrade joins (57e3c46d@87.227.196.109) |
| 01:17:25 | <hololeap> | because if someone started editing but didn't make changes or cancelled, then it would make sense to give the priority to someone who simultaneously made changes and saved them |
| 01:17:27 | × | maerwald quits (~maerwald@mail.hasufell.de) (Ping timeout: 246 seconds) |
| 01:18:21 | → | LittleFox94 joins (~littlefox@rondra.lf-net.org) |
| 01:18:32 | → | maerwald joins (~maerwald@mail.hasufell.de) |
| 01:18:34 | × | Benett quits (~Benett@unaffiliated/benett) (Quit: ) |
| 01:18:38 | × | LittleFox quits (~littlefox@rondra.lf-net.org) (Ping timeout: 264 seconds) |
| 01:18:49 | → | Benett joins (~Benett@unaffiliated/benett) |
| 01:18:52 | × | lisq quits (~quassel@lis.moe) (Quit: No Ping reply in 180 seconds.) |
| 01:19:09 | → | xelxebar_ joins (~xelxebar@gateway/tor-sasl/xelxebar) |
| 01:19:26 | × | Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 268 seconds) |
| 01:19:26 | × | xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 268 seconds) |
| 01:20:07 | <__minoru__shirae> | that's optimistic locking |
| 01:20:09 | → | Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer) |
| 01:20:11 | → | lisq joins (~quassel@lis.moe) |
| 01:20:40 | → | cabpa_ joins (~cabpa@180.190.165.139) |
| 01:20:57 | × | cabpa quits (~cabpa@180.190.168.108) (Ping timeout: 246 seconds) |
| 01:21:09 | <__minoru__shirae> | the one that you described in the original question is pessimistic |
| 01:24:31 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 01:24:31 | → | zerok joins (~user@115-186-141-88.nayatel.pk) |
| 01:24:38 | × | Wuzzy quits (~Wuzzy@p57a2ecf2.dip0.t-ipconnect.de) (Quit: Wuzzy) |
| 01:27:43 | × | z0k quits (~user@115.186.141.88) (Ping timeout: 260 seconds) |
| 01:30:06 | <__minoru__shirae> | if you have a db to delegate dealing with concurrency, then you can do everything in IO |
| 01:31:39 | <__minoru__shirae> | but if you don't have a db, in other words, you are implementing the db functionality in your backend, then you can ask about whether STM is a good fit or not |
| 01:33:55 | <LogicUpgrade> | Hi, I'm curious if mutation is an upcoming feature of haskell because most languages have it and it doesn't |
| 01:34:19 | <dolio> | Haskell already has mutation. |
| 01:35:22 | <ski> | it's in a library |
| 01:35:54 | <pjb> | controled by monoids in the category of endofunctors. |
| 01:36:05 | ski | smiles |
| 01:37:25 | → | rajivr joins (uid269651@gateway/web/irccloud.com/x-tunnvuktqcelikkp) |
| 01:38:26 | <LogicUpgrade> | Actually how does the entire sequence look when you 1) read initial state 2) transform it 3) use io monad to direct some side effect 4) now you need to read some NEW state |
| 01:38:34 | <LogicUpgrade> | Endless streams? |
| 01:39:00 | <LogicUpgrade> | This is in effect like a CQRS model |
| 01:39:03 | <LogicUpgrade> | A bit |
| 01:39:11 | <ski> | (3) seems possibly unrelated to the other parts |
| 01:40:14 | <ski> | (1) read initial state - pass an initial parameter; (2) transform it - apply a function to it; (4) read some new state - pass in the new state as the parameter |
| 01:43:25 | × | MarcelineVQ quits (~anja@198.254.208.159) (Remote host closed the connection) |
| 01:43:42 | <LogicUpgrade> | ski, the trick is when the new state was affected by your own side-effects |
| 01:43:59 | <monochrom> | "4)" equals "1)" if after "3)" you just recurse. |
| 01:44:01 | <ski> | thread the state through your computation |
| 01:44:16 | <LogicUpgrade> | 1) read directory 2) product a new file in it 3) read it again |
| 01:44:21 | <LogicUpgrade> | produce* |
| 01:44:40 | <ski> | "read directory" involves communicating with the external world, not just dealing with an internal state |
| 01:44:50 | <ski> | so that would be `IO', then, (3) |
| 01:45:00 | <monochrom> | System.Directory has functions for reading directories. |
| 01:45:23 | <LogicUpgrade> | Should I have said "emit command to get directory and magically get it on a global stream somewhere" |
| 01:45:41 | → | MarcelineVQ joins (~anja@198.254.208.159) |
| 01:45:42 | <ski> | how does the magic work ? |
| 01:46:31 | <LogicUpgrade> | Mostly things like constructing objects/functions that go nowhere but have a side-effect, and endless streams, or recursion which doesn't recurse:P stuff like that |
| 01:46:43 | × | zerok quits (~user@115-186-141-88.nayatel.pk) (Ping timeout: 245 seconds) |
| 01:47:12 | <ski> | @quote -fmagic |
| 01:47:12 | <lambdabot> | mrd says: interesting things happen when you enable -fmagic! |
| 01:47:21 | × | renzhi quits (~renzhi@modemcable070.17-177-173.mc.videotron.ca) (Ping timeout: 264 seconds) |
| 01:47:28 | <bbhoss> | I'm a haskell n00b but generally I like to push IO to the very edge of the program |
| 01:47:43 | × | ntjns_ quits (~jones@167.88.120.129) (Quit: leaving) |
| 01:47:53 | <ski> | that's generally good advice, in many languages |
| 01:47:55 | <bbhoss> | so have some function to get the updates to be made from the outside world them feed them into the pure system |
| 01:48:08 | × | m0rphism quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 240 seconds) |
| 01:48:16 | <ski> | LogicUpgrade : i'm not following |
| 01:48:26 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 01:48:41 | → | elliott_ joins (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) |
| 01:48:41 | <LogicUpgrade> | ski, nah in some languages it's OK to put it right in the center of the program |
| 01:48:51 | → | zerok joins (~user@101.50.108.120) |
| 01:48:54 | → | forgottenone joins (~forgotten@176.42.24.127) |
| 01:49:14 | → | perrier-jouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 01:49:47 | × | Beetstra1 quits (~Beetstra@185.204.1.185) (Remote host closed the connection) |
| 01:49:53 | <ski> | "many" doesn't contradict "some" |
| 01:50:25 | <dolio> | A language allowing it doesn't make it a good idea. |
| 01:50:26 | <LogicUpgrade> | ski yeah |
| 01:51:25 | <monochrom> | Control inversion proves the equivalence between putting it at the centre and putting it at the edge. |
| 01:51:47 | <LogicUpgrade> | dolio, it's complicated. We have movements like Data Oriented Programming, where interacting with the de-facto hardware form and function is the recommended technique |
| 01:52:01 | <bbhoss> | hah yeah I was just thinking all the different possibilities someone could mean by "edge" |
| 01:52:01 | <MarcelineVQ> | yet style inversion means always living on the edge |
| 01:52:13 | <monochrom> | :) |
| 01:52:45 | <__minoru__shirae> | so edgy |
| 01:52:55 | <__minoru__shirae> | just kidding |
| 01:52:56 | <ski> | yes, bbhoss |
| 01:53:20 | <monochrom> | Your favourite stream model is passe. |
| 01:53:35 | <monochrom> | 20 years ago Haskell did use a stream model for I/O. |
| 01:53:42 | ski | enters a dialogue |
| 01:54:11 | <ski> | (longer ago, actually) |
| 01:55:10 | <monochrom> | And in the early days of switching over to a monad model, people still imagine the monad to be a "state of the world" monad. A state model would be equivalent to a stream model by a final algebra. |
| 01:55:51 | <monochrom> | Both have been long abandoned because in the face of concurrent programming, and one day even distributed computing, they are completely broken. |
| 01:56:16 | <dolio> | Is that actually true? hbc didn't use the fake state implementation. |
| 01:56:17 | <sim590> | Everytime I come back to my haskell code base after a while, I find myself with these dependencies that can't be resolved for base which advanced on my system and I get errors like: "Could not find module ‘Prelude’ |
| 01:56:18 | <sim590> | There are files missing in the ‘base-4.14.1.0’ package" |
| 01:56:51 | <monochrom> | I was referring to what people told each other, not what compilers did. |
| 01:56:54 | <sim590> | My project was configured for base >=4.12 && <4.13 |
| 01:57:04 | <sim590> | And now I can't compile on 4.14... |
| 01:57:05 | <dolio> | And prior to monads, there was the list thing, and continuation wrappers, which are pretty close to monads. |
| 01:57:35 | <dolio> | I'm asking if they actually told each other that, since it was completely different than what they had all been doing up to that point. |
| 01:58:14 | <dolio> | They already had ready made explanations that weren't the 'state of the world' thing that doesn't really make sense. |
| 01:58:29 | <monochrom> | "Tackling The Awkward Squad" began with the world-state monad story. |
| 01:58:33 | <MarcelineVQ> | sim590: archlinux? |
| 01:58:36 | <__minoru__shirae> | how does concurrency break the "state of the world" or a "stream" model? |
| 01:58:37 | <sim590> | MarcelineVQ: Yeah |
| 01:59:12 | <MarcelineVQ> | that error typically comes from having pacman installed haskell libs since they have dynamicly linked libs and static is typically expected for haskell projects, easiest to rid yourself of them and install things via ghcup or stack |
| 02:00:01 | <sim590> | My project uses cabal. Shouldn't simply cabal new-build get the dependencies? |
| 02:00:03 | <MarcelineVQ> | could try installing ghc-static first but I'd still reccomend ghcup |
| 02:00:51 | <__minoru__shirae> | because from the inside of a thread you can talk about state of the world, or a stream, no? |
| 02:01:09 | <sim590> | So it's because I did install the "ghc" package? |
| 02:01:37 | <MarcelineVQ> | It might not be up to cabal at that point. and probably yes |
| 02:02:03 | <monochrom> | And https://wiki.haskell.org/IO_inside#Running_with_the_RealWorld still hasn't been deleted. |
| 02:02:12 | <hololeap> | __minoru__shirae: i would assume that it breaks when two or more entities try to update the "state of the world" where there is a conflict and one state has to be chosen, or the two are merged monoidally |
| 02:02:54 | <sim590> | MarcelineVQ: is cabal-install also a problem? It does depend on ghc-libs |
| 02:03:10 | <MarcelineVQ> | possibly, ghcup can install that for you too though |
| 02:03:11 | <__minoru__shirae> | hololeap: one could interpret it as world rejecting their update |
| 02:03:16 | <dolio> | Takling the Awkward Squad was 5 years after monads in Haskell, apparently. |
| 02:03:19 | <MarcelineVQ> | many worlds theory doesn't extend to PL? truly the ivory tower is too tall |
| 02:03:42 | <sim590> | MarcelineVQ: OK. Would it be bad to install ghcup through pacman? Or is it even not possible? |
| 02:04:02 | <__minoru__shirae> | or their update "failiing" or something like that. you already have a notion of failure in state-of-the-world or stream model |
| 02:04:12 | <MarcelineVQ> | sim590: that's fine, but it's on the AUR |
| 02:04:26 | <sim590> | MarcelineVQ: ghcup-hs-bin ? |
| 02:04:49 | <MarcelineVQ> | sim590: should be |
| 02:04:54 | → | conal joins (~conal@64.71.133.70) |
| 02:05:07 | <sim590> | Alright. I'll remove everything and try to use ghcup. |
| 02:05:15 | <hololeap> | __minoru__shirae: ok, but the problem arises when you have to choose which update succeeds and which updates fail. what is the most fair way of dealing with this? |
| 02:05:20 | → | Tario joins (~Tario@201.192.165.173) |
| 02:05:50 | <MarcelineVQ> | hololeap: raft concensus :> |
| 02:05:57 | → | botro joins (~botro@178.239.168.171) |
| 02:07:20 | <__minoru__shirae> | hololeap: all I'm saying is I don't see how concurrency breaks those models, because in those models you can interpret concurrency stuff with no problem, seems to me. |
| 02:07:28 | ski | . o O ( concurrent races, timers ) |
| 02:08:19 | <dolio> | You don't need concurrency for the state of the world to make no sense. |
| 02:08:40 | <dolio> | It can't really make sense of `forever (putStrLn "Hi.")` |
| 02:09:44 | <dolio> | There is no reason for that to be semantically different than `forever (pure ())`, unless functions have side effects. |
| 02:09:52 | <__minoru__shirae> | async exceptions are problematic though |
| 02:10:34 | <monochrom> | Right, we don't need forkIO concurrency to break it. But allow me to be revisionist >:) and refer to meta-level concurrency, i.e., if the sequential computer is interacting with me, you have two threads right there: the computer, and me. |
| 02:12:38 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 02:12:47 | <__minoru__shirae> | what if one says "let GHC implementers worry about that" |
| 02:13:11 | <hololeap> | __minoru__shirae: it certainly seems like a fixable problem. i'm not an expert on any of this stuff. |
| 02:13:36 | ski | . o O ( if an unknown thread running in a process dies, does it makes a difference ? ) |
| 02:14:23 | <monochrom> | Again, I am talking about models, not compilers. |
| 02:14:27 | <__minoru__shirae> | and one could say "you see, people who implemented GHC solved those problems for us, they had different model in mind while implementing it." |
| 02:15:02 | <__minoru__shirae> | "and thanks to them now we can reason about our programs using a state of the world model or a stream model" |
| 02:15:27 | <monochrom> | Models are what we tell each other for the purpose of predicting that our programs do what we want and explaining programs. |
| 02:17:40 | <__minoru__shirae> | there is a word "abstraction leak" |
| 02:18:44 | <hololeap> | pinning things down for any given problem, so that there is a specific model for composoition, seems like a good step in the direction of "best model" |
| 02:19:32 | <__minoru__shirae> | people create high level abstractions, and create low-level implementations of those abstractions |
| 02:19:39 | <hololeap> | but i agree that there are different, valid, and competing models for most problems |
| 02:20:29 | <__minoru__shirae> | and if you expose too much of your low-level abstractions, it means that you created an abstraction leak |
| 02:21:11 | <hololeap> | or it means that your abstraction isn't 100% waterproof to corner cases |
| 02:22:32 | <hololeap> | abstractions that have no corner cases are considered "beautiful" for a reason |
| 02:25:33 | <__minoru__shirae> | you can say that a model became obsolete or outdated when you have a better fitting model |
| 02:26:04 | → | Wuzzy joins (~Wuzzy@p57a2ecf2.dip0.t-ipconnect.de) |
| 02:26:31 | → | average joins (uid473595@gateway/web/irccloud.com/x-mlbuggytwdwptlyu) |
| 02:26:47 | <__minoru__shirae> | is there a model that works better than "state of the world" and "stream" models? |
| 02:27:17 | × | xff0x_ quits (~xff0x@2001:1a81:527b:4200:5766:67eb:a550:2a8c) (Ping timeout: 244 seconds) |
| 02:28:09 | × | conal quits (~conal@64.71.133.70) (Ping timeout: 246 seconds) |
| 02:28:15 | <hololeap> | as far as "things that are outside the state of the program and we can't predict", that seems like the best model to me. but you also have to take on the responsibility of understanding and managing that state within the context of your program |
| 02:28:32 | <__minoru__shirae> | a model of many threads interacting with each other? |
| 02:29:07 | <dolio> | There was a better model before the state of the world model. |
| 02:29:29 | → | xff0x_ joins (~xff0x@2001:1a81:52b5:3300:bd27:5212:7f1:6207) |
| 02:29:34 | <hololeap> | if all those threads are within the scope of your program, you can't expect anything outside of your program to handle it for you |
| 02:29:41 | → | conal joins (~conal@209.58.130.230) |
| 02:30:41 | <__minoru__shirae> | when you write a multi-threaded program, you change perspective many times |
| 02:30:58 | <__minoru__shirae> | you write code from the perspective of this thread |
| 02:31:20 | <__minoru__shirae> | and then from the perspective of that thread |
| 02:32:36 | <__minoru__shirae> | looks like you have a meta-model that allows you to choose a model when writing code |
| 02:33:10 | × | chewb quits (~chewb@abii185.neoplus.adsl.tpnet.pl) (Read error: Connection reset by peer) |
| 02:33:36 | <__minoru__shirae> | dolio: what was that? a stream model? |
| 02:34:30 | <dolio> | I'm not exactly sure what the stream model is. But you can explain IO as a sort of dialogue with an opaque runtime system via continuations. |
| 02:34:41 | <hololeap> | right, the essense of abstraction is separating the scope of one thing from another thing, but they also need to compose. when you hit the barrier of IO, it presents some difficult choices, because that is the limit of your scope. maybe there is a model of IO that reduces the number of choices thus simplifying the problem. |
| 02:34:52 | <dolio> | Which I believe is how hbc actually implemented things. |
| 02:35:56 | × | LogicUpgrade quits (57e3c46d@87.227.196.109) (Quit: Connection closed) |
| 02:36:23 | <dolio> | That probably extends naturally to concurrency, too, because the way that is often modeled is just that multiple continuations are being processed simultaneously. |
| 02:36:25 | <ski> | preflex: xseen augustss |
| 02:37:01 | <dolio> | The sort of preemptive stuff that GHC does might be hard to explain, though. |
| 02:37:58 | → | chenshen joins (~chenshen@2620:10d:c090:400::5:2b70) |
| 02:39:02 | ski | . o O ( <https://existentialtype.wordpress.com/2016/07/11/pclsring-in-semantics/>,<http://fare.tunes.org/tmp/emergent/pclsr.htm> ) |
| 02:42:41 | → | liyang joins (~liyang@90.253.54.54) |
| 02:44:31 | <koz_> | What's the argument to give to GHC if you want it to dump the results after all TH stuff has finished? |
| 02:45:44 | <glguy> | -ddump-splices |
| 02:49:01 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:49:17 | × | Sheilong quits (uid293653@gateway/web/irccloud.com/x-vnorxjroamajdrqk) () |
| 02:53:27 | × | chenshen quits (~chenshen@2620:10d:c090:400::5:2b70) (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 02:56:04 | → | chenshen joins (~chenshen@2620:10d:c090:400::5:2b70) |
| 03:01:56 | <sim590> | MarcelineVQ: can ghcup install ghc-pkg? HIE needs ghc-pkg, but I don't have it after installing cabal and ghc through ghcup. |
| 03:02:20 | <glguy> | ghc-pkg comes with installing GHC |
| 03:02:48 | <sim590> | Ah sry. I forgot that I had to symlink ghc-pkg-8.6 to ghc |
| 03:02:51 | <sim590> | I mean |
| 03:02:52 | → | FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) |
| 03:02:52 | finn_elija | is now known as Guest46465 |
| 03:02:52 | FinnElija | is now known as finn_elija |
| 03:02:53 | <sim590> | ghc-pkg |
| 03:03:07 | <glguy> | ghcup handles the symlinking of different versions to ghc, ghc-pkg, etc |
| 03:03:42 | <sim590> | Well, it didn't create a symlink for "ghc-pkg". All I have is ghc-pkg-8.6 and ghc-pkg-8.6.5. |
| 03:03:57 | <sim590> | Because I did `ghcup install ghc 8.6.5` |
| 03:04:01 | <glguy> | sim590, OK, then you have ot tell it to |
| 03:04:10 | <sim590> | How do you mean? |
| 03:04:12 | × | conal quits (~conal@209.58.130.230) (Quit: Computer has gone to sleep.) |
| 03:04:40 | <glguy> | sim590, like: ghcup set ghc 8.6 |
| 03:04:45 | <glguy> | sim590, easiest is "ghcup tui" |
| 03:04:48 | <sim590> | Oh |
| 03:04:51 | <glguy> | and then press 's' on the thing you want to default |
| 03:05:10 | <sim590> | Oh OK. I see how it works. |
| 03:05:12 | <sim590> | Thanks! |
| 03:06:44 | × | Guest46465 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 268 seconds) |
| 03:07:08 | → | drbean joins (~drbean@TC210-63-209-96.static.apol.com.tw) |
| 03:11:19 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 03:12:06 | × | perrier-jouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.1) |
| 03:14:57 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 264 seconds) |
| 03:17:03 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds) |
| 03:18:42 | × | matryoshka` quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 265 seconds) |
| 03:18:54 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 03:21:21 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 246 seconds) |
| 03:22:54 | × | elusive quits (~Jeanne-Ka@static-198-54-134-157.cust.tzulo.com) (Quit: Leaving) |
| 03:23:06 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 03:25:05 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 03:25:26 | → | codygman__ joins (~user@47.186.207.161) |
| 03:26:17 | → | Tario joins (~Tario@200.119.186.19) |
| 03:27:07 | → | gitgoood joins (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) |
| 03:29:34 | × | gitgood quits (~gitgood@80-44-9-221.dynamic.dsl.as9105.com) (Ping timeout: 256 seconds) |
| 03:30:28 | × | Tario quits (~Tario@200.119.186.19) (Read error: Connection reset by peer) |
| 03:30:40 | → | Tario joins (~Tario@201.192.165.173) |
| 03:32:18 | × | Wuzzy quits (~Wuzzy@p57a2ecf2.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 03:46:18 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 03:48:47 | × | theDon quits (~td@muedsl-82-207-238-252.citykom.de) (Ping timeout: 256 seconds) |
| 03:48:51 | × | roconnor quits (~roconnor@host-45-58-230-226.dyn.295.ca) (Remote host closed the connection) |
| 03:49:18 | → | roconnor joins (~roconnor@host-45-58-230-226.dyn.295.ca) |
| 03:50:31 | → | theDon joins (~td@muedsl-82-207-238-103.citykom.de) |
| 03:50:32 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds) |
| 03:52:23 | × | alx741 quits (~alx741@181.196.69.79) (Quit: alx741) |
| 03:55:30 | <slack1256> | I am crying. |
| 03:55:40 | <slack1256> | Lsp is running on emacs for the first time ;_; |
| 03:56:01 | <slack1256> | It's like christmas and new year all in a single day. |
| 03:57:23 | hackage | atlassian-connect-descriptor 0.4.11.0 - Code that helps you create a valid Atlassian Connect Descriptor. https://hackage.haskell.org/package/atlassian-connect-descriptor-0.4.11.0 (RobertMassaioli) |
| 04:03:13 | → | santiweight joins (622165e4@c-98-33-101-228.hsd1.ca.comcast.net) |
| 04:09:19 | → | bitmagie joins (~Thunderbi@200116b806be8f00f031bd0980c89ee9.dip.versatel-1u1.de) |
| 04:10:39 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 04:10:44 | → | frozenErebus joins (~frozenEre@94.129.70.18) |
| 04:10:59 | → | codygman__ joins (~user@47.186.207.161) |
| 04:13:23 | hackage | atlassian-connect-descriptor 0.4.12.0 - Code that helps you create a valid Atlassian Connect Descriptor. https://hackage.haskell.org/package/atlassian-connect-descriptor-0.4.12.0 (RobertMassaioli) |
| 04:14:56 | × | frozenErebus quits (~frozenEre@94.129.70.18) (Ping timeout: 240 seconds) |
| 04:15:15 | → | geowiesnot_bis joins (~user@87-89-181-157.abo.bbox.fr) |
| 04:18:30 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 04:20:07 | × | saurik quits (saurik@carrier.saurik.com) (Remote host closed the connection) |
| 04:22:30 | × | slack1256 quits (~slack1256@dvc-186-186-101-190.movil.vtr.net) (Remote host closed the connection) |
| 04:23:09 | × | HarveyPwca quits (~HarveyPwc@2601:246:c180:a570:29df:3b00:ad0e:3a06) (Quit: Leaving) |
| 04:26:50 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 04:27:20 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 04:27:22 | → | Tario joins (~Tario@201.192.165.173) |
| 04:27:51 | → | codygman__ joins (~user@47.186.207.161) |
| 04:31:15 | bobbytab1es | is now known as bobbytables |
| 04:34:43 | → | shad0w_ joins (a0ca254d@160.202.37.77) |
| 04:39:34 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-ycjhikdeorfguwps) |
| 04:41:44 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 04:43:59 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 04:44:23 | → | codygman__ joins (~user@47.186.207.161) |
| 04:48:32 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 04:49:01 | → | codygman__ joins (~user@47.186.207.161) |
| 04:50:57 | × | geowiesnot_bis quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 246 seconds) |
| 04:51:36 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 04:51:53 | hackage | pandoc 2.13 - Conversion between markup formats https://hackage.haskell.org/package/pandoc-2.13 (JohnMacFarlane) |
| 04:51:59 | → | codygman__ joins (~user@47.186.207.161) |
| 04:52:18 | <koz_> | :t foldl' |
| 04:52:20 | <lambdabot> | Foldable t => (b -> a -> b) -> b -> t a -> b |
| 04:55:29 | → | dramforever joins (~dram@unaffiliated/dramforever) |
| 05:02:25 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 05:06:43 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 245 seconds) |
| 05:12:27 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 05:12:36 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 05:17:57 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds) |
| 05:19:37 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:20:31 | → | kayvan joins (~user@52-119-115-185.PUBLIC.monkeybrains.net) |
| 05:26:20 | × | shad0w_ quits (a0ca254d@160.202.37.77) (Quit: Connection closed) |
| 05:26:54 | × | average quits (uid473595@gateway/web/irccloud.com/x-mlbuggytwdwptlyu) (Quit: Connection closed for inactivity) |
| 05:28:06 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:7566:23e2:7687:b8cb) (Remote host closed the connection) |
| 05:30:17 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 05:31:42 | → | day_ joins (~Unknown@unaffiliated/day) |
| 05:31:58 | × | dramforever quits (~dram@unaffiliated/dramforever) (Quit: Leaving) |
| 05:32:01 | → | petersen joins (~petersen@redhat/juhp) |
| 05:33:16 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 05:33:41 | → | codygman__ joins (~user@47.186.207.161) |
| 05:34:08 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 240 seconds) |
| 05:34:38 | × | day quits (~Unknown@unaffiliated/day) (Ping timeout: 245 seconds) |
| 05:34:38 | day_ | is now known as day |
| 05:34:56 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 05:37:56 | → | W3BV1P3R joins (~W3BV1P3R@c-73-5-91-226.hsd1.tn.comcast.net) |
| 05:38:33 | × | W3BV1P3R quits (~W3BV1P3R@c-73-5-91-226.hsd1.tn.comcast.net) (Client Quit) |
| 05:39:30 | → | o1lo01ol1o joins (~o1lo01ol1@bl7-88-181.dsl.telepac.pt) |
| 05:48:59 | × | kayvan quits (~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection) |
| 05:49:50 | × | codygman` quits (~user@47.186.207.161) (Read error: No route to host) |
| 05:50:01 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 05:50:39 | × | bitmagie quits (~Thunderbi@200116b806be8f00f031bd0980c89ee9.dip.versatel-1u1.de) (Quit: bitmagie) |
| 05:50:40 | × | o1lo01ol1o quits (~o1lo01ol1@bl7-88-181.dsl.telepac.pt) (Remote host closed the connection) |
| 05:51:03 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 05:53:44 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 05:55:28 | → | Sonderblade joins (~helloman@2a02:aa1:100d:fe6f:6a75:3fbc:c81a:1def) |
| 06:04:03 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 06:17:59 | → | codygman__ joins (~user@47.186.207.161) |
| 06:21:01 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) |
| 06:24:24 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 246 seconds) |
| 06:25:07 | × | dave_uy quits (~david@108.61.193.26) (Quit: The Lounge - https://thelounge.chat) |
| 06:28:25 | → | dave_uy joins (~david@108.61.193.26) |
| 06:30:51 | × | Sonderblade quits (~helloman@2a02:aa1:100d:fe6f:6a75:3fbc:c81a:1def) (Quit: Konversation terminated!) |
| 06:34:32 | × | kilolympus quits (~kilolympu@5.151.5.181) (Quit: Quitting IRC :() |
| 06:34:52 | → | kilolympus joins (~kilolympu@5.151.5.178) |
| 06:36:13 | → | sparsity joins (5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251) |
| 06:36:26 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:38:13 | × | Garbanzo quits (~Garbanzo@70.234.205.193) (Ping timeout: 256 seconds) |
| 06:38:17 | × | hexfive quits (~hexfive@50.35.83.177) (Quit: i must go. my people need me.) |
| 06:44:37 | → | codygman` joins (~user@47.186.207.161) |
| 06:45:39 | → | shad0w_ joins (a0ca254d@160.202.37.77) |
| 06:46:01 | × | shad0w_ quits (a0ca254d@160.202.37.77) (Client Quit) |
| 06:48:28 | × | dsrt^ quits (~hph@ip98-184-89-2.mc.at.cox.net) () |
| 06:50:33 | → | idhugo joins (~idhugo@87-49-146-176-mobile.dk.customer.tdc.net) |
| 06:54:39 | × | idhugo quits (~idhugo@87-49-146-176-mobile.dk.customer.tdc.net) (Remote host closed the connection) |
| 06:57:53 | → | idhugo joins (~idhugo@87-49-146-176-mobile.dk.customer.tdc.net) |
| 07:01:56 | × | petersen quits (~petersen@redhat/juhp) (Quit: petersen) |
| 07:02:49 | × | jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection) |
| 07:03:12 | → | jb55 joins (~jb55@gateway/tor-sasl/jb55) |
| 07:09:05 | → | shad0w_ joins (a0ca254d@160.202.37.77) |
| 07:10:36 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 246 seconds) |
| 07:12:34 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8) |
| 07:12:56 | × | codygman` quits (~user@47.186.207.161) (Ping timeout: 240 seconds) |
| 07:13:43 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 07:15:29 | × | ViCi quits (daniel@10PLM.ro) (Quit: Quit!) |
| 07:16:32 | × | roconnor quits (~roconnor@host-45-58-230-226.dyn.295.ca) (Ping timeout: 240 seconds) |
| 07:18:27 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 07:18:30 | × | idhugo quits (~idhugo@87-49-146-176-mobile.dk.customer.tdc.net) (Remote host closed the connection) |
| 07:20:52 | → | roconnor joins (~roconnor@host-45-58-230-226.dyn.295.ca) |
| 07:23:25 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) (Remote host closed the connection) |
| 07:24:02 | × | danso quits (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Ping timeout: 264 seconds) |
| 07:24:02 | → | idhugo joins (~idhugo@87-49-146-176-mobile.dk.customer.tdc.net) |
| 07:24:22 | × | kderme quits (4fa6552d@ppp079166085045.access.hol.gr) (Ping timeout: 240 seconds) |
| 07:25:02 | × | idhugo quits (~idhugo@87-49-146-176-mobile.dk.customer.tdc.net) (Remote host closed the connection) |
| 07:26:28 | × | roconnor quits (~roconnor@host-45-58-230-226.dyn.295.ca) (Ping timeout: 260 seconds) |
| 07:26:58 | → | idhugo joins (~idhugo@87-49-146-176-mobile.dk.customer.tdc.net) |
| 07:30:00 | → | roconnor joins (~roconnor@host-45-58-230-226.dyn.295.ca) |
| 07:30:14 | × | shad0w_ quits (a0ca254d@160.202.37.77) (Quit: Connection closed) |
| 07:36:05 | × | chenshen quits (~chenshen@2620:10d:c090:400::5:2b70) (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 07:37:48 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 07:39:55 | × | Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 268 seconds) |
| 07:40:33 | → | Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer) |
| 07:40:36 | → | joncol joins (~jco@c188-150-101-195.bredband.comhem.se) |
| 07:43:01 | × | Lowl3v3l quits (~Lowl3v3l@dslb-002-207-103-026.002.207.pools.vodafone-ip.de) (Remote host closed the connection) |
| 07:43:04 | → | heatsink_ joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 07:45:38 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:6075:d116:7f4b:9342) (Ping timeout: 264 seconds) |
| 07:46:33 | × | bitmapper quits (uid464869@gateway/web/irccloud.com/x-xsbczufuwcygdtaj) (Quit: Connection closed for inactivity) |
| 07:50:14 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:50:21 | × | __minoru__shirae quits (~shiraeesh@77.94.25.47) (Ping timeout: 264 seconds) |
| 07:51:20 | × | botro quits (~botro@178.239.168.171) (Remote host closed the connection) |
| 07:51:45 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 07:52:11 | → | codygman__ joins (~user@47.186.207.161) |
| 08:02:53 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 08:02:57 | × | elliott_ quits (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 264 seconds) |
| 08:05:14 | → | Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 08:07:09 | → | knupfer joins (~Thunderbi@200116b82c51ca00ed9c36bf6688f2f7.dip.versatel-1u1.de) |
| 08:07:15 | → | zleap joins (~zleap@185.163.110.108) |
| 08:08:41 | → | marinelli joins (~marinelli@gateway/tor-sasl/marinelli) |
| 08:11:56 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 08:12:19 | → | codygman__ joins (~user@47.186.207.161) |
| 08:13:06 | → | knupfer1 joins (~Thunderbi@200116b82c9b050025eb5c46c736ec65.dip.versatel-1u1.de) |
| 08:13:27 | × | knupfer quits (~Thunderbi@200116b82c51ca00ed9c36bf6688f2f7.dip.versatel-1u1.de) (Ping timeout: 244 seconds) |
| 08:13:27 | knupfer1 | is now known as knupfer |
| 08:18:51 | → | Sathiana joins (~kath@185-113-98-38.cust.bredband2.com) |
| 08:19:48 | → | elliott_ joins (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) |
| 08:19:51 | → | danso joins (~dan@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 08:21:19 | → | Lowl3v3l joins (~Lowl3v3l@dslb-002-207-103-026.002.207.pools.vodafone-ip.de) |
| 08:22:37 | → | average joins (uid473595@gateway/web/irccloud.com/x-sgdxyzaxzpfhfdbl) |
| 08:24:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 08:26:33 | × | jack1909_ quits (~qpls@cpeb4750e67d202-cmf81d0fad5840.cpe.net.fido.ca) (Ping timeout: 260 seconds) |
| 08:27:56 | → | jack1909 joins (~qpls@23.105.170.163) |
| 08:30:33 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds) |
| 08:35:35 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 08:36:50 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 08:37:16 | → | codygman__ joins (~user@47.186.207.161) |
| 08:39:31 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 08:39:56 | → | codygman__ joins (~user@47.186.207.161) |
| 08:42:54 | → | idhugo_ joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 08:44:08 | × | idhugo quits (~idhugo@87-49-146-176-mobile.dk.customer.tdc.net) (Ping timeout: 240 seconds) |
| 08:44:52 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 08:51:23 | × | jneira quits (501e65b6@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.101.182) (Ping timeout: 256 seconds) |
| 08:56:21 | × | marinelli quits (~marinelli@gateway/tor-sasl/marinelli) (Quit: marinelli) |
| 08:59:23 | hackage | bottom 0.1.0.0 - Encoding and decoding for the Bottom spec. https://hackage.haskell.org/package/bottom-0.1.0.0 (leo) |
| 08:59:38 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 08:59:57 | × | knupfer quits (~Thunderbi@200116b82c9b050025eb5c46c736ec65.dip.versatel-1u1.de) (Ping timeout: 244 seconds) |
| 09:01:11 | × | drbean quits (~drbean@TC210-63-209-96.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in) |
| 09:02:34 | → | brick joins (~brick@59.88.30.166) |
| 09:03:46 | × | heatsink_ quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 09:05:23 | → | fendor joins (~fendor@178.115.129.38.wireless.dyn.drei.com) |
| 09:06:10 | → | unyu joins (~pyon@unaffiliated/pyon) |
| 09:07:42 | × | SaitamaPlus quits (uid272474@gateway/web/irccloud.com/x-fuuiapjpwochxlja) (Quit: Connection closed for inactivity) |
| 09:11:13 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds) |
| 09:14:50 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 09:17:08 | → | hillary joins (3b581ea6@59.88.30.166) |
| 09:19:45 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds) |
| 09:20:14 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 09:22:09 | → | m0rphism joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
| 09:22:56 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 09:23:13 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer) |
| 09:25:03 | → | dopplergange joins (~dop@titan.pathogen.is) |
| 09:26:47 | × | dopplergange quits (~dop@titan.pathogen.is) (Read error: Connection reset by peer) |
| 09:27:18 | → | dopplergange joins (~dop@titan.pathogen.is) |
| 09:33:19 | × | curiousgay quits (~gay@178.217.208.8) (Ping timeout: 256 seconds) |
| 09:33:53 | × | codygman__ quits (~user@47.186.207.161) (Ping timeout: 256 seconds) |
| 09:35:26 | <maralorn> | Is there a simple way to just install (or rather build) a random package from hackage with haskell.nix? |
| 09:40:04 | → | dopplerg- joins (~dop@185.141.206.207) |
| 09:40:45 | × | dopplergange quits (~dop@titan.pathogen.is) (Ping timeout: 264 seconds) |
| 09:40:54 | → | curiousgay joins (~gay@178.217.208.8) |
| 09:41:57 | × | m0rphism quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 264 seconds) |
| 09:44:39 | → | m0rphism joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
| 09:53:10 | × | hillary quits (3b581ea6@59.88.30.166) (Quit: Connection closed) |
| 10:01:09 | × | cabpa_ quits (~cabpa@180.190.165.139) (Ping timeout: 264 seconds) |
| 10:01:12 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 10:03:18 | → | mikoto-chan joins (~anass@gateway/tor-sasl/mikoto-chan) |
| 10:03:20 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds) |
| 10:04:10 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) |
| 10:05:42 | → | cabpa joins (~cabpa@180.190.165.139) |
| 10:09:02 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) (Ping timeout: 264 seconds) |
| 10:09:10 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 10:09:47 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 10:10:14 | ← | brick parts (~brick@59.88.30.166) () |
| 10:12:34 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 10:13:19 | → | kenran joins (~kenran@mue-88-130-62-124.dsl.tropolys.de) |
| 10:13:20 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 10:13:26 | → | acidjnk_new joins (~acidjnk@p200300d0c72b959874ac6c8157d63e67.dip0.t-ipconnect.de) |
| 10:13:51 | → | shad0w_ joins (a0ca254d@160.202.37.77) |
| 10:15:31 | × | mikoto-chan quits (~anass@gateway/tor-sasl/mikoto-chan) (Quit: mikoto-chan) |
| 10:20:51 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:21:41 | × | dopplerg- quits (~dop@185.141.206.207) (Quit: ZNC 1.7.5 - https://znc.in) |
| 10:21:54 | × | RusAlex quits (~Chel@unaffiliated/rusalex) (Ping timeout: 265 seconds) |
| 10:22:08 | → | RusAlex joins (~Chel@unaffiliated/rusalex) |
| 10:24:41 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 10:24:48 | <jackdk> | Is anyone here aware of toy compilers that map to the two approaches in the "making a fast curry" paper? My web searches are finding either a) the paper itself; b) newbie-level explanations of currying; or c) delicious-looking Indian recipes. |
| 10:26:05 | × | sparsity quits (5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251) (Quit: Connection closed) |
| 10:27:20 | → | son0p joins (~son0p@181.58.39.182) |
| 10:29:00 | → | frozenErebus joins (~frozenEre@94.129.70.18) |
| 10:30:33 | → | dhil joins (~dhil@80.208.56.181) |
| 10:31:33 | <Rembane> | I would love to have a compiler that makes delicious-looking Indian curry. |
| 10:33:15 | × | RusAlex quits (~Chel@unaffiliated/rusalex) (Ping timeout: 246 seconds) |
| 10:34:17 | → | RusAlex joins (~Chel@unaffiliated/rusalex) |
| 10:36:35 | → | LKoen joins (~LKoen@194.250.88.92.rev.sfr.net) |
| 10:38:23 | hackage | hxt 9.3.1.22 - A collection of tools for processing XML with Haskell. https://hackage.haskell.org/package/hxt-9.3.1.22 (UweSchmidt) |
| 10:40:11 | × | shailangsa quits (~shailangs@host86-162-150-241.range86-162.btcentralplus.com) (Ping timeout: 256 seconds) |
| 10:40:11 | → | idhugo__ joins (~idhugo@87-49-146-176-mobile.dk.customer.tdc.net) |
| 10:40:21 | × | meck quits (~meck@li1809-18.members.linode.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 10:40:48 | → | malumore joins (~malumore@151.62.127.88) |
| 10:42:20 | → | meck joins (~meck@li1809-18.members.linode.com) |
| 10:42:49 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 10:43:01 | × | idhugo_ quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds) |
| 10:52:04 | <jackdk> | maralorn: This made my computer glow for a while, then dropped me in a shell containing `dhall`: https://www.irccloud.com/pastebin/UU3dwKRX/shell.nix |
| 10:52:33 | × | kenran quits (~kenran@mue-88-130-62-124.dsl.tropolys.de) (Ping timeout: 245 seconds) |
| 10:53:21 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 264 seconds) |
| 10:54:26 | → | kenran joins (~kenran@mue-88-130-62-124.dsl.tropolys.de) |
| 10:55:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 10:56:42 | → | SaitamaPlus joins (uid272474@gateway/web/irccloud.com/x-fmvwqsvtfzyqazim) |
| 11:01:55 | <Uniaika> | jackdk: hahaha, very well-put :') |
| 11:02:33 | → | kuribas joins (~user@ptr-25vy0i7q7d8r48rlgds.18120a2.ip6.access.telenet.be) |
| 11:02:45 | <liyang> | jackdk: chana or mung dhall? |
| 11:03:09 | <jackdk> | liyang: dal makhani is my jam |
| 11:05:03 | → | shailangsa joins (~shailangs@host165-120-169-19.range165-120.btcentralplus.com) |
| 11:05:42 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) |
| 11:08:33 | <liyang> | I prefer marmalade, but curry is my beverage. (Cf. https://nomimono.co.jp/brand/curry/ ) |
| 11:10:01 | → | berberman_ joins (~berberman@unaffiliated/berberman) |
| 11:10:14 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) (Ping timeout: 264 seconds) |
| 11:10:26 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 265 seconds) |
| 11:10:32 | ← | AbtractSingleton parts (rasurumatr@gateway/shell/matrix.org/x-bshxgvdkrvkrlckp) ("User left") |
| 11:11:31 | → | Franciman joins (~francesco@host-79-53-62-46.retail.telecomitalia.it) |
| 11:12:54 | × | kenran quits (~kenran@mue-88-130-62-124.dsl.tropolys.de) (Quit: leaving) |
| 11:13:34 | → | kiweun joins (~kiweun@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com) |
| 11:17:08 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 245 seconds) |
| 11:18:56 | × | aarvar quits (~foewfoiew@2601:602:a080:fa0:75fb:cea1:4d26:9157) (Ping timeout: 240 seconds) |
| 11:34:14 | → | mouseghost joins (~draco@87-206-9-185.dynamic.chello.pl) |
| 11:34:14 | × | mouseghost quits (~draco@87-206-9-185.dynamic.chello.pl) (Changing host) |
| 11:34:14 | → | mouseghost joins (~draco@wikipedia/desperek) |
| 11:42:21 | → | haskell_newbie joins (~haskellne@111.119.187.43) |
| 11:44:42 | → | curl joins (5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251) |
| 11:44:56 | × | dcoutts__ quits (~duncan@85.186.125.91.dyn.plus.net) (Ping timeout: 240 seconds) |
| 11:45:10 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:45:24 | × | dcoutts quits (~dcoutts@unaffiliated/dcoutts) (Ping timeout: 256 seconds) |
| 11:46:23 | hackage | ipa 0.2 - Internal Phonetic Alphabet (IPA) https://hackage.haskell.org/package/ipa-0.2 (RoryTylerHayford) |
| 11:46:33 | → | Hi-Angel joins (~constanti@broadband-188-32-15-112.ip.moscow.rt.ru) |
| 11:47:46 | <ij> | ski, I have reduced my usage of $ lately, because of your advice :) sometimes I abuse it and it's not better than without |
| 11:48:58 | → | dcoutts__ joins (~duncan@94.186.125.91.dyn.plus.net) |
| 11:49:33 | ski | smiles |
| 11:50:19 | <curl> | more use of $ in parens |
| 11:50:49 | <curl> | (f $ g x) |
| 11:51:57 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 11:55:52 | ski | feels pain |
| 11:56:20 | <curl> | better than (f (g x)) though |
| 11:56:24 | <Franciman> | what do yo uuse instead of $ ? |
| 11:56:26 | → | drbean joins (~drbean@TC210-63-209-99.static.apol.com.tw) |
| 11:56:34 | <Franciman> | how to reduce its usage? |
| 11:56:52 | <curl> | ((f . g) x) |
| 11:56:57 | <curl> | which i think is worse |
| 11:57:09 | <curl> | the $ go to . |
| 11:58:11 | <curl> | ((f . g . h) x) vs (f $ g $ h x) |
| 11:59:06 | <haskell_newbie> | hi i m new on channel this is my first experience on irc |
| 11:59:49 | <curl> | less internal parens and the precidence of $ or . nicely partitions up expressions, again no parens needed |
| 12:00:34 | <curl> | ((f . g x . h) y) vs (f $ g x $ h y) |
| 12:01:59 | <curl> | the version with dot, the reader notionally imagines function concatenation |
| 12:02:17 | <curl> | the version with the $ the reader has to reduce the expression from the right hand side |
| 12:02:39 | <curl> | which is more like what nested parens would mean most obviously |
| 12:02:54 | <curl> | function composition* |
| 12:03:26 | × | zleap quits (~zleap@185.163.110.108) (Remote host closed the connection) |
| 12:04:04 | <curl> | (f (g x $ h y) z) |
| 12:04:31 | <curl> | the dollars nicely revert to parens when needed |
| 12:04:46 | <curl> | whats going on with the dot version when f takes 2 arguments? |
| 12:05:03 | <curl> | you would have to use flip to do the "pointless" version with the dots |
| 12:06:47 | × | LKoen quits (~LKoen@194.250.88.92.rev.sfr.net) (Remote host closed the connection) |
| 12:07:35 | <curl> | ((flip f z . g x . h) y) |
| 12:07:38 | <curl> | which i think is worse |
| 12:15:33 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 12:15:48 | <hololeap> | \x y z -> f (g x $ h y) z) === \x y -> f (g x $ h y) === \x -> f . g x . h |
| 12:16:40 | <hololeap> | let doThing x = (f . g x . h) in doThing x y z |
| 12:16:50 | <hololeap> | or some such |
| 12:16:59 | <Logio> | given the choice, I'll always prefer function composition to $ |
| 12:17:40 | <Logio> | feels like it's easier to spot patterns and generalize your code |
| 12:18:57 | × | tsaka__ quits (~torstein@ppp-94-65-45-45.home.otenet.gr) (Quit: Konversation terminated!) |
| 12:19:03 | <ski> | hello haskell_newbie |
| 12:19:12 | → | tsaka__ joins (~torstein@ppp-94-65-45-45.home.otenet.gr) |
| 12:19:27 | → | spake joins (~spake@185.204.1.185) |
| 12:19:35 | <hololeap> | sometimes it makes sense to keep things explicit, especially when composing functions that take more than one argument |
| 12:19:40 | <ski> | curl : obviously the last one is worse |
| 12:20:12 | <ski> | haskell_newbie : if you have any (Haskell-related) question or topic, feel free to chat up |
| 12:20:46 | <ski> | nothing wrong with `f (g x (h y))' or `f (g x (h y)) z' |
| 12:21:19 | <ski> | i normally prefer `(f . g x . h) y' over `f . g x . h $ y' over `f $ g x $ h y' |
| 12:21:48 | × | shad0w_ quits (a0ca254d@160.202.37.77) (Quit: Connection closed) |
| 12:22:24 | <ski> | the "pointless" style is jokingly ("ha ha, only serious") named like that, as a reminder (or warning), that it's quite possible to take it too far |
| 12:23:16 | <hololeap> | ski: isn't there something about inlining rules where if you use `doThing x y z = f (g x (h y)) z' it won't be able to inline as easily? |
| 12:23:47 | <ski> | inline what ? `doThing' or `f',`g',`h' ? |
| 12:23:56 | <haskell_newbie> | thank you so much ski I think my message did not appear there something went wrong. I'll. thanks again :) |
| 12:23:58 | <hololeap> | doThing |
| 12:24:24 | <ski> | haskell_newbie : people were just caught up a bit, in a conversation :) |
| 12:24:42 | <haskell_newbie> | :) |
| 12:25:01 | <ski> | iirc, with `doThing x y z = ..x..y..z..', it'll only inline, if `doThing' is fully applied (saturated application) |
| 12:26:03 | <ski> | haskell_newbie : do you have any learning material to look at ? beginner questions (but also more advanced ones) are welcome in here, if you get any. (both practical and theoretical ones) |
| 12:26:09 | × | tsaka__ quits (~torstein@ppp-94-65-45-45.home.otenet.gr) (Ping timeout: 256 seconds) |
| 12:28:07 | → | dementorr joins (5678f228@86.120.242.40) |
| 12:28:13 | <hololeap> | ski: right, and will `doThing x = f . g x . h' be able to inline with application of one, two, or three variables? if so, that's a "point" to "pointless" :) |
| 12:30:48 | <dementorr> | Hello! Is there a way to use global state in IO Monad? I know this not usually the way to do it, but I am spawning a program from a function, and I would like to save the handle in a Map. This function is called by other code that I don't have access to, and I want to do more things with the handles. Link: https://pastebin.com/ZsYsnSfB |
| 12:31:18 | <ski> | hololeap : yes |
| 12:32:03 | <ski> | @wiki Top level mutable state |
| 12:32:03 | <lambdabot> | https://wiki.haskell.org/Top_level_mutable_state |
| 12:32:58 | <ski> | but usually it's better to pass around the state or config/environment. scales better, if you're having multiple threads or whatever |
| 12:33:31 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 12:33:54 | <ski> | @wiki Global variables |
| 12:33:54 | <lambdabot> | https://wiki.haskell.org/Global_variables |
| 12:34:39 | <ski> | often, `ReaderT MyConfig IO' is used. implicit parameters could also be used |
| 12:35:42 | <ski> | (`MyConfig' could be a `Handle' or an `IORef T' or some other reference to a mutable location, which then allows update, and not only distribution (and possible local change) of an environment/config) |
| 12:36:29 | <hololeap> | dementorr: i don't see why you need global state for that |
| 12:37:26 | × | gitgoood quits (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) (Read error: Connection reset by peer) |
| 12:38:01 | <ski> | dementorr : did you mean to have a space after the `program' part ? |
| 12:38:43 | <hololeap> | creator :: Int -> IntMap Handle -> IO (IntMap Handle) |
| 12:39:08 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 12:39:22 | <ski> | anyway, it would be possible to have `state :: IORef (Map Int Handle)' (using the trick i referenced before). but it's most likely better to just pass around the `Map Int Handle' (or possibly an `IORef (Map Int Handle)') to the functions that need it |
| 12:40:47 | <dementorr> | ski, hololeap: Yeah, there is a space there. The problem is that I can't modify the function's signature. It has to be Int -> IO Handle. I just want to save the value(s) before I return them, and use later like in (https://pastebin.com/1hjARUTw) say I don't want to print them right away, maybe later... |
| 12:41:13 | × | zerok quits (~user@101.50.108.120) (Quit: WeeChat 3.0) |
| 12:41:31 | → | z0k joins (~user@101.50.108.120) |
| 12:43:06 | <ski> | dementorr : there is no space put in the string, in your pasted code |
| 12:43:15 | <hololeap> | dementorr: so you need `creator` to have that signature, but you can modify its contents? |
| 12:43:32 | <ski> | why can't you modify it ? |
| 12:43:37 | <dementorr> | ski: It is in the latest :) |
| 12:44:06 | <ski> | who's using `creator' ? |
| 12:44:20 | <ski> | are you passing `creator' as a callback argument to another function, maybe ? |
| 12:44:29 | <ski> | (the latest ?) |
| 12:45:06 | <dementorr> | hololeap: It is used by another module. That module says it need a function that has the signature Int -> IO Handle, and it will store the handles and use them later. Now I want to be able to access them for other things. |
| 12:45:13 | <dementorr> | https://pastebin.com/1hjARUTw |
| 12:45:21 | <dementorr> | Oh |
| 12:45:29 | <dementorr> | there were two "./programs" |
| 12:45:38 | <dementorr> | Yeah there should be a space there twoo |
| 12:45:51 | <ski> | in your first paste, there was no space at either site |
| 12:45:57 | <dementorr> | Yes I know :( |
| 12:46:18 | <dementorr> | So it is a callback |
| 12:47:35 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 12:47:52 | <hololeap> | dementorr: so you want to secretly store the Handles when `creator` is run so you can access them later? this has a funky smell to me. |
| 12:48:15 | <dementorr> | Yep!! That's about right :d |
| 12:49:10 | <hololeap> | part of the problem is that "later" is not well defined. if something external is calling `creator`, how are you going to call something else afterward? |
| 12:49:14 | <dementorr> | I can't do it in another way since the state of the module is not exported and there aren't any ways to use get on the state |
| 12:49:23 | × | Pickchea quits (~private@unaffiliated/pickchea) (Ping timeout: 256 seconds) |
| 12:49:26 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 12:49:29 | → | zaquest joins (~notzaques@5.128.210.178) |
| 12:49:56 | <ski> | dementorr : if another function expects to be passed `creator' as a callback argument, then there is no problem. simply pass a partially applied `creator' to it, partially applied to the `IntMap Handle' (or `IORef (IntMap Handle)', if you want mutation in the callback, or want to be able to get the latest version, which i suppose you do) |
| 12:50:52 | → | peanut_ joins (~peanut@2a02:8388:a101:2600:52d3:48bc:f38c:73e) |
| 12:51:06 | <ski> | iow, you could have `creator :: IntMap Handle -> Int -> IO Handle' or `creator :: IORef (IntMap Handle) -> Int -> IO Handle'. or perhaps `creator :: IORef (IntMap Handle) -> IO (Int -> IO Handle)', even |
| 12:52:09 | <ski> | (the `foo :: Blah -> IO (Bleh -> IO Bloh)' can be useful, if you want `foo' to do some I/O, or allocate some mutable state, that the computed function could reference) |
| 12:53:11 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 12:53:34 | <dementorr> | Okay I think I need something like "creator :: IORef (IntMap Handle) -> Int -> IO Handle"... so what I should do is: |
| 12:53:34 | <dementorr> | 1) define a global map of type myMap :: IORef (IntMap Handle) |
| 12:53:35 | <dementorr> | 2) pass the map to creator (like creator myMap id = do ...) |
| 12:53:35 | <dementorr> | 3) when I later use my myMap, if creator was passed it will get it |
| 12:53:47 | <dementorr> | Is that okay? |
| 12:55:01 | <ski> | it's probably better to not define `myMap' at the top-level of a module, but rather make it inside of `main' (or some action you call from that, or whatever your starting point is) |
| 12:55:13 | <ski> | otherwise, it sounds fine |
| 12:56:03 | <dementorr> | ski: Okay thanks! I'll try it now. |
| 12:56:32 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 240 seconds) |
| 12:57:11 | <hololeap> | don't get too attached to the notion of your IORef being "global". |
| 12:58:10 | → | coot joins (~coot@37.30.58.223.nat.umts.dynamic.t-mobile.pl) |
| 12:58:27 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds) |
| 13:02:44 | × | son0p quits (~son0p@181.58.39.182) (Quit: Lost terminal) |
| 13:02:59 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 13:04:01 | <ski> | (btw, "global" can mean several different things. e.g. it could mean that the scope is global, meaning module-level, could be accessed by any other code importing that module. or, for state, it can mean that changes persist, survive, to be picked up by later executions) |
| 13:06:43 | → | ShalokShalom joins (b9110d05@gateway/web/cgi-irc/kiwiirc.com/ip.185.17.13.5) |
| 13:06:52 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) |
| 13:07:14 | → | idhugo_ joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 13:08:29 | → | perrier-jouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 13:09:17 | × | curl quits (5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251) (Quit: Connection closed) |
| 13:10:03 | × | idhugo__ quits (~idhugo@87-49-146-176-mobile.dk.customer.tdc.net) (Ping timeout: 260 seconds) |
| 13:11:17 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 13:12:02 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) (Ping timeout: 264 seconds) |
| 13:13:45 | → | gitgood joins (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) |
| 13:14:16 | × | ShalokShalom quits (b9110d05@gateway/web/cgi-irc/kiwiirc.com/ip.185.17.13.5) (Quit: Connection closed) |
| 13:15:18 | → | ShalokShalom joins (b9110d05@gateway/web/cgi-irc/kiwiirc.com/ip.185.17.13.5) |
| 13:17:16 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 13:19:47 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 13:20:28 | × | haskell_newbie quits (~haskellne@111.119.187.43) (Ping timeout: 245 seconds) |
| 13:26:21 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 13:28:18 | → | tsaka__ joins (~torstein@ppp-94-65-45-45.home.otenet.gr) |
| 13:29:01 | → | hexagenic joins (~mattias@81-224-107-147-no71.tbcn.telia.com) |
| 13:29:12 | × | xelxebar_ quits (~xelxebar@gateway/tor-sasl/xelxebar) (Remote host closed the connection) |
| 13:29:29 | → | xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar) |
| 13:30:11 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 13:31:05 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) |
| 13:34:09 | × | ShalokShalom quits (b9110d05@gateway/web/cgi-irc/kiwiirc.com/ip.185.17.13.5) (Ping timeout: 256 seconds) |
| 13:34:25 | → | RandomArcher joins (~isho@90.153.186.32) |
| 13:35:23 | <maralorn> | jackdk: Thank you. |
| 13:35:39 | <maralorn> | I will have a second look at the documentation to see where I overlooked thas. |
| 13:37:04 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 13:38:17 | × | coot quits (~coot@37.30.58.223.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 13:39:33 | × | frozenErebus quits (~frozenEre@94.129.70.18) (Ping timeout: 264 seconds) |
| 13:41:27 | × | neiluj quits (~jco@unaffiliated/neiluj) (Remote host closed the connection) |
| 13:45:35 | × | RandomArcher quits (~isho@90.153.186.32) (Quit: Konversation terminated!) |
| 13:45:59 | → | RandomArcher joins (~RandomArc@90.153.186.32) |
| 13:51:02 | → | son0p joins (~son0p@181.136.122.143) |
| 13:53:21 | × | drbean quits (~drbean@TC210-63-209-99.static.apol.com.tw) (Ping timeout: 264 seconds) |
| 13:53:44 | → | augnun joins (~augnun@2804:14c:658b:41bb:600:c14b:1892:9aca) |
| 13:54:27 | × | acidjnk_new quits (~acidjnk@p200300d0c72b959874ac6c8157d63e67.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
| 13:56:45 | × | tromp_ quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 13:57:08 | → | frozenErebus joins (~frozenEre@94.129.70.18) |
| 13:58:59 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 13:59:20 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:59:57 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds) |
| 14:03:27 | → | vincenzopalazzo joins (~vincenzop@host-79-30-9-166.retail.telecomitalia.it) |
| 14:03:44 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 14:06:00 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 14:06:30 | → | mastarija joins (~mastarija@31.217.19.201) |
| 14:06:49 | → | azure1 joins (~azure@103.154.230.130) |
| 14:10:09 | × | Rudd0^ quits (~Rudd0@185.189.115.103) (Ping timeout: 264 seconds) |
| 14:10:09 | × | Guest82011 quits (~azure@103.154.230.130) (Ping timeout: 264 seconds) |
| 14:11:10 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 14:11:17 | → | ajc1 joins (~ajc@69.231.232.79) |
| 14:11:18 | × | azure1 quits (~azure@103.154.230.130) (Ping timeout: 246 seconds) |
| 14:11:55 | × | ajc1 quits (~ajc@69.231.232.79) (Client Quit) |
| 14:12:56 | × | augnun quits (~augnun@2804:14c:658b:41bb:600:c14b:1892:9aca) (Ping timeout: 240 seconds) |
| 14:13:06 | → | azure1 joins (~azure@103.154.230.130) |
| 14:13:12 | → | geekosaur joins (ae68c070@cpe-174-104-192-112.neo.res.rr.com) |
| 14:13:41 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 14:15:43 | × | m1dnight_ quits (~m1dnight@78-22-9-5.access.telenet.be) (Quit: WeeChat 2.4) |
| 14:15:44 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds) |
| 14:16:04 | → | Lycurgus joins (~niemand@98.4.116.165) |
| 14:17:40 | × | xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 268 seconds) |
| 14:17:48 | → | m1dnight_ joins (~m1dnight@78-22-9-5.access.telenet.be) |
| 14:18:14 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 14:20:24 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 14:20:24 | <Philonous> | I'm trying to bind to a rust library. Whenever I call some of the functions, I'm getting »internal error: ASSERTION FAILED: file rts/Capability.c, line 207«. This is both with ghc 8.8.4 and 8.10.4. I've had little luck googling the issue. Is there some known hoops to jump through when binding to rust that I might be missing? |
| 14:21:25 | <Lycurgus> | you know ur in #haskell, right? |
| 14:22:13 | <Lycurgus> | why would rust be different from other things that aren't hs? |
| 14:22:39 | → | timCF joins (~i.tkachuk@m91-129-99-43.cust.tele2.ee) |
| 14:22:55 | <maralorn> | Seemed like a quite haskelly question to me.^^ |
| 14:23:07 | <Lycurgus> | anyway looks like an easy permissions snag |
| 14:23:28 | <Lycurgus> | or other config snag |
| 14:24:13 | → | wonko7 joins (~wonko7@45.15.17.60) |
| 14:24:36 | <Lycurgus> | i'd be surprised if reading line 207 didn advance the matter |
| 14:25:34 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 14:25:55 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) |
| 14:25:55 | <hpc> | are the functions you're calling in rust using the C calling convention? |
| 14:26:19 | <timCF> | Hello! Is there real term called "partial application"? I saw it used in cases where output of the function is the other function. Naming is a bit misleading, because of "partial function" definition - which is function defined not for all possible arguments. So "partial application" sound like "partial function" has been applied, but it's completely different. |
| 14:26:21 | × | RandomArcher quits (~RandomArc@90.153.186.32) (Ping timeout: 246 seconds) |
| 14:27:42 | <Logio> | "partial application" and "partial function" are unrelated terms indeed |
| 14:27:52 | <maralorn> | timCF: Yeah, partial application and partial function are totally independent concepts. |
| 14:28:05 | <Lycurgus> | 'cept for bein pieces parts |
| 14:30:08 | <maralorn> | partial application just means, that you can apply one argument to a function and get a function which only expects the missing arguments back. |
| 14:30:12 | → | LKoen joins (~LKoen@194.250.88.92.rev.sfr.net) |
| 14:30:34 | → | rond_ joins (594021ff@89-64-33-255.dynamic.chello.pl) |
| 14:30:52 | <Philonous> | Lycurgus, Yes, I'm trying to call from Haskell into a Rust library. "rts/Capabilitiy.c" is part of Ghc |
| 14:31:08 | <maralorn> | timCF: But you are right, that the Haskell Type System does not make a difference between a function that takes two arguments and a function that takes one argument and returns a function that accepts another argument. |
| 14:31:16 | <Philonous> | hpc, Yes. I've tried calling it from a simple C program, it works without problems. |
| 14:32:51 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 14:33:06 | <Lycurgus> | what was goin on in Capability.c around line 207? |
| 14:33:41 | <timCF> | maralorn: It's just normal function application then) Don't need special term "partial application" at all |
| 14:35:08 | → | xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar) |
| 14:35:13 | → | renzhi joins (~renzhi@modemcable070.17-177-173.mc.videotron.ca) |
| 14:37:33 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds) |
| 14:39:59 | <nshepperd> | you do need the special term because people think about functions differently than the haskell type system does |
| 14:41:27 | × | Pickchea quits (~private@unaffiliated/pickchea) (Ping timeout: 265 seconds) |
| 14:41:39 | <dolio> | Yes, the point is that there is an informal notion of what constitutes 'all' the expected arguments to the function, even though it's curried. |
| 14:42:03 | <maralorn> | timCF: And there is a difference when you think about the type of closure a function can have. |
| 14:42:04 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) |
| 14:42:45 | <maralorn> | when you have something of the from "f x y = ..." then evaluation only can start when values for x and y are provided. |
| 14:43:12 | <maralorn> | That’s different for "f x = g" which can be evaluate to "g" as soon as x is provided. |
| 14:43:55 | → | Tario joins (~Tario@201.192.165.173) |
| 14:44:16 | ← | jil``` parts (~user@45.86.162.6) ("ERC (IRC client for Emacs 26.1)") |
| 14:45:14 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 14:45:20 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 240 seconds) |
| 14:45:51 | × | sssb54 quits (~ssssb56@vps-b2931db6.vps.ovh.ca) (Quit: ZNC 1.7.2+deb3 - https://znc.in) |
| 14:46:43 | × | incertia quits (~incertia@d4-50-26-103.nap.wideopenwest.com) (Ping timeout: 245 seconds) |
| 14:47:41 | → | incertia joins (~incertia@d4-50-26-103.nap.wideopenwest.com) |
| 14:48:58 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) (Remote host closed the connection) |
| 14:49:56 | → | Zetagon joins (~leo@c151-177-52-233.bredband.comhem.se) |
| 14:51:43 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 14:52:39 | → | plutoniix joins (~q@node-uhl.pool-125-24.dynamic.totinternet.net) |
| 14:52:56 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 14:54:01 | → | sssb54 joins (~ssssb56@vps-b2931db6.vps.ovh.ca) |
| 14:54:26 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) |
| 14:55:33 | × | Lycurgus quits (~niemand@98.4.116.165) (Quit: Exeunt) |
| 14:57:33 | × | incertia quits (~incertia@d4-50-26-103.nap.wideopenwest.com) (Ping timeout: 264 seconds) |
| 14:57:40 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-nlxaujrugfazsleg) |
| 14:57:56 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) (Remote host closed the connection) |
| 15:02:26 | → | incertia joins (~incertia@d4-50-26-103.nap.wideopenwest.com) |
| 15:07:04 | × | tsaka__ quits (~torstein@ppp-94-65-45-45.home.otenet.gr) (Ping timeout: 265 seconds) |
| 15:08:12 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) |
| 15:08:14 | → | hexfive joins (~hexfive@50.35.83.177) |
| 15:09:29 | → | alx741 joins (~alx741@181.196.69.79) |
| 15:10:03 | → | CrazyPython joins (~crazypyth@98.122.164.118) |
| 15:10:54 | × | son0p quits (~son0p@181.136.122.143) (Remote host closed the connection) |
| 15:12:18 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) |
| 15:13:10 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 268 seconds) |
| 15:13:14 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) (Ping timeout: 264 seconds) |
| 15:13:55 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 15:15:32 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 15:19:20 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 15:22:23 | <hololeap> | (1 +) is an example of partial application |
| 15:22:57 | → | son0p joins (~son0p@181.136.122.143) |
| 15:23:04 | <Logio> | "partial application" only really makes sense if you have a certain notion of "fully applied" in mind |
| 15:24:42 | <mastarija> | Where can I find the documentation to the "raw" arrays? I only see the documentation for the Array interface. |
| 15:25:17 | <hololeap> | both concepts are equally valid. currying is witness to an isomorphism, after all |
| 15:25:35 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 15:25:45 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 264 seconds) |
| 15:25:55 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) |
| 15:26:14 | → | haskell_newbie joins (~haskellne@111.119.187.43) |
| 15:27:27 | → | ixlun joins (~matthew@109.249.184.133) |
| 15:27:46 | <tomsmeding> | mastarija: there is https://ghc.gitlab.haskell.org/ghc/doc/libraries/ghc-prim-0.8.0/GHC-Prim.html#g:14 , but I don't know if that's all there is :p |
| 15:28:45 | <mastarija> | tomsmeding, I've found this now https://hackage.haskell.org/package/base-4.14.1.0/docs/GHC-Arr.html#t:Array |
| 15:28:53 | <mastarija> | But I'm not sure what I'm looking at :D |
| 15:29:15 | <tomsmeding> | mastarija: that's just the same array type that the 'array' package on hackage exports |
| 15:29:44 | <mastarija> | I guess that's what I want... |
| 15:29:48 | → | ezrakilty joins (~ezrakilty@97-113-58-224.tukw.qwest.net) |
| 15:30:01 | <tomsmeding> | mastarija: see the import of GHC.Arr here https://hackage.haskell.org/package/array-0.5.4.0/docs/src/Data.Array.html |
| 15:30:03 | <tomsmeding> | :) |
| 15:30:06 | <mastarija> | Do you know if this is a "C" style array? |
| 15:30:13 | <tomsmeding> | kind of? |
| 15:30:13 | <mastarija> | As in nicely packed block of memory? |
| 15:30:25 | <tomsmeding> | are you looking for performance reasons or for FFI reasons? |
| 15:30:45 | <mastarija> | FFI + a bit of fun exploring |
| 15:31:11 | <geekosaur> | sounds to me like you want a storable vector instead of an array |
| 15:31:35 | <mastarija> | I want something that's in the base and doesn't require any dependencies |
| 15:32:30 | <geekosaur> | base is overrated |
| 15:33:02 | <mastarija> | I have my reasons :D |
| 15:33:54 | <tomsmeding> | mastarija: you can have a look at the Foreign.* modules in base; there are Ptr and ForeignPtr (see their docs) |
| 15:33:56 | <mastarija> | geekosaur, actually I want something like Array primitive |
| 15:34:00 | <tomsmeding> | if you want to go really low level for some reason :P |
| 15:34:04 | <mastarija> | yep |
| 15:34:15 | <mastarija> | I guess I can just use pointers |
| 15:34:20 | × | ezrakilty quits (~ezrakilty@97-113-58-224.tukw.qwest.net) (Ping timeout: 256 seconds) |
| 15:34:29 | <tomsmeding> | for fun please do |
| 15:34:43 | <tomsmeding> | for production please re-evaluate :p |
| 15:34:46 | <mastarija> | But I was hoping for some nice [] syntax or something, I don't know |
| 15:34:58 | <tomsmeding> | [] is only lists in haskell, except with OverloadedLists |
| 15:35:28 | <mastarija> | well, I was thinking more in the lines of "get_item x array" |
| 15:35:31 | <bbhoss> | how does Debug.Trace.trace print to the screen without IO? |
| 15:35:41 | <mastarija> | unsafeIO |
| 15:35:45 | <tomsmeding> | bbhoss: unsafePerformIO |
| 15:35:57 | <bbhoss> | ah nice, so this bypasses the function needing to be tagged as IO |
| 15:36:05 | <mastarija> | yep |
| 15:36:07 | <tomsmeding> | https://hackage.haskell.org/package/base-4.14.0.0/docs/src/Debug.Trace.html#trace |
| 15:36:20 | → | Deide joins (~Deide@217.155.19.23) |
| 15:36:21 | <tomsmeding> | remember that you can look at the source, if you don't go too deep into primops :p |
| 15:36:43 | → | CrazyPyt_ joins (~crazypyth@98.122.164.118) |
| 15:37:03 | <mastarija> | One thing I really like about haskell docs is the #source link |
| 15:37:08 | × | CrazyPyt_ quits (~crazypyth@98.122.164.118) (Client Quit) |
| 15:37:25 | → | CrazyPyt_ joins (~crazypyth@98.122.164.118) |
| 15:38:39 | <tomsmeding> | bbhoss: note that unsafePerformIO is in general, well, unsafe :p |
| 15:38:49 | × | CrazyPython quits (~crazypyth@98.122.164.118) (Ping timeout: 256 seconds) |
| 15:39:02 | <tomsmeding> | even if Debug.Trace.trace itself is safe apart from its obvious side effect |
| 15:39:09 | → | conal joins (~conal@64.71.133.70) |
| 15:40:30 | <geekosaur> | playing with trace will give you some idea of just how unsafe unsafe is |
| 15:41:07 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 15:41:27 | <geekosaur> | it's not like Haskell is enforcing some weird discipline on you that you can escape from by knocking it over the head; there are actual differences in what's going on |
| 15:41:42 | × | rond_ quits (594021ff@89-64-33-255.dynamic.chello.pl) (Ping timeout: 240 seconds) |
| 15:41:47 | → | jamm__ joins (~jamm@unaffiliated/jamm) |
| 15:43:24 | geekosaur | tempted to point to inlinePerformIO "bugs", as an extreme example of what happens if you lie to ghc about IO |
| 15:43:58 | <geekosaur> | aka accursedUnutterable…\ |
| 15:45:38 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds) |
| 15:46:18 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 15:47:01 | <tomsmeding> | geekosaur: the docs for accursedUnutterablePerformIO are always fun to share |
| 15:47:55 | <tomsmeding> | but I've never had trace give me the feeling that something unsafe was going on, but maybe I've been accidentally using it correctly? |
| 15:48:19 | <tomsmeding> | (or my bar for weirdness lies high) |
| 15:48:40 | <geekosaur> | as unsafe goes it's relatively safe. the most that can happen is you see something being evaluated more or less often than you expect |
| 15:50:09 | × | incertia quits (~incertia@d4-50-26-103.nap.wideopenwest.com) (Ping timeout: 256 seconds) |
| 15:51:52 | <geekosaur> | it's when you enable it to inline "around" the IO that the really spooky stuff starts |
| 15:53:11 | → | Inoperable joins (~PLAYER_1@fancydata.science) |
| 15:54:49 | <bbhoss> | Yeah, definitely not planning on using it in production. Just curious about how it got around the compiler |
| 15:56:27 | × | mastarija quits (~mastarija@31.217.19.201) (Quit: Leaving) |
| 15:57:33 | × | frozenErebus quits (~frozenEre@94.129.70.18) (Ping timeout: 264 seconds) |
| 15:58:47 | × | peanut_ quits (~peanut@2a02:8388:a101:2600:52d3:48bc:f38c:73e) (Quit: Leaving) |
| 15:59:47 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
| 16:00:07 | → | epicte7us joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 16:02:40 | <dementorr> | Does anyone know how can I get the first match from a pcre regex? I want to get the first match of a string inside () or []: "(sth) else no " should give "(sth)" and "[other] yes maybe" should give "[other]". The regex is \(.*\)|\[.*\] but I can't find a tutorial / documentation showing how to use them. Using Text.Regex.Posix gives a error when |
| 16:02:41 | <dementorr> | using parentheses: "lexical error in string/character literal at character '('" |
| 16:03:11 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 16:03:27 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 16:03:32 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 16:03:33 | × | ep1ctetus_ quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 264 seconds) |
| 16:04:38 | → | chenshen joins (~chenshen@2620:10d:c090:400::5:1038) |
| 16:07:07 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 16:07:58 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 245 seconds) |
| 16:08:54 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) (Remote host closed the connection) |
| 16:09:27 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) |
| 16:09:31 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) |
| 16:09:46 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 16:09:59 | <d34df00d> | geekosaur: yep, inlining + unsafePerformIO sometimes gets funny: https://github.com/bos/vector-binary-instances/issues/17 (this hit me a few days ago and costed me a couple of hours to debug) |
| 16:11:59 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 16:12:37 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 16:13:06 | × | idhugo_ quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 246 seconds) |
| 16:13:29 | <ski> | maralorn,timCF : "the Haskell Type System does not make a difference between a function that takes two arguments and a function that takes one argument and returns a function that accepts another argument." -- Haskell doesn't have multiple argument functions, so the assertion about not making a difference doesn't make any sense (neither true nor false. "type incorrect", one might say). curried style is a |
| 16:13:36 | <ski> | convention that exists in people's head, not in Haskell (although it has syntax (and library operations) that encourages it, and partial application) |
| 16:14:26 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) (Ping timeout: 264 seconds) |
| 16:15:26 | <ski> | (also, i'd call `\y -> foo x0 y z0' and `\y -> bar (x0,y,z0)' partial applications of `foo' and `bar'. so the term not only applies to applying a function in curried style to some prefix of its arguments, although that case is particularly nice to express, syntactically) |
| 16:15:38 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) (Ping timeout: 264 seconds) |
| 16:16:22 | <ski> | (it would be nice if a language with light-weight records (like e.g. OCaml) had a nice notation for partially applying a function by giving some of the fields of the record argument, getting back a function that takes a record expecting the remaining ones) |
| 16:16:45 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds) |
| 16:17:24 | × | renzhi quits (~renzhi@modemcable070.17-177-173.mc.videotron.ca) (Ping timeout: 256 seconds) |
| 16:18:52 | × | chenshen quits (~chenshen@2620:10d:c090:400::5:1038) (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 16:18:59 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 16:22:22 | <hpc> | that would be interesting at the type level, just expressing the type of a partial record like that |
| 16:23:44 | × | Sathiana quits (~kath@185-113-98-38.cust.bredband2.com) (Quit: WeeChat 3.0) |
| 16:24:48 | × | ixlun quits (~matthew@109.249.184.133) (Read error: Connection reset by peer) |
| 16:25:36 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 16:25:55 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) |
| 16:27:21 | → | chisui joins (577bc921@i577BC921.versanet.de) |
| 16:28:04 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) |
| 16:28:41 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 16:29:33 | × | Pickchea quits (~private@unaffiliated/pickchea) (Ping timeout: 246 seconds) |
| 16:31:45 | × | son0p quits (~son0p@181.136.122.143) (Quit: leaving) |
| 16:31:48 | → | elusive joins (~Jeanne-Ka@static-198-54-134-93.cust.tzulo.com) |
| 16:32:48 | <ski> | well, given `f : { name : string , age : int } -> blah', you could maybe have something like `f o { age = 42 | } : { name : string } -> blah' |
| 16:33:30 | <hpc> | oh, when you put it that way i guess it's not that interesting :P |
| 16:35:23 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 260 seconds) |
| 16:35:37 | <ski> | heh :b |
| 16:36:35 | <ski> | i guess one could consider a dedicated syntax for the partial application, maybe. what i sketched was just a composition with a "section" of a record construction |
| 16:38:17 | <ski> | OCaml does have labelled arguments (including possibility for optional ones), which can be partially applied. see <https://caml.inria.fr/pub/docs/manual-ocaml/lablexamples.html> (also describes light-weight ("polymorphic") variants) |
| 16:38:59 | → | frozenErebus joins (~frozenEre@94.129.70.18) |
| 16:39:08 | × | dementorr quits (5678f228@86.120.242.40) (Quit: Connection closed) |
| 16:42:49 | → | chenshen joins (~chenshen@2620:10d:c090:400::5:1038) |
| 16:43:04 | <monochrom> | "(\x -> f c0 c1 c2 x c3)" is dedicated syntax for partial application >:) |
| 16:43:29 | <ski> | hah :) |
| 16:47:33 | × | Zetagon quits (~leo@c151-177-52-233.bredband.comhem.se) (Remote host closed the connection) |
| 16:48:27 | × | benkolera quits (uid285671@gateway/web/irccloud.com/x-ewecqecbsbwhnnil) (Quit: Connection closed for inactivity) |
| 16:49:59 | × | teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 268 seconds) |
| 16:50:06 | → | incertia joins (~incertia@d4-50-26-103.nap.wideopenwest.com) |
| 16:51:56 | → | hexagenic_ joins (~mattias@81-224-107-147-no71.tbcn.telia.com) |
| 16:55:03 | → | tenniscp25 joins (~tenniscp2@134.196.209.118) |
| 16:55:45 | × | hexagenic quits (~mattias@81-224-107-147-no71.tbcn.telia.com) (Ping timeout: 264 seconds) |
| 16:56:41 | → | teardown joins (~user@gateway/tor-sasl/mrush) |
| 16:58:12 | × | frozenErebus quits (~frozenEre@94.129.70.18) (Ping timeout: 256 seconds) |
| 16:58:21 | → | hexagenic__ joins (~mattias@81-224-107-147-no71.tbcn.telia.com) |
| 17:01:14 | <timCF> | Hello! Does anybody know why 2nd Functor law is needed? It will be always true in cases where 1st law is true. |
| 17:02:08 | × | hexagenic_ quits (~mattias@81-224-107-147-no71.tbcn.telia.com) (Ping timeout: 245 seconds) |
| 17:02:49 | <ski> | how do you mean ? |
| 17:02:54 | <monochrom> | Haskell enjoys a parametricity theorem that makes what you're saying true. An arbitrary category doesn't have this luxury. |
| 17:03:43 | <ski> | (i don't know how the first one holding would be relevant for ensuring the second one) |
| 17:04:26 | <timCF> | monochrom: thanks for reply! |
| 17:05:04 | → | hexagenic joins (~mattias@81-224-107-147-no71.tbcn.telia.com) |
| 17:05:46 | → | hexagenic_ joins (~mattias@81-224-107-147-no71.tbcn.telia.com) |
| 17:07:38 | × | blissful quits (~blissful@unaffiliated/azuline) (Quit: owo) |
| 17:07:39 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 17:08:23 | × | hexagenic__ quits (~mattias@81-224-107-147-no71.tbcn.telia.com) (Ping timeout: 245 seconds) |
| 17:08:48 | × | conal quits (~conal@64.71.133.70) (Ping timeout: 245 seconds) |
| 17:09:27 | × | hexagenic quits (~mattias@81-224-107-147-no71.tbcn.telia.com) (Ping timeout: 246 seconds) |
| 17:10:03 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) |
| 17:12:00 | → | idhugo_ joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 17:12:15 | <chisui> | wouldn't `const unsafeCoerce` also satisfy the identity law? |
| 17:12:49 | → | mastarija joins (~mastarija@31.217.19.201) |
| 17:12:56 | → | conal joins (~conal@ip-66-115-176-177.creativelink.net) |
| 17:13:00 | hexagenic_ | is now known as Hexagenic |
| 17:13:42 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:e0d0:506b:db48:8ec8) (Remote host closed the connection) |
| 17:13:59 | <edmundnoble> | "Parametricity" and "unsafeCoerce" in the same sentence? :^) |
| 17:14:18 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) |
| 17:14:40 | <edmundnoble> | `const unsafeCoerce` also satisfies the composition law, from what I can tell |
| 17:14:47 | <edmundnoble> | `unsafeCoerce . unsafeCoerce == unsafeCoerce` |
| 17:15:00 | × | mastarija quits (~mastarija@31.217.19.201) (Client Quit) |
| 17:15:02 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) (Ping timeout: 264 seconds) |
| 17:15:02 | × | stree quits (~stree@68.36.8.116) (Quit: Caught exception) |
| 17:15:04 | <chisui> | Well I just built a bad `Proxy` I guess. |
| 17:15:26 | → | stree joins (~stree@68.36.8.116) |
| 17:15:38 | <edmundnoble> | If you use `const unsafeCoerce` that will typecheck for anything, not just `Proxy` and things isomorphic to it |
| 17:15:53 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:16:03 | <edmundnoble> | I guess this is one reason why we need the free theorems for `fmap` to determine that there is only one lawful instance of `Functor` per type |
| 17:16:25 | <chisui> | I was just trying to break the second law |
| 17:17:12 | → | tsaka__ joins (~torstein@ppp-94-65-45-45.home.otenet.gr) |
| 17:17:35 | → | dsrt^ joins (dsrt@ip98-184-89-2.mc.at.cox.net) |
| 17:18:30 | <edmundnoble> | As a counterexample to the "second functor law is always true in cases where the first law is true"? If so, parametricity is part of the proof if I understand correctly, so `unsafeCoerce` would be cheating if it worked |
| 17:18:32 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) (Ping timeout: 240 seconds) |
| 17:18:43 | × | kuribas quits (~user@ptr-25vy0i7q7d8r48rlgds.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 17:20:40 | <edmundnoble> | Hm maybe you can cheat another way, iirc you can sort of recover types at runtime by looking at the runtime's data structures |
| 17:21:04 | <chisui> | without `Typeable`? |
| 17:21:24 | <edmundnoble> | Yes, it was packaged up in https://hackage.haskell.org/package/recover-rtti |
| 17:21:44 | <edmundnoble> | Oh you might also be able, and this is very cheeky, you could use `reallyUnsafePtrEquality` to "detect" `id` |
| 17:22:01 | <edmundnoble> | Check if `f x` is pointer-equal to `x`, and do something special in that case |
| 17:22:57 | <edmundnoble> | That will detect functions which are operationally the same as `id`, but there are going to be other functions which are extensionally the same as `id` that it won't work with, like `\(C x) -> C x` |
| 17:23:52 | <chisui> | Ok, but all these break parametricity. But there is really no way to break the composition law while satisfying the identity law without breaking parametricity. |
| 17:24:06 | <ski> | (unless `C' is a `newtype' data constructor) |
| 17:24:23 | <edmundnoble> | Right, there is no way |
| 17:24:26 | <dolio> | All these 'really unsafe' things are irrelevant, because they are not sound with respect to the semantics used to talk about parametricity. |
| 17:24:28 | <edmundnoble> | And yes true ski |
| 17:24:56 | × | elliott_ quits (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 17:25:16 | <edmundnoble> | dolio: because they also break the type system in some way? |
| 17:26:48 | × | jamm__ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 17:28:23 | → | DavidEichmann joins (~david@47.27.93.209.dyn.plus.net) |
| 17:28:27 | <edmundnoble> | I guess you need to have a notion of "equality" to have a semantics at all, and that notion of equality won't brook `x == y -/> f x == f y` |
| 17:29:57 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 17:30:12 | → | rybern joins (18c25abd@cpe-24-194-90-189.nycap.res.rr.com) |
| 17:30:30 | → | ADG1089__ joins (~aditya@27.58.165.185) |
| 17:30:32 | × | plutoniix quits (~q@node-uhl.pool-125-24.dynamic.totinternet.net) (Ping timeout: 240 seconds) |
| 17:30:34 | → | frozenErebus joins (~frozenEre@94.129.70.18) |
| 17:30:37 | <edmundnoble> | The "equations" part of "equational reasoning" breaks |
| 17:30:57 | ADG1089__ | is now known as ADG1089 |
| 17:31:08 | <ADG1089> | can someone explain https://github.com/haskell/cabal/issues/6221 in simple terms? |
| 17:31:15 | <ski> | extensionality |
| 17:31:27 | × | tsaka__ quits (~torstein@ppp-94-65-45-45.home.otenet.gr) (Remote host closed the connection) |
| 17:32:32 | <edmundnoble> | ski: no, congruence of equality |
| 17:32:51 | <dolio> | The point of parametricity is that it models of how 99.999% of written code works, and is useful for reasoning about that portion of code. That doesn't mean that you can't just add non-parametric functions and have something different, or that certain low level escape hatches won't act that way. So going and looking for the latter is misunderstanding the point of the model. |
| 17:32:57 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 264 seconds) |
| 17:33:40 | <ski> | yes. but sometimes it's expressed as an operation being extensional. e.g. Bishop defines a function as an operation that respects the equivalence relation that his (basically) setoids come equipped with |
| 17:33:41 | × | orion quits (~orion@unaffiliated/orion) (Remote host closed the connection) |
| 17:33:45 | <edmundnoble> | ADG1089: Don't add `-O` options to ghc-options in your .cabal file, tell `cabal` that you want an optimization level by adding it as a flag |
| 17:33:59 | <edmundnoble> | Either to your cabal.project file or to your cabal invocation |
| 17:34:09 | × | srk quits (~sorki@gateway/tor-sasl/sorki) (Remote host closed the connection) |
| 17:34:09 | × | hexo quits (~hexo@gateway/tor-sasl/hexo) (Remote host closed the connection) |
| 17:34:11 | <ski> | er, to clarify, defines that property as the operation being extensional, and then being a function |
| 17:34:13 | → | Lycurgus joins (~niemand@98.4.116.165) |
| 17:34:22 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 17:34:23 | → | srk joins (~sorki@gateway/tor-sasl/sorki) |
| 17:34:28 | → | hexo joins (~hexo@gateway/tor-sasl/hexo) |
| 17:34:48 | <ADG1089> | edmundnoble: cabal.project, right? I think then I can push it to git too |
| 17:35:39 | <edmundnoble> | Yes, `optimization: 2` in there or whichever you want |
| 17:35:51 | <edmundnoble> | Or you can put it in `cabal.project.local`which is traditionally in `.gitignore` |
| 17:36:18 | <ADG1089> | I actually want the maximum performance so I'll need to check in the file |
| 17:36:35 | <geekosaur> | -O2 doesn't necessarily mean max performance |
| 17:36:35 | <geekosaur> | \ |
| 17:36:56 | <geekosaur> | it means expensive optimization passes that may end up doing nothing or even pessimizing |
| 17:37:13 | <ADG1089> | I'll try some benchmarks using that |
| 17:37:27 | → | Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 17:37:35 | <ADG1089> | also can i speread a function definition over multiple files like f 1 in file 1 and f 2 in file 2 and f 3 in file 3 and so on |
| 17:37:39 | <ADG1089> | *spread |
| 17:37:46 | <geekosaur> | nope |
| 17:37:47 | <edmundnoble> | No |
| 17:38:15 | × | Hi-Angel quits (~constanti@broadband-188-32-15-112.ip.moscow.rt.ru) (Read error: Connection reset by peer) |
| 17:38:19 | <rybern> | So I have this basic question that keeps coming up in applications. Suppose I want to have components that declare effects like (MonadReader Int m, MonadReader String m) =>, so that I can also execute the effects one at a time with e.g. runReaderT 0. How do people usually solve this? I don't think I should have to use a Free-based effect library, |
| 17:38:20 | <rybern> | and capability seems like a very heavy solution with all of the newtypes. The best solution I've found is Ether, but it's not maintained anymore, so people must be using something else |
| 17:38:40 | <ski> | no mixin module like things |
| 17:39:24 | → | __minoru__shirae joins (~shiraeesh@77.94.25.47) |
| 17:41:08 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 17:42:36 | × | tenniscp25 quits (~tenniscp2@134.196.209.118) (Remote host closed the connection) |
| 17:43:07 | <chisui> | rybern you could use Effect systems like https://hackage.haskell.org/package/freer-effects |
| 17:43:16 | → | tenniscp25 joins (~tenniscp2@134.196.209.118) |
| 17:44:53 | × | rajivr quits (uid269651@gateway/web/irccloud.com/x-tunnvuktqcelikkp) (Quit: Connection closed for inactivity) |
| 17:44:55 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) |
| 17:45:26 | <rybern> | thanks chisui, I looked into that one and it's probably what I'll do. I think what I'm asking is why we can't have that simple pattern with mtl, Ether seemed to solve the problem but no one used it |
| 17:45:53 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds) |
| 17:45:56 | → | DTZUZU_ joins (~DTZUZO@205.ip-149-56-132.net) |
| 17:46:03 | × | DTZUZU quits (~DTZUZO@205.ip-149-56-132.net) (Read error: Connection reset by peer) |
| 17:46:07 | DTZUZU_ | is now known as DTZUZU |
| 17:46:14 | × | xff0x_ quits (~xff0x@2001:1a81:52b5:3300:bd27:5212:7f1:6207) (Ping timeout: 264 seconds) |
| 17:46:32 | × | malumore quits (~malumore@151.62.127.88) (Ping timeout: 240 seconds) |
| 17:46:41 | → | xff0x_ joins (~xff0x@2001:1a81:52b5:3300:c707:488e:58f1:2927) |
| 17:47:15 | → | Garbanzo joins (~Garbanzo@70.234.205.193) |
| 17:47:44 | × | tenniscp25 quits (~tenniscp2@134.196.209.118) (Ping timeout: 240 seconds) |
| 17:48:27 | <dolio> | Having multiple, scoped instances like that would require not using fundeps, which would make inference bad. |
| 17:48:35 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 17:48:47 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 17:49:06 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 17:49:46 | <dolio> | And it might get kind of confusing if there are cases where the environment type is not known to be the same, but then end up the same, and such. |
| 17:49:48 | → | dcoutts joins (~dcoutts@unaffiliated/dcoutts) |
| 17:50:20 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 17:50:35 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) (Ping timeout: 272 seconds) |
| 17:51:04 | <carter> | agreed with dolio |
| 17:52:16 | <edmundnoble> | IMO, "effects" has just not worked out as an abstraction in the way people want it to. There are basically three concerns which people are tempted to combine which are best kept separate: composing `>>=` implementations, abstracting over `>>=` implementations, and composing datatypes. Respectively, transformers, mtl, and lens solve these problems well |
| 17:52:16 | <carter> | and more broadly, theres an issue with writing transformer / mtl code as MonadFoo m, MonadBar m) =>, namely that youre presuming that the operations in those nested monads commute |
| 17:52:33 | <ski> | wouldn't the only way for that operation to access the environment, in a way that relevantly depends on those constraints, be via the overloaded class methods, not using `lift' and the like to select ? |
| 17:52:36 | <carter> | and thats actually *missing* the real power of monad transformers |
| 17:52:41 | <dolio> | The way type classes work, they best match having a unique instance of each 'effect' for a particular `m`, and other possible instances are rendered invisible. |
| 17:52:42 | <edmundnoble> | Uh yeah >>= and the algebras etc |
| 17:53:03 | → | plutoniix joins (~q@ppp-27-55-75-62.revip3.asianet.co.th) |
| 17:53:08 | <carter> | in any real library, you should have a concrete "core " stack thats actually known and fixed, and just some helpers for allowing new user monad stacks to also work |
| 17:53:14 | <carter> | name and tame the power |
| 17:53:17 | <carter> | with a newtype |
| 17:54:02 | <carter> | like, a lot of peoples mains with transformer stacks would be solved if they choose a specifc one for their application, new type it |
| 17:54:08 | <carter> | and give it the interfaces/instances they need |
| 17:54:11 | <carter> | and then they default to using that |
| 17:54:18 | <carter> | (also their code would be faster and type inference better) |
| 17:54:32 | <ski> | carter : not necessarily presuming they commute (although prople probably often expect that, in some way, without reflecting upon it). but leaving the ordering up to the caller may not be what one intended, possibly leaking implementation details, or breaking invariants, preconditions & postconditions |
| 17:54:41 | <chisui> | rybern: You could also create a container product type that contains all these values. Alternatively you could create your own classes that provide access to these values like `HasInt a, MonadReader a m` |
| 17:54:43 | <carter> | yeah |
| 17:54:50 | <carter> | ski: , yeah |
| 17:54:54 | <dolio> | ski: Yeah, in effect systems that allow multiple copies of an effect to be in play (e.g. Koka), the effects are not completely reorderable, so you can sort of abstractly specify which to use. |
| 17:54:58 | <carter> | hence they should always newtype and make a fresh one |
| 17:55:11 | <dolio> | But type classes aren't like that. |
| 17:55:17 | ski | nods |
| 17:55:21 | <carter> | oh that reminds me, no one actually has a sane store for commuting effects |
| 17:55:26 | <carter> | they just say "there should be one" |
| 17:55:26 | ski | probably needs to look at Koka some time |
| 17:55:26 | <monochrom> | "(MonadReader Int m, MonadReader String m) =>" is the product of an XY problem. A direct X solution is "(ReadTime m, HasTitle m) =>", and you tailor-design the ReadTime class and the HasTitle class to be problem-specific classes. |
| 17:56:02 | <dolio> | carter: Frank has a story. |
| 17:56:32 | <carter> | frank the code or one of the papers on frank? is that the one where you write the handler sortha? |
| 17:56:41 | <carter> | and install that in the dynamics/lexical scope? |
| 17:57:03 | <dolio> | Not sure about the code, but there's a revised draft of the paper that talks about 'adaptors'. |
| 17:57:09 | <edmundnoble> | Even that's arguably an XY problem |
| 17:57:38 | <edmundnoble> | You don't get a good design for your program by just making all of the record fields into abstractions |
| 17:57:51 | <carter> | yeah |
| 17:57:53 | <dolio> | It basically allows you to do manual structural munging of the effect context. |
| 17:58:03 | <carter> | which isn't something most people actually should do |
| 17:58:14 | <carter> | what fancy things does that enable ? i forget |
| 17:58:15 | <monochrom> | Yeah, probably ReadTime and HasTitle should be merged into one single MyProblemSpecificClass class. |
| 17:58:32 | <monochrom> | and it just has to have a "gettime" method and a "gettile" method. |
| 17:59:45 | <rybern> | chisui re: creating a product type - I could do that but it doesn't compose, I can't then partially execute one of the readers |
| 17:59:56 | <dolio> | carter: It's essential for being abstract with respect to certain effects, at least. Like, you need to be able to say, 'handle the Foo effect in my code, but not the Foo effect in higher-order stuff passed into me,' because otherwise your types become littered with all the effect-based implementation details of your code. |
| 18:00:24 | <dolio> | Because it will 'accidentally' handle the higher-order stuff that is supposed to be opaque to you. |
| 18:01:15 | <dolio> | Koka has a similar thing. There's an example of how you can use it for, like, de Bruijn like multiple state variables, but that doesn't seem very compelling. |
| 18:01:31 | <rybern> | carter re: one concrete stack -- this doesn't allow the same modularity IMO, e.g. you can't reuse functions between applications that have overlapping capabilities, and also I often change the stack throughout the application |
| 18:01:33 | <dolio> | Because de Bruijn is bad for people to actually write. |
| 18:01:41 | <carter> | yes you can |
| 18:01:55 | <Franciman> | Haskell is a programming language for the past |
| 18:01:56 | <carter> | rybern: you just make sure theres a type class for the reuse |
| 18:02:11 | <Franciman> | thank you haskell for having become the past, it means you had a great influence on everybody |
| 18:02:13 | <Franciman> | :') |
| 18:02:44 | <rybern> | monochrom if I could avoid extra boilerplate for implementing ReadTime and HasTitle that would be great, but avoiding that an advantage of e.g. Ether |
| 18:02:48 | × | alx741 quits (~alx741@181.196.69.79) (Ping timeout: 256 seconds) |
| 18:03:01 | <maralorn> | ski: It’s nice how you said exactly what I meant by phrasing it like I had said the opposite. ^^ |
| 18:03:13 | <monochrom> | You can newtype-wrap ReaderT Int for your instance of ReadTime. |
| 18:03:51 | <rybern> | carter so is the idea to make a big stack, make a new typeclass for each capability i want, write instances for each capability for each stack? |
| 18:03:55 | <edmundnoble> | Record structure is just not in itself a good design, neither is a rephrased version in terms of "effect structure". This is why encapsulation was such a big deal; turns out, exposing all of the details of your data structure is usually extremely brittle |
| 18:04:07 | <carter> | rybern: one type class for your stack |
| 18:04:14 | <carter> | unless you actually have a good reason to split it |
| 18:04:28 | <edmundnoble> | Right, YAGNI |
| 18:04:30 | <rybern> | monochrom I think that's what I didn't understand from capabilities library. How does that work when I have a big stack of ReaderTs? |
| 18:04:30 | <carter> | but by default work wqith a new type wrappe ron your stack |
| 18:04:45 | <carter> | agreed with edmundnoble |
| 18:04:50 | <carter> | hes explaining it pretty nicely |
| 18:05:13 | × | Hexagenic quits (~mattias@81-224-107-147-no71.tbcn.telia.com) (Ping timeout: 260 seconds) |
| 18:06:00 | <carter> | any time you do a type synonym instead of a new type, stop and first try making it nice with a new type |
| 18:06:13 | <carter> | is rule of thumb -11 |
| 18:06:39 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 18:06:53 | <rybern> | so say I have function x that uses capability (X m) and a function y that uses capability (Y m), and I want to share those between stacks that share those capabilities |
| 18:07:08 | <rybern> | how does that work when I have one type class for my stack |
| 18:07:29 | → | Shiranai joins (beed0df5@gateway/web/cgi-irc/kiwiirc.com/ip.190.237.13.245) |
| 18:08:29 | <edmundnoble> | There is a tension here, you can't have totally fine-grained dependencies or you have brittleness |
| 18:08:30 | → | tenniscp25 joins (~tenniscp2@134.196.209.118) |
| 18:08:34 | <edmundnoble> | You have to choose how course-grained you want them to be |
| 18:08:36 | <edmundnoble> | It's an art |
| 18:08:48 | → | Hexagenic joins (~mattias@81-224-107-147-no71.tbcn.telia.com) |
| 18:09:27 | <edmundnoble> | You don't get to just say "well I want to have all of everything always be pluggable everywhere", you have to define interfaces between components of your program |
| 18:09:56 | <edmundnoble> | Type classes are tempting here because they sort of "automatically" propagate instances, but they can't solve this problem for you, just make some parts of it easier |
| 18:10:07 | <carter> | yeah |
| 18:10:17 | <carter> | you dont have abstraction till you name it :) |
| 18:10:19 | <carter> | sortah |
| 18:10:46 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) |
| 18:11:07 | <Shiranai> | Hello I'm doing the fp-course and I have this function `readFile :: FilePath -> IO String`. I was trying to make the function `getFile :: FilePath -> IO (FilePath, String)`. My solution for that was `getFile f = lift2 (,) (readFile f) (pure f)`. The solution given was `getFile = lift2 (<$>) (,) readFile`. Thing is I have no idea what that code |
| 18:11:07 | <Shiranai> | means. In particular, what does fmap here does? I.e. with respect with what functor is it? Same thing with lift2, with respect with what applicative is it? |
| 18:11:17 | <rybern> | I'm happy to name things and define interfaces, that's not really what I'm asking |
| 18:11:40 | <rybern> | In e.g. Ether, you give all of your capabilities tags, which does a nice job of naming things |
| 18:12:02 | <rybern> | but you still get to use the derived behavior from mtl |
| 18:12:12 | → | todda7 joins (~torstein@2a02:587:1b1c:3b00:c1d0:c187:5cec:e77f) |
| 18:12:12 | <monochrom> | Sorry, what is "the fp-course" again? |
| 18:12:46 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 18:13:17 | <monochrom> | And what is "lift2"? |
| 18:13:43 | <edmundnoble> | Sure, what I'm saying is basically that there is a cost to having all of these named capabilities which you can sort of pull apart and operate on independently at will |
| 18:13:47 | <bbhoss> | I'm counting the number of occurrences in a list, what's the best way to see if one of the occurrences is a majority of the list? I've got the count and was going to just check that `leaderCount > totalCount * 0.5` but I am getting a type error around the multiplication, because totalCount is an Int |
| 18:14:10 | <edmundnoble> | And that cost is roughly speaking brittleness and low cohesion |
| 18:14:15 | <monochrom> | And I think the intention is "lift2 (,) (pure f) (readFile f)" |
| 18:14:33 | <edmundnoble> | This is why we put some effort into making pieces of code agree to work on particular monad transformer stacks |
| 18:14:45 | <hpc> | bbhoss: you need to convert to a floating point number type |
| 18:14:54 | <hpc> | or instead of multiplying by 0.5, you could multiply by 2 instead :P |
| 18:14:59 | <Shiranai> | monochrom: https://github.com/system-f/fp-course The FileIO.hs , lift2 is lifta2 I think |
| 18:15:04 | <edmundnoble> | Because if we didn't, maybe in the abstract it looks like we have code which "works totally independently", but we've only moved the complexity of using it together elsewhere |
| 18:15:19 | <bbhoss> | is that what I really want? I guess I could convert and the get the ceil of the result? |
| 18:15:34 | <Shiranai> | Monochrom: yeah I think the intention is what I wrote, but I have absolutely no idea how to translate it to that |
| 18:15:38 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) (Ping timeout: 264 seconds) |
| 18:15:40 | <bbhoss> | it's a voting system so accuracy is kinda important |
| 18:15:52 | → | xiinotulp joins (~q@ppp-223-24-94-215.revip6.asianet.co.th) |
| 18:16:05 | <rybern> | edmundnoble sure, it is possible to go too far with modularity, you can get a sort of false generalization.. but sometimes that isn't a problem, and that's the case I'm asking about. E.g. in my applications, I have almost never cared about the order on the stack |
| 18:16:08 | <hpc> | leaderCount * 2 > totalCount |
| 18:16:14 | <monochrom> | I think "lift2 (<$>) (,) readFile" uses ((->) String) for lift2, and IO for fmap. |
| 18:16:21 | <hpc> | or fromIntegral leaderCount > fromIntegral totalCount * 0.5 |
| 18:16:29 | <monochrom> | I would consider it a smartass solution. |
| 18:16:59 | → | DevTurks[m] joins (turkdevops@gateway/shell/matrix.org/x-wvhgcgjcsihqdnpv) |
| 18:17:21 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds) |
| 18:17:54 | <Shiranai> | monochrom: thanks it was driving me insane that someone can just read that |
| 18:18:10 | <hpc> | as long as you aren't counting more than 2**52 votes, using Double instead of Int is probably fine :P |
| 18:18:26 | <ski> | maralorn : i guess that i was aiming at was that `foo :: (String,Int) -> Bool' or `foo :: Person -> Bool' with `data Person = MkPerson {name :: String,age :: Int}' would have just as much (or little) claim to being "a function that takes two arguments" as `foo :: String -> (Int -> bool)' does. (and clearly there's a difference between the former two, and "a function that takes one argument and returns a |
| 18:18:32 | <ski> | function that accepts another argument"). but i'm sorry if what you meant was consonant with this, and i managed to interpret it otherwise, and make it sound like you didn't |
| 18:18:37 | × | CrazyPyt_ quits (~crazypyth@98.122.164.118) () |
| 18:18:41 | <monochrom> | Oh, I have math talent and training, that's how I managed. :) |
| 18:19:00 | → | ezrakilty joins (~ezrakilty@97-113-58-224.tukw.qwest.net) |
| 18:19:06 | <ski> | @where Data61 |
| 18:19:06 | <lambdabot> | Data61 Functional Programming Course <https://github.com/data61/fp-course>,<https://qfpl.io/links/2017-october-fp-course/> by Tony Morris,Mark Hibberd. Also see the channel #qfpl |
| 18:19:09 | <rybern> | anyway, gotta run, thanks for the conversation |
| 18:19:14 | × | plutoniix quits (~q@ppp-27-55-75-62.revip3.asianet.co.th) (Ping timeout: 256 seconds) |
| 18:19:17 | <edmundnoble> | Ah me too hehe |
| 18:19:29 | × | rybern quits (18c25abd@cpe-24-194-90-189.nycap.res.rr.com) (Quit: Connection closed) |
| 18:19:33 | <edmundnoble> | I think we were getting somewhere, too |
| 18:20:06 | <monochrom> | ski, data61 is once again renamed to system-f because the company is now called system-f, it may be a different company or it may be a spinoff of data61 or ... |
| 18:20:10 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 18:20:24 | <ski> | hm. i forget what the previous name was |
| 18:20:31 | <monochrom> | I have decided to just call it "the Morris course" because that's the only real invariant. |
| 18:20:40 | <monochrom> | nicta |
| 18:20:45 | <ski> | oh, right |
| 18:20:57 | × | chenshen quits (~chenshen@2620:10d:c090:400::5:1038) (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 18:21:10 | <ski> | @where NICTA |
| 18:21:11 | <lambdabot> | https://github.com/nicta/course |
| 18:21:14 | <monochrom> | http://www.vex.net/~trebla/haskell/learn-sources.html#problem-set-by-tony-morris-et-al. :) |
| 18:21:36 | → | pavonia joins (~user@unaffiliated/siracusa) |
| 18:22:29 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 18:22:44 | ski | . o O ( "QFPL lives in UTC+10 and speaks Zulu time. | UBT ~ Unethical Brisbane Time. There is a possibility that it is UTC+10" ) |
| 18:23:09 | × | __minoru__shirae quits (~shiraeesh@77.94.25.47) (Ping timeout: 256 seconds) |
| 18:23:37 | → | __minoru__shirae joins (~shiraeesh@77.94.25.47) |
| 18:25:17 | <monochrom> | Shiranai: And I should be saying ((->) FilePath) instead of ((->) String) for better clarity. |
| 18:26:37 | <monochrom> | It is a bit sad that FilePath and String are the same thing, so (filename, filecontent) and (filecontent, filename) have the same type, so if you use the wrong order you won't notice it. |
| 18:26:59 | <Shiranai> | monochrom: hey I've tried to parse the types of the function earlier and I'm stucked: `:t lift2 (<$>)` gets me `lift2 (<$>) :: (Applicative k1, Functor k2) => k1 (a -> b) -> k1 (k2 a) -> k1 (k2 b)`. Replacing k1 here with `(->) a` I get `lift2 (<$>) :: (Functor k) => (a -> (a -> b)) -> (a -> (k a)) -> (a -> (k2 b))` |
| 18:27:06 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 18:27:27 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 18:27:36 | <Shiranai> | but here `(,) :: a -> b -> (a, b)` |
| 18:27:44 | <edmundnoble> | You're mixing up your `a`'s |
| 18:28:01 | <Shiranai> | so they don't seem to fit |
| 18:28:08 | <monochrom> | Consider (,) :: FilePath -> String -> (FilePath, String) |
| 18:28:12 | <edmundnoble> | There are two unrelated type variables in the "replaced" type signature you gave for lift2 |
| 18:28:37 | <edmundnoble> | That have the same name, a |
| 18:28:41 | <Shiranai> | edmundnoble: so k` is not `(->) a` but say `(-> c)`? |
| 18:28:59 | <edmundnoble> | That would help yes |
| 18:28:59 | <monochrom> | a = String = FilePath. b = (FilePath, String). k = k2 = IO |
| 18:29:22 | × | Lycurgus quits (~niemand@98.4.116.165) (Quit: Exeunt) |
| 18:30:22 | <Shiranai> | Ok then following monochrom `lift2 (<$>) :: (Functor k) => (FilePath -> (FilePath -> (FilePath, String)) -> (FilePath -> (IO FilePath)) -> (FilePath -> (IO (FilePath, String)))` |
| 18:30:48 | <monochrom> | This is why I call it a smartass solution. |
| 18:30:59 | <Shiranai> | ohhh but they are using the fact that FilePath = string |
| 18:31:05 | <Shiranai> | that's kinda cheating |
| 18:31:32 | <Shiranai> | or am I understanding incorrectly? |
| 18:31:45 | <monochrom> | You are understanding it perfectly now. |
| 18:32:05 | → | minoru_shiraeesh joins (~shiraeesh@109.166.57.171) |
| 18:32:36 | <Shiranai> | haha doubt it but I think I'm closer now, key thing I was missing is `b` is `(FilePath, String)`, thank you again! |
| 18:32:57 | × | __minoru__shirae quits (~shiraeesh@77.94.25.47) (Ping timeout: 264 seconds) |
| 18:33:16 | × | frozenErebus quits (~frozenEre@94.129.70.18) (Ping timeout: 276 seconds) |
| 18:34:05 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 18:34:25 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 18:37:03 | → | ixlun joins (~matthew@109.249.184.133) |
| 18:37:45 | <hololeap> | :t liftA2 (<$>) (,) |
| 18:37:47 | <lambdabot> | Functor f => (a1 -> f a2) -> a1 -> f (a1, a2) |
| 18:39:38 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 18:40:41 | → | chenshen joins (~chenshen@2620:10d:c090:400::5:1038) |
| 18:41:47 | <joel135> | Is this some strength thing? |
| 18:42:21 | × | darjeeling_ quits (~darjeelin@122.245.217.128) (Ping timeout: 265 seconds) |
| 18:44:38 | <joel135> | Hm! "Applicative functors are the programming equivalent of lax monoidal functors with tensorial strength in category theory." Didn't know that. |
| 18:45:45 | <ski> | looks like `strength' with `graph' |
| 18:46:42 | × | tenniscp25 quits (~tenniscp2@134.196.209.118) () |
| 18:48:21 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 18:48:41 | <ski> | @let graph :: Arrow ar => ar a b -> ar a (a,b); graph f = arr id &&& f; cograph :: ArrowChoice ar => ar a b -> ar (Either a b) b; cograph f = f ||| arr id |
| 18:48:43 | <lambdabot> | Defined. |
| 18:49:02 | <joel135> | What's graph? |
| 18:49:10 | <joel135> | Oh |
| 18:49:12 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 18:49:33 | <ski> | the graph of a morphism, as a subobject of the product of its domain and codomain |
| 18:49:38 | <unyu> | Never mind “graph”, what exactly is a “cograph”? |
| 18:50:10 | <ski> | the corresponding factor object of the coproduct of the domain and codomain of a morphism |
| 18:50:21 | <unyu> | Oh, you meant “graph” in the sense of “graph of a function”, rather than graph theory's graphs... |
| 18:50:28 | <ski> | yes |
| 18:50:52 | <ski> | a cograph is more or less a table of input-output mappings of a function |
| 18:51:40 | <ski> | or, depicting the domain and codomain as two ovals, or lines, with arrows from one to the other indicating the individual element mappings |
| 18:52:24 | <ski> | putting each element of the codomain into an equivalence class with the elements of the domain mapping to it (construing the domain and codomain to be disjoint), gives you the factor object |
| 18:53:04 | → | ph88 joins (~ph88@2a02:8109:9e00:7e5c:d4b6:e9e6:3cda:8e26) |
| 18:53:13 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 18:53:31 | <unyu> | When you say “factor object”, do you mean “quotient object”? |
| 18:53:34 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 18:53:38 | <ski> | (so, regarding the "maps to" arrows as graph edges (in the other sense of "graph"), you're taking the connected components) |
| 18:53:43 | <ski> | yes, that's the same thing |
| 18:53:53 | <unyu> | Your use of the term “factor” somehow reminded me of exact sequences... |
| 18:54:02 | → | malumore joins (~malumore@151.62.127.88) |
| 18:55:13 | → | darjeeling_ joins (~darjeelin@122.245.208.187) |
| 18:55:40 | → | motersen joins (~user@2001-4dd1-d88a-0-5338-d0f4-6eda-2a0f.ipv6dyn.netcologne.de) |
| 18:56:41 | <ski> | (but i dislike the term "quotient" in this context, since it's not a quotient really. it corresponds to the multiplier, not to the multiplicand, in a multiplication. consider e.g. normal subgroups and corresponding factor groups. the normal subgroup is the multiplicand (which is "replicated"), the factor group is the multiplier/quotient (the "pattern"/"count" of the replication). see |
| 18:56:47 | <ski> | <https://en.wikipedia.org/wiki/Quotition_and_partition>) |
| 18:57:49 | × | ph88 quits (~ph88@2a02:8109:9e00:7e5c:d4b6:e9e6:3cda:8e26) (Ping timeout: 265 seconds) |
| 18:58:00 | × | motersen quits (~user@2001-4dd1-d88a-0-5338-d0f4-6eda-2a0f.ipv6dyn.netcologne.de) (Client Quit) |
| 18:59:29 | × | jb55 quits (~jb55@gateway/tor-sasl/jb55) (Ping timeout: 268 seconds) |
| 19:00:13 | × | timCF quits (~i.tkachuk@m91-129-99-43.cust.tele2.ee) (Quit: leaving) |
| 19:00:33 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 19:00:41 | <joel135> | Isn't it remarkable that both exact sequences a -> b -> c and spans defining products u <- (u, v) -> v have the product-like thing in the middle? I didn't notice this explicitly before. |
| 19:01:34 | <unyu> | Do you mean 0 -> A -> B -> C -> 0 ? |
| 19:01:44 | → | jb55 joins (~jb55@gateway/tor-sasl/jb55) |
| 19:01:53 | <unyu> | (Feel free to replace 0 with 1 if you are in Grp rather than Ab.) |
| 19:02:09 | → | motersen joins (~user@2001-4dd1-d88a-0-5338-d0f4-6eda-2a0f.ipv6dyn.netcologne.de) |
| 19:02:32 | <joel135> | Oh yes |
| 19:02:35 | × | Chai-T-Rex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection) |
| 19:02:46 | <joel135> | I don't actually know homological algebra... |
| 19:02:47 | <unyu> | Also, the roles of A and C are not symmetric. |
| 19:03:09 | × | minoru_shiraeesh quits (~shiraeesh@109.166.57.171) (Read error: Connection reset by peer) |
| 19:03:09 | → | Chai-T-Rex joins (~ChaiTRex@gateway/tor-sasl/chaitrex) |
| 19:03:20 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 240 seconds) |
| 19:03:27 | <joel135> | Really? |
| 19:03:29 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 19:03:51 | <unyu> | Yep. So the similarities end there. |
| 19:04:54 | <joel135> | They at least become each other when you interpret arrows in the opposite category. |
| 19:04:56 | × | malumore quits (~malumore@151.62.127.88) (Ping timeout: 240 seconds) |
| 19:04:56 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 19:05:18 | × | chenshen quits (~chenshen@2620:10d:c090:400::5:1038) (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 19:05:32 | <joel135> | So it is a different symmetry than the one that spans have. |
| 19:08:21 | × | haskell_newbie quits (~haskellne@111.119.187.43) (Ping timeout: 264 seconds) |
| 19:08:48 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 19:09:01 | <unyu> | The opposite category would need to have a notion of exact sequence to begin with. This is certainly true in Ab, but I don't know it to be true in Grp as well. |
| 19:10:16 | <unyu> | Anyhow, I was intrigued by how I could have reached the stupid conclusion that “cographs are obviously uninteresting, because they are obviously isomorphic to the codomain”, when exactly the same (or rather, the dual) thing happens with the graph, and nobody calls the graph of a function uninteresting... |
| 19:10:52 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection) |
| 19:10:53 | ski | . o O ( <https://en.wikipedia.org/wiki/Semidirect_product>,<https://en.wikipedia.org/wiki/Wreath_product> ; semi-direct products in monoidal parsing <https://www.youtube.com/watch?v=Txf7swrcLYs#t=28m58s>,<https://www.youtube.com/watch?v=HGi5AxmQUwU#t=41m15s> ) |
| 19:11:18 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 19:11:33 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) |
| 19:12:10 | <ski> | joel135 : would assume a zero object |
| 19:12:56 | <joel135> | Oh that's right. |
| 19:13:33 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 19:13:52 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 19:13:54 | <unyu> | Who would have thought that semidirect products are useful for parsing. |
| 19:14:13 | <Franciman> | LOL |
| 19:15:24 | → | chenshen joins (~chenshen@2620:10d:c090:400::5:1038) |
| 19:16:09 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 19:16:46 | × | dhruvasagar quits (~dhruvasag@49.207.63.69) (Quit: WeeChat 3.0.1) |
| 19:16:50 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) (Ping timeout: 264 seconds) |
| 19:20:22 | <joel135> | unyu: The distinction between graphs and cographs corresponds to the distinction between the two different factorizations of a morphism a -> b in a Quillen model category. Indeed, one of the morphism factors is called "trivial", corresponding to your " uninteresting". |
| 19:21:00 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
| 19:22:13 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 19:22:32 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 19:22:42 | × | chisui quits (577bc921@i577BC921.versanet.de) (Ping timeout: 240 seconds) |
| 19:23:58 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds) |
| 19:25:35 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 19:25:55 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) |
| 19:26:08 | × | motersen quits (~user@2001-4dd1-d88a-0-5338-d0f4-6eda-2a0f.ipv6dyn.netcologne.de) (Ping timeout: 240 seconds) |
| 19:27:11 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 19:27:37 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 19:29:29 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) |
| 19:31:13 | → | motersen joins (~user@cgn-89-1-215-253.nc.de) |
| 19:31:40 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection) |
| 19:32:02 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 19:32:33 | → | heatsink_ joins (~heatsink@2600:1700:bef1:5e10:90f:37ea:5699:98fc) |
| 19:32:39 | → | Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 19:32:52 | → | artixxxx joins (~artixxxxx@209.red-81-44-44.dynamicip.rima-tde.net) |
| 19:33:54 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:7956:c631:2eb4:a488) (Ping timeout: 244 seconds) |
| 19:34:32 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 240 seconds) |
| 19:34:32 | Lord_of_Life_ | is now known as Lord_of_Life |
| 19:35:04 | → | alx741 joins (~alx741@181.196.69.79) |
| 19:36:49 | → | stree joins (~stree@68.36.8.116) |
| 19:36:54 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 19:39:18 | → | rond_ joins (594021ff@89-64-33-255.dynamic.chello.pl) |
| 19:40:21 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Client Quit) |
| 19:40:53 | × | artixxxx quits (~artixxxxx@209.red-81-44-44.dynamicip.rima-tde.net) (Quit: Leaving) |
| 19:41:23 | hackage | forex2ledger 1.0.0.0 - Print Forex quotes in Ledger format https://hackage.haskell.org/package/forex2ledger-1.0.0.0 (gregorias) |
| 19:41:41 | × | conal quits (~conal@ip-66-115-176-177.creativelink.net) (Quit: Computer has gone to sleep.) |
| 19:44:04 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 19:44:21 | × | motersen quits (~user@cgn-89-1-215-253.nc.de) (Read error: Connection reset by peer) |
| 19:45:28 | → | conal joins (~conal@ip-66-115-176-177.creativelink.net) |
| 19:45:28 | → | acidjnk_new joins (~acidjnk@p200300d0c72b9545dcff5306019ad0b1.dip0.t-ipconnect.de) |
| 19:46:29 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:46:39 | → | Vadrigar joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 19:50:50 | × | forgottenone quits (~forgotten@176.42.24.127) (Quit: Konversation terminated!) |
| 19:51:38 | × | Chobbes quits (~Chobbes@pool-98-115-239-235.phlapa.fios.verizon.net) (Quit: WeeChat 2.9) |
| 19:51:38 | × | chirpsalot quits (~Chirps@pool-98-115-239-235.phlapa.fios.verizon.net) (Quit: WeeChat 2.9) |
| 19:53:47 | → | motersen joins (~user@2001-4dd1-d88a-0-5338-d0f4-6eda-2a0f.ipv6dyn.netcologne.de) |
| 19:56:13 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 268 seconds) |
| 19:58:02 | × | finn_elija quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Remote host closed the connection) |
| 19:58:23 | × | idhugo_ quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 260 seconds) |
| 19:58:27 | → | finn_elija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) |
| 19:58:38 | × | chenshen quits (~chenshen@2620:10d:c090:400::5:1038) (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 19:58:50 | → | chrisdotcode joins (~chrisdotc@unaffiliated/chrisdotcode) |
| 20:01:59 | <joel135> | ski: now i get the idea of monoidal parsing i think. thanks for mentioning it 1000 times :p |
| 20:03:47 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) |
| 20:03:52 | joel135 | . o O ( https://en.m.wikipedia.org/wiki/Carthago_delenda_est ) |
| 20:03:53 | hackage | IPv6Addr 2.0.0 - Library to deal with IPv6 address text representations. https://hackage.haskell.org/package/IPv6Addr-2.0.0 (MichelBoucey) |
| 20:07:27 | <ski> | hehe, joel135 :) |
| 20:07:30 | Squarism | is now known as Siri2 |
| 20:07:47 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 20:08:26 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) (Ping timeout: 264 seconds) |
| 20:12:00 | Siri2 | is now known as Squarism |
| 20:12:33 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 264 seconds) |
| 20:15:38 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 20:15:57 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 20:17:19 | <koz_> | Vis-a-vis the PVP, is adding new data constructors to a type a minor or major bump>? |
| 20:17:30 | × | joncol quits (~jco@c188-150-101-195.bredband.comhem.se) (Remote host closed the connection) |
| 20:19:00 | <glguy> | I'd expect major (looking) |
| 20:19:26 | <glguy> | Breaking change. If any entity was removed, or the types of any entities or the definitions of datatypes or classes were changed, or orphan instances were added or any instances were removed, then the new A.B MUST be greater than the previous A.B. Note that modifying imports or depending on a newer version of another package may cause extra orphan instances to be exported and thus force a major version change. |
| 20:19:41 | <koz_> | Yep, reads like major. |
| 20:19:46 | <glguy> | adding a constructor is changing the datatype definition |
| 20:20:53 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 20:20:57 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 20:20:58 | <hpc> | for a reason why, consider a downstream package matching on that data type |
| 20:21:12 | <hpc> | and that function has inadvertently become partial |
| 20:21:29 | <koz_> | hpc: Yeah, I can understand the reasoning. Just wanted to double-check. |
| 20:21:43 | × | ADG1089 quits (~aditya@27.58.165.185) (Read error: Connection reset by peer) |
| 20:24:50 | × | ixlun quits (~matthew@109.249.184.133) (Read error: Connection reset by peer) |
| 20:25:34 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 20:25:56 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) |
| 20:28:23 | × | geekosaur quits (ae68c070@cpe-174-104-192-112.neo.res.rr.com) (Quit: Connection closed) |
| 20:29:08 | <ski> | OCaml has "private types" <https://caml.inria.fr/pub/docs/manual-ocaml/privatetypes.html>, where you can export a type so that you can destructure it with pattern-matching, if it's a record type, but not construct it. for a variant type, it's possible only have some constructors known, so that non-partial matching must always have a default case |
| 20:29:09 | → | tsaka__ joins (~torstein@ppp-2-87-239-227.home.otenet.gr) |
| 20:30:32 | × | todda7 quits (~torstein@2a02:587:1b1c:3b00:c1d0:c187:5cec:e77f) (Ping timeout: 240 seconds) |
| 20:30:33 | <Shiranai> | what are your thoughts on lambda-case? https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/lambda_case.html |
| 20:30:49 | <jackdk> | it's great |
| 20:30:55 | <Shiranai> | Hlint just recommended them to me but seems like added notation without much benefit |
| 20:31:24 | → | mastarija joins (~mastarija@31.217.19.201) |
| 20:32:39 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 20:32:59 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 20:33:13 | <jackdk> | naming things is hard, and it lets you not |
| 20:34:28 | <c_wraith> | I like the idea, but man did they choose the worst possible syntax for it |
| 20:34:44 | <c_wraith> | The original proposal was a lot cleaner |
| 20:38:45 | <monochrom> | What does the syntax in the original proposal look like? |
| 20:40:23 | × | bgamari_ quits (~bgamari@72.65.102.227) (Ping timeout: 260 seconds) |
| 20:41:34 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 20:41:54 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 20:46:16 | → | pfurla_ joins (~pfurla@216.151.180.171) |
| 20:47:09 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 245 seconds) |
| 20:50:28 | → | aarvar joins (~foewfoiew@2601:602:a080:fa0:75fb:cea1:4d26:9157) |
| 20:52:08 | × | juri_ quits (~juri@178.63.35.222) (Ping timeout: 240 seconds) |
| 20:53:50 | → | codygman__ joins (~user@47.186.207.161) |
| 20:53:56 | × | codygman__ quits (~user@47.186.207.161) (Remote host closed the connection) |
| 20:54:16 | → | codygman__ joins (~user@47.186.207.161) |
| 20:55:09 | × | Benzi-Junior quits (~BenziJuni@88-149-67-143.du.xdsl.is) (Ping timeout: 264 seconds) |
| 20:55:12 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 20:55:15 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:56:32 | × | wonko7 quits (~wonko7@45.15.17.60) (Ping timeout: 240 seconds) |
| 20:58:03 | → | timCF joins (~i.tkachuk@m91-129-99-43.cust.tele2.ee) |
| 21:01:36 | <timCF> | Hello! I'm trying to explain functors for non-haskell developers. Is there any generic name for values of the types, which are related to functors, like `Maybe a`, `Either a b`, `List a` but not a functors themselves? Because actual functors are `Maybe`, `Either a` and `List` which can not be represented on value/term level. |
| 21:01:53 | hackage | pipes-pulse-simple 0.1.0.0 - Pipes for pulse-simple audio https://hackage.haskell.org/package/pipes-pulse-simple-0.1.0.0 (TristanCacqueray) |
| 21:02:49 | <hpc> | are you asking for things of kind * -> * that aren't instances of Functor? |
| 21:03:21 | → | p8m joins (p8m@gateway/vpn/protonvpn/p8m) |
| 21:03:47 | <monochrom> | No. A common name that covers Nothing, Just 4, Left "hi", Right False, ['a', 'b', 'c']. |
| 21:03:57 | <hpc> | ah, i don't think there is one |
| 21:03:59 | <timCF> | hpc: No, I'm asking about value-level, like `Just 1`, `Left 1`, `[]` |
| 21:04:20 | <hpc> | they're just values you can fmap over |
| 21:04:43 | × | p8m_ quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 276 seconds) |
| 21:05:14 | <timCF> | I just created property-based test to prove functor laws, which generates values of this "kind", to which `fmap` can be applied. Just thinking about how to name generator for them) |
| 21:05:38 | <ski> | timCF : people sometimes use the "collection" analogy, but it needs to be stretched a bit to fit the generality of the concept (even as it applies, just for `Functor' in Haskell) |
| 21:06:18 | <timCF> | Name `functors` for generator will be very misleading, because they actually are not a functors |
| 21:06:19 | <ski> | (what kind of collections are values of type `State String Bool' ?) |
| 21:07:01 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
| 21:07:14 | <timCF> | I guess, I'll just name generator `fmappable` :) |
| 21:07:39 | <ski> | do you mean "generator" in a QuickCheck sense ? |
| 21:07:48 | <ski> | hm, i guess you do |
| 21:08:03 | <monochrom> | "fmappable" is true of both the type Maybe and the values Nothing, Just 4. This name is not disamguating. |
| 21:08:12 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 21:08:51 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 21:09:40 | <timCF> | ski: yes, I'm explaining it for Erlang developers, in Erlang there is library called Proper, very similar to QuickChack |
| 21:09:41 | <monochrom> | fmap is said to "preserve structure". So if x :: F X, x contains both structure and data. So, structured data? data structure? |
| 21:09:47 | <timCF> | * QuickCheck |
| 21:10:14 | <hpc> | name it visitorFactorySingleton :P |
| 21:11:11 | <timCF> | monochrom: maybe `shaped` haha |
| 21:11:17 | <ski> | % :kind fmap Proxy# Maybe |
| 21:11:18 | <yahb> | ski: ; <interactive>:1:1: error: Not in scope: type variable `fmap' |
| 21:11:35 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 21:11:55 | <monochrom> | Yeah I think the experts use "shape" where I used "structure". |
| 21:11:55 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 21:12:34 | <ski> | `F' represents (types) the structure/shape, `X' the contents/data/elements |
| 21:12:41 | × | motersen quits (~user@2001-4dd1-d88a-0-5338-d0f4-6eda-2a0f.ipv6dyn.netcologne.de) (Quit: rcirc on GNU Emacs 27.1) |
| 21:13:29 | <ski> | timCF : perhaps you could say "functor-collection" |
| 21:13:51 | <timCF> | ski: thanks! |
| 21:14:08 | → | juri_ joins (~juri@178.63.35.222) |
| 21:14:26 | <monochrom> | The Louis Vuitton Functor Collection, Collector's Edition |
| 21:15:09 | × | codygman__ quits (~user@47.186.207.161) (Ping timeout: 246 seconds) |
| 21:15:42 | ski | . o O ( `FMap Proxy# Maybe :: * -> TYPE ('TupleRep '[])' ? ) |
| 21:15:45 | <sclv> | i'd say a "functor value" |
| 21:15:52 | <monochrom> | us$49,999 for a designer-autographed Either String. limited 1000 pieces worldwide. |
| 21:16:22 | <sclv> | because if you say "a functor is a type constructor of kind * -> *" then a "functor value" is just the application of that to something of kind * so you get something of kind * |
| 21:16:50 | <ski> | timCF : an important part of it is that the user is able to put values of any type in the collection, and is able to `fmap', changing the element type |
| 21:17:12 | <sclv> | or you might say "types in the range of a functor" |
| 21:17:26 | <sclv> | i.e. think of a functor as a morphism sending types to other types, so it sends `Int` to `Maybe Int` etc |
| 21:17:34 | <ski> | sclv : well .. i've been pondering a system in which `m :: Maybe' is a perfectly legal thing to say |
| 21:17:48 | <sclv> | so `Maybe Int` is in th range of a functor, but `Int` is not, in particular |
| 21:17:53 | hackage | gitlib 3.1.3 - API library for working with Git repositories https://hackage.haskell.org/package/gitlib-3.1.3 (JohnWiegley) |
| 21:19:11 | <ski> | timCF : for `Monad', we tend to say "(monadic) action" (there's also some other words floating around, like "computation","recipe","instruction list","context" ..). i think "action" is also used commonly for `Applicative' |
| 21:19:38 | <ski> | (i don't really like "context" used in this context, for this purpose) |
| 21:20:07 | → | elliott_ joins (~elliott_@pool-108-51-101-42.washdc.fios.verizon.net) |
| 21:21:05 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 256 seconds) |
| 21:21:56 | × | mastarija quits (~mastarija@31.217.19.201) (Quit: Leaving) |
| 21:22:20 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 21:24:26 | <monochrom> | IIRC "context" refers to the monad instances such as IO and Maybe. |
| 21:24:27 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 21:25:05 | → | lampowner joins (~xblow@broadband-90-154-73-166.ip.moscow.rt.ru) |
| 21:25:35 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 21:25:38 | <monochrom> | "getLine :: IO String" is said to give you a string under the context of IO. |
| 21:25:55 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) |
| 21:26:03 | <hpc> | yuck |
| 21:26:14 | <monochrom> | You can immediately see it is just the flawed "extract a string" with newer, more treacherous dressing. |
| 21:26:48 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:27:13 | <timCF> | ski: For now I'll explain just Functors, then other day Applicatives, and some other day Monads :) Surprisingly, it's really hard even to explain basic things, because just 2 functor laws requiring understanding of currying and composition. Good thing is that all this can be written in one list of source code in 10 minutes. |
| 21:29:47 | <monochrom> | Don't forget that the whole notion that "Maybe" in isolation, i.e., you don't wants have to say "Maybe what?", is entirely new, strange, or foreign to most programmers in the first place. |
| 21:30:42 | × | roconnor quits (~roconnor@host-45-58-230-226.dyn.295.ca) (Read error: Connection reset by peer) |
| 21:30:46 | <timCF> | monochrom: exactly! That's why I'm not using `Maybe` as example for them. I'm using `Either` and `List`. |
| 21:30:54 | × | Hexagenic quits (~mattias@81-224-107-147-no71.tbcn.telia.com) (Quit: WeeChat 1.9.1) |
| 21:31:07 | <monochrom> | People can understand "f :: a -> Maybe a" in terms of "<T> Maybe<T> f(T)". By extension they can also understand "instance Monoid (Maybe a)". |
| 21:31:15 | → | roconnor joins (~roconnor@host-45-58-230-226.dyn.295.ca) |
| 21:32:01 | × | lampowner quits (~xblow@broadband-90-154-73-166.ip.moscow.rt.ru) (Quit: Leaving) |
| 21:32:21 | → | lampowner joins (~xblow@broadband-90-154-73-166.ip.moscow.rt.ru) |
| 21:32:34 | <monochrom> | Suddenly you say your generalzation is not from Maybe Int to Maybe a, it is from Maybe Int to f Int. In terms of Java and C++, there is no such thing. And furthermore you're now saying you can also have "instance Functor Maybe", and it is not "instance Functor (Maybe a)". Well that just breaks a lot of minds. |
| 21:32:40 | → | ixlun joins (~matthew@109.249.184.133) |
| 21:33:14 | <monochrom> | Um List enjoys the same problems. |
| 21:33:36 | <monochrom> | Either enjoys the same problems one level up. |
| 21:35:21 | <monochrom> | You don't have to write the functor laws with composition. |
| 21:35:54 | <monochrom> | "fmap (\x -> x) xs = xs" and "fmap g (fmap f xs) = fmap (\x -> g (f x)) xs" work fine. |
| 21:36:21 | <monochrom> | That still uses currying but supposedly one has have spent much time practicing currying before this. |
| 21:37:15 | <monochrom> | Also since highschool math already teaches function composition, it should not be a hurdle either. |
| 21:38:04 | <monochrom> | Unless you are saying you have data that corroborates with my theory that programming attracts people who failed math. |
| 21:40:28 | × | cabpa quits (~cabpa@180.190.165.139) (Ping timeout: 260 seconds) |
| 21:40:53 | → | slack1256 joins (~slack1256@dvc-186-186-101-190.movil.vtr.net) |
| 21:40:55 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
| 21:43:12 | <timCF> | monochrom: Good theory actually. I did learned chemistry in university, and math was hard to understand) |
| 21:43:23 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 21:44:56 | × | roconnor quits (~roconnor@host-45-58-230-226.dyn.295.ca) (Quit: Konversation terminated!) |
| 21:45:03 | <timCF> | I remember that moment, when for me was easier to write a program to emulate task in statistics, and get approx solution from RNG results, then to solve it mathematically |
| 21:45:40 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 276 seconds) |
| 21:45:51 | <monochrom> | Then you may be interested to hear my full theory. |
| 21:45:57 | <monochrom> | I mean, >:) |
| 21:46:54 | <monochrom> | Those who do well in math, they are attracted to either the more creative pure math or the more profitable quant. |
| 21:46:56 | × | Vadrigar quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds) |
| 21:48:24 | <monochrom> | Those who are scientifically minded (i.e., they want to and know how to refute hypotheses by testing), they are attracted to various more interesting scientific research or more profitable chemical engineering or biochem. |
| 21:49:03 | <monochrom> | Those who are good with words, they are attracted to the more creative creative writing or the more profitable law career. |
| 21:49:47 | <monochrom> | So what are the remaining career options? Programming and religious careers. And it shows. |
| 21:50:23 | <monochrom> | We have programmers who can't use math, are illogical, can't test, and can't write or even read TFM. |
| 21:50:32 | <monochrom> | Just like most priests. |
| 21:50:43 | <monochrom> | Just look at Larry Wall. |
| 21:51:35 | → | coot joins (~coot@37.30.58.223.nat.umts.dynamic.t-mobile.pl) |
| 21:52:31 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:52:41 | <timCF> | monochrom: :) And software revelopers are very religious! Functional programming camp, OOP camp, JS camp, GO camp |
| 21:53:10 | <pjb> | monochrom: the alternative is https://en.wikipedia.org/wiki/Edsger_W._Dijkstra |
| 21:53:26 | <pjb> | monochrom: prove your algorithms! |
| 21:53:54 | <monochrom> | Dijkstra was very capable with both math and physics. |
| 21:54:01 | <pjb> | or https://en.wikipedia.org/wiki/Tony_Hoare |
| 21:54:05 | <pjb> | Indeed, exactly. |
| 21:54:28 | → | LogicUpgrade joins (57e3c46d@87.227.196.109) |
| 21:54:44 | <joel135> | What is TFM? GO the language or something else? |
| 21:54:56 | <monochrom> | the ??????? manual |
| 21:55:22 | <pjb> | joel135: The Fine Manual. |
| 21:55:28 | <MarcelineVQ> | r(tfm) |
| 21:55:37 | <MarcelineVQ> | * (r)tfm :> |
| 21:55:40 | <timCF> | Yeah, I mean Go language. In my experience, it's very hard to prove them that generics are good for programming :) |
| 21:56:00 | <monochrom> | Oh, that one, I think we have been unfair to PIke. |
| 21:56:19 | <joel135> | Oh lol |
| 21:56:32 | <yushyin> | timCF: generics are confirmed for go2, though. |
| 21:56:38 | <monochrom> | Pike wanted to take time working out a simpler story for generics, so Go v1 doesn't have it, he will add it when it's ready. |
| 21:57:25 | <monochrom> | So that one I respect him for not rushing it. |
| 21:57:56 | <monochrom> | https://twitter.com/mosheroperandi/status/856946180810354688 is still worth a laugh though, while it lasts. |
| 21:58:10 | → | stree joins (~stree@68.36.8.116) |
| 21:58:39 | <yushyin> | and philip wadler helped them |
| 21:59:56 | <hpc> | yushyin: finally we can use the unicode aboriginal block for its original intended purpose: GADTs :D |
| 22:00:17 | <hpc> | (or whichever block was used for the original hack) |
| 22:03:04 | × | pfurla_ quits (~pfurla@216.151.180.171) (Ping timeout: 256 seconds) |
| 22:03:38 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 256 seconds) |
| 22:04:05 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 22:04:16 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 22:05:07 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) |
| 22:07:22 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 22:07:29 | × | LKoen quits (~LKoen@194.250.88.92.rev.sfr.net) (Remote host closed the connection) |
| 22:09:38 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) (Ping timeout: 264 seconds) |
| 22:09:53 | hackage | ory-kratos 0.0.5.10 - API bindings for Ory Kratos https://hackage.haskell.org/package/ory-kratos-0.0.5.10 (njaremko) |
| 22:10:48 | × | darjeeling_ quits (~darjeelin@122.245.208.187) (Ping timeout: 260 seconds) |
| 22:11:44 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 22:12:18 | × | average quits (uid473595@gateway/web/irccloud.com/x-sgdxyzaxzpfhfdbl) (Quit: Connection closed for inactivity) |
| 22:12:22 | <ski> | monochrom : seems possibly they're finally getting some form of them, <https://github.com/golang/go/issues/43651> ? |
| 22:12:27 | <slack1256> | I really like that wadler is well respected outside the haskell community. |
| 22:13:27 | <ski> | Wadler often has quite readable papers, commonly with witty titles. and seems to be a good speaker |
| 22:13:51 | → | Benzi-Junior joins (~BenziJuni@dsl-149-67-143.hive.is) |
| 22:14:33 | <slack1256> | I wonder why aren't other academics trying to use funny titles in their papers, it seems they get more noticed. |
| 22:14:36 | → | darjeeling_ joins (~darjeelin@122.245.208.187) |
| 22:16:17 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 22:17:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 22:17:15 | <pjb> | slack1256: most of academics don't publish to get noticed, but only to fulfill their quota of publication to get the next round of budget. |
| 22:17:53 | × | lampowner quits (~xblow@broadband-90-154-73-166.ip.moscow.rt.ru) (Remote host closed the connection) |
| 22:20:46 | × | dhil quits (~dhil@80.208.56.181) (Ping timeout: 276 seconds) |
| 22:20:47 | × | hiroaki quits (~hiroaki@2a02:908:4b18:8c40:43d:bb62:2e5b:b1f6) (Ping timeout: 244 seconds) |
| 22:21:06 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) |
| 22:24:24 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) (Remote host closed the connection) |
| 22:25:22 | × | danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 260 seconds) |
| 22:26:57 | × | fendor quits (~fendor@178.115.129.38.wireless.dyn.drei.com) (Remote host closed the connection) |
| 22:27:30 | → | molehillish joins (~molehilli@ip98-167-226-26.ph.ph.cox.net) |
| 22:28:55 | → | knupfer joins (~Thunderbi@200116b82c854200c01b3ec09b839738.dip.versatel-1u1.de) |
| 22:28:59 | <ski> | • Joke |
| 22:29:08 | <ski> | Scientific standards are terrible, one should never joke : to be taken seriously, put people to sleep ! In a paper, no funny drawings, it would be a waste of paper. However, full pages of repetitive definitions, of Prussian formalism, are not considered as a waste. |
| 22:29:20 | <ski> | A good joke makes you understand a complex methodological point. For instance, when I say that a consistency proof is like an insurance against the explosion of Earth, you get it directly. However, some jokes are dishonest, since they don't respect the very spirit of what they are alluding to, typically the allegory of the prisoners. |
| 22:29:35 | <ski> | See : Allegory, Copycat, Metaphor, Numerology, Prisoners, Square Wheels. |
| 22:29:45 | <ski> | -- "Locus Solum : From the rules of logic to the logic of rules" (Appendix A, "A pure waste of paper") by Jean-Yves Girard in 2001 at <https://girard.perso.math.cnrs.fr/0.pdf> |
| 22:30:01 | ski | . o O ( "Science Fictions" <https://www.smbc-comics.com/comic/science-fictions> ) |
| 22:30:21 | × | coot quits (~coot@37.30.58.223.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 22:30:41 | → | mav1 joins (~mav@ip-88-152-11-222.hsi03.unitymediagroup.de) |
| 22:37:35 | × | ixlun quits (~matthew@109.249.184.133) (Ping timeout: 256 seconds) |
| 22:43:09 | × | juri_ quits (~juri@178.63.35.222) (Ping timeout: 264 seconds) |
| 22:43:14 | → | son0p joins (~son0p@181.136.122.143) |
| 22:45:13 | <hpc> | that makes me think of godel escher bach's "stories", which seemed to all go something like "Socrates: imagine you have an A, B, and C such that blah blah blah blah" |
| 22:45:24 | <hpc> | and all i could think reading it was "jeez, just give me the actual equation" |
| 22:46:57 | <ski> | it can be a stepping stone, i suppose |
| 22:47:24 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 265 seconds) |
| 22:50:06 | → | chirpsalot joins (~Chirps@pool-98-115-239-235.phlapa.fios.verizon.net) |
| 22:50:10 | → | Chobbes joins (~Chobbes@pool-98-115-239-235.phlapa.fios.verizon.net) |
| 22:50:28 | × | kiweun quits (~kiweun@cpe98524a8cef7c-cm98524a8cef7a.cpe.net.cable.rogers.com) (Remote host closed the connection) |
| 22:51:13 | × | molehillish quits (~molehilli@ip98-167-226-26.ph.ph.cox.net) (Remote host closed the connection) |
| 22:51:18 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 22:52:53 | hackage | sbv 8.13 - SMT Based Verification: Symbolic Haskell theorem prover using SMT solving. https://hackage.haskell.org/package/sbv-8.13 (LeventErkok) |
| 22:53:04 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:c874:3671:2027:3155) |
| 23:00:56 | × | mav1 quits (~mav@ip-88-152-11-222.hsi03.unitymediagroup.de) (Ping timeout: 240 seconds) |
| 23:02:37 | → | Sorny joins (~Sornaensi@077213203030.dynamic.telenor.dk) |
| 23:04:22 | → | Sornaens1 joins (~Sornaensi@077213203030.dynamic.telenor.dk) |
| 23:05:03 | × | Sornaensis quits (~Sornaensi@077213203030.dynamic.telenor.dk) (Ping timeout: 260 seconds) |
| 23:07:39 | → | bgamari joins (~bgamari@72.65.101.179) |
| 23:07:45 | × | Sorny quits (~Sornaensi@077213203030.dynamic.telenor.dk) (Ping timeout: 264 seconds) |
| 23:08:11 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 256 seconds) |
| 23:08:19 | → | curl joins (5ce955fb@gateway/web/cgi-irc/kiwiirc.com/ip.92.233.85.251) |
| 23:08:21 | × | knupfer quits (~Thunderbi@200116b82c854200c01b3ec09b839738.dip.versatel-1u1.de) (Quit: knupfer) |
| 23:08:51 | × | son0p quits (~son0p@181.136.122.143) (Quit: leaving) |
| 23:09:27 | → | __minoru__shirae joins (~shiraeesh@109.166.57.171) |
| 23:13:18 | × | timCF quits (~i.tkachuk@m91-129-99-43.cust.tele2.ee) (Ping timeout: 265 seconds) |
| 23:14:15 | <LogicUpgrade> | We need a new paragidm: mutable functional programming |
| 23:14:26 | <curl> | no we dont |
| 23:14:35 | <LogicUpgrade> | Erlang is kinda there with process dictionaries |
| 23:14:45 | <monochrom> | It is not new at all. Scheme and SML already have it. |
| 23:14:46 | × | usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving) |
| 23:14:56 | <monochrom> | More meta-ly, are you done? |
| 23:15:10 | <LogicUpgrade> | monochrom, well we need it in a way that makes it an official approach, rather than seen as some mix |
| 23:15:15 | <curl> | purity is power... |
| 23:15:21 | <curl> | why dispense of that? |
| 23:15:35 | <curl> | what do you hope to gain that could make up for whats lost? |
| 23:15:43 | <LogicUpgrade> | Perfectly pure water can't even freeze. How'd we make ice-cream then |
| 23:15:54 | <curl> | monochrom: its a troll? |
| 23:16:08 | <monochrom> | I'm planning to ban. Any objection? |
| 23:16:15 | <LogicUpgrade> | :P |
| 23:16:27 | <curl> | i object in principle yes |
| 23:16:42 | <curl> | LogicUpgrade: pack it in |
| 23:16:52 | <ski> | @quote jlf |
| 23:16:52 | <lambdabot> | jlf says: sufficiently advanced ignorance is indistinguishable from trolling |
| 23:17:00 | <ski> | ;) |
| 23:17:17 | <LogicUpgrade> | I am dumb, I'm very dumb |
| 23:18:03 | <curl> | a discussion on mutable programing doesnt sound bad, but if you cant actually have such a conversation... |
| 23:18:06 | <LogicUpgrade> | But still what if we had a walled-off mutable part of every program. I don't mean via monads, but entirely. |
| 23:18:21 | <LogicUpgrade> | Isolated, but mutable |
| 23:18:25 | <ski> | look into "effect systems" ? |
| 23:18:33 | <Axman6> | LogicUpgrade: we already have exactly that |
| 23:19:23 | <Axman6> | the ST monad gives us honest to goodness mutation, in a guaranteed pure wrapper. Haskell programs actually use it all the time behind the scenes |
| 23:22:50 | <ski> | you could implement `sort :: Ord a => [a] -> [a]', using `ST', e.g., possibly using (in-place) quicksort on a locally allocated array |
| 23:27:50 | <lechner> | Hi, in an interactive example with 'find' from Data.List, typing ':t' returns a Foldable prefix in "find :: Foldable t => (a -> Bool) -> t a -> Maybe a" while the expected output from the example should just be "find :: (a -> Bool) -> [a] -> Maybe a". Am I using a newer (or older) version of GHCI? What is a Foldable, please? Thanks! http://learnyouahaskell.com/modules |
| 23:28:44 | <Axman6> | a few years ago several functions which used to be list only werre generalised to any foldable |
| 23:28:57 | <Axman6> | % :t Data.List.find |
| 23:28:57 | <yahb> | Axman6: forall {t :: * -> *} {a}. Foldable t => (a -> Bool) -> t a -> Maybe a |
| 23:29:03 | <Axman6> | % :t Data.List.find @[] |
| 23:29:03 | <yahb> | Axman6: forall {a}. (a -> Bool) -> [a] -> Maybe a |
| 23:29:22 | <Axman6> | they are the same type when t ~ [] |
| 23:29:40 | <lechner> | Axman6: ah, thanks! |
| 23:30:25 | <Axman6> | % :t getFirst . foldMap (First . Just) |
| 23:30:25 | <yahb> | Axman6: forall {t :: * -> *} {a}. Foldable t => t a -> Maybe a |
| 23:31:11 | <Axman6> | % :t \p -> getFirst . foldMap (\x -> First $ if p x then Just x else Nothing) |
| 23:31:11 | <yahb> | Axman6: forall {t :: * -> *} {a}. Foldable t => (a -> Bool) -> t a -> Maybe a |
| 23:31:45 | <lechner> | Also, why do I not see parentheses for ":t elemIndex" around (Eq a) as in the example, please? elemIndex :: Eq a => a -> [a] -> Maybe Int (same link) |
| 23:33:39 | × | heatsink_ quits (~heatsink@2600:1700:bef1:5e10:90f:37ea:5699:98fc) (Remote host closed the connection) |
| 23:34:11 | <hololeap> | lechner: the parentheses aren't required when you have one constraint |
| 23:34:37 | <hololeap> | so, it could be written "Eq a => ..." or "(Eq a) => ..." |
| 23:34:41 | <lechner> | what do they mean, please? |
| 23:34:44 | ski | prefers the former |
| 23:35:35 | <ski> | the brackets there are only required/mandatory, when you have multiple constraints, rather than just one, in which case they're optional |
| 23:36:10 | <ski> | @type elemIndex :: ((Eq a)) => a -> [a] -> Maybe Int -- you can add multiple pairs, if you really like to, although it'd look strange and ugly |
| 23:36:12 | <lambdabot> | Eq a => a -> [a] -> Maybe Int |
| 23:36:14 | <hololeap> | it means that it takes any type (represented by the type variable 'a'), but the "Eq a" constraint means that the type has to have an instance of the Eq typeclass |
| 23:36:16 | <ski> | > ((42)) |
| 23:36:19 | <lambdabot> | 42 |
| 23:36:54 | <hololeap> | :i Eq |
| 23:37:00 | <hololeap> | % :i Eq |
| 23:37:00 | <yahb> | hololeap: type Eq :: * -> Constraint; class Eq a where; (==) :: a -> a -> Bool; (/=) :: a -> a -> Bool; {-# MINIMAL (==) | (/=) #-}; -- Defined in `GHC.Classes'; instance [safe] Eq MonoN -- Defined at <interactive>:42:43; instance [safe] forall w (m :: * -> *) a. (Eq w, Data.Functor.Classes.Eq1 m, Eq a) => Eq (WriterT w m a) -- Defined in `Control.Monad.Trans.Writer.Lazy'; instance [safe] forall (f :: * -> |
| 23:37:05 | <hololeap> | oof |
| 23:37:10 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 23:37:30 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 23:37:33 | × | DavidEichmann quits (~david@47.27.93.209.dyn.plus.net) (Remote host closed the connection) |
| 23:37:34 | <hololeap> | lechner, does that make sense to you? |
| 23:38:31 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:c1f2:e355:53f0:4ab8) |
| 23:39:01 | <hololeap> | in simple terms, it means that the type has to have (==) defined |
| 23:39:02 | <lechner> | so (Eq a, Ord a) would mean ordered with an identity (although Ord prabably implies Eq)? |
| 23:39:21 | <monochrom> | Ord implies Eq. |
| 23:41:00 | <hololeap> | lechner: right, "Eq a" means the type has to have some notion of equal values, and "Ord a" means it has to have some notion of one value being less than or greater than another value |
| 23:41:22 | × | santiweight quits (622165e4@c-98-33-101-228.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 23:41:28 | <hololeap> | and, yes, you can't make something an instance of Ord without it first being an instance of Eq |
| 23:42:14 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
| 23:42:18 | <ski> | (because with an ordering, you get equality anyway, so there's no point with not having it an instance of `Eq' as well, in that case) |
| 23:42:21 | <hololeap> | so, you could just write it "Ord a" in that particular case |
| 23:44:58 | → | juri_ joins (~juri@178.63.35.222) |
| 23:46:08 | × | justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 240 seconds) |
| 23:46:56 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds) |
| 23:49:18 | <SoF> | hi, just because I can implement e.g. (for [a]) foldl in terms of foldr, it doesn't mean that they behave the same way for infinite lists, right? |
| 23:49:39 | <SoF> | or vice versa |
| 23:50:17 | <SoF> | *it doesnt mean they behave the same as the canonical implementations of them |
| 23:50:24 | <Axman6> | you can probably answer that yourself if you step through the evaluation. what's your definition of foldl in terms of foldr? |
| 23:50:41 | <SoF> | one that builds a lambda stack |
| 23:51:00 | <Axman6> | can you paste it here, and we'll use it as a starting point |
| 23:51:22 | <monochrom> | Does your "implement" mean "correctly implement", "Incorrectly implement" or "I don't know how correct it is"? |
| 23:51:22 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 23:51:37 | <SoF> | foldl f a bs = foldr (\b g x -> g (f x b)) id bs a |
| 23:51:41 | <SoF> | from here https://wiki.haskell.org/Foldl_as_foldr |
| 23:52:03 | <SoF> | considering foldr is a minimal complete definition of Foldable, I assume that foldl is "correct"? |
| 23:52:19 | <SoF> | or at least that there exists a foldl implementation in terms of foldr that is correct |
| 23:52:24 | <Axman6> | ok, now try evaluating it on the list [a,b,c]: foldl f x [a,b,c] = ??? |
| 23:56:18 | <SoF> | (\x -> (\y -> (\z -> f z c) (f y b)) (f x a)) x, maybe? |
| 23:56:32 | <monochrom> | Hand-tracing the evaluation is going to be too tedious for too little gain. |
| 23:56:58 | <monochrom> | But you can always design test cases, expecially in the infinite-list case. |
| 23:57:23 | × | rond_ quits (594021ff@89-64-33-255.dynamic.chello.pl) (Quit: Connection closed) |
| 23:59:17 | × | Chai-T-Rex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection) |
| 23:59:43 | → | Chai-T-Rex joins (~ChaiTRex@gateway/tor-sasl/chaitrex) |
| 23:59:45 | <monochrom> | Well, hand-tracing the first few steps is illuminating. Just not hand-tracing until the end of the world since the list is infinite. |
All times are in UTC on 2021-03-21.