Logs on 2023-01-22 (liberachat/#haskell)
| 00:03:38 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
| 00:12:59 | × | infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection) |
| 00:14:04 | × | acidjnk quits (~acidjnk@p200300d6e715c424c4be665c85703a1b.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 00:16:10 | → | infinity0 joins (~infinity0@pwned.gg) |
| 00:18:49 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
| 00:20:25 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 00:25:24 | × | Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:25:57 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1) |
| 00:26:12 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 00:36:22 | × | infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection) |
| 00:39:35 | → | infinity0 joins (~infinity0@pwned.gg) |
| 00:45:00 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 00:45:16 | → | mizlan joins (~mizlan@169.150.203.65) |
| 00:46:10 | × | P1RATEZ quits (piratez@user/p1ratez) (Remote host closed the connection) |
| 00:47:57 | → | img joins (~img@user/img) |
| 00:49:49 | × | mizlan quits (~mizlan@169.150.203.65) (Ping timeout: 260 seconds) |
| 00:50:40 | → | mizlan joins (~mizlan@169.150.203.64) |
| 01:04:54 | <dsal> | > "some words thats should be capped" & worded . _head %~ toUpper |
| 01:04:56 | <lambdabot> | "Some Words Thats Should Be Capped" |
| 01:06:38 | <geekosaur> | but is that Text? |
| 01:08:20 | × | ix quits (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Ping timeout: 255 seconds) |
| 01:10:39 | → | CiaoSen joins (~Jura@p200300c9572d4e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 01:10:51 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
| 01:10:56 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:10 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
| 01:13:54 | × | mizlan quits (~mizlan@169.150.203.64) (Read error: Connection reset by peer) |
| 01:15:05 | × | CiaoSen quits (~Jura@p200300c9572d4e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 01:17:02 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:19:13 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:71a5:b1e9:85a5:f360) |
| 01:19:45 | → | mizlan joins (~mizlan@169.150.203.59) |
| 01:21:35 | × | perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8) |
| 01:28:50 | → | mizlan_ joins (~mizlan@89.46.114.182) |
| 01:29:46 | × | mizlan quits (~mizlan@169.150.203.59) (Ping timeout: 272 seconds) |
| 01:33:34 | × | mizlan_ quits (~mizlan@89.46.114.182) (Ping timeout: 272 seconds) |
| 01:36:57 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 01:43:02 | × | unit73e quits (~emanuel@2001:818:e8dd:7c00:656:e5ff:fe72:9d36) (Ping timeout: 256 seconds) |
| 01:44:18 | × | infinity0 quits (~infinity0@pwned.gg) (Remote host closed the connection) |
| 01:49:16 | → | mizlan joins (~mizlan@169.150.203.59) |
| 01:50:30 | → | infinity0 joins (~infinity0@pwned.gg) |
| 01:53:03 | <ddellacosta> | how do I actually use/install the tasty test runner described here? https://github.com/UnkindPartition/tasty#runtime I have tasty installed as a dependency in my test section of my cabal config, but I'm missing something obvious I think. I can run tests with `cabal test` and that works, but it's kind of minimal |
| 01:53:17 | → | razetime joins (~Thunderbi@117.193.4.9) |
| 01:53:50 | × | mizlan quits (~mizlan@169.150.203.59) (Ping timeout: 272 seconds) |
| 01:57:23 | → | perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) |
| 01:58:14 | <Axman6> | ddellacosta: have you put anything in the Main.hs (or Test or whatever) to run the tests? It's bee a while since I've used tasty to just looking things up for you now |
| 01:58:59 | <Axman6> | I believe I've used tasty-discover before, which takes some of the pain of maintaining the plumbing of your testsuite away |
| 01:59:16 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 01:59:21 | <ddellacosta> | Axman6: yes, I can run them with cabal test |
| 01:59:34 | <Axman6> | ah ok - so what are you missing? |
| 02:01:04 | <ddellacosta> | the doc I linked to implies there is a command-line test runner packaged with the tasty package by default, I'm just curious if I'm missing something because I don't have that |
| 02:01:13 | <ddellacosta> | as far as I can tell |
| 02:02:00 | <Axman6> | ah, yeah you can get cabal to pass arguments to the test executable - it will have been compiled somewhere and cabal is running it. one sec I'll find the args |
| 02:03:22 | <Axman6> | cabal test --help mentions --test-options and --test-option which let you pass things to the executable. this is particularly for quickcheck tests which tell you the seed it used so you can re-run previously failing tests |
| 02:03:38 | → | elevenkb joins (~elevenkb@105.224.34.126) |
| 02:03:40 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds) |
| 02:03:40 | <ddellacosta> | huh okay, I guess I misunderstood because I suppose that's what I'm already doing, just without those args. Thanks Axman6 |
| 02:03:57 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 02:05:02 | <Axman6> | I have to look it up every time I start a new project |
| 02:05:17 | × | _xor quits (~xor@74.215.182.83) (Quit: brb) |
| 02:05:50 | <Axman6> | I would love it if it had something more like stack's stack exec -- --args-for --the-executable |
| 02:06:18 | <ddellacosta> | related: do folks use anything to look for changes and re-run tests, other than just e.g. watch in linux or whatever? |
| 02:06:37 | <ddellacosta> | I guess stack includes this by default |
| 02:07:23 | × | gmg quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds) |
| 02:07:25 | <Axman6> | I think you can use ghcid to do that |
| 02:07:36 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 02:07:40 | <Axman6> | not sure if HLS can do something similar inline |
| 02:08:18 | <ddellacosta> | oh good points both--will take a look and see what I can figure out. Thanks for all the help Axman6 |
| 02:09:20 | <Axman6> | All good, goos luck |
| 02:09:23 | <Axman6> | good* |
| 02:13:28 | × | elevenkb quits (~elevenkb@105.224.34.126) (Ping timeout: 260 seconds) |
| 02:13:35 | × | theproffesor quits (~theproffe@user/theproffesor) (Ping timeout: 260 seconds) |
| 02:14:54 | → | _xor joins (~xor@74.215.182.83) |
| 02:16:09 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 260 seconds) |
| 02:18:36 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 02:18:57 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 02:20:16 | → | theproffesor joins (~theproffe@user/theproffesor) |
| 02:25:54 | <sm> | yeah, stack test --file-watch --fast or some variant of stack exec -- ghci -T ... are both good |
| 02:26:08 | <sm> | * yeah, stack test --file-watch --fast or some variant of stack exec -- ghcid -T ... are both good |
| 02:26:36 | <sm> | as is watchexec -- CMD |
| 02:30:10 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 02:31:57 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 02:31:57 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 02:31:57 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:32:08 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 02:33:44 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
| 02:34:17 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 02:37:26 | × | barzo quits (~hd@31.223.41.44) (Ping timeout: 256 seconds) |
| 02:54:43 | <ddellacosta> | watchexec looks nice |
| 02:55:24 | <ddellacosta> | yeah this is trivially easy with ghcid, `ghcid -c cabal repl my-test-suite -T Main.main` |
| 03:04:58 | → | shon joins (~shon@gateway/tor-sasl/shon) |
| 03:11:37 | × | thongpv quits (~thongpv87@2001:ee0:5577:f0d0:73e4:4002:4782:e47b) (Remote host closed the connection) |
| 03:16:10 | × | iteratee quits (~kyle@162.218.222.107) (Read error: Connection reset by peer) |
| 03:16:27 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 03:17:13 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Client Quit) |
| 03:17:36 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 03:23:55 | oldfashionedcow | is now known as username235 |
| 03:24:04 | username235 | is now known as oldfashionedcow |
| 03:26:09 | → | iteratee joins (~kyle@162.218.222.107) |
| 03:28:54 | → | thongpv joins (~thongpv87@2001:ee0:5577:f0d0:b436:353d:3a0c:35f3) |
| 03:29:36 | oldfashionedcow | is now known as burp |
| 03:29:59 | burp | is now known as oldfashionedcow |
| 03:34:00 | → | accord joins (uid568320@id-568320.hampstead.irccloud.com) |
| 03:35:09 | × | hex_ quits (~hex@cpc99326-croy26-2-0-cust216.19-2.cable.virginm.net) (Quit: leaving) |
| 03:37:50 | → | kimjetwav joins (~user@2607:fea8:235e:b600:2d68:2d7e:6ecb:730c) |
| 03:40:36 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 03:41:39 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:4e8c::) (Quit: The Lounge - https://thelounge.chat) |
| 03:42:41 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:4e8c::) |
| 03:47:41 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 03:47:41 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:47:41 | finn_elija | is now known as FinnElija |
| 03:51:14 | × | td_ quits (~td@83.135.9.44) (Ping timeout: 260 seconds) |
| 03:52:51 | → | td_ joins (~td@83.135.9.13) |
| 03:54:32 | × | ddellacosta quits (~ddellacos@143.244.47.100) (Ping timeout: 265 seconds) |
| 03:58:28 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds) |
| 03:58:33 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 03:59:11 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:59:43 | × | razetime quits (~Thunderbi@117.193.4.9) (Quit: See You Space Cowboy) |
| 04:00:47 | → | mizlan joins (~mizlan@169.150.203.60) |
| 04:05:14 | × | mizlan quits (~mizlan@169.150.203.60) (Ping timeout: 260 seconds) |
| 04:05:35 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 04:06:05 | → | dsrt^ joins (~dsrt@c-24-30-76-89.hsd1.ga.comcast.net) |
| 04:06:30 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 04:07:09 | → | abhixec joins (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) |
| 04:07:49 | <Axman6> | > let h' *^ c = (h' * 16777619) + c in a ^* x ^* y ^* z :: Expr |
| 04:07:52 | <lambdabot> | error: |
| 04:07:52 | <lambdabot> | • Variable not in scope: (^*) :: Expr -> Expr -> t1 |
| 04:07:52 | <lambdabot> | • Perhaps you meant one of these: |
| 04:07:54 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 04:08:03 | <Axman6> | > let h' ^* c = (h' * 16777619) + c in a ^* x ^* y ^* z :: Expr |
| 04:08:05 | <lambdabot> | ((a * 16777619 + x) * 16777619 + y) * 16777619 + z |
| 04:08:46 | <Axman6> | > 16777619^2 |
| 04:08:47 | <lambdabot> | 281488499309161 |
| 04:08:55 | <Axman6> | > 16777619^2 :: Int |
| 04:08:57 | <lambdabot> | 281488499309161 |
| 04:09:43 | <EvanR> | > 2^24 |
| 04:09:45 | <lambdabot> | 16777216 |
| 04:10:33 | <Axman6> | > 16777619^3 :: Int |
| 04:10:35 | <lambdabot> | 340311421221253963 |
| 04:10:40 | <Axman6> | > 16777619^3 :: Integer |
| 04:10:42 | <lambdabot> | 4722706794290866467659 |
| 04:11:08 | <EvanR> | > 2^72 |
| 04:11:10 | <lambdabot> | 4722366482869645213696 |
| 04:12:11 | <Axman6> | ah, interesting - the next thing I was going to do was look at the bits. thanks for that |
| 04:14:20 | <Axman6> | @check \x -> `shiftL` 24 == x * 16777216 |
| 04:14:20 | <lambdabot> | <unknown>.hs:1:7:Parse error: ` |
| 04:14:29 | <Axman6> | @check \x -> x `shiftL` 24 == x * 16777216 |
| 04:14:30 | <lambdabot> | +++ OK, passed 100 tests. |
| 04:17:51 | → | mizlan joins (~mizlan@89.46.114.17) |
| 04:18:32 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
| 04:18:51 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
| 04:22:16 | × | mizlan quits (~mizlan@89.46.114.17) (Ping timeout: 256 seconds) |
| 04:27:29 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 04:28:15 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 04:30:22 | <Inst> | what's wrong with the assertion: "A while loop is a recursion scheme"? |
| 04:30:50 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 04:31:03 | <Inst> | also, just curious, has scoping types ever been discussed? |
| 04:32:59 | <Inst> | i.e, right now, we can only data / type / newtype at the top level |
| 04:37:13 | → | mizlan joins (~mizlan@169.150.203.45) |
| 04:38:35 | × | xff0x_ quits (~xff0x@2405:6580:b080:900:5aaf:7af0:29ef:e5fa) (Ping timeout: 260 seconds) |
| 04:40:30 | → | xff0x_ joins (~xff0x@178.255.149.135) |
| 04:41:51 | × | mizlan quits (~mizlan@169.150.203.45) (Ping timeout: 260 seconds) |
| 04:49:47 | → | azimut_ joins (~azimut@gateway/tor-sasl/azimut) |
| 04:49:52 | <anatta> | why can only types with kind * -> * be members of Foldable? |
| 04:49:55 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in) |
| 04:50:08 | <anatta> | it doesn't make sense to me |
| 04:50:40 | <anatta> | I want to be able to fold everything :@ |
| 04:54:20 | × | xff0x_ quits (~xff0x@178.255.149.135) (Ping timeout: 272 seconds) |
| 04:55:45 | → | xff0x_ joins (~xff0x@2405:6580:b080:900:21ca:a6c1:60fa:34e7) |
| 04:56:14 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 272 seconds) |
| 04:56:36 | <Axman6> | anatta: how would you tell the compiler that you want to fold over the first parameter of an Either? |
| 04:56:58 | <Axman6> | this is also basically a problem that lens solves |
| 04:59:03 | <anatta> | Axman6: To be fair, "I want to be able to fold everything" was more a "I want to be allowed to define Foldable instances for everything I think I *can* write a reasonable Foldable instance for" |
| 05:00:25 | <anatta> | I saw something about lens when I googled, but unfortunately I know nothing about optics |
| 05:00:47 | <anatta> | and it looks difficult at a glance so I haven't really looked into it in depth |
| 05:03:58 | <Axman6> | they literally exist to solve the problem you have |
| 05:04:28 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
| 05:05:11 | <Axman6> | > sumOf (traverse . _1) $ zip [1..10] "Hello, world!" |
| 05:05:13 | <lambdabot> | 55 |
| 05:05:47 | <Axman6> | > zip [1..10] "Hello, world!" ^.. traverse |
| 05:05:49 | <lambdabot> | [(1,'H'),(2,'e'),(3,'l'),(4,'l'),(5,'o'),(6,','),(7,' '),(8,'w'),(9,'o'),(10... |
| 05:05:54 | <Axman6> | > zip [1..10] "Hello, world!" ^.. traverse . _1 |
| 05:05:56 | <lambdabot> | [1,2,3,4,5,6,7,8,9,10] |
| 05:06:33 | → | mizlan joins (~mizlan@89.46.114.143) |
| 05:09:10 | <anatta> | so you can do like |
| 05:09:24 | <anatta> | @let newtype IList = IL [Int] deriving (Show, Eq) |
| 05:09:26 | <lambdabot> | Defined. |
| 05:09:38 | <Axman6> | > ("Hello", ("there", ["are","several"]),Left "Strings", "in", "here") & partsOf template %~ (reverse :: [String] -> [String]) |
| 05:09:39 | <lambdabot> | ("here",("in",["Strings","several"]),Left "are","there","Hello") |
| 05:09:45 | <anatta> | > (IL [1..10]) ^.. traverse |
| 05:09:47 | <lambdabot> | error: |
| 05:09:47 | <lambdabot> | • Couldn't match type ‘t0 b’ with ‘IList’ |
| 05:09:47 | <lambdabot> | Expected type: Getting (Endo [b]) IList b |
| 05:09:48 | <Axman6> | > ("Hello", ("there", ["are","several"]),Left "Strings", "in", "here") & partsOf template %~ (reverse :: String -> String) |
| 05:09:51 | <lambdabot> | ("erehn",("isgni",["rtS","lareves"]),Left "eraereh","to","lleH") |
| 05:09:58 | <Axman6> | Lens is crazy powerful |
| 05:10:30 | <Axman6> | no, you'd need an Iso between IL and [Int] |
| 05:10:37 | <anatta> | yeah, but crazy complicated as well :( |
| 05:10:52 | <anatta> | I see |
| 05:10:57 | <Axman6> | it's really not, once you understand the pieces. |
| 05:11:13 | <Axman6> | (that particular example is complicated by the use of Data.Data, not lens) |
| 05:11:26 | × | mizlan quits (~mizlan@89.46.114.143) (Ping timeout: 272 seconds) |
| 05:11:53 | <anatta> | to be fair, I thought parser combinators were impossible to understand before learning them as well |
| 05:12:13 | <anatta> | so I guess it's possible that I'll be able to use lenses as well some day |
| 05:12:52 | <anatta> | or lens, if there is a difference between lenses and lens |
| 05:12:53 | <Axman6> | they're quite a simple idea, and the implementation is actually quite understandable if you sit down and work though it a bit |
| 05:13:46 | <anatta> | if I were to do so, what version of lenses is considered the better one nowadays? |
| 05:15:03 | <energizer> | what is a killer app of lenses? |
| 05:15:05 | <Axman6> | they're all just functions of the form (a -> f b) -> (s -> f t), so a concrete example: fstL :: Functor f => (a -> f b) -> ((a,c) -> f (b,c)); fstL aToFb (a,c) -> (\b -> (b,c)) <$> f a |
| 05:15:11 | <Axman6> | energizer: all apps |
| 05:15:43 | × | haritz quits (~hrtz@user/haritz) (Read error: Connection reset by peer) |
| 05:16:01 | <Axman6> | I wrote a program that converted GeoJSON into CZML (a similar JSON based geospatial format) using lens, and it was only 20 or so lines and ran in constant memory |
| 05:16:30 | <Axman6> | lens is a DSL for talking about data, extracting, modifying and transforming it |
| 05:17:03 | <anatta> | when I said "what version" I meant that I've heard that there are profunctor and some other kind(?) |
| 05:17:17 | <anatta> | or I think I have heard |
| 05:17:21 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 05:17:45 | <anatta> | as I said I haven't really read a lot about optics in general, except to see that they look scary :p |
| 05:18:11 | <Axman6> | I still like the lens library because I know it inside out, but optics can provide a much nicer beginner experience at the cost of needing to have optics as a dependency when defining your own optics |
| 05:18:28 | <anatta> | Van Laarhoven was the other one |
| 05:19:23 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 05:19:51 | <Axman6> | yes, that's what lens uses. there's (probably?) some advangages to using profunctor optics over van laarhoven, but most of lens can be implemented using things defined in base and you don't need to rely on the lens library at all |
| 05:20:15 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 05:20:18 | <anatta> | I see |
| 05:20:36 | → | haritz joins (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) |
| 05:20:36 | × | haritz quits (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) (Changing host) |
| 05:20:36 | → | haritz joins (~hrtz@user/haritz) |
| 05:21:04 | <anatta> | I generally try a bit of both (using a library and implementing on your own) - I like to have working examples before experimenting |
| 05:21:49 | <anatta> | so maybe I'll try using the library until I see how stuff are supposed to work, and then I can start implementing larger and larger parts on my own |
| 05:21:55 | <Axman6> | optics give you a language for talking about sub parts of data, a Lens a b lets you "focus" on a b within an a - this focusing allows you to extract that b from the a, replace that b within the a, or apply a function to the b within the a to get a new a |
| 05:22:34 | <anatta> | I had mostly heard about it in the context of "records are unwieldy in Haskell" :p |
| 05:22:42 | <Axman6> | optics can be composed, so if you have Lens a b and Lens b c then you can create a Lens a c that lets you focus on a c with the a (where that c was within a b that was within the a) |
| 05:23:01 | <Axman6> | well, it's useful for that, but it's also much much more than that |
| 05:23:14 | <Axman6> | you can do jq like things on JSON data for example |
| 05:23:59 | <anatta> | it sounds really useful in general |
| 05:24:18 | <Axman6> | the example I showed above let me say "find all the strings anywhere in this arbitrary data, and let me deal with them as a collection, regardless of the shape of that original data" |
| 05:24:21 | <Axman6> | it us |
| 05:24:23 | <Axman6> | is* |
| 05:24:37 | <anatta> | that's what the usecase I had for wanting to fold through a custom datatype :p |
| 05:25:03 | <anatta> | I wanted to find a certain type of leaf in a tree |
| 05:25:57 | <anatta> | (I have an AST of expressions with constants and variables, and I wanted to extract all variables) |
| 05:27:19 | <Axman6> | sounds like a Data.Data sort of thing |
| 05:29:45 | <anatta> | in what sense? I barely have encountered Data.Data (I ran into it when making a quasiquoter, but only tangentially) |
| 05:30:13 | <[Leary]> | anatta: You might just want `data YourAST c a = Const c | Var a | ... deriving (..., Foldable)`. |
| 05:30:46 | <anatta> | [Leary]: Problem is that my type has kind * |
| 05:30:59 | <[Leary]> | It doesn't need to. |
| 05:33:13 | <anatta> | to be fair, I guess I could add a type variable just to be able to derive Foldable |
| 05:34:17 | <Axman6> | You'll be using Tree that Grow in no time |
| 05:34:55 | → | mizlan joins (~mizlan@89.46.114.182) |
| 05:35:49 | <anatta> | what is that? |
| 05:36:02 | × | oldfashionedcow quits (~Rahul_San@user/oldfashionedcow) (Quit: WeeChat 3.7.1) |
| 05:39:35 | <anatta> | I probably should go to bed though. But my conclusion is that I probably should start reading about optics/lenses soon, but that I might get away with just adding type parameters to the tree in this particular case. |
| 05:39:44 | <anatta> | thanks for the advice, and good night =) |
| 05:39:56 | × | mizlan quits (~mizlan@89.46.114.182) (Ping timeout: 272 seconds) |
| 05:39:56 | <[Leary]> | anatta: More polymorphic types are usually more useful, and that especially holds when the type parameter gives you all of Functor, Foldable, Traversable, Applicative and Monad. It doesn't really matter that you only /intend/ to use it at one type. The polymorphism also means you can give your operations more restrictive type signatures that prevent you from writing stupid bugs. |
| 05:40:29 | <anatta> | that makes a lot of sense |
| 05:40:55 | <Axman6> | Trees that Grow: https://www.jucs.org/jucs_23_1/trees_that_grow/jucs_23_01_0042_0062_najd.pdf |
| 05:41:11 | <Axman6> | I'm sure there's a talk about it from SPJ, but I can't find it |
| 05:41:16 | <[Leary]> | E.g. it's much easier to write `mapT :: forall a b. (a -> b) -> T a -> T b` correctly than `mapT :: forall a. (a -> a) -> T a -> T a` or `mapT :: (Foo -> Foo) -> T -> T`. |
| 05:43:12 | <Axman6> | how good is parametricity |
| 05:50:24 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 05:51:24 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Client Quit) |
| 06:04:54 | → | mizlan joins (~mizlan@169.150.203.65) |
| 06:09:07 | × | shon quits (~shon@gateway/tor-sasl/shon) (Quit: WeeChat 3.8) |
| 06:09:22 | × | mizlan quits (~mizlan@169.150.203.65) (Ping timeout: 256 seconds) |
| 06:19:26 | × | wroathe quits (~wroathe@user/wroathe) (Quit: leaving) |
| 06:20:10 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 06:21:06 | × | finsternis quits (~X@23.226.237.192) (Ping timeout: 272 seconds) |
| 06:21:16 | × | heartburn quits (~gass@2a00:d880:3:1::b1e4:b241) (Ping timeout: 256 seconds) |
| 06:21:42 | → | finsternis joins (~X@23.226.237.192) |
| 06:21:58 | → | heartburn joins (~gass@2a00:d880:3:1::b1e4:b241) |
| 06:25:59 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 06:26:56 | × | abhixec quits (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 256 seconds) |
| 06:33:26 | → | mizlan joins (~mizlan@89.46.114.82) |
| 06:33:35 | → | razetime joins (~Thunderbi@117.193.4.9) |
| 06:37:42 | × | mizlan quits (~mizlan@89.46.114.82) (Ping timeout: 256 seconds) |
| 06:38:17 | × | azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 06:39:07 | → | Inst_ joins (~Inst@2601:6c4:4081:54f0:d621:5cdd:9051:c240) |
| 06:39:50 | × | razetime quits (~Thunderbi@117.193.4.9) (Quit: See You Space Cowboy) |
| 06:42:14 | × | Inst quits (~Inst@2601:6c4:4081:54f0:7987:1b39:7203:fc61) (Ping timeout: 256 seconds) |
| 06:54:31 | × | accord quits (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 06:59:21 | → | trev joins (~trev@user/trev) |
| 07:02:29 | → | mizlan joins (~mizlan@169.150.203.59) |
| 07:05:01 | → | biberu\ joins (~biberu@user/biberu) |
| 07:05:34 | → | Sgeo_ joins (~Sgeo@user/sgeo) |
| 07:05:52 | → | razetime joins (~Thunderbi@117.193.4.9) |
| 07:06:12 | → | trev_ joins (~trev@109-252-35-99.nat.spd-mgts.ru) |
| 07:06:18 | × | razetime quits (~Thunderbi@117.193.4.9) (Client Quit) |
| 07:06:21 | → | dgb83 joins (~dgb@astra4961.startdedicated.net) |
| 07:06:43 | → | ell8 joins (~ellie@user/ellie) |
| 07:06:45 | → | shapr` joins (~user@68.54.166.125) |
| 07:06:48 | → | monochrm joins (trebla@216.138.220.146) |
| 07:07:02 | → | remexre_ joins (~remexre@mail.sift.net) |
| 07:07:14 | × | mizlan quits (~mizlan@169.150.203.59) (Ping timeout: 260 seconds) |
| 07:07:30 | → | gabiruh joins (~gabiruh@vps19177.publiccloud.com.br) |
| 07:07:31 | → | danso_o joins (danso@danso.ca) |
| 07:07:44 | → | kraftwerk28_ joins (~kraftwerk@178.62.210.83) |
| 07:07:44 | → | Philonous_ joins (~Philonous@user/philonous) |
| 07:07:51 | → | koz_ joins (~koz@121.99.240.58) |
| 07:08:10 | → | __xor joins (~xor@74.215.182.83) |
| 07:08:29 | → | urdh_ joins (~urdh@user/urdh) |
| 07:08:40 | → | leeb- joins (~leeb@tk2-243-31079.vs.sakura.ne.jp) |
| 07:08:43 | → | avpx_ joins (~nick@ec2-54-214-223-1.us-west-2.compute.amazonaws.com) |
| 07:08:56 | → | kimiamania8 joins (~65804703@user/kimiamania) |
| 07:09:08 | → | dextaa5 joins (~DV@user/dextaa) |
| 07:09:12 | → | hololeap_ joins (~quassel@user/hololeap) |
| 07:09:15 | → | kitzman joins (~kitzman@user/dekenevs) |
| 07:09:26 | → | lbseale_ joins (~quassel@user/ep1ctetus) |
| 07:09:34 | → | shriekingnoise_ joins (~shrieking@186.137.175.87) |
| 07:09:45 | → | micro_ joins (~micro@user/micro) |
| 07:09:49 | → | Patternm1ster joins (~georg@li1192-118.members.linode.com) |
| 07:10:02 | → | aweinsto1k joins (~aweinstoc@cpe-74-76-189-75.nycap.res.rr.com) |
| 07:10:04 | → | kjak_ joins (~kjak@pool-72-66-75-40.washdc.fios.verizon.net) |
| 07:10:07 | → | _koolazer joins (~koo@user/koolazer) |
| 07:10:09 | → | ridcully_ joins (~ridcully@p508acd69.dip0.t-ipconnect.de) |
| 07:10:13 | → | td__ joins (~td@83.135.9.13) |
| 07:10:26 | → | gnyeki_ joins (~gnyeki@user/gnyeki) |
| 07:10:29 | → | ezzieygu1wuf joins (~Unknown@user/ezzieyguywuf) |
| 07:10:35 | → | Momentum_ joins (momentum@tilde.team) |
| 07:10:42 | → | pi1 joins (~pi@173.209.64.74) |
| 07:10:47 | → | opqdonut_ joins (opqdonut@pseudo.fixme.fi) |
| 07:10:57 | → | johnw joins (~johnw@2600:1700:cf00:db0:217d:20b2:d1d1:18a9) |
| 07:11:14 | → | root joins (~m-mzmz6l@vmi833741.contaboserver.net) |
| 07:11:38 | root | is now known as Guest3728 |
| 07:12:49 | × | sudden quits (~cat@user/sudden) (Read error: Connection reset by peer) |
| 07:12:53 | → | Alex_test_ joins (~al_test@178.34.160.228) |
| 07:13:19 | → | sudden joins (~cat@user/sudden) |
| 07:13:39 | → | Square2 joins (~a@user/square) |
| 07:14:55 | × | trev quits (~trev@user/trev) (*.net *.split) |
| 07:14:55 | × | td_ quits (~td@83.135.9.13) (*.net *.split) |
| 07:14:55 | × | _xor quits (~xor@74.215.182.83) (*.net *.split) |
| 07:14:55 | × | perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (*.net *.split) |
| 07:14:55 | × | Xeroine quits (~Xeroine@user/xeroine) (*.net *.split) |
| 07:14:55 | × | remexre quits (~remexre@user/remexre) (*.net *.split) |
| 07:14:55 | × | Sgeo quits (~Sgeo@user/sgeo) (*.net *.split) |
| 07:14:55 | × | shapr quits (~user@68.54.166.125) (*.net *.split) |
| 07:14:55 | × | biberu quits (~biberu@user/biberu) (*.net *.split) |
| 07:14:55 | × | micro quits (~micro@user/micro) (*.net *.split) |
| 07:14:55 | × | Square quits (~a@user/square) (*.net *.split) |
| 07:14:55 | × | johnjaye quits (~pi@173.209.64.74) (*.net *.split) |
| 07:14:55 | × | shriekingnoise quits (~shrieking@186.137.175.87) (*.net *.split) |
| 07:14:55 | × | ell quits (~ellie@user/ellie) (*.net *.split) |
| 07:14:55 | × | kjak quits (~kjak@pool-72-66-75-40.washdc.fios.verizon.net) (*.net *.split) |
| 07:14:55 | × | Alex_test quits (~al_test@178.34.160.228) (*.net *.split) |
| 07:14:55 | × | Philonous quits (~Philonous@user/philonous) (*.net *.split) |
| 07:14:55 | × | ridcully quits (~ridcully@p508acd69.dip0.t-ipconnect.de) (*.net *.split) |
| 07:14:55 | × | urdh quits (~urdh@user/urdh) (*.net *.split) |
| 07:14:55 | × | gabiruh_ quits (~gabiruh@vps19177.publiccloud.com.br) (*.net *.split) |
| 07:14:55 | × | tdammers quits (~tdammers@77.109.72.175.res.static.edpnet.net) (*.net *.split) |
| 07:14:56 | × | monochrom quits (trebla@216.138.220.146) (*.net *.split) |
| 07:14:56 | × | lbseale quits (~quassel@user/ep1ctetus) (*.net *.split) |
| 07:14:56 | × | koala_man quits (~vidar@157.146.251.23.bc.googleusercontent.com) (*.net *.split) |
| 07:14:56 | × | titibandit quits (7efad7d72e@jabberfr.org) (*.net *.split) |
| 07:14:56 | × | hololeap quits (~quassel@user/hololeap) (*.net *.split) |
| 07:14:56 | × | koz quits (~koz@121.99.240.58) (*.net *.split) |
| 07:14:56 | × | kimiamania quits (~65804703@user/kimiamania) (*.net *.split) |
| 07:14:56 | × | dextaa quits (~DV@user/dextaa) (*.net *.split) |
| 07:14:56 | × | avpx quits (~nick@ec2-54-214-223-1.us-west-2.compute.amazonaws.com) (*.net *.split) |
| 07:14:56 | × | esph quits (~weechat@user/esph) (*.net *.split) |
| 07:14:56 | × | aweinstock quits (~aweinstoc@cpe-74-76-189-75.nycap.res.rr.com) (*.net *.split) |
| 07:14:56 | × | dgb8 quits (~dgb@astra4961.startdedicated.net) (*.net *.split) |
| 07:14:56 | × | Profpatsch quits (~Profpatsc@static.88-198-193-255.clients.your-server.de) (*.net *.split) |
| 07:14:56 | × | koolazer quits (~koo@user/koolazer) (*.net *.split) |
| 07:14:56 | × | Guest5476 quits (~m-mzmz6l@vmi833741.contaboserver.net) (*.net *.split) |
| 07:14:56 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (*.net *.split) |
| 07:14:56 | × | wz1000 quits (~zubin@static.11.113.47.78.clients.your-server.de) (*.net *.split) |
| 07:14:56 | × | danso quits (~danso@danso.ca) (*.net *.split) |
| 07:14:56 | × | kraftwerk28 quits (~kraftwerk@178.62.210.83) (*.net *.split) |
| 07:14:56 | × | Patternmaster quits (~georg@user/Patternmaster) (*.net *.split) |
| 07:14:56 | × | byorgey quits (~byorgey@155.138.238.211) (*.net *.split) |
| 07:14:56 | × | nisstyre quits (~wes@user/nisstyre) (*.net *.split) |
| 07:14:56 | × | gnyeki quits (~gnyeki@user/gnyeki) (*.net *.split) |
| 07:14:56 | × | opqdonut quits (opqdonut@pseudo.fixme.fi) (*.net *.split) |
| 07:14:56 | × | Momentum quits (momentum@tilde.team) (*.net *.split) |
| 07:14:56 | × | kitzman_ quits (~kitzman@user/dekenevs) (*.net *.split) |
| 07:14:56 | × | leeb quits (~leeb@tk2-243-31079.vs.sakura.ne.jp) (*.net *.split) |
| 07:14:56 | monochrm | is now known as monochrom |
| 07:14:56 | urdh_ | is now known as urdh |
| 07:14:56 | ell8 | is now known as ell |
| 07:14:56 | dgb83 | is now known as dgb8 |
| 07:14:56 | leeb- | is now known as leeb |
| 07:15:01 | burakcan- | is now known as burakcank |
| 07:15:02 | biberu\ | is now known as biberu |
| 07:15:03 | remexre_ | is now known as remexre |
| 07:15:03 | kimiamania8 | is now known as kimiamania |
| 07:15:03 | dextaa5 | is now known as dextaa |
| 07:15:19 | → | koala_man joins (~vidar@157.146.251.23.bc.googleusercontent.com) |
| 07:16:47 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 07:19:45 | → | byorgey joins (~byorgey@155.138.238.211) |
| 07:21:16 | → | wz1000 joins (~zubin@static.11.113.47.78.clients.your-server.de) |
| 07:21:50 | → | nisstyre joins (wes@user/nisstyre) |
| 07:21:55 | → | esph joins (~weechat@user/esph) |
| 07:22:15 | → | tdammers joins (~tdammers@77.109.72.175.res.static.edpnet.net) |
| 07:22:31 | → | perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) |
| 07:22:43 | → | Profpatsch joins (~Profpatsc@static.88-198-193-255.clients.your-server.de) |
| 07:29:52 | → | mizlan joins (~mizlan@89.46.114.100) |
| 07:33:29 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds) |
| 07:33:59 | × | mizlan quits (~mizlan@89.46.114.100) (Ping timeout: 246 seconds) |
| 07:41:38 | → | mei_ joins (~mei@user/mei) |
| 07:43:39 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 07:43:42 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 07:46:49 | × | mei_ quits (~mei@user/mei) (Quit: mei_) |
| 07:54:33 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 07:57:15 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 08:00:05 | × | shriekingnoise_ quits (~shrieking@186.137.175.87) (Ping timeout: 260 seconds) |
| 08:02:24 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 08:04:10 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds) |
| 08:07:52 | × | Guest75 quits (~Guest75@178.141.138.233) (Quit: Ping timeout (120 seconds)) |
| 08:09:56 | → | mizlan joins (~mizlan@89.46.114.129) |
| 08:18:01 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
| 08:19:20 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 08:24:41 | × | mizlan quits (~mizlan@89.46.114.129) (Ping timeout: 252 seconds) |
| 08:38:11 | → | mizlan joins (~mizlan@169.150.203.65) |
| 08:41:35 | × | Patternm1ster quits (~georg@li1192-118.members.linode.com) (Quit: leaving) |
| 08:41:50 | → | Patternmaster joins (~georg@user/Patternmaster) |
| 08:56:48 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 09:00:03 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:71a5:b1e9:85a5:f360) (Remote host closed the connection) |
| 09:03:17 | × | mechap1 quits (~mechap@user/mechap) (Quit: WeeChat 3.8) |
| 09:03:31 | → | mechap joins (~mechap@user/mechap) |
| 09:09:48 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 09:15:47 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 09:17:28 | → | titibandit joins (7efad7d72e@2a00:c70:1:178:170:40:189:1) |
| 09:20:49 | → | kenran joins (~user@user/kenran) |
| 09:20:53 | × | kenran quits (~user@user/kenran) (Remote host closed the connection) |
| 09:21:24 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 09:22:59 | × | Sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (Quit: o/) |
| 09:23:38 | Square2 | is now known as Square |
| 09:37:38 | → | Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) |
| 09:39:35 | × | mizlan quits (~mizlan@169.150.203.65) (Ping timeout: 260 seconds) |
| 09:42:24 | × | shapr` quits (~user@68.54.166.125) (Ping timeout: 260 seconds) |
| 09:43:59 | → | acidjnk joins (~acidjnk@p200300d6e715c45184a61eb831583be7.dip0.t-ipconnect.de) |
| 09:49:05 | × | eruditass quits (uid248673@id-248673.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 09:54:20 | → | mizlan joins (~mizlan@89.46.114.51) |
| 09:58:43 | × | mizlan quits (~mizlan@89.46.114.51) (Ping timeout: 260 seconds) |
| 10:00:33 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:5d38:2665:17cb:f4aa) |
| 10:00:43 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
| 10:03:29 | → | zer0bitz joins (~zer0bitz@2001:2003:f443:d600:a4e6:fd8f:f654:94ad) |
| 10:04:55 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:5d38:2665:17cb:f4aa) (Ping timeout: 256 seconds) |
| 10:07:31 | → | mizlan joins (~mizlan@169.150.203.66) |
| 10:20:08 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
| 10:27:49 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 10:28:03 | → | Sciencentistguy joins (~sciencent@hacksoc/ordinary-member) |
| 10:30:56 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 10:38:24 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 10:40:50 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds) |
| 10:42:30 | × | Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 10:56:16 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 252 seconds) |
| 11:04:50 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 11:09:33 | × | mizlan quits (~mizlan@169.150.203.66) (Ping timeout: 260 seconds) |
| 11:10:15 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 11:13:56 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 11:24:07 | × | mechap quits (~mechap@user/mechap) (Quit: WeeChat 3.8) |
| 11:24:28 | → | mechap joins (~mechap@user/mechap) |
| 11:26:30 | → | ozkutuk53 joins (~ozkutuk@176.240.174.60) |
| 11:29:24 | → | gurkenglas joins (~gurkengla@dynamic-046-114-176-241.46.114.pool.telefonica.de) |
| 11:30:50 | × | haskl quits (~haskl@user/haskl) (Read error: Connection reset by peer) |
| 11:32:39 | → | haskl joins (~haskl@user/haskl) |
| 11:34:20 | → | mizlan joins (~mizlan@169.150.203.43) |
| 11:43:21 | → | CiaoSen joins (~Jura@p200300c9572d4e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 11:45:54 | × | CiaoSen quits (~Jura@p200300c9572d4e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Client Quit) |
| 11:56:53 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 12:07:21 | × | Ranhir quits (~Ranhir@157.97.53.139) (Remote host closed the connection) |
| 12:09:56 | → | Ranhir joins (~Ranhir@157.97.53.139) |
| 12:12:18 | × | theproffesor quits (~theproffe@user/theproffesor) (Ping timeout: 252 seconds) |
| 12:14:55 | × | enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
| 12:22:28 | × | mechap quits (~mechap@user/mechap) (Ping timeout: 260 seconds) |
| 12:24:05 | → | mechap joins (~mechap@user/mechap) |
| 12:31:25 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
| 12:32:27 | → | n0den1te joins (~n0den1te@223.178.85.186) |
| 12:40:12 | → | cheater_ joins (~Username@user/cheater) |
| 12:42:49 | × | mizlan quits (~mizlan@169.150.203.43) (Ping timeout: 265 seconds) |
| 12:43:00 | × | cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds) |
| 12:43:08 | cheater_ | is now known as cheater |
| 12:43:31 | × | OscarZ quits (~oscarz@95.175.104.39) (Quit: Leaving) |
| 12:46:43 | → | tremon joins (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) |
| 12:54:09 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex) |
| 12:56:47 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 13:04:12 | → | mizlan joins (~mizlan@169.150.203.45) |
| 13:07:18 | → | cheater_ joins (~Username@user/cheater) |
| 13:09:55 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 13:11:02 | × | cheater quits (~Username@user/cheater) (Ping timeout: 255 seconds) |
| 13:11:03 | cheater_ | is now known as cheater |
| 13:12:11 | × | acidjnk quits (~acidjnk@p200300d6e715c45184a61eb831583be7.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 13:14:38 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 13:21:44 | → | cheater_ joins (~Username@user/cheater) |
| 13:24:14 | → | Guest75 joins (~Guest75@178.141.138.233) |
| 13:24:46 | × | cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds) |
| 13:24:49 | cheater_ | is now known as cheater |
| 13:29:15 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 13:41:34 | → | Homer_Simpson joins (uid550301@id-550301.uxbridge.irccloud.com) |
| 13:42:31 | <Homer_Simpson> | I'm trying to learn haskell but the stuff that the tutorial is showing isnt working in onlinedgb.com |
| 13:43:24 | <Homer_Simpson> | if I remove main I get an error, if I try to in any obvious way add more code after main print "hi" I get more errors |
| 13:44:08 | <Homer_Simpson> | https://www.tutorialspoint.com/haskell/haskell_basic_data_models.htm |
| 13:47:45 | <darkling> | Can you show us the code you've written that doesn't work? |
| 13:48:06 | → | unit73e joins (~emanuel@184.37.249.5.rev.vodafone.pt) |
| 13:48:48 | <darkling> | (There's a pastebin linked in the channel /topic |
| 13:48:51 | <Axman6> | what's onlinedgb.com? |
| 13:48:57 | <Axman6> | @where paste |
| 13:48:57 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 13:51:23 | <Homer_Simpson> | https://paste.tomsmeding.com/73xsSZiX |
| 13:51:37 | <Homer_Simpson> | im coming from C/raku here |
| 13:51:38 | <int-e> | Axman6: https://www.onlinegdb.com/ (doesn't work without the www.) |
| 13:54:01 | → | CiaoSen joins (~Jura@p200300c9572d4e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 13:54:57 | <fendor[m]> | Not sure whether somebody already said it, but please, never use tutorialspoint, especially for haskell learning |
| 13:55:36 | <Axman6> | Homer_Simpson: well, the reason those don't work is because they're not valid Haskell |
| 13:55:51 | <Homer_Simpson> | i tired youtube too |
| 13:56:01 | <Homer_Simpson> | tried* |
| 13:56:10 | <Homer_Simpson> | they all go too fast for me |
| 13:56:26 | <Axman6> | main = print "hi"; 2+2; doesn't mean anything in Haskell. main = dp {print "hi"; 2+2; } _might_ mean something, it's syntactically ok, but it actually doesn't make any sense either |
| 13:56:31 | <Homer_Simpson> | they just throw examples examples examples |
| 13:56:40 | <Homer_Simpson> | and dont teach the grammar |
| 13:56:43 | <Axman6> | do, not dp* |
| 13:56:46 | × | gurkenglas quits (~gurkengla@dynamic-046-114-176-241.46.114.pool.telefonica.de) (Ping timeout: 265 seconds) |
| 13:57:25 | <Axman6> | A friend shared this with me the other day, it might be useful for deciding on a source to learn from: https://bitemyapp.com/blog/functional-education/ |
| 13:57:49 | <Axman6> | I might be a bit biased by the recommendations, I used to work at NICTA and teach the NICTA course in person |
| 13:58:11 | darkling | wonders if that's a shiny metal app. |
| 13:58:20 | <Homer_Simpson> | • No instance for (Num (IO t0)) arising from a use of ‘+’ • In a stmt of a 'do' block: 2 + 2 In the expression: do print "hi" 2 + 2 |
| 13:58:34 | <Axman6> | Homer_Simpson: yeah, that expression doesn't really make any sense |
| 13:59:28 | <Axman6> | you could try something like: main = do { putStrLn "Hello, what's your name?"; name <- getLine; putStrLn ("Nice to meet you, " ++ name) } |
| 13:59:30 | <Homer_Simpson> | well how do I simply print "hi\n" and then print the result of adding 2 numbers |
| 14:00:01 | <Axman6> | main = do {putStrLn "hi"; print (2+2) } |
| 14:00:15 | <Axman6> | % do {putStrLn "hi"; print (2+2) } |
| 14:00:16 | <yahb2> | hi ; 4 |
| 14:00:30 | → | elkcl_ joins (~elkcl@broadband-188-255-19-11.ip.moscow.rt.ru) |
| 14:00:31 | <Axman6> | (; means new line in yahb2's output) |
| 14:01:18 | <int-e> | looks like onlinegdb uses ghc 8.6.5... that's impressively old. |
| 14:01:23 | <Homer_Simpson> | ok thats what I was wondering, how to add a block of statement to main |
| 14:01:27 | <Homer_Simpson> | that worked |
| 14:02:34 | × | elkcl quits (~elkcl@broadband-188-255-19-11.ip.moscow.rt.ru) (Ping timeout: 260 seconds) |
| 14:02:34 | elkcl_ | is now known as elkcl |
| 14:02:34 | <Homer_Simpson> | I only use onlinegdb for running small bits of code cause it keeps losing internet connection and sometimes it fails to flush errors from stdout |
| 14:03:14 | <Axman6> | why not install ghci? |
| 14:03:24 | <Homer_Simpson> | I will |
| 14:03:36 | <Homer_Simpson> | can haskell parse strings |
| 14:03:42 | <Homer_Simpson> | from a file |
| 14:03:58 | <Axman6> | Homer_Simpson: https://www.haskell.org/ghcup/ is the place to start |
| 14:04:01 | <Homer_Simpson> | in C we use fscanf |
| 14:04:19 | <Axman6> | probably the domain Haskell is most well known for is in parsing |
| 14:04:37 | <Homer_Simpson> | cool. |
| 14:04:55 | <Axman6> | in Haskell, we use parser combinators, which are fastly more flexible than really anything C has to offer, but you're a long way from learning about that |
| 14:06:23 | × | Inst_ quits (~Inst@2601:6c4:4081:54f0:d621:5cdd:9051:c240) (Ping timeout: 255 seconds) |
| 14:09:19 | × | mizlan quits (~mizlan@169.150.203.45) (Ping timeout: 252 seconds) |
| 14:09:38 | <Axman6> | anyway, I would strongly recommend finding a different way to learn Haskell, tutorialspoint as fendor[m]points out is a horrible resource. https://www.seas.upenn.edu/~cis1940/spring13/ is generally a great introduction, and will start you out on things that are important to learn early. maing able to write a main isn't particularly important |
| 14:09:51 | <Homer_Simpson> | ok thx |
| 14:17:12 | <Axman6> | Good lord, that tutorial is almost criminally bad, it's just bizarrely about trivially simple things |
| 14:18:07 | <Axman6> | wrong* |
| 14:23:49 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 14:27:49 | → | acidjnk joins (~acidjnk@p200300d6e715c45184a61eb831583be7.dip0.t-ipconnect.de) |
| 14:28:01 | → | razetime joins (~Thunderbi@117.193.4.9) |
| 14:28:27 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 14:37:17 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 14:39:19 | <n0den1te> | speaking of tutorials, is there a rewrite of RWH coming any time? |
| 14:39:21 | <fendor[m]> | also, uses a compiler from 2012 or something like that |
| 14:39:54 | <n0den1te> | I vaguely recall seeing some community efforts around RWH, but can't find it anymore |
| 14:42:49 | <n0den1te> | hmm, found it here: https://github.com/tssm/up-to-date-real-world-haskell (dormant since 2020) |
| 14:42:51 | <geekosaur> | there's a wiki |
| 14:43:10 | × | razetime quits (~Thunderbi@117.193.4.9) (Quit: See You Space Cowboy) |
| 14:43:19 | <geekosaur> | no idea whether dons and company plan to update it at some point |
| 14:53:27 | → | Guest|15 joins (~Guest|15@46.97.170.59) |
| 14:53:32 | × | Guest|15 quits (~Guest|15@46.97.170.59) (Client Quit) |
| 14:54:09 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 15:00:07 | → | acidjnk_new joins (~acidjnk@p200300d6e715c4514d89378e6d7ee9ff.dip0.t-ipconnect.de) |
| 15:01:07 | × | acidjnk quits (~acidjnk@p200300d6e715c45184a61eb831583be7.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 15:05:09 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:5d38:2665:17cb:f4aa) |
| 15:06:51 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 248 seconds) |
| 15:07:05 | → | mizlan joins (~mizlan@169.150.203.45) |
| 15:09:49 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:5d38:2665:17cb:f4aa) (Ping timeout: 252 seconds) |
| 15:12:03 | → | cyphase joins (~cyphase@user/cyphase) |
| 15:12:09 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 15:13:09 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 15:13:52 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 15:15:43 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 15:24:17 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 15:25:37 | × | mizlan quits (~mizlan@169.150.203.45) (Ping timeout: 252 seconds) |
| 15:28:40 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 15:30:20 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:31:39 | ← | Homer_Simpson parts (uid550301@id-550301.uxbridge.irccloud.com) () |
| 15:33:36 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 15:41:48 | → | mizlan joins (~mizlan@89.46.114.156) |
| 15:43:08 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:46:24 | → | underlap joins (~underlap@229.171.115.87.dyn.plus.net) |
| 15:48:32 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 15:49:21 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Max SendQ exceeded) |
| 15:49:47 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 15:51:48 | × | pi1 quits (~pi@173.209.64.74) (Read error: No route to host) |
| 16:04:07 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:05:56 | × | underlap quits (~underlap@229.171.115.87.dyn.plus.net) (Quit: Client closed) |
| 16:07:40 | Momentum_ | is now known as Momentum |
| 16:09:09 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 16:09:47 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 16:09:49 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 16:13:16 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 16:17:39 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 16:18:51 | × | acidjnk_new quits (~acidjnk@p200300d6e715c4514d89378e6d7ee9ff.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 16:23:02 | × | enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
| 16:25:32 | → | shapr joins (~user@68.54.166.125) |
| 16:26:23 | × | kimiamania quits (~65804703@user/kimiamania) (Quit: PegeLinux) |
| 16:27:37 | → | kimiamania joins (~65804703@user/kimiamania) |
| 16:34:03 | × | gnalzo quits (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) (Quit: WeeChat 3.8) |
| 16:36:09 | × | mechap quits (~mechap@user/mechap) (Quit: WeeChat 3.8) |
| 16:37:57 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 16:40:16 | → | mechap joins (~mechap@user/mechap) |
| 16:44:04 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 16:44:11 | × | mizlan quits (~mizlan@89.46.114.156) (Ping timeout: 246 seconds) |
| 16:48:10 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 16:50:22 | → | use-value1 joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
| 16:51:24 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Ping timeout: 256 seconds) |
| 16:51:24 | use-value1 | is now known as use-value |
| 16:51:25 | → | econo joins (uid147250@user/econo) |
| 16:52:36 | × | emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir) |
| 16:58:56 | × | Alex_test_ quits (~al_test@178.34.160.228) (Quit: ;-) |
| 16:59:03 | → | mizlan joins (~mizlan@169.150.203.43) |
| 16:59:16 | × | AlexZenon quits (~alzenon@178.34.160.228) (Quit: ;-) |
| 16:59:46 | × | AlexNoo quits (~AlexNoo@178.34.160.228) (Quit: Leaving) |
| 17:01:19 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 17:03:34 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:5d38:2665:17cb:f4aa) |
| 17:08:38 | → | jwiegley joins (~jwiegley@76-234-69-149.lightspeed.frokca.sbcglobal.net) |
| 17:08:38 | → | AlexNoo joins (~AlexNoo@178.34.160.228) |
| 17:09:33 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 17:09:44 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 17:09:55 | hololeap_ | is now known as hololeap |
| 17:10:35 | → | AlexZenon joins (~alzenon@178.34.160.228) |
| 17:13:33 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:16:55 | → | Alex_test joins (~al_test@178.34.160.228) |
| 17:18:13 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 17:20:08 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 17:21:17 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 17:22:25 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 17:25:58 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 17:29:11 | × | perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.8) |
| 17:33:53 | → | perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) |
| 17:42:26 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 17:48:13 | → | wombat8756 joins (~wombat875@2600:4041:5bea:f800:83f2:bf42:de49:b596) |
| 17:48:42 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Quit: beteigeuze) |
| 17:50:34 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
| 17:52:23 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 17:54:56 | → | ddellacosta joins (~ddellacos@89.45.224.130) |
| 18:05:58 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 18:06:22 | × | thongpv quits (~thongpv87@2001:ee0:5577:f0d0:b436:353d:3a0c:35f3) (Ping timeout: 252 seconds) |
| 18:07:49 | danso_o | is now known as danso |
| 18:10:25 | → | thongpv joins (~thongpv87@2001:ee0:5577:f0d0:da9e:3b7a:e545:4b37) |
| 18:12:05 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 18:13:49 | → | emmanuelux joins (~emmanuelu@user/emmanuelux) |
| 18:14:42 | × | thongpv quits (~thongpv87@2001:ee0:5577:f0d0:da9e:3b7a:e545:4b37) (Ping timeout: 256 seconds) |
| 18:22:07 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 18:24:17 | × | oats quits (~thomas@user/oats) (Quit: until later, my friends) |
| 18:25:01 | → | oats joins (~thomas@user/oats) |
| 18:30:47 | × | remexre quits (~remexre@mail.sift.net) (Remote host closed the connection) |
| 18:30:54 | → | remexre joins (~remexre@user/remexre) |
| 18:44:08 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 18:46:37 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 18:47:34 | × | trev_ quits (~trev@109-252-35-99.nat.spd-mgts.ru) (Remote host closed the connection) |
| 18:48:01 | <hololeap> | > Any list like [1,2,3,4,5,a,b,c,d,e,f] will produce an error. |
| 18:48:04 | <lambdabot> | <hint>:1:61: error: |
| 18:48:04 | <lambdabot> | parse error (possibly incorrect indentation or mismatched brackets) |
| 18:48:07 | <hololeap> | yeah, that's pretty bad |
| 18:48:34 | <hololeap> | they're trying to show not to put Chars in a list of Ints, but fail to do even that |
| 18:49:07 | <hololeap> | and then say the "not in scope" errors are because lists need to be homogonous |
| 18:49:45 | <c_wraith> | > [1,2,3,a,b,c] :: [Expr] |
| 18:49:47 | <lambdabot> | [1,2,3,a,b,c] |
| 18:50:07 | <c_wraith> | It even works if you have the right libraries in scope! |
| 18:50:29 | × | mizlan quits (~mizlan@169.150.203.43) (Ping timeout: 246 seconds) |
| 18:51:34 | <hololeap> | A Tuple is an immutable data type, as we cannot modify the number of elements at runtime, whereas a List is a mutable data type. |
| 18:51:36 | <hololeap> | >_> |
| 18:52:03 | <c_wraith> | someone mistook Haskell for python? |
| 18:52:45 | <hololeap> | those poor people trying to learn the basics from that... |
| 18:54:49 | → | briandaed joins (~briandaed@185.234.210.211.r.toneticgroup.pl) |
| 19:07:19 | → | mizlan joins (~mizlan@169.150.203.53) |
| 19:15:39 | → | gnalzo joins (~gnalzo@2a01:e0a:498:fd50:fcc6:bb5d:489a:ce8c) |
| 19:19:02 | <hololeap> | speaking of tutorials, is there anything that attempts to teach the ... thing between Applicative and Monad? |
| 19:19:25 | <hololeap> | Selective? |
| 19:19:41 | <hololeap> | I never used it because I didn't understand it |
| 19:21:01 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 19:22:10 | <c_wraith> | I'm not sure it's actually useful |
| 19:22:30 | <glguy> | the only reason to really learn about it would be if you were using a library that happened to use it. in that case you'd just learn about the library |
| 19:23:26 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 19:23:34 | <hololeap> | is there a big example of something that happens to be a Selective but not a Monad? |
| 19:24:08 | × | CiaoSen quits (~Jura@p200300c9572d4e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 19:24:10 | opqdonut_ | is now known as opqdonut |
| 19:25:45 | <c_wraith> | You can use Selective to construct something that looks a whole lot like (>>=) but only if you can enumerate the values of `a' in `(a -> m b) -> m a -> m b' |
| 19:26:16 | <glguy> | I have my config-schema package that has specs that are applicative but not monad, so you can inspect them and produce documentation. Currently the way I handle inspecting schemas with alternatives is just a list of alternatives, but with selective I could expose a selection operation that could have documentation generated about it |
| 19:26:28 | <c_wraith> | This means you can introspect the data |
| 19:27:19 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:5d38:2665:17cb:f4aa) (Remote host closed the connection) |
| 19:27:20 | <glguy> | (I don't need to use a typeclass to do that, but in that case I'd be able to instantiate the typeclass were I don't want to rely on monad |
| 19:28:01 | <glguy> | the benefit of using Applicative for me is I get to use ApplicativeDo . I don't know what hte benefit of making the Selective instance would be, though |
| 19:29:35 | <xerox> | what is Selective? |
| 19:29:48 | <monochrom> | I have only read the original Selective paper. And only the introductory parts of it. |
| 19:29:55 | <c_wraith> | xerox: https://hackage.haskell.org/package/selective-0.5/docs/Control-Selective.html#t:Selective |
| 19:30:07 | <monochrom> | I understand it because I was asking myself the same question already. :) |
| 19:30:40 | <c_wraith> | It's a way to preserve Applicative introspection while allowing something resembling monadic effect selection |
| 19:33:17 | <c_wraith> | I'm not sure if there's any type that can be a Selective that *can't* be a Monad. But as in glguy's case, sometimes you don't want to make it a Monad because the whole purpose of the type is introspection |
| 19:33:21 | <monochrom> | I was looking at eg "satisfy p = do { c <- anyChar; if p c then pure c else empty }" and wondering: It shouldn't need the full power of Monad, but Alternative falls short by just a little bit. Is there something that gives "foo >>= \c -> if then else" but no more than that? |
| 19:34:02 | <hololeap> | c_wraith: it looks like this might be an example of one: https://github.com/kowainik/validation-selective |
| 19:34:38 | <hololeap> | also, what is "introspection" in the context of Applicative? |
| 19:35:06 | <c_wraith> | hololeap: no, that's exactly what I was talking about. That can be made a Monad trivially, like Either. But doing so prevents introspection. |
| 19:35:55 | aweinsto1k | is now known as aweinstock |
| 19:36:00 | <c_wraith> | hololeap: introspection in this context is examining the effect structure without actually performing the "result" computations |
| 19:37:28 | → | seriously_guest joins (~seriously@2001:1c06:2715:c200:8531:d289:8f72:ead3) |
| 19:39:17 | <hololeap> | The Validation data type is isomorphic to Either, but has an instance of Applicative that accumulates on the error side. That is to say, if two (or more) errors are encountered, they are appended using a Semigroup operation. |
| 19:39:18 | <c_wraith> | hololeap: it's not a property every instance supports. For instance, the [] instance for Applicative doesn't let you do any introspection. The important part is that Applicative doesn't prevent it. |
| 19:39:23 | <hololeap> | As a consequence of this Applicative instance, there is no corresponding Bind or Monad instance. Validation is an example of, "An applicative functor that is not a monad." |
| 19:40:13 | <hololeap> | ok, so Validation doesn't have a valid Monad instance, sort of like ZipList doesn't, because of the way their Applicative is set up |
| 19:40:13 | × | iteratee quits (~kyle@162.218.222.107) (Read error: Connection reset by peer) |
| 19:40:14 | <glguy> | hololeap: this is my example of using an Applicative interface to making schemas https://glguy.net/config-demo/ |
| 19:40:31 | → | iteratee joins (~kyle@162.218.222.107) |
| 19:40:36 | <glguy> | then from the same code you can generate documentation and schema checkers, but still get the restricted applicative-do notation when defining things |
| 19:40:54 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 19:41:05 | <hololeap> | yeah, glguy, I've had my eye on your config-schemas lib for a while, but I still haven't used it yet |
| 19:41:17 | <hololeap> | I assumed it was similar to optparse-applicative in the way it functions |
| 19:41:31 | <hololeap> | although I don't know how the internals of optparse-applicative works |
| 19:42:04 | → | barzo joins (~hd@31.223.41.44) |
| 19:42:24 | <c_wraith> | side question: how well does ApplicativeDo work these days? I seem to recall it was documented as a best effort sort of thing, instead of actually having guarantees |
| 19:42:58 | <c_wraith> | But that was the very first version, and I know it's been improved. |
| 19:43:07 | <glguy> | it works fine, you just have to avoid the things that make something use Monad |
| 19:43:45 | <hololeap> | I use it all the time for parser libraries, I also turn on -foptimal-applicative-do and never noticed any problems |
| 19:44:23 | <hololeap> | but, yeah it's sometimes a mystery if it's using the Monadic do instead. there should be a way to force Applicative other than trying to make a non-monadic version of whatever it is |
| 19:45:07 | <glguy> | You get a type error if you used monadic do and your type didnt' support it, so it's not a complete mystery |
| 19:45:13 | <glguy> | and if your type does support Monad it doesn't matter |
| 19:45:36 | <hololeap> | true, so it's not a mystery for optparse-applicative, but for instance attoparsec has a Monad instance for its parser, so it's harder to tell for that one |
| 19:45:47 | <hololeap> | I guess it might not matter in the latter case |
| 19:46:03 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:5d38:2665:17cb:f4aa) |
| 19:46:27 | × | seriously_guest quits (~seriously@2001:1c06:2715:c200:8531:d289:8f72:ead3) (Quit: Client closed) |
| 19:47:43 | <hololeap> | I remember hearing something about parsers being faster if you can stick to their Applicative instance, but that might have been complete nonsense |
| 19:48:17 | <c_wraith> | It... depends. |
| 19:48:39 | <hololeap> | I noticed that the parser-combinators library says to use the Monad versions because they are faster |
| 19:48:51 | <hololeap> | it's all pretty mysterious to me... |
| 19:49:05 | <glguy> | If performance matters at that level of detail you're probably not using parser combinators |
| 19:52:06 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
| 19:52:25 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
| 19:52:56 | <hololeap> | Due to the nature of the Applicative and Alternative abstractions, they are prone to memory leaks and not as efficient as their monadic counterparts. Although all the combinators we provide in this module are perfectly expressible in terms of Applicative and Alternative, please prefer Control.Monad.Combinators instead when possible. |
| 19:54:27 | <hololeap> | so, some like me is like "I don't memory leaks! I want efficiency!" and I do what it says without really understanding why |
| 19:55:59 | → | shriekingnoise joins (~shrieking@186.137.175.87) |
| 19:56:23 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 19:57:03 | <c_wraith> | There are some cases where it really does matter |
| 19:57:12 | → | jero98772 joins (~jero98772@2800:484:1d80:d8ce:3490:26c5:1782:da8c) |
| 19:57:24 | <EvanR> | I thought due to the nature of the Applicative you can form a compiler to an arbitrary better form |
| 19:58:04 | <c_wraith> | Like with permutation parsing. Doing it efficiently with only Applicative requires a certain amount of laziness in the parser that not all will have - and that laziness isn't compatible with introspection, for instance. |
| 19:58:28 | <c_wraith> | The monadic interface for permutation parsing has much better memory use guarantees |
| 19:59:15 | × | briandaed quits (~briandaed@185.234.210.211.r.toneticgroup.pl) (Remote host closed the connection) |
| 20:00:19 | <c_wraith> | I like the Earley parser library, but permutation parsing is awkward for it. It works by introspecting parsers to build its transition tables. |
| 20:00:47 | <hololeap> | I was hoping for more discussion here: https://github.com/mrkkrp/parser-combinators/pull/8 |
| 20:00:47 | <c_wraith> | permutation parsers will always be large in that representation |
| 20:04:27 | <hololeap> | c_wraith: it's interesting you say that, because Control.Monad.Permutations wasn't added until later |
| 20:04:40 | <hololeap> | so I wonder what the initial motivation was |
| 20:11:22 | <hololeap> | does anyone know of something that could generate a man page from an optparse-applicative ParserInfo? |
| 20:12:33 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 20:13:12 | hololeap | found this: https://github.com/pcapriotti/optparse-applicative/issues/176 |
| 20:13:24 | <hololeap> | but nothing linking to existing solutions at this point |
| 20:15:01 | <Clint> | i believe the existing solution is to pipe --help output to help2man |
| 20:15:23 | <hololeap> | would that work with subcommands? |
| 20:15:50 | → | pavonia joins (~user@user/siracusa) |
| 20:16:37 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 20:16:41 | __xor | is now known as _xor |
| 20:23:27 | → | oldfashionedcow joins (~Rahul_San@user/oldfashionedcow) |
| 20:24:38 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 20:26:36 | <Clint> | well, you could run help2man for each subcommand |
| 20:31:15 | → | Guest|20 joins (~Guest|20@c-73-176-81-178.hsd1.il.comcast.net) |
| 20:32:20 | <Guest|20> | I get this error when trying to install on macos. curl: (60) SSL certificate problem: certificate has expired |
| 20:33:07 | <glguy> | What day does the date commands say it is? |
| 20:33:29 | <Guest|20> | Sun Jan 22 14:33:16 CST 2023 |
| 20:33:36 | <glguy> | And what command are you running to install something? |
| 20:33:55 | <Guest|20> | curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh |
| 20:34:53 | <Guest|20> | from https://www.haskell.org/ghcup/ |
| 20:36:31 | <glguy> | Are you on a network that replaces TLS certificates perhaps requiring you to install their own local CA? Like school, work? |
| 20:36:38 | <Guest|20> | no |
| 20:37:11 | <Guest|20> | unless comcast does that |
| 20:38:11 | <Guest|20> | older os, macos 10.14 |
| 20:38:53 | <geekosaur> | https://stackoverflow.com/questions/69521959/ssl-certificate-problem-certificate-has-expire-in-macos |
| 20:39:11 | × | mizlan quits (~mizlan@169.150.203.53) (Ping timeout: 264 seconds) |
| 20:39:35 | <geekosaur> | especially with an older macos which would mean apple's not updating certs any more and probably has expired ISRG /; Let's Encrypt certs |
| 20:42:45 | <Guest|20> | seems reasonable, "Another possible solution is to use curl's -k/--insecure flag" this seems like the easiest solution. |
| 20:43:06 | <geekosaur> | easy but not one I'd suggest getting used to; security is for a reason |
| 20:44:35 | <Guest|20> | understood, thanks for the help! |
| 20:45:56 | × | remedan quits (~remedan@ip-89-177-74-251.bb.vodafone.cz) (Quit: Bye!) |
| 20:46:30 | <Guest|20> | perhaps brew install ghcup is a more secure option, I think I'll try that first |
| 20:46:46 | → | remedan joins (~remedan@ip-89-177-74-251.bb.vodafone.cz) |
| 20:47:29 | → | jumper149 joins (~jumper149@base.felixspringer.xyz) |
| 20:48:34 | <Guest|20> | damn brew's ghcup requires higher than 10.14 |
| 20:50:46 | → | abhixec joins (~abhinav@c-67-169-139-16.hsd1.ca.comcast.net) |
| 20:51:48 | <Guest|20> | looks like i've got to update the certificates on this machine, thanks again |
| 20:52:38 | <geekosaur> | hm, I wonder if it'll work though. brew may be telling you indirectly that there's no working ghc binaries for 10.14 |
| 20:54:24 | <geekosaur> | I know the minimum OS X version has been bumped a few times due to missing OS features needed by ghc's runtime |
| 20:56:29 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 20:59:02 | → | acidjnk_new joins (~acidjnk@p200300d6e715c429699c669626622ebf.dip0.t-ipconnect.de) |
| 20:59:02 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 255 seconds) |
| 21:01:54 | → | gurkenglas joins (~gurkengla@dynamic-046-114-183-023.46.114.pool.telefonica.de) |
| 21:03:05 | <Guest|20> | I updated the cert and it is installing using curl |
| 21:03:22 | <Guest|20> | the macos minimum right now is 10.13 |
| 21:04:19 | <Guest|20> | thanks again! |
| 21:12:27 | <jumper149> | geekosaur: Yeah, I guess you're right. Should've probably posted here, sorry. But no I don't want to support old library versions. |
| 21:15:04 | <geekosaur> | `#if !MIN_VERSION_FOO(...)\n# error "foo package too old"\n#endif`… although that's probably best done with a cabal dependency. I'm not sure what you get with a flag unless the dependency is part of the flag |
| 21:17:15 | <jumper149> | Yeah, I just use regular cabal version boundaries. I think that suffices. |
| 21:17:43 | <jumper149> | I do have another question though: Is there a way for cabal flags to imply other cabal flags? |
| 21:23:20 | <geekosaur> | that might be a #hackage question |
| 21:23:48 | <geekosaur> | doesn't look like it to me, though; you can't set (or clear) a flag in a cabal file |
| 21:24:21 | <geekosaur> | might be possible to put a `default:` for a flag definition in a conditional involving another flag, though |
| 21:25:36 | <c_wraith> | the main reason I use MIN_VERSION CPP is when I'm creating instances when the type or class is owned by another library, and they tend to change. |
| 21:26:39 | <c_wraith> | Like, I've added some instances to lens that work differently with different versions of base, because base only added a type recently, or Foldable used to not have that function, or whatever |
| 21:27:07 | <sclv> | by design flags don’t imply other flags |
| 21:27:24 | <sclv> | flags are not supposed to change the surface api of a package |
| 21:27:34 | <c_wraith> | And as much visual noise as it is, it's easier to use those CPP macros than to conditionally include extra files that define those instances. |
| 21:28:05 | <jumper149> | sclv: I think it's fine for optional orphan instances. |
| 21:28:29 | <sclv> | i’m not saying an opinion. i’m saying the design and the reason |
| 21:28:49 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 21:29:25 | <jumper149> | sclv: Ok, let me rephrase. Are optional orphan instances part of the surface API? |
| 21:29:42 | <sclv> | yes |
| 21:29:48 | <c_wraith> | haddock documents them! |
| 21:30:25 | <c_wraith> | (that's a relatively new feature of haddock. It's only been around for a few years. But it's very nice to actually have now.) |
| 21:30:38 | <geekosaur> | jumper149, consider that Hackage would be unmanageable and unreliable if packages' APIs changed depending on flags |
| 21:31:39 | <jumper149> | geekosaur: I see. You would have to build the docs for every combination of flags. |
| 21:32:16 | <geekosaur> | you might have to build dependent packages for every combination of flags as well |
| 21:32:19 | <c_wraith> | jumper149: and every combination of flags for all dependnecies |
| 21:32:56 | <jumper149> | Yeah that doesn't sound good. |
| 21:35:19 | → | theproffesor joins (~theproffe@2601:282:8800:3f30::b942) |
| 21:35:19 | × | theproffesor quits (~theproffe@2601:282:8800:3f30::b942) (Changing host) |
| 21:35:19 | → | theproffesor joins (~theproffe@user/theproffesor) |
| 21:41:31 | × | ddellacosta quits (~ddellacos@89.45.224.130) (Ping timeout: 260 seconds) |
| 21:41:58 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds) |
| 21:42:59 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 21:44:20 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 21:45:40 | × | remedan quits (~remedan@ip-89-177-74-251.bb.vodafone.cz) (Quit: Bye!) |
| 21:47:02 | × | theproffesor quits (~theproffe@user/theproffesor) (Remote host closed the connection) |
| 21:47:02 | → | remedan joins (~remedan@ip-89-177-74-251.bb.vodafone.cz) |
| 21:49:28 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 21:50:34 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt: personae.ai-integration.biz) |
| 21:51:13 | → | theproffesor joins (~theproffe@2601:282:8800:3f30::b942) |
| 21:51:13 | × | theproffesor quits (~theproffe@2601:282:8800:3f30::b942) (Changing host) |
| 21:51:13 | → | theproffesor joins (~theproffe@user/theproffesor) |
| 21:54:27 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
| 21:54:47 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
| 21:55:30 | → | ddellacosta joins (~ddellacos@86.106.143.117) |
| 22:02:36 | → | mizlan joins (~mizlan@169.150.203.43) |
| 22:03:10 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:10:46 | × | enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
| 22:23:44 | × | n0den1te quits (~n0den1te@223.178.85.186) (Quit: leaving) |
| 22:25:22 | × | biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer) |
| 22:29:59 | → | biberu joins (~biberu@user/biberu) |
| 22:37:02 | × | mizlan quits (~mizlan@169.150.203.43) (Ping timeout: 268 seconds) |
| 22:44:04 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 22:48:03 | → | merijn joins (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) |
| 22:49:20 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 22:49:59 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection) |
| 23:03:02 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 23:06:43 | → | mizlan joins (~mizlan@169.150.203.56) |
| 23:11:08 | × | mizlan quits (~mizlan@169.150.203.56) (Ping timeout: 260 seconds) |
| 23:12:25 | × | urdh quits (~urdh@user/urdh) (Ping timeout: 260 seconds) |
| 23:20:04 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 23:22:13 | × | merijn quits (~merijn@c-001-001-014.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 23:31:59 | × | Alex_test quits (~al_test@178.34.160.228) (Ping timeout: 264 seconds) |
| 23:34:44 | → | mizlan joins (~mizlan@169.150.203.43) |
| 23:34:49 | × | kimjetwav quits (~user@2607:fea8:235e:b600:2d68:2d7e:6ecb:730c) (Remote host closed the connection) |
| 23:35:47 | → | Alex_test joins (~al_test@178.34.160.228) |
| 23:43:46 | → | jinsun__ joins (~jinsun@user/jinsun) |
| 23:43:46 | × | jinsun quits (~jinsun@user/jinsun) (Killed (molybdenum.libera.chat (Nickname regained by services))) |
| 23:43:46 | jinsun__ | is now known as jinsun |
| 23:44:46 | × | Katarushisu quits (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (Quit: The Lounge - https://thelounge.chat) |
| 23:45:30 | → | Katarushisu joins (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) |
| 23:51:22 | × | tremon quits (~tremon@83-85-213-108.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in) |
All times are in UTC on 2023-01-22.