Logs on 2022-01-11 (liberachat/#haskell)
| 00:06:27 | <Axman6> | hololeap: monochrom: jackdk: https://ibb.co/2KmCCHF |
| 00:07:13 | <jackdk> | Axman6... |
| 00:07:15 | → | little_mac joins (~little_ma@2601:410:4300:3ce0:5835:5767:1aa7:b5ec) |
| 00:08:24 | <monochrom> | Haha congrats |
| 00:09:24 | <Axman6> | f it, it's going on reddit |
| 00:09:35 | <hololeap> | heh |
| 00:09:35 | × | acidjnk_new quits (~acidjnk@p200300d0c7271e155922c761977fca48.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 00:09:35 | × | acidjnk quits (~acidjnk@p200300d0c7271e155922c761977fca48.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 00:09:45 | <monochrom> | There is also a connection with dependency injection, may I add... |
| 00:10:13 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:cb46:c04b:665a:c687) (Ping timeout: 240 seconds) |
| 00:11:10 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 00:11:39 | <Axman6> | Image posts not allowed :'( don't they know I have @ in here! |
| 00:12:59 | <monochrom> | It is still draft but my https://www.vex.net/~trebla/haskell/abs-type-param.html opens with a church encoding example but I relate it to dependency injection instead. >:) |
| 00:14:06 | → | falafel joins (~falafel@2603-8000-d800-688c-54f8-65c3-409b-d4a1.res6.spectrum.com) |
| 00:15:40 | <dolio> | This 100 year old thing is just a more general version of this much newer thing I came up with because I didn't know about the much older thing. :þ |
| 00:16:01 | <jackdk> | that's my favourite genre of conference talks |
| 00:16:26 | <jackdk> | particularly if the speaker invented the less general thing, and you get to follow along the path of dawning realisation |
| 00:17:52 | <hpc> | when that happens to me i just think "oh phew, it was a good idea after all" |
| 00:18:39 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 00:18:49 | <Axman6> | so I used church encoding yesterday to try and speed up somecode that would allocate IORefs when really State should be enough. I was surprised to find that the IORefs were both faster and ended up allocating less: https://paste.tomsmeding.com/h6aIktOI |
| 00:19:55 | → | puke joins (~puke@user/puke) |
| 00:20:06 | <Axman6> | using the normal newtype S s a = S (a -> IO (a,s)) was even worse |
| 00:20:13 | × | puke quits (~puke@user/puke) (Client Quit) |
| 00:20:50 | <Axman6> | edwardk: ^ I came up with another way to write memo with discrimination, but I'm surprised it performed worse than the IORef version |
| 00:24:08 | × | max22- quits (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Remote host closed the connection) |
| 00:24:23 | <jackdk> | Axman6: you gonna PR this thing at any point? |
| 00:24:36 | <Axman6> | perhaps... |
| 00:26:29 | <jackdk> | Does this monadic variant of `local` have a common name? `localM :: MonadReader r m => (r -> m r) -> m a -> m a` |
| 00:27:13 | <[itchyjunk]> | can i use something and define after in list comprehension? [y | y <- x, x <- xs] ? |
| 00:27:17 | × | hud quits (~hud@uwyo-129-72-161-67.uwyo.edu) (Ping timeout: 256 seconds) |
| 00:27:20 | <Axman6> | why do I want to call that locum |
| 00:27:31 | <Axman6> | no |
| 00:28:57 | <Axman6> | "locum-tenens: A person, especially a physician or cleric, who substitutes temporarily for another." seems apt |
| 00:29:10 | <[itchyjunk]> | can i nest it ? [y | y <- [x | x <- xs]] |
| 00:29:38 | <Axman6> | yes |
| 00:29:40 | <Axman6> | uh |
| 00:29:47 | → | puke joins (~puke@user/puke) |
| 00:29:49 | <Axman6> | I mean, that will do something, but not the same thing |
| 00:29:56 | <[itchyjunk]> | :< |
| 00:30:20 | <Axman6> | in the firt one, xs :: [[a]], in the second it onlt needs to be [a] because the inner comprehension is id |
| 00:30:48 | <Axman6> | > ( \xs -> [x | x <- xs]) [1..10] |
| 00:30:50 | <lambdabot> | [1,2,3,4,5,6,7,8,9,10] |
| 00:32:38 | → | Inst joins (~delicacie@2601:6c4:4080:3f80:35fa:dcbe:dd4e:5a43) |
| 00:36:07 | → | notzmv joins (~zmv@user/notzmv) |
| 00:37:45 | <jackdk> | Axman6: I dunno why you want to call it locum, but given the amazonka refactor I'm considering, having `localEnvM :: MonadAmazonka m => (Env -> m Env) -> m a -> m a` is going to be so useful that I think it's worth naming (consider `localEnvM (fromAssumedRole "arn:aws:..." "assumed-role") $ do ...`) |
| 00:39:53 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 00:39:53 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 00:39:53 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:40:22 | <Axman6> | looks lovely |
| 00:40:36 | <Axman6> | and i think the name is fine |
| 00:40:36 | → | jkaye_ joins (~qicruser@2604:ca00:158:98c7::662:b620) |
| 00:41:27 | <jackdk> | it's like almost under the Fairbairn threshold, but its implementation is a little awkward |
| 00:41:30 | <monochrom> | locum tenet: A person whose time is backwards temporarily >:) |
| 00:41:41 | <hololeap> | prependKleisli |
| 00:42:02 | × | tomboy64 quits (~tomboy64@user/tomboy64) (Ping timeout: 240 seconds) |
| 00:42:28 | <hpc> | monochrom: coforwards |
| 00:42:36 | × | burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Remote host closed the connection) |
| 00:43:09 | → | burnsidesLlama joins (~burnsides@client-8-69.eduroam.oxuni.org.uk) |
| 00:43:47 | × | jkaye_ quits (~qicruser@2604:ca00:158:98c7::662:b620) (Read error: Connection reset by peer) |
| 00:44:15 | → | jkaye_ joins (~qicruser@2604:ca00:158:98c7::662:b620) |
| 00:45:29 | <hololeap> | appendMonadicEndomorphism |
| 00:46:17 | <hololeap> | oh, I guess it would still be prepending |
| 00:46:26 | × | jgeerds quits (~jgeerds@55d4bbed.access.ecotel.net) (Ping timeout: 252 seconds) |
| 00:47:50 | × | burnsidesLlama quits (~burnsides@client-8-69.eduroam.oxuni.org.uk) (Ping timeout: 256 seconds) |
| 00:48:17 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds) |
| 00:50:00 | → | shapr joins (~user@2601:7c0:c202:5190:cc12:44b:f211:c38f) |
| 00:50:49 | × | jkaye_ quits (~qicruser@2604:ca00:158:98c7::662:b620) (Read error: Connection reset by peer) |
| 00:59:32 | × | TonyStone quits (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com) (Read error: Connection reset by peer) |
| 01:01:22 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) |
| 01:11:17 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:38 | → | euandreh joins (~euandreh@2804:14c:33:9fe5:87d8:fa0a:4d3d:df57) |
| 01:12:57 | × | falafel quits (~falafel@2603-8000-d800-688c-54f8-65c3-409b-d4a1.res6.spectrum.com) (Ping timeout: 240 seconds) |
| 01:13:54 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 01:17:24 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:17:46 | → | falafel joins (~falafel@2603-8000-d800-688c-54f8-65c3-409b-d4a1.res6.spectrum.com) |
| 01:23:29 | × | DNH quits (~DNH@2a02:8108:1100:16d8:80ee:56b1:c7cc:d16d) (Quit: Textual IRC Client: www.textualapp.com) |
| 01:23:57 | × | jkaye quits (~jkaye@2601:281:8300:7530:d171:6c14:e395:f91b) (Ping timeout: 240 seconds) |
| 01:27:37 | × | falafel quits (~falafel@2603-8000-d800-688c-54f8-65c3-409b-d4a1.res6.spectrum.com) (Ping timeout: 240 seconds) |
| 01:30:45 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Ping timeout: 256 seconds) |
| 01:34:33 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.4) |
| 01:35:17 | × | Inst quits (~delicacie@2601:6c4:4080:3f80:35fa:dcbe:dd4e:5a43) (Ping timeout: 240 seconds) |
| 01:35:24 | <albet70> | how to get all k from Map k v? |
| 01:35:48 | <Axman6> | @hoogle keys |
| 01:35:48 | <lambdabot> | Data.IntMap.Internal keys :: IntMap a -> [Key] |
| 01:35:48 | <lambdabot> | Data.IntMap.Lazy keys :: IntMap a -> [Key] |
| 01:35:48 | <lambdabot> | Data.IntMap.Strict keys :: IntMap a -> [Key] |
| 01:35:56 | <Axman6> | @hoogle Map k a -> [k] |
| 01:35:57 | <lambdabot> | Data.Map.Internal keys :: Map k a -> [k] |
| 01:35:57 | <lambdabot> | Data.Map.Lazy keys :: Map k a -> [k] |
| 01:35:57 | <lambdabot> | Data.Map.Strict keys :: Map k a -> [k] |
| 01:37:11 | → | Inst joins (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) |
| 01:39:58 | × | xsperry quits (~xs@user/xsperry) (Ping timeout: 256 seconds) |
| 01:41:05 | <albet70> | \k -> lookup k target == flip lookup target? |
| 01:42:14 | <Axman6> | yep |
| 01:42:24 | <albet70> | how to $ to express this? |
| 01:42:33 | <Axman6> | or (`lookup` target) |
| 01:42:49 | <Axman6> | I don't understand the question |
| 01:43:03 | <albet70> | "Axman6 :or (`lookup` target)", could with $? |
| 01:44:04 | <Axman6> | I don't know what that means. what code are you trying to write that doesn't work? |
| 01:45:18 | <albet70> | never mind, just a little wounder if $ can change the argument order |
| 01:46:01 | <Axman6> | :t ($) |
| 01:46:02 | <lambdabot> | (a -> b) -> a -> b |
| 01:47:35 | <albet70> | :t const |
| 01:47:36 | <lambdabot> | a -> b -> a |
| 01:56:59 | <ephemient> | :t \target -> ($ target) . lookup |
| 01:57:00 | <lambdabot> | Eq a => [(a, b)] -> a -> Maybe b |
| 01:57:55 | <ephemient> | so sure, you can find a way to express (flip lookup target) using ($), but it doesn't feel natural |
| 02:02:27 | <monochrom> | It's pretty contrived. |
| 02:05:52 | → | ub joins (~Thunderbi@p200300ecdf0994f52db7d35c756e5286.dip0.t-ipconnect.de) |
| 02:06:57 | → | TonyStone joins (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com) |
| 02:07:22 | × | ubert quits (~Thunderbi@p200300ecdf0994f82db7d35c756e5286.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 02:07:22 | ub | is now known as ubert |
| 02:08:52 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 02:13:34 | → | califax- joins (~califax@user/califx) |
| 02:13:58 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 02:14:39 | × | califax quits (~califax@user/califx) (Ping timeout: 276 seconds) |
| 02:14:40 | califax- | is now known as califax |
| 02:18:28 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:87d8:fa0a:4d3d:df57) (Ping timeout: 268 seconds) |
| 02:22:13 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 02:22:13 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 02:22:13 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:23:19 | × | little_mac quits (~little_ma@2601:410:4300:3ce0:5835:5767:1aa7:b5ec) (Remote host closed the connection) |
| 02:24:24 | → | little_mac joins (~little_ma@2601:410:4300:3ce0:55c5:5707:fdcb:78cd) |
| 02:28:02 | → | neurocyte09175 joins (~neurocyte@IP-045143079193.dynamic.medianet-world.de) |
| 02:28:02 | × | neurocyte09175 quits (~neurocyte@IP-045143079193.dynamic.medianet-world.de) (Changing host) |
| 02:28:02 | → | neurocyte09175 joins (~neurocyte@user/neurocyte) |
| 02:29:16 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 02:30:15 | × | neurocyte0917 quits (~neurocyte@user/neurocyte) (Ping timeout: 256 seconds) |
| 02:30:15 | neurocyte09175 | is now known as neurocyte0917 |
| 02:30:20 | × | cheater quits (~Username@user/cheater) (Read error: Connection reset by peer) |
| 02:30:37 | × | xff0x quits (~xff0x@2001:1a81:5310:700:28af:ed1a:1e0a:acc) (Ping timeout: 240 seconds) |
| 02:32:37 | → | xff0x joins (~xff0x@2001:1a81:534d:9900:3a80:4bac:7552:9848) |
| 02:33:12 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 02:33:12 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 02:33:12 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:33:47 | → | cheater joins (~Username@user/cheater) |
| 02:34:51 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:37:17 | → | raym joins (~raym@user/raym) |
| 02:39:01 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 02:43:16 | → | xsperry joins (~xs@user/xsperry) |
| 02:43:26 | × | Akiva quits (~Akiva@user/Akiva) (Ping timeout: 256 seconds) |
| 02:53:29 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:58:58 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 02:59:04 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 02:59:21 | → | lavaman joins (~lavaman@98.38.249.169) |
| 03:04:49 | → | tomboy64 joins (~tomboy64@user/tomboy64) |
| 03:05:32 | × | mikoto-chan quits (~mikoto-ch@185.25.79.189) (Ping timeout: 256 seconds) |
| 03:07:34 | → | mikoto-chan joins (~mikoto-ch@185.25.79.189) |
| 03:07:39 | × | jushur quits (~human@user/jushur) (Quit: ¯\_(ツ)_/¯) |
| 03:08:25 | → | BrokenClutch joins (~pioneer@2804:d41:c292:6c00:33d8:d2f1:d8af:153e) |
| 03:09:07 | <BrokenClutch> | I've learned the difference between srfi-1's fold and haskell |
| 03:09:12 | <BrokenClutch> | \o/ |
| 03:12:03 | <EvanR> | which is what |
| 03:13:24 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 03:13:24 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:13:24 | finn_elija | is now known as FinnElija |
| 03:16:26 | <Axman6> | you haven't truly learnt it if you can't teach us :) |
| 03:17:09 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4) |
| 03:18:03 | <shapr> | Is Axman6 still the king of the channel? |
| 03:18:13 | × | mikoto-chan quits (~mikoto-ch@185.25.79.189) (Ping timeout: 240 seconds) |
| 03:18:45 | <Axman6> | yes, and no one know why D: |
| 03:18:48 | <Axman6> | except you |
| 03:18:56 | shapr | cackles evilly |
| 03:20:28 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 03:20:33 | <Axman6> | I was very good and refrained from weilding my power yesterday when someone was talking _a lot_ of nonsense |
| 03:20:50 | <Axman6> | got very close to @where ops'ing though |
| 03:20:55 | <shapr> | well, if you got the ops |
| 03:21:07 | <shapr> | you've been around to know the right thing to do |
| 03:29:42 | <BrokenClutch> | the struct of foldl on srfi-1 is just a reverse of foldr |
| 03:30:06 | <BrokenClutch> | like, foldr is a_1 to a_n and foldl is a_n to a_1 |
| 03:30:19 | <BrokenClutch> | with almost the same algorithm |
| 03:31:12 | <BrokenClutch> | foldl f i l = (f a_n (foldl f i (cdr l)) |
| 03:32:18 | <BrokenClutch> | foldr f i l = (f a_1 (foldr f i (cdr l))) |
| 03:32:35 | <BrokenClutch> | with l on foldl being (a_n ... a_1) |
| 03:32:36 | <EvanR> | that seems backwards |
| 03:32:45 | <BrokenClutch> | and l on foldr being (a_1 ... a_n) |
| 03:32:50 | <BrokenClutch> | yeah, it's backwards |
| 03:33:26 | → | jkaye_ joins (~qicruser@2604:ca00:158:98c7::662:b620) |
| 03:34:30 | <Axman6> | there is a funcamental difference between foldl and foldr - one can run in constant space, the other allows for laziness in a lazy language, but leads to stack overflows in a strict language or when using strict functions |
| 03:38:08 | <BrokenClutch> | you can't have infinite loops with foldr |
| 03:38:16 | <BrokenClutch> | in eager languages (obviosly) |
| 03:38:29 | <BrokenClutch> | it would be a infinite loop |
| 03:38:33 | <BrokenClutch> | which is a big nono |
| 03:40:22 | × | gabiruh quits (~gabiruh@vps19177.publiccloud.com.br) (Ping timeout: 260 seconds) |
| 03:40:37 | → | gabiruh joins (~gabiruh@vps19177.publiccloud.com.br) |
| 03:40:40 | → | mikoto-chan joins (~mikoto-ch@185.25.79.189) |
| 03:41:03 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 03:41:29 | <dibblego> | well you can, if you fix the foldr implementation |
| 03:42:56 | × | td_ quits (~td@94.134.91.23) (Ping timeout: 256 seconds) |
| 03:44:32 | → | td_ joins (~td@94.134.91.153) |
| 03:44:47 | <BrokenClutch> | srfi is dumb |
| 03:44:51 | <BrokenClutch> | there are others |
| 03:45:07 | <BrokenClutch> | actually, fold is dumb |
| 03:45:12 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
| 03:45:21 | <BrokenClutch> | (i'm sorry, just joking, don't kill me) |
| 03:46:26 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1) |
| 03:47:53 | × | noddy quits (~user@user/noddy) (Quit: WeeChat 3.4) |
| 03:49:09 | → | noddy joins (~user@user/noddy) |
| 03:51:53 | <dibblego> | already dead to me bro |
| 03:52:17 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) (Ping timeout: 240 seconds) |
| 04:01:00 | → | yauhsien_ joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 04:01:00 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Read error: Connection reset by peer) |
| 04:05:54 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480::41) |
| 04:06:15 | → | user322 joins (~user322@75-32-237-142.lightspeed.rnpsca.sbcglobal.net) |
| 04:06:48 | → | Jing joins (~hedgehog@240e:390:7c53:a7e1:69b8:e285:4414:d6cb) |
| 04:07:18 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 256 seconds) |
| 04:08:42 | <Axman6> | does anyone have a relatively modern document on binding to C libraries from Haskell? I'd love to automate as much as possible (.h in, .hs out) and not sure what the current state of the art is. |
| 04:14:15 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
| 04:15:48 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 04:22:02 | <BrokenClutch> | Axman6 capi ftw |
| 04:23:17 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds) |
| 04:24:28 | <c_wraith> | starting at the .h file is too late. start from the specification, create bindings from that. (only works for one C library: https://github.com/ekmett/gl ) |
| 04:25:00 | <Axman6> | I'm just not sure what tools exist these days to help automate things |
| 04:25:46 | → | mbuf joins (~Shakthi@122.178.183.53) |
| 04:28:38 | × | user322 quits (~user322@75-32-237-142.lightspeed.rnpsca.sbcglobal.net) (Remote host closed the connection) |
| 04:35:40 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 04:35:57 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:39:10 | <ephemient> | hsc2hs still exists |
| 04:39:36 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
| 04:45:54 | → | deadmarshal joins (~deadmarsh@95.38.231.124) |
| 04:48:28 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 04:50:36 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 04:53:36 | × | jkaye_ quits (~qicruser@2604:ca00:158:98c7::662:b620) (Read error: Connection reset by peer) |
| 04:55:28 | × | yauhsien_ quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 04:56:19 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 04:56:26 | × | Jing quits (~hedgehog@240e:390:7c53:a7e1:69b8:e285:4414:d6cb) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:57:34 | × | sim590 quits (~simon@modemcable090.207-203-24.mc.videotron.ca) (Ping timeout: 268 seconds) |
| 05:01:12 | → | pavonia joins (~user@user/siracusa) |
| 05:02:57 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds) |
| 05:03:33 | × | HotblackDesiato quits (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection) |
| 05:03:52 | → | HotblackDesiato joins (~HotblackD@gateway/tor-sasl/hotblackdesiato) |
| 05:05:50 | → | nhatanh02 joins (~satori@123.24.172.30) |
| 05:05:58 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 05:06:07 | → | tommd joins (~tommd@75-164-130-101.ptld.qwest.net) |
| 05:06:39 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 05:10:17 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 240 seconds) |
| 05:10:35 | → | sim590 joins (~simon@modemcable090.207-203-24.mc.videotron.ca) |
| 05:15:53 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) |
| 05:16:28 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 05:17:01 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 05:17:09 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 05:19:13 | <jackdk> | Axman6: try frase on #bfpg - he gave a talk on it a couple of years back |
| 05:21:25 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4) |
| 05:24:58 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 05:25:09 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:25:10 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 05:25:10 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 05:25:10 | → | wroathe joins (~wroathe@user/wroathe) |
| 05:26:59 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 05:27:40 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 05:29:53 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 05:33:26 | × | deadmarshal quits (~deadmarsh@95.38.231.124) (Ping timeout: 256 seconds) |
| 05:35:06 | <Axman6> | Found it! thanks jackdk |
| 05:36:16 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Ping timeout: 256 seconds) |
| 05:37:29 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 05:38:10 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 05:40:08 | × | puke quits (~puke@user/puke) () |
| 05:42:11 | <EvanR> | is there every a downside to putting ~ on pair pattern match |
| 05:42:30 | <EvanR> | is there a performance hit |
| 05:44:03 | × | nhatanh02 quits (~satori@123.24.172.30) (Ping timeout: 256 seconds) |
| 05:44:22 | <EvanR> | just realized I don't know the difference between ~ and no ~ on deconstructing a pair in a let binding |
| 05:45:03 | <EvanR> | and I'm using that annoying speech pattern. What is the different between ~ and no ~ on deconstructing a pair in a let binding? |
| 05:48:33 | <c_wraith> | nothing |
| 05:48:54 | <c_wraith> | using a let binding and a ~ both do the same thing. |
| 05:49:21 | <c_wraith> | In that they both mean the (,) constructor isn't evaluated until one of its arguments is demanded |
| 05:51:16 | <EvanR> | but if used in do notation or in a lambda argument, it does something right |
| 05:51:32 | <c_wraith> | pattern matches in a let expression are irrefutable by default. |
| 05:51:45 | <c_wraith> | Pattern matches in a function definition, case, or lambda are not |
| 05:53:25 | <EvanR> | cool |
| 05:54:07 | <c_wraith> | oh. and pattern matches in a <- are refutable by default, with special desugaring to use MonadFail if they are refuted. |
| 05:55:04 | → | moet joins (~moet@mobile-166-170-41-195.mycingular.net) |
| 05:56:40 | <int-e> | > fix (\ ~(a,b) -> (b+19, 23)) |
| 05:56:42 | <lambdabot> | (42,23) |
| 05:56:49 | <int-e> | > fix (\(a,b) -> (b+19, 23)) |
| 05:56:51 | <lambdabot> | *Exception: <<loop>> |
| 05:58:54 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
| 05:59:30 | → | vysn joins (~vysn@user/vysn) |
| 06:00:04 | × | Codaraxis_ quits (~Codaraxis@user/codaraxis) (Ping timeout: 256 seconds) |
| 06:00:10 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 06:03:00 | × | h_ quits (rootvegeta@fsf/member/hays) (Quit: h_) |
| 06:05:35 | × | Inst quits (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds) |
| 06:06:09 | × | moet quits (~moet@mobile-166-170-41-195.mycingular.net) (Ping timeout: 256 seconds) |
| 06:06:53 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 06:07:10 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 06:07:47 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Read error: Connection reset by peer) |
| 06:08:19 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 06:11:36 | → | deadmarshal joins (~deadmarsh@95.38.231.124) |
| 06:11:59 | → | hays joins (rootvegeta@fsf/member/hays) |
| 06:15:35 | × | Guest72 quits (~Guest72@82-132-214-147.dab.02.net) (Quit: Client closed) |
| 06:16:43 | → | puke joins (~puke@user/puke) |
| 06:18:12 | × | deadmarshal quits (~deadmarsh@95.38.231.124) (Ping timeout: 256 seconds) |
| 06:19:52 | → | deadmarshal joins (~deadmarsh@95.38.231.124) |
| 06:25:01 | × | mikoto-chan quits (~mikoto-ch@185.25.79.189) (Ping timeout: 240 seconds) |
| 06:31:01 | × | kaph quits (~kaph@net-2-38-107-19.cust.vodafonedsl.it) (Ping timeout: 240 seconds) |
| 06:32:22 | × | vglfr quits (~vglfr@88.155.96.35) (Ping timeout: 256 seconds) |
| 06:44:11 | → | michalz joins (~michalz@185.246.204.104) |
| 06:50:21 | × | tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 256 seconds) |
| 06:51:20 | → | nattiestnate joins (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) |
| 06:52:44 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 06:53:57 | × | shapr quits (~user@2601:7c0:c202:5190:cc12:44b:f211:c38f) (Ping timeout: 240 seconds) |
| 06:55:28 | × | shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit) |
| 06:56:14 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 06:58:26 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 07:01:33 | × | mcglk quits (~mcglk@131.191.49.120) (Read error: Connection reset by peer) |
| 07:01:59 | → | mcglk joins (~mcglk@131.191.49.120) |
| 07:05:02 | → | nhatanh02 joins (~satori@123.24.172.30) |
| 07:09:16 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 07:09:54 | × | nattiestnate quits (~nate@2001:448a:20a0:4134:25e:715f:d637:5263) (Quit: WeeChat 3.4) |
| 07:12:17 | × | xff0x quits (~xff0x@2001:1a81:534d:9900:3a80:4bac:7552:9848) (Ping timeout: 240 seconds) |
| 07:12:57 | → | xff0x joins (~xff0x@2001:1a81:534d:9900:3a80:4bac:7552:9848) |
| 07:23:03 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Quit: Leaving) |
| 07:23:20 | <jackdk> | > fix error |
| 07:23:21 | <lambdabot> | "*Exception: *Exception: *Exception: *Exception: *Exception: *Exception: *Ex... |
| 07:23:28 | <jackdk> | Alas, my error was not fixed. |
| 07:27:17 | → | yangby joins (~secret@115.199.105.217) |
| 07:28:35 | → | Jing joins (~hedgehog@240e:390:7c53:a7e1:2c67:7cfa:cdb8:6538) |
| 07:34:14 | <ephemient> | speaking of pattern matches in let expressions… this order isn't defined, is it? |
| 07:34:14 | <ephemient> | > let !_ = error "1"; !_ = error "2" in () |
| 07:34:15 | <lambdabot> | *Exception: 2 |
| 07:34:33 | <c_wraith> | it is in fact explicitly undefined |
| 07:35:12 | <c_wraith> | ghc is allowed to treat all bottoms as equivalent |
| 07:35:57 | × | little_mac quits (~little_ma@2601:410:4300:3ce0:55c5:5707:fdcb:78cd) (Ping timeout: 240 seconds) |
| 07:36:07 | ← | BrokenClutch parts (~pioneer@2804:d41:c292:6c00:33d8:d2f1:d8af:153e) () |
| 07:37:24 | → | mikoto-chan joins (~mikoto-ch@95.214.66.65) |
| 07:39:08 | → | little_mac joins (~little_ma@2601:410:4300:3ce0:55c5:5707:fdcb:78cd) |
| 07:39:34 | → | `2jt joins (~jtomas@10.red-83-58-228.dynamicip.rima-tde.net) |
| 07:47:01 | × | mikoto-chan quits (~mikoto-ch@95.214.66.65) (Ping timeout: 256 seconds) |
| 07:47:24 | → | mikoto-chan joins (~mikoto-ch@95.214.66.65) |
| 07:51:24 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 07:51:51 | → | Akiva joins (~Akiva@user/Akiva) |
| 07:55:47 | × | yangby quits (~secret@115.199.105.217) (Quit: Go out for a walk and buy a drink.) |
| 07:57:26 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 07:58:05 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 08:00:04 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 08:02:12 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:03:00 | → | fef joins (~thedawn@user/thedawn) |
| 08:03:35 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 08:03:36 | × | mikoto-chan quits (~mikoto-ch@95.214.66.65) (Ping timeout: 256 seconds) |
| 08:04:29 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:d6ff:672a:8ae7:74fd) |
| 08:05:06 | → | mikoto-chan joins (~mikoto-ch@95.214.66.65) |
| 08:05:20 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 08:11:17 | × | mvk quits (~mvk@2607:fea8:5cdd:f000::55f8) (Ping timeout: 240 seconds) |
| 08:14:32 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 08:15:43 | → | califax joins (~califax@user/califx) |
| 08:18:45 | × | kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
| 08:27:06 | → | max22- joins (~maxime@2a01cb08833598007fce73d4e7f21a7b.ipv6.abo.wanadoo.fr) |
| 08:27:38 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 08:28:49 | → | cfricke joins (~cfricke@user/cfricke) |
| 08:30:35 | → | MajorBiscuit joins (~MajorBisc@c-001-007-038.client.tudelft.eduvpn.nl) |
| 08:31:44 | → | sektor|2 joins (~kvirc@87.227.175.182) |
| 08:33:30 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 08:33:47 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 08:37:05 | → | mvk joins (~mvk@2607:fea8:5cdd:f000::55f8) |
| 08:38:13 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 240 seconds) |
| 08:38:19 | → | jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 08:38:46 | × | jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
| 08:39:05 | → | jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 08:40:26 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 08:48:13 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 08:48:53 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 08:51:32 | × | joel135 quits (sid136450@id-136450.hampstead.irccloud.com) (Ping timeout: 240 seconds) |
| 08:53:18 | × | little_mac quits (~little_ma@2601:410:4300:3ce0:55c5:5707:fdcb:78cd) (Remote host closed the connection) |
| 08:55:07 | → | jgeerds joins (~jgeerds@55d4bbed.access.ecotel.net) |
| 08:55:29 | → | joel135 joins (sid136450@id-136450.hampstead.irccloud.com) |
| 08:56:08 | × | sus quits (zero@user/zeromomentum) (Quit: the lounge - https://webirc.envs.net) |
| 08:56:44 | → | sus joins (zero@user/zeromomentum) |
| 08:58:43 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 08:59:24 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 09:00:08 | × | surgeon[m] quits (~surge9nma@2001:470:69fc:105::f585) (Quit: You have been kicked for being idle) |
| 09:02:47 | × | ouestbillie quits (~gallup@192-222-138-215.qc.cable.ebox.net) (Remote host closed the connection) |
| 09:03:40 | × | cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds) |
| 09:03:49 | × | ubert quits (~Thunderbi@p200300ecdf0994f52db7d35c756e5286.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 09:03:50 | → | cheater joins (~Username@user/cheater) |
| 09:04:38 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 09:09:13 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 09:09:54 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 09:10:20 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
| 09:11:47 | → | acidjnk joins (~acidjnk@p200300d0c7271e155922c761977fca48.dip0.t-ipconnect.de) |
| 09:11:47 | → | acidjnk_new joins (~acidjnk@p200300d0c7271e155922c761977fca48.dip0.t-ipconnect.de) |
| 09:11:47 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 09:12:06 | × | neurocyte0917 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat) |
| 09:14:34 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 09:14:45 | → | neurocyte0917 joins (~neurocyte@IP-045143079193.dynamic.medianet-world.de) |
| 09:14:45 | × | neurocyte0917 quits (~neurocyte@IP-045143079193.dynamic.medianet-world.de) (Changing host) |
| 09:14:45 | → | neurocyte0917 joins (~neurocyte@user/neurocyte) |
| 09:17:36 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 09:17:36 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 09:17:39 | allbery_b | is now known as geekosaur |
| 09:18:24 | × | mikoto-chan quits (~mikoto-ch@95.214.66.65) (Ping timeout: 256 seconds) |
| 09:19:15 | → | mmhat joins (~mmh@55d441e1.access.ecotel.net) |
| 09:28:28 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 09:35:12 | → | madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net) |
| 09:35:56 | → | _FlawLess_ joins (~user@2a01:e0a:a4:7098::10) |
| 09:41:03 | → | zaquest joins (~notzaques@5.130.79.72) |
| 09:41:45 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 09:43:05 | → | kuribas joins (~user@ptr-25vy0ia1hzdpftx2lxu.18120a2.ip6.access.telenet.be) |
| 09:50:13 | × | Akiva quits (~Akiva@user/Akiva) (Ping timeout: 240 seconds) |
| 09:53:47 | × | the_last_immorta quits (~thelastim@2001:470:69fc:105::1:4d57) (Quit: You have been kicked for being idle) |
| 09:54:13 | × | xff0x quits (~xff0x@2001:1a81:534d:9900:3a80:4bac:7552:9848) (Ping timeout: 240 seconds) |
| 09:54:35 | × | InternetManaging quits (~imjmatrix@2001:470:69fc:105::1:2ea5) (Quit: You have been kicked for being idle) |
| 09:55:05 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 09:55:08 | → | xff0x joins (~xff0x@2001:1a81:534d:9900:e459:15a9:4623:d8a6) |
| 09:58:31 | → | jkaye_ joins (~qicruser@2601:281:8300:7530:81c9:15c5:1001:5f30) |
| 09:59:07 | × | jkaye_ quits (~qicruser@2601:281:8300:7530:81c9:15c5:1001:5f30) (Read error: Connection reset by peer) |
| 10:05:17 | × | jgeerds quits (~jgeerds@55d4bbed.access.ecotel.net) (Ping timeout: 256 seconds) |
| 10:05:55 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 10:07:29 | → | syrkis joins (syrkis@gateway/vpn/protonvpn/syrkis) |
| 10:09:36 | → | kjak joins (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
| 10:10:02 | → | maroloccio joins (~marolocci@151.75.59.229) |
| 10:10:48 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:4371:6bef:aafb:f58d) |
| 10:11:00 | × | n8chan quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
| 10:11:58 | → | n8chan joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
| 10:15:38 | → | chele joins (~chele@user/chele) |
| 10:16:32 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:18:19 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 10:22:17 | → | mikoto-chan joins (~mikoto-ch@91-157-120-246.elisa-laajakaista.fi) |
| 10:23:10 | → | Topsi joins (~Tobias@dyndsl-095-033-027-133.ewe-ip-backbone.de) |
| 10:25:23 | → | euandreh joins (~euandreh@2804:14c:33:9fe5:4f29:e68c:50c9:fe2) |
| 10:29:36 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 10:30:16 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 10:30:41 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset) |
| 10:33:29 | → | DNH joins (~DNH@2a02:8108:1100:16d8:a92f:4d2f:4882:4db9) |
| 10:33:47 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 10:35:06 | <madjestic> | hey guys, I have uploaded a package candidate to hackage to check if everything is ok, but it looks like hackage failed generate the documentation, even though when I generate the documentation locally (using `cabal haddock`), everything seems to be ok. Is there a way to upload hackage documentation for a hackage candidate manually? |
| 10:35:19 | × | monochrom quits (trebla@216.138.220.146) (Ping timeout: 256 seconds) |
| 10:36:52 | → | lavaman joins (~lavaman@98.38.249.169) |
| 10:36:56 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 10:37:01 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds) |
| 10:37:05 | → | ouestbillie joins (~gallup@192-222-138-215.qc.cable.ebox.net) |
| 10:37:28 | <merijn> | Yes, same 'cabal upload' command, just with -d flag |
| 10:37:30 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 10:37:43 | <merijn> | Also, I don't think hackage builds docs for candidates? |
| 10:38:16 | Lord_of_Life_ | is now known as Lord_of_Life |
| 10:45:50 | <madjestic> | merijn: just to make sure (I don't want to screw up by uploading anything permanent yet, as I am just testing), the upload command will work with the candidate upload, or documentation upload is something separate and can be updated? |
| 10:47:44 | → | __monty__ joins (~toonn@user/toonn) |
| 10:48:11 | → | pera joins (~pera@user/pera) |
| 10:48:23 | <madjestic> | (I am reading https://hackage.haskell.org/upload as a guide, but it is not clear, if there's a distinction between candidate and normal upload) |
| 10:48:30 | × | puke quits (~puke@user/puke) (Ping timeout: 256 seconds) |
| 10:52:49 | <madjestic> | also, is there an IRC channel, dedicated to hackage? |
| 10:53:22 | → | comerijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:54:06 | <geekosaur> | #hackage but I'm not sure about user questions there |
| 10:54:57 | <geekosaur> | ok, looks like they're fine with it |
| 10:55:05 | × | max22- quits (~maxime@2a01cb08833598007fce73d4e7f21a7b.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 10:55:52 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 11:01:15 | <madjestic> | geekosaur: thanks! |
| 11:01:38 | → | burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk) |
| 11:05:48 | × | maroloccio quits (~marolocci@151.75.59.229) (Quit: WeeChat 3.0) |
| 11:06:31 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 11:07:20 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:08:01 | → | lavaman joins (~lavaman@98.38.249.169) |
| 11:08:16 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 11:09:37 | × | mvk quits (~mvk@2607:fea8:5cdd:f000::55f8) (Ping timeout: 240 seconds) |
| 11:10:17 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) (Ping timeout: 240 seconds) |
| 11:10:27 | × | syrkis quits (syrkis@gateway/vpn/protonvpn/syrkis) (Ping timeout: 256 seconds) |
| 11:11:10 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 11:11:59 | → | random joins (~random@185.219.68.251) |
| 11:12:17 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 11:12:44 | <random> | hey guys |
| 11:12:55 | <geekosaur> | o/ |
| 11:13:07 | <random> | can anyone help with a probably very simple Conduit question |
| 11:13:19 | <random> | we have a `ConduitT () thing m result` |
| 11:13:38 | <random> | and need to get ([thing], result) out of it |
| 11:13:50 | <random> | we used to have `ConduitT () thing m ()` and used `sourceToList` |
| 11:14:20 | <random> | but now that it also has a result we need that as well, I found runConduitRes that just gives you the result, and sourceToList that gives you [thing], but nothing that combines both |
| 11:16:42 | → | SummerSonw joins (~The_viole@203.77.49.232) |
| 11:17:24 | × | comerijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 11:18:37 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:19:51 | <random> | no actually runConduit requires a () output |
| 11:20:19 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 11:23:12 | → | puke joins (~puke@user/puke) |
| 11:23:18 | × | pieguy12- quits (~pieguy128@bras-base-mtrlpq5031w-grc-48-67-70-102-17.dsl.bell.ca) (Ping timeout: 260 seconds) |
| 11:23:19 | <geekosaur> | runConduit :: Monad m => ConduitT () Void m r -> m r -- looks like r, not () ? (similar to runConduitRes) |
| 11:23:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 11:23:50 | <random> | it has () as the output value |
| 11:24:06 | <random> | Void I meant |
| 11:24:17 | × | xff0x quits (~xff0x@2001:1a81:534d:9900:e459:15a9:4623:d8a6) (Ping timeout: 240 seconds) |
| 11:24:23 | <random> | we have `ConduitT () CustomType m CustomResult` |
| 11:24:35 | <random> | and need [CustomType] and CustomResult |
| 11:24:38 | <geekosaur> | runConduitRes has Void in the same position |
| 11:24:44 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:24:48 | <random> | yeah |
| 11:24:51 | <geekosaur> | the "Res" in runConduitRes is ResourceT, not result |
| 11:24:57 | <random> | exactly but I misread |
| 11:25:04 | <random> | so I can't get it to work at all |
| 11:25:21 | → | xff0x joins (~xff0x@2001:1a81:534d:9900:ecd7:329:7ff4:5aa6) |
| 11:25:58 | <geekosaur> | I'm not a conduit expert so doubt I can help much., not sure anyone else is around this time of day/night/whatever :) |
| 11:26:27 | <random> | it's lunchtime over here haha |
| 11:27:33 | <geekosaur> | breakfast here |
| 11:28:17 | × | emf quits (~emf@2620:10d:c090:400::5:b9c2) (Ping timeout: 240 seconds) |
| 11:28:19 | <random> | damn this feels weird :D |
| 11:28:21 | <random> | looking at https://hackage.haskell.org/package/conduit-1.3.4.2/docs/Data-Conduit.html |
| 11:28:29 | <geekosaur> | and getting ready for a trip which will cost me pretty much all day |
| 11:28:30 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480::41) |
| 11:28:47 | <random> | have fun! |
| 11:29:24 | <polyphem> | geekosaur: day/night/whatever ... i recently had the idea of a "mob time" , like the average time for all clients in a channel , what do you think about that concept ? |
| 11:29:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 11:29:55 | → | emf joins (~emf@2620:10d:c090:400::5:b9c2) |
| 11:30:51 | → | lavaman joins (~lavaman@98.38.249.169) |
| 11:30:53 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:31:00 | <Axman6> | you could hack something by turning Conduit () thing m r into Conduit () thing (StateT [thing] m) r, push each thing onto the list, then reverse at the end |
| 11:31:12 | <geekosaur> | polyphem, see https://ircbrowse.tomsmeding.com/lchaskell |
| 11:31:32 | <random> | Axman6: that sounds like fun |
| 11:31:37 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 11:31:42 | × | fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds) |
| 11:32:13 | <random> | Axman6: but it seems so weird that it's not trivial to get both the source as list and the result |
| 11:32:40 | <Axman6> | I feel like getting a list of results is often a code smell when it comes to stream libraries |
| 11:33:05 | <polyphem> | geekosaur: oh, cool , thanks |
| 11:35:00 | <random> | Axman6: need to serve the results through the API |
| 11:35:32 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 11:35:35 | <Axman6> | how are you building he API? |
| 11:35:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 11:36:00 | <Axman6> | servant IIRC has ways to stream data in the reesponse |
| 11:36:06 | <random> | Axman6: just a regular servant thing, the usecase is to stream a large db query |
| 11:36:16 | <random> | Axman6: need to check about that |
| 11:36:33 | <Axman6> | It may or moy not exist because I complained and asked for it :) |
| 11:37:02 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:37:41 | <random> | Axman6: haha |
| 11:37:55 | <random> | I'd still need both the [thing] and the result though, so probably that's where the codesmell is |
| 11:38:06 | <random> | I need the stream and the length |
| 11:38:13 | × | acidjnk quits (~acidjnk@p200300d0c7271e155922c761977fca48.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 11:38:13 | × | acidjnk_new quits (~acidjnk@p200300d0c7271e155922c761977fca48.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 11:38:31 | <Axman6> | https://hackage.haskell.org/package/servant-0.18.3/docs/Servant-API.html#t:ToSourceIO |
| 11:38:47 | <Axman6> | needing the length is lamesauce |
| 11:39:20 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 11:39:25 | × | xff0x quits (~xff0x@2001:1a81:534d:9900:ecd7:329:7ff4:5aa6) (Ping timeout: 240 seconds) |
| 11:39:38 | <random> | Axman6: need to calculate the "total pages" available |
| 11:39:48 | <Axman6> | https://hackage.haskell.org/package/servant-0.18.3/docs/Servant-API-Stream.html#t:Stream is probably a better link |
| 11:39:57 | <Axman6> | where's the data comming from? |
| 11:39:57 | <random> | everything I've been doing so far feels like lamesauce tbh :D |
| 11:40:23 | <random> | Axman6: postgres |
| 11:40:29 | <random> | we basically have |
| 11:40:32 | → | xff0x joins (~xff0x@2001:1a81:534d:9900:8e73:9611:d4ed:ad69) |
| 11:40:50 | <Axman6> | can you run two queries? |
| 11:41:22 | <random> | (postgresQuery .| CL.map fancyTransformation .| CL.length (we need the length before the filters) .| CL.filter someFilters) `fuseUpstream` paginate |
| 11:41:46 | <random> | Axman6: lol yeah of course, it's just that it's very overengineered and not very straightforward |
| 11:41:49 | <random> | not sure how much I can change |
| 11:42:09 | <random> | we don't need the length of the query, but the length of the query after some mapping |
| 11:42:13 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 11:42:33 | <random> | in (postgresQuery .| CL.map fancyMap) the query might have had 2000 results, but fancy map will return 350 |
| 11:42:48 | <random> | we need that 350 count before CL.filer-ing the thing |
| 11:42:53 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:43:25 | → | fef joins (~thedawn@user/thedawn) |
| 11:44:37 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 240 seconds) |
| 11:44:40 | <random> | nvm I'll just take a couple of hours break and plan towards simplifying the whole thing |
| 11:44:52 | <random> | it's just way too complicated for what it's doing |
| 11:45:59 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 11:47:17 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 11:47:19 | <Axman6> | good luck |
| 11:47:38 | <random> | Axman6: I teared up while typing that |
| 11:47:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 11:48:56 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:49:01 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 240 seconds) |
| 11:53:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 11:54:37 | × | xff0x quits (~xff0x@2001:1a81:534d:9900:8e73:9611:d4ed:ad69) (Ping timeout: 240 seconds) |
| 11:55:01 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:55:37 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4) |
| 11:55:43 | → | xff0x joins (~xff0x@2001:1a81:534d:9900:c522:bda4:b63a:6841) |
| 11:57:51 | → | briandaed joins (~briandaed@185.234.208.208.r.toneticgroup.pl) |
| 11:58:09 | → | acidjnk_new joins (~acidjnk@p200300d0c7271e153d27ba4f49b7fa4a.dip0.t-ipconnect.de) |
| 11:58:12 | → | acidjnk joins (~acidjnk@p200300d0c7271e153d27ba4f49b7fa4a.dip0.t-ipconnect.de) |
| 11:59:15 | → | cfricke joins (~cfricke@user/cfricke) |
| 11:59:57 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 12:00:39 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:01:32 | → | lavaman joins (~lavaman@98.38.249.169) |
| 12:01:42 | → | benin joins (~benin@183.82.176.241) |
| 12:02:13 | × | SummerSonw quits (~The_viole@203.77.49.232) (Ping timeout: 240 seconds) |
| 12:05:23 | → | biog joins (~user1@static.39.160.132.142.clients.your-server.de) |
| 12:05:37 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 12:06:33 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:11:48 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 12:12:25 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:14:17 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds) |
| 12:14:37 | → | random_ joins (~random@185.219.68.251) |
| 12:16:13 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 12:17:14 | → | xb0o2 joins (~xb0o2@user/xb0o2) |
| 12:17:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 12:17:28 | × | random quits (~random@185.219.68.251) (Ping timeout: 256 seconds) |
| 12:18:12 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:18:50 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 12:18:52 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 12:19:33 | → | SummerSonw joins (~The_viole@203.77.49.232) |
| 12:21:21 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 12:23:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 12:24:15 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:24:20 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
| 12:25:47 | × | unyu quits (~pyon@user/pyon) (Quit: Reboot.) |
| 12:27:14 | → | max22- joins (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) |
| 12:29:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 12:30:05 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:32:53 | → | califax- joins (~califax@user/califx) |
| 12:34:06 | × | califax quits (~califax@user/califx) (Ping timeout: 276 seconds) |
| 12:34:07 | califax- | is now known as califax |
| 12:36:40 | → | monochrom joins (trebla@216.138.220.146) |
| 12:37:46 | AlexNoo_ | is now known as AlexNoo |
| 12:39:16 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 12:40:57 | × | monochrom quits (trebla@216.138.220.146) (Ping timeout: 240 seconds) |
| 12:42:00 | × | mikoto-chan quits (~mikoto-ch@91-157-120-246.elisa-laajakaista.fi) (Quit: mikoto-chan) |
| 12:42:14 | → | jgeerds joins (~jgeerds@55d4bbed.access.ecotel.net) |
| 12:42:31 | → | Franciman joins (~Franciman@mx1.fracta.dev) |
| 12:42:55 | ← | Franciman parts (~Franciman@mx1.fracta.dev) (haskell has no up to date standard, hence it's relegated to ghc slavery) |
| 12:44:42 | → | Franciman joins (~Franciman@mx1.fracta.dev) |
| 12:46:56 | × | xff0x quits (~xff0x@2001:1a81:534d:9900:c522:bda4:b63a:6841) (Ping timeout: 252 seconds) |
| 12:48:17 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 12:48:40 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 12:48:59 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 12:49:03 | × | nhatanh02 quits (~satori@123.24.172.30) (Ping timeout: 256 seconds) |
| 12:53:17 | → | slack1256 joins (~slack1256@191.126.227.94) |
| 13:02:08 | → | random__ joins (~random@185.219.68.251) |
| 13:02:39 | × | max22- quits (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Ping timeout: 256 seconds) |
| 13:02:46 | → | monochrom joins (trebla@216.138.220.146) |
| 13:03:47 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 13:04:37 | × | random_ quits (~random@185.219.68.251) (Ping timeout: 240 seconds) |
| 13:06:26 | <slack1256> | I am asking for a friend that uses VSCode on ubuntu 21.10. Does the haskell extension for that editor autoinstall the haskell-language-server? It seems to have conflict with the native install via ghcup. |
| 13:06:45 | <slack1256> | If so, is there a way to configure the extension to choose the local/native install? |
| 13:10:27 | × | burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Remote host closed the connection) |
| 13:11:00 | → | burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk) |
| 13:15:01 | × | burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Ping timeout: 240 seconds) |
| 13:18:12 | → | Everything joins (~Everythin@37.115.210.35) |
| 13:22:36 | × | haask quits (~harry@user/haask) (Remote host closed the connection) |
| 13:23:58 | <[itchyjunk]> | I imagine people who use that editor/vscode would know more but maybe i am wrong |
| 13:24:31 | → | unyu joins (~pyon@user/pyon) |
| 13:24:50 | → | CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 13:25:21 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 13:28:54 | → | xff0x joins (~xff0x@2001:1a81:534d:9900:c522:bda4:b63a:6841) |
| 13:29:49 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 13:31:44 | → | Inst joins (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) |
| 13:34:12 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 13:41:54 | × | sim590 quits (~simon@modemcable090.207-203-24.mc.videotron.ca) (Ping timeout: 256 seconds) |
| 13:46:16 | → | burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk) |
| 13:49:38 | × | jgeerds quits (~jgeerds@55d4bbed.access.ecotel.net) (Ping timeout: 252 seconds) |
| 13:50:22 | → | jgeerds joins (~jgeerds@55d4bbed.access.ecotel.net) |
| 13:50:33 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 13:52:12 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 13:55:55 | × | jgeerds quits (~jgeerds@55d4bbed.access.ecotel.net) (Ping timeout: 256 seconds) |
| 13:56:37 | × | burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Ping timeout: 240 seconds) |
| 13:56:52 | × | michalz quits (~michalz@185.246.204.104) (Remote host closed the connection) |
| 13:57:03 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 13:57:12 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 13:58:17 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds) |
| 14:01:00 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 14:07:44 | → | ksqsf joins (~user@2001:da8:d800:604:6d71:4647:806f:d6e9) |
| 14:08:00 | × | ksqsf quits (~user@2001:da8:d800:604:6d71:4647:806f:d6e9) (Remote host closed the connection) |
| 14:09:06 | × | ouestbillie quits (~gallup@192-222-138-215.qc.cable.ebox.net) (Remote host closed the connection) |
| 14:12:47 | → | sim590 joins (~simon@modemcable090.207-203-24.mc.videotron.ca) |
| 14:18:57 | → | Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) |
| 14:19:57 | → | xkuru joins (~xkuru@user/xkuru) |
| 14:20:17 | × | jlamothe quits (~jlamothe@198.251.61.229) (Quit: leaving) |
| 14:21:09 | → | michalz joins (~michalz@185.246.204.104) |
| 14:21:49 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 240 seconds) |
| 14:22:41 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:27:16 | → | burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk) |
| 14:29:12 | → | max22- joins (~maxime@2a01cb0883359800510125e1acff834b.ipv6.abo.wanadoo.fr) |
| 14:31:59 | → | lavaman joins (~lavaman@98.38.249.169) |
| 14:33:32 | <byorgey> | repl.it works with Nix now (https://blog.replit.com/nix), and I'd like to see if it's possible to use Nix to set up a custom REPL for a language implemented in Haskell. Anyone have experience with something like this that could offer advice or pointers to examples, etc? |
| 14:33:37 | × | emf quits (~emf@2620:10d:c090:400::5:b9c2) (Read error: Connection reset by peer) |
| 14:33:42 | <byorgey> | I don't have any experience with Nix but I'm willing to learn. |
| 14:33:53 | × | SummerSonw quits (~The_viole@203.77.49.232) (Ping timeout: 256 seconds) |
| 14:33:59 | → | emf_ joins (~emf@2620:10d:c090:400::5:b9c2) |
| 14:34:30 | → | jlamothe joins (~jlamothe@198.251.61.229) |
| 14:34:35 | <byorgey> | to be more concrete, I want to try to set things up so that students can work with https://github.com/disco-lang/disco/ in repl.it |
| 14:36:43 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 14:37:52 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 14:37:52 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 14:37:52 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:40:37 | × | burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Ping timeout: 240 seconds) |
| 14:42:44 | <Inst> | gah |
| 14:42:48 | <Inst> | i can't finish my "homework" |
| 14:43:06 | <Inst> | it turns out I don't know how to apply a type constructor wrapped function to a type constructor wrapped value |
| 14:45:16 | <byorgey> | Inst: try pattern matching on both of them to get the function and the value out |
| 14:45:36 | <byorgey> | myFunction (Constructor1 f) (Constructor2 value) = ... f value ... |
| 14:45:38 | <Inst> | i'm trying to do it with just fmap / <*> machinery |
| 14:45:53 | <Inst> | IO is not a Data Constructor, though |
| 14:46:03 | <byorgey> | Inst: ah, in that case, <*> does exactly what you just said |
| 14:46:06 | <byorgey> | :type (<*>) |
| 14:46:09 | <Inst> | it's nested |
| 14:46:20 | <Inst> | i can work with one level of TCs using <*> |
| 14:46:24 | <Inst> | I can't work with two levels |
| 14:46:26 | <Inst> | IO Maybe |
| 14:46:41 | <byorgey> | you can, actually, but I agree it's not as straightforward. |
| 14:46:49 | <Inst> | dialogedFileOpenSanity = ((pure (pure openFile <*>) <*> openFilePath)) <*> (pure (<*> (Just ReadMode))) |
| 14:47:06 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 268 seconds) |
| 14:47:07 | <Inst> | openFilePath delivers IO (Maybe String) |
| 14:47:30 | → | jkaye joins (~jkaye@2601:281:8300:7530:7cb5:a22f:ba66:1688) |
| 14:47:36 | <Inst> | but it's the very fact that it's not as straightforward that's worth learning how to do |
| 14:47:38 | <Axman6> | :t liftA2 (<*>) |
| 14:47:39 | <lambdabot> | (Applicative f1, Applicative f2) => f1 (f2 (a -> b)) -> f1 (f2 a) -> f1 (f2 b) |
| 14:47:43 | <Inst> | sorry axman6 |
| 14:47:44 | <Inst> | :( |
| 14:47:55 | <Inst> | oh |
| 14:49:02 | × | acidjnk quits (~acidjnk@p200300d0c7271e153d27ba4f49b7fa4a.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 14:49:02 | × | acidjnk_new quits (~acidjnk@p200300d0c7271e153d27ba4f49b7fa4a.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 14:49:16 | <Axman6> | :t \mf ma -> (<*>) <$> (mf :: IO (Maybe (Int -> Bool)) <*> ma |
| 14:49:17 | <lambdabot> | error: |
| 14:49:17 | <lambdabot> | parse error (possibly incorrect indentation or mismatched brackets) |
| 14:49:23 | <Axman6> | :t \mf ma -> (<*>) <$> (mf :: IO (Maybe (Int -> Bool))) <*> ma |
| 14:49:24 | <lambdabot> | IO (Maybe (Int -> Bool)) -> IO (Maybe Int) -> IO (Maybe Bool) |
| 14:49:49 | <Inst> | well, you still didn't walk me through this |
| 14:50:03 | <Axman6> | I thought we went through exactly this a few days ago? |
| 14:50:05 | <Inst> | i mean, in the sense that I want to be able to do this with just (<*>), fmap |
| 14:50:53 | <Axman6> | do you see anything other than fmap and <*> in \mf ma -> (<*>) <$> mf <*> ma? |
| 14:51:14 | → | henninb joins (~henninb@97-116-147-100.mpls.qwest.net) |
| 14:51:31 | × | henninb quits (~henninb@97-116-147-100.mpls.qwest.net) (Client Quit) |
| 14:51:48 | <Inst> | this was my old solution, mind you |
| 14:51:49 | <Inst> | join $ fmap sequence (fmap (fmap (ReadMode &)) (fmap (fmap openFile) openFilePath)) |
| 14:52:20 | <sshine> | traverse? |
| 14:52:20 | <Axman6> | what on earth |
| 14:52:29 | → | henninb joins (~henninb@97-116-147-100.mpls.qwest.net) |
| 14:52:33 | <sshine> | or maybe several steps back :-D |
| 14:53:02 | <Inst> | the point is that I end up generating IO (Maybe (IO Handle)) |
| 14:53:16 | <Inst> | traverse gets it to IO (IO (Maybe Handle)) so I can join it to IO (Maybe Handle) |
| 14:53:17 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 14:54:59 | <Axman6> | I need to go to bed, good luck! |
| 14:56:05 | <Inst> | cya, enjoy your sleep |
| 14:56:13 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds) |
| 14:57:00 | → | jgeerds joins (~jgeerds@55d4bbed.access.ecotel.net) |
| 14:57:16 | × | deadmarshal quits (~deadmarsh@95.38.231.124) (Ping timeout: 256 seconds) |
| 14:57:27 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 14:59:01 | → | jgeerds_ joins (~jgeerds@55d4bbed.access.ecotel.net) |
| 15:01:28 | × | MasseR quits (~MasseR@51.15.143.128) (Quit: The Lounge - https://thelounge.chat) |
| 15:01:32 | × | jgeerds quits (~jgeerds@55d4bbed.access.ecotel.net) (Ping timeout: 240 seconds) |
| 15:02:05 | → | MasseR joins (~MasseR@51.15.143.128) |
| 15:02:57 | <janus> | now is your chance to get rid of spurious Maybe's in amazonka: https://github.com/brendanhay/amazonka/issues/739 |
| 15:04:35 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 15:05:49 | × | slack1256 quits (~slack1256@191.126.227.94) (Ping timeout: 240 seconds) |
| 15:07:25 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 15:08:44 | → | burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk) |
| 15:11:24 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:11:30 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 15:11:55 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 15:13:49 | × | burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Ping timeout: 240 seconds) |
| 15:13:50 | → | kaph joins (~kaph@net-2-38-107-19.cust.vodafonedsl.it) |
| 15:15:36 | → | jonathanx__ joins (~jonathan@c-5eea34e7-74736162.cust.telenor.se) |
| 15:16:26 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 15:16:26 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 15:16:26 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:17:49 | × | jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 240 seconds) |
| 15:18:05 | → | pottsy joins (~pottsy@129.227.183.244) |
| 15:18:46 | → | nschoe joins (~quassel@2a01:e0a:8e:a190:4c27:e379:35e8:63af) |
| 15:20:13 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 15:20:33 | × | jonathanx__ quits (~jonathan@c-5eea34e7-74736162.cust.telenor.se) (Read error: Connection reset by peer) |
| 15:21:04 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 15:21:08 | → | nhatanh02 joins (~satori@123.24.172.30) |
| 15:22:03 | → | jonathanx__ joins (~jonathan@h-178-174-176-109.a357.priv.bahnhof.se) |
| 15:22:08 | <gentauro> | anybody know why `stack` emits this warning "Warning: Installation path /home/johndoe/.local/bin not found on the PATH environment variable" but is able to install binaries to that folder? "Copied executables to /home/johndoe/.local/bin:" |
| 15:22:12 | <gentauro> | it's a bit strange |
| 15:23:49 | <peutri> | the directory exists |
| 15:23:53 | <peutri> | it's just not on your $PATH |
| 15:24:13 | <peutri> | so it won't find them by default when you try to run them without specifying the path |
| 15:24:27 | <peutri> | which is likely a cause of surprise right after “installing”, hence the warning |
| 15:29:08 | → | schweers joins (~user@2001:16b8:e94a:ef00:aaa1:59ff:fe3f:235c) |
| 15:29:42 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 15:31:31 | <schweers> | Is there something I should know about where embedFile from Data.FileEmbed looks for files? I’m using it in my tests and it works fine, but when I try to use it in the library or executable of the same cabal project, I always get a message that the file was not found. I’m using plain Cabal, not Stack. |
| 15:34:41 | <gentauro> | 16:24 < peutri> it's just not on your $PATH |
| 15:34:46 | <gentauro> | peutri: it is !!! |
| 15:35:30 | → | Henson joins (~kvirc@107-179-133-201.cpe.teksavvy.com) |
| 15:35:41 | <gentauro> | conent of `.bashrc` -> `export PATH="$HOME/.local/bin:$PATH"` |
| 15:35:54 | <gentauro> | that's why it's a bit `meh` |
| 15:36:03 | <peutri> | how about `echo $PATH` ? |
| 15:38:51 | <Henson> | I'm writing a library that contains a whole bunch of functions, but one main function that is exported. I also want to write tests in a separate module for this library. There doesn't seem to be a way to export all functions from the main library to the test library alone. What is the standard way of doing this in Haskell? Do I write a parent library with two child libraries? One child.. |
| 15:39:05 | <gentauro> | peutri: yeah it's there |
| 15:39:06 | <Henson> | is the main library that exports all functions. The other child is the test library that then import all functions from the main child library. Then the parent only exports the one function from the main child that I want other libraries to be able to use? |
| 15:39:30 | <gentauro> | is it me or is `stack` a "bit" buggy for the time being? |
| 15:39:31 | <gentauro> | xD |
| 15:39:52 | → | zer0bitz joins (~zer0bitz@2001:2003:f444:a000:2d06:fff0:d105:7c1) |
| 15:40:41 | <polyphem> | Henson: put all functions in a n .Internal module export them all, reexport only api functions from main module , test should use the .Internal module |
| 15:41:39 | <Henson> | polyphem: great, thank you |
| 15:43:41 | <schweers> | polyphem: I’ve asked myself the same question as Henson. With your solution, the internal module would be visible to users of the package, correct? |
| 15:44:05 | <peutri> | gentauro: well, it works for me :) |
| 15:44:14 | <gentauro> | peutri: I get that :) |
| 15:44:19 | <polyphem> | schweers: yes but its marked Internal |
| 15:44:35 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 252 seconds) |
| 15:45:02 | <schweers> | polyphem: by “marked” you mean that it’s a mere convention? Not that that’s a bad thing. |
| 15:45:33 | <polyphem> | schweers: its "unsafe" and can change wheras the main api should stay stable and is safe to use |
| 15:46:13 | <schweers> | Thanks for the explanation. It seems to be a quite reasonable solution. |
| 15:46:22 | <polyphem> | schweers: its a common idiom, have seen it in some libraries |
| 15:46:31 | <Henson> | schweers: I've seen other packages with an "Internal" module |
| 15:47:37 | <schweers> | polyphem: I’ve seen it too, I just didn’t know how common the practice is. |
| 15:47:41 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Remote host closed the connection) |
| 15:49:04 | → | coot joins (~coot@2a02:a310:e03f:8500:5cc8:47c:8ec0:b827) |
| 15:53:04 | × | unyu quits (~pyon@user/pyon) (Quit: brb) |
| 15:54:22 | <EvanR> | also common is to hide the internal bits, then the user is screwed if they need access |
| 15:54:30 | → | razetime joins (~quassel@49.207.203.87) |
| 15:56:03 | <polyphem> | Henson , schweers : Here is a fine talk about structuring idioms in haskell projects : https://skillsmatter.com/skillscasts/10832-how-to-architect-medium-to-large-scale-haskell-applications |
| 15:57:02 | → | burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk) |
| 15:57:22 | <schweers> | polyphem: Thanks, I’ll give it a read. |
| 15:58:19 | <schweers> | Or rather a watch as it seems. |
| 15:58:20 | <polyphem> | schweers: its a video talk :) |
| 15:58:21 | <Henson> | polyphem: thanks for the pointer! |
| 15:59:10 | <oxytocat> | The internal modules pattern is mentioned here: https://lhbg-book.link/03-html/07-internal_modules.html |
| 15:59:14 | → | nvmd joins (~nvmd@user/nvmd) |
| 16:06:02 | → | emf joins (~emf@2620:10d:c090:400::5:b9c2) |
| 16:07:37 | × | emf_ quits (~emf@2620:10d:c090:400::5:b9c2) (Ping timeout: 240 seconds) |
| 16:08:23 | × | burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Remote host closed the connection) |
| 16:08:51 | → | burnsidesLlama joins (~burnsides@dhcp168-021.wadham.ox.ac.uk) |
| 16:09:27 | → | futh14 joins (~futh14@c90-143-137-255.bredband.tele2.se) |
| 16:10:04 | <futh14> | I have seen this function from the course cis194. I have a hard time understanding what the oneTwo = 1:2:oneTwo means, is this something infinitely recursive, just to adjust oneTwo's length to xs? https://pastebin.com/3mMnH7uJ |
| 16:10:58 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 16:11:01 | → | deadmarshal joins (~deadmarsh@95.38.231.124) |
| 16:11:49 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:d6ff:672a:8ae7:74fd) (Ping timeout: 240 seconds) |
| 16:12:30 | → | pieguy128 joins (~pieguy128@bras-base-mtrlpq5031w-grc-46-67-70-100-227.dsl.bell.ca) |
| 16:12:49 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:2c52:4b9f:7e82:ac3e) |
| 16:12:55 | → | burnside_ joins (~burnsides@dhcp168-021.wadham.ox.ac.uk) |
| 16:13:01 | × | burnsidesLlama quits (~burnsides@dhcp168-021.wadham.ox.ac.uk) (Ping timeout: 240 seconds) |
| 16:13:05 | <polyphem> | futh14: to double every other element in xs you multiply first element with one , next element with two ,next element with one again, fourth with 2 ..... |
| 16:13:26 | <oxytocat> | it is infinitely recursive. it prepends 1 and 2 to oneTwo, which is prepending 1 and 2 to oneTwo, which is ... |
| 16:13:53 | <oxytocat> | so you get: 1 : 2 : 1 : 2 : 1 : 2 : ... |
| 16:14:04 | <polyphem> | zipWith takes a combining function (*) and two lists xs and [1,2,1,2,1,2,1,2.... |
| 16:14:13 | <futh14> | in the end, oneTwo's length becomes equal to xs |
| 16:14:18 | <futh14> | okay, thanks |
| 16:14:31 | <EvanR> | oneTwo's length is infinite |
| 16:14:41 | <polyphem> | zip familiy of functions stop after ind of shortest list |
| 16:14:53 | <polyphem> | *end* |
| 16:15:01 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 16:15:03 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 16:15:15 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 16:15:25 | × | deadmarshal quits (~deadmarsh@95.38.231.124) (Ping timeout: 240 seconds) |
| 16:15:46 | <futh14> | its length is infinite, but only the length that is required by the calculation is made to a list though? EvanR |
| 16:15:53 | → | unyu joins (~pyon@user/pyon) |
| 16:16:02 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 16:16:27 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:2c52:4b9f:7e82:ac3e) (Client Quit) |
| 16:16:31 | <EvanR> | well, what will probably happen is oneTwo becomes a circular object in memory |
| 16:16:37 | <EvanR> | doesn't always happen but it's nice when it does |
| 16:16:55 | <EvanR> | that's an implementation detail though |
| 16:17:52 | <EvanR> | in other circumstances you will get some finite prefix demanded by the program, unless you screw up |
| 16:19:05 | <EvanR> | i.e. demand the whole infinite list |
| 16:19:17 | × | pieguy128 quits (~pieguy128@bras-base-mtrlpq5031w-grc-46-67-70-100-227.dsl.bell.ca) (Ping timeout: 256 seconds) |
| 16:19:41 | <merijn> | futh14: Do you know any C, by any chance? |
| 16:20:37 | × | jgeerds_ quits (~jgeerds@55d4bbed.access.ecotel.net) (Ping timeout: 240 seconds) |
| 16:21:46 | <EvanR> | also I want to point out a cool way to interpret equations of the form oneTwo = 1:2:oneTwo. A minimal assumption is that oneTwo is undefined, i.e. ⊥. Then you can take the formula literally and see what happens in steps: |
| 16:22:00 | <EvanR> | oneTwo = ⊥ |
| 16:22:07 | <EvanR> | oneTwo = 1:2:⊥ |
| 16:22:13 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 240 seconds) |
| 16:22:13 | <EvanR> | oneTwo = 1:2:1:2:⊥ |
| 16:22:17 | <EvanR> | etc |
| 16:24:55 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 16:24:57 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) |
| 16:25:55 | × | henninb quits (~henninb@97-116-147-100.mpls.qwest.net) (Quit: leaving) |
| 16:26:22 | <EvanR> | substitution taken to a logical extreme |
| 16:26:36 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 16:28:02 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 16:28:53 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 16:30:22 | <tomsmeding> | ghc-vis representation of oneTwo: https://tomsmeding.com/ss/get/tomsmeding/tB2wIw |
| 16:31:02 | <EvanR> | :successbaby: |
| 16:34:01 | → | pieguy128 joins (~pieguy128@bras-base-mtrlpq5031w-grc-46-67-70-100-183.dsl.bell.ca) |
| 16:34:47 | <futh14> | @mer |
| 16:34:47 | <lambdabot> | Maybe you meant: vera msg more metar let arr |
| 16:34:57 | <futh14> | merijn yes I do |
| 16:35:31 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 16:35:57 | <futh14> | tomsmeding is this some kind of doubly-linked list? :D |
| 16:36:07 | <tomsmeding> | singly-linked |
| 16:36:17 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 16:36:18 | <tomsmeding> | it's just circular :) |
| 16:36:21 | <futh14> | how do you generate such implementations? |
| 16:36:29 | <tomsmeding> | the visualisation? |
| 16:36:32 | <futh14> | yep |
| 16:36:38 | <tomsmeding> | https://www.youtube.com/watch?v=I4lnCG18TaY |
| 16:38:33 | × | pieguy128 quits (~pieguy128@bras-base-mtrlpq5031w-grc-46-67-70-100-183.dsl.bell.ca) (Ping timeout: 256 seconds) |
| 16:47:06 | × | _xor quits (~xor@dsl-50-5-233-169.fuse.net) (Quit: brb) |
| 16:47:34 | × | DNH quits (~DNH@2a02:8108:1100:16d8:a92f:4d2f:4882:4db9) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 16:48:23 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:4371:6bef:aafb:f58d) (Ping timeout: 252 seconds) |
| 16:51:40 | × | CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 16:55:10 | → | alx741 joins (~alx741@157.100.93.160) |
| 16:58:39 | × | MajorBiscuit quits (~MajorBisc@c-001-007-038.client.tudelft.eduvpn.nl) (Quit: WeeChat 3.3) |
| 17:09:55 | → | econo joins (uid147250@user/econo) |
| 17:11:26 | → | Guest42 joins (~Guest42@563BEF60.catv.pool.telekom.hu) |
| 17:11:45 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:13:30 | × | michalz quits (~michalz@185.246.204.104) (Remote host closed the connection) |
| 17:13:45 | × | oo_migue1 quits (~pi@77.252.47.226) (Quit: WeeChat 2.3) |
| 17:13:54 | → | DNH joins (~DNH@2a02:8108:1100:16d8:259f:1db:61a3:46e1) |
| 17:14:27 | → | little_mac joins (~little_ma@2601:410:4300:3ce0:86d:17f:4605:4c9d) |
| 17:16:40 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 17:17:43 | <Inst> | i mean it should work, no? |
| 17:18:07 | <Inst> | f a <*> f b = f (a b)? |
| 17:18:13 | × | DNH quits (~DNH@2a02:8108:1100:16d8:259f:1db:61a3:46e1) (Ping timeout: 240 seconds) |
| 17:18:15 | <EvanR> | that doesn't look right |
| 17:18:26 | → | Akiva joins (~Akiva@user/Akiva) |
| 17:19:06 | <byorgey> | Inst: it looks like you are mixing up types and values. |
| 17:19:16 | → | shapr joins (~user@2601:7c0:c202:5190:c2c1:1b44:a2c4:880c) |
| 17:19:17 | <monochrom> | That's very intuitive and very wrong. |
| 17:19:17 | <EvanR> | (f <*> g) x = f x (g x) |
| 17:19:54 | <EvanR> | monochrom, there you go again </reagan> |
| 17:20:12 | <byorgey> | (<*>) has type f (a -> b) -> f a -> f b, so intuitively it takes a function and an argument both "inside" an f, and applies the function to the value "in the f context". |
| 17:20:14 | <polux> | Hi all, if I have a String that is a valid haskell function declaration, is there a way to turn that into an actual function declaration using template haskell? |
| 17:20:23 | <monochrom> | Except for the Identity functor and f = Identity (the data constructor) |
| 17:20:35 | <byorgey> | However, f a is not valid syntax for a value of type f (a -> b) |
| 17:21:20 | <polux> | I know of generating an haskell AST using template haskell combinators, and of quasiquotes but neither seems to help here. |
| 17:21:45 | <EvanR> | polux do you want to like "eval" the string and use it at runtime? |
| 17:21:46 | <Inst> | see, more things I hate about Haskell: |
| 17:21:58 | <Inst> | standard should be F a <*> F b = F (a b) |
| 17:22:01 | <Inst> | is that right? |
| 17:22:11 | <Inst> | where F is a type constructor and a is a function |
| 17:22:20 | <polux> | EvanR: no, I have a function that generates something of the form "f x = e" and I would like to turn that into a program at compile time |
| 17:22:24 | <monochrom> | Why is F not a data constructor? |
| 17:22:31 | <Inst> | *data constructor |
| 17:22:56 | <monochrom> | That works for Identity as said. But have you tried Maybe? []? Either e? |
| 17:23:17 | <EvanR> | polux, I know with TH you could parse that string and either fail or use the results to output code... |
| 17:23:24 | <Inst> | Maybe includes logic such that if F b = Nothing, <*> returns Nothing |
| 17:23:31 | <monochrom> | Maybe has two data constructors so does F become Nothing or does F become Just? |
| 17:23:52 | <polux> | EvanR: right, that's something like that I am looking for! Is there some standard or commonly accepted way to do this? |
| 17:24:13 | <monochrom> | And what about [] such that no constructor is 1-ary? |
| 17:24:21 | <Inst> | textbook definition of <*> for Maybe (Hutton): |
| 17:24:28 | <monochrom> | Does F become [] or does F become (:)? |
| 17:24:31 | <Inst> | Nothing <*> _ = Nothing |
| 17:24:37 | <Inst> | (Just g) <*> mx = fmap g mx |
| 17:25:07 | <Inst> | Maybe (a->b) -> Maybe a -> Maybe b |
| 17:25:45 | × | Jing quits (~hedgehog@240e:390:7c53:a7e1:2c67:7cfa:cdb8:6538) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 17:25:52 | <polux> | looks like https://hackage.haskell.org/package/haskell-src-meta does just that |
| 17:26:08 | <Square> | I try to create (through standalone deriving) a Lift instance for Name (from Template.Haskell) but it says "The data constructors of ‘Name’ are not all in scope" even if i import "Name(..)" |
| 17:26:44 | <Inst> | i mean I can get it working with toy examples |
| 17:26:49 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 17:27:03 | <Inst> | pure (+) <*> pure 1 <*> pure 2 = Just 3 |
| 17:27:05 | <Inst> | let me check |
| 17:28:12 | → | CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 17:28:13 | → | deadmarshal joins (~deadmarsh@95.38.231.124) |
| 17:28:23 | <Inst> | pure (+) <*> pure 1 <*> (pure 2 :: Num a => Maybe a) |
| 17:28:32 | <Inst> | Just 3 |
| 17:28:34 | × | razetime quits (~quassel@49.207.203.87) (Ping timeout: 256 seconds) |
| 17:29:59 | <EvanR> | as expected, pure has no effect |
| 17:30:18 | <Inst> | i assume there's a default instance defined for Num a... |
| 17:30:19 | <EvanR> | The pure was not very effective |
| 17:30:31 | <monochrom> | Square: Did you import from Language.Haskell.TH or did you import from Language.Haskell.TH.Syntax? Not all of them actually exports the data constructor. |
| 17:30:45 | <EvanR> | haskell doesn't have default instances |
| 17:30:49 | <byorgey> | Inst: a default instance of what defined for Num a ? |
| 17:31:02 | <Square> | monochrom, Language.Haskell.TH.Syntax |
| 17:31:18 | <Square> | ...ill try the former |
| 17:31:30 | <Square> | vice versa |
| 17:31:44 | <monochrom> | That's mysterious. Language.Haskell.TH.Syntax is the one that has the best hope. |
| 17:31:57 | <byorgey> | Inst: also, what question are you trying to answer right now? I'm trying to figure out how to help. |
| 17:32:23 | <Inst> | byorgey: I'm trying to feed openFile a value of IO (Maybe String) |
| 17:32:30 | <Inst> | using applicatives only |
| 17:32:49 | <Inst> | problem is, openFile takes two arguments, a String and a IOMode |
| 17:33:05 | <Square> | monochrom, you were correct.. chaning to Language.Haskell.TH.Syntax (i stated wrongly). It seems to work now |
| 17:33:09 | <Square> | thanks |
| 17:33:14 | <byorgey> | Inst: are you allowed to use liftA2? |
| 17:33:21 | <Inst> | I already have a liftA2 solution |
| 17:33:24 | <Inst> | it's an exercise |
| 17:33:31 | <Inst> | it was provided by Ax.... |
| 17:33:55 | <byorgey> | Inst: OK, did you see earlier when Axman6 showed the type of liftA2 (<*>)? |
| 17:33:59 | <Inst> | yeah, I saw |
| 17:34:49 | <Inst> | takes f1 (f2 (a->b)) -> f1 (f-2 a) -> f1 (f2 b) |
| 17:34:56 | <Inst> | erm, sig |
| 17:35:01 | <Inst> | it works |
| 17:35:05 | <byorgey> | Right. It seems to me that is exactly what you want |
| 17:36:11 | <byorgey> | you can apply it to pure (pure openFile) etc. |
| 17:36:51 | <Inst> | liftA2 (<*>) fmap fx |
| 17:36:58 | <Inst> | liftA2 (<*>) fmap f x |
| 17:38:37 | <byorgey> | hmm? liftA2 (<*>) expects as its first argument something of type f1 (f2 (a -> b)). That is not the type of fmap. |
| 17:39:32 | <Inst> | liftA2 f x = (<*>) (fmap f x) |
| 17:39:41 | <Inst> | from GHC.Base |
| 17:40:06 | <byorgey> | ok. |
| 17:41:57 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 240 seconds) |
| 17:43:07 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 17:45:26 | × | platz_ quits (~platz@40.122.118.113) (Quit: leaving) |
| 17:45:47 | → | neurocyte09179 joins (~neurocyte@user/neurocyte) |
| 17:45:49 | × | neurocyte0917 quits (~neurocyte@user/neurocyte) (Ping timeout: 240 seconds) |
| 17:45:49 | neurocyte09179 | is now known as neurocyte0917 |
| 17:47:49 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 17:47:49 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 17:47:49 | → | wroathe joins (~wroathe@user/wroathe) |
| 17:50:33 | <Inst> | why do people think "being filtered by trees" is funny? |
| 17:52:04 | <byorgey> | they do? |
| 17:52:28 | × | coot quits (~coot@2a02:a310:e03f:8500:5cc8:47c:8ec0:b827) (Remote host closed the connection) |
| 17:52:54 | → | coot joins (~coot@2a02:a310:e03f:8500:5cc8:47c:8ec0:b827) |
| 17:53:21 | × | nhatanh02 quits (~satori@123.24.172.30) (Ping timeout: 256 seconds) |
| 17:55:03 | <Inst> | do people get filtered by trees? |
| 17:55:09 | <Inst> | i almost got filtered by trees, but made it |
| 17:55:20 | <Inst> | now i'm about to get filtered by not understanding how to use <*> with stacked monads |
| 17:55:31 | <Inst> | i'm sure i'll make it |
| 17:56:19 | <Inst> | just needs more time, and the challenge is only a bit after the "fun" level right now |
| 17:56:31 | <EvanR> | you know, this isn't a monad thing |
| 17:56:54 | <EvanR> | it's about the Applicative instances |
| 17:57:38 | <EvanR> | which is usually nicer to deal with, but you have the awkard situation where most of your stuff is not using Maybe or IO |
| 17:57:45 | <EvanR> | in openFile |
| 17:59:44 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 18:01:06 | <EvanR> | why is ghci still complaining about ambiguous . even after I put import Prelude hiding ((.)) |
| 18:02:02 | × | Athas quits (athas@sigkill.dk) (Read error: Connection reset by peer) |
| 18:02:45 | <EvanR> | and id |
| 18:03:09 | <byorgey> | EvanR: maybe they are being imported via a module you :loaded? |
| 18:03:56 | <EvanR> | head scratch... importing and reexporting Prelude id and . ?? |
| 18:03:58 | → | moet joins (~moet@mobile-166-170-41-167.mycingular.net) |
| 18:04:28 | <EvanR> | ah there are two import Prelude hiding lines! |
| 18:05:13 | × | kimjetwav quits (~user@2607:fea8:2363:8f00:62f3:c8e:2d83:a34f) (Read error: Connection reset by peer) |
| 18:05:24 | <byorgey> | haha, each one is importing the thing the other is hiding =) |
| 18:05:30 | → | kimjetwav joins (~user@2607:fea8:2363:8f00:e50d:c794:338b:ac83) |
| 18:05:38 | × | phma quits (~phma@host-67-44-208-201.hnremote.net) (Read error: Connection reset by peer) |
| 18:06:33 | → | phma joins (~phma@host-67-44-208-198.hnremote.net) |
| 18:07:31 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds) |
| 18:07:47 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 18:07:47 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 18:07:47 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:09:02 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 18:09:48 | × | moet quits (~moet@mobile-166-170-41-167.mycingular.net) (Quit: leaving) |
| 18:10:24 | → | kupi joins (uid212005@id-212005.hampstead.irccloud.com) |
| 18:10:44 | <Inst> | (fmap (<*>) (fmap (fmap openFile) openFilePath)) <*> (pure (pure ReadMode)) <-- this works |
| 18:10:58 | × | mbuf quits (~Shakthi@122.178.183.53) (Quit: Leaving) |
| 18:11:44 | <Inst> | EvanR: I am treating FAM monadically (in the sense of being a single unit) |
| 18:12:12 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 18:12:50 | <EvanR> | just saying that could would work if nothing involved were monads |
| 18:12:54 | → | dyeplexer joins (~dyeplexer@user/dyeplexer) |
| 18:12:54 | <EvanR> | that code* |
| 18:13:03 | <EvanR> | which comes up a lot more actually |
| 18:13:57 | <EvanR> | :t \x y -> fmap (<*>) (fmap (fmap x) <*> (pure (pure x)) |
| 18:13:58 | <lambdabot> | error: |
| 18:13:58 | <lambdabot> | parse error (possibly incorrect indentation or mismatched brackets) |
| 18:14:04 | <EvanR> | :t \x y -> fmap (<*>) (fmap (fmap x)) <*> (pure (pure x)) |
| 18:14:05 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:14:05 | <lambdabot> | Applicative f => (a -> b) -> p -> f ((a -> b) -> a) -> f b |
| 18:14:15 | <EvanR> | look mom no monads |
| 18:14:25 | <EvanR> | :t \x y -> fmap (<*>) (fmap (fmap x)) <*> (pure (pure y)) |
| 18:14:26 | <lambdabot> | Applicative f => (a1 -> b) -> a2 -> f (a2 -> a1) -> f b |
| 18:14:39 | Square | is now known as Sqaure |
| 18:15:25 | → | Athas joins (~athas@2a01:7c8:aaac:1cf:d10b:de69:b1cf:3fd6) |
| 18:15:55 | <EvanR> | sometimes it turns out you don't need some abilities and you can make your code more general |
| 18:16:49 | <Inst> | i mean i don't actually need the code, it's just an exercise |
| 18:17:07 | <EvanR> | no excuse not to note something cool |
| 18:17:38 | → | lavaman joins (~lavaman@98.38.249.169) |
| 18:18:23 | <Inst> | in your sentence above, monad meant (it'd actually be funnier if monad's semantic drift went out of control and we be able to compose sentences entirely out of the word monad, with various inflections to indicate grammatical use) |
| 18:18:33 | <Inst> | values whose type was monadic, right? |
| 18:18:48 | × | pera quits (~pera@user/pera) (Quit: leaving) |
| 18:19:05 | → | vysn joins (~vysn@user/vysn) |
| 18:19:31 | <EvanR> | no |
| 18:19:40 | <EvanR> | since we're talking about types not values |
| 18:19:52 | <EvanR> | none of the types were monads |
| 18:19:59 | <EvanR> | (necessarily) |
| 18:21:42 | <Inst> | openFilePath returns IO (Maybe String) which is why it's such a mess |
| 18:24:02 | <EvanR> | @hoogle openFilePath |
| 18:24:02 | <lambdabot> | No results found |
| 18:24:16 | <EvanR> | what's that |
| 18:25:43 | <Inst> | openFilePath :: IO (Maybe String) |
| 18:25:43 | <Inst> | openFilePath = openFileDialog (pack "") (pack "") [] (pack "") False >>= \x -> pure $ x >>= \y -> pure $ unpack (head y) |
| 18:25:56 | <Inst> | openFileDialog is from TinyFileDialogs on Hackage |
| 18:26:02 | <Inst> | I've been told it's badly coded |
| 18:26:13 | <Inst> | it's a wrapper for TinyFileDialogs |
| 18:26:44 | <Inst> | so it calls up OS API to get you a file selector, then returns a file path as IO Maybe [Text] |
| 18:27:22 | <EvanR> | it returns the first path selected by the user or Nothing if they cancelled? |
| 18:27:23 | <Inst> | the architecture of "cancer.hs" |
| 18:27:25 | <Inst> | yeah |
| 18:27:36 | <Inst> | if True is sent, you can select multiple files and it's a multi-element List |
| 18:28:09 | <Inst> | so, like, if you want to teach with it, you can give an assignment to give a way to hook up TinyFileDialogs to an openFile / writeFile whatever |
| 18:28:16 | <EvanR> | in this case, I would immediately handle the Nothing after calling that, then continue in IO, |
| 18:28:30 | <EvanR> | using a case |
| 18:28:51 | <EvanR> | react to a Just path with some IO code and a real String |
| 18:28:57 | <Inst> | why do you guys hate If Then Else statements so much? They're perfectly useful when you only have two cases! |
| 18:29:14 | <Inst> | it desugars to case! |
| 18:29:15 | <EvanR> | if then else isn't about the number of cases, it's about the type of the scrutinee |
| 18:29:25 | <ephemient> | you wan to destructure the maybe, so the natural thing to use is case |
| 18:29:26 | <monochrom> | I don't hate if-then-else. |
| 18:29:28 | <EvanR> | you don't have a Bool so it's inconvenient |
| 18:29:35 | <Inst> | ah |
| 18:29:44 | <monochrom> | "if x>10 then ... else ..." is fine. |
| 18:29:44 | <Inst> | case of you can use pattern matching |
| 18:29:58 | <monochrom> | Instead, why do you hate pattern matching so much? |
| 18:29:59 | × | kimjetwav quits (~user@2607:fea8:2363:8f00:e50d:c794:338b:ac83) (Remote host closed the connection) |
| 18:30:10 | <monochrom> | "case xs of [] -> ... x:xs -> ..." is fine. |
| 18:30:14 | <EvanR> | also, using an if with isJust or isNothing would be bad here, because then you don't have the string |
| 18:30:14 | <Inst> | i wasn't used to it! |
| 18:30:18 | <Inst> | and also, on FP Discord |
| 18:30:22 | <ephemient> | with {-# LANGUAGE LambdaCase #-} you can write something >>= \case Just something -> foo; Nothing -> bar |
| 18:30:28 | <EvanR> | and to get the string, you need... to use a case statement |
| 18:30:30 | <Inst> | we have some guy who insists on defining functions with pattern matching |
| 18:30:35 | <EvanR> | then the Nothing case makes no sense |
| 18:30:35 | <Inst> | also, btw, can you @ a function? |
| 18:30:46 | <Inst> | it's a phase people go through |
| 18:30:52 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 18:30:55 | <ephemient> | and with {-# LANGUAGE BlockArguments #-} you don't need to increase indentation for a do block inside there |
| 18:30:56 | <Inst> | they're not comfortable with pattern matching, they work with if then else because it's what they learned first |
| 18:31:10 | <Inst> | if then else only has a valid use in the rare case where you only have two cases and don't need pattern matching |
| 18:31:19 | <EvanR> | if then else doesn't give you access to the payload of Maybe |
| 18:31:22 | <Inst> | yeah |
| 18:31:23 | <Inst> | correct |
| 18:31:30 | <Inst> | so in this case it's not necessary |
| 18:31:37 | <Inst> | erm, it's not useful |
| 18:31:42 | <EvanR> | it would actually be very awkward and weird |
| 18:31:58 | <Inst> | but re: hating pattern matching |
| 18:32:03 | <Inst> | there's a stage people go through where they prefer guards |
| 18:32:10 | <Inst> | it's because they don't want to type the function name and arguments all the time |
| 18:32:17 | <Inst> | so I'm sort of wondering if it's possible to @ the function name |
| 18:32:22 | <EvanR> | you can just use a case to avoid that |
| 18:32:26 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 18:32:33 | <Inst> | so when you're pattern matching, you can just type Function x y |
| 18:32:43 | <Inst> | so when you're pattern matching, you can just type k@function x y |
| 18:32:48 | <Inst> | then k x2 y2, etc |
| 18:33:00 | <Inst> | not sure if @ notation is powerful enough for that |
| 18:33:16 | <monochrom> | WTH is "@ the function name"? |
| 18:33:30 | <EvanR> | yeah you can't write that |
| 18:33:33 | <Inst> | in Chinese and Japanese, because words are so complicated, they have something called an iteration mark |
| 18:33:39 | <Inst> | so, if you're reduplicating a word |
| 18:33:46 | <Inst> | erm, the character for a given morpheme can be so complicated |
| 18:33:54 | <int-e> | function_with_tediously_long_name = f where f ... |
| 18:34:12 | <int-e> | "go" is a somewhat popular short name |
| 18:34:14 | <Inst> | you just write 々 |
| 18:34:24 | <monochrom> | No, Chinese doesn't do that. |
| 18:34:26 | <Inst> | oh, thanks |
| 18:34:34 | <EvanR> | function_with_tedious_name x = case x of |
| 18:34:38 | <Inst> | Chinese has iteration marks, two, used entirely in casual writing |
| 18:35:15 | <[itchyjunk]> | if list = [[1],[2,3]] and i [x | x <- [ y | y <- list] ], first instance of y would be [1] so x <- [1] would be 1 no? |
| 18:35:18 | <Inst> | but there is a stage where people do guards, probably because (like me) they're too dumb to figure out how to use where to avoid having to type the pattern name repeatedly |
| 18:35:21 | <monochrom> | And I believe Japanese does that for immediate repetition only, not marking something to be cloned 3 inches away. |
| 18:35:23 | <[itchyjunk]> | idk why this is id function again |
| 18:35:31 | <int-e> | EvanR: I kind of hate that because it means switching from = to -> |
| 18:35:40 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
| 18:35:44 | <monochrom> | And English has "ditto" for that. |
| 18:35:49 | <Inst> | 〻 |
| 18:35:50 | <EvanR> | well... we switch between = and -> so much anyway xD |
| 18:35:52 | → | futh1415 joins (~futh14@c90-143-137-255.bredband.tele2.se) |
| 18:36:09 | <EvanR> | i didn't know about the f trick |
| 18:36:11 | <Inst> | case of I actually dislike because you have to use -> |
| 18:36:17 | <Inst> | would be better if you could just type = instead |
| 18:36:40 | <[itchyjunk]> | ah i think it's left to right evaluation |
| 18:36:56 | <[itchyjunk]> | can i do list comprehension without a list? xD |
| 18:36:58 | <EvanR> | it wouldn't be better, imo |
| 18:36:59 | × | futh14 quits (~futh14@c90-143-137-255.bredband.tele2.se) (Ping timeout: 256 seconds) |
| 18:37:05 | <EvanR> | = means equals in haskell |
| 18:37:18 | <Inst> | "is defined as" |
| 18:37:21 | <EvanR> | Nothing = "whatever, it's empty" is wrong |
| 18:37:23 | <Inst> | == is boolean equal |
| 18:37:32 | <EvanR> | it's not is defined as either |
| 18:38:06 | <Inst> | @int-e thank you for letting me know about the where trick |
| 18:38:06 | <lambdabot> | Unknown command, try @list |
| 18:38:14 | <int-e> | [itchyjunk]: [ y | y <- list] equals list |
| 18:38:46 | <EvanR> | = also isn't a bool test, it's a proposition |
| 18:39:06 | <[itchyjunk]> | :< |
| 18:39:37 | <int-e> | we're back to making bold declarations I see |
| 18:39:37 | × | nschoe quits (~quassel@2a01:e0a:8e:a190:4c27:e379:35e8:63af) (Ping timeout: 240 seconds) |
| 18:39:41 | <Inst> | w/e, this is a case where i'm better off learning the language more before arguing it |
| 18:40:04 | <Inst> | like, I had a pythoner who had signed up to learn Hask from me when I was ready run off once he saw that Aeson apparently required you to define types |
| 18:40:05 | <monochrom> | I thought that was the only fair thing to do. |
| 18:40:21 | <ephemient> | well, one part of syntax I always find a bit awkward is using <- inside pattern guards, but I don't think there's really a great alternative since = already means something |
| 18:40:25 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 18:40:29 | <monochrom> | What do you mean it is possible to give so much opinion on something you don't know. |
| 18:40:41 | <monochrom> | Is that a new-fangled TikTok thing. |
| 18:40:49 | <Inst> | isn't that the basis of democracy? :) |
| 18:41:15 | <int-e> | monochrom: I don't know what you're talking about, therefore you are wrong. |
| 18:42:17 | <Inst> | also there seems to be a dearth of information on algebraic data types in textbooks, as in, it's usually not taught unitarily |
| 18:42:47 | <[itchyjunk]> | if i have a [[1]], is there no direct way to refer to that 1 inside a list comprehension? |
| 18:43:02 | <[itchyjunk]> | [x | x <- ? ] |
| 18:43:03 | <Inst> | ummm |
| 18:43:16 | <Inst> | [x | x<- y , y<-k] |
| 18:43:22 | <Inst> | or no, that doesn't work |
| 18:43:25 | <EvanR> | > [x | [[x]] <- [[1]]] -- ? xD |
| 18:43:26 | <[itchyjunk]> | no.. |
| 18:43:27 | <lambdabot> | error: |
| 18:43:27 | <lambdabot> | • No instance for (Num [()]) arising from a use of ‘e_11’ |
| 18:43:27 | <lambdabot> | • In the expression: e_11 |
| 18:43:35 | <EvanR> | > [x | [x] <- [[1]]] -- ? xD |
| 18:43:36 | <lambdabot> | [1] |
| 18:43:53 | <Inst> | i'm trying to figure out how to do it using the list comprehension syntax only |
| 18:44:01 | <int-e> | Inst: it basically works, you just need to put things into the proper order |
| 18:44:03 | <Inst> | you could just do [head x | x <- list] |
| 18:44:18 | → | nschoe joins (~quassel@2a01:e0a:8e:a190:2fd9:6714:788f:97f6) |
| 18:44:21 | <monochrom> | > [x | a <- [[1]] {- so a = [1] -} , x <- a] |
| 18:44:22 | <lambdabot> | [1] |
| 18:44:22 | <int-e> | and maybe rename things |
| 18:44:33 | <Inst> | [x | y <- list, x <- y |
| 18:44:35 | <Inst> | ]? |
| 18:44:41 | <[itchyjunk]> | okay, [[1]] was an example |
| 18:44:48 | <[itchyjunk]> | i want to refrence to [[a]] |
| 18:44:54 | <[itchyjunk]> | elements in lists of lists |
| 18:44:57 | <[itchyjunk]> | all of them |
| 18:45:01 | × | dyeplexer quits (~dyeplexer@user/dyeplexer) (Ping timeout: 240 seconds) |
| 18:45:09 | <monochrom> | You mean [[1,2,3]] |
| 18:45:23 | <[itchyjunk]> | [[1],[2],[3..]] |
| 18:45:24 | <monochrom> | > [x | a <- [[1,2,3]] {- so a = [1] or [2] or [3] -} , x <- a] |
| 18:45:25 | <lambdabot> | [1,2,3] |
| 18:45:36 | <Inst> | list = [[1] |
| 18:45:38 | <Inst> | list = [[1]] |
| 18:45:38 | <monochrom> | Err, a=[1,2,3] |
| 18:45:55 | <monochrom> | [[1], [2], [3]] can also work |
| 18:45:55 | <EvanR> | gratuitous list comprehension syntax for outrageous fortune |
| 18:45:59 | <Inst> | [x | y<-list, x<-y] |
| 18:46:02 | <Inst> | returns 1 |
| 18:46:04 | <[itchyjunk]> | whats this {- -} stuff? |
| 18:46:09 | <monochrom> | > [x | a <- [[1],[2],[3]] {- so a = [1] or [2] or [3] -} , x <- a] |
| 18:46:10 | <lambdabot> | [1,2,3] |
| 18:46:18 | <futh1415> | [itchyjunk] comments |
| 18:46:22 | <monochrom> | block comment |
| 18:46:43 | <Inst> | welcome to the Haskell club, [itchyjunk] |
| 18:46:46 | <[itchyjunk]> | Inst, oh i didnt think of difining y first then x :| |
| 18:47:02 | <[itchyjunk]> | oh i see :< |
| 18:47:17 | <[itchyjunk]> | [x | y <- list, x <- y] seems to work |
| 18:47:25 | <Inst> | EvanR: it's not gratuitous when you intrinsically derive pleasure from the syntax |
| 18:47:38 | <Inst> | a bit decadent, perhaps, but not gratuitous |
| 18:47:44 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 18:48:02 | <EvanR> | after using clojure I do appreciate my syntax |
| 18:48:10 | <EvanR> | when it exists |
| 18:48:12 | <Inst> | it could be better in parts |
| 18:48:21 | <Inst> | but pretty close to optimum, Idris apparently uses : for type signatures |
| 18:48:26 | <monochrom> | I like outrageous fortune. May well worth gratuitous syntax. |
| 18:48:26 | <Inst> | not sure what they use for cons |
| 18:48:27 | <EvanR> | : is more standard |
| 18:48:33 | <EvanR> | haskell is the odd one out with :: |
| 18:48:37 | <Inst> | ah |
| 18:49:03 | <monochrom> | If someone pays me $100000 for saying "type X = Y" 3 times, I will do it. |
| 18:49:04 | <[itchyjunk]> | https://bpa.st/MBDQ |
| 18:49:18 | <[itchyjunk]> | Why didn't I think of defining y first? was stuck on this for too long.. |
| 18:49:18 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 18:49:28 | <Inst> | LYAH or HPFFP? |
| 18:49:43 | <EvanR> | basically you needed a two step list comprehension not one |
| 18:49:48 | <EvanR> | since it's nested |
| 18:49:54 | <monochrom> | This is why education exists. You can't expect to think up all the obvious-in-retrospect ideas yourself. |
| 18:50:32 | <monochrom> | It is also why when I teach I don't say "think about it". I give carefully designed hints and even appropriate spoilers. |
| 18:50:37 | × | TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 240 seconds) |
| 18:51:02 | <Inst> | monad comprehension is a language extension, right? |
| 18:51:32 | <Inst> | there's no way to implement list comprehensions for a custom list type? |
| 18:52:23 | × | nschoe quits (~quassel@2a01:e0a:8e:a190:2fd9:6714:788f:97f6) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 18:54:06 | <Henson> | /quit |
| 18:54:17 | × | Henson quits (~kvirc@107-179-133-201.cpe.teksavvy.com) (Quit: let's try that again!) |
| 18:54:23 | <monochrom> | Heh |
| 18:55:20 | <EvanR> | a Henson shaped hole next to the open exit door |
| 18:55:35 | <monochrom> | haha |
| 18:56:24 | → | TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker) |
| 18:56:49 | × | deadmarshal quits (~deadmarsh@95.38.231.124) (Ping timeout: 256 seconds) |
| 18:59:10 | <Inst> | still fairly ugly |
| 18:59:12 | <Inst> | d = pure ((<*>) . (pure openFile <*>)) <*> openFilePath <*> pure (pure ReadMode) |
| 18:59:25 | <Inst> | well, it's going to be ugly, just need to figure out how to get rid of the . |
| 18:59:34 | <Inst> | then it's done just with <*> and pure |
| 19:00:13 | <Inst> | then i have to figure out how the code actually works! |
| 19:00:38 | <dsal> | That looks like a mini golfer showed up at a PGA Tour. |
| 19:00:43 | × | xstill- quits (xstill@fimu/xstill) (Quit: Ping timeout (120 seconds)) |
| 19:00:43 | <EvanR> | @pl \x y z -> pure ((<*>) . (pure x <*>)) <*> y <*> pure (pure z) |
| 19:00:43 | <lambdabot> | flip flip (pure . pure) . (((.) . (<*>)) .) . (<*>) . pure . ((<*>) .) . (<*>) . pure |
| 19:01:06 | → | xstill- joins (xstill@fimu/xstill) |
| 19:01:43 | × | max22- quits (~maxime@2a01cb0883359800510125e1acff834b.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 19:01:48 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 19:01:55 | → | max22- joins (~maxime@2a01cb0883359800decae4ceda35e3bf.ipv6.abo.wanadoo.fr) |
| 19:02:13 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds) |
| 19:04:15 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 268 seconds) |
| 19:04:37 | × | TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 240 seconds) |
| 19:05:57 | → | TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker) |
| 19:08:57 | <Inst> | i have a problem wherein I where if I see those red squiggly lines under my code, I feel like the Hlinter just called me a paedophile |
| 19:09:36 | <EvanR> | use vim, no red squiggle support |
| 19:12:36 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:13:05 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 19:16:11 | → | pieguy128 joins (~pieguy128@bras-base-mtrlpq5031w-grc-35-70-24-248-198.dsl.bell.ca) |
| 19:17:32 | × | coot quits (~coot@2a02:a310:e03f:8500:5cc8:47c:8ec0:b827) (Quit: coot) |
| 19:18:16 | <schuelermine[m]> | Is there a package/module that does something like this? https://gist.github.com/schuelermine/6a06efcc0c5b3a18768c4649e4cc8efb |
| 19:18:29 | <ephemient> | :t let openFilePath :: String -> IO (Maybe FilePath); openFilePath = undefined in openFilePath >=> mapM (flip openFile ReadMode) |
| 19:18:30 | <lambdabot> | error: |
| 19:18:30 | <lambdabot> | Variable not in scope: openFile :: FilePath -> b0 -> IO b |
| 19:18:30 | <lambdabot> | error: Data constructor not in scope: ReadMode |
| 19:18:37 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 19:20:55 | → | jkaye_ joins (~qicruser@2605:ef80:1a:c23f::1062:2648) |
| 19:21:25 | × | pieguy128 quits (~pieguy128@bras-base-mtrlpq5031w-grc-35-70-24-248-198.dsl.bell.ca) (Ping timeout: 240 seconds) |
| 19:22:37 | × | Athas quits (~athas@2a01:7c8:aaac:1cf:d10b:de69:b1cf:3fd6) (Ping timeout: 240 seconds) |
| 19:23:59 | × | jkaye_ quits (~qicruser@2605:ef80:1a:c23f::1062:2648) (Read error: Connection reset by peer) |
| 19:24:08 | × | bliminse quits (~bliminse@host86-186-17-7.range86-186.btcentralplus.com) (Quit: leaving) |
| 19:29:10 | → | jkaye_ joins (~qicruser@2605:ef80:1a:c23f::1062:2648) |
| 19:30:45 | → | pieguy128 joins (~pieguy128@bras-base-mtrlpq5031w-grc-43-67-70-144-25.dsl.bell.ca) |
| 19:30:45 | × | fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds) |
| 19:30:54 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:35:59 | <Inst> | bjs |
| 19:36:14 | → | bliminse joins (~bliminse@host86-186-17-7.range86-186.btcentralplus.com) |
| 19:38:11 | × | jkaye_ quits (~qicruser@2605:ef80:1a:c23f::1062:2648) (Read error: Connection reset by peer) |
| 19:39:28 | × | benin quits (~benin@183.82.176.241) (Quit: The Lounge - https://thelounge.chat) |
| 19:43:30 | × | futh1415 quits (~futh14@c90-143-137-255.bredband.tele2.se) (Quit: Client closed) |
| 19:44:47 | → | Athas joins (~athas@sigkill.dk) |
| 19:45:29 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 19:46:37 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 19:48:11 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 19:48:11 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 19:48:11 | → | wroathe joins (~wroathe@user/wroathe) |
| 19:49:19 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 19:50:01 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 19:51:01 | <lyxia> | schuelermine[m]: you might be interested in "ghosts of departed proofs" https://hackage.haskell.org/package/gdp |
| 19:53:48 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:54:21 | <monochrom> | Why is the readme essentially empty? :( |
| 19:55:09 | <geekosaur> | ghosts are invisible :þ |
| 19:55:19 | <monochrom> | Fortunately app/Main.hs is a good example. |
| 19:57:13 | <EvanR> | was there a paper by this name |
| 19:57:42 | × | briandaed quits (~briandaed@185.234.208.208.r.toneticgroup.pl) (Quit: leaving) |
| 19:57:52 | → | briandaed joins (~root@185.234.208.208.r.toneticgroup.pl) |
| 19:57:55 | <lyxia> | yeah, a functional pearl |
| 20:00:56 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Quit: ERC (IRC client for Emacs 27.1)) |
| 20:01:37 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 20:02:32 | <schuelermine[m]> | What syntax is `([a] ?SortedBy comp)`? Is it applying `[a]` to an implicit parameter? |
| 20:03:28 | <monochrom> | It's "type (?) a p = Satisfies p a" |
| 20:04:06 | × | bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 20:04:35 | <schuelermine[m]> | It's an infix type operator? And `SortedBy comp` is the right argument? |
| 20:04:41 | <monochrom> | Yeah |
| 20:04:57 | × | juhp quits (~juhp@128.106.188.82) (Ping timeout: 240 seconds) |
| 20:07:38 | <schuelermine[m]> | Does GHC propagate constraints from type families? Can you do... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/56f684a65369fda39abada8109007f682e427671) |
| 20:07:56 | <schuelermine[m]> | * Does GHC propagate constraints from type families? Can you do... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/f2a37c482df8e3589687753844ee3b18bf1ad47b) |
| 20:08:11 | → | juhp joins (~juhp@128.106.188.82) |
| 20:08:18 | <schuelermine[m]> | oh frick |
| 20:08:20 | <schuelermine[m]> | sorry |
| 20:08:27 | <schuelermine[m]> | I forgot I was bridging from matrix |
| 20:08:40 | <schuelermine[m]> | sorry for attempting to use markdown :/ |
| 20:09:53 | <geekosaur> | it's okay, the bridge pushed it into a pastebin and mostly kept the formatting |
| 20:09:58 | <geekosaur> | the edit was more problematic |
| 20:10:01 | → | deadmarshal joins (~deadmarsh@95.38.231.124) |
| 20:10:41 | <schuelermine[m]> | what does it show up as? |
| 20:10:47 | <schuelermine[m]> | (the editl |
| 20:10:53 | <schuelermine[m]> | s/l/) |
| 20:10:59 | <geekosaur> | [11 20:07:56] <schuelermine[m]> * Does GHC propagate constraints from type families? Can you do... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/f2a37c482df8e3589687753844ee3b18bf1ad47b) |
| 20:11:05 | <geekosaur> | it doesn't edit, in short |
| 20:11:34 | <schuelermine[m]> | I see, thanks |
| 20:11:45 | <geekosaur> | IRC has no edit mechanism, just some conventions that hopefully don;t get overused |
| 20:12:15 | <schuelermine[m]> | yeah I know, I just forgot to code-switch. |
| 20:12:45 | <schuelermine[m]> | it's s/pat/rep/, or *fix-word, right? |
| 20:12:51 | <geekosaur> | yeh |
| 20:13:29 | <geekosaur> | and yours wasn't too bad, it's the folks who do 5 or 6 *s of the whole message in a row that are really frustrating IRC-side |
| 20:13:40 | <awpr> | > let f :: (Num String => String) -> String; f _ = "what?" in f 42 -- putting the constraint there probably doesn't do what you were expecting |
| 20:13:41 | <lambdabot> | "what?" |
| 20:14:13 | × | deadmarshal quits (~deadmarsh@95.38.231.124) (Ping timeout: 240 seconds) |
| 20:14:45 | <schuelermine[m]> | Oh you can omit braces in one-line let stmts now & still use semicolons? |
| 20:15:41 | <geekosaur> | when they're not nested in some other layout-using construct |
| 20:15:53 | <geekosaur> | let inside of do will break, for example |
| 20:16:00 | <schuelermine[m]> | > let a = 2; b = 3 in [a,b+a] |
| 20:16:02 | <lambdabot> | [2,5] |
| 20:16:10 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:16:37 | <schuelermine[m]> | …ok, that got turned into a blockquote on Matrix, hope that got through fine |
| 20:16:54 | <geekosaur> | worked fine here |
| 20:17:15 | <geekosaur> | bridging message systems with different conventions has its rough edges :) |
| 20:17:35 | × | briandaed quits (~root@185.234.208.208.r.toneticgroup.pl) (Remote host closed the connection) |
| 20:17:51 | <geekosaur> | you could use @run instead of "> " if matrix is doing weird things with it |
| 20:18:25 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 20:18:35 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:19:02 | <Inst> | question |
| 20:19:03 | <schuelermine[m]> | IMO the best feature of rich text messaging is <details>, that's so convenient if you wanna send loads of text without cluttering up everyone's screens |
| 20:19:10 | <Inst> | is it not possible to dispense wholly with .? |
| 20:19:17 | × | jkaye quits (~jkaye@2601:281:8300:7530:7cb5:a22f:ba66:1688) (Ping timeout: 240 seconds) |
| 20:19:22 | <Inst> | like, i mean, i could always just replace . with a lambda |
| 20:19:46 | <geekosaur> | there are some uses of . that can't be done in other ways, like use with forall |
| 20:19:48 | <Inst> | pure ((<*>) . (pure openFile <*>)) <*> openFilePath <*> pure (pure ReadMode) |
| 20:19:53 | <Inst> | like, how do I get . out? |
| 20:20:03 | <Inst> | lambda solution is always there, of course |
| 20:20:09 | × | kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 20:20:10 | <geekosaur> | @unpl pure ((<*>) . (pure openFile <*>)) <*> openFilePath <*> pure (pure ReadMode) |
| 20:20:10 | <lambdabot> | ((pure (\ x -> (<*>) (pure openFile <*> x)) <*> openFilePath) <*> pure (pure ReadMode)) |
| 20:20:18 | <Inst> | unpl? |
| 20:20:30 | <Inst> | so the only way i can nuke the . is with a lambda? :( |
| 20:20:32 | <geekosaur> | reverse of @pl which removes "points" (variables) |
| 20:20:42 | <Inst> | pointless -> point free? :) |
| 20:20:44 | <geekosaur> | that doens't necessarily mean it's the only way\ |
| 20:20:50 | <bjs> | presumably "un-point-less" :P |
| 20:21:11 | <geekosaur> | yes. "pointless" is just, well, when you see some of the stuff it comes up with, you'll see why some people consider it pointless :) |
| 20:21:48 | <geekosaur> | multiple uses of <*> can sometimes be replaced by use of liftAn for some n |
| 20:21:53 | <Inst> | i know |
| 20:21:59 | <Inst> | but trying to do it with just pure and <*> |
| 20:22:08 | → | whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com) |
| 20:22:12 | <Inst> | it's something about parsing, i'm sure |
| 20:22:14 | <EvanR> | just pure or <*>, no lambda, what else |
| 20:22:18 | <Inst> | hi whatsupdoc, did you finally try learning Haskell yet? |
| 20:22:27 | <Inst> | parens, I guess, or $ |
| 20:22:28 | <whatsupdoc> | lol |
| 20:22:37 | <EvanR> | no parens allowed? |
| 20:22:41 | <Inst> | allowed |
| 20:22:56 | <EvanR> | these rules are turning into an olympic sport |
| 20:22:56 | <whatsupdoc> | why so curious about me learning haskell? |
| 20:23:53 | <Inst> | EvanR: "make a functional IO program that can read and write files on lesson 3 of 'Haskell for non-programmers'" |
| 20:24:15 | <EvanR> | do notation |
| 20:24:16 | <whatsupdoc> | Inst: i'm learning about the stock market right now |
| 20:24:34 | <Inst> | is it ethical to teach do notation without teaching what's happening underneath? |
| 20:24:36 | <EvanR> | and case analysis to dispatch the Maybes if they appear |
| 20:24:45 | <EvanR> | yes it is ethical and probably smart |
| 20:24:45 | <Inst> | i mean all you need is Do |
| 20:24:47 | <monochrom> | Unethical. |
| 20:25:04 | <Inst> | some people after getting monads want to teach a monad tutorial, i want to teach a monad course |
| 20:25:06 | <EvanR> | just get something in IO working |
| 20:25:09 | <Inst> | which is less unethical |
| 20:25:13 | <whatsupdoc> | as soon as that's over, i'll start learning haskell |
| 20:25:20 | <EvanR> | like we saw earlier it doesn't have to have anything to do with Monads |
| 20:25:29 | <Inst> | hmmm, if i paid you $6 would you be a guinea pig for my haskell course? |
| 20:25:34 | <monochrom> | Well, actually I don't have a notion of ethics for this. But I have a notion of efficacy on this. do-notation is more confusing than helping at an early stage. |
| 20:25:34 | <Inst> | it'll be taught on twitch.tv and Discord |
| 20:25:39 | <EvanR> | you used other means and didn't even use the monad instance |
| 20:25:59 | <whatsupdoc> | twitch? I hate live stream stuff, disaster for learning |
| 20:26:05 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 20:26:05 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 20:26:05 | → | wroathe joins (~wroathe@user/wroathe) |
| 20:26:38 | <Inst> | tbh i'm thinking it'd be impossible to teach algebraic data types on lesson 2 |
| 20:27:01 | → | d0ku joins (~d0ku@178.43.3.56.ipv4.supernova.orange.pl) |
| 20:27:06 | <Inst> | then intro monads as part of algebraic data types, along with the standard "monad anti-tutorial" |
| 20:27:36 | <EvanR> | speaking of which, why are we learning haskell right now from the perspective of a seasoned practioner attempting to teach it to non-programmers |
| 20:27:37 | <monochrom> | Live stream per se is neither good nor bad for learning. The real difference is between pre-planned and stream-of-consciousness. |
| 20:27:42 | <whatsupdoc> | ablgebraic data types sounds like a class |
| 20:27:45 | <EvanR> | i.e. where most of the monad tutorials came from |
| 20:27:50 | <EvanR> | bad ones |
| 20:28:18 | <EvanR> | like, learn it from the perspective of someone learning it |
| 20:28:22 | <monochrom> | And then statistically most live-streamers are stream-of-consciousness. |
| 20:28:38 | <Inst> | i'm trying to learn it, which is why i feel privileged to blow my mouth off about stuff i don't understand |
| 20:28:47 | <whatsupdoc> | what's the best reosurce for learning haskell? i think if i don't have a structured plan i probably won't be curious to dig into it on my own |
| 20:28:51 | <Inst> | "if I were teaching myself, this would be how I'd do it" |
| 20:28:55 | <Inst> | LYAH is dead |
| 20:29:06 | <Inst> | HPFFP costs money, but you can find a moderately old version online |
| 20:29:15 | <Inst> | apparently people have a grudge against Chris Allen for trying to rip off Julie Moronuki |
| 20:29:30 | <Inst> | LYAH you can still find on archive.org |
| 20:29:33 | <monochrom> | I don't know about best. But http://www.vex.net/~trebla/haskell/learn-sources.html is my comments on some resources I have looked at. |
| 20:29:47 | <monochrom> | And eventually "best" is very personal. |
| 20:30:03 | <Inst> | no relation to that smuggler, monochrom? |
| 20:30:07 | <monochrom> | And ultimately "best" just means the 3rd time you learn. |
| 20:30:32 | → | Sgeo_ joins (~Sgeo@user/sgeo) |
| 20:30:37 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 20:30:45 | <whatsupdoc> | It's hard to find the motivation to learn something if I have no reason to learn it. I'm happy with C++ and Python :) |
| 20:30:48 | <Inst> | lesson 2 at least has to be an introduction to the typechecker and why it's telling you to kys |
| 20:31:24 | <[itchyjunk]> | Uh, i thought guard was the | stuff when defining functions. |
| 20:31:29 | <whatsupdoc> | I'll take this course and do all the assignments https://www.seas.upenn.edu/~cis194/fall16/ |
| 20:31:34 | <Inst> | yeah, your only motivation is an off-handed claim in ##programming that you could pick up Haskell in 3 days |
| 20:31:37 | <[itchyjunk]> | Where is the guard in [x | x <- [1..10], even x] ? |
| 20:31:42 | <polyphem> | whatsupdoc: do you do template metaprogramming in c++ ? |
| 20:31:48 | <Inst> | I've met people who, with the appropriate pedagogy probably could do it |
| 20:31:51 | <monochrom> | This is why I don't push myself to learn an unmotivated thing. |
| 20:31:55 | <Inst> | but they were Harvard students overloading 24 credits a term |
| 20:31:55 | <[itchyjunk]> | Inst, someone in ##programming said that? |
| 20:31:59 | <Inst> | whatsupdoc |
| 20:32:27 | <Inst> | (norm is 16 credits, so I'm told) |
| 20:32:40 | <Inst> | in hard sciences, mind you |
| 20:32:53 | <whatsupdoc> | you're looking at 20 units at a top 10 public university, all A+s, 4 upper div CS classes |
| 20:33:00 | <monochrom> | For example people here raved about adjunctions, and I resisted for like 10 years. I finally learned it, but only when it had utility for me. |
| 20:33:01 | <whatsupdoc> | lol |
| 20:33:09 | <Inst> | monochrom: the joke was regarding Lai Changxing |
| 20:33:11 | <monochrom> | And to date I still resist learning lenses. |
| 20:33:18 | × | Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 256 seconds) |
| 20:33:26 | <whatsupdoc> | i'm sure I can learn it |
| 20:33:33 | <whatsupdoc> | But usually I learn faster when I enjoy learning it |
| 20:33:33 | <Inst> | in 3 days? |
| 20:33:45 | <geekosaur> | [itchyjunk], "|" in general can be read as "such that". in some contexts that means a guard is coming (foo x | x < 5 = ...). in some cases that means something like "where", as in list comprehensions |
| 20:33:52 | <whatsupdoc> | I'm sure I could get the hang of some things after 3 days |
| 20:34:14 | <whatsupdoc> | And start writing meaningful-ish programs at that point |
| 20:34:16 | <[itchyjunk]> | geekosaur, ah the | can be though of as guard then? i see |
| 20:34:16 | <Inst> | okay, so i guess you want money to learn tolerably bad Haskell within 3 days |
| 20:34:23 | <monochrom> | [itchyjunk]: "even x" is the guard. |
| 20:34:23 | <geekosaur> | in some situsations |
| 20:34:41 | <[itchyjunk]> | oh :x |
| 20:34:51 | <[itchyjunk]> | i think i understand |
| 20:34:52 | <Inst> | hmmm |
| 20:34:52 | <whatsupdoc> | Never heard of template metaprogramming polyphem |
| 20:34:56 | <monochrom> | true for some x's and false for some others. |
| 20:35:00 | <geekosaur> | "such that" is the general nmeaning. if you're defining something, "such that" means a guard is coming. in a list comprehension, the list is coming |
| 20:35:19 | <Inst> | look, if you can deliver me a composition dependent strategy calculator in haskell |
| 20:35:19 | <geekosaur> | there are some other uses of "|", but iirc they all fit "such that" |
| 20:35:20 | <polyphem> | whatsupdoc: c++ templates |
| 20:35:24 | <Inst> | in 5 days |
| 20:35:29 | <Inst> | how much would you want for it? |
| 20:35:38 | <whatsupdoc> | polyphem: who hasn't written templates in C++ lol |
| 20:36:03 | <whatsupdoc> | they give power to the language |
| 20:36:08 | <Inst> | that is to say, a program that takes an input of some rules settings and outputs a chart telling you which action in blackjack delivers the most EV |
| 20:36:14 | <polyphem> | whatsupdoc: are they an more advanced and complex c++ feature ? |
| 20:36:26 | <whatsupdoc> | i would probably say so |
| 20:36:29 | <monochrom> | I disagree that "such that" has semantics at all. It is there to just fulfill an English grammar rule. And English is by no means a hallmark of good expression. |
| 20:36:45 | <[itchyjunk]> | hmm |
| 20:36:49 | <Inst> | whatsupdoc? is money sufficient motivation? |
| 20:36:53 | × | kuribas quits (~user@ptr-25vy0ia1hzdpftx2lxu.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 20:36:56 | <whatsupdoc> | what is up with you lol |
| 20:37:05 | <Inst> | sorry |
| 20:37:11 | <monochrom> | At best it plays the role of a separator. So, purely syntactical. |
| 20:37:12 | <whatsupdoc> | i'm about to get my wisdom teeth removed in 3 hours lol |
| 20:37:17 | <Inst> | i sort of need one |
| 20:37:20 | <Inst> | take it easy :) |
| 20:37:29 | <whatsupdoc> | So the challenge can't start now :) |
| 20:37:52 | <Inst> | and i thought about coding it myself, but then I tried doing a list enumeration of [1..20000000] |
| 20:37:58 | <Inst> | 2 hours to get to 4% |
| 20:38:02 | <Inst> | then again, it was on GHCi |
| 20:38:04 | <whatsupdoc> | I wouldn't be able to test out a 5 day challenge, especially working 40 hours a week |
| 20:38:04 | <EvanR> | hey man, schwarzchild solved einsteins equations while fighting world war I, maybe you could use haskell to take your mind off lol |
| 20:38:52 | <whatsupdoc> | Learning haskell at work lol |
| 20:38:54 | <polyphem> | whatsupdoc: what struck me about haskell, is that whats top end of c++ (templates) , is so easily expressed using haskell , and its more like hello world |
| 20:38:56 | <Inst> | honestly, i think you're the stereotypical "ass" haskeller and you don't even know Haskell |
| 20:38:57 | <monochrom> | Fighting WWI is different from today's 40-hour-week job. |
| 20:39:07 | <Inst> | you'd fit right in |
| 20:39:21 | <EvanR> | refering the wisdom teeth thing |
| 20:39:25 | <whatsupdoc> | gatekeeper |
| 20:39:39 | <whatsupdoc> | you get to chill in a trench during a world war |
| 20:39:39 | <monochrom> | WWI was physically draining but not mentally draining. In fact doing mental work was how to rest. |
| 20:39:47 | <Inst> | from what i've heard |
| 20:39:54 | <Inst> | when American troops got into the trenches |
| 20:40:01 | <whatsupdoc> | put me in a trench and i'd get so bored, i'd reinvent haskell |
| 20:40:02 | <Inst> | all the soldiers on the allied side who seemed lucid from their letters |
| 20:40:11 | <Inst> | seemed like half-dead zombies |
| 20:40:12 | <monochrom> | Today's jobs are mentally draining but not physically draining. In fact turning off your brain and going to gym is how to rest. |
| 20:40:14 | <Inst> | due to the sheer fatigue |
| 20:40:37 | × | Guest42 quits (~Guest42@563BEF60.catv.pool.telekom.hu) (Quit: Client closed) |
| 20:40:58 | <whatsupdoc> | EvanR: lol woosh |
| 20:41:49 | × | Everything quits (~Everythin@37.115.210.35) (Quit: leaving) |
| 20:41:53 | <monochrom> | But perhaps you can join the army. |
| 20:42:05 | <monochrom> | "Join the Army! Learn Haskell!" |
| 20:42:46 | <Inst> | if I ever get my dream of talking Xi Jinping into forcing his country's software industry to use Haskell by default implemented, that might actually come true |
| 20:43:17 | <Inst> | you'll have to learn Haskell in order to discover software vulnerabilities in opposing force electronics |
| 20:43:42 | <Inst> | tbh |
| 20:43:51 | <Inst> | if the Soviet Union still existed, do you think the Soviets would have mandated FP? |
| 20:43:51 | <whatsupdoc> | you probably big on cardano lol |
| 20:44:22 | <whatsupdoc> | FP? |
| 20:44:23 | <EvanR> | and then Americans learn haskell to find vulnerabilities in all china's software because it's written in haskell |
| 20:44:32 | <Inst> | EvanR: win win, no? |
| 20:44:41 | <geekosaur> | depends on whoever talked them into believing that <x> programming strategy is "bourgeois" |
| 20:44:44 | <Inst> | mass Haskell adoption for everyone |
| 20:45:05 | <Inst> | strangely enough, the best Haskell textbooks I've seen were written by Russians |
| 20:45:15 | <geekosaur> | remember that neither politics nor law is particularly rational |
| 20:45:20 | → | Tuplanolla joins (~Tuplanoll@91-159-68-166.elisa-laajakaista.fi) |
| 20:45:31 | <Inst> | Soviets and Chinese have strong baseline math education |
| 20:45:32 | <monochrom> | C++ is too advanced. Haskell is so much easier. |
| 20:45:56 | <Inst> | reason Soviets would have stuck with IP / procedural norms, though, was that they were behind on semi-conductors |
| 20:46:34 | <Inst> | the Chinese are around 10 years behind, with 8nm being cutting edge (with imported equipment) and they're just implementing 14nm, whereas the Taiwanese are going to ship 5nm this year |
| 20:47:00 | <Inst> | so to get the most raw performance out of their semiconductors, they would likely have stuck with imperative programming |
| 20:47:11 | <EvanR> | my other computer is forall x > 0 nm |
| 20:48:07 | → | ouestbillie joins (~gallup@192-222-138-215.qc.cable.ebox.net) |
| 20:48:58 | <[itchyjunk]> | Where do you hide your favorate list comprehension exercises? |
| 20:49:06 | <[itchyjunk]> | having a hard time finding them with google |
| 20:49:14 | <[itchyjunk]> | or maybe "list comprehension" isnt' the right term? |
| 20:49:15 | <[exa]> | [itchyjunk]: protip: try Prolog |
| 20:49:16 | <Inst> | i'll query you some "stuff" |
| 20:49:25 | <Inst> | are you working Lyah? |
| 20:49:27 | <[itchyjunk]> | isn't that a different language? :x |
| 20:50:18 | <[exa]> | list monad and prolog behave similarly (also check out LogicT), so porting some prologish exercises to lists&comprehensions is usually a cool way to find new exercises |
| 20:51:15 | <[itchyjunk]> | Hm, might have to do that. would have been ideal if i found some exercises made for novice haskeller |
| 20:51:17 | <Inst> | nice |
| 20:51:22 | <Inst> | check query |
| 20:51:51 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Read error: Connection reset by peer) |
| 20:52:08 | <[exa]> | try doing the "kalotan puzzle" with list comprehensions, not interpreting any of the logic yourself. See http://gauss.ececs.uc.edu/Courses/c694/lectures/Review/Exceptions/review.9.html or here with better hints https://ds26gte.github.io/tyscheme/index-Z-H-16.html#TAG:__tex2page_sec_14.4.1 |
| 20:52:14 | <monochrom> | You may not need many list comprehension exercises. |
| 20:52:22 | → | michalz joins (~michalz@185.246.204.126) |
| 20:52:26 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 20:52:26 | <[exa]> | [itchyjunk]: ^^ |
| 20:52:27 | <[itchyjunk]> | :O |
| 20:52:27 | <hololeap> | [a] -> LogicT m a -- I've been using (asum . fmap pure) for this, but I'm wondering if there's something more idiomatic |
| 20:52:33 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4) |
| 20:52:35 | <polyphem> | [itchyjunk]: i did project euler when i started to learn haskell and i used list comprehension quite a lot when doing the puzzles so maybe thats somthing for you |
| 20:52:46 | <[exa]> | +1 polyphem |
| 20:55:02 | <polyphem> | [itchyjunk]: https://projecteuler.net/ |
| 20:55:36 | <monochrom> | Ugh no, unless you won't ask "how to make it fast". |
| 20:56:11 | <monochrom> | If you fully expect to use list comprehension for brute-forcing and fully expect it's blind brute-forcing then sure. |
| 20:59:49 | <[itchyjunk]> | Can I OR on guards? |
| 20:59:50 | <EvanR> | It's very good at brute forcing |
| 20:59:57 | <polyphem> | monochrom: what do you mean , projecteuler ? |
| 21:00:01 | <[itchyjunk]> | [x | x <- list, blah or blah2 |
| 21:00:11 | <tomsmeding> | :t (||) |
| 21:00:12 | <lambdabot> | Bool -> Bool -> Bool |
| 21:00:15 | <EvanR> | specifically you won't miss elements of the lists |
| 21:00:18 | <monochrom> | Yes Project Euler. |
| 21:00:42 | <monochrom> | > [ x | x <- [1,2,3], even x || odd x] |
| 21:00:44 | <lambdabot> | [1,2,3] |
| 21:01:17 | × | schweers quits (~user@2001:16b8:e94a:ef00:aaa1:59ff:fe3f:235c) (Quit: ERC 5.4 (IRC client for GNU Emacs 28.0.91)) |
| 21:02:30 | <[itchyjunk]> | https://bpa.st/YBQQ |
| 21:02:32 | <[itchyjunk]> | ta da |
| 21:03:31 | <polyphem> | foldr (+) 0 = sum |
| 21:04:10 | <polyphem> | > sum [1..10] |
| 21:04:11 | <lambdabot> | 55 |
| 21:04:15 | <EvanR> | shouldn't sum really be a (strict) foldl |
| 21:04:20 | <[itchyjunk]> | oh |
| 21:04:21 | → | jkaye joins (~jkaye@2601:281:8300:7530:a9ff:dc19:c096:5ef5) |
| 21:04:55 | <tomsmeding> | EvanR: it is since ghc 9.2 |
| 21:05:02 | <monochrom> | It doesn't matter for 10 numbers. |
| 21:05:03 | <tomsmeding> | before that it was foldl, of all things |
| 21:05:13 | <bjs> | I think EvanR is saying for [itchyjunk]'s benefit |
| 21:05:16 | <EvanR> | oh it is? cool |
| 21:05:42 | <tomsmeding> | EvanR: https://hackage.haskell.org/package/base-4.15.1.0/docs/src/GHC.List.html#sum vs https://hackage.haskell.org/package/base-4.16.0.0/docs/src/GHC.List.html#sum |
| 21:06:00 | <bjs> | [itchyjunk]: you should keep doing fold exercises so you get a feel for when foldr and foldl make sense, it's tricky |
| 21:06:25 | <[itchyjunk]> | yeah foldl foldr has been the worst of them so far! |
| 21:06:26 | → | notzmv joins (~zmv@user/notzmv) |
| 21:06:36 | <EvanR> | FOLD LIFE |
| 21:06:39 | <bjs> | tomsmeding: why was it foldl not foldl' before? I can't see a benefit |
| 21:07:09 | <geekosaur> | becuase that's what the haskell report's prelude said it should be |
| 21:07:19 | <tomsmeding> | https://www.haskell.org/onlinereport/haskell2010/haskellch9.html#x16-1720009.1 |
| 21:07:30 | <EvanR> | yeah so no benefit |
| 21:07:35 | <tomsmeding> | indeed |
| 21:10:16 | → | jgeerds_ joins (~jgeerds@55d4bbed.access.ecotel.net) |
| 21:10:25 | <bjs> | [itchyjunk]: it might be instructive to try write your own foldl function using foldr (and vice-versa) and considering how they behave on infinite lists |
| 21:12:23 | × | Topsi quits (~Tobias@dyndsl-095-033-027-133.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 21:12:24 | <[itchyjunk]> | wth! |
| 21:12:39 | <[itchyjunk]> | write foldl using foldr? heh. alright, maybe i'll try that |
| 21:12:43 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 21:12:48 | <[itchyjunk]> | i did write filter using foldl and foldr i think |
| 21:13:47 | <polyphem> | [itchyjunk]: or you watch a video : https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwiB__zhzqr1AhUeR_EDHbmQBjkQwqsBegQIBxAB&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dt9pxo7L8mS0&usg=AOvVaw3U8z2I4AayiuQTHadI2Ms1 |
| 21:14:08 | → | breakwindows joins (~brkwnds@86.107.75.45) |
| 21:14:10 | <polyphem> | [itchyjunk]: sorry , https://www.youtube.com/watch?v=t9pxo7L8mS0 |
| 21:15:39 | × | `2jt quits (~jtomas@10.red-83-58-228.dynamicip.rima-tde.net) (Ping timeout: 256 seconds) |
| 21:17:17 | × | CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 21:17:18 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 21:17:18 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 21:17:18 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:18:59 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 21:19:37 | × | biog quits (~user1@static.39.160.132.142.clients.your-server.de) (Quit: ZZZzzz…) |
| 21:19:56 | <Inst> | does anyone know / do fantasyland here? |
| 21:19:59 | <Inst> | I'm reading a bit up about it |
| 21:20:20 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 21:22:02 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 21:22:09 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 21:23:29 | <Inst> | ultimate love letter to haskell, tbh |
| 21:23:35 | <Inst> | well, it'd be ultimate if you had haskell syntax |
| 21:23:56 | <EvanR> | "fantasyland" is haskell related? |
| 21:24:43 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 256 seconds) |
| 21:26:09 | <Inst> | Fantasyland is a specification for Javascript libraries inspired by Haskell |
| 21:26:48 | <Inst> | it came after some people on Javascript committees told the devs "you must live in Fantasyland" after they suggested porting FP structures to the Javascript language |
| 21:26:52 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 21:28:08 | <geekosaur> | *snort* |
| 21:28:08 | <Inst> | they've implemented semigroups, monoids, the works |
| 21:30:04 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 21:31:11 | → | SummerSonw joins (~The_viole@203.77.49.232) |
| 21:32:00 | → | lavaman joins (~lavaman@98.38.249.169) |
| 21:32:27 | <[itchyjunk]> | Say i wanted to define a list l such that the first two element is 1 and 2 and the third element is the sum of those. so `let l = 1:2:"sum of those things"` `let l = 1:2:foldr (+) 0 l` ish? |
| 21:32:28 | × | pottsy quits (~pottsy@129.227.183.244) (Ping timeout: 250 seconds) |
| 21:33:05 | <[itchyjunk]> | but i can see this is creating recursions that would mess it up |
| 21:33:28 | <geekosaur> | you might be interestd in zipWith |
| 21:33:33 | <[itchyjunk]> | hmmm |
| 21:33:50 | <geekosaur> | see the classic definition of fibs |
| 21:33:55 | → | biog joins (~user1@static.39.160.132.142.clients.your-server.de) |
| 21:34:37 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:4f29:e68c:50c9:fe2) (Ping timeout: 240 seconds) |
| 21:35:00 | <geekosaur> | > let l = 1:2:zipWith (+) l (tail l) in l |
| 21:35:02 | <lambdabot> | [1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,1771... |
| 21:35:45 | <whatsupdoc> | is haskell the future? |
| 21:35:48 | <geekosaur> | hm, or did you want to go from the beginning for each one? |
| 21:36:17 | <[itchyjunk]> | i am not sure what i wanted anymore! :P but i guess i'll learn up on zipWith a bit more |
| 21:36:17 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 21:36:18 | <geekosaur> | whatsupdoc, haskell is already having an impact on many other languages. not sure haskell itself is the future but its ideas certainly seem to be |
| 21:36:20 | <[itchyjunk]> | might be a useful thing |
| 21:36:21 | <EvanR> | whatsupdoc, I'm sure someone's been asking this since 1990 |
| 21:36:43 | <polyphem> | whatsupdoc: wrong question , do YOU want it to be the future ? |
| 21:36:49 | <whatsupdoc> | no |
| 21:37:11 | <Inst> | it's sort of insulting, tbh, given that "Fusion is the energy technology of the future and has been since the 1950s." |
| 21:37:11 | <EvanR> | haskell is the present |
| 21:37:42 | <EvanR> | acme-now |
| 21:37:44 | <polyphem> | haskell has the tardis , its past and future |
| 21:37:48 | <Inst> | like I said, apparently Javascript coders got so jealous they reimplemented a good portion of the Haskell language in JS |
| 21:38:09 | <EvanR> | javascriptZ ? |
| 21:38:13 | <[itchyjunk]> | I want causality to stop existing. So we already had this conversation tomorrow. |
| 21:38:16 | <Inst> | is javascriptZ a thing? |
| 21:38:30 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 21:38:31 | <geekosaur> | there's alsourescript and typescript |
| 21:38:45 | <geekosaur> | *also purescript |
| 21:38:47 | <Inst> | fantasyland libs, i mean |
| 21:39:13 | <whatsupdoc> | typescript is functionally equivalent to haskell? |
| 21:39:24 | <[itchyjunk]> | So i want to reimplement foldr using foldl. is my signature correct? (a -> b -> b) -> b -> [a] -> [b] |
| 21:39:36 | <[itchyjunk]> | or do i need the constraint of Foldable t here? |
| 21:39:39 | <EvanR> | you mean implement foldl with foldr |
| 21:39:43 | → | ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) |
| 21:39:51 | <[itchyjunk]> | i thought maybe using [a] lets me skip it |
| 21:40:02 | <geekosaur> | typescript takes the idea of haskell-ish types and adds them to javascript |
| 21:40:04 | <Inst> | did someone teach you accumulators yet? |
| 21:40:04 | <[itchyjunk]> | i thought i was trying to implement foldr using foldl |
| 21:40:18 | <geekosaur> | purescript is a closer approximation of haskell |
| 21:40:30 | <[itchyjunk]> | hmm i think i might have used accumulator to count the length of a string |
| 21:40:42 | <EvanR> | foldl fails any task for infinite list |
| 21:40:49 | × | ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Client Quit) |
| 21:40:50 | <[itchyjunk]> | :o |
| 21:41:05 | <Inst> | foldl uses an accumulator as a central value, then kills itself and displays the accumulator on death |
| 21:41:07 | <[itchyjunk]> | so you can represent foldl with foldr but not vice versa? /o\ |
| 21:41:20 | <polyphem> | [itchyjunk]: i really urge you to watch the video :) |
| 21:41:26 | → | talismanick joins (~talismani@c-67-164-73-220.hsd1.ca.comcast.net) |
| 21:41:34 | <[itchyjunk]> | ive watched first 10 mins |
| 21:41:51 | <Inst> | yeah, because the function has to finish processing the data before the accumulator can process |
| 21:42:07 | × | zer0bitz quits (~zer0bitz@2001:2003:f444:a000:2d06:fff0:d105:7c1) (Ping timeout: 268 seconds) |
| 21:42:12 | × | danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Quit: WeeChat 3.3) |
| 21:42:13 | <polyphem> | hmm |
| 21:42:33 | → | danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 21:42:35 | <EvanR> | the real answer lies in the code for foldl |
| 21:42:41 | <Inst> | accumulators: basically a sneaky way to get something like mutable variables, except with no side effects |
| 21:42:42 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 21:43:07 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 21:43:25 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 21:44:03 | × | biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer) |
| 21:44:09 | <Inst> | i wonder what proportion of JS coders use fantasyland libs |
| 21:44:13 | × | danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Client Quit) |
| 21:44:26 | <Inst> | might possibly be more fantasyland users than Haskellers proper |
| 21:45:34 | → | danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 21:45:38 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 21:47:53 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:48:35 | × | danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Client Quit) |
| 21:50:19 | → | danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 21:52:33 | → | euandreh joins (~euandreh@2804:14c:33:9fe5:4895:4e42:bd43:c273) |
| 21:54:43 | <EvanR> | Inst, a sneaky way to get something like mutable variables except no side effects is ST |
| 21:54:44 | × | xff0x quits (~xff0x@2001:1a81:534d:9900:c522:bda4:b63a:6841) (Ping timeout: 252 seconds) |
| 21:55:24 | → | xff0x joins (~xff0x@2001:1a81:534d:9900:8245:a333:af79:9a1f) |
| 21:56:08 | → | biberu joins (~biberu@user/biberu) |
| 21:58:41 | × | simpleauthority quits (~simpleaut@user/simpleauthority) (Quit: ZNC 1.8.2 - https://znc.in) |
| 21:58:49 | → | pdroman joins (~pdroman@27.red-88-5-21.dynamicip.rima-tde.net) |
| 21:59:15 | → | x28girl joins (~x28girl@user/x28girl) |
| 22:00:34 | → | simpleauthority joins (~simpleaut@user/simpleauthority) |
| 22:00:44 | × | pdroman quits (~pdroman@27.red-88-5-21.dynamicip.rima-tde.net) (Client Quit) |
| 22:01:26 | → | x28_girl joins (~x28girl@user/x28girl) |
| 22:02:00 | → | myrrh joins (~markus@user/poet) |
| 22:02:00 | × | danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Quit: WeeChat 3.3) |
| 22:03:20 | → | x28__girl joins (~x28girl@user/x28girl) |
| 22:05:06 | × | x28girl quits (~x28girl@user/x28girl) (Ping timeout: 256 seconds) |
| 22:08:50 | → | Guest87 joins (~Guest87@151.82.3.46) |
| 22:08:51 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 22:08:51 | × | Guest87 quits (~Guest87@151.82.3.46) (Client Quit) |
| 22:09:01 | → | acidjnk joins (~acidjnk@p200300d0c7271e52381c42d4d3ad2973.dip0.t-ipconnect.de) |
| 22:09:01 | → | acidjnk_new joins (~acidjnk@p200300d0c7271e52381c42d4d3ad2973.dip0.t-ipconnect.de) |
| 22:09:25 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 22:10:12 | × | breakwindows quits (~brkwnds@86.107.75.45) (Ping timeout: 256 seconds) |
| 22:11:17 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) (Ping timeout: 240 seconds) |
| 22:14:09 | → | Guest87 joins (~Guest87@151.82.3.46) |
| 22:17:30 | × | x28__girl quits (~x28girl@user/x28girl) (Remote host closed the connection) |
| 22:17:34 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 22:17:57 | → | x28__girl joins (~x28girl@user/x28girl) |
| 22:18:24 | → | Guest8762 joins (~Guest87@151.82.3.46) |
| 22:18:58 | × | x28__girl quits (~x28girl@user/x28girl) (Max SendQ exceeded) |
| 22:19:27 | → | x28__girl joins (~x28girl@user/x28girl) |
| 22:20:01 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:20:43 | × | Guest8762 quits (~Guest87@151.82.3.46) (Client Quit) |
| 22:20:45 | × | x28__girl quits (~x28girl@user/x28girl) (Max SendQ exceeded) |
| 22:21:55 | → | x28__girl joins (~x28girl@user/x28girl) |
| 22:23:35 | × | Guest87 quits (~Guest87@151.82.3.46) (Quit: Client closed) |
| 22:24:42 | → | danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 22:25:25 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Read error: Connection reset by peer) |
| 22:25:55 | <Inst> | https://groups.seas.harvard.edu/courses/cs152/2019sp/lectures/lec18-monads.pdf |
| 22:31:20 | × | biog quits (~user1@static.39.160.132.142.clients.your-server.de) (Quit: ZZZzzz…) |
| 22:32:16 | → | lavaman joins (~lavaman@98.38.249.169) |
| 22:32:59 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 22:36:37 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 22:39:25 | × | SummerSonw quits (~The_viole@203.77.49.232) (Ping timeout: 240 seconds) |
| 22:42:51 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 22:43:41 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:44:06 | → | biog joins (~user1@static.39.160.132.142.clients.your-server.de) |
| 22:45:12 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 22:46:25 | × | michalz quits (~michalz@185.246.204.126) (Remote host closed the connection) |
| 22:48:47 | <[itchyjunk]> | How do people end up defining groups in programming language? |
| 22:48:55 | <[itchyjunk]> | as a data structure? list comprehension? |
| 22:49:07 | × | danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Quit: WeeChat 3.3) |
| 22:49:32 | <geekosaur> | depends on what you mean by group, and on how you're going to use it |
| 22:50:11 | <geekosaur> | singly-linked lists are often a poor data structure; usually it's better to think of them as loops instead of as data structures |
| 22:50:45 | → | danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 22:50:54 | <hpc> | obligatory "as a monoid with an inverse operation" :D |
| 22:51:06 | <jackdk> | https://hackage.haskell.org/package/groups |
| 22:52:12 | <Logio> | [itchyjunk]: groups as in groups of stuff (i.e. sets), or the algebraic structure? |
| 22:52:24 | <[itchyjunk]> | algebraid structure :s |
| 22:53:16 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 22:54:02 | → | qhong_ joins (~qhong@rescomp-21-400677.stanford.edu) |
| 22:54:23 | <[itchyjunk]> | I guess monoid is a datastructure and group just extends it :D |
| 22:55:03 | <qhong_> | Anyone has experience successfully get exference or MagicHaskeller running? They seem bitrot and I can't get them pass build at all |
| 22:55:24 | <geekosaur> | a monoid iusn't so much a data structure as an attribute of some (many) data structures |
| 22:55:30 | <geekosaur> | same with groups |
| 22:55:48 | <Logio> | unless you consider a tuple of a type and a function a data structure |
| 22:55:52 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 22:56:06 | <hpc> | i suppose there are other ways to define it, but via monoid seems the most natural |
| 22:56:40 | <hpc> | maybe each axis of the "group cube" could be its own class, and you build group alacarte? https://upload.wikimedia.org/wikipedia/commons/3/3f/Magma_to_group4.svg |
| 22:56:40 | × | danso quits (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) (Quit: WeeChat 3.3) |
| 22:57:20 | → | danso joins (~danso@2001:1970:52e7:d000:96b8:6dff:feb3:c009) |
| 22:58:27 | → | alx741 joins (~alx741@157.100.93.160) |
| 22:59:22 | <geekosaur> | qhong_, poking at exference it looks like the usual problem with <> having been adopted by the Prelude with a different meaning |
| 23:03:28 | × | yauhsien quits (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 23:05:08 | → | yauhsien joins (~yauhsien@61-231-29-214.dynamic-ip.hinet.net) |
| 23:06:55 | → | alx741_ joins (~alx741@157.100.93.160) |
| 23:07:04 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 23:07:14 | × | alx741_ quits (~alx741@157.100.93.160) (Client Quit) |
| 23:10:24 | <geekosaur> | seem to have it building locally with --allow-newer and the usual import Prelude mods |
| 23:10:28 | × | xb0o2 quits (~xb0o2@user/xb0o2) (Quit: Client closed) |
| 23:13:55 | <janus> | how dangerous is it to use a nightly stackage snapshot? it doesn't seem very dangerous to me since the software has already been released to hackage |
| 23:15:18 | <janus> | the only way it could break is if value-level assumptions are suddenly broken, but how often does that happen in haskell? i feel like it doesn't happen very often |
| 23:15:34 | <janus> | if the incompatibility breaks the build, surely it doesn't even stay in the nightly snapshot |
| 23:20:09 | → | pottsy joins (~pottsy@129.227.183.244) |
| 23:21:07 | <janus> | i have this perception that lts-14.27 is more trustworthy than stackage nightly, but i never really hit a nightly issue that would confirm that hypothesis. i am curious to hear how others weigh old-vs-new and stable-vs-unstable |
| 23:21:15 | <geekosaur> | the main danger is that something you rely on isn't there any more, or your own software isn't compatible with the compiler it's based on (as with the simplified subsumption changes in 9.0.x) |
| 23:22:11 | <janus> | oh but that isn't an issue because we have parallel builds with lts-14.27 and stackage nightly. we already fixed all the subsumption kinks |
| 23:22:54 | <jackdk> | if stack didn't generate `base >= 4.x && <5` in `package.yaml` or whatever, it wouldn't try to build with breaking changes like that |
| 23:23:46 | <janus> | i am just worried that if we switch production to run with the nightly build instead of lts-14.27, we'll hit some weird runtime issue. i actually worry more about library bugs than compiler bugs |
| 23:24:33 | <janus> | jackdk: sure, lots of libraries had to be fixed before they could go into stackage nightly again. i even had to ask trustees to fix some. but that is all done now |
| 23:24:34 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 23:25:10 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 23:25:36 | → | dut joins (~dut@user/dut) |
| 23:26:26 | <jackdk> | those libraries should have been constraint-solving failures, not build-time failures. |
| 23:26:31 | <geekosaur> | welp. qhong_, got everything and then tripped over a kind change in Language.Haskell.Exts that I have no clue about. I think that means exference is toast. :( |
| 23:26:38 | → | colton joins (~colton@2601:681:4c00:96e0:4151:f3f:5fca:73bb) |
| 23:27:02 | <geekosaur> | hm, hexagonel is here. wonder if that means it's been disowned |
| 23:27:15 | <geekosaur> | but exferenceBot isn't |
| 23:27:20 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 23:28:41 | ← | colton parts (~colton@2601:681:4c00:96e0:4151:f3f:5fca:73bb) () |
| 23:29:24 | × | aeka quits (~aeka@user/hiruji) (Read error: Connection reset by peer) |
| 23:29:25 | × | emf quits (~emf@2620:10d:c090:400::5:b9c2) (Ping timeout: 268 seconds) |
| 23:30:01 | → | alx741 joins (~alx741@157.100.93.160) |
| 23:30:59 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 23:31:14 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 23:34:54 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 23:36:49 | → | emf joins (~emf@2620:10d:c091:480::1:79e9) |
| 23:39:46 | → | Henson joins (~kvirc@107-179-133-201.cpe.teksavvy.com) |
| 23:40:10 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 23:40:18 | → | alx741 joins (~alx741@157.100.93.160) |
| 23:42:21 | → | emf_ joins (~emf@2620:10d:c090:400::5:b9c2) |
| 23:43:27 | × | nvmd quits (~nvmd@user/nvmd) (Quit: Later, nerds.) |
| 23:43:36 | × | emf quits (~emf@2620:10d:c091:480::1:79e9) (Ping timeout: 268 seconds) |
| 23:46:39 | <geekosaur> | qhong_, both of those paqckages depend on (wrapped) compiler internals which change somewhat frequently. I have no idea what the necessary changes are; you'd have to use an older compiler |
| 23:47:28 | <Henson> | I'm having difficulty getting code coverage report to work with "stack test --coverage". This used to work 2 years ago on an older version of stack, but now it doesn't and complains about the coverage report not seeing any code. Does anybody have any suggestions as to what I should look at? I've tried a bunch of things with no luck. |
| 23:48:16 | <Inst> | this is entertaining |
| 23:48:33 | <EvanR> | [itchyjunk], there are haskell libraries with a truckload of abstract algebra (re)defined, or you could just define class Monoid a => Group a where inv :: a -> a, if you want |
| 23:48:58 | <[itchyjunk]> | hmm |
| 23:49:01 | <EvanR> | that defines Group, though now you have to ask what could satisfy it |
| 23:49:44 | <monochrom> | Sum Int satisfies it, for example. |
| 23:49:47 | <EvanR> | maybe more importantly, what are some general algorithms that use it |
| 23:50:36 | <monochrom> | Algorithms that start from a few elements and find the generated subgroup :) |
| 23:50:43 | <geekosaur> | only if you ignore its minBound :þ |
| 23:50:58 | <monochrom> | Haha OK Integer |
| 23:51:00 | <EvanR> | by find the subgroup, do you mean... some kind of enumeration of all the elements? xD |
| 23:51:05 | → | aeka joins (~aeka@user/hiruji) |
| 23:51:13 | <monochrom> | That's one version. |
| 23:51:17 | <EvanR> | or do we need a subgroup class |
| 23:51:29 | <EvanR> | (multiparameter) |
| 23:51:38 | <EvanR> | and it starts to get hairy |
| 23:51:57 | <monochrom> | Nah don't define a subgroup class. |
| 23:53:19 | <EvanR> | ok now I want to write that algorithm |
| 23:53:19 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 23:53:37 | <EvanR> | and see what happens with floats lol |
| 23:53:40 | → | emf joins (~emf@2620:10d:c091:480::1:147e) |
| 23:54:37 | × | emf_ quits (~emf@2620:10d:c090:400::5:b9c2) (Ping timeout: 240 seconds) |
| 23:54:40 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480::41) |
| 23:54:49 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 23:57:28 | → | emf_ joins (~emf@c-73-97-137-43.hsd1.wa.comcast.net) |
| 23:57:33 | × | aeka quits (~aeka@user/hiruji) (Read error: Connection reset by peer) |
| 23:57:56 | <EvanR> | that's funny, Int w/ + breaks group laws? |
| 23:57:57 | × | emf quits (~emf@2620:10d:c091:480::1:147e) (Ping timeout: 240 seconds) |
| 23:58:23 | <EvanR> | > -minBound :: Int |
| 23:58:24 | <lambdabot> | -9223372036854775808 |
| 23:58:36 | <EvanR> | > -minBound + minBound :: Int |
| 23:58:37 | <lambdabot> | 0 |
| 23:58:39 | → | _xor joins (~xor@dsl-50-5-233-169.fuse.net) |
| 23:58:45 | → | alx741 joins (~alx741@157.100.93.160) |
| 23:58:45 | <EvanR> | :sus: |
| 23:59:12 | <monochrom> | Involutions are a thing. |
| 23:59:51 | <EvanR> | > -minBound + (minBound + minBound) :: Int |
| 23:59:52 | <lambdabot> | -9223372036854775808 |
All times are in UTC on 2022-01-11.