2020-11-26 00:00:08 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.) |
2020-11-26 00:01:56 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) (Client Quit) |
2020-11-26 00:02:24 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) |
2020-11-26 00:02:31 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) (Client Quit) |
2020-11-26 00:03:16 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
2020-11-26 00:03:16 +0100 | elliott__ | (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) |
2020-11-26 00:04:25 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving) |
2020-11-26 00:04:34 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) |
2020-11-26 00:04:46 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) (Client Quit) |
2020-11-26 00:05:52 +0100 | mceier | (~mceier@89-68-132-187.dynamic.chello.pl) (Ping timeout: 260 seconds) |
2020-11-26 00:06:16 +0100 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 240 seconds) |
2020-11-26 00:08:53 +0100 | dizzy_g | (~dizzy_g@188.170.200.125) () |
2020-11-26 00:08:57 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 00:09:04 +0100 | solonarv | (~solonarv@astrasbourg-653-1-191-240.w90-13.abo.wanadoo.fr) (Ping timeout: 256 seconds) |
2020-11-26 00:10:36 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) |
2020-11-26 00:12:53 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 00:13:16 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
2020-11-26 00:13:19 +0100 | <kupi> | i have found out it does not copy because uses plusForeignPtr |
2020-11-26 00:13:53 +0100 | <ski> | kupi : it slices, i'd imagine |
2020-11-26 00:13:59 +0100 | falafel_ | (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) |
2020-11-26 00:14:10 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 256 seconds) |
2020-11-26 00:15:56 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
2020-11-26 00:16:10 +0100 | fendor | (~fendor@178.165.131.166.wireless.dyn.drei.com) (Remote host closed the connection) |
2020-11-26 00:16:37 +0100 | shutdown_-h_now | (~arjan@2001:1c06:2d0b:2312:94f:cb60:6301:cfa8) (Ping timeout: 260 seconds) |
2020-11-26 00:17:16 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
2020-11-26 00:18:42 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9) |
2020-11-26 00:19:16 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) |
2020-11-26 00:19:43 +0100 | DavidEichmann | (~david@62.110.198.146.dyn.plus.net) (Remote host closed the connection) |
2020-11-26 00:20:17 +0100 | Aquazi | (uid312403@gateway/web/irccloud.com/x-zpyuyhhkgrlryaog) (Quit: Connection closed for inactivity) |
2020-11-26 00:20:24 +0100 | jneira | (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192) (Ping timeout: 256 seconds) |
2020-11-26 00:23:23 +0100 | shutdown_-h_now | (~arjan@2001:1c06:2d0b:2312:7167:dae3:3033:6c61) |
2020-11-26 00:24:47 +0100 | son0p | (~son0p@181.136.122.143) (Remote host closed the connection) |
2020-11-26 00:26:59 +0100 | dyamon | (~dyamon@cpc69058-oxfd26-2-0-cust662.4-3.cable.virginm.net) (Quit: WeeChat 2.9) |
2020-11-26 00:27:42 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2020-11-26 00:29:17 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9) |
2020-11-26 00:29:42 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) |
2020-11-26 00:33:48 +0100 | sand_dull | (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 260 seconds) |
2020-11-26 00:35:16 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) |
2020-11-26 00:35:32 +0100 | falafel_ | (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Remote host closed the connection) |
2020-11-26 00:35:56 +0100 | falafel_ | (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) |
2020-11-26 00:38:23 +0100 | <koz_> | Lazy ByteStrings are like, arrays of chunks right? |
2020-11-26 00:39:37 +0100 | <hpc> | linked list of chunks |
2020-11-26 00:40:24 +0100 | <koz_> | hpc: So like [Chunk]? |
2020-11-26 00:40:33 +0100 | <koz_> | And chunks are... strict ByteStrings? |
2020-11-26 00:41:48 +0100 | <hpc> | more or less |
2020-11-26 00:41:49 +0100 | <hpc> | https://hackage.haskell.org/package/bytestring-0.11.0.0/docs/src/Data.ByteString.Lazy.Internal.htm… |
2020-11-26 00:42:15 +0100 | <koz_> | Ah, they roll their own list. |
2020-11-26 00:42:22 +0100 | <koz_> | Is there a reason for this? |
2020-11-26 00:43:31 +0100 | <koz_> | Ah, strictness. |
2020-11-26 00:44:47 +0100 | hekkaidekapus_ | (~tchouri@gateway/tor-sasl/hekkaidekapus) |
2020-11-26 00:45:07 +0100 | sand_dull | (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) |
2020-11-26 00:45:17 +0100 | gioyik | (~gioyik@186.118.238.251) |
2020-11-26 00:46:43 +0100 | hekkaidekapus | (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds) |
2020-11-26 00:48:16 +0100 | elliott__ | (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
2020-11-26 00:49:06 +0100 | zaquest | (~notzaques@5.128.210.178) (Read error: Connection reset by peer) |
2020-11-26 00:50:04 +0100 | zaquest | (~notzaques@5.128.210.178) |
2020-11-26 00:50:12 +0100 | wonko7 | (~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net) (Ping timeout: 260 seconds) |
2020-11-26 00:51:37 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
2020-11-26 00:51:56 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 00:51:58 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
2020-11-26 00:52:05 +0100 | LKoen | (~LKoen@169.244.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
2020-11-26 00:54:07 +0100 | Gurkenglas | (~Gurkengla@unaffiliated/gurkenglas) (Remote host closed the connection) |
2020-11-26 00:54:51 +0100 | Gurkenglas | (~Gurkengla@unaffiliated/gurkenglas) |
2020-11-26 00:55:30 +0100 | vicfred | (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
2020-11-26 00:57:08 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
2020-11-26 00:58:03 +0100 | <int-e> | koz_: unpacking saves an indirection |
2020-11-26 00:58:16 +0100 | <koz_> | int-e: Yeah, that too. |
2020-11-26 00:58:47 +0100 | alp | (~alp@2a01:e0a:58b:4920:3dd7:733:8dcb:bbbc) (Ping timeout: 272 seconds) |
2020-11-26 01:01:20 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 01:02:12 +0100 | <ezzieyguywuf> | in megaparsec, how do I consume all the rest of the input and capture the values, rather than dumping them like eof does? |
2020-11-26 01:03:06 +0100 | boxscape | (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) |
2020-11-26 01:03:15 +0100 | <koz_> | ezzieyguywuf: takeRest? |
2020-11-26 01:03:55 +0100 | <ezzieyguywuf> | koz_: perfect thank you! |
2020-11-26 01:04:02 +0100 | <koz_> | ezzieyguywuf: No worries. |
2020-11-26 01:04:13 +0100 | gehmehgeh_ | (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
2020-11-26 01:04:42 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Ping timeout: 260 seconds) |
2020-11-26 01:04:57 +0100 | <int-e> | koz_: https://github.com/haskell/bytestring/commit/130906ef928f9761978dd7d13bd4b3082badd1b1 |
2020-11-26 01:06:05 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-11-26 01:06:48 +0100 | <int-e> | (I thought I remembered that it was defined as a list originally... and now confirmed it.) |
2020-11-26 01:09:33 +0100 | frdg | (~nick@pool-71-184-143-249.bstnma.fios.verizon.net) (Quit: Leaving.) |
2020-11-26 01:12:53 +0100 | sand_dull | (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 260 seconds) |
2020-11-26 01:13:25 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 01:13:37 +0100 | elfets | (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving) |
2020-11-26 01:14:08 +0100 | <ezzieyguywuf> | another megaparsec question (please be gentle y'all, I'm pretty new :-P) - how do I parse a single character, but ANY character, not a particular? I'm trying to parse exactly 16 characters, but `replicate 16 char` won't do it b/c char is `Token s -> m (Token s)` |
2020-11-26 01:14:42 +0100 | <koz_> | anyChar? |
2020-11-26 01:14:58 +0100 | <ezzieyguywuf> | koz_: hrm, I thought maybe printChar. Where do you see anyChar? |
2020-11-26 01:15:13 +0100 | <koz_> | One sec. |
2020-11-26 01:15:44 +0100 | <koz_> | anySingle |
2020-11-26 01:16:02 +0100 | <koz_> | (which is just a fancy way of saying 'satisfy (const True)') |
2020-11-26 01:16:16 +0100 | Gurkenglas | (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds) |
2020-11-26 01:16:44 +0100 | <ezzieyguywuf> | koz_: ah hah, yes this makes sense. thank you. |
2020-11-26 01:17:32 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 01:22:13 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
2020-11-26 01:30:03 +0100 | olligobber | (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
2020-11-26 01:33:18 +0100 | sondr3 | (~sondr3@cm-84.211.56.132.getinternet.no) (Quit: Leaving) |
2020-11-26 01:35:12 +0100 | Entertainment | (~entertain@104.246.132.210) (Ping timeout: 256 seconds) |
2020-11-26 01:35:35 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:7ef3:bc9a:f509:3193:e14d) |
2020-11-26 01:39:13 +0100 | andos | (~dan@69-165-210-185.cable.teksavvy.com) (Ping timeout: 264 seconds) |
2020-11-26 01:41:49 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 01:43:16 +0100 | hnOsmium0001 | (uid453710@gateway/web/irccloud.com/x-sigyjgyywexrisfj) (Quit: Connection closed for inactivity) |
2020-11-26 01:44:05 +0100 | Chi1thangoo | (~Chi1thang@87.112.60.168) (Ping timeout: 240 seconds) |
2020-11-26 01:44:47 +0100 | <ezzieyguywuf> | hrm, I have a `parseEnd :: Parser Text` that parses some characters at the end of the input. I want everything leading up to this - it seems like `takeWhile` is the tool for the job, but I'm unsure how to combine this with `parseEnd`. I was thinking maybe `lookahead`, but this does not return a bool so can't be used as the predicate |
2020-11-26 01:45:30 +0100 | mikolaj | (~mikon@duch.mimuw.edu.pl) (Quit: leaving) |
2020-11-26 01:46:27 +0100 | <ezzieyguywuf> | I'm trying to do the equivalent of the following in a regexp: ^(.*)SOMESTATICTEXT$ |
2020-11-26 01:46:39 +0100 | <koz_> | That's ambiguous. |
2020-11-26 01:46:49 +0100 | <ezzieyguywuf> | koz_: how so? |
2020-11-26 01:46:57 +0100 | mikolaj_ | (~mikolaj@purple.well-typed.com) (Quit: leaving) |
2020-11-26 01:47:10 +0100 | <koz_> | The first part could be anything, right? |
2020-11-26 01:47:15 +0100 | <ezzieyguywuf> | correct |
2020-11-26 01:47:18 +0100 | <koz_> | (including nothing at all) |
2020-11-26 01:47:25 +0100 | christo | (~chris@81.96.113.213) (Remote host closed the connection) |
2020-11-26 01:47:49 +0100 | <koz_> | lookahead won't help here because you don't know how much you have to read. |
2020-11-26 01:47:52 +0100 | <ezzieyguywuf> | hrm, I guess really it's more like "^(.+)SOMESTATICTEXT$" |
2020-11-26 01:48:12 +0100 | <koz_> | Ah, so you know there'll be _something_ prior to SOMESTATICTEXT? |
2020-11-26 01:48:18 +0100 | <ezzieyguywuf> | I guess I can just read till the end of line then subtract the static text |
2020-11-26 01:48:22 +0100 | <ezzieyguywuf> | koz_: correct. |
2020-11-26 01:48:38 +0100 | <koz_> | Hmm. |
2020-11-26 01:49:05 +0100 | <monochrom> | I wonder if it's manyTill (string "SOMESTATICTEXT\n") |
2020-11-26 01:49:19 +0100 | <ezzieyguywuf> | monochrom: manyTill sounds promising, let me check that out |
2020-11-26 01:49:56 +0100 | <ezzieyguywuf> | hrm, is that from attoparsec? |
2020-11-26 01:49:59 +0100 | <monochrom> | But generally, most parser combinator libraries are designed for positively specified grammars, not negatively specified "anything except this". |
2020-11-26 01:50:01 +0100 | <ezzieyguywuf> | can I still use it in megaparsec? |
2020-11-26 01:50:31 +0100 | <monochrom> | I don't actually know megaparsec. I just assume if it's in parsec then it's in megaparsec. |
2020-11-26 01:50:35 +0100 | <ezzieyguywuf> | monochrom: hrm, if that's the case then option (b) should be fine, i.e. use the parsing library to get "everything else" and then I can post-process by taking off the static text at the end |
2020-11-26 01:50:58 +0100 | <koz_> | ezzieyguywuf: If you are parsing Text, stripSuffix might prove helpful. |
2020-11-26 01:51:10 +0100 | <ezzieyguywuf> | koz_: yea, I am doing it as Text |
2020-11-26 01:51:11 +0100 | <monochrom> | The exception (pun!) is those few parser combinator libraries that are built for nondeterminism and ambiguous grammars. |
2020-11-26 01:51:43 +0100 | <ezzieyguywuf> | this is non-deterministic, I'm parsing the "Description" field from my bank statements, lol. |
2020-11-26 01:52:01 +0100 | Ariakenom__ | (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Read error: Connection reset by peer) |
2020-11-26 01:52:16 +0100 | <monochrom> | but parsec, megaparsec, and a lot of others are designed for determinism. |
2020-11-26 01:52:25 +0100 | Ariakenom__ | (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) |
2020-11-26 01:52:42 +0100 | comerijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 01:52:48 +0100 | <ezzieyguywuf> | hrm. well I seem to be doing ok so far.... |
2020-11-26 01:52:53 +0100 | <ezzieyguywuf> | 🤷 |
2020-11-26 01:52:58 +0100 | zariuq | (~zar@fw1.ciirc.cvut.cz) |
2020-11-26 01:53:10 +0100 | <ezzieyguywuf> | I was going to use regexp, then someone was like "I usually just use a parser" |
2020-11-26 01:53:10 +0100 | <ezzieyguywuf> | lol |
2020-11-26 01:53:17 +0100 | xsarnik0 | (xsarnik@gateway/shell/fi.muni.cz/x-nywghooskhwzuxkn) (Quit: Ping timeout (120 seconds)) |
2020-11-26 01:53:17 +0100 | Jajik | (xchlup2@gateway/shell/fi.muni.cz/x-gntccaugnuwouyau) (Quit: Ping timeout (120 seconds)) |
2020-11-26 01:53:36 +0100 | dequbed | (~dequbed@yanduxian.paranoidlabs.org) (Ping timeout: 240 seconds) |
2020-11-26 01:54:06 +0100 | dequbed | (~dequbed@yanduxian.paranoidlabs.org) |
2020-11-26 01:54:25 +0100 | <monochrom> | Well, I guess things like manyTill can help. |
2020-11-26 01:54:44 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-11-26 01:55:16 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-11-26 01:55:18 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9) |
2020-11-26 01:55:41 +0100 | <ski> | @quote Japsu regex |
2020-11-26 01:55:41 +0100 | <lambdabot> | Japsu says: iä iä, regex fhtagn |
2020-11-26 01:55:45 +0100 | <monochrom> | regex makes it look easy because every regex engine goes out of its way to implement nondeterminism by heavy backtracking or heaving compiling NFA to DFA. |
2020-11-26 01:55:53 +0100 | zebrag | (~inkbottle@alagny-551-1-20-27.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!) |
2020-11-26 01:55:55 +0100 | <monochrom> | s/heaving/heavy/ |
2020-11-26 01:56:02 +0100 | xsarnik0 | (xsarnik@gateway/shell/fi.muni.cz/x-rkntrcrlbmfefbac) |
2020-11-26 01:56:56 +0100 | zargoertzel | (~zar@fw1.ciirc.cvut.cz) (Ping timeout: 240 seconds) |
2020-11-26 01:57:31 +0100 | <monochrom> | What I want you to notice that CFG tools seldom make this easy. It is not just our community. yacc also makes you explicitly enumerate what you allow, not what you don't allow. |
2020-11-26 01:57:39 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2020-11-26 01:58:01 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:7ef3:bc9a:f509:3193:e14d) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-11-26 01:58:12 +0100 | <monochrom> | Hell, yacc is strongly anti-nondeterminism. |
2020-11-26 01:59:16 +0100 | zebrag | (~inkbottle@alagny-551-1-20-27.w83-200.abo.wanadoo.fr) |
2020-11-26 01:59:23 +0100 | erisco_ | (~erisco@208.98.222.65) |
2020-11-26 01:59:24 +0100 | <ski> | having better support for intersection, difference, division/derivative could be interesting |
2020-11-26 01:59:34 +0100 | <monochrom> | Negative specification comes into this equation because in the regex .*ABC, the .* part no longer means "anything", it now means "anything except ABC" |
2020-11-26 01:59:36 +0100 | jedws | (~jedws@101.184.150.93) |
2020-11-26 02:01:12 +0100 | hyperisco | (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 256 seconds) |
2020-11-26 02:01:12 +0100 | conal_ | (~conal@64.71.133.70) (Read error: Connection reset by peer) |
2020-11-26 02:01:21 +0100 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) |
2020-11-26 02:01:31 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 02:02:24 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 256 seconds) |
2020-11-26 02:02:32 +0100 | <ski> | (and i wonder how to best represent stuff like "maximal munch". to a large extent, i think i'd prefer it, if `p' parses `s' and `q' parses `t' implies that `p * q' parses `s ++ t') |
2020-11-26 02:02:33 +0100 | erisco | (~erisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 256 seconds) |
2020-11-26 02:03:37 +0100 | <monochrom> | Nondeterminism comes into the equation because it is a very good way of understanding any implementation strategy. |
2020-11-26 02:03:43 +0100 | <sarahzrf> | i like the earley library |
2020-11-26 02:04:28 +0100 | <monochrom> | CFG tools are mostly unsupportive of negative specification because set subtraction of two CFLs seldom give you a CFL. |
2020-11-26 02:04:55 +0100 | <monochrom> | Whereas RLs are closed under set subtraction, so regex tools are much happier with it. |
2020-11-26 02:05:43 +0100 | <monochrom> | and intersection too. CFLs not closed under intersection, RLs closed under intersection. |
2020-11-26 02:05:44 +0100 | erisco_ | (~erisco@208.98.222.65) (Read error: Connection reset by peer) |
2020-11-26 02:05:51 +0100 | erisco | (~erisco@d24-57-249-233.home.cgocable.net) |
2020-11-26 02:06:25 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 02:06:49 +0100 | m0rphism | (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) (Ping timeout: 264 seconds) |
2020-11-26 02:07:16 +0100 | <monochrom> | How to discover two CFLs that don't intersect to a CFL: |
2020-11-26 02:07:43 +0100 | <monochrom> | Always remember that the poster child non-CFL example is { a^n b^n c^n | n natural } |
2020-11-26 02:08:01 +0100 | hackage | network 3.1.2.1 - Low-level networking interface https://hackage.haskell.org/package/network-3.1.2.1 (KazuYamamoto) |
2020-11-26 02:08:05 +0100 | <monochrom> | So simply come up with two CFLs that intersect to that. This is within your reach. :) |
2020-11-26 02:10:50 +0100 | <koz_> | monochrom: Ah yes, that wonderful example that came up on my ToC assignment. |
2020-11-26 02:11:28 +0100 | <ski> | { aᵐ⋅bᵐ⋅cⁿ | m,n : ℕ } ∩ { aᵐ⋅bⁿ⋅cⁿ | m,n : ℕ } |
2020-11-26 02:11:29 +0100 | <ski> | ? |
2020-11-26 02:11:35 +0100 | <monochrom> | Yeah! |
2020-11-26 02:11:42 +0100 | <ski> | cool :) |
2020-11-26 02:11:53 +0100 | elliott__ | (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) |
2020-11-26 02:12:13 +0100 | <monochrom> | Generally, if a language has to synchronize three things, you can bet it has a problem. |
2020-11-26 02:12:34 +0100 | <koz_> | And that's even before we get to the fact that nondeterminism actually adds power to CFGs (but not RLs). |
2020-11-26 02:12:43 +0100 | <monochrom> | Synchronizing just two things, we know how to CFG it, it's just another "matching parentheses". |
2020-11-26 02:13:03 +0100 | treotmnor | (~treotmnor@218.73.97.199) (Quit: Leaving) |
2020-11-26 02:14:26 +0100 | xsarnik0 | (xsarnik@gateway/shell/fi.muni.cz/x-rkntrcrlbmfefbac) (Quit: Ping timeout (120 seconds)) |
2020-11-26 02:15:07 +0100 | <koz_> | sarahzrf: Earley parsers are quite cool, because their asymptotics are tied directly to matrix multiplication. |
2020-11-26 02:15:25 +0100 | comerijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-11-26 02:15:30 +0100 | <shachaf> | Hmm, is there some sort of dual-context-free that has intersection but not union? |
2020-11-26 02:15:57 +0100 | <shachaf> | Like there are NFAs and dual NFAs that make unions and intersections respectively easy. |
2020-11-26 02:16:16 +0100 | madog | (~madog@163.ip-51-254-203.eu) (Ping timeout: 240 seconds) |
2020-11-26 02:16:39 +0100 | <koz_> | shachaf: You lose intersection closure _very_ quickly with most recognizers. |
2020-11-26 02:16:57 +0100 | <koz_> | (like, whichever way you increase expressive power tends to kill you) |
2020-11-26 02:17:27 +0100 | <shachaf> | Hmm, but maybe concatenation isn't supported either. |
2020-11-26 02:17:36 +0100 | <shachaf> | But I'm curious what this is like. |
2020-11-26 02:17:40 +0100 | <koz_> | So I doubt such a thing exists, or at least in any meaningful sense as a 'dual' to CFGs. |
2020-11-26 02:18:14 +0100 | madog | (~madog@163.ip-51-254-203.eu) |
2020-11-26 02:19:45 +0100 | Fractalis | (~Fractalis@c-174-54-165-158.hsd1.pa.comcast.net) (Ping timeout: 240 seconds) |
2020-11-26 02:20:33 +0100 | Nahra | (~Nahra@unaffiliated/nahra) (Ping timeout: 260 seconds) |
2020-11-26 02:22:03 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) (Remote host closed the connection) |
2020-11-26 02:22:10 +0100 | Nahra | (~Nahra@unaffiliated/nahra) |
2020-11-26 02:22:19 +0100 | jedws | (~jedws@101.184.150.93) (Read error: Connection reset by peer) |
2020-11-26 02:23:38 +0100 | Jonkimi727406120 | (~Jonkimi@113.87.161.66) |
2020-11-26 02:23:42 +0100 | hnOsmium0001 | (uid453710@gateway/web/irccloud.com/x-kfwargodivspffqj) |
2020-11-26 02:24:16 +0100 | jedws | (~jedws@101.184.150.93) |
2020-11-26 02:25:48 +0100 | cole-h | (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2020-11-26 02:26:48 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 02:28:25 +0100 | matta | (~user@24-113-169-116.wavecable.com) (Ping timeout: 264 seconds) |
2020-11-26 02:29:14 +0100 | ski | . o O ( <https://en.wikipedia.org/wiki/Categorial_grammar>,<https://en.wikipedia.org/wiki/Montague_grammar>,<https://en.wikipedia.org/wiki/Pregroup_gramm> ) |
2020-11-26 02:30:04 +0100 | Deide | (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
2020-11-26 02:31:18 +0100 | christo | (~chris@81.96.113.213) (Ping timeout: 256 seconds) |
2020-11-26 02:31:25 +0100 | jedws | (~jedws@101.184.150.93) (Ping timeout: 264 seconds) |
2020-11-26 02:31:39 +0100 | <shachaf> | Instead of "dual NFA" I should say "existential NFA" for the normal kind and "universal NFA" for the weird dual kind. |
2020-11-26 02:32:45 +0100 | guest1126 | (~user@49.5.6.87) |
2020-11-26 02:33:59 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) (Quit: WeeChat 2.9) |
2020-11-26 02:34:09 +0100 | <ski> | are there any adjunctions present, involving them ? |
2020-11-26 02:34:17 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) |
2020-11-26 02:36:00 +0100 | xsarnik0 | (xsarnik@gateway/shell/fi.muni.cz/x-qqlqhiysrvqfxaju) |
2020-11-26 02:36:07 +0100 | Deide | (~Deide@217.155.19.23) |
2020-11-26 02:37:14 +0100 | falafel_ | (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 264 seconds) |
2020-11-26 02:37:25 +0100 | Lord_of_Life_ | (~Lord@46.217.220.129) (Ping timeout: 240 seconds) |
2020-11-26 02:37:27 +0100 | Lord_of_Life | (~Lord@46.217.221.184) |
2020-11-26 02:39:11 +0100 | sand_dull | (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) |
2020-11-26 02:42:52 +0100 | Jajik | (xchlup2@gateway/shell/fi.muni.cz/x-nixiositsvhijnwj) |
2020-11-26 02:45:45 +0100 | falafel_ | (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) |
2020-11-26 02:46:24 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 02:46:24 +0100 | thc202 | (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds) |
2020-11-26 02:48:13 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
2020-11-26 02:48:50 +0100 | jedws | (~jedws@101.184.180.34) |
2020-11-26 02:49:14 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 02:49:19 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) |
2020-11-26 02:52:19 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 02:53:05 +0100 | jedws | (~jedws@101.184.180.34) (Ping timeout: 240 seconds) |
2020-11-26 02:53:53 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-11-26 02:54:16 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 02:54:48 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 272 seconds) |
2020-11-26 02:57:58 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
2020-11-26 02:58:05 +0100 | sand_dull | (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 256 seconds) |
2020-11-26 02:59:14 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 272 seconds) |
2020-11-26 03:01:54 +0100 | Jonkimi727406120 | (~Jonkimi@113.87.161.66) (Ping timeout: 256 seconds) |
2020-11-26 03:04:05 +0100 | Jonkimi727406120 | (~Jonkimi@113.87.161.66) |
2020-11-26 03:06:13 +0100 | Rudd0^ | (~Rudd0@185.189.115.98) (Ping timeout: 264 seconds) |
2020-11-26 03:07:08 +0100 | cr3 | (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving) |
2020-11-26 03:09:33 +0100 | Jeanne-Kamikaze | (~Jeanne-Ka@66.115.189.157) (Ping timeout: 260 seconds) |
2020-11-26 03:11:17 +0100 | <koz_> | shachaf: Do you have a formal definition of these NFAs? |
2020-11-26 03:15:13 +0100 | <koz_> | Suppose I wanted to write a package that adds http://hackage.haskell.org/package/optics-core-0.3.0.1/docs/Optics-At-Core.html#t:Ixed definitions for, say, massiv arrays. However, the only way I can see to provide these instances is orphans, or asking massiv to cart around optics as a dep by integrating optics. Am I missing some third way? |
2020-11-26 03:16:11 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-11-26 03:16:46 +0100 | <monochrom> | asking optics to card around massiv :) |
2020-11-26 03:16:52 +0100 | jamm_ | (~jamm@unaffiliated/jamm) |
2020-11-26 03:16:57 +0100 | <koz_> | monochrom: _Fourth_ way, you pedant. :P |
2020-11-26 03:17:12 +0100 | <monochrom> | My view is that this is one of those times orphaning is desirable. |
2020-11-26 03:17:44 +0100 | <koz_> | monochrom: Yeah, I can't think of a way to do this without orphaning or newtypes. |
2020-11-26 03:17:51 +0100 | <koz_> | And newtypes would kinda defeat the whole exercise. |
2020-11-26 03:17:55 +0100 | ocamler | (3263cbdb@50.99.203.219) |
2020-11-26 03:18:55 +0100 | <ocamler> | hello friends! I have a probably simple question, I have a function which is wraps the state monad: `solve :: [(Int, Int)] -> ST s [Int]` which is called from `main :: IO ()`, how can I get these types to match? |
2020-11-26 03:20:23 +0100 | <koz_> | ST s [Int] would need to be runST'd to get out the [Int]. |
2020-11-26 03:20:46 +0100 | <koz_> | (and state monad /= ST) |
2020-11-26 03:21:10 +0100 | <ocamler> | oh oops right, wow I never knew there is a runST, is that still considered pure? |
2020-11-26 03:21:18 +0100 | <monochrom> | yes |
2020-11-26 03:21:36 +0100 | <koz_> | ocamler: It's the effect describing (locally) mutable state. |
2020-11-26 03:21:38 +0100 | jamm_ | (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds) |
2020-11-26 03:21:47 +0100 | <koz_> | It's also the thing that powers IO. |
2020-11-26 03:21:56 +0100 | <koz_> | (read Lazy Functional State Threads if you want the details) |
2020-11-26 03:24:29 +0100 | <ocamler> | thanks! I'll check it out |
2020-11-26 03:25:48 +0100 | <ezzieyguywuf> | what does ghcid's --reload actually do? I can see that it does _something_, but it doesn't (for example), re-build a library that has chnaged |
2020-11-26 03:26:44 +0100 | <ezzieyguywuf> | hrm, I guess it re-runs --command |
2020-11-26 03:27:02 +0100 | <ezzieyguywuf> | but I'd expect `cabal repl` to rebuild something that's changed.. |
2020-11-26 03:27:10 +0100 | int-e | would expect something similar to ghci's :reload |
2020-11-26 03:27:30 +0100 | <ezzieyguywuf> | but it doesn't! |
2020-11-26 03:27:33 +0100 | <ezzieyguywuf> | int-e: yea it is :reload |
2020-11-26 03:28:01 +0100 | <int-e> | so... it would only recompile the modules of the "local" package, but not look at any dependencies |
2020-11-26 03:28:05 +0100 | <ezzieyguywuf> | so if I do `cabal repl exe:MyExe`, and then make a change to lib:MyLib (which MyExe uses), and then :reload, ghcid does NOT rebuild MyLib |
2020-11-26 03:28:15 +0100 | xff0x_ | (~fox@2001:1a81:52e2:1100:66fc:dc44:c41d:a54) |
2020-11-26 03:28:24 +0100 | <ezzieyguywuf> | MyLib and MyExe are both local |
2020-11-26 03:28:35 +0100 | <ezzieyguywuf> | could it be I have something borked it my .cabal file? |
2020-11-26 03:28:36 +0100 | <int-e> | for this purpose they're not |
2020-11-26 03:28:41 +0100 | <ezzieyguywuf> | hrm |
2020-11-26 03:29:00 +0100 | <int-e> | lib:MyLib is built and registered as a package; ghci(d) would only see the executable's own modules |
2020-11-26 03:29:13 +0100 | <ezzieyguywuf> | ah, I see |
2020-11-26 03:29:23 +0100 | <ezzieyguywuf> | I don't think I need a lib - I think I just need modules for MyExe |
2020-11-26 03:29:30 +0100 | <ezzieyguywuf> | int-e: thanks for helping me think through that. |
2020-11-26 03:29:42 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 03:30:24 +0100 | sillyotter | (~sillyotte@2603-6011-ba0f-f7c5-4926-fd9c-a030-a135.res6.spectrum.com) |
2020-11-26 03:30:51 +0100 | reallymemorable | (~quassel@pool-100-2-25-229.nycmny.fios.verizon.net) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
2020-11-26 03:31:09 +0100 | reallymemorable | (~quassel@pool-100-2-25-229.nycmny.fios.verizon.net) |
2020-11-26 03:31:10 +0100 | xff0x | (~fox@port-92-193-220-65.dynamic.as20676.net) (Ping timeout: 246 seconds) |
2020-11-26 03:31:35 +0100 | sillyotter | (~sillyotte@2603-6011-ba0f-f7c5-4926-fd9c-a030-a135.res6.spectrum.com) (Client Quit) |
2020-11-26 03:36:37 +0100 | star_cloud | (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
2020-11-26 03:37:00 +0100 | star_cloud | (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
2020-11-26 03:38:31 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) |
2020-11-26 03:44:44 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 03:46:45 +0100 | star_cloud | (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
2020-11-26 03:47:47 +0100 | Stanley00 | (~stanley00@unaffiliated/stanley00) |
2020-11-26 03:47:59 +0100 | star_cloud | (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
2020-11-26 03:51:02 +0100 | falafel_ | (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 264 seconds) |
2020-11-26 03:53:54 +0100 | Fractalis | (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) |
2020-11-26 03:55:38 +0100 | drbean | (~drbean@TC210-63-209-63.static.apol.com.tw) |
2020-11-26 04:02:02 +0100 | kelsey | (~keteskyl@2600:6c64:7b7f:fa42:880b:e2d1:945a:df75) (Ping timeout: 260 seconds) |
2020-11-26 04:02:44 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-11-26 04:03:09 +0100 | urea | (4d8bd2b9@77.139.210.185) |
2020-11-26 04:03:36 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-11-26 04:09:56 +0100 | boxscape | (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Ping timeout: 240 seconds) |
2020-11-26 04:10:13 +0100 | sand_dull | (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) |
2020-11-26 04:10:52 +0100 | <ocamler> | lol why is [0..10] inclusive |
2020-11-26 04:11:03 +0100 | <ocamler> | i just spent like 15 minutes debugging that |
2020-11-26 04:12:06 +0100 | elliott__ | (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
2020-11-26 04:12:18 +0100 | <koz_> | ocamler: ... because it is? |
2020-11-26 04:12:30 +0100 | <koz_> | That's just how Enum-based ranges like that work. |
2020-11-26 04:12:38 +0100 | toorevitimirp | (~tooreviti@117.182.183.18) |
2020-11-26 04:13:27 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 04:13:36 +0100 | <ocamler> | ohhh I see, its for Enums as well |
2020-11-26 04:13:52 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) |
2020-11-26 04:14:12 +0100 | Deide | (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
2020-11-26 04:14:13 +0100 | <koz_> | > [LT ..] |
2020-11-26 04:14:15 +0100 | <lambdabot> | [LT,EQ,GT] |
2020-11-26 04:15:09 +0100 | benjamingr__ | (uid23465@gateway/web/irccloud.com/x-lrpyjjkwyhqzgysi) (Quit: Connection closed for inactivity) |
2020-11-26 04:15:11 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-11-26 04:15:16 +0100 | sand_dull | (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Quit: leaving) |
2020-11-26 04:15:25 +0100 | reallymemorable | (~quassel@pool-100-2-25-229.nycmny.fios.verizon.net) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
2020-11-26 04:17:03 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 04:17:30 +0100 | <ocamler> | damn thats cool |
2020-11-26 04:18:10 +0100 | <ocamler> | pretty sure thats impossible in ocaml |
2020-11-26 04:19:14 +0100 | urea | (4d8bd2b9@77.139.210.185) (Remote host closed the connection) |
2020-11-26 04:20:17 +0100 | ocamler | (3263cbdb@50.99.203.219) (Remote host closed the connection) |
2020-11-26 04:21:08 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 260 seconds) |
2020-11-26 04:24:36 +0100 | Saukk | (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) |
2020-11-26 04:33:24 +0100 | plutoniix | (~q@ppp-223-24-94-50.revip6.asianet.co.th) |
2020-11-26 04:35:10 +0100 | nek0 | (~nek0@mail.nek0.eu) (Quit: The Lounge - https://thelounge.chat) |
2020-11-26 04:35:32 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 04:36:14 +0100 | danso | (~dan@69-165-210-185.cable.teksavvy.com) |
2020-11-26 04:37:25 +0100 | alx741 | (~alx741@181.196.68.166) (Ping timeout: 264 seconds) |
2020-11-26 04:38:02 +0100 | alx741 | (~alx741@181.196.68.166) |
2020-11-26 04:39:13 +0100 | Iceland_jack | (~user@31.124.48.169) (Ping timeout: 264 seconds) |
2020-11-26 04:39:52 +0100 | lagothrix | Guest14131 |
2020-11-26 04:39:52 +0100 | Guest14131 | (~lagothrix@unaffiliated/lagothrix) (Killed (verne.freenode.net (Nickname regained by services))) |
2020-11-26 04:40:00 +0100 | lagothrix | (~lagothrix@unaffiliated/lagothrix) |
2020-11-26 04:41:08 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2020-11-26 04:41:55 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-11-26 04:42:21 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 04:44:37 +0100 | theDon | (~td@94.134.91.236) (Ping timeout: 264 seconds) |
2020-11-26 04:46:11 +0100 | theDon | (~td@muedsl-82-207-238-209.citykom.de) |
2020-11-26 04:46:56 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
2020-11-26 04:52:39 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 04:55:06 +0100 | <ezzieyguywuf> | how can I turn a [[String]] into a [[Text]]? |
2020-11-26 04:55:21 +0100 | <ezzieyguywuf> | fmap . fmap? |
2020-11-26 04:55:30 +0100 | <dolio> | (fmap . fmap) pack |
2020-11-26 04:57:03 +0100 | <ezzieyguywuf> | dolio: nice, thank you. |
2020-11-26 05:00:05 +0100 | DTZUZU | (~DTZUZU@207.81.171.116) (Read error: Connection reset by peer) |
2020-11-26 05:00:44 +0100 | Rudd0 | (~Rudd0@185.189.115.108) |
2020-11-26 05:00:55 +0100 | SupaYoshii | (~supayoshi@213-10-140-13.fixed.kpn.net) (Quit: Goodbye!) |
2020-11-26 05:01:52 +0100 | SupaYoshi | (~supayoshi@213-10-140-13.fixed.kpn.net) |
2020-11-26 05:02:14 +0100 | DTZUZU | (~DTZUZU@207.81.171.116) |
2020-11-26 05:02:17 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-11-26 05:02:50 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 05:05:18 +0100 | incertia | (~incertia@d4-50-26-103.nap.wideopenwest.com) (Quit: ZNC 1.7.5 - https://znc.in) |
2020-11-26 05:05:31 +0100 | vg | (~vg@139.59.59.230) (Quit: vg) |
2020-11-26 05:05:40 +0100 | incertia | (~incertia@d4-50-26-103.nap.wideopenwest.com) |
2020-11-26 05:05:47 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 05:05:59 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 05:06:09 +0100 | <incertia> | would there be any interest in a prism equivalent for data-has |
2020-11-26 05:06:13 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 05:07:15 +0100 | <incertia> | e.g. class MightHave a t where hasPrism :: Prism' t a |
2020-11-26 05:07:41 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2020-11-26 05:07:46 +0100 | <incertia> | and then you would be able to lift up errors into more general contexts with mtl |
2020-11-26 05:08:37 +0100 | Jonkimi727406120 | (~Jonkimi@113.87.161.66) (Ping timeout: 264 seconds) |
2020-11-26 05:08:41 +0100 | <incertia> | throwE :: (MightHave e err, MonadError e m) => e -> m () |
2020-11-26 05:08:44 +0100 | DTZUZU | (~DTZUZU@207.81.171.116) (Ping timeout: 260 seconds) |
2020-11-26 05:09:00 +0100 | slack1256 | (~slack1256@190.162.160.23) (Remote host closed the connection) |
2020-11-26 05:09:06 +0100 | <incertia> | throwE = throwError . review hasPrism |
2020-11-26 05:10:36 +0100 | agrif | minaj |
2020-11-26 05:11:43 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 05:12:40 +0100 | drbean | (~drbean@TC210-63-209-63.static.apol.com.tw) (Read error: Connection reset by peer) |
2020-11-26 05:13:36 +0100 | arpl | (546babef@84-107-171-239.cable.dynamic.v4.ziggo.nl) |
2020-11-26 05:14:46 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 05:16:17 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) |
2020-11-26 05:17:42 +0100 | urodna | (~urodna@unaffiliated/urodna) (Quit: urodna) |
2020-11-26 05:18:29 +0100 | adm_ | (~adm@43.229.88.197) |
2020-11-26 05:20:40 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 05:20:42 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-11-26 05:20:52 +0100 | drbean | (~drbean@TC210-63-209-33.static.apol.com.tw) |
2020-11-26 05:21:13 +0100 | Tario | (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
2020-11-26 05:21:34 +0100 | <arpl> | Is it useful to define a class for the sole purpose of creating a constraint (and the only 'proof' is having an instance)? So when you have a (higher order) function that takes a compression function, for instance, you can constrain it to only lossless compression. |
2020-11-26 05:21:45 +0100 | adm_ | (~adm@43.229.88.197) (Remote host closed the connection) |
2020-11-26 05:21:46 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 246 seconds) |
2020-11-26 05:23:22 +0100 | adm_ | (~adm@43.229.88.197) |
2020-11-26 05:25:28 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
2020-11-26 05:25:36 +0100 | drbean | (~drbean@TC210-63-209-33.static.apol.com.tw) (Ping timeout: 240 seconds) |
2020-11-26 05:29:32 +0100 | DataComputist | (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Remote host closed the connection) |
2020-11-26 05:30:13 +0100 | plutoniix | (~q@ppp-223-24-94-50.revip6.asianet.co.th) (Ping timeout: 264 seconds) |
2020-11-26 05:31:31 +0100 | vg | (~vg@139.59.59.230) (Quit: vg) |
2020-11-26 05:31:46 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 05:32:00 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 05:32:13 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 05:32:44 +0100 | plutoniix | (~q@ppp-223-24-94-50.revip6.asianet.co.th) |
2020-11-26 05:32:44 +0100 | Fractalis | (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Ping timeout: 240 seconds) |
2020-11-26 05:35:32 +0100 | nek0 | (~nek0@mail.nek0.eu) |
2020-11-26 05:36:10 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving) |
2020-11-26 05:36:28 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-11-26 05:37:53 +0100 | Jonkimi727406120 | (~Jonkimi@113.87.161.66) |
2020-11-26 05:41:31 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 05:41:56 +0100 | SanchayanMaity | (~Sanchayan@171.76.82.54) |
2020-11-26 05:41:59 +0100 | Fractalis | (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) |
2020-11-26 05:41:59 +0100 | Tario | (~Tario@201.192.165.173) |
2020-11-26 05:42:38 +0100 | Jonkimi727406120 | (~Jonkimi@113.87.161.66) (Ping timeout: 272 seconds) |
2020-11-26 05:44:30 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2020-11-26 05:46:25 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
2020-11-26 05:46:31 +0100 | matta | (~user@24-113-169-116.wavecable.com) |
2020-11-26 05:48:52 +0100 | Tario | (~Tario@201.192.165.173) (Ping timeout: 260 seconds) |
2020-11-26 05:50:16 +0100 | <koz_> | arpl: It can be sometimes. |
2020-11-26 05:50:46 +0100 | <koz_> | However, you almost always have some kind of behaviour to go with this constraint, so you may as well define that too. |
2020-11-26 05:51:12 +0100 | <koz_> | Because otherwise, it tells you something but you can't do anything with this value you just got. |
2020-11-26 05:53:11 +0100 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 256 seconds) |
2020-11-26 05:54:31 +0100 | <arpl> | That is true and I understand that. It is certainly nice when there are laws associated with a class. But I was thinking about situations (and maybe my example wasn't quite right) where there are no laws associated and you just want the user of that function to 'acknowledge' a certain constraint by making an instance and 'promising' to obey (when |
2020-11-26 05:54:31 +0100 | <arpl> | enforcement is not possible). |
2020-11-26 05:54:49 +0100 | kupi | (uid212005@gateway/web/irccloud.com/x-wpurhmmpfcznlitw) (Quit: Connection closed for inactivity) |
2020-11-26 05:54:54 +0100 | <koz_> | If your type class lacks laws, you should ask yourself _especially_ hard if that's really what you want. |
2020-11-26 05:55:06 +0100 | <koz_> | (in fact, certain folks would go so far as saying that all type classes should have them) |
2020-11-26 05:55:40 +0100 | <koz_> | Also, I didn't say anything about _laws_ - I merely said that type classes which only satisfy a constraint, without some associated behaviour, have quite limited usefulness. |
2020-11-26 05:55:53 +0100 | <koz_> | (although maybe I misunderstood and your type class _does_ have some methods?) |
2020-11-26 05:56:10 +0100 | <arpl> | Fair enough. I was only wondering. |
2020-11-26 05:57:20 +0100 | <arpl> | No, I was asking about a class with no methods, just to have some kind of constraint that should be acknowledged. I wasn't thinking about actually implementing something like that, just asking about the usefullness, if any. |
2020-11-26 05:57:31 +0100 | vg | (~vg@139.59.59.230) (Quit: vg) |
2020-11-26 05:57:36 +0100 | <koz_> | Yeah, a type class with no methods has very limited utility. |
2020-11-26 05:57:47 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 05:57:53 +0100 | <koz_> | Mostly because 'some value satisfies a constraint' gives you very little you can actually _do_ with that value afterwards. |
2020-11-26 05:58:04 +0100 | <koz_> | Because as far as the function it got passed into is concerned, it could literally be anything. |
2020-11-26 05:58:05 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 05:58:12 +0100 | Tario | (~Tario@201.192.165.173) |
2020-11-26 05:58:20 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 05:59:25 +0100 | <arpl> | Understood too. Just like the exhaustiveness check, this would be some 'user defined compiler warning' like: Are you sure this compression function is indeed lossless? |
2020-11-26 06:00:14 +0100 | <c_wraith> | err, sorry |
2020-11-26 06:00:15 +0100 | electricityZZZZ | (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds) |
2020-11-26 06:00:51 +0100 | <koz_> | Well, if a compression function is lossless, surely you want a type class with a 'compress' and 'decompress' method, with the law that 'compress . decompress == id'? |
2020-11-26 06:01:30 +0100 | <koz_> | (and probably an associated type for the compression result, although you could just use ByteString or something) |
2020-11-26 06:01:31 +0100 | Tario | (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
2020-11-26 06:02:11 +0100 | Tario | (~Tario@201.192.165.173) |
2020-11-26 06:02:30 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-11-26 06:02:48 +0100 | <arpl> | To make clear: This is beginner's question. Just learning Haskell. Yes, I agree ... compression would have associated laws/invariants. Thank you for your time. Back to just pondering : ) |
2020-11-26 06:03:47 +0100 | vg | (~vg@139.59.59.230) (Quit: vg) |
2020-11-26 06:04:05 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 06:04:20 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 06:04:34 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 06:06:57 +0100 | Jonkimi727406120 | (~Jonkimi@113.87.161.66) |
2020-11-26 06:11:57 +0100 | adm_ | (~adm@43.229.88.197) (Remote host closed the connection) |
2020-11-26 06:13:08 +0100 | Jonkimi727406120 | (~Jonkimi@113.87.161.66) (Ping timeout: 260 seconds) |
2020-11-26 06:13:09 +0100 | adm | (~adm@43.229.88.197) |
2020-11-26 06:14:09 +0100 | adm | (~adm@43.229.88.197) (Remote host closed the connection) |
2020-11-26 06:14:15 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) |
2020-11-26 06:15:15 +0100 | howdoi | (uid224@gateway/web/irccloud.com/x-koaluaessvhmdatb) (Quit: Connection closed for inactivity) |
2020-11-26 06:16:39 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) |
2020-11-26 06:17:27 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 06:18:47 +0100 | Amras | (~Amras@unaffiliated/amras) |
2020-11-26 06:19:01 +0100 | hackage | typson-core 0.1.0.0 - Type-safe PostgreSQL JSON Querying https://hackage.haskell.org/package/typson-core-0.1.0.0 (aaronallen8455) |
2020-11-26 06:19:50 +0100 | adm_ | (~adm@43.229.88.197) |
2020-11-26 06:20:03 +0100 | jedws | (~jedws@101.184.180.34) |
2020-11-26 06:20:25 +0100 | arpl | (546babef@84-107-171-239.cable.dynamic.v4.ziggo.nl) (Quit: arpl) |
2020-11-26 06:20:55 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 246 seconds) |
2020-11-26 06:22:02 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 06:22:25 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
2020-11-26 06:23:01 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
2020-11-26 06:24:47 +0100 | vg | (~vg@139.59.59.230) (Quit: vg) |
2020-11-26 06:24:56 +0100 | adm_ | (~adm@43.229.88.197) (Ping timeout: 240 seconds) |
2020-11-26 06:25:00 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 06:25:23 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 06:25:24 +0100 | berberman_ | (~berberman@unaffiliated/berberman) (Ping timeout: 240 seconds) |
2020-11-26 06:25:39 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 06:25:52 +0100 | berberman | (~berberman@unaffiliated/berberman) |
2020-11-26 06:26:35 +0100 | <jle`> | incertia: maybe not Has, but As :) |
2020-11-26 06:26:37 +0100 | Tario | (~Tario@201.192.165.173) (Ping timeout: 256 seconds) |
2020-11-26 06:29:09 +0100 | crestfallen | (~jvw@192-184-135-144.fiber.dynamic.sonic.net) |
2020-11-26 06:31:34 +0100 | supercoven | (~Supercove@194.34.133.94) |
2020-11-26 06:31:35 +0100 | supercoven | (~Supercove@194.34.133.94) (Max SendQ exceeded) |
2020-11-26 06:31:49 +0100 | supercoven | (~Supercove@194.34.133.94) |
2020-11-26 06:31:50 +0100 | supercoven | (~Supercove@194.34.133.94) (Max SendQ exceeded) |
2020-11-26 06:32:04 +0100 | supercoven | (~Supercove@194.34.133.94) |
2020-11-26 06:32:05 +0100 | supercoven | (~Supercove@194.34.133.94) (Max SendQ exceeded) |
2020-11-26 06:32:19 +0100 | supercoven | (~Supercove@194.34.133.94) |
2020-11-26 06:32:20 +0100 | supercoven | (~Supercove@194.34.133.94) (Max SendQ exceeded) |
2020-11-26 06:32:30 +0100 | <crestfallen> | hello is there a beginners channel or should I go to #haskell-overflow ? there is something fundamental I don't understand between do notation and bind notation; in the "divvy" example at the bottom of this paste: http://ix.io/2Fvz |
2020-11-26 06:32:35 +0100 | supercoven | (~Supercove@194.34.133.94) |
2020-11-26 06:33:16 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) |
2020-11-26 06:33:32 +0100 | <incertia> | i mocked up a sample library basically by inlining the lens definitions, is there anything i can simplify? https://gist.github.com/incertia/f1386a06b7c2a008f0bbbd6d1d74a0b9 |
2020-11-26 06:33:57 +0100 | adm_ | (~adm@43.229.88.197) |
2020-11-26 06:34:27 +0100 | <MarcelineVQ> | divvy is missing a read compared to divv |
2020-11-26 06:35:14 +0100 | <crestfallen> | thanks MarcelineVQ I've been trying put a second read in for a very long time. what's the trick? |
2020-11-26 06:35:37 +0100 | <MarcelineVQ> | do the same thing you did for the first read |
2020-11-26 06:37:55 +0100 | <MarcelineVQ> | x <- read became read >>= \x -> ... so you just do that again |
2020-11-26 06:38:49 +0100 | <crestfallen> | o ne moment please |
2020-11-26 06:40:16 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 272 seconds) |
2020-11-26 06:41:07 +0100 | <crestfallen> | I think the return clause requires " \_ -> ...". also I thought return requires the State :: ((),s) of write |
2020-11-26 06:41:56 +0100 | <crestfallen> | I know it's a strange program, but I want the division by zero error when I use (-1) |
2020-11-26 06:42:04 +0100 | supercoven | (~Supercove@194.34.133.94) (Max SendQ exceeded) |
2020-11-26 06:42:19 +0100 | supercoven | (~Supercove@194.34.133.94) |
2020-11-26 06:42:20 +0100 | supercoven | (~Supercove@194.34.133.94) (Max SendQ exceeded) |
2020-11-26 06:42:34 +0100 | supercoven | (~Supercove@194.34.133.94) |
2020-11-26 06:42:35 +0100 | supercoven | (~Supercove@194.34.133.94) (Max SendQ exceeded) |
2020-11-26 06:42:49 +0100 | supercoven | (~Supercove@194.34.133.94) |
2020-11-26 06:42:50 +0100 | <MarcelineVQ> | monochrom made an IO tutorial that happens to cover how bind and do relate, by starting with bind only, http://www.vex.net/~trebla/haskell/IO.xhtml But any google search about do notation in haskell will cover it as well, googling "translating do notation" for instance |
2020-11-26 06:42:50 +0100 | supercoven | (~Supercove@194.34.133.94) (Max SendQ exceeded) |
2020-11-26 06:43:04 +0100 | supercoven | (~Supercove@194.34.133.94) |
2020-11-26 06:43:05 +0100 | supercoven | (~Supercove@194.34.133.94) (Max SendQ exceeded) |
2020-11-26 06:43:36 +0100 | <crestfallen> | I've been using this: https://en.wikibooks.org/wiki/Haskell/do_notation |
2020-11-26 06:44:48 +0100 | <crestfallen> | I can see that there is a slight difference but I don't know how to insert the second read so that the "write (x+1) is maintained downstream |
2020-11-26 06:45:35 +0100 | guest1126 | (~user@49.5.6.87) (Remote host closed the connection) |
2020-11-26 06:45:45 +0100 | guest1126 | (~user@49.5.6.87) |
2020-11-26 06:46:47 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-11-26 06:48:12 +0100 | <MarcelineVQ> | That one's fine. You've got all the tools you need there. Just do what they did.Your only difference is that you have 4 ' |
2020-11-26 06:48:19 +0100 | <MarcelineVQ> | actions' instead of 3. |
2020-11-26 06:48:48 +0100 | <crestfallen> | i.e. this doesn't change the behavior to that of 'divv' divvy = read >>= \x -> write (x+1) >>= \_ -> read >>= \_ -> return (safeDiv (x*2) x) |
2020-11-26 06:49:11 +0100 | <MarcelineVQ> | no it wouldn't, because you don't bind x again |
2020-11-26 06:49:26 +0100 | <MarcelineVQ> | so you're using the old x instead of shadowing a new one like you did in divv |
2020-11-26 06:49:54 +0100 | <crestfallen> | yes, thanks I understand, but what is the notation? |
2020-11-26 06:50:01 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 06:50:37 +0100 | <MarcelineVQ> | :/ write x where you wrote _ in the same way you did it for the first read |
2020-11-26 06:51:03 +0100 | vg | (~vg@139.59.59.230) (Quit: vg) |
2020-11-26 06:51:18 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 06:51:32 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 06:51:45 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 06:51:53 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 06:52:09 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 06:52:16 +0100 | conal_ | (~conal@64.71.133.70) |
2020-11-26 06:52:25 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 06:52:31 +0100 | <crestfallen> | geez, I swear MarcelineVQ I thought I had done that 20 times. yes it works thanks kindly. |
2020-11-26 06:52:35 +0100 | <MarcelineVQ> | Rather than not getting do notation what is happening here is that you're not getting >>= Otherwise you wouldn't need to ask what you're asking. the expression x >>= \y -> ... binds the result of computing/running/executing x, to the name y. |
2020-11-26 06:52:39 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 06:53:06 +0100 | <MarcelineVQ> | do notation let's use write this as y <- x but the meaning is the same, run x, call the result y. |
2020-11-26 06:53:26 +0100 | Fractalis | (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Ping timeout: 264 seconds) |
2020-11-26 06:54:13 +0100 | <crestfallen> | what is the rule where the lambda after the second >>= must have the wildcard ? MarcelineVQ |
2020-11-26 06:54:27 +0100 | <crestfallen> | I'm foggy on that |
2020-11-26 06:55:13 +0100 | conal | (~conal@64.71.133.70) (Ping timeout: 246 seconds) |
2020-11-26 06:55:38 +0100 | adm_ | (~adm@43.229.88.197) (Remote host closed the connection) |
2020-11-26 06:55:55 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-11-26 06:56:14 +0100 | <jle`> | incertia: looks solid to me :) |
2020-11-26 06:56:34 +0100 | <jle`> | at least as a parallel to Data.Has |
2020-11-26 06:56:41 +0100 | adm_ | (~adm@43.229.88.197) |
2020-11-26 06:56:54 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 06:57:02 +0100 | <incertia> | there should be no reason to pick a specific choice right |
2020-11-26 06:57:19 +0100 | <MarcelineVQ> | You write _ if you don't care to name the result of some action. If you're not using the result in other words. For instance if you wrote |
2020-11-26 06:57:20 +0100 | <MarcelineVQ> | do x |
2020-11-26 06:57:23 +0100 | <MarcelineVQ> | y |
2020-11-26 06:57:31 +0100 | <jle`> | incertia: what do you mean by specific choice? |
2020-11-26 06:57:40 +0100 | Jonkimi727406120 | (~Jonkimi@113.87.161.66) |
2020-11-26 06:57:50 +0100 | <jle`> | ah my 'at least...' was that i'm still not super comfortable with such polymorphic mptc's |
2020-11-26 06:57:58 +0100 | <jle`> | but it should be at least as usable as Data.Has |
2020-11-26 06:57:59 +0100 | <MarcelineVQ> | that would be x >>= \_ -> y We don't bind a name for the result of x |
2020-11-26 06:58:05 +0100 | plutoniix | (~q@ppp-223-24-94-50.revip6.asianet.co.th) (Ping timeout: 240 seconds) |
2020-11-26 06:58:14 +0100 | <incertia> | e.g. in the profunctor construction of lenses we have p a (f b) but we choice p = (->) |
2020-11-26 06:58:22 +0100 | DataComputist | (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) |
2020-11-26 06:58:29 +0100 | <jle`> | ah, Choice |
2020-11-26 06:58:29 +0100 | <incertia> | Prisms appear to apply to anything with Choice |
2020-11-26 06:58:51 +0100 | <incertia> | and in such a way we can remove the lens dependency |
2020-11-26 06:58:58 +0100 | <incertia> | er profunctors |
2020-11-26 06:59:17 +0100 | <koz_> | @hoogle Choice |
2020-11-26 06:59:17 +0100 | <lambdabot> | Control.Lens.Combinators class Profunctor p => Choice (p :: Type -> Type -> Type) |
2020-11-26 06:59:17 +0100 | <lambdabot> | Control.Lens.Prism class Profunctor p => Choice (p :: Type -> Type -> Type) |
2020-11-26 06:59:17 +0100 | <lambdabot> | Network.AWS.Lens class Profunctor p => Choice (p :: Type -> Type -> Type) |
2020-11-26 06:59:19 +0100 | christo | (~chris@81.96.113.213) (Remote host closed the connection) |
2020-11-26 06:59:22 +0100 | <jle`> | yup, you should be ok with using Data.Profunctor.Choice, you don't need a lens dep |
2020-11-26 06:59:24 +0100 | <koz_> | Ah that thing. |
2020-11-26 06:59:31 +0100 | <jle`> | oh btw there is an instance of `As () a` btw |
2020-11-26 06:59:52 +0100 | <crestfallen> | thanks a lot MarcelineVQ happy thanksgiving if it matters to you. |
2020-11-26 06:59:57 +0100 | <jle`> | er wait sorry |
2020-11-26 06:59:59 +0100 | <jle`> | i mean As Void a |
2020-11-26 07:00:09 +0100 | <jle`> | it's the analogue of Has () a |
2020-11-26 07:00:17 +0100 | conal_ | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-11-26 07:00:28 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
2020-11-26 07:00:31 +0100 | <jle`> | ah, but there is no such instance in Data.Has. probably because of overlapping instances |
2020-11-26 07:00:33 +0100 | <jle`> | nevermind :) |
2020-11-26 07:01:48 +0100 | adm_ | (~adm@43.229.88.197) (Ping timeout: 272 seconds) |
2020-11-26 07:02:00 +0100 | thatlinuxguy | (~sand49@2001:8003:8431:d200:8d49:ec:3d23:9521) |
2020-11-26 07:03:22 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) |
2020-11-26 07:04:20 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 07:07:03 +0100 | <incertia> | _Void also happens to be Prism s s a Void and we are restricted to Prism s s a a |
2020-11-26 07:07:03 +0100 | <thatlinuxguy> | Hi im having troble with generic typing. I'm trying to make a function that will return a flattened version of a given list. What I can't figure out is how to know when you've reached an element and not another list when recursing into the list, I know all elements of the base list will have the same depth because the list must be homogeneous but how do you determine what that is. |
2020-11-26 07:07:40 +0100 | <thatlinuxguy> | sorry if I interrupted |
2020-11-26 07:07:43 +0100 | <crestfallen> | MarcelineVQ: wondering. in both divv and divvy, we bind the result of read to x, but that is just the s (not the 'a' in (a,s) as well); i.e in \x it is just the single value of state: 's' .. correct? |
2020-11-26 07:08:30 +0100 | <jle`> | incertia: that unifies though, with a ~ Void |
2020-11-26 07:08:42 +0100 | <jle`> | so you can use _Void as a Prism s s a a |
2020-11-26 07:08:54 +0100 | <jle`> | oh ah, my explanation is wrong |
2020-11-26 07:09:09 +0100 | christo | (~chris@81.96.113.213) (Ping timeout: 260 seconds) |
2020-11-26 07:09:37 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 07:10:16 +0100 | <crestfallen> | the second place of the tuple, (a,s) or (s,s) |
2020-11-26 07:10:24 +0100 | <incertia> | thatlinuxguy: if flatten :: [[a]] -> [a] your first pattern match will be on a list. e.g. flatten (a:as) = ... <-- here a is a list and you can further pattern match on that |
2020-11-26 07:11:01 +0100 | Gurkenglas | (~Gurkengla@unaffiliated/gurkenglas) |
2020-11-26 07:11:29 +0100 | <MarcelineVQ> | It's the a, the first place of the tuple, because the a is what the Monad instance acts upon and >>= is from Monad. read just happens to put the same value into both sides of the tuple. |
2020-11-26 07:11:44 +0100 | <incertia> | so like flatten ((b:bs):as) = b : flatten (bs:as) and flatten ((b:[]):as) = b : flatten as |
2020-11-26 07:12:04 +0100 | <thatlinuxguy> | ok cool that makes sense incertia |
2020-11-26 07:12:13 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 07:12:36 +0100 | <crestfallen> | very helpful, thanks, I think that's why I was having trouble writing the read into it MarcelineVQ |
2020-11-26 07:12:51 +0100 | christo | (~chris@81.96.113.213) (Remote host closed the connection) |
2020-11-26 07:13:01 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-11-26 07:13:20 +0100 | alp | (~alp@2a01:e0a:58b:4920:fde0:51bd:f252:73ea) |
2020-11-26 07:13:43 +0100 | <jle`> | incertia: yeah, _Void works for As Void a, it unifies as a Prism a a Void Void |
2020-11-26 07:14:54 +0100 | <jle`> | previewer = const Nothing; reviewer = absurd |
2020-11-26 07:15:00 +0100 | <incertia> | jle`: Prism a Void => previewer :: a -> Maybe Void seems kinda weird |
2020-11-26 07:15:06 +0100 | <incertia> | do we just have previewer = const Nothing? |
2020-11-26 07:15:11 +0100 | <jle`> | it's weird, but lawful :) |
2020-11-26 07:15:45 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) |
2020-11-26 07:16:03 +0100 | <jle`> | a Lens' S A means that there is some type x where S is equivalent to (A, x) |
2020-11-26 07:16:04 +0100 | <incertia> | i guess reviewer = absurd makes sense |
2020-11-26 07:16:11 +0100 | <jle`> | S is some product of A and some other type |
2020-11-26 07:16:18 +0100 | <jle`> | so you can "factor" S |
2020-11-26 07:16:29 +0100 | <jle`> | a Prism' S A means that there is some type x where S is equivalent to Either A x |
2020-11-26 07:16:40 +0100 | <jle`> | S is a sum of A and some other type, so you can "split" S, sum-wise |
2020-11-26 07:16:57 +0100 | <incertia> | splitting with void makes sense yeah |
2020-11-26 07:17:06 +0100 | <jle`> | in the case of united, Lens' s () is saying that any s is equivalent to ((), s) |
2020-11-26 07:17:22 +0100 | <jle`> | and in the case of _Void, Prism' s Void is saying that any s is equivalent to Either Void s |
2020-11-26 07:17:35 +0100 | <jle`> | maybe more of a theoretical nicety than a useful thing though |
2020-11-26 07:17:54 +0100 | <incertia> | the sum perspective makes much more sense |
2020-11-26 07:18:00 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 07:18:02 +0100 | <jle`> | that might be why there is no `Has () a` instance |
2020-11-26 07:18:11 +0100 | <koz_> | Maybe Void is actually () in disguise. :P |
2020-11-26 07:18:26 +0100 | <incertia> | no void is equivalent to empty set |
2020-11-26 07:18:31 +0100 | <incertia> | and () is a set with one element |
2020-11-26 07:20:05 +0100 | adm_ | (~adm@43.229.88.197) |
2020-11-26 07:20:16 +0100 | Guest10117 | (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 240 seconds) |
2020-11-26 07:20:29 +0100 | <incertia> | Has () a does not cause any overlapping instance warning |
2020-11-26 07:20:40 +0100 | <incertia> | ghc just tells me it's orphaned |
2020-11-26 07:20:55 +0100 | <incertia> | but it doesn't seem to be very useful which is probably why it's not there |
2020-11-26 07:21:01 +0100 | <jle`> | yeah, i'm guessing that there must have been some reason why it was not included |
2020-11-26 07:21:23 +0100 | <jle`> | i wonder |
2020-11-26 07:21:34 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 07:22:05 +0100 | christo | (~chris@81.96.113.213) (Ping timeout: 240 seconds) |
2020-11-26 07:24:51 +0100 | SanchayanMaity | (~Sanchayan@171.76.82.54) (Remote host closed the connection) |
2020-11-26 07:25:05 +0100 | Saukk | (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection) |
2020-11-26 07:25:39 +0100 | SanchayanMaity | (~Sanchayan@171.76.82.54) |
2020-11-26 07:26:47 +0100 | <koz_> | incertia: There were missing quotes in what I said. I meant to say |
2020-11-26 07:26:48 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
2020-11-26 07:26:56 +0100 | adm_ | (~adm@43.229.88.197) (Ping timeout: 240 seconds) |
2020-11-26 07:26:58 +0100 | <koz_> | 'Maybe Void' is actually '()' in disguise. |
2020-11-26 07:27:19 +0100 | <incertia> | ooooooo |
2020-11-26 07:27:21 +0100 | <incertia> | that makes sense |
2020-11-26 07:27:54 +0100 | <koz_> | Maybe a has cardinality 1 + the cardinality of a. |
2020-11-26 07:28:04 +0100 | <koz_> | And since Void has cardinality 0... yeah. :P |
2020-11-26 07:29:39 +0100 | cole-h | (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
2020-11-26 07:29:52 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2020-11-26 07:30:08 +0100 | <jle`> | ha ha |
2020-11-26 07:30:21 +0100 | <jle`> | maybe the real void was the friends we made along the way |
2020-11-26 07:30:39 +0100 | <koz_> | The Void is clearly staring into jle` |
2020-11-26 07:30:49 +0100 | <incertia> | the real friends were the voids we found along the way |
2020-11-26 07:30:52 +0100 | <incertia> | because i have no friends |
2020-11-26 07:30:53 +0100 | <incertia> | :) |
2020-11-26 07:31:06 +0100 | <koz_> | incertia: Void is unique. :P |
2020-11-26 07:31:11 +0100 | <koz_> | (thanks, axiom of extensionality) |
2020-11-26 07:31:25 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
2020-11-26 07:32:34 +0100 | xff0x_ | (~fox@2001:1a81:52e2:1100:66fc:dc44:c41d:a54) (Quit: xff0x_) |
2020-11-26 07:35:40 +0100 | adm_ | (~adm@43.229.88.197) |
2020-11-26 07:36:10 +0100 | Nahra | (~Nahra@unaffiliated/nahra) (Quit: leaving) |
2020-11-26 07:36:18 +0100 | xff0x | (~fox@2001:1a81:52e2:1100:66fc:dc44:c41d:a54) |
2020-11-26 07:41:05 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-11-26 07:44:36 +0100 | caecilius | (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net) (Ping timeout: 256 seconds) |
2020-11-26 07:44:43 +0100 | <crestfallen> | :quit |
2020-11-26 07:44:55 +0100 | <crestfallen> | exit |
2020-11-26 07:44:58 +0100 | <crestfallen> | oops |
2020-11-26 07:45:14 +0100 | crestfallen | (~jvw@192-184-135-144.fiber.dynamic.sonic.net) (Quit: leaving) |
2020-11-26 07:45:36 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
2020-11-26 07:47:04 +0100 | jedws | (~jedws@101.184.180.34) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-11-26 07:47:30 +0100 | gproto23 | (~gproto23@unaffiliated/gproto23) |
2020-11-26 07:47:49 +0100 | johnw | (~johnw@haskell/developer/johnw) (Quit: ZNC - http://znc.in) |
2020-11-26 07:49:42 +0100 | danvet | (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
2020-11-26 07:51:05 +0100 | alp | (~alp@2a01:e0a:58b:4920:fde0:51bd:f252:73ea) (Ping timeout: 272 seconds) |
2020-11-26 07:51:30 +0100 | jespada | (~jespada@90.254.245.49) (Ping timeout: 265 seconds) |
2020-11-26 07:51:31 +0100 | hackage | wai-extra 3.1.3 - Provides some basic WAI handlers and middleware. https://hackage.haskell.org/package/wai-extra-3.1.3 (MichaelSnoyman) |
2020-11-26 07:53:31 +0100 | jespada | (~jespada@90.254.245.49) |
2020-11-26 07:56:39 +0100 | thatlinuxguy | (~sand49@2001:8003:8431:d200:8d49:ec:3d23:9521) (Quit: Leaving) |
2020-11-26 07:57:30 +0100 | coot | (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) |
2020-11-26 07:59:24 +0100 | <MarcelineVQ> | place ur bets |
2020-11-26 08:00:10 +0100 | plutoniix | (~q@ppp-223-24-94-50.revip6.asianet.co.th) |
2020-11-26 08:00:30 +0100 | hackage | data-as 0.0.0.1 - Simple extensible sum https://hackage.haskell.org/package/data-as-0.0.0.1 (incertia) |
2020-11-26 08:01:31 +0100 | hackage | typson-beam 0.1.0.0 - Typson Beam Integration https://hackage.haskell.org/package/typson-beam-0.1.0.0 (aaronallen8455) |
2020-11-26 08:03:03 +0100 | <jle`> | woo hoo |
2020-11-26 08:03:08 +0100 | <incertia> | apparently haddock hates my life |
2020-11-26 08:06:10 +0100 | plutoniix | (~q@ppp-223-24-94-50.revip6.asianet.co.th) (Quit: Leaving) |
2020-11-26 08:06:13 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 08:10:36 +0100 | adm__ | (~adm@43.229.89.234) |
2020-11-26 08:10:45 +0100 | adm_ | (~adm@43.229.88.197) (Ping timeout: 240 seconds) |
2020-11-26 08:11:10 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
2020-11-26 08:12:25 +0100 | texasmynsted | (~texasmyns@212.102.45.112) (Ping timeout: 240 seconds) |
2020-11-26 08:12:32 +0100 | mceier | (~mceier@89-68-132-187.dynamic.chello.pl) |
2020-11-26 08:13:06 +0100 | vg | (~vg@139.59.59.230) (Quit: vg) |
2020-11-26 08:13:22 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 08:13:48 +0100 | vg | (~vg@139.59.59.230) (Client Quit) |
2020-11-26 08:14:07 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 08:14:37 +0100 | vg | (~vg@139.59.59.230) (Client Quit) |
2020-11-26 08:15:01 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 08:15:17 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 08:15:30 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 08:15:52 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2020-11-26 08:17:34 +0100 | <incertia> | does hackage not build haddock automatically on upload? |
2020-11-26 08:17:43 +0100 | <dminuoso> | Correct |
2020-11-26 08:18:17 +0100 | <incertia> | ok maybe that is why no links are showing up |
2020-11-26 08:18:17 +0100 | <dminuoso> | 2Well |
2020-11-26 08:18:24 +0100 | <dminuoso> | Hackage *tries* to build the documentation |
2020-11-26 08:18:26 +0100 | <dminuoso> | But it can fail |
2020-11-26 08:18:40 +0100 | <dminuoso> | incertia: https://hackage.haskell.org/upload |
2020-11-26 08:19:23 +0100 | solonarv | (~solonarv@astrasbourg-653-1-191-240.w90-13.abo.wanadoo.fr) |
2020-11-26 08:19:24 +0100 | <incertia> | nvm it generated i just had to give it like 15min |
2020-11-26 08:20:10 +0100 | invaser | (~Thunderbi@31.148.23.125) |
2020-11-26 08:21:53 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 08:22:08 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) |
2020-11-26 08:22:45 +0100 | adm__ | (~adm@43.229.89.234) (Remote host closed the connection) |
2020-11-26 08:30:24 +0100 | coot_ | (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) |
2020-11-26 08:32:12 +0100 | We | (5fa448e7@95.164.72.231) |
2020-11-26 08:32:16 +0100 | <We> | cleanup |
2020-11-26 08:32:25 +0100 | coot | (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 256 seconds) |
2020-11-26 08:32:26 +0100 | coot_ | coot |
2020-11-26 08:32:37 +0100 | We | Guest77209 |
2020-11-26 08:34:41 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 08:35:38 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9) |
2020-11-26 08:36:23 +0100 | MarcelineVQ | (~anja@198.254.202.72) (Ping timeout: 256 seconds) |
2020-11-26 08:37:52 +0100 | MarcelineVQ | (~anja@198.254.202.72) |
2020-11-26 08:39:13 +0100 | adm_ | (~adm@43.229.89.234) (Ping timeout: 260 seconds) |
2020-11-26 08:39:28 +0100 | <dminuoso> | What would you call an operation `Tree (Maybe a) -> Maybe (Tree a)`? |
2020-11-26 08:39:58 +0100 | <jle`> | could it be done for any Applicative instead of Maybe? |
2020-11-26 08:40:02 +0100 | <jle`> | if so, i'd call it sequence |
2020-11-26 08:40:21 +0100 | <jle`> | s/instead of/and not just |
2020-11-26 08:40:40 +0100 | <jle`> | sequence :: Applicative f => Tree (f a) -> f (Tree a) |
2020-11-26 08:40:47 +0100 | vg | (~vg@139.59.59.230) (Quit: vg) |
2020-11-26 08:40:47 +0100 | chkno | (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
2020-11-26 08:40:56 +0100 | <dminuoso> | Sure, I mean the actual types involved make it slightly more specialized, as I have |
2020-11-26 08:41:02 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 08:41:09 +0100 | <dminuoso> | Oh well, its the same. |
2020-11-26 08:41:12 +0100 | chkno | (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 08:41:16 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 08:41:23 +0100 | <jle`> | ah i meant, if you don't treat it in any way specific to Maybe that couldn't be done generically for all Applicative |
2020-11-26 08:41:29 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 08:41:37 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 08:41:51 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 08:41:53 +0100 | <dminuoso> | Right. Well I was just thinking of specifically calling that specialized function `hasLabel` |
2020-11-26 08:42:11 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 08:42:12 +0100 | <dminuoso> | I dont want to revisit later wondering about the uses of `sequence` here |
2020-11-26 08:42:25 +0100 | <incertia> | probably fine to give it a specific name if its use case in that location is specific |
2020-11-26 08:42:26 +0100 | <jle`> | the behavior of sequence would be more or less "allJust", maybe |
2020-11-26 08:42:26 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 08:42:33 +0100 | <incertia> | yeah |
2020-11-26 08:42:36 +0100 | <jle`> | i guess it depends on your use case too |
2020-11-26 08:42:43 +0100 | <jle`> | maybe 'validate' |
2020-11-26 08:43:11 +0100 | <dminuoso> | So I build up a patricia tree, and then I want to ensure it's also a valid regular labeled tree |
2020-11-26 08:43:28 +0100 | <dminuoso> | *patricia trie |
2020-11-26 08:43:52 +0100 | <jle`> | it sounds like you are describing a specific operation, then |
2020-11-26 08:44:04 +0100 | <jle`> | and not just "a thing of type Tree (Maybe a) -> Maybe (Tree a)" |
2020-11-26 08:44:15 +0100 | <dminuoso> | Well, internally it's very much just sequence.. |
2020-11-26 08:44:23 +0100 | <jle`> | so i would give it a name to whatever describes what you are doing, semantically :) |
2020-11-26 08:44:28 +0100 | <jle`> | apart from just what the types tell you |
2020-11-26 08:44:36 +0100 | <dminuoso> | Right. Leading us back to my original question |
2020-11-26 08:44:38 +0100 | <dminuoso> | What would you call it :p |
2020-11-26 08:44:57 +0100 | <jle`> | toValidRegularLabeledTree ? |
2020-11-26 08:45:10 +0100 | <dminuoso> | heh |
2020-11-26 08:45:14 +0100 | <incertia> | i probably would just do let allJust = sequence in and go on from there |
2020-11-26 08:45:15 +0100 | asheshambasta | (~user@ptr-e1lysauiv50il654lwl.18120a2.ip6.access.telenet.be) |
2020-11-26 08:45:27 +0100 | <incertia> | but giving it a more apt name |
2020-11-26 08:45:41 +0100 | <jle`> | give a name based on the type = i'd say sequence, probably. but give it a name based on how you are using it, toValidRegularLabeledTree is something i'd use |
2020-11-26 08:45:46 +0100 | <dminuoso> | incertia: Yeah no, the reality is slightly more annoying. I have `Tree (ann, Maybe a) -> Maybe (Tree (ann, a))` |
2020-11-26 08:45:52 +0100 | <MarcelineVQ> | wwcd ::Tree (Maybe a) -> Maybe (Tree a) |
2020-11-26 08:46:29 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 08:46:33 +0100 | <dminuoso> | So I need some double sequence/traverse |
2020-11-26 08:46:37 +0100 | <dminuoso> | With flip |
2020-11-26 08:46:46 +0100 | <dminuoso> | MarcelineVQ: wwc? |
2020-11-26 08:46:46 +0100 | plutoniix | (~q@ppp-223-24-94-50.revip6.asianet.co.th) |
2020-11-26 08:46:55 +0100 | n0042 | (d055ed89@208.85.237.137) |
2020-11-26 08:47:07 +0100 | <MarcelineVQ> | what would cale do |
2020-11-26 08:47:25 +0100 | <asheshambasta> | Anyone with more reflex experience than I can tell me why this traces: https://github.com/asheshambasta/flowerpower/blob/showcase/servant-reflex-dependency/fht-frontend/… while this doesn't: https://github.com/asheshambasta/flowerpower/blob/showcase/servant-reflex-dependency/fht-frontend/… (I couldn't provide a more minimal repro. of this) |
2020-11-26 08:47:59 +0100 | <jle`> | looks like `traverse sequence` |
2020-11-26 08:48:44 +0100 | <dminuoso> | traverse (sequence . swap) |
2020-11-26 08:48:50 +0100 | <koz_> | :t traverse sequence |
2020-11-26 08:48:51 +0100 | <lambdabot> | (Traversable t1, Traversable t2, Monad f) => t1 (t2 (f a)) -> f (t1 (t2 a)) |
2020-11-26 08:48:54 +0100 | <dminuoso> | % :t traverse (sequence . swap |
2020-11-26 08:48:54 +0100 | <yahb> | dminuoso: ; <interactive>:1:26: error: parse error (possibly incorrect indentation or mismatched brackets) |
2020-11-26 08:48:56 +0100 | <dminuoso> | % :t traverse (sequence . swap) |
2020-11-26 08:48:56 +0100 | <yahb> | dminuoso: forall {t :: * -> *} {f :: * -> *} {a} {b}. (Traversable t, Monad f) => t (f a, b) -> f (t (b, a)) |
2020-11-26 08:49:12 +0100 | <dminuoso> | Oh, no. Actually traverse sequence right |
2020-11-26 08:50:07 +0100 | <jle`> | traverse (sequence . swap . swap) |
2020-11-26 08:50:28 +0100 | <dminuoso> | :) |
2020-11-26 08:50:33 +0100 | gioyik | (~gioyik@186.118.238.251) (Quit: WeeChat 3.0) |
2020-11-26 08:51:26 +0100 | robotmay | (~beepboop@80.172.187.81.in-addr.arpa) (Remote host closed the connection) |
2020-11-26 08:51:40 +0100 | <dminuoso> | traverse (sequence . swap . flip const id . swap) |
2020-11-26 08:52:15 +0100 | <dminuoso> | Bet hlint cant figure that one out. |
2020-11-26 08:52:33 +0100 | <koz_> | :t flip const id |
2020-11-26 08:52:34 +0100 | <lambdabot> | c -> c |
2020-11-26 08:52:39 +0100 | <koz_> | Lol. |
2020-11-26 08:52:55 +0100 | <jle`> | :t const id () |
2020-11-26 08:52:56 +0100 | <lambdabot> | a -> a |
2020-11-26 08:53:47 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2020-11-26 08:54:02 +0100 | <incertia> | i had to think about flip const id for a bit |
2020-11-26 08:54:22 +0100 | <dminuoso> | Well you can put something more interesting into `id`, that is better for tripping you up |
2020-11-26 08:54:25 +0100 | <dminuoso> | like `flip const fmap` |
2020-11-26 08:54:48 +0100 | <jle`> | :t const id id |
2020-11-26 08:54:49 +0100 | <lambdabot> | a -> a |
2020-11-26 08:54:58 +0100 | robotmay | (~beepboop@2001:8b0:7af0:2580:888:72a9:4a8e:aea0) |
2020-11-26 08:55:04 +0100 | <dminuoso> | % :t flip const fmap |
2020-11-26 08:55:05 +0100 | <yahb> | dminuoso: ; <interactive>:1:12: error:; * Ambiguous type variable `f0' arising from a use of `fmap'; prevents the constraint `(Functor f0)' from being solved.; Probable fix: use a type annotation to specify what `f0' should be.; These potential instances exist:; instance [safe] forall a. Functor (Q.Fun a) -- Defined in `Test.QuickCheck.Function'; instance [safe] Functor Q.Gen |
2020-11-26 08:55:12 +0100 | <dminuoso> | Oh. wait what? |
2020-11-26 08:55:20 +0100 | <jle`> | it doesn't know what Functor instance to compile there |
2020-11-26 08:55:31 +0100 | <jle`> | :t flip const map |
2020-11-26 08:55:33 +0100 | <lambdabot> | c -> c |
2020-11-26 08:55:46 +0100 | <dminuoso> | Oh I guess this would need impredicative types? |
2020-11-26 08:56:01 +0100 | <incertia> | asheshambasta: i would imagine it wouldn't get traced if dEitherPlant is Left |
2020-11-26 08:56:08 +0100 | <dminuoso> | yeah `flip const map` it is |
2020-11-26 08:56:15 +0100 | sdx23 | (~sdx23@unaffiliated/sdx23) |
2020-11-26 08:56:16 +0100 | <incertia> | could be wrong here |
2020-11-26 08:56:18 +0100 | <jle`> | flip const map itself only works because of defaulting i think |
2020-11-26 08:56:30 +0100 | <dminuoso> | Why defaulting? |
2020-11-26 08:56:33 +0100 | <dminuoso> | % :t flip const |
2020-11-26 08:56:34 +0100 | <yahb> | dminuoso: forall {b} {c}. b -> c -> c |
2020-11-26 08:56:43 +0100 | <jle`> | because it defaults to map :: (() -> ()) -> [()] -> [()] |
2020-11-26 08:56:44 +0100 | raichoo | (~raichoo@dslb-092-073-219-149.092.073.pools.vodafone-ip.de) |
2020-11-26 08:56:58 +0100 | <jle`> | otherwise it wouldn't know what to pick for a and b |
2020-11-26 08:56:59 +0100 | <jle`> | :t map |
2020-11-26 08:57:00 +0100 | <dminuoso> | Ah, I see. Otherwise that would have required impredicativity |
2020-11-26 08:57:01 +0100 | <lambdabot> | (a -> b) -> [a] -> [b] |
2020-11-26 08:57:26 +0100 | <incertia> | in particular if any of eName or eDayPlanted are Left it would cause fst <$> maints/snd <$> maints to not be evaluated and thus not trigger the traceEvent |
2020-11-26 08:57:28 +0100 | <incertia> | but im no guru |
2020-11-26 08:57:34 +0100 | <jle`> | there should be defaulting for * -> *'s |
2020-11-26 08:57:53 +0100 | Varis | (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
2020-11-26 08:58:00 +0100 | <dminuoso> | You should open an issue on gitlab about that. Name `flip const fmap` as the motivating example. |
2020-11-26 08:58:12 +0100 | dminuoso | smiles |
2020-11-26 08:58:13 +0100 | <jle`> | bites me every day :) |
2020-11-26 08:58:24 +0100 | <jle`> | i wonder what the default should be |
2020-11-26 08:58:34 +0100 | <jle`> | maybe Identity first? |
2020-11-26 08:58:41 +0100 | <jle`> | or maybe Proxy |
2020-11-26 08:58:48 +0100 | <jle`> | ah yeah, Proxy first, then Identity |
2020-11-26 08:59:17 +0100 | <jle`> | this would be my dream haskell |
2020-11-26 08:59:54 +0100 | <incertia> | when i learned about Proxy my entire world changed |
2020-11-26 08:59:57 +0100 | <koz_> | :t flip const map |
2020-11-26 08:59:59 +0100 | <lambdabot> | c -> c |
2020-11-26 09:00:03 +0100 | <koz_> | LOL |
2020-11-26 09:00:18 +0100 | cfricke | (~cfricke@unaffiliated/cfricke) |
2020-11-26 09:00:26 +0100 | <dminuoso> | I think I should get three points for tripping koz_ up twice in a row. |
2020-11-26 09:00:40 +0100 | <incertia> | that and DataKinds |
2020-11-26 09:00:46 +0100 | <incertia> | it's so galaxy brained |
2020-11-26 09:00:59 +0100 | <xerox_> | % :t flip const unsafePerformIO |
2020-11-26 09:00:59 +0100 | <yahb> | xerox_: forall {c}. c -> c |
2020-11-26 09:01:07 +0100 | <koz_> | incertia: Type :: Type is the real galaxy brain idea. |
2020-11-26 09:01:19 +0100 | <dminuoso> | xerox_: Oh I have an idea. |
2020-11-26 09:01:24 +0100 | <dminuoso> | flip const unsafeCoerce |
2020-11-26 09:01:35 +0100 | <koz_> | :t flip const unsafeCoerce |
2020-11-26 09:01:37 +0100 | <lambdabot> | error: Variable not in scope: unsafeCoerce |
2020-11-26 09:01:46 +0100 | acowley | (~acowley@c-68-83-22-43.hsd1.nj.comcast.net) (Read error: Connection reset by peer) |
2020-11-26 09:01:47 +0100 | <dminuoso> | % import Unsafe.Coerce |
2020-11-26 09:01:47 +0100 | <yahb> | dminuoso: |
2020-11-26 09:01:52 +0100 | <dminuoso> | % :t flip const unsafeCoerce |
2020-11-26 09:01:52 +0100 | <yahb> | dminuoso: forall {c}. c -> c |
2020-11-26 09:01:55 +0100 | <dminuoso> | This looks really dangerous. |
2020-11-26 09:02:17 +0100 | Varis | (~Tadas@unaffiliated/varis) |
2020-11-26 09:02:28 +0100 | <jle`> | `flip const unsafeCoerce` is pretty much the same as `unsafeCoerce`, ironically |
2020-11-26 09:02:33 +0100 | <jle`> | just with a more specialized type |
2020-11-26 09:02:42 +0100 | <dminuoso> | Okay enough of flip const. What other elaborate ways of doing.. nothing can you think of? |
2020-11-26 09:02:50 +0100 | vg | (~vg@139.59.59.230) (Quit: vg) |
2020-11-26 09:03:01 +0100 | <jle`> | % map ($ 10) [unsafeCoerce, flip const unsafeCoerce] |
2020-11-26 09:03:01 +0100 | <koz_> | dminuoso: fmap id |
2020-11-26 09:03:01 +0100 | <yahb> | jle`: ; <interactive>:92:1: error:; Ambiguous occurrence `map'; It could refer to; either `Data.List.NonEmpty.map', imported from `Data.List.NonEmpty'; or `Prelude.map', imported from `Prelude' (and originally defined in `GHC.Base') |
2020-11-26 09:03:06 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 09:03:10 +0100 | <jle`> | D: |
2020-11-26 09:03:15 +0100 | <koz_> | dimap id id also works |
2020-11-26 09:03:16 +0100 | <jle`> | % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce] |
2020-11-26 09:03:17 +0100 | <yahb> | jle`: [10,10] |
2020-11-26 09:03:28 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 09:03:28 +0100 | <dminuoso> | koz_: well those are very obvious |
2020-11-26 09:03:28 +0100 | <jle`> | koz_: you mean dimap id id id |
2020-11-26 09:03:38 +0100 | <koz_> | jle`: Rofl. |
2020-11-26 09:03:38 +0100 | <dminuoso> | `dimap id id id` is slightly more running |
2020-11-26 09:03:43 +0100 | <dminuoso> | cunning. |
2020-11-26 09:03:44 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 09:03:47 +0100 | <jle`> | dimap id id wouldn't work i think |
2020-11-26 09:03:54 +0100 | <jle`> | % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce, dimap id id id] |
2020-11-26 09:03:54 +0100 | <yahb> | jle`: [10,10,10] |
2020-11-26 09:04:08 +0100 | vg | (~vg@139.59.59.230) (Client Quit) |
2020-11-26 09:04:20 +0100 | <jle`> | % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce, dimap id id id, const 10] |
2020-11-26 09:04:20 +0100 | <yahb> | jle`: [10,10,10,10] |
2020-11-26 09:04:28 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 09:05:13 +0100 | <incertia> | const 10 the big brain id |
2020-11-26 09:05:30 +0100 | <dminuoso> | % :t fix ($) |
2020-11-26 09:05:31 +0100 | <yahb> | dminuoso: forall {a} {b}. a -> b |
2020-11-26 09:05:33 +0100 | <dminuoso> | Mmm. |
2020-11-26 09:05:42 +0100 | acowley | (~acowley@c-68-83-22-43.hsd1.nj.comcast.net) |
2020-11-26 09:05:54 +0100 | Guest77209 | (5fa448e7@95.164.72.231) (Ping timeout: 245 seconds) |
2020-11-26 09:06:10 +0100 | <jle`> | how to heat up a CPU |
2020-11-26 09:06:34 +0100 | <dminuoso> | Yeah. Who said pure code didn't have side effects. |
2020-11-26 09:07:00 +0100 | <incertia> | oh god you can't even C-c out of it |
2020-11-26 09:07:23 +0100 | <incertia> | that's so cursed |
2020-11-26 09:07:30 +0100 | <koz_> | LOL |
2020-11-26 09:07:47 +0100 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) |
2020-11-26 09:07:58 +0100 | <jle`> | % fix($)fix |
2020-11-26 09:08:03 +0100 | <yahb> | jle`: [Timed out] |
2020-11-26 09:08:43 +0100 | <dminuoso> | :t fix (const fix) |
2020-11-26 09:08:44 +0100 | <lambdabot> | (a -> a) -> a |
2020-11-26 09:08:51 +0100 | <dminuoso> | Okay that looks like something now |
2020-11-26 09:09:49 +0100 | <dminuoso> | % fix (const fix) $ \t -> (1, fst t + 1) |
2020-11-26 09:09:49 +0100 | <yahb> | dminuoso: (1,2) |
2020-11-26 09:09:58 +0100 | <dminuoso> | Great. So we have a more elaborate way of doing fix |
2020-11-26 09:09:58 +0100 | vg | (~vg@139.59.59.230) (Quit: vg) |
2020-11-26 09:10:11 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 09:10:40 +0100 | <n0042> | I'd like to take a moment to applaud whoever decided to name the Vector function `snoc`. |
2020-11-26 09:10:41 +0100 | alp | (~alp@2a01:e0a:58b:4920:9554:f534:a35:4872) |
2020-11-26 09:10:45 +0100 | vg | (~vg@139.59.59.230) (Client Quit) |
2020-11-26 09:10:49 +0100 | <n0042> | That is pretty swell. |
2020-11-26 09:10:59 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 09:11:04 +0100 | <dminuoso> | n0042: snoc is just cons in reverse |
2020-11-26 09:11:09 +0100 | <n0042> | Exactly |
2020-11-26 09:11:12 +0100 | <jle`> | yeah, it's instantly understandable :) |
2020-11-26 09:11:12 +0100 | <koz_> | n0042: It's 100 IQ wordplay relative some of the stunts Edward pulls. |
2020-11-26 09:11:15 +0100 | <koz_> | :t confusing |
2020-11-26 09:11:16 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 09:11:17 +0100 | <lambdabot> | Applicative f => LensLike (Data.Functor.Day.Curried.Curried (Data.Functor.Yoneda.Yoneda f) (Data.Functor.Yoneda.Yoneda f)) s t a b -> LensLike f s t a b |
2020-11-26 09:11:32 +0100 | vg | (~vg@139.59.59.230) |
2020-11-26 09:11:35 +0100 | vg | (~vg@139.59.59.230) (Remote host closed the connection) |
2020-11-26 09:11:38 +0100 | <dminuoso> | koz_: Haha, it took me a year to get why confusing was called confusing |
2020-11-26 09:11:43 +0100 | <dminuoso> | Then it hit me |
2020-11-26 09:12:00 +0100 | <dminuoso> | lens is filled with so many puns |
2020-11-26 09:12:10 +0100 | <koz_> | Or, alternatively, Joker and Clown. |
2020-11-26 09:12:17 +0100 | <koz_> | (that's actually a two-level reference) |
2020-11-26 09:12:56 +0100 | <dminuoso> | Well if you dont know Stealers Wheels |
2020-11-26 09:13:30 +0100 | <dminuoso> | The curious thing though is |
2020-11-26 09:13:34 +0100 | <dminuoso> | % :t const fix |
2020-11-26 09:13:34 +0100 | <yahb> | dminuoso: b -> (a -> a) -> a |
2020-11-26 09:13:36 +0100 | <dminuoso> | % :t fix |
2020-11-26 09:13:37 +0100 | <yahb> | dminuoso: (a -> a) -> a |
2020-11-26 09:13:44 +0100 | Lord_of_Life | (~Lord@46.217.221.184) (Changing host) |
2020-11-26 09:13:44 +0100 | Lord_of_Life | (~Lord@unaffiliated/lord-of-life/x-0885362) |
2020-11-26 09:13:52 +0100 | <dminuoso> | Ah I guess `b ~ (a -> a) -> a` |
2020-11-26 09:14:38 +0100 | cole-h | (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 265 seconds) |
2020-11-26 09:14:44 +0100 | <jle`> | fix (const x) = x |
2020-11-26 09:14:50 +0100 | <jle`> | % fix (const "hello") |
2020-11-26 09:14:50 +0100 | <yahb> | jle`: "hello" |
2020-11-26 09:15:11 +0100 | <dminuoso> | % :t fix . const |
2020-11-26 09:15:11 +0100 | <yahb> | dminuoso: c -> c |
2020-11-26 09:15:13 +0100 | <dminuoso> | There we go! |
2020-11-26 09:15:20 +0100 | <jle`> | neato |
2020-11-26 09:15:48 +0100 | <jle`> | % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce, dimap id id id, const 10, fix . const] |
2020-11-26 09:15:48 +0100 | <yahb> | jle`: [10,10,10,10,10] |
2020-11-26 09:15:54 +0100 | dhouthoo | (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) |
2020-11-26 09:16:10 +0100 | chkno | (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
2020-11-26 09:16:19 +0100 | chkno | (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 09:16:20 +0100 | <koz_> | Procrastination a la #haskell. |
2020-11-26 09:17:18 +0100 | <aplainzetakind> | I'm trying get a handle on conditional compilation with cabal flags by means of an over-architectured advent of code project: https://gist.github.com/aplainzetakind/ba5b0fa3af4ef7f3deec77c5e025b746 trying to build this, cabal tells me this module imports itself. Why does this happen? (Removing CPP and commenting out ifdefs works fine.) |
2020-11-26 09:17:39 +0100 | <jle`> | woo hoo, over-architected advent of code projects |
2020-11-26 09:18:18 +0100 | <jophish> | No semigroup instance for Product :( |
2020-11-26 09:18:24 +0100 | <jophish> | (Data.Functor.Product.Product) |
2020-11-26 09:18:29 +0100 | <koz_> | jle` is uniquely qualified to talk about this! |
2020-11-26 09:18:34 +0100 | <koz_> | jophish: I think you want a different Product. |
2020-11-26 09:18:45 +0100 | <jophish> | koz_: I do? |
2020-11-26 09:18:52 +0100 | <jophish> | thank you |
2020-11-26 09:19:07 +0100 | <koz_> | jophish: I _assume_ you're after the monoid (*, 1)? |
2020-11-26 09:19:28 +0100 | <jophish> | nope, in fact I'm quite sure that one has a semigroup instance!!! |
2020-11-26 09:19:41 +0100 | <dminuoso> | What would the implementation be? |
2020-11-26 09:19:45 +0100 | <koz_> | OK, well, I'm unsure what instance you're expecting this one to have. |
2020-11-26 09:19:52 +0100 | <jophish> | Pair a1 b1 <> Pair a2 b2 = Pair (a1 <> a2) (b1 <> b2) |
2020-11-26 09:20:03 +0100 | <jle`> | Pair x1 y1 <> Pair x2 y2 = Pair (x1 <> x2) (y1 <> y2) |
2020-11-26 09:20:09 +0100 | <jle`> | ah beat me to it |
2020-11-26 09:20:13 +0100 | <koz_> | Jinx! |
2020-11-26 09:20:15 +0100 | <jophish> | you typed it very fast! |
2020-11-26 09:20:44 +0100 | <dminuoso> | Probably forgotten then? Make a merge request . |
2020-11-26 09:20:49 +0100 | <jle`> | yeah, there should really be one |
2020-11-26 09:21:09 +0100 | <dminuoso> | (MonadZip f, MonadZip g) => MonadZip (Product f g) |
2020-11-26 09:21:32 +0100 | <jle`> | i think there is the approriate Alt instance |
2020-11-26 09:21:33 +0100 | koz_ | wishes it was ApplicativeZip |
2020-11-26 09:21:55 +0100 | <dminuoso> | Together with ApplicativeComprehensions? |
2020-11-26 09:22:31 +0100 | <koz_> | dminuoso: This. |
2020-11-26 09:22:40 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 09:23:10 +0100 | <jle`> | jophish: if it matches the specific behavior you want, you can try using Ap as a wrapper |
2020-11-26 09:23:36 +0100 | <dminuoso> | koz_: To be fair, I recently started longing for caseS |
2020-11-26 09:23:45 +0100 | <dminuoso> | Which I think fits in that hole |
2020-11-26 09:23:53 +0100 | <koz_> | caseS? |
2020-11-26 09:24:03 +0100 | <dminuoso> | selective case-of |
2020-11-26 09:24:13 +0100 | <koz_> | dminuoso: I don't follow, sorry. |
2020-11-26 09:24:28 +0100 | <dminuoso> | koz_: a selective functor equivalent for do-notation |
2020-11-26 09:25:28 +0100 | <koz_> | Wait, that's a thing? |
2020-11-26 09:25:32 +0100 | <dminuoso> | No |
2020-11-26 09:25:33 +0100 | <dminuoso> | branch :: Selective f => f (Either a b) -> f (a -> c) -> f (b -> c) -> f c |
2020-11-26 09:25:48 +0100 | <dminuoso> | So sort of cross between `branch` and `case-of` |
2020-11-26 09:26:29 +0100 | <dminuoso> | https://gist.github.com/dminuoso/7acab978112cc0f0a7f0288bd87d3378 you can write this currently |
2020-11-26 09:26:57 +0100 | <koz_> | Huh, interesting. |
2020-11-26 09:27:35 +0100 | <dminuoso> | But it only works for a+b and its hard to composable |
2020-11-26 09:27:44 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
2020-11-26 09:28:20 +0100 | <koz_> | How would you generalize that beyond Either though? |
2020-11-26 09:28:23 +0100 | michalz | (~user@185.246.204.47) |
2020-11-26 09:28:25 +0100 | <koz_> | I don't think you can really. |
2020-11-26 09:28:45 +0100 | monochrom | (trebla@216.138.220.146) (Ping timeout: 240 seconds) |
2020-11-26 09:29:20 +0100 | <dminuoso> | I think you could write a version of `branch` that works with generics |
2020-11-26 09:29:47 +0100 | <dminuoso> | over arbitrary sum types |
2020-11-26 09:30:20 +0100 | <koz_> | gbranch |
2020-11-26 09:30:32 +0100 | borne | (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de) |
2020-11-26 09:30:40 +0100 | Fractalis | (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) |
2020-11-26 09:30:47 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
2020-11-26 09:32:23 +0100 | <jophish> | jle`: you think I'm made of Applicative instances?! |
2020-11-26 09:33:18 +0100 | Fractalis | (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Client Quit) |
2020-11-26 09:33:29 +0100 | <n0042> | =$ |
2020-11-26 09:34:21 +0100 | <koz_> | jophish: I sure am. |
2020-11-26 09:37:06 +0100 | <jophish> | :D |
2020-11-26 09:38:52 +0100 | chele | (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) |
2020-11-26 09:43:18 +0100 | gproto23 | (~gproto23@unaffiliated/gproto23) (Ping timeout: 272 seconds) |
2020-11-26 09:44:01 +0100 | hackage | typson-esqueleto 0.1.0.0 - Typson Esqueleto Integration https://hackage.haskell.org/package/typson-esqueleto-0.1.0.0 (aaronallen8455) |
2020-11-26 09:46:09 +0100 | gproto23 | (~gproto23@unaffiliated/gproto23) |
2020-11-26 09:50:03 +0100 | centril | (~centril@213-66-146-92-no250.tbcn.telia.com) (Ping timeout: 256 seconds) |
2020-11-26 09:50:58 +0100 | kritzefitz | (~kritzefit@fw-front.credativ.com) |
2020-11-26 09:54:20 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 09:55:50 +0100 | Boomerang_ | (~Boomerang@xd520f68c.cust.hiper.dk) |
2020-11-26 09:56:57 +0100 | jonatanb | (jonatanb@gateway/vpn/protonvpn/jonatanb) |
2020-11-26 09:58:06 +0100 | jonatanb | (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
2020-11-26 09:58:37 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
2020-11-26 10:01:36 +0100 | Sheilong | (uid293653@gateway/web/irccloud.com/x-bojsghgzllzoprwv) (Quit: Connection closed for inactivity) |
2020-11-26 10:03:39 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 10:04:35 +0100 | centril | (~centril@213-66-146-92-no250.tbcn.telia.com) |
2020-11-26 10:07:35 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
2020-11-26 10:07:43 +0100 | adm_ | (~adm@43.229.89.234) (Ping timeout: 246 seconds) |
2020-11-26 10:10:17 +0100 | wonko7 | (~wonko7@2a01:e35:2ffb:7040:55f1:c3a3:cdbe:bf52) |
2020-11-26 10:10:29 +0100 | bifunc2 | (bifunc2@gateway/vpn/protonvpn/bifunc2) |
2020-11-26 10:11:07 +0100 | <bifunc2> | What are some popular ways to create fixed-length containers, where the length is fixed in the type? |
2020-11-26 10:11:10 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
2020-11-26 10:12:07 +0100 | <dminuoso> | There really aren't any. |
2020-11-26 10:12:11 +0100 | <[exa]> | bifunc2: like this? https://hackage.haskell.org/package/fixed-vector |
2020-11-26 10:12:33 +0100 | <dminuoso> | (By that I mean they aren't very popular) |
2020-11-26 10:12:43 +0100 | <[exa]> | yeah that's very true |
2020-11-26 10:12:54 +0100 | <bifunc2> | why are they not popular? |
2020-11-26 10:13:13 +0100 | <bifunc2> | btw is this related to dependent types? i heard dependent types are not yet in haskell, at all |
2020-11-26 10:13:15 +0100 | <[exa]> | once you get the sizes into the typesystem, everyone starts to demand more "smart" operations from it, and you end up requiring dependent types |
2020-11-26 10:13:17 +0100 | <dminuoso> | This takes you straight into dependent typing |
2020-11-26 10:13:18 +0100 | <[exa]> | which is hard |
2020-11-26 10:14:28 +0100 | <bifunc2> | ok maybe it's best for now to assert equal lengths at runtime |
2020-11-26 10:15:33 +0100 | <[exa]> | bifunc2: making runtime fail as soon as possible on detected error usually gives a good assurance that the handling is right, esp. if you have at least a single automated integration test |
2020-11-26 10:16:21 +0100 | dyeplexer | (~lol@unaffiliated/terpin) |
2020-11-26 10:17:38 +0100 | <[exa]> | the other approach is to write the code so that the error is not representable, e.g. make a tiny layer that always handles the sizes right™ and build upon it |
2020-11-26 10:18:01 +0100 | st8less | (~st8less@2603:a060:11fd:0:e465:6770:e76d:da2a) (Ping timeout: 272 seconds) |
2020-11-26 10:19:35 +0100 | st8less | (~st8less@inet-167-224-197-181.isp.ozarksgo.net) |
2020-11-26 10:27:05 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2020-11-26 10:28:35 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds) |
2020-11-26 10:28:43 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 10:30:02 +0100 | thc202 | (~thc202@unaffiliated/thc202) |
2020-11-26 10:33:08 +0100 | plutoniix | (~q@ppp-223-24-94-50.revip6.asianet.co.th) (Quit: Leaving) |
2020-11-26 10:34:17 +0100 | kuribas | (~user@ptr-25vy0i7d0jyf2exvnea.18120a2.ip6.access.telenet.be) |
2020-11-26 10:37:02 +0100 | fendor | (~fendor@178.165.131.166.wireless.dyn.drei.com) |
2020-11-26 10:38:41 +0100 | supercoven | (~Supercove@196.244.192.54) |
2020-11-26 10:38:42 +0100 | supercoven | (~Supercove@196.244.192.54) (Max SendQ exceeded) |
2020-11-26 10:38:56 +0100 | supercoven | (~Supercove@196.244.192.54) |
2020-11-26 10:38:57 +0100 | supercoven | (~Supercove@196.244.192.54) (Max SendQ exceeded) |
2020-11-26 10:39:11 +0100 | supercoven | (~Supercove@196.244.192.54) |
2020-11-26 10:39:12 +0100 | supercoven | (~Supercove@196.244.192.54) (Max SendQ exceeded) |
2020-11-26 10:39:26 +0100 | supercoven | (~Supercove@196.244.192.54) |
2020-11-26 10:39:27 +0100 | supercoven | (~Supercove@196.244.192.54) (Max SendQ exceeded) |
2020-11-26 10:39:41 +0100 | supercoven | (~Supercove@196.244.192.54) |
2020-11-26 10:39:42 +0100 | supercoven | (~Supercove@196.244.192.54) (Max SendQ exceeded) |
2020-11-26 10:43:34 +0100 | invaser | (~Thunderbi@31.148.23.125) (Ping timeout: 265 seconds) |
2020-11-26 10:46:44 +0100 | Boomerang_ | (~Boomerang@xd520f68c.cust.hiper.dk) (Quit: Leaving) |
2020-11-26 10:46:55 +0100 | michalz | (~user@185.246.204.47) (Read error: Connection reset by peer) |
2020-11-26 10:50:12 +0100 | <merijn> | dminuoso: Yes there are, sized Vector :) |
2020-11-26 10:50:30 +0100 | <merijn> | https://hackage.haskell.org/package/vector-sized is pretty great |
2020-11-26 10:52:52 +0100 | <dminuoso> | https://packdeps.haskellers.com/reverse/vector-sized |
2020-11-26 10:52:54 +0100 | <dminuoso> | yes, very popular. |
2020-11-26 10:52:55 +0100 | hnOsmium0001 | (uid453710@gateway/web/irccloud.com/x-kfwargodivspffqj) (Quit: Connection closed for inactivity) |
2020-11-26 10:52:55 +0100 | michalz | (~user@185.246.204.61) |
2020-11-26 10:55:21 +0100 | tsrt^ | (tsrt@ip98-184-89-2.mc.at.cox.net) () |
2020-11-26 10:56:00 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 10:56:19 +0100 | michalz | (~user@185.246.204.61) (Read error: Connection reset by peer) |
2020-11-26 10:57:52 +0100 | <dminuoso> | Also, vector-sized has a very defty dependency footprint |
2020-11-26 10:57:59 +0100 | <dminuoso> | Since it pulls in adjunctions |
2020-11-26 10:58:59 +0100 | exlipse | (~exlipse@4e69b241.skybroadband.com) |
2020-11-26 10:59:05 +0100 | <dminuoso> | And that gives you half the kmettiverse |
2020-11-26 10:59:28 +0100 | <dminuoso> | Anyway. They asked for "popular" not "great" |
2020-11-26 11:00:49 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds) |
2020-11-26 11:01:25 +0100 | <merijn> | dminuoso: packdeps only lists stuff on hackage, though |
2020-11-26 11:01:34 +0100 | <merijn> | I use it in a bunch of code that's not on hackage |
2020-11-26 11:01:59 +0100 | monochrom | (trebla@216.138.220.146) |
2020-11-26 11:02:32 +0100 | <dminuoso> | Sure, but it's not like there's gonna be incredible widespread usage of a package everywhere except hackage |
2020-11-26 11:02:47 +0100 | <dminuoso> | Think it's a good indicator to answer "popularity" |
2020-11-26 11:03:21 +0100 | Yumasi | (~guillaume@2a01cb09b06b29ea391191835a81a7a2.ipv6.abo.wanadoo.fr) |
2020-11-26 11:03:49 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving) |
2020-11-26 11:06:06 +0100 | perry69420 | (6ee39737@110.227.151.55) |
2020-11-26 11:06:13 +0100 | ski | (~ski@nc-2504-30.studat.chalmers.se) (Ping timeout: 264 seconds) |
2020-11-26 11:07:51 +0100 | nopf | (~frosch@static.179.17.76.144.clients.your-server.de) (Remote host closed the connection) |
2020-11-26 11:08:44 +0100 | erisco | (~erisco@d24-57-249-233.home.cgocable.net) (Remote host closed the connection) |
2020-11-26 11:09:05 +0100 | ski | (~ski@nc-2504-30.studat.chalmers.se) |
2020-11-26 11:10:12 +0100 | invaser | (~Thunderbi@31.148.23.125) |
2020-11-26 11:10:32 +0100 | guest1126 | (~user@49.5.6.87) (Quit: ERC (IRC client for Emacs 27.1)) |
2020-11-26 11:15:06 +0100 | ubert | (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) |
2020-11-26 11:15:09 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 11:23:47 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 11:29:01 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds) |
2020-11-26 11:30:21 +0100 | michalz | (~user@185.246.204.47) |
2020-11-26 11:34:02 +0100 | Ariakenom_ | (~Ariakenom@h-158-174-186-195.NA.cust.bahnhof.se) |
2020-11-26 11:36:28 +0100 | subttle | (~anonymous@unaffiliated/subttle) |
2020-11-26 11:38:01 +0100 | Ariakenom__ | (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Ping timeout: 264 seconds) |
2020-11-26 11:39:30 +0100 | hackage | hspec-slow 0.2.0.1 - Find slow test cases https://hackage.haskell.org/package/hspec-slow-0.2.0.1 (Jappie) |
2020-11-26 11:43:12 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 11:44:08 +0100 | Ariakenom__ | (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) |
2020-11-26 11:46:12 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving) |
2020-11-26 11:47:02 +0100 | DavidEichmann | (~david@62.110.198.146.dyn.plus.net) |
2020-11-26 11:47:16 +0100 | Ariakenom_ | (~Ariakenom@h-158-174-186-195.NA.cust.bahnhof.se) (Ping timeout: 240 seconds) |
2020-11-26 11:50:42 +0100 | Stanley00 | (~stanley00@unaffiliated/stanley00) (Remote host closed the connection) |
2020-11-26 11:54:22 +0100 | danso | (~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9) |
2020-11-26 12:00:01 +0100 | adm_ | (~adm@43.229.89.234) (Remote host closed the connection) |
2020-11-26 12:01:14 +0100 | boxscape | (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) |
2020-11-26 12:01:33 +0100 | BugzOOO | Neuromancer |
2020-11-26 12:03:29 +0100 | <boxscape> | Hm, the `data X = forall a . MkX (Y a)` encoding is usually preferred for existentials over the `forall r . (forall a . Y a -> r) -> r` encoding, right? I'm asking because I just wrote something fairly simple where the first one seems more verbose, but I guess maybe it becomes easier to keep track of things with the first encoding as your what |
2020-11-26 12:03:30 +0100 | <boxscape> | you're doing gets more complex? |
2020-11-26 12:07:29 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 12:08:13 +0100 | alp | (~alp@2a01:e0a:58b:4920:9554:f534:a35:4872) (Ping timeout: 272 seconds) |
2020-11-26 12:10:18 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 12:11:45 +0100 | <merijn> | boxscape: I usually prefer writing existentials as GADTs, because it looks cleaner |
2020-11-26 12:12:17 +0100 | <boxscape> | merijn so that would be effectively the same as the first encoding but with GADT syntax? |
2020-11-26 12:13:11 +0100 | Alleria_ | (~AllahuAkb@2604:2000:1484:26:f085:e9f5:38cf:432d) |
2020-11-26 12:14:58 +0100 | adm_ | (~adm@43.229.89.234) (Ping timeout: 260 seconds) |
2020-11-26 12:15:28 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
2020-11-26 12:16:27 +0100 | _Alleria | (~AllahuAkb@2604:2000:1484:26:b060:c081:3394:137) (Ping timeout: 260 seconds) |
2020-11-26 12:17:18 +0100 | phaul | (~phaul@ruby/staff/phaul) (Ping timeout: 260 seconds) |
2020-11-26 12:17:28 +0100 | fendor | (~fendor@178.165.131.166.wireless.dyn.drei.com) (Read error: Connection reset by peer) |
2020-11-26 12:17:48 +0100 | phaul | (~phaul@ruby/staff/phaul) |
2020-11-26 12:18:31 +0100 | hackage | phonetic-languages-constraints 0.4.0.0 - Constraints to filter the needed permutations https://hackage.haskell.org/package/phonetic-languages-constraints-0.4.0.0 (OleksandrZhabenko) |
2020-11-26 12:19:31 +0100 | hackage | postgresql-binary 0.12.3.2 - Encoders and decoders for the PostgreSQL's binary format https://hackage.haskell.org/package/postgresql-binary-0.12.3.2 (NikitaVolkov) |
2020-11-26 12:20:22 +0100 | <tomsmeding> | boxscape: you can convert the existentials method to the CPS method, but not the other way round |
2020-11-26 12:20:48 +0100 | carlomagno1 | (~cararell@148.87.23.6) (Remote host closed the connection) |
2020-11-26 12:20:50 +0100 | <tomsmeding> | that is to say: given a function that returns an existential with the X method, you can use it in a context that uses the Y method for existentials |
2020-11-26 12:21:01 +0100 | hackage | postgresql-binary 0.12.3.3 - Encoders and decoders for the PostgreSQL's binary format https://hackage.haskell.org/package/postgresql-binary-0.12.3.3 (NikitaVolkov) |
2020-11-26 12:21:12 +0100 | <tomsmeding> | but if you have a function in CPS form using Y, then you can't use it in a function that wants to return an X-style existential |
2020-11-26 12:21:19 +0100 | <tomsmeding> | at least, that's my experience :p |
2020-11-26 12:21:29 +0100 | <tomsmeding> | which makes me prefer X, despite its additional verbosity |
2020-11-26 12:21:43 +0100 | <boxscape> | hm, I see, interesting |
2020-11-26 12:21:53 +0100 | <dminuoso> | I guess CPS style fuses better? |
2020-11-26 12:22:39 +0100 | <dminuoso> | Also it's a little less annoying if you pass things around, since you dont need to constantly wrap/rewrap your thing |
2020-11-26 12:23:29 +0100 | <boxscape> | yeah, that makes sense |
2020-11-26 12:24:45 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 12:25:50 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
2020-11-26 12:26:06 +0100 | <dminuoso> | 12:21:12 tomsmeding | but if you have a function in CPS form using Y, then you can't use it in a function that wants to return an X-style existential |
2020-11-26 12:26:09 +0100 | <dminuoso> | Can you elaborate? |
2020-11-26 12:26:23 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) |
2020-11-26 12:27:01 +0100 | <tomsmeding> | I haven't proven anything, just what I empirically found |
2020-11-26 12:27:05 +0100 | <dminuoso> | If you have `f :: forall r. (forall a . Y a -> r) -> r; then you can just do `f MkX` to get back into the X representation |
2020-11-26 12:27:07 +0100 | <dminuoso> | No? |
2020-11-26 12:27:14 +0100 | <tomsmeding> | wait |
2020-11-26 12:27:28 +0100 | <tomsmeding> | I'm dumb |
2020-11-26 12:27:29 +0100 | <tomsmeding> | yes |
2020-11-26 12:27:51 +0100 | <tomsmeding> | thank you |
2020-11-26 12:27:55 +0100 | <boxscape> | oh yeah that does work |
2020-11-26 12:28:49 +0100 | Sgeo | (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer) |
2020-11-26 12:29:36 +0100 | adm_ | (~adm@43.229.89.234) (Ping timeout: 240 seconds) |
2020-11-26 12:31:09 +0100 | carlomagno | (~cararell@148.87.23.11) |
2020-11-26 12:34:51 +0100 | domenkozar[m] | (domenkozar@NixOS/user/domenkozar) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | dominicusin[m] | (dominicusi@gateway/shell/matrix.org/x-qzmdyqsqeazfuaho) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | PotatoHatsue | (berbermanp@gateway/shell/matrix.org/x-libkhcmbrdqpqido) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | CRTified[m] | (schnecfkru@gateway/shell/matrix.org/x-eenugdcfqkikhazz) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | lnxw37d4 | (lnxw37d4ma@gateway/shell/matrix.org/x-gyetbkvikjbbsrrd) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | boistordu | (boistordum@gateway/shell/matrix.org/x-mdyiyodwbwwmjcwq) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | fgaz | (fgazmatrix@gateway/shell/matrix.org/x-ckdeidekxaxmbkrv) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | tersetears[m] | (tersetears@gateway/shell/matrix.org/x-yuvadosdugsnqrxf) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | psydruid | (psydruidma@gateway/shell/matrix.org/x-mpmiqxkbrlzaygik) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | jtojnar | (jtojnarmat@gateway/shell/matrix.org/x-ygesxqztjkwljyzz) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | sm[m] | (simonmicma@gateway/shell/matrix.org/x-kwpeizyjcphohngd) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | SlackIntegration | (slackbotma@gateway/shell/matrix.org/x-jwlsctxhtztxaioq) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | lambdaclan | (lambdaclan@gateway/shell/matrix.org/x-cunxvrjdwttunvim) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | johnnyboy[m] | (gifumatrix@gateway/shell/matrix.org/x-grtayloopdscsgus) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | unclechu | (unclechuma@gateway/shell/matrix.org/x-fmibtulmvlcrrtyt) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | themsay[m] | (themsaymat@gateway/shell/matrix.org/x-ijyhmdsdchceasci) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | hsiktas[m] | (hsiktasmat@gateway/shell/matrix.org/x-diupvlqwumdpqenf) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:51 +0100 | camlriot42 | (camlriotma@gateway/shell/matrix.org/x-iykqiffyqrfswvid) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:52 +0100 | chreekat[m] | (chreekatma@gateway/shell/matrix.org/x-qrurbafjmusxfuce) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:52 +0100 | psamim | (samimpmatr@gateway/shell/matrix.org/x-tqcirtqddpnlomkh) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:52 +0100 | ThaEwat | (thaewraptm@gateway/shell/matrix.org/x-eowhntdvamvdarxm) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:52 +0100 | ttc | (tomtauma1@gateway/shell/matrix.org/x-lgjugwvkytxobgef) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:53 +0100 | rab24ack[m] | (rab24ackma@gateway/shell/matrix.org/x-djastgiuyzrwwale) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:53 +0100 | loprakoa[m] | (loprakoama@gateway/shell/matrix.org/x-jggrqgksdtnpxwbo) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:53 +0100 | patier[m] | (patiermatr@gateway/shell/matrix.org/x-yjfgmheqbsrvyvho) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:53 +0100 | TekShifter[m] | (tekshifter@gateway/shell/matrix.org/x-cfzrvymgkwpsjlwz) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:55 +0100 | alephu5[m] | (alephu5mat@gateway/shell/matrix.org/x-iqqwqpszzorkjviq) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:55 +0100 | srid | (sridmatrix@gateway/shell/matrix.org/x-ddfumpcsdmsgnklz) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:59 +0100 | jlv | (jlvjustinl@gateway/shell/matrix.org/x-pkbhavgbkzlvwwnm) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:59 +0100 | berberman[T] | (berberma4@gateway/shell/matrix.org/x-gbdkkegajrsrxxkg) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:34:59 +0100 | jkaye[m] | (jkayematri@gateway/shell/matrix.org/x-xgtxrdifoozwqxqt) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:01 +0100 | rednaZ[m] | (r3dnazmatr@gateway/shell/matrix.org/x-ozioktnmvrvopylv) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:04 +0100 | aloiscochard[m] | (aloiscocha@gateway/shell/matrix.org/x-lbvqcwwuqmskblks) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:04 +0100 | kadoban | (kadobanmat@gateway/shell/matrix.org/x-ufwuzjufmgpbpvll) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:04 +0100 | jeffcasavant[m] | (jeffcasava@gateway/shell/matrix.org/x-javvwevsrvfabsjm) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:04 +0100 | pqwy[m] | (pqwymatrix@gateway/shell/matrix.org/x-qkyseftxctvdhmhh) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:04 +0100 | miseenplace[m] | (miseenplac@gateway/shell/matrix.org/x-wnnpqyuemudervxu) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:04 +0100 | jesser[m] | (jessermatr@gateway/shell/matrix.org/x-qvghulfnrarmvzsf) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:04 +0100 | zerstroyer[m] | (zerstroyer@gateway/shell/matrix.org/x-gegiretuusxprcab) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:04 +0100 | mikr[m] | (mikrdavral@gateway/shell/matrix.org/x-wijhaydyfjgkrnqd) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:05 +0100 | maralorn | (maralornma@gateway/shell/matrix.org/x-opsadexttgzjqxrr) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:06 +0100 | siraben | (sirabenmat@gateway/shell/matrix.org/x-kbzgfwlklcotpjnz) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:14 +0100 | theduke | (thedukem1@gateway/shell/matrix.org/x-fkzkadqaqklwkoxx) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:14 +0100 | ComaGrayce[m] | (commagrays@gateway/shell/matrix.org/x-hgvgmfuatspyagpw) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:14 +0100 | Noughtmare[m] | (naughtmare@gateway/shell/matrix.org/x-qinronskgvjuesgd) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:14 +0100 | iinuwa | (iinuwamatr@gateway/shell/matrix.org/x-nirgmkkuiglbzdym) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:14 +0100 | michaelpj | (michaelpjm@gateway/shell/matrix.org/x-bpqwjlstbvbemkvx) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:14 +0100 | Ericson2314 | (ericson231@gateway/shell/matrix.org/x-tegudoxxgcuckrrp) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:14 +0100 | Hanma[m] | (hanmamatri@gateway/shell/matrix.org/x-fchldacgfrgiwucu) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:15 +0100 | dyniec[m] | (dyniecmatr@gateway/shell/matrix.org/x-rvvlgbaxbtmzugej) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:16 +0100 | wi[m] | (w1gzmatrix@gateway/shell/matrix.org/x-ywaugiascvhtlbjk) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:16 +0100 | andreabedini[m] | (andreabedi@gateway/shell/matrix.org/x-qitqfbtrbfnzbcmu) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:16 +0100 | drozdziak1 | (drozdziak1@gateway/shell/matrix.org/x-vthisqiohgxugfqd) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:16 +0100 | alexfmpe | (alexfmpema@gateway/shell/matrix.org/x-uqlbdbsmgeiylcyi) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:16 +0100 | wanaks[m] | (wanaksmatr@gateway/shell/matrix.org/x-evkorzdwtetbvvid) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:17 +0100 | falling-edge[m] | (falling-ed@gateway/shell/matrix.org/x-ingloazughuslvcy) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 12:35:39 +0100 | jonatanb | (jonatanb@gateway/vpn/protonvpn/jonatanb) |
2020-11-26 12:36:55 +0100 | lambdabot | (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection) |
2020-11-26 12:37:02 +0100 | lambdabot | (~lambdabot@silicon.int-e.eu) |
2020-11-26 12:37:02 +0100 | lambdabot | (~lambdabot@silicon.int-e.eu) (Changing host) |
2020-11-26 12:37:02 +0100 | lambdabot | (~lambdabot@haskell/bot/lambdabot) |
2020-11-26 12:37:25 +0100 | nckx | (~nckx@tobias.gr) (Ping timeout: 264 seconds) |
2020-11-26 12:38:02 +0100 | nckx | (~nckx@tobias.gr) |
2020-11-26 12:38:25 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 12:38:29 +0100 | LKoen | (~LKoen@169.244.88.92.rev.sfr.net) |
2020-11-26 12:39:17 +0100 | <bifunc2> | [exa] vector-sized library seems to be working like magic |
2020-11-26 12:39:33 +0100 | <bifunc2> | so if all i need are fixed length vectors, this seems like the library to use |
2020-11-26 12:39:38 +0100 | <bifunc2> | seems quite popular too |
2020-11-26 12:40:03 +0100 | <bifunc2> | i no longer see a reason to use normal vector and do runtime asserts |
2020-11-26 12:40:38 +0100 | <dminuoso> | "quite popular" according to which metric? |
2020-11-26 12:40:48 +0100 | <dminuoso> | Anyway, popularity is not necessarily an indicator of quality |
2020-11-26 12:40:57 +0100 | <dminuoso> | An unpopular library can be of high quality, and popular libraries can be of low quality |
2020-11-26 12:41:03 +0100 | <maerwald> | 14k downloads |
2020-11-26 12:41:14 +0100 | <dminuoso> | That can easily mean it's a transitive dependency of some popular package |
2020-11-26 12:41:21 +0100 | <maerwald> | yes, that means the lib is popular |
2020-11-26 12:41:30 +0100 | <dminuoso> | Depends on how you look at it |
2020-11-26 12:41:51 +0100 | kindaro | (1f08e49d@h31-8-228-157.dyn.bashtel.ru) |
2020-11-26 12:41:58 +0100 | <maerwald> | it isn't all that complicated |
2020-11-26 12:42:01 +0100 | <dminuoso> | If a single popular package has vector-sized as a *transitive* dependency, is vector-sized popular? |
2020-11-26 12:42:04 +0100 | <dminuoso> | hard to say |
2020-11-26 12:42:13 +0100 | jeffcasavant[m] | (jeffcasava@gateway/shell/matrix.org/x-rmfoljfsgzwwaqzw) |
2020-11-26 12:42:25 +0100 | <dminuoso> | Id say popularity means a lot of people use your package as a direct dependency |
2020-11-26 12:42:27 +0100 | <dminuoso> | not transitive |
2020-11-26 12:42:46 +0100 | <kindaro> | Is there a file in `~/.cabal` that contains the list of all versions of all installed packages? |
2020-11-26 12:43:04 +0100 | <dminuoso> | Most people dont use ghc-prim, but everyone has it in their dependency tree. Is it a popular library? |
2020-11-26 12:43:05 +0100 | <kindaro> | Or, should I say, stored packages. |
2020-11-26 12:43:26 +0100 | adm_ | (~adm@43.229.89.234) (Remote host closed the connection) |
2020-11-26 12:43:43 +0100 | <maerwald> | dminuoso: 14k downloads is a pretty good indicator of popularity. If you think it isn't, you should probably bring up proof :) |
2020-11-26 12:44:12 +0100 | <dminuoso> | maerwald: https://packdeps.haskellers.com/reverse/vector-sized |
2020-11-26 12:44:27 +0100 | <maerwald> | packdeps isn't exhaustive |
2020-11-26 12:44:28 +0100 | <dminuoso> | 14 packages on hackage depend on it |
2020-11-26 12:44:30 +0100 | <dminuoso> | out of tha |
2020-11-26 12:44:32 +0100 | <dminuoso> | I only recognize 1. |
2020-11-26 12:44:39 +0100 | <dminuoso> | On the entire of hackage, only one package I recognize depends on it. |
2020-11-26 12:44:49 +0100 | <dminuoso> | That in my book makes it a very unpopular library |
2020-11-26 12:45:06 +0100 | plakband | (~plakband@113x43x242x146.ap113.ftth.arteria-hikari.net) |
2020-11-26 12:45:06 +0100 | <dminuoso> | Of course its not exhaustive, its an indicator. |
2020-11-26 12:45:13 +0100 | <dminuoso> | But one that better represents popularity |
2020-11-26 12:46:02 +0100 | <maerwald> | servant-client just has 100 reverse deps, the other 10k it doesn't show :D |
2020-11-26 12:46:14 +0100 | <maerwald> | downloads are much more reliable metric |
2020-11-26 12:46:21 +0100 | <dminuoso> | Hard to say |
2020-11-26 12:46:26 +0100 | <bifunc2> | i don't have any great definition of this, my friend :) i just looked at https://hackage.haskell.org/package/vector-sized-1.4.2 and saw 100 d/ls in last 30 days. more than most libraries :P |
2020-11-26 12:46:33 +0100 | <bifunc2> | s/this/popular |
2020-11-26 12:46:41 +0100 | <[exa]> | bifunc2: that may be automated downloads :D |
2020-11-26 12:47:04 +0100 | <[exa]> | one of my R libs has 400 installs per month but I'm fairly sure it has precisely 10 users. |
2020-11-26 12:47:11 +0100 | <maerwald> | [exa]: that even out for all of hackage (automated downloads) |
2020-11-26 12:47:22 +0100 | <maerwald> | so it's not a particularly strong argument |
2020-11-26 12:47:23 +0100 | <boxscape> | hm looks like vector-sized uses CPS-style existentials |
2020-11-26 12:47:39 +0100 | <dminuoso> | 12:46:02 maerwald | servant-client just has 100 reverse deps, the other 10k it doesn't show :D |
2020-11-26 12:47:43 +0100 | <kindaro> | How can I list all packages and versions available in Cabal store? |
2020-11-26 12:47:51 +0100 | <dminuoso> | maerwald: I guess the difference is servant-client is very likley to have users who do not share their product on hackage |
2020-11-26 12:48:04 +0100 | <maerwald> | why is that a *difference*? |
2020-11-26 12:48:18 +0100 | <dminuoso> | a container library can be reasonably expected to be used by other liraries |
2020-11-26 12:48:37 +0100 | <dminuoso> | its not just executables that need vectors |
2020-11-26 12:48:51 +0100 | <dminuoso> | kindaro: find. |
2020-11-26 12:49:18 +0100 | <[exa]> | maerwald: yeah just wanted to point out that the number may be biased |
2020-11-26 12:49:18 +0100 | <maerwald> | dminuoso: servant-client is not an executable :D |
2020-11-26 12:49:28 +0100 | <dminuoso> | maerwald: No, but it likely is used by executables |
2020-11-26 12:49:40 +0100 | <dminuoso> | There's relatively little API wrappers on hackage |
2020-11-26 12:49:53 +0100 | <maerwald> | dminuoso: look at the reverse deps and you'll see lots of libraries :) |
2020-11-26 12:49:58 +0100 | fendor | (~fendor@178.165.131.166.wireless.dyn.drei.com) |
2020-11-26 12:50:15 +0100 | <maerwald> | so this seems more like an assumption rather than an observation |
2020-11-26 12:50:19 +0100 | <dminuoso> | You just switched your argument |
2020-11-26 12:50:26 +0100 | <dminuoso> | maerwald: Your point was "servant-client just has 100 reverse deps, the other 10k it doesn't show" |
2020-11-26 12:50:47 +0100 | <maerwald> | yes, I didn't make any assumptions of what the users are |
2020-11-26 12:51:10 +0100 | dminuoso | is too tired for this |
2020-11-26 12:52:02 +0100 | jonatanb | (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
2020-11-26 12:52:13 +0100 | kindaro | (1f08e49d@h31-8-228-157.dyn.bashtel.ru) () |
2020-11-26 12:52:30 +0100 | <maerwald> | (and I wrote a library that uses servant-client as a library) |
2020-11-26 12:54:23 +0100 | iinuwa | (iinuwamatr@gateway/shell/matrix.org/x-xphebgqwlqcseskv) |
2020-11-26 12:54:23 +0100 | Ericson2314 | (ericson231@gateway/shell/matrix.org/x-avnyxwuppgyurkaz) |
2020-11-26 12:54:24 +0100 | maralorn | (maralornma@gateway/shell/matrix.org/x-texxocacqxllhpup) |
2020-11-26 12:54:24 +0100 | johnnyboy[m] | (gifumatrix@gateway/shell/matrix.org/x-jjlcducyrjlzkhlt) |
2020-11-26 12:54:24 +0100 | psamim | (samimpmatr@gateway/shell/matrix.org/x-iwvzbluhzuztthuh) |
2020-11-26 12:54:24 +0100 | unclechu | (unclechuma@gateway/shell/matrix.org/x-asdoddomxjfoouxw) |
2020-11-26 12:54:24 +0100 | theduke | (thedukem1@gateway/shell/matrix.org/x-kbbklisittpzjvkk) |
2020-11-26 12:54:24 +0100 | chreekat[m] | (chreekatma@gateway/shell/matrix.org/x-ktxyajphiegdytww) |
2020-11-26 12:54:24 +0100 | ThaEwat | (thaewraptm@gateway/shell/matrix.org/x-rtowccvvmfqlygti) |
2020-11-26 12:54:24 +0100 | SlackIntegration | (slackbotma@gateway/shell/matrix.org/x-uxjtxhvnhsvwzafd) |
2020-11-26 12:54:24 +0100 | sm[m] | (simonmicma@gateway/shell/matrix.org/x-xomgnngasooluobu) |
2020-11-26 12:54:25 +0100 | kadoban | (kadobanmat@gateway/shell/matrix.org/x-ihijirqqlozywxkc) |
2020-11-26 12:54:25 +0100 | CRTified[m] | (schnecfkru@gateway/shell/matrix.org/x-ofgzvldlqelcywuc) |
2020-11-26 12:54:25 +0100 | Noughtmare[m] | (naughtmare@gateway/shell/matrix.org/x-euxykteztfgdzjor) |
2020-11-26 12:54:25 +0100 | berberman[T] | (berberma4@gateway/shell/matrix.org/x-bwsbvcnillhcvqdz) |
2020-11-26 12:54:25 +0100 | zerstroyer[m] | (zerstroyer@gateway/shell/matrix.org/x-pvagwcsgvifvhwvf) |
2020-11-26 12:54:25 +0100 | pqwy[m] | (pqwymatrix@gateway/shell/matrix.org/x-bcyejxklqcfnaxbi) |
2020-11-26 12:54:25 +0100 | ttc | (tomtauma1@gateway/shell/matrix.org/x-mshtvdkklhnazscc) |
2020-11-26 12:54:25 +0100 | siraben | (sirabenmat@gateway/shell/matrix.org/x-tkxpiikugikainiv) |
2020-11-26 12:54:25 +0100 | themsay[m] | (themsaymat@gateway/shell/matrix.org/x-ysvioopzcvcuuyvd) |
2020-11-26 12:54:25 +0100 | rednaZ[m] | (r3dnazmatr@gateway/shell/matrix.org/x-nvfucrymxqacpiao) |
2020-11-26 12:54:25 +0100 | lnxw37d4 | (lnxw37d4ma@gateway/shell/matrix.org/x-ukqcbfsgmccbpdxz) |
2020-11-26 12:54:25 +0100 | camlriot42 | (camlriotma@gateway/shell/matrix.org/x-dszwkgezlvpwptvk) |
2020-11-26 12:54:26 +0100 | boistordu | (boistordum@gateway/shell/matrix.org/x-octelcfxsnkvakgd) |
2020-11-26 12:54:26 +0100 | tersetears[m] | (tersetears@gateway/shell/matrix.org/x-lglnsokcfrmfsblz) |
2020-11-26 12:54:26 +0100 | Hanma[m] | (hanmamatri@gateway/shell/matrix.org/x-ihxxyuaewqpuhxbt) |
2020-11-26 12:54:26 +0100 | hsiktas[m] | (hsiktasmat@gateway/shell/matrix.org/x-wtpesvemtwcuuafs) |
2020-11-26 12:54:26 +0100 | domenkozar[m] | (domenkozar@NixOS/user/domenkozar) |
2020-11-26 12:54:26 +0100 | lambdaclan | (lambdaclan@gateway/shell/matrix.org/x-esnqerudyklmnsrh) |
2020-11-26 12:54:26 +0100 | PotatoHatsue | (berbermanp@gateway/shell/matrix.org/x-znkywhldbhzbhgen) |
2020-11-26 12:54:26 +0100 | dominicusin[m] | (dominicusi@gateway/shell/matrix.org/x-nryovwrdbgvjplzc) |
2020-11-26 12:54:26 +0100 | srid | (sridmatrix@gateway/shell/matrix.org/x-xkaemlggxitmvijh) |
2020-11-26 12:54:26 +0100 | aloiscochard[m] | (aloiscocha@gateway/shell/matrix.org/x-nmroubrbcectjnbg) |
2020-11-26 12:54:26 +0100 | psydruid | (psydruidma@gateway/shell/matrix.org/x-gdvihwcfiajbrbzn) |
2020-11-26 12:54:27 +0100 | fgaz | (fgazmatrix@gateway/shell/matrix.org/x-ypwwwiayrbbyifnk) |
2020-11-26 12:54:27 +0100 | michaelpj | (michaelpjm@gateway/shell/matrix.org/x-isbbleoraguftwpl) |
2020-11-26 12:54:27 +0100 | drozdziak1 | (drozdziak1@gateway/shell/matrix.org/x-zhcszongpwzqffkh) |
2020-11-26 12:54:27 +0100 | jtojnar | (jtojnarmat@gateway/shell/matrix.org/x-sxmbcbyagmdgfbky) |
2020-11-26 12:54:30 +0100 | dyniec[m] | (dyniecmatr@gateway/shell/matrix.org/x-bzyahcrtvmhlgeby) |
2020-11-26 12:54:30 +0100 | falling-edge[m] | (falling-ed@gateway/shell/matrix.org/x-ewgnzieoktvonuxq) |
2020-11-26 12:54:30 +0100 | TekShifter[m] | (tekshifter@gateway/shell/matrix.org/x-qkoxohtmvaxbhybf) |
2020-11-26 12:54:31 +0100 | miseenplace[m] | (miseenplac@gateway/shell/matrix.org/x-vdkkkdwfftjmtktj) |
2020-11-26 12:54:31 +0100 | patier[m] | (patiermatr@gateway/shell/matrix.org/x-fvcsayzftiumvnvp) |
2020-11-26 12:54:31 +0100 | andreabedini[m] | (andreabedi@gateway/shell/matrix.org/x-sjrrvynkcmmwxcjs) |
2020-11-26 12:54:31 +0100 | loprakoa[m] | (loprakoama@gateway/shell/matrix.org/x-zoiumweqktphvybc) |
2020-11-26 12:54:32 +0100 | jkaye[m] | (jkayematri@gateway/shell/matrix.org/x-ltlmepvlghffnhdw) |
2020-11-26 12:54:32 +0100 | jlv | (jlvjustinl@gateway/shell/matrix.org/x-vewvewaygwmdkitl) |
2020-11-26 12:54:32 +0100 | wi[m] | (w1gzmatrix@gateway/shell/matrix.org/x-ycgeajchfpkrzfcx) |
2020-11-26 12:54:32 +0100 | jesser[m] | (jessermatr@gateway/shell/matrix.org/x-jhkivoszgmdxgjkg) |
2020-11-26 12:54:32 +0100 | rab24ack[m] | (rab24ackma@gateway/shell/matrix.org/x-wbflzldjessbqugl) |
2020-11-26 12:54:34 +0100 | alexfmpe | (alexfmpema@gateway/shell/matrix.org/x-vumyyhvaurdbeexr) |
2020-11-26 12:54:35 +0100 | mikr[m] | (mikrdavral@gateway/shell/matrix.org/x-xnldjrbcvidcizev) |
2020-11-26 12:54:38 +0100 | alephu5[m] | (alephu5mat@gateway/shell/matrix.org/x-gipdmcyuqaltnaqr) |
2020-11-26 12:54:38 +0100 | ComaGrayce[m] | (commagrays@gateway/shell/matrix.org/x-wpvsucnvgmarcknv) |
2020-11-26 12:54:38 +0100 | wanaks[m] | (wanaksmatr@gateway/shell/matrix.org/x-ncjfiyoyfwrxhjmq) |
2020-11-26 12:57:24 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 13:00:00 +0100 | AlterEgo- | (~ladew@124-198-158-163.dynamic.caiway.nl) |
2020-11-26 13:01:47 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 244 seconds) |
2020-11-26 13:05:06 +0100 | m0rphism | (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) |
2020-11-26 13:05:33 +0100 | <hc> | i can confirm that it is ;p |
2020-11-26 13:05:46 +0100 | <hc> | nvm, wrong channel |
2020-11-26 13:06:56 +0100 | <Uniaika> | :O |
2020-11-26 13:07:11 +0100 | plutoniix | (~q@ppp-27-55-91-168.revip3.asianet.co.th) |
2020-11-26 13:08:44 +0100 | olligobber | (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 256 seconds) |
2020-11-26 13:09:22 +0100 | <ski> | boxscape : if you just want to pass it on to the caller, which is likely to unwrap, then the CPS encoding is probably better. if you want to store it in some data structure, then the "existential data constructor" encoding is probably better |
2020-11-26 13:10:15 +0100 | <boxscape> | I see |
2020-11-26 13:10:16 +0100 | <boxscape> | thanks |
2020-11-26 13:10:48 +0100 | pavonia | (~user@unaffiliated/siracusa) (Quit: Bye!) |
2020-11-26 13:11:00 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) |
2020-11-26 13:11:28 +0100 | berberman[T] | (berberma4@gateway/shell/matrix.org/x-bwsbvcnillhcvqdz) (Quit: authenticating) |
2020-11-26 13:11:34 +0100 | berberman[T] | (berberma4@gateway/shell/matrix.org/x-zufgslvuiyldvexu) |
2020-11-26 13:12:44 +0100 | gehmehgeh | (~ircuser1@gateway/tor-sasl/gehmehgeh) |
2020-11-26 13:13:41 +0100 | berberman[T] | (berberma4@gateway/shell/matrix.org/x-zufgslvuiyldvexu) (Client Quit) |
2020-11-26 13:13:49 +0100 | berberman[T] | (berberma4@gateway/shell/matrix.org/x-bxfzueyqtnjjnhrt) |
2020-11-26 13:16:53 +0100 | supki | (~mt@188.166.74.67) (Ping timeout: 256 seconds) |
2020-11-26 13:18:51 +0100 | <dminuoso> | And, given that you can convert freely between them, nothing stops you from just switching between the representations |
2020-11-26 13:19:35 +0100 | <boxscape> | right, that makes sense |
2020-11-26 13:20:09 +0100 | olligobber | (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
2020-11-26 13:22:46 +0100 | <dminuoso> | Question, does anyone else favor case-of over maybe? I find myself never favoring `maybe` |
2020-11-26 13:23:00 +0100 | <dminuoso> | (Or fromMaybe) |
2020-11-26 13:24:55 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 13:25:50 +0100 | <boxscape> | depends on how complex the expressions are; something simple like `maybe False (>0)` I wouldn't write with case-of, typically |
2020-11-26 13:27:10 +0100 | <maerwald> | dminuoso: I also prefer case of |
2020-11-26 13:27:25 +0100 | <maerwald> | maybe and friends are for cases where I know ahead of time what I'm gonna type |
2020-11-26 13:27:58 +0100 | <dminuoso> | What do you mean by "where I know ahead of time what I'm gonna type"? |
2020-11-26 13:28:34 +0100 | <maerwald> | Usually I don't know what I'm doing, is what I'm saying. So I pattern match on something and then switch stuff back and forth. That's more "linear" than doing complicated expressions |
2020-11-26 13:29:07 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 13:29:35 +0100 | alp | (~alp@2a01:e0a:58b:4920:612f:aa9c:8a4e:4f35) |
2020-11-26 13:29:44 +0100 | cosimone | (~cosimone@93-47-228-249.ip115.fastwebnet.it) |
2020-11-26 13:30:03 +0100 | <maerwald> | that's also the reasons I prefer lambdas as argument to fmap etc instead of writing pointfree function arguments |
2020-11-26 13:30:56 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving) |
2020-11-26 13:31:01 +0100 | adm_ | (~adm@43.229.89.234) (Remote host closed the connection) |
2020-11-26 13:31:13 +0100 | <n0042> | lambdas are nice |
2020-11-26 13:31:32 +0100 | shah^ | (shah@ip98-184-89-2.mc.at.cox.net) |
2020-11-26 13:31:56 +0100 | <maerwald> | n0042: I had a tech challenge where they told me they don't like it, because I'm not using pointfree style enough and that wouldn't be "senior haskell" |
2020-11-26 13:32:01 +0100 | <maerwald> | dodged a bullet :D |
2020-11-26 13:32:09 +0100 | <boxscape> | oh no |
2020-11-26 13:32:18 +0100 | Entertainment | (~entertain@104.246.132.210) |
2020-11-26 13:32:38 +0100 | <opqdonut> | :D |
2020-11-26 13:32:55 +0100 | <boxscape> | @pl \d ogde a bullet -> a bullet d odge d |
2020-11-26 13:32:55 +0100 | <lambdabot> | const . (flip =<< (flip .) . flip flip odge . (flip .) . flip flip) |
2020-11-26 13:33:26 +0100 | <maerwald> | right, run your code through that before handing in your tech challenge :D |
2020-11-26 13:33:37 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 13:34:38 +0100 | <boxscape> | In my company we only accept challenges written in umlambda |
2020-11-26 13:34:54 +0100 | Sheilong | (uid293653@gateway/web/irccloud.com/x-xzqgkxnkzvzsvgqp) |
2020-11-26 13:34:58 +0100 | <opqdonut> | boxscape: :D |
2020-11-26 13:34:58 +0100 | <boxscape> | erm |
2020-11-26 13:34:59 +0100 | <boxscape> | unlambda |
2020-11-26 13:37:09 +0100 | plakband | (~plakband@113x43x242x146.ap113.ftth.arteria-hikari.net) (Quit: WeeChat 2.9) |
2020-11-26 13:38:17 +0100 | <dminuoso> | maerwald: Next time just introduce a random `fix . const` in the challenge. |
2020-11-26 13:38:30 +0100 | <maerwald> | omg, such senior |
2020-11-26 13:38:34 +0100 | <dminuoso> | ;) |
2020-11-26 13:39:20 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 13:39:41 +0100 | <dminuoso> | Obligatory https://aphyr.com/posts/342-typing-the-technical-interview |
2020-11-26 13:39:49 +0100 | phaul | (~phaul@ruby/staff/phaul) (Ping timeout: 264 seconds) |
2020-11-26 13:39:52 +0100 | <boxscape> | was just thinking of that |
2020-11-26 13:40:03 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds) |
2020-11-26 13:40:31 +0100 | Jonkimi727406120 | (~Jonkimi@113.87.161.66) (Ping timeout: 246 seconds) |
2020-11-26 13:40:36 +0100 | <maerwald> | that post made some ppl believe haskell is dynamically typed (I'm not joking) |
2020-11-26 13:41:01 +0100 | <boxscape> | oh no |
2020-11-26 13:41:54 +0100 | phaul | (~phaul@ruby/staff/phaul) |
2020-11-26 13:42:24 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-11-26 13:43:00 +0100 | hackage | deferred-folds 0.9.13 - Abstractions over deferred folds https://hackage.haskell.org/package/deferred-folds-0.9.13 (NikitaVolkov) |
2020-11-26 13:43:30 +0100 | plutoniix | (~q@ppp-27-55-91-168.revip3.asianet.co.th) (Quit: Leaving) |
2020-11-26 13:44:18 +0100 | <n0042> | That is a pretty funny page lol |
2020-11-26 13:51:44 +0100 | Stanley00 | (~stanley00@unaffiliated/stanley00) |
2020-11-26 13:53:05 +0100 | gproto23 | (~gproto23@unaffiliated/gproto23) (Ping timeout: 240 seconds) |
2020-11-26 13:54:33 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) |
2020-11-26 13:55:56 +0100 | Stanley00 | (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds) |
2020-11-26 13:56:21 +0100 | _ashbreeze_ | (~mark@72-161-253-71.dyn.centurytel.net) (Read error: No route to host) |
2020-11-26 13:57:25 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Client Quit) |
2020-11-26 13:57:38 +0100 | phaul | (~phaul@ruby/staff/phaul) (Ping timeout: 260 seconds) |
2020-11-26 13:57:44 +0100 | fendor | (~fendor@178.165.131.166.wireless.dyn.drei.com) (Remote host closed the connection) |
2020-11-26 13:57:50 +0100 | _ashbreeze_ | (~mark@72-161-253-71.dyn.centurytel.net) |
2020-11-26 13:57:51 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
2020-11-26 14:04:10 +0100 | adm_ | (~adm@43.229.89.234) (Remote host closed the connection) |
2020-11-26 14:04:11 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) |
2020-11-26 14:04:34 +0100 | phaul | (~phaul@ruby/staff/phaul) |
2020-11-26 14:06:03 +0100 | Tario | (~Tario@201.192.165.173) |
2020-11-26 14:07:00 +0100 | <maerwald> | is there an easy way to figure out if a given function *actually* makes use of constraints other than satisfying types? |
2020-11-26 14:07:07 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) |
2020-11-26 14:07:20 +0100 | <maerwald> | (like: calling a class function) |
2020-11-26 14:07:43 +0100 | <maerwald> | (which then could warrant a redesign of the types/constraints) |
2020-11-26 14:08:09 +0100 | bitmagie | (~Thunderbi@200116b8069e6000fcea7cbd95660e31.dip.versatel-1u1.de) |
2020-11-26 14:09:25 +0100 | phaul | (~phaul@ruby/staff/phaul) (Ping timeout: 240 seconds) |
2020-11-26 14:09:49 +0100 | xff0x | (~fox@2001:1a81:52e2:1100:66fc:dc44:c41d:a54) (Ping timeout: 272 seconds) |
2020-11-26 14:10:32 +0100 | xff0x | (~fox@2001:1a81:52e2:1100:6a57:53b7:993a:a9b) |
2020-11-26 14:12:53 +0100 | phaul | (~phaul@ruby/staff/phaul) |
2020-11-26 14:14:00 +0100 | hackage | headroom 0.3.2.0 - License Header Manager https://hackage.haskell.org/package/headroom-0.3.2.0 (xwinus) |
2020-11-26 14:14:10 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection) |
2020-11-26 14:19:05 +0100 | lankatze | (~Thomas@business-176-095-163-121.static.arcor-ip.net) |
2020-11-26 14:19:13 +0100 | lankatze | (~Thomas@business-176-095-163-121.static.arcor-ip.net) (Client Quit) |
2020-11-26 14:20:41 +0100 | Linoleum | (~Linoleum@185.103.96.147) |
2020-11-26 14:20:47 +0100 | lankatze | (~Thomas@business-176-095-163-121.static.arcor-ip.net) |
2020-11-26 14:23:25 +0100 | lankatze | (~Thomas@business-176-095-163-121.static.arcor-ip.net) (Client Quit) |
2020-11-26 14:24:58 +0100 | dexterlb | (~dexterlb@2a01:9e40:2:2::2) (Quit: Boing) |
2020-11-26 14:26:14 +0100 | hyperisco | (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
2020-11-26 14:26:42 +0100 | elfets | (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
2020-11-26 14:26:46 +0100 | bitmagie | (~Thunderbi@200116b8069e6000fcea7cbd95660e31.dip.versatel-1u1.de) (Quit: bitmagie) |
2020-11-26 14:29:25 +0100 | perry69420 | (6ee39737@110.227.151.55) (Remote host closed the connection) |
2020-11-26 14:29:37 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 14:29:42 +0100 | caecilius | (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net) |
2020-11-26 14:30:09 +0100 | jonatanb | (jonatanb@gateway/vpn/protonvpn/jonatanb) |
2020-11-26 14:31:18 +0100 | f-a | (~f-a@151.46.85.195) |
2020-11-26 14:36:20 +0100 | shah^ | (shah@ip98-184-89-2.mc.at.cox.net) () |
2020-11-26 14:38:24 +0100 | dexterlb | (~dexterlb@2a01:9e40:2:2::2) |
2020-11-26 14:41:02 +0100 | benjamingr__ | (uid23465@gateway/web/irccloud.com/x-syalagemfhhmznuu) |
2020-11-26 14:43:28 +0100 | Ariakenom_ | (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) |
2020-11-26 14:45:14 +0100 | tsrt^ | (tsrt@ip98-184-89-2.mc.at.cox.net) |
2020-11-26 14:47:09 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
2020-11-26 14:47:20 +0100 | Ariakenom__ | (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Ping timeout: 256 seconds) |
2020-11-26 14:47:34 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2020-11-26 14:48:30 +0100 | jonatanb_ | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) |
2020-11-26 14:49:58 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-11-26 14:50:02 +0100 | fendor | (~fendor@078132052150.public.t-mobile.at) |
2020-11-26 14:50:35 +0100 | csaba_hruska | (~csaba@188-167-252-60.dynamic.chello.sk) |
2020-11-26 14:51:09 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit) |
2020-11-26 14:51:16 +0100 | jonatanb | (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds) |
2020-11-26 14:53:54 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) |
2020-11-26 14:54:16 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2020-11-26 14:55:24 +0100 | forgottenone | (~forgotten@176.88.97.75) |
2020-11-26 14:55:45 +0100 | fendor | (~fendor@078132052150.public.t-mobile.at) (Ping timeout: 240 seconds) |
2020-11-26 14:56:06 +0100 | jk1006 | (~jk1006@193.16.224.0) |
2020-11-26 14:59:25 +0100 | jk1006 | (~jk1006@193.16.224.0) (Client Quit) |
2020-11-26 15:01:05 +0100 | <dminuoso> | maerwald: Mmm, it shoulds like a diagnostic that fits into GHC |
2020-11-26 15:01:07 +0100 | <dminuoso> | *sounds |
2020-11-26 15:01:15 +0100 | solonarv | (~solonarv@astrasbourg-653-1-191-240.w90-13.abo.wanadoo.fr) (Quit: Lost terminal) |
2020-11-26 15:01:21 +0100 | <dminuoso> | Some sort of warn-unused-constraints |
2020-11-26 15:01:56 +0100 | <dminuoso> | I dont know the implementation details of the type checker, it doesn't seem impossible in principle to track which constraints you used to discharge other obligations |
2020-11-26 15:02:28 +0100 | f-a | (~f-a@151.46.85.195) () |
2020-11-26 15:02:44 +0100 | Iceland_jack | (~user@31.124.48.169) |
2020-11-26 15:03:50 +0100 | solonarv | (~solonarv@astrasbourg-653-1-191-240.w90-13.abo.wanadoo.fr) |
2020-11-26 15:06:41 +0100 | bgamari_ | (~bgamari@72.65.104.220) |
2020-11-26 15:07:22 +0100 | bgamari | (~bgamari@2001:470:e438::1) (Ping timeout: 260 seconds) |
2020-11-26 15:10:30 +0100 | hackage | deferred-folds 0.9.14 - Abstractions over deferred folds https://hackage.haskell.org/package/deferred-folds-0.9.14 (NikitaVolkov) |
2020-11-26 15:13:00 +0100 | hackage | lsp 1.0.0.1 - Haskell library for the Microsoft Language Server Protocol https://hackage.haskell.org/package/lsp-1.0.0.1 (luke_) |
2020-11-26 15:13:53 +0100 | acarrico | (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
2020-11-26 15:14:40 +0100 | sondr3 | (~sondr3@cm-84.211.56.132.getinternet.no) |
2020-11-26 15:19:02 +0100 | hekkaidekapus_ | (~tchouri@gateway/tor-sasl/hekkaidekapus) (Quit: hekkaidekapus_) |
2020-11-26 15:21:06 +0100 | hekkaidekapus | (~tchouri@gateway/tor-sasl/hekkaidekapus) |
2020-11-26 15:21:44 +0100 | <dminuoso> | maerwald: Anyway, interesting. If I dont case-of, I usually have some `note` function instead. |
2020-11-26 15:22:25 +0100 | <dminuoso> | Or I move it into pattern matching on separate functions, where I might have `fooEither (Left ...) = ...; fooEither (Right ...) = ...'` and use that as a continuation |
2020-11-26 15:22:38 +0100 | <dminuoso> | But either/maybe seems just strange to me for some reason I cant explain |
2020-11-26 15:22:58 +0100 | <boxscape> | do you use foldr? |
2020-11-26 15:23:57 +0100 | <dminuoso> | sure |
2020-11-26 15:24:02 +0100 | <boxscape> | hm |
2020-11-26 15:24:44 +0100 | <boxscape> | So an aversion to Church encodings of non-recursive types but not to those of recursive types, to overly extrapolate |
2020-11-26 15:24:56 +0100 | <dminuoso> | Yes, very much. |
2020-11-26 15:26:51 +0100 | jonatanb_ | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Remote host closed the connection) |
2020-11-26 15:27:14 +0100 | <dminuoso> | The non-recursive types encode a choice, list does not |
2020-11-26 15:27:34 +0100 | <dminuoso> | Or I guess that depends on the perspective |
2020-11-26 15:28:10 +0100 | <dminuoso> | since a list could be `n + (n^2) + (n^3) + (n^4) + ....` |
2020-11-26 15:28:36 +0100 | <dminuoso> | Maybe it's just that to me it's not clear which side of `maybe` does what |
2020-11-26 15:28:51 +0100 | <dminuoso> | Perhaps I also just lack the intuition because I dont use it |
2020-11-26 15:28:58 +0100 | <c_wraith> | doesn't the type tell you? |
2020-11-26 15:29:08 +0100 | <maerwald> | dminuoso: if I convert a maybe to some other type (e.g. Either), I find maybe to be quite idiomatic... but I can't stand fromMaybe |
2020-11-26 15:29:11 +0100 | <c_wraith> | :t maybe |
2020-11-26 15:29:12 +0100 | <lambdabot> | b -> (a -> b) -> Maybe a -> b |
2020-11-26 15:29:31 +0100 | <c_wraith> | there's only one case either of those arguments can apply in. |
2020-11-26 15:29:49 +0100 | <dminuoso> | c_wraith: Sure, but when you look at `maybe foo bar h`, then it's just not obvious to me |
2020-11-26 15:29:57 +0100 | <c_wraith> | Now, I understand that complaint about bool.... |
2020-11-26 15:30:05 +0100 | <dminuoso> | Mmm |
2020-11-26 15:30:25 +0100 | <maerwald> | I always mix up second and third parameter of foldr/foldl :p |
2020-11-26 15:30:30 +0100 | <hpc> | dminuoso: there's a way to remember it as a specific instance of a more general thing |
2020-11-26 15:30:38 +0100 | <hpc> | data Maybe a = Nothing | Just a |
2020-11-26 15:30:46 +0100 | <hpc> | the parameters for maybe go in the same order as the data definition |
2020-11-26 15:30:53 +0100 | <dminuoso> | hpc: Sure, the first constructor comes first. But that requires memorizing the data definition |
2020-11-26 15:30:54 +0100 | <hpc> | same for foldr, they go in the same order |
2020-11-26 15:31:11 +0100 | <hpc> | dminuoso: the smallest constructor is first |
2020-11-26 15:31:30 +0100 | <hpc> | (for deriving Ord and such) |
2020-11-26 15:31:32 +0100 | <dminuoso> | hpc: so what about These? |
2020-11-26 15:31:39 +0100 | fendor | (~fendor@77.119.130.234.wireless.dyn.drei.com) |
2020-11-26 15:31:40 +0100 | <dminuoso> | What type signature would `these` have? |
2020-11-26 15:32:10 +0100 | darjeeling_ | (~darjeelin@122.245.217.23) (Ping timeout: 256 seconds) |
2020-11-26 15:32:17 +0100 | <dminuoso> | these :: (a -> d) -> (b -> d) -> (a -> b -> d) -> These a b -> d |
2020-11-26 15:32:18 +0100 | <c_wraith> | intuition says: (a -> c) -> (b -> c) -> (a -> b -> c) -> These a b -> c |
2020-11-26 15:32:21 +0100 | <dminuoso> | these :: (b -> d) -> (a -> d) -> (a -> b -> d) -> These a b -> d |
2020-11-26 15:32:41 +0100 | <dminuoso> | According to your definition, Id have to look up the definition of These, and I couldnt infer it from the size |
2020-11-26 15:32:42 +0100 | <maerwald> | easy: this, that, these |
2020-11-26 15:32:44 +0100 | <maerwald> | xD |
2020-11-26 15:33:24 +0100 | <hpc> | it derives Ord so you can check in ghci |
2020-11-26 15:33:44 +0100 | <dminuoso> | Well if I have to look it up, I might as well just check hoogle |
2020-11-26 15:33:46 +0100 | <boxscape> | % :i These |
2020-11-26 15:33:47 +0100 | <yahb> | boxscape: ; <interactive>:1:1: error: Not in scope: `These' |
2020-11-26 15:33:52 +0100 | <boxscape> | :/ |
2020-11-26 15:34:00 +0100 | <dminuoso> | % import Data.Strict.These |
2020-11-26 15:34:00 +0100 | <yahb> | dminuoso: ; <no location info>: error:; Could not find module `Data.Strict.These'; It is not a module in the current program, or in any known package. |
2020-11-26 15:34:08 +0100 | <dminuoso> | % import Data.Functor.These |
2020-11-26 15:34:08 +0100 | <yahb> | dminuoso: ; <no location info>: error:; Could not find module `Data.Functor.These'; Perhaps you meant; Data.Functor.Base (from recursion-schemes-5.1.3); Data.Functor.Const (from base-4.14.0.0); Data.Functor.Plus (from semigroupoids-5.3.4) |
2020-11-26 15:34:42 +0100 | <dminuoso> | hpc: I get your point, Im not saying its not discoverable, Im just suggesting that from just staring at its usage, it might not be obvious |
2020-11-26 15:34:48 +0100 | <hpc> | sometimes |
2020-11-26 15:34:54 +0100 | <dminuoso> | But arguably the same could be said about `foldr` |
2020-11-26 15:35:01 +0100 | <c_wraith> | and every function |
2020-11-26 15:35:01 +0100 | <hpc> | but then for example, how would you write a fold over a tree? |
2020-11-26 15:35:08 +0100 | <dminuoso> | hpc: easy! foldMap! |
2020-11-26 15:35:12 +0100 | <dminuoso> | ;) |
2020-11-26 15:35:15 +0100 | <hpc> | heh |
2020-11-26 15:36:39 +0100 | <hpc> | but yeah, if you know the structure it's pretty easy, foldTree leaf branch Leaf = leaf; foldTree leaf branch (Branch value left right) = branch value (foldTree left) (foldTree right) |
2020-11-26 15:36:57 +0100 | <hpc> | or something similar depending on what type of tree you're dealing with |
2020-11-26 15:38:50 +0100 | jonatanb | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) |
2020-11-26 15:38:51 +0100 | <hpc> | i wonder if there's anything that writes these functions automatically |
2020-11-26 15:38:54 +0100 | bitmapper | (uid464869@gateway/web/irccloud.com/x-ntgjmwmudxzzxssg) |
2020-11-26 15:40:11 +0100 | <c_wraith> | recursion-schemes? |
2020-11-26 15:40:26 +0100 | <merijn> | c_wraith: That's not automatic |
2020-11-26 15:40:32 +0100 | <c_wraith> | it has TH |
2020-11-26 15:40:34 +0100 | <merijn> | That's just "reusing handwritten ones" |
2020-11-26 15:41:06 +0100 | <c_wraith> | every library is reusing something someone wrote by hand... |
2020-11-26 15:42:19 +0100 | <merijn> | c_wraith: Right, but I meant as opposed to DeriveFunctor. I guess TH counts, but I didn't know recursion-schemes had that, because my brain doesn't like recursion schemes :p |
2020-11-26 15:42:43 +0100 | jonatanb | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Remote host closed the connection) |
2020-11-26 15:42:55 +0100 | <c_wraith> | And I don't like using TH. :P |
2020-11-26 15:43:01 +0100 | dminuoso | likes TH |
2020-11-26 15:43:16 +0100 | <c_wraith> | I like *writing* it. But I don't like writing code that uses it. |
2020-11-26 15:43:24 +0100 | <merijn> | I like TH, but they fucked up the specification |
2020-11-26 15:43:31 +0100 | <dminuoso> | There is a specification? |
2020-11-26 15:43:34 +0100 | <dminuoso> | :> |
2020-11-26 15:43:40 +0100 | <merijn> | dminuoso: My point |
2020-11-26 15:44:03 +0100 | <dminuoso> | My main annoyance with TH is just one: staging restriction |
2020-11-26 15:44:06 +0100 | <merijn> | TH should've had a clear "target" and "host" distinction for everything |
2020-11-26 15:44:09 +0100 | <hpc> | hmm, that technically writes it but by way of free shennanigans |
2020-11-26 15:44:21 +0100 | <dminuoso> | Having to fiddle with extra modules just to satisfy the staging restriction is sometimes frustrating |
2020-11-26 15:44:36 +0100 | <dminuoso> | Especially because we cant have circular module references |
2020-11-26 15:44:38 +0100 | <merijn> | dminuoso: Staging is annoying, but you can workaround it |
2020-11-26 15:44:57 +0100 | <hpc> | like if i was using [] and had to pick between foldr and whatever recursion-schemes gives me, recursion-schemes would be harder to use |
2020-11-26 15:45:07 +0100 | <merijn> | dminuoso: In contrast to the lack of distinction between target/host which makes cross-compiled TH fundamentally impossible |
2020-11-26 15:45:18 +0100 | <dminuoso> | merijn: cross compiling is not something I care about |
2020-11-26 15:45:27 +0100 | <merijn> | (well, the Asterius guys seem to be attempting to fix/work around it via heroic amounts of work) |
2020-11-26 15:45:29 +0100 | <hpc> | i just want to write data Foo ..., makeFold 'Foo, and get foo :: whatever -> Foo ... -> ... |
2020-11-26 15:45:34 +0100 | <merijn> | dminuoso: Not *yet* |
2020-11-26 15:45:44 +0100 | <dminuoso> | Perhaps |
2020-11-26 15:45:53 +0100 | <merijn> | dminuoso: Compiling windows executables from linux/etc. would've been nice :p |
2020-11-26 15:45:58 +0100 | <dminuoso> | Is that some reference to the dominion of ARM processors? |
2020-11-26 15:46:00 +0100 | <dminuoso> | Oh |
2020-11-26 15:46:05 +0100 | <merijn> | dminuoso: ARM too |
2020-11-26 15:46:32 +0100 | <merijn> | dminuoso: Everything is just slightly more inconvenient without cross-compilation |
2020-11-26 15:47:04 +0100 | <merijn> | And proper cross-compilation support isn't even that hard. It's just a herculean task to retrofit cross-compilation support if you didn't engineer it in from the beginning |
2020-11-26 15:47:50 +0100 | alp | (~alp@2a01:e0a:58b:4920:612f:aa9c:8a4e:4f35) (Ping timeout: 246 seconds) |
2020-11-26 15:48:25 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
2020-11-26 15:49:20 +0100 | darjeeling_ | (~darjeelin@122.245.217.23) |
2020-11-26 15:56:24 +0100 | Yumasi | (~guillaume@2a01cb09b06b29ea391191835a81a7a2.ipv6.abo.wanadoo.fr) (Ping timeout: 240 seconds) |
2020-11-26 15:56:36 +0100 | toorevitimirp | (~tooreviti@117.182.183.18) (Remote host closed the connection) |
2020-11-26 15:56:45 +0100 | cr3 | (~cr3@192-222-143-195.qc.cable.ebox.net) |
2020-11-26 15:57:58 +0100 | urodna | (~urodna@unaffiliated/urodna) |
2020-11-26 15:58:35 +0100 | Yumasi | (~guillaume@2a01:e0a:5cb:4430:5572:c108:3697:b06d) |
2020-11-26 16:01:28 +0100 | cfricke | (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
2020-11-26 16:02:43 +0100 | coot | (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
2020-11-26 16:03:00 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-11-26 16:04:00 +0100 | hackage | migrant-core 0.1.0.1 - Semi-automatic database schema migrations https://hackage.haskell.org/package/migrant-core-0.1.0.1 (TobiasDammers) |
2020-11-26 16:04:24 +0100 | eyenx | (~eyenxeyen@unaffiliated/eye/x-1653358) (Quit: Bridge terminating on SIGTERM) |
2020-11-26 16:06:31 +0100 | hackage | migrant-core 0.1.0.2 - Semi-automatic database schema migrations https://hackage.haskell.org/package/migrant-core-0.1.0.2 (TobiasDammers) |
2020-11-26 16:07:00 +0100 | eyenx | (~eyenxeyen@unaffiliated/eye/x-1653358) |
2020-11-26 16:07:19 +0100 | texasmynsted | (~texasmyns@212.102.45.115) |
2020-11-26 16:07:31 +0100 | hackage | migrant-sqlite-simple 0.1.0.2, migrant-postgresql-simple 0.1.0.2, migrant-hdbc 0.1.0.2 (TobiasDammers) |
2020-11-26 16:07:36 +0100 | texasmynsted | (~texasmyns@212.102.45.115) (Read error: Connection reset by peer) |
2020-11-26 16:07:39 +0100 | avdb | (~avdb@ip-81-11-215-86.dsl.scarlet.be) |
2020-11-26 16:07:41 +0100 | <avdb> | Does ghc-mod still work in 2020? |
2020-11-26 16:07:48 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
2020-11-26 16:07:49 +0100 | <avdb> | I can't install it: https://dpaste.com/4D4N4GM7X |
2020-11-26 16:07:59 +0100 | texasmynsted | (~texasmyns@212.102.45.115) |
2020-11-26 16:09:29 +0100 | <merijn> | No |
2020-11-26 16:09:39 +0100 | <merijn> | Development stopped, like, 2+ years ago |
2020-11-26 16:09:47 +0100 | <merijn> | And the repo says it's deprecated as user tool |
2020-11-26 16:09:54 +0100 | <merijn> | You want ghcide/haskell-language-server |
2020-11-26 16:10:28 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 16:11:05 +0100 | <avdb> | Lol I found a 2020 blog post suggesting the usage of ghc-mod. Embarrassing. |
2020-11-26 16:13:44 +0100 | <merijn> | heh |
2020-11-26 16:13:45 +0100 | <merijn> | Where? |
2020-11-26 16:13:49 +0100 | cosimone | (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone) |
2020-11-26 16:13:50 +0100 | geekosaur | (ae68c070@cpe-174-104-192-112.neo.res.rr.com) |
2020-11-26 16:14:31 +0100 | <merijn> | avdb: See the note here: https://github.com/DanielG/ghc-mod#legacy |
2020-11-26 16:14:32 +0100 | bitmagie | (~Thunderbi@200116b8069e6000fcea7cbd95660e31.dip.versatel-1u1.de) |
2020-11-26 16:15:12 +0100 | <avdb> | haskell-ide-engine has been archived as well -_- |
2020-11-26 16:15:19 +0100 | <avdb> | Industry moves too fast |
2020-11-26 16:15:20 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-11-26 16:15:29 +0100 | <merijn> | avdb: haskell-ide-engine merged with ghcide |
2020-11-26 16:15:35 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-11-26 16:15:43 +0100 | <merijn> | avdb: haskell-language-server is basically the continuation of hie |
2020-11-26 16:16:10 +0100 | jonatanb | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) |
2020-11-26 16:16:17 +0100 | bitmagie | (~Thunderbi@200116b8069e6000fcea7cbd95660e31.dip.versatel-1u1.de) (Client Quit) |
2020-11-26 16:16:17 +0100 | jonatanb | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Remote host closed the connection) |
2020-11-26 16:16:27 +0100 | <merijn> | avdb: It's moving fast as of this year due to all the tooling projects finally converging on a single collaboration with actual people paid to work on it :p |
2020-11-26 16:16:58 +0100 | <merijn> | Instead of being 10 independent, unmaintained personal hacks :p |
2020-11-26 16:18:06 +0100 | <avdb> | True |
2020-11-26 16:18:36 +0100 | <avdb> | Would you recommend hlint or ale? |
2020-11-26 16:18:52 +0100 | <avdb> | Can't really choose, ale got a lot of forks is all I know |
2020-11-26 16:20:01 +0100 | <merijn> | How are hlint and ale alternatives? |
2020-11-26 16:20:17 +0100 | <maerwald> | ale *uses* hlint |
2020-11-26 16:20:45 +0100 | <maerwald> | https://github.com/dense-analysis/ale/blob/master/ale_linters/haskell/hlint.vim |
2020-11-26 16:21:04 +0100 | <merijn> | ALE is a plugin for asynchronously running linters/LSP servers, it doesn't actually "do" anything |
2020-11-26 16:21:09 +0100 | andos | (~dan@69-165-210-185.cable.teksavvy.com) |
2020-11-26 16:21:47 +0100 | <avdb> | Oh oops |
2020-11-26 16:21:56 +0100 | <avdb> | Do I still need the LSP if I use ale? |
2020-11-26 16:22:25 +0100 | matta | (~user@24-113-169-116.wavecable.com) (Ping timeout: 264 seconds) |
2020-11-26 16:22:29 +0100 | <maerwald> | good luck with LSP clients in vim |
2020-11-26 16:22:37 +0100 | <maerwald> | I tried all and then I disabled it |
2020-11-26 16:22:50 +0100 | <maerwald> | It makes my productivity worse |
2020-11-26 16:23:12 +0100 | <maerwald> | Maybe other editors have a better experience, I don't know |
2020-11-26 16:23:23 +0100 | <merijn> | maerwald: ALE *is* an LSP client |
2020-11-26 16:23:27 +0100 | <maerwald> | yes |
2020-11-26 16:23:35 +0100 | <merijn> | avdb: ALE is working fine for me, tbh |
2020-11-26 16:23:56 +0100 | hexfive | (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) (Quit: i must go. my people need me.) |
2020-11-26 16:24:00 +0100 | hackage | phonetic-languages-simplified-properties-lists 0.1.2.0 - A generalization of the uniqueness-periods-vector-properties package. https://hackage.haskell.org/package/phonetic-languages-simplified-properties-lists-0.1.2.0 (OleksandrZhabenko) |
2020-11-26 16:26:26 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
2020-11-26 16:27:03 +0100 | <dminuoso> | Is there a newtype wrapper for reverse Ord? |
2020-11-26 16:27:40 +0100 | <dminuoso> | I just want to do something like `sortOn (Reverse . fst)` |
2020-11-26 16:27:52 +0100 | <geekosaur> | Down? |
2020-11-26 16:28:10 +0100 | <dminuoso> | geekosaur: Ah cheers! |
2020-11-26 16:30:35 +0100 | Stanley00 | (~stanley00@unaffiliated/stanley00) |
2020-11-26 16:32:23 +0100 | louisac | (4d64ab42@cpc82915-enfi22-2-0-cust65.20-2.cable.virginm.net) |
2020-11-26 16:32:48 +0100 | Linoleum | (~Linoleum@185.103.96.147) () |
2020-11-26 16:33:02 +0100 | kelsey | (~keteskyl@2600:6c64:7b7f:fa42:880b:e2d1:945a:df75) |
2020-11-26 16:34:07 +0100 | plutoniix | (~q@ppp-27-55-91-168.revip3.asianet.co.th) |
2020-11-26 16:35:16 +0100 | Stanley00 | (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds) |
2020-11-26 16:35:24 +0100 | filwisher | (~filwisher@78.141.201.45) (Quit: ZNC 1.7.1 - https://znc.in) |
2020-11-26 16:35:42 +0100 | filwisher | (~filwisher@78.141.201.45) |
2020-11-26 16:36:12 +0100 | adm_ | (~adm@43.229.89.234) (Remote host closed the connection) |
2020-11-26 16:39:07 +0100 | <texasmynsted> | Morning |
2020-11-26 16:40:56 +0100 | matta | (~user@24-113-169-116.wavecable.com) |
2020-11-26 16:41:18 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) |
2020-11-26 16:41:45 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 16:44:20 +0100 | plutoniix | (~q@ppp-27-55-91-168.revip3.asianet.co.th) (Remote host closed the connection) |
2020-11-26 16:47:15 +0100 | gproto23 | (~gproto23@unaffiliated/gproto23) |
2020-11-26 16:47:25 +0100 | Tario | (~Tario@201.192.165.173) (Ping timeout: 240 seconds) |
2020-11-26 16:47:59 +0100 | Tario | (~Tario@200.119.184.39) |
2020-11-26 16:48:00 +0100 | grabz0r | (~grabz0r@90-145-165-196.bbserv.nl) |
2020-11-26 16:48:48 +0100 | <n0042> | Morning to you as well |
2020-11-26 16:48:53 +0100 | <n0042> | Happy thanksgiving! |
2020-11-26 16:50:05 +0100 | larou | (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) |
2020-11-26 16:50:27 +0100 | knupfer | (~Thunderbi@200116b82c0c5800d512095bbf5d3f0d.dip.versatel-1u1.de) |
2020-11-26 16:52:56 +0100 | <maerwald> | :t Down |
2020-11-26 16:52:56 +0100 | SanchayanMaity | (~Sanchayan@171.76.82.54) (Quit: SanchayanMaity) |
2020-11-26 16:52:58 +0100 | <lambdabot> | a -> Down a |
2020-11-26 16:53:18 +0100 | <maerwald> | :t Up |
2020-11-26 16:53:20 +0100 | <lambdabot> | error: |
2020-11-26 16:53:20 +0100 | <lambdabot> | • Data constructor not in scope: Up |
2020-11-26 16:53:20 +0100 | <lambdabot> | • Perhaps you meant one of these: |
2020-11-26 16:53:42 +0100 | <maerwald> | only going down, how depressing |
2020-11-26 16:53:59 +0100 | adm_ | (~adm@43.229.89.234) (Remote host closed the connection) |
2020-11-26 16:54:13 +0100 | keviv | (~keviv@35.142.17.117) |
2020-11-26 16:55:06 +0100 | <dminuoso> | Would it help if Down was renamed to Depress? |
2020-11-26 16:55:08 +0100 | Sheilong | (uid293653@gateway/web/irccloud.com/x-xzqgkxnkzvzsvgqp) (Quit: Connection closed for inactivity) |
2020-11-26 16:55:29 +0100 | <hc> | lol |
2020-11-26 16:56:56 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 16:57:57 +0100 | adm_ | (~adm@43.229.89.234) (Remote host closed the connection) |
2020-11-26 17:01:15 +0100 | lfa33 | (3eb2f497@62-178-244-151.cable.dynamic.surfer.at) |
2020-11-26 17:02:16 +0100 | lfa33 | (3eb2f497@62-178-244-151.cable.dynamic.surfer.at) (Remote host closed the connection) |
2020-11-26 17:02:34 +0100 | adm_ | (~adm@43.229.89.234) |
2020-11-26 17:04:00 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
2020-11-26 17:04:24 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) |
2020-11-26 17:05:18 +0100 | subttle | (~anonymous@unaffiliated/subttle) (Quit: leaving) |
2020-11-26 17:06:30 +0100 | knupfer | (~Thunderbi@200116b82c0c5800d512095bbf5d3f0d.dip.versatel-1u1.de) (Quit: knupfer) |
2020-11-26 17:06:39 +0100 | knupfer | (~Thunderbi@200116b82c0c5800c8e579458ff3eb4f.dip.versatel-1u1.de) |
2020-11-26 17:07:08 +0100 | mpereira | (~mpereira@2a02:810d:f40:d96:857:5d24:8b16:e48) |
2020-11-26 17:07:20 +0100 | adm_ | (~adm@43.229.89.234) (Ping timeout: 265 seconds) |
2020-11-26 17:08:37 +0100 | vicfred | (~vicfred@unaffiliated/vicfred) |
2020-11-26 17:09:10 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
2020-11-26 17:09:50 +0100 | Chi1thangoo | (~Chi1thang@87.112.60.168) |
2020-11-26 17:10:42 +0100 | acarrico | (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 256 seconds) |
2020-11-26 17:13:50 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-11-26 17:14:14 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 17:16:43 +0100 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
2020-11-26 17:18:36 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
2020-11-26 17:18:49 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
2020-11-26 17:20:38 +0100 | <zfnmxt> | I'm having some trouble with type families and ambiguous variables during type inference: https://www.pastery.net/gfxvnp/ |
2020-11-26 17:20:52 +0100 | Iceland_jack | (~user@31.124.48.169) (Ping timeout: 265 seconds) |
2020-11-26 17:21:40 +0100 | <zfnmxt> | I don't know how to constraint things further so that b0 can be resolved. |
2020-11-26 17:21:55 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
2020-11-26 17:22:00 +0100 | hackage | phonetic-languages-simplified-properties-lists 0.1.3.0 - A generalization of the uniqueness-periods-vector-properties package. https://hackage.haskell.org/package/phonetic-languages-simplified-properties-lists-0.1.3.0 (OleksandrZhabenko) |
2020-11-26 17:22:02 +0100 | <zfnmxt> | s/constraint/constrain |
2020-11-26 17:25:09 +0100 | <boxscape> | zfnmxt have you tried supplying b to left with -XTypeApplications? |
2020-11-26 17:28:09 +0100 | andos | (~dan@69-165-210-185.cable.teksavvy.com) (Quit: Leaving) |
2020-11-26 17:29:35 +0100 | danso | (~dan@69-165-210-185.cable.teksavvy.com) |
2020-11-26 17:29:40 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) |
2020-11-26 17:31:07 +0100 | Yumasi | (~guillaume@2a01:e0a:5cb:4430:5572:c108:3697:b06d) (Ping timeout: 260 seconds) |
2020-11-26 17:33:44 +0100 | santa_1 | (~santa_@217.146.82.202) |
2020-11-26 17:37:58 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds) |
2020-11-26 17:39:32 +0100 | <zfnmxt> | boxscape: Did you mean something like this? https://www.pastery.net/gfxvnp+sjqkje/#sjqkje |
2020-11-26 17:40:00 +0100 | hackage | reflex-dom-retractable 0.1.7.0 - Routing and retractable back button for reflex-dom https://hackage.haskell.org/package/reflex-dom-retractable-0.1.7.0 (NCrashed) |
2020-11-26 17:43:00 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 17:43:00 +0100 | hackage | reflex-localize 1.0.1.0 - Localization library for reflex https://hackage.haskell.org/package/reflex-localize-1.0.1.0 (NCrashed) |
2020-11-26 17:43:32 +0100 | <boxscape> | zfnmxt is Func a type family? |
2020-11-26 17:43:59 +0100 | <boxscape> | or a type? |
2020-11-26 17:45:16 +0100 | raichoo | (~raichoo@dslb-092-073-219-149.092.073.pools.vodafone-ip.de) (Quit: Lost terminal) |
2020-11-26 17:45:35 +0100 | <zfnmxt> | boxscape: It's a GADT: https://github.com/aleatory-science/frechet-dsl/blob/c7185e3aa1894e2cf3f45be4ee7506b5ad695a7d/src/… |
2020-11-26 17:46:07 +0100 | <boxscape> | zfnmxt is that a private repository? I'm getting a 404 |
2020-11-26 17:46:08 +0100 | csaba_hruska | (~csaba@188-167-252-60.dynamic.chello.sk) (Quit: leaving) |
2020-11-26 17:46:47 +0100 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) |
2020-11-26 17:47:02 +0100 | <zfnmxt> | Ah, crap. Forgot about that. Here's the relevant line: https://www.pastery.net/gfxvnp+sjqkje+xwaqdc/#xwaqdc |
2020-11-26 17:48:48 +0100 | chele | (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
2020-11-26 17:49:01 +0100 | hackage | reflex-localize 1.0.2.0 - Localization library for reflex https://hackage.haskell.org/package/reflex-localize-1.0.2.0 (NCrashed) |
2020-11-26 17:50:56 +0100 | tabemann | (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Ping timeout: 240 seconds) |
2020-11-26 17:52:14 +0100 | avdb | (~avdb@ip-81-11-215-86.dsl.scarlet.be) (Ping timeout: 272 seconds) |
2020-11-26 17:52:36 +0100 | <boxscape> | zfnmxt so I think the problem right now is that it doesn't know that n is 0, because of how you're matching on the fromSing call. Let me see if I can remember how to do that better... |
2020-11-26 17:52:40 +0100 | coot | (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl) |
2020-11-26 17:52:49 +0100 | alp | (~alp@2a01:e0a:58b:4920:2df3:524d:ce61:8fe1) |
2020-11-26 17:53:11 +0100 | avdb | (~avdb@ip-81-11-215-86.dsl.scarlet.be) |
2020-11-26 17:53:22 +0100 | <zfnmxt> | boxscape: I suspected that might be a problem (and I remain confused about `Nat` in general--why aren't there `SZero` and `SS` constructors to match on?) |
2020-11-26 17:53:26 +0100 | Feuermagier | (~Feuermagi@213.178.26.41) (Remote host closed the connection) |
2020-11-26 17:53:42 +0100 | <boxscape> | zfnmxt yeah I tend to avoid the built-in Nats for that reason |
2020-11-26 17:54:01 +0100 | ubert | (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection) |
2020-11-26 17:54:06 +0100 | <zfnmxt> | Is there a reason the built-ins don't export (or...lack?) the constructors? |
2020-11-26 17:54:16 +0100 | acarrico | (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
2020-11-26 17:54:19 +0100 | maroloccio | (~marolocci@2a02:8084:221:ce00:164f:8aff:fed8:411d) |
2020-11-26 17:54:54 +0100 | <boxscape> | zfnmxt I believe they're built to be efficient, e.g., if you have 1000 :: Nat, you don't want to carry around 1000 constructors if you don't need them |
2020-11-26 17:55:18 +0100 | <boxscape> | zfnmxt it might be worth switching to a library that provides Z/S nats though for this, or rolling your own |
2020-11-26 17:55:24 +0100 | louisac | (4d64ab42@cpc82915-enfi22-2-0-cust65.20-2.cable.virginm.net) (Remote host closed the connection) |
2020-11-26 17:55:56 +0100 | <boxscape> | with that I believe you could just do `case n of SZ -> left` |
2020-11-26 17:56:12 +0100 | <zfnmxt> | boxscape: I'll try! |
2020-11-26 17:57:04 +0100 | <boxscape> | (zfnmxt: this for example, which has singletons integration https://hackage.haskell.org/package/singleton-nats-0.4.5/docs/Data-Nat.html) |
2020-11-26 17:57:23 +0100 | coot | (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 256 seconds) |
2020-11-26 17:58:14 +0100 | coot | (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl) |
2020-11-26 17:58:39 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
2020-11-26 17:59:36 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-11-26 18:00:13 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2020-11-26 18:00:15 +0100 | christo | (~chris@81.96.113.213) (Remote host closed the connection) |
2020-11-26 18:01:15 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 18:01:44 +0100 | larou | (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Quit: Connection closed) |
2020-11-26 18:02:24 +0100 | <zfnmxt> | boxscape: That fixed it :) |
2020-11-26 18:02:29 +0100 | <boxscape> | nice |
2020-11-26 18:02:45 +0100 | <zfnmxt> | Thanks a lot for the help! |
2020-11-26 18:02:51 +0100 | <boxscape> | np |
2020-11-26 18:03:36 +0100 | Gurkenglas | (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds) |
2020-11-26 18:04:41 +0100 | Sheilong | (uid293653@gateway/web/irccloud.com/x-euqghorjjrswhrff) |
2020-11-26 18:05:09 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 18:08:31 +0100 | kritzefitz | (~kritzefit@fw-front.credativ.com) (Remote host closed the connection) |
2020-11-26 18:09:04 +0100 | jonatanb | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) |
2020-11-26 18:09:41 +0100 | christo | (~chris@81.96.113.213) (Ping timeout: 265 seconds) |
2020-11-26 18:09:43 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds) |
2020-11-26 18:10:39 +0100 | bifunc2 | (bifunc2@gateway/vpn/protonvpn/bifunc2) (Quit: -) |
2020-11-26 18:10:45 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 18:11:05 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2020-11-26 18:13:51 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) |
2020-11-26 18:14:06 +0100 | Lycurgus | (~niemand@98.4.114.74) |
2020-11-26 18:18:50 +0100 | jonatanb | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Ping timeout: 272 seconds) |
2020-11-26 18:19:00 +0100 | <zfnmxt> | boxscape: Unfortunately, I spoke too soon. It only works for the `n = SS SZ` case (I changed it so that `nth` is 1-indexed) if you type `nth` as `nth :: forall n x xs. Sing n -> HList (x ': xs) -> Lookup (x ': xs) n` (and it doesn't work for any case with a larger n). So it seems like the explicit `x ': xs` type pattern is what enabled the inference. |
2020-11-26 18:19:12 +0100 | <zfnmxt> | https://www.pastery.net/gfxvnp+sjqkje+xwaqdc+rzupwz/#rzupwz |
2020-11-26 18:20:15 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
2020-11-26 18:20:57 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2020-11-26 18:24:01 +0100 | kritzefitz | (~kritzefit@212.86.56.80) |
2020-11-26 18:24:49 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 18:25:20 +0100 | <boxscape> | zfnmxt try `left @_ @(S Z)`? probably won't fix it but might give you a better error message |
2020-11-26 18:26:52 +0100 | evanjs | (~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer) |
2020-11-26 18:28:10 +0100 | <zfnmxt> | boxscape: That doesn't type, does it? |
2020-11-26 18:28:27 +0100 | <boxscape> | zfnmxt hm, it's possible I confused something |
2020-11-26 18:28:49 +0100 | evanjs | (~evanjs@075-129-098-007.res.spectrum.com) |
2020-11-26 18:29:09 +0100 | <boxscape> | oh, yeah, I think I did |
2020-11-26 18:29:25 +0100 | <zfnmxt> | left only takes `a :: Type` and `b :: Type` |
2020-11-26 18:29:47 +0100 | <boxscape> | right, hm |
2020-11-26 18:29:55 +0100 | <zfnmxt> | (Maybe I should've said it doesn't kind :P) |
2020-11-26 18:30:10 +0100 | <boxscape> | same thing since ghc 8.0 :) |
2020-11-26 18:31:25 +0100 | <zfnmxt> | There's no way to have GHC print out the constraints it has generated so far during type inference or something, right? |
2020-11-26 18:31:39 +0100 | <zfnmxt> | I just want to see what's going on; it's all so opaque :( |
2020-11-26 18:31:39 +0100 | <ski> | i think you need to match on `xs' |
2020-11-26 18:32:18 +0100 | <boxscape> | zfnmxt if you use typed holes (i.e. replace left with _) it will show you the constraints it has in context at that point |
2020-11-26 18:32:48 +0100 | <boxscape> | not sure if that's quite what you're asking for but it might be |
2020-11-26 18:32:51 +0100 | <ski> | `Sing n' allows you to match on `n'. i think you also need something to match on `xs' |
2020-11-26 18:33:24 +0100 | matta | (~user@24-113-169-116.wavecable.com) (Ping timeout: 272 seconds) |
2020-11-26 18:33:28 +0100 | <zfnmxt> | ski: That worked! |
2020-11-26 18:34:18 +0100 | <zfnmxt> | boxscape: That's a nice trick too. |
2020-11-26 18:35:02 +0100 | <ski> | what worked ? |
2020-11-26 18:35:09 +0100 | knupfer | (~Thunderbi@200116b82c0c5800c8e579458ff3eb4f.dip.versatel-1u1.de) (Read error: Connection reset by peer) |
2020-11-26 18:35:18 +0100 | knupfer | (~Thunderbi@200116b82c0c580000cffb05d629f3fd.dip.versatel-1u1.de) |
2020-11-26 18:35:24 +0100 | <zfnmxt> | ski: Matching on xs. At least for the `(SS SZ)` case. |
2020-11-26 18:35:37 +0100 | <ski> | how did you match on it ? |
2020-11-26 18:35:41 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
2020-11-26 18:35:57 +0100 | gioyik | (~gioyik@186.118.238.251) |
2020-11-26 18:36:16 +0100 | matta | (~user@24-113-169-116.wavecable.com) |
2020-11-26 18:36:48 +0100 | <zfnmxt> | https://www.pastery.net/gfxvnp+sjqkje+xwaqdc+rzupwz+hwbecb/#hwbecb |
2020-11-26 18:36:52 +0100 | <ezzieyguywuf> | can I use something like runExceptT here to simplify this code, and/or avoid the nested case statements? https://dpaste.com/4WBWJH8WA |
2020-11-26 18:36:54 +0100 | <ski> | (also, where's `Sing' (and `fromSing') from / how's it defined ?) |
2020-11-26 18:37:07 +0100 | <avdb> | https://dpaste.com/9D4WFUTP5 |
2020-11-26 18:37:10 +0100 | <avdb> | Help please? |
2020-11-26 18:37:31 +0100 | <avdb> | Can't install these programs with cabal. |
2020-11-26 18:37:33 +0100 | <zfnmxt> | ski: Data.Singletons; that's a whole bag of worms there though. |
2020-11-26 18:38:01 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2020-11-26 18:39:16 +0100 | knupfer | (~Thunderbi@200116b82c0c580000cffb05d629f3fd.dip.versatel-1u1.de) (Client Quit) |
2020-11-26 18:39:17 +0100 | knupfer1 | (~Thunderbi@i59F7FFCD.versanet.de) |
2020-11-26 18:41:03 +0100 | <merijn> | ezzieyguywuf: "yes" |
2020-11-26 18:41:07 +0100 | borne | (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
2020-11-26 18:41:09 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) (Quit: Leaving) |
2020-11-26 18:41:29 +0100 | <merijn> | avdb: hdevtools has been dead since 2016 |
2020-11-26 18:41:37 +0100 | <merijn> | Actually, longer |
2020-11-26 18:41:40 +0100 | knupfer1 | knupfer |
2020-11-26 18:41:44 +0100 | borne | (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de) |
2020-11-26 18:41:48 +0100 | <merijn> | But 2016 is about the last time my personal fork of it worked |
2020-11-26 18:41:50 +0100 | <zfnmxt> | ski: And again that only worked for the `(SS SZ)` case :'( |
2020-11-26 18:42:32 +0100 | <ezzieyguywuf> | merijn: even though the two "Left"s have different types? |
2020-11-26 18:42:42 +0100 | <merijn> | ezzieyguywuf: oh, I hadn't seen that |
2020-11-26 18:42:53 +0100 | <ezzieyguywuf> | merijn: so I guess in that case no? |
2020-11-26 18:43:05 +0100 | <merijn> | ezzieyguywuf: Easily solved by mapping them to the same type first ;) |
2020-11-26 18:43:43 +0100 | coot | (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
2020-11-26 18:43:51 +0100 | <ezzieyguywuf> | merijn: lol, fair enough. |
2020-11-26 18:44:00 +0100 | coot | (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl) |
2020-11-26 18:44:04 +0100 | <merijn> | :t Data.Bifunctor.first |
2020-11-26 18:44:05 +0100 | <lambdabot> | Bifunctor p => (a -> b) -> p a c -> p b c |
2020-11-26 18:44:34 +0100 | <ezzieyguywuf> | ?_? |
2020-11-26 18:44:44 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-11-26 18:44:57 +0100 | <merijn> | Either is a Bifunctor :p |
2020-11-26 18:45:12 +0100 | <merijn> | > :t first isDigit |
2020-11-26 18:45:16 +0100 | <lambdabot> | <hint>:1:1: error: <hint>:1:1: error: parse error on input ‘:’ |
2020-11-26 18:45:21 +0100 | <merijn> | :t first isDigit |
2020-11-26 18:45:23 +0100 | <lambdabot> | (Char, d) -> (Bool, d) |
2020-11-26 18:45:30 +0100 | <merijn> | oh, wrong first |
2020-11-26 18:45:38 +0100 | <merijn> | :t Data.Bifunctor.first isDigit |
2020-11-26 18:45:39 +0100 | <lambdabot> | Bifunctor p => p Char c -> p Bool c |
2020-11-26 18:45:49 +0100 | <merijn> | :t Data.Bifunctor.first isDigit (Right True) |
2020-11-26 18:45:51 +0100 | <lambdabot> | Either Bool Bool |
2020-11-26 18:46:53 +0100 | boxscape | (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Quit: boxscape) |
2020-11-26 18:48:08 +0100 | <avdb> | merijn: Another outdated package |
2020-11-26 18:48:51 +0100 | <geekosaur> | stuff dependent on ghc internals goes stale quickly |
2020-11-26 18:49:11 +0100 | borne | (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de) (Quit: WeeChat 2.9) |
2020-11-26 18:49:49 +0100 | <merijn> | Like I said, the only editor tooling that's still relevant is ghcide and haskell-language-server |
2020-11-26 18:49:56 +0100 | <merijn> | You can assume everything else is dead |
2020-11-26 18:50:40 +0100 | <ski> | ezzieyguywuf : you'll likely need to unify the exception types. something like |
2020-11-26 18:51:11 +0100 | <ski> | runProgram (FileName fname) = (either TextIO.putStrLn return =<<) . runExcept $ do |
2020-11-26 18:51:37 +0100 | <ski> | csvLines <- ExceptT (either pack id <$> parseCSVFromFile (unpack fname)) |
2020-11-26 18:52:30 +0100 | <ski> | csvData <- ExceptT (processRawCSV ((fmap . fmap) pack csvLines)) |
2020-11-26 18:52:44 +0100 | <ski> | lift (processCSV csvData) |
2020-11-26 18:54:04 +0100 | <ezzieyguywuf> | ski: merijn: thanks to you both, this has been helpful |
2020-11-26 18:54:13 +0100 | <gehmehgeh> | I've read the docs and I've been googling a bit, so please bear with me if this question has been asked before: how do you pass ghc options to *just* your own code (not the installed libs) with cabal? I'd like to do some profiling, but when I pass those options with "--ghc-options" it affects _every_ package |
2020-11-26 18:54:39 +0100 | <merijn> | gehmehgeh: You can specify them in the cabal file? |
2020-11-26 18:54:45 +0100 | <gehmehgeh> | how? where? |
2020-11-26 18:54:52 +0100 | <merijn> | gehmehgeh: ghc-options field? ;) |
2020-11-26 18:54:53 +0100 | <gehmehgeh> | "ghc-options" it says isn't a recognized option |
2020-11-26 18:54:56 +0100 | <gehmehgeh> | no |
2020-11-26 18:55:28 +0100 | <merijn> | gehmehgeh: https://github.com/merijn/paramtree/blob/master/paramtree.cabal#L33 |
2020-11-26 18:55:29 +0100 | dyeplexer | (~lol@unaffiliated/terpin) (Remote host closed the connection) |
2020-11-26 18:55:49 +0100 | <merijn> | (capitalisation there shouldn't matter, that's just a personal quirk) |
2020-11-26 18:56:09 +0100 | <monochrom> | gHc-optionS: |
2020-11-26 18:57:01 +0100 | <gehmehgeh> | cabal is still claiming "Build profile: -w ghc-8.10.2 -O1" |
2020-11-26 18:57:08 +0100 | <gehmehgeh> | when I put a "ghc-options" line there |
2020-11-26 18:57:09 +0100 | <monochrom> | When I was learning this back then, I spent an afternoon reading the relevant chapter in the cabal user's guide from top to bottom. |
2020-11-26 18:57:28 +0100 | <merijn> | gehmehgeh: So? |
2020-11-26 18:57:38 +0100 | <gehmehgeh> | Shouldn't it reflect my changes? |
2020-11-26 18:57:40 +0100 | <merijn> | gehmehgeh: build-profile isn't a specification of options |
2020-11-26 18:57:45 +0100 | <gehmehgeh> | Saying "-O2" instead of.. |
2020-11-26 18:57:53 +0100 | <gehmehgeh> | Well, that is counterintuitive |
2020-11-26 18:58:07 +0100 | <gehmehgeh> | Because you can pass "-O2" directly to cabal and will reflect that |
2020-11-26 18:58:16 +0100 | <merijn> | Build profile is, presumably reflecting whether you set "optimisation: 2" in ~/.cabal/config |
2020-11-26 18:58:26 +0100 | <ski> | ezzieyguywuf : any luck ? |
2020-11-26 18:58:37 +0100 | <gehmehgeh> | I actually put -O2 in ~/.cabal/config :D |
2020-11-26 18:58:53 +0100 | <monochrom> | For -O2, with only a few exceptions, you shouldn't set in *.cabal at all. |
2020-11-26 18:58:57 +0100 | <merijn> | gehmehgeh: Doing that would involve parsing flags from ghc-options would involve cabal actually knowing all GHC options |
2020-11-26 18:59:18 +0100 | <merijn> | gehmehgeh: Also, setting -O2 on everything is great way too spend *a lot* of time waiting for compilation for very marginal gains |
2020-11-26 18:59:41 +0100 | ski | . o O ( `SuppressUnusedWarnings ((<=?@#@$$) a6989586621679473158 :: TyFun Nat Bool -> Type)' ) |
2020-11-26 18:59:43 +0100 | <merijn> | -O2 isn't recommended unless you *know* -O2 is significantly better than -O1 |
2020-11-26 18:59:53 +0100 | <gehmehgeh> | ij |
2020-11-26 18:59:56 +0100 | <gehmehgeh> | ok |
2020-11-26 19:00:40 +0100 | <gehmehgeh> | You know what's a bit eerie? I also tried putting "-Werror=incomplete-patterns" there with the result that some dependencies won't build anymore... |
2020-11-26 19:00:48 +0100 | oish | (~charlie@228.25.169.217.in-addr.arpa) |
2020-11-26 19:01:04 +0100 | <merijn> | Well, sure |
2020-11-26 19:02:05 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 19:02:08 +0100 | <merijn> | Turns out that not every random dependency on the internet has the same engineering standards :p |
2020-11-26 19:02:43 +0100 | pokid | (~pokid@unaffiliated/pokid) |
2020-11-26 19:02:43 +0100 | <gehmehgeh> | Still... |
2020-11-26 19:06:24 +0100 | <gehmehgeh> | monochrom, merijn: Thanks for the help :) |
2020-11-26 19:06:48 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
2020-11-26 19:10:01 +0100 | Ariakenom | (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) |
2020-11-26 19:10:18 +0100 | electricityZZZZ | (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 19:10:39 +0100 | alp | (~alp@2a01:e0a:58b:4920:2df3:524d:ce61:8fe1) (Ping timeout: 272 seconds) |
2020-11-26 19:10:43 +0100 | cole-h | (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
2020-11-26 19:14:01 +0100 | Tario | (~Tario@200.119.184.39) (Ping timeout: 264 seconds) |
2020-11-26 19:15:10 +0100 | Tario | (~Tario@201.192.165.173) |
2020-11-26 19:15:49 +0100 | blah20 | (45fbee6a@c-69-251-238-106.hsd1.md.comcast.net) |
2020-11-26 19:19:00 +0100 | christo | (~chris@81.96.113.213) (Remote host closed the connection) |
2020-11-26 19:19:13 +0100 | <avdb> | Is there a Haskell function that does "f n [x] = [x,x,x, ... x]", basically returning a list of the original element multiplied with n? |
2020-11-26 19:19:19 +0100 | <koz_> | :t replicate |
2020-11-26 19:19:21 +0100 | <lambdabot> | Int -> a -> [a] |
2020-11-26 19:19:26 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-11-26 19:19:30 +0100 | <koz_> | > replicate 10 "foo" |
2020-11-26 19:19:32 +0100 | <lambdabot> | ["foo","foo","foo","foo","foo","foo","foo","foo","foo","foo"] |
2020-11-26 19:19:39 +0100 | <avdb> | Thanks! |
2020-11-26 19:19:50 +0100 | Alleria_ | (~AllahuAkb@2604:2000:1484:26:f085:e9f5:38cf:432d) (Ping timeout: 264 seconds) |
2020-11-26 19:19:52 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 19:20:00 +0100 | jneira | (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192) |
2020-11-26 19:20:01 +0100 | <avdb> | Been stuck on this problem for longer than a month lol |
2020-11-26 19:20:14 +0100 | <yushyin> | lol |
2020-11-26 19:20:18 +0100 | <xerox_> | @hoogle Int -> a -> [a] |
2020-11-26 19:20:19 +0100 | <lambdabot> | Prelude replicate :: Int -> a -> [a] |
2020-11-26 19:20:19 +0100 | <lambdabot> | Data.List replicate :: Int -> a -> [a] |
2020-11-26 19:20:19 +0100 | <lambdabot> | GHC.List replicate :: Int -> a -> [a] |
2020-11-26 19:20:30 +0100 | <xerox_> | if you can give your idea a type sometimes you can find them like that |
2020-11-26 19:20:39 +0100 | <avdb> | I didn't bother to try Hoogle yet, I'm still too much of a noob :P |
2020-11-26 19:21:15 +0100 | knupfer | (~Thunderbi@i59F7FFCD.versanet.de) (Ping timeout: 256 seconds) |
2020-11-26 19:21:24 +0100 | <koz_> | avdb: You can roll 'replicate' recursively without too much trouble. |
2020-11-26 19:22:10 +0100 | tumdedum | (~tumdedum@unaffiliated/espiral) (Ping timeout: 272 seconds) |
2020-11-26 19:22:21 +0100 | tumdedum | (~tumdedum@unaffiliated/espiral) |
2020-11-26 19:24:30 +0100 | blah20 | (45fbee6a@c-69-251-238-106.hsd1.md.comcast.net) () |
2020-11-26 19:24:43 +0100 | <avdb> | koz_: I know, I need to practice recursion a lot because I still suck at it! |
2020-11-26 19:24:48 +0100 | Alleria_ | (~AllahuAkb@2604:2000:1484:26:5d86:da4d:584b:848b) |
2020-11-26 19:25:00 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
2020-11-26 19:25:23 +0100 | timCF | (~i.tkachuk@m91-129-105-245.cust.tele2.ee) |
2020-11-26 19:25:25 +0100 | <koz_> | avdb: Basically, the trick is to treat it like a proof by induction. First, what's the simplest case you could ever see? Then, assuming you have a smaller answer, how do you get a bigger answer? |
2020-11-26 19:26:30 +0100 | <avdb> | I do indeed always handle the base cases like x == 0 and x == 0, afterwards I start on the otherwise case |
2020-11-26 19:26:47 +0100 | <koz_> | So for 'replicate', what's your base case? |
2020-11-26 19:26:53 +0100 | <avdb> | Matching types is also a pain but that's where Haskell shines |
2020-11-26 19:27:01 +0100 | <avdb> | Wait I'll send you a paste of my program |
2020-11-26 19:28:17 +0100 | <avdb> | http://codepad.org/KHd73y9L |
2020-11-26 19:28:17 +0100 | timCF | (~i.tkachuk@m91-129-105-245.cust.tele2.ee) (Client Quit) |
2020-11-26 19:28:35 +0100 | timCF | (~i.tkachuk@m91-129-105-245.cust.tele2.ee) |
2020-11-26 19:28:59 +0100 | <avdb> | koz_: Here you go, not sure if I should handle "arr == []" yet |
2020-11-26 19:29:00 +0100 | timCF | (~i.tkachuk@m91-129-105-245.cust.tele2.ee) (Remote host closed the connection) |
2020-11-26 19:29:20 +0100 | timCF | (~i.tkachuk@m91-129-105-245.cust.tele2.ee) |
2020-11-26 19:29:47 +0100 | <merijn> | You should avoid using "== []" that won't work for lists that are missing an Eq instance |
2020-11-26 19:30:01 +0100 | <koz_> | Yeah, 'null' or pattern matching is what you want. |
2020-11-26 19:30:17 +0100 | asheshambasta | (~user@ptr-e1lysauiv50il654lwl.18120a2.ip6.access.telenet.be) (Ping timeout: 272 seconds) |
2020-11-26 19:30:42 +0100 | ishutin_ | (~Ishutin@193-110-63-35.cable-modem.hdsnet.hu) |
2020-11-26 19:31:02 +0100 | phaul | (~phaul@ruby/staff/phaul) (Ping timeout: 272 seconds) |
2020-11-26 19:31:08 +0100 | <avdb> | Ah lol that's why the last element doesn't print I suppose |
2020-11-26 19:31:30 +0100 | <avdb> | merijn: I did but forgot to change it in my paste, ALE suggested it :) |
2020-11-26 19:32:21 +0100 | <timCF> | Hi guys! Often I do operate with some value of monadic type, for example `Either a b` but inside some other monad `m` for example `IO`. To apply a function to internal `b` value I often write constructions like `(foo <$>) <$> x`. Is there other better/simpler way? |
2020-11-26 19:32:42 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 19:32:42 +0100 | chkno | (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
2020-11-26 19:32:47 +0100 | <koz_> | timCF: So you have IO (Either a b) as the type you're trying to work with? |
2020-11-26 19:32:55 +0100 | <timCF> | Yes |
2020-11-26 19:32:57 +0100 | chkno | (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 19:33:27 +0100 | tomsmeding | would write `fmap foo <$> x`, but that's the same |
2020-11-26 19:33:44 +0100 | <timCF> | `(foo <$>) <$> x` works but looks ugly |
2020-11-26 19:33:56 +0100 | Lycurgus | (~niemand@98.4.114.74) (Ping timeout: 240 seconds) |
2020-11-26 19:33:56 +0100 | <merijn> | eh |
2020-11-26 19:33:57 +0100 | ishutin | (~Ishutin@77-234-92-253.pool.digikabel.hu) (Ping timeout: 260 seconds) |
2020-11-26 19:34:01 +0100 | <merijn> | "fmap foo <$> x"? :p |
2020-11-26 19:34:12 +0100 | <timCF> | well, it's the same) |
2020-11-26 19:34:17 +0100 | <tomsmeding> | looks nicer |
2020-11-26 19:34:25 +0100 | <ski> | timCF : maybe `ExceptT a', depending ? |
2020-11-26 19:34:36 +0100 | <timCF> | I was looking for something like magic `<$$>` if it exists haha |
2020-11-26 19:34:47 +0100 | <tomsmeding> | % let <$$> = fmap . fmap |
2020-11-26 19:34:48 +0100 | <yahb> | tomsmeding: ; <interactive>:27:5: error: parse error on input `<$$>' |
2020-11-26 19:34:49 +0100 | <ski> | (fmap . fmap) foo x |
2020-11-26 19:34:52 +0100 | <tomsmeding> | % let (<$$>) = fmap . fmap |
2020-11-26 19:34:52 +0100 | <yahb> | tomsmeding: |
2020-11-26 19:34:58 +0100 | bruce_wayne | (~prateekpr@94.129.87.184) |
2020-11-26 19:35:00 +0100 | d068796 | (~d068796@2a01:c23:8073:b800:8554:936:8b1f:acb4) |
2020-11-26 19:35:01 +0100 | <tomsmeding> | % :t (<$$>) |
2020-11-26 19:35:01 +0100 | <yahb> | tomsmeding: (Functor f1, Functor f2) => (a -> b) -> f1 (f2 a) -> f1 (f2 b) |
2020-11-26 19:35:35 +0100 | <timCF> | well, looks like it will work? |
2020-11-26 19:35:44 +0100 | <tomsmeding> | if it doesn't seem to exist, why not write it :) |
2020-11-26 19:36:10 +0100 | <ski> | timCF : are you often short-circuiting the `Left's ? |
2020-11-26 19:36:41 +0100 | forgottenone | (~forgotten@176.88.97.75) (Quit: Konversation terminated!) |
2020-11-26 19:36:43 +0100 | <timCF> | what do you mean? |
2020-11-26 19:36:45 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 19:37:28 +0100 | christo | (~chris@81.96.113.213) (Ping timeout: 256 seconds) |
2020-11-26 19:37:56 +0100 | <ski> | like `do x <- foo; case x of Left e -> return (Left e); Right v -> do y <- bar v; case y of Left e -> return (Left e); Right w -> ...' |
2020-11-26 19:40:48 +0100 | <timCF> | yeah, I recognize this pattern. Nowdays I'm trying to use `first` `second` and `bimap` to control flow, but often this external IO-like monad complicate things |
2020-11-26 19:41:34 +0100 | <ski> | if you find yourself doing that, then it sounds like `ExceptT' would be helpful |
2020-11-26 19:41:56 +0100 | <ski> | and then you could write `foo <$> ExceptT x' |
2020-11-26 19:42:17 +0100 | d068796 | (~d068796@2a01:c23:8073:b800:8554:936:8b1f:acb4) (Quit: WeeChat 3.0) |
2020-11-26 19:42:58 +0100 | kritzefitz | (~kritzefit@212.86.56.80) (Ping timeout: 260 seconds) |
2020-11-26 19:42:59 +0100 | Alleria_ | (~AllahuAkb@2604:2000:1484:26:5d86:da4d:584b:848b) (Quit: Textual IRC Client: www.textualapp.com) |
2020-11-26 19:43:12 +0100 | <timCF> | Oh, monad transformers :) I'm already writing Haskell code for a while but still not fully understand them, hahah |
2020-11-26 19:43:35 +0100 | d068796 | (~d068796@x4db56550.dyn.telefonica.de) |
2020-11-26 19:43:38 +0100 | <tomsmeding> | someone on reddit noticed that ghc's unused variable warnings seem to have inconsistent behavour regarding transitive propagation of unusedness: https://www.reddit.com/r/haskell/comments/k1dggw/surprising_unused_variable_warnings/ |
2020-11-26 19:43:43 +0100 | <tomsmeding> | is this a known thing? |
2020-11-26 19:43:53 +0100 | phaul | (~phaul@ruby/staff/phaul) |
2020-11-26 19:43:54 +0100 | <timCF> | But this particular case you desribed happens very often in real code, so maybe it will be easier to understand it for me) Thanks! |
2020-11-26 19:43:57 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 19:44:44 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
2020-11-26 19:45:07 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
2020-11-26 19:46:25 +0100 | cr3 | (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 264 seconds) |
2020-11-26 19:46:36 +0100 | Alleria_ | (~AllahuAkb@2604:2000:1484:26:c82b:bd8e:1bb1:925d) |
2020-11-26 19:48:10 +0100 | d068796 | (~d068796@x4db56550.dyn.telefonica.de) (Client Quit) |
2020-11-26 19:48:13 +0100 | <ski> | timCF : the related `MaybeT' is also useful in similar circumstances |
2020-11-26 19:48:52 +0100 | phaul | (~phaul@ruby/staff/phaul) (Ping timeout: 256 seconds) |
2020-11-26 19:49:23 +0100 | bruce_wayne | (~prateekpr@94.129.87.184) (Ping timeout: 260 seconds) |
2020-11-26 19:50:37 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds) |
2020-11-26 19:51:29 +0100 | cr3 | (~cr3@192-222-143-195.qc.cable.ebox.net) |
2020-11-26 19:52:15 +0100 | bruce_wayne | (~prateekpr@94.129.87.184) |
2020-11-26 19:52:25 +0100 | michalz | (~user@185.246.204.47) (Ping timeout: 264 seconds) |
2020-11-26 19:53:28 +0100 | phaul | (~phaul@ruby/staff/phaul) |
2020-11-26 19:54:29 +0100 | jk1006 | (~textual@2a01:c23:8073:b800:8554:936:8b1f:acb4) |
2020-11-26 19:55:45 +0100 | chaosmasttter | (~chaosmast@p200300c4a7107e01f87538c6eac6d35f.dip0.t-ipconnect.de) |
2020-11-26 19:56:16 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 19:58:39 +0100 | matta | (~user@24-113-169-116.wavecable.com) (Ping timeout: 256 seconds) |
2020-11-26 19:59:16 +0100 | elliott__ | (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) |
2020-11-26 20:02:10 +0100 | jonatanb | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) |
2020-11-26 20:02:40 +0100 | gehmehgeh | (~ircuser1@gateway/tor-sasl/gehmehgeh) (Remote host closed the connection) |
2020-11-26 20:02:49 +0100 | invaser1 | (~Thunderbi@31.148.23.125) |
2020-11-26 20:03:02 +0100 | berberman | (~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds) |
2020-11-26 20:03:19 +0100 | BRRR | (5b8169f5@m91-129-105-245.cust.tele2.ee) |
2020-11-26 20:03:24 +0100 | berberman | (~berberman@unaffiliated/berberman) |
2020-11-26 20:03:36 +0100 | phaul | (~phaul@ruby/staff/phaul) (Ping timeout: 240 seconds) |
2020-11-26 20:04:06 +0100 | kritzefitz | (~kritzefit@212.86.56.80) |
2020-11-26 20:05:07 +0100 | juuandyy | (~juuandyy@90.166.144.65) |
2020-11-26 20:05:14 +0100 | invaser | (~Thunderbi@31.148.23.125) (Ping timeout: 272 seconds) |
2020-11-26 20:05:14 +0100 | invaser1 | invaser |
2020-11-26 20:06:25 +0100 | jonatanb | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Ping timeout: 240 seconds) |
2020-11-26 20:06:29 +0100 | gehmehgeh | (~ircuser1@gateway/tor-sasl/gehmehgeh) |
2020-11-26 20:06:30 +0100 | hackage | data-as 0.0.0.2 - Simple extensible sum https://hackage.haskell.org/package/data-as-0.0.0.2 (incertia) |
2020-11-26 20:07:57 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
2020-11-26 20:08:20 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
2020-11-26 20:08:29 +0100 | phaul | (~phaul@ruby/staff/phaul) |
2020-11-26 20:11:29 +0100 | Rudd0 | (~Rudd0@185.189.115.108) (Ping timeout: 265 seconds) |
2020-11-26 20:11:49 +0100 | <timCF> | Thanks! I actually have one more noob question. I do often use phantom types to make source code stricter. For example `newtype MoneyAmount a = MoneyAmount Rational'. That's nice because now I can specify the kind of person who owns the money, for example `data Customer` and then `x :: MoneyAmount Customer'. Now I want to go futher and specify the kind of balance money represent `newtype MoneyAmount a b = |
2020-11-26 20:11:55 +0100 | <timCF> | MoneyAmount Rational' and then `data Debit; data Credit' and then `x :: MoneyAmount Customer Debit'. That's cool, but I can swap types and it still will be valid term `x :: MoneyAmount Debit Customer' and I even can use just some random types there like `x :: MoneyAmount Int Int' which does not make any sense. I'm not sure how do I call the thing I want, but I kinda want some sort of Class restrictions for |
2020-11-26 20:12:01 +0100 | <timCF> | types which can go to N-th position in phantom type. I do want something like this (pseudo code) `(OwnerType a, AccountType b) => newtype MoneyAmount a b = MoneyAmount Rational'. Is there the way to achieve something similar? |
2020-11-26 20:12:26 +0100 | pokid | (~pokid@unaffiliated/pokid) () |
2020-11-26 20:12:36 +0100 | pokid | (~pokid@unaffiliated/pokid) |
2020-11-26 20:12:57 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-11-26 20:14:13 +0100 | jk1006 | (~textual@2a01:c23:8073:b800:8554:936:8b1f:acb4) (Quit: Textual IRC Client: www.textualapp.com) |
2020-11-26 20:14:20 +0100 | christo | (~chris@81.96.113.213) (Remote host closed the connection) |
2020-11-26 20:14:31 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 20:14:40 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
2020-11-26 20:14:49 +0100 | <hpc> | data kinds, perhaps? |
2020-11-26 20:14:51 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-11-26 20:15:02 +0100 | <monochrom> | timCF: You can enable DataKinds, and maybe you also need KindSignatures. Then you can write: "data CD = Credit | Debit", "newtype M (a :: CD) = ...". Now "M Credit" and "M Debit" are legal, "M Bool" is not. |
2020-11-26 20:15:10 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
2020-11-26 20:16:04 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 20:16:26 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-11-26 20:17:07 +0100 | <timCF> | @monochrom hmmm, that's interesting, especially the meaning of `data CD = Credit | Debit` it looks like a type with 2 constructors, but it's definitely not what I do want. I want 2 types of CD class with 0 constructors |
2020-11-26 20:17:07 +0100 | <lambdabot> | Unknown command, try @list |
2020-11-26 20:17:46 +0100 | <monochrom> | That's the magic of DataKinds. You now also have a kind called CD, and it has two types, Credit and Debit. |
2020-11-26 20:18:35 +0100 | <monochrom> | And the type called Credit has no possible value, not even bottom, because its kind is CD not * |
2020-11-26 20:18:57 +0100 | <timCF> | monochrom: hmm, interesting. But how I do define normal types with constructors in case this extension is enabled? |
2020-11-26 20:19:10 +0100 | <monochrom> | You get both |
2020-11-26 20:19:11 +0100 | christo | (~chris@81.96.113.213) |
2020-11-26 20:19:43 +0100 | <timCF> | monochrom: by default it creates both type CD and kind CD? |
2020-11-26 20:19:47 +0100 | <monochrom> | Yeah |
2020-11-26 20:20:05 +0100 | orion | (~orion@unaffiliated/orion) (Ping timeout: 240 seconds) |
2020-11-26 20:20:11 +0100 | <avdb> | Is there a way to just return |
2020-11-26 20:20:21 +0100 | <ski> | just return what ? |
2020-11-26 20:20:24 +0100 | <avdb> | Didn't mean to send that, stupid tmux |
2020-11-26 20:20:25 +0100 | <monochrom> | I don't like this because sometimes you don't want one of them. Also too many name clashes for humans. (Oh the computer has no problem.) |
2020-11-26 20:20:40 +0100 | juuandyy | (~juuandyy@90.166.144.65) (Ping timeout: 265 seconds) |
2020-11-26 20:20:40 +0100 | <monochrom> | But it does the job. It just has side effects. |
2020-11-26 20:20:45 +0100 | <avdb> | It's hard when you confuse Ctrl+w for Vim with Ctrl+b for Tmux |
2020-11-26 20:20:50 +0100 | <timCF> | monochrom: so there is no way to have just kind? |
2020-11-26 20:20:55 +0100 | <monochrom> | No. |
2020-11-26 20:21:20 +0100 | <monochrom> | Just don't use the version you don't want. :) |
2020-11-26 20:21:43 +0100 | <timCF> | monochrom: ehhh.. But it's still much better that having blind phantom types `MoneyAmount a b` |
2020-11-26 20:22:00 +0100 | <timCF> | monochrom: thanks! |
2020-11-26 20:22:03 +0100 | <monochrom> | I think the GHC people did this to avoid creating an extra reserved word such as "kind". |
2020-11-26 20:22:14 +0100 | <xerox_> | what's the paper that explains this? |
2020-11-26 20:22:25 +0100 | <tomsmeding> | note that GHC wants you to write 'Credit and 'Debit on the type level, as opposed to Credit and Debit on the value level |
2020-11-26 20:22:30 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
2020-11-26 20:22:43 +0100 | <merijn> | tomsmeding: Only when ambiguous |
2020-11-26 20:22:44 +0100 | <monochrom> | I don't know, but maybe the GHC user's guide has a citation. |
2020-11-26 20:22:53 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
2020-11-26 20:23:21 +0100 | <avdb> | Is there a way to get the index of an element in a list comprehension? |
2020-11-26 20:23:37 +0100 | christo | (~chris@81.96.113.213) (Ping timeout: 264 seconds) |
2020-11-26 20:23:39 +0100 | <merijn> | Zip it with an list of indices? :p |
2020-11-26 20:23:58 +0100 | <avdb> | I want [x | x <- lst] but without the odd indexes of lst |
2020-11-26 20:24:00 +0100 | phaul | (~phaul@ruby/staff/phaul) (Remote host closed the connection) |
2020-11-26 20:24:11 +0100 | <tomsmeding> | merijn: also if not ambiguous: https://downloads.haskell.org/ghc/latest/docs/html/users_guide/using-warnings.html#ghc-flag--Wunti… is enabled with -Wall |
2020-11-26 20:24:22 +0100 | <merijn> | tomsmeding: That's new |
2020-11-26 20:24:34 +0100 | <merijn> | Wonder when that got added |
2020-11-26 20:24:35 +0100 | <tomsmeding> | perhaps, but it's true now nevertheless :p |
2020-11-26 20:24:47 +0100 | phaul | (~phaul@ruby/staff/phaul) |
2020-11-26 20:24:50 +0100 | <tomsmeding> | I believe we two actually talked about this before in this very channel :p |
2020-11-26 20:25:00 +0100 | <monochrom> | [x | (x,i) <- zip lst (cycle [True,False]), i] |
2020-11-26 20:25:32 +0100 | <avdb> | You mean [(x,y) | x <- lst, y <- index, mod (snd y) 2 == 0] ? |
2020-11-26 20:25:41 +0100 | <monochrom> | No. I mean what I wrote. |
2020-11-26 20:25:49 +0100 | <monochrom> | What you wrote provably does something else. |
2020-11-26 20:26:05 +0100 | <tomsmeding> | merijn: https://ircbrowse.tomsmeding.com/day/haskell/2020/11/07?id=111296×tamp=1604764844#t1604764844 |
2020-11-26 20:26:07 +0100 | <avdb> | monochrom: Thanks. Doing exercises to learn new built-in functions is much more useful than reading books for me. |
2020-11-26 20:26:20 +0100 | <monochrom> | Let's see what's so wrong: |
2020-11-26 20:26:37 +0100 | <avdb> | That was my own function. I was planning on creating tuples with the index as the second element. |
2020-11-26 20:26:45 +0100 | <avdb> | And just filtering the odd ones. |
2020-11-26 20:27:17 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds) |
2020-11-26 20:27:24 +0100 | <monochrom> | With a moment of thought, you don't need full natural numbers, you just need cycle [True,False] |
2020-11-26 20:28:04 +0100 | <monochrom> | Gödel was damaging in teaching us to always work with natural numbers only. |
2020-11-26 20:28:15 +0100 | <tomsmeding> | did he? |
2020-11-26 20:28:16 +0100 | <monochrom> | Turing was damaging in teaching us to always work with strings only. |
2020-11-26 20:28:25 +0100 | <ski> | oh, there's an IRC Browse on the run again |
2020-11-26 20:28:42 +0100 | BRRR | (5b8169f5@m91-129-105-245.cust.tele2.ee) (Remote host closed the connection) |
2020-11-26 20:28:50 +0100 | <monochrom> | Oh very strongly. Look up Gödel numbering. An XY problem in avoiding even strings. |
2020-11-26 20:28:57 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-11-26 20:29:05 +0100 | <monochrom> | or generally arrays. |
2020-11-26 20:29:18 +0100 | <tomsmeding> | he certainly did cool tricks with natural numbers, but did he teach us to work with natural numbers only? I don't think so :) |
2020-11-26 20:29:20 +0100 | <opqdonut> | there are also the folklore functions "evens (x:xs) = x:odds xs; odds (_:xs) = evens xs" |
2020-11-26 20:29:22 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 20:29:52 +0100 | <opqdonut> | which are useful if you only need every second element (and don't need to generalize to e.g. every third) |
2020-11-26 20:29:56 +0100 | <xerox_> | the GHC manual did have a citation http://dreixel.net/research/pdf/ghp.pdf |
2020-11-26 20:29:56 +0100 | <monochrom> | Scott Aaronson had great fun mocking Gödel numbering. |
2020-11-26 20:30:07 +0100 | <merijn> | ski: tomsmeding apparently wanted to do a bunch of work no one was feeling like, so we tricked him into running a copy now that Chris' is gone :p |
2020-11-26 20:30:29 +0100 | <tomsmeding> | it compiles on a recent ghc now too :) |
2020-11-26 20:31:24 +0100 | <monochrom> | Along the line of "I have a mathematician friend who is learning programming, he didn't learn arrays but he wanted to do arrays, so he thought up this great idea, represent [a,b,c] by 2^a 3^b 5^c. That's Gödel numbering." |
2020-11-26 20:32:00 +0100 | <xerox_> | zipWith (^) primes |
2020-11-26 20:32:04 +0100 | <tomsmeding> | obligatory mention of https://esolangs.org/wiki/Fractran |
2020-11-26 20:32:28 +0100 | <opqdonut> | gödel numbering predates pretty much all programming so we can forgive it for being a bit esoteric :P |
2020-11-26 20:32:42 +0100 | <opqdonut> | I think I've seen a version of gödel's proof that uses a more modern encoding |
2020-11-26 20:32:49 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
2020-11-26 20:33:18 +0100 | <xerox_> | did they use capt'n'proto or protocol buffers |
2020-11-26 20:33:19 +0100 | <monochrom> | Well OK, you are right that maybe he didn't intend to teach us to use natural numbers only. But the empirical effect is he ended up achieving that. |
2020-11-26 20:33:51 +0100 | <opqdonut> | xerox_: json and unicode, obviously ;) |
2020-11-26 20:34:00 +0100 | jollygood2 | (~bc8165ab@217.29.117.252) |
2020-11-26 20:34:12 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds) |
2020-11-26 20:34:35 +0100 | <jollygood2> | @hoogle Random a => [a] -> IO a |
2020-11-26 20:34:36 +0100 | <lambdabot> | Rando pickOne :: [x] -> IO x |
2020-11-26 20:34:36 +0100 | <lambdabot> | System.Random.Pick pickOne :: [x] -> IO x |
2020-11-26 20:34:36 +0100 | <lambdabot> | Basement.Monad unsafePrimToIO :: PrimMonad prim => prim a -> IO a |
2020-11-26 20:34:40 +0100 | invaser | (~Thunderbi@31.148.23.125) (Quit: invaser) |
2020-11-26 20:34:42 +0100 | <monochrom> | Namely, we all understand that Gödel numbering is completely non-essential and replaceable (by strings, even ASTs) for his proofs, but most people still teach the Gödel numbering versions of the proof exclusively. |
2020-11-26 20:34:46 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 20:34:46 +0100 | <jollygood2> | anything in base? |
2020-11-26 20:35:00 +0100 | invaser | (~Thunderbi@31.148.23.125) |
2020-11-26 20:35:10 +0100 | <tomsmeding> | jollygood2: the Random class itself isn't even in base :p |
2020-11-26 20:35:10 +0100 | fendor | (~fendor@77.119.130.234.wireless.dyn.drei.com) (Remote host closed the connection) |
2020-11-26 20:35:28 +0100 | <jollygood2> | s/base/package that ships with ghc |
2020-11-26 20:35:53 +0100 | <tomsmeding> | unfortunately no, 'random' is the usual package, though there are others with more high-performance generators |
2020-11-26 20:36:15 +0100 | <tomsmeding> | also, 'Random' itself is not from a package that ships with ghc, so my point stands :p |
2020-11-26 20:36:22 +0100 | <dolio> | I'm not sure that's on Gödel. It's kind of the mathematician equivalent of programmers who want to write everything 'close to the machine.' |
2020-11-26 20:36:32 +0100 | <jollygood2> | Random doesn't ship with ghc? |
2020-11-26 20:36:38 +0100 | <monochrom> | My thesis supervisor's sentiment is in http://www.cs.toronto.edu/~hehner/God.pdf and I totally agree, today even the purest mathematicians have the tools to obsolete the Gödel encoding. |
2020-11-26 20:36:51 +0100 | <tomsmeding> | jollygood2: it's from the 'random' package :p |
2020-11-26 20:37:06 +0100 | <jollygood2> | that doesn't answer my question |
2020-11-26 20:37:31 +0100 | <tomsmeding> | ... which doesn't ship with ghc, no |
2020-11-26 20:38:08 +0100 | <tomsmeding> | because ghc ships only with the packages that ghc depends on, and ghc doesn't need to generate random numbers |
2020-11-26 20:38:19 +0100 | <monochrom> | OK yeah dolio, your take is right. |
2020-11-26 20:38:34 +0100 | <monochrom> | Oh well, so much for blaming it on celebrities. |
2020-11-26 20:38:58 +0100 | oish | (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 260 seconds) |
2020-11-26 20:39:22 +0100 | Sgeo | (~Sgeo@ool-18b982ad.dyn.optonline.net) |
2020-11-26 20:39:40 +0100 | <monochrom> | Oh, random-1.2 is fast and high-quality IMO, even when you use split heavily. |
2020-11-26 20:39:56 +0100 | <jollygood2> | I don't care about speed |
2020-11-26 20:39:59 +0100 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) (Remote host closed the connection) |
2020-11-26 20:40:11 +0100 | <monochrom> | Actually the high-quality part can be objectively quantified by the statistics tests they took, e.g. Die Hard 1. |
2020-11-26 20:40:12 +0100 | <jollygood2> | I just didn't want to depend on more packages than I need to |
2020-11-26 20:40:42 +0100 | <monochrom> | Its dependency is minimal too. Just splitmix (the actual generator) |
2020-11-26 20:40:43 +0100 | <tomsmeding> | the Random class is from the 'random' package, which ghc does not depend on, so you'll need that one at least -- and that ships with a RNG too, so it's all you need |
2020-11-26 20:40:45 +0100 | <dolio> | Similar phenomenon to everyone insisting on ZF(C) as a formal foundation, and getting really obstinate about not using one that lets you write down things similar to what mathematicians actually say in a more direct way. Despite having very little experience actually working formally. :) |
2020-11-26 20:41:00 +0100 | <merijn> | monochrom: As always the blame lies with "people being people" |
2020-11-26 20:41:07 +0100 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) |
2020-11-26 20:41:31 +0100 | <monochrom> | IKR? I'm supposed to be cynical about all humanity. |
2020-11-26 20:41:32 +0100 | <merijn> | There's a super fast RNG in base if you don't care about quality :p |
2020-11-26 20:41:38 +0100 | <merijn> | "4" |
2020-11-26 20:42:44 +0100 | <dolio> | I actually saw someone on MathOverflow recently talking about how the nonsensical propositions in ZF enable 'clever hacks', and that's a good thing. Which makes even less sense than when programmers advocate for it. :) |
2020-11-26 20:42:58 +0100 | <jollygood2> | randomPick xs = (xs!!) <$> randomRIO (0, length xs) |
2020-11-26 20:43:06 +0100 | <tomsmeding> | I mean, if quality is not a great issue, you can write a 128-bit LCG without a large amount of effort or code, which will work fine :p |
2020-11-26 20:43:17 +0100 | <int-e> | merijn: with the xkcd stamp of approval? |
2020-11-26 20:43:28 +0100 | <jollygood2> | length xs - 1 |
2020-11-26 20:43:49 +0100 | <merijn> | int-e: Exactly |
2020-11-26 20:45:43 +0100 | DirefulSalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
2020-11-26 20:48:56 +0100 | orion | (~orion@c-76-19-238-5.hsd1.nh.comcast.net) |
2020-11-26 20:48:56 +0100 | orion | (~orion@c-76-19-238-5.hsd1.nh.comcast.net) (Changing host) |
2020-11-26 20:48:56 +0100 | orion | (~orion@unaffiliated/orion) |
2020-11-26 20:50:10 +0100 | Finianb1 | (~Finianb1@71-218-235-186.hlrn.qwest.net) |
2020-11-26 20:51:18 +0100 | n0042 | (d055ed89@208.85.237.137) (Remote host closed the connection) |
2020-11-26 20:52:40 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
2020-11-26 20:53:20 +0100 | Finianb1 | (~Finianb1@71-218-235-186.hlrn.qwest.net) (Client Quit) |
2020-11-26 20:57:12 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Quit: mputz) |
2020-11-26 20:57:24 +0100 | matta | (~user@24-113-169-116.wavecable.com) |
2020-11-26 20:57:36 +0100 | orion | (~orion@unaffiliated/orion) (Ping timeout: 240 seconds) |
2020-11-26 20:58:16 +0100 | orion | (~orion@c-76-19-238-5.hsd1.ma.comcast.net) |
2020-11-26 20:58:16 +0100 | orion | (~orion@c-76-19-238-5.hsd1.ma.comcast.net) (Changing host) |
2020-11-26 20:58:16 +0100 | orion | (~orion@unaffiliated/orion) |
2020-11-26 20:58:43 +0100 | luke | (~luke@bitnomial/staff/luke) |
2020-11-26 20:59:53 +0100 | iqubic | (~user@2601:602:9500:4870:fa52:51be:1322:705e) |
2020-11-26 20:59:53 +0100 | iqubic | (~user@2601:602:9500:4870:fa52:51be:1322:705e) (Remote host closed the connection) |
2020-11-26 21:01:10 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Ping timeout: 246 seconds) |
2020-11-26 21:03:54 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 21:04:37 +0100 | wonko7 | (~wonko7@2a01:e35:2ffb:7040:55f1:c3a3:cdbe:bf52) (Ping timeout: 260 seconds) |
2020-11-26 21:05:55 +0100 | mpereira | (~mpereira@2a02:810d:f40:d96:857:5d24:8b16:e48) (Ping timeout: 272 seconds) |
2020-11-26 21:05:57 +0100 | juuandyy | (~juuandyy@90.166.144.65) |
2020-11-26 21:07:11 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 21:08:29 +0100 | kuribas | (~user@ptr-25vy0i7d0jyf2exvnea.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
2020-11-26 21:10:59 +0100 | danvet | (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
2020-11-26 21:15:44 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
2020-11-26 21:16:07 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) |
2020-11-26 21:16:27 +0100 | alp | (~alp@2a01:e0a:58b:4920:fc4d:b6b4:4592:5e81) |
2020-11-26 21:18:03 +0100 | orion | (~orion@unaffiliated/orion) (Ping timeout: 260 seconds) |
2020-11-26 21:18:46 +0100 | Fractalis | (~Fractalis@2601:987:280:8d40:8819:4ab1:66e9:952a) |
2020-11-26 21:18:55 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-11-26 21:19:00 +0100 | hackage | ukrainian-phonetics-basic 0.3.1.1 - A library to work with the basic Ukrainian phonetics and syllable segmentation. https://hackage.haskell.org/package/ukrainian-phonetics-basic-0.3.1.1 (OleksandrZhabenko) |
2020-11-26 21:19:08 +0100 | pokid | (~pokid@unaffiliated/pokid) () |
2020-11-26 21:19:20 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 21:19:27 +0100 | nf | (~n@monade.li) (Read error: Connection reset by peer) |
2020-11-26 21:19:30 +0100 | nf__ | (~n@monade.li) |
2020-11-26 21:19:31 +0100 | orion | (~orion@c-76-19-238-5.hsd1.ma.comcast.net) |
2020-11-26 21:19:31 +0100 | orion | (~orion@c-76-19-238-5.hsd1.ma.comcast.net) (Changing host) |
2020-11-26 21:19:31 +0100 | orion | (~orion@unaffiliated/orion) |
2020-11-26 21:19:49 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving) |
2020-11-26 21:19:53 +0100 | Fractalis | (~Fractalis@2601:987:280:8d40:8819:4ab1:66e9:952a) (Client Quit) |
2020-11-26 21:20:18 +0100 | <sondr3> | I want to read a directory and filter out files based on it's extension, I get all the contents fine with `listDirectory`, but as soon as I filter the list it becomes empty |
2020-11-26 21:20:35 +0100 | <sondr3> | I'm probably missing something to do with the IO monad |
2020-11-26 21:21:06 +0100 | nf__ | (~n@monade.li) (Client Quit) |
2020-11-26 21:21:14 +0100 | <monochrom> | Show actual code? |
2020-11-26 21:21:18 +0100 | <shapr> | sondr3: can you pastebin your code? |
2020-11-26 21:21:18 +0100 | wonko7 | (~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net) |
2020-11-26 21:21:19 +0100 | <monochrom> | @where paste |
2020-11-26 21:21:19 +0100 | <lambdabot> | Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com |
2020-11-26 21:21:21 +0100 | <geekosaur> | @where paste |
2020-11-26 21:21:21 +0100 | <lambdabot> | Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com |
2020-11-26 21:21:29 +0100 | nf | (~n@monade.li) |
2020-11-26 21:22:58 +0100 | <Uniaika> | nf: nice reverse host |
2020-11-26 21:23:10 +0100 | <nf> | thanks :) |
2020-11-26 21:23:20 +0100 | <sondr3> | monochrom: geekosaur: https://paste.tomsmeding.com/dboZf8Up |
2020-11-26 21:23:45 +0100 | <avdb> | How do I create on liner if then else cases in Haskell like in C? If I'm not wrong it should be possible with something like "x == foo? Nothing : Maybe a" |
2020-11-26 21:24:07 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2020-11-26 21:24:14 +0100 | <monochrom> | > "aaaa" `isSuffixOf "a" |
2020-11-26 21:24:16 +0100 | <lambdabot> | <hint>:1:20: error: <hint>:1:20: error: parse error on input ‘"’ |
2020-11-26 21:24:16 +0100 | <geekosaur> | sodr3, looks to me like you have your isSuffixOf reversed |
2020-11-26 21:24:26 +0100 | <tomsmeding> | `if x == foo then Nothing else Just a`? avdb |
2020-11-26 21:24:30 +0100 | <shapr> | > if 0 == 1 then "world broken" else "not equal" |
2020-11-26 21:24:33 +0100 | <lambdabot> | "not equal" |
2020-11-26 21:24:43 +0100 | <geekosaur> | it's looking for filenames which are suffixes of "hrx" |
2020-11-26 21:24:44 +0100 | aarvar | (~foewfoiew@50.35.43.33) |
2020-11-26 21:24:54 +0100 | <sondr3> | geekosaur: doh |
2020-11-26 21:25:13 +0100 | aarvar | (~foewfoiew@50.35.43.33) () |
2020-11-26 21:25:22 +0100 | <avdb> | tomsmeding: There was a method with symbols if I'm not wrong, might've just dreamed about it though. |
2020-11-26 21:25:34 +0100 | <avdb> | If then else is already short enough but I don't like the verbosity |
2020-11-26 21:25:52 +0100 | <sondr3> | geekosaur: yep, that was it. Thanks :facepalm: |
2020-11-26 21:26:08 +0100 | <shapr> | avdb: pattern match? applicative? |
2020-11-26 21:26:13 +0100 | <Uniaika> | nf: and I realise just now that you already follow me on Twitter :P |
2020-11-26 21:26:32 +0100 | <tomsmeding> | avdb: `let cond ? (x, y) = if cond then x else y` |
2020-11-26 21:26:43 +0100 | <shapr> | :-D |
2020-11-26 21:26:43 +0100 | <tomsmeding> | but if-then-else is more readable :p |
2020-11-26 21:26:52 +0100 | <nf> | Uniaika: ;D |
2020-11-26 21:27:58 +0100 | elliott__ | (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 260 seconds) |
2020-11-26 21:28:01 +0100 | <int-e> | :t bool |
2020-11-26 21:28:03 +0100 | <lambdabot> | a -> a -> Bool -> a |
2020-11-26 21:28:11 +0100 | <shapr> | whoa, I like mario lang's github profile pic |
2020-11-26 21:28:13 +0100 | juuandyy | (~juuandyy@90.166.144.65) (Quit: Konversation terminated!) |
2020-11-26 21:29:16 +0100 | <int-e> | > bool "nay" "aye" (0 == 1) |
2020-11-26 21:29:18 +0100 | <lambdabot> | "nay" |
2020-11-26 21:30:09 +0100 | <shapr> | that's neat |
2020-11-26 21:30:49 +0100 | <koz_> | Yep, bool is handy sometimes. |
2020-11-26 21:30:51 +0100 | <koz_> | Related: |
2020-11-26 21:30:54 +0100 | <koz_> | :t maybe |
2020-11-26 21:30:56 +0100 | <lambdabot> | b -> (a -> b) -> Maybe a -> b |
2020-11-26 21:30:57 +0100 | <koz_> | :t either |
2020-11-26 21:30:58 +0100 | <lambdabot> | (a -> c) -> (b -> c) -> Either a b -> c |
2020-11-26 21:31:12 +0100 | <int-e> | :t foldr |
2020-11-26 21:31:13 +0100 | <lambdabot> | Foldable t => (a -> b -> b) -> b -> t a -> b |
2020-11-26 21:31:15 +0100 | koz_ | mumbles something about Boehm-Beraducci encodings. |
2020-11-26 21:31:51 +0100 | <shapr> | does anyone have a tutorial for doing advent of code with nix? I'm mostly a nix newbie. |
2020-11-26 21:32:28 +0100 | <int-e> | that question doesn't feel well-typed to me |
2020-11-26 21:32:33 +0100 | tomsmeding | thought nix was a language for package configuration description, not for general-purpose programming |
2020-11-26 21:32:43 +0100 | <tomsmeding> | not that you can't use it for that |
2020-11-26 21:32:56 +0100 | <tomsmeding> | I guess |
2020-11-26 21:32:58 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-11-26 21:33:03 +0100 | <tomsmeding> | may be slow |
2020-11-26 21:33:18 +0100 | <tomsmeding> | anyone up for doing AOC in dhall? |
2020-11-26 21:33:21 +0100 | <koz_> | tomsmeding: You can use it to set up a programming environment, along with your (non-Haskell) deps. |
2020-11-26 21:33:23 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 21:33:25 +0100 | <shapr> | tomsmeding: I have nixOS installed, but I'm still coming to grips with how to do development with it |
2020-11-26 21:33:29 +0100 | <koz_> | I _guess_ that's what's being asked. |
2020-11-26 21:33:58 +0100 | <shapr> | lucky for me, chessai got my most recent app working with nix: https://github.com/shapr/fermatslastmargin/blob/master/shell.nix |
2020-11-26 21:34:14 +0100 | <shapr> | but is that all I need to use any library from hackage? |
2020-11-26 21:34:29 +0100 | <sm[m]> | tomsmeding: definitely not :) |
2020-11-26 21:34:35 +0100 | <shapr> | I've read that some of nix+haskell means I'm limited to a single version of the libraries, is that true? |
2020-11-26 21:35:02 +0100 | <sm[m]> | but I think glguy should use dhall. Slow him down a bit. |
2020-11-26 21:35:05 +0100 | kish` | (~oracle@unaffiliated/oracle) (Ping timeout: 240 seconds) |
2020-11-26 21:35:30 +0100 | hackage | ukrainian-phonetics-basic 0.3.1.2 - A library to work with the basic Ukrainian phonetics and syllable segmentation. https://hackage.haskell.org/package/ukrainian-phonetics-basic-0.3.1.2 (OleksandrZhabenko) |
2020-11-26 21:35:36 +0100 | <shapr> | sm[m]: haha! |
2020-11-26 21:36:23 +0100 | <avdb> | Can you mix list comprehensions with if statements in haskell? |
2020-11-26 21:36:45 +0100 | <koz_> | avdb: You mean, you want to have conditional logic _in_ the list comprehension? |
2020-11-26 21:36:46 +0100 | <avdb> | [x | x <- lst, if x == foo then succ x else x] |
2020-11-26 21:36:49 +0100 | <avdb> | Yes! |
2020-11-26 21:37:07 +0100 | <shapr> | you can also do pattern matches inside the list comp |
2020-11-26 21:37:17 +0100 | <avdb> | how? |
2020-11-26 21:37:56 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
2020-11-26 21:37:56 +0100 | <shapr> | or for extra insanity, there's TransformListComp: https://github.com/shapr/tmuxmarta/blob/master/src/Lib.hs#L65 |
2020-11-26 21:37:59 +0100 | <ski> | there are no `if' statements in Haskell |
2020-11-26 21:38:10 +0100 | <shapr> | but I think I'm the only person who's used TransformListComp in the past few years :-P |
2020-11-26 21:38:38 +0100 | ski | was just reading about them a bit, earlier today |
2020-11-26 21:38:50 +0100 | <ski> | (looking at some of ProfTeggy's papers) |
2020-11-26 21:38:50 +0100 | <tomsmeding> | there are 'if' expressions, though |
2020-11-26 21:38:51 +0100 | <shapr> | ski: I should try some monad comprehensions |
2020-11-26 21:38:58 +0100 | <avdb> | ski: if then else grrr |
2020-11-26 21:39:14 +0100 | <avdb> | I don't know how to use Monads, Functors or any of those exotic tools |
2020-11-26 21:39:16 +0100 | aidecoe | (~aidecoe@unaffiliated/aidecoe) (Ping timeout: 240 seconds) |
2020-11-26 21:39:43 +0100 | <ski> | avdb : do you want to, conditionally, either collect `x' or `succ x', with `x' being drawn from `lst' ? |
2020-11-26 21:39:50 +0100 | <shapr> | avdb: oh functors are so cool! |
2020-11-26 21:39:52 +0100 | <avdb> | Yes |
2020-11-26 21:40:00 +0100 | <shapr> | avdb: it's like "apply this function inside this container" |
2020-11-26 21:40:08 +0100 | <shapr> | avdb: have you used map? |
2020-11-26 21:40:24 +0100 | <ski> | > [if x `mod` 3 == 0 then succ x else x | x <- [0 .. 9]] |
2020-11-26 21:40:27 +0100 | <lambdabot> | [1,1,2,4,4,5,7,7,8,10] |
2020-11-26 21:40:29 +0100 | <shapr> | > map (* (-1)) [1..9] |
2020-11-26 21:40:29 +0100 | <avdb> | Not yet ... |
2020-11-26 21:40:31 +0100 | <lambdabot> | [-1,-2,-3,-4,-5,-6,-7,-8,-9] |
2020-11-26 21:40:32 +0100 | <avdb> | Thanks |
2020-11-26 21:40:32 +0100 | <ski> | something like that ? |
2020-11-26 21:40:49 +0100 | <shapr> | > map (+1) [5..9] |
2020-11-26 21:40:50 +0100 | aidecoe | (~aidecoe@unaffiliated/aidecoe) |
2020-11-26 21:40:52 +0100 | <lambdabot> | [6,7,8,9,10] |
2020-11-26 21:40:57 +0100 | <shapr> | :t map |
2020-11-26 21:40:59 +0100 | <lambdabot> | (a -> b) -> [a] -> [b] |
2020-11-26 21:41:01 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
2020-11-26 21:41:03 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
2020-11-26 21:41:07 +0100 | nullheroes | (~danielvu@168.235.66.22) (Quit: WeeChat 2.9) |
2020-11-26 21:41:14 +0100 | <ski> | > [y | x <- [0 .. 9],let y = if x `mod` 3 == 0 then succ x else x] -- another way to say the same thing |
2020-11-26 21:41:16 +0100 | <shapr> | avdb: map says "give me a function, and a list, and I'll apply the function to each element in the list, and give you the result" |
2020-11-26 21:41:17 +0100 | <lambdabot> | [1,1,2,4,4,5,7,7,8,10] |
2020-11-26 21:41:32 +0100 | <avdb> | I also intentionally ask my questions it in a totally different manner so that I have to edit the code and use my brains :P |
2020-11-26 21:41:34 +0100 | tomsmeding | is happy in this instance that the Haskell legacy hasn't made fmap and map the same thing -- sucks with explaining |
2020-11-26 21:42:12 +0100 | sondr3 | (~sondr3@cm-84.211.56.132.getinternet.no) (Quit: Leaving) |
2020-11-26 21:42:22 +0100 | <ski> | > [y | x <- [0 .. 9],let y | x `mod` 3 == 0 = succ x | otherwise = x] -- yet another variation |
2020-11-26 21:42:23 +0100 | <shapr> | avdb: that's smart, using your brain is good but takes work |
2020-11-26 21:42:24 +0100 | <lambdabot> | [1,1,2,4,4,5,7,7,8,10] |
2020-11-26 21:42:43 +0100 | <avdb> | Oh wow ... you can play with the x on the left hand side? Learned something new today about haskell ... |
2020-11-26 21:42:54 +0100 | <ski> | tomsmeding : they were the same thing, in the past |
2020-11-26 21:43:05 +0100 | <koz_> | avdb: If you've seen set comprehensions, this will feel very familiar. |
2020-11-26 21:43:11 +0100 | <ski> | hm, on the left-hand side of what ? |
2020-11-26 21:43:20 +0100 | <avdb> | Of list comprehensions |
2020-11-26 21:43:31 +0100 | <ski> | do you mean, before the first `|' ? |
2020-11-26 21:43:43 +0100 | <ski> | you can put any expression there |
2020-11-26 21:43:43 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
2020-11-26 21:43:47 +0100 | Deide | (~Deide@217.155.19.23) |
2020-11-26 21:43:51 +0100 | <ski> | including `if'-`then'-`else' expressions |
2020-11-26 21:43:52 +0100 | <tomsmeding> | ski: were they? I've only heard the complaints from people that wanted 'map' gone and have 'fmap' called 'map' for consistency, but maybe those were also not aware that this hasn't always been like that? |
2020-11-26 21:44:07 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
2020-11-26 21:45:00 +0100 | jonatanb | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) |
2020-11-26 21:45:07 +0100 | avdb | (~avdb@ip-81-11-215-86.dsl.scarlet.be) (Quit: avdb) |
2020-11-26 21:45:23 +0100 | <shapr> | ski has been writing Haskell longer than I have! |
2020-11-26 21:45:45 +0100 | <ski> | tomsmeding : <http://www.ki.informatik.uni-frankfurt.de/doc/html/Haskell1.4/standard-prelude.html#$tFunctor> |
2020-11-26 21:46:02 +0100 | <shapr> | wow, that's old school |
2020-11-26 21:46:02 +0100 | <ski> | tomsmeding : also check out `MonadPlus', just below |
2020-11-26 21:46:14 +0100 | <shapr> | I didn't get into Haskell until .. ghc4? ghc5? something like that |
2020-11-26 21:46:32 +0100 | <shapr> | What was the hot new ghc in ~2000 ? |
2020-11-26 21:46:46 +0100 | shapr | checks |
2020-11-26 21:46:47 +0100 | <tomsmeding> | fascinating, (++) in MonadPlus |
2020-11-26 21:46:48 +0100 | <shapr> | ah, april 2001 |
2020-11-26 21:47:10 +0100 | <tomsmeding> | makes sense though |
2020-11-26 21:47:23 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 21:47:23 +0100 | <ski> | oh and `sequence'&`accumulate' in place of `sequence_',`sequence' |
2020-11-26 21:48:01 +0100 | nullheroes | (~danielvu@168.235.66.22) |
2020-11-26 21:48:39 +0100 | <ski> | (i remember noting that in Winstanley's monad tutorial <http://www-users.mat.uni.torun.pl/~fly/materialy/fp/haskell-doc/Monads.html>) |
2020-11-26 21:49:25 +0100 | jonatanb | (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Ping timeout: 264 seconds) |
2020-11-26 21:49:30 +0100 | <dminuoso> | 21:45:45 ski | tomsmeding : <http://www.ki.informatik.uni-frankfurt.de/doc/html/Haskell1.4/standard-prelude.html#$tFunctor> |
2020-11-26 21:49:49 +0100 | <dminuoso> | Academia is one of the few places that knows how to maintain long lived websites, which I think is both a blessing and a curse. |
2020-11-26 21:50:28 +0100 | <ski> | shapr : are you sure ? |
2020-11-26 21:50:38 +0100 | ski | can't recall |
2020-11-26 21:50:54 +0100 | AlterEgo- | (~ladew@124-198-158-163.dynamic.caiway.nl) (Quit: Leaving) |
2020-11-26 21:51:24 +0100 | <monochrom> | dminuoso, I think it's more like "is enabled to" |
2020-11-26 21:51:56 +0100 | <ski> | shapr : you said anniversary's in April ? |
2020-11-26 21:52:03 +0100 | <shapr> | yup |
2020-11-26 21:52:05 +0100 | <int-e> | dminuoso: don't worry, we're working on solutions for that anomaly: https://www.scottaaronson.com/blog/?p=5094 |
2020-11-26 21:52:16 +0100 | <shapr> | April 30th |
2020-11-26 21:52:27 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
2020-11-26 21:52:27 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 21:52:30 +0100 | <int-e> | also... it often happens that a bunch of stuff just disappears when a professor retires or moves to another university |
2020-11-26 21:52:36 +0100 | <ski> | yes |
2020-11-26 21:52:42 +0100 | <shapr> | int-e: that part makes me sad |
2020-11-26 21:52:45 +0100 | jespada | (~jespada@90.254.245.49) (Ping timeout: 240 seconds) |
2020-11-26 21:52:54 +0100 | <shapr> | I still have an ancient smalltalk <-> haskell bridge |
2020-11-26 21:53:07 +0100 | <ski> | or when the department decide to do a "site revamp" |
2020-11-26 21:53:09 +0100 | boxscape | (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) |
2020-11-26 21:53:50 +0100 | <tomsmeding> | making the thing less usable in the process |
2020-11-26 21:53:58 +0100 | <ski> | shapr : that was when you came here ? |
2020-11-26 21:54:00 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Client Quit) |
2020-11-26 21:54:15 +0100 | Lycurgus | (~niemand@98.4.114.74) |
2020-11-26 21:54:15 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-11-26 21:54:27 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 21:54:44 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 21:55:23 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-11-26 21:55:52 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-11-26 21:56:07 +0100 | <shapr> | ski: I think a month later |
2020-11-26 21:56:11 +0100 | knupfer | (~Thunderbi@200116b82c0c5800b48acffffeb6f843.dip.versatel-1u1.de) |
2020-11-26 21:56:11 +0100 | knupfer | (~Thunderbi@200116b82c0c5800b48acffffeb6f843.dip.versatel-1u1.de) (Client Quit) |
2020-11-26 21:56:18 +0100 | jespada | (~jespada@90.254.245.49) |
2020-11-26 21:56:26 +0100 | knupfer | (~Thunderbi@i59F7FFCD.versanet.de) |
2020-11-26 21:56:36 +0100 | <shapr> | someone else created the channel, but the channel was empty and nobody had joined for weeks, so I talked the freenode admins into letting me take ownership |
2020-11-26 21:56:52 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 21:56:55 +0100 | <monochrom> | Namely, a corporate knows too, and it actually knows all too well, precisely why they consciously kill old websites, because they deeply understand that keeping legacy websites is anti-bean-counting. |
2020-11-26 21:56:58 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-11-26 21:57:12 +0100 | <ski> | yea, i remember you've said that. but for some reason, i always figured it'd been around a bit longer than a month |
2020-11-26 21:57:19 +0100 | <shapr> | so I probably started writing Haskell in May or June of 2001 |
2020-11-26 21:57:28 +0100 | <shapr> | ski: I don't remember :-( |
2020-11-26 21:58:09 +0100 | luke | (~luke@bitnomial/staff/luke) (Quit: sleep) |
2020-11-26 21:58:26 +0100 | <monochrom> | A university is more enabled because it attracts fewer bean-counting people, and sometimes more people who think along the line "who dares to take down John Conway's website now!" |
2020-11-26 21:58:30 +0100 | <ski> | i remember i hadn't been on hawiki too long, before finding the `HaskellIRC' page, and came here. and i found the Wiki, because someone mentioned it on <news://comp.lang.functional> |
2020-11-26 21:59:07 +0100 | dftxbs3e | (~dftxbs3e@unaffiliated/dftxbs3e) (Ping timeout: 272 seconds) |
2020-11-26 21:59:38 +0100 | kish` | (~oracle@unaffiliated/oracle) |
2020-11-26 22:00:24 +0100 | <ski> | (but i don't recall when i turned up here, in 2001) |
2020-11-26 22:00:50 +0100 | conal | (~conal@64.71.133.70) |
2020-11-26 22:00:57 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-11-26 22:01:16 +0100 | kish` | (~oracle@unaffiliated/oracle) (Remote host closed the connection) |
2020-11-26 22:01:27 +0100 | fendor | (~fendor@77.119.130.234.wireless.dyn.drei.com) |
2020-11-26 22:01:28 +0100 | acarrico | (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 256 seconds) |
2020-11-26 22:01:32 +0100 | <shapr> | ski: I don't think we had logs then either |
2020-11-26 22:01:42 +0100 | tomsmeding | is barely three years older than this channel then apparently |
2020-11-26 22:01:52 +0100 | <ski> | i remember it was on OpenProjects, then |
2020-11-26 22:01:52 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection) |
2020-11-26 22:01:55 +0100 | <shapr> | I do know that Igloo and Heffalump were early joins to this channel, so they might remember? |
2020-11-26 22:02:01 +0100 | <shapr> | tomsmeding: welcome? |
2020-11-26 22:02:01 +0100 | <ski> | dunno when clog showed up |
2020-11-26 22:02:06 +0100 | <tomsmeding> | :D |
2020-11-26 22:02:10 +0100 | <shapr> | :-D |
2020-11-26 22:02:58 +0100 | <shapr> | I'd actually gotten angry at Haskell and gave up and went to learn Scheme, but then my girlfriend at the time had spent time and money to buy me Haskell books for my birthday, so I tried to pick up Haskell again. |
2020-11-26 22:03:30 +0100 | <ski> | blackdog,arjanb, hmm .. if i think about it, i might be able to remember more names |
2020-11-26 22:03:50 +0100 | tabemann | (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) |
2020-11-26 22:04:17 +0100 | <koz_> | shapr: Thank her for me. :P |
2020-11-26 22:04:25 +0100 | <shapr> | haha |
2020-11-26 22:04:27 +0100 | <koz_> | (if you two are still on speaking terms) |
2020-11-26 22:04:28 +0100 | <Rembane> | shapr: So that you know Haskell is all because of her? :D |
2020-11-26 22:04:31 +0100 | hackage | typson-core 0.1.0.1 - Type-safe PostgreSQL JSON Querying https://hackage.haskell.org/package/typson-core-0.1.0.1 (aaronallen8455) |
2020-11-26 22:04:36 +0100 | <shapr> | Rembane: pretty much, yeah |
2020-11-26 22:04:47 +0100 | <koz_> | True story: I got into CompSci because I was ridiculously attracted to one of my TAs. |
2020-11-26 22:04:54 +0100 | <koz_> | (no seriously) |
2020-11-26 22:05:05 +0100 | <Rembane> | koz_: Seems legit. Did you ask them out on a date? |
2020-11-26 22:05:08 +0100 | kish` | (~oracle@unaffiliated/oracle) |
2020-11-26 22:05:11 +0100 | <koz_> | She wasn't interested. |
2020-11-26 22:05:15 +0100 | <shapr> | too bad |
2020-11-26 22:05:18 +0100 | <koz_> | Ehh. |
2020-11-26 22:05:22 +0100 | <Rembane> | Must've been a disappointment and saved lots of time. |
2020-11-26 22:05:33 +0100 | <Rembane> | shapr: Was it you who did the APL implementation in Haskell? |
2020-11-26 22:05:40 +0100 | <koz_> | I'm glad she wasn't, because our worldviews were about a million miles apart. |
2020-11-26 22:05:41 +0100 | <shapr> | not me, no |
2020-11-26 22:05:45 +0100 | <koz_> | And it would have ended in tears. |
2020-11-26 22:05:55 +0100 | <shapr> | though I would like to read that APL implementation |
2020-11-26 22:06:08 +0100 | <Rembane> | Then I'm mixing you up with someone |
2020-11-26 22:06:24 +0100 | <Rembane> | shapr: If I stumble upon it I promise to send it to you |
2020-11-26 22:06:28 +0100 | <shapr> | yay! |
2020-11-26 22:06:51 +0100 | <shapr> | I built ghcLiVE long years ago, and more recently Fermat's Last Margin |
2020-11-26 22:06:59 +0100 | <shapr> | and some smaller tools like sandwatch |
2020-11-26 22:07:32 +0100 | ski | eats a sandwich |
2020-11-26 22:07:36 +0100 | <Igloo> | shapr: Remember what? |
2020-11-26 22:07:49 +0100 | <shapr> | Igloo: when did you join #haskell the first time? |
2020-11-26 22:07:51 +0100 | <koz_> | ski: Ah yes, the product type of foods. |
2020-11-26 22:08:05 +0100 | <shapr> | Igloo: also, how's life treating you? Do you get paid to write Haskell? |
2020-11-26 22:08:31 +0100 | <shapr> | I'm tempted to rebuild ghcLiVE in a terminal with sixel http://okbob.blogspot.com/2020/08/gnome-terminal-with-sixel-support.html |
2020-11-26 22:08:50 +0100 | <Igloo> | I don't know exactly |
2020-11-26 22:08:58 +0100 | Sgeo_ | (~Sgeo@ool-18b982ad.dyn.optonline.net) |
2020-11-26 22:08:59 +0100 | <Igloo> | I write a few bits here and there :-) |
2020-11-26 22:09:08 +0100 | <shapr> | Igloo: ski and I were trying to figure out when #haskell really got going |
2020-11-26 22:09:28 +0100 | <shapr> | I know I took over founder-ness some weeks / months after the channel was registered, but I don't remember exactly when. |
2020-11-26 22:09:41 +0100 | <Rembane> | When was this? |
2020-11-26 22:09:45 +0100 | <shapr> | sometime in 2001 |
2020-11-26 22:09:46 +0100 | <ski> | 2001 |
2020-11-26 22:09:48 +0100 | <Rembane> | Nice |
2020-11-26 22:09:51 +0100 | <ski> | fun times :) |
2020-11-26 22:09:58 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Ping timeout: 256 seconds) |
2020-11-26 22:10:00 +0100 | hackage | typson-beam 0.1.0.1 - Typson Beam Integration https://hackage.haskell.org/package/typson-beam-0.1.0.1 (aaronallen8455) |
2020-11-26 22:10:08 +0100 | <shapr> | Fewer people here, but all sorts of adventures too |
2020-11-26 22:10:10 +0100 | <Rembane> | I joined nine years later IIRC |
2020-11-26 22:10:17 +0100 | bruce_wayne | (~prateekpr@94.129.87.184) (Ping timeout: 260 seconds) |
2020-11-26 22:10:19 +0100 | <Igloo> | Chanserv says "Registered : Apr 30 22:22:56 2001 (19y 30w 4d ago)" |
2020-11-26 22:10:27 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 22:10:32 +0100 | <shapr> | Igloo: 20th anniversary party coming up! |
2020-11-26 22:10:45 +0100 | <Rembane> | Sweet! |
2020-11-26 22:10:48 +0100 | bruce_wayne | (~prateekpr@94.129.87.184) |
2020-11-26 22:10:54 +0100 | <tomsmeding> | missed the 22:22:22 opportunity there 19 years ago |
2020-11-26 22:10:56 +0100 | <ski> | iirc i'd ambush newbies, asking them about Haskell or so |
2020-11-26 22:11:06 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2020-11-26 22:11:31 +0100 | <Igloo> | But will we still have to party at home alone, shapr? :-) |
2020-11-26 22:11:38 +0100 | elliott__ | (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) |
2020-11-26 22:11:44 +0100 | <ski> | shapr : my vague memory tells me ten to twenty regulars, around the start. does that sound reasonable ? |
2020-11-26 22:11:53 +0100 | <shapr> | yup |
2020-11-26 22:12:01 +0100 | <ski> | we're not alone, in #haskell ! |
2020-11-26 22:12:12 +0100 | geekosaur | (ae68c070@cpe-174-104-192-112.neo.res.rr.com) (Remote host closed the connection) |
2020-11-26 22:12:13 +0100 | Sgeo | (~Sgeo@ool-18b982ad.dyn.optonline.net) (Ping timeout: 264 seconds) |
2020-11-26 22:13:11 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Quit: mputz) |
2020-11-26 22:13:47 +0100 | <shapr> | ski: oh hey, I wrote an email to the haskell .. cafe? so we can find that! |
2020-11-26 22:14:08 +0100 | <shapr> | That's how I got people to show up, I told 'em there were smart academics here having good conversation. |
2020-11-26 22:14:13 +0100 | <shapr> | and when they arrived, it was true! |
2020-11-26 22:14:30 +0100 | <ski> | hm, i don't recall seeing that |
2020-11-26 22:16:03 +0100 | <shapr> | Might have been the main haskell mailing list, I forget |
2020-11-26 22:16:31 +0100 | hackage | phonetic-languages-simplified-properties-lists 0.1.3.1 - A generalization of the uniqueness-periods-vector-properties package. https://hackage.haskell.org/package/phonetic-languages-simplified-properties-lists-0.1.3.1 (OleksandrZhabenko) |
2020-11-26 22:19:06 +0100 | <xerox_> | I wonder where TheHunter ended up |
2020-11-26 22:19:25 +0100 | <ski> | yea .. |
2020-11-26 22:19:36 +0100 | <ski> | and mmorrow,vixey |
2020-11-26 22:19:46 +0100 | hnOsmium0001 | (uid453710@gateway/web/irccloud.com/x-yhbundavwcfojtvb) |
2020-11-26 22:19:52 +0100 | <shapr> | I know where blackdog works ... |
2020-11-26 22:20:13 +0100 | <shapr> | I tracked down TheHunter some years ago, he was still writing code, but I think not Haskell anymore. |
2020-11-26 22:20:39 +0100 | francesco_ | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 22:20:43 +0100 | <shapr> | > 51 / 3 |
2020-11-26 22:20:46 +0100 | <lambdabot> | 17.0 |
2020-11-26 22:21:01 +0100 | boxscape37 | (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) |
2020-11-26 22:21:04 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Read error: Connection reset by peer) |
2020-11-26 22:21:28 +0100 | Gurkenglas | (~Gurkengla@unaffiliated/gurkenglas) |
2020-11-26 22:21:30 +0100 | Lycurgus | (~niemand@98.4.114.74) (Ping timeout: 265 seconds) |
2020-11-26 22:22:24 +0100 | <ski> | i remember at some point i used to obsessively read all the scrollback .. |
2020-11-26 22:23:01 +0100 | hackage | typson-esqueleto 0.1.0.1 - Typson Esqueleto Integration https://hackage.haskell.org/package/typson-esqueleto-0.1.0.1 (aaronallen8455) |
2020-11-26 22:23:02 +0100 | <shapr> | That was humanly possible in the early years. |
2020-11-26 22:23:14 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
2020-11-26 22:23:37 +0100 | boxscape | (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Ping timeout: 264 seconds) |
2020-11-26 22:23:39 +0100 | <shapr> | I used to check the user list when I got on and welcome new people |
2020-11-26 22:24:03 +0100 | <ski> | yea, i remember that, too |
2020-11-26 22:24:11 +0100 | <hpc> | checking the user list used to be humanly possible too |
2020-11-26 22:24:16 +0100 | boxscape37 | boxscape |
2020-11-26 22:24:20 +0100 | <ski> | (remember me doing that, quite possibly after seeing you do it) |
2020-11-26 22:25:05 +0100 | andi- | (~andi-@NixOS/user/andi-) (Ping timeout: 272 seconds) |
2020-11-26 22:25:30 +0100 | hackage | typson-selda 0.1.0.0 - Typson Selda Integration https://hackage.haskell.org/package/typson-selda-0.1.0.0 (aaronallen8455) |
2020-11-26 22:25:30 +0100 | b7471 | (~kvirc@139.30.76.203) |
2020-11-26 22:25:41 +0100 | <b7471> | Hello |
2020-11-26 22:25:50 +0100 | <shapr> | hi b7471 |
2020-11-26 22:25:50 +0100 | <ski> | hello |
2020-11-26 22:26:05 +0100 | <b7471> | i have a small question |
2020-11-26 22:26:11 +0100 | <shapr> | ooh, I have a small answer! |
2020-11-26 22:26:17 +0100 | <b7471> | if a have a if else loop in haskell |
2020-11-26 22:26:26 +0100 | ski | was thinking about something similar .. :) |
2020-11-26 22:26:37 +0100 | <shapr> | hpc: yeah, it's been a few years since that was reasonable |
2020-11-26 22:26:39 +0100 | <b7471> | and i want to print three variables |
2020-11-26 22:26:42 +0100 | <b7471> | how do i do this |
2020-11-26 22:26:51 +0100 | <Rembane> | b7471: What's an if-else-loop? |
2020-11-26 22:26:54 +0100 | <ski> | perhaps you could show your current code ? |
2020-11-26 22:27:11 +0100 | <b7471> | orderTriple(x,y,z)= if x>y && z>y then x else y |
2020-11-26 22:27:17 +0100 | <ski> | loop x = if ..x.. then ... else loop (..x..) -- something like this ? |
2020-11-26 22:27:26 +0100 | <b7471> | orderTriple :: (Int,Int,Int) -> Int |
2020-11-26 22:27:41 +0100 | <ski> | hm, i see no loop in there |
2020-11-26 22:27:51 +0100 | <b7471> | i dont want to output just x , but all the three numbers |
2020-11-26 22:27:59 +0100 | <ski> | @index trace |
2020-11-26 22:28:00 +0100 | <lambdabot> | Debug.Trace |
2020-11-26 22:28:06 +0100 | <ski> | @type Debug.Trace.trace |
2020-11-26 22:28:07 +0100 | <lambdabot> | String -> a -> a |
2020-11-26 22:28:22 +0100 | <b7471> | the function should compare three numbers and "show" them in their orders |
2020-11-26 22:28:43 +0100 | <b7471> | three numbers for example 1,3,2 should show 1,2,3 |
2020-11-26 22:29:08 +0100 | DirefulSalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
2020-11-26 22:29:13 +0100 | <ski> | orderTriple (x,y,z) = trace (concat ["x = ",show x,"\ny = ",show y,"\nz = ",show z,"\n"]) (if x>y && z>y then x else y) |
2020-11-26 22:29:24 +0100 | <ski> | try something like that, after importing `Debug.Trace' |
2020-11-26 22:29:32 +0100 | <shapr> | hpc: do you write Haskell for money? |
2020-11-26 22:29:43 +0100 | DirefulSalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
2020-11-26 22:30:34 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) |
2020-11-26 22:30:35 +0100 | <ski> | b7471 : but be sure to remove `trace' from the code, afterwards ! |
2020-11-26 22:30:43 +0100 | francesco_ | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Remote host closed the connection) |
2020-11-26 22:31:00 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 22:31:13 +0100 | <b7471> | in the code i used cant i just type: then (x,y,z) else (z,x,y) ? |
2020-11-26 22:31:15 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2020-11-26 22:31:20 +0100 | f-a | (~f-a@151.34.157.206) |
2020-11-26 22:31:57 +0100 | <hpc> | shapr: yes, but unfortunately i have to write it in other languages instead ;) |
2020-11-26 22:32:08 +0100 | kasper1 | (~u0_a549@cpc153669-craw9-2-0-cust163.16-3.cable.virginm.net) |
2020-11-26 22:32:14 +0100 | <ski> | b7471 : oh, sure. you can change the result of the function from being a single `Int' to being a triple of `Int's, if you want to |
2020-11-26 22:32:25 +0100 | Varis | (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
2020-11-26 22:32:27 +0100 | <ski> | (but you'll need to change the type signature, to reflect that, naturally) |
2020-11-26 22:32:49 +0100 | <b7471> | how do i print three variable instead of just one (then x else... ) |
2020-11-26 22:33:28 +0100 | <ski> | what if you try what you just said ? |
2020-11-26 22:33:32 +0100 | <ski> | <b7471> in the code i used cant i just type: then (x,y,z) else (z,x,y) ? |
2020-11-26 22:33:45 +0100 | pieguy128 | (~pieguy128@bras-base-mtrlpq5031w-grc-39-70-27-244-102.dsl.bell.ca) (Quit: ZNC 1.7.5 - https://znc.in) |
2020-11-26 22:34:06 +0100 | Stanley00 | (~stanley00@unaffiliated/stanley00) |
2020-11-26 22:36:28 +0100 | <ski> | shapr : fwiw, #haskell is still the channel i like most, i'd say |
2020-11-26 22:36:34 +0100 | pieguy128 | (~pieguy128@bras-base-mtrlpq5031w-grc-39-70-27-244-102.dsl.bell.ca) |
2020-11-26 22:36:47 +0100 | francesco_ | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 22:37:03 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Read error: Connection reset by peer) |
2020-11-26 22:38:07 +0100 | <shapr> | ski: I'm glad, I spent a bunch of years working on the culture. |
2020-11-26 22:38:22 +0100 | <shapr> | not so much the past few though, I've reached the point of "time to write code instead of organize community" |
2020-11-26 22:38:33 +0100 | <shapr> | though I'm tempted to apply to the Haskell Foundation, see if I can help out |
2020-11-26 22:38:33 +0100 | chkno | (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
2020-11-26 22:39:08 +0100 | Stanley00 | (~stanley00@unaffiliated/stanley00) (Ping timeout: 272 seconds) |
2020-11-26 22:39:12 +0100 | chkno | (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 22:39:46 +0100 | keviv | (~keviv@35.142.17.117) (Read error: Connection reset by peer) |
2020-11-26 22:40:03 +0100 | <b7471> | well it is a bit of an improvement. |
2020-11-26 22:40:07 +0100 | andi- | (~andi-@NixOS/user/andi-) |
2020-11-26 22:40:14 +0100 | <b7471> | but i guess i will have to learn a bit more |
2020-11-26 22:40:22 +0100 | keviv | (~keviv@35.142.17.117) |
2020-11-26 22:40:26 +0100 | <b7471> | this haskell thing |
2020-11-26 22:40:49 +0100 | Varis | (~Tadas@unaffiliated/varis) |
2020-11-26 22:40:58 +0100 | <shapr> | b7471: it's fun |
2020-11-26 22:41:21 +0100 | <ski> | shapr : occasionally i may boast a little in other channels about how friendly and welcoming i found #haskell, when i started chatting (and still do), and how i've since attempted to bring some of the same spirit also to other channels in which i've chatted a bit more |
2020-11-26 22:41:30 +0100 | keviv | (~keviv@35.142.17.117) (Read error: Connection reset by peer) |
2020-11-26 22:42:20 +0100 | <ski> | b7471 : got it to type-check, at least ? |
2020-11-26 22:42:48 +0100 | <shapr> | ski: Yeah, I attribute the root of that friendly culture to SPJ |
2020-11-26 22:43:25 +0100 | <b7471> | ski what_ |
2020-11-26 22:43:33 +0100 | <b7471> | pardon? |
2020-11-26 22:43:48 +0100 | <ski> | it's quite possible. he's a very amiable fellow |
2020-11-26 22:44:12 +0100 | <b7471> | i dont understand english that well |
2020-11-26 22:44:16 +0100 | <ski> | b7471 : i mean your `orderTriple' function, after you changed it, according to your last suggestion |
2020-11-26 22:44:29 +0100 | <b7471> | well i tryed it |
2020-11-26 22:44:36 +0100 | <ski> | did you get an error ? |
2020-11-26 22:44:40 +0100 | <b7471> | and it says Error whatever... |
2020-11-26 22:44:41 +0100 | f-a | (~f-a@151.34.157.206) () |
2020-11-26 22:44:42 +0100 | <b7471> | yes |
2020-11-26 22:44:48 +0100 | <ski> | what was the error ? |
2020-11-26 22:45:19 +0100 | <b7471> | just a second |
2020-11-26 22:45:20 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 22:45:24 +0100 | dirediresalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
2020-11-26 22:45:29 +0100 | DirefulSalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
2020-11-26 22:45:49 +0100 | <ski> | shapr : i think it's quite likely been an important factor for the success that Haskell's had |
2020-11-26 22:46:06 +0100 | bruce_wayne | (~prateekpr@94.129.87.184) (Ping timeout: 272 seconds) |
2020-11-26 22:46:25 +0100 | francesco_ | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Ping timeout: 264 seconds) |
2020-11-26 22:46:41 +0100 | <b7471> | with actual type `(Int, Int, Int)' * In the expression: (x, y, y) In the expression: if x > y && z > y then (x, y, y) else y In an equation for `orderTriple': orderTriple (x, y, z) = if x > y && z > y then (x, y, y) else y | 46 | orderTriple(x,y,z)= if x>y && z>y then (x,y,y) else y | ^^^^^^^ Failed, no mod |
2020-11-26 22:46:54 +0100 | <b7471> | lol |
2020-11-26 22:46:55 +0100 | DTZUZU | (~DTZUZU@207.81.171.116) |
2020-11-26 22:47:10 +0100 | keviv | (~keviv@35.142.17.117) |
2020-11-26 22:47:37 +0100 | <ski> | b7471 : yes, you need to change both branches of the `if'-`then'-`else' (both the expression after the `then', and the expression after the `else'), to have the same type |
2020-11-26 22:47:56 +0100 | <ski> | you can't have one of them giving back a number, and the other three numbers |
2020-11-26 22:48:11 +0100 | <b7471> | https://pastebin.com/PnsM6Z7U |
2020-11-26 22:48:16 +0100 | <ski> | the caller of your function wouldn't know what to expect back |
2020-11-26 22:48:37 +0100 | chaosmasttter | (~chaosmast@p200300c4a7107e01f87538c6eac6d35f.dip0.t-ipconnect.de) (Quit: WeeChat 2.9) |
2020-11-26 22:49:33 +0100 | <b7471> | hmm |
2020-11-26 22:50:07 +0100 | <ski> | what if the caller would try to do e.g. `1 + orderTriple (2,3,4)' .. if your code was allowed, it would add `1' to a number, in case the `else' branch was taken, but try to add a number to a triple (which doesn't work, what does that even mean ?), in case the `then' branch was taken |
2020-11-26 22:50:26 +0100 | keviv | (~keviv@35.142.17.117) (Read error: Connection reset by peer) |
2020-11-26 22:50:46 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2020-11-26 22:50:53 +0100 | oxfn | (~dizzy_g@188.162.176.72) |
2020-11-26 22:51:01 +0100 | <ski> | could you repeat your type signature for `orederTriple', btw ? |
2020-11-26 22:51:05 +0100 | bruce_wayne | (~prateekpr@94.129.87.184) |
2020-11-26 22:52:01 +0100 | hackage | ipfs 1.1.5.1 - Access IPFS locally and remotely https://hackage.haskell.org/package/ipfs-1.1.5.1 (expede) |
2020-11-26 22:52:22 +0100 | <b7471> | haskell is not like these other languages |
2020-11-26 22:52:38 +0100 | <b7471> | maybe i not understanding it anyway |
2020-11-26 22:52:42 +0100 | <b7471> | its getting late |
2020-11-26 22:52:58 +0100 | <b7471> | and so i wish you guys a good night |
2020-11-26 22:53:06 +0100 | <ski> | it's a different programming paradigm |
2020-11-26 22:53:21 +0100 | <ski> | it always takes more time to learn a new paradigm, than to learn yet another language in one you already know |
2020-11-26 22:53:25 +0100 | knupfer | (~Thunderbi@i59F7FFCD.versanet.de) (Ping timeout: 240 seconds) |
2020-11-26 22:53:27 +0100 | dhouthoo | (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9) |
2020-11-26 22:53:34 +0100 | <ski> | learning a new one is a bit like learning to program from scratch all over |
2020-11-26 22:53:34 +0100 | <shapr> | b7471: it's worth learning! |
2020-11-26 22:53:47 +0100 | <ski> | good night, b7471. happy Haskell learning ! |
2020-11-26 22:53:51 +0100 | <b7471> | well we shall see |
2020-11-26 22:53:56 +0100 | <b7471> | thanks guy |
2020-11-26 22:54:02 +0100 | <b7471> | goodbye |
2020-11-26 22:54:11 +0100 | <b7471> | thanks guys* |
2020-11-26 22:54:27 +0100 | b7471 | (~kvirc@139.30.76.203) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/) |
2020-11-26 22:55:07 +0100 | maroloccio | (~marolocci@2a02:8084:221:ce00:164f:8aff:fed8:411d) (Quit: WeeChat 2.3) |
2020-11-26 22:55:34 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) |
2020-11-26 22:57:19 +0100 | hidedagger | (~nate@unaffiliated/hidedagger) (Client Quit) |
2020-11-26 22:57:23 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds) |
2020-11-26 22:58:01 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
2020-11-26 22:58:41 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Client Quit) |
2020-11-26 22:59:34 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-11-26 22:59:57 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 23:01:19 +0100 | Rudd0 | (~Rudd0@185.189.115.98) |
2020-11-26 23:01:57 +0100 | kasper1 | (~u0_a549@cpc153669-craw9-2-0-cust163.16-3.cable.virginm.net) ("WeeChat 3.0") |
2020-11-26 23:02:02 +0100 | gproto23 | (~gproto23@unaffiliated/gproto23) (Ping timeout: 256 seconds) |
2020-11-26 23:04:48 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
2020-11-26 23:06:49 +0100 | oxfn | (~dizzy_g@188.162.176.72) (Ping timeout: 264 seconds) |
2020-11-26 23:06:52 +0100 | kritzefitz | (~kritzefit@212.86.56.80) (Remote host closed the connection) |
2020-11-26 23:07:50 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2020-11-26 23:08:29 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
2020-11-26 23:09:37 +0100 | hyperisco | (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 246 seconds) |
2020-11-26 23:10:42 +0100 | <incertia> | is it possible to derive/write instances for type families? |
2020-11-26 23:11:22 +0100 | <incertia> | i have data Test = A | B and type family F (t :: Test) where F 'A = Int, F 'B = Double |
2020-11-26 23:11:46 +0100 | <incertia> | is it possible to get Eq (F t) and/or Show (F t)? |
2020-11-26 23:12:05 +0100 | <hpc> | data Test = A | B deriving (Eq, ...) |
2020-11-26 23:12:30 +0100 | <hpc> | oh wait, misread |
2020-11-26 23:12:56 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) |
2020-11-26 23:13:09 +0100 | <hpc> | F acts more like a type alias than a data type |
2020-11-26 23:13:22 +0100 | <hpc> | so you should already have Eq (F t), for a specific value of t |
2020-11-26 23:13:56 +0100 | <incertia> | right but when i stick it in a data type and try to derive ghc complains |
2020-11-26 23:14:11 +0100 | Franciman | (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Client Quit) |
2020-11-26 23:14:22 +0100 | <incertia> | data MyData t = MyData { yolo :: F t } deriving (Show, Eq) |
2020-11-26 23:14:47 +0100 | chkno | (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
2020-11-26 23:14:59 +0100 | chkno | (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 23:17:02 +0100 | <hpc> | i think it can't figure out those are the only instances of F |
2020-11-26 23:18:46 +0100 | <hpc> | a brute-force way past this could be GADTs |
2020-11-26 23:19:20 +0100 | <hpc> | data MyData t where MyA :: F 'A -> MyData 'A; MyB :: etc etc |
2020-11-26 23:19:31 +0100 | <hpc> | deriving (Show, Eq) |
2020-11-26 23:19:59 +0100 | <incertia> | yeah problem here is there are more records in the actual case |
2020-11-26 23:20:04 +0100 | <incertia> | which need lenses |
2020-11-26 23:20:10 +0100 | <ski> | % data F a = F a a |
2020-11-26 23:20:10 +0100 | <yahb> | ski: |
2020-11-26 23:20:14 +0100 | <ski> | % data MyData t = Show (F t) => MyData { yolo :: F t } |
2020-11-26 23:20:14 +0100 | <yahb> | ski: |
2020-11-26 23:20:23 +0100 | <ski> | % deriving instance Show (MyData t) |
2020-11-26 23:20:23 +0100 | <yahb> | ski: |
2020-11-26 23:20:42 +0100 | <hpc> | oh right, that's a thing |
2020-11-26 23:20:53 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-11-26 23:21:08 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-11-26 23:22:47 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-11-26 23:23:08 +0100 | Feuermagier | (~Feuermagi@213.178.26.41) |
2020-11-26 23:23:16 +0100 | <incertia> | oh cool |
2020-11-26 23:25:25 +0100 | Cale | (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) (Remote host closed the connection) |
2020-11-26 23:28:32 +0100 | Ariakenom | (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Quit: Leaving) |
2020-11-26 23:29:45 +0100 | Cale | (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) |
2020-11-26 23:32:01 +0100 | honigkuchen | (~honigkuch@ip5b42981b.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds) |
2020-11-26 23:34:36 +0100 | Lycurgus | (~niemand@98.4.114.74) |
2020-11-26 23:39:14 +0100 | <incertia> | ok new problem is writing FromJSON |
2020-11-26 23:40:21 +0100 | <incertia> | to expand a bit we have some JSON from some web service and it includes some similar structure all over the place but the actual data is different |
2020-11-26 23:41:01 +0100 | <incertia> | namely you have this object "difficulties": {"easy": ..., "normal": ..., ...} and the values are different depending on context |
2020-11-26 23:41:15 +0100 | <dminuoso> | Is there some library that lets be dump a Forest/Tree from containers straight into a dot file, or some other handy visualization? |
2020-11-26 23:41:18 +0100 | <koz_> | incertia: Are they of (possibly) different types? |
2020-11-26 23:41:28 +0100 | <dminuoso> | My graph is just so wide that drawForest/drawTree dont help much |
2020-11-26 23:41:37 +0100 | <incertia> | one area tells you if the level is present or not and another tells you the actual level stats |
2020-11-26 23:41:43 +0100 | CMCDragonkai1 | (~Thunderbi@120.18.34.2) |
2020-11-26 23:41:59 +0100 | <incertia> | the types are the same within each grouping |
2020-11-26 23:42:12 +0100 | shatriff | (~vitaliish@176.52.219.10) (Remote host closed the connection) |
2020-11-26 23:42:26 +0100 | <koz_> | incertia: So what you're saying is that "easy": might be a JSON string sometimes, and a JSON object sometimes, etc? |
2020-11-26 23:42:28 +0100 | shatriff | (~vitaliish@176.52.219.10) |
2020-11-26 23:42:35 +0100 | <koz_> | Or is "easy" _always_ a JSON string, but might look different? |
2020-11-26 23:42:50 +0100 | <koz_> | (well, the thing associated with "easy"...) |
2020-11-26 23:42:56 +0100 | <koz_> | (gah natural language and my own laziness) |
2020-11-26 23:42:58 +0100 | <incertia> | it might be Bool |
2020-11-26 23:43:00 +0100 | shatriff | (~vitaliish@176.52.219.10) (Remote host closed the connection) |
2020-11-26 23:43:01 +0100 | <incertia> | it might be Object |
2020-11-26 23:43:14 +0100 | <koz_> | Easy hack: parse it the 'targets' into Value. |
2020-11-26 23:43:17 +0100 | shatriff | (~vitaliish@176.52.219.10) |
2020-11-26 23:43:20 +0100 | <koz_> | Then take them apart however you want. |
2020-11-26 23:43:27 +0100 | <incertia> | but you are guaranteed it's either all Bools or all Objects |
2020-11-26 23:43:45 +0100 | <incertia> | and i have a FromJSON for the object |
2020-11-26 23:43:49 +0100 | shatriff | (~vitaliish@176.52.219.10) (Remote host closed the connection) |
2020-11-26 23:43:55 +0100 | <incertia> | LevelData |
2020-11-26 23:44:06 +0100 | shatriff | (~vitaliish@176.52.219.10) |
2020-11-26 23:44:06 +0100 | <koz_> | What does LevelData look like? |
2020-11-26 23:44:27 +0100 | <incertia> | a bunch of records |
2020-11-26 23:44:32 +0100 | vicfred | (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
2020-11-26 23:44:34 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
2020-11-26 23:44:35 +0100 | shatriff | (~vitaliish@176.52.219.10) (Remote host closed the connection) |
2020-11-26 23:44:39 +0100 | <koz_> | Is it a sum type? |
2020-11-26 23:44:43 +0100 | <koz_> | Or just a big record/product? |
2020-11-26 23:44:48 +0100 | <incertia> | data LevelData = LevelData { levelDuration :: Double, levelWhatever :: Integer, ... } |
2020-11-26 23:44:50 +0100 | shatriff | (~vitaliish@176.52.219.10) |
2020-11-26 23:44:52 +0100 | <koz_> | Ah, I see. |
2020-11-26 23:44:56 +0100 | <incertia> | so ez FromJSON here |
2020-11-26 23:44:58 +0100 | cosimone | (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
2020-11-26 23:45:10 +0100 | <koz_> | So it's 'difficulties' that causes issues? |
2020-11-26 23:45:21 +0100 | <koz_> | How do you represent (the equivalent info) in LevelData, or is this undecided? |
2020-11-26 23:45:23 +0100 | shatriff | (~vitaliish@176.52.219.10) (Remote host closed the connection) |
2020-11-26 23:45:43 +0100 | <tdammers> | so... data DifficultyData = DifficultyLevel LevelData | DifficultyBool Bool -- ? |
2020-11-26 23:45:59 +0100 | <incertia> | so now there is data LevelInfo t = LevelInfo { _infoEasy :: ObjectType t, _infoNormal :: ObjectType t } |
2020-11-26 23:46:02 +0100 | <incertia> | etc |
2020-11-26 23:46:02 +0100 | <koz_> | You could do a big sum like that, I guess. |
2020-11-26 23:46:10 +0100 | <incertia> | i want to represent this via type families |
2020-11-26 23:46:15 +0100 | <incertia> | because why not |
2020-11-26 23:46:41 +0100 | <koz_> | Yeah, you're going to have a fun time. |
2020-11-26 23:46:50 +0100 | <koz_> | Is the set of possible ts closed? |
2020-11-26 23:46:53 +0100 | Ariakenom_ | (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Quit: Leaving) |
2020-11-26 23:46:56 +0100 | <incertia> | yes |
2020-11-26 23:47:03 +0100 | <koz_> | Then I would advise a different route. |
2020-11-26 23:47:34 +0100 | <koz_> | Write a separate `FromJSON` for LevelInfo t for each t you care about. |
2020-11-26 23:47:52 +0100 | <incertia> | i can do that? |
2020-11-26 23:47:53 +0100 | <koz_> | If you see common behaviours, abstract out into a function. |
2020-11-26 23:47:56 +0100 | <koz_> | Why not? |
2020-11-26 23:48:02 +0100 | <koz_> | 'instance FromJSON (LevelInfo Bool) where...` |
2020-11-26 23:48:04 +0100 | <koz_> | Then |
2020-11-26 23:48:12 +0100 | <koz_> | 'instance FromJSON (LevelInfo Text) where...' |
2020-11-26 23:48:13 +0100 | <koz_> | etc. |
2020-11-26 23:48:17 +0100 | <koz_> | If the set of types is closed, why not? |
2020-11-26 23:48:35 +0100 | <incertia> | holy shit you're right |
2020-11-26 23:48:46 +0100 | mputz | (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) |
2020-11-26 23:48:48 +0100 | <koz_> | Zero tyfams needed. |
2020-11-26 23:48:59 +0100 | <incertia> | maybe something changed between what i was trying to do with Show/Eq and now |
2020-11-26 23:49:06 +0100 | <incertia> | probably ExistentialQuantification? |
2020-11-26 23:49:08 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-11-26 23:49:15 +0100 | koz_ | shrugs because he dunnos. |
2020-11-26 23:49:28 +0100 | LKoen | (~LKoen@169.244.88.92.rev.sfr.net) (Remote host closed the connection) |
2020-11-26 23:49:55 +0100 | <incertia> | now i just have duplicated code lol |
2020-11-26 23:50:05 +0100 | <koz_> | Then refactor out common behaviour using a function. |
2020-11-26 23:50:17 +0100 | <koz_> | You are in a function language, HOFs exist, use them. |
2020-11-26 23:50:17 +0100 | <incertia> | but that's parseJSON |
2020-11-26 23:50:25 +0100 | CMCDragonkai1 | (~Thunderbi@120.18.34.2) (Ping timeout: 240 seconds) |
2020-11-26 23:50:27 +0100 | <koz_> | Well, it's not 100% duplicated right? |
2020-11-26 23:50:33 +0100 | <koz_> | There has to be some variance. |
2020-11-26 23:50:45 +0100 | <koz_> | s/function/functional/ argh |
2020-11-26 23:51:37 +0100 | <incertia> | https://gist.github.com/incertia/3df23f63d1e4b17bfd5eaa6c16953fc0 |
2020-11-26 23:52:10 +0100 | <incertia> | the issue is essentially collapsing both into instance FromJSON (LevelInfo t) causes ghc to complain |
2020-11-26 23:52:13 +0100 | <koz_> | In that case, 'instance (FromJSON a) => FromJSON (LevelInfo a) where...'. |
2020-11-26 23:52:32 +0100 | <koz_> | Since you're basically going 'parse it however, YOLO'. |
2020-11-26 23:52:38 +0100 | Stanley00 | (~stanley00@unaffiliated/stanley00) |
2020-11-26 23:53:01 +0100 | boxscape | (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Ping timeout: 264 seconds) |
2020-11-26 23:53:23 +0100 | <dminuoso> | incertia: Unrelatedly, you might be interested in RecordWildCards for parseJSON, otherwise you risk subtle line shift bugs, especially if you extend the data types. |
2020-11-26 23:53:42 +0100 | <koz_> | Yeah, this is one time where RecordWildCards is actually useful. |
2020-11-26 23:54:16 +0100 | <incertia> | instance FromJSON (DiffType t) => FromJSON (LevelInfo t) suggests UndecidableInstances |
2020-11-26 23:54:20 +0100 | <incertia> | which is highly dubious |
2020-11-26 23:54:30 +0100 | <koz_> | It's not really. |
2020-11-26 23:54:38 +0100 | santa_1 | (~santa_@217.146.82.202) (Remote host closed the connection) |
2020-11-26 23:54:53 +0100 | <incertia> | it doesn't seem so here but it would be nice to not have to turn this on |
2020-11-26 23:54:54 +0100 | <koz_> | The name is scary, but the reality is that the Paterson conditions are _very_ restrictive. |
2020-11-26 23:54:56 +0100 | LKoen | (~LKoen@169.244.88.92.rev.sfr.net) |
2020-11-26 23:55:01 +0100 | <koz_> | Your instance is terminating, so what's the problem? |
2020-11-26 23:55:08 +0100 | <dminuoso> | incertia: It requires UndecidableInstances because GHC is overly conservative. The worst that can happen if you toggle it on, that GHC might get stuck type checking |
2020-11-26 23:55:10 +0100 | <dminuoso> | That's all. |
2020-11-26 23:55:16 +0100 | <koz_> | Like, _very very_. |
2020-11-26 23:55:18 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2020-11-26 23:55:32 +0100 | <koz_> | Edward proposed a different algorithm to the Paterson conditions, but that didn't go anywhere, sadly. |
2020-11-26 23:56:52 +0100 | <dminuoso> | koz_: Do you have a reference for that? |
2020-11-26 23:57:02 +0100 | <incertia> | guess it makes sense to get rid of the ExistentialQuantification and just use UndecidableInstances then |
2020-11-26 23:57:13 +0100 | Stanley00 | (~stanley00@unaffiliated/stanley00) (Ping timeout: 246 seconds) |
2020-11-26 23:58:38 +0100 | <koz_> | dminuoso: https://github.com/ghc-proposals/ghc-proposals/pull/114 |
2020-11-26 23:59:03 +0100 | <koz_> | (as an extension obv, because you know, Haskell2010 etc etc) |