Logs on 2021-11-05 (liberachat/#haskell)
| 00:00:02 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:25ae:baa7:4680:70ca) (Ping timeout: 260 seconds) |
| 00:08:52 | × | aegon quits (~mike@174.127.249.180) (Remote host closed the connection) |
| 00:13:41 | [_] | is now known as [itchyjunk] |
| 00:13:56 | × | lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Ping timeout: 268 seconds) |
| 00:14:11 | × | Katarushisu quits (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Ping timeout: 264 seconds) |
| 00:15:09 | → | lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
| 00:16:35 | → | Katarushisu joins (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) |
| 00:17:43 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 00:19:23 | × | fryguybob quits (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (Quit: leaving) |
| 00:22:02 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
| 00:23:25 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 00:27:54 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 00:28:54 | → | jespada joins (~jespada@190.7.36.46) |
| 00:32:35 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
| 00:33:12 | → | euandreh joins (~euandreh@2804:14c:33:9fe5:90d0:563b:3279:f95b) |
| 00:47:55 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 00:48:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:54:02 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:02:42 | → | ub joins (~Thunderbi@p548c9652.dip0.t-ipconnect.de) |
| 01:03:53 | × | ubert quits (~Thunderbi@p200300ecdf4fca7ce019fddc82d0353e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 01:03:54 | ub | is now known as ubert |
| 01:03:57 | → | mestre joins (~mestre@191.177.175.57) |
| 01:08:49 | × | acidjnk_new quits (~acidjnk@p200300d0c726704784feaa35b47dd204.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 01:13:09 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 01:14:03 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds) |
| 01:14:26 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 01:17:06 | <awpr> | anybody already making a `type-ord-compat` library? one exists as part of `numeric-kinds`, but it looks like I need to split it out into a standalone library to avoid a cycle, and I want to double-check before I duplicate effort |
| 01:17:13 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 01:18:06 | <awpr> | (https://github.com/google/hs-dependent-literals/commit/65c553447d3c6d083b2886feb44bd3817f121ece turns my previous implementation into a compatibility layer for the one in `base`) |
| 01:19:11 | <awpr> | there's `type-ord`, which is similar, but currently broken, unmodified since 2013, and has no repo link, so... probably not that one |
| 01:22:19 | × | Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
| 01:22:40 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 01:29:44 | × | abrantesasf quits (abrantesas@gateway/vpn/protonvpn/abrantesasf) (Remote host closed the connection) |
| 01:29:55 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:29:56 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 01:29:56 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:32:44 | × | Psybur quits (~Psybur@mobile-166-170-30-165.mycingular.net) (Remote host closed the connection) |
| 01:34:34 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 01:40:30 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 01:46:21 | × | jespada quits (~jespada@190.7.36.46) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:51:18 | → | slack1256 joins (~slack1256@191.125.227.82) |
| 01:52:31 | → | dsamperi joins (~dsamperi@2603-7000-3b42-5400-218f-2d4f-d1df-c673.res6.spectrum.com) |
| 01:58:10 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 268 seconds) |
| 02:01:05 | → | SeungheonOh joins (~Thunderbi@2600:1700:5168:1400:43da:65d:86ef:94ff) |
| 02:01:59 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 02:05:01 | ← | SeungheonOh parts (~Thunderbi@2600:1700:5168:1400:43da:65d:86ef:94ff) () |
| 02:05:07 | → | SeungheonOh joins (~Thunderbi@2600:1700:5168:1400:43da:65d:86ef:94ff) |
| 02:05:50 | → | gzj joins (~GZJ0X@199.193.127.57.16clouds.com) |
| 02:10:25 | × | gzj quits (~GZJ0X@199.193.127.57.16clouds.com) (Client Quit) |
| 02:11:13 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 02:11:13 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 02:11:13 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:15:15 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 02:15:42 | × | SeungheonOh quits (~Thunderbi@2600:1700:5168:1400:43da:65d:86ef:94ff) (Quit: SeungheonOh) |
| 02:16:03 | → | SeungheonOh joins (~Thunderbi@2600:1700:5168:1400:43da:65d:86ef:94ff) |
| 02:16:10 | × | SeungheonOh quits (~Thunderbi@2600:1700:5168:1400:43da:65d:86ef:94ff) (Client Quit) |
| 02:21:30 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Read error: Connection reset by peer) |
| 02:21:42 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 02:26:08 | × | Inst_ quits (~Inst@2601:6c4:4080:3f80:1d49:739d:9075:d5df) (Remote host closed the connection) |
| 02:26:15 | × | nitrix quits (~nitrix@user/nitrix) (Quit: Genius is one percent inspiration and ninety-nine percent perspiration) |
| 02:26:24 | → | Inst_ joins (~Inst@2601:6c4:4080:3f80:1d49:739d:9075:d5df) |
| 02:26:29 | → | nitrix_ joins (~nitrix@user/nitrix) |
| 02:26:53 | nitrix_ | is now known as nitrix |
| 02:27:34 | × | Athas quits (athas@sigkill.dk) (Ping timeout: 260 seconds) |
| 02:27:36 | → | Athas_ joins (athas@2a01:7c8:aaac:1cf:431c:d49e:2f86:91cc) |
| 02:29:18 | → | deni_ joins (~deni@user/deni) |
| 02:29:39 | × | deni quits (~deni@user/deni) (Read error: Connection reset by peer) |
| 02:29:54 | × | kilolympus quits (~kilolympu@185.65.135.177) (Ping timeout: 260 seconds) |
| 02:29:58 | → | alphabeta joins (~kilolympu@185.65.135.177) |
| 02:30:57 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 02:35:02 | × | micro quits (~micro@user/micro) (Ping timeout: 260 seconds) |
| 02:35:37 | × | fizzsegfaultbuzz quits (~segfaultf@135-180-0-138.static.sonic.net) (Remote host closed the connection) |
| 02:35:39 | × | res0nat0r8 quits (~Fletch@dia.whatbox.ca) (Quit: Ping timeout (120 seconds)) |
| 02:35:48 | → | micro joins (~micro@user/micro) |
| 02:35:56 | → | fizzsegfaultbuzz joins (~segfaultf@135-180-0-138.static.sonic.net) |
| 02:35:58 | × | tomjaguarpaw quits (~tom@li367-225.members.linode.com) (Ping timeout: 260 seconds) |
| 02:36:12 | → | res0nat0r8 joins (~Fletch@dia.whatbox.ca) |
| 02:36:21 | → | nshepperd24 joins (~nshepperd@li364-218.members.linode.com) |
| 02:37:14 | → | erisco_ joins (~erisco@d24-57-249-233.home.cgocable.net) |
| 02:37:22 | × | nshepperd2 quits (~nshepperd@li364-218.members.linode.com) (Ping timeout: 260 seconds) |
| 02:37:22 | nshepperd24 | is now known as nshepperd2 |
| 02:37:26 | → | segfaultbuzzfizz joins (~segfaultf@135-180-0-138.static.sonic.net) |
| 02:38:18 | × | energizer quits (~energizer@user/energizer) (Ping timeout: 260 seconds) |
| 02:39:26 | × | yinghua_ quits (~yinghua@2800:2121:1400:900:c56e:96f4:75cd:50ac) (Quit: Leaving) |
| 02:39:49 | × | res0nat0r8 quits (~Fletch@dia.whatbox.ca) (Client Quit) |
| 02:40:01 | → | res0nat0r8 joins (~Fletch@dia.whatbox.ca) |
| 02:41:05 | → | tomjaguarpaw joins (~tom@li367-225.members.linode.com) |
| 02:41:06 | × | erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Ping timeout: 260 seconds) |
| 02:41:06 | erisco_ | is now known as erisco |
| 02:41:20 | × | fizzsegfaultbuzz quits (~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 268 seconds) |
| 02:41:26 | × | slack1256 quits (~slack1256@191.125.227.82) (Ping timeout: 256 seconds) |
| 02:42:57 | → | energizer joins (~energizer@user/energizer) |
| 02:46:52 | × | xff0x quits (~xff0x@2001:1a81:5236:1e00:dda8:eac2:4d01:562e) (Ping timeout: 268 seconds) |
| 02:48:40 | → | xff0x joins (~xff0x@2001:1a81:5273:3700:28cd:42fe:3b9:2637) |
| 02:52:35 | × | Guest4193 quits (~Guest41@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed) |
| 02:52:47 | × | NieDzejkob quits (~quassel@212.87.13.106) (Quit: No Ping reply in 180 seconds.) |
| 02:53:25 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
| 02:54:48 | × | mmhat quits (~mmh@55d4a8dc.access.ecotel.net) (Quit: WeeChat 3.3) |
| 02:58:52 | → | yrlnry joins (~mjd@pool-74-109-22-90.phlapa.fios.verizon.net) |
| 03:00:08 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 03:16:32 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 03:19:06 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:21:50 | → | Guest41 joins (~Guest41@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 03:35:48 | × | alx741 quits (~alx741@181.196.68.55) (Quit: alx741) |
| 03:39:14 | <dsal> | I just tried using Control.Monad.Trans.List and found out it doesn't work. That seems bad. |
| 03:39:48 | × | segfaultbuzzfizz quits (~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 256 seconds) |
| 03:40:08 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:40:08 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 03:40:08 | finn_elija | is now known as FinnElija |
| 03:40:11 | → | mbuf joins (~Shakthi@136.185.75.83) |
| 03:41:51 | <Axman6> | it's that basically the domain of pipes, conduit, streaming etc.? |
| 03:44:56 | × | wroathe quits (~wroathe@user/wroathe) (Quit: Lost terminal) |
| 03:47:50 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 03:48:08 | → | ozzloy_ joins (~ozzloy@ozzloy.lifeafterking.org) |
| 03:48:15 | × | lbseale quits (~lbseale@user/ep1ctetus) (Quit: Leaving) |
| 03:48:32 | → | pgib joins (~textual@173.38.117.89) |
| 03:48:45 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:49:42 | <ozzloy_> | hi |
| 03:50:07 | <Axman6> | Hello! |
| 03:50:37 | <ozzloy_> | i am learning haskell and am stuck on a homework |
| 03:50:52 | <Axman6> | great, what's the problem, and what have you tried? |
| 03:51:13 | <Axman6> | Given that it's homework, we won't give you the answers, but we'll help you find them yourself |
| 03:51:46 | <Axman6> | also, if you have code to share, please use... |
| 03:51:53 | <Axman6> | @where paste |
| 03:51:53 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 03:53:01 | → | Guest99 joins (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net) |
| 03:53:29 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 03:54:27 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 03:54:36 | <ozzloy_> | here https://paste.tomsmeding.com/3nengedR line 66 - 85 show the error for listTree, which starts on line 88 |
| 03:54:58 | <ozzloy_> | i'm not sure why the type is mismatched |
| 03:56:22 | <ozzloy_> | why are j and l Tree a type? |
| 03:56:51 | <ozzloy_> | am i reading that correctly? are they tree types on line 91? |
| 03:57:27 | × | dsamperi quits (~dsamperi@2603-7000-3b42-5400-218f-2d4f-d1df-c673.res6.spectrum.com) (Quit: Konversation terminated!) |
| 03:57:44 | <Axman6> | so, you have the type foldTree :: (b -> a -> b -> b) -> b -> Tree a -> b |
| 03:58:02 | <Axman6> | you want your result to be [a], which means that b must be [a] |
| 03:58:11 | <ozzloy_> | yes |
| 03:58:15 | <ozzloy_> | so far so good? |
| 03:58:26 | <Axman6> | so that gives us: foldTree :: ([a] -> a -> [a] -> [a]) -> [a] -> Tree a -> [a] |
| 03:58:51 | <ozzloy_> | yeah, that makes sense |
| 03:58:58 | <Axman6> | so that means the function you give to foldTree needs to have the type ([a] -> a -> [a] -> [a]) |
| 03:59:29 | <Axman6> | but you have applied listTree to the first and third arguments, which means l and r must be Tree a |
| 03:59:32 | <Axman6> | which is not [a] |
| 03:59:35 | <ozzloy_> | oooh |
| 03:59:45 | <ozzloy_> | right |
| 03:59:49 | <ozzloy_> | ok, so then... |
| 03:59:55 | <Axman6> | you should be able to sort it out from there I hope :) |
| 04:00:56 | <ozzloy_> | lol, maybe? |
| 04:01:09 | <ozzloy_> | i will have to come back to this, shoot. thanks for your help so far |
| 04:01:47 | <Axman6> | basically, your f is trying to do more than it needs to |
| 04:01:52 | <monochrom> | If you use foldTree you are not supposed to use your own recursion on Tree anymore. |
| 04:02:11 | <Axman6> | yeah foldTree abstracts recursion for you |
| 04:06:12 | <Axman6> | ozzloy_: for minTree, can you assume that the tree is ordered? |
| 04:08:28 | <monochrom> | I think no. |
| 04:10:19 | <Axman6> | that makes me sad |
| 04:10:30 | <Axman6> | ... this isn't your course by any chance is it monochrom? :P |
| 04:10:41 | <monochrom> | Nah. |
| 04:11:33 | <Axman6> | I forgot to give me usual warning about whoever runs the course likely being in here... |
| 04:11:34 | <monochrom> | minTree would be no fun and a poor exercise for foldTree if a binary search tree were guaranteed. :) |
| 04:14:16 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:18:12 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.3) |
| 04:19:22 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
| 04:26:12 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 04:27:06 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
| 04:29:01 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:34:58 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 04:38:44 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 256 seconds) |
| 04:39:35 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 04:55:50 | Inst_ | is now known as Inst |
| 04:55:58 | → | segfaultbuzzfizz joins (~segfaultf@135-180-0-138.static.sonic.net) |
| 05:08:42 | → | shidima joins (~shidima@84-104-108-90.cable.dynamic.v4.ziggo.nl) |
| 05:09:42 | × | betelgeuse quits (~betelgeus@94-225-47-8.access.telenet.be) (Quit: The Lounge - https://thelounge.chat) |
| 05:11:22 | → | betelgeuse joins (~betelgeus@94-225-47-8.access.telenet.be) |
| 05:11:30 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 05:13:38 | × | danso quits (~danso@23-233-111-52.cpe.pppoe.ca) (Ping timeout: 268 seconds) |
| 05:13:54 | <ozzloy_> | so f x y z = f x ++ y ++ f z ? |
| 05:14:01 | <ozzloy_> | i'm back |
| 05:14:25 | <ozzloy_> | or ... |
| 05:15:49 | <ozzloy_> | no |
| 05:15:59 | <ozzloy_> | f j k l = j ++ [k] ++ l |
| 05:16:24 | <ozzloy_> | yep |
| 05:16:33 | <ozzloy_> | monochrom, no, tree1 is not sorted |
| 05:17:52 | <ozzloy_> | yeah, that works. ok so now the rose |
| 05:18:02 | <ozzloy_> | something thorny something something |
| 05:20:19 | <ozzloy_> | what does this notation mean: |
| 05:20:34 | <ozzloy_> | data Rose a = Node a [Rose a] |
| 05:20:34 | <ozzloy_> | ? |
| 05:21:12 | <ozzloy_> | it looks like typedef from c or type from ocaml |
| 05:22:47 | <pavonia> | It's the definition of a new type Rose that takes one type parameter a, and has one value constructor Node :: a -> [Rose a] -> Rose a |
| 05:22:57 | <ozzloy_> | there's a type called Rose which consists of a Node with 2 things in it. the two things are a thing of type a and a list of things of type "Rose a"? |
| 05:23:20 | <ozzloy_> | pavonia, thanks |
| 05:24:00 | <ozzloy_> | is "deriving (Show, Eq)" something like mixins in ruby, or implementing interfaces in java? |
| 05:24:40 | <ozzloy_> | oh, so Node is more like a function? |
| 05:24:46 | <ozzloy_> | that takes 2 arguments? |
| 05:25:58 | × | Adran quits (adran@botters/adran) (Ping timeout: 252 seconds) |
| 05:26:06 | <pavonia> | Yes, but it can also be used in patterns to decompose values |
| 05:28:01 | → | Adran joins (~adran@botters/adran) |
| 05:36:55 | × | segfaultbuzzfizz quits (~segfaultf@135-180-0-138.static.sonic.net) (Remote host closed the connection) |
| 05:41:27 | × | Guest41 quits (~Guest41@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed) |
| 05:43:14 | <ozzloy_> | i see |
| 05:43:20 | <ozzloy_> | thanks |
| 05:47:45 | <ozzloy_> | what about the syntax: minTree :: (Ord a) => Tree a -> Maybe a |
| 05:48:58 | <ozzloy_> | the "(Ord a)" part. does that mean a is some type that is orderable? |
| 05:49:37 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:59:41 | <c_wraith> | ozzloy_: yes, that's exactly what it means. |
| 06:01:33 | <ozzloy_> | c_wraith, thanks |
| 06:06:08 | <ski> | <ozzloy_> is "deriving (Show, Eq)" something like mixins in ruby, or implementing interfaces in java? |
| 06:06:11 | <ski> | neither, really |
| 06:06:24 | <ozzloy_> | ski, oh? |
| 06:06:26 | <energizer> | `newtype Fix f = Fix (f (Fix f))` looks kinda magical. can that be written in a less powerful language than haskell? |
| 06:07:00 | <energizer> | i'm still trying to wrap my head around it, maybe porting to a dumber language i know better will help |
| 06:07:00 | <ski> | `deriving' auto-generates instances for type classes (only for a few select, built-in, type classes) |
| 06:07:36 | <ski> | writing an instance of a type for a type class can be more closely compared to implementing an interface in Java .. but there's still important differences |
| 06:07:51 | → | aleator joins (~aleator@188-67-216-232.bb.dnainternet.fi) |
| 06:08:09 | <c_wraith> | energizer: doing exactly what Fix does requires higher-kinded types. So you could do it in Scala, but I can't imagine that makes it easier to understand. |
| 06:08:13 | <ski> | methods of a type class are not bundled with values of the type in question. they're "freestanding" |
| 06:08:59 | <c_wraith> | energizer: but essentially, Fix nests a type infinitely. Fix Maybe is roughly Maybe (Maybe (Maybe (Maybe (Maybe ... |
| 06:09:25 | <c_wraith> | Except with some extra wrappers that prevent the type from being visibly infinite |
| 06:09:30 | <ski> | this means that you can easily do e.g. "binary" methods (like `compare :: a -> a -> Ordering' in `Ord a') or "clone" methods. and that you can have type class methods that don't take an input value of the type in question, at all ! (like `minBound,maxBound :: a' in `Bounded a') |
| 06:10:06 | <energizer> | c_wraith: is `unfix Fix Maybe` the same as `Fix Maybe`? |
| 06:10:20 | <remexre> | is it just me, or does it seem like parsing the . in haskell is really hard at this point? |
| 06:10:31 | <ski> | energizer : `unfix' ? |
| 06:10:51 | <c_wraith> | remexre: it's not just you. RecordDotSyntax took something ridiculous and made it even worse |
| 06:10:56 | <energizer> | nfix :: Fix f -> f (Fix f) |
| 06:10:56 | <energizer> | unfix (Fix f) = f |
| 06:11:15 | <remexre> | at least they didn't do the worst proposal of all worlds, |
| 06:11:25 | <remexre> | foo<<<bar ==> getField @"bar" foo |
| 06:11:49 | <energizer> | s/nfix/unfix/ |
| 06:12:01 | <c_wraith> | energizer: you're mixing type and value levels |
| 06:12:13 | <ski> | ozzloy_ : i suppose you could perhaps liken a parametric instance like e.g. `instance Eq a => Eq [a] where ...' to a mixin .. automatically deriving an instance of `Eq' for `[a]', as soon as you have an instance of `Eq' for `a'. so, since we know `Eq Integer' holds, we also know `Eq [Integer]',`Eq [[Integer]]',&c. holds |
| 06:12:27 | <ski> | (s/parametric/parametric and conditional/) |
| 06:12:43 | <c_wraith> | energizer: unfix operates at the value level. Maybe operates at the type level. Fix is punned to be the name of a value and type |
| 06:12:54 | <energizer> | oh |
| 06:13:06 | <ski> | energizer : do you mean `unfix x', where `x :: Fix Maybe' ? |
| 06:13:14 | <energizer> | ski: yes |
| 06:13:23 | <energizer> | er |
| 06:13:31 | <ski> | well, then `unfix x :: Maybe (Fix Maybe)' |
| 06:13:46 | <energizer> | ok |
| 06:13:51 | <ski> | so `x' and `unfix x' doesn't even have the same type |
| 06:14:17 | <ski> | (and so it doesn't make sense to ask whether they are the same. your question was ill-typed) |
| 06:14:50 | <ski> | energizer : would you like to submit a patch to your question, perhaps ? |
| 06:14:58 | <c_wraith> | energizer: it's worth looking at some values of type Fix Maybe. You've got (Fix Nothing), (Fix (Just (Fix Nothing))), (Fix (Just (Fix (Just (Fix Nothing))))), etc |
| 06:15:40 | <c_wraith> | infinite type doesn't imply infinite value! |
| 06:17:23 | <ski> | % :t fix (Fix . Just) |
| 06:17:23 | <yahb> | ski: Fix Maybe |
| 06:17:37 | <c_wraith> | that one is infinite, yes. :) |
| 06:18:38 | ski | glances at ozzloy_ |
| 06:22:42 | → | Guest41 joins (~Guest41@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 06:23:54 | <Guest41> | I'm wondering if GHC is a single-pass compiler, my guess is no because it wouldn't know the function arity for example so it can't tell how many arguments to parse for each function? |
| 06:23:57 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 06:25:14 | <c_wraith> | The only languages anyone cares about that use single-pass compilers are C and C++. |
| 06:26:25 | <Guest41> | oh, I was writing a parser for a toy language of mine and I thought "omg I need more than one pass, my grammar must be too complicated" x) |
| 06:27:37 | × | brainfreeze quits (~brainfree@2a03:1b20:4:f011::20d) (Remote host closed the connection) |
| 06:28:17 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 06:30:34 | <Axman6> | > iterate (Fix . Just) (Fix Nothing) |
| 06:30:35 | <lambdabot> | error: |
| 06:30:35 | <lambdabot> | • Data constructor not in scope: Fix :: Maybe a -> a |
| 06:30:35 | <lambdabot> | • Perhaps you meant one of these: |
| 06:30:39 | <ski> | Guest41 : the language has no notion of arity. every function takes exactly one argument |
| 06:30:58 | <ski> | try yahb |
| 06:31:03 | <c_wraith> | still, there are fixity declarations, which make Haskell's grammar fully context-sensitive... |
| 06:31:13 | <Axman6> | c_wraith: well, it's also one of the selling points of Go. not worth a whole lot though |
| 06:31:23 | <Axman6> | % iterate (Fix . Just) (Fix Nothing) |
| 06:31:28 | <yahb> | Axman6: [Fix Nothing,Fix (Just (Fix Nothing)),Fix (Just (Fix (Just (Fix Nothing)))),Fix (Just (Fix (Just (Fix (Just (Fix Nothing)))))),Fix (Just (Fix (Just (Fix (Just (Fix (Just (Fix Nothing)))))))),Fix (Just (Fix (Just (Fix (Just (Fix (Just (Fix (Just (Fix Nothing)))))))))),Fix (Just (Fix (Just (Fix (Just (Fix (Just (Fix (Just (Fix (Just (Fix Nothing)))))))))))),Fix (Just (Fix (Just (Fix (Just (Fix (Just |
| 06:31:59 | <Axman6> | ^^^ good software maintenence advice, that gets worse as you go on. Fix Nothing |
| 06:32:19 | → | zaquest joins (~notzaques@5.128.210.178) |
| 06:33:10 | <Guest41> | ski: so how do know how many applications to expect? do you just rely on the type system? |
| 06:33:21 | <ski> | huh ? |
| 06:33:39 | <ski> | what do you mean, "how many applications to expect?" ? |
| 06:33:47 | <Guest41> | no no I'm not making sense, nevermind! I'm better of reading the grammar haha |
| 06:33:51 | <Axman6> | all functions take exactly one argument Guest41 |
| 06:34:00 | <awpr> | > True 4 |
| 06:34:02 | <lambdabot> | error: |
| 06:34:02 | <lambdabot> | • Couldn't match expected type ‘t0 -> t’ with actual type ‘Bool’ |
| 06:34:02 | <lambdabot> | • The function ‘True’ is applied to one argument, |
| 06:34:03 | <Axman6> | this is always true |
| 06:34:05 | <awpr> | this is valid syntax. |
| 06:34:09 | <ski> | you get as many as you get. then you (the type checker) check that it wasn't too many |
| 06:34:47 | <Guest41> | yes but they can return functions that take more arguments and you need to know when you stop taking arguments either because you reached an `a` or there are no more arguments |
| 06:34:49 | <Axman6> | so figuring out the arity of Haskell functions is very east, in fact it can be implemented as const 1 |
| 06:34:50 | <awpr> | the parser doesn't care whether the thing you applied is a function; it's unambiguously a function application either way, and it's up to the type-checker to say whether it makes sense to apply that |
| 06:35:18 | <Axman6> | that's exactly what the type of a value tells you |
| 06:35:21 | <ski> | Guest41 : you only need to know whether each particular application is valid or not. the type checker checks that |
| 06:35:43 | <ski> | none of this "you need to know when you stop taking arguments" nonsense |
| 06:35:45 | × | Inst quits (~Inst@2601:6c4:4080:3f80:1d49:739d:9075:d5df) (Remote host closed the connection) |
| 06:35:52 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 06:36:03 | → | Inst joins (~Inst@2601:6c4:4080:3f80:1d49:739d:9075:d5df) |
| 06:36:38 | <Axman6> | > 7 "Hello" True -- Valid syntax, but the type system doesn't know how to make a function from 7 (but that is also possible) |
| 06:36:39 | <lambdabot> | error: |
| 06:36:39 | <lambdabot> | • No instance for (Num ([Char] -> Bool -> ())) |
| 06:36:39 | <lambdabot> | arising from a use of ‘e_177’ |
| 06:36:50 | <Guest41> | aha, so I'm approaching this the wrong way |
| 06:37:41 | <Axman6> | in fact, you cannot know how many arguments something will ultimately take until you type check it. |
| 06:37:51 | <Guest41> | ski: where can I find haskell's (or any lambda calculus for that matter) grammar, alongside an AST. I'm too scared to open GHC code |
| 06:38:00 | <Axman6> | > printf "A string %s" "Hello" |
| 06:38:02 | <lambdabot> | error: |
| 06:38:02 | <lambdabot> | • Ambiguous type variable ‘a0’ arising from a use of ‘show_M625737254890... |
| 06:38:02 | <lambdabot> | prevents the constraint ‘(Show a0)’ from being solved. |
| 06:38:10 | <Axman6> | > printf "A string %s" "Hello" :: String |
| 06:38:12 | <lambdabot> | "A string Hello" |
| 06:38:38 | <Axman6> | > printf "A string %s, an integer %i" "Hello" (7 :: Integer) :: String |
| 06:38:39 | <lambdabot> | "A string Hello, an integer 7" |
| 06:38:58 | <Axman6> | :t printf |
| 06:38:59 | <lambdabot> | PrintfType r => String -> r |
| 06:39:18 | <ski> | @let instance Num a => Num (rho -> a) where (f + g) r = f r + g r; (f - g) r = f r - g r; (f * g) r = f r * g r; negate f r = negate (f r); abs f r = abs (f r); signum f r = signum (f r); fromInteger n r = fromInteger n |
| 06:39:20 | <lambdabot> | Defined. |
| 06:39:22 | <ski> | @let instance Fractional a => Fractional (rho -> a) where (f / g) r = f r / g r; recip f r = recip (f r); fromRational x r = fromRational x |
| 06:39:23 | <lambdabot> | Defined. |
| 06:39:30 | <Axman6> | what the compiler _does_ know is how many arguments something has been _applied_ to |
| 06:39:39 | <ski> | > 7 "Hello" True -- now the type system accepts it |
| 06:39:40 | <lambdabot> | 7 |
| 06:41:02 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 06:41:26 | <Guest41> | so your code can influence the type system's decision too ... |
| 06:41:43 | <ski> | M ∷= x |
| 06:41:46 | <ski> | │ λ x . M |
| 06:41:47 | <Axman6> | well of course, you can define new types |
| 06:41:48 | <ski> | │ M M |
| 06:41:56 | <ski> | Guest41 : lambda-calculus grammar ^ |
| 06:42:21 | <Axman6> | Haskell is just sexy syntax for that |
| 06:42:29 | <ski> | (abstract syntax, so no production for brackets. add that, if you want concrete syntax) |
| 06:45:25 | <ski> | > [(id^2 - id + 1) n | n <- [-3 .. 3]] |
| 06:45:26 | <lambdabot> | [13,7,3,1,1,3,7] |
| 06:45:59 | × | Inst quits (~Inst@2601:6c4:4080:3f80:1d49:739d:9075:d5df) (Ping timeout: 264 seconds) |
| 06:46:06 | <ski> | > [[(fst^2 - fst*snd + snd^2) (m,n) | n <- [-2 .. 2]] | m <- [-2 .. 2]] |
| 06:46:08 | <lambdabot> | [[4,3,4,7,12],[3,1,1,3,7],[4,1,0,1,4],[7,3,1,1,3],[12,7,4,3,4]] |
| 06:46:56 | <int-e> | . o O ( not confusing at all ) |
| 06:47:39 | <ski> | > [(cos^2 + sin^2) (n*pi/4) | n <- [-2 .. 2]] |
| 06:47:41 | <lambdabot> | [1.0,1.0,1.0,1.0,1.0] |
| 06:48:21 | <int-e> | > let _1 = const; _2 = flip const in (_1^2 - _1*_2 + _2^2) <$> [-2..2] <*> [-2..2] |
| 06:48:22 | <lambdabot> | [4,3,4,7,12,3,1,1,3,7,4,1,0,1,4,7,3,1,1,3,12,7,4,3,4] |
| 06:48:43 | <ski> | yeap :) |
| 06:50:10 | <ski> | anyway, this is "just" "pointwise definition" of the arithmetical operations, in terms of the corresponding arithmetical operations on the result of the functions |
| 06:50:44 | <ski> | a more amusing example of something similar may be |
| 06:51:21 | <ski> | > sortBy (comparing length <> compare) (words "The quick brown fox jumps over the lazy dog") |
| 06:51:23 | <lambdabot> | ["The","dog","fox","the","lazy","over","brown","jumps","quick"] |
| 06:51:49 | → | doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) |
| 06:51:52 | <ski> | (primarily sort by length, secondarily by ordinary (lexicographic) order on the words (of the same length)) |
| 06:52:02 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 06:53:59 | <ski> | this is using the "pointwise" definition of `(<>)', like `(f <> g) r = f r <> g r'. this way, `comparing length <> compare' amounts to `\x y -> comparing length x y <> compare x y'. so now we're down to `<>' on `Ordering' .. which happens to be defined in the correct way to pull off this lexicographic ordering ("primarly order by this, secondarily by that") |
| 06:54:57 | <ski> | @where monoids |
| 06:54:57 | <lambdabot> | comment on "Monoids? In my programming language?" by Cale in 2008 (or 2009 ?) at <http://www.reddit.com/r/programming/comments/7cf4r/monoids_in_my_programming_language/c06adnx> about a use of ` |
| 06:54:57 | <lambdabot> | instance Monoid a => Monoid (rho -> a)' |
| 06:55:32 | <ozzloy_> | ski, thanks! |
| 06:55:39 | × | Guest41 quits (~Guest41@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed) |
| 06:56:01 | × | shidima quits (~shidima@84-104-108-90.cable.dynamic.v4.ziggo.nl) (Ping timeout: 268 seconds) |
| 06:56:10 | <ski> | (although, nowadays `(<>)' is in `Semigroup', which is a (new) superclass of `Monoid'. also, that post uses the name `(++)', rather than `(<>)'/`mappend') |
| 06:57:06 | <ski> | anyway, the definition here would be |
| 06:57:25 | <ski> | (<>) :: Ordering -> Ordering -> Ordering |
| 06:57:37 | <ski> | LT <> _ = LT |
| 06:57:42 | <ski> | GT <> _ = GT |
| 06:57:51 | <ski> | EQ <> o = o |
| 06:58:18 | <ski> | so, only in case the comparision to the left turned out to be equal, do we look at (force) the comparision to the right |
| 07:00:29 | <ozzloy_> | i am now stuck on sumRose https://paste.tomsmeding.com/caDJTMZT and maybe on foldRose |
| 07:00:43 | <ozzloy_> | line 88 gives the error starting at line 93 |
| 07:01:23 | <int-e> | :t (+) |
| 07:01:24 | <lambdabot> | Num a => a -> a -> a |
| 07:01:57 | <int-e> | ozzloy_: you need to use (+) instead of + there |
| 07:02:18 | <int-e> | :t foldr + ?n ?r |
| 07:02:19 | <lambdabot> | (Num b, Foldable t1, ?n::t2 -> (a -> b -> b) -> b -> t1 a -> b, ?r::t2) => (a -> b -> b) -> b -> t1 a -> b |
| 07:02:32 | <ozzloy_> | oh |
| 07:02:33 | <int-e> | :t foldr (+) ?n ?r |
| 07:02:34 | <lambdabot> | (Foldable t, Num b, ?n::b, ?r::t b) => b |
| 07:02:37 | <ozzloy_> | oooh |
| 07:02:49 | <ski> | `foldr + n r' parses as `foldr + (n r)' |
| 07:02:50 | <int-e> | unfortunately the former has a type so the error is attributed to line 88 instead |
| 07:03:08 | <ozzloy_> | got it |
| 07:03:17 | <ozzloy_> | so my definition of foldRose is good? |
| 07:03:29 | <ozzloy_> | line 84 |
| 07:03:32 | <ski> | yes |
| 07:03:33 | <int-e> | @undef |
| 07:03:33 | <lambdabot> | Undefined. |
| 07:03:36 | <int-e> | :t foldr + ?n ?r |
| 07:03:37 | <lambdabot> | (Num ((a -> b -> b) -> b -> t1 a -> b), Foldable t1, ?n::t2 -> (a -> b -> b) -> b -> t1 a -> b, ?r::t2) => (a -> b -> b) -> b -> t1 a -> b |
| 07:03:40 | <ozzloy_> | thanks |
| 07:06:01 | × | ubert quits (~Thunderbi@p548c9652.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 07:07:20 | Athas_ | is now known as Athas |
| 07:08:21 | → | pony joins (sid524992@smol/hors) |
| 07:12:15 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 07:12:52 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 07:12:54 | → | michalz joins (~michalz@185.246.204.40) |
| 07:17:58 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 07:19:23 | × | typedfern_ quits (~Typedfern@171.red-83-51-60.dynamicip.rima-tde.net) (Remote host closed the connection) |
| 07:27:11 | → | fendor joins (~fendor@178.115.33.172.wireless.dyn.drei.com) |
| 07:28:37 | → | kenran joins (~kenran@b2b-37-24-119-190.unitymedia.biz) |
| 07:32:06 | × | mbuf quits (~Shakthi@136.185.75.83) (Quit: Leaving) |
| 07:32:33 | <sshine> | I'm trying to write a servant-client type for an API that has one endpoint that lets me search for two different kinds of things (company names, company details). if this were req/wreq, I made a data SearchQuery = SearchX X | SearchY Y, and made it a ToJSON instance. |
| 07:34:23 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:76a9:f65d:22e8:2e7b) |
| 07:34:59 | <sshine> | but so far I've just had the search function return an IO Value. I'm not sure if I should create a union type for the kinds of things that it can find... I guess I'll just have to disambiguate later, depending on the context. |
| 07:35:49 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 07:36:04 | → | danso joins (~danso@23-233-111-52.cpe.pppoe.ca) |
| 07:36:58 | × | son0p- quits (~ff@181.136.122.143) (Ping timeout: 260 seconds) |
| 07:37:09 | → | chomwitt joins (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374) |
| 07:37:21 | → | trcc joins (~trcc@2-104-60-169-cable.dk.customer.tdc.net) |
| 07:42:20 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 07:42:30 | × | trcc quits (~trcc@2-104-60-169-cable.dk.customer.tdc.net) (Ping timeout: 260 seconds) |
| 07:43:08 | → | trcc joins (~trcc@2-104-60-169-cable.dk.customer.tdc.net) |
| 07:47:39 | <sshine> | type MyApi = "blah" :> ReqBody '[JSON] SearchQuery :> Post '[JSON] [SearchResult] -- it becomes a little generic, but at least symmetric. |
| 07:49:55 | → | vysn joins (~vysn@user/vysn) |
| 07:53:16 | → | shidima joins (~shidima@46.44.183.25) |
| 07:57:12 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.3) |
| 08:00:27 | × | shidima quits (~shidima@46.44.183.25) (Remote host closed the connection) |
| 08:05:14 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 08:08:45 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
| 08:11:57 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 08:12:45 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:15:56 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 08:16:19 | → | chele joins (~chele@user/chele) |
| 08:17:27 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 08:17:52 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 08:19:30 | × | hendursa1 quits (~weechat@user/hendursaga) (Remote host closed the connection) |
| 08:19:59 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 08:20:14 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 08:21:05 | → | vpan joins (~0@212.117.1.172) |
| 08:25:32 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 08:30:11 | → | max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
| 08:37:07 | → | kuribas joins (~user@ptr-25vy0i9zmp0qcl8wvlj.18120a2.ip6.access.telenet.be) |
| 08:41:28 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 08:42:16 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 08:42:53 | → | MoC joins (~moc@user/moc) |
| 08:43:53 | × | pop3 quits (~pop3@user/pop3) (Remote host closed the connection) |
| 08:45:01 | → | pop3 joins (~pop3@user/pop3) |
| 08:45:50 | × | phma quits (~phma@host-67-44-209-61.hnremote.net) (Read error: Connection reset by peer) |
| 08:46:09 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 08:46:17 | → | phma joins (~phma@host-67-44-209-61.hnremote.net) |
| 08:47:50 | → | Kaipi joins (~Kaiepi@156.34.44.192) |
| 08:48:18 | × | hongminhee quits (sid295@id-295.tinside.irccloud.com) (Ping timeout: 260 seconds) |
| 08:48:28 | → | hongminhee joins (sid295@id-295.tinside.irccloud.com) |
| 08:49:07 | → | alzgh joins (~alzgh@user/alzgh) |
| 08:50:38 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Ping timeout: 260 seconds) |
| 08:52:30 | → | cosimone joins (~user@93-44-186-19.ip98.fastwebnet.it) |
| 08:53:19 | × | Guest4382 quits (~cat@h-98-128-128-173.A351.priv.bahnhof.se) (Remote host closed the connection) |
| 08:54:22 | × | Guest99 quits (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
| 08:55:01 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 08:55:46 | → | acidjnk_new joins (~acidjnk@p200300d0c726704784feaa35b47dd204.dip0.t-ipconnect.de) |
| 08:57:45 | → | __monty__ joins (~toonn@user/toonn) |
| 08:58:33 | × | Kaipi quits (~Kaiepi@156.34.44.192) (Quit: Leaving) |
| 08:58:58 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 09:00:06 | × | shiraeeshi[m] quits (~shiraeesh@2001:470:69fc:105::1:77) (Quit: You have been kicked for being idle) |
| 09:00:14 | × | hsek[m] quits (~hsekmatri@2001:470:69fc:105::d18f) (Quit: You have been kicked for being idle) |
| 09:00:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:09:53 | × | polux quits (~polux@51.15.169.172) (Quit: The Lounge - https://thelounge.github.io) |
| 09:10:22 | → | polux joins (~polux@51.15.169.172) |
| 09:12:27 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 09:14:11 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 264 seconds) |
| 09:16:14 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 09:17:00 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 09:17:14 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
| 09:17:42 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 09:20:18 | × | hightower2 quits (~hightower@213.147.110.20) (Ping timeout: 268 seconds) |
| 09:22:07 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Read error: Connection reset by peer) |
| 09:22:10 | × | _xor quits (~xor@72.49.199.147) (Ping timeout: 268 seconds) |
| 09:22:19 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 09:22:30 | × | juhp quits (~juhp@128.106.188.220) (Remote host closed the connection) |
| 09:22:46 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
| 09:23:50 | × | ski quits (~ski@remote12.chalmers.se) (Ping timeout: 260 seconds) |
| 09:24:03 | → | ski joins (~ski@remote12.chalmers.se) |
| 09:24:05 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 264 seconds) |
| 09:25:46 | → | notzmv joins (~zmv@user/notzmv) |
| 09:26:15 | × | shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit) |
| 09:27:56 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 09:28:11 | × | df quits (~ben@justworks.xyz) (Ping timeout: 246 seconds) |
| 09:28:19 | → | ubert joins (~Thunderbi@p200300ecdf4fcafee019fddc82d0353e.dip0.t-ipconnect.de) |
| 09:28:28 | → | df joins (~ben@justworks.xyz) |
| 09:28:41 | → | cfricke joins (~cfricke@user/cfricke) |
| 09:33:39 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 09:34:16 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 09:35:26 | × | ubert quits (~Thunderbi@p200300ecdf4fcafee019fddc82d0353e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 09:41:30 | × | mestre quits (~mestre@191.177.175.57) (Quit: Lost terminal) |
| 09:44:44 | × | fendor quits (~fendor@178.115.33.172.wireless.dyn.drei.com) (Remote host closed the connection) |
| 09:45:18 | → | johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl) |
| 09:46:50 | × | Codaraxis quits (~Codaraxis@user/codaraxis) (Ping timeout: 268 seconds) |
| 09:52:01 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) |
| 10:00:43 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 10:01:08 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 10:05:47 | → | _xor joins (~xor@72.49.199.147) |
| 10:06:30 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.3) |
| 10:11:39 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 10:12:00 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 10:12:39 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 10:13:37 | × | dsrt^ quits (~dsrt@wsip-98-188-242-6.mc.at.cox.net) (Remote host closed the connection) |
| 10:14:02 | → | nschoe joins (~quassel@2a01:e0a:8e:a190:161c:6858:2d6b:fc1f) |
| 10:15:42 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 10:16:01 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 10:16:16 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 10:19:46 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 10:20:42 | × | johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 260 seconds) |
| 10:21:23 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Ping timeout: 264 seconds) |
| 10:24:16 | → | mmhat joins (~mmh@55d4b909.access.ecotel.net) |
| 10:24:25 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 256 seconds) |
| 10:28:08 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 10:28:39 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 10:29:31 | → | desantra joins (~skykanin@user/skykanin) |
| 10:33:37 | → | madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net) |
| 10:36:29 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 10:37:10 | → | DNH joins (~DNH@2a02:8108:1100:16d8:e9ee:3bd5:4988:8148) |
| 10:41:51 | × | phma quits (~phma@host-67-44-209-61.hnremote.net) (Read error: Connection reset by peer) |
| 10:42:31 | → | phma joins (~phma@host-67-44-208-102.hnremote.net) |
| 10:43:11 | → | timCF joins (~timCF@200-149-20-81.sta.estpak.ee) |
| 10:45:55 | <timCF> | Hello! In my program I do need Generic instance of UTCTime (to derive Generic for my own types which are using UTCTime), but seems like standard UTCTime does not export all constructors, and GHC refuses to stock derive Generic |
| 10:46:03 | <timCF> | What's the best option there? |
| 10:46:18 | <timCF> | Write orphan Generic instance for UTCTime by hand? |
| 10:47:09 | <timCF> | Not sure it's also possible because of missing constructors in scope |
| 10:47:50 | → | msmhnd^ joins (~msmhnd@wsip-98-188-242-6.mc.at.cox.net) |
| 10:48:19 | × | pop3 quits (~pop3@user/pop3) (Remote host closed the connection) |
| 10:49:59 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 10:50:25 | → | pop3 joins (~pop3@user/pop3) |
| 10:52:13 | <[exa]> | timCF: can you derive from Data ? both DiffTime and Day (in UTCTime) seem to have Data |
| 10:52:49 | <timCF> | [exa]: you mean it's possible to use Data to manually write orphan Generic instance? |
| 10:53:00 | <maerwald> | timCF: duplicate the type internally and then unsafeCoerce to make sure your functions always take the original UTCTime only |
| 10:54:09 | <maerwald> | that's the only way to really get around non-exported constructors |
| 10:55:16 | <timCF> | maerwald: ouch |
| 10:55:25 | <timCF> | maerwald: but thanks for reply! |
| 10:55:33 | → | Cajun joins (~Cajun@user/cajun) |
| 10:57:13 | <Hecate> | hi |
| 10:57:22 | <geekosaur> | œ |
| 10:59:36 | × | chomwitt quits (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374) (Ping timeout: 268 seconds) |
| 11:00:53 | → | alx741 joins (~alx741@181.196.68.55) |
| 11:02:04 | → | jumper149 joins (~jumper149@80.240.31.34) |
| 11:02:46 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 11:07:56 | → | johnny_sitar joins (~artur@ip-89-161-55-249.tel.tkb.net.pl) |
| 11:08:03 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 11:12:23 | × | johnny_sitar quits (~artur@ip-89-161-55-249.tel.tkb.net.pl) (Ping timeout: 264 seconds) |
| 11:16:38 | × | pop3 quits (~pop3@user/pop3) (Remote host closed the connection) |
| 11:17:26 | → | pop3 joins (~pop3@user/pop3) |
| 11:23:15 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.3) |
| 11:25:11 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 11:28:34 | → | johnny_sitar joins (~artur@user-5-173-132-197.play-internet.pl) |
| 11:29:57 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 11:40:23 | → | Lycurgus joins (~juan@98.4.112.204) |
| 11:40:33 | → | boxscape_ joins (~boxscape_@134.171.69.87) |
| 11:40:45 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 11:41:22 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 11:41:46 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.3) |
| 11:42:38 | → | kammao joins (~kammao@188.27.128.253) |
| 11:43:52 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 11:44:10 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Client Quit) |
| 11:44:42 | <kammao> | Hello! Any of you guys used Heroku with a haskell app? I'm having quite a bit of trouble with the Procfile.. Heroku does not find the directory that I give it therefore the app crashes even if it's deployed |
| 11:44:54 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 11:45:21 | × | desantra quits (~skykanin@user/skykanin) (Quit: WeeChat 3.3) |
| 11:45:43 | <Lycurgus> | you are not the first person to come here with that complaint |
| 11:46:25 | × | mmhat quits (~mmh@55d4b909.access.ecotel.net) (Quit: WeeChat 3.3) |
| 11:46:30 | <Lycurgus> | and this would not be the first time I responded that heroku doesn't really do hs, but that may have changed by now, your complaint notwithstanding |
| 11:48:10 | <kammao> | Ahh..That's encouraging!! I used the Yesod Framework and followed their guide to deploy this so I thought It would be a clear process and maybe I was missing something |
| 11:48:19 | × | nschoe quits (~quassel@2a01:e0a:8e:a190:161c:6858:2d6b:fc1f) (Ping timeout: 268 seconds) |
| 11:48:59 | → | whez joins (sid470288@id-470288.lymington.irccloud.com) |
| 11:50:47 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Ping timeout: 268 seconds) |
| 11:50:54 | <Lycurgus> | prolly snippets and toy apps will work |
| 11:54:27 | <kammao> | It's just a simple blog.. I couldn't really figure out in the Procfile `web: ./dist/bin/{app}/{app} -p $PORT` how I should approach the path differently? Or how can I check that I'm using a wrong path since most of the websites that I've seen use that specific location.. |
| 11:54:29 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 11:57:14 | → | sudden joins (~cat@h-98-128-128-173.A351.priv.bahnhof.se) |
| 11:57:35 | × | sudden quits (~cat@h-98-128-128-173.A351.priv.bahnhof.se) (Changing host) |
| 11:57:35 | → | sudden joins (~cat@user/sudden) |
| 11:57:35 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 11:58:52 | <Lycurgus> | by coming to know what path the stuff ur using requires |
| 12:03:21 | → | gentauro joins (~gentauro@user/gentauro) |
| 12:06:06 | × | Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt) |
| 12:10:47 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 12:12:27 | × | aleator quits (~aleator@188-67-216-232.bb.dnainternet.fi) (Ping timeout: 260 seconds) |
| 12:13:05 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 12:14:53 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 12:15:34 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 12:19:42 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 12:19:48 | × | kenran quits (~kenran@b2b-37-24-119-190.unitymedia.biz) (Quit: WeeChat info:version) |
| 12:20:38 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Ping timeout: 260 seconds) |
| 12:23:16 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 12:23:34 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 12:23:35 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 12:23:54 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:24:32 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 12:27:11 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 12:28:05 | → | werner100 joins (~werner100@2601:2c2:400:4440:dc41:dccb:7773:558f) |
| 12:30:13 | × | yrlnry quits (~mjd@pool-74-109-22-90.phlapa.fios.verizon.net) (Ping timeout: 256 seconds) |
| 12:30:14 | × | xsperry quits (~xs@user/xsperry) () |
| 12:30:20 | <werner100> | Hi everyone, yesterday I was reviewing the libraries available for handling command line options and arguments. I have experimented with cmdargs and it seems to do what I need. Which library are you guys using? |
| 12:30:38 | × | kammao quits (~kammao@188.27.128.253) (Quit: Client closed) |
| 12:30:47 | <geekosaur> | optparse=applicative is common |
| 12:30:58 | <geekosaur> | s/=/-/ |
| 12:33:21 | → | chomwitt joins (~chomwitt@ppp-2-85-245-90.home.otenet.gr) |
| 12:35:00 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 12:36:16 | <maerwald> | I just started using cmdargs too |
| 12:36:25 | <maerwald> | optparse-applicative is powerful, but not very declarative |
| 12:36:33 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
| 12:37:50 | <maerwald> | but cmdargs has oddities: invalid configuration crashes at runtime instead of raising a type error |
| 12:38:11 | <maerwald> | not hard to test, but yeah |
| 12:39:03 | <maerwald> | exampe https://paste.tomsmeding.com/qf6oVZZP |
| 12:42:08 | <maerwald> | you also can't have mandatory flags |
| 12:43:15 | × | doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 256 seconds) |
| 12:43:21 | <werner100> | I found it handy but was looking for hooks to connect custom argument handling functions. It does a nice job for help, version, and when options are missing or incomplete. But it seems for processing other options and particularly commands/modes you need to tool your own parser. |
| 12:44:07 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 12:44:13 | <werner100> | Today, I'm going to look at System.Console.ArgParser. |
| 12:44:14 | → | Lycurgus joins (~juan@98.4.112.204) |
| 12:45:14 | <Lycurgus> | shouldn't the topic be adjusted? |
| 12:45:50 | <geekosaur> | for the logs being down? I hope that'll be fixed soon, the kerfuffle seems to be over |
| 12:46:02 | <Lycurgus> | "Archived" added before Public would do it |
| 12:46:09 | <Lycurgus> | they're not down |
| 12:46:47 | <Lycurgus> | they are turned off |
| 12:46:55 | <geekosaur> | right |
| 12:47:12 | <Lycurgus> | who are the parties? |
| 12:47:51 | → | zincy joins (~tom@2a00:23c8:970c:4801:e02d:7bbd:5337:7d58) |
| 12:48:17 | <Lycurgus> | (contend in the GDPR issue) |
| 12:48:19 | <zincy> | Why do so many coders love regular expressions for validation? |
| 12:48:21 | <Lycurgus> | *contending |
| 12:48:49 | <geekosaur> | zincy, because it's what they know about |
| 12:48:54 | <Lycurgus> | zincy because of the power as a solution to string recognition and processing? |
| 12:48:58 | × | sudden quits (~cat@user/sudden) (Quit: leaving) |
| 12:49:01 | <geekosaur> | (not necessarily know, just know about) |
| 12:49:17 | <geekosaur> | and they're afraid of parsers |
| 12:49:19 | <maerwald> | zincy: because they are to be prefeerred over parsers whenever possible |
| 12:49:21 | <maerwald> | geekosaur: no |
| 12:49:33 | <maerwald> | parsers carry more semantic power |
| 12:49:47 | <Lycurgus> | also the ubiquity of use for that purpose |
| 12:49:54 | <werner100> | ...and regex have been around for long time. |
| 12:50:29 | <zincy> | I just can't imagine when a regex is the right approach |
| 12:50:49 | <Lycurgus> | how long have you been programming? |
| 12:50:57 | <[exa]> | zincy: regexes can't be easily decompiled and validated -> they get away with pretty much anything |
| 12:51:04 | <werner100> | I think for string handling it's simple enough. Been programming since the seventies... |
| 12:51:11 | <[exa]> | s/decompiled/read humanely/ |
| 12:51:20 | <zincy> | Lycurgus: 7 years |
| 12:51:33 | geekosaur | wishes more regex engines supported, and more people used, /x |
| 12:51:41 | <werner100> | Machine language -> Basic -> Pascal -> C -> Scheme -> Java -> Haskell |
| 12:52:05 | <maerwald> | zincy: when your input is a regular language, then you use a regex |
| 12:52:20 | <zincy> | So its okay to use regexes to say validate this text is uppercase? |
| 12:52:28 | <zincy> | I just assumed regex = evil |
| 12:52:37 | <maerwald> | that's just an odd narrative sometimes spread here |
| 12:52:40 | <zincy> | But maybe in that case parsing would be too heavyweight |
| 12:52:42 | → | rokoe joins (~roskoe@79-68-160-163.dynamic.dsl.as9105.com) |
| 12:52:44 | <[exa]> | one thing on the regexes that's uncanny is how people assume that matching is going to be roughly O(1) in the size of the input because "it can be compiled to a DFA right?" [padme_meme_the_dfa_is_small_right.jpg] |
| 12:52:47 | <Lycurgus> | right i don't think people today appreciate the extent to which assembly was used for systems and even applications before the 80s |
| 12:53:02 | <[exa]> | there have been literal DoSes exploiting that |
| 12:53:09 | <maerwald> | the problem is people using regexes for input that a regex can't possibly correctly validate |
| 12:53:12 | <maerwald> | that depends on the input |
| 12:53:42 | <zincy> | But modern implementations of regex can parse non-regular stuff |
| 12:53:43 | <werner100> | Correct |
| 12:53:45 | <maerwald> | if you use monadic parser combinators for everything, you're doing something wrong too (in terms of containing complexity) |
| 12:53:54 | <zincy> | oh ok |
| 12:54:01 | <maerwald> | zincy: yeah, those I avoid |
| 12:54:22 | → | yrlnry joins (~mjd@pool-100-11-2-80.phlapa.fios.verizon.net) |
| 12:55:03 | <zincy> | So the rule is regex is fine when it comes to regular languages because it gets nasty on non-regular with recursive regex |
| 12:55:38 | <Lycurgus> | so 1 solution to the GDPR issue would be to just block the log in the EU or where the GDPR is in effect |
| 12:56:31 | <maerwald> | Lycurgus: uhm.. |
| 12:56:39 | <maerwald> | I don't think so |
| 12:56:49 | <geekosaur> | one problem there being that it's hosted in the EU |
| 12:56:52 | <Lycurgus> | scrubbing nicks would address the specific issue |
| 12:57:04 | <Lycurgus> | why is that a problem? |
| 12:57:35 | <maerwald> | as per GDPR I even need the ability to email an advertisement company and tell them I want all my cookies deleted from all their backends, not just my incoming ads |
| 12:57:56 | <maerwald> | no one knows how to enforce that |
| 12:57:58 | <maerwald> | but yeah |
| 12:58:02 | <Lycurgus> | that can only be true for ops in the GDPR jurisdiction |
| 12:58:37 | × | max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 268 seconds) |
| 12:58:56 | <Lycurgus> | stuff being done from yurope but not allowed there is fairly well established in tradition |
| 13:00:15 | <lortabac> | my main problem with regexes is the obfuscated and error-prone syntax |
| 13:00:28 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Ping timeout: 268 seconds) |
| 13:01:10 | <Lycurgus> | they front the sound and proven automata |
| 13:02:45 | <zincy> | lortabac: So would you avoid regexes entirely? |
| 13:02:47 | <maerwald> | lortabac: I've probably written more bugs with monadic parser combinators |
| 13:03:32 | <lortabac> | I use regexes when I need them, but I wish they had a more human-friendly syntax |
| 13:03:56 | <geekosaur> | lortabac, there are regex extensions that help with the syntax. /x is one of them. raku extends the syntax to make a reasonable — and reasonably readable — parser syntax |
| 13:04:25 | <geekosaur> | (/x allows whitespace and comments, which helps a lot with readability) |
| 13:04:57 | <boxscape_> | Lycurgus rather than not offering the logs in the EU, I think you'd have to not log any user from the EU, no? |
| 13:05:32 | <Lycurgus> | right that might be easier too |
| 13:05:49 | <boxscape_> | it sounds harder to me, but also necessary |
| 13:06:09 | <boxscape_> | (that is if logging like this is subject to GDPR to begin with) |
| 13:06:30 | <zincy> | Doesnt the "rule of least power" imply that one should use regexes for trivial cases of parsing and validation vs a monadic parser |
| 13:06:31 | <zincy> | https://en.wikipedia.org/wiki/Rule_of_least_power |
| 13:06:41 | → | sprout_ joins (~quassel@2a02:a467:ccd6:1:49b2:5c3a:dea0:5ca1) |
| 13:06:44 | <lortabac> | geekosaur: it still looks needlessly obfuscated to me, even in raku |
| 13:07:01 | <lortabac> | I'd prefer something like regex-applicative |
| 13:08:51 | → | sudden joins (~cat@h-98-128-128-173.A351.priv.bahnhof.se) |
| 13:09:00 | × | sudden quits (~cat@h-98-128-128-173.A351.priv.bahnhof.se) (Changing host) |
| 13:09:00 | → | sudden joins (~cat@user/sudden) |
| 13:09:56 | <lortabac> | zincy: sounds reasonable |
| 13:10:20 | × | sprout quits (~quassel@2a02:a467:ccd6:1:5495:68b3:d03c:732e) (Ping timeout: 268 seconds) |
| 13:11:56 | → | nschoe joins (~quassel@2a01:e0a:8e:a190:c6dc:21f9:bc16:feb3) |
| 13:13:26 | <Lycurgus> | the power of regexes seems well matched to the complexity of the target ops to me |
| 13:14:30 | Lycurgus | but I'm just an ol fart, don't pay me no mind |
| 13:14:38 | × | Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt) |
| 13:16:09 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 13:16:10 | × | werner100 quits (~werner100@2601:2c2:400:4440:dc41:dccb:7773:558f) (Ping timeout: 256 seconds) |
| 13:23:20 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 13:25:07 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 13:27:43 | <zincy> | So in a dynamic language is can it be a good idea to first parse a JSON request body and then validate individual fields which are strings with regexes? |
| 13:27:45 | × | phma quits (~phma@host-67-44-208-102.hnremote.net) (Read error: Connection reset by peer) |
| 13:28:21 | <zincy> | I've mostly used Haskell so don't know how parsing/validation is best done in mainstream languages? |
| 13:29:09 | → | slack1256 joins (~slack1256@191.126.227.82) |
| 13:31:01 | <maerwald> | you can do the same in haskell |
| 13:31:29 | × | jess quits (~jess@libera/staff/jess) () |
| 13:34:06 | × | bastelfreak quits (~bastelfre@basteles-bastelknecht.bastelfreak.org) (Quit: WeeChat 3.3) |
| 13:36:42 | × | johnny_sitar quits (~artur@user-5-173-132-197.play-internet.pl) (Ping timeout: 260 seconds) |
| 13:38:13 | × | yrlnry quits (~mjd@pool-100-11-2-80.phlapa.fios.verizon.net) (Ping timeout: 256 seconds) |
| 13:40:08 | → | bastelfreak joins (~bastelfre@basteles-bastelknecht.bastelfreak.org) |
| 13:41:22 | × | acidjnk_new quits (~acidjnk@p200300d0c726704784feaa35b47dd204.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 13:41:38 | → | fryguybob joins (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) |
| 13:45:59 | → | juhp joins (~juhp@128.106.188.220) |
| 13:47:16 | → | jespada joins (~jespada@190.7.36.46) |
| 13:47:56 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 13:52:28 | → | syd joins (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) |
| 13:54:36 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:55:16 | <zincy> | maewald: So no fundamental difference between langauges? |
| 13:56:26 | <geekosaur> | there are several ways to do parsing, they're all language-agnostic |
| 13:57:11 | <geekosaur> | some of them may be easier in some languages than others, but parsing is parsing regardless of implementation language |
| 13:57:13 | → | brschkv joins (~jbrusch@185.223.145.18) |
| 13:57:30 | <zincy> | Ah ok, need to do more reading then |
| 13:58:22 | <zincy> | I guess I am confused because the parsing and validation is usually done in one step with in Haskell |
| 13:59:11 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 13:59:25 | <geekosaur> | that's more or less because parser combinators come more naturally in Haskell. but we still have happy which implements a yacc-like LALR(1) (or more recently GLR) parser for Haskell |
| 14:00:01 | <geekosaur> | and parser combinators make it easier to combine the parsing and validation. they do not require it, however |
| 14:01:23 | → | yrlnry joins (~mjd@2603:301d:775:0:3569:8496:7f44:52c9) |
| 14:01:29 | → | pera joins (~pera@user/pera) |
| 14:05:05 | <maerwald> | there are parser combinators for C |
| 14:05:10 | <maerwald> | it's nothing unique to haskell anymore |
| 14:05:49 | <maerwald> | zincy: you can parse json strings into Aeson Value and then do the validation/extraction manually |
| 14:06:20 | <syd> | there's a blog article "Parse, don't validate" which you might find interesting in that regard. |
| 14:06:48 | <Hecate> | yes it's lovely :p |
| 14:06:59 | × | yrlnry quits (~mjd@2603:301d:775:0:3569:8496:7f44:52c9) (Ping timeout: 264 seconds) |
| 14:07:41 | <maerwald> | zincy: one advantage might be that it's easier to support multiple schemas ad-hoc that way |
| 14:09:02 | <maerwald> | here's a real-world example where the aeson parser just produces Value and then you have a manual extraction: https://github.com/input-output-hk/cardano-node/blob/d95ef21062a50acf8f35f1f5d94f8a8a70f7510b/cardano-api/src/Cardano/Api/ScriptData.hs#L459 |
| 14:12:08 | <zincy> | Thanks syd and Maerwald |
| 14:13:11 | <zincy> | I guess there is nothing magical about combining parsing and validation in one step |
| 14:13:43 | <zincy> | And sometimes you will definitely want to separate them if you have semantic validation which cannot be easily expressed in a type |
| 14:14:02 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 14:15:34 | → | max22- joins (~maxime@2a01cb088335980058acad91096e7c9d.ipv6.abo.wanadoo.fr) |
| 14:17:10 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 14:17:35 | <zincy> | Getting past the intermediate stage of coding seems to be more about unlearning than learning |
| 14:17:51 | <zincy> | Going from absolutes to it depends |
| 14:18:06 | <maerwald> | zincy: well, if you parse unrestricted into `Value`, then I think that's a DoS angle in fact |
| 14:18:12 | <geekosaur> | it's about learning flexibility instead of expecting strict rules |
| 14:18:24 | <zincy> | yeah |
| 14:20:10 | <maerwald> | but I think most derived aeson parsers are DoS prone |
| 14:20:26 | <zincy> | Denial of service? |
| 14:21:51 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 14:23:36 | × | vpan quits (~0@212.117.1.172) (Quit: Leaving.) |
| 14:26:10 | → | yrlnry joins (~mjd@pool-74-109-22-90.phlapa.fios.verizon.net) |
| 14:30:33 | × | jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.3) |
| 14:39:22 | <merijn> | zincy: In the sense that malicious input can take down your parser |
| 14:41:34 | → | v01d4lph4 joins (~v01d4lph4@106.215.93.204) |
| 14:41:34 | × | v01d4lph4 quits (~v01d4lph4@106.215.93.204) (Changing host) |
| 14:41:34 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 14:44:01 | <zincy> | ah right |
| 14:44:02 | × | jespada quits (~jespada@190.7.36.46) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 14:48:56 | → | Guest99 joins (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net) |
| 14:49:44 | × | pgib quits (~textual@173.38.117.89) (Quit: 00 PC LOAD LETTER) |
| 14:53:47 | × | trcc quits (~trcc@2-104-60-169-cable.dk.customer.tdc.net) () |
| 14:54:33 | × | chomwitt quits (~chomwitt@ppp-2-85-245-90.home.otenet.gr) (Ping timeout: 268 seconds) |
| 14:54:46 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:76a9:f65d:22e8:2e7b) (Quit: WeeChat 2.8) |
| 14:56:20 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 14:58:22 | × | slack1256 quits (~slack1256@191.126.227.82) (Ping timeout: 260 seconds) |
| 15:01:06 | → | slack1256 joins (~slack1256@191.125.227.82) |
| 15:01:39 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 15:01:47 | → | zincy_ joins (~zincy@2a00:23c8:970c:4801:8d15:54ac:ed5f:296c) |
| 15:02:56 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 15:07:33 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.3) |
| 15:10:28 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 15:10:54 | → | SeungheonOh joins (~Thunderbi@2600:1700:5168:1400:2f4a:5df3:56f6:843a) |
| 15:10:54 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 15:11:03 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 15:15:51 | → | chomwitt joins (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374) |
| 15:17:28 | → | f-a joins (f2a@f2a.jujube.ircnow.org) |
| 15:19:40 | <f-a> | hello. I am writing a simple «select language» menu. As now I am keeping all langs in a list and rotate it when the user presses ← →, and pick _head on ⏎. It works, but I wonder: is there a more appropriate data type? |
| 15:20:01 | <merijn> | Sounds like a Zipper :> |
| 15:20:09 | <yrlnry> | I was going to say sounds like a zipper. |
| 15:20:11 | <f-a> | mhh let us see if microlens packs it |
| 15:21:09 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 15:21:33 | <yrlnry> | The original (1997) Huet paper discusses list zippers specifically, and wikipedia has that as an example: https://en.wikipedia.org/wiki/Zipper_(data_structure)#Example:_Bidirectional_list_traversal |
| 15:22:39 | <f-a> | thansk |
| 15:22:40 | <f-a> | *thanks |
| 15:25:48 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 15:26:38 | × | zincy_ quits (~zincy@2a00:23c8:970c:4801:8d15:54ac:ed5f:296c) (Remote host closed the connection) |
| 15:27:28 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 15:30:02 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 15:31:33 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 268 seconds) |
| 15:31:35 | × | boxscape_ quits (~boxscape_@134.171.69.87) (Ping timeout: 264 seconds) |
| 15:31:43 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 15:31:54 | × | timCF quits (~timCF@200-149-20-81.sta.estpak.ee) (Quit: leaving) |
| 15:34:00 | × | msmhnd^ quits (~msmhnd@wsip-98-188-242-6.mc.at.cox.net) (Ping timeout: 268 seconds) |
| 15:34:26 | → | lbseale joins (~lbseale@user/ep1ctetus) |
| 15:37:22 | × | SeungheonOh quits (~Thunderbi@2600:1700:5168:1400:2f4a:5df3:56f6:843a) (Quit: SeungheonOh) |
| 15:37:41 | → | SeungheonOh joins (~Thunderbi@2600:1700:5168:1400:2f4a:5df3:56f6:843a) |
| 15:38:40 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 15:39:23 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 15:40:43 | × | SeungheonOh quits (~Thunderbi@2600:1700:5168:1400:2f4a:5df3:56f6:843a) (Client Quit) |
| 15:41:06 | → | SeungheonOh joins (~Thunderbi@2600:1700:5168:1400:2f4a:5df3:56f6:843a) |
| 15:43:52 | × | SeungheonOh quits (~Thunderbi@2600:1700:5168:1400:2f4a:5df3:56f6:843a) (Client Quit) |
| 15:44:26 | <remexre> | if I have some variable foo of concrete type Foo, why does DuplicateRecordFields not like (foo { bar = 1 }) when there are two types with a bar::Int field in scope? |
| 15:44:38 | <remexre> | shouldn't it be able to disambiguate based on the type of foo? |
| 15:44:57 | <remexre> | (the error message even indicates that it knows the type!) |
| 15:45:24 | → | johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl) |
| 15:46:29 | → | Sgeo_ joins (~Sgeo@user/sgeo) |
| 15:46:30 | <geekosaur> | https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/duplicate_record_fields.html#record-updates |
| 15:47:23 | <geekosaur> | it's not real smart about the ambiguity check even if it knows the type (I'm not even sure it knows the type fully until it prints the error message, tbh) |
| 15:47:27 | → | moerlitz joins (d9eb32b7ed@knopi.disroot.org) |
| 15:47:55 | <remexre> | I think the h x = (x :: T) { foo = 3 } case applies to my situation |
| 15:48:12 | <remexre> | but even when I give an explicit type for the thing being updated, no joy |
| 15:49:07 | × | Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 256 seconds) |
| 15:51:20 | <geekosaur> | mrr. wonder if they broke it at some point. I think I'm quoting the 9.0.1 manual, what version of ghc are you using? |
| 15:51:48 | <remexre> | 9.2.1 |
| 15:52:15 | <remexre> | annoying that "latest" isn't updated for it... |
| 15:52:29 | <geekosaur> | hm. could imagine something broke while adding RecordDotSyntax |
| 15:52:46 | <remexre> | oh, I think the error might actually be from -Werror with the new warning they mention there? |
| 15:53:06 | <remexre> | maybe they're afraid it will in the future? |
| 15:54:14 | <syd> | does DisambiguateRecordFields help? |
| 15:54:56 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 15:54:56 | <remexre> | nope, have that on as well |
| 15:55:25 | <remexre> | both of the ambiguous fields are of the same... dunno the term; are both F a for different concrete a |
| 15:55:55 | <merijn> | I just blindly assume that any RecordFields extension will just make everything worse and has no determinism :p |
| 15:56:58 | <remexre> | and I think deep down I just want {-# LANGUAGE PureScript #-} for all that :P |
| 15:57:02 | <syd> | hmm, I think it might qualify as ambiguous. what should the type of h be generally? |
| 15:57:22 | <remexre> | ABunchOfMonadConstraints m => ... -> m Foo |
| 15:57:23 | <syd> | I think it might be this case from DisambiguateRecordFields: "bad1 k = k { x = 3 } -- Ambiguous" |
| 15:57:30 | <remexre> | ah |
| 15:57:38 | <remexre> | yeah, that could do it, where k=pure |
| 15:58:08 | <syd> | I was thinking more as in, k being a value of either of the types with the field x. |
| 15:58:11 | <remexre> | I qualified the name (foo { Foo.bar = ... }) and it works, so I'm gonna call it that |
| 15:58:19 | <remexre> | oh whooops misread that |
| 15:58:37 | <remexre> | no, it's a do-block ending with (pure $ foo { ... }) |
| 15:58:44 | <syd> | there's a blog post about how to import and use them ergonomically, let me see if I can find it |
| 16:00:08 | × | ftzm[m] quits (~ftzmmatri@2001:470:69fc:105::1:dfc) (Quit: You have been kicked for being idle) |
| 16:00:08 | × | reddishblue[m] quits (~reddishbl@2001:470:69fc:105::21eb) (Quit: You have been kicked for being idle) |
| 16:00:24 | <syd> | https://chrisdone.com/posts/import-aliases-field-names/ |
| 16:00:27 | → | reddishblue[m] joins (~reddishbl@2001:470:69fc:105::21eb) |
| 16:00:31 | ← | reddishblue[m] parts (~reddishbl@2001:470:69fc:105::21eb) () |
| 16:00:35 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 16:01:08 | <remexre> | ooh, I hadn't seen that before |
| 16:01:39 | <remexre> | I'm already importing the module qualified (and the module only defines this type), so I'm probably gonna stick with that; thanks for showing me the different technique though! |
| 16:01:49 | <remexre> | and thanks to everyone for helping debug! |
| 16:04:01 | <syd> | np, I just use personName/companyName prefixes, ergonomics be damned lol. Lenses can work how you initially wanted I believe, makeClassy is the thing to google iirc. |
| 16:04:42 | <np> | picking `np` as my nick was a mistake |
| 16:05:16 | <geekosaur> | we used to have someone with the nick "so". imagine *that* one |
| 16:05:19 | <syd> | haha, np np ;) |
| 16:06:10 | × | _________ quits (~nobody@user/noodly) (Ping timeout: 252 seconds) |
| 16:06:24 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection) |
| 16:08:03 | <syd> | regarding future stuff, if/when HasField gets setField, I believe it'll be possible to write row-polymorphic-esque get/set functions for any record with a type-level literal field name; right now I'm pretty sure it's possible to write get functions that way. |
| 16:08:41 | × | rokoe quits (~roskoe@79-68-160-163.dynamic.dsl.as9105.com) (Quit: Konversation terminated!) |
| 16:10:37 | <syd> | getName :: HasField "name" r String -> String (or something like that) |
| 16:11:07 | → | _________ joins (~nobody@user/noodly) |
| 16:11:09 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 16:11:10 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 260 seconds) |
| 16:13:35 | <yushyin> | syd: ah yes :D I found this by chance the other day https://github.com/ElderEphemera/instance-impl |
| 16:17:05 | <remexre> | yeah, I was using labelled optics, but their TH stuff doesn't support 9.2.1 at the moment |
| 16:17:11 | <remexre> | (or didn't on monday at least!) |
| 16:17:30 | <remexre> | I expect in a few weeks I'll be able to use it again |
| 16:17:43 | <remexre> | but I was basically just using it to disambiguate fields |
| 16:20:04 | <syd> | yushyin: nice, that blog post is what alerted me to the existence of HasField. Awesome blog in general, "Invert Your Mocks" and "The Trouble With Typed Errors" come to mind. |
| 16:21:21 | → | v01d4lph4 joins (~v01d4lph4@106.215.93.204) |
| 16:21:21 | × | v01d4lph4 quits (~v01d4lph4@106.215.93.204) (Changing host) |
| 16:21:21 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 16:23:41 | ← | f-a parts (f2a@f2a.jujube.ircnow.org) () |
| 16:23:54 | × | Athas quits (athas@2a01:7c8:aaac:1cf:431c:d49e:2f86:91cc) (Quit: ZNC 1.8.2 - https://znc.in) |
| 16:24:04 | → | Athas joins (athas@2a01:7c8:aaac:1cf:a0d4:8908:cfdb:b9c0) |
| 16:26:41 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 16:27:29 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 16:28:20 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 16:33:19 | × | brschkv quits (~jbrusch@185.223.145.18) (Ping timeout: 256 seconds) |
| 16:34:49 | × | jjhoo quits (jahakala@user/jjhoo) (Remote host closed the connection) |
| 16:40:08 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 16:40:28 | → | alzgh joins (~alzgh@user/alzgh) |
| 16:43:14 | → | aegon joins (~mike@174.127.249.180) |
| 16:44:37 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Read error: No route to host) |
| 16:44:57 | → | v01d4lph4 joins (~v01d4lph4@106.215.93.204) |
| 16:44:57 | × | v01d4lph4 quits (~v01d4lph4@106.215.93.204) (Changing host) |
| 16:44:57 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 16:45:35 | × | Cajun quits (~Cajun@user/cajun) (Quit: Client closed) |
| 16:45:59 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 16:48:23 | × | Sgeo_ quits (~Sgeo@user/sgeo) (Ping timeout: 264 seconds) |
| 16:49:37 | → | zebrag joins (~chris@user/zebrag) |
| 16:49:48 | × | Guest99 quits (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net) (Quit: Client closed) |
| 16:49:49 | → | jjhoo joins (~jahakala@user/jjhoo) |
| 16:55:09 | → | emf joins (~emf@2620:10d:c090:400::5:38d) |
| 16:55:42 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 16:55:58 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 260 seconds) |
| 17:03:07 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 17:06:07 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Quit: WeeChat 3.1) |
| 17:11:46 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 17:12:51 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection) |
| 17:15:34 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 17:15:54 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 17:17:46 | → | Lycurgus joins (~juan@98.4.112.204) |
| 17:18:14 | × | burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Remote host closed the connection) |
| 17:21:43 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 17:22:30 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 17:24:26 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 17:24:38 | <awpr> | timCF: you don't need an instance of Generic for UTCTime to derive Generic for types that have UTCTime fields |
| 17:25:00 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 17:25:10 | <awpr> | oh, not online :/ |
| 17:25:49 | → | Vajb joins (~Vajb@2001:999:66:281c:27a0:1549:39e5:8b1a) |
| 17:26:01 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Quit: ubert) |
| 17:28:33 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 17:34:37 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 17:35:30 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 268 seconds) |
| 17:36:03 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 17:36:38 | × | aweinstock quits (~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com) (Ping timeout: 260 seconds) |
| 17:38:08 | → | aweinstock joins (~aweinstoc@cpe-67-248-65-250.nycap.res.rr.com) |
| 17:38:26 | → | econo joins (uid147250@user/econo) |
| 17:40:12 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 17:41:13 | × | pop3 quits (~pop3@user/pop3) (Remote host closed the connection) |
| 17:41:20 | <dsal> | I used a ContT for the first time along with These to replace a fairly simple list monad and my program is slower. |
| 17:41:44 | → | pop3 joins (~pop3@user/pop3) |
| 17:44:04 | <dsal> | Also, I feel like callCC has the wrong signature. I had to do something gross to get a thing to typecheck because I was calling the exit function in a context that wanted an `a` but it was returning something else. `exit Whatever *> undefined` works, but seems a little wrong. |
| 17:44:27 | <c_wraith> | dsal: yes, it does |
| 17:44:35 | <c_wraith> | it should be higher-rank |
| 17:45:21 | <dsal> | Overall, I didn't find it too weird. I was expecting it to be confusing and scary or something. |
| 17:47:36 | <dolio> | dsal: https://okmij.org/ftp/continuations/against-callcc.html#performance-hit |
| 17:49:21 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 17:50:06 | <dsal> | Heh. Yeah. I'm not too surprised. I was using the list monad originally which was pretty great. I might be able to just use These directly, though the monad looks slightly strange to me. |
| 17:50:24 | <dolio> | I.E. don't confuse 'conceptual beauty' arguments about how call/cc can technically implement everything for actual practicality. |
| 17:50:48 | × | kuribas quits (~user@ptr-25vy0i9zmp0qcl8wvlj.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 17:51:09 | <dolio> | (Although it can't actually implement everything, as that page also argues.) |
| 17:51:10 | → | zincy_ joins (~zincy@2a00:23c8:970c:4801:350f:7ee:191a:6f65) |
| 17:52:04 | → | brschkv joins (~jbrusch@dynamic-095-116-017-025.95.116.pool.telefonica.de) |
| 17:53:53 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:54:55 | × | syd quits (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 17:56:11 | × | Vajb quits (~Vajb@2001:999:66:281c:27a0:1549:39e5:8b1a) (Read error: Connection reset by peer) |
| 17:56:16 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 17:56:27 | × | burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 268 seconds) |
| 17:58:53 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 17:59:10 | → | ubert joins (~Thunderbi@p200300ecdf4fcafee019fddc82d0353e.dip0.t-ipconnect.de) |
| 18:00:16 | × | nurupo quits (~nurupo.ga@user/nurupo) (Quit: nurupo.ga) |
| 18:00:30 | → | nurupo joins (~nurupo.ga@user/nurupo) |
| 18:01:12 | → | whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com) |
| 18:01:48 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Read error: Connection reset by peer) |
| 18:01:52 | → | fef joins (~thedawn@user/thedawn) |
| 18:02:02 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 18:04:40 | × | pera quits (~pera@user/pera) (Quit: leaving) |
| 18:04:51 | → | slac76440 joins (~slack1256@191.125.99.211) |
| 18:05:07 | → | syd joins (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) |
| 18:05:20 | <syd> | dsal: not sure what your use case is, but does the Logic Monad suit your needs perchance? |
| 18:05:37 | <syd> | (you mentioned List, so I figured it might involve backtracking or something) |
| 18:07:02 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 18:07:34 | × | slack1256 quits (~slack1256@191.125.227.82) (Ping timeout: 268 seconds) |
| 18:09:30 | <dsal> | Thanks. I'll take a look at that later -- might help. There's nothing serious here. Just doodling on some old AoC things that are varying grossness. I have an initial state and then a few child states may fall out of it that need to be recursed. It's one of these things where I'm trying to figure out what is expressive and not hard to read. |
| 18:11:55 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 18:13:56 | → | vladl joins (~vladl@174.127.234.115) |
| 18:14:53 | → | v01d4lph4 joins (~v01d4lph4@106.215.93.204) |
| 18:14:53 | × | v01d4lph4 quits (~v01d4lph4@106.215.93.204) (Changing host) |
| 18:14:53 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 18:15:54 | <Lycurgus> | ocaml at least has delimited continuations |
| 18:16:31 | <c_wraith> | eh? delimited continuations are just... functions. that's what Cont/ContT are, too |
| 18:18:06 | <Lycurgus> | ah, from callCC i thought it was like the scheme thing |
| 18:18:36 | × | pop3 quits (~pop3@user/pop3) (Remote host closed the connection) |
| 18:19:40 | → | pop3 joins (~pop3@user/pop3) |
| 18:21:53 | <dolio> | It is, sort of. |
| 18:22:24 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 18:22:36 | <dolio> | It's undelimited inside of a single call to runContT, obviously, but the runContT delimits the scope in a way. |
| 18:22:45 | → | alzgh joins (~alzgh@user/alzgh) |
| 18:23:44 | <dolio> | Which is also how many Scheme implementations really work. The REPL delimits your call/cc. |
| 18:24:42 | <c_wraith> | Well, it's clearly delimited in terms of only being able to jump to a point inside Cont/ContT |
| 18:25:00 | <c_wraith> | unlike scheme, which doesn't provide that clean separation |
| 18:25:46 | <dolio> | My "obviously" was probably not ideally placed. I meant it's obvious that you can't capture continuations that go beyond the `runContT`. |
| 18:27:33 | × | fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds) |
| 18:30:32 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 18:31:00 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:90d0:563b:3279:f95b) (Ping timeout: 268 seconds) |
| 18:33:30 | <vladl> | Hi, I'm a C++ dev learning haskell and I'm trying to solve a design problem. I have no idea what the Haskelly way of doing what I want to do is. I have a short file and a problem description in the comments here http://dpaste.com//CFTUNYCJC |
| 18:36:35 | × | Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt) |
| 18:37:14 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 18:37:52 | <gentauro> | vladl: you don't, that's the beauty of Haskell and a `sound typesystem` :) |
| 18:38:13 | gentauro | perhaps there are some PRAGMAS and some HaskellTemplate … |
| 18:38:22 | <c_wraith> | vladl: how silly are you willing to get? Because there are answers that are very concise but require really sophisticated tools. Like uniplate, or the lensy versions thereof |
| 18:38:56 | <vladl> | gentauro: yes I figured I couldn't get away with adhoc polymorphism... I don't want to get too silly, I'd rather do this in a canonical way than bend haskell to look like C++ |
| 18:39:23 | <gentauro> | vladl: btw, your 3 last statements point to variables that don't exisit? |
| 18:39:34 | <vladl> | yes, its psuedocode |
| 18:39:38 | <gentauro> | ahhh |
| 18:39:41 | <gentauro> | fair enough |
| 18:40:16 | <vladl> | c_wraith: i'll totally change my design, i figured there's a good chance this is an XY problem or whatever its called |
| 18:40:42 | <vladl> | where the asker asks how to do X when they actually wanna accomplish Y but are missing the forest for the trees |
| 18:41:20 | <vladl> | I'm trying to make it so i can request a layout and then any contained widgets, if they have a notion of time, or tags, then they will apply those rules to their filters |
| 18:41:59 | <gentauro> | vladl: why are all types of widgets in the same (sum) `type`? |
| 18:42:37 | <vladl> | gentauro: I wanted to make a layout tree that i could throw together in ghci repl |
| 18:43:03 | <vladl> | so a widget might just be a container of other widgets |
| 18:43:06 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 18:43:21 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 18:43:31 | <vladl> | but i basically want properties set at a node to affect the subtree |
| 18:43:36 | <gentauro> | vladl: got it |
| 18:44:02 | → | euandreh joins (~euandreh@2804:14c:33:9fe5:90d0:563b:3279:f95b) |
| 18:46:27 | <dsal> | https://xyproblem.info |
| 18:46:56 | <dsal> | It's particularly funny when someone is doing 2D graphics and has an XY problem. heh |
| 18:47:21 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 18:48:21 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 18:48:41 | → | alzgh joins (~alzgh@user/alzgh) |
| 18:49:40 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:55:06 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 18:58:08 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 18:58:46 | × | zer0bitz quits (~zer0bitz@dsl-hkibng31-54fae3-116.dhcp.inet.fi) (Ping timeout: 260 seconds) |
| 19:00:12 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection) |
| 19:03:04 | × | max22- quits (~maxime@2a01cb088335980058acad91096e7c9d.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds) |
| 19:03:43 | <janus> | why don't people mention XY problem and SSCCE together? Are they in opposition to each other? SSCCE says "Minimise bandwidth for the example, do not bore the audience.". That could be interpreted as omitting the context. Both of their goals is to convince the asker to provide the right context. But both of them use simplistic terms, in one case 'minimal' in other case 'solution vs problem'. In fact it's |
| 19:03:49 | <janus> | just about learning how to ask well. |
| 19:04:36 | <ski> | ("SSCCE" standing for ?) |
| 19:05:21 | <vladl> | single self-contained compiling example. |
| 19:05:55 | <vladl> | i generally agree but in more boilerplatey languages sometimes psuedocode gets the point across more efficiently |
| 19:05:55 | <ski> | ty |
| 19:06:59 | → | burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk) |
| 19:08:22 | → | toreiussd joins (uid469671@id-469671.lymington.irccloud.com) |
| 19:08:27 | <vladl> | sscce's are useful for more concrete questions, like bughunting where a repro is required |
| 19:10:02 | × | brschkv quits (~jbrusch@dynamic-095-116-017-025.95.116.pool.telefonica.de) (Quit: Leaving) |
| 19:11:07 | <toreiussd> | Obtaining min element using a foldtree function https://www.irccloud.com/pastebin/nqt2N6lQ/Haskell_message_1 |
| 19:15:30 | <ski> | toreiussd : check whether you get `Nothing', in `f' ? |
| 19:16:05 | <ski> | > min Nothing (Just 2) |
| 19:16:07 | <lambdabot> | Nothing |
| 19:16:46 | <ski> | since every tree has at least one leaf, you'll always, with current code, have at least one `Nothing', that you're passing to `minimum'. which causes the result of all `minimum' calls to be `Nothing' |
| 19:18:05 | <ski> | instead, you only want to give `Nothing' as result, in case you have the an empty tree (so a single `Tip', and no element) |
| 19:18:50 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 19:18:58 | <toreiussd> | copy |
| 19:19:22 | <ski> | (you could have four cases .. or, maybe there could be a way of expressing it more succinctly) |
| 19:19:56 | <toreiussd> | the issue is how would have multiple cases for the z value |
| 19:20:11 | <toreiussd> | Nothing is one yes only if the tree is empty |
| 19:20:18 | <toreiussd> | but how would I add another case |
| 19:21:06 | × | barrucadu quits (~barrucadu@carcosa.barrucadu.co.uk) (Ping timeout: 260 seconds) |
| 19:21:21 | → | barrucadu joins (~barrucadu@carcosa.barrucadu.co.uk) |
| 19:21:58 | <ski> | `z' is just a single case |
| 19:22:12 | <ski> | for a `Tip', there is no minimum, since there's no elements |
| 19:22:14 | × | hexagoxel quits (~hexagoxel@2a01:4f8:c0c:e::2) (Ping timeout: 265 seconds) |
| 19:22:43 | × | fiddlerwoaroof quits (~fiddlerwo@user/fiddlerwoaroof) (Ping timeout: 265 seconds) |
| 19:22:43 | <ski> | `f' handles `Bin' nodes |
| 19:23:08 | <ski> | toreiussd : you agree that if you have at least one element, then you should not get `Nothing' as result, yes ? |
| 19:23:14 | → | hiato joins (~op_4@user/op-4/x-9116473) |
| 19:23:18 | <toreiussd> | correct |
| 19:23:35 | × | op_4 quits (~op_4@user/op-4/x-9116473) (Ping timeout: 260 seconds) |
| 19:23:39 | → | unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
| 19:24:02 | × | canta quits (~canta@user/canta) (Ping timeout: 268 seconds) |
| 19:24:08 | → | hexagoxel joins (~hexagoxel@hexagoxel.de) |
| 19:24:14 | <toreiussd> | I just don't know what to use to express multiple cases |
| 19:24:28 | <ski> | so, for the recursive/inductive case, the case handling `Bin' (which is `f', in your case, since you're using a fold/catamorphism), you're now allowed to *assume* ("trust", if you prefer), that it'll only get passed `Nothing' as first/last argument, in case the corresponding subtree was empty (was a `Tip') |
| 19:24:51 | <ski> | toreiussd : use pattern-matching, just like you already did, for `foldTree' |
| 19:25:43 | → | fiddlerwoaroof joins (~fiddlerwo@user/fiddlerwoaroof) |
| 19:25:58 | → | canta joins (~canta@user/canta) |
| 19:26:03 | <ski> | so, `f' ought to check whether it gets `Nothing's or `Just's (with a minimum element of the subtree). then, it should take the minimum of all the elements it's got : which are (a) (possibly) a minimum element, for each subtree; (b) the element in the `Bin' node itself |
| 19:27:52 | <toreiussd> | mmmh confused but only because of the formatting of the text |
| 19:28:48 | <monochrom> | janus: I mention "XY" and "I can't reproduce your error" all the time :) |
| 19:29:04 | <monochrom> | The only problem is that I am not here all the time. |
| 19:30:11 | → | zer0bitz joins (~zer0bitz@dsl-hkibng31-54fae3-116.dhcp.inet.fi) |
| 19:30:43 | <monochrom> | But generally I champion for "do your due dilegence", "ask high-quality informative questions" when I'm around. |
| 19:31:26 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 268 seconds) |
| 19:32:05 | → | max22- joins (~maxime@2a01cb08833598006eec136a4e6fc13b.ipv6.abo.wanadoo.fr) |
| 19:32:23 | <monochrom> | "Worse", I fight against "qurents are entitled to conceal information, answerers are obliged to spew out lectures after lectures" |
| 19:33:17 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 19:35:00 | → | Sgeo_ joins (~Sgeo@user/sgeo) |
| 19:35:23 | <monochrom> | Oh, you asked about whether they oppose each other. |
| 19:35:48 | <monochrom> | Nah, they happen hand-in-hand all the time. |
| 19:36:10 | <monochrom> | For example, suppose someone runs into a type error. |
| 19:36:55 | → | tremon joins (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl) |
| 19:37:01 | <monochrom> | They decide to conceal their code and just say "hi, how do I trouble-shoot type errors?" So, it is an XY problem and a refusal to show any code at all at the same time. They feed each other. |
| 19:37:10 | <toreiussd> | https://www.irccloud.com/pastebin/3lMua9X3/ |
| 19:37:58 | × | Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 260 seconds) |
| 19:38:44 | <toreiussd> | https://www.irccloud.com/pastebin/oAoHVf9x/ |
| 19:39:07 | <maerwald> | monochrom: XY is the reason I'm making money. Shh |
| 19:39:20 | → | trriplex joins (~trriplex@user/trriplex) |
| 19:39:28 | <maerwald> | most of programming is XY |
| 19:39:37 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 19:39:42 | <maerwald> | "we need a web app" |
| 19:39:44 | <maerwald> | ok, yeah... sure |
| 19:39:54 | <monochrom> | Don't worry maerwald. People won't change their ways even after I point out what's wrong. :) |
| 19:40:32 | <maerwald> | now someone needs to put their money onto a blockchain... why? Hell, Idc! |
| 19:41:00 | <vladl> | oh i misread your question as well janus. my mistake. I think in the case of a lot of XY errors (at least the XY errors I experience), its usually a design issue, like an issue with the fundamental approach to the problem, and in these cases trying to obtain an SSCCE is going to waste everyone's time when the answer winds up containing "throw out your current approach" |
| 19:41:25 | × | max22- quits (~maxime@2a01cb08833598006eec136a4e6fc13b.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 19:42:05 | <maerwald> | or a CTO who accidentially read a blog post about functional programming starts to hire haskellers, because "zomg, such academic" |
| 19:42:12 | × | dumptruckman quits (~dumptruck@45-79-175-133.ip.linodeusercontent.com) (Quit: ZNC - https://znc.in) |
| 19:42:20 | <monochrom> | toreiussd, it is not true that every function needs pattern matching. |
| 19:43:19 | <ski> | toreiussd : yea, `listTree' doesn't need it, because it's producing a list (which is actually pattern-matched by `(++)'). however, `minTree' wants to produce a value of the same type as the elements. but if the tree is empty, it can't, and so it needs to `Maybe' produce such a value. and therefore the fold needs to handle the `Maybe's coming from the folding of the subtrees, in the `Bin' case (being your `f') |
| 19:44:07 | <monochrom> | Well, a CTO who respects academics is still good news. |
| 19:45:25 | <monochrom> | Better than a CTO reading a blog post about PHP and going "zomg such anti-academic" |
| 19:46:03 | <toreiussd> | so Id need another case for the f |
| 19:46:21 | <ski> | you need to split cases, yea |
| 19:46:38 | <monochrom> | Seriously Java was successful because, only because, CTOs read magazine articles (remember those? blogs didn't exist back then, but hey, same difference) about Java and went "zomg, such enterprise" |
| 19:46:39 | × | wrengr quits (~wrengr@150.12.83.34.bc.googleusercontent.com) (Quit: leaving) |
| 19:46:41 | <toreiussd> | what would I use for that. Im new to haskell that's why |
| 19:47:08 | <ski> | `l' and `r' are `Maybe a's. you need to handle the possible cases for those, separately, rather than trying to have a single defining equation handling all |
| 19:47:17 | <ski> | toreiussd : pattern-matching |
| 19:47:52 | → | dumptruckman joins (~dumptruck@45-79-175-133.ip.linodeusercontent.com) |
| 19:48:01 | <ski> | toreiussd : note how `foldTree' pattern-matches on the `Tree a' argument, doing case analysis, doing different things, depending on whether it got a `Tip' or a `Node' ? |
| 19:48:10 | <maerwald> | that's the thing, there are no average CTOs... either they rule or no one knows how they got where they are |
| 19:48:31 | <ski> | do the same thing, for `f', except you're now pattern-matching on the possible shapes of `Maybe a', rather than `Tree a' |
| 19:48:47 | <monochrom> | Actually the CTO title didn't exist back then either, heh. But you know who they were. |
| 19:49:38 | → | isovector1 joins (~isovector@172.103.216.166) |
| 19:49:47 | <monochrom> | OK how about one sample line of code? You can go "f Nothing x Nothing = Just x" for the 1st case. |
| 19:49:50 | <isovector1> | does anyone have a working stack config for ghc 9.2.1? |
| 19:49:54 | → | max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
| 19:49:55 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 268 seconds) |
| 19:50:11 | <monochrom> | There are like 3 more cases. |
| 19:50:31 | <toreiussd> | thx for that |
| 19:50:36 | → | msmhnd^ joins (~msmhnd@h50.174.139.63.static.ip.windstream.net) |
| 19:50:56 | <awpr> | best I've managed is to use ghcup to get a system GHC-9.2.1, then use `stack --system-ghc --resolver nightly --compiler ghc-9.2.1` |
| 19:51:47 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 19:51:53 | <awpr> | plus making a custom resolver to get newer versions that support 9.2, and even get a few packages from GitHub where needed |
| 19:51:55 | <ski> | toreiussd : that's the case in which both subtrees were empty (and so `foldTree' gave `z', that is `Nothing', for those. remember, you're assuming that you'll only get `Nothing' when the tree is empty. (but you'll then also need to ensure that `f' satisfies this condition)) |
| 19:52:37 | <isovector1> | awpr: yeesh. maybe it's time to swithc back to cabal? |
| 19:52:53 | <isovector1> | :( |
| 19:52:57 | <aegon> | aaaaa, my dev cycle lately is spec-delta, haskell-prototype-components-delta, haskell-prototype-lib-delta, c-lib-delta. The haskell-prototype -> c-library path is the worst. Way more source lines of code and way more tedium within that code |
| 19:53:14 | <aegon> | awpr: so is stack pretty laggy with releases compared to cabal-v2? |
| 19:53:21 | × | DNH quits (~DNH@2a02:8108:1100:16d8:e9ee:3bd5:4988:8148) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 19:53:25 | <awpr> | because Stackage hasn't made GHC-9.2 available in 4 days? idk, I don't mind so much |
| 19:53:29 | <aegon> | i thought 9.3 was just released |
| 19:53:55 | <awpr> | aggressive curation of dependency versions is always going to come with a cost of taking time to incorporate updates |
| 19:54:07 | <monochrom> | Nah, x.(odd number) is never released. |
| 19:54:30 | <toreiussd> | i think for that one I now understand thx. however im still attempting to build a definition for a fold over RoseTree. |
| 19:54:38 | <toreiussd> | thx nonetheless guys |
| 19:55:11 | <geekosaur> | aegon, stack is curated so they are unlikely to move immediately to 9.2.1 |
| 19:55:35 | <geekosaur> | and given how things have gone they make a 9.0.1 lts before a 9.2.1 nightly |
| 19:55:35 | <aegon> | monochrom: wierd, so x.(odd) releases are kinda tech previews for the next even release? |
| 19:55:42 | <ski> | toreiussd : look at the definition of `RoseTree'. `foldTree n t' is supposed to replace all the `Node's in `t' by `n' |
| 19:55:45 | <geekosaur> | they're development versions |
| 19:55:52 | <isovector1> | oh i didn't realize how fresh ghc 9.2.1 was |
| 19:55:58 | <geekosaur> | 9.3.date |
| 19:56:03 | <ski> | er, `foldRose', rather |
| 19:56:04 | <isovector1> | tho there's still not an lts for 9.0 |
| 19:56:05 | <monochrom> | Not released at all. |
| 19:56:10 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 260 seconds) |
| 19:56:35 | <geekosaur> | right, that's why I said they might hold off until they can make a 9.0.1 lts before they consider 9.2.1 as nightly |
| 19:56:36 | <ski> | just like `foldTree f z t' is replacing all the `Tip's in `t' with `z', and all the `Bin's in `t' with `f' |
| 19:56:39 | × | dumptruckman quits (~dumptruck@45-79-175-133.ip.linodeusercontent.com) (Quit: ZNC - https://znc.in) |
| 19:56:43 | <monochrom> | And I don't think GHC has a "tech preview" notion. |
| 19:57:06 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 19:57:45 | → | nosewings joins (~ngpc@2603-8081-3e05-e2d0-91fa-0be4-4222-fe4b.res6.spectrum.com) |
| 19:58:07 | <ski> | so `foldTree f z (Bin (Bin Tip 0 Tip) 1 (Bin (Bin Tip 2 Tip) 3 Tip))' is going to be `f (f z 0 z) 1 (f (f z 2 z) 3 z)' |
| 19:58:58 | <unit73e> | afaik GHC only has a stable release notion |
| 19:59:07 | <unit73e> | and it has been like that since forever |
| 19:59:19 | <unit73e> | also hi |
| 19:59:24 | <geekosaur> | there are release candidates, although they too can be iffy |
| 19:59:26 | <toreiussd> | Im also trying to optimize the listTree function to be in linear time however i think i should pass a function parameter |
| 19:59:32 | <geekosaur> | like 9.2 has been a cursed release |
| 19:59:47 | <ski> | similarly, `foldRose n (Node 0 [Node 1 [Node 2 [],Node 3 []],Node 4 [],Node 5 [Node 6 [Node 7 []]]])' is supposed to be `n 0 [n 1 [n 2 [],n 3 []],n 4 [],n 5 [n 6 [n 7 []]]]' |
| 20:00:13 | <geekosaur> | (and continues to be cursed; I gather a 9.2.2 may be appearing sooner rather than later) |
| 20:00:25 | × | madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 20:00:36 | <unit73e> | I see that GHC still has that ugly site :P but the documentation has the pretty theme |
| 20:00:51 | <geekosaur> | sadly the docs are still for 9.0.1 |
| 20:00:56 | <awpr> | hmm, if they're looking at a new release, I should probably rush to report the `type (<)` bug |
| 20:01:05 | <ski> | toreiussd : yes, left-nestedness of `++' (like `(((as ++ bs) ++ cs) ++ ds) ++ es', which results from the "left-recursion" `20:44 < monochrom> Well, a CTO who respects academics is still good news. |
| 20:01:09 | <ski> | 20:45 < monochrom> Better than a CTO reading a blog post about PHP and going "zomg such anti-academic" |
| 20:01:15 | <ski> | er, sorry |
| 20:01:22 | <aegon> | i was just reading thorugh the 9.3 users guide last night... I guess i got excited for non releasable features until 9.4 :X. The record dot syntax seems cool but between that and record punning and wild cards etc.. modifying records is turning into a wild world. Is the distaste for lens the compile time only or is there some overhead to the way its formed? I notice since workign with lenses there are a |
| 20:01:28 | <aegon> | bunch of micro / mini alternatives. |
| 20:01:29 | → | a6a45081-2b83 joins (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) |
| 20:01:29 | × | a6a45081-2b83 quits (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) (Read error: Connection reset by peer) |
| 20:01:38 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds) |
| 20:01:58 | <geekosaur> | lenses only have compile time overhead if you use TH to construct them |
| 20:02:20 | → | dumptruckman joins (~dumptruck@45-79-173-88.ip.linodeusercontent.com) |
| 20:02:21 | <maerwald> | hmm... I'm starting to think big modules are advantegous... they allow to see unfactored code sharing. When you jump across many modules, it's harder to notice similarities |
| 20:02:26 | <toreiussd> | so should i make it rightnestedness similar to the gains for foldr vs foldl |
| 20:02:33 | <geekosaur> | the main reason for micro and mini versions is that full lens provides lenses for half the ecosystem, meaning it has half the ecosystem as dependencies |
| 20:02:40 | <ski> | toreiussd : yes, left-nestedness of `++' (like `(((as ++ bs) ++ cs) ++ ds) ++ es', which results from the "left-recursion" `f l x r = l ++ ..', where `l' here represents a recursive call to `foldTree') is going to be less efficient than one can reasonably expect |
| 20:02:56 | → | a6a45081-2b83 joins (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) |
| 20:03:26 | <toreiussd> | how would I change the calls type |
| 20:03:30 | → | ralu3 joins (~ralu@static.211.245.203.116.clients.your-server.de) |
| 20:03:33 | <toreiussd> | from left recursive |
| 20:03:48 | × | hexagoxel quits (~hexagoxel@hexagoxel.de) (Ping timeout: 260 seconds) |
| 20:03:57 | <ski> | you could introduce an extra argument, an accumulator |
| 20:04:00 | × | isovector1 quits (~isovector@172.103.216.166) (Quit: Leaving) |
| 20:04:03 | × | ralu quits (~ralu@static.211.245.203.116.clients.your-server.de) (Read error: Connection reset by peer) |
| 20:04:03 | ralu3 | is now known as ralu |
| 20:04:27 | <toreiussd> | what would it accumulate though |
| 20:04:32 | <ski> | it might be easier to see how this works, if you write `listTree' using direct recursion, rather than using `foldTree' |
| 20:04:57 | <ski> | it would accumulate the list of all the elements of the tree, traversed in-order |
| 20:05:58 | × | juhp quits (~juhp@128.106.188.220) (Ping timeout: 268 seconds) |
| 20:06:33 | → | hexagoxel joins (~hexagoxel@2a01:4f8:c0c:e::2) |
| 20:06:36 | × | a6a45081-2b83 quits (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) (Read error: Connection reset by peer) |
| 20:07:35 | <toreiussd> | hey stefan do you know where I can learn more about this, there seems to be multiple holes as evidenced here and Im new to this coming from imperative |
| 20:07:49 | → | juhp joins (~juhp@128.106.188.220) |
| 20:09:46 | → | DNH joins (~DNH@2a02:8108:1100:16d8:e9ee:3bd5:4988:8148) |
| 20:10:22 | → | a6a45081-2b83 joins (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) |
| 20:11:20 | <aegon> | geekosaur: interesting, should I be using microlens-platform then as opposed to lens or is it the same outside of dependencies and lenses for other types |
| 20:11:26 | <aegon> | it looks like minilens is no longer kept up |
| 20:11:39 | × | a6a45081-2b83 quits (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) (Read error: Connection reset by peer) |
| 20:11:59 | <geekosaur> | it's basically the same, just lets you pick and choose what extra dependencies you want to pull in / what you want to use lenses for |
| 20:12:07 | → | a6a45081-2b83 joins (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) |
| 20:12:34 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection) |
| 20:12:58 | ski | glances over shoulder at stefan-_ |
| 20:13:03 | <geekosaur> | the lenses themmselves are very simple and can even be built without a lens framework, but you probably want the basic lens "combinators" provided by microlens |
| 20:13:29 | <geekosaur> | and microlens and lens are therefore inter-compatible |
| 20:13:50 | <geekosaur> | you can start with microlens and then upgrade to lens more or less transparently |
| 20:14:16 | <davean> | Why wouldn't you just start with 'lens'? |
| 20:14:39 | <geekosaur> | dependencies on half the ecosystem |
| 20:14:49 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 20:15:06 | × | bjobjo quits (~bjobjo@user/bjobjo) (Quit: leaving) |
| 20:15:11 | <geekosaur> | since lens aims to be complete, it has *lots* of deps on things it makes "canned" lenses for |
| 20:15:25 | <davean> | Right? |
| 20:15:29 | <geekosaur> | microlens leaves that part off, but has ancillary packages providing various of them |
| 20:15:35 | <aegon> | iterative builds locally dont bug me with lens but i have a fairly small service and it takes ~5 minutes to build in a container at this point |
| 20:16:02 | <davean> | IMO builds are cached and you'll need half of hackage anyway |
| 20:16:09 | <aegon> | i bet thats way low compared to what some of you are all dealing with daily |
| 20:16:12 | <davean> | Managing more packages seems like a much larger pain |
| 20:16:44 | × | a6a45081-2b83 quits (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) (Read error: Connection reset by peer) |
| 20:18:07 | <davean> | aegon: do you clear the cache every time or something? |
| 20:18:23 | <aegon> | docker does :P |
| 20:18:31 | <aegon> | its just an issue when i'm packaging it up for integration testing or whatnot |
| 20:18:40 | <aegon> | i use local dev with caching while working on a component |
| 20:18:53 | <aegon> | but when it comes time for the final unit and integration i shove it into the to be released container |
| 20:18:59 | <davean> | I mean keeping cache across systems even was standard in 2000 |
| 20:20:22 | → | a6a45081-2b83 joins (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) |
| 20:20:46 | × | chomwitt quits (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374) (Ping timeout: 268 seconds) |
| 20:21:27 | <davean> | aegon: So why does your container start with an empty cache? |
| 20:21:47 | × | a6a45081-2b83 quits (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) (Read error: Connection reset by peer) |
| 20:22:15 | → | a6a45081-2b83 joins (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) |
| 20:24:46 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 20:25:00 | <aegon> | i feel like its best practice, i don't want any released service to have a dependency on container state that it doesn't specify within it's dockerfile. This means outside of some container wide stuff that is done and making sure ghc / systemtools are on the thing. I don't know how I would cache anything else without violating that |
| 20:25:28 | <aegon> | if you keep intermediate stuff in the container your container gets to be multiple gigerbytes for a 300k executable |
| 20:25:44 | <aegon> | and removing a layer of the image before pushing it also seems evil to me |
| 20:26:24 | <davean> | I mean I'd think you'd build the executable into a final image - having the build tools for it on the image seems senseless unless it'll use those tools while running |
| 20:26:52 | <aegon> | yeah, buti want to make sure the image has the right version of any libs linked against and that the unit / integration tests run using those libs |
| 20:26:52 | × | a6a45081-2b83 quits (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) (Read error: Connection reset by peer) |
| 20:27:18 | <davean> | Right? You can still run the tests on the final image as an overlay |
| 20:27:30 | → | bjobjo joins (~bjobjo@user/bjobjo) |
| 20:27:32 | <davean> | but your lib versions can't really different if build on the same base |
| 20:27:41 | <aegon> | if your not building on the image how do you do continous integration without relying on development machine configuration states |
| 20:28:19 | <aegon> | maybe i'm being overly guarded against state but the more self contained your code -> bits running on the box is the less of a headache digging into any odd behavior is |
| 20:28:37 | <davean> | make the base image, make an overlay with the build tools, build it, put the produced files ontop of the origional image, put the tests on top, run them, push the one below the tests - or just tell nixos to build you an image with the executable |
| 20:29:04 | <davean> | s/nixos/nix |
| 20:29:47 | <davean> | none of that in any way talks about the developement machine state |
| 20:30:00 | × | haskl quits (~haskl@user/haskl) (Ping timeout: 268 seconds) |
| 20:30:05 | <davean> | and you don't need to even if you build on the system - you can unpack your distro into a folder |
| 20:30:21 | <davean> | chroots a very standard *nix thing |
| 20:30:39 | → | a6a45081-2b83 joins (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) |
| 20:30:46 | <davean> | but you can use containers to not think about that like above |
| 20:32:01 | <aegon> | i haven't piled on the nix wagon yet, i'm trying to put it off till next year. If you have any recommended guides or intro's to nix i def want to start reading up on it |
| 20:32:25 | <davean> | I made sure to give you the way following your current strategy first |
| 20:33:24 | <aegon> | yeah, i'm not trying to be combative. I think i'm missing something about that way. So you build an executable first outside the image, then as part of the docker file you copy that bin into the image? |
| 20:33:53 | <aegon> | then you unit and run integration tests on the packaged image to catch any missing or differing librarie |
| 20:33:56 | <davean> | No, I didn't use that approach because I wanted to satisfy your fears |
| 20:33:56 | <aegon> | *s |
| 20:33:59 | <davean> | So |
| 20:34:14 | <davean> | start with creatinage base_image, which is the base you want your executable to run on |
| 20:34:28 | <davean> | create overlay on _base_image of build_tools with ghc/cabal |
| 20:34:40 | <davean> | in build_tools, build your executable |
| 20:34:59 | <davean> | now, export your executable package and inject it ontop of base_image to make final_image |
| 20:35:13 | <davean> | now overlay test_package on final_image to make verification_image |
| 20:35:17 | <davean> | in verification_image run tests |
| 20:35:25 | <davean> | now when tests pass, push final_image |
| 20:36:49 | <aegon> | i see, so then you can use the build_tools version to keep a cache of past binary builds, thats a neat trick. I've been starting from scratch and just doing the dev tools setup / removal all in one step to avoid the intermediary junk from staying in history |
| 20:36:55 | <davean> | so you get your container image, with the same libraries the executable was built with, guarrentteed, and tested as it is pushed |
| 20:36:58 | × | a6a45081-2b83 quits (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) (Remote host closed the connection) |
| 20:37:13 | <davean> | Yep! |
| 20:37:22 | <davean> | it does caching inherently! :) |
| 20:37:34 | → | yauhsien joins (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) |
| 20:37:45 | <davean> | now, nix manages a nicer way of doing this FOR you but I certaintly wasn't pushing nix - I have a love hate relationship with it |
| 20:38:00 | <davean> | I wanted to show you how you could solve your problems by using the way you were doing it better |
| 20:40:19 | <aegon> | yeah thats neat, i'll try setting it up next server-ish pass. I'm on client side libary stuff now so I can sit on these images for a little. How do you extract the built bin from the build image at the end. Do you do that as part of a build script using the docker cli or is there a slicker way from within the dockerfile |
| 20:40:52 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 20:41:19 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 20:41:32 | <aegon> | oh i guess you could mount a host folder and target that for the bins |
| 20:41:37 | <davean> | yah |
| 20:41:43 | <davean> | thats what I was startign to type |
| 20:41:59 | <davean> | you just have an output directory |
| 20:42:13 | <davean> | can you tell cabal to build to there (for executables) |
| 20:42:20 | × | yauhsien quits (~yauhsien@118-167-41-229.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
| 20:43:21 | × | pop3 quits (~pop3@user/pop3) (Remote host closed the connection) |
| 20:44:15 | → | hololeap joins (~hololeap@user/hololeap) |
| 20:44:48 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 20:44:49 | <aegon> | thats cool, thanks for sharing. If every dev has that build image locally thats a much better sanity check before pushing than waiting for some ci pipeline to tell you a lib is off after you've context switched |
| 20:45:03 | <davean> | hell yes |
| 20:45:42 | <davean> | Its always my instinct when people complain about build times in Haskell to look closer |
| 20:48:10 | <maerwald> | go builds faster than haskell |
| 20:48:17 | <davean> | maerwald: lol |
| 20:50:39 | → | a6a45081-2b83 joins (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) |
| 20:50:56 | → | Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) |
| 20:52:19 | × | a6a45081-2b83 quits (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) (Read error: Connection reset by peer) |
| 20:52:49 | → | a6a45081-2b83 joins (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) |
| 20:54:55 | <syd> | are First and Last valid Semigroups when implemented for any old a rather than Maybe a? |
| 20:54:59 | <syd> | that is, (<>) for First a is const, and for Last a is const id. |
| 20:55:17 | → | fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 20:55:24 | <fuzzypixelz> | hello! |
| 20:55:30 | <dolio> | syd: Yes. |
| 20:55:47 | <syd> | dolio: much appreciated, thank you :) |
| 20:55:50 | × | trriplex quits (~trriplex@user/trriplex) (Remote host closed the connection) |
| 20:57:08 | <dolio> | Also if you make `Maybe a` a Monoid whenever `a` is a semigroup by using `Nothing` to adjoin an identity element, you get back the possibly empty version. |
| 20:57:24 | × | a6a45081-2b83 quits (~aditya@2603-6080-0800-8e4a-0000-0000-0000-01a8.res6.spectrum.com) (Read error: Connection reset by peer) |
| 20:58:42 | <dolio> | But is also works for any other semigroup. |
| 21:00:14 | × | yrlnry quits (~mjd@pool-74-109-22-90.phlapa.fios.verizon.net) (Ping timeout: 268 seconds) |
| 21:00:28 | <syd> | I'm trying to write a Monoid for custom type isomorphic (I think) to (Maybe Bool), with (Red | Blue) taking place of Bool. |
| 21:00:40 | <syd> | I'd like are to parameterize over the Maybe Monoid part as thought it was like either And/Or, and the Colour part as though it was either First/Last. |
| 21:01:01 | <syd> | https://pastebin.com/JLpAhA2u excuse my bad Haskell, this is my first time trying to write a Semigroup. |
| 21:01:25 | <syd> | (though i've used most of the stdlib ones in the past to varying degrees) |
| 21:02:10 | <c_wraith> | do you need to define your own First and Last? the ones in Data.SemiGroup are equivalent |
| 21:02:37 | <c_wraith> | errr. Data.Semigroup |
| 21:02:48 | → | pop3 joins (~pop3@user/pop3) |
| 21:03:20 | × | nschoe quits (~quassel@2a01:e0a:8e:a190:c6dc:21f9:bc16:feb3) (Remote host closed the connection) |
| 21:04:01 | <syd> | in honesty, I kept tripping myself up with the extra Maybe wrapper due to the one already used for the And/Or bit.. |
| 21:04:33 | → | nschoe joins (~quassel@2a01:e0a:8e:a190:a0c8:bcb7:cb64:d44d) |
| 21:04:33 | × | nschoe quits (~quassel@2a01:e0a:8e:a190:a0c8:bcb7:cb64:d44d) (Client Quit) |
| 21:05:04 | <monochrom> | OK, where, in that paste, can I find "custom type isomorphic (I think) to (Maybe Bool), with (Red | Blue) taking place of Bool"? |
| 21:05:52 | <syd> | argh sorry, the actual type I want to work with is (Maybe Colour), with Colour being Red | Blue |
| 21:06:11 | <syd> | but using those newtype wrappers and instances to mix-and-match how the layers are combined Semigroup..ally? |
| 21:07:02 | <monochrom> | The Colour part is like Bool, therefore First and Last are not very relevant. |
| 21:11:27 | <syd> | Howso? When trying to combine the Red | Blue layer monoidally, I'd like to parameterize whether the first is preferred or the second independent of how the Maybe layers are combined. |
| 21:11:45 | <monochrom> | That describes the Maybe level. |
| 21:11:57 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 21:12:13 | <ski> | how's "first vs. second" related to `Red | Blue' ? |
| 21:12:27 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 21:12:34 | <monochrom> | Unrelated. That's what I said. |
| 21:12:35 | <syd> | Hmm, what about choosing whether the Maybe layer is combined in And/Or (with Nothing being like False) |
| 21:13:01 | <monochrom> | Ah OK sorry ski I misread your nick. |
| 21:13:20 | ski | grins |
| 21:13:53 | <monochrom> | Sure, you can prove that AnyMay and AllMay satisfy the laws. |
| 21:14:24 | ski | 's still not sure what the question is |
| 21:14:42 | <syd> | for context, I got carried away implementing this: http://www.mmhp.net/Passwords/PassCrack3.html |
| 21:14:44 | <monochrom> | It is an extremely unclear question. |
| 21:15:51 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 21:15:57 | <syd> | yeah I need to think about it more, should have stopped at the "is First/Last a" a Semigroup. I'll think on it more, thanks for the help! |
| 21:17:29 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 268 seconds) |
| 21:17:51 | → | cheater1__ joins (~Username@user/cheater) |
| 21:18:07 | × | cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds) |
| 21:18:08 | → | lavaman joins (~lavaman@98.38.249.169) |
| 21:18:15 | cheater1__ | is now known as cheater |
| 21:23:28 | → | lbseale_ joins (~lbseale@user/ep1ctetus) |
| 21:24:27 | → | haskl joins (~haskl@user/haskl) |
| 21:24:30 | → | bollu1 joins (~bollu@139.59.46.74) |
| 21:24:35 | → | ridcully_ joins (~ridcully@p57b523cc.dip0.t-ipconnect.de) |
| 21:25:18 | → | cfebs_ joins (~cfebs@user/cfebs) |
| 21:25:19 | → | thaumavorio_ joins (~thaumavor@thaumavor.io) |
| 21:25:28 | → | Papa_ joins (~papa@user/papa) |
| 21:25:34 | → | adamCS_ joins (~adamCS@ec2-34-207-160-255.compute-1.amazonaws.com) |
| 21:25:49 | → | peutri_ joins (~peutri@ns317027.ip-94-23-46.eu) |
| 21:25:51 | → | ian_ joins (~ian@matrix.chaos.earth.li) |
| 21:25:56 | → | shanemikel_ joins (~shanemike@desk.roadwar.net) |
| 21:26:08 | → | xacktm_ joins (xacktm@user/xacktm) |
| 21:26:12 | → | _koolazer joins (~koo@user/koolazer) |
| 21:26:14 | × | zer0bitz quits (~zer0bitz@dsl-hkibng31-54fae3-116.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 21:26:34 | → | dka_ joins (~code-is-a@ns3059207.ip-193-70-33.eu) |
| 21:26:38 | × | lbseale quits (~lbseale@user/ep1ctetus) (Ping timeout: 260 seconds) |
| 21:26:41 | → | jlamothe_ joins (~jlamothe@198.251.61.229) |
| 21:26:43 | → | nf__ joins (~n@monade.li) |
| 21:26:43 | × | papa quits (~papa@user/papa) (Ping timeout: 246 seconds) |
| 21:26:43 | × | cfebs quits (~cfebs@user/cfebs) (Ping timeout: 246 seconds) |
| 21:26:43 | × | alexfmpe[m] quits (~alexfmpem@2001:470:69fc:105::38ba) (Ping timeout: 246 seconds) |
| 21:26:43 | × | kevin[m]1 quits (~pnotequal@2001:470:69fc:105::a54) (Ping timeout: 246 seconds) |
| 21:26:43 | cfebs_ | is now known as cfebs |
| 21:26:48 | × | alex[m]123 quits (~alexchete@2001:470:69fc:105::1:1001) (Ping timeout: 246 seconds) |
| 21:26:48 | × | PotatoHatsue quits (~berberman@2001:470:69fc:105::b488) (Ping timeout: 246 seconds) |
| 21:26:48 | × | peutri quits (~peutri@ns317027.ip-94-23-46.eu) (Ping timeout: 246 seconds) |
| 21:26:48 | × | Igloo quits (~ian@matrix.chaos.earth.li) (Ping timeout: 246 seconds) |
| 21:26:48 | × | denbrahe[m] quits (~denbrahem@2001:470:69fc:105::19c0) (Ping timeout: 246 seconds) |
| 21:26:48 | × | bitonic quits (~bitonic@2001:470:69fc:105::1812) (Ping timeout: 246 seconds) |
| 21:26:48 | × | kadoban quits (~kadoban@user/kadoban) (Ping timeout: 246 seconds) |
| 21:26:49 | → | fr33domlover1 joins (~fr33domlo@angeley.es) |
| 21:26:54 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 21:26:54 | → | jmtd joins (jon@dow.land) |
| 21:27:03 | → | cocreatu1 joins (~moritz@2a03:b0c0:3:d0::c8:f001) |
| 21:27:07 | × | bollu quits (~bollu@139.59.46.74) (Read error: Connection reset by peer) |
| 21:27:07 | × | ridcully quits (~ridcully@p57b523cc.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 21:27:07 | × | thaumavorio quits (~thaumavor@thaumavor.io) (Ping timeout: 268 seconds) |
| 21:27:07 | × | shanemikel quits (~shanemike@desk.roadwar.net) (Ping timeout: 268 seconds) |
| 21:27:07 | × | xacktm quits (xacktm@user/xacktm) (Ping timeout: 268 seconds) |
| 21:27:07 | × | Domino[m] quits (~dominothe@2001:470:69fc:105::1:271b) (Ping timeout: 268 seconds) |
| 21:27:07 | bollu1 | is now known as bollu |
| 21:27:15 | × | moats quits (~oats@user/oats) (Ping timeout: 268 seconds) |
| 21:27:15 | × | ilkecan[m] quits (~ilkecanma@2001:470:69fc:105::1:79b) (Ping timeout: 268 seconds) |
| 21:27:16 | × | afotgkmnzj7asv3r quits (~afotgkmnz@2001:470:69fc:105::c24b) (Ping timeout: 268 seconds) |
| 21:27:16 | × | thomasjm[m] quits (~thomasjmm@2001:470:69fc:105::c6d9) (Ping timeout: 268 seconds) |
| 21:27:16 | × | ericson2314 quits (~ericson23@2001:470:69fc:105::70c) (Ping timeout: 268 seconds) |
| 21:27:16 | × | cdsmith quits (~cdsmithma@2001:470:69fc:105::284) (Ping timeout: 268 seconds) |
| 21:27:16 | × | Arathorn quits (~arathorn@2001:470:69fc:105::1f) (Ping timeout: 268 seconds) |
| 21:27:16 | × | jneira[m] quits (~jneiramat@2001:470:69fc:105::d729) (Ping timeout: 268 seconds) |
| 21:27:16 | × | st quits (~ts@46.101.20.9) (Ping timeout: 268 seconds) |
| 21:27:18 | → | ts1 joins (~ts@46.101.20.9) |
| 21:27:24 | → | yushyin2 joins (rzPUwQNnp2@karif.server-speed.net) |
| 21:27:25 | → | alex[m]1231 joins (~alexchete@2001:470:69fc:105::1:1001) |
| 21:27:39 | × | nf quits (~n@monade.li) (Killed (NickServ (GHOST command used by nf__))) |
| 21:27:42 | nf__ | is now known as nf |
| 21:27:46 | × | dka quits (~code-is-a@ns3059207.ip-193-70-33.eu) (Ping timeout: 246 seconds) |
| 21:27:46 | × | gdhffd[m] quits (~gdhffdmat@2001:470:69fc:105::1:799) (Ping timeout: 246 seconds) |
| 21:27:46 | × | fendor[m] quits (~fendormat@2001:470:69fc:105::fcbd) (Ping timeout: 246 seconds) |
| 21:27:46 | × | orzo quits (~joe@lasker.childrenofmay.org) (Ping timeout: 246 seconds) |
| 21:27:47 | × | conphiz[m] quits (~conphizma@2001:470:69fc:105::c052) (Ping timeout: 246 seconds) |
| 21:27:47 | × | Jon quits (jon@dow.land) (Ping timeout: 246 seconds) |
| 21:27:47 | × | cocreature quits (~moritz@2a03:b0c0:3:d0::c8:f001) (Ping timeout: 246 seconds) |
| 21:28:08 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 21:28:13 | → | PotatoHatsue joins (~berberman@2001:470:69fc:105::b488) |
| 21:28:19 | <aegon> | server hiccup or did an astroid hit the earth |
| 21:28:22 | × | adamCS quits (~adamCS@ec2-34-207-160-255.compute-1.amazonaws.com) (Ping timeout: 264 seconds) |
| 21:28:23 | × | koolazer quits (~koo@user/koolazer) (Ping timeout: 264 seconds) |
| 21:28:23 | × | leah2 quits (~leah@vuxu.org) (Ping timeout: 264 seconds) |
| 21:28:23 | adamCS_ | is now known as adamCS |
| 21:28:23 | × | unclechu quits (~unclechu@2001:470:69fc:105::354) (Ping timeout: 264 seconds) |
| 21:28:23 | × | fakehacker[m] quits (~fakehacke@2001:470:69fc:105::b5f0) (Ping timeout: 264 seconds) |
| 21:28:23 | × | fcortesi quits (~fcortesi@2001:470:69fc:105::f3a9) (Ping timeout: 264 seconds) |
| 21:28:23 | × | the-coot[m] quits (~the-cootm@2001:470:69fc:105::95f) (Ping timeout: 264 seconds) |
| 21:28:23 | × | jlamothe quits (~jlamothe@198.251.61.229) (Ping timeout: 264 seconds) |
| 21:28:23 | × | fgaz quits (~fgaz@2001:470:69fc:105::842) (Ping timeout: 264 seconds) |
| 21:28:23 | × | MatrixTravelerbo quits (~voyagert2@2001:470:69fc:105::22) (Ping timeout: 264 seconds) |
| 21:28:23 | × | kosmikus[m] quits (~andresloe@2001:470:69fc:105::95d) (Ping timeout: 264 seconds) |
| 21:28:23 | × | jesser[m] quits (~jessermat@2001:470:69fc:105::d5ae) (Ping timeout: 264 seconds) |
| 21:28:23 | × | craige[m] quits (~craigemcw@2001:470:69fc:105::35f1) (Ping timeout: 264 seconds) |
| 21:28:23 | × | mekeor[m] quits (~mekeormat@2001:470:69fc:105::17e4) (Ping timeout: 264 seconds) |
| 21:28:23 | × | glider_ quits (~glider@user/glider) (Ping timeout: 264 seconds) |
| 21:28:23 | × | fr33domlover quits (~fr33domlo@angeley.es) (Ping timeout: 264 seconds) |
| 21:28:23 | × | yushyin quits (vmwyqzEgOc@karif.server-speed.net) (Ping timeout: 264 seconds) |
| 21:28:23 | × | Square quits (~a@178.62.91.8) (Ping timeout: 264 seconds) |
| 21:28:23 | × | TomasJakl[m] quits (~jaklttchn@2001:470:69fc:105::a42) (Ping timeout: 264 seconds) |
| 21:28:23 | × | bb010g quits (~bb010g@2001:470:69fc:105::9a5) (Ping timeout: 264 seconds) |
| 21:28:23 | × | Topik[m] quits (~topikmatr@2001:470:69fc:105::a082) (Ping timeout: 264 seconds) |
| 21:28:53 | × | xsarnik quits (xsarnik@lounge.fi.muni.cz) (Ping timeout: 264 seconds) |
| 21:29:01 | → | leah2 joins (~leah@vuxu.org) |
| 21:29:05 | → | xsarnik joins (xsarnik@lounge.fi.muni.cz) |
| 21:29:14 | <geekosaur> | looks like someone kicked the matrix |
| 21:29:18 | yushyin2 | is now known as yushyin |
| 21:29:18 | <ski> | matrix bridge, maybe ? |
| 21:29:22 | <ski> | mm |
| 21:29:50 | → | alexfmpe[m] joins (~alexfmpem@2001:470:69fc:105::38ba) |
| 21:29:54 | <monochrom> | The matrix bridge quantum-tunneled to Jupiter :) |
| 21:29:55 | → | Square joins (~a@178.62.91.8) |
| 21:30:02 | → | kevin[m]1 joins (~pnotequal@2001:470:69fc:105::a54) |
| 21:31:46 | → | kadoban joins (~kadoban@user/kadoban) |
| 21:32:19 | → | bitonic joins (~bitonic@2001:470:69fc:105::1812) |
| 21:32:30 | → | denbrahe[m] joins (~denbrahem@2001:470:69fc:105::19c0) |
| 21:32:31 | × | haskl quits (~haskl@user/haskl) (Ping timeout: 256 seconds) |
| 21:32:38 | → | haskl[error] joins (~haskl@user/haskl) |
| 21:33:10 | → | Arathorn joins (~arathorn@2001:470:69fc:105::1f) |
| 21:33:26 | → | ericson2314 joins (~ericson23@2001:470:69fc:105::70c) |
| 21:33:29 | → | glider joins (~glider@user/glider) |
| 21:33:33 | → | MoC joins (~moc@user/moc) |
| 21:33:38 | → | moats joins (~oats@user/oats) |
| 21:34:46 | → | Domino[m] joins (~dominothe@2001:470:69fc:105::1:271b) |
| 21:34:50 | → | ilkecan[m] joins (~ilkecanma@2001:470:69fc:105::1:79b) |
| 21:34:51 | → | thomasjm[m] joins (~thomasjmm@2001:470:69fc:105::c6d9) |
| 21:34:51 | → | afotgkmnzj7asv3r joins (~afotgkmnz@2001:470:69fc:105::c24b) |
| 21:34:53 | → | cdsmith joins (~cdsmithma@2001:470:69fc:105::284) |
| 21:34:58 | × | marinelli[m] quits (~marinelli@2001:470:69fc:105::2d8) (Quit: Reconnecting) |
| 21:36:54 | <aegon> | for any hls contributers out there, first, thank you for your service, second is there a reason go to definition doesn't work for package dependencies? |
| 21:37:53 | <aegon> | i've been using a local hackage but its pretty great to be able to hope around in editor to stuff |
| 21:37:59 | <geekosaur> | would this be a queston for #haskell-language-server ? |
| 21:38:47 | → | gdhffd[m] joins (~gdhffdmat@2001:470:69fc:105::1:799) |
| 21:38:48 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 21:38:51 | → | fendor[m] joins (~fendormat@2001:470:69fc:105::fcbd) |
| 21:38:58 | <aegon> | oh snap, it would be, headed over there |
| 21:39:42 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 21:40:41 | → | unclechu joins (~unclechu@2001:470:69fc:105::354) |
| 21:41:01 | × | slac76440 quits (~slack1256@191.125.99.211) (Ping timeout: 256 seconds) |
| 21:41:08 | → | mekeor[m] joins (~mekeormat@2001:470:69fc:105::17e4) |
| 21:41:49 | → | fgaz joins (~fgaz@2001:470:69fc:105::842) |
| 21:42:53 | → | kosmikus[m] joins (~andresloe@2001:470:69fc:105::95d) |
| 21:42:54 | → | craige[m] joins (~craigemcw@2001:470:69fc:105::35f1) |
| 21:42:54 | → | fcortesi joins (~fcortesi@2001:470:69fc:105::f3a9) |
| 21:42:56 | → | the-coot[m] joins (~the-cootm@2001:470:69fc:105::95f) |
| 21:43:31 | → | jesser[m] joins (~jessermat@2001:470:69fc:105::d5ae) |
| 21:43:32 | → | fakehacker[m] joins (~fakehacke@2001:470:69fc:105::b5f0) |
| 21:46:29 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds) |
| 21:46:50 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 21:46:53 | → | jneira[m] joins (~jneiramat@2001:470:69fc:105::d729) |
| 21:47:27 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 21:48:59 | → | jespada joins (~jespada@190.7.36.46) |
| 21:49:29 | → | bb010g joins (~bb010g@2001:470:69fc:105::9a5) |
| 21:50:09 | → | TomasJakl[m] joins (~jaklttchn@2001:470:69fc:105::a42) |
| 21:50:11 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 21:50:39 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3) |
| 21:51:35 | → | MatrixTravelerbo joins (~voyagert2@2001:470:69fc:105::22) |
| 21:51:45 | → | Topik[m] joins (~topikmatr@2001:470:69fc:105::a082) |
| 21:51:57 | → | random-jellyfish joins (~random-je@user/random-jellyfish) |
| 21:52:52 | → | conphiz[m] joins (~conphizma@2001:470:69fc:105::c052) |
| 21:52:52 | → | marinelli[m] joins (~marinelli@2001:470:69fc:105::2d8) |
| 21:56:21 | × | haskl[error] quits (~haskl@user/haskl) (Ping timeout: 245 seconds) |
| 21:56:24 | → | pavonia joins (~user@user/siracusa) |
| 22:00:21 | → | pgib joins (~textual@173.38.117.89) |
| 22:00:28 | → | joel135 joins (sid136450@hampstead.irccloud.com) |
| 22:02:36 | <joel135> | could you help me get this to compile? https://paste.tomsmeding.com/C86kwGkO |
| 22:03:42 | <joel135> | i thought i had learned how to handle this situation, namely by making my `Poly` type into a datatype, but alas no |
| 22:05:29 | <joel135> | i thought the constructor would hide the `forall` business from the typechecker and make it happy |
| 22:06:25 | <fuzzypixelz> | I wrote this a couple weeks ago: https://github.com/fuzzypixelz/Hustle |
| 22:06:55 | <fuzzypixelz> | I'd like your opinions on how it can improved |
| 22:08:13 | <fuzzypixelz> | I'm afraid I've made some irrecoverable decisions from the start (like using Megaparsec instead of attoparsec ... only after I was done did I notice all parsing libs use atto) |
| 22:09:33 | <geekosaur> | joel135, what sticks out to me immediately is that the foldr already produces a Poly, so you shouldn't need to wrap it in another one |
| 22:09:53 | <joel135> | ah thanks |
| 22:10:01 | <joel135> | silly mistake :) |
| 22:16:16 | → | haasn` joins (~nand@haasn.dev) |
| 22:16:23 | × | LiaoTao quits (~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection) |
| 22:16:41 | × | jespada quits (~jespada@190.7.36.46) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 22:16:46 | × | hololeap quits (~hololeap@user/hololeap) (Read error: Connection reset by peer) |
| 22:16:52 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 22:17:08 | × | aforemny quits (~aforemny@static.248.158.34.188.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in) |
| 22:17:18 | → | LiaoTao joins (~LiaoTao@gateway/tor-sasl/liaotao) |
| 22:17:20 | × | fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 256 seconds) |
| 22:17:20 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 22:17:24 | × | haasn quits (~nand@haasn.dev) (Ping timeout: 268 seconds) |
| 22:17:25 | × | tired quits (~tired@user/tired) (Quit: /) |
| 22:17:27 | → | aforemny joins (~aforemny@static.248.158.34.188.clients.your-server.de) |
| 22:17:29 | × | V quits (~v@anomalous.eu) (Ping timeout: 264 seconds) |
| 22:17:30 | × | xnbya quits (~xnbya@2a01:4f8:c17:cbdd::1) (Ping timeout: 260 seconds) |
| 22:17:40 | haasn` | is now known as haasn |
| 22:17:42 | → | xnbya joins (~xnbya@2a01:4f8:c17:cbdd::1) |
| 22:17:43 | → | tired joins (~tired@user/tired) |
| 22:17:47 | → | V joins (~v@anomalous.eu) |
| 22:18:02 | → | hololeap joins (~hololeap@user/hololeap) |
| 22:19:11 | → | jpds1 joins (~jpds@gateway/tor-sasl/jpds) |
| 22:19:27 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 22:19:30 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 22:19:30 | finn_elija | is now known as FinnElija |
| 22:20:32 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 22:22:33 | → | EvanR joins (~evan@user/evanr) |
| 22:22:56 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:23:52 | × | vladl quits (~vladl@174.127.234.115) (Quit: Lost terminal) |
| 22:24:23 | × | johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 264 seconds) |
| 22:27:20 | × | JSharp quits (sid4580@id-4580.lymington.irccloud.com) (Ping timeout: 260 seconds) |
| 22:28:21 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 22:28:25 | × | max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Quit: Leaving) |
| 22:28:39 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 22:28:49 | → | JSharp joins (sid4580@id-4580.lymington.irccloud.com) |
| 22:30:08 | × | Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection) |
| 22:32:32 | → | Kaiepi joins (~Kaiepi@156.34.44.192) |
| 22:33:26 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 22:38:40 | <joel135> | now i finished the file i was working on https://github.com/JoelSjogren/diff-poly/blob/main/DiffPoly.hs |
| 22:41:02 | → | haskl joins (~haskl@user/haskl) |
| 22:41:26 | × | michalz quits (~michalz@185.246.204.40) (Remote host closed the connection) |
| 22:41:29 | × | dolio quits (~dolio@130.44.130.54) (Quit: ZNC 1.8.2 - https://znc.in) |
| 22:43:21 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 22:44:02 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 22:45:55 | × | alphabeta quits (~kilolympu@185.65.135.177) (Quit: Quitting IRC :() |
| 22:46:32 | × | toreiussd quits (uid469671@id-469671.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 22:47:34 | → | dolio joins (~dolio@130.44.130.54) |
| 22:48:22 | × | haskl quits (~haskl@user/haskl) (Ping timeout: 260 seconds) |
| 22:48:34 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 22:50:03 | <ski> | joel135 : "next step" after naturals ? |
| 22:50:12 | <joel135> | yes!! |
| 22:50:15 | <joel135> | hej stefan |
| 22:50:28 | <ski> | hejs :) |
| 22:51:10 | <ski> | this reminds me of some investigation i did recently, comparing church numerals to logic programming |
| 22:51:29 | → | haskl joins (~haskl@user/haskl) |
| 22:51:39 | <joel135> | let me write out the induction hypothesis for https://github.com/JoelSjogren/diff-poly/blob/main/DiffPoly.hs#L85 |
| 22:51:49 | <joel135> | (in unerased form) |
| 22:53:12 | <joel135> | "whenever k : Poly is such that for all f : Poly differentiability of f implies that of f+k (= g), then for all h : Poly differentiability of h implies that of h+xg" |
| 22:53:51 | <ski> | (and, to a prototype i did, years ago, that implemented goal implications (with the possibility of arbitrary left-nesting) on top of basic logic programming, by employing a stack of `ContT's, nested as deep as you with (left-nesting implication increases depth by one), and then some mutation at the bottom, for logic variables. using this, you can "backtrack backtracking",&c. .. also an interesting "duality" |
| 22:53:57 | <ski> | of sorts between logic variables and skolems/atoms emerged) |
| 22:54:26 | <joel135> | (there may be some subtle error in what i just wrote) |
| 22:54:59 | <joel135> | hmm, let me switch gears and start to take in what you are writing |
| 22:55:51 | <ski> | imagine something like `forall o. Fix (ContT o) a' .. although not quite that |
| 22:57:13 | <joel135> | oh yes, that left-nesting is actually how i sketched `level_2` out on paper first, namely `((f, f') ↦ (g, g')) ↦ ((h, h') ↦ (l, l'))` |
| 22:59:02 | <ski> | addition and multiplication can be done with plain `ContT' (iow the same global "answer type" `o'), but exponentiation seems to require `Codensity' (iow, you pass around `forall o.'-ed stuff, rank-2) |
| 22:59:22 | <ski> | (addition = disjunction, multiplication = conjunction, exponentiation = implication) |
| 23:00:19 | <joel135> | wait, how does Fix take two arguments? |
| 23:00:58 | <ski> | imagine a `Fix :: ((* -> *) -> (* -> *)) -> (* -> *)' |
| 23:01:10 | <joel135> | ok |
| 23:01:16 | → | son0p joins (~ff@181.136.122.143) |
| 23:01:26 | <ski> | (or `forall k. (k -> k) -> k', although that seems harder to define) |
| 23:01:35 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds) |
| 23:01:39 | <joel135> | yes |
| 23:02:53 | <joel135> | are you saying that exponentiation requires you to use two precisely two levels of ContT? |
| 23:02:58 | <ski> | idea being that you can take limit of `o',`o -> o',`(o -> o) -> (o -> o)',`((o -> o) -> (o -> o)) -> ((o -> o) -> (o -> o))',&c. .. or, in my case, rather allow the user to pick the depth, at run-time |
| 23:03:25 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 23:03:27 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 23:03:48 | → | brainfreeze joins (~brainfree@2a03:1b20:4:f011::20d) |
| 23:04:35 | <ski> | no, i was saying that `exp :: Church o -> Church o -> Church o' where `type Church o = (o -> o) -> (o -> o)' doesn't work, you need `exp :: (forall o. Church o) -> (forall o. Church o) -> (forall o. Church o)' |
| 23:05:23 | <ski> | (i guess, allowing the user to pick the depth is like having a stream of progressively deeper nestings) |
| 23:06:16 | <joel135> | this limit of o',`o -> o',`(o -> o) -> (o -> o)',`((o -> o) -> (o -> o)) -> ((o -> o) -> (o -> o))',&c reminds me of stuff i recently learned about untyped lambda calculus |
| 23:06:40 | <ski> | anyway, using a third level to represent polynomials sounds interesting. i'd have to investigate that, and how that could align with what i've been pondering here |
| 23:06:47 | × | dolio quits (~dolio@130.44.130.54) (Quit: ZNC 1.8.2 - https://znc.in) |
| 23:06:48 | <ski> | yes ? |
| 23:08:04 | <ski> | `TPoly' is dual numbers over `Poly' ? |
| 23:08:18 | <joel135> | yes |
| 23:09:14 | <joel135> | i believe this T : Type -> Type in general, but not sure how to construct it for other types |
| 23:10:11 | <joel135> | it constructs the tangent bundle of a type, and it is supposed to "know" somehow that Poly is a smooth thing |
| 23:10:19 | <ski> | joel135 : it might be interesting to spell out the type applications in your code, to see where you just pass on the same `s', and where you pass on something different |
| 23:10:41 | <ski> | (if you do) |
| 23:11:38 | → | dsrt^ joins (~dsrt@h50.174.139.63.static.ip.windstream.net) |
| 23:13:11 | <joel135> | i *think* the only lines are 64 and 85 |
| 23:13:25 | <joel135> | but i may be wrong about this after line 85 |
| 23:14:02 | <ski> | well, line 64 is `s = Coeffs', i'd guess, yes ? |
| 23:14:12 | <joel135> | yes |
| 23:14:29 | <joel135> | and later it is s = TPoly |
| 23:14:40 | <ski> | and line 85 is `s = (Poly,Poly)', i think ? |
| 23:14:45 | <joel135> | yes |
| 23:14:47 | <ski> | yea |
| 23:14:57 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 23:15:30 | <ski> | i wonder if you could reduce that to `s1 = ..s0..', if you start by "opening up" the `Poly' that you're attempting to produce, calling its parameter `s0' |
| 23:16:16 | <ski> | (i did such reductions for addition, multiplication, exponentiation, starting with an impredicative thing, and ending up with an equivalent predicative thing) |
| 23:17:29 | <joel135> | ok i will try to rewrite it in terms of a single type variable like s and see if it works out |
| 23:17:46 | <joel135> | by the way, when you did the logic programming stuff, what was the target language? did you compile it to actual machine code? |
| 23:18:17 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 23:18:41 | <joel135> | (assuming my question makes sense) |
| 23:19:35 | <ski> | it was just a Haskell combinator library |
| 23:19:45 | <joel135> | ok |
| 23:19:56 | <ski> | (partially inspired by a paper by Seres and Spivey, and a later one by Koen Claessen) |
| 23:20:22 | <ski> | it would be interesting to ponder how one'd do it, in terms of something WAM-like, say |
| 23:20:36 | → | alzgh joins (~alzgh@user/alzgh) |
| 23:20:55 | <ski> | (iow, consider ways to improve the resource management, rather than just deferring to GC for everything) |
| 23:20:57 | <joel135> | also by the way, this limit of `o',`o -> o',`(o -> o) -> (o -> o)',`((o -> o) -> (o -> o)) -> ((o -> o) -> (o -> o))',&c reminds me of the colimit of ΩⁿΣⁿX which is called "stabilization" or something like that |
| 23:21:25 | <joel135> | (https://ncatlab.org/nlab/show/spectrum) |
| 23:22:08 | <joel135> | i looked a bit a barendregt's book on lambda calculus and there are some parallels i think, but i haven't thought it through fully |
| 23:22:15 | <joel135> | at* |
| 23:23:08 | <ski> | you know how you can define an implication `( Antecedent => Consequent )' (commonly spelled `forall(Antecedent,Consquent)' in implementations) in Prolog as `\+ ( Antecedent,\+ Consequent )', yes ? (where (\+)/1 is the usual negation-as-failure (imperfect, sometimes unsound) approximation to a sound logical negation) |
| 23:23:51 | <joel135> | WAM = https://en.wikipedia.org/wiki/Warren_Abstract_Machine ? |
| 23:24:00 | <ski> | operationally, what happens is that you'll enumerate all solutions of `Antecedent', and then check that `Consequent' holds for that solution. the enumeration is aborted if `Consequent' fails |
| 23:24:04 | <ski> | yea |
| 23:24:08 | <joel135> | ok |
| 23:24:21 | × | qwedfg quits (~qwedfg@user/qwedfg) (Remote host closed the connection) |
| 23:24:57 | <joel135> | i don't have much practical experience with prolog so i have to read what you just wrote slowly |
| 23:25:11 | <ski> | if you have variables which occur (only) in `Antecedent' and `Consequent', then they behave as if they were universally quantified over the implication (hence the name forall/2). (because they behave as existentially quantified just inside the outer negation) |
| 23:25:38 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 23:26:01 | <ski> | now, the problem with this is that you can't use this to export information (other than success/failure) (unless you use side-effects, mutation that survives backtracking ..) |
| 23:26:06 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 23:26:58 | <ski> | so, it's great to check that every solution of `Antecedent' actually satisfies `Consequent' .. but if `Antecedent' is e.g. enumerating elements of some kind of collection, you unfortunately can't use this to let `Consequent' instantiate those elements |
| 23:27:18 | → | qwedfg joins (~qwedfg@user/qwedfg) |
| 23:27:43 | <joel135> | i don't know what you mean by instantiate |
| 23:27:55 | → | dolio joins (~dolio@130.44.130.54) |
| 23:28:46 | <ski> | give a definite value |
| 23:29:32 | <ski> | in Haskell, as soon as you introduce a binder for a variable, it will, at run-time, be asssociated with a value (or rather, with a computation that will eventually produce a value) |
| 23:29:35 | <joel135> | do you mean that if the implication fails one would like this to give a definite value to the variables that are universally quantified over? |
| 23:30:20 | <ski> | in logic programming, these two steps are decoupled from each other. you introduce a variable with the existential (or universal) quantifier. then (possibly much) later, you can associate a value with it |
| 23:32:01 | <ski> | not the universally quantified variables (which are local, so private), but other (free/nonlocal) variables which are put in some relation (usually using equality) with those universally quantified variables, inside of `Consequent' |
| 23:33:11 | <joel135> | ok, then i seem to see sort of what you are talking about |
| 23:33:47 | <ski> | take `append(Xs,Ys,Zs)', which expresses what one would state as `zs = xs ++ ys' in Haskell |
| 23:34:01 | <joel135> | ok |
| 23:34:26 | <ski> | predicates/relations in logic programming have no predetermined input vs. output status of parameters. sometimes a parameter is input, sometimes it's output |
| 23:34:54 | <joel135> | right, as = is undirected |
| 23:35:22 | <ski> | if you call `append([0,1,2],[3,4],L)', the system will instantiate `L', having the query/goal succeed, and the answer `L = [0,1,2,3,4]' is reported |
| 23:36:02 | <ski> | each call will either succeed or fail. it can succeed many times (with possibly different solutions/answers). and then it fails at the end, meaning "no (more) solutions" |
| 23:37:05 | <joel135> | sort of like the list monad? |
| 23:38:10 | <ski> | in a conjunction, you start by calling the first conjunct. if it succeeds, you proceed to the next one. if a conjunct fails, backtracking starts, and you "execute backwards", going back to the previous conjunct (undoing any instantiations to variables that were done in the meantime), asking it to produce an alternative solution, if it can. if it does, then that conjuct succeeds, and normal left-to-right |
| 23:38:16 | <ski> | execution proceeds. otherwise, backtracking continues to the left |
| 23:38:17 | <ski> | yes |
| 23:38:23 | <syd> | just going off the last few messages of the exchange, but you may find this paper interesting: https://rkrishnan.org/files/wadler-1985.pdf |
| 23:38:52 | <joel135> | syd: wadler has some good titles :) |
| 23:39:06 | <ski> | so, `generate(X),test(X)' is a common basic paradigm of looping. generate/1 generates candidate solutions, and test/1 checks them. so, it'll go ping-pong until some candidate passes |
| 23:39:37 | <ski> | syd : read it, years ago :) |
| 23:40:00 | <syd> | joel135: makes them easy to find again too, there's always a couple of idiosyncratic word choices that are guaranteed to be the top google result ;p |
| 23:41:09 | <ski> | anyway, `append([0,1,2],[3,4],[0,1,2,3,4])' and `append([0,1,2],[3,4],[0,1,5,3,4])' are calls that will simply either succeed or fail, not binding any variables (since there are none in the calls), so not providing/exporting any information apart from the success/failure status |
| 23:42:10 | <ski> | while `append(Front,Back,[0,1,2])' will enumerate four solutions. first `Front = [],Back = [0,1,2]', then, when you ask for more (by forcing backtracking), you'll get `Front = [1],Back = [1,2]',&c. |
| 23:42:26 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 260 seconds) |
| 23:42:31 | <ski> | similarly, `member(X,[0,1,2])' will enumerate solutions `X = 0',`X = 1',`X = 2' |
| 23:43:07 | <joel135> | i have a strange question |
| 23:43:25 | <ski> | yes ? |
| 23:44:23 | <joel135> | if you ask `member(X,[0,1,2])' for the next solution after it has produced `X = 2', should this cause some sort of "backtracking to outside of the logical programming process"? |
| 23:44:58 | <joel135> | assuming `member(...)' is the first instruction of the program |
| 23:45:37 | <ski> | syd : "How to add laziness to a strict language, without even being odd" by Philip Wadler,Walid Taha,David MacQueen in 1998-09 at <https://homepages.inf.ed.ac.uk/wadler/topics/language-design.html#lazyinstrict> is another nice title :) |
| 23:46:07 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 23:46:27 | <joel135> | i think you would need to have a logic programming language within another logic programming language in order for my question to make sense |
| 23:46:35 | <ski> | joel135 : well, when you're testing / fooling around with Prolog programs, you usually work in the interactor / rppl (read-prove-print-loop), prompt being `?-' |
| 23:47:10 | <ski> | so, `?- member(X,[0,1,2]).', after `X = 2', failure would cause execution to "hit the left margin", and so the whole query fails |
| 23:47:19 | <syd> | again, sorry for butting in, but have you tried miniKanren ski? |
| 23:47:32 | <syd> | untyped (the racket impl. at least) but lots of fun. |
| 23:48:06 | <ski> | (so, in terms of delimited continuation barriers, if you want to think of it like that, each query is delimited from other queries. as soon as a query is finished, you won't later attempt to backtrack it) |
| 23:48:17 | <joel135> | i think i have a very old miniKanren bookmark on youtube that i never followed up |
| 23:48:26 | <ski> | syd : i've heard nice things about it, but i've yet to dive into what it offers |
| 23:49:22 | <ski> | anyway, consider `( member(X,Xs) => between(1,6,X) )' .. `between(1,6,X)' is like `x <- [1 .. 6]'. so, this can be used to check that every element of `Xs' is in the requisite range |
| 23:50:11 | <joel135> | ok |
| 23:50:17 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 23:50:28 | → | uiltondutra joins (~uiltondut@45.183.251.42) |
| 23:50:34 | <ski> | however, i'd like for this query/goal to also work, even if the elements of `Xs' aren't known/initialized/instantiated yet (but they length would have to be known, or else we're in more trouble, having infinite number of solutions .. and traversal order starts to matter, for completeness. Prolog uses depth-first) |
| 23:50:55 | <ski> | iow, then it ought to enumerate all possible selections of the elements from the range (with replacement) |
| 23:51:31 | × | zincy_ quits (~zincy@2a00:23c8:970c:4801:350f:7ee:191a:6f65) (Remote host closed the connection) |
| 23:51:55 | <ski> | the usual encoding (which has some uses, for sure) of implication, in terms of negation(-as-failure) can't do this, because it can't export information from a query, apart from answering yes/no |
| 23:52:12 | <ski> | but, this is exactly what my prototype managed to do :) |
| 23:52:23 | <joel135> | hmm, let me think about that for a moment |
| 23:53:19 | ← | uiltondutra parts (~uiltondut@45.183.251.42) () |
| 23:53:26 | <joel135> | is this related to what you wrote above? >>> also an interesting "duality" of sorts between logic variables and skolems/atoms emerged |
| 23:53:40 | <ski> | yes |
| 23:54:39 | → | faultline joins (~christian@nat-eduroam-01.scc.kit.edu) |
| 23:54:47 | <syd> | Can't Constraint Handling Rules help with that kind of thing? miniKanren doesn't have range constraints, but it does have (=/=) and asbent(o). |
| 23:55:02 | <ski> | you can define `false' as `\succeed fail -> fail', and `true' as `\succeed fail -> succeed fail'. the first fails immediately. the second succeeds, but if later code attempts to redo it (asking for another solution), it fails |
| 23:55:35 | × | faultline quits (~christian@nat-eduroam-01.scc.kit.edu) (Remote host closed the connection) |
| 23:56:25 | <ski> | disjunction `g0 \/ g1' is `\succeed fail -> g0 succeed (g1 succeed fail)', and conjunction `g0 /\ g1' is `\succeed fail0 -> g0 (\fail1 -> g1 gail1 succeed) fail0' |
| 23:56:42 | <ski> | here, a goal is construed as having type `(o -> o) -> (o -> o)' |
| 23:56:52 | → | faultline joins (~christian@nat-eduroam-01.scc.kit.edu) |
| 23:57:23 | <ski> | (if you implement this in a strict language, you'll have to sprinkle some `() ->'s in there, to delay stuff appropriately) |
| 23:57:48 | <ski> | syd : CHR helping with what ? |
| 23:58:32 | <syd> | the length of xs elements having to be known, even if it isn't instantiated yet |
| 23:58:41 | <ski> | CHR is a paradigm of forward-chaining (reasoning forwards from assumptions/facts/axioms), embedded in Prolog (which is natively backward-chaining, reasoning backwards from the goal) |
| 23:58:55 | <joel135> | succeed : o -> o ? |
| 23:59:00 | <ski> | yes |
| 23:59:49 | <ski> | (if you like, you could eta-expand my definition of disjunction and conjunction above a bit, specifically eta-expand `succeed' in the body .. but i figured i'd avoid some clutter) |
| 23:59:59 | <syd> | perhaps I'm erroneously assuming CHR is related to miniKanren constraints, but you can have side conditions like the query variable being x succeeding, such that it is not equal to some other value, or it is absent from another query variable which is a list etc. |
All times are in UTC on 2021-11-05.