Logs: freenode/#haskell
| 2020-09-17 17:13:00 | <ski> | dolio : yes. also explains the `A -> B' being equivalent to `not A (+) B' thing |
| 2020-09-17 17:13:16 | <dolio> | Yeah. |
| 2020-09-17 17:14:45 | → | MorrowM joins (~max@bzq-110-168-31-106.red.bezeqint.net) |
| 2020-09-17 17:15:44 | <ski> | (reminds me of a language (MPD,cf. SR) where, conceptually at least, every function call spawned a thread. depending on how you spawned it, and interacted with it, it could die after delivering back a result message, or persist to receive more messaged along the channel (the name of the function)) |
| 2020-09-17 17:16:09 | <zebrag> | ski: (yes, I'm ok with the nitpick, it was only an abuse of language) |
| 2020-09-17 17:16:50 | <geekosaur> | sounds like Icon coroutines |
| 2020-09-17 17:17:31 | × | rihards quits (~rihards@balticom-142-78-50.balticom.lv) (Quit: rihards) |
| 2020-09-17 17:17:32 | → | knupfer joins (~Thunderbi@200116b82cb61c00e890525b81038fc7.dip.versatel-1u1.de) |
| 2020-09-17 17:17:51 | → | rihards joins (~rihards@balticom-142-78-50.balticom.lv) |
| 2020-09-17 17:17:55 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-nrdufpvhwzpziwxu) |
| 2020-09-17 17:18:46 | ← | ephemeron parts (~ephemeron@unaffiliated/ephemeron) () |
| 2020-09-17 17:20:02 | <ski> | well, i guess in Icon the thread wouldn't continue executing semi-independently, preemptive concurrence |
| 2020-09-17 17:20:40 | <ski> | zebrag : but yes, you couldn't "substitute" in the manner that `>>=' does it, if that was what you had in mind |
| 2020-09-17 17:20:48 | <geekosaur> | not as normally implemented. I don't know offhand if there's a concurrent Icon |
| 2020-09-17 17:21:23 | → | Saten-san joins (~Saten-san@ip-81-11-153-184.dsl.scarlet.be) |
| 2020-09-17 17:23:54 | ski | nods |
| 2020-09-17 17:24:11 | × | ransom quits (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) (Quit: Textual IRC Client: www.textualapp.com) |
| 2020-09-17 17:24:11 | <ski> | (i probably should look into Icon, sometime) |
| 2020-09-17 17:24:55 | <dolio> | It doesn't need to be concurrent either, of course. Laziness is a particular choice of which order to process the 'branches that all must happen' in, and call-by-value is another. |
| 2020-09-17 17:25:56 | → | wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) |
| 2020-09-17 17:27:07 | → | Lycurgus joins (~niemand@98.4.96.130) |
| 2020-09-17 17:27:08 | × | tomsmeding quits (~tomsmedin@tomsmeding.com) (Quit: ZNC 1.7.5 - https://znc.in) |
| 2020-09-17 17:27:36 | ski | nods |
| 2020-09-17 17:27:39 | × | mariatsji quits (~mariatsji@2a01:79d:53aa:c66c:59f2:1ee3:fe3e:b848) (Remote host closed the connection) |
| 2020-09-17 17:31:21 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:b0dc:6c54:247b:ece) |
| 2020-09-17 17:32:31 | × | ph88 quits (~ph88@ip5f5af726.dynamic.kabel-deutschland.de) (Quit: Leaving) |
| 2020-09-17 17:32:35 | × | alp_ quits (~alp@2a01:e0a:58b:4920:102b:86e3:d072:38a0) (Ping timeout: 272 seconds) |
| 2020-09-17 17:34:59 | <zebrag> | ski: yes, it is what I had in mind |
| 2020-09-17 17:36:24 | <geekosaur> | lazy won't work in the case of icon coroutines because you yield a value to the coroutine (think of it as being connected with a pair of MVars, and yield is putMVar on one followed by takeMVar on the other) |
| 2020-09-17 17:36:53 | → | mariatsji joins (~mariatsji@2a01:79d:53aa:c66c:fcb4:8a4:b249:c1d3) |
| 2020-09-17 17:36:54 | <ski> | zebrag : you could still do `fmap even (Const "hello" :: Const String Integer)', though |
| 2020-09-17 17:37:47 | <geekosaur> | although there's the degenerate case where what's yielded to the coroutine is the equivalent of Nothing… but then Icon isn't pure so laziness has potential problems |
| 2020-09-17 17:38:00 | <ski> | geekosaur : hmm .. i remember i figured out how to make `zipWith' a "good consumer" of both its list parameters, by thinking of it in terms of coroutines |
| 2020-09-17 17:38:25 | <dolio> | geekosaur: It won't? The general point is that until one of them blocks, nothing forces an ordering. |
| 2020-09-17 17:38:45 | <dolio> | So you can eagerly execute the one that will put, or you can execute the one that will take until it blocks on the take. |
| 2020-09-17 17:39:01 | × | eric quits (~eric@2804:431:c7d4:b75:d805:ea78:a3e:f89f) (Remote host closed the connection) |
| 2020-09-17 17:40:10 | <dolio> | And it doesn't necessarily matter as long as when something blocks you can go do other stuff to unblock it. |
| 2020-09-17 17:40:26 | <monochrom> | I don't want to perpetuate "c :: F Int menas c contains an Int", because it is not always true, and sometimes it is not even wrong. (In what sense does stf :: S -> (S, Int) contains an Int?) But "pure" is one of the big differences between Functor and Applicative. |
| 2020-09-17 17:40:42 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Quit: Quit.) |
| 2020-09-17 17:41:05 | → | eric joins (~eric@2804:431:c7d4:b75:d805:ea78:a3e:f89f) |
| 2020-09-17 17:41:07 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) |
| 2020-09-17 17:41:13 | × | eric quits (~eric@2804:431:c7d4:b75:d805:ea78:a3e:f89f) (Remote host closed the connection) |
| 2020-09-17 17:41:27 | → | eric joins (~eric@2804:431:c7d4:b75:d805:ea78:a3e:f89f) |
| 2020-09-17 17:41:34 | × | dyeplexer quits (~lol@unaffiliated/terpin) (Read error: Connection reset by peer) |
| 2020-09-17 17:41:47 | × | eric quits (~eric@2804:431:c7d4:b75:d805:ea78:a3e:f89f) (Remote host closed the connection) |
| 2020-09-17 17:42:01 | → | kenran joins (~maier@b2b-37-24-119-190.unitymedia.biz) |
| 2020-09-17 17:42:27 | <monochrom> | To understand how "pure" is special, I take inspiration from how Moggi uses monads. For his use case, he wants to rule out boring examples like Const, so he adds an extra law that's so strong it implies that "pure" is injective. (Now OK, in his time, there was no applicative, only monad, he would be saying "unit" or "eta" or "mu", I forgot which.) |
| 2020-09-17 17:42:54 | <monochrom> | For most useful Applicative instances, pure is indeed injective. |
| 2020-09-17 17:44:18 | <monochrom> | Now if pure is injective, if "pure 4" has to be somehow distinguishable from "pure 5", it does mean that your F Int type has to have at least as much information as Int, internally. |
| 2020-09-17 17:44:43 | <monochrom> | In Shannon's sense of information. |
| 2020-09-17 17:46:32 | → | nan` joins (~nan`@unaffiliated/nan/x-5405850) |
| 2020-09-17 17:46:52 | → | tomsmeding joins (~tomsmedin@2a03:b0c0:0:1010::767:3001) |
| 2020-09-17 17:47:04 | × | bicho_rastrero quits (~cerdito@154.85-87-39.dynamic.clientes.euskaltel.es) (Quit: leaving) |
| 2020-09-17 17:47:16 | × | kenran quits (~maier@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 272 seconds) |
| 2020-09-17 17:47:22 | <monochrom> | If you further throw in "pure is a natural transformation from Identity to F", then not just as much information, but also as much structure, i.e., the information is not even all that scrambled up badly. |
| 2020-09-17 17:47:42 | <monochrom> | s/throw in/recall/ |
| 2020-09-17 17:51:37 | <dolio> | Category theorists might say that whether a value of `Identity Int` contains a value of Int is a nonsense question. |
| 2020-09-17 17:51:42 | × | nan` quits (~nan`@unaffiliated/nan/x-5405850) (Ping timeout: 272 seconds) |
| 2020-09-17 17:52:20 | <dolio> | Or, more accurately, it is an evil question. |
| 2020-09-17 17:52:25 | <monochrom> | Yeah, at the objects-and-morphisms level, there is not supposed to be "elements". |
| 2020-09-17 17:53:08 | × | finkata quits (~dpetrov@83.222.188.39) (Read error: Connection reset by peer) |
| 2020-09-17 17:53:15 | <dolio> | Well, you would know it is a functor on sets, or types. |
| 2020-09-17 17:53:28 | <dolio> | Which have elements/values. |
| 2020-09-17 17:54:35 | <dolio> | But of course, it is also evil to distinguish between Int and other types/sets isomorphic to it. |
| 2020-09-17 17:54:51 | → | juuandyy joins (~juuandyy@90.166.144.65) |
| 2020-09-17 17:55:28 | <monochrom> | heh |
| 2020-09-17 17:56:25 | <monochrom> | Then my joke yesterday about "mathematicians, category theorists, Haskellers" was wrong. |
| 2020-09-17 17:56:27 | glguy | hopes dolio doesn't start passing around a collection plate |
| 2020-09-17 17:57:15 | <monochrom> | Category theorists should be put on the other side. The joke should go like: Category theorists say: "beware of mathematicians and Haskeller's, they're evil" |
| 2020-09-17 17:57:31 | × | Lycurgus quits (~niemand@98.4.96.130) (Quit: Exeunt) |
| 2020-09-17 17:57:58 | <monochrom> | St. Augustine was the first category theorist! Change my mind. |
| 2020-09-17 17:58:18 | <dolio> | Category theorists aren't so great about not being evil either, really. |
| 2020-09-17 17:58:26 | <monochrom> | OK! |
| 2020-09-17 17:58:31 | <ski> | "wants to rule out boring examples" :( |
| 2020-09-17 17:59:02 | <ski> | ("mu" is for `join'. probably "eta", i'd guess. when / from where did "unit" come to be used ?) |
| 2020-09-17 17:59:23 | × | Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-157-9.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection) |
| 2020-09-17 17:59:31 | → | alp_ joins (~alp@2a01:e0a:58b:4920:98d3:8430:dd:99e) |
| 2020-09-17 17:59:37 | <phadej> | eta is unit |
| 2020-09-17 17:59:46 | <dumptruckman> | Can I make a typeclass that pulls the first parameter of a value where it's type may have other parameters? |
| 2020-09-17 18:00:02 | × | wgolden quits (~wgolden@178.162.204.238) () |
| 2020-09-17 18:00:04 | <phadej> | though I forget which way counit/unit in adjunctions are named |
| 2020-09-17 18:00:08 | <phadej> | eta/eps there |
| 2020-09-17 18:00:17 | <phadej> | need more distinct greek letters |
| 2020-09-17 18:00:35 | <dolio> | Unit goes way back to terms from abstract algebra, I imagine. |
| 2020-09-17 18:00:39 | <ski> | phadej : the way that makes the monad one the unit |
| 2020-09-17 18:01:23 | <ski> | dumptruckman : sorry, i didn't understand that, can you elaborate ? |
| 2020-09-17 18:01:35 | <dumptruckman> | like... `class Named a` with a associated function like name :: a -> String |
| 2020-09-17 18:01:57 | <dumptruckman> | and it's expected that instances of that type have a String as the first parameter of their values |
| 2020-09-17 18:02:03 | <phadej> | ski: makes sense |
| 2020-09-17 18:02:06 | <dolio> | Unit being another name for identity element. |
| 2020-09-17 18:02:14 | <ski> | what does "the first parameter of their values" mean ? |
| 2020-09-17 18:02:25 | <dumptruckman> | data Something = Something String a deriving (Named) |
| 2020-09-17 18:02:50 | <dumptruckman> | and so the name function pulls the string out |
| 2020-09-17 18:02:54 | <ski> | dolio : hm, yea. it makes sense, with the monoid connections |
| 2020-09-17 18:03:24 | <monochrom> | dumptruckman: No. |
| 2020-09-17 18:03:55 | <ski> | dumptruckman : if you really want such a type class, you could make it. however, are you going to define any functions that are polymorphic over types that are instances of this type class ? are you going to have more than one instance of the type class |
| 2020-09-17 18:04:14 | × | igghibu quits (~igghibu@37.120.201.90) (Ping timeout: 256 seconds) |
| 2020-09-17 18:04:27 | <dumptruckman> | yes |
| 2020-09-17 18:04:46 | <ski> | what's some example of such polymorphic operations ? |
| 2020-09-17 18:04:49 | <dumptruckman> | so I guess each instance would have to define implement name itself? |
All times are in UTC.