2023-12-16 00:05:59 +0100 | machinedgod | (~machinedg@crnet-01-022.ikbnet.co.at) (Ping timeout: 264 seconds) |
2023-12-16 00:09:14 +0100 | motherfsck | (~motherfsc@user/motherfsck) (Ping timeout: 268 seconds) |
2023-12-16 00:10:28 +0100 | peterbecich | (~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds) |
2023-12-16 00:11:06 +0100 | michalz | (~michalz@185.246.207.221) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-12-16 00:13:30 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3240-7f7a-60e7-da22-4b0d-67d6.rev.sfr.net) (Remote host closed the connection) |
2023-12-16 00:15:06 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3240-7f7a-60e7-da22-4b0d-67d6.rev.sfr.net) |
2023-12-16 00:15:22 +0100 | motherfsck | (~motherfsc@user/motherfsck) |
2023-12-16 00:19:52 +0100 | target_i | (~target_i@217.175.14.39) (Quit: leaving) |
2023-12-16 00:24:33 +0100 | aruns | (~aruns@user/aruns) (Ping timeout: 252 seconds) |
2023-12-16 00:25:20 +0100 | CiaoSen | (~Jura@2a05:5800:2b7:6a00:ca4b:d6ff:fec1:99da) |
2023-12-16 00:41:40 +0100 | acidjnk | (~acidjnk@p200300d6e72b9322007c3ef187da4880.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2023-12-16 00:47:16 +0100 | Guest28 | (~Guest28@c-73-194-110-178.hsd1.nj.comcast.net) |
2023-12-16 00:50:14 +0100 | prasad | (~prasad@2601:243:c001:3f07::54) |
2023-12-16 00:54:02 +0100 | <prasad> | Hi I am trying to parse a string "1 2 3 4 | 9 5 6 7" into ([Int], [Int]) tuple. But facing a issue unidentified character | found. If I remove the space between 4 & "|" and 9 and "|" it works here is my code. https://paste.tomsmeding.com/88Ndzrxh I guess the extra space is causing the issue but I am not able to figure out how to fix it |
2023-12-16 00:54:14 +0100 | ystael | (~ystael@user/ystael) |
2023-12-16 00:55:51 +0100 | <monochrom> | 1. Amend integerParser to slurp trailing spaces. Perhaps: (read <$> many1 digit) <* many space |
2023-12-16 00:56:07 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3240-7f7a-60e7-da22-4b0d-67d6.rev.sfr.net) (Remote host closed the connection) |
2023-12-16 00:56:08 +0100 | <monochrom> | 2. Likewise, Amend "char '|'" to slurp trailing spaces. |
2023-12-16 00:57:16 +0100 | <monochrom> | 0. Have a top-level parser that slurps leading spaces, e.g., many space *> listParser. |
2023-12-16 00:57:56 +0100 | <monochrom> | That is the general idomatic strategy for dealing with whitespace-insensitive syntax. |
2023-12-16 00:58:02 +0100 | <dminuoso_> | The general idiom is to have a `token :: Parser a -> Parser a` kind of parser that always consumes either leading or trailing whitespace. |
2023-12-16 00:59:13 +0100 | <dminuoso_> | And then define your token parsers (in the sense of a lexer/tokenizer) in terms of that combinator. |
2023-12-16 01:00:03 +0100 | <dminuoso_> | This has the added beauty, that your integerParser because simply `many integerParser` where `integerParser = token $ ...` |
2023-12-16 01:00:46 +0100 | <monochrom> | My course notes https://www.cs.utoronto.ca/~trebla/CSCC24-2023-Summer/08-parsing.html#token explains this strategy. (A later section covers leading spaces.) |
2023-12-16 01:01:54 +0100 | <prasad> | so I changed my integerParser to integerParser = (read <$> many1 digit) <* many space & in listsParser char '|' <* many space & it worked like a charm |
2023-12-16 01:02:02 +0100 | <prasad> | Thanks a bunch guys |
2023-12-16 01:03:06 +0100 | <prasad> | :here is the updated code https://paste.tomsmeding.com/sYO9QRga |
2023-12-16 01:05:11 +0100 | Guest28 | (~Guest28@c-73-194-110-178.hsd1.nj.comcast.net) (Quit: Client closed) |
2023-12-16 01:06:16 +0100 | <dminuoso_> | prasad: https://paste.tomsmeding.com/1Trf1otw I was thinking along those lines. |
2023-12-16 01:07:38 +0100 | <dminuoso_> | prasad: I think the core point here is to not use: `sepBy` space |
2023-12-16 01:07:48 +0100 | <dminuoso_> | See monochrom's link above. |
2023-12-16 01:10:05 +0100 | ystael | (~ystael@user/ystael) (Ping timeout: 256 seconds) |
2023-12-16 01:21:33 +0100 | pavonia | (~user@user/siracusa) |
2023-12-16 01:32:12 +0100 | OscarZ | (~oscarz@mobile-access-b04821-89.dhcp.inet.fi) |
2023-12-16 01:36:06 +0100 | OscarZ | (~oscarz@mobile-access-b04821-89.dhcp.inet.fi) (Client Quit) |
2023-12-16 01:37:08 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Quit: Leaving.) |
2023-12-16 01:37:37 +0100 | ugupta_ | (~ugupta@h135-135-187-62.mdsnwi.broadband.dynamic.tds.net) |
2023-12-16 01:38:37 +0100 | ugupta_ | (~ugupta@h135-135-187-62.mdsnwi.broadband.dynamic.tds.net) (Client Quit) |
2023-12-16 01:39:56 +0100 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2023-12-16 01:46:21 +0100 | mechap | (~mechap@user/mechap) |
2023-12-16 01:50:22 +0100 | tomboy64 | (~tomboy64@user/tomboy64) (Ping timeout: 276 seconds) |
2023-12-16 01:56:49 +0100 | kilolympus | (~kilolympu@31.205.200.246) (Quit: See you later! :)) |
2023-12-16 01:58:41 +0100 | cursedcode78 | (~cursedcod@209.54.101.166) |
2023-12-16 02:01:47 +0100 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2023-12-16 02:03:36 +0100 | tomboy64 | (~tomboy64@user/tomboy64) |
2023-12-16 02:05:18 +0100 | rosco | (~rosco@175.136.152.56) |
2023-12-16 02:06:51 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2023-12-16 02:06:53 +0100 | oo_miguel | (~Thunderbi@78-11-179-96.static.ip.netia.com.pl) (Ping timeout: 240 seconds) |
2023-12-16 02:07:53 +0100 | myme | (~myme@2a01:799:d60:e400:f494:822d:598a:260f) (Ping timeout: 256 seconds) |
2023-12-16 02:08:56 +0100 | myme | (~myme@2a01:799:d60:e400:6489:87d4:bbd5:b8cc) |
2023-12-16 02:17:18 +0100 | idgaen | (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.1.1) |
2023-12-16 02:17:43 +0100 | califax | (~califax@user/califx) |
2023-12-16 02:23:06 +0100 | peterbecich | (~Thunderbi@047-229-123-186.res.spectrum.com) |
2023-12-16 02:34:38 +0100 | <EvanR> | >Initial space, final junk |
2023-12-16 02:34:53 +0100 | <EvanR> | or |
2023-12-16 02:35:02 +0100 | <EvanR> | Space: the final junk |
2023-12-16 02:38:50 +0100 | <monochrom> | Space: The Final Junkyard. :) |
2023-12-16 02:38:56 +0100 | araujo | (~araujo@45.146.54.162) (Ping timeout: 256 seconds) |
2023-12-16 02:39:44 +0100 | <monochrom> | These are the voyages of entropy increase. To boldly go where no life can survive. >:) |
2023-12-16 02:44:58 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 276 seconds) |
2023-12-16 02:50:29 +0100 | cursedcode78 | (~cursedcod@209.54.101.166) (Quit: Client closed) |
2023-12-16 02:57:40 +0100 | rovaughn | (~rovaughn@066-065-097-119.res.spectrum.com) |
2023-12-16 02:58:09 +0100 | <EvanR> | life: a somewhat more efficient way to max out entropy |
2023-12-16 03:02:05 +0100 | CiaoSen | (~Jura@2a05:5800:2b7:6a00:ca4b:d6ff:fec1:99da) (Ping timeout: 240 seconds) |
2023-12-16 03:07:25 +0100 | rovaughn | (~rovaughn@066-065-097-119.res.spectrum.com) (Excess Flood) |
2023-12-16 03:12:30 +0100 | rovaughn | (~rovaughn@066-065-097-119.res.spectrum.com) |
2023-12-16 03:23:02 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) |
2023-12-16 03:27:25 +0100 | rovaughn | (~rovaughn@066-065-097-119.res.spectrum.com) (Remote host closed the connection) |
2023-12-16 03:28:15 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 252 seconds) |
2023-12-16 03:34:05 +0100 | arkoinad | (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
2023-12-16 03:36:46 +0100 | prasad | (~prasad@2601:243:c001:3f07::54) (Quit: Client closed) |
2023-12-16 03:51:10 +0100 | bilegeek | (~bilegeek@2600:1008:b0af:15b4:4193:db31:a8f0:db75) |
2023-12-16 04:02:14 +0100 | cursedcode | (~cursedcod@209.54.101.166) |
2023-12-16 04:05:01 +0100 | kritty | (~crumb@c-76-155-235-153.hsd1.co.comcast.net) |
2023-12-16 04:07:35 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:cc52:bab0:d69e:7e9e) (Remote host closed the connection) |
2023-12-16 04:07:50 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:cc52:bab0:d69e:7e9e) |
2023-12-16 04:17:19 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) |
2023-12-16 04:21:43 +0100 | kritty | (~crumb@c-76-155-235-153.hsd1.co.comcast.net) (Quit: Leaving) |
2023-12-16 04:22:04 +0100 | nahawand | (~nahawand@176.254.244.83) (Ping timeout: 255 seconds) |
2023-12-16 04:23:41 +0100 | tornato | (uid197568@id-197568.tinside.irccloud.com) |
2023-12-16 04:32:03 +0100 | peterbecich | (~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2023-12-16 04:32:49 +0100 | td_ | (~td@i53870901.versanet.de) (Ping timeout: 256 seconds) |
2023-12-16 04:34:21 +0100 | td_ | (~td@i53870901.versanet.de) |
2023-12-16 04:36:38 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
2023-12-16 04:41:30 +0100 | edr | (~edr@user/edr) (Quit: Leaving) |
2023-12-16 04:55:29 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
2023-12-16 04:55:29 +0100 | finn_elija | (~finn_elij@user/finn-elija/x-0085643) |
2023-12-16 04:55:29 +0100 | finn_elija | FinnElija |
2023-12-16 04:56:44 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2023-12-16 04:57:12 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2023-12-16 05:01:51 +0100 | nahawand | (~nahawand@176.254.244.83) |
2023-12-16 05:10:55 +0100 | waleee | (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 256 seconds) |
2023-12-16 05:19:11 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 264 seconds) |
2023-12-16 05:22:14 +0100 | prasad80 | (~prasad@2601:243:c001:3f07::54) |
2023-12-16 05:33:13 +0100 | trev | (~trev@user/trev) |
2023-12-16 05:33:22 +0100 | aforemny | (~aforemny@2001:9e8:6cdf:e100:887b:7deb:8e79:d944) |
2023-12-16 05:33:41 +0100 | aforemny_ | (~aforemny@2001:9e8:6cf8:1100:2b89:5b54:fffc:6f71) (Ping timeout: 240 seconds) |
2023-12-16 05:35:36 +0100 | peterbecich | (~Thunderbi@047-229-123-186.res.spectrum.com) |
2023-12-16 05:50:57 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2023-12-16 05:59:23 +0100 | not_reserved | (~not_reser@154.16.157.99) |
2023-12-16 06:01:16 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2023-12-16 06:01:16 +0100 | <albet70> | in if-then-else, is there a way to break in then branch to run else branch? |
2023-12-16 06:01:49 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2023-12-16 06:09:39 +0100 | <probie> | You can do something like `let f = ... in if p then (do { something; if q then ... else f }) else f` |
2023-12-16 06:11:49 +0100 | <albet70> | right |
2023-12-16 06:17:01 +0100 | <ski> | do you have monadic actions ? |
2023-12-16 06:21:40 +0100 | not_reserved | (~not_reser@154.16.157.99) (Quit: Client closed) |
2023-12-16 06:23:33 +0100 | <albet70> | yes, there's IO actions in it |
2023-12-16 06:27:43 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
2023-12-16 06:29:03 +0100 | not_reserved | (~not_reser@154.16.157.99) |
2023-12-16 06:29:27 +0100 | <ski> | @hoogle Monad m => m Bool -> m Bool -> m Bool |
2023-12-16 06:29:28 +0100 | <lambdabot> | System.Directory.Internal andM :: Monad m => m Bool -> m Bool -> m Bool |
2023-12-16 06:29:28 +0100 | <lambdabot> | Control.Monad.Extra (||^) :: Monad m => m Bool -> m Bool -> m Bool |
2023-12-16 06:29:28 +0100 | <lambdabot> | Control.Monad.Extra (&&^) :: Monad m => m Bool -> m Bool -> m Bool |
2023-12-16 06:29:41 +0100 | phma | (phma@2001:5b0:211f:ca48:659b:29e6:dda5:53ee) (Read error: Connection reset by peer) |
2023-12-16 06:30:37 +0100 | phma | (phma@2001:5b0:2144:9b8:80e2:c70c:189:5704) |
2023-12-16 06:42:40 +0100 | anon1123 | (~anon1123@2a02:ab88:282:b00:da3a:ddff:fe3a:947c) (Ping timeout: 268 seconds) |
2023-12-16 06:43:24 +0100 | tornato | (uid197568@id-197568.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
2023-12-16 06:43:32 +0100 | anon1123 | (~anon1123@2a02:ab88:282:b00:da3a:ddff:fe3a:947c) |
2023-12-16 07:09:40 +0100 | peterbecich | (~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 246 seconds) |
2023-12-16 07:22:31 +0100 | harveypwca | (~harveypwc@2601:246:c280:7940:585a:99af:3e4c:209b) |
2023-12-16 07:44:09 +0100 | waldo | (~waldo@user/waldo) |
2023-12-16 07:45:10 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2023-12-16 07:53:16 +0100 | nahawand | (~nahawand@176.254.244.83) (Quit: Connection error?!) |
2023-12-16 07:54:07 +0100 | starlight | (~starlight@176.254.244.83) |
2023-12-16 08:04:12 +0100 | <cheater> | https://github.com/Matthew-Mosior/fasta-region-inspector/blob/main/src/Linear/UtilityLinear.hs |
2023-12-16 08:15:55 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-12-16 08:17:02 +0100 | waldo | (~waldo@user/waldo) (Ping timeout: 260 seconds) |
2023-12-16 08:24:50 +0100 | cursedcode | (~cursedcod@209.54.101.166) (Ping timeout: 250 seconds) |
2023-12-16 08:27:00 +0100 | waldo | (~waldo@user/waldo) |
2023-12-16 08:30:46 +0100 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) (Ping timeout: 276 seconds) |
2023-12-16 08:31:09 +0100 | acidjnk | (~acidjnk@p200300d6e72b93746955d227447c985a.dip0.t-ipconnect.de) |
2023-12-16 08:32:08 +0100 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) |
2023-12-16 08:54:44 +0100 | alp__ | (~alp@2001:861:e3d6:8f80:5927:5ec3:fb09:589c) |
2023-12-16 09:06:33 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
2023-12-16 09:16:02 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) |
2023-12-16 09:21:20 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 252 seconds) |
2023-12-16 09:25:13 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-12-16 09:27:58 +0100 | waldo | (~waldo@user/waldo) (Ping timeout: 276 seconds) |
2023-12-16 09:34:13 +0100 | bilegeek | (~bilegeek@2600:1008:b0af:15b4:4193:db31:a8f0:db75) (Quit: Leaving) |
2023-12-16 09:35:07 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
2023-12-16 09:43:33 +0100 | waldo | (~waldo@user/waldo) |
2023-12-16 09:46:49 +0100 | mikess | (~sam@user/mikess) (Ping timeout: 276 seconds) |
2023-12-16 09:54:11 +0100 | danza | (~danza@151.57.228.124) |
2023-12-16 10:03:05 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2023-12-16 10:03:31 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2023-12-16 10:05:21 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:cc52:bab0:d69e:7e9e) (Remote host closed the connection) |
2023-12-16 10:07:34 +0100 | CiaoSen | (~Jura@2a05:5800:281:7400:ca4b:d6ff:fec1:99da) |
2023-12-16 10:08:47 +0100 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2023-12-16 10:08:55 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) |
2023-12-16 10:13:23 +0100 | Square | (~Square@user/square) (Ping timeout: 256 seconds) |
2023-12-16 10:14:48 +0100 | tzh | (~tzh@c-71-193-181-0.hsd1.or.comcast.net) (Quit: zzz) |
2023-12-16 10:20:21 +0100 | alp__ | (~alp@2001:861:e3d6:8f80:5927:5ec3:fb09:589c) (Ping timeout: 268 seconds) |
2023-12-16 10:20:46 +0100 | jmdaemon | (~jmdaemon@user/jmdaemon) (Ping timeout: 246 seconds) |
2023-12-16 10:20:59 +0100 | oo_miguel | (~Thunderbi@78-11-179-96.static.ip.netia.com.pl) |
2023-12-16 10:21:23 +0100 | econo_ | (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
2023-12-16 10:24:39 +0100 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2023-12-16 10:25:17 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds) |
2023-12-16 10:26:04 +0100 | Lord_of_Life_ | Lord_of_Life |
2023-12-16 10:26:43 +0100 | waldo | (~waldo@user/waldo) (Ping timeout: 246 seconds) |
2023-12-16 10:28:00 +0100 | mechap | (~mechap@user/mechap) (Quit: WeeChat 4.1.2) |
2023-12-16 10:34:23 +0100 | alp__ | (~alp@2001:861:e3d6:8f80:5871:e261:32c:c3e7) |
2023-12-16 10:36:00 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:cc52:bab0:d69e:7e9e) |
2023-12-16 10:37:58 +0100 | coot | (~coot@89-69-206-216.dynamic.chello.pl) |
2023-12-16 10:40:09 +0100 | aruns | (~aruns@user/aruns) |
2023-12-16 10:49:34 +0100 | waldo | (~waldo@user/waldo) |
2023-12-16 10:49:42 +0100 | danza | (~danza@151.57.228.124) (Ping timeout: 256 seconds) |
2023-12-16 10:50:55 +0100 | <haskellbridge> | 12<Celestial> how would one right their own prelude without having to do the "dirty" stuff? |
2023-12-16 10:50:56 +0100 | <haskellbridge> | 12<Celestial> Namely keep things that are required for the language to work like `IO` and `[]/(:)` but be able to write everything else from scratch |
2023-12-16 10:51:03 +0100 | <haskellbridge> | 12<Celestial> s/right/write |
2023-12-16 10:54:28 +0100 | Nurda | (~Nurda@144.214.255.102) |
2023-12-16 10:55:22 +0100 | <haskellbridge> | 12<Celestial> It looks like you can re-export all the necessary things? |
2023-12-16 10:58:48 +0100 | Nixkernal | (~Nixkernal@115.16.194.178.dynamic.wline.res.cust.swisscom.ch) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
2023-12-16 11:02:19 +0100 | danza | (~danza@151.43.252.253) |
2023-12-16 11:02:46 +0100 | leungbk | (~user@142-129-149-172.res.spectrum.com) |
2023-12-16 11:03:59 +0100 | Nixkernal | (~Nixkernal@115.16.194.178.dynamic.wline.res.cust.swisscom.ch) |
2023-12-16 11:04:53 +0100 | Nurda_ | (~Nurda@144.214.255.102) |
2023-12-16 11:06:00 +0100 | Nurda_ | noordahx |
2023-12-16 11:06:20 +0100 | noordahx | (~Nurda@144.214.255.102) (Client Quit) |
2023-12-16 11:06:26 +0100 | Nurda | (~Nurda@144.214.255.102) (Quit: Client closed) |
2023-12-16 11:07:50 +0100 | noordahx | (~Nurda@144.214.255.102) |
2023-12-16 11:08:30 +0100 | Nixkernal | (~Nixkernal@115.16.194.178.dynamic.wline.res.cust.swisscom.ch) (Client Quit) |
2023-12-16 11:14:24 +0100 | Nixkernal | (~Nixkernal@115.16.194.178.dynamic.wline.res.cust.swisscom.ch) |
2023-12-16 11:14:37 +0100 | <mauke> | yes, pretty much |
2023-12-16 11:19:41 +0100 | CiaoSen | (~Jura@2a05:5800:281:7400:ca4b:d6ff:fec1:99da) (Ping timeout: 240 seconds) |
2023-12-16 11:23:29 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2023-12-16 11:25:11 +0100 | oo_miguel | (~Thunderbi@78-11-179-96.static.ip.netia.com.pl) (Ping timeout: 264 seconds) |
2023-12-16 11:26:44 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2023-12-16 11:27:42 +0100 | euleritian | (~euleritia@dynamic-046-114-201-184.46.114.pool.telefonica.de) |
2023-12-16 11:27:51 +0100 | harveypwca | (~harveypwc@2601:246:c280:7940:585a:99af:3e4c:209b) (Quit: Leaving) |
2023-12-16 11:28:02 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2023-12-16 11:32:51 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
2023-12-16 11:36:20 +0100 | idgaen | (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
2023-12-16 11:38:29 +0100 | ByronJohnson | (~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) (Ping timeout: 240 seconds) |
2023-12-16 11:40:23 +0100 | ByronJohnson | (~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) |
2023-12-16 11:51:28 +0100 | <haskellbridge> | 12<Celestial> hm, but what if I wanted to write an alternative to base? Would that work the same? |
2023-12-16 11:51:39 +0100 | <haskellbridge> | 12<Celestial> Not just an alternate prelude |
2023-12-16 12:02:43 +0100 | leungbk | (~user@142-129-149-172.res.spectrum.com) (Ping timeout: 268 seconds) |
2023-12-16 12:06:41 +0100 | leungbk | (~user@142-129-149-172.res.spectrum.com) |
2023-12-16 12:07:20 +0100 | oo_miguel | (~Thunderbi@78-11-179-96.static.ip.netia.com.pl) |
2023-12-16 12:07:57 +0100 | euleritian | (~euleritia@dynamic-046-114-201-184.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
2023-12-16 12:08:17 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2023-12-16 12:09:41 +0100 | waldo | (~waldo@user/waldo) (Quit: waldo) |
2023-12-16 12:09:47 +0100 | xff0x | (~xff0x@ai085147.d.east.v6connect.net) (Ping timeout: 260 seconds) |
2023-12-16 12:11:42 +0100 | xff0x | (~xff0x@178.255.149.135) |
2023-12-16 12:13:54 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2023-12-16 12:19:20 +0100 | xdminsy | (~xdminsy@117.147.70.160) |
2023-12-16 12:21:01 +0100 | __monty__ | (~toonn@user/toonn) |
2023-12-16 12:21:19 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3240-635d-855c-cf07-660d-fffe.rev.sfr.net) |
2023-12-16 12:22:40 +0100 | Nixkernal | (~Nixkernal@115.16.194.178.dynamic.wline.res.cust.swisscom.ch) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
2023-12-16 12:23:00 +0100 | Nixkernal | (~Nixkernal@115.16.194.178.dynamic.wline.res.cust.swisscom.ch) |
2023-12-16 12:24:47 +0100 | woffs | (3cd46299b2@woffs.de) (Quit: Gateway shutdown) |
2023-12-16 12:29:55 +0100 | xff0x | (~xff0x@178.255.149.135) (Ping timeout: 246 seconds) |
2023-12-16 12:31:19 +0100 | alp__ | (~alp@2001:861:e3d6:8f80:5871:e261:32c:c3e7) (Ping timeout: 246 seconds) |
2023-12-16 12:31:55 +0100 | xff0x | (~xff0x@2405:6580:b080:900:bdad:1ce:360:7acb) |
2023-12-16 12:33:28 +0100 | gmg | (~user@user/gehmehgeh) |
2023-12-16 12:34:23 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2023-12-16 12:34:35 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2023-12-16 12:40:07 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Quit: Leaving) |
2023-12-16 12:40:13 +0100 | __monty__ | (~toonn@user/toonn) (Ping timeout: 255 seconds) |
2023-12-16 12:41:52 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2023-12-16 12:42:05 +0100 | __monty__ | (~toonn@user/toonn) |
2023-12-16 12:45:36 +0100 | g | (glguy@libera/staff/glguy) (Read error: Connection reset by peer) |
2023-12-16 12:46:30 +0100 | g | (g@libera/staff/glguy) |
2023-12-16 12:47:32 +0100 | glguy | (g@libera/staff/glguy) (Read error: Connection reset by peer) |
2023-12-16 12:48:33 +0100 | idgaen | (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.1.1) |
2023-12-16 12:49:41 +0100 | alp__ | (~alp@2001:861:e3d6:8f80:9e9a:65d5:880b:617e) |
2023-12-16 12:52:40 +0100 | woffs | (3cd46299b2@woffs.de) |
2023-12-16 12:57:47 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-12-16 13:00:29 +0100 | danza | (~danza@151.43.252.253) (Ping timeout: 240 seconds) |
2023-12-16 13:01:39 +0100 | rosco | (~rosco@175.136.152.56) (Quit: Lost terminal) |
2023-12-16 13:01:49 +0100 | xff0x | (~xff0x@2405:6580:b080:900:bdad:1ce:360:7acb) (Ping timeout: 276 seconds) |
2023-12-16 13:03:13 +0100 | xff0x | (~xff0x@ai085147.d.east.v6connect.net) |
2023-12-16 13:03:56 +0100 | glguy | (g@libera/staff/glguy) |
2023-12-16 13:06:31 +0100 | zincy | (~tom@2a00:23c8:9705:9501:4425:940f:c2d:62c4) (Remote host closed the connection) |
2023-12-16 13:08:26 +0100 | troydm | (~troydm@user/troydm) |
2023-12-16 13:09:15 +0100 | qqq | (~qqq@92.43.167.61) (Quit: leaving) |
2023-12-16 13:15:17 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
2023-12-16 13:17:16 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2023-12-16 13:17:44 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) |
2023-12-16 13:19:57 +0100 | Inst | (~Inst@120.244.192.156) |
2023-12-16 13:22:29 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
2023-12-16 13:22:31 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds) |
2023-12-16 13:22:50 +0100 | euleritian | (~euleritia@dynamic-046-114-201-184.46.114.pool.telefonica.de) |
2023-12-16 13:23:21 +0100 | leungbk | (~user@142-129-149-172.res.spectrum.com) (Ping timeout: 252 seconds) |
2023-12-16 13:25:22 +0100 | ht_ | (~Thunderbi@194.110.115.49) |
2023-12-16 13:26:03 +0100 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Ping timeout: 256 seconds) |
2023-12-16 13:26:04 +0100 | ht_ | _ht |
2023-12-16 13:29:04 +0100 | end | (~end@user/end/x-0094621) (Quit: end) |
2023-12-16 13:29:04 +0100 | mosul | (mosul@user/mosul) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
2023-12-16 13:29:04 +0100 | bcksl | (~bcksl@user/bcksl) (Quit: \) |
2023-12-16 13:29:59 +0100 | araujo | (~araujo@45.131.194.168) |
2023-12-16 13:31:03 +0100 | euleritian | (~euleritia@dynamic-046-114-201-184.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
2023-12-16 13:31:20 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2023-12-16 13:37:21 +0100 | leungbk | (~user@142-129-149-172.res.spectrum.com) |
2023-12-16 13:44:39 +0100 | m1dnight_ | (~christoph@78-22-2-15.access.telenet.be) |
2023-12-16 13:45:32 +0100 | [Leary] | (~Leary]@user/Leary/x-0910699) (Remote host closed the connection) |
2023-12-16 13:45:46 +0100 | [Leary] | (~Leary]@user/Leary/x-0910699) |
2023-12-16 13:45:58 +0100 | johnw | (~johnw@69.62.242.138) (Read error: Connection reset by peer) |
2023-12-16 13:46:08 +0100 | bcksl | (~bcksl@user/bcksl) |
2023-12-16 13:46:26 +0100 | son0p | (~ff@181.136.122.143) (Ping timeout: 252 seconds) |
2023-12-16 13:46:42 +0100 | doyougnu | (~doyougnu@045-046-170-068.res.spectrum.com) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-12-16 13:47:19 +0100 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) |
2023-12-16 13:47:58 +0100 | doyougnu | (~doyougnu@045-046-170-068.res.spectrum.com) |
2023-12-16 13:49:30 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) (Quit: WeeChat 4.1.1) |
2023-12-16 13:49:52 +0100 | johnw | (~johnw@69.62.242.138) |
2023-12-16 13:50:07 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2023-12-16 13:50:21 +0100 | m1dnight_ | (~christoph@78-22-2-15.access.telenet.be) (Ping timeout: 245 seconds) |
2023-12-16 13:50:46 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2023-12-16 13:52:10 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) |
2023-12-16 13:53:25 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) (Client Quit) |
2023-12-16 13:53:29 +0100 | end | (~end@user/end/x-0094621) |
2023-12-16 13:53:36 +0100 | fr33domlover | (~fr33domlo@towards.vision) (Quit: The Lounge - https://thelounge.chat) |
2023-12-16 13:54:09 +0100 | jjhoo | (~jahakala@user/jjhoo) (Ping timeout: 252 seconds) |
2023-12-16 13:55:34 +0100 | elkcl | (~elkcl@broadband-95-84-226-240.ip.moscow.rt.ru) (Read error: Connection reset by peer) |
2023-12-16 13:55:42 +0100 | elkcl | (~elkcl@broadband-95-84-226-240.ip.moscow.rt.ru) |
2023-12-16 13:57:17 +0100 | noordahx | (~Nurda@144.214.255.102) (Ping timeout: 240 seconds) |
2023-12-16 13:57:35 +0100 | fr33domlover | (~fr33domlo@towards.vision) |
2023-12-16 13:59:35 +0100 | jjhoo | (jahakala@user/jjhoo) |
2023-12-16 14:04:27 +0100 | EsoAlgo81 | (~EsoAlgo@129.146.136.145) (Quit: Ping timeout (120 seconds)) |
2023-12-16 14:04:52 +0100 | MironZ | (~MironZ@nat-infra.ehlab.uk) (Quit: Ping timeout (120 seconds)) |
2023-12-16 14:05:11 +0100 | MironZ | (~MironZ@nat-infra.ehlab.uk) |
2023-12-16 14:05:42 +0100 | finsternis | (~X@23.226.237.192) (Ping timeout: 252 seconds) |
2023-12-16 14:06:24 +0100 | finsternis | (~X@23.226.237.192) |
2023-12-16 14:07:21 +0100 | esph | (~weechat@user/esph) (Ping timeout: 252 seconds) |
2023-12-16 14:10:06 +0100 | Inst_ | (~Inst@120.244.192.156) |
2023-12-16 14:10:22 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds) |
2023-12-16 14:11:47 +0100 | euleritian | (~euleritia@dynamic-046-114-201-184.46.114.pool.telefonica.de) |
2023-12-16 14:12:04 +0100 | EsoAlgo81 | (~EsoAlgo@129.146.136.145) |
2023-12-16 14:12:50 +0100 | Inst | (~Inst@120.244.192.156) (Ping timeout: 252 seconds) |
2023-12-16 14:13:03 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) |
2023-12-16 14:13:25 +0100 | euleritian | (~euleritia@dynamic-046-114-201-184.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
2023-12-16 14:13:44 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2023-12-16 14:14:36 +0100 | EsoAlgo81 | (~EsoAlgo@129.146.136.145) (Client Quit) |
2023-12-16 14:16:46 +0100 | fendor | (~fendor@2a02:8388:1605:d100:267b:1353:13d7:4f0c) |
2023-12-16 14:16:57 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection) |
2023-12-16 14:17:20 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
2023-12-16 14:17:44 +0100 | EsoAlgo81 | (~EsoAlgo@129.146.136.145) |
2023-12-16 14:18:34 +0100 | <albet70> | how to update a filed in a record |
2023-12-16 14:20:01 +0100 | esph | (~weechat@user/esph) |
2023-12-16 14:21:25 +0100 | EsoAlgo81 | (~EsoAlgo@129.146.136.145) (Client Quit) |
2023-12-16 14:21:46 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
2023-12-16 14:23:10 +0100 | <albet70> | data Foo = Foo { a :: Foo, b :: Int, c :: String } | Bar deriving Show |
2023-12-16 14:23:14 +0100 | <haskellbridge> | 12<Celestial> `record { field = updatedValue }` |
2023-12-16 14:23:27 +0100 | <albet70> | nf = Foo (Foo Bar 3 "hi") 9 "ok" |
2023-12-16 14:23:36 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) (Quit: WeeChat 4.1.1) |
2023-12-16 14:23:38 +0100 | <albet70> | Foo {a = Foo {a = Bar, b = 3, c = "hi"}, b = 9, c = "ok"} |
2023-12-16 14:23:38 +0100 | <ski> | > let t = Node {rootLabel = False,subForest = []} in t {rootLabel = True} |
2023-12-16 14:23:40 +0100 | <lambdabot> | Node {rootLabel = True, subForest = []} |
2023-12-16 14:23:51 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) |
2023-12-16 14:23:56 +0100 | <albet70> | how I can update the inner a inside nf? |
2023-12-16 14:24:13 +0100 | <albet70> | change the Bar to something else? |
2023-12-16 14:25:10 +0100 | <albet70> | it's nested |
2023-12-16 14:25:11 +0100 | <ski> | nf { a = (a nf) {a = Foo {a = Bar,b = 15,c = "twelve"}}} |
2023-12-16 14:26:11 +0100 | <ski> | or use `lens' |
2023-12-16 14:26:21 +0100 | EsoAlgo81 | (~EsoAlgo@129.146.136.145) |
2023-12-16 14:28:01 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-12-16 14:33:10 +0100 | <albet70> | ok |
2023-12-16 14:33:37 +0100 | Joao003 | (~Joao003@190.108.99.222) |
2023-12-16 14:38:07 +0100 | alp__ | (~alp@2001:861:e3d6:8f80:9e9a:65d5:880b:617e) (Ping timeout: 268 seconds) |
2023-12-16 14:41:20 +0100 | <mauke> | yeah, nested functional updates are the use case lenses were invented for |
2023-12-16 14:42:32 +0100 | <dminuoso_> | What I find very curious, is how the lens encoding just works out with the type system - and not just that - it mostly generates very efficient code. |
2023-12-16 14:44:02 +0100 | <dminuoso_> | In our SDN compiler we make heavy use of it to process, filter and manipulate some tens of thousands of records with very deep nesting. Some of it is 10-15 combinantors deep in - and the generated code is just very good. |
2023-12-16 14:44:37 +0100 | <Rembane> | That's really nice, which lens library are you using? |
2023-12-16 14:44:41 +0100 | <dminuoso_> | optics |
2023-12-16 14:45:50 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2023-12-16 14:46:05 +0100 | leungbk | (~user@142-129-149-172.res.spectrum.com) (Ping timeout: 256 seconds) |
2023-12-16 14:46:25 +0100 | euleritian | (~euleritia@dynamic-046-114-201-184.46.114.pool.telefonica.de) |
2023-12-16 14:47:17 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-12-16 14:48:18 +0100 | rosco | (~rosco@175.136.152.56) |
2023-12-16 14:48:33 +0100 | Joao003 | (~Joao003@190.108.99.222) (Read error: Connection reset by peer) |
2023-12-16 14:51:24 +0100 | <albet70> | is let-in the same let in do notaion? how to use let-in in do nation? |
2023-12-16 14:52:08 +0100 | <dminuoso_> | albet70: You can use let-in in do-notation if you want. |
2023-12-16 14:52:24 +0100 | <dminuoso_> | Do-notation also admits `let a = foo` without in |
2023-12-16 14:52:31 +0100 | <dminuoso_> | do { let x = 1; ... } |
2023-12-16 14:53:34 +0100 | <mauke> | do { let x = y; ... } is syntactic sugar for let x = y in do { ... } |
2023-12-16 14:53:59 +0100 | <dminuoso_> | mauke: Its a bit more complicated if you consider that the let ... can appear even inside of a do statement. |
2023-12-16 14:54:20 +0100 | <mauke> | that's just more desugaring from the left |
2023-12-16 14:54:54 +0100 | <mauke> | do { x <- y; ... } desugars to y >>= \x -> do { ... } |
2023-12-16 14:55:06 +0100 | <mauke> | do { y; ... } desugars to y >> do { ... } |
2023-12-16 14:55:14 +0100 | <mauke> | do { EXPR } desugars to EXPR |
2023-12-16 14:55:21 +0100 | <mauke> | I think that's the full set of rules |
2023-12-16 14:55:23 +0100 | Joao003 | (~Joao003@190.108.99.222) |
2023-12-16 14:55:54 +0100 | <mauke> | ok, not quite because of fail, but close enough |
2023-12-16 14:56:25 +0100 | <mauke> | > do { let x = 1; let y = 2; x + y } |
2023-12-16 14:56:25 +0100 | <albet70> | I need define a function inside a do notation and get function's return value to a variable, do { let v = f x where f = ... } is this syntax ok? |
2023-12-16 14:56:27 +0100 | <lambdabot> | <hint>:1:34: error: parse error on input ‘}’ |
2023-12-16 14:56:36 +0100 | <mauke> | > do { let { x = 1 }; let { y = 2 }; x + y } |
2023-12-16 14:56:38 +0100 | <lambdabot> | 3 |
2023-12-16 14:56:40 +0100 | euleritian | (~euleritia@dynamic-046-114-201-184.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
2023-12-16 14:56:48 +0100 | <Joao003> | hi ´•ω•` |
2023-12-16 14:56:58 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2023-12-16 14:57:17 +0100 | <mauke> | albet70: I think so, assuming you get the indentation right |
2023-12-16 14:57:21 +0100 | <mauke> | or use { } everywhere |
2023-12-16 14:57:38 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2023-12-16 14:57:49 +0100 | <albet70> | or do { let v = let f = ... in f x }? |
2023-12-16 14:57:58 +0100 | <mauke> | that also works |
2023-12-16 14:58:09 +0100 | <albet70> | ok |
2023-12-16 14:58:29 +0100 | <Joao003> | mauke: I have a philosophy, and it is: use as least brackets as humanly readable |
2023-12-16 14:59:20 +0100 | <mauke> | you wouldn't like lisp |
2023-12-16 14:59:23 +0100 | <haskellbridge> | 14<maerwald> dminuoso_: tens of thousands of records? |
2023-12-16 14:59:33 +0100 | <Joao003> | mauke: I don't |
2023-12-16 14:59:38 +0100 | <mauke> | that's gotta be ... a record |
2023-12-16 14:59:58 +0100 | <haskellbridge> | 14<maerwald> What AST is this? |
2023-12-16 15:01:15 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) (Ping timeout: 256 seconds) |
2023-12-16 15:01:28 +0100 | <dminuoso_> | maerwald: We take a network description sourced from our DCIM/IPAM tool. |
2023-12-16 15:01:43 +0100 | <ski> | Joao003 : i'd add "use `$' as little as reasoable" to that |
2023-12-16 15:01:49 +0100 | <dminuoso_> | And because we have more than just a few switches and routers, it ends up being a lot. |
2023-12-16 15:01:59 +0100 | <Joao003> | ski: I do use $ when starting function chains |
2023-12-16 15:02:07 +0100 | <ski> | i'm sorry to hear |
2023-12-16 15:02:32 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2023-12-16 15:02:44 +0100 | <Joao003> | > (*4) . (+3) $ 2 |
2023-12-16 15:02:45 +0100 | <lambdabot> | 20 |
2023-12-16 15:02:48 +0100 | <mauke> | ZWEIG am AST, AST am BAUM, BAUM in der AU ... |
2023-12-16 15:03:31 +0100 | ski | 'd rather type `foo x y (bar z (...))' or `(foo x y . bar z) (...)' over `foo x y . bar z $ ...', and especially over `foo x y $ bar z $ ...' |
2023-12-16 15:03:58 +0100 | <dminuoso_> | ski: That "Im sorry to hear" response really made me smile. :) |
2023-12-16 15:04:10 +0100 | <mauke> | Joao003: ( (\x -> x * 4 + 12) 2 has fewer parens |
2023-12-16 15:04:28 +0100 | <Joao003> | You forgot one |
2023-12-16 15:04:39 +0100 | <mauke> | s/\(// |
2023-12-16 15:04:42 +0100 | <Joao003> | Yes |
2023-12-16 15:05:31 +0100 | <Joao003> | mauke: But at least my alternative is more understandable (and shorter) than that behemoth |
2023-12-16 15:05:48 +0100 | <Joao003> | And more functional too |
2023-12-16 15:05:54 +0100 | <mauke> | strong disagree |
2023-12-16 15:06:12 +0100 | rosco | (~rosco@175.136.152.56) (Quit: Lost terminal) |
2023-12-16 15:06:22 +0100 | <Joao003> | More functional I mean by using more features of functional programming |
2023-12-16 15:06:37 +0100 | ski | isn't even sure what "functional" is supposed to mean, in this context |
2023-12-16 15:07:03 +0100 | Joao003 | heavily "bruh"s as they just described what they meant |
2023-12-16 15:07:51 +0100 | <mauke> | this is like that C++ thing where the more features you use, the more designeder your code is |
2023-12-16 15:07:53 +0100 | <dminuoso_> | "functional programming" is something that doesnt have a universally well accepted definition. |
2023-12-16 15:07:54 +0100 | ski | finds `$' usually ugly |
2023-12-16 15:08:31 +0100 | Joao003 | likes the $ symbol, so it's really a matter of taste |
2023-12-16 15:08:43 +0100 | <mauke> | so you always need to combine virtual inheritance and templates and operator overloading and conversion operators and custom allocators and exceptions |
2023-12-16 15:09:17 +0100 | <ski> | "if it's there, use it" ? |
2023-12-16 15:09:37 +0100 | <Joao003> | It's because I find the $ cooler, PERIOD. |
2023-12-16 15:10:43 +0100 | <Joao003> | (/_<) |
2023-12-16 15:11:06 +0100 | <dminuoso_> | Guess different people have different priorities. I worry about readability and maintainability. But if personal feelings of amazement are relevant to you, I guess that's okay. |
2023-12-16 15:11:35 +0100 | <dminuoso_> | Especially since it may be a reflection of how you use a given language. |
2023-12-16 15:11:45 +0100 | <Joao003> | Also I find less parentheses overall less cluttered and more readable. |
2023-12-16 15:12:02 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
2023-12-16 15:12:40 +0100 | euleritian | (~euleritia@77.22.252.56) |
2023-12-16 15:13:00 +0100 | <dminuoso_> | Maybe what we really need is 3-dimensional code editors, where associativity is denoted in levels of height, such that if you navigate your code its easy to see how things associate. |
2023-12-16 15:13:29 +0100 | ski | usually tries to avoid redundant brackets, *and* avoid (although usually not even thinking of) `$' |
2023-12-16 15:13:52 +0100 | <Joao003> | dminuoso_: And a 3D language for it ´•ω•` |
2023-12-16 15:14:09 +0100 | <mauke> | Plankalkül++ |
2023-12-16 15:14:33 +0100 | <ski> | (some nested nonredundant brackets not being anything to be afraid off .. when it can potentially start to become a problem is when you have multiple `)'s ending in the same place, their respective `('s being in previous lines) |
2023-12-16 15:15:09 +0100 | <mauke> | nil))))))))) |
2023-12-16 15:15:11 +0100 | <ski> | "associativity is denoted in levels of height" -- how ? |
2023-12-16 15:15:28 +0100 | rovaughn | (~rovaughn@066-065-097-119.res.spectrum.com) |
2023-12-16 15:16:08 +0100 | <mauke> | hah. multiple ) ending in the same place is exactly what $ solves |
2023-12-16 15:17:27 +0100 | <ski> | `(foo x y . bar z) (...)' works fine for that, too |
2023-12-16 15:17:52 +0100 | <ski> | (also `BlockArguments') |
2023-12-16 15:17:57 +0100 | <haskellbridge> | 14<maerwald> If people talk about "elegant" wrt Haskell or functional programming, it's usually a sign to walk away... far far away |
2023-12-16 15:18:35 +0100 | <Joao003> | Yes. But the $ is less cluttered than parentheses around both expressions... FOR ME. It is YOUR OPINION. |
2023-12-16 15:18:38 +0100 | ski | . o O ( "Do you align your code, in your dreams ?" ) |
2023-12-16 15:18:44 +0100 | <mauke> | baby shark do do do do do do baby shark |
2023-12-16 15:18:44 +0100 | <haskellbridge> | 14<maerwald> Text is just a bad medium for code |
2023-12-16 15:18:53 +0100 | <mauke> | valid haskell code given suitable definition of baby and shark |
2023-12-16 15:18:55 +0100 | ski | nods to Joao003 |
2023-12-16 15:20:03 +0100 | Joao003 | <( Let's talk about something more useful ) |
2023-12-16 15:20:23 +0100 | <ski> | we could revert to optics |
2023-12-16 15:20:47 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) |
2023-12-16 15:21:32 +0100 | <Joao003> | Fun fact: There are 614 people in this server, but most are nitwits who don't talk (and are probably bots) |
2023-12-16 15:21:36 +0100 | euleritian | (~euleritia@77.22.252.56) (Ping timeout: 252 seconds) |
2023-12-16 15:22:41 +0100 | euleritian | (~euleritia@dynamic-046-114-201-184.46.114.pool.telefonica.de) |
2023-12-16 15:23:00 +0100 | <Joao003> | mauke: baby shark do do do do do baby shark do do do do do baby shark do do do do do baby shark |
2023-12-16 15:23:26 +0100 | <Rembane> | ski: Do androids dream of aligned $? |
2023-12-16 15:24:02 +0100 | rovaughn | (~rovaughn@066-065-097-119.res.spectrum.com) (Ping timeout: 260 seconds) |
2023-12-16 15:24:23 +0100 | <Joao003> | Rembane: whart |
2023-12-16 15:24:31 +0100 | <Joao003> | s/whart/what/ |
2023-12-16 15:25:02 +0100 | <Rembane> | Joao003: Have you read, Do androids dream of electric sheep? |
2023-12-16 15:25:32 +0100 | <Joao003> | Rembane: n |
2023-12-16 15:25:35 +0100 | <Joao003> | Rembane: o |
2023-12-16 15:27:12 +0100 | <Rembane> | Joao003: Then that reference will make no sense to you. Which it didn't. It's good book, I recommend it. |
2023-12-16 15:27:21 +0100 | <Joao003> | Also you're all nerds🤓 |
2023-12-16 15:27:37 +0100 | <Rembane> | Joao003: The movie Minority Report is also quite good, but a very different beast. |
2023-12-16 15:28:28 +0100 | <Joao003> | You RN:🤓☝️ |
2023-12-16 15:32:39 +0100 | target_i | (~target_i@217.175.14.39) |
2023-12-16 15:37:11 +0100 | <ski> | Joao003 : eh, there's a lot more people on this server |
2023-12-16 15:37:23 +0100 | <ski> | (perhaps you meant "channel" ?) |
2023-12-16 15:37:35 +0100 | <Joao003> | yes |
2023-12-16 15:37:45 +0100 | <ski> | Rembane : i read a comic version of it |
2023-12-16 15:37:55 +0100 | ski | nods to Joao003 |
2023-12-16 15:38:27 +0100 | <ski> | (also, thanks for the compliment) |
2023-12-16 15:38:42 +0100 | <Joao003> | (^_^) |
2023-12-16 15:38:48 +0100 | <ski> | (well, not "Minority Report"9 |
2023-12-16 15:39:04 +0100 | ski | idly ponders condiments |
2023-12-16 15:39:16 +0100 | waleee | (~waleee@h-176-10-144-38.na.cust.bahnhof.se) |
2023-12-16 15:39:28 +0100 | <Rembane> | ski: Good stuff. |
2023-12-16 15:39:29 +0100 | Joao003 | . o O ( We should stop arguing over small things ) |
2023-12-16 15:40:46 +0100 | motherfsck | (~motherfsc@user/motherfsck) (Quit: quit) |
2023-12-16 15:43:01 +0100 | <Joao003> | It irritates me that `fmap` only maps over the second component of a (,) |
2023-12-16 15:43:29 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) |
2023-12-16 15:46:31 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds) |
2023-12-16 15:48:18 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) (Ping timeout: 260 seconds) |
2023-12-16 15:53:37 +0100 | liamzy__ | (~Inst@120.244.192.156) |
2023-12-16 15:53:45 +0100 | Inst_ | (~Inst@120.244.192.156) (Read error: Connection reset by peer) |
2023-12-16 15:54:51 +0100 | <ski> | > first (^ 2) (5,7) |
2023-12-16 15:54:52 +0100 | <lambdabot> | (25,7) |
2023-12-16 15:55:15 +0100 | <ski> | > bimap (^ 2) (subtract 2) (5,7) |
2023-12-16 15:55:17 +0100 | <lambdabot> | (25,5) |
2023-12-16 15:55:54 +0100 | son0p | (~ff@181.136.122.143) |
2023-12-16 15:56:02 +0100 | not_reserved | (~not_reser@154.16.157.99) (Quit: Client closed) |
2023-12-16 16:00:23 +0100 | rovaughn | (~alec@066-065-097-119.res.spectrum.com) |
2023-12-16 16:04:33 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3240-635d-855c-cf07-660d-fffe.rev.sfr.net) (Remote host closed the connection) |
2023-12-16 16:08:54 +0100 | mosul | (mosul@user/mosul) |
2023-12-16 16:09:56 +0100 | waleee | (~waleee@h-176-10-144-38.na.cust.bahnhof.se) (Ping timeout: 245 seconds) |
2023-12-16 16:11:51 +0100 | <__monty__> | ski: Is there a `\f -> bimap f f`? |
2023-12-16 16:12:11 +0100 | <ski> | > join bimap (^ 2) (5,7) |
2023-12-16 16:12:11 +0100 | <ncf> | :t over each |
2023-12-16 16:12:12 +0100 | <lambdabot> | Each s t a b => (a -> b) -> s -> t |
2023-12-16 16:12:13 +0100 | <lambdabot> | (25,49) |
2023-12-16 16:12:39 +0100 | ski | . o O ( "Let's each stab the other." ) |
2023-12-16 16:13:11 +0100 | <ski> | @quote getting.a.stab |
2023-12-16 16:13:12 +0100 | <lambdabot> | byorgey says: <edwardk> @type (^.) <lambdabot> s -> Getting a s t a b -> a <byorgey> I would not like to be getting a stab, thank you |
2023-12-16 16:13:25 +0100 | dolio | (~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-12-16 16:13:42 +0100 | not_reserved | (~not_reser@154.16.157.88) |
2023-12-16 16:13:48 +0100 | ht_ | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
2023-12-16 16:15:06 +0100 | dolio | (~dolio@130.44.134.54) |
2023-12-16 16:16:10 +0100 | _ht | (~Thunderbi@194.110.115.49) (Ping timeout: 276 seconds) |
2023-12-16 16:16:10 +0100 | ht_ | _ht |
2023-12-16 16:17:17 +0100 | jargon | (~jargon@32.sub-174-238-226.myvzw.com) |
2023-12-16 16:22:38 +0100 | dolio | (~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-12-16 16:24:16 +0100 | tzh | (~tzh@c-71-193-181-0.hsd1.or.comcast.net) |
2023-12-16 16:25:01 +0100 | rawles | (sid630849@user/rawles) () |
2023-12-16 16:26:12 +0100 | dolio | (~dolio@130.44.134.54) |
2023-12-16 16:28:07 +0100 | <Joao003> | BTW: how does Control.Lens work? |
2023-12-16 16:30:26 +0100 | <ncf> | what do you mean how does it work |
2023-12-16 16:30:49 +0100 | <Joao003> | how the f!@# does it work underneath the curtains |
2023-12-16 16:30:55 +0100 | <mauke> | raw, untamed magic |
2023-12-16 16:31:46 +0100 | araujo | (~araujo@45.131.194.168) (Ping timeout: 276 seconds) |
2023-12-16 16:31:54 +0100 | <mauke> | and/or creative use of Applicative |
2023-12-16 16:31:59 +0100 | <Joao003> | like. pls spare me multiple headaches because i stumbled onto a codewars kata which f!@#ing asks me to implement Control.Lens |
2023-12-16 16:32:35 +0100 | <mauke> | all of it? or a carefully selected interface? :-) |
2023-12-16 16:32:54 +0100 | <Joao003> | the basics |
2023-12-16 16:33:10 +0100 | billchenchina | (~billchenc@103.152.35.21) |
2023-12-16 16:33:30 +0100 | <mauke> | so ... why not do that? |
2023-12-16 16:34:06 +0100 | <Joao003> | i don't understand how to f!@#ing implement view, over and set |
2023-12-16 16:34:31 +0100 | <mauke> | do your lenses need to be able to compose with (.)? |
2023-12-16 16:34:42 +0100 | <Joao003> | YES! |
2023-12-16 16:34:47 +0100 | <mauke> | yeah, that's the tricky part |
2023-12-16 16:35:22 +0100 | <Joao003> | link just so you can see what's up here: https://www.codewars.com/kata/5cd99b8af446b0000ed8e615/train/haskell (you may need to sign up) |
2023-12-16 16:35:43 +0100 | <haskellbridge> | 14<maerwald> Man the matrix bridge sucks |
2023-12-16 16:35:51 +0100 | <haskellbridge> | 14<maerwald> Awful stuff |
2023-12-16 16:36:15 +0100 | <Joao003> | maerwald: just download an irc client the |
2023-12-16 16:36:22 +0100 | <Joao003> | s/the/then/ |
2023-12-16 16:36:26 +0100 | harveypwca | (~harveypwc@2601:246:c280:7940:585a:99af:3e4c:209b) |
2023-12-16 16:36:27 +0100 | <mauke> | oh, it directly gives you the representation |
2023-12-16 16:36:31 +0100 | <Joao003> | yes |
2023-12-16 16:36:32 +0100 | billchenchina | (~billchenc@103.152.35.21) (Client Quit) |
2023-12-16 16:36:47 +0100 | <haskellbridge> | 14<maerwald> All android IRC clients are TRASH |
2023-12-16 16:36:57 +0100 | <mauke> | Joao003: try https://www.youtube.com/watch?v=k-QwBL9Dia0 |
2023-12-16 16:37:31 +0100 | <Joao003> | i'm too lazy to watch a 1-hour video |
2023-12-16 16:37:40 +0100 | <haskellbridge> | 14<maerwald> Oh man, I think I've seen that guy |
2023-12-16 16:37:51 +0100 | <Joao003> | try your best explaining |
2023-12-16 16:38:19 +0100 | <Joao003> | maerwald: If you think android IRC is trash, then just use your PC |
2023-12-16 16:38:34 +0100 | <mauke> | normally I'd agree, but I think SPJ is pretty entertaining and educational |
2023-12-16 16:38:37 +0100 | <haskellbridge> | 14<maerwald> Ok, but i can't bring my PC to the pub |
2023-12-16 16:38:38 +0100 | <haskellbridge> | 14<maerwald> What now |
2023-12-16 16:38:49 +0100 | <[exa]> | maerwald: folks here were pretty happy with the weechat-related one |
2023-12-16 16:39:06 +0100 | <Joao003> | maerwald: Don't go to the pub? |
2023-12-16 16:39:17 +0100 | <haskellbridge> | 14<maerwald> Lol dude |
2023-12-16 16:40:00 +0100 | <[exa]> | maerwald: https://github.com/ubergeek42/weechat-android |
2023-12-16 16:40:03 +0100 | <yushyin> | sure, weechat-android is fine. goguma (+ soju) seems also fine. |
2023-12-16 16:40:03 +0100 | <mauke> | (skip to minute 8 or so if you're already familiar with basic lenses) |
2023-12-16 16:40:31 +0100 | <Joao003> | mauke: of course f!@#ing not, that kata just randomly popped up |
2023-12-16 16:40:41 +0100 | <haskellbridge> | 14<maerwald> Probably a battery hog |
2023-12-16 16:42:12 +0100 | <Joao003> | mauke: can you skip some time and headaches for me by explaining it here |
2023-12-16 16:43:11 +0100 | <mauke> | no, because 1) I've never used lenses, and 2) someone's already done it, so why repeat the effort? |
2023-12-16 16:43:18 +0100 | <[exa]> | Joao003: short description: lens is a function unwraps a small value from the big one and then rewraps it. The problem is that to implement view, over and set, you need the "rewrapping" path to do something different everytime. So the idea of lenses is that in the middle (before rewrapping) you wrap the lens in a Functor (which is parametrizable, anyone can choose any), and apply the rewrapping through the |
2023-12-16 16:43:24 +0100 | <[exa]> | functor. And the functor can choose what to do with the rewrapping. |
2023-12-16 16:43:38 +0100 | <yushyin> | maerwald: i use weechat-android daily and it's fine. but if you want google services push support goguma + soju is better (see https://git.sr.ht/~emersion/goguma/tree/HEAD/item/doc/notifications.md ) |
2023-12-16 16:44:12 +0100 | <[exa]> | Joao003: in turn, the Identity functor "just rewraps" and gives you a `set` (or almost equivalently `over`), Const "discards the rewrapping" and gives you a `get`, and there are some other functors that you can smash in |
2023-12-16 16:44:47 +0100 | <haskellbridge> | 14<maerwald> goguma sounds like a japanese cocktail |
2023-12-16 16:44:55 +0100 | <Joao003> | [exa]: how do i use Const then |
2023-12-16 16:45:23 +0100 | <haskellbridge> | 14<maerwald> My gf will ask why I'm having weird apps on my phone |
2023-12-16 16:45:50 +0100 | euleritian | (~euleritia@dynamic-046-114-201-184.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
2023-12-16 16:46:09 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2023-12-16 16:46:10 +0100 | <Joao003> | maerwald: lol XD |
2023-12-16 16:46:11 +0100 | michalz | (~michalz@185.246.207.218) |
2023-12-16 16:46:40 +0100 | <yushyin> | maerwald: the downside is that you have to set up a soju instance ... so yeah, not all perfect, but this is the best suggestion i can give you |
2023-12-16 16:46:54 +0100 | <[exa]> | > getConst $ fmap (+123) $ Const 5 -- Joao003, nothing happens to the 5 because it's constant |
2023-12-16 16:46:56 +0100 | <lambdabot> | 5 |
2023-12-16 16:47:15 +0100 | <haskellbridge> | 14<maerwald> I'm comfortable with soju |
2023-12-16 16:47:30 +0100 | <Joao003> | [exa]: Yes, Const a is the functor, not Const |
2023-12-16 16:47:32 +0100 | <haskellbridge> | 14<maerwald> Can drink it all day |
2023-12-16 16:47:59 +0100 | <[exa]> | ah you mean, how you use it with the lenses? |
2023-12-16 16:48:05 +0100 | <Joao003> | YES |
2023-12-16 16:49:33 +0100 | <[exa]> | you literally throw it into the lens so that it's the thing that "executes on the end of unwrapping" |
2023-12-16 16:49:57 +0100 | <[exa]> | the usual definition is: `view somelens = getConst . somelens Const` |
2023-12-16 16:50:35 +0100 | <Joao003> | THX [exa]! ^_^ |
2023-12-16 16:51:07 +0100 | <[exa]> | NOW if this looks confusing, the easiest way to wrap your head around it is to just add the arguments so that you can see how the data goes through the `somelens` |
2023-12-16 16:52:15 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) |
2023-12-16 16:52:30 +0100 | <[exa]> | you get `view somelens obj = getConst $ somelens Const obj`, and the general (rough) type of lenses is `somelens :: Functor f => (small -> f small) -> big -> f big` |
2023-12-16 16:53:50 +0100 | <[exa]> | notice the 2 arguments in `somelens` type: first the "final wrapper" which smashes in the functor (that's our `Const`) and then the `big` thing (which is our `obj`). In turn you get the wrapped `big` object (which may or may not actually contain something rewrapped, depending on what functor we smashed in) |
2023-12-16 16:54:46 +0100 | <[exa]> | many people also get confused by how Const works -- it keeps something, but also "holds" the type of the functor argument, kinda as a proxy (BUT not the value!). |
2023-12-16 16:55:22 +0100 | <[exa]> | :t (++[1,2,3]) . Just . Just <$> Const 5 |
2023-12-16 16:55:23 +0100 | <lambdabot> | error: |
2023-12-16 16:55:23 +0100 | <lambdabot> | • Couldn't match type ‘Maybe (Maybe a0)’ with ‘[a1]’ |
2023-12-16 16:55:23 +0100 | <lambdabot> | Expected type: a0 -> [a1] |
2023-12-16 16:55:35 +0100 | <[exa]> | oh wait :D |
2023-12-16 16:55:40 +0100 | <[exa]> | :t (:[1,2,3]) . Just . Just <$> Const 5 |
2023-12-16 16:55:41 +0100 | <lambdabot> | (Num a1, Num (Maybe (Maybe a2))) => Const a1 [Maybe (Maybe a2)] |
2023-12-16 16:56:17 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) (Client Quit) |
2023-12-16 16:56:35 +0100 | Joao003 | (~Joao003@190.108.99.222) (Quit: Bye!) |
2023-12-16 16:56:38 +0100 | <[exa]> | it still holds the `a1` number, but tracks the type of what would normally be rewrapped (with lens, this finally reconstructs the `big` type into a `Const small big`, so the type of the `f big` on the end matches the expectation) |
2023-12-16 16:56:47 +0100 | <[exa]> | aaaaaaaaand they quit. :] |
2023-12-16 16:57:45 +0100 | m1dnight | (~christoph@78-22-2-15.access.telenet.be) |
2023-12-16 17:05:41 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3240-635d-855c-cf07-660d-fffe.rev.sfr.net) |
2023-12-16 17:05:57 +0100 | liamzy__ | Inst |
2023-12-16 17:16:31 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds) |
2023-12-16 17:17:17 +0100 | nullie | (~nullie@nuremberg.nullie.name) (Quit: WeeChat 4.1.1) |
2023-12-16 17:17:35 +0100 | nullie | (~nullie@2a01:4f8:c2c:6177::1) |
2023-12-16 17:17:48 +0100 | nullie | (~nullie@2a01:4f8:c2c:6177::1) (Client Quit) |
2023-12-16 17:18:17 +0100 | nullie | (~nullie@2a01:4f8:c2c:6177::1) |
2023-12-16 17:18:19 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2023-12-16 17:19:16 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) |
2023-12-16 17:20:01 +0100 | nullie | (~nullie@2a01:4f8:c2c:6177::1) (Client Quit) |
2023-12-16 17:20:20 +0100 | nullie | (~nullie@nuremberg.nullie.name) |
2023-12-16 17:22:41 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2023-12-16 17:23:03 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2023-12-16 17:24:37 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 268 seconds) |
2023-12-16 17:28:53 +0100 | nullie | (~nullie@nuremberg.nullie.name) (Quit: WeeChat 4.1.1) |
2023-12-16 17:29:08 +0100 | nullie | (~nullie@2a01:4f8:c2c:6177::1) |
2023-12-16 17:33:19 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 240 seconds) |
2023-12-16 17:33:26 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3240-635d-855c-cf07-660d-fffe.rev.sfr.net) (Ping timeout: 250 seconds) |
2023-12-16 17:36:08 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2023-12-16 17:38:46 +0100 | igemnace | (~ian@user/igemnace) |
2023-12-16 17:45:45 +0100 | idgaen | (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
2023-12-16 17:46:55 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
2023-12-16 17:46:55 +0100 | azimut_ | (~azimut@gateway/tor-sasl/azimut) |
2023-12-16 17:48:43 +0100 | alp__ | (~alp@2001:861:e3d6:8f80:908c:c2d9:53f8:9c71) |
2023-12-16 17:53:19 +0100 | billchenchina | (~billchenc@2a0d:2580:ff0c:1:e3c9:c52b:a429:5bfe) |
2023-12-16 17:53:26 +0100 | _xor | (~xor@72.49.195.41) (Quit: Ping timeout (120 seconds)) |
2023-12-16 17:54:06 +0100 | _xor | (~xor@72.49.195.41) |
2023-12-16 17:57:24 +0100 | billchenchina | (~billchenc@2a0d:2580:ff0c:1:e3c9:c52b:a429:5bfe) (Remote host closed the connection) |
2023-12-16 18:11:11 +0100 | AlexZenon | (~alzenon@178.34.162.199) (Ping timeout: 245 seconds) |
2023-12-16 18:14:24 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2023-12-16 18:20:05 +0100 | econo_ | (uid147250@id-147250.tinside.irccloud.com) |
2023-12-16 18:21:27 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 252 seconds) |
2023-12-16 18:22:08 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3240-6ee4-1850-c789-5b7f-17c4.rev.sfr.net) |
2023-12-16 18:23:50 +0100 | waleee | (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
2023-12-16 18:24:53 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:cc52:bab0:d69e:7e9e) (Remote host closed the connection) |
2023-12-16 18:25:12 +0100 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
2023-12-16 18:25:48 +0100 | AlexZenon | (~alzenon@178.34.162.199) |
2023-12-16 18:30:07 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
2023-12-16 18:32:19 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3240-6ee4-1850-c789-5b7f-17c4.rev.sfr.net) (Remote host closed the connection) |
2023-12-16 18:37:50 +0100 | todi | (~todi@p5dca55c4.dip0.t-ipconnect.de) (Quit: ZNC - https://znc.in) |
2023-12-16 18:48:06 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3141-087f-5955-7f2d-6267-fc6f.rev.sfr.net) |
2023-12-16 18:53:44 +0100 | harveypwca | (~harveypwc@2601:246:c280:7940:585a:99af:3e4c:209b) (Quit: Leaving) |
2023-12-16 18:55:51 +0100 | fendor | (~fendor@2a02:8388:1605:d100:267b:1353:13d7:4f0c) (Ping timeout: 256 seconds) |
2023-12-16 18:56:17 +0100 | mikess | (~sam@user/mikess) |
2023-12-16 18:57:02 +0100 | igemnace | (~ian@user/igemnace) (Quit: WeeChat 4.1.2) |
2023-12-16 18:59:03 +0100 | Joao003 | (~Joao003@190.108.99.222) |
2023-12-16 19:00:48 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Remote host closed the connection) |
2023-12-16 19:01:12 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
2023-12-16 19:04:58 +0100 | alp__ | (~alp@2001:861:e3d6:8f80:908c:c2d9:53f8:9c71) (Ping timeout: 256 seconds) |
2023-12-16 19:10:38 +0100 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
2023-12-16 19:21:08 +0100 | <Inst> | did people really drop command line file management for gui file management? |
2023-12-16 19:25:00 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) |
2023-12-16 19:25:45 +0100 | p3n | (~p3n@217.198.124.246) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-12-16 19:27:01 +0100 | p3n | (~p3n@217.198.124.246) |
2023-12-16 19:29:55 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 246 seconds) |
2023-12-16 19:35:01 +0100 | <haskellbridge> | 12<Celestial> in general or ...? |
2023-12-16 19:36:53 +0100 | _xor | (~xor@72.49.195.41) (Read error: Connection reset by peer) |
2023-12-16 19:37:50 +0100 | _xor | (~xor@72.49.195.41) |
2023-12-16 19:38:00 +0100 | <nullie> | both ways are useful |
2023-12-16 19:38:02 +0100 | <idgaen> | Inst: not anyway. I only use command line for file management. I dislike gui file managers. |
2023-12-16 19:38:12 +0100 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2023-12-16 19:40:42 +0100 | <Inst> | in general, i guess, someone said something to that effect in ##programming |
2023-12-16 19:41:01 +0100 | <Inst> | because I don't want to use rm, and am wondering what alternative is standard, i.e, safe-rm (npm) or rip (rust) |
2023-12-16 19:45:00 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3141-087f-5955-7f2d-6267-fc6f.rev.sfr.net) (Remote host closed the connection) |
2023-12-16 19:46:49 +0100 | dunric | (~dunric@host-46-23-50-45.maxtel.cz) |
2023-12-16 19:47:08 +0100 | dunric | (~dunric@host-46-23-50-45.maxtel.cz) () |
2023-12-16 19:47:45 +0100 | <idgaen> | +me |
2023-12-16 19:48:31 +0100 | <monochrom> | Wildcards like "*.c" are really helpful, and I don't understand why the gui people don't incorporate it, as though they took the issue as a tribal war therefore they must unconditionally irrationally denounce everything the cmdline people do. |
2023-12-16 19:48:33 +0100 | <duncan> | You can alias rm to something which taps into the system file manager, i.e. ~/.Trashes |
2023-12-16 19:49:12 +0100 | <monochrom> | And that explains a large chunk of the cli-gui divide. The gap is largely artificial. |
2023-12-16 19:49:38 +0100 | <[exa]> | Inst: there's literally a single system call that you can use to remove files, and `rm` pretty much just does that systemcall for you from commandline (minus the usual syscall hassle). What's wrong with it? |
2023-12-16 19:49:41 +0100 | <duncan> | on the Mac there is a program called "trash" which does it |
2023-12-16 19:50:09 +0100 | <monochrom> | Speaking of which, some of you (and I) still remember that decades ago, search engines supported boolean expressions. I wonder why they are now banned. |
2023-12-16 19:50:22 +0100 | <Joao003> | monochrom: Windows Explorer can search with wildcards |
2023-12-16 19:50:56 +0100 | <monochrom> | The party line is "boolean expressions are not broadly known" but that's a non-sequiter. |
2023-12-16 19:50:58 +0100 | <[exa]> | monochrom: too complex to inject ads there |
2023-12-16 19:51:20 +0100 | <[exa]> | i.e. someone would need to explain boolean expressions to advertisers |
2023-12-16 19:51:25 +0100 | <nullie> | duncan: I think indices used do not support arbitrary boolean operations |
2023-12-16 19:51:55 +0100 | <[exa]> | nullie: they do quite well actually (check out e.g. elasticsearch) |
2023-12-16 19:52:02 +0100 | <monochrom> | Generally there are various ways humanity invents false dichotomies and gaps and divides for no reason. |
2023-12-16 19:52:40 +0100 | <Inst> | [exa] issue is that it's easy to screw up |
2023-12-16 19:52:45 +0100 | <nullie> | [exa]: I don't think that elasticsearch use such complex ranking mechanism |
2023-12-16 19:52:51 +0100 | <Inst> | i'm probably going to switch from rm -rf to rm -ri |
2023-12-16 19:53:18 +0100 | <[exa]> | nullie: ah, ok w.r.t. the magical ranking mechanism of google the expressions might be a problem, that's true |
2023-12-16 19:53:24 +0100 | <[exa]> | good point |
2023-12-16 19:53:32 +0100 | <[exa]> | Inst: have backups? |
2023-12-16 19:53:52 +0100 | peterbecich | (~Thunderbi@047-229-123-186.res.spectrum.com) |
2023-12-16 19:53:52 +0100 | <monochrom> | The "gio trash" command exists. :) |
2023-12-16 19:53:54 +0100 | <mauke> | why would I need backups when I have .trash |
2023-12-16 19:55:15 +0100 | <monochrom> | I wouldn't debate using rm vs using gio trash etc. Each of us have a different risk model. You use what suits you, I use mine. |
2023-12-16 19:55:19 +0100 | pastly | (~pastly@gateway/tor-sasl/pastly) (Remote host closed the connection) |
2023-12-16 19:55:35 +0100 | <monochrom> | But it is important to make sure both are available so everyone can choose. |
2023-12-16 19:55:44 +0100 | pastly | (~pastly@gateway/tor-sasl/pastly) |
2023-12-16 19:56:09 +0100 | <int-e> | . o O ( s/trash/archive/g ) |
2023-12-16 19:56:32 +0100 | <monochrom> | And to beat the dead horse, like I said, there is no need to equate "rm = cli" and "trashcan = gui". |
2023-12-16 19:56:44 +0100 | <Joao003> | Isn't this #haskell |
2023-12-16 19:56:47 +0100 | <int-e> | (if you rely on files to still be there when you need them, that's what the "trash" becomes) |
2023-12-16 19:56:55 +0100 | <EvanR> | why do I need trash or backups when I can just decompress white noise to get whatever I want back |
2023-12-16 19:56:57 +0100 | <Inst> | ah so gio trash is built-in |
2023-12-16 19:56:59 +0100 | <Inst> | sorry about that |
2023-12-16 19:57:37 +0100 | <int-e> | EvanR: because filtering is ridiculously time consuming, and soon you'll realize that you're consuming more than the available energy in the universe in the process |
2023-12-16 19:57:59 +0100 | <monochrom> | My ideal would be: file system = version control system. |
2023-12-16 19:58:00 +0100 | <EvanR> | ok, decrypt white noise |
2023-12-16 19:58:09 +0100 | <EvanR> | you just need a suitable key |
2023-12-16 19:58:14 +0100 | <monochrom> | which was actually what VAX did. |
2023-12-16 19:58:29 +0100 | <int-e> | but how do you free up space |
2023-12-16 19:58:57 +0100 | <EvanR> | how much space does a white noise source take up |
2023-12-16 19:59:03 +0100 | <EvanR> | just use that for everything |
2023-12-16 19:59:21 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
2023-12-16 19:59:35 +0100 | <EvanR> | answer zero because it's purely theoretical |
2023-12-16 19:59:49 +0100 | <monochrom> | int-e: Hey it's consistent to your s/trash/archive/g ! Let's not talk about freeing up space... >:) |
2023-12-16 20:00:08 +0100 | euleritian | (~euleritia@dynamic-046-114-203-141.46.114.pool.telefonica.de) |
2023-12-16 20:00:25 +0100 | <int-e> | monochrom: spoken like somebody whose partitions are not permanently 90+% full. |
2023-12-16 20:00:38 +0100 | <mauke> | that's why perldoc perlport still says: Don't assume that a single "unlink" completely gets rid of the file: some filesystems (most notably the ones in VMS) have versioned filesystems, and "unlink" removes only the most recent one (it doesn't remove all the versions because by default the native tools on those platforms remove just the most recent version, too). |
2023-12-16 20:00:54 +0100 | <EvanR> | more realistically the fact that your file used to be there and its contents is encoded on the physical state of the universe, so there's your backup |
2023-12-16 20:01:08 +0100 | <mauke> | and it recommends `1 while unlink "file";` for portably deleting a file |
2023-12-16 20:01:13 +0100 | <EvanR> | there's a no deleting theorem to go with the no cloning theorem |
2023-12-16 20:01:15 +0100 | peterbecich | (~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds) |
2023-12-16 20:01:36 +0100 | <int-e> | when partitions were way smaller I grepped the raw device for what I remembered of files I deleted by accident... |
2023-12-16 20:01:55 +0100 | <int-e> | (smaller and not relying on dropping whole blocks as we do in the SSD world) |
2023-12-16 20:03:40 +0100 | euleritian | (~euleritia@dynamic-046-114-203-141.46.114.pool.telefonica.de) (Read error: Connection reset by peer) |
2023-12-16 20:03:57 +0100 | euleritian | (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
2023-12-16 20:05:56 +0100 | juim10 | (~juim10@2a09:5e41:678:640:85de:b6de:ee2a:5df1) |
2023-12-16 20:06:19 +0100 | <nullie> | monochrom: I think zfs and btrfs do this |
2023-12-16 20:10:02 +0100 | <geekosaur> | clearcase |
2023-12-16 20:12:37 +0100 | <darkling> | nullie: Not in a reliable or user-accessible manner. The "old copies" are removed/unlinked on the next transaction commit. |
2023-12-16 20:13:02 +0100 | <Joao003> | ISN'T THIS #haskell |
2023-12-16 20:13:05 +0100 | <darkling> | The logging filesystems will keep old versions, though. (f2fs, IIRC) |
2023-12-16 20:13:51 +0100 | <EvanR> | let's beat it it's the topic police |
2023-12-16 20:13:59 +0100 | <monochrom> | Yeah let's talk about binary-search-tree delete ("delete") in Haskell instead >:) |
2023-12-16 20:14:18 +0100 | <EvanR> | > delete 7 [1..10] |
2023-12-16 20:14:19 +0100 | <lambdabot> | [1,2,3,4,5,6,8,9,10] |
2023-12-16 20:14:44 +0100 | <monochrom> | the salient feature being it's a version control system so the original tree still exists |
2023-12-16 20:15:56 +0100 | <monochrom> | > let x = [1..10] in let y = delete 7 [1..10] in x |
2023-12-16 20:15:58 +0100 | <lambdabot> | [1,2,3,4,5,6,7,8,9,10] |
2023-12-16 20:16:38 +0100 | <int-e> | monochrom: that's cheating; due to lazy evaluation, the 7 is never deleted |
2023-12-16 20:16:46 +0100 | <EvanR> | lol |
2023-12-16 20:16:48 +0100 | newsham | (~newsham@2603-800c-2c01-6825-20cd-e102-9eaf-ced8.res6.spectrum.com) |
2023-12-16 20:16:51 +0100 | <monochrom> | heh |
2023-12-16 20:17:05 +0100 | newsham | (~newsham@2603-800c-2c01-6825-20cd-e102-9eaf-ced8.res6.spectrum.com) (Client Quit) |
2023-12-16 20:17:42 +0100 | <EvanR> | actually deleting or inserting things into a linked list other than at the beginning seems so 1960s moon mission tech at this point |
2023-12-16 20:18:02 +0100 | <EvanR> | yes someone proved you can do it but it sounds crazy |
2023-12-16 20:18:41 +0100 | <int-e> | so you're saying it's rocket science? |
2023-12-16 20:19:36 +0100 | <EvanR> | if you introduce concurrency then it's a fair comparison |
2023-12-16 20:20:36 +0100 | coot | (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
2023-12-16 20:22:26 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 252 seconds) |
2023-12-16 20:24:10 +0100 | <monochrom> | Oh it is rocket science (even without concurrency complications) in the eyes of today's 1st-year students. |
2023-12-16 20:24:31 +0100 | azimut_ | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
2023-12-16 20:27:51 +0100 | robertm | (robertm@lattice.rojoma.com) (Quit: WeeChat 3.8) |
2023-12-16 20:28:31 +0100 | <idgaen> | Joao003: sometimes offtopic is ok, especialy when there are not haskell question, I feel. |
2023-12-16 20:29:09 +0100 | robertm | (robertm@lattice.rojoma.com) |
2023-12-16 20:29:45 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
2023-12-16 20:33:11 +0100 | <monochrom> | You won't like this but a channel is defined by community consensus not logical rules. |
2023-12-16 20:33:24 +0100 | <nullie> | > let x = [1..10] in let y = delete 7 [1..10] in (y, x) |
2023-12-16 20:33:26 +0100 | <lambdabot> | ([1,2,3,4,5,6,8,9,10],[1,2,3,4,5,6,7,8,9,10]) |
2023-12-16 20:35:59 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2023-12-16 20:37:06 +0100 | Inst_ | (~Inst@120.244.192.109) |
2023-12-16 20:37:34 +0100 | mikess | (~sam@user/mikess) (Quit: leaving) |
2023-12-16 20:40:11 +0100 | Inst | (~Inst@120.244.192.156) (Ping timeout: 264 seconds) |
2023-12-16 20:40:11 +0100 | <EvanR> | > let x = [1..10] in let y = delete 7 [1..10] in y `seq` x -- I guess doesn't demonstrate anything depending on who you ask |
2023-12-16 20:40:12 +0100 | <lambdabot> | [1,2,3,4,5,6,7,8,9,10] |
2023-12-16 20:41:14 +0100 | <EvanR> | rnf y `seq` x |
2023-12-16 20:42:49 +0100 | h2t | (~h2t@user/h2t) |
2023-12-16 20:45:03 +0100 | <monochrom> | Lazy evaluation: Evalution depends on who's asking. Lazy semantics: Meaning depends on who's asking. >:) |
2023-12-16 20:52:12 +0100 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2023-12-16 20:52:27 +0100 | madnight_ | (~madnight@static.59.103.201.195.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-12-16 20:54:11 +0100 | madnight | (~madnight@static.59.103.201.195.clients.your-server.de) |
2023-12-16 20:57:17 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:ec86:c151:5ba6:29ff) |
2023-12-16 21:02:24 +0100 | alp__ | (~alp@2001:861:e3d6:8f80:70a5:2518:c61b:a3f3) |
2023-12-16 21:02:41 +0100 | p3n | (~p3n@217.198.124.246) (Quit: ZNC 1.8.2 - https://znc.in) |
2023-12-16 21:09:23 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 268 seconds) |
2023-12-16 21:17:13 +0100 | todi | (~todi@p5dca55c4.dip0.t-ipconnect.de) |
2023-12-16 21:18:50 +0100 | fendor | (~fendor@2a02:8388:1605:d100:267b:1353:13d7:4f0c) |
2023-12-16 21:21:19 +0100 | lottaquestions | (~nick@node-1w7jr9urnhmtoqu922t90hvvl.ipv6.telus.net) |
2023-12-16 21:21:43 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
2023-12-16 21:26:07 +0100 | jjhoo | (jahakala@user/jjhoo) (Ping timeout: 246 seconds) |
2023-12-16 21:26:10 +0100 | jargon | (~jargon@32.sub-174-238-226.myvzw.com) (Read error: Connection reset by peer) |
2023-12-16 21:27:08 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) |
2023-12-16 21:32:17 +0100 | nate4 | (~nate@c-98-45-158-125.hsd1.ca.comcast.net) (Ping timeout: 252 seconds) |
2023-12-16 21:34:29 +0100 | trev | (~trev@user/trev) (Quit: trev) |
2023-12-16 21:40:29 +0100 | fendor | (~fendor@2a02:8388:1605:d100:267b:1353:13d7:4f0c) (Remote host closed the connection) |
2023-12-16 21:41:07 +0100 | mechap | (~mechap@user/mechap) |
2023-12-16 21:41:57 +0100 | jjhoo | (~jahakala@user/jjhoo) |
2023-12-16 21:51:39 +0100 | tcard | (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Quit: Leaving) |
2023-12-16 21:51:59 +0100 | rvalue | (~rvalue@user/rvalue) (Quit: ZNC - https://znc.in) |
2023-12-16 21:53:31 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:ec86:c151:5ba6:29ff) (Remote host closed the connection) |
2023-12-16 21:59:02 +0100 | alp__ | (~alp@2001:861:e3d6:8f80:70a5:2518:c61b:a3f3) (Ping timeout: 268 seconds) |
2023-12-16 22:08:43 +0100 | mikess | (~sam@user/mikess) |
2023-12-16 22:13:43 +0100 | <Joao003> | I handmade lenses ^_^ https://play.haskell.org/saved/gHqpuT2V |
2023-12-16 22:13:47 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 264 seconds) |
2023-12-16 22:15:12 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2023-12-16 22:15:15 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:ec86:c151:5ba6:29ff) |
2023-12-16 22:16:54 +0100 | not_reserved | (~not_reser@154.16.157.88) (Quit: Client closed) |
2023-12-16 22:18:21 +0100 | _ht | (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection) |
2023-12-16 22:19:33 +0100 | <haskellbridge> | 12<Celestial> the "stab" in the lens signature always seems so threatening |
2023-12-16 22:22:17 +0100 | <Joao003> | Celestial: lol |
2023-12-16 22:23:40 +0100 | Sgeo | (~Sgeo@user/sgeo) |
2023-12-16 22:29:16 +0100 | idgaen | (~idgaen@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 4.1.1) |
2023-12-16 22:30:11 +0100 | dcoutts | (~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) |
2023-12-16 22:34:26 +0100 | p3n | (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) |
2023-12-16 22:35:25 +0100 | jargon | (~jargon@54.sub-174-238-226.myvzw.com) |
2023-12-16 22:36:11 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:ec86:c151:5ba6:29ff) (Remote host closed the connection) |
2023-12-16 22:41:24 +0100 | Square | (~Square@user/square) |
2023-12-16 22:46:58 +0100 | lottaquestions | (~nick@node-1w7jr9urnhmtoqu922t90hvvl.ipv6.telus.net) (Remote host closed the connection) |
2023-12-16 22:51:48 +0100 | <Joao003> | What is the difference between data and newtype? |
2023-12-16 22:52:18 +0100 | potatosalad | (~potatosal@201.17.66.242) |
2023-12-16 22:52:40 +0100 | leungbk | (~user@142-129-149-172.res.spectrum.com) |
2023-12-16 22:56:15 +0100 | notzmv | (~zmv@user/notzmv) (Ping timeout: 256 seconds) |
2023-12-16 22:56:22 +0100 | akegalj | (~akegalj@186-160.dsl.iskon.hr) |
2023-12-16 22:59:28 +0100 | alexherbo2 | (~alexherbo@2a02-8440-3340-83ed-0031-2a2f-e366-94f0.rev.sfr.net) |
2023-12-16 23:00:19 +0100 | potatosalad | (~potatosal@201.17.66.242) (Quit: Connection closed) |
2023-12-16 23:05:48 +0100 | <ski> | (a) `newtype' only allows a single data constructor, with a single component; (b) that constructor is strict, but matching on it is a no-op, meaning that it effectively disappears at run-time; (c) therefore `newtype' is like `type', apart from that you have to explicitly go from representation type to type abbreviation (and back); and (d) so a `newtype' can be recursive, while a `type' synonym can't |
2023-12-16 23:08:00 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2023-12-16 23:08:38 +0100 | <ski> | use a `newtype' when you either want to hide the representation type; or when you want to attach a different type class instance |
2023-12-16 23:08:56 +0100 | <ski> | (or when you don't want to introduce extra bottoms) |
2023-12-16 23:09:04 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2023-12-16 23:12:49 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:ec86:c151:5ba6:29ff) |
2023-12-16 23:17:21 +0100 | leungbk | (~user@142-129-149-172.res.spectrum.com) (Ping timeout: 252 seconds) |
2023-12-16 23:34:07 +0100 | mmhat | (~mmh@p200300f1c702cd6eee086bfffe095315.dip0.t-ipconnect.de) |
2023-12-16 23:37:32 +0100 | <Joao003> | Do you use fmap or <$>? |
2023-12-16 23:37:40 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
2023-12-16 23:38:26 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2023-12-16 23:39:38 +0100 | <Joao003> | Proving my earlier views can be composed with (.): https://play.haskell.org/saved/qPUSampH |
2023-12-16 23:39:46 +0100 | <Joao003> | s/views/lenses/ |
2023-12-16 23:39:59 +0100 | aruns | (~aruns@user/aruns) (Ping timeout: 260 seconds) |
2023-12-16 23:44:48 +0100 | <EvanR> | >Do you use fmap or <$> |
2023-12-16 23:44:50 +0100 | <EvanR> | yes |
2023-12-16 23:45:51 +0100 | <Joao003> | lol |
2023-12-16 23:45:57 +0100 | <Joao003> | But which do you prefer? |
2023-12-16 23:46:29 +0100 | <EvanR> | I use <$> with <*> chains |
2023-12-16 23:46:41 +0100 | <Joao003> | What does the <*> chain do? |
2023-12-16 23:46:41 +0100 | <EvanR> | otherwise I don't see the point |
2023-12-16 23:47:00 +0100 | <Rembane> | > (+) <$> Just 7 <*> Just 8 |
2023-12-16 23:47:01 +0100 | <lambdabot> | Just 15 |
2023-12-16 23:47:06 +0100 | <Rembane> | For instanc e |
2023-12-16 23:47:08 +0100 | <Joao003> | Oh |
2023-12-16 23:47:22 +0100 | <EvanR> | applicative programming |
2023-12-16 23:47:27 +0100 | <Joao003> | > (==) <$> Just 1 <*> Just 1 |
2023-12-16 23:47:29 +0100 | <lambdabot> | Just True |
2023-12-16 23:47:45 +0100 | <Joao003> | > (==) <$> Just 1 <*> Nothing |
2023-12-16 23:47:46 +0100 | <lambdabot> | Nothing |
2023-12-16 23:47:58 +0100 | <EvanR> | you could have written pure (==) <*> Just 1 <*> Just 1, or pure f <*> x <*> y <*> z |
2023-12-16 23:48:13 +0100 | <EvanR> | which is equivalent to start with <$> and dropping the pure |
2023-12-16 23:48:19 +0100 | <yushyin> | if i need it infix i use <$>, if not i use fmap. |
2023-12-16 23:48:21 +0100 | <Joao003> | > (==) <*> Just 1 <*> Just 1 |
2023-12-16 23:48:23 +0100 | <lambdabot> | error: |
2023-12-16 23:48:23 +0100 | <lambdabot> | • Couldn't match expected type ‘Maybe (a1 -> a2 -> b)’ |
2023-12-16 23:48:23 +0100 | <lambdabot> | with actual type ‘a0 -> a0 -> Bool’ |
2023-12-16 23:48:31 +0100 | <Joao003> | > pure (==) <*> Just 1 <*> Just 1 |
2023-12-16 23:48:32 +0100 | <lambdabot> | Just True |
2023-12-16 23:48:44 +0100 | <Joao003> | > Just (==) <*> Just 1 <*> Just 1 |
2023-12-16 23:48:45 +0100 | <lambdabot> | Just True |
2023-12-16 23:48:59 +0100 | <Joao003> | > Nothing <*> Just 1 <*> Just 1 |
2023-12-16 23:49:00 +0100 | <lambdabot> | Nothing |
2023-12-16 23:50:18 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:ec86:c151:5ba6:29ff) (Remote host closed the connection) |
2023-12-16 23:50:34 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:ec86:c151:5ba6:29ff) |
2023-12-16 23:50:59 +0100 | <EvanR> | Employee <$> pure i <*> getName i <*> getSalary i <*> getSSN i |
2023-12-16 23:53:25 +0100 | target_i | (~target_i@217.175.14.39) (Quit: leaving) |