2023-07-24 00:00:35 +0200 | trillp | (~user@2001:19f0:6402:d51:a653:53fd:6a79:a55) (Ping timeout: 246 seconds) |
2023-07-24 00:07:29 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Ping timeout: 260 seconds) |
2023-07-24 00:08:01 +0200 | <dsal> | I'm trying to do a conduit thing and it's not quite working as expected. It seems to terminate my program early: |
2023-07-24 00:08:05 +0200 | <dsal> | https://www.irccloud.com/pastebin/xA52PEIF/atMost.hs |
2023-07-24 00:08:48 +0200 | <dsal> | The idea is that I want to prevent a list input to a further action from being too large. This seems to work, but then terminates. Is there something I don't understand about how this is supposed to work? |
2023-07-24 00:10:51 +0200 | <glguy> | You only awaited once, so you only get the first list to chunk and then you're done |
2023-07-24 00:11:09 +0200 | <dsal> | oh. Ha. Thanks. I figured it was something dumb like that. |
2023-07-24 00:11:43 +0200 | <glguy> | Probably need a recursive use of atMost in the Just case |
2023-07-24 00:12:38 +0200 | <dsal> | I'd stuck a `forever` in there and was wondering how it would terminate. That makes more sense. Actually, I've got monad-loops around here, I might do something like that. But at least I have something that behaves. |
2023-07-24 00:14:07 +0200 | <dsal> | `atMost n = whileJust_ await (traverse_ yield . chunksOf n)` does what I want. |
2023-07-24 00:18:43 +0200 | <dsal> | I guess I assumed conduit was responsible for calling my actions again. |
2023-07-24 00:22:23 +0200 | MacSlow | (~MacSlow@p57bb296a.dip0.t-ipconnect.de) (Quit: leaving) |
2023-07-24 00:25:01 +0200 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2023-07-24 00:27:46 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
2023-07-24 00:30:48 +0200 | mik3d | (~mik3d@74.102.139.139) (Read error: Connection reset by peer) |
2023-07-24 00:31:17 +0200 | mik3d | (~mik3d@74.102.139.139) |
2023-07-24 00:33:06 +0200 | wroathe | (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) |
2023-07-24 00:33:06 +0200 | wroathe | (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) (Changing host) |
2023-07-24 00:33:06 +0200 | wroathe | (~wroathe@user/wroathe) |
2023-07-24 00:33:53 +0200 | wroathe | (~wroathe@user/wroathe) (Client Quit) |
2023-07-24 00:34:03 +0200 | wroathe | (~wroathe@user/wroathe) |
2023-07-24 00:37:48 +0200 | Yumemi | (~Yumemi@chamoin.net) (Quit: .) |
2023-07-24 00:39:18 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2023-07-24 00:42:53 +0200 | jargon | (~jargon@174-22-223-141.phnx.qwest.net) |
2023-07-24 00:46:05 +0200 | michalz | (~michalz@185.246.207.197) (Ping timeout: 246 seconds) |
2023-07-24 00:56:44 +0200 | captnemo | (~captnemo@193.32.127.239) (Quit: WeeChat 3.8) |
2023-07-24 01:12:30 +0200 | merijn | (~merijn@088-129-128-083.dynamic.caiway.nl) |
2023-07-24 01:15:17 +0200 | <probie> | I wonder why recursion-schemes doesn't offer something like `hyloM :: (Monad m, Functor f) => (m (f (m b)) -> m b) -> (m a -> m (f (m a))) -> m a -> m b; hyloM f g = hylo (f . getCompose) (Compose . g)` to go along with `cataA` as "how to use" |
2023-07-24 01:17:31 +0200 | merijn | (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 245 seconds) |
2023-07-24 01:21:34 +0200 | YuutaW | (~YuutaW@mail.yuuta.moe) (Ping timeout: 260 seconds) |
2023-07-24 01:24:52 +0200 | acidjnk | (~acidjnk@p200300d6e7072f781cede2166f9d501c.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
2023-07-24 01:25:12 +0200 | gurkenglas | (~gurkengla@dynamic-046-114-094-083.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
2023-07-24 01:26:10 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) |
2023-07-24 01:30:19 +0200 | libertyprime | (~libertypr@203.96.203.44) (Ping timeout: 260 seconds) |
2023-07-24 01:31:25 +0200 | mauke_ | (~mauke@user/mauke) |
2023-07-24 01:33:14 +0200 | mauke | (~mauke@user/mauke) (Ping timeout: 260 seconds) |
2023-07-24 01:33:14 +0200 | mauke_ | mauke |
2023-07-24 01:37:53 +0200 | tonyday | (~user@122-199-56-230.ip4.superloop.au) (Ping timeout: 246 seconds) |
2023-07-24 01:37:54 +0200 | YuutaW | (~YuutaW@mail.yuuta.moe) |
2023-07-24 01:39:08 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) (Ping timeout: 246 seconds) |
2023-07-24 01:42:04 +0200 | Tuplanolla | (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.) |
2023-07-24 01:42:37 +0200 | yuuta | (~YuutaW@mail.yuuta.moe) |
2023-07-24 01:42:50 +0200 | YuutaW | (~YuutaW@mail.yuuta.moe) (Ping timeout: 260 seconds) |
2023-07-24 01:44:20 +0200 | andrewboltachev | (~andrey@178.141.125.70) (Quit: Leaving.) |
2023-07-24 01:47:05 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 244 seconds) |
2023-07-24 01:48:39 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) |
2023-07-24 01:52:44 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-07-24 01:57:27 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
2023-07-24 02:02:12 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2023-07-24 02:02:12 +0200 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2023-07-24 02:02:12 +0200 | wroathe | (~wroathe@user/wroathe) |
2023-07-24 02:12:07 +0200 | jargon | (~jargon@174-22-223-141.phnx.qwest.net) (Remote host closed the connection) |
2023-07-24 02:19:43 +0200 | tv3n | (~stiv3n@2601:647:8580:f2b0:13bb:a6b3:d300:f3cd) (Quit: WeeChat 3.8) |
2023-07-24 02:22:35 +0200 | mixfix41 | (~sdeny9ee@user/mixfix41) |
2023-07-24 02:24:21 +0200 | tonyday | (~user@122-199-56-230.ip4.superloop.au) |
2023-07-24 02:25:14 +0200 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
2023-07-24 02:28:46 +0200 | tonyday | (~user@122-199-56-230.ip4.superloop.au) (Ping timeout: 245 seconds) |
2023-07-24 02:32:44 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds) |
2023-07-24 02:34:29 +0200 | ddellacosta | (~ddellacos@146.70.185.177) (Ping timeout: 260 seconds) |
2023-07-24 02:34:54 +0200 | fweht | (uid404746@id-404746.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2023-07-24 02:35:06 +0200 | roboguy_ | (~roboguy_@cpe-69-76-235-109.kc.res.rr.com) |
2023-07-24 02:36:19 +0200 | ddellacosta | (~ddellacos@146.70.171.253) |
2023-07-24 02:54:32 +0200 | [Leary] | (~Leary]@user/Leary/x-0910699) (Remote host closed the connection) |
2023-07-24 02:54:46 +0200 | [Leary] | (~Leary]@user/Leary/x-0910699) |
2023-07-24 02:56:04 +0200 | libertyprime | (~libertypr@222-154-235-94.adsl.xtra.co.nz) |
2023-07-24 02:58:22 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 02:58:22 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 02:58:22 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 03:00:44 +0200 | libertyprime | (~libertypr@222-154-235-94.adsl.xtra.co.nz) (Ping timeout: 260 seconds) |
2023-07-24 03:00:53 +0200 | merijn | (~merijn@c-001-001-008.client.esciencecenter.eduvpn.nl) |
2023-07-24 03:02:56 +0200 | Kaladin | (~Kaladin@157-131-203-194.fiber.dynamic.sonic.net) |
2023-07-24 03:03:02 +0200 | ft | (~ft@p508db95a.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
2023-07-24 03:03:37 +0200 | Kaladin | (~Kaladin@157-131-203-194.fiber.dynamic.sonic.net) (Client Quit) |
2023-07-24 03:04:55 +0200 | ft | (~ft@p3e9bc042.dip0.t-ipconnect.de) |
2023-07-24 03:05:24 +0200 | merijn | (~merijn@c-001-001-008.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
2023-07-24 03:11:08 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2023-07-24 03:11:41 +0200 | razetime | (~quassel@117.193.4.19) |
2023-07-24 03:16:18 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-07-24 03:17:16 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2023-07-24 03:22:44 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2023-07-24 03:24:58 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
2023-07-24 03:35:35 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 244 seconds) |
2023-07-24 03:42:27 +0200 | razetime | (~quassel@117.193.4.19) (Ping timeout: 245 seconds) |
2023-07-24 03:43:03 +0200 | razetime | (~quassel@117.193.2.183) |
2023-07-24 03:45:39 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 260 seconds) |
2023-07-24 03:46:05 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 03:46:05 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 03:46:05 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 03:57:06 +0200 | ski | (~ski@remote11.chalmers.se) (Remote host closed the connection) |
2023-07-24 03:59:18 +0200 | libertyprime | (~libertypr@203.96.203.44) |
2023-07-24 04:00:14 +0200 | xff0x | (~xff0x@ai086045.d.east.v6connect.net) (Ping timeout: 260 seconds) |
2023-07-24 04:01:59 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds) |
2023-07-24 04:04:35 +0200 | Sciencentistguy5 | (~sciencent@hacksoc/ordinary-member) |
2023-07-24 04:06:39 +0200 | Sciencentistguy | (~sciencent@hacksoc/ordinary-member) (Ping timeout: 260 seconds) |
2023-07-24 04:06:39 +0200 | Sciencentistguy5 | Sciencentistguy |
2023-07-24 04:07:03 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2023-07-24 04:15:25 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-07-24 04:22:11 +0200 | td_ | (~td@i53870909.versanet.de) (Ping timeout: 264 seconds) |
2023-07-24 04:23:04 +0200 | phma | (~phma@2001:5b0:215a:83d8:36ed:3779:fa92:acd) (Read error: Connection reset by peer) |
2023-07-24 04:23:27 +0200 | td_ | (~td@i53870929.versanet.de) |
2023-07-24 04:24:07 +0200 | phma | (~phma@2001:5b0:215a:83d8:36ed:3779:fa92:acd) |
2023-07-24 04:26:12 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-07-24 04:26:25 +0200 | pavonia | (~user@user/siracusa) |
2023-07-24 04:29:59 +0200 | libertyprime | (~libertypr@203.96.203.44) (Ping timeout: 260 seconds) |
2023-07-24 04:32:04 +0200 | finn_elija | (~finn_elij@user/finn-elija/x-0085643) |
2023-07-24 04:32:04 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
2023-07-24 04:32:04 +0200 | finn_elija | FinnElija |
2023-07-24 04:39:37 +0200 | roboguy_ | (~roboguy_@cpe-69-76-235-109.kc.res.rr.com) (Quit: Leaving...) |
2023-07-24 04:44:32 +0200 | shriekingnoise | (~shrieking@186.137.175.87) (Remote host closed the connection) |
2023-07-24 04:45:08 +0200 | shriekingnoise | (~shrieking@186.137.175.87) |
2023-07-24 04:49:11 +0200 | emmanuelux | (~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer) |
2023-07-24 04:50:07 +0200 | emmanuelux | (~emmanuelu@user/emmanuelux) |
2023-07-24 04:54:33 +0200 | zed__ | (~xusr@bl14-174-227.dsl.telepac.pt) |
2023-07-24 04:54:59 +0200 | shriekingnoise | (~shrieking@186.137.175.87) (Quit: Quit) |
2023-07-24 04:55:04 +0200 | ddellacosta | (~ddellacos@146.70.171.253) (Ping timeout: 260 seconds) |
2023-07-24 04:55:14 +0200 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
2023-07-24 04:55:42 +0200 | zed__ | (~xusr@bl14-174-227.dsl.telepac.pt) (Client Quit) |
2023-07-24 04:56:51 +0200 | ddellacosta | (~ddellacos@143.244.47.84) |
2023-07-24 05:01:16 +0200 | dsrt^ | (~cd@24.125.210.85) (Ping timeout: 245 seconds) |
2023-07-24 05:06:06 +0200 | smalltalkman | (uid545680@id-545680.hampstead.irccloud.com) |
2023-07-24 05:18:46 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
2023-07-24 05:27:09 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds) |
2023-07-24 05:28:38 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 250 seconds) |
2023-07-24 05:28:42 +0200 | dobblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 05:28:42 +0200 | dobblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 05:28:42 +0200 | dobblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 05:29:12 +0200 | dobblego | dibblego |
2023-07-24 05:32:24 +0200 | ddellacosta | (~ddellacos@143.244.47.84) (Ping timeout: 260 seconds) |
2023-07-24 05:33:16 +0200 | aforemny | (~aforemny@2001:9e8:6cc8:6400:75e7:c177:eb56:80ac) |
2023-07-24 05:33:24 +0200 | aforemny_ | (~aforemny@i59F516EF.versanet.de) (Ping timeout: 250 seconds) |
2023-07-24 05:34:47 +0200 | emmanuelux | (~emmanuelu@user/emmanuelux) (Quit: au revoir) |
2023-07-24 05:43:35 +0200 | libertyprime | (~libertypr@203.96.203.44) |
2023-07-24 05:45:51 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 245 seconds) |
2023-07-24 05:49:30 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 05:49:30 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 05:49:30 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 05:55:57 +0200 | accord | (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2023-07-24 06:00:31 +0200 | actioninja63 | (~actioninj@user/actioninja) (Quit: see ya mane) |
2023-07-24 06:00:55 +0200 | actioninja63 | (~actioninj@user/actioninja) |
2023-07-24 06:10:31 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2023-07-24 06:28:09 +0200 | razetime | (~quassel@117.193.2.183) (Ping timeout: 244 seconds) |
2023-07-24 06:34:21 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 244 seconds) |
2023-07-24 06:34:57 +0200 | trev | (~trev@user/trev) |
2023-07-24 06:36:50 +0200 | merijn | (~merijn@088-129-128-083.dynamic.caiway.nl) |
2023-07-24 06:41:35 +0200 | merijn | (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
2023-07-24 06:42:41 +0200 | mud | (~mud@user/kadoban) |
2023-07-24 06:43:49 +0200 | the_guruji[m] | (~theguruji@2001:470:69fc:105::3:825f) |
2023-07-24 06:50:33 +0200 | marinelli | (~weechat@gateway/tor-sasl/marinelli) (Quit: marinelli) |
2023-07-24 06:51:37 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) (Ping timeout: 245 seconds) |
2023-07-24 06:54:49 +0200 | Square2 | (~Square@user/square) |
2023-07-24 07:10:56 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) |
2023-07-24 07:11:13 +0200 | razetime | (~quassel@117.193.2.183) |
2023-07-24 07:19:11 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) (Ping timeout: 245 seconds) |
2023-07-24 07:20:54 +0200 | razetime | (~quassel@117.193.2.183) (Ping timeout: 260 seconds) |
2023-07-24 07:24:50 +0200 | harveypwca | (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
2023-07-24 07:27:12 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 240 seconds) |
2023-07-24 07:34:23 +0200 | nick4 | (~nick@2600:8807:9084:7800:f1f0:6aed:eef0:d448) (Ping timeout: 246 seconds) |
2023-07-24 07:36:27 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) |
2023-07-24 07:39:19 +0200 | andydude | (~andrewr@151.200.15.152) |
2023-07-24 07:40:02 +0200 | fweht | (uid404746@id-404746.lymington.irccloud.com) |
2023-07-24 07:41:37 +0200 | bgs | (~bgs@212-85-160-171.dynamic.telemach.net) |
2023-07-24 07:41:52 +0200 | yangby | (~secret@115.220.174.193) (Ping timeout: 252 seconds) |
2023-07-24 07:43:48 +0200 | yangby | (~secret@115.220.174.193) |
2023-07-24 07:44:14 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) (Ping timeout: 260 seconds) |
2023-07-24 07:46:49 +0200 | dsrt^ | (~cd@24.125.210.85) |
2023-07-24 07:47:23 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection) |
2023-07-24 07:56:00 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) |
2023-07-24 08:02:05 +0200 | michalz | (~michalz@185.246.207.217) |
2023-07-24 08:02:23 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) (Ping timeout: 264 seconds) |
2023-07-24 08:04:01 +0200 | legacy | (~legacy@188-143-101-104.pool.digikabel.hu) (Quit: leaving) |
2023-07-24 08:10:36 +0200 | <mzg> | re |
2023-07-24 08:12:31 +0200 | mauke | (~mauke@user/mauke) (Ping timeout: 244 seconds) |
2023-07-24 08:16:35 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2023-07-24 08:19:00 +0200 | acidjnk | (~acidjnk@p200300d6e7072f584d4e4392af5360e4.dip0.t-ipconnect.de) |
2023-07-24 08:25:53 +0200 | [Leary] | (~Leary]@user/Leary/x-0910699) (Remote host closed the connection) |
2023-07-24 08:26:07 +0200 | [Leary] | (~Leary]@user/Leary/x-0910699) |
2023-07-24 08:30:44 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-07-24 08:37:30 +0200 | thelounge793 | (~thelounge@2a05:f480:1400:24b2:5400:4ff:fe76:a8f3) (Quit: The Lounge - https://thelounge.chat) |
2023-07-24 08:39:49 +0200 | harveypwca | (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
2023-07-24 08:39:55 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-07-24 08:43:21 +0200 | <jackdk> | `re :: AReview t b -> Getter b t` |
2023-07-24 08:44:04 +0200 | mncheck | (~mncheck@193.224.205.254) |
2023-07-24 08:46:06 +0200 | CiaoSen | (~Jura@2a05:5800:292:e100:664b:f0ff:fe37:9ef) |
2023-07-24 08:47:56 +0200 | <Axman6> | Thanks jackdkbot |
2023-07-24 08:48:32 +0200 | bgs | (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
2023-07-24 08:49:26 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) |
2023-07-24 08:50:02 +0200 | <Axman6> | I knew that concurrency in Haskell was lovely, having compared to pthreads and other C nonsense. It hasn't been until I've tried to work with concurrency and asynchronous code in python that I have truly come to realise just how good we have it |
2023-07-24 08:52:27 +0200 | <Axman6> | wasn't* |
2023-07-24 08:53:02 +0200 | <Axman6> | My kingdom for an mvar! (and a lack of function colouring) |
2023-07-24 08:54:16 +0200 | <jackdk> | :) |
2023-07-24 08:54:23 +0200 | <probie> | Life is also easier when data is immutable |
2023-07-24 08:54:53 +0200 | <jackdk> | Immutable data! What a wonderful phrase! Immutable da-ta; ain't no passing craze... |
2023-07-24 08:54:57 +0200 | <Axman6> | I'm not even up to needing to worry about mutability (though I am having to consider it so that I initialise tings in the right thread) |
2023-07-24 08:56:27 +0200 | <dminuoso> | Axman6: The annoying thing about Python here is that you're essentially forced into asyncio which is just a painful exposition of the underlying coroutines. |
2023-07-24 08:57:14 +0200 | <Axman6> | I would love to use asyncio, but I'm actually forced to use a far more restrictive coroutine based system (cocotb) |
2023-07-24 08:57:47 +0200 | kmein | (~weechat@user/kmein) (Quit: ciao kakao) |
2023-07-24 08:57:52 +0200 | <Axman6> | asyncio at least has run_until_complete(), many of my problems would be solved if I had an equivalent of that |
2023-07-24 08:58:48 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) (Ping timeout: 250 seconds) |
2023-07-24 08:59:32 +0200 | kmein | (~weechat@user/kmein) |
2023-07-24 09:05:48 +0200 | meinside | (uid24933@id-24933.helmsley.irccloud.com) |
2023-07-24 09:06:34 +0200 | mango | (~finn@rul16-h01-176-151-21-224.dsl.sta.abo.bbox.fr) |
2023-07-24 09:06:35 +0200 | yangby | (~secret@115.220.174.193) (Quit: Go out for a walk and buy a drink.) |
2023-07-24 09:07:02 +0200 | yangby | (~secret@115.220.174.193) |
2023-07-24 09:16:11 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-07-24 09:17:29 +0200 | <dsal> | I remember when I used to really liked twisted. |
2023-07-24 09:18:44 +0200 | <Axman6> | To be fair, I am mostly constrained by cocotb, but python as a language doesn't help by having such a crappy story for async/concurrent code |
2023-07-24 09:21:04 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2023-07-24 09:21:16 +0200 | <dsal> | Is there anything in the lens package to generate stuff to pull values through a sum type? e.g. I've got `data X a = X { _someVal :: Int, _otherVal :: a }` with default lenses. I want to build something to tag them like `data SomeX = IntX (X Int) | DoubleX (X Double)` – I've been hand-writing lenses for `someVal` in this case, but that seems like something I shouldn't have to write. |
2023-07-24 09:24:18 +0200 | andrewboltachev | (~andrey@178.141.125.70) |
2023-07-24 09:25:16 +0200 | dobblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 09:25:16 +0200 | dobblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 09:25:16 +0200 | dobblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 09:25:20 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 246 seconds) |
2023-07-24 09:25:20 +0200 | fendor | (~fendor@2a02:8388:1640:be00:1f28:32b1:54ac:a932) |
2023-07-24 09:26:00 +0200 | dobblego | dibblego |
2023-07-24 09:26:40 +0200 | <jackdk> | Why not push the sum into X and have `X (Either Int Double)`? |
2023-07-24 09:30:59 +0200 | chele | (~chele@user/chele) |
2023-07-24 09:32:26 +0200 | danse-nr3_ | (~francesco@151.57.84.62) |
2023-07-24 09:34:35 +0200 | <dminuoso> | dsal: No. Its something I've been somewhat frusted about myself. Stuff like this is common place in our large codebase: foo % bar `adjoin` quux % bar `adjoin` baz % bar |
2023-07-24 09:34:59 +0200 | <dminuoso> | Or similarly with unsafeSingular (foo % bar `failingT` quux % bar `failingT` baz % bar) |
2023-07-24 09:35:34 +0200 | gmg | (~user@user/gehmehgeh) |
2023-07-24 09:37:54 +0200 | <dminuoso> | (Restructuring ADTs is not really an option for us) |
2023-07-24 09:39:35 +0200 | <dsal> | jackdk: I’ve got a growing list of types. |
2023-07-24 09:40:03 +0200 | mik3d | (~mik3d@74.102.139.139) (Read error: Connection reset by peer) |
2023-07-24 09:40:09 +0200 | <dsal> | It’s easy to write the lens, but it’s quite mechanical. I could at least make myself some th for it. |
2023-07-24 09:41:33 +0200 | <dsal> | I mean, I guess it could go in there, but that seems like it should be unnecessary. |
2023-07-24 09:42:45 +0200 | <dsal> | Right now, I’ve got some code that temporarily uses an ‘a’ that doesn’t appear in the application. |
2023-07-24 09:43:23 +0200 | <dminuoso> | dsal: Mind my asking, whats wrong with `_IntX . _someVal`? |
2023-07-24 09:43:35 +0200 | mik3d | (~mik3d@74.102.139.139) |
2023-07-24 09:43:48 +0200 | danse-nr3__ | (~francesco@151.57.20.78) |
2023-07-24 09:43:48 +0200 | danse-nr3_ | (~francesco@151.57.84.62) (Read error: Connection reset by peer) |
2023-07-24 09:43:53 +0200 | <jackdk> | I think it's the large and growing list of alternatives in the sum, resulting in the sort of `adjoin` chains that you have in your code |
2023-07-24 09:44:12 +0200 | bliminse_ | (~bliminse@user/bliminse) (Quit: leaving) |
2023-07-24 09:44:59 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 260 seconds) |
2023-07-24 09:45:03 +0200 | <dsal> | dminuoso: it’s the same across the whole sum. |
2023-07-24 09:45:21 +0200 | <jackdk> | I would probably reach for generics, and write a GHasSomeVal class, and a `gsomeVal` lens which requires `GHasSomeVal (Rep a) => Lens' a SomeVal` |
2023-07-24 09:45:28 +0200 | <dminuoso> | Mmm. That's a strange invariant |
2023-07-24 09:45:50 +0200 | <dsal> | I’m modeling some data I received that has a bunch of common fields and then the one value type that varies. |
2023-07-24 09:46:39 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 09:46:39 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 09:46:39 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 09:46:43 +0200 | <dminuoso> | dsal: Any particular reason your ADT is shaped in the input format? |
2023-07-24 09:46:51 +0200 | <dsal> | Right now, I just write the lenses I’m using… |
2023-07-24 09:47:10 +0200 | <dsal> | dminuoso: I was just doing what was easy. There are likely lots of better ways. :) |
2023-07-24 09:47:42 +0200 | <dminuoso> | It really does feel like you should rehape the ADT and correctly parse it into the right format. |
2023-07-24 09:47:47 +0200 | <dsal> | Writing this lens just makes me think th should do it because it’s so mechanical. |
2023-07-24 09:47:54 +0200 | <dminuoso> | Otherwise you're encoding this invariant into your TH lens generation code. |
2023-07-24 09:49:15 +0200 | <dsal> | I should be asleep, but it’s not obvious to make it much better. I can see small improvements, but they’d just get rid of these two lenses. Worth considering. |
2023-07-24 09:49:52 +0200 | <dsal> | I’ve just had this come up a few times recently so I figured I was missing something. |
2023-07-24 09:50:32 +0200 | <dsal> | Thanks for pointers. Maybe I’ll be slightly smarter after I sleep |
2023-07-24 09:52:34 +0200 | mango | (~finn@rul16-h01-176-151-21-224.dsl.sta.abo.bbox.fr) (Ping timeout: 260 seconds) |
2023-07-24 09:53:18 +0200 | mik3d | (~mik3d@74.102.139.139) (Read error: Connection reset by peer) |
2023-07-24 09:56:31 +0200 | <jackdk> | dsal: Abusing generics, and using generic-lens https://www.irccloud.com/pastebin/Ty5NHw5K/GSomeVal.hs |
2023-07-24 09:57:49 +0200 | econo_ | (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
2023-07-24 09:57:53 +0200 | mik3d | (~mik3d@74.102.139.139) |
2023-07-24 10:00:12 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-07-24 10:03:10 +0200 | merijn | (~merijn@c-001-001-008.client.esciencecenter.eduvpn.nl) |
2023-07-24 10:05:17 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-07-24 10:09:21 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-07-24 10:13:32 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2023-07-24 10:14:24 +0200 | cfricke | (~cfricke@user/cfricke) |
2023-07-24 10:17:04 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 260 seconds) |
2023-07-24 10:17:16 +0200 | titibandit | (~titibandi@user/titibandit) (Remote host closed the connection) |
2023-07-24 10:19:43 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-07-24 10:19:50 +0200 | jsomedon | (uid606872@id-606872.hampstead.irccloud.com) |
2023-07-24 10:19:59 +0200 | jsomedon | (uid606872@id-606872.hampstead.irccloud.com) () |
2023-07-24 10:21:42 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 10:21:42 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 10:21:42 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 10:23:50 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2023-07-24 10:28:40 +0200 | jespada | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) |
2023-07-24 10:30:31 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2023-07-24 10:31:02 +0200 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2023-07-24 10:34:23 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
2023-07-24 10:34:57 +0200 | Feuermagier | (~Feuermagi@user/feuermagier) |
2023-07-24 10:35:09 +0200 | Inst__ | (~Inst@2601:6c4:4081:2fc0:78d7:b1ca:6be1:4a52) (Ping timeout: 260 seconds) |
2023-07-24 10:37:05 +0200 | andydude | (~andrewr@151.200.15.152) (Ping timeout: 246 seconds) |
2023-07-24 10:52:30 +0200 | Pickchea | (~private@user/pickchea) |
2023-07-24 10:55:16 +0200 | ft | (~ft@p3e9bc042.dip0.t-ipconnect.de) (Quit: leaving) |
2023-07-24 11:01:28 +0200 | Square2 | (~Square@user/square) (Ping timeout: 244 seconds) |
2023-07-24 11:04:23 +0200 | Tuplanolla | (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) |
2023-07-24 11:06:41 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-07-24 11:08:14 +0200 | CiaoSen | (~Jura@2a05:5800:292:e100:664b:f0ff:fe37:9ef) (Ping timeout: 246 seconds) |
2023-07-24 11:09:06 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-07-24 11:18:54 +0200 | mango | (~finn@rul16-h01-176-151-21-224.dsl.sta.abo.bbox.fr) |
2023-07-24 11:22:09 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) |
2023-07-24 11:23:02 +0200 | <dminuoso> | With hasql, whats the idea of mapping say text values to enum ADTs? Would I just use `refineResult` to decode the individual fields? |
2023-07-24 11:26:02 +0200 | bontaq | (~user@ool-45779b84.dyn.optonline.net) |
2023-07-24 11:28:36 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-07-24 11:33:29 +0200 | mango | (~finn@rul16-h01-176-151-21-224.dsl.sta.abo.bbox.fr) (Ping timeout: 260 seconds) |
2023-07-24 11:35:20 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 246 seconds) |
2023-07-24 11:37:07 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:d9e8:7102:9d21:53ef) (Remote host closed the connection) |
2023-07-24 11:39:33 +0200 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2023-07-24 11:39:42 +0200 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds) |
2023-07-24 11:40:29 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
2023-07-24 11:40:48 +0200 | __monty__ | (~toonn@user/toonn) |
2023-07-24 11:41:31 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-07-24 11:42:22 +0200 | Lord_of_Life_ | Lord_of_Life |
2023-07-24 11:44:26 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-07-24 11:47:58 +0200 | andrewboltachev | (~andrey@178.141.125.70) (Ping timeout: 244 seconds) |
2023-07-24 11:55:38 +0200 | <fvr> | dminuoso: We use hasql-th and just parse the resulting text fields |
2023-07-24 11:56:28 +0200 | <dminuoso> | fvr: Via `custom`? |
2023-07-24 11:57:11 +0200 | <fvr> | No, we just don't write any decoders beyond the standard ones provided in hasql-th |
2023-07-24 11:57:35 +0200 | <fvr> | We do have a fork of hasql-th to directly embed and construct haskell values in the sql statements |
2023-07-24 11:59:38 +0200 | mechap | (~mechap@user/mechap) |
2023-07-24 12:00:26 +0200 | <dminuoso> | fvr: Ah so you just have some `parse :: Vector (Int, Char) -> Either Error (Vector Thing)` type of functions? |
2023-07-24 12:02:06 +0200 | razetime | (~quassel@117.193.2.183) |
2023-07-24 12:02:32 +0200 | jespada | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Ping timeout: 240 seconds) |
2023-07-24 12:03:01 +0200 | <fvr> | yep, we have a type that wraps hasql's QueryError |
2023-07-24 12:03:15 +0200 | andrewboltachev | (~andrey@178.141.128.242) |
2023-07-24 12:04:11 +0200 | jespada | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) |
2023-07-24 12:04:58 +0200 | <fvr> | I haven't seen refineResult before but looks like it can be used to the same effect together with hasql-th |
2023-07-24 12:06:20 +0200 | nyc | (~nyc@2603-7000-a106-2fb5-0000-0000-0000-1f21.res6.spectrum.com) (Ping timeout: 246 seconds) |
2023-07-24 12:11:47 +0200 | CiaoSen | (~Jura@2a05:5800:292:e100:664b:f0ff:fe37:9ef) |
2023-07-24 12:12:29 +0200 | jespada_ | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) |
2023-07-24 12:12:37 +0200 | jespada | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Read error: Connection reset by peer) |
2023-07-24 12:17:02 +0200 | jespada_ | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Ping timeout: 245 seconds) |
2023-07-24 12:17:39 +0200 | mango | (~finn@rul16-h01-176-151-21-224.dsl.sta.abo.bbox.fr) |
2023-07-24 12:18:12 +0200 | ub | (~Thunderbi@91.141.78.46.wireless.dyn.drei.com) (Quit: ub) |
2023-07-24 12:20:35 +0200 | jespada | (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) |
2023-07-24 12:29:29 +0200 | idgaen | (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
2023-07-24 12:31:08 +0200 | mango | (~finn@rul16-h01-176-151-21-224.dsl.sta.abo.bbox.fr) (Ping timeout: 250 seconds) |
2023-07-24 12:34:31 +0200 | gurkenglas | (~gurkengla@dynamic-046-114-092-039.46.114.pool.telefonica.de) |
2023-07-24 12:37:38 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:255a:b8f5:5ab9:11d7) |
2023-07-24 12:41:08 +0200 | zer0bitz | (~zer0bitz@user/zer0bitz) |
2023-07-24 12:42:19 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:255a:b8f5:5ab9:11d7) (Ping timeout: 260 seconds) |
2023-07-24 12:42:54 +0200 | ubert | (~Thunderbi@91.141.78.46.wireless.dyn.drei.com) (Ping timeout: 260 seconds) |
2023-07-24 12:44:04 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 260 seconds) |
2023-07-24 12:47:21 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 12:47:21 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 12:47:21 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 12:47:34 +0200 | danse-nr3__ | (~francesco@151.57.20.78) (Ping timeout: 260 seconds) |
2023-07-24 12:51:07 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2023-07-24 12:54:13 +0200 | <dminuoso> | It feels a bit clunky, since there isn't something simple where you could say `[maybeStatement| SELECT name :: text FROM users WHERE status = $1 :: Status |]` |
2023-07-24 12:55:16 +0200 | <dminuoso> | I mean yes, I can ultimately just say `WHERE status = $1 :: text` and lmap/dimap over the Statement to encode the parameter. |
2023-07-24 12:55:53 +0200 | <dminuoso> | Slowly Im building up a lot of things that I really want in a database adapter. :-) |
2023-07-24 13:04:16 +0200 | <fvr> | dminuoso: In our fork we can interpolate haskell functions like this: `[singletonStatement|select $defaultUser { userId = (uid::bigint) } , $mkUser (uid::bigint, uname::text), uid::bigint from label where uid = $1.$userId::bigint |] |
2023-07-24 13:04:56 +0200 | merijn | (~merijn@c-001-001-008.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
2023-07-24 13:07:12 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Excess Flood) |
2023-07-24 13:09:35 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2023-07-24 13:13:22 +0200 | Tuplanolla | (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.) |
2023-07-24 13:15:58 +0200 | arizona_ | (~arizona@bcdcac82.skybroadband.com) |
2023-07-24 13:17:41 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-07-24 13:18:07 +0200 | razetime | (~quassel@117.193.2.183) (Remote host closed the connection) |
2023-07-24 13:18:29 +0200 | arizona | (~arizona@bcdcac82.skybroadband.com) (Ping timeout: 260 seconds) |
2023-07-24 13:22:12 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
2023-07-24 13:23:03 +0200 | gugu256 | (~gugu256@243.107.23.93.rev.sfr.net) |
2023-07-24 13:23:45 +0200 | <gugu256> | Hi everybody |
2023-07-24 13:23:56 +0200 | <gugu256> | I'm new to haskell and I was wondering what's the point of it |
2023-07-24 13:24:06 +0200 | <gugu256> | And what's the point of lambda calculus too |
2023-07-24 13:25:02 +0200 | <Rembane> | gugu256: Lambda calculus is a way to do computation in a mathematical way. |
2023-07-24 13:25:16 +0200 | <Rembane> | gugu256: Haskell is a research language that's quite good for doing other things too, like writing interpreters and compilers. |
2023-07-24 13:25:17 +0200 | <gugu256> | Rembane: oh ok |
2023-07-24 13:25:31 +0200 | <gugu256> | Rembane: Oh you can write compilers in haskell ? |
2023-07-24 13:26:04 +0200 | <jade[m]> | gugu256: what's the point of any other language? ^^ |
2023-07-24 13:26:05 +0200 | <jade[m]> | Haskell is a purely functional language, that is also general purpose, so you can use it to write whatever your heart desires |
2023-07-24 13:26:34 +0200 | <Rembane> | gugu256: I think this is a reasonable introduction to lambda calculus and other things: https://www.youtube.com/watch?v=IOiZatlZtGU |
2023-07-24 13:26:41 +0200 | <Rembane> | gugu256: Mostly other things :D |
2023-07-24 13:26:46 +0200 | xff0x | (~xff0x@ai086045.d.east.v6connect.net) |
2023-07-24 13:27:03 +0200 | <gugu256> | And also, i've heard haskell vars are immutable, but like, can it support user input then ? |
2023-07-24 13:27:03 +0200 | <dminuoso> | fvr: What does that syntax do? |
2023-07-24 13:27:14 +0200 | <jade[m]> | gugu256: yes! |
2023-07-24 13:27:17 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2023-07-24 13:27:29 +0200 | <gugu256> | ok ok... |
2023-07-24 13:27:31 +0200 | <gugu256> | interesting |
2023-07-24 13:27:41 +0200 | <dminuoso> | gugu256, Rembane: I would prefer to not call Haskell a "research language" mostly because it tends to promote views that Haskell is not suitable for industry use. |
2023-07-24 13:27:47 +0200 | <gugu256> | i've just looked up the learn x in y minutes tutorial on haskell |
2023-07-24 13:27:54 +0200 | <jade[m]> | it uses some tricks around immutability and purity, but those things can guarantee you other amazing features like laziness and sharing |
2023-07-24 13:28:04 +0200 | <dminuoso> | It's an industrial strength language that receives a lot of attention in research for new features and ideas. |
2023-07-24 13:28:33 +0200 | <jade[m]> | jade[m]: I say "tricks" but really it's just incredible abstractions around the concept of "IO" |
2023-07-24 13:29:10 +0200 | <Rembane> | dminuoso: Oh. Fair enough, I'll stop doing that. |
2023-07-24 13:29:55 +0200 | <dminuoso> | 13:27:02 gugu256 | And also, i've heard haskell vars are immutable, but like, can it support user input then ? |
2023-07-24 13:30:28 +0200 | <gugu256> | Is this a good resource ? : https://learnxinyminutes.com/docs/haskell/ |
2023-07-24 13:30:30 +0200 | <dminuoso> | gugu256: So that statement is somewhat misleading. What you call "variables" in other languages is what we might call mutable stores/references. |
2023-07-24 13:30:50 +0200 | <gugu256> | dminuoso: oh ok |
2023-07-24 13:30:52 +0200 | <dminuoso> | gugu256: Its just that what we call "variables" is something different that most languages dont have. But we do have mutable references nevertheless. |
2023-07-24 13:31:07 +0200 | <dminuoso> | So an efficient in-place sort algorithm that manipulates memory can be done just fine. |
2023-07-24 13:31:17 +0200 | <fvr> | dminuoso: It mostly eliminates the need for lmap/fmap on the Statement type, so in the where clause `$1` can be a record type and userId is a field. And in the select statement it's showing a way three ways construct the user types without fmapping, so `defaultUser` is a record and `mkUser` is a function. Since it's forked off from hasql-th you get the same syntax checking for the sql statements |
2023-07-24 13:32:14 +0200 | <jade[m]> | gugu256: > -- Boolean values are primitives |
2023-07-24 13:32:14 +0200 | <jade[m]> | haven't heard of it, but the above makes me doubt it somewhat? |
2023-07-24 13:32:14 +0200 | <jade[m]> | Haskell is one of the only languages where Booleans are *not* primitives but instead directly defined in the standard library as a "normal" type |
2023-07-24 13:33:15 +0200 | <dminuoso> | gugu256: Its just slighlty more inconvenient. While in a traditional language you might write `a = 5` or `a := 5`, indicating "write 5 to the memory store called a" in Haskell you would write `writeIORef a 5`. The confusing part is that we can also write `let a = 5 in ...` and its something slightly different, its more like a statement of equality. |
2023-07-24 13:34:10 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
2023-07-24 13:34:14 +0200 | <jade[m]> | dminuoso: though usually you won't even work with IO refs in the beginning |
2023-07-24 13:34:22 +0200 | <jade[m]> | just immutable data :) |
2023-07-24 13:34:33 +0200 | <dminuoso> | Right. |
2023-07-24 13:34:46 +0200 | <arahael_> | Curiously, I find that usually I don't actually need IO refs. |
2023-07-24 13:35:26 +0200 | <dminuoso> | A lot of "changing variables" are often encoded as function parameters in recursion, encoding the idea of a loop variable. |
2023-07-24 13:36:28 +0200 | <dminuoso> | arahael_: Recently I find myself using them more and more. |
2023-07-24 13:36:50 +0200 | <dminuoso> | But this is rather specific to my problem domain |
2023-07-24 13:37:12 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-07-24 13:37:18 +0200 | <arahael_> | Makes sense. You do far more haskell than I do, also. Far, far more. |
2023-07-24 13:37:21 +0200 | <dminuoso> | Building up a graph of information and knowledge in a compiler over multiple passes is just so much easier if you drag some `IORef` in a reader environment along. |
2023-07-24 13:37:51 +0200 | <arahael_> | dminuoso: Why not use state, then? |
2023-07-24 13:38:25 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2023-07-24 13:38:58 +0200 | <arahael_> | Ooh, because you're probably doing stuff concurrently, etc. |
2023-07-24 13:39:30 +0200 | <dminuoso> | I would rather use STM in that case say TQueue, TVar, etc.. |
2023-07-24 13:39:41 +0200 | <dminuoso> | I dont like StateT because it introduces a lot of issues and complexity when it comes to unlifting. |
2023-07-24 13:40:03 +0200 | <dminuoso> | Also it introduces extra lazyness hurdles |
2023-07-24 13:40:17 +0200 | <dminuoso> | With an IORef in a reader environment you can just use MonadUnliftIO - done! |
2023-07-24 13:40:44 +0200 | danse-nr3 | (~francesco@151.57.20.78) |
2023-07-24 13:41:16 +0200 | <arahael_> | Ah, that kind of makes sense - so it's a simpler API, in addition to sidestepping those complications. |
2023-07-24 13:41:24 +0200 | <arahael_> | I should get to bed. It's getting late for me. |
2023-07-24 13:42:45 +0200 | <dminuoso> | fvr: Is the fork publically available for me to look at? |
2023-07-24 13:44:04 +0200 | danse-nr3_ | (~francesco@151.57.76.226) |
2023-07-24 13:44:10 +0200 | danse-nr3 | (~francesco@151.57.20.78) (Read error: Connection reset by peer) |
2023-07-24 13:47:37 +0200 | <fvr> | dminuoso: https://github.com/kronor-io/hasql-th/tree/target-hs |
2023-07-24 13:47:51 +0200 | <fvr> | you will also need this fork of postgresql-syntax to build it https://github.com/kronor-io/postgresql-syntax/commits/auto-decoding |
2023-07-24 13:48:21 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) (Ping timeout: 244 seconds) |
2023-07-24 13:53:08 +0200 | idgaen | (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.0.2) |
2023-07-24 13:54:04 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-07-24 13:56:27 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
2023-07-24 13:56:42 +0200 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2023-07-24 13:58:28 +0200 | auri | (~auri@fsf/member/auri) (Remote host closed the connection) |
2023-07-24 13:59:12 +0200 | Buggys | (Buggys@shelltalk.net) (Ping timeout: 244 seconds) |
2023-07-24 13:59:38 +0200 | auri | (~auri@fsf/member/auri) |
2023-07-24 14:00:14 +0200 | infinity0 | (~infinity0@pwned.gg) (Ping timeout: 244 seconds) |
2023-07-24 14:00:34 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) |
2023-07-24 14:03:12 +0200 | infinity0 | (~infinity0@pwned.gg) |
2023-07-24 14:04:21 +0200 | nyc | (~nyc@2603-7000-a106-2fb5-0000-0000-0000-1f21.res6.spectrum.com) |
2023-07-24 14:05:09 +0200 | arahael_ | (~arahael@124-149-31-4.dyn.iinet.net.au) (Ping timeout: 246 seconds) |
2023-07-24 14:06:17 +0200 | Buggys | (Buggys@Buggy.shelltalk.net) |
2023-07-24 14:14:23 +0200 | CiaoSen | (~Jura@2a05:5800:292:e100:664b:f0ff:fe37:9ef) (Ping timeout: 264 seconds) |
2023-07-24 14:15:40 +0200 | yangby | (~secret@115.220.174.193) (Ping timeout: 252 seconds) |
2023-07-24 14:17:54 +0200 | hdggxin | (~hdggxin@122.175.41.19) (Ping timeout: 260 seconds) |
2023-07-24 14:21:50 +0200 | ripspin | (~chatzilla@1.145.217.131) |
2023-07-24 14:28:17 +0200 | gugu256 | (~gugu256@243.107.23.93.rev.sfr.net) (Ping timeout: 245 seconds) |
2023-07-24 14:30:23 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection) |
2023-07-24 14:34:23 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-07-24 14:36:14 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-07-24 14:40:19 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 258 seconds) |
2023-07-24 14:40:44 +0200 | waleee | (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) |
2023-07-24 14:41:33 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2023-07-24 14:44:14 +0200 | img | (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-07-24 14:45:13 +0200 | img | (~img@user/img) |
2023-07-24 14:48:17 +0200 | jmdaemon | (~jmdaemon@user/jmdaemon) (Ping timeout: 244 seconds) |
2023-07-24 14:51:01 +0200 | gugu256 | (~gugu256@243.107.23.93.rev.sfr.net) |
2023-07-24 14:55:40 +0200 | hdggxin | (~hdggxin@122.175.41.19) |
2023-07-24 15:00:01 +0200 | FurudeRika[m] | (~chitandae@2001:470:69fc:105::1:6039) |
2023-07-24 15:03:17 +0200 | adanwan | (~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection) |
2023-07-24 15:04:03 +0200 | adanwan | (~adanwan@gateway/tor-sasl/adanwan) |
2023-07-24 15:05:33 +0200 | merijn | (~merijn@185.143.104.11) |
2023-07-24 15:06:07 +0200 | nick4 | (~nick@2600:8807:9084:7800:f1f0:6aed:eef0:d448) |
2023-07-24 15:07:26 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-07-24 15:14:38 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 244 seconds) |
2023-07-24 15:16:33 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 15:16:33 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 15:16:33 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 15:21:38 +0200 | rembo10 | (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-07-24 15:23:54 +0200 | rembo10 | (~rembo10@main.remulis.com) |
2023-07-24 15:26:28 +0200 | justsomeguy | (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6) |
2023-07-24 15:27:31 +0200 | gugu256 | (~gugu256@243.107.23.93.rev.sfr.net) (Remote host closed the connection) |
2023-07-24 15:27:53 +0200 | gugu256 | (~gugu256@243.107.23.93.rev.sfr.net) |
2023-07-24 15:31:16 +0200 | cfricke | (~cfricke@user/cfricke) (Quit: WeeChat 4.0.1) |
2023-07-24 15:31:26 +0200 | andydude | (~andrewr@151.200.15.152) |
2023-07-24 15:34:27 +0200 | ddellacosta | (~ddellacos@143.244.47.71) |
2023-07-24 15:35:12 +0200 | nick4 | (~nick@2600:8807:9084:7800:f1f0:6aed:eef0:d448) (Ping timeout: 240 seconds) |
2023-07-24 15:41:30 +0200 | <dminuoso> | Does GHC or cabal have some option to jailbreak all modules, such that module export lists are ignored and the entire module is exported instead? |
2023-07-24 15:45:15 +0200 | <geekosaur> | by the time the module is compiled, export lists are frozen in stone in the symbols exported by the .o file |
2023-07-24 15:45:29 +0200 | merijn | (~merijn@185.143.104.11) (Ping timeout: 260 seconds) |
2023-07-24 15:46:19 +0200 | <int-e> | it would have to be a ghc feature and I don't see anything resembling that |
2023-07-24 15:46:55 +0200 | <geekosaur> | if any symbols got exported "secretly" by the .hi file then there's a TH hack you can use to get at them individually (https://www.tweag.io/blog/2021-01-07-haskell-dark-arts-part-i/) but that still requires ghc to have exported it. and there's no compile time option to export everything ignoring the export list |
2023-07-24 15:46:58 +0200 | <int-e> | it would also break a ton of code (importing whole modules unqualified isn't uncommon) |
2023-07-24 15:47:21 +0200 | <geekosaur> | I think that's regarded as potentially type-unsafe because of smart constructors |
2023-07-24 15:48:09 +0200 | <dminuoso> | int-e: Potential breakage could be addressed by an `import unsafe qualified Data.Text as TInternal` or some such. |
2023-07-24 15:48:38 +0200 | <dminuoso> | Assuming that in the hypothetical mode GHC maintained two export lists (public and internal) per module. |
2023-07-24 15:49:01 +0200 | <int-e> | now you're asking for a whole language extension |
2023-07-24 15:51:19 +0200 | ripspin | (~chatzilla@1.145.217.131) (Ping timeout: 260 seconds) |
2023-07-24 15:55:56 +0200 | ystael | (~ystael@user/ystael) |
2023-07-24 15:55:58 +0200 | qrst | (~qrst@user/qrst) (Ping timeout: 244 seconds) |
2023-07-24 16:00:23 +0200 | gugu256 | (~gugu256@243.107.23.93.rev.sfr.net) (Remote host closed the connection) |
2023-07-24 16:00:46 +0200 | gugu256 | (~gugu256@93.23.107.243) |
2023-07-24 16:01:57 +0200 | [_] | (~itchyjunk@user/itchyjunk/x-7353470) |
2023-07-24 16:03:23 +0200 | qrst | (~qrst@user/qrst) |
2023-07-24 16:04:44 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds) |
2023-07-24 16:06:05 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2023-07-24 16:24:47 +0200 | trev | (~trev@user/trev) (Quit: trev) |
2023-07-24 16:26:42 +0200 | mei | (~mei@user/mei) (Remote host closed the connection) |
2023-07-24 16:26:44 +0200 | econo_ | (uid147250@id-147250.tinside.irccloud.com) |
2023-07-24 16:28:16 +0200 | gugu256 | (~gugu256@93.23.107.243) (Remote host closed the connection) |
2023-07-24 16:28:39 +0200 | gugu256 | (~gugu256@243.107.23.93.rev.sfr.net) |
2023-07-24 16:29:07 +0200 | mei | (~mei@user/mei) |
2023-07-24 16:42:35 +0200 | Natch | (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) (Remote host closed the connection) |
2023-07-24 16:58:20 +0200 | Natch | (~natch@c-9e07225c.038-60-73746f7.bbcust.telenor.se) |
2023-07-24 17:03:39 +0200 | libertyprime | (~libertypr@203.96.203.44) (Ping timeout: 260 seconds) |
2023-07-24 17:05:16 +0200 | maybefbi | (~maybefbi@gateway/tor-sasl/maybefbi) |
2023-07-24 17:06:31 +0200 | Pickchea | (~private@user/pickchea) |
2023-07-24 17:08:38 +0200 | <maybefbi> | What is your favorite App monad: https://strawpoll.com/e6Z28PemEnN |
2023-07-24 17:11:02 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 260 seconds) |
2023-07-24 17:11:25 +0200 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2023-07-24 17:12:09 +0200 | srk_ | (~sorki@user/srk) |
2023-07-24 17:15:11 +0200 | srk | (~sorki@user/srk) (Ping timeout: 246 seconds) |
2023-07-24 17:15:12 +0200 | srk_ | srk |
2023-07-24 17:15:12 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 17:15:12 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 17:15:12 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 17:15:13 +0200 | gaff | (~gaff@49.207.193.51) |
2023-07-24 17:16:16 +0200 | <gaff> | Is there a way to write a `Show` instance for this: `newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) } `? |
2023-07-24 17:16:55 +0200 | <johnw> | not in the way you're probably asking for |
2023-07-24 17:17:09 +0200 | <johnw> | all you can really do is: show _ = "some MaybeT" |
2023-07-24 17:17:23 +0200 | <johnw> | because you just don't know anything about `m` |
2023-07-24 17:17:31 +0200 | <ncf> | you might have something like Show (m a) => Show (MaybeT m a) |
2023-07-24 17:17:35 +0200 | <ncf> | (or Show1?) |
2023-07-24 17:18:17 +0200 | <gaff> | I see. so you'll have to write `Show` for whatever `m` types separately then? |
2023-07-24 17:19:00 +0200 | trev | (~trev@user/trev) |
2023-07-24 17:19:11 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-07-24 17:21:58 +0200 | <ncf> | well, i guess i'd write Show a => Show (m a) and then compose that with Show a => Show (Maybe a) to get what you want |
2023-07-24 17:23:18 +0200 | <gaff> | ncf: how would you do that? |
2023-07-24 17:23:33 +0200 | <ncf> | i don't know, just speculating |
2023-07-24 17:23:42 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
2023-07-24 17:24:48 +0200 | <gaff> | I couldn't find a way either which is why I asked here in this channel. |
2023-07-24 17:26:59 +0200 | <ncf> | well, transformers seems to have both Show1 m => Show1 (MaybeT m) and (Show1 m, Show a) => Show (MaybeT m a) so you could just look at that |
2023-07-24 17:27:25 +0200 | <johnw> | true, some `m` (like Maybe itself, or Either) would allow for Show1 instances |
2023-07-24 17:27:33 +0200 | <ncf> | https://hackage.haskell.org/package/transformers-0.6.1.0/docs/src/Control.Monad.Trans.Maybe.html#l… |
2023-07-24 17:28:22 +0200 | <geekosaur> | I'm confused. Isn't a value of that type an action (that is, a function)? |
2023-07-24 17:29:09 +0200 | <ncf> | if m involves functions, sure |
2023-07-24 17:29:26 +0200 | mauke | (~mauke@user/mauke) |
2023-07-24 17:29:27 +0200 | <int-e> | :t RWS |
2023-07-24 17:29:27 +0200 | <lambdabot> | error: |
2023-07-24 17:29:28 +0200 | <lambdabot> | • Data constructor not in scope: RWS |
2023-07-24 17:29:28 +0200 | <lambdabot> | • Perhaps you meant ‘RWST’ (imported from Control.Monad.RWS) |
2023-07-24 17:29:35 +0200 | <int-e> | :t RWST |
2023-07-24 17:29:36 +0200 | <lambdabot> | (r -> s -> m (a, s, w)) -> RWST r w s m a |
2023-07-24 17:32:27 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) (Ping timeout: 245 seconds) |
2023-07-24 17:37:37 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) |
2023-07-24 17:37:38 +0200 | dibblego | (~dibblego@116-255-1-151.ip4.superloop.au) (Changing host) |
2023-07-24 17:37:38 +0200 | dibblego | (~dibblego@haskell/developer/dibblego) |
2023-07-24 17:41:59 +0200 | srk_ | (~sorki@user/srk) |
2023-07-24 17:42:04 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:255a:b8f5:5ab9:11d7) |
2023-07-24 17:43:55 +0200 | danse-nr3__ | (~francesco@151.43.65.14) |
2023-07-24 17:45:04 +0200 | srk | (~sorki@user/srk) (Ping timeout: 260 seconds) |
2023-07-24 17:45:04 +0200 | srk_ | srk |
2023-07-24 17:45:25 +0200 | danse-nr3_ | (~francesco@151.57.76.226) (Read error: Connection reset by peer) |
2023-07-24 17:45:58 +0200 | idgaen | (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
2023-07-24 17:46:21 +0200 | [_] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2023-07-24 17:46:40 +0200 | [_] | (~itchyjunk@user/itchyjunk/x-7353470) |
2023-07-24 17:46:49 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:255a:b8f5:5ab9:11d7) (Ping timeout: 260 seconds) |
2023-07-24 17:47:22 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
2023-07-24 17:48:48 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:255a:b8f5:5ab9:11d7) |
2023-07-24 17:51:41 +0200 | trev | (~trev@user/trev) (Quit: trev) |
2023-07-24 17:55:42 +0200 | idgaen | (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (WeeChat 4.0.2) |
2023-07-24 18:06:32 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 250 seconds) |
2023-07-24 18:16:14 +0200 | <gurkenglas> | What can I tell someone who is dissatisfied that changing one value in an array of length n requires either impure Haskell or log(n) time? |
2023-07-24 18:16:35 +0200 | <gurkenglas> | Does FRP possibly adress this? |
2023-07-24 18:18:13 +0200 | <glguy> | An old "solution" to this was diffarrays, though I haven't heard about them in a while https://hackage.haskell.org/package/diffarray-0.1.1/docs/Data-Array-Diff.html |
2023-07-24 18:18:22 +0200 | <Hecate> | w-why would FRP solve this? O.O |
2023-07-24 18:18:41 +0200 | ripspin | (~chatzilla@1.145.156.220) |
2023-07-24 18:18:48 +0200 | <glguy> | another solution is switching to a language like Lean that seems to emphasize optimizations for updates to pure values when the reference to the object is unique |
2023-07-24 18:19:05 +0200 | danse-nr3__ | (~francesco@151.43.65.14) (Ping timeout: 244 seconds) |
2023-07-24 18:19:27 +0200 | <glguy> | or just don't worry about comforting such a dissatisfied person |
2023-07-24 18:19:31 +0200 | <c_wraith> | diffarray ended up being slower than immutable arrays in almost every case |
2023-07-24 18:20:03 +0200 | <glguy> | c_wraith: maybe the hypothetical objector is only concerned with asymptotics and not constant factors |
2023-07-24 18:20:05 +0200 | idgaen | (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
2023-07-24 18:20:16 +0200 | <gurkenglas> | Hecate: I imagine that maybe one can move from Tree a = Leaf a | Node (Tree a) (Tree a) in the direction of TimeTree a = Time -> LeafOrNodeTimeTreeTimeTree a and then the latter doesn't mutate |
2023-07-24 18:20:23 +0200 | <c_wraith> | IIRC, mostly related to the locking necessary to make a pure interface not result in race conditions |
2023-07-24 18:22:24 +0200 | <gurkenglas> | *looks up diffarray* this is the kind of magic-specific-to-RAM-being-in-fact-mutable that i am hoping to avoid |
2023-07-24 18:22:36 +0200 | nick4 | (~nick@2600:100d:b109:6d35:d019:88ab:4ef5:7d97) |
2023-07-24 18:22:55 +0200 | <glguy> | RAM actually being mutable is key to programs actually running |
2023-07-24 18:23:13 +0200 | <gurkenglas> | suppose you were working with write-once RAM then :P |
2023-07-24 18:24:47 +0200 | <gurkenglas> | your computing company goes through a lot of ram chips per week, can you find a data structure that burns less than log(n) addresses per array-write? |
2023-07-24 18:25:32 +0200 | <gaff> | writing the Show instance for `MaybeT m a` turns out to be far more involved than I thought. |
2023-07-24 18:26:01 +0200 | <glguy> | gaff: learning about Show1? |
2023-07-24 18:26:11 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2023-07-24 18:27:53 +0200 | <gaff> | this is what I was trying to write a `Show` instance for: `newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) } ` Yeah, learning about Show1 |
2023-07-24 18:29:32 +0200 | nick4 | (~nick@2600:100d:b109:6d35:d019:88ab:4ef5:7d97) (Ping timeout: 240 seconds) |
2023-07-24 18:30:59 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-07-24 18:32:06 +0200 | <glguy> | gaff: I'm not sure if you're just relating a bit of your experience or looking for any help, but if you have questions do ask :) |
2023-07-24 18:32:44 +0200 | waleee | (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 252 seconds) |
2023-07-24 18:33:09 +0200 | <geekosaur> | [24 15:16:16] <gaff> Is there a way to write a `Show` instance for this: `newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) } `? |
2023-07-24 18:33:41 +0200 | <gaff> | glguy: well, any idea how you write a `Show` instance for `newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) } `? Is there a simple way to do it? |
2023-07-24 18:34:01 +0200 | <glguy> | gaff: you could check out the current instance: https://hackage.haskell.org/package/transformers-0.6.1.0/docs/src/Control.Monad.Trans.Maybe.html#l… |
2023-07-24 18:34:48 +0200 | <gaff> | Ok, I am doing that now, but I was also wondering if anyone has other ideas. |
2023-07-24 18:34:58 +0200 | <glguy> | that's how you do it |
2023-07-24 18:35:02 +0200 | ripspin | (~chatzilla@1.145.156.220) (Read error: Connection reset by peer) |
2023-07-24 18:35:08 +0200 | <gaff> | alright. thnaks |
2023-07-24 18:36:35 +0200 | marea_ | (~francesco@151.43.65.14) |
2023-07-24 18:37:01 +0200 | nckx | (~nckx@guix/contributor/nckx) (Quit: Updating my Guix System <https://guix.gnu.org>) |
2023-07-24 18:39:06 +0200 | <glguy> | gaff: as far as "other ideas" you can turn on {-# Language UndecidableInstances, StandaloneInstances #-} and then: deriving instance Show (m (Maybe a)) => Show (MaybeT m a) |
2023-07-24 18:45:15 +0200 | nckx | (~nckx@guix/contributor/nckx) |
2023-07-24 18:53:10 +0200 | marea_ | (~francesco@151.43.65.14) (Remote host closed the connection) |
2023-07-24 18:53:31 +0200 | marea_ | (~francesco@151.43.65.14) |
2023-07-24 18:55:05 +0200 | <gaff> | glguy: ok, i haven't used those extensions in the past, so i will have to look them up. could you explain the rationale behind your suggestion? |
2023-07-24 18:57:14 +0200 | Pickchea | (~private@user/pickchea) (Ping timeout: 250 seconds) |
2023-07-24 18:57:19 +0200 | titibandit | (~titibandi@user/titibandit) (Ping timeout: 244 seconds) |
2023-07-24 18:58:05 +0200 | <glguy> | the rational was just that you said: " I was also wondering if anyone has other ideas" |
2023-07-24 18:59:29 +0200 | <gaff> | glguy: OK |
2023-07-24 19:01:11 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2023-07-24 19:01:56 +0200 | [_] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2023-07-24 19:03:47 +0200 | maybefbi | (~maybefbi@gateway/tor-sasl/maybefbi) (Remote host closed the connection) |
2023-07-24 19:04:07 +0200 | <gaff> | glguy: also, none of these would work if `m` is the IO monad. |
2023-07-24 19:08:25 +0200 | <glguy> | of course, it isn't possible to show a value with type (IO a) |
2023-07-24 19:09:12 +0200 | <glguy> | Unless you don't care what gets printed; one could always write a lossy instance for Show (IO a) |
2023-07-24 19:09:21 +0200 | <int-e> | > print "" |
2023-07-24 19:09:23 +0200 | <lambdabot> | <IO ()> |
2023-07-24 19:09:50 +0200 | <gaff> | yeah, thanks :) |
2023-07-24 19:10:29 +0200 | ChanServ | +o glguy |
2023-07-24 19:10:49 +0200 | ChanServ | +o geekosaur |
2023-07-24 19:10:51 +0200 | nick4 | (~nick@2600:8807:9084:7800:b163:648a:f3e5:666f) |
2023-07-24 19:11:45 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-07-24 19:13:52 +0200 | boxscape_ | (~boxscape_@81.191.27.107) |
2023-07-24 19:13:58 +0200 | boxscape_ | (~boxscape_@81.191.27.107) (Client Quit) |
2023-07-24 19:15:20 +0200 | gaff | (~gaff@49.207.193.51) () |
2023-07-24 19:15:53 +0200 | mei | (~mei@user/mei) (Remote host closed the connection) |
2023-07-24 19:17:18 +0200 | boxscape[m] | (~jabruenma@2001:470:69fc:105::3:88e7) |
2023-07-24 19:18:17 +0200 | mei | (~mei@user/mei) |
2023-07-24 19:19:56 +0200 | gugu256 | (~gugu256@243.107.23.93.rev.sfr.net) (Read error: Connection reset by peer) |
2023-07-24 19:24:35 +0200 | Aleksejs | (~Aleksejs@107.170.21.106) (Ping timeout: 264 seconds) |
2023-07-24 19:24:49 +0200 | marea_ | (~francesco@151.43.65.14) (Ping timeout: 260 seconds) |
2023-07-24 19:24:58 +0200 | Aleksejs | (~Aleksejs@107.170.21.106) |
2023-07-24 19:26:23 +0200 | gurkenglas | (~gurkengla@dynamic-046-114-092-039.46.114.pool.telefonica.de) (Ping timeout: 264 seconds) |
2023-07-24 19:37:12 +0200 | qrst | (~qrst@user/qrst) (Ping timeout: 240 seconds) |
2023-07-24 19:39:48 +0200 | marea_ | (~francesco@151.43.65.14) |
2023-07-24 19:41:22 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-07-24 19:45:46 +0200 | marea_ | (~francesco@151.43.65.14) (Ping timeout: 250 seconds) |
2023-07-24 19:53:29 +0200 | <monochrom> | > putStrLn "<IO ()>" |
2023-07-24 19:53:31 +0200 | <lambdabot> | <IO ()> |
2023-07-24 19:53:36 +0200 | <monochrom> | worksforme >:D |
2023-07-24 19:54:56 +0200 | <glguy> | > read "<IO ()>" :: IO () |
2023-07-24 19:54:57 +0200 | <lambdabot> | error: |
2023-07-24 19:54:57 +0200 | <lambdabot> | • No instance for (Read (IO ())) arising from a use of ‘read’ |
2023-07-24 19:54:57 +0200 | <lambdabot> | • In the expression: read "<IO ()>" :: IO () |
2023-07-24 19:54:59 +0200 | <glguy> | :( |
2023-07-24 19:56:00 +0200 | <monochrom> | Oh heh. Yeah we should add that to complete the round trip. |
2023-07-24 19:59:54 +0200 | <ncf> | someone should make a Show (IO a) instance that satisfies read.show = id |
2023-07-24 20:00:37 +0200 | <glguy> | My idea is to have it return asker :: Read a => IO a; asker = putStrLn "Hey, user needs an answer:" >> readLn |
2023-07-24 20:01:03 +0200 | ripspin | (~chatzilla@1.145.128.171) |
2023-07-24 20:03:08 +0200 | ChanServ | (ChanServ@services.libera.chat) (shutting down) |
2023-07-24 20:03:46 +0200 | litharge | (litharge@libera/bot/litharge) (*.net *.split) |
2023-07-24 20:03:58 +0200 | danse-nr3__ | (~francesco@151.43.65.14) |
2023-07-24 20:04:23 +0200 | <monochrom> | No no no, skip the human, ask ChatGPT instead. >:) |
2023-07-24 20:05:29 +0200 | <monochrom> | To be fair, perhaps your "user" already means that. A program cannot tell whether the other end of stdin is human or computer, that's the whole point of unix piping and the Turing Test, right? :) |
2023-07-24 20:07:28 +0200 | <monochrom> | Hey I'm going to put that on my Unix-And-C exam! "Can your program determine whether stdin is human input as opposed to, say, ChatGPT?" |
2023-07-24 20:08:32 +0200 | ncf | . o O ( a human as opposed to a cat(1) ) |
2023-07-24 20:09:54 +0200 | <jean-paul[m]> | isn't ChatGPT input just human input with a little processing applied to it |
2023-07-24 20:11:25 +0200 | <monochrom> | Perhaps humanity input vs human input. |
2023-07-24 20:11:29 +0200 | <int-e> | if by "a little processing" you mean putting it through a meat grinder |
2023-07-24 20:11:37 +0200 | <int-e> | sure |
2023-07-24 20:12:25 +0200 | <int-e> | (it's a rather coarse one; some pieces make it through still recognizable, but they never quite fit together) |
2023-07-24 20:15:03 +0200 | ChanServ | (ChanServ@services.libera.chat) |
2023-07-24 20:15:03 +0200 | sodium.libera.chat | +o ChanServ |
2023-07-24 20:15:23 +0200 | litharge | (litharge@libera/bot/litharge) |
2023-07-24 20:19:19 +0200 | litharge | (litharge@libera/bot/litharge) (Remote host closed the connection) |
2023-07-24 20:19:22 +0200 | litharge | (litharge@libera/bot/litharge) |
2023-07-24 20:21:15 +0200 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) |
2023-07-24 20:23:19 +0200 | litharge | (litharge@libera/bot/litharge) (Remote host closed the connection) |
2023-07-24 20:23:22 +0200 | litharge | (litharge@libera/bot/litharge) |
2023-07-24 20:24:32 +0200 | <dminuoso> | "a little processing" sure. It's just above 8 figures in buying thousands of NVidia V100 GPUs and turning electricity into heat for months. |
2023-07-24 20:26:46 +0200 | <dminuoso> | The sheer electricity and hardware necessary to train large parameter models is absurdly and prohibitively high. |
2023-07-24 20:27:19 +0200 | litharge | (litharge@libera/bot/litharge) (Remote host closed the connection) |
2023-07-24 20:27:22 +0200 | litharge | (litharge@libera/bot/litharge) |
2023-07-24 20:30:12 +0200 | <monochrom> | I'm sure the original "a little" was not serious. |
2023-07-24 20:31:03 +0200 | glguy | -o glguy |
2023-07-24 20:31:19 +0200 | litharge | (litharge@libera/bot/litharge) (Remote host closed the connection) |
2023-07-24 20:31:25 +0200 | geekosaur | -o geekosaur |
2023-07-24 20:34:23 +0200 | <geekosaur> | mm, apparently the ban bot is a little unhappy still |
2023-07-24 20:34:33 +0200 | yushyin | (tGG5pLVJ8Y@2a01:4f8:1c17:80de::2) (Remote host closed the connection) |
2023-07-24 20:35:04 +0200 | yushyin | (BeTEisx90F@mail.karif.server-speed.net) |
2023-07-24 20:37:35 +0200 | yushyin | (BeTEisx90F@mail.karif.server-speed.net) (Client Quit) |
2023-07-24 20:38:06 +0200 | yushyin | (f4a8hbfH0Q@mail.karif.server-speed.net) |
2023-07-24 20:39:21 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-07-24 20:39:51 +0200 | hellwolf | (~user@5b3d-5cac-bb28-d008-0f00-4d40-07d0-2001.sta.estpak.ee) (Read error: Connection reset by peer) |
2023-07-24 20:47:48 +0200 | litharge | (litharge@libera/bot/litharge) |
2023-07-24 20:50:21 +0200 | ubert | (~Thunderbi@91.141.78.46.wireless.dyn.drei.com) |
2023-07-24 20:54:19 +0200 | gurkenglas | (~gurkengla@dynamic-046-114-092-039.46.114.pool.telefonica.de) |
2023-07-24 20:56:36 +0200 | titibandit | (~titibandi@user/titibandit) |
2023-07-24 21:10:32 +0200 | ripspin | (~chatzilla@1.145.128.171) (Remote host closed the connection) |
2023-07-24 21:13:34 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
2023-07-24 21:14:22 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) |
2023-07-24 21:16:57 +0200 | blueonyx | (~blueonyx@user/blueonyx) |
2023-07-24 21:19:22 +0200 | danse-nr3__ | (~francesco@151.43.65.14) (Ping timeout: 250 seconds) |
2023-07-24 21:19:32 +0200 | Feuermagier | (~Feuermagi@user/feuermagier) (Quit: Leaving) |
2023-07-24 21:20:43 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-07-24 21:23:10 +0200 | Lears | (~Leary]@user/Leary/x-0910699) |
2023-07-24 21:24:17 +0200 | ubert1 | (~Thunderbi@91.141.78.46.wireless.dyn.drei.com) |
2023-07-24 21:25:34 +0200 | [Leary] | (~Leary]@user/Leary/x-0910699) (Ping timeout: 260 seconds) |
2023-07-24 21:25:50 +0200 | nate2 | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2023-07-24 21:26:20 +0200 | hdggxin | (~hdggxin@122.175.41.19) (Remote host closed the connection) |
2023-07-24 21:27:02 +0200 | hdggxin | (~hdggxin@122.175.41.19) |
2023-07-24 21:29:47 +0200 | driib | (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat) |
2023-07-24 21:31:06 +0200 | driib | (~driib@vmi931078.contaboserver.net) |
2023-07-24 21:36:09 +0200 | Guest7406 | (~finn@176-151-21-224.abo.bbox.fr) |
2023-07-24 21:36:25 +0200 | <Guest7406> | what's the difference between each and traversed in the lens library? |
2023-07-24 21:36:45 +0200 | <Guest7406> | It seems they both focused on each element |
2023-07-24 21:37:34 +0200 | <geekosaur> | elements of a product type are very different from elements of a collection; the latter can be traversed, the former can't without extra work |
2023-07-24 21:37:50 +0200 | <geekosaur> | `each` does the extra work, `traversed` does a simple traversal |
2023-07-24 21:38:49 +0200 | <geekosaur> | that is, given `data Foo = Foo Int Int Int`, you can't use `traverse` on a `Foo` but you can use `each` on a lens over `Foo` |
2023-07-24 21:39:41 +0200 | <Guest7406> | ok this helps |
2023-07-24 21:39:53 +0200 | jinsun__ | (~jinsun@user/jinsun) |
2023-07-24 21:39:53 +0200 | jinsun | (~jinsun@user/jinsun) (Killed (silver.libera.chat (Nickname regained by services))) |
2023-07-24 21:39:53 +0200 | jinsun__ | jinsun |
2023-07-24 21:41:07 +0200 | <Guest7406> | [1, 2, 3, 4] & traversed . bitAt 1 %~ not |
2023-07-24 21:41:22 +0200 | <Guest7406> | it's still confusing why this example, i can also use each |
2023-07-24 21:41:43 +0200 | <Guest7406> | so it seems they are equivalent in some cases |
2023-07-24 21:41:47 +0200 | <geekosaur> | yes |
2023-07-24 21:42:40 +0200 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2023-07-24 21:42:51 +0200 | <geekosaur> | but consider `data Foo = Foo Int Int [String]` with a `Traversable` instance: `traversed` would traverse the list, `each` the `Int`s |
2023-07-24 21:43:22 +0200 | Feuermagier | (~Feuermagi@user/feuermagier) |
2023-07-24 21:43:48 +0200 | <geekosaur> | also, `traversed` needs a `Traversable` instance, `each` needs you to `makeLenses` the `Foo` |
2023-07-24 21:43:53 +0200 | <Guest7406> | ok so if we already have each, why still keep traversed |
2023-07-24 21:44:16 +0200 | <geekosaur> | the example I just gave where they do different things? |
2023-07-24 21:44:25 +0200 | <geekosaur> | [24 19:42:51] <geekosaur> but consider `data Foo = Foo Int Int [String]` with a `Traversable` instance: `traversed` would traverse the list, `each` the `Int`s |
2023-07-24 21:44:53 +0200 | <Guest7406> | in your example, each would also traverse the list |
2023-07-24 21:45:18 +0200 | <geekosaur> | but then what happens to the `Int`s? |
2023-07-24 21:46:03 +0200 | <Guest7406> | also using each? |
2023-07-24 21:46:22 +0200 | <geekosaur> | it can't produce both `Int` and `String` |
2023-07-24 21:46:55 +0200 | <geekosaur> | and even if it could, that'd still be a difference because `traversed` can't reach the `Int`s |
2023-07-24 21:47:30 +0200 | <geekosaur> | @let data WeirdList = WeirdList Int Int [String] |
2023-07-24 21:47:32 +0200 | <lambdabot> | Defined. |
2023-07-24 21:48:31 +0200 | <mauke> | > WeirdList 1 2 [] |
2023-07-24 21:48:31 +0200 | <geekosaur> | @let instance Traversable WeirdList where traverse (WeirdList _ _ l) = traverse l |
2023-07-24 21:48:32 +0200 | <lambdabot> | /sandbox/tmp/.L.hs:185:22: error: |
2023-07-24 21:48:32 +0200 | <lambdabot> | • Expected kind ‘* -> *’, but ‘WeirdList’ has kind ‘*’ |
2023-07-24 21:48:32 +0200 | <lambdabot> | • In the first argument of ‘Traversable’, namely ‘WeirdList’ |
2023-07-24 21:48:32 +0200 | <lambdabot> | error: |
2023-07-24 21:48:32 +0200 | <lambdabot> | • No instance for (Show WeirdList) |
2023-07-24 21:48:34 +0200 | <lambdabot> | arising from a use of ‘show_M58512676581970009428’ |
2023-07-24 21:48:35 +0200 | hugo | (znc@verdigris.lysator.liu.se) (Ping timeout: 264 seconds) |
2023-07-24 21:49:09 +0200 | <geekosaur> | oh right, that'd be MonoTraversable |
2023-07-24 21:49:17 +0200 | <geekosaur> | @undefine |
2023-07-24 21:49:17 +0200 | <lambdabot> | Undefined. |
2023-07-24 21:57:09 +0200 | waleee | (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
2023-07-24 21:57:14 +0200 | merijn | (~merijn@088-129-128-083.dynamic.caiway.nl) |
2023-07-24 22:02:02 +0200 | merijn | (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 246 seconds) |
2023-07-24 22:03:30 +0200 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:255a:b8f5:5ab9:11d7) (Remote host closed the connection) |
2023-07-24 22:06:15 +0200 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection) |
2023-07-24 22:08:02 +0200 | mik3d | (~mik3d@74.102.139.139) (Read error: Connection reset by peer) |
2023-07-24 22:12:10 +0200 | mik3d | (~mik3d@2607:fb91:e19:1b98:9dd8:64cc:c00c:9593) |
2023-07-24 22:13:32 +0200 | mik3d | (~mik3d@2607:fb91:e19:1b98:9dd8:64cc:c00c:9593) (Read error: Connection reset by peer) |
2023-07-24 22:14:54 +0200 | mik3d | (~mik3d@2607:fb91:e19:1b98:9dd8:64cc:c00c:9593) |
2023-07-24 22:16:50 +0200 | hugo | (znc@verdigris.lysator.liu.se) |
2023-07-24 22:20:55 +0200 | tstat_ | (~tstat@user/tstat) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-07-24 22:24:30 +0200 | tstat | (~tstat@user/tstat) |
2023-07-24 22:26:04 +0200 | <blueonyx> | > :t id |
2023-07-24 22:26:06 +0200 | <lambdabot> | <hint>:1:1: error: parse error on input ‘:’ |
2023-07-24 22:26:58 +0200 | <geekosaur> | :t id |
2023-07-24 22:26:59 +0200 | <lambdabot> | a -> a |
2023-07-24 22:28:58 +0200 | <blueonyx> | :t key |
2023-07-24 22:28:59 +0200 | <lambdabot> | error: |
2023-07-24 22:28:59 +0200 | <lambdabot> | • Variable not in scope: key |
2023-07-24 22:28:59 +0200 | <lambdabot> | • Perhaps you meant one of these: |
2023-07-24 22:29:03 +0200 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2023-07-24 22:30:14 +0200 | <blueonyx> | hi, i have the Data.Aeson.Lens traversal (key "doc") and an Value consisting of an Array of Objects, how can i apply (parseMaybe parseJSON) on this Value and only collect the Just values (like a catMaybes)? |
2023-07-24 22:32:27 +0200 | acidjnk_new | (~acidjnk@p200300d6e7072f58904a93af819a11ce.dip0.t-ipconnect.de) |
2023-07-24 22:32:51 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-07-24 22:33:17 +0200 | acidjnk | (~acidjnk@p200300d6e7072f584d4e4392af5360e4.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
2023-07-24 22:35:26 +0200 | ft | (~ft@p3e9bc042.dip0.t-ipconnect.de) |
2023-07-24 22:43:34 +0200 | asivitz | (uid178348@id-178348.tinside.irccloud.com) |
2023-07-24 22:44:09 +0200 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-07-24 22:47:07 +0200 | <ncf> | blueonyx: does foo ^.. values . key "doc" not work? |
2023-07-24 22:48:17 +0200 | <ncf> | > "[{\"doc\": 1},{},{\"doc\": 2}]" ^.. values . key "doc" |
2023-07-24 22:48:18 +0200 | <ncf> | [Number 1.0,Number 2.0] |
2023-07-24 22:48:18 +0200 | <lambdabot> | error: |
2023-07-24 22:48:18 +0200 | <lambdabot> | Variable not in scope: |
2023-07-24 22:48:18 +0200 | <lambdabot> | values :: b0 -> [Char] -> Const (Endo [a]) [Char]error: |
2023-07-24 22:48:24 +0200 | Guest7406 | (~finn@176-151-21-224.abo.bbox.fr) (Ping timeout: 260 seconds) |
2023-07-24 22:50:29 +0200 | mei | (~mei@user/mei) (Remote host closed the connection) |
2023-07-24 22:51:52 +0200 | rainbyte | (~rainbyte@181.31.239.226) (Ping timeout: 240 seconds) |
2023-07-24 22:52:17 +0200 | <blueonyx> | ncf: that always returns an empty list |
2023-07-24 22:53:14 +0200 | <blueonyx> | also the problem is my lack of understanding of traversals and lenses |
2023-07-24 22:53:30 +0200 | <ncf> | i just demonstrated that it doesn't, so you'll have to be more specific :) |
2023-07-24 22:53:35 +0200 | ormaaj | (~ormaaj@user/ormaaj) (Killed (NickServ (GHOST command used by ormaaj2))) |
2023-07-24 22:54:13 +0200 | <blueonyx> | how does it know key now? |
2023-07-24 22:54:48 +0200 | Inst__ | (~Inst@2601:6c4:4081:2fc0:1cc8:47b:7c0e:fa36) |
2023-07-24 22:56:30 +0200 | <ncf> | `values` is a Traversal that targets all the values of an array. `key "doc"` is a Traversal that targets the value under the key "doc" of an object, if it exists (so, 0 or 1 targets). by composing them, you get a Traversal that targets all the values under the key "doc" of each object of an array (in jq notation, .[].doc) |
2023-07-24 22:57:05 +0200 | <ncf> | ^.. extracts all the targets of the traversal as a list |
2023-07-24 22:58:32 +0200 | mei | (~mei@user/mei) |
2023-07-24 22:59:11 +0200 | Guest7406 | (~finn@176-151-21-224.abo.bbox.fr) |
2023-07-24 23:00:20 +0200 | <blueonyx> | yea thanks values is probably what i was missing (and the doc key in my actual test data xD) |
2023-07-24 23:00:44 +0200 | jmdaemon | (~jmdaemon@user/jmdaemon) |
2023-07-24 23:03:10 +0200 | mik3d | (~mik3d@2607:fb91:e19:1b98:9dd8:64cc:c00c:9593) (Read error: Connection reset by peer) |
2023-07-24 23:04:00 +0200 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
2023-07-24 23:04:27 +0200 | <blueonyx> | doesnt lens have some magic to automatically throw Nothing away? i here right now: |
2023-07-24 23:04:31 +0200 | <blueonyx> | catMaybes $ map (parseMaybe parseJSON) $ res ^?! _Right._1.key "rows" ^.. values . key "doc" |
2023-07-24 23:05:02 +0200 | <blueonyx> | and believe there musst be some crazy operator to get rid of map and catMaybes xD |
2023-07-24 23:05:17 +0200 | <ncf> | well, there's _Just, but key is already atKey composed with _Just |
2023-07-24 23:05:25 +0200 | <ncf> | (sort of) |
2023-07-24 23:05:45 +0200 | <blueonyx> | parseMaybe gives Maybe a again |
2023-07-24 23:06:25 +0200 | <blueonyx> | i want to parse the values of the "doc" key into haskell values (they have FromJSON instances) |
2023-07-24 23:07:10 +0200 | mik3d | (~mik3d@2607:fb91:e19:1b98:9dd8:64cc:c00c:9593) |
2023-07-24 23:07:14 +0200 | Qudit | (~user@user/Qudit) (Remote host closed the connection) |
2023-07-24 23:07:15 +0200 | mik3d | (~mik3d@2607:fb91:e19:1b98:9dd8:64cc:c00c:9593) (Read error: Connection reset by peer) |
2023-07-24 23:07:41 +0200 | <ncf> | key "doc" . to (parseMaybe parseJSON) . _Just |
2023-07-24 23:08:49 +0200 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
2023-07-24 23:10:42 +0200 | <ncf> | this will skip the parse failures, which may not be what you want |
2023-07-24 23:11:22 +0200 | titibandit | (~titibandi@user/titibandit) (Remote host closed the connection) |
2023-07-24 23:13:19 +0200 | mik3d | (~mik3d@2607:fb91:e19:1b98:9dd8:64cc:c00c:9593) |
2023-07-24 23:14:06 +0200 | fendor | (~fendor@2a02:8388:1640:be00:1f28:32b1:54ac:a932) (Remote host closed the connection) |
2023-07-24 23:14:57 +0200 | <blueonyx> | well right now it seems that's what i want xD thank you so much! |
2023-07-24 23:16:34 +0200 | <blueonyx> | of course better error handling instead of silently failing would be great |
2023-07-24 23:18:12 +0200 | <ncf> | blueonyx: wait it's actually much simpler |
2023-07-24 23:18:18 +0200 | <ncf> | key "doc" . _JSON |
2023-07-24 23:19:50 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) (Ping timeout: 250 seconds) |
2023-07-24 23:20:08 +0200 | <blueonyx> | wow |
2023-07-24 23:22:50 +0200 | mik3d | (~mik3d@2607:fb91:e19:1b98:9dd8:64cc:c00c:9593) (Remote host closed the connection) |
2023-07-24 23:22:57 +0200 | mik3d | (~mik3d@2607:fb91:e19:1b98:9dd8:64cc:c00c:9593) |
2023-07-24 23:25:20 +0200 | misterfish | (~misterfis@84-53-85-146.bbserv.nl) |
2023-07-24 23:28:16 +0200 | ubert1 | (~Thunderbi@91.141.78.46.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
2023-07-24 23:28:35 +0200 | ub | (~Thunderbi@178.115.73.155.wireless.dyn.drei.com) |
2023-07-24 23:30:24 +0200 | ubert | (~Thunderbi@91.141.78.46.wireless.dyn.drei.com) (Ping timeout: 260 seconds) |
2023-07-24 23:30:24 +0200 | ub | ubert |
2023-07-24 23:32:41 +0200 | mik3d | (~mik3d@2607:fb91:e19:1b98:9dd8:64cc:c00c:9593) (Ping timeout: 246 seconds) |
2023-07-24 23:35:23 +0200 | mik3d | (~mik3d@74.102.139.139) |
2023-07-24 23:36:50 +0200 | Guest7406 | (~finn@176-151-21-224.abo.bbox.fr) (Ping timeout: 244 seconds) |
2023-07-24 23:38:21 +0200 | blueonyx | (~blueonyx@user/blueonyx) (Ping timeout: 245 seconds) |
2023-07-24 23:38:50 +0200 | kilolympus | (~kilolympu@cpc105064-sgyl40-2-0-cust46.18-2.cable.virginm.net) |
2023-07-24 23:38:51 +0200 | alphabeta | (~kilolympu@cpc105064-sgyl40-2-0-cust46.18-2.cable.virginm.net) |
2023-07-24 23:39:52 +0200 | alphabeta | (~kilolympu@cpc105064-sgyl40-2-0-cust46.18-2.cable.virginm.net) (Client Quit) |
2023-07-24 23:40:25 +0200 | mik3d | (~mik3d@74.102.139.139) (Read error: Connection reset by peer) |
2023-07-24 23:43:58 +0200 | mncheck | (~mncheck@193.224.205.254) (Ping timeout: 260 seconds) |
2023-07-24 23:49:41 +0200 | natechan | (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
2023-07-24 23:51:49 +0200 | oo_miguel | (~Thunderbi@78-11-179-96.static.ip.netia.com.pl) (Ping timeout: 244 seconds) |
2023-07-24 23:53:03 +0200 | mik3d | (~mik3d@74.102.139.139) |