Logs on 2022-05-24 (liberachat/#haskell)
| 00:00:50 | <dragestil> | I mean a link to its vcs repo |
| 00:01:57 | → | nate1 joins (~nate@98.45.169.16) |
| 00:02:14 | <geekosaur> | https://gitlab.haskell.org/ghc/ghc/-/tree/master/libraries/integer-gmp |
| 00:02:45 | <geekosaur> | it's not independent, it's part of the GHC repo |
| 00:03:31 | <dragestil> | ok thanks. it's not even a submodule? |
| 00:03:42 | <geekosaur> | nope |
| 00:03:50 | <dragestil> | hmm ok |
| 00:04:02 | <geekosaur> | too deeply wired into ghc currently. there is some work on changing this, but not quite that far as yet |
| 00:04:43 | <dragestil> | i see, i do remember needing it to build ghc |
| 00:04:48 | <geekosaur> | \(in particular they want to be able to choose between integer-gmp and integer-simple without having to rebuild ghc, which should also allow for pluggable implementations |
| 00:04:52 | <geekosaur> | ) |
| 00:05:12 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f100:eba8:305a:4575) |
| 00:05:49 | → | _PSY_ joins (~PSY@2600:1700:2050:1040:dc85:ef8:9bc6:edde) |
| 00:06:50 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 258 seconds) |
| 00:07:07 | <dragestil> | makes sense |
| 00:08:12 | <geekosaur> | there was some work a decade ago on using libtommath as an alternative, which didn't go much of anywhere; one hope is that it'll be easier to do such experiments in the future |
| 00:09:59 | <Axman6> | what is integer-simple's implementation these days? I remember at some point it was a [Int] or something, but feel like it was turned into something more akin to GMP's representation? |
| 00:10:27 | <geekosaur> | I know it was completely rewritten several years back but don't know details |
| 00:11:50 | <geekosaur> | https://gitlab.haskell.org/ghc/ghc/-/tree/master/libraries/ghc-bignum has some details |
| 00:12:08 | <geekosaur> | (that's the new swappable backend, if I read correctly) |
| 00:13:15 | <Axman6> | I remember years ago Erik de Castro Lopo doing some work on making a pure Haskell implementationm for Integers, and the performance was very close to GMP, with somethings being slower, and some faster |
| 00:13:34 | <Axman6> | https://github.com/erikd/haskell-big-integer-experiment |
| 00:14:35 | × | werneta quits (~werneta@137.78.30.207) (Ping timeout: 255 seconds) |
| 00:15:05 | <EvanR> | that's either pretty impressive, or discouraging that gmp is that bad xD |
| 00:15:45 | <EvanR> | like comparing the size of mars and ganymede, the reaction could go either way |
| 00:15:52 | <Axman6> | using data Integer = Small# Int# | Large# BigNat gives q pretty big performance boost when either argument is small |
| 00:16:01 | <Axman6> | GMP integers are always "big" |
| 00:17:08 | <[Leary]> | I wrote two's-complement integers in lambda calculus at some point, maybe I should make my own joke backend. <.< |
| 00:17:22 | <EvanR> | acme-bigint |
| 00:17:38 | <Axman6> | integer-busy-beaver |
| 00:21:01 | × | gurkenglas quits (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 258 seconds) |
| 00:21:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 00:23:09 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 00:23:22 | → | kenaryn joins (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) |
| 00:23:57 | × | dcleonarski quits (~user@2804:d51:479c:4300:c312:71c1:ee9b:86ea) (Ping timeout: 260 seconds) |
| 00:25:13 | <hpc> | acme-idle-beaver |
| 00:25:23 | <hpc> | ib n = replicateM_ n mempty |
| 00:25:24 | <hpc> | :D |
| 00:28:55 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 00:30:46 | × | xff0x quits (~xff0x@b133147.ppp.asahi-net.or.jp) (Ping timeout: 246 seconds) |
| 00:34:00 | <EvanR> | idle beaver is the dual beaver to busy beaver |
| 00:35:18 | <geekosaur> | Axman6, actually GMP-backed Integers have that same optimization (see the J# constructor) |
| 00:36:10 | <geekosaur> | @src Integer |
| 00:36:10 | <lambdabot> | data Integer = S# Int# |
| 00:36:10 | <lambdabot> | | J# Int# ByteArray# |
| 00:36:16 | <geekosaur> | sorry, S# |
| 00:36:59 | <geekosaur> | and that's a bit out of date: (1) there's a separate constructor for negative big Integers now (2) and the representation changed so it can be in common between all the backends |
| 00:37:05 | <Axman6> | yeah I can't remember exactly what the advantage was 8 years ago. it might have been the explicit sign constructors simplifying things |
| 00:39:15 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 00:40:15 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 276 seconds) |
| 00:40:32 | Lord_of_Life_ | is now known as Lord_of_Life |
| 00:48:30 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 00:49:43 | × | _PSY_ quits (~PSY@2600:1700:2050:1040:dc85:ef8:9bc6:edde) (Remote host closed the connection) |
| 00:49:50 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 240 seconds) |
| 00:53:01 | → | _PSY_ joins (~PSY@2600:1700:2050:1040:dc85:ef8:9bc6:edde) |
| 00:58:34 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 00:59:20 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 01:00:18 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 01:04:19 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 240 seconds) |
| 01:04:40 | → | zmt00 joins (~zmt00@user/zmt00) |
| 01:04:55 | × | stackdroid18 quits (14094@user/stackdroid) (Quit: hasta la vista... tchau!) |
| 01:11:36 | → | xff0x joins (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) |
| 01:36:43 | × | _PSY_ quits (~PSY@2600:1700:2050:1040:dc85:ef8:9bc6:edde) (Remote host closed the connection) |
| 01:37:43 | → | _PSY_ joins (~PSY@2600:1700:2050:1040:dc85:ef8:9bc6:edde) |
| 01:38:07 | <dons> | g'day folks |
| 01:39:51 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Read error: Connection reset by peer) |
| 01:39:55 | → | sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 01:48:21 | → | andrey_ joins (~andrey@p200300dbcf14f800f85ba15fc5bddcc0.dip0.t-ipconnect.de) |
| 01:51:26 | × | andrey__ quits (~andrey@p200300dbcf0986008b4668e560f4c52f.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 01:51:27 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds) |
| 01:51:56 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 01:52:39 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 01:52:56 | × | _PSY_ quits (~PSY@2600:1700:2050:1040:dc85:ef8:9bc6:edde) (Quit: .) |
| 01:54:24 | <jackdk> | hi dons |
| 01:57:28 | <sm> | g'day dons |
| 02:09:04 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds) |
| 02:10:07 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds) |
| 02:16:03 | → | ashpil joins (~ashpil@98.42.126.67) |
| 02:16:31 | × | kenaryn quits (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) (Quit: leaving) |
| 02:16:32 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 02:18:56 | <ashpil> | How does `getChar` have referential transparency? |
| 02:19:41 | <jackdk> | getChar is a constant value: a computation, which when run, will read a character from stdin |
| 02:20:07 | × | dsrt^ quits (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) (Read error: Connection reset by peer) |
| 02:21:49 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 02:21:53 | <ashpil> | Interesting. Makes sense, but does feel a bit hacky :p |
| 02:21:59 | → | dsrt^ joins (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) |
| 02:24:35 | <jackdk> | I don't think it's that hacky. Have a look at https://github.com/system-f/fp-course#demonstrate-io-maintains-referential-transparency : in the haskell example, DRYing up the code by moving `readFile file` into the `let` block does not change the meaning of the program. In the python example, it does. |
| 02:25:53 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 02:26:24 | → | Guest54 joins (~Guest54@modemcable048.16-160-184.mc.videotron.ca) |
| 02:27:33 | <EvanR> | ashpil, consider let x = getChar in _ |
| 02:27:45 | <ashpil> | Hmm yes it passes the technical definition, but it does sort of feel like moving the goalposts. |
| 02:27:45 | <ashpil> | > My function is referentially transparent, it just returns a computation (function) that isn't! |
| 02:27:48 | <lambdabot> | <hint>:1:41: error: parse error on input ‘,’ |
| 02:27:51 | <EvanR> | anywhere in _ you can replace x with getChar and it's the same thing |
| 02:28:05 | <EvanR> | i.e. referential transparency |
| 02:28:19 | <ashpil> | Yeah I get that |
| 02:28:20 | <EvanR> | note how this differs from other languages |
| 02:28:43 | × | xff0x quits (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Ping timeout: 246 seconds) |
| 02:29:05 | <EvanR> | part of which is that getChar isn't a function at all |
| 02:29:23 | <[Leary]> | It's not a moving of goalposts, it's a key shift in perspective---that we step back from *performing* computations *specifying* them. |
| 02:29:40 | <[Leary]> | to* |
| 02:30:01 | <ashpil> | Fair enough |
| 02:31:39 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 02:32:32 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 02:32:33 | <EvanR> | IO actions = first class asm chunks xD |
| 02:34:17 | <EvanR> | you can note only substitute them, but you could store them in data structures or IORefs |
| 02:34:23 | <EvanR> | for fun and profit |
| 02:34:53 | <EvanR> | or send them between threads |
| 02:35:27 | × | SridharRatnakuma quits (~sridmatri@2001:470:69fc:105::1c2) (Ping timeout: 240 seconds) |
| 02:35:30 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 02:35:47 | × | RudraveerMandal[ quits (~magphimat@2001:470:69fc:105::2:eb9) (Ping timeout: 240 seconds) |
| 02:36:07 | × | Orbstheorem quits (~orbstheor@2001:470:69fc:105::a56) (Ping timeout: 240 seconds) |
| 02:36:07 | × | alexfmpe[m] quits (~alexfmpem@2001:470:69fc:105::38ba) (Ping timeout: 240 seconds) |
| 02:36:27 | × | Christoph[m] quits (~hpotsirhc@2001:470:69fc:105::2ff8) (Ping timeout: 240 seconds) |
| 02:37:10 | → | xff0x joins (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) |
| 02:37:50 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 02:41:26 | × | ashpil quits (~ashpil@98.42.126.67) (Ping timeout: 252 seconds) |
| 02:41:33 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 02:41:33 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 02:41:33 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:42:00 | <jackdk> | [Leary] hit it very well. we almost never try and run these computations ourselves, we just assign `main :: IO ()` to the thing we want to run and hand that off to the runtime. |
| 02:44:32 | × | bliminse quits (~bliminse@host81-154-179-167.range81-154.btcentralplus.com) (Ping timeout: 260 seconds) |
| 02:46:05 | → | bliminse joins (~bliminse@host86-164-169-5.range86-164.btcentralplus.com) |
| 02:47:22 | → | SridharRatnakuma joins (~sridmatri@2001:470:69fc:105::1c2) |
| 02:48:40 | × | YoungFrog quits (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) (Ping timeout: 246 seconds) |
| 02:48:50 | × | Alleria quits (~textual@user/alleria) (Ping timeout: 240 seconds) |
| 02:49:09 | → | toluene5 joins (~toluene@user/toulene) |
| 02:49:14 | → | YoungFrog joins (~youngfrog@2a02:a03f:c21b:f900:8cee:eaed:9f2f:9769) |
| 02:49:19 | → | feliix42_ joins (~felix@gibbs.uberspace.de) |
| 02:49:22 | × | feliix42 quits (~felix@gibbs.uberspace.de) (Ping timeout: 246 seconds) |
| 02:49:34 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds) |
| 02:49:43 | × | toluene quits (~toluene@user/toulene) (Ping timeout: 246 seconds) |
| 02:49:44 | toluene5 | is now known as toluene |
| 02:49:45 | → | RudraveerMandal[ joins (~magphimat@2001:470:69fc:105::2:eb9) |
| 02:49:49 | × | jargon quits (~jargon@174-22-206-112.phnx.qwest.net) (Remote host closed the connection) |
| 02:50:01 | → | alexfmpe[m] joins (~alexfmpem@2001:470:69fc:105::38ba) |
| 02:50:04 | × | noctux quits (~noctux@user/noctux) (Ping timeout: 246 seconds) |
| 02:50:33 | → | Orbstheorem joins (~orbstheor@2001:470:69fc:105::a56) |
| 02:51:36 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 02:51:42 | → | Christoph[m] joins (~hpotsirhc@2001:470:69fc:105::2ff8) |
| 02:51:48 | → | noctux joins (~noctux@user/noctux) |
| 02:55:38 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Remote host closed the connection) |
| 02:55:55 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 02:56:28 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection) |
| 02:57:35 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 02:59:34 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 240 seconds) |
| 03:00:16 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:04:05 | × | motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 244 seconds) |
| 03:06:37 | <Guest54> | I am trying to understand how to display a list and how to take a specefic element from it. |
| 03:06:37 | <Guest54> | So, I have a list of lists: [[Id,a,b],[Id,a,b],[Id,a,b]...] |
| 03:06:38 | <Guest54> | And i want to display it to this format: |
| 03:06:38 | <Guest54> | position(first one 1) space Id space b |
| 03:06:39 | <Guest54> | ... |
| 03:06:39 | <Guest54> | ... |
| 03:06:40 | <Guest54> | ... |
| 03:06:40 | <Guest54> | then--------(8 lines) |
| 03:06:41 | <Guest54> | if we take this example: |
| 03:06:41 | <Guest54> | [[43525,5,2],[7455,3,4],[25545,7,5],[98674,10,5]] |
| 03:06:42 | <Guest54> | i want to display somthing like this: |
| 03:06:42 | <Guest54> | 1 43525 2 |
| 03:06:43 | <Guest54> | 2 7455 4 |
| 03:06:43 | <Guest54> | 3 25545 5 |
| 03:06:44 | <Guest54> | 4 98674 5 |
| 03:06:44 | <Guest54> | -------- |
| 03:06:46 | <Axman6> | Don't do that! |
| 03:06:50 | <Axman6> | @where paste |
| 03:06:50 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 03:07:07 | <Guest54> | sorry how can't delete it ? :/ |
| 03:07:11 | <Axman6> | you can't |
| 03:07:44 | <Guest54> | sorry, is there any link to read rules ... |
| 03:07:58 | → | causal joins (~user@50.35.83.177) |
| 03:07:58 | <Guest54> | i m new beginner to this channel |
| 03:08:54 | <Axman6> | it's pretty common across IRc to not spam lots of text,. The topic has useful links. Re: your querstion, have a look at the functions mapM_/traverse/sequence, putStrLn, unwords, show |
| 03:09:10 | <Axman6> | Is this a homework exercise? |
| 03:09:12 | <EvanR> | Guest54, break it down into subproblems. First, a function that takes [Id,a,b] and formats a line of text like you want |
| 03:10:00 | <EvanR> | (Id,A,B) -> String |
| 03:10:06 | <Axman6> | or were you asking about last week? |
| 03:10:55 | <Guest54> | yeep that problem |
| 03:11:08 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 03:11:11 | <Guest54> | but i figured out how to sort the lists and to parse the data... |
| 03:11:14 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 272 seconds) |
| 03:11:36 | <Axman6> | > unwords ["Hello,","world"] |
| 03:11:37 | <lambdabot> | "Hello, world" |
| 03:11:59 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 03:22:01 | → | motherfsck joins (~motherfsc@user/motherfsck) |
| 03:27:10 | × | dsrt^ quits (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) (Ping timeout: 246 seconds) |
| 03:28:27 | × | AkechiShiro quits (~licht@user/akechishiro) (Ping timeout: 240 seconds) |
| 03:28:57 | × | Raito_Bezarius quits (~Raito@2a01:e0a:5f9:9681:a0a0:bb76:611f:9da7) (Ping timeout: 248 seconds) |
| 03:29:27 | × | Luj4 quits (~Luj@2a01:e0a:5f9:9681:4314:3e52:bdb3:a61e) (Ping timeout: 260 seconds) |
| 03:30:09 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 03:30:18 | → | frost joins (~frost@user/frost) |
| 03:31:01 | → | AkechiShiro joins (~licht@user/akechishiro) |
| 03:32:35 | → | Luj4 joins (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) |
| 03:34:36 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 03:34:52 | → | dsrt^ joins (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) |
| 03:37:37 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds) |
| 03:42:08 | → | Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius) |
| 03:58:01 | → | phma_ joins (~phma@2001:5b0:210d:cc08:34f8:e479:1e76:ac53) |
| 03:58:41 | × | phma quits (~phma@host-67-44-208-37.hnremote.net) (Read error: Connection reset by peer) |
| 04:00:03 | <Guest54> | is there anyway to access to an element of the internal list ? |
| 04:00:03 | <Guest54> | [[43525,5,2],[7455,3,4]] |
| 04:00:04 | <Guest54> | for example access to the number 5 in the firstl list |
| 04:02:51 | <Axman6> | you can index into lists using !!, but generally we would recommend against it because it's not a safe function. you're better off to parse things into some sort of structure which guarantees the shame you care about, like we spoke about last week: data Patient = Patient {pId :: Int, pThing :: Int, pOther :: Int} |
| 04:03:29 | → | nate1 joins (~nate@98.45.169.16) |
| 04:08:35 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
| 04:10:38 | <sm> | but for the sake of learning.. [[43525,5,2],[7455,3,4]] !! 0 !! 1 |
| 04:12:25 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 04:12:38 | → | coot joins (~coot@213.134.190.95) |
| 04:14:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 04:16:56 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:18:59 | phma_ | is now known as phma |
| 04:20:48 | <sm> | when you have a small number of known shapes, you can extract it with pattern matching, eg... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/94457ea77c3bfc46d7bd14b9f375f1a93e6108af) |
| 04:25:34 | × | Guest54 quits (~Guest54@modemcable048.16-160-184.mc.videotron.ca) (Ping timeout: 252 seconds) |
| 04:32:53 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::ba9a) (Ping timeout: 255 seconds) |
| 04:33:17 | <EvanR> | is that a thing, field name after first letter of type name |
| 04:33:46 | × | P1RATEZ quits (piratez@user/p1ratez) (Remote host closed the connection) |
| 04:33:52 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 04:35:19 | → | kaskal- joins (~kaskal@2001:4bb8:2e8:3abf:bc97:9581:8b80:8f4b) |
| 04:35:35 | → | Infinite joins (~Infinite@49.39.127.241) |
| 04:36:03 | × | kaskal quits (~kaskal@2001:4bb8:2e0:b5bd:e3c0:d71b:f32:84d8) (Ping timeout: 244 seconds) |
| 04:36:13 | × | dsrt^ quits (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) (Ping timeout: 256 seconds) |
| 04:37:33 | <jackdk> | yeah I do it a lot. Less so these days, GHC seems to be better about handling record field clashes. generic-lens also helps |
| 04:43:44 | × | frost quits (~frost@user/frost) (Quit: Client closed) |
| 04:44:42 | → | k8yun joins (~k8yun@user/k8yun) |
| 04:44:49 | × | k8yun quits (~k8yun@user/k8yun) (Remote host closed the connection) |
| 04:54:00 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 04:56:05 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 04:56:22 | × | y04nn quits (~y04nn@2001:ac8:28:95::a17e) (Ping timeout: 272 seconds) |
| 04:57:25 | → | dsrt^ joins (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) |
| 04:59:06 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 04:59:17 | × | Unicorn_Princess quits (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection) |
| 04:59:39 | → | Vajb joins (~Vajb@2001:999:42:1446:8c2:e3f9:b580:2e45) |
| 05:00:21 | → | michalz joins (~michalz@185.246.204.105) |
| 05:07:22 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 05:14:59 | kst | is now known as Guest8247 |
| 05:19:18 | → | frost joins (~frost@user/frost) |
| 05:21:11 | <c_wraith> | Wait, why isn't there eqInt# ? |
| 05:23:30 | <dolio> | Because it's called (==#). |
| 05:23:36 | <c_wraith> | ah, of course. |
| 05:24:10 | <c_wraith> | thank you |
| 05:28:51 | × | dsrt^ quits (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) (Ping timeout: 276 seconds) |
| 05:30:42 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 05:33:40 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 05:36:03 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 05:38:13 | → | dsrt^ joins (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) |
| 05:38:18 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:40:58 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 05:41:09 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 244 seconds) |
| 05:44:53 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 05:45:10 | → | img joins (~img@user/img) |
| 05:54:58 | <Inst> | @itchyjunk |
| 05:54:58 | <lambdabot> | Unknown command, try @list |
| 05:55:07 | <Inst> | [itchyjunk] how goes your haskell journey? |
| 06:02:52 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 06:04:06 | <[itchyjunk]> | Inst, I have seriously slacked off. |
| 06:04:17 | <Inst> | did you ever get past the monad barrier? |
| 06:04:20 | <Inst> | I need more monad tutorials |
| 06:04:32 | <Inst> | if we make enough burritos we'll actually create one that works |
| 06:04:43 | <[itchyjunk]> | Lol, i have a slightly better idea of what it is but not, i am not fully clear on it. |
| 06:04:52 | <[itchyjunk]> | Concept of lifts and such from category theory. |
| 06:05:27 | → | liebach joins (~liebach@srv2047.zentience.net) |
| 06:05:30 | <[itchyjunk]> | But I need to code up a) tree search stuff b) parser it seems. to forward my programming journey. |
| 06:05:55 | <[itchyjunk]> | The crypto channel also recommend i implement a certain thing but might not be feasible for now |
| 06:06:15 | <[itchyjunk]> | What have you been exploring, Inst ? |
| 06:06:30 | <Inst> | haskell |
| 06:06:39 | <Inst> | i'd think i have a good understanding of what a monad is, which i'd say is |
| 06:06:46 | <Inst> | a type which can absorb another type |
| 06:07:01 | <Inst> | and implements lawful <$>, pure, <*>, and >>= |
| 06:07:10 | → | mattil joins (~mattil@helsinki.portalify.com) |
| 06:07:13 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 06:07:36 | <Inst> | the internal variation among monads is obscene |
| 06:08:20 | <Inst> | but the only commonality is that there's a type constructor that can take 1 type variable (either is not a monad, either e is) |
| 06:08:32 | <Inst> | <$>, pure, <*>, >>= |
| 06:10:10 | <[itchyjunk]> | hmm absorb other types |
| 06:10:13 | <[itchyjunk]> | not sure what that means |
| 06:10:30 | × | dsrt^ quits (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) (Ping timeout: 240 seconds) |
| 06:10:36 | × | srk quits (~sorki@user/srk) (Ping timeout: 244 seconds) |
| 06:10:38 | → | Maxdaman1us joins (~Maxdamant@user/maxdamantus) |
| 06:10:42 | <[itchyjunk]> | but i gotta go for now! |
| 06:11:00 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 06:11:37 | × | Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 260 seconds) |
| 06:12:21 | → | srk joins (~sorki@user/srk) |
| 06:13:06 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 06:13:30 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 06:16:50 | <Inst> | i'm still unsure |
| 06:16:53 | <Inst> | if anyone wants to play with me |
| 06:17:32 | <Inst> | if we define a monad as containing a type constructor, a structure, and a value |
| 06:18:17 | <Inst> | is the function embedded in the constructor StateT a value or part of the structure? It's technically a value, yes, but if you pure something into it |
| 06:18:40 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 246 seconds) |
| 06:18:41 | <Inst> | you end up with a \s -> (a,s) |
| 06:19:49 | <[exa]> | Inst: the "value" as a "bindable type of the result of monadic computation" is different from the "value" that actually represents the computation |
| 06:20:13 | <Inst> | yeah tbh the problem is that if you think of monads as sequencing effects and so on, or computations in a context, it's too abstract for me :( |
| 06:20:22 | <Inst> | and probably most people |
| 06:21:38 | <[exa]> | yeah the semantics of "sequencing effects" is already too specialized |
| 06:22:27 | <[exa]> | I imagine "Monad a" as "something that may produce values of type a, but wrapped with some special semantics" |
| 06:24:03 | <[exa]> | such as "a might not even exist" (Maybe), "there might be an error" (Either, Except), "there are multiple a's and user is free to choose" (List, LogicT), "computer needs access to IO actions to actually produce the a" (IO), "a is accompanied with a monoidal log of stuff" (Writer), "the whole computation needs a global parameter" (Reader), etc etc |
| 06:24:03 | × | shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit) |
| 06:24:07 | <Inst> | i'm sort of fascinated by this hypothesis, since monads are a Zen / Daoist like incommunicable idea |
| 06:24:10 | <Inst> | given monad curse |
| 06:24:48 | <Inst> | maybe everyone has a different conception of monads, even people who purportedly "grok" monads |
| 06:24:59 | <[exa]> | the main problem of monad tutorial is that Monad does not "exist" as an object, which makes communication to post-OOP programmers really challenging |
| 06:25:41 | <Inst> | it's easier just to declare the function embedded in the state monad as part of the structure, tbh |
| 06:25:53 | <[exa]> | so don't think about it as an object, it's an unifying concept that allows you to write `do` and `<-` in the programs without thinking what exact computation there is |
| 06:25:53 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 06:26:01 | <Inst> | and say proxy x is proxy and the value is just subsumed ala Nothing |
| 06:26:24 | <Inst> | i mean the way i want to think about it is "any data type for which there's a lawful instance of fmap, pure, <*>, >>=" |
| 06:26:48 | <[exa]> | there are multiple lawful instances for most of the types though |
| 06:27:00 | → | dsrt^ joins (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) |
| 06:27:13 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 06:28:53 | <[exa]> | how's proxy related to that? |
| 06:29:15 | × | Luj4 quits (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (Quit: The Lounge - https://thelounge.chat) |
| 06:29:25 | <[exa]> | also "the function embedded in the state monad" -- part of which structure? |
| 06:29:35 | → | Luj4 joins (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) |
| 06:29:52 | Luj4 | is now known as Luj |
| 06:32:05 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 258 seconds) |
| 06:33:10 | <Inst> | i mean before i grokked state, i assumed, there were just two things to a monad |
| 06:33:37 | <Inst> | data declaration, implementations of fmap (of which there's only a single lawful instance), pure, <*>, >>= |
| 06:33:55 | <Inst> | structure + methods |
| 06:34:27 | <Inst> | now state / reader |
| 06:34:34 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 06:35:02 | <Inst> | then you have (->) r, which has no data declaration (iirc) but only instances |
| 06:35:48 | <[exa]> | it has a data declaration, although it's tricky because it's glued to (->) |
| 06:36:22 | <[exa]> | you may imagine there is `data (->) parameter result = ....????....` written somewhere deep in GHC internals :] |
| 06:37:00 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:37:13 | <[exa]> | `Monad ((->) r)` is an instance for the case if someone would like to glue 2 such functions together with >> |
| 06:39:12 | → | christiansen joins (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) |
| 06:39:33 | <[exa]> | luckily, standard ReaderT and Reader have the (->) wrapped in a newtype, you have _roughly_: `newtype Reader r a = Reader (r -> a)` |
| 06:39:48 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 06:41:58 | <Inst> | also it creates annoyances because I want to read up about the Reader / ReaderT monad |
| 06:44:13 | <[exa]> | the problem there is that many people just want to use ((->) r) as reader because it is super useful, esp with applicatives (`NewStructure <$> getOldStructField1 <*> getOldStructField2 $ oldStructure`), on the other hand it creates this bit of confusion because (->) is suddenly used for several different things |
| 06:45:38 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 255 seconds) |
| 06:48:24 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Remote host closed the connection) |
| 06:48:41 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 06:49:11 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 06:49:54 | <[exa]> | btw decomposing this is a nice related exercise: |
| 06:50:47 | <[exa]> | > (drop <> take) 3 "Hello" |
| 06:50:48 | <lambdabot> | "loHel" |
| 06:53:14 | <Inst> | since when have functions had a <> instance? |
| 06:53:16 | <Inst> | my eyes |
| 06:53:51 | <[exa]> | functions that return monoids can be glued together -- you copy argument to both, and glue the results together |
| 06:53:55 | <Inst> | https://stackoverflow.com/questions/44344706/how-do-i-use-a-monoid-instance-of-a-function |
| 06:54:00 | <[exa]> | s/monoids/semigroups/ |
| 06:54:34 | × | echoreply quits (~echoreply@2001:19f0:9002:1f3b:5400:ff:fe6f:8b8d) (Quit: WeeChat 2.8) |
| 06:55:02 | → | echoreply joins (~echoreply@45.32.163.16) |
| 06:55:07 | <[exa]> | (actually I'd say it also admits monoid, you can make `mempty` function as `const mempty`) |
| 06:56:06 | <Inst> | how long has it been sport to instance (-> a) and other function types into typeclasses? |
| 06:56:21 | <[exa]> | well, since forever |
| 06:57:22 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 06:57:25 | <jackdk> | https://typeclasses.com/timeline/a-system-of-constructor-classes Haskell 1.3, maybe? |
| 06:57:39 | <Inst> | also how does that even work? those are (a -> b... oh fuck |
| 06:57:52 | <Inst> | it's valid for (a -> b) |
| 06:57:55 | <[exa]> | you see, it's not very clean (look at the error messages sometime!) but super useful. I'd say that wrapping (->) in newtypes is actually a newer attempt to make the thing fail more gracefully |
| 06:58:00 | <jackdk> | Functor has kind (Type -> Type) -> Constraint |
| 06:58:00 | <Inst> | but (c -> d) can be an a |
| 06:58:20 | <jackdk> | (->) has kind (very roughly, ignoring levity) Type -> Type -> Type |
| 06:58:29 | <[exa]> | Inst: "how does that work" you mean the monoid example or something else? |
| 06:58:43 | <jackdk> | ((->) r) therefore has kind Type -> Type |
| 06:59:11 | <Inst> | * -> * -> * |
| 07:00:42 | <[exa]> | Inst: *->*->* reads "you give it 2 representable Types and get a representable Type" |
| 07:00:54 | → | jonathanx joins (~jonathan@c-5eea24de-74736162.cust.telenor.se) |
| 07:01:24 | × | Infinite quits (~Infinite@49.39.127.241) (Ping timeout: 252 seconds) |
| 07:03:43 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:40c3:3bf4:26ef:9b59) |
| 07:05:29 | → | Ether17 joins (~Ether17@103.217.111.249) |
| 07:05:32 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f100:eba8:305a:4575) (Remote host closed the connection) |
| 07:09:47 | × | Ether17 quits (~Ether17@103.217.111.249) (Client Quit) |
| 07:11:23 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 07:15:16 | → | mbuf joins (~Shakthi@31.32.33.168) |
| 07:15:24 | × | dsrt^ quits (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) (Ping timeout: 258 seconds) |
| 07:18:52 | × | juri_ quits (~juri@178.63.35.222) (Ping timeout: 246 seconds) |
| 07:20:45 | → | cfricke joins (~cfricke@user/cfricke) |
| 07:25:48 | → | juri_ joins (~juri@178.63.35.222) |
| 07:27:29 | → | acidjnk joins (~acidjnk@p200300d0c7068b81f860a70d68b3f398.dip0.t-ipconnect.de) |
| 07:30:08 | × | juri_ quits (~juri@178.63.35.222) (Remote host closed the connection) |
| 07:30:37 | → | alp joins (~alp@user/alp) |
| 07:31:32 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 07:33:27 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 07:33:59 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 07:34:27 | → | Infinite joins (~Infinite@49.39.127.241) |
| 07:35:06 | → | vonfry joins (~user@139.227.167.223) |
| 07:37:42 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 07:46:00 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection) |
| 07:46:54 | → | kuribas joins (~user@ptr-17d51emj6sz64bjx9i7.18120a2.ip6.access.telenet.be) |
| 07:49:10 | → | juri_ joins (~juri@178.63.35.222) |
| 07:49:16 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 07:52:09 | → | chomwitt joins (~chomwitt@2a02:587:dc1e:cc00:f079:d366:2a9:ed7f) |
| 07:56:21 | × | vonfry quits (~user@139.227.167.223) (Quit: ERC 5.4 (IRC client for GNU Emacs 28.1)) |
| 07:56:27 | → | ccntrq joins (~Thunderbi@172.209.94.92.rev.sfr.net) |
| 07:58:17 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 08:00:13 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 08:02:03 | × | ccntrq quits (~Thunderbi@172.209.94.92.rev.sfr.net) (Quit: ccntrq) |
| 08:02:19 | → | ccntrq joins (~Thunderbi@172.209.94.92.rev.sfr.net) |
| 08:03:57 | → | zer0bitz joins (~zer0bitz@2001:2003:f444:8f00:1ddb:ab6a:8605:cb77) |
| 08:04:16 | × | jonathanx quits (~jonathan@c-5eea24de-74736162.cust.telenor.se) (Ping timeout: 244 seconds) |
| 08:04:22 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
| 08:04:54 | → | jgeerds joins (~jgeerds@d53604b0.access.ecotel.net) |
| 08:05:00 | → | nate1 joins (~nate@98.45.169.16) |
| 08:05:56 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f100:eba8:305a:4575) |
| 08:07:47 | → | jonathanx joins (~jonathan@94.234.36.222) |
| 08:09:57 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 244 seconds) |
| 08:10:10 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f100:eba8:305a:4575) (Ping timeout: 250 seconds) |
| 08:10:42 | → | jonathanx_ joins (~jonathan@dyn-5-sc.cdg.chalmers.se) |
| 08:11:22 | <merijn> | representable is an awkward choice of word, as it already comes with connotations from other uses |
| 08:11:55 | <merijn> | Additionally, depending on your POV * can also take types that I wouldn't meaningfully call "representable" (like, is Void representable?) |
| 08:13:07 | × | jonathanx quits (~jonathan@94.234.36.222) (Ping timeout: 246 seconds) |
| 08:15:29 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:7590:47:8cf5:145e) |
| 08:16:30 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 08:17:24 | → | eggplant_ joins (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) |
| 08:18:47 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 08:20:08 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:7590:47:8cf5:145e) (Ping timeout: 255 seconds) |
| 08:20:13 | → | __monty__ joins (~toonn@user/toonn) |
| 08:20:36 | <[Leary]> | It occurs to me that almost all important typeclasses are just Monoid in fancy dress. Semigroup? Half a Monoid. Num? Two Monoids. Category? Indexed Monoid. Applicative? Monoidal Functor (free edition). Alternative? Monoidal Functor (natural edition). Foldable? Monoid homomorphisms (free edition). Traversable? Foldable for Applicative; that's Monoid. Monad? Kleisli composition; Category; Monoid. |
| 08:21:14 | <[Leary]> | I can't believe we let stupid Applicative and stupid Monad keep their stupid laws when we could bask all in their soft monoidal glow. |
| 08:21:51 | → | zeenk joins (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) |
| 08:21:56 | × | eggplant_ quits (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) (Ping timeout: 255 seconds) |
| 08:22:00 | <tomsmeding> | I suspect that indexed monoid laws for Monad would be less readable than the current monad laws |
| 08:22:06 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 258 seconds) |
| 08:22:37 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 08:22:46 | <merijn> | [Leary]: It appears you are rediscovering algebra >.> |
| 08:22:49 | × | turlando quits (~turlando@user/turlando) (Quit: turlando) |
| 08:23:25 | <merijn> | [Leary]: You can reformulate monad laws more nicely if you use Kleisli fish instead of >>= |
| 08:23:52 | <merijn> | "f >=> return = f = return >=> f" |
| 08:24:11 | <[Leary]> | Yes, that's what I want people to see when they find Monad in the Prelude haddocks. |
| 08:24:28 | → | turlando joins (~turlando@93.51.40.51) |
| 08:24:28 | × | turlando quits (~turlando@93.51.40.51) (Changing host) |
| 08:24:28 | → | turlando joins (~turlando@user/turlando) |
| 08:24:32 | <merijn> | but Kleisli fish is inconvenient to work with most of the time |
| 08:24:51 | <tomsmeding> | haskell appeals, broadly, to two groups of people: algebraicists and programmers |
| 08:25:07 | <tomsmeding> | I think this law reformulation would not be an improvement for the second group :p |
| 08:26:30 | <[Leary]> | It really should unify and simplify things for all, but it's my bias to consider 'abstract' ~ 'simple'. |
| 08:26:49 | <tomsmeding> | abstract is _not_ simple for most people |
| 08:27:02 | <tomsmeding> | well, sometimes it is, if the abstraction is particularly useful to _reason_ about the thing |
| 08:27:16 | <tomsmeding> | monad/monoid/etc. abstractions are super useful |
| 08:27:21 | <kuribas> | merijn: well, people prefer (.) over ($), why not (>=>) over (>>=)? |
| 08:27:38 | <tomsmeding> | but abstracting the laws of them wouldn't carry its weight, I think |
| 08:28:22 | <tomsmeding> | an alternative could be to add a note to the haddocks to mention the monoid-based laws; a note is probably enough to inspire the right ideas into the people that are receptive to them :p |
| 08:29:13 | × | turlando quits (~turlando@user/turlando) (Ping timeout: 246 seconds) |
| 08:29:52 | → | turlando joins (~turlando@93.51.40.51) |
| 08:29:52 | × | turlando quits (~turlando@93.51.40.51) (Changing host) |
| 08:29:52 | → | turlando joins (~turlando@user/turlando) |
| 08:29:52 | → | rodental joins (~rodental@38.146.5.222) |
| 08:30:12 | <tomsmeding> | I guess the overarching consideration is: will the reformulation of the laws make programmers write better code |
| 08:30:15 | <tomsmeding> | I doubt that |
| 08:30:43 | <tomsmeding> | and the _reference documentation_ of the language should be about empowering programmers |
| 08:31:26 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 08:33:15 | <Philonous> | It seems like rust managed to steels Haskell's thunder just by avoiding any mention of graduate math. Haskeller's response: Hold my morphisms, I'ma add more category theory. ;) |
| 08:33:29 | <Philonous> | steal* |
| 08:34:14 | <kuribas> | call it flatMap or linq instead of "Monad", then people are happy :) |
| 08:34:38 | <kuribas> | or "query expression". |
| 08:34:46 | <tomsmeding> | Computation |
| 08:34:50 | <[Leary]> | I feel like it could actually help new Haskellers learn all these super useful abstractions without getting lost in Applicative/Monad/etc tutorial land, since they can see that they're all variations on the same thing, and can understand them in terms of the simple version. |
| 08:35:59 | <tomsmeding> | [Leary]: you may well be right, I don't know. There is an effort ongoing to improve haskell documentation; you could submit a proposal there |
| 08:36:20 | <kuribas> | The main problem is when people use blogposts to learn about these concepts. |
| 08:36:23 | <kuribas> | Or papers. |
| 08:36:54 | <kuribas> | Instead of a proper haskell handbook. |
| 08:37:06 | <kuribas> | Even the shittiest handbook is better than blogposts. |
| 08:38:35 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 258 seconds) |
| 08:39:25 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 08:39:25 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 08:39:25 | → | wroathe joins (~wroathe@user/wroathe) |
| 08:40:32 | → | CiaoSen joins (~Jura@p200300c9571e4b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 08:40:35 | <tomsmeding> | [Leary]: not quite sure what the process is (if there is a real process), but Hecate would be the person to contact |
| 08:41:30 | → | Guest810 joins (~Guest8@2a02:26f7:cd46:4000:b4f0:3297:ff94:57fe) |
| 08:41:49 | × | Guest810 quits (~Guest8@2a02:26f7:cd46:4000:b4f0:3297:ff94:57fe) (Client Quit) |
| 08:42:06 | → | Guest8 joins (~Guest8@2a02:26f7:cd46:4000:b4f0:3297:ff94:57fe) |
| 08:42:35 | <kuribas> | The goal of base haskell reference documentation is not to be beginner friendly, but to be concise and informative. |
| 08:43:28 | → | akegalj joins (~akegalj@93.140.42.158) |
| 08:43:30 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 08:43:37 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.5) |
| 08:43:58 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 08:50:02 | × | Guest8 quits (~Guest8@2a02:26f7:cd46:4000:b4f0:3297:ff94:57fe) (Quit: Client closed) |
| 08:50:29 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.5) |
| 08:55:45 | × | mattil quits (~mattil@helsinki.portalify.com) (Remote host closed the connection) |
| 08:55:59 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 08:59:41 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:d373:59fe:aee5:a075) |
| 08:59:57 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:07:39 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 09:16:43 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 09:23:17 | Maxdaman1us | is now known as Maxdamantus |
| 09:27:33 | → | oo_miguel joins (~pi@77.252.47.226) |
| 09:29:05 | → | titibandit joins (~thibaut@2a00:8a60:c000:1:8a13:bf74:b2:8d47) |
| 09:29:10 | <oo_miguel> | Hello, what makes me wonder: does stackage give any other guarantees then that, the subset of packages "will compile"? I noticed that LTS-18.28 includes pacakges marked as deprecated (on hackage). |
| 09:29:38 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 09:29:49 | <merijn> | oo_miguel: "we may have run some of the tests too" |
| 09:31:26 | × | mcglk quits (~mcglk@131.191.49.120) (Read error: Connection reset by peer) |
| 09:31:48 | <oo_miguel> | ok thanks |
| 09:32:16 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 09:34:53 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 09:37:09 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 09:39:11 | × | polux quits (~polux@51-15-169-172.rev.poneytelecom.eu) (Remote host closed the connection) |
| 09:39:12 | <Inst> | kuribas : why (.) over ($)? |
| 09:39:21 | <Inst> | is there some performance improvement? . is unpredictable |
| 09:39:34 | <dminuoso_> | No, it's mostly just convention |
| 09:39:34 | <Inst> | and often ends with a block . . . . $ data |
| 09:39:44 | <dminuoso_> | There's some practical considerations, but its really just a convention. |
| 09:40:08 | <kuribas> | Inst: it's to avoid naming a single variable, which is very, very difficult. |
| 09:40:09 | <Inst> | at least, the main advantage is that . works when you're stuffing it into a name |
| 09:40:20 | <dminuoso_> | Inst: yup, that's the sole reason. |
| 09:40:27 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 09:40:30 | <dminuoso_> | also (.) is visually more pleasing than ($) I guess |
| 09:40:36 | <Inst> | also can we agree to rename variables names in Haskell? |
| 09:40:44 | <Inst> | or are names dangerous terms? |
| 09:41:35 | <dminuoso_> | A variable is just a particular kind of name. Im not sure what benefits you gain from using a more overloaded name. |
| 09:41:44 | <Inst> | *term |
| 09:42:05 | <dminuoso_> | If you intend to differentiate it from "variables from traditional programming languages", rename them to mutable stores/references instead? |
| 09:42:45 | → | polux joins (~polux@51-15-169-172.rev.poneytelecom.eu) |
| 09:43:42 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.5) |
| 09:43:42 | <merijn> | Are we gonna rename variables in math too? >.> |
| 09:45:53 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 09:46:15 | <Inst> | hahahaha |
| 09:46:22 | <Inst> | does term work? |
| 09:46:26 | <Inst> | term level vs type level |
| 09:47:31 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 09:47:40 | <merijn> | A term refers to any syntactically valid expression |
| 09:48:01 | <merijn> | So "a" is a term, but so is "1 + 1" or "map f [1..10]" |
| 09:48:30 | <Franciman> | but not "map :: (a -> b) -> [a] -> [b]" |
| 09:49:01 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 09:49:07 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 09:49:45 | <merijn> | I mean, add some parens and it would be |
| 09:49:47 | × | jgeerds quits (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 260 seconds) |
| 09:50:03 | <merijn> | > (map :: (a -> b) -> [a] -> [b]) (+1) [1..5] |
| 09:50:06 | <lambdabot> | [2,3,4,5,6] |
| 09:50:11 | <merijn> | Looks like a valid term to me! |
| 09:50:42 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 09:51:43 | <kritzefitz> | > let f = map :: (a -> b) -> [a] -> [b] in f (+1) [1..5] |
| 09:51:46 | <lambdabot> | [2,3,4,5,6] |
| 09:52:05 | <kritzefitz> | Even works without parens in the right context. |
| 09:52:26 | <Philonous> | dminuoso_, I thought they are conventionally called "reference cell" |
| 09:53:06 | <Philonous> | Hmm, google doesn't find it, so perhaps not. |
| 09:54:03 | <Franciman> | > map :: (a -> b) -> [a] -> [b] |
| 09:54:05 | <lambdabot> | error: |
| 09:54:05 | <lambdabot> | • No instance for (Typeable a0) |
| 09:54:05 | <lambdabot> | arising from a use of ‘show_M28235964043627188638’ |
| 09:54:12 | <Franciman> | ?? .. |
| 09:54:12 | <lambdabot> | .. |
| 09:54:24 | → | albertoCCz joins (~albertoCC@nat-cvi-a-5086.ugr.es) |
| 09:54:25 | <Franciman> | oh |
| 09:55:05 | <Franciman> | so type signature assertions are expressions cool |
| 09:55:16 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 248 seconds) |
| 09:55:29 | <Franciman> | when i write `myFunc :: its-type` it's syntactically the same as writing `3` |
| 09:55:35 | <Franciman> | ? |
| 09:56:11 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 09:56:17 | <merijn> | Franciman: More like "(foo :: bar)" is equivalent to "foo" in an expression context |
| 09:56:31 | <merijn> | (well, foo with a potentially restricted type, I suppose) |
| 09:58:13 | <Franciman> | skewy |
| 09:58:15 | <Franciman> | i see |
| 09:58:36 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 09:59:14 | × | Infinite quits (~Infinite@49.39.127.241) (Ping timeout: 252 seconds) |
| 10:00:40 | × | albertoCCz quits (~albertoCC@nat-cvi-a-5086.ugr.es) (Remote host closed the connection) |
| 10:01:42 | → | hsw joins (~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net) |
| 10:03:00 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 10:04:13 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:d373:59fe:aee5:a075) (Remote host closed the connection) |
| 10:04:25 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:a9d1:8889:83c0:913) |
| 10:06:27 | <oo_miguel> | I just came across this: https://hackage.haskell.org/packages/preferred-versions Is there some elegant way to check if my stack project is using libraries within this ranges, and warn me otherweise? |
| 10:08:14 | → | y04nn joins (~y04nn@2001:ac8:28:95::a17e) |
| 10:11:00 | × | CiaoSen quits (~Jura@p200300c9571e4b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 10:14:27 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 10:15:20 | × | xff0x quits (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Ping timeout: 255 seconds) |
| 10:16:19 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 10:19:23 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 10:23:19 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 10:24:54 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 10:26:31 | → | zaquest joins (~notzaques@5.130.79.72) |
| 10:27:51 | × | feliix42_ quits (~felix@gibbs.uberspace.de) (Read error: Connection reset by peer) |
| 10:27:51 | × | AWizzArd quits (~code@gehrels.uberspace.de) (Read error: Connection reset by peer) |
| 10:28:05 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 10:29:47 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 240 seconds) |
| 10:29:50 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 10:30:22 | → | CiaoSen joins (~Jura@p200300c9571e4b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 10:30:43 | → | feliix42 joins (~felix@gibbs.uberspace.de) |
| 10:32:18 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 10:33:20 | → | AWizzArd joins (~code@gehrels.uberspace.de) |
| 10:34:55 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 10:39:16 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:a9d1:8889:83c0:913) (Ping timeout: 244 seconds) |
| 10:43:28 | → | gurkenglas joins (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
| 10:43:29 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 10:51:40 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 10:56:13 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
| 10:57:24 | → | sabry joins (~sabry@197.37.57.10) |
| 10:58:29 | → | xff0x joins (~xff0x@b133147.ppp.asahi-net.or.jp) |
| 10:58:54 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 11:03:19 | × | bwe quits (~bwe@2a01:4f8:1c1c:4878::2) (Remote host closed the connection) |
| 11:06:58 | × | polux quits (~polux@51-15-169-172.rev.poneytelecom.eu) (Remote host closed the connection) |
| 11:07:40 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:ad75:2aef:bfae:2e4b) |
| 11:08:42 | → | bwe joins (~bwe@2a01:4f8:1c1c:4878::2) |
| 11:09:33 | → | polux joins (~polux@51-15-169-172.rev.poneytelecom.eu) |
| 11:11:38 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 11:14:47 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 11:20:44 | × | acidjnk quits (~acidjnk@p200300d0c7068b81f860a70d68b3f398.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 11:21:01 | <[exa]> | merijn: btw is there any better "kinda intuitive" word choice instead of representable? |
| 11:22:08 | <merijn> | Some people use "concrete type", but I also dislike, so I guess the answer is "no"? :p |
| 11:22:30 | <merijn> | https://gist.github.com/merijn/796b8e041885df870fbb53b7191644b6 and all that |
| 11:22:53 | <[exa]> | "actual type, not just Type" |
| 11:23:11 | <dminuoso_> | I like concrete types. There is normal concrete, reinforced concrete, precast concrete, air entrained concrete.. |
| 11:23:22 | <merijn> | I dislike TypInType (and thus) Type, too :p |
| 11:23:25 | <[exa]> | the gist recommends saying monotype? |
| 11:23:56 | <merijn> | It definitely does not? |
| 11:24:01 | <[exa]> | "something that can have values" <- broken too |
| 11:24:06 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 11:24:37 | <merijn> | [exa]: No, that is well-defined in haskell |
| 11:24:48 | <[exa]> | next time I'll go "yeah the tangible *type* you know which one I mean *wink wink*" |
| 11:25:03 | <[exa]> | merijn: works with Void? |
| 11:25:12 | <merijn> | [exa]: Void has a value in Haskell |
| 11:25:14 | × | y04nn quits (~y04nn@2001:ac8:28:95::a17e) (Ping timeout: 272 seconds) |
| 11:25:15 | <merijn> | undefined |
| 11:25:16 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 11:25:17 | <dminuoso_> | [exa]: Dont conflate necessity with sufficiency |
| 11:25:21 | <[exa]> | ok I'm happy |
| 11:25:26 | <dminuoso_> | Ah but yeah |
| 11:25:37 | <tdammers> | depends which side of that fast-and-loose fence you're looking from |
| 11:25:39 | <[exa]> | "valuable types" it is. :D |
| 11:25:43 | <dminuoso_> | Even if we dont consider bottom, its still correct |
| 11:25:57 | → | z0k joins (~z0k@39.40.43.194) |
| 11:26:26 | <merijn> | Ignoring non-Haskell extensions like levity and unboxed types, all values have a type of kind * and all types of kind * are inhabitated (i.e. have a value), even if that value is only bottom |
| 11:26:27 | <dminuoso_> | Sometimes you hear people saying that * is the kind of habitable (not necessarily habitated) types |
| 11:27:17 | <[exa]> | hm habitable/inhabited is actually good, will use that |
| 11:27:17 | <[exa]> | thanks :] |
| 11:27:38 | <merijn> | [exa]: It is, because that at least has an unambiguous definition :) |
| 11:28:10 | <[exa]> | true |
| 11:29:08 | <dminuoso_> | From an implementation point of view, they are all considered inhabited, including bottom, which is what we have the DataKind'ed RuntimeRep for |
| 11:30:07 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 11:30:18 | <dminuoso_> | So you have `type Type = TYPE LiftedRep` with `data TYPE (a :: RuntimeRep)` |
| 11:30:42 | dminuoso_ | idly ponders about the irony of writing type three times in a row in `type Type = TYPE ...` |
| 11:33:27 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 11:37:02 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 11:37:06 | × | sabry quits (~sabry@197.37.57.10) (Quit: Client closed) |
| 11:39:05 | × | christiansen quits (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Quit: christiansen) |
| 11:39:16 | → | christiansen joins (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) |
| 11:39:21 | <jackdk> | At least we don't have t@ype |
| 11:40:04 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
| 11:41:26 | × | akegalj quits (~akegalj@93.140.42.158) (Quit: leaving) |
| 11:50:08 | → | acidjnk joins (~acidjnk@p200300d0c7068b816dc0927526e38c9a.dip0.t-ipconnect.de) |
| 11:52:07 | × | acidjnk quits (~acidjnk@p200300d0c7068b816dc0927526e38c9a.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 11:54:12 | → | acidjnk joins (~acidjnk@p200300d0c7068b81149b5d5938d07897.dip0.t-ipconnect.de) |
| 11:55:17 | → | srk- joins (~sorki@user/srk) |
| 11:56:23 | → | srk| joins (~sorki@user/srk) |
| 11:57:56 | × | srk quits (~sorki@user/srk) (Ping timeout: 255 seconds) |
| 11:58:54 | → | mokee joins (~mokee@37.228.215.190) |
| 11:59:31 | srk| | is now known as srk |
| 11:59:34 | × | srk- quits (~sorki@user/srk) (Ping timeout: 246 seconds) |
| 12:06:30 | → | nate1 joins (~nate@98.45.169.16) |
| 12:11:20 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 258 seconds) |
| 12:15:30 | → | mima joins (~mmh@net-93-148-81-31.cust.dsl.teletu.it) |
| 12:20:37 | → | kenaryn joins (~aurele@89-88-44-27.abo.bbox.fr) |
| 12:29:03 | → | benin2 joins (~benin@2401:4900:2323:425e:4253:4476:82af:eac4) |
| 12:31:35 | × | benin quits (~benin@183.82.30.29) (Ping timeout: 260 seconds) |
| 12:31:36 | benin2 | is now known as benin |
| 12:37:48 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 12:42:02 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 12:45:58 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 12:52:05 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 12:54:27 | → | polyphem joins (~polyphem@2a00:20:c014:d33:d5f0:b25b:c4f6:506) |
| 13:00:42 | → | benin9 joins (~benin@183.82.178.251) |
| 13:02:01 | → | sabry joins (~sabry@197.37.57.10) |
| 13:02:44 | × | benin quits (~benin@2401:4900:2323:425e:4253:4476:82af:eac4) (Ping timeout: 255 seconds) |
| 13:02:44 | benin9 | is now known as benin |
| 13:10:34 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.5) |
| 13:11:54 | × | acidjnk quits (~acidjnk@p200300d0c7068b81149b5d5938d07897.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 13:12:35 | × | sabry quits (~sabry@197.37.57.10) (Quit: Client closed) |
| 13:16:36 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) |
| 13:20:06 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 13:21:36 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 13:22:54 | <kaol> | I think I need to update the old Java joke: Now I have a ProblemProfunctor. |
| 13:23:26 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 13:25:15 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 13:26:14 | → | mcglk joins (~mcglk@131.191.49.120) |
| 13:26:29 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 252 seconds) |
| 13:28:10 | → | dcleonarski joins (~user@2804:d51:479c:4300:c312:71c1:ee9b:86ea) |
| 13:28:25 | × | cheater quits (~Username@user/cheater) (Ping timeout: 248 seconds) |
| 13:28:47 | → | cheater joins (~Username@user/cheater) |
| 13:29:42 | × | raym quits (~raym@user/raym) (Ping timeout: 260 seconds) |
| 13:29:43 | × | polyphem quits (~polyphem@2a00:20:c014:d33:d5f0:b25b:c4f6:506) (Read error: Connection reset by peer) |
| 13:29:52 | → | Pickchea joins (~private@user/pickchea) |
| 13:30:24 | → | raym joins (~raym@user/raym) |
| 13:31:10 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Quit: Leaving) |
| 13:32:01 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 13:32:01 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 13:32:01 | → | wroathe joins (~wroathe@user/wroathe) |
| 13:33:25 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 13:36:20 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 13:44:23 | → | vpan joins (~0@212.117.1.172) |
| 13:44:54 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 13:50:59 | × | mbuf quits (~Shakthi@31.32.33.168) (Quit: Leaving) |
| 13:55:26 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 13:56:38 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 244 seconds) |
| 13:57:29 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 14:00:01 | → | mbuf joins (~Shakthi@31.32.33.168) |
| 14:03:21 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 14:03:24 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 14:04:40 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:05:38 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) (Remote host closed the connection) |
| 14:06:27 | × | alp quits (~alp@user/alp) (Ping timeout: 260 seconds) |
| 14:10:33 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 14:11:12 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:40c3:3bf4:26ef:9b59) (Quit: WeeChat 2.8) |
| 14:14:26 | × | frost quits (~frost@user/frost) (Ping timeout: 252 seconds) |
| 14:15:01 | × | jonathanx_ quits (~jonathan@dyn-5-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 14:23:44 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) |
| 14:25:40 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:30:10 | → | Unicorn_Princess joins (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
| 14:31:18 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 14:33:53 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 14:36:17 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 14:36:42 | × | dcleonarski quits (~user@2804:d51:479c:4300:c312:71c1:ee9b:86ea) (Remote host closed the connection) |
| 14:38:44 | → | coot joins (~coot@213.134.190.95) |
| 14:38:52 | → | zebrag joins (~chris@user/zebrag) |
| 14:39:16 | → | shriekingnoise joins (~shrieking@201.231.16.156) |
| 14:40:06 | × | coot quits (~coot@213.134.190.95) (Client Quit) |
| 14:40:41 | → | coot joins (~coot@213.134.190.95) |
| 14:40:50 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 255 seconds) |
| 14:41:08 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 14:41:40 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds) |
| 14:44:15 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 14:45:03 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 14:47:40 | → | jonathanx joins (~jonathan@c-5eea24de-74736162.cust.telenor.se) |
| 14:48:04 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 240 seconds) |
| 14:49:24 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 14:49:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) (Remote host closed the connection) |
| 14:50:48 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 258 seconds) |
| 14:51:32 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) |
| 14:52:35 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 14:53:49 | → | jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 14:56:43 | × | jonathanx quits (~jonathan@c-5eea24de-74736162.cust.telenor.se) (Ping timeout: 256 seconds) |
| 15:00:42 | × | Pickchea quits (~private@user/pickchea) (Ping timeout: 260 seconds) |
| 15:01:27 | × | titibandit quits (~thibaut@2a00:8a60:c000:1:8a13:bf74:b2:8d47) (Quit: Leaving.) |
| 15:01:57 | × | APic quits (apic@apic.name) (Quit: Boot tut gut™.) |
| 15:02:26 | × | christiansen quits (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Ping timeout: 255 seconds) |
| 15:02:45 | → | Guest5451 joins (~Guest54@132.208.12.88) |
| 15:08:03 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 15:09:56 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::ba9a) |
| 15:12:04 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 15:17:47 | × | noctux quits (~noctux@user/noctux) (Read error: Connection reset by peer) |
| 15:17:47 | × | mbuf quits (~Shakthi@31.32.33.168) (Quit: Leaving) |
| 15:18:01 | → | noctux joins (~noctux@user/noctux) |
| 15:22:37 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 258 seconds) |
| 15:23:09 | → | APic joins (apic@apic.name) |
| 15:23:59 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 15:25:37 | × | gurkenglas quits (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 15:26:02 | → | shapr joins (~user@pool-173-73-44-186.washdc.fios.verizon.net) |
| 15:26:13 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 15:27:29 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Remote host closed the connection) |
| 15:27:46 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 15:32:10 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 15:33:34 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 15:34:09 | <romes[m]> | What could one say on linear vs hmatrix |
| 15:35:44 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
| 15:35:50 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 15:36:25 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 258 seconds) |
| 15:37:39 | × | myme quits (~myme@2a01:799:d5a:cd00:b525:9c95:fca0:da0b) (Ping timeout: 240 seconds) |
| 15:38:11 | → | hololeap joins (~hololeap@user/hololeap) |
| 15:38:45 | → | myme joins (~myme@2a01:799:d5a:cd00:ca17:d4bb:5fc8:9461) |
| 15:39:19 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 15:39:23 | → | dsrt^ joins (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) |
| 15:39:52 | × | Guest5451 quits (~Guest54@132.208.12.88) (Ping timeout: 252 seconds) |
| 15:39:59 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 15:40:01 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 15:40:44 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 15:40:57 | → | gurkenglas joins (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
| 15:44:25 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) (Remote host closed the connection) |
| 15:44:34 | <romes[m]> | Additionally: When compiling splitmix with ghc-9.2 I get this error:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/9de0ac94fc5c6309a2cd004b3d7c4200b304bde3) |
| 15:44:55 | <romes[m]> | How would one go about fixing this? |
| 15:45:34 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 15:49:00 | → | seriously_pc joins (~seriously@159.53.46.142) |
| 15:49:36 | → | hololeap joins (~hololeap@user/hololeap) |
| 15:49:50 | <c_wraith> | what os are you on? |
| 15:49:59 | <c_wraith> | and hardware, for that matter.... |
| 15:50:18 | <romes[m]> | macOS Intel 12.3.1 |
| 15:50:57 | → | slack1256 joins (~slack1256@191.126.99.64) |
| 15:53:18 | → | searemind joins (~u0_a2289@122.161.50.103) |
| 15:53:57 | <slack1256> | Now we will have OverloadedRecordDot, will you change the name of your accessor to be shorter? Previous advice was to prefix accessor with the type name or initial. This meant having declarations as `data User = User { userId :: Int, uAge :: Int }`. Is there still value on writing them like that with this new extension? |
| 15:54:35 | <geekosaur> | not everyone likes OverloadedRecordDot |
| 15:55:06 | <slack1256> | Apart from that. |
| 15:56:34 | <tdammers> | like many other GHC extensions, this one makes the language "bigger", which may add cognitive overhead - that's the core thing behind the "simple haskell" "movement" |
| 15:57:19 | <slack1256> | I know you guys probably have an axe to grind and are not happy about the extension. |
| 15:57:22 | <c_wraith> | slack1256: no. now that we have OverloadedRecordFields I will change the name of my accessors to be short. |
| 15:57:34 | <c_wraith> | slack1256: And I will never touch any sort of record dots |
| 15:58:00 | <c_wraith> | Well. DuplicateRecordFields is actually the relevant one |
| 15:58:16 | <c_wraith> | But other extensions make it actually usable |
| 15:58:30 | <c_wraith> | like OverloadedLabels |
| 15:58:57 | <tdammers> | also keep in mind that overloaded record dots effectively introduce type variables, and "too many" type variables (including implicit ones like these) means that you may need to explicitly annotate types in inconvenient spots, which destroys the conciseness advantage you might have gotten otherwise |
| 15:58:59 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 15:59:21 | <romes[m]> | tdammers: I wouldn't say it adds cognitive overhead; I think being able to use the same name is what one would expect at first, but only later realizes isn't possible, I know I tried at first to use the same name for two different things, only to get an error short after |
| 16:00:09 | <tdammers> | romes[m]: the problem is that it's not 100% transparent - to reliably use it in all use cases, you have to understand how it is really sugar on top of HasField, so you kind of have to know how that works |
| 16:00:28 | <romes[m]> | I see :) |
| 16:00:49 | <tdammers> | you won't run into it with trivial examples, but when your project grows bigger, and you start piling up a couple abstractions and generalizations, it might come and bite you |
| 16:01:14 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Remote host closed the connection) |
| 16:01:20 | <c_wraith> | my objection to all this record dot stuff is that optics/lenses work better. Record dot stuff is a misguided attempt to prevent people coming in from other languages from having to learn anything. |
| 16:01:31 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 16:01:48 | <yushyin> | NoFieldSelectors + NamedFieldPuns + RecordWildCards will get you quite far, even without OverloadedRecordDot |
| 16:02:01 | → | seriously_pc38 joins (~seriously@159.53.110.217) |
| 16:02:24 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 16:05:54 | × | seriously_pc quits (~seriously@159.53.46.142) (Ping timeout: 252 seconds) |
| 16:07:02 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 16:08:01 | → | nate1 joins (~nate@98.45.169.16) |
| 16:09:10 | → | Nunci joins (~Nunci@2a02:a31b:3f:a400:e9a4:4a8d:7641:da1) |
| 16:10:09 | × | Nunci quits (~Nunci@2a02:a31b:3f:a400:e9a4:4a8d:7641:da1) (Client Quit) |
| 16:12:30 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 16:13:15 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds) |
| 16:14:18 | → | [_] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 16:15:20 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 255 seconds) |
| 16:19:40 | × | CiaoSen quits (~Jura@p200300c9571e4b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 16:23:36 | × | searemind quits (~u0_a2289@122.161.50.103) (Remote host closed the connection) |
| 16:25:55 | × | dsrt^ quits (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) (Ping timeout: 246 seconds) |
| 16:28:47 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.4) |
| 16:29:44 | → | econo joins (uid147250@user/econo) |
| 16:32:35 | → | sabry joins (~sabry@197.37.57.10) |
| 16:35:51 | × | seriously_pc38 quits (~seriously@159.53.110.217) (Quit: Client closed) |
| 16:36:27 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 16:37:01 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 256 seconds) |
| 16:38:12 | → | dsrt^ joins (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) |
| 16:39:21 | → | king_gs joins (~Thunderbi@187.201.97.18) |
| 16:44:42 | → | jollygood2 joins (~bc8147f2@199.204.85.195) |
| 16:44:49 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) |
| 16:46:04 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 16:47:55 | → | dennilo joins (~dennilo@88.245.33.141) |
| 16:48:00 | ← | dennilo parts (~dennilo@88.245.33.141) () |
| 16:49:32 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) (Ping timeout: 255 seconds) |
| 16:49:52 | <geekosaur> | aaaand there's ghc 9.4.1 alpha2 |
| 16:50:11 | <romes[m]> | Congrats! :) |
| 16:51:29 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 16:52:04 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 16:54:33 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 16:54:40 | <maerwald> | is there a good tutorial on how to build an interpolated quasiquoter? |
| 16:58:40 | → | alp joins (~alp@user/alp) |
| 16:59:20 | × | benin quits (~benin@183.82.178.251) (Ping timeout: 260 seconds) |
| 16:59:48 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 276 seconds) |
| 17:02:32 | <maerwald> | geekosaur: and the bindist is still defunct :D |
| 17:03:13 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:03:40 | <geekosaur> | https://downloads.haskell.org/ghc/9.4.1-alpha2/ ? |
| 17:03:43 | → | benin joins (~benin@183.82.204.153) |
| 17:04:02 | <geekosaur> | unless you mean it's broken somehow; it seems to be there and fairly complete to me |
| 17:04:24 | <maerwald> | yes, DESTDIR is not honoured |
| 17:04:29 | <geekosaur> | oh |
| 17:04:30 | × | sabry quits (~sabry@197.37.57.10) (Quit: Client closed) |
| 17:04:50 | <maerwald> | apparently this was not backported, so now I can manually fix 10 bindists again |
| 17:05:06 | <geekosaur> | wheee |
| 17:05:25 | <sm> | GHC devs should add maerwald to their release test suite |
| 17:05:34 | <sm> | g'day all |
| 17:05:38 | <geekosaur> | go add your patch to the milestone so it gets backported? |
| 17:05:52 | <geekosaur> | ohai |
| 17:08:13 | × | vpan quits (~0@212.117.1.172) (Quit: Leaving.) |
| 17:09:08 | × | king_gs quits (~Thunderbi@187.201.97.18) (Read error: Connection reset by peer) |
| 17:10:27 | <Bulby[m]> | how do I say `Foo <$> ("someprefix" <>) foo` correctly |
| 17:12:31 | → | king_gs joins (~Thunderbi@187.201.97.18) |
| 17:12:49 | <Bulby[m]> | given it's a Monad |
| 17:14:07 | <Bulby[m]> | would it be |
| 17:14:07 | <Bulby[m]> | `Foo . ("someprefix" <>) <$> foo` ? |
| 17:14:25 | → | Guest54 joins (~Guest54@132.208.12.88) |
| 17:17:11 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) |
| 17:17:34 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 17:20:44 | × | gawen quits (~gawen@user/gawen) (Quit: cya) |
| 17:22:04 | → | gawen joins (~gawen@user/gawen) |
| 17:22:20 | → | hololeap joins (~hololeap@user/hololeap) |
| 17:28:35 | → | _ht joins (~quassel@231-169-21-31.ftth.glasoperator.nl) |
| 17:28:58 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 17:30:04 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 17:31:21 | × | ccntrq quits (~Thunderbi@172.209.94.92.rev.sfr.net) (Remote host closed the connection) |
| 17:31:42 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 17:32:49 | × | Guest54 quits (~Guest54@132.208.12.88) (Quit: Client closed) |
| 17:34:43 | <lyxia> | that looks like a good thing to try |
| 17:35:21 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Remote host closed the connection) |
| 17:35:38 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 17:37:53 | × | jollygood2 quits (~bc8147f2@199.204.85.195) (Quit: CGI:IRC (EOF)) |
| 17:38:03 | → | jollygood2 joins (~bc8147f2@199.204.85.195) |
| 17:42:36 | → | vysn joins (~vysn@user/vysn) |
| 17:44:10 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 17:45:21 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 17:52:49 | → | lagooned joins (~lagooned@108-208-149-42.lightspeed.hstntx.sbcglobal.net) |
| 17:52:49 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 17:53:10 | <monochrom> | I might even start with `(\x -> Foo ("someprefix" <> x)) <$> foo` for beginners. |
| 17:54:45 | <Bulby[m]> | HAHAH |
| 17:54:57 | <Bulby[m]> | some days i'm beginner somedays i'm decent |
| 17:55:36 | <geekosaur> | I think that applies to all of us, if we're being honest :) |
| 17:58:57 | <Bulby[m]> | I work with polysemy (not well) then forget how fmap works 🙃 |
| 18:00:08 | → | Adam_ joins (uid555638@id-555638.lymington.irccloud.com) |
| 18:05:38 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:ad75:2aef:bfae:2e4b) (Remote host closed the connection) |
| 18:05:39 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:06:02 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 255 seconds) |
| 18:06:10 | → | Midjak joins (~Midjak@82.66.147.146) |
| 18:06:50 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 18:11:53 | × | king_gs quits (~Thunderbi@187.201.97.18) (Read error: Connection reset by peer) |
| 18:12:34 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds) |
| 18:12:50 | → | king_gs joins (~Thunderbi@187.201.97.18) |
| 18:14:54 | → | jgeerds joins (~jgeerds@d53604b0.access.ecotel.net) |
| 18:18:34 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 18:20:35 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 18:21:39 | → | hololeap joins (~hololeap@user/hololeap) |
| 18:24:25 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) (Remote host closed the connection) |
| 18:40:20 | × | Vajb quits (~Vajb@2001:999:42:1446:8c2:e3f9:b580:2e45) (Ping timeout: 272 seconds) |
| 18:40:34 | → | Vajb joins (~Vajb@2001:999:600:879a:e69c:7638:2849:8a14) |
| 18:42:41 | → | alp_ joins (~alp@user/alp) |
| 18:43:46 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 18:44:56 | × | alp quits (~alp@user/alp) (Ping timeout: 244 seconds) |
| 18:45:34 | × | king_gs quits (~Thunderbi@187.201.97.18) (Quit: king_gs) |
| 18:47:15 | [_] | is now known as [itchyjunk] |
| 18:48:30 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 18:49:22 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 18:54:58 | → | agumonkey joins (~user@88.163.231.79) |
| 18:55:34 | × | Chai-T-Rex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 240 seconds) |
| 18:56:09 | → | thonoht[m] joins (~thonohtma@2001:470:69fc:105::d7be) |
| 18:58:36 | → | Chai-T-Rex joins (~ChaiTRex@user/chaitrex) |
| 18:58:36 | × | Vajb quits (~Vajb@2001:999:600:879a:e69c:7638:2849:8a14) (Read error: Connection reset by peer) |
| 18:59:00 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 18:59:12 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 19:00:02 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 19:02:17 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 255 seconds) |
| 19:02:32 | → | sabry joins (~sabry@197.37.57.10) |
| 19:02:56 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Read error: Connection reset by peer) |
| 19:03:34 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 19:03:52 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 19:04:03 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 244 seconds) |
| 19:04:16 | → | LukeHoersten joins (~LukeHoers@user/lukehoersten) |
| 19:04:47 | × | LukeHoersten quits (~LukeHoers@user/lukehoersten) (Client Quit) |
| 19:07:26 | × | mokee quits (~mokee@37.228.215.190) (Quit: off) |
| 19:08:37 | → | hololeap joins (~hololeap@user/hololeap) |
| 19:09:41 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 19:10:40 | × | ec quits (~ec@gateway/tor-sasl/ec) (Quit: ec) |
| 19:11:55 | → | Guest49 joins (~Guest49@105.112.44.177) |
| 19:12:12 | <Guest49> | Hello all |
| 19:12:25 | <geekosaur> | hi |
| 19:13:09 | <Guest49> | I want to write a simple stack based vm in haskell that just supports creating a variable, addition and multiplicatoin, could I please get some pointers on how to start ? |
| 19:15:00 | <Guest49> | I have a format for the Opcodes already |
| 19:15:10 | → | notzmv joins (~zmv@user/notzmv) |
| 19:17:35 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 19:18:28 | × | jgeerds quits (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 248 seconds) |
| 19:18:46 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 19:22:25 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:24:49 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) |
| 19:25:18 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 272 seconds) |
| 19:25:39 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 19:25:52 | <int-e> | Do you have any input or output? Any interaction with the "real world"? |
| 19:27:42 | <int-e> | I mean this could be as simple as a recursive function taking a stack (a list of values), a value store (mapping variables to their values, Data.Map is your friend here), a program (list? vector or array?), and probably an instruction pointer as arguments and returning whatever final result you desire. |
| 19:28:20 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 19:28:43 | <int-e> | or as difficult as a monad transformer stack that adds a reader for immutable parts, state for input, stack, and variables, and a writer for output... or a monad transformer on top of IO for direct interaction with the real world. |
| 19:28:58 | <int-e> | So it's really hard to answer this generically. |
| 19:29:17 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) (Ping timeout: 255 seconds) |
| 19:29:46 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 19:31:00 | <EvanR> | OpCode -> VM -> VM |
| 19:31:09 | <EvanR> | write a function with this type |
| 19:31:30 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 19:31:30 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 19:31:30 | → | wroathe joins (~wroathe@user/wroathe) |
| 19:31:35 | <Guest49> | int-e No I do not have any interactoin with the real world. |
| 19:32:17 | <EvanR> | from what it sounds like, your VM is like... a stack. (a list) |
| 19:32:24 | <Guest49> | Yes it is |
| 19:33:23 | <EvanR> | so case analysis on the OpCode, do something with the VM |
| 19:33:33 | <EvanR> | like push, pop, pop twice and push the answer, etc |
| 19:33:45 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) |
| 19:33:56 | <Hecate> | I should write a VM with an instruction set similar to that of RISCV |
| 19:34:14 | <maerwald> | too much work |
| 19:34:49 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:34:49 | <maerwald> | programming sucks... get a rice pudding and a good movie instead |
| 19:35:01 | <Guest49> | EvanR and int-e Thanks lemme think and try something out , Ill come back with more questions if I have |
| 19:35:04 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
| 19:36:35 | → | mixfix41 joins (~sdenynine@user/mixfix41) |
| 19:39:41 | → | hololeap joins (~hololeap@user/hololeap) |
| 19:39:55 | <EvanR> | I like malbolge's VM. It has zero chance of ever being used to accomplish anything |
| 19:40:14 | <EvanR> | it's not even a good RNG |
| 19:43:55 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 19:44:26 | → | acidjnk joins (~acidjnk@p200300d0c7068b8138d05884d43f32c7.dip0.t-ipconnect.de) |
| 19:45:29 | × | sweater quits (~sweater@206.81.18.26) (Remote host closed the connection) |
| 19:46:42 | → | sweater joins (~sweater@206.81.18.26) |
| 19:46:43 | <int-e> | EvanR: the amazing thing about Malbolge is that people have figured out how to implement actual loops in the language (rather than straight line programs which don't have to care about the instructions being modified as they're executed), |
| 19:46:53 | <int-e> | "language" |
| 19:47:29 | <tomsmeding> | well it's a language |
| 19:47:33 | <tomsmeding> | technically |
| 19:47:56 | <int-e> | I suspect linguists would disagree :P |
| 19:48:15 | <darkling> | Is there a quine in Malbolge yet? |
| 19:48:23 | <int-e> | FWIW, I don't think machine code is a language either, and malbolge is closer to that than to the usual programming languages. |
| 19:48:50 | <int-e> | https://lutter.cc/malbolge/quine.html (didn't test) |
| 19:49:52 | <darkling> | o_O Wow |
| 19:50:00 | <EvanR> | the bottom of that program is telling |
| 19:50:12 | <int-e> | That... barely fits, using 59032 out of 59049 possible characters. |
| 19:50:42 | <tomsmeding> | int-e: right, then our definitions of "language" don't agree :p |
| 19:50:59 | <EvanR> | any data type is a language? |
| 19:51:08 | <tomsmeding> | language is syntax + semantics |
| 19:51:21 | <EvanR> | you lost me at semantics xD |
| 19:51:26 | <tomsmeding> | meaning |
| 19:51:35 | <EvanR> | i know the meaning of... |
| 19:51:45 | <int-e> | tomsmeding: tbf, I have several notions of "language", including the formal language one; it's just not my default. |
| 19:51:56 | <tomsmeding> | right |
| 19:52:13 | <EvanR> | since semantics always given as more syntax, I call BS |
| 19:52:22 | <tomsmeding> | EvanR: is it? |
| 19:52:55 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 19:53:14 | <geekosaur> | at somew point you have to define something not in terms of more syntax. you may think of these as primitives or axioms or whatever |
| 19:53:59 | <tomsmeding> | usually set theory, or something similar |
| 19:54:06 | <int-e> | Yeah... we can't actually have turtles alls the way down |
| 19:54:28 | <EvanR> | ah, set theory. The gold standard for meaningfulness |
| 19:54:29 | <int-e> | Even set theory is built upon natural language, so something quite informal. |
| 19:54:45 | <tomsmeding> | I mean, yes :p |
| 19:54:58 | <tomsmeding> | unfortunately we humans don't really have much else to resort to |
| 19:55:09 | <monochrom> | Unpopular opinion: s/built upon/communicated through/ |
| 19:55:11 | <dolio> | Sure they do. |
| 19:55:20 | <int-e> | But I feel it's best to leave this to the (mathematical) philosophers :) |
| 19:57:12 | <monochrom> | What I personally do is I listen to a set of rules communicated to me in one way or another, and I build a formal model in my mind. But it's formal. |
| 19:57:36 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 19:57:38 | → | seriously_pc joins (~seriously@159.53.78.142) |
| 19:57:54 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
| 19:58:05 | <maerwald> | is there a jwt library that doesn't depend on cryptonite? |
| 19:58:12 | <dolio> | Scenario: natural numbers correspond to cows in your barn. Arithmetic corresponds to cows entering and leaving. Cows aren't syntax. |
| 19:58:15 | <geekosaur> | someone nstill has to define "formal", though. which gets us into metamathematics |
| 20:00:08 | × | _ht quits (~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection) |
| 20:00:45 | × | ystael quits (~ystael@user/ystael) (Read error: Connection reset by peer) |
| 20:01:26 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:02:38 | <seriously_pc> | Hey all... coming form the haskell-beginners chat to ask a question here. I've been learning haskell for about a month now and I'm trying to build a rest service with it. I've done the starter tutorials for yesod and servant; I've chose to go with servant as it seems to be more API oriented (meaning, more of a microservice, as opposed to serving |
| 20:02:39 | <seriously_pc> | web pages). I'm having alot of trouble with the language pragmas (extensions)... I was notified by another user here that servant and yesod are built upon the principles of "type level programming". Alot of these extensions are beyond the scope of what I've learned so far in haskell.... Do you guys know of a easier way for me to get started with my |
| 20:02:39 | <seriously_pc> | rest service? Not involving any "type level programming" ? |
| 20:03:02 | → | Psybur joins (~Psybur@c-76-123-45-25.hsd1.va.comcast.net) |
| 20:08:59 | → | YoungFrawg joins (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) |
| 20:09:31 | → | nate1 joins (~nate@98.45.169.16) |
| 20:09:50 | <seriously_pc> | for some extra context: I'm mid-level software engineer; writing imperative/OO code in java and typescript for the past few years |
| 20:10:40 | → | jgeerds joins (~jgeerds@d53604b0.access.ecotel.net) |
| 20:11:16 | × | YoungFrog quits (~youngfrog@2a02:a03f:c21b:f900:8cee:eaed:9f2f:9769) (Ping timeout: 258 seconds) |
| 20:11:16 | YoungFrawg | is now known as YoungFrog |
| 20:14:10 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 240 seconds) |
| 20:14:21 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 20:14:44 | <tomsmeding> | seriously_pc: 'snap' is another web framework; in this pastebin implementation I'm using 'snap-core' https://github.com/tomsmeding/pastebin-haskell |
| 20:14:55 | → | phma_ joins (~phma@2001:5b0:2143:d2f8:5c18:7b3:2a38:5b88) |
| 20:14:57 | × | phma quits (~phma@2001:5b0:210d:cc08:34f8:e479:1e76:ac53) (Read error: Connection reset by peer) |
| 20:15:02 | <maerwald> | snap is kinda outdated though |
| 20:15:08 | <tomsmeding> | no type level programming here, though I'm using not using the full framework, just the core implementation using snap-core and snap-server |
| 20:15:11 | <tomsmeding> | it works 🤷 |
| 20:15:22 | <tomsmeding> | and it's fairly straightforward, I think |
| 20:15:31 | <tomsmeding> | maybe that's what seriously_pc is looking for |
| 20:17:08 | <maerwald> | seriously_pc: https://haskell-servant.github.io/posts/2018-07-12-servant-dsl-typelevel.html |
| 20:17:08 | <tomsmeding> | (straightforward as web frameworks go, I guess) |
| 20:17:16 | <seriously_pc> | tomsmeding maerwald let me check it out... As long as I'm able to recognize some familiar functions and patterns that I'm learning through tutorials + courses, then im happy |
| 20:18:16 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:18:17 | × | zeenk quits (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) (Quit: Konversation terminated!) |
| 20:19:36 | <Hecate> | seriously_pc: the Twain library is a nice new player in the space of non-typelevel web libraries |
| 20:19:48 | → | zeenk joins (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) |
| 20:20:04 | → | hololeap joins (~hololeap@user/hololeap) |
| 20:21:00 | <seriously_pc> | It seems right to me that I should know how to write a rest service with the original haskell compiler (no extensions) before I start learning what essentially seems like a hack (language pragmas) into haskell. Let me know if thats not a good categorizaiton of language pragmas. |
| 20:21:24 | <dolio> | It's not. |
| 20:21:28 | <tomsmeding> | I don't think that's a good characterisation :p |
| 20:21:46 | <maerwald> | most of them are hacks |
| 20:21:46 | <geekosaur> | it's not really a hack, it's just that the formal language definition has been frozen by a paralyzed language committee for over a decade |
| 20:22:36 | <tomsmeding> | the language implemented by GHC is larger than the language specified in the haskell report, but as a general attempt at cleanliness and because some of the extensions (subtly) change the meaning of some Haskell syntax, the extensions need to be explicitly enabled |
| 20:22:38 | <maerwald> | it's not like someone came up with those plugins after thinking about it very carefully... they're a result of implementation details of GHC |
| 20:23:01 | <maerwald> | as in: "what if we expose more of the internal machinery to the user?" |
| 20:23:07 | <seriously_pc> | ok then haha let me write back here in a few months when my haskell horizon will have no doubt broadened |
| 20:23:19 | <tomsmeding> | maerwald: which extensions are you thinking about? |
| 20:23:29 | <tomsmeding> | GADTs is hardly in that category :p |
| 20:23:29 | <maerwald> | DataKinds |
| 20:23:52 | <tomsmeding> | I'd rather point to TypeInType as the guilty one there |
| 20:24:18 | <tomsmeding> | though that standpoint is weakened by not realistically being able to turn that off :p |
| 20:25:19 | <tomsmeding> | MultiParamTypeClasses, GADTs, TypeFamilies, ScopedTypeVariables, QuantifiedConstraints, Deriving*, etc. are definitely not hacks |
| 20:25:29 | <geekosaur> | which does strengthen maerwald's argument though |
| 20:25:34 | <tomsmeding> | yeah for DataKinds it does |
| 20:25:50 | <geekosaur> | I'd say for TypeInType as well |
| 20:25:54 | → | coot joins (~coot@213.134.190.95) |
| 20:26:24 | <geekosaur> | it's exposing a decision to let things leak across boundaries in the typechecker. DataKinds just exposes that decision to the usert |
| 20:26:53 | <seriously_pc> | Hecate thanks for the recomendation, looking into twain now |
| 20:27:15 | <geekosaur> | *exposes a consequence |
| 20:27:22 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 258 seconds) |
| 20:29:27 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 20:30:15 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:30:24 | × | sabry quits (~sabry@197.37.57.10) (Quit: Client closed) |
| 20:32:38 | <tomsmeding> | maerwald: I disagree on "_most_ of them are hacks", I went through the list of extensions and I think the following qualify as hacks in some reasonable way: |
| 20:32:41 | <tomsmeding> | ConstraintKinds, DataKinds, TypeInType, IncoherentInstances, InstanceSigs(?), LiberalTypeSynonyms (TIL), MonoLocalBinds/MonomorphismRestriction, TypeSynonymInstances(?), Undecidable{Instances,SuperClasses} |
| 20:33:07 | <maerwald> | well, type families certainly feel like a hack |
| 20:33:07 | <tomsmeding> | that's 11 out of 123 |
| 20:33:17 | <tomsmeding> | wat? |
| 20:33:41 | <maerwald> | are you saying type families are 1. ergonomic and 2. powerful enough to do cool stuff? |
| 20:34:12 | <tomsmeding> | it's sad that you can't partially apply them |
| 20:34:46 | <geekosaur> | more ergonomic than FunctionalDependencies, which imo are the real hack because they're basically a chunk of Prolog dropped into the typechecker |
| 20:34:49 | <maerwald> | like... would anyone come up with how type families are designed when starting a new language? |
| 20:35:04 | <tomsmeding> | maerwald: what would you improve |
| 20:35:08 | <geekosaur> | but do the same thing |
| 20:35:15 | <maerwald> | tomsmeding: I don't know where to start |
| 20:35:27 | <maerwald> | I'd just do something entirely different |
| 20:36:28 | → | abrantesasf joins (~abrantesa@177.137.232.91) |
| 20:37:16 | <geekosaur> | will the result fill the need of correlating types, or do you want to ignore that problem (or leave it to fundeps) and invent something else instead |
| 20:37:54 | <geekosaur> | do remember that the original point was making MultiParameterTypeClasses usable in practice |
| 20:37:54 | <tomsmeding> | I mean, I'm not sure I agree (but perhaps if I see a better design I would be swayed that way), but in any case a suboptimal design of the language extension is something different than being a hack that just exposes internal machinery to the user :p |
| 20:37:55 | × | dsrt^ quits (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) (Ping timeout: 246 seconds) |
| 20:37:59 | <tomsmeding> | and that's what I was trying to refute |
| 20:38:03 | × | agumonkey quits (~user@88.163.231.79) (Remote host closed the connection) |
| 20:38:19 | <maerwald> | I dunno... I'm not spending a lot of time with language design :p |
| 20:38:57 | <tomsmeding> | no I'm not saying you should, I'm also not saying I like the current design a lot (I don't know anything much better, but that doesn't mean it doesn't exist) |
| 20:39:08 | <maerwald> | I think the smart people who invented Haskell would know something better... the problem is only if you're trying to retro-fit ideas onto old horses |
| 20:39:24 | <maerwald> | then you end up with C++ |
| 20:40:28 | <maerwald> | and that might be one reason we won't get another standard, because all it would do is capture popular plugins and sanction them |
| 20:40:59 | <maerwald> | not very interesting |
| 20:41:25 | <tomsmeding> | maerwald: if we're going to talk about unfortunate language extension _design_, then let's take the elephant in the room, LinearTypes |
| 20:41:54 | <maerwald> | yeah, I mean... I'm still on 8.10.7 and refuse to update to anything that starts with 9 |
| 20:41:55 | <tomsmeding> | with the assumption that you must extend Haskell and keep the original language and ecosystem intact, it's a wonderful and brilliant design |
| 20:42:19 | <tomsmeding> | but without that assumption, there's other designs (uniqueness types yo) that are 1. well-understood and 2. much more ergonomic |
| 20:42:23 | <tomsmeding> | like, _much_ more |
| 20:42:36 | <maerwald> | there's some interesting things linear types could solve in streaming libraries |
| 20:42:57 | <maerwald> | right now, streamly relies on GC hooks |
| 20:43:01 | <maerwald> | to clean up resources |
| 20:43:08 | <tomsmeding> | sounds like a use for LT yes |
| 20:43:12 | × | raym quits (~raym@user/raym) (Ping timeout: 272 seconds) |
| 20:43:21 | <dolio> | Uniqueness types aren't a substitute for linear types. |
| 20:43:58 | <maerwald> | and resource cleanup depending on GC sounds like a good way to create extremely difficult to debug bugs |
| 20:46:10 | <maerwald> | so, there seems to be a use case beyond someone promoting their PhD thesis |
| 20:46:10 | → | yauhsien joins (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) |
| 20:47:49 | → | mmhat joins (~mmh@p200300f1c705841dee086bfffe095315.dip0.t-ipconnect.de) |
| 20:49:11 | <dmj`> | I think it'd be cool to make IO / ST use uniqueness types, and maybe even like have mutable blocks in a similar vein to ST, except not implemented w/ a monad, and not using existentials |
| 20:50:26 | → | nate1 joins (~nate@98.45.169.16) |
| 20:50:39 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 20:50:44 | × | yauhsien quits (~yauhsien@61-231-39-34.dynamic-ip.hinet.net) (Ping timeout: 255 seconds) |
| 20:50:56 | × | Guest49 quits (~Guest49@105.112.44.177) (Quit: Client closed) |
| 20:51:03 | <EvanR> | mutable variables are weird enough to use for actual things without also having to use a weird type system at the same time xD |
| 20:51:17 | <EvanR> | linear types for using a resource API correctly seems interesting though |
| 20:52:14 | → | ubert joins (~Thunderbi@p200300ecdf3b997ccd2957383dda91a7.dip0.t-ipconnect.de) |
| 20:53:32 | → | stackdroid18 joins (14094@user/stackdroid) |
| 20:54:19 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:54:28 | <maerwald> | https://hackage.haskell.org/package/text-builder-linear-0.1/candidate |
| 20:54:50 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 20:55:28 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 20:57:51 | → | dsrt^ joins (~dsrt@c-24-126-228-147.hsd1.ga.comcast.net) |
| 20:58:44 | <dmj`> | EvanR: well, maybe like mutable "blocks", as a first class language construct, where you have the same freeze / thaw situation, but for any type. |
| 20:59:19 | → | pavonia joins (~user@user/siracusa) |
| 21:01:19 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 21:02:16 | × | coot quits (~coot@213.134.190.95) (Quit: coot) |
| 21:04:57 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:07:44 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) (Remote host closed the connection) |
| 21:09:42 | × | ubert quits (~Thunderbi@p200300ecdf3b997ccd2957383dda91a7.dip0.t-ipconnect.de) (Quit: ubert) |
| 21:09:55 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Remote host closed the connection) |
| 21:10:30 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 21:12:33 | × | michalz quits (~michalz@185.246.204.105) (Remote host closed the connection) |
| 21:14:46 | × | slack1256 quits (~slack1256@191.126.99.64) (Ping timeout: 244 seconds) |
| 21:14:54 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 258 seconds) |
| 21:15:10 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Remote host closed the connection) |
| 21:15:27 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 21:16:05 | → | Pickchea joins (~private@user/pickchea) |
| 21:19:26 | → | sympt2 joins (~sympt@user/sympt) |
| 21:19:51 | × | wagle quits (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
| 21:20:16 | → | wagle joins (~wagle@quassel.wagle.io) |
| 21:20:36 | × | sympt quits (~sympt@user/sympt) (Ping timeout: 248 seconds) |
| 21:20:36 | sympt2 | is now known as sympt |
| 21:20:42 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) |
| 21:21:44 | × | zer0bitz quits (~zer0bitz@2001:2003:f444:8f00:1ddb:ab6a:8605:cb77) (Read error: Connection reset by peer) |
| 21:24:38 | → | shiraeeshi joins (~shiraeesh@46.34.206.185) |
| 21:25:47 | × | alp_ quits (~alp@user/alp) (Ping timeout: 240 seconds) |
| 21:28:31 | → | Guest52 joins (~Guest52@catv-89-132-181-211.catv.fixed.vodafone.hu) |
| 21:31:30 | <shiraeeshi> | I have some questions about polymorphic type synonyms |
| 21:31:52 | <shiraeeshi> | So I was reading Pipes Tutorial https://hackage.haskell.org/package/pipes-4.3.16/docs/Pipes-Tutorial.html |
| 21:32:17 | <shiraeeshi> | in the "Appendix: Types" it says: |
| 21:32:33 | <shiraeeshi> | <quote> |
| 21:32:34 | <shiraeeshi> | However, polymorphic type synonyms cause problems in many other cases: |
| 21:32:43 | <shiraeeshi> | They usually give the wrong behavior when used as the argument of a function (known as the "negative" or "contravariant" position) like this: |
| 21:32:50 | <shiraeeshi> | f :: Producer' a m r -> ... -- Wrong |
| 21:32:56 | <shiraeeshi> | f :: Producer a m r -> ... -- Right |
| 21:33:05 | <shiraeeshi> | The former function only accepts polymorphic Producers as arguments. The latter function accepts both polymorphic and concrete Producers, which is probably what you want. |
| 21:33:09 | <shiraeeshi> | </quote> |
| 21:33:53 | × | z0k quits (~z0k@39.40.43.194) (Ping timeout: 244 seconds) |
| 21:33:59 | <shiraeeshi> | Producer and Producer' are defined as: |
| 21:34:01 | <shiraeeshi> | type Producer' b m r = forall x' x . Proxy x' x () b m r |
| 21:34:12 | <shiraeeshi> | type Producer b = Proxy X () () b |
| 21:35:26 | × | abrantesasf quits (~abrantesa@177.137.232.91) (Ping timeout: 244 seconds) |
| 21:35:28 | <shiraeeshi> | it seemed counter-intuitive to me that a function that says in the type declaration that it accepts polymorphic Producers, accepts only polymorphic Producers and not concrete ones |
| 21:35:31 | → | _abrantesasf_ joins (abrantesas@gateway/vpn/protonvpn/abrantesasf) |
| 21:35:47 | <shiraeeshi> | arent concrete Producers instances of polymorphic ones? |
| 21:35:51 | <dminuoso_> | Yes. |
| 21:35:58 | <shiraeeshi> | so I tried to run an experiment |
| 21:36:02 | <dminuoso_> | So this is essentially just RankNTypes |
| 21:36:04 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) (Remote host closed the connection) |
| 21:36:12 | <dminuoso_> | Compare with the following: |
| 21:36:41 | <dminuoso_> | `f :: (forall t. Num t => t) -> String` is a function that demands the caller apply it to a polymorphic value. |
| 21:36:44 | × | Guest52 quits (~Guest52@catv-89-132-181-211.catv.fixed.vodafone.hu) (Quit: Client closed) |
| 21:36:50 | <dminuoso_> | It's conceptually similar to say: |
| 21:37:05 | <dminuoso_> | `f :: (Int -> Char) -> Bool` demands the argument to be a function itself. |
| 21:37:47 | × | Midjak quits (~Midjak@82.66.147.146) (Quit: This computer has gone to sleep) |
| 21:38:12 | <dminuoso_> | shiraeeshi: You can draw some intuition by understanding that a polymorphic value is one whose *user/caller* must chose a type for. But they can make multiple such choices |
| 21:39:03 | <shiraeeshi> | hmm |
| 21:39:04 | <dminuoso_> | f :: (forall t. Num t => t) -> (Int, Double); f x = (x, x) |
| 21:39:07 | <dminuoso_> | @let f :: (forall t. Num t => t) -> (Int, Double); f x = (x, x) |
| 21:39:09 | <lambdabot> | Defined. |
| 21:39:25 | <dminuoso_> | Note that in a Rank2Type like here the roles are inverted. |
| 21:39:49 | <dminuoso_> | The caller of f must supply an polymorphic value, but the implementor of f can instantiate that polymorphic value at multiple types. |
| 21:40:21 | <shiraeeshi> | let me show you what I tried: https://paste.tomsmeding.com/lsxdzath |
| 21:40:37 | <shiraeeshi> | a compiler output: https://paste.tomsmeding.com/C0F74KMK |
| 21:41:23 | <shiraeeshi> | I tried to show that I can pass any value to a function that accepts polymorphic type synonyms |
| 21:41:50 | <shiraeeshi> | but the problem is that I can't create instances of such polymorphic synonyms |
| 21:42:12 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) |
| 21:42:39 | <shiraeeshi> | and it seems like indeed the compiler complains that I can't pass concrete values to such functions (that accept polymorphic synonyms) |
| 21:42:41 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 21:42:53 | <dminuoso_> | shiraeeshi: Lets start with my above example of `f`. |
| 21:43:02 | <dminuoso_> | > f 20 |
| 21:43:05 | <lambdabot> | error: |
| 21:43:05 | <lambdabot> | Ambiguous occurrence ‘f’ |
| 21:43:05 | <lambdabot> | It could refer to |
| 21:43:07 | <dminuoso_> | Ugh |
| 21:43:18 | <dminuoso_> | @let two :: (forall t. Num t => t) -> (Int, Double); two x = (x, x) |
| 21:43:19 | <lambdabot> | Defined. |
| 21:43:21 | <dminuoso_> | > two 10 |
| 21:43:23 | <lambdabot> | (10,10.0) |
| 21:43:46 | <dminuoso_> | Note how the literal `10 :: Num a => a`, so its a properly polymorphic thing. |
| 21:44:19 | <dminuoso_> | The implementation of `two` can then instantiate this at one or more types of its choice. In this example it instantiates it at both Int and Double. |
| 21:44:32 | <dminuoso_> | But the caller of two has no choice. You cant pass a specific Int. |
| 21:44:36 | <dminuoso_> | > two (10 :: Int) |
| 21:44:38 | <lambdabot> | error: |
| 21:44:39 | <lambdabot> | • Couldn't match expected type ‘t’ with actual type ‘Int’ |
| 21:44:39 | <lambdabot> | ‘t’ is a rigid type variable bound by |
| 21:45:30 | <dminuoso_> | You're essentially trying to do just that. |
| 21:46:05 | × | merijn quits (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
| 21:46:30 | <shiraeeshi> | what about this sentence "The latter function accepts both polymorphic and concrete Producers, which is probably what you want." |
| 21:47:17 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 260 seconds) |
| 21:47:53 | <dminuoso_> | @let type Id a = a |
| 21:47:54 | <lambdabot> | Defined. |
| 21:48:07 | <shiraeeshi> | how can it accept polymorphic Producers if it has already decided the types to be () and X? |
| 21:48:15 | <[Leary]> | The polymorphic argument specialises down to the concrete. |
| 21:48:29 | phma_ | is now known as phma |
| 21:48:52 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 244 seconds) |
| 21:49:28 | <[Leary]> | In the same way that you can pass `id :: a -> a` to a function that wants an `Int -> Int`. |
| 21:49:35 | <shiraeeshi> | wait, so polymorphic Producer says "I don't know what the types will be, you decide", right? |
| 21:49:41 | <geekosaur> | a polymorphic Producer can be specialized to a concrete type |
| 21:49:55 | <geekosaur> | a monomorphic Producer can't be generalized to a polymorphic type |
| 21:50:07 | <dminuoso_> | shiraeeshi: In a polymorphic value, the *caller/user* decides/instantiates the types. To the *implementor* its an opaque unknown type. |
| 21:50:43 | <dminuoso_> | In a rank 2 type the *caller* specifies a polymorphic type, but the *implementor* gets to decide/instantiate that polymorphic tye |
| 21:50:47 | × | acidjnk quits (~acidjnk@p200300d0c7068b8138d05884d43f32c7.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 21:51:30 | <shiraeeshi> | I think this is it: in my intuitive understanding the word "polymorphic" meant that if function says that it accepts polymorphic types, then anybody can pass anything to it |
| 21:51:54 | <dminuoso_> | shiraeeshi: In the example of [Leary], if you pass `id` to a function that wants `Int -> Int`, its really *you* who monomorphizes `id`. |
| 21:51:58 | <dminuoso_> | Not that other function. |
| 21:52:14 | <monochrom> | s/accept/provide/ then that sentence would be right. |
| 21:52:27 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 21:52:48 | <monochrom> | Example: "id :: forall a. a -> a". id provides a polymorphic type, namely "forall a. a -> a". |
| 21:53:03 | <dminuoso_> | shiraeeshi: Perhaps another useful angle is to think of polymorphic values as "functions taking a type, producing a value" |
| 21:54:29 | <dminuoso_> | Then it might help understand who has the obligation (or even possibility) to apply that "function taking a type" |
| 21:54:33 | × | _abrantesasf_ quits (abrantesas@gateway/vpn/protonvpn/abrantesasf) (Ping timeout: 244 seconds) |
| 21:54:58 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 21:56:17 | <shiraeeshi> | in the "id" example the type "a" is both in the covariant and contra-variant position |
| 21:56:33 | <dminuoso_> | Not from a type rank position |
| 21:56:53 | <dminuoso_> | Write out the implicit forall |
| 21:56:54 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 21:56:56 | <shiraeeshi> | but the text says that polymorphic type synonyms are problematic in contra-variant position, but ok in covariant position |
| 21:57:00 | <dminuoso_> | id :: forall a. (a -> a) |
| 21:57:05 | <dminuoso_> | c.f. |
| 21:57:07 | <monochrom> | But look at the "forall a" instead. |
| 21:57:12 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 21:57:18 | <dminuoso_> | wo :: (forall t. Num t => t) -> String |
| 21:57:27 | <monochrom> | That is the reason I explicate "forall a". |
| 21:57:48 | <monochrom> | You should be looking at where is the "forall", not where are the type variables. |
| 21:57:52 | <shiraeeshi> | hmm, so it's not in contravariant position in the "id" example? |
| 21:57:55 | <dminuoso_> | shiraeeshi: Yes, because in a rank-2 type synonym its not obvious at all |
| 21:58:41 | <dminuoso_> | @let type PolyNum = forall t. Num t => t |
| 21:58:43 | <lambdabot> | Defined. |
| 21:58:59 | <monochrom> | "foo :: forall a. blah" is equivalent to "foo :: () -> (forall a. blah)" so is that positive or negative? |
| 21:59:14 | <dminuoso_> | `g :: PolyNum -> String` if you substitute PolyNum for its type alias definition, you get `g :: (forall t. Num t => t) -> String` |
| 21:59:40 | <shiraeeshi> | monochrom: so id becomes "id :: () -> (forall a . a -> a)" ? |
| 22:00:22 | <shiraeeshi> | and PolyNum is in contra-variant position |
| 22:01:34 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 22:02:07 | × | jgeerds quits (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 240 seconds) |
| 22:03:31 | <shiraeeshi> | so I tried to create a script that would demonstrate the point they are trying to make (or prove it wrong) |
| 22:03:32 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:30cf:ca81:9fb0:16f5) (Remote host closed the connection) |
| 22:04:08 | <shiraeeshi> | I created a data type and a couple of synonyms: one of them polymorphic and one concrete |
| 22:04:11 | → | seriously_pc4 joins (~seriously@2607:fb90:2446:c74e:55c8:a2c3:719a:4078) |
| 22:04:12 | <shiraeeshi> | and two functions |
| 22:04:31 | <shiraeeshi> | https://paste.tomsmeding.com/lsxdzath |
| 22:04:37 | × | seriously_pc4 quits (~seriously@2607:fb90:2446:c74e:55c8:a2c3:719a:4078) (Client Quit) |
| 22:04:53 | → | seriously_pc92 joins (~seriously@2607:fb90:2446:c74e:55c8:a2c3:719a:4078) |
| 22:04:55 | <shiraeeshi> | but I couldn't create instances of polymorphic types |
| 22:05:05 | <shiraeeshi> | I see how it works with Num |
| 22:05:15 | <dminuoso_> | The only value of type `forall t. t` is `undefined` |
| 22:05:17 | <shiraeeshi> | but how would that work with my example |
| 22:05:28 | × | seriously_pc92 quits (~seriously@2607:fb90:2446:c74e:55c8:a2c3:719a:4078) (Client Quit) |
| 22:06:04 | <monochrom> | You run into the same problem as "how to create x :: forall a. a ?" |
| 22:06:23 | <monochrom> | the answer is "x = undefined" or "x = error "TODO"" |
| 22:06:38 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 22:07:00 | <monochrom> | Therefore when I'm teaching this, I use "f1 :: (forall a. a -> a) -> Int" and "f2 :: (Int -> Int) -> Int" instead. |
| 22:07:01 | <shiraeeshi> | then why would library creators declare polymorphic type synonyms? |
| 22:07:30 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Remote host closed the connection) |
| 22:07:37 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 22:07:56 | <monochrom> | Slow down. |
| 22:08:04 | <shiraeeshi> | monochrom: and what do you do with f1 and f2? |
| 22:08:29 | <monochrom> | I let you call them. I let you discover which one is more restrictive. |
| 22:09:51 | × | turlando quits (~turlando@user/turlando) (Ping timeout: 276 seconds) |
| 22:09:58 | × | joo-_ quits (~joo-_@fsf/member/joo--) (Ping timeout: 246 seconds) |
| 22:10:46 | <monochrom> | And at the same time the restrictive one is still somewhat usable. |
| 22:11:11 | <shiraeeshi> | here is what the tutorial says: |
| 22:11:14 | <shiraeeshi> | "pipes also provides polymorphic type synonyms with apostrophes at the end of their names. These use universal quantification to leave open any unused input or output ends (which I mark using *)" |
| 22:11:36 | <shiraeeshi> | what does "leave open" means then? |
| 22:12:06 | → | joo-_ joins (~joo-_@80-62-116-159-mobile.dk.customer.tdc.net) |
| 22:12:06 | × | joo-_ quits (~joo-_@80-62-116-159-mobile.dk.customer.tdc.net) (Changing host) |
| 22:12:06 | → | joo-_ joins (~joo-_@fsf/member/joo--) |
| 22:12:17 | <shiraeeshi> | I think I'm trying to understand what's the point of universal quantification |
| 22:12:19 | <monochrom> | I don't know pipes. I don't know what that sentence is talking about. But I can guess. |
| 22:12:56 | <monochrom> | I have "forall b. (forall a. a -> a) -> b -> b" |
| 22:13:17 | <monochrom> | I would not describe "b" as "left open", but I bet that sentence would say that. |
| 22:13:46 | <monochrom> | I am providing "bar :: forall b. (forall a. a -> a) -> b -> b" to you. Therefore, you choose b, I choose a. |
| 22:13:57 | <monochrom> | From my POV, b is left open to you. |
| 22:14:04 | <monochrom> | From your POV, a is left open to me. |
| 22:14:47 | <monochrom> | This is what's wrong with "intuitive" "explanations" such as "can be anything" "left open". |
| 22:15:17 | <monochrom> | Of course it's left open and can be anything. The contention is TO WHOM. |
| 22:15:22 | → | vicfred joins (~vicfred@user/vicfred) |
| 22:15:56 | <shiraeeshi> | I think I get it now |
| 22:15:59 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 22:16:16 | <monochrom> | Programming is the dialectic class struggle between the provider and the receiver. |
| 22:16:52 | × | benin quits (~benin@183.82.204.153) (Quit: The Lounge - https://thelounge.chat) |
| 22:16:52 | <monochrom> | I love what you hate. My freedom is your slavery. Your ignorance is my strength. |
| 22:17:03 | <shiraeeshi> | if you universally quantify a type variable you make it so that no one can pass any value that would satisfy it |
| 22:17:45 | <shiraeeshi> | universal quantification means that it's impossible to pass a value that would satisfy it |
| 22:17:51 | <byorgey> | I think "leave open" is actually talking about the ends of pipes. As in, polymorphism is used to guarantee that a certain input or output can't actually be used, even though it is still "left open" in the sense that e.g. output could be sent to it even though it will be ignored. |
| 22:20:16 | <shiraeeshi> | yes, I thought that "leave open" means "open for interpretation, open for specialization" when you pass a value of a more concrete type |
| 22:20:23 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 244 seconds) |
| 22:20:36 | <shiraeeshi> | but actually it means "leave the end open so nobody can close it" |
| 22:20:51 | <shiraeeshi> | or something like that |
| 22:25:21 | <shiraeeshi> | monochrom: you said: I have "forall b. (forall a. a -> a) -> b -> b" |
| 22:25:26 | × | chomwitt quits (~chomwitt@2a02:587:dc1e:cc00:f079:d366:2a9:ed7f) (Ping timeout: 258 seconds) |
| 22:26:28 | <shiraeeshi> | we can change it to say "forall b. (forall a. a -> x) -> b -> y", right? |
| 22:26:45 | <shiraeeshi> | we're talking about contra-variant position here |
| 22:26:56 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 22:27:08 | <monochrom> | What would the computer say? |
| 22:27:13 | <shiraeeshi> | just wanted to clarify |
| 22:27:30 | <monochrom> | Sure. What would the computer say? |
| 22:27:30 | × | kenaryn quits (~aurele@89-88-44-27.abo.bbox.fr) (Quit: leaving) |
| 22:27:36 | × | anon15041149 quits (~anon15041@host-80-41-95-245.as13285.net) (Ping timeout: 252 seconds) |
| 22:27:38 | <shiraeeshi> | no, I mean, change the example so that it's less confusing |
| 22:27:53 | <monochrom> | The change is more confusing. |
| 22:28:17 | <geekosaur> | what is less confusing about introducing an x and a y out of nowhere? |
| 22:28:40 | → | merijn joins (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
| 22:28:43 | <shiraeeshi> | to show that "a" and "b" appear in contra-variant position |
| 22:28:48 | <shiraeeshi> | and not in both positions |
| 22:29:50 | <monochrom> | The change leads to much degeneracy. |
| 22:31:35 | <monochrom> | Look at where are the "forall a" and "forall b" instead. |
| 22:31:53 | <monochrom> | Also I have a feeling that covariance and contravariance are misapplied to this. |
| 22:32:10 | <monochrom> | positive and negative are more suitable. |
| 22:32:51 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:33:35 | <monochrom> | If I gave you "goo :: (forall a. a) -> Int", it's "simpler" but the only way you could use it is "goo undefined". |
| 22:33:54 | <monochrom> | With my bar, at least you have one more option: "bar id". |
| 22:35:03 | <monochrom> | This is why a "forall a" is best with "...a... -> ...a..." so at least there is a non-degenerate use case. |
| 22:35:21 | <shiraeeshi> | hmm |
| 22:35:56 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 22:36:25 | <monochrom> | Everything I've said is a fact. What you need to do is to discard any mental model that conflicts with the facts, and accept some mental models that are compatible with the fact. |
| 22:36:37 | <monochrom> | As opposed to using a mental model to dispute facts. |
| 22:37:49 | × | vicfred quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 22:38:07 | <shiraeeshi> | the "bar" is a good example |
| 22:39:34 | <shiraeeshi> | at least I have a place to start from, something like a mnemonic rule |
| 22:40:19 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 22:41:19 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:41:26 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 255 seconds) |
| 22:43:36 | <shiraeeshi> | don't you guys get tired to answer the same questions about universal quantification, covariance, and contravariance over and over again? |
| 22:44:00 | <shiraeeshi> | I mean these kinds of questions should appear more or less frequently |
| 22:44:25 | <shiraeeshi> | don't you have like a resource, a blog post to recommend? |
| 22:45:47 | → | Tuplanolla joins (~Tuplanoll@91-159-68-39.elisa-laajakaista.fi) |
| 22:46:35 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 22:46:36 | <monochrom> | I think I see what you were thinking earlier. |
| 22:47:14 | <monochrom> | Suppose you start with, in OOP, "fun :: C -> C", where C has subclasses. |
| 22:48:07 | <monochrom> | That is really saying: "fun :: (forall c such that c is a subclass of C) -> (for some d such that d is a subclass of C)" |
| 22:48:38 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 22:49:54 | <monochrom> | So an imprecise but somewhat workable model is "the 1st C is at a contravariant position, the 2nd is at a covariant position". |
| 22:50:40 | <monochrom> | But once explicated by reductionism, you should still be looking at the locations of the quantifiers. |
| 22:50:57 | <monochrom> | err oops. |
| 22:51:12 | <monochrom> | "fun :: (for some c such that c is a subclass of C) -> (for some d such that d is a subclass of C)" |
| 22:52:10 | <monochrom> | By a puff of logic, that's equivalent to: |
| 22:52:23 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 22:52:54 | <monochrom> | "fun :: forall c such that c is a subclass of C. c -> (for some d such that d is a subclass of C)" |
| 22:53:12 | <monochrom> | for-some at a negative position becomes a forall at a positive position. |
| 22:54:01 | <monochrom> | User of fun provides whatever subclass of C the user wants, gets back a subclass of C that fun chooses. |
| 22:54:37 | <shiraeeshi> | why do you distinguish "for-some" and forall |
| 22:54:56 | <shiraeeshi> | is that existential and universal quantifications? |
| 22:55:06 | <monochrom> | for-some is existential. |
| 22:56:10 | <monochrom> | OOP deals in existentials most of the time. |
| 22:56:11 | <shiraeeshi> | I think better version is to say "forall b. (forall a. a -> Int) -> b -> String" |
| 22:56:35 | <shiraeeshi> | wait |
| 22:56:46 | <monochrom> | Can you write a function of that type? Can you use a function of that type? |
| 22:57:14 | <shiraeeshi> | ok, I see |
| 22:58:15 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 22:58:17 | <monochrom> | The user might find that the 1st parameter can only be like "const 4". |
| 22:58:40 | <shiraeeshi> | monochrom: "But once explicated by reductionism, you should still be looking at the locations of the quantifiers." |
| 22:58:45 | <shiraeeshi> | what's the rule here? |
| 22:59:11 | <monochrom> | The 1st for-some is negative, the 2nd for-some is positive. |
| 22:59:12 | <shiraeeshi> | like you described in the "bar" example, right |
| 22:59:33 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 22:59:35 | <shiraeeshi> | the outermost is negative, |
| 22:59:55 | <shiraeeshi> | and parentheses change the sign |
| 22:59:55 | → | anon15041149 joins (~anon15041@host-80-41-95-245.as13285.net) |
| 22:59:57 | <monochrom> | No, the outermost is positive. |
| 22:59:58 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 23:00:20 | <monochrom> | It's "negative -> positive" |
| 23:00:52 | <monochrom> | But a negative forsome becomes a positive forall. |
| 23:01:45 | <monochrom> | "if (there is an even prime number), then (it must be 2)" = "forall p. if p is an even prime number, then p=2". |
| 23:01:57 | <monochrom> | Puff of logic. |
| 23:03:32 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds) |
| 23:03:42 | × | zincy quits (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) (Ping timeout: 260 seconds) |
| 23:04:21 | <shiraeeshi> | I see |
| 23:04:28 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 23:05:42 | <monochrom> | I've got to go. See you later. |
| 23:06:21 | <shiraeeshi> | thanks for the explanation |
| 23:08:00 | <hpc> | this connection to logic goes deep, and if you want to do further googling you won't be bored by what you find :D |
| 23:09:51 | <shiraeeshi> | hpc: what search terms do you mean? |
| 23:10:36 | × | zeenk quits (~zeenk@2a02:2f04:a104:ef00:10:581:f80f:b980) (Quit: Konversation terminated!) |
| 23:11:12 | <shiraeeshi> | I guess something like "existential and universal quantification" |
| 23:13:37 | × | mmhat quits (~mmh@p200300f1c705841dee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 23:14:19 | × | causal quits (~user@50.35.83.177) (Quit: WeeChat 3.5) |
| 23:16:01 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 23:16:46 | <zzz> | curry howards isomorphism, propositions as types? |
| 23:17:30 | <zzz> | i just got here, not sure if that's what you were talking about |
| 23:18:23 | → | fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 23:19:05 | → | zincy joins (~zincy@host86-160-236-152.range86-160.btcentralplus.com) |
| 23:20:16 | × | jollygood2 quits (~bc8147f2@199.204.85.195) (Quit: CGI:IRC) |
| 23:25:09 | <shiraeeshi> | the discussion was about me trying to understand a snippet from the Pipes tutorial |
| 23:26:26 | <shiraeeshi> | when you have Producer and Producer' defined as |
| 23:26:38 | <shiraeeshi> | type Producer' b m r = forall x' x . Proxy x' x () b m r |
| 23:26:40 | → | mmhat joins (~mmh@p200300f1c705846fee086bfffe095315.dip0.t-ipconnect.de) |
| 23:26:45 | <shiraeeshi> | type Producer b = Proxy X () () b |
| 23:27:19 | × | fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed) |
| 23:27:41 | <shiraeeshi> | polymorphic type synonyms cause problems when used as the argument of a function (known as the "negative" or "contravariant" position) like this: |
| 23:27:49 | <shiraeeshi> | f :: Producer' a m r -> ... -- Wrong |
| 23:27:56 | <shiraeeshi> | f :: Producer a m r -> ... -- Right |
| 23:28:00 | <hpc> | yeah, what zzz said |
| 23:28:04 | <hpc> | (was afk for a bit) |
| 23:28:04 | <shiraeeshi> | The former function only accepts polymorphic Producers as arguments. The latter function accepts both polymorphic and concrete Producers, which is probably what you want. |
| 23:29:10 | × | zincy quits (~zincy@host86-160-236-152.range86-160.btcentralplus.com) (Ping timeout: 240 seconds) |
| 23:30:58 | <dons> | morning all |
| 23:33:44 | <geekosaur> | o/ |
| 23:33:58 | <shiraeeshi> | I'm going to re-read what monochrom and dminuoso said, perhaps it clicks in my head later |
| 23:34:20 | <shiraeeshi> | it kind of starting to make sense |
| 23:36:25 | → | kenaryn joins (~aurele@89-88-44-27.abo.bbox.fr) |
| 23:41:10 | × | mmhat quits (~mmh@p200300f1c705846fee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 23:42:07 | → | zincy joins (~zincy@2a00:23c8:970c:4801:5ce3:174f:85c3:8411) |
| 23:45:29 | × | leah2 quits (~leah@vuxu.org) (Ping timeout: 248 seconds) |
| 23:45:46 | → | nate1 joins (~nate@98.45.169.16) |
| 23:50:17 | × | nate1 quits (~nate@98.45.169.16) (Ping timeout: 244 seconds) |
| 23:54:17 | × | tafa quits (~tafa@user/tafa) (Quit: ZNC - https://znc.in) |
| 23:56:08 | → | tafa joins (~tafa@user/tafa) |
| 23:58:36 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt) |
All times are in UTC on 2022-05-24.