Logs on 2021-01-02 (freenode/#haskell)
| 00:00:01 | <halbGefressen> | and I look for a function that returns every possibility to partition a list into two lists |
| 00:01:35 | <dsal> | You want to know every possible way to partition numbers? That sounds a little XY -- what are you trying to accomplish? |
| 00:03:26 | <halbGefressen> | Let's say I have an instance Finite which defines a function that enumerates all options of a type, e.g. enumerated :: bool = [True, False]. |
| 00:03:42 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@static-198-54-134-148.cust.tzulo.com) (Quit: Leaving) |
| 00:04:05 | <halbGefressen> | By assuming that a is instance of Finite, I want to implement Finite for Trees of a. |
| 00:04:47 | <halbGefressen> | This means listing every possible tree that contains every element of the original enumeration of a exactly once. |
| 00:05:40 | <dsal> | :t enumFrom minBound |
| 00:05:41 | <lambdabot> | (Enum a, Bounded a) => [a] |
| 00:06:14 | × | knupfer quits (~Thunderbi@200116b82c90ff009d83bf767b64260e.dip.versatel-1u1.de) (Ping timeout: 268 seconds) |
| 00:06:55 | <dsal> | If it's an Enum and Bounded, it's just that. That sounds a lot like what you're asking, but I'm sure I'm missing something. It'd be easier to see your type and what you are hoping to get from it. |
| 00:07:41 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
| 00:08:20 | <dmwit> | Trees are almost certainly not Enum and Bounded. |
| 00:08:42 | <dmwit> | (They're almost certainly neither.) |
| 00:09:14 | <dsal> | Sure, similar to lists. I just don't quite understand what it means to produce a list of all possible lists any more than I would for trees. |
| 00:09:19 | <dmwit> | That said, I don't understand how partitioning is related to enumerating trees. Doesn't sound right to me. |
| 00:09:55 | <dmwit> | dsal: You can produce the list of all finite lists fairly easily. |
| 00:10:08 | <dmwit> | The list of all finite trees seems pretty plausible, too. |
| 00:10:47 | <halbGefressen> | The intuition I had is to first pick an element from the enumeration. Then partition the rest of numbers into two partitions and for each subtree, those are the possible values that can be in a subtree. |
| 00:11:06 | <dmwit> | halbGefressen: You might like the functions in http://hackage.haskell.org/package/universe-base-1.1.1/docs/Data-Universe-Helpers.html |
| 00:11:30 | <dmwit> | halbGefressen: But an element from the enumeration is a Bool. |
| 00:12:05 | <dmwit> | I'll be honest, I'm a bit surprised we don't have a Universe instance for Tree lying around. |
| 00:12:08 | <dmwit> | Seems super doable. |
| 00:12:53 | <dmwit> | instance Finite a => Universe (Tree a) where universe = cartesianProduct Node universe universe -- seems like it should be enough? |
| 00:13:18 | <dmwit> | Might... might even work for `Universe a => Universe (Tree a)`. I'd have to ponder more than 0 seconds to be sure. |
| 00:13:31 | <halbGefressen> | For bool, it is pretty trivial as there are only 4 possible combinations: Node Leaf True (Node Leaf False Leaf), Node (Leaf False Leaf) True Leaf and the same with True and False exchanged |
| 00:13:51 | → | ahhhhhhhhhhh joins (6c3548b1@pool-108-53-72-177.nwrknj.fios.verizon.net) |
| 00:13:55 | <dmwit> | What about Node True Leaf Leaf? |
| 00:14:10 | <dmwit> | That's a perfectly cromulent Tree Bool, isn't it? |
| 00:14:33 | <halbGefressen> | This is a valid tree, but it does not contain every possible value of Bool |
| 00:14:40 | <dmwit> | Sure. |
| 00:14:46 | <dmwit> | Anyway, the answer to the question as asked looks like this: |
| 00:16:00 | <dmwit> | :t map (partition snd) . mapM (\x -> [(x, False), (x, True)]) |
| 00:16:02 | <lambdabot> | [a] -> [([(a, Bool)], [(a, Bool)])] |
| 00:16:11 | <dmwit> | Oh, strip out the Bools, too, I guess. |
| 00:16:32 | × | ahhhhhhhhhhh quits (6c3548b1@pool-108-53-72-177.nwrknj.fios.verizon.net) (Remote host closed the connection) |
| 00:16:55 | <halbGefressen> | https://www21.in.tum.de/teaching/fpv/WS20/assets/ex07.pdf |
| 00:16:56 | <dmwit> | :t map ((\(ls, rs) -> (map fst ls, map fst rs)) . partition snd) . mapM (\x -> [(x, False), (x, True)]) |
| 00:16:58 | <lambdabot> | [b] -> [([b], [b])] |
| 00:17:12 | <dmwit> | > map ((\(ls, rs) -> (map fst ls, map fst rs)) . partition snd) . mapM (\x -> [(x, False), (x, True)]) $ "abcd" |
| 00:17:15 | <lambdabot> | [("","abcd"),("d","abc"),("c","abd"),("cd","ab"),("b","acd"),("bd","ac"),("b... |
| 00:17:31 | <dmwit> | There are probably more efficient (read: lazy) ways. |
| 00:17:54 | <halbGefressen> | H7.2e) is my problem. Maybe I am too stupid to formulate it correctly. |
| 00:18:24 | <dmwit> | https://hackage.haskell.org/package/combinatorial-0.1.0.1/docs/Combinatorics.html#v:partitions has it |
| 00:19:07 | <halbGefressen> | Looks interesting. I'll read through that |
| 00:19:27 | <dmwit> | Oh, you're solving a homework. Then the task isn't obligated to make sense, and I am at peace again. |
| 00:20:50 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 00:22:17 | <halbGefressen> | Yes, it probably does not have a real-world use. I already have acquired enough points to get the check mark for this sheet. But I still want to solve this challenge because I really think it is an interesting problem. |
| 00:22:33 | <dmwit> | Great attitude. ^_^ |
| 00:22:43 | × | teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds) |
| 00:22:46 | <dmwit> | That is a good way to grow quickly. |
| 00:23:10 | <halbGefressen> | well, why study computer science if you don't care about it? if you're in for the money you aint gonna last long |
| 00:23:37 | × | madjestic quits (~Android@86-88-72-244.fixed.kpn.net) (Ping timeout: 260 seconds) |
| 00:23:43 | → | DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) |
| 00:24:13 | <halbGefressen> | also I kinda prefer haskell over almost everything I used before and want to learn stuff about it haha |
| 00:24:37 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 246 seconds) |
| 00:24:41 | <dmwit> | There's a lot to like about it. ^_^ |
| 00:24:48 | → | teardown joins (~user@gateway/tor-sasl/mrush) |
| 00:25:57 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Ping timeout: 260 seconds) |
| 00:27:03 | → | frankdmartinez joins (~frankdmar@5.181.234.188) |
| 00:27:59 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds) |
| 00:28:56 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 240 seconds) |
| 00:29:04 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 00:29:06 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:29:56 | → | teardown_ joins (~user@gateway/tor-sasl/mrush) |
| 00:30:46 | <dmwit> | :t foldM |
| 00:30:47 | <lambdabot> | (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b |
| 00:30:53 | × | teardown quits (~user@gateway/tor-sasl/mrush) (Remote host closed the connection) |
| 00:31:27 | <dmwit> | > foldM (\(ts, fs) a -> [(a:ts, fs), (ts, a:fs)]) ([],[]) "abcd" |
| 00:31:30 | <lambdabot> | [("dcba",""),("cba","d"),("dba","c"),("ba","dc"),("dca","b"),("ca","db"),("d... |
| 00:31:35 | <dmwit> | Oh that is much comfier to read. |
| 00:31:54 | <dmwit> | And doesn't require you to install any libraries! |
| 00:34:57 | <halbGefressen> | ohh, this looks promising! |
| 00:35:40 | <Squarism> | in a pattern match of a constructor. If you capture the "identifier@Constructor", I assume the capture gets the type of the constructors type and no nice direct access to the constructor? |
| 00:35:58 | → | justsomeguy joins (~justsomeg@216.186.218.241) |
| 00:35:58 | × | justsomeguy quits (~justsomeg@216.186.218.241) (Changing host) |
| 00:35:58 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 00:36:30 | <Squarism> | I'd need that language extension thingy for that ? CAnt recall its name |
| 00:36:49 | <glguy> | What is "direct access to the constructor"? |
| 00:37:05 | <Squarism> | wishful thinking? |
| 00:37:29 | <dmwit> | But like, if your wishes came true, what would the world look like? |
| 00:37:33 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 00:38:31 | <Squarism> | I mean if constructor Boo has field "baz" I cannot do : case someVal of ; capt @ Boo {} -> baz capt |
| 00:38:49 | <dmwit> | Sure, you can do that. |
| 00:39:33 | <dmwit> | It will probably even get optimized into a single pattern match instead of the two that the naive compilation would do. |
| 00:40:00 | <monochrom> | Yes. |
| 00:40:03 | × | t3xp4t quits (~texinwien@213162073014.public.t-mobile.at) (Remote host closed the connection) |
| 00:40:31 | → | t3xp4t joins (~texinwien@213162073014.public.t-mobile.at) |
| 00:40:41 | <dmwit> | If someVal is just a variable you don't even need the @ pattern. `case someVal of Boo{} -> baz someVal`. |
| 00:41:07 | × | alx741 quits (~alx741@186.178.110.198) (Ping timeout: 260 seconds) |
| 00:41:15 | <monochrom> | https://mail.haskell.org/pipermail/haskell-cafe/2013-April/107775.html |
| 00:41:17 | <Squarism> | hmm, need to look at my code again |
| 00:41:17 | → | kam1 joins (~kam1@24.231.108.143) |
| 00:41:38 | <monochrom> | It is the easier half of stream fusion in text and vector. |
| 00:42:25 | <dmwit> | lmao ghc 2gud |
| 00:44:25 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 00:44:47 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 00:45:34 | × | t3xp4t quits (~texinwien@213162073014.public.t-mobile.at) (Ping timeout: 272 seconds) |
| 00:45:54 | → | zaquest joins (~notzaques@5.128.210.178) |
| 00:48:41 | × | jacks2 quits (~bc815220@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout)) |
| 00:49:21 | → | t3xp4t joins (~texinwien@213162073014.public.t-mobile.at) |
| 00:50:56 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
| 00:53:25 | × | dfeuer quits (~dfeuer@pool-108-18-223-60.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 00:54:51 | → | alx741 joins (~alx741@181.196.69.173) |
| 00:58:50 | → | knupfer joins (~Thunderbi@200116b82c90ff001c8dbffffefdf880.dip.versatel-1u1.de) |
| 00:59:32 | × | knupfer quits (~Thunderbi@200116b82c90ff001c8dbffffefdf880.dip.versatel-1u1.de) (Remote host closed the connection) |
| 00:59:45 | → | knupfer joins (~Thunderbi@200116b82c90ff008ddd7d0fb380906e.dip.versatel-1u1.de) |
| 01:01:32 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
| 01:01:55 | → | matryoshka joins (~matryoshk@184.75.223.227) |
| 01:03:24 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 01:03:31 | → | matryoshka` joins (~matryoshk@184.75.223.227) |
| 01:03:42 | × | matryoshka quits (~matryoshk@184.75.223.227) (Remote host closed the connection) |
| 01:03:53 | × | Feuermagier quits (~Feuermagi@213.178.26.41) (Remote host closed the connection) |
| 01:04:32 | → | spopejoy joins (~stuart@ool-44c5f8c9.dyn.optonline.net) |
| 01:05:11 | × | cantstanya quits (~chatting@gateway/tor-sasl/cantstanya) (Remote host closed the connection) |
| 01:07:17 | × | knupfer quits (~Thunderbi@200116b82c90ff008ddd7d0fb380906e.dip.versatel-1u1.de) (Quit: knupfer) |
| 01:07:29 | → | knupfer joins (~Thunderbi@200116b82c90ff008ddd7d0fb380906e.dip.versatel-1u1.de) |
| 01:07:59 | → | cantstanya joins (~chatting@gateway/tor-sasl/cantstanya) |
| 01:08:25 | → | chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
| 01:09:38 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit) |
| 01:09:53 | × | matryoshka` quits (~matryoshk@184.75.223.227) (Quit: ZNC 1.8.2 - https://znc.in) |
| 01:10:13 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 01:10:36 | → | dfeuer joins (~dfeuer@pool-108-18-223-60.washdc.fios.verizon.net) |
| 01:11:02 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 01:13:25 | × | Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 264 seconds) |
| 01:14:27 | → | Ishutin joins (~Ishutin@80-95-69-205.pool.digikabel.hu) |
| 01:14:37 | × | kam1 quits (~kam1@24.231.108.143) (Ping timeout: 264 seconds) |
| 01:14:52 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Client Quit) |
| 01:15:01 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) () |
| 01:15:12 | → | matryoshka joins (~matryoshk@184.75.223.227) |
| 01:17:17 | × | matryoshka quits (~matryoshk@184.75.223.227) (Client Quit) |
| 01:17:35 | → | matryoshka joins (~matryoshk@184.75.223.227) |
| 01:19:05 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:19:11 | × | usr25 quits (~usr25@unaffiliated/usr25) (Read error: Connection reset by peer) |
| 01:19:12 | × | matryoshka quits (~matryoshk@184.75.223.227) (Client Quit) |
| 01:19:35 | → | matryoshka joins (~matryoshk@184.75.223.227) |
| 01:20:50 | × | matryoshka quits (~matryoshk@184.75.223.227) (Read error: Connection reset by peer) |
| 01:21:00 | → | b5er joins (~b5er_@91.193.4.138) |
| 01:21:04 | → | matryoshka joins (~matryoshk@184.75.223.227) |
| 01:21:53 | × | b4er quits (~b5er_@91.193.4.138) (Read error: Connection reset by peer) |
| 01:22:27 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) |
| 01:22:40 | × | b5er quits (~b5er_@91.193.4.138) (Client Quit) |
| 01:22:45 | → | matryoshka` joins (~matryoshk@184.75.223.227) |
| 01:22:49 | × | matryoshka quits (~matryoshk@184.75.223.227) (Client Quit) |
| 01:23:18 | → | b4er joins (~b4er@91.193.4.138) |
| 01:23:42 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 01:23:54 | <phaazon> | anyone used to pandoc? |
| 01:24:01 | <phaazon> | https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Readers/Org/Inlines.hs#L25 |
| 01:24:15 | × | matryoshka` quits (~matryoshk@184.75.223.227) (Read error: Connection reset by peer) |
| 01:24:16 | <phaazon> | I can’t find the module imported from here (Text.Pandoc.Builder) |
| 01:24:19 | <phaazon> | what kind of magic is this again :D |
| 01:24:38 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 01:25:03 | × | knupfer quits (~Thunderbi@200116b82c90ff008ddd7d0fb380906e.dip.versatel-1u1.de) (Quit: knupfer) |
| 01:25:11 | → | knupfer joins (~Thunderbi@200116b82c90ff00dd065b5b3de4f5c0.dip.versatel-1u1.de) |
| 01:25:52 | <phaazon> | http://hackage.haskell.org/package/pandoc-types-1.22/docs/Text-Pandoc-Builder.html nevermind, it was defined here… |
| 01:25:54 | → | Tario joins (~Tario@201.192.165.173) |
| 01:26:08 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) (Client Quit) |
| 01:26:09 | → | dansho joins (~dansho@ec2-18-179-39-119.ap-northeast-1.compute.amazonaws.com) |
| 01:26:19 | <yushyin> | hoogle can be helpful! |
| 01:26:37 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 260 seconds) |
| 01:26:48 | <phaazon> | yeah currently my editor’s LSP is a bit in holidays |
| 01:26:51 | <phaazon> | I need to fix that :D |
| 01:27:03 | <phaazon> | I think I’ll make a PR to pandoc tomorrow |
| 01:27:25 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Client Quit) |
| 01:27:45 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 01:28:27 | → | ces1 joins (~ces@fsf/member/ces) |
| 01:29:26 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Read error: Connection reset by peer) |
| 01:29:30 | → | geowiesnot joins (~user@87-89-181-157.abo.bbox.fr) |
| 01:30:32 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 01:31:02 | → | jedws joins (~jedws@121.209.189.201) |
| 01:31:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 01:33:58 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 01:34:24 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 01:34:40 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 01:36:13 | × | columbarius quits (~columbari@mue-88-130-54-094.dsl.tropolys.de) (Ping timeout: 264 seconds) |
| 01:36:40 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 01:38:21 | → | columbarius joins (~columbari@87.123.198.45) |
| 01:39:00 | → | wei2912 joins (~wei2912@unaffiliated/wei2912) |
| 01:42:45 | → | knupfer1 joins (~Thunderbi@87.123.206.117) |
| 01:42:48 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@static-198-54-134-148.cust.tzulo.com) |
| 01:43:38 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 01:44:25 | → | GuerrillaMonkey joins (~Jeanne-Ka@86.106.143.186) |
| 01:44:54 | × | knupfer quits (~Thunderbi@200116b82c90ff00dd065b5b3de4f5c0.dip.versatel-1u1.de) (Ping timeout: 268 seconds) |
| 01:44:54 | knupfer1 | is now known as knupfer |
| 01:45:38 | → | FreeBirdLjj joins (~freebirdl@101.87.175.26) |
| 01:47:45 | × | dfeuer quits (~dfeuer@pool-108-18-223-60.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 01:48:16 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@static-198-54-134-148.cust.tzulo.com) (Ping timeout: 240 seconds) |
| 01:49:22 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:507e:67a8:8e33:6ee2) |
| 01:49:52 | × | FreeBirdLjj quits (~freebirdl@101.87.175.26) (Ping timeout: 256 seconds) |
| 01:50:10 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@static-198-54-134-100.cust.tzulo.com) |
| 01:51:43 | × | Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:5c08:7b47:1b0:b77) (Quit: Leaving) |
| 01:51:51 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:507e:67a8:8e33:6ee2) (Client Quit) |
| 01:52:25 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 264 seconds) |
| 01:52:42 | × | GuerrillaMonkey quits (~Jeanne-Ka@86.106.143.186) (Ping timeout: 256 seconds) |
| 01:53:04 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.) |
| 01:53:36 | × | knupfer quits (~Thunderbi@87.123.206.117) (Ping timeout: 240 seconds) |
| 01:53:49 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:cde2:1e79:768c:58ea) |
| 01:56:59 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 01:57:27 | × | ces1 quits (~ces@fsf/member/ces) (Quit: WeeChat 3.0) |
| 01:59:04 | → | argento joins (~argent0@168.227.96.51) |
| 01:59:45 | → | kam1 joins (~kam1@24.231.108.143) |
| 02:01:37 | <halbGefressen> | dmwit: I did it! My solution is probably in O(yes), but idc, it works and all automated tests pass! |
| 02:02:37 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 264 seconds) |
| 02:02:37 | <dsal> | Is O(yes) like O(MG)? |
| 02:03:15 | <halbGefressen> | yes |
| 02:03:45 | <ephemient> | there's 2^n partitions to return; as long as you're O(2^n) overall it seems reasonable? |
| 02:03:56 | <halbGefressen> | alright, for a list with 3 elements, there are 30 possibilities. For 4 elements, it's already 336 and for 5 it's 5040. |
| 02:05:14 | <halbGefressen> | it would be much easier if I would just have to find out the number of distinct trees, but I guess that would be too trivial since it is an easy problem of combinatorics |
| 02:05:23 | × | dansho quits (~dansho@ec2-18-179-39-119.ap-northeast-1.compute.amazonaws.com) (Quit: Leaving) |
| 02:05:47 | → | dansho joins (~dansho@ec2-18-179-39-119.ap-northeast-1.compute.amazonaws.com) |
| 02:05:56 | → | MrMuffles[m] joins (mrmufflesm@gateway/shell/matrix.org/x-xyejpsqzvzaqmmkc) |
| 02:06:47 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
| 02:06:47 | <halbGefressen> | The only exercise left is the enumeration of all possible surjective functions from finite sets a to b. but I guess I'll just go to sleep now. |
| 02:08:19 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 02:08:33 | argento | have you tried list's monad instance? |
| 02:08:44 | × | dandart quits (~Thunderbi@home.dandart.co.uk) (Remote host closed the connection) |
| 02:09:00 | → | dandart joins (~Thunderbi@home.dandart.co.uk) |
| 02:10:06 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:13:34 | × | kam1 quits (~kam1@24.231.108.143) (Ping timeout: 260 seconds) |
| 02:14:36 | × | cwj1 quits (~cwj@s91904426.blix.com) (Remote host closed the connection) |
| 02:15:46 | × | t3xp4t quits (~texinwien@213162073014.public.t-mobile.at) (Remote host closed the connection) |
| 02:16:46 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Remote host closed the connection) |
| 02:17:48 | × | frankdmartinez quits (~frankdmar@5.181.234.188) (Quit: frankdmartinez) |
| 02:18:11 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
| 02:19:32 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 02:20:44 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 02:22:02 | → | frankdmartinez joins (~frankdmar@5.181.234.188) |
| 02:22:59 | × | pjb quits (~t@2a01cb04063ec5007877dab9a3fb2e14.ipv6.abo.wanadoo.fr) (Ping timeout: 272 seconds) |
| 02:23:44 | → | kam1 joins (~kam1@24.231.108.143) |
| 02:26:06 | × | jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection) |
| 02:26:28 | → | jb55 joins (~jb55@gateway/tor-sasl/jb55) |
| 02:26:54 | × | Entertainment quits (~entertain@104.246.132.210) (Ping timeout: 272 seconds) |
| 02:32:04 | <b4er> | What is an efficient representation of something like STLC? De Bruijn is nice for alpha-equivalence I guess but it doesn't help with "free variable checks" does it? |
| 02:33:33 | × | Tops21 quits (~Tobias@dyndsl-095-033-090-103.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 02:33:37 | <b4er> | If I have `Lambda (Lambda (App 3 (App 0 1)))` then I have 3 as a fee variable and 0,1 bound. But if I want to query for 3 being free, I still need to walk the structure hmm |
| 02:34:21 | <b4er> | Would it be sound to use smart-constructors and carry the depth of Lambdas at each Lambda? |
| 02:34:59 | <b4er> | So I'd have `Lambda 2 (Lambda 1 ...)` and then if I ask with 3, I just check (3>2)? |
| 02:35:25 | <b4er> | Ah, but then `App` etc. need that stuff too |
| 02:36:26 | → | sgibber2018 joins (~arch-gibb@2600:6c55:6d80:3243:c2cb:38ff:fe8d:b46f) |
| 02:37:18 | <koz_> | b4er: Check out 'bound'. |
| 02:37:28 | <b4er> | In hackage? |
| 02:37:53 | <koz_> | Yes. |
| 02:38:00 | <b4er> | * We represent the target language itself as an ideal monad supplied by the user, and provide a Scope monad transformer for introducing bound variables in user supplied terms. |
| 02:38:16 | <b4er> | Sounds good I'll check that out, ty! |
| 02:38:22 | × | halbGefressen quits (~halbGefre@2a02:810d:f40:2a9c:a4fe:2adc:248b:466f) (Quit: halbGefressen) |
| 02:38:51 | <b4er> | The first slide in that presentation though... |
| 02:39:03 | → | nhs_ joins (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) |
| 02:40:41 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 02:41:28 | → | halbGefressen joins (~halbGefre@ipbcc14379.dynamic.kabel-deutschland.de) |
| 02:41:32 | × | dansho quits (~dansho@ec2-18-179-39-119.ap-northeast-1.compute.amazonaws.com) (Quit: Leaving) |
| 02:42:33 | → | chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
| 02:44:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 02:47:18 | × | halbGefressen quits (~halbGefre@ipbcc14379.dynamic.kabel-deutschland.de) (Quit: halbGefressen) |
| 02:47:42 | × | xff0x_ quits (~fox@2001:1a81:53cd:600:4280:8eb:d6d7:f299) (Ping timeout: 260 seconds) |
| 02:48:42 | → | plutoniix joins (~q@184.82.206.66) |
| 02:49:23 | → | xff0x_ joins (~fox@2001:1a81:5204:2a00:adb6:cba:f871:aaef) |
| 02:50:30 | × | jmchael quits (~jmchael@81.174.205.210) (Ping timeout: 256 seconds) |
| 02:50:37 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 260 seconds) |
| 02:54:03 | × | CoolMa7 quits (~ColMa7@2a02:8109:9d40:14ea:9c11:93da:85f4:5b67) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:55:13 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:55:17 | × | sgibber2018 quits (~arch-gibb@2600:6c55:6d80:3243:c2cb:38ff:fe8d:b46f) (Ping timeout: 272 seconds) |
| 02:55:36 | × | lawid quits (~quassel@dslb-178-005-075-009.178.005.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 02:55:44 | → | lawid joins (~quassel@dslb-090-186-035-082.090.186.pools.vodafone-ip.de) |
| 02:55:59 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 02:56:43 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 02:58:16 | → | quinn joins (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) |
| 03:00:14 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:01:07 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 03:04:47 | × | Varis quits (~Tadas@unaffiliated/varis) (Read error: Connection reset by peer) |
| 03:05:52 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 03:08:16 | × | kam1 quits (~kam1@24.231.108.143) (Ping timeout: 240 seconds) |
| 03:09:23 | → | xirhtogal joins (~lagothrix@unaffiliated/lagothrix) |
| 03:09:23 | lagothrix | is now known as Guest23977 |
| 03:09:23 | xirhtogal | is now known as lagothrix |
| 03:11:52 | × | Varis quits (~Tadas@unaffiliated/varis) (Read error: Connection reset by peer) |
| 03:12:11 | → | kam1 joins (~kam1@24.231.108.143) |
| 03:12:29 | × | Guest23977 quits (~lagothrix@unaffiliated/lagothrix) (Ping timeout: 260 seconds) |
| 03:12:56 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 03:13:20 | <koz_> | b4er: Lol. |
| 03:13:35 | <koz_> | The title of the presentation is literally 'how to make de Bruijn succ less'. |
| 03:13:44 | → | petersen joins (~petersen@redhat/juhp) |
| 03:13:51 | <koz_> | And there are multiple references to something 'succing a lot', etc. |
| 03:16:06 | × | frankdmartinez quits (~frankdmar@5.181.234.188) (Quit: frankdmartinez) |
| 03:16:25 | × | Varis quits (~Tadas@unaffiliated/varis) (Read error: Connection reset by peer) |
| 03:16:56 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 03:18:23 | → | drbean joins (~drbean@TC210-63-209-163.static.apol.com.tw) |
| 03:19:33 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:22:41 | × | carthia quits (~carthia@gateway/tor-sasl/carthia) (Quit: carthia) |
| 03:24:27 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:24:48 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 03:25:10 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 03:26:19 | × | jedws quits (~jedws@121.209.189.201) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 03:29:07 | × | petersen quits (~petersen@redhat/juhp) (Ping timeout: 260 seconds) |
| 03:30:12 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:30:33 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 03:31:04 | → | Tario joins (~Tario@201.192.165.173) |
| 03:31:27 | × | dandart quits (~Thunderbi@home.dandart.co.uk) (Ping timeout: 260 seconds) |
| 03:32:32 | → | frankdmartinez joins (~frankdmar@5.181.234.188) |
| 03:33:54 | → | petersen joins (~petersen@redhat/juhp) |
| 03:34:38 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) |
| 03:35:23 | → | dandart joins (~Thunderbi@home.dandart.co.uk) |
| 03:36:23 | × | denisse_ quits (~spaceCat@gateway/tor-sasl/alephzer0) (Ping timeout: 240 seconds) |
| 03:36:23 | × | hexo quits (~hexo@gateway/tor-sasl/hexo) (Ping timeout: 240 seconds) |
| 03:37:05 | → | denisse joins (~spaceCat@gateway/tor-sasl/alephzer0) |
| 03:37:08 | → | justsomeguy joins (~justsomeg@216.186.218.241) |
| 03:37:08 | × | justsomeguy quits (~justsomeg@216.186.218.241) (Changing host) |
| 03:37:08 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 03:37:23 | × | srk quits (~sorki@gateway/tor-sasl/sorki) (Ping timeout: 240 seconds) |
| 03:37:25 | × | xelxebar_ quits (~xelxebar@gateway/tor-sasl/xelxebar) (Quit: ZNC 1.7.2+deb3 - https://znc.in) |
| 03:37:37 | → | xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar) |
| 03:37:49 | × | solonarv quits (~solonarv@astrasbourg-653-1-252-231.w92-161.abo.wanadoo.fr) (Ping timeout: 246 seconds) |
| 03:37:52 | <monochrom> | Yes, "data N = Z | S N" succs a lot. |
| 03:38:15 | → | hexo joins (~hexo@gateway/tor-sasl/hexo) |
| 03:38:23 | × | Varis quits (~Tadas@unaffiliated/varis) (Read error: Connection reset by peer) |
| 03:38:33 | → | srk joins (~sorki@gateway/tor-sasl/sorki) |
| 03:38:43 | × | ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Ping timeout: 240 seconds) |
| 03:38:58 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 03:39:23 | × | andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Ping timeout: 240 seconds) |
| 03:40:13 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Remote host closed the connection) |
| 03:40:26 | → | jedws joins (~jedws@121.209.189.201) |
| 03:40:48 | → | laen_ joins (~laen_@195.140.213.38) |
| 03:42:14 | → | ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex) |
| 03:42:23 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 03:44:37 | × | Varis quits (~Tadas@unaffiliated/varis) (Quit: Leaving) |
| 03:48:29 | <spopejoy> | "I am not a number, I am a free monad!" |
| 03:48:44 | <spopejoy> | https://hackage.haskell.org/package/bound-2.0.2/docs/Bound-Var.html |
| 03:48:55 | → | andreas303 joins (~andreas@gateway/tor-sasl/andreas303) |
| 03:48:59 | → | GuerrillaMonkey joins (~Jeanne-Ka@86.106.143.10) |
| 03:49:04 | × | codeAlways quits (uid272474@gateway/web/irccloud.com/x-wmlqjaxzgcivyywk) (Quit: Connection closed for inactivity) |
| 03:50:06 | <b4er> | The code from Bird & Paterson was what cracked me up the most |
| 03:50:21 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:cde2:1e79:768c:58ea) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 03:51:17 | × | theDon quits (~td@muedsl-82-207-238-228.citykom.de) (Ping timeout: 260 seconds) |
| 03:52:16 | <b4er> | spopejoy, it's a play on "I am not a Number—I am a Free Variable" |
| 03:52:31 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@static-198-54-134-100.cust.tzulo.com) (Ping timeout: 246 seconds) |
| 03:52:59 | <spopejoy> | which originates from ... Elephant Man? |
| 03:53:08 | → | theDon joins (~td@muedsl-82-207-238-216.citykom.de) |
| 03:53:42 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@static-198-54-134-132.cust.tzulo.com) |
| 03:56:16 | × | GuerrillaMonkey quits (~Jeanne-Ka@86.106.143.10) (Ping timeout: 240 seconds) |
| 03:57:13 | × | kam1 quits (~kam1@24.231.108.143) (Ping timeout: 264 seconds) |
| 03:58:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:58:29 | × | Sheilong quits (uid293653@gateway/web/irccloud.com/x-uagwkmdlrotoupds) () |
| 03:58:46 | × | jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection) |
| 03:59:14 | → | jb55 joins (~jb55@gateway/tor-sasl/jb55) |
| 03:59:45 | <nshepperd> | it's from _The Prisoner_ iirc |
| 03:59:57 | → | GuerrillaMonkey joins (~Jeanne-Ka@static-198-54-134-164.cust.tzulo.com) |
| 04:00:52 | × | jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection) |
| 04:01:19 | <nshepperd> | so |
| 04:01:21 | → | jb55 joins (~jb55@gateway/tor-sasl/jb55) |
| 04:02:01 | × | petersen quits (~petersen@redhat/juhp) (Ping timeout: 264 seconds) |
| 04:02:08 | <spopejoy> | lol I was thinking of "I am not an animal, I am a human being" but it's def the Prisoner |
| 04:03:32 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@static-198-54-134-132.cust.tzulo.com) (Ping timeout: 260 seconds) |
| 04:03:39 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:cde2:1e79:768c:58ea) |
| 04:05:07 | × | Anthaas quits (~Anthaas@unaffiliated/anthaas) (Ping timeout: 246 seconds) |
| 04:05:16 | → | Rudd0 joins (~Rudd0@185.189.115.103) |
| 04:06:13 | → | Anthaas joins (~Anthaas@unaffiliated/anthaas) |
| 04:13:26 | → | cheater joins (~user@unaffiliated/cheater) |
| 04:16:55 | → | Eelis joins (~Eelis@unaffiliated/eelis) |
| 04:17:00 | × | jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection) |
| 04:17:23 | → | jb55 joins (~jb55@gateway/tor-sasl/jb55) |
| 04:17:26 | × | GuerrillaMonkey quits (~Jeanne-Ka@static-198-54-134-164.cust.tzulo.com) (Quit: Leaving) |
| 04:17:35 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@static-198-54-134-164.cust.tzulo.com) |
| 04:17:44 | <Eelis> | is there a nicer way (perhaps using some extension) to write case () of { _ | pred1 -> res1 | pred2 -> res2 | pred3 -> res3 | otherwise -> res4 } ? |
| 04:18:56 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving) |
| 04:20:38 | <Eelis> | ah i found MultiWayIf, nvm |
| 04:21:43 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-73-208.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 04:21:55 | → | christo joins (~chris@81.96.113.213) |
| 04:22:29 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-73-208.w86-212.abo.wanadoo.fr) |
| 04:25:26 | × | jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection) |
| 04:25:52 | → | jb55 joins (~jb55@gateway/tor-sasl/jb55) |
| 04:29:22 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-73-208.w86-212.abo.wanadoo.fr) (Remote host closed the connection) |
| 04:30:41 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 04:32:59 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 04:34:09 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-73-208.w86-212.abo.wanadoo.fr) |
| 04:39:11 | <jle`> | Eelis: -XMultiWayIf |
| 04:42:14 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:42:43 | × | philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Ping timeout: 240 seconds) |
| 04:43:29 | × | cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 260 seconds) |
| 04:45:51 | × | kderme quits (2eb0d7c7@ppp046176215199.access.hol.gr) (Remote host closed the connection) |
| 04:46:18 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 04:48:56 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@static-198-54-134-164.cust.tzulo.com) (Quit: Leaving) |
| 04:50:11 | × | frankdmartinez quits (~frankdmar@5.181.234.188) (Quit: frankdmartinez) |
| 04:50:55 | → | ransom joins (~c4264035@8.47.12.52) |
| 04:52:07 | <c_wraith> | I find that almost any time I'd want to use multiway if, I can just use guards on a non-function local binding... |
| 04:52:47 | → | frankdmartinez joins (~frankdmar@5.181.234.188) |
| 04:55:20 | <ephemient> | > let x | False = 0 | otherwise = 1 in x |
| 04:55:23 | <lambdabot> | 1 |
| 04:55:37 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-73-208.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 04:55:53 | × | ransom quits (~c4264035@8.47.12.52) (Read error: Connection reset by peer) |
| 04:56:14 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-73-208.w86-212.abo.wanadoo.fr) |
| 04:56:55 | → | ransom joins (~c4264035@2a09:bac0:72::82f:c34) |
| 04:59:43 | × | dandart quits (~Thunderbi@home.dandart.co.uk) (Quit: dandart) |
| 05:02:13 | × | argento quits (~argent0@168.227.96.51) (Remote host closed the connection) |
| 05:03:57 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-73-208.w86-212.abo.wanadoo.fr) (Remote host closed the connection) |
| 05:04:22 | × | jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection) |
| 05:04:47 | → | jb55 joins (~jb55@gateway/tor-sasl/jb55) |
| 05:04:55 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) () |
| 05:05:55 | × | frankdmartinez quits (~frankdmar@5.181.234.188) (Quit: frankdmartinez) |
| 05:06:13 | → | dandart joins (~Thunderbi@home.dandart.co.uk) |
| 05:06:46 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:08:04 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 05:08:21 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 05:09:16 | × | dandart quits (~Thunderbi@home.dandart.co.uk) (Remote host closed the connection) |
| 05:09:35 | → | dandart joins (~Thunderbi@home.dandart.co.uk) |
| 05:10:53 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
| 05:12:01 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 05:15:16 | → | frankdmartinez joins (~frankdmar@5.181.234.188) |
| 05:16:24 | → | jamm joins (~jamm@unaffiliated/jamm) |
| 05:16:37 | × | jamm quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 05:19:05 | × | rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 240 seconds) |
| 05:19:43 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 05:19:52 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) |
| 05:20:21 | → | CMCDragonkai1 joins (~Thunderbi@120.17.23.213) |
| 05:20:51 | → | notzmv joins (~user@unaffiliated/zmv) |
| 05:24:44 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 05:25:13 | × | frankdmartinez quits (~frankdmar@5.181.234.188) (Quit: frankdmartinez) |
| 05:25:36 | → | notzmv joins (~user@unaffiliated/zmv) |
| 05:25:38 | × | CMCDragonkai1 quits (~Thunderbi@120.17.23.213) (Remote host closed the connection) |
| 05:25:43 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 05:26:17 | × | hiroaki quits (~hiroaki@2a02:908:4b18:8c40::ee4f) (Ping timeout: 268 seconds) |
| 05:26:27 | → | frankdmartinez joins (~frankdmar@5.181.234.188) |
| 05:26:27 | × | frankdmartinez quits (~frankdmar@5.181.234.188) (Remote host closed the connection) |
| 05:26:35 | → | Tario joins (~Tario@201.192.165.173) |
| 05:27:20 | → | frankdmartinez joins (~frankdmar@5.181.234.188) |
| 05:28:02 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 05:29:22 | → | notzmv joins (~user@unaffiliated/zmv) |
| 05:29:41 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 05:37:17 | → | jamm joins (~jamm@unaffiliated/jamm) |
| 05:38:34 | → | hiroaki joins (~hiroaki@2a02:908:4b18:8c40::1d01) |
| 05:42:07 | × | jamm quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds) |
| 05:43:53 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 05:44:04 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:48:22 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:25e9:81:81d6:bd54) (Remote host closed the connection) |
| 05:49:56 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 05:50:12 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 272 seconds) |
| 05:55:27 | × | laen_ quits (~laen_@195.140.213.38) (Remote host closed the connection) |
| 05:58:14 | → | kam1 joins (~kam1@24.231.108.143) |
| 06:01:22 | × | pacak quits (~pacak@bb116-14-220-91.singnet.com.sg) (Remote host closed the connection) |
| 06:03:00 | → | pacak joins (~pacak@bb116-14-220-91.singnet.com.sg) |
| 06:04:34 | × | frankdmartinez quits (~frankdmar@5.181.234.188) (Ping timeout: 260 seconds) |
| 06:06:13 | × | dandart quits (~Thunderbi@home.dandart.co.uk) (Ping timeout: 246 seconds) |
| 06:09:36 | → | bitmagie joins (~Thunderbi@200116b80642150055a14958a21bc79e.dip.versatel-1u1.de) |
| 06:10:27 | → | Saukk joins (~Saukk@83-148-239-3.dynamic.lounea.fi) |
| 06:18:28 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 06:19:05 | × | ransom quits (~c4264035@2a09:bac0:72::82f:c34) (Quit: Textual IRC Client: www.textualapp.com) |
| 06:19:16 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 06:26:01 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Read error: Connection reset by peer) |
| 06:27:50 | → | amueller joins (~amueller@185.103.96.147) |
| 06:31:42 | × | kam1 quits (~kam1@24.231.108.143) (Ping timeout: 260 seconds) |
| 06:36:56 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) |
| 06:39:53 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 06:41:37 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) (Ping timeout: 260 seconds) |
| 06:46:10 | → | gioyik_ joins (~gioyik@179.32.228.107) |
| 06:48:37 | × | gioyik quits (~gioyik@179.32.228.107) (Ping timeout: 260 seconds) |
| 06:51:31 | <VarikValefor[m]> | PROTIP: When in a bind, use `>>=`. |
| 06:54:16 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 06:59:41 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 07:09:55 | × | wei2912 quits (~wei2912@unaffiliated/wei2912) (Remote host closed the connection) |
| 07:11:06 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 07:12:37 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) |
| 07:13:00 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) (Client Quit) |
| 07:13:35 | <koz_> | VarikValefor[m]: PROTIP: If you're lost, just `return`. |
| 07:15:43 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) |
| 07:23:27 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 07:24:04 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 07:24:13 | → | christo joins (~chris@81.96.113.213) |
| 07:24:54 | × | kupi quits (uid212005@gateway/web/irccloud.com/x-pwwljkdtgciejnte) (Quit: Connection closed for inactivity) |
| 07:25:24 | → | jamm joins (~jamm@unaffiliated/jamm) |
| 07:26:10 | × | bitmagie quits (~Thunderbi@200116b80642150055a14958a21bc79e.dip.versatel-1u1.de) (Quit: bitmagie) |
| 07:28:28 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 246 seconds) |
| 07:29:57 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:30:02 | × | jamm quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds) |
| 07:31:13 | → | chambln joins (~user@2.31.230.114) |
| 07:33:22 | × | b4er quits (~b4er@91.193.4.138) (Ping timeout: 246 seconds) |
| 07:36:29 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 07:41:06 | × | zangi quits (~azure@36.79.200.71) (Read error: Connection reset by peer) |
| 07:41:27 | → | zangi joins (~azure@103.154.230.250) |
| 07:46:47 | → | rmk236 joins (~lcampos@ip-37-201-211-236.hsi13.unitymediagroup.de) |
| 07:51:18 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) (Ping timeout: 260 seconds) |
| 07:51:19 | × | rmk236 quits (~lcampos@ip-37-201-211-236.hsi13.unitymediagroup.de) (Ping timeout: 260 seconds) |
| 07:51:47 | → | rmk236 joins (~lcampos@2a02:908:3616:b100:5d3c:3ea2:9142:e850) |
| 07:52:37 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:cde2:1e79:768c:58ea) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 07:58:46 | × | tomku quits (~tomku@unaffiliated/tomku) (Ping timeout: 272 seconds) |
| 08:04:17 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 08:06:27 | → | tomku joins (~tomku@unaffiliated/tomku) |
| 08:10:55 | × | tomku quits (~tomku@unaffiliated/tomku) (Client Quit) |
| 08:12:13 | → | tomku joins (~tomku@unaffiliated/tomku) |
| 08:15:29 | × | jrm quits (~jrm@freebsd/developer/jrm) (Quit: ciao) |
| 08:15:54 | → | jrm joins (~jrm@freebsd/developer/jrm) |
| 08:20:11 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 08:22:28 | × | Saukk quits (~Saukk@83-148-239-3.dynamic.lounea.fi) (Remote host closed the connection) |
| 08:25:22 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds) |
| 08:33:02 | → | bitmagie joins (~Thunderbi@200116b80642150055a14958a21bc79e.dip.versatel-1u1.de) |
| 08:34:14 | × | andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Quit: andreas303) |
| 08:37:17 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 08:38:26 | × | bitmagie quits (~Thunderbi@200116b80642150055a14958a21bc79e.dip.versatel-1u1.de) (Quit: bitmagie) |
| 08:39:12 | → | madjestic joins (~Android@86-88-72-244.fixed.kpn.net) |
| 08:40:10 | <idnar> | @pl \f -> f a b c |
| 08:40:10 | <lambdabot> | flip (flip ($ a) b) c |
| 08:42:27 | × | amueller quits (~amueller@185.103.96.147) (Remote host closed the connection) |
| 08:42:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 08:43:37 | × | rmk236 quits (~lcampos@2a02:908:3616:b100:5d3c:3ea2:9142:e850) (Ping timeout: 272 seconds) |
| 08:45:25 | → | andreas303 joins (~andreas@gateway/tor-sasl/andreas303) |
| 08:49:06 | → | christo joins (~chris@81.96.113.213) |
| 09:00:10 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:05:16 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 09:16:38 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 09:16:45 | × | drbean quits (~drbean@TC210-63-209-163.static.apol.com.tw) (Ping timeout: 240 seconds) |
| 09:18:46 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer) |
| 09:20:55 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 09:24:36 | → | Franciman joins (~francesco@host-95-250-152-231.retail.telecomitalia.it) |
| 09:26:01 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 09:31:06 | × | andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Remote host closed the connection) |
| 09:33:33 | → | aenesidemus_ joins (~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net) |
| 09:34:59 | → | andreas303 joins (~andreas@gateway/tor-sasl/andreas303) |
| 09:35:16 | × | chambln quits (~user@2.31.230.114) (Ping timeout: 240 seconds) |
| 09:36:49 | × | aenesidemus quits (~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net) (Ping timeout: 264 seconds) |
| 09:37:08 | × | Anthaas quits (~Anthaas@unaffiliated/anthaas) (Ping timeout: 256 seconds) |
| 09:38:11 | → | Anthaas joins (~Anthaas@unaffiliated/anthaas) |
| 09:40:57 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 09:43:43 | → | larsan1 joins (~larsan@217.146.82.202) |
| 09:44:30 | <gentauro> | @:t fix |
| 09:44:30 | <lambdabot> | Maybe you meant: wn v rc pl let id do bf @ ? . |
| 09:44:41 | <gentauro> | @:t Data.Function.fix |
| 09:44:41 | <lambdabot> | Maybe you meant: wn v rc pl let id do bf @ ? . |
| 09:46:12 | <gentauro> | lambdabot: nope |
| 09:48:06 | → | philopsos joins (~caecilius@gateway/tor-sasl/caecilius) |
| 09:50:02 | → | jamm joins (~jamm@unaffiliated/jamm) |
| 09:51:33 | <xerox_> | gentauro: either @ or : |
| 09:54:32 | × | jamm quits (~jamm@unaffiliated/jamm) (Ping timeout: 268 seconds) |
| 09:57:50 | × | hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-bphofpilzzzitilm) (Quit: Connection closed for inactivity) |
| 09:59:16 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 240 seconds) |
| 10:01:07 | → | perdent joins (~perdent@101.175.79.103) |
| 10:02:37 | <ski> | @type fix |
| 10:02:39 | <lambdabot> | (a -> a) -> a |
| 10:03:51 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 10:11:45 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 10:12:20 | → | olligobber joins (~olligobbe@unaffiliated/olligobber) |
| 10:18:43 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 10:24:44 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) |
| 10:29:07 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) (Ping timeout: 260 seconds) |
| 10:33:48 | → | rmk236 joins (~lcampos@2a02:908:3616:b100:5d3c:3ea2:9142:e850) |
| 10:37:47 | × | cantstanya quits (~chatting@gateway/tor-sasl/cantstanya) (Remote host closed the connection) |
| 10:39:02 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:40:29 | → | bartholin joins (~bartholin@unaffiliated/bartholin) |
| 10:40:32 | <bartholin> | guys |
| 10:40:40 | <bartholin> | how do I install sdl |
| 10:41:14 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Remote host closed the connection) |
| 10:41:25 | → | cantstanya joins (~chatting@gateway/tor-sasl/cantstanya) |
| 10:42:15 | <xerox_> | bartholin: depends on what system you're running |
| 10:42:23 | <bartholin> | xerox_: linux |
| 10:42:32 | <xerox_> | which flavor of linux |
| 10:42:53 | <bartholin> | archlinux |
| 10:43:08 | <bartholin> | xerox_: I have tried cabal install --lib sdl2, but I get https://p.teknik.io/ThSub |
| 10:44:02 | <xerox_> | archlinux has got its own package manager I think it's called pacman through which you can get libsdl2 on your system |
| 10:44:12 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) |
| 10:44:32 | <bartholin> | xerox_: but what about the haskell module |
| 10:44:38 | <xerox_> | hmm |
| 10:50:23 | × | vicfred quits (vicfred@gateway/vpn/mullvad/vicfred) (Quit: Leaving) |
| 10:51:33 | → | pjb joins (~t@2a01cb04063ec500d400c5fa56f501d7.ipv6.abo.wanadoo.fr) |
| 10:51:40 | × | plutoniix quits (~q@184.82.206.66) (Ping timeout: 272 seconds) |
| 10:55:11 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 10:55:52 | <xerox_> | bartholin: if I make a new empty project with cabal init and add sdl2 to the build-deps it does seem to work correctly for me https://i.imgur.com/lCVZzaw.png |
| 10:56:37 | × | tsrt^ quits (tsrt@ip98-184-89-2.mc.at.cox.net) (Ping timeout: 264 seconds) |
| 10:57:25 | → | tsrt^ joins (~hph@ip98-184-89-2.mc.at.cox.net) |
| 10:58:04 | <bartholin> | xerox_: I have cabal 3.2 |
| 10:58:13 | <xerox_> | I think I got 3.4 |
| 10:58:27 | <xerox_> | yes ✔✔ cabal 3.4.0.0-rc4 |
| 10:58:39 | <xerox_> | (using ghcup to manage ghc, cabal & friends) |
| 10:59:12 | <xerox_> | I'm on 8.10.2 tho I should try .3 and see if things break, that's the version you're on |
| 10:59:16 | <bartholin> | xerox_: what is the point of .cabal files |
| 10:59:16 | × | Ishutin quits (~Ishutin@80-95-69-205.pool.digikabel.hu) (Ping timeout: 240 seconds) |
| 10:59:43 | <xerox_> | bartholin: it's how you make haskell packages, just like the sdl2 one |
| 10:59:49 | → | fendor joins (~fendor@77.119.129.8.wireless.dyn.drei.com) |
| 10:59:56 | <xerox_> | they can be either binaries or libraries (or both, or multiple of each, etc) |
| 11:00:15 | → | olban joins (~olban@213.152.161.20) |
| 11:01:24 | × | olban quits (~olban@213.152.161.20) (Remote host closed the connection) |
| 11:02:15 | → | Ishutin joins (~Ishutin@80-95-69-205.pool.digikabel.hu) |
| 11:03:11 | <xerox_> | old cabal install would put stuff in the global (to your user) registry of packages but recent ones (backed by v2-* commands) do the build of all the dependencies in place, right there in the "dist-newstyle" directory of the package |
| 11:03:56 | <xerox_> | then you use cabal build, cabal run, cabal ghci, etc to interact with your code and its dependencies |
| 11:04:13 | → | plutoniix joins (~q@ppp-223-24-93-108.revip6.asianet.co.th) |
| 11:04:23 | × | cantstanya quits (~chatting@gateway/tor-sasl/cantstanya) (Ping timeout: 240 seconds) |
| 11:06:03 | → | kyali joins (~kyali@APN-123-252-106-gprs.simobil.net) |
| 11:06:57 | → | Ariakenom joins (~Ariakenom@2001:9b1:efb:fc00:ad76:8f15:d0f4:d04e) |
| 11:09:19 | × | sunrise_ quits (~sunrise_@51.194.80.91) (Ping timeout: 246 seconds) |
| 11:10:42 | × | madjestic quits (~Android@86-88-72-244.fixed.kpn.net) (Read error: Connection reset by peer) |
| 11:10:54 | → | cantstanya joins (~chatting@gateway/tor-sasl/cantstanya) |
| 11:12:26 | → | madjestic joins (~Android@89-200-4-179.mobile.kpn.net) |
| 11:13:10 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 11:13:15 | <bartholin> | xerox_: comonad doesn't compile, because of tagged |
| 11:13:48 | <xerox_> | bartholin: ah we do have a difference, I'm on 8.10.2 not .3 |
| 11:14:10 | <xerox_> | I'll try switching to that and see |
| 11:14:24 | <bartholin> | I have the error Could not find module ‘Data.Tagged’ |
| 11:15:46 | × | p-core quits (~Thunderbi@koleje-wifi-0045.koleje.cuni.cz) (Quit: p-core) |
| 11:15:49 | <bartholin> | but if I do import Data.Tagged in ghci, it werks |
| 11:16:03 | → | p-core joins (~Thunderbi@koleje-wifi-0045.koleje.cuni.cz) |
| 11:17:26 | × | jneira quits (501e6579@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.101.121) (Ping timeout: 264 seconds) |
| 11:18:46 | <xerox_> | bartholin: it works for me, builds and installs (locally to the test package I made) comonad-5.0.8 |
| 11:19:04 | <xerox_> | there might be something funny going on with your setup |
| 11:20:07 | <bartholin> | xerox_: I have erased my ~/.cabal and ~/.ghc folders multiple times |
| 11:20:29 | → | ADG1089__ joins (~aditya@223.235.213.117) |
| 11:21:08 | <bartholin> | and ghc-pkg check gives me nothing but lots of warning lines such as Warning: haddock-interfaces: /usr/share/doc/haskell-haddock-library/html/haddock-library.haddock doesn't exist or isn't a file |
| 11:21:18 | <xerox_> | bartholin: I think if you use ghcup and get ghc and cabal 3.4 installed through it, then make an empty project with cabal init and add sdl2 to the build deps, then you should remove a lot of guessing from the problem |
| 11:21:53 | <xerox_> | it might even just work, if libsdl2 is installed, just as it did for me |
| 11:21:55 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 11:24:38 | × | rmk236 quits (~lcampos@2a02:908:3616:b100:5d3c:3ea2:9142:e850) (Quit: Leaving.) |
| 11:24:51 | <xerox_> | bartholin: https://pastebin.com/raw/mD8LVS0f |
| 11:26:05 | <xerox_> | bartholin: and these are the tools via ghcup: https://pastebin.com/raw/4ysC8FZ3 |
| 11:28:25 | × | kyali quits (~kyali@APN-123-252-106-gprs.simobil.net) (Ping timeout: 240 seconds) |
| 11:32:45 | → | v_m_v joins (~vm_v@2a02:aa12:3200:6480:5db7:7326:4789:d9fc) |
| 11:32:46 | × | madjestic quits (~Android@89-200-4-179.mobile.kpn.net) (Read error: Connection reset by peer) |
| 11:35:56 | → | madjestic joins (~Android@86-88-72-244.fixed.kpn.net) |
| 11:37:34 | <bartholin> | xerox_: I don't understand https://p.teknik.io/r5LId |
| 11:38:13 | <xerox_> | bartholin: ghcup installs everything under ~/.ghcup and then lets you pick what you want to use |
| 11:38:46 | <xerox_> | bartholin: you installed the "recommended" version, see "ghcup list" |
| 11:39:09 | <xerox_> | you want to ghcup install ghc 8.10.3 and then ghcup set ghc 8.10.3 to install and use the lastest |
| 11:39:12 | × | spopejoy quits (~stuart@ool-44c5f8c9.dyn.optonline.net) (Ping timeout: 256 seconds) |
| 11:39:38 | → | spopejoy joins (~stuart@ool-44c5f8c9.dyn.optonline.net) |
| 11:39:46 | <xerox_> | then do the same with cabal 3.4.0.0-rc4 |
| 11:40:12 | <xerox_> | when a tool is 'set', its binaries are brought into $PATH so you can run them |
| 11:40:18 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:40:19 | <bartholin> | xerox_: I have ✓ ghc 8.10.3 latest,base-4.14.1.0 |
| 11:40:25 | × | madjestic quits (~Android@86-88-72-244.fixed.kpn.net) (Ping timeout: 240 seconds) |
| 11:40:30 | <xerox_> | the single tick means it's installed, but not set |
| 11:40:41 | <bartholin> | oh ok |
| 11:40:58 | <xerox_> | e.g. I have ✓ ghc 8.10.2 and then ✔✔ ghc 8.10.3 |
| 11:41:30 | → | madjestic joins (~Android@89-200-4-179.mobile.kpn.net) |
| 11:41:46 | <xerox_> | you can also ghcup uninstall ghc 8.8.4 to not waste that space |
| 11:42:03 | <xerox_> | sorry, 'rm' not uninstall |
| 11:42:08 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 11:43:26 | <maerwald> | xerox_: you can also use `ghcup tui` to do those things interactively |
| 11:43:26 | × | madjestic quits (~Android@89-200-4-179.mobile.kpn.net) (Read error: Connection reset by peer) |
| 11:43:39 | <xerox_> | forgot about that (: |
| 11:45:05 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 11:45:38 | → | madjestic joins (~Android@86-88-72-244.fixed.kpn.net) |
| 11:45:40 | → | kyali joins (~kyali@APN-123-252-106-gprs.simobil.net) |
| 11:48:02 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Ping timeout: 264 seconds) |
| 11:48:17 | <bartholin> | xerox_: it works now |
| 11:48:34 | <bartholin> | \o/ |
| 11:50:16 | <bartholin> | xerox_: wait, where is the executable now |
| 11:50:37 | → | mbomba joins (~mbomba@bras-base-toroon2719w-grc-53-142-114-5-26.dsl.bell.ca) |
| 11:50:53 | × | plutoniix quits (~q@ppp-223-24-93-108.revip6.asianet.co.th) (Quit: Leaving) |
| 11:52:03 | × | mbomba quits (~mbomba@bras-base-toroon2719w-grc-53-142-114-5-26.dsl.bell.ca) (Client Quit) |
| 11:52:28 | <xerox_> | bartholin: you run it through cabal run |
| 11:52:43 | <xerox_> | and you get to ghci thrugh cabal repl |
| 11:53:01 | <bartholin> | ok |
| 11:53:03 | <bartholin> | thanks |
| 11:53:10 | <xerox_> | the cabal commands set everything up to use the locally built dependencies and binaries |
| 11:53:14 | <xerox_> | np (: |
| 11:53:24 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 260 seconds) |
| 11:55:00 | → | jchia1 joins (~jchia@45.32.62.73) |
| 11:56:01 | × | jchia1 quits (~jchia@45.32.62.73) (Remote host closed the connection) |
| 11:56:19 | × | kyali quits (~kyali@APN-123-252-106-gprs.simobil.net) (Ping timeout: 260 seconds) |
| 11:56:30 | × | lambda quits (~xiretza@mail.xiretza.xyz) (Quit: WeeChat 3.0) |
| 11:56:36 | × | jchia quits (~jchia@58.32.71.163) (Ping timeout: 256 seconds) |
| 11:57:06 | → | jchia joins (~jchia@58.32.37.71) |
| 11:57:35 | <phaazon> | hm, is there a way with cabal to override a dependency by specifying a git repository, or a path? I’m currently trying to make a change to a dependency and I need to test it |
| 11:57:52 | → | lambda joins (~xiretza@mail.xiretza.xyz) |
| 11:58:00 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 11:58:14 | <phaazon> | maybe in the cabal.project file, which I have never used :D |
| 11:58:58 | <phaazon> | I fear I’ll have to override all the dependencies my dependency uses too, because I’m basically editing a transitive package of my dep :/ |
| 12:01:52 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 12:02:43 | <xerox_> | phaazon: exactly |
| 12:02:57 | <phaazon> | well actually not a transitive dep |
| 12:03:07 | <phaazon> | my website depends on pandoc, and I have a small fix on it |
| 12:03:13 | <phaazon> | so I should be fine just depending on my git fork |
| 12:07:35 | × | v_m_v quits (~vm_v@2a02:aa12:3200:6480:5db7:7326:4789:d9fc) (Remote host closed the connection) |
| 12:07:53 | → | v_m_v joins (~vm_v@2a02:aa12:3200:6480:5db7:7326:4789:d9fc) |
| 12:09:11 | × | jedws quits (~jedws@121.209.189.201) (Remote host closed the connection) |
| 12:09:51 | → | jedws joins (~jedws@121.209.189.201) |
| 12:10:32 | × | ADG1089__ quits (~aditya@223.235.213.117) (Remote host closed the connection) |
| 12:12:38 | × | v_m_v quits (~vm_v@2a02:aa12:3200:6480:5db7:7326:4789:d9fc) (Ping timeout: 264 seconds) |
| 12:12:41 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 12:14:01 | → | ADG1089__ joins (~aditya@223.235.213.117) |
| 12:15:58 | → | v_m_v joins (~vm_v@2a02:aa12:3200:6480:5db7:7326:4789:d9fc) |
| 12:16:01 | → | Feuermagier joins (~Feuermagi@213.178.26.41) |
| 12:17:37 | × | ADG1089__ quits (~aditya@223.235.213.117) (Remote host closed the connection) |
| 12:18:44 | → | ADG1089__ joins (~aditya@223.235.213.117) |
| 12:19:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 12:21:32 | × | jedws quits (~jedws@121.209.189.201) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 12:23:43 | → | jneira joins (5127ac9c@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.172.156) |
| 12:23:54 | × | ADG1089__ quits (~aditya@223.235.213.117) (Remote host closed the connection) |
| 12:25:09 | → | ADG1089__ joins (~aditya@223.235.213.117) |
| 12:26:19 | → | jedws joins (~jedws@121.209.189.201) |
| 12:27:17 | <phaazon> | xerox_: hm, looks like that’s not really the way to go |
| 12:27:31 | <phaazon> | it doesn’t look like cabal is using the git repository, but install it still picks the dep from hackage |
| 12:27:35 | <xerox_> | phaazon: I did that in the past, stuck a line in the project file to use my own git fork |
| 12:27:45 | <xerox_> | I forget the syntax I always have to copy it from somewhere else |
| 12:27:59 | <phaazon> | https://cabal.readthedocs.io/en/3.4/cabal-project.html#specifying-packages-from-remote-version-control-locations I mean I just did that |
| 12:28:09 | <phaazon> | but maybe there’s something to do to tell cabal to update its cache? |
| 12:28:16 | <phaazon> | I tried removing the already generated .project.local file |
| 12:28:20 | <phaazon> | didn’t change it |
| 12:28:56 | <xerox_> | :( |
| 12:30:23 | × | ADG1089__ quits (~aditya@223.235.213.117) (Remote host closed the connection) |
| 12:30:49 | <xerox_> | yeah that's what I'd done too: https://pastebin.com/raw/bdNakMFb |
| 12:30:50 | → | ADG1089__ joins (~aditya@223.235.213.117) |
| 12:31:05 | <xerox_> | so that it finds the packages in that subdir |
| 12:32:57 | <phaazon> | ah, that’s not what I’m doing |
| 12:33:00 | <phaazon> | I’ll try that way, thanks |
| 12:33:04 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 12:33:04 | <phaazon> | did you change your .cabal file? |
| 12:33:53 | <xerox_> | no |
| 12:35:12 | <phaazon> | I’m still using the hackage version… |
| 12:35:21 | <xerox_> | meep. |
| 12:35:38 | <phaazon> | how did you reconfigure your build? |
| 12:35:41 | <phaazon> | cabal configure --reinstall? |
| 12:35:45 | → | Entertainment joins (~entertain@104.246.132.210) |
| 12:35:49 | <xerox_> | I forget >_< |
| 12:36:05 | <xerox_> | but I think I just kept on running cabal build after deleting dist-newstyle nothing else |
| 12:37:06 | × | jedws quits (~jedws@121.209.189.201) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 12:38:17 | <phaazon> | yep, well, it doesn’t work on my side |
| 12:38:47 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 12:39:08 | <__monty__> | Maybe install has different behavior? |
| 12:40:18 | × | Guest87408 quits (~textual@2603-7000-3040-0000-05ee-0552-d472-c8f7.res6.spectrum.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 12:40:45 | <phaazon> | how do people do this kind of things most of the time? |
| 12:41:03 | → | safinaskar joins (6dfc5ba3@109-252-91-163.nat.spd-mgts.ru) |
| 12:41:17 | → | jedws joins (~jedws@121.209.189.201) |
| 12:41:26 | <phaazon> | in Rust, it’s super simple: you simply add a [patch] / [override] section in your config.toml to override the dependency everywhere in the build tree |
| 12:42:45 | × | ADG1089__ quits (~aditya@223.235.213.117) (Remote host closed the connection) |
| 12:42:50 | <xerox_> | that's what I *thought* this project file thing did |
| 12:43:02 | → | geekosaur joins (ac3a8b8b@172.58.139.139) |
| 12:43:03 | <phaazon> | well it seems it’s made for that |
| 12:43:11 | → | ADG1089__ joins (~aditya@223.235.213.117) |
| 12:43:17 | <phaazon> | but clearly it’s either not working properly, or the documentation misses something |
| 12:43:37 | <phaazon> | I tried lots of things: removing the dist-newstyle, cabal install --only-dependencies --reinstall --force-reinstalls |
| 12:43:42 | <phaazon> | lots of other similar command |
| 12:43:50 | <phaazon> | I still build pandoc from hackage and not from my fork |
| 12:44:29 | <xerox_> | do you depend directly on it or is it a dep of a dep |
| 12:44:50 | <phaazon> | direct dep |
| 12:45:20 | <phaazon> | https://github.com/phaazon/phaazon.net/blob/master/phaazon-net.cabal#L36 |
| 12:46:10 | <xerox_> | is it building something in that range or could it be building a dep of a dep that asks for a different one? I'm out of ideas |
| 12:46:35 | <phaazon> | it doesn’t do anything |
| 12:46:51 | <phaazon> | it just rebuild my app without seeing any change about the deps |
| 12:47:02 | × | tsrt^ quits (~hph@ip98-184-89-2.mc.at.cox.net) () |
| 12:47:09 | <phaazon> | I just added the packages: pkg-overrides/pandoc |
| 12:47:15 | <xerox_> | even if you don't have a dist-newstyle and ask it to build? |
| 12:47:17 | <phaazon> | and sym-linked pkg-overrides/pandoc to my ~/dev/pandoc |
| 12:47:21 | <phaazon> | yep |
| 12:47:34 | <phaazon> | it uses the globally installed pandoc, looks like |
| 12:47:41 | <xerox_> | hide it >:) |
| 12:48:10 | <phaazon> | I don’t even know where it is |
| 12:48:12 | → | vs^ joins (vs@ip98-184-89-2.mc.at.cox.net) |
| 12:48:39 | × | ADG1089__ quits (~aditya@223.235.213.117) (Remote host closed the connection) |
| 12:48:44 | <xerox_> | ghc-pkg --help |
| 12:49:16 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 12:49:44 | <phaazon> | I updated ghc |
| 12:49:52 | <phaazon> | cabal configure --reinstall now shows me lots of things |
| 12:50:04 | <xerox_> | love things! |
| 12:50:05 | <phaazon> | and I see pandoc, but it looks like there’s nothing indicating it’s from my pkg-overrides |
| 12:50:10 | <phaazon> | - pandoc-2.11.3.2 (exe:pandoc) (requires build) |
| 12:50:29 | <sm[m]> | maybe cabal exec -- ghc-pkg list is helpful |
| 12:50:35 | → | Saukk joins (~Saukk@83-148-239-3.dynamic.lounea.fi) |
| 12:50:37 | × | jedws quits (~jedws@121.209.189.201) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 12:51:25 | <phaazon> | /home/phaazon/.ghcup/ghc/8.8.4/lib/ghc-8.8.4/package.conf.d |
| 12:53:54 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 12:53:58 | <safinaskar> | how to do reversible parsing? not necessary in Haskell. i already searched Haskage and found some packages, but none of them guarantee reversible parsing. (I. e. you can easily fool this libraries.) There is project http://augeas.net/ for C language. It actually guarantee reversible parsing unlike hackage libs. But augeas doesn't handle arbitrary |
| 12:53:58 | <safinaskar> | context-free grammars. So, it seems, augeas will be unable to parse, say, Pascal. There is very good project for reversible parsing any language into xml https://www.brics.dk/xsugar.html . but it is in java (i interested in c, c++ and haskell). are there other solutions? |
| 12:55:15 | → | kyali joins (~kyali@APN-123-252-106-gprs.simobil.net) |
| 12:56:36 | ← | Eelis parts (~Eelis@unaffiliated/eelis) () |
| 12:56:52 | × | Entertainment quits (~entertain@104.246.132.210) () |
| 12:57:41 | → | Entertainment joins (~entertain@104.246.132.210) |
| 12:58:03 | × | philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Ping timeout: 240 seconds) |
| 12:58:07 | → | kam1 joins (~kam1@24.231.108.143) |
| 13:00:49 | → | ADG1089__ joins (~aditya@223.235.213.117) |
| 13:05:45 | → | b4er joins (~b4er@91.193.4.138) |
| 13:06:25 | → | Rey joins (uid478328@gateway/web/irccloud.com/x-iriinvqvnkeykojw) |
| 13:06:43 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 240 seconds) |
| 13:08:39 | → | jedws joins (~jedws@121.209.189.201) |
| 13:09:32 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 13:09:49 | × | kam1 quits (~kam1@24.231.108.143) (Ping timeout: 264 seconds) |
| 13:10:08 | × | ADG1089__ quits (~aditya@223.235.213.117) (Remote host closed the connection) |
| 13:11:33 | × | DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
| 13:11:57 | → | DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
| 13:12:55 | <Kronic> | If I have a string is there a method I'm not seeing to convert it to a member of Data.Word ? http://hackage.haskell.org/package/base-4.14.1.0/docs/src/GHC.Word.html#Word64 ? |
| 13:13:16 | <Clint> | a string of what? |
| 13:13:38 | <Kronic> | A string representation of a word - I guess I can just read it as one right? |
| 13:14:05 | <Clint> | using Read is one way |
| 13:14:45 | <Kronic> | Ah, yes, I should learn to use :i more - I was reading the source and it uses all of those weird macro looking things so it was hard for me to see that |
| 13:15:26 | → | ADG1089__ joins (~aditya@223.235.213.117) |
| 13:15:27 | <[exa]> | macro-looking things? |
| 13:16:00 | <Kronic> | data {-# CTYPE "HsWord8" #-} Word8 = W8# Word# |
| 13:16:06 | <Kronic> | For example, not sure how to read that |
| 13:18:41 | <[exa]> | yeah that's compiler-specific annotations and primitive types, not really interesting |
| 13:19:12 | <[exa]> | the {-#....#-} is a special comment used for compiler pragmas, and the types with # are just "special" in some way that I don't remember |
| 13:19:24 | <geekosaur> | unboxed |
| 13:19:53 | <[exa]> | oh thanks |
| 13:20:07 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:20:29 | <[exa]> | Kronic: to your original question, how would you convert a String (which is a list of characters) to Word64 (which is a fixed-size integer)? |
| 13:21:12 | <[exa]> | more precisely, what should it do with a string like "fooooooooo" ? |
| 13:22:10 | → | son0p joins (~son0p@181.136.122.143) |
| 13:22:20 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 13:22:48 | <Kronic> | I'm using it in a parser, so it's something that will fail some of the time |
| 13:22:58 | <Kronic> | So, no worries on that note. I have what I need now anyway |
| 13:23:10 | <Kronic> | I was just a little lost inside that haskell file, never seen much of the stuff in there before |
| 13:23:48 | <geekosaur> | you don't care about it, it's internal implementation details |
| 13:24:13 | × | ezzieyguywuf quits (~Unknown@unaffiliated/ezzieyguywuf) (Ping timeout: 264 seconds) |
| 13:24:32 | × | kyali quits (~kyali@APN-123-252-106-gprs.simobil.net) (Quit: leaving) |
| 13:24:56 | → | kyali joins (~kyali@APN-123-252-106-gprs.simobil.net) |
| 13:25:17 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 13:25:23 | <[exa]> | Kronic: ooh you wanted to parse it, I got confused by the "convert" :] |
| 13:25:24 | <Rey> | Huh |
| 13:25:34 | × | Franciman quits (~francesco@host-95-250-152-231.retail.telecomitalia.it) (Quit: Leaving) |
| 13:26:33 | <Kronic> | Yea, I should really be more specific in future, sorry [exa] |
| 13:27:59 | × | ADG1089__ quits (~aditya@223.235.213.117) (Remote host closed the connection) |
| 13:28:27 | → | ADG1089__ joins (~aditya@223.235.213.117) |
| 13:28:33 | × | Rey quits (uid478328@gateway/web/irccloud.com/x-iriinvqvnkeykojw) (Quit: Updating details, brb) |
| 13:28:48 | → | Goldio joins (uid478328@gateway/web/irccloud.com/x-qxzjoosyubzfyxzm) |
| 13:30:26 | × | kyali quits (~kyali@APN-123-252-106-gprs.simobil.net) (Quit: leaving) |
| 13:30:28 | × | b4er quits (~b4er@91.193.4.138) (Remote host closed the connection) |
| 13:30:32 | × | larsan1 quits (~larsan@217.146.82.202) (Remote host closed the connection) |
| 13:34:04 | × | jedws quits (~jedws@121.209.189.201) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:34:53 | <itai33[m]> | how does one load extra modules from within `cabal repl`? |
| 13:35:06 | <itai33[m]> | if i try `:l Foo.hs` then it replaces the loaded stuff |
| 13:35:46 | → | Seran1 joins (~Seran@178.162.204.214) |
| 13:36:49 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Remote host closed the connection) |
| 13:38:16 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 13:38:24 | → | Tops2 joins (~Tobias@dyndsl-095-033-022-018.ewe-ip-backbone.de) |
| 13:39:17 | → | b4er joins (~b4er@91.193.4.138) |
| 13:41:15 | × | Entertainment quits (~entertain@104.246.132.210) () |
| 13:41:26 | → | Entertainment joins (~entertain@104.246.132.210) |
| 13:43:18 | × | b4er quits (~b4er@91.193.4.138) (Client Quit) |
| 13:43:31 | → | b4er joins (~b4er@91.193.4.138) |
| 13:43:34 | <Kronic> | I've never used cabal repl but I do use ghci, and in ghci it's :m <module name> |
| 13:44:26 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 13:45:03 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) |
| 13:45:08 | <Uniaika> | itai33[m]: yes, it is indeed unfortuante. Do you wish to "load" them, or merely import them? |
| 13:45:15 | <Uniaika> | *unfortunate |
| 13:45:28 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) |
| 13:46:24 | <itai33[m]> | Uniaika: I'm not sure what the difference is. My specific usecase is that i want to manually run some of the tests in a library to understand them better, so i need to do `cabal repl` and then also load some of the helper functions defined in `test/Foo.hs` |
| 13:47:14 | <Uniaika> | 'cabal repl' will load (compile+import in your repl) the modules of a Cabal project |
| 13:47:27 | <Uniaika> | might even import them in the current scope |
| 13:47:30 | <itai33[m]> | right but it doesn't load the test modules |
| 13:47:52 | → | Alleria joins (~textual@mskresolve-a.mskcc.org) |
| 13:47:54 | <itai33[m]> | unless i do `cabal repl test` and then it doesn't load the regular modules |
| 13:48:16 | Alleria | is now known as Guest84404 |
| 13:48:26 | → | jmchael joins (~jmchael@81.174.205.210) |
| 13:49:12 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Ping timeout: 260 seconds) |
| 13:49:16 | × | ADG1089__ quits (~aditya@223.235.213.117) (Quit: Konversation terminated!) |
| 13:51:37 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:53:18 | → | chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
| 13:56:06 | × | Entertainment quits (~entertain@104.246.132.210) (Ping timeout: 256 seconds) |
| 13:58:16 | <Uniaika> | itai33[m]: Indeed, that's a problem. You can work around that by re-exporting the library modules from your test suite |
| 13:58:49 | <tomsmeding> | itai33[m]: ghci can only load one package at the foreground at a time |
| 13:59:14 | <tomsmeding> | you can't have modules from a library and a test suite, which are two different packages from ghc's perspective, in ghci at the same time |
| 13:59:39 | <tomsmeding> | at least, if that is possible, I would very much like to know how :p |
| 13:59:41 | → | sunrise joins (~sunrise@51.194.80.91) |
| 14:02:00 | <itai33[m]> | Uniaika: when you say re-export, do you mean copy paste them into e.g. `src/` and use the functions from there, or is there a better way to do that? |
| 14:03:09 | <Uniaika> | itai33[m]: have your testsuite depend on your library (which you normally do, if you're testing the lib :P), and then in your testsuite's Main module |
| 14:03:13 | <Uniaika> | import MyLib |
| 14:03:21 | <Uniaika> | and have 'module MyLib' in its export list |
| 14:04:17 | <itai33[m]> | i see |
| 14:04:45 | <itai33[m]> | thanks Uniaika and tomsmeding |
| 14:05:00 | <Uniaika> | thank me when you've fixed your problem :P |
| 14:08:36 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 14:11:04 | <sm[m]> | g'day all, happy 2021 |
| 14:11:26 | <sm[m]> | has anyone got a quick trick for seeing changes to exports in git commit(s) ? |
| 14:12:27 | <Uniaika> | sm[m]: curse you, I'm trying you regexes as we speak :( |
| 14:12:32 | <Uniaika> | *trying out |
| 14:12:34 | <Uniaika> | grr |
| 14:12:36 | <Uniaika> | bad fingers |
| 14:15:43 | <sm[m]> | thanks Uniaika . git diff master..thebranch | grep :: shows promise |
| 14:16:15 | <sm[m]> | to see api changes, which is really what I mean |
| 14:16:44 | <sm[m]> | I mean, I'd like to be able to see both of these things |
| 14:18:07 | <sm[m]> | hmm, but exports changes would be better. I mostly declare exports and there are lots of changes to internal helpers which I don't care about |
| 14:20:39 | <tomsmeding> | sm[m]: git diff -U10000 | sed '/LANGUAGE/d; /^diff/,/where$/!d' |
| 14:20:59 | <tomsmeding> | hacks abound though |
| 14:21:22 | <tomsmeding> | also assumes that your export list doesn't contain a comment including the word 'where' :D |
| 14:22:22 | <tomsmeding> | also happy 2021! |
| 14:22:56 | <Uniaika> | happy 2021 tomsmeding and sm[m] :) |
| 14:24:05 | × | jrqc quits (~rofl@96.78.87.197) (Read error: Connection reset by peer) |
| 14:24:31 | <juri_> | bah, humbug. :) |
| 14:25:47 | → | halbGefressen joins (~halbGefre@2a02:810d:f40:2a9c:a4fe:2adc:248b:466f) |
| 14:26:05 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 14:27:55 | <halbGefressen> | Let's say I have two finite lists xs :: [a] and ys :: [b], each with distinct elements. How would I create a list of all surjective functions a -> b from those two lists? |
| 14:28:19 | → | Lycurgus joins (~niemand@cpe-45-46-139-165.buffalo.res.rr.com) |
| 14:29:42 | × | Saukk quits (~Saukk@83-148-239-3.dynamic.lounea.fi) (Remote host closed the connection) |
| 14:33:39 | <sm[m]> | oh.. and of course, changes in exports list doesn't show changes of type signature. I need both additiona/removals/renames, and type changes |
| 14:33:51 | <sm[m]> | I guess this isn't going to be a quick text job |
| 14:34:08 | → | frankdmartinez joins (~frankdmar@138.199.52.27) |
| 14:36:19 | <__monty__> | halbGefressen: Something like zip the shorter list with all the combinations of 1 to minLength of the other list? |
| 14:38:26 | <halbGefressen> | sounds good, I'll try that |
| 14:38:32 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 14:39:04 | <__monty__> | halbGefressen: I do wonder what you need those for though? |
| 14:39:47 | <halbGefressen> | It's a uni homework, bonus exercise. I already have the coin for that sheet, but I need my sweet little 100% flex |
| 14:39:58 | <halbGefressen> | and also I want to know the solution haha |
| 14:40:18 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 14:40:32 | <__monty__> | Ah, darn. Should've realised this sounds like homework. |
| 14:42:55 | × | geekosaur quits (ac3a8b8b@172.58.139.139) (Remote host closed the connection) |
| 14:43:32 | → | worc3131 joins (~quassel@2a02:c7f:dcc4:6500:cf0e:3346:8766:ab20) |
| 14:45:08 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 14:46:17 | × | halbGefressen quits (~halbGefre@2a02:810d:f40:2a9c:a4fe:2adc:248b:466f) (Quit: halbGefressen) |
| 14:47:29 | → | ezzieyguywuf joins (~Unknown@unaffiliated/ezzieyguywuf) |
| 14:49:14 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) (Ping timeout: 264 seconds) |
| 14:49:55 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Ping timeout: 268 seconds) |
| 14:51:52 | → | sparsity joins (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) |
| 14:52:04 | <__monty__> | Ah, I made a mistake anyway because surjection isn't symmetric. |
| 14:54:05 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 14:54:07 | <sm[m]> | https://github.com/blitzcode/hackage-diff seems to be what I want, if I can prepare the inputs it wants |
| 14:54:59 | <sm[m]> | doesn't build; drat |
| 15:02:06 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 15:07:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 15:07:46 | → | juuandyy joins (~juuandyy@90.166.144.65) |
| 15:10:44 | → | ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta) |
| 15:13:01 | → | jitwit joins (~user@bras-base-mtrlpq4381w-grc-34-174-93-238-71.dsl.bell.ca) |
| 15:15:11 | <ezzieyguywuf> | sm[m]: last commit was years ago, you can probably tweak some version bounds to make it work |
| 15:15:42 | <sm[m]> | thanks ezzieyguywuf, I pinged the issue tracker |
| 15:16:39 | <ezzieyguywuf> | good luck! |
| 15:17:11 | <ezzieyguywuf> | with stack too ypu may be able to just use a super old snapshot or whatever |
| 15:17:27 | <sm[m]> | you're right |
| 15:17:45 | <ezzieyguywuf> | i thought it was kind of the point of stack, "if builds now, it ahould always build" |
| 15:18:20 | <__monty__> | If it has proper bounds you can always build it with cabal too. |
| 15:18:37 | <sm[m]> | it is. But you have to be motivated enough (to reinstall an old ghc version and rebuild the world) |
| 15:18:53 | <sm[m]> | and this package might even build with cabal right now, I haven't tried |
| 15:19:00 | <__monty__> | Stack only hides the "getting an old ghc version" part. |
| 15:19:03 | <sm[m]> | I simply reported the bug and moved on |
| 15:20:11 | <sm[m]> | getting an old ghc version is still costly even with stack (takes ages and 2G of disk) |
| 15:20:46 | → | DavidEichmann joins (~david@98.27.93.209.dyn.plus.net) |
| 15:21:05 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) |
| 15:21:15 | <sm[m]> | with luck https://github.com/blitzcode/hackage-diff/issues/13 will reawaken |
| 15:21:45 | <__monty__> | Yes. All I said was cabal builds old packages just as stack does, stack doesn't add any longevity magic. |
| 15:21:52 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 15:22:56 | → | fendor_ joins (~fendor@178.115.129.22.wireless.dyn.drei.com) |
| 15:23:05 | <sm[m]> | not usuall true __monty__. If you set up cabal to mimic stack (using a freeze file or whatever), then perhaps |
| 15:23:38 | <__monty__> | Like I said, if the bounds are setup properyl. |
| 15:23:41 | <__monty__> | *properly |
| 15:23:45 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 15:24:21 | <sm[m]> | ie, the main "magic" stack adds is a stable install plan that's fixed for all time. Normal cabal bounds only set a range of versions, and cabal-install is free to pick any dep versions within those ranges at any time |
| 15:25:27 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) (Ping timeout: 260 seconds) |
| 15:25:32 | × | fendor quits (~fendor@77.119.129.8.wireless.dyn.drei.com) (Ping timeout: 265 seconds) |
| 15:25:45 | <__monty__> | I'm not saying it doesn't. All I meant is that it's not as if old versions are removed from hackage so with proper bounds old things build fine. |
| 15:25:50 | → | sacereda joins (~user@124.red-88-16-15.dynamicip.rima-tde.net) |
| 15:26:20 | → | pera joins (~pera@unaffiliated/pera) |
| 15:26:52 | <yushyin> | afaik you can pin the index state with cabal |
| 15:27:04 | <sm[m]> | __monty__: when you say "proper bounds", if you mean "lock down the ghc version and every package version", then I agree with you |
| 15:27:30 | <yushyin> | and so have the same install-plan every time |
| 15:27:33 | <sm[m]> | (we'll ignore externals like C library versions) |
| 15:27:51 | <__monty__> | I don't mean lock down to single versions like stackage does, no. |
| 15:28:03 | <sm[m]> | then you don't have a reliable build plan |
| 15:28:19 | <sm[m]> | it'll work almost all the time.. until it doesn't |
| 15:28:24 | <__monty__> | Well, you do as soon as you time rolls past your upper bounds. |
| 15:28:32 | <__monty__> | s/you// |
| 15:28:34 | <yushyin> | https://cabal.readthedocs.io/en/3.4/cabal-project.html#cfg-field-index-state |
| 15:29:33 | <__monty__> | Proper bounds means any combination cabal selects that satisfies the constraints works. Good approximations thereof are acceptable. |
| 15:29:44 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 15:35:21 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 15:35:35 | × | sparsity quits (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Quit: Connection closed) |
| 15:37:12 | × | zangi quits (~azure@103.154.230.250) (Ping timeout: 256 seconds) |
| 15:37:40 | → | zangi joins (~azure@36.79.200.71) |
| 15:37:51 | → | Sheilong joins (uid293653@gateway/web/irccloud.com/x-tmfywdizfrmonpis) |
| 15:39:34 | × | pera quits (~pera@unaffiliated/pera) (Quit: leaving) |
| 15:41:28 | × | sacereda quits (~user@124.red-88-16-15.dynamicip.rima-tde.net) (Quit: ERC (IRC client for Emacs 27.1)) |
| 15:42:10 | → | shf joins (~sheaf@2a01:cb19:80cc:7e00:d481:af4c:bf9f:f9c) |
| 15:43:23 | × | frankdmartinez quits (~frankdmar@138.199.52.27) (Quit: frankdmartinez) |
| 15:45:52 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 15:46:38 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) |
| 15:48:32 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 256 seconds) |
| 15:50:06 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 15:50:17 | → | Franciman joins (~francesco@host-95-250-152-231.retail.telecomitalia.it) |
| 15:51:02 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Ping timeout: 264 seconds) |
| 15:51:18 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) (Ping timeout: 258 seconds) |
| 15:51:52 | → | halbGefressen joins (~halbGefre@ipbcc14379.dynamic.kabel-deutschland.de) |
| 15:58:54 | × | halbGefressen quits (~halbGefre@ipbcc14379.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 15:59:03 | → | halbGefressen joins (~halbGefre@2a02:810d:f40:2a9c:a4fe:2adc:248b:466f) |
| 15:59:54 | → | Entertainment joins (~entertain@104.246.132.210) |
| 16:00:33 | × | halbGefressen quits (~halbGefre@2a02:810d:f40:2a9c:a4fe:2adc:248b:466f) (Client Quit) |
| 16:00:43 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 16:00:48 | × | unlink2 quits (~unlink2@p200300ebcf259600e4593ff5d42812d3.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 16:02:52 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) |
| 16:02:55 | → | unlink2 joins (~unlink2@p200300ebcf259600e4593ff5d42812d3.dip0.t-ipconnect.de) |
| 16:06:19 | × | hiroaki quits (~hiroaki@2a02:908:4b18:8c40::1d01) (Ping timeout: 272 seconds) |
| 16:06:42 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 16:08:43 | → | halbGefressen joins (~halbGefre@ipbcc14379.dynamic.kabel-deutschland.de) |
| 16:09:08 | → | dfeuer joins (~dfeuer@pool-108-18-223-60.washdc.fios.verizon.net) |
| 16:09:50 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 16:11:01 | × | ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 264 seconds) |
| 16:13:04 | × | halbGefressen quits (~halbGefre@ipbcc14379.dynamic.kabel-deutschland.de) (Client Quit) |
| 16:15:56 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:cde2:1e79:768c:58ea) |
| 16:15:56 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 16:18:26 | → | hiroaki joins (~hiroaki@2a02:908:4b18:8c40::4b02) |
| 16:18:54 | → | Tario joins (~Tario@201.192.165.173) |
| 16:23:31 | × | juuandyy quits (~juuandyy@90.166.144.65) (Ping timeout: 256 seconds) |
| 16:27:04 | × | TMA quits (tma@twin.jikos.cz) (Ping timeout: 256 seconds) |
| 16:28:25 | × | Entertainment quits (~entertain@104.246.132.210) (Ping timeout: 264 seconds) |
| 16:28:53 | → | Entertainment joins (~entertain@104.246.132.210) |
| 16:33:25 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 246 seconds) |
| 16:33:45 | → | juuandyy joins (~juuandyy@90.166.144.65) |
| 16:38:47 | → | geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 16:39:18 | <shinobi> | Shiranai, monochrom: Thanks for the link to the fp course material. Exactly what I need! |
| 16:40:25 | × | dfeuer quits (~dfeuer@pool-108-18-223-60.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 16:40:34 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:143:c475:d20e:3db4:7e5b) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 16:40:48 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:41:11 | → | kam1 joins (~kam1@24.231.108.143) |
| 16:41:34 | <ij> | Can I have mutable sets within pure code via ST? I'm looking to traverse and store visited elements in a set |
| 16:42:30 | <ij> | Sorry, STM |
| 16:43:49 | <shinobi> | What is the difference between: Num a => a -> a and Num (a -> a) ? |
| 16:45:05 | <tomsmeding> | shinobi: 'Num a => a -> a' is a type that denotes a function from type 'a' to type 'a', with the constraint that 'a' must be numeric |
| 16:45:19 | <ij> | shinobi, Num (a -> a) is a probably a type constraint which requires a -> a to be a numeric value, which it isn't, so that probably indicates a programming error |
| 16:45:23 | <tomsmeding> | 'Num (a -> a)' is a constraint, not a type, specifying that the type 'a -> a' must be numeric |
| 16:45:33 | → | FreeBirdLjj joins (~freebirdl@101.87.175.26) |
| 16:45:40 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 16:45:42 | <tomsmeding> | (unless you're talking about a different Num than is defined in the Prelude) |
| 16:46:05 | <[exa]> | ij: there is no notion of "action happens after another action" in pure code, you need to pull the STM through to get the action ordering |
| 16:46:22 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 246 seconds) |
| 16:47:10 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 16:47:43 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) (Remote host closed the connection) |
| 16:47:58 | <ij> | ah, ok. you can only run it through atomically, which returns an IO |
| 16:48:01 | <[exa]> | shinobi: a constructive example, function (+1) is of type `Num a => a -> a` because it works on all numeric a's, for example it can be Int->Int. The second would require that all 1param functions can act as numbers, e.g. you'd be able to do `f+f` if `f` was of type `Num (a->a) => a->a` |
| 16:48:06 | → | geekosaur joins (ac3a8f5d@172.58.143.93) |
| 16:48:14 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) |
| 16:48:34 | <[exa]> | ij: runST ? |
| 16:49:05 | → | hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 16:49:16 | <bartholin> | how do I save png pictures? (preferably in sdl) |
| 16:50:02 | × | FreeBirdLjj quits (~freebirdl@101.87.175.26) (Ping timeout: 260 seconds) |
| 16:51:02 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 16:51:03 | × | hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds) |
| 16:51:38 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Ping timeout: 264 seconds) |
| 16:51:52 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) (Remote host closed the connection) |
| 16:52:04 | <[exa]> | bartholin: very likely the most painless way will be using JuicyPixels |
| 16:52:06 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) |
| 16:52:11 | <bitmapper> | hmm |
| 16:53:28 | × | Guest84404 quits (~textual@mskresolve-a.mskcc.org) (Ping timeout: 256 seconds) |
| 16:53:29 | <[exa]> | (well at least I can't find any SDL_image wrap for haskell... perhaps there may be other ways) |
| 16:54:15 | <shinobi> | [exa] So does Num (a->a) mean (a -> Num)? |
| 16:54:37 | <shinobi> | :t (+3) $ (*100) |
| 16:54:38 | <lambdabot> | (Num a, Num (a -> a)) => a -> a |
| 16:54:51 | <[exa]> | shinobi: no, it means that (a->a) is a thing that behaves like numbers, i.e. has + and * |
| 16:55:04 | <geekosaur> | Num (a -> a) means you've somehow claimed that functions can be numbers |
| 16:55:05 | <[exa]> | shinobi: your example is, after some rewriting: 3+(*100) |
| 16:55:48 | <shinobi> | Yes, I'm just confused by the type |
| 16:55:51 | <[exa]> | shinobi: addition of (*100) to 3 triggers that the function needs to have the "numeric interface" |
| 16:56:03 | <shinobi> | I would have thought it to be Num a->a |
| 16:56:16 | <[exa]> | shinobi: anyway perhaps you meant `(+3) . (*100)` ? |
| 16:56:47 | <shinobi> | [exa] Yes, I thougth that applying a function to another function would compose them |
| 16:57:04 | <[exa]> | one takeaway is that you'll usually get a constraint like `Num (x->y)` when you accidentally try to add functions not numbers :] |
| 16:57:04 | <shinobi> | But + expects a num |
| 16:57:30 | <dminuoso> | What is „num“ |
| 16:58:22 | <dminuoso> | % :t 1 |
| 16:58:22 | <yahb> | dminuoso: Num p => p |
| 16:58:30 | <shinobi> | I think I see it now... The +3 exepcts a number and thus he passed fuction must have the number interface. |
| 16:58:48 | <dminuoso> | shinobi: Roughly the intuition is this: |
| 16:58:53 | <dminuoso> | % :t (+) |
| 16:58:53 | <yahb> | dminuoso: Num a => a -> a -> a |
| 16:59:33 | <shinobi> | So you can't compose by shoving a function as the input to a function even if the return type of the first matches the input type of the second. |
| 16:59:40 | <dminuoso> | For a polymorphic value, like (+), the caller/user/consumer has the obligation to pick a type for every type variable. You can choose anything you want, really. |
| 16:59:55 | <dminuoso> | Under the constraint that your choice has an instance Num |
| 17:00:43 | <dminuoso> | Choosing (Int -> String) for a above is fine by itself, it just causes GHC to check whether an instance Num exists for that choice. |
| 17:00:56 | × | Entertainment quits (~entertain@104.246.132.210) (Ping timeout: 240 seconds) |
| 17:01:20 | <[exa]> | shinobi: the "+ expects a num" is what a less flexible language would tell you as an error; in Haskell it just expects that functions can be in Num (which will likely fail later...or you just supply the instance for numeric-like functions) |
| 17:01:37 | × | Goldio quits (uid478328@gateway/web/irccloud.com/x-qxzjoosyubzfyxzm) (Quit: Connection closed for inactivity) |
| 17:01:42 | × | Seran1 quits (~Seran@178.162.204.214) (Remote host closed the connection) |
| 17:01:46 | <dminuoso> | Note, the type class/polymorphism mechanism isn’t specialized to numbers. It’s a generic overloading feature. |
| 17:02:38 | → | solonarv joins (~solonarv@astrasbourg-653-1-252-231.w92-161.abo.wanadoo.fr) |
| 17:02:42 | × | DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
| 17:02:53 | <[exa]> | _how_ precisely would you like to compose the functions though? Perhaps you want `(+) <$> (+3) <*> (*100)` ? :] |
| 17:03:02 | → | DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
| 17:04:51 | <shinobi> | I'm just learning about applicatives and was trying to see if I understand them. The example you give with addition makes sense to me. It was when I changed the + to . that I went sideways |
| 17:05:05 | <shinobi> | [exa] ^ |
| 17:06:59 | <shinobi> | The applicative is (->) r and thought I should be able to compose those functions with (.) <$> (+3) <*> (*100) |
| 17:07:03 | → | ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta) |
| 17:08:31 | <[exa]> | shinobi: that doesn't make much semantic sense though |
| 17:08:44 | <shinobi> | that's what I'm trying to work through |
| 17:08:48 | <[exa]> | what result would you expect if the composed function receives 1 ? |
| 17:10:00 | <shinobi> | Either 400 or 103 depending on order of operations. (Which is what led to this whole rabbit hole) |
| 17:10:10 | <[exa]> | oh okay, you just want a normal . |
| 17:10:40 | <[exa]> | > let f = (+3) . (*100) in f 1 |
| 17:10:42 | <lambdabot> | 103 |
| 17:11:03 | <shinobi> | I'm trying to figure out how Haskell interprets <$> and <*> on (->) r |
| 17:11:22 | <dminuoso> | Look at their respective implementations in the type classes Functor and Applicative |
| 17:11:31 | <dminuoso> | Or better yet, try to derive them yourself |
| 17:12:00 | <[exa]> | the ((->) r) instance is called a reader, basically imagine that everything has an extra same global "environment" parameter which gets supplied last. |
| 17:12:02 | <b4er> | (<$>) is (.) and (<*>) is S |
| 17:12:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:12:26 | → | halbGefressen joins (~halbGefre@ipbcc14379.dynamic.kabel-deutschland.de) |
| 17:13:08 | <b4er> | Wait, is it a coincidence: (<*>) is S and pure is K |
| 17:13:21 | <[exa]> | b4er: hardly a coincidence |
| 17:13:25 | <b4er> | So Applicative has S and K which are a complete basis |
| 17:13:46 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
| 17:14:10 | <[exa]> | gives a whole new meaning to applicative-style programming right? :D |
| 17:14:42 | <shinobi> | like a vector space basis? |
| 17:15:41 | <b4er> | No like a basis for the λ-calculus |
| 17:16:25 | <ski> | `I' is `ask' |
| 17:17:09 | × | halbGefressen quits (~halbGefre@ipbcc14379.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 17:17:23 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 240 seconds) |
| 17:17:29 | → | madjest47 joins (~Android@89-200-3-15.mobile.kpn.net) |
| 17:17:42 | <ski> | and `W' is `join'. what's `(=<<)' ? |
| 17:18:11 | ski | usually calls it "environment", rather than "input"/"reader" |
| 17:19:43 | → | chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
| 17:19:54 | × | madjestic quits (~Android@86-88-72-244.fixed.kpn.net) (Ping timeout: 272 seconds) |
| 17:19:59 | → | dandart joins (~Thunderbi@home.dandart.co.uk) |
| 17:20:53 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit) |
| 17:22:05 | → | r4d1x joins (~r4d1x@185.163.110.125) |
| 17:23:18 | → | rmk236 joins (~lcampos@2a02:908:3616:b100:5d3c:3ea2:9142:e850) |
| 17:25:13 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:cde2:1e79:768c:58ea) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 17:27:36 | × | madjest47 quits (~Android@89-200-3-15.mobile.kpn.net) (Read error: Connection reset by peer) |
| 17:29:38 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 17:30:07 | <ij> | I've always wanted to understand what's ski calculus about |
| 17:30:16 | → | mikail_ joins (~mikail@2a02:c7f:bced:2900:73ae:8683:c80c:23b5) |
| 17:30:24 | <tomsmeding> | so if S and K are <*> and pure from ((->) r), then what happens if you interpret a program in the SKI calculus with a different Applicative instance |
| 17:31:01 | <tomsmeding> | ij: point-free programming to the max |
| 17:31:46 | <tomsmeding> | hence lambdabot's tendency to use ((->) r) for point-free tricks :p |
| 17:32:09 | <ij> | should I just read the wikipedia page about it and I'll figure it out? |
| 17:32:44 | <tomsmeding> | I think so, yes |
| 17:33:08 | × | mikail_ quits (~mikail@2a02:c7f:bced:2900:73ae:8683:c80c:23b5) (Client Quit) |
| 17:33:41 | <ski> | not a calculus |
| 17:33:47 | × | rmk236 quits (~lcampos@2a02:908:3616:b100:5d3c:3ea2:9142:e850) (Quit: Leaving.) |
| 17:33:48 | → | nbloomf joins (~nbloomf@76.217.43.73) |
| 17:33:52 | × | dandart quits (~Thunderbi@home.dandart.co.uk) (Remote host closed the connection) |
| 17:34:04 | <ij> | what qualifies as a calculus? |
| 17:34:09 | → | dandart joins (~Thunderbi@home.dandart.co.uk) |
| 17:34:09 | <tomsmeding> | wikipedia calls it a calculus hence it is a calculus |
| 17:34:16 | <ski> | it should have bound variables, imho |
| 17:34:21 | <tomsmeding> | notwithstanding the fact that someone in #haskell is also named that |
| 17:34:42 | <tomsmeding> | ski: combinator calculus? |
| 17:34:59 | <ij> | S looks more like distribute not substitute |
| 17:35:01 | <ski> | (like the integral sign binding the integration variable. or the Leibniz derivative notation rebinding the variable wrt one is differentiating) |
| 17:35:03 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 240 seconds) |
| 17:35:23 | <ski> | ij,tomsmeding : <http://lambda-the-ultimate.org/node/533#comment-7712> |
| 17:35:43 | <ski> | ij : "substitute into an application" |
| 17:35:55 | <ij> | alright, suppose so |
| 17:36:38 | <ski> | ij : you might have fun reading "To Dissect a Mockingbird: A Graphical Notation for the Lambda Calculus with Animated Reduction" by David C. Keenan in 1996-08-27 - 2014-04-12 at <http://dkeenan.com/Lambda/> ? |
| 17:36:58 | <tomsmeding> | interesting |
| 17:37:05 | <nshepperd> | a calculus is anything which involves moving stones about |
| 17:37:16 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 17:38:05 | <MarcelineVQ> | is an algebra anything that involved moving pretend stones about? |
| 17:39:57 | <ij> | ski, horrible formatting, but the content is interesting |
| 17:40:03 | <nshepperd> | xD |
| 17:40:03 | → | notzmv joins (~user@unaffiliated/zmv) |
| 17:40:36 | <ij> | (the formatting fits expectations, however) |
| 17:40:38 | <nshepperd> | calculus : stones :: algebra : pictures of stones |
| 17:42:56 | × | juuandyy quits (~juuandyy@90.166.144.65) (Ping timeout: 240 seconds) |
| 17:44:40 | <ski> | ij : that's one of the pages from which i learned lambda-calculus and SKI combinators from |
| 17:45:10 | <ij> | nice |
| 17:46:24 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 17:47:53 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 17:48:38 | <ph88_> | is there some debug function that i can drop into pure code that just stops execution after its been hit x amount of times ? |
| 17:49:42 | <xerox_> | ph88_: the closest I can think of is adding an explicit counter and trace/traceShow/traceShowId it and ^C |
| 17:51:46 | <MarcelineVQ> | or making your own trace and using an ioref to count+die |
| 17:51:54 | <b4er> | :t \f -> (f (<*>)) pure |
| 17:51:55 | <lambdabot> | (Applicative f1, Applicative f2) => ((f1 (a1 -> b) -> f1 a1 -> f1 b) -> (a2 -> f2 a2) -> t) -> t |
| 17:52:33 | × | rowbee quits (~augh@theguntretort.com) (Quit: ZNC - https://znc.in) |
| 17:52:44 | <b4er> | :t let iota f = f (<*>) pure in iota iota |
| 17:52:46 | <lambdabot> | error: |
| 17:52:46 | <lambdabot> | • Occurs check: cannot construct the infinite type: |
| 17:52:46 | <lambdabot> | f0 ~ (->) (a -> f0 a) |
| 17:52:46 | → | rowbee joins (~augh@theguntretort.com) |
| 17:52:50 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Ping timeout: 264 seconds) |
| 17:52:50 | <b4er> | :( |
| 17:53:26 | → | rmk236 joins (~lcampos@2a02:908:3616:b100:ad41:f5e6:8b3a:bfc3) |
| 17:54:45 | × | p-core quits (~Thunderbi@koleje-wifi-0045.koleje.cuni.cz) (Ping timeout: 256 seconds) |
| 17:54:45 | <tomsmeding> | MarcelineVQ: have to take care that it doesn't get lifted out, so you'll have to give it a different argument each time, and prevent inlining (where "different" means "ghc can't prove it's the same") |
| 17:55:12 | <tomsmeding> | oh |
| 17:55:20 | <tomsmeding> | let it be semantically id |
| 17:55:23 | <tomsmeding> | thanks brain, that does work |
| 17:55:29 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 17:56:17 | <b4er> | Yeah, I was trying to build "Applicative" from a single combinator like iota can be used to express S and K |
| 17:56:20 | → | notzmv joins (~user@unaffiliated/zmv) |
| 17:56:54 | <tomsmeding> | will only work for the ((->) r) type, not for most (any?) other Applicative |
| 17:57:17 | <tomsmeding> | my hopeful suggestion 27 minutes ago made no sense I fear |
| 17:57:54 | → | carthia joins (~carthia@gateway/tor-sasl/carthia) |
| 17:58:49 | <b4er> | Wait, how do you get it to work for ((->)r) |
| 17:59:01 | → | Melanie joins (~Melanie@192-0-134-138.cpe.teksavvy.com) |
| 17:59:18 | <b4er> | :t let id = (\f -> f (<*>) const) (\f -> f (<*>) const) in id |
| 17:59:20 | <lambdabot> | error: |
| 17:59:20 | <lambdabot> | • Occurs check: cannot construct the infinite type: |
| 17:59:20 | <lambdabot> | b0 ~ a1 -> b0 -> a1 |
| 18:00:56 | → | sakirious joins (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) |
| 18:02:23 | → | Alleria joins (~textual@2603-7000-3040-0000-5d20-1671-5668-2bd6.res6.spectrum.com) |
| 18:02:40 | <ph88_> | MarcelineVQ, how can i check if that IOref already exists for when i call the function again ? |
| 18:02:47 | Alleria | is now known as Guest99171 |
| 18:03:51 | <dsal> | ph88_: What do you mean? You have the IOref or not. There's no unknown state. |
| 18:04:06 | <tomsmeding> | b4er: okay I think that doesn't work due to lack of impredicativity |
| 18:04:58 | <ph88_> | dsal, i wanted a function that stops executions after it has been hit x amount of times. MarcelineVQ suggested using IOref .. so i can create a new IOref on the first time this function gets called, but how do i know its the second time ? |
| 18:05:26 | <dsal> | ph88_: you have to hold the reference in some way. |
| 18:06:08 | → | jamm joins (~jamm@unaffiliated/jamm) |
| 18:06:13 | <c_wraith> | Is there a term for a relationship between a grammar and a data type where the data type can be constructed in ways the parser can't ever produce? |
| 18:06:33 | <b4er> | tomsmeding, possible. It'd not be a very useful thing anyway, SK(I) is only fun in the untyped setting |
| 18:06:51 | <b4er> | Or iota and friends for that matter |
| 18:07:22 | <hpc> | c_wraith: the type has invalid states? |
| 18:07:37 | <hpc> | that's the closest terminoligy i know of |
| 18:07:58 | <c_wraith> | hpc: not invalid - they have perfectly adequate meanings. Just not represented in the surface syntax. |
| 18:08:56 | × | oats quits (~hurr@durr/im/a/sheep) (Quit: until later, my friends) |
| 18:09:20 | → | oats joins (~hurr@durr/im/a/sheep) |
| 18:09:27 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 18:10:07 | <hpc> | unrepresented? |
| 18:10:33 | <hpc> | if you consider what's parsed to be a representation of the data |
| 18:10:36 | × | olligobber quits (~olligobbe@unaffiliated/olligobber) (Ping timeout: 240 seconds) |
| 18:11:04 | <MarcelineVQ> | ph88_: https://www.reddit.com/r/haskell/comments/ddse92/using_unsafeperformio_to_count_operations/ |
| 18:13:12 | × | DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
| 18:13:14 | <MarcelineVQ> | the 'counter' there is a common pattern of defining a top level IORef that's accessible at any time in the program, this can often comes up when people want unique id's and the like without needing to thread State and such |
| 18:13:54 | → | DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
| 18:16:01 | <ph88_> | oki thank you |
| 18:17:22 | <MarcelineVQ> | Allthough I'm not entirely certain it's safe for that exact purpose without knowing exactly what optomizations are happening/prevented, ghc is still mysterious to me :X A the very least you'll want {-# NOINLINE counter #-} and {-# NOINLINE mytrace #-} |
| 18:18:00 | <MarcelineVQ> | Where mytrace is the trace function you're defining |
| 18:18:27 | <MarcelineVQ> | it'd be a good idea to go over these once to see how they've set it up https://hackage.haskell.org/package/base-4.12.0.0/docs/src/Debug.Trace.html |
| 18:18:45 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:19:26 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 18:19:42 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 18:19:52 | <ph88_> | curious how that is not a baked in functionality |
| 18:20:42 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 18:21:28 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection) |
| 18:21:40 | → | notzmv joins (~user@unaffiliated/zmv) |
| 18:22:56 | <sm[m]> | Using unsafeperformio there means that code will never be thread-safe, right ? |
| 18:23:31 | → | Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 18:23:34 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 18:23:40 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 18:23:44 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 18:24:59 | <exarkun> | Failing to use Crypto.Hash.Types from cryptonite in my stack project even though cryptonite is in my dependencies list ... "it is a hidden module in the package ‘cryptonite-0.26’" |
| 18:25:04 | <exarkun> | What's up with "hidden modules"? |
| 18:25:21 | <sm[m]> | I have a similar need today - give up on a search after N recursions (across all branches) |
| 18:25:45 | × | jamm quits (~jamm@unaffiliated/jamm) (Ping timeout: 268 seconds) |
| 18:26:12 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) (Remote host closed the connection) |
| 18:26:15 | <sm[m]> | exarkun: you probably need to add it to package.yaml or the .cabal file somewhere |
| 18:26:51 | <exarkun> | It is in my package.yaml dependency list already. It is not a "hidden package" but a "hidden module". |
| 18:27:17 | <exarkun> | I can't find much online about this -- everyone seems freely interchanges "package" and "module" but it seems stack or ghc thinks they're different kinds of things |
| 18:27:18 | <sm[m]> | Oh, sorry |
| 18:27:37 | <sm[m]> | They are, module is a file essentially |
| 18:28:49 | <exarkun> | So ... a package doesn't have to make all of its modules public? Or something? |
| 18:29:08 | <sm[m]> | exarkun: correct. you can see on hackage what's public |
| 18:29:10 | <exarkun> | is this an indirect way of cryptonite saying "Crypto.Hash.Types is not for you" |
| 18:29:17 | <exarkun> | :/ |
| 18:29:21 | <sm[m]> | Yes |
| 18:29:36 | <exarkun> | So I can't implement my own hash algorithm that fits into cryptonite, because HashAlgorithm's internals aren't public |
| 18:29:41 | <exarkun> | now I'm sad |
| 18:31:36 | <exarkun> | Hm. Or cryptonite exposes it somewhere else public, like Crypto.Hash.IO, and I shouldn't have followed the source link and then tried to import it from the module where the source code lives |
| 18:31:49 | × | renzhi quits (~renzhi@modemcable070.17-177-173.mc.videotron.ca) (Ping timeout: 260 seconds) |
| 18:31:56 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:b1ad:809d:33ad:d747) |
| 18:33:39 | → | madjestic joins (~Android@86-88-72-244.fixed.kpn.net) |
| 18:35:13 | × | tabemann_ quits (~tabemann@2600:1700:7990:24e0:3ba2:fef5:1410:7dbb) (Remote host closed the connection) |
| 18:35:27 | → | tabemann_ joins (~tabemann@2600:1700:7990:24e0:10cb:8914:2144:7a48) |
| 18:36:26 | → | Entertainment joins (~entertain@104.246.132.210) |
| 18:37:39 | <tomsmeding> | exarkun: Crypto.Hash.Algorithms? |
| 18:41:20 | × | ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Read error: Connection reset by peer) |
| 18:41:23 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds) |
| 18:41:53 | → | superstar64 joins (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net) |
| 18:41:59 | → | ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta) |
| 18:42:11 | <superstar64> | is there a version of `Void` that takes a parameter? |
| 18:42:37 | × | thebnq quits (~bnq@herrokitty.com) (Ping timeout: 260 seconds) |
| 18:43:29 | <superstar64> | ahh wait, `Const Void` works |
| 18:44:12 | → | notzmv joins (~user@unaffiliated/zmv) |
| 18:44:40 | → | HenryCH joins (~henry@5.81.254.84.ftth.as8758.net) |
| 18:45:27 | <exarkun> | tomsmeding: does not export the whole class, as far as I can tell |
| 18:46:28 | <tomsmeding> | hah, you're right |
| 18:47:23 | <Melanie> | superstar64: also, Void1 from generic-lens-core |
| 18:47:32 | → | elliott_ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 18:47:57 | <Melanie> | but Const Void is probably just as well :D |
| 18:50:29 | × | rmk236 quits (~lcampos@2a02:908:3616:b100:ad41:f5e6:8b3a:bfc3) (Quit: Leaving.) |
| 18:50:56 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 240 seconds) |
| 18:51:53 | → | justsomeguy joins (~justsomeg@107-144-102-166.biz.spectrum.com) |
| 18:51:53 | × | justsomeguy quits (~justsomeg@107-144-102-166.biz.spectrum.com) (Changing host) |
| 18:51:53 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 18:52:06 | → | Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 18:52:33 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 256 seconds) |
| 18:53:16 | → | thebnq joins (~bnq@herrokitty.com) |
| 18:54:19 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 18:54:56 | Lord_of_Life_ | is now known as Lord_of_Life |
| 18:55:10 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:55:12 | <justsomeguy> | I'm writing a stack project that uses FlexibleInstances in one of the files, but if I include a language pragma directly in the file and do “stack build” I get an error. I only need this pragma for the one module. Do I need to specify this in package.yaml? What's the right way to do this? |
| 18:55:15 | → | jamm joins (~jamm@unaffiliated/jamm) |
| 18:55:31 | → | hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-pggmrnaelsyxiuyq) |
| 18:56:00 | <sm[m]> | justsomeguy: that normally works fine |
| 18:56:06 | <Uniaika> | justsomeguy: what is the error? |
| 18:56:12 | <Uniaika> | are you using the proper syntax for pragmas? |
| 18:56:50 | <geekosaur> | and is it before the module declaration? |
| 18:58:38 | <justsomeguy> | I'll link to a github repo and a pastebin of the error in a moment. Uploading... |
| 18:59:01 | × | dandart quits (~Thunderbi@home.dandart.co.uk) (Ping timeout: 264 seconds) |
| 18:59:31 | × | andi- quits (~andi-@NixOS/user/andi-) (Quit: WeeChat 2.8) |
| 19:00:02 | → | DTZUZU joins (~DTZUZU@205.ip-149-56-132.net) |
| 19:00:07 | × | jamm quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds) |
| 19:00:54 | <exarkun> | Some of HashAlgorithm's methods involve `Ptr (Digest a)` or `Ptr (Context a)` |
| 19:01:18 | <exarkun> | is there any way to work with the pointed-to value from Haskell (rather than a C library and FFI)? |
| 19:01:39 | <exarkun> | I don't see a Storable instance for Digest or Context |
| 19:03:25 | → | dandart joins (~Thunderbi@home.dandart.co.uk) |
| 19:03:36 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 19:04:14 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds) |
| 19:05:00 | <superstar64> | i remember seeing this trick, of having a lambda calculus without free variables, `data Term x = Variable x | Call (Term x) (Term x) | Lambda (Maybe x)` |
| 19:05:03 | <superstar64> | who came up with this? |
| 19:05:08 | → | andi- joins (~andi-@NixOS/user/andi-) |
| 19:05:40 | × | nbloomf quits (~nbloomf@76.217.43.73) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 19:05:40 | <dolio> | Nicolaas Govert de Bruijn. |
| 19:05:43 | × | xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 240 seconds) |
| 19:05:48 | <justsomeguy> | sm[m], Uniaika: You can find the error in error.txt. I was surprised that it wouldn't build. |
| 19:06:20 | <justsomeguy> | The file under consideration is src/Lib.hs, and I think the syntax is correct. |
| 19:06:35 | <exarkun> | seems like all of the hashes in cryptonite are implemented via FFI |
| 19:07:03 | <exarkun> | so maybe a haskell-implemented hash is still not possible |
| 19:07:10 | × | Jesin quits (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving) |
| 19:07:29 | <Uniaika> | justsomeguy: ping me when the repo is up! |
| 19:07:48 | <justsomeguy> | Uniaika: Here it is https://github.com/kingparra/logicgoats |
| 19:08:23 | → | xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar) |
| 19:08:28 | <sm[m]> | you didn't hear geekosaur's tip |
| 19:08:56 | <justsomeguy> | Ah, you're right. Thanks for pointing that out. I'll try that now. |
| 19:09:19 | × | ph88_ quits (~ph88@2a02:8109:9e00:7e5c:71b8:bbed:4abf:19c2) (Remote host closed the connection) |
| 19:09:31 | × | Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 246 seconds) |
| 19:09:45 | → | ph88_ joins (~ph88@ip5f5af6cd.dynamic.kabel-deutschland.de) |
| 19:12:40 | <tomsmeding> | superstar64: how does the data type you gave not have free variables? |
| 19:12:51 | tomsmeding | is stupid |
| 19:13:00 | <tomsmeding> | that's an interesting encoding of De Bruijn indices |
| 19:13:03 | <justsomeguy> | Hmm... It still doesn't build. I get the same error “Illegal instance declaration for ‘TooMany (Int, String)’ ... Use FlexibleInstances if you want to disable this.” |
| 19:13:04 | <superstar64> | if `a` is `Void`, then you can't construct variables |
| 19:13:26 | <superstar64> | but inside lambdas you can construct, `Maybe Void` |
| 19:13:36 | <tomsmeding> | yes I see, quite neat |
| 19:13:43 | <tomsmeding> | but yes, De Bruijn indices |
| 19:14:06 | <superstar64> | yea, i saw it on one of edward kmett's videos |
| 19:14:18 | <superstar64> | not sure where he got it from |
| 19:14:41 | <tomsmeding> | they are faaaaairly well known in certain areas of computer science |
| 19:14:56 | <MrMuffles[m]> | How is Maybe defined? Are some and none terms? |
| 19:15:00 | <tomsmeding> | it makes alpha-equivalence trivial :) |
| 19:15:13 | <tomsmeding> | MrMuffles[m]: data Maybe a = Nothing | Just a |
| 19:15:44 | <tomsmeding> | MrMuffles[m]: https://hackage.haskell.org/package/base-4.14.0.0/docs/src/GHC.Maybe.html |
| 19:15:59 | <MrMuffles[m]> | But in terms of the lambda calculus, what is nothing? |
| 19:16:20 | × | geekosaur quits (ac3a8f5d@172.58.143.93) (Ping timeout: 245 seconds) |
| 19:16:31 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) () |
| 19:16:46 | <tomsmeding> | these are De Bruijn indices (https://en.wikipedia.org/wiki/De_Bruijn_index), where 1 is Nothing, 2 is Just Nothing, 3 is Just (Just Nothing), etc |
| 19:17:02 | <tomsmeding> | these are of type Maybe Void, Maybe (Maybe Void), Maybe (Maybe (Maybe Void)), etc |
| 19:17:10 | <tomsmeding> | where a closed expression is of type Term Void |
| 19:17:43 | <tomsmeding> | assuming you're talking about superstar64's Term thing |
| 19:18:11 | → | rsoeldner_ joins (~rsoeldner@2a02:8108:973f:eb38:5b7:e16e:247:b5fe) |
| 19:19:01 | <tomsmeding> | the syntax under "Formal definition" on the wiki page even has the constructors in the same order as Term :) |
| 19:19:20 | → | benjamingr__ joins (uid23465@gateway/web/irccloud.com/x-jmrkejpitddinbuk) |
| 19:19:25 | × | kam1 quits (~kam1@24.231.108.143) (Ping timeout: 264 seconds) |
| 19:21:00 | <MrMuffles[m]> | Oh ok I think I see, so the Maybe is just the haskell way to encode de Bruijn indices. Need to understand them better |
| 19:22:06 | <rsoeldner_> | Someone using eglot with hls ? |
| 19:22:52 | <gentauro> | 20:13 < tomsmeding> that's an interesting encoding of De Bruijn indices |
| 19:22:56 | <gentauro> | what code? |
| 19:23:09 | <tomsmeding> | gentauro: https://ircbrowse.tomsmeding.com/browse/haskell?id=231924×tamp=1609614300#t1609614300 |
| 19:23:30 | <tomsmeding> | though that should be Lambda (Term (Maybe x)) |
| 19:24:12 | <b4er> | Wait, what's with the Maybe in that type? |
| 19:25:06 | <tomsmeding> | it's irregular recursion :) |
| 19:25:41 | <b4er> | If you use `Maybe (... Maybe Void)..)` should it not be a GADT? |
| 19:25:51 | <gentauro> | tomsmeding: why the `maybe` in `Lambda`? |
| 19:25:57 | <tomsmeding> | well this works and is not a GADT |
| 19:26:01 | <b4er> | I don't see how App works in this case |
| 19:26:06 | <tomsmeding> | gentauro: read Lambda (Term (Maybe x)), not Lambda (Maybe x) |
| 19:26:14 | <tomsmeding> | b4er: App? |
| 19:26:24 | <b4er> | s/App/Call |
| 19:26:45 | <gentauro> | 20:07 < exarkun> so maybe a haskell-implemented hash is still not possible |
| 19:26:52 | <gentauro> | exarkun: it is, but it's slower that the FFI |
| 19:27:02 | <gentauro> | if you want to write a paper, you might go for the `pure` version |
| 19:27:13 | <tomsmeding> | '\f. \x. f x' would be written Lambda (Lambda (Call (Variable (Just Nothing)) (Variable Nothing))) |
| 19:27:16 | <gentauro> | but if you need to `hash` million of strings, you might want to use the FFI |
| 19:27:39 | <tomsmeding> | if you understand de bruijn indices, that should enlighten :) |
| 19:27:48 | <gentauro> | 20:26 < tomsmeding> gentauro: read Lambda (Term (Maybe x)), not Lambda (Maybe x) |
| 19:27:51 | <gentauro> | got it |
| 19:28:05 | <b4er> | Ok, I'm not exactly sure what I was thinking, yeah |
| 19:29:35 | → | Goldio joins (uid478328@gateway/web/irccloud.com/x-nzbyntkcrovquvlb) |
| 19:29:37 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 19:30:11 | → | geekosaur joins (ac3a8f5d@172.58.143.93) |
| 19:30:40 | <superstar64> | i also remember it being possible to define a monad instance for term, but i can't remember what it does |
| 19:30:42 | <tomsmeding> | this models the untyped lambda calculus; if you want the typed lambda calculus, then you'll have to use a GADT with some kind of type-level list for the environment |
| 19:31:36 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:31:44 | → | kam1 joins (~kam1@24.231.108.143) |
| 19:33:39 | <b4er> | superstar64, substitution which is capture-avoiding iirc |
| 19:33:58 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 265 seconds) |
| 19:34:52 | <b4er> | This talk reminds me... I should still be reading *de Bruijn notation as a nested datatype* from y'day |
| 19:34:53 | × | Entertainment quits (~entertain@104.246.132.210) () |
| 19:35:03 | → | Entertainment joins (~entertain@104.246.132.210) |
| 19:35:08 | → | boxscape joins (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) |
| 19:35:21 | <boxscape> | which do you suppose is the more common abbreviation for a lambda abstraction, Abs or Lam? |
| 19:35:35 | <b4er> | Abs |
| 19:35:39 | <merijn> | b4er: Pedantic side-note: The proper capitalisation without a first name is De Bruijn :p |
| 19:35:47 | <boxscape> | okay |
| 19:36:41 | <b4er> | merijn, are you sure? I have the paper open and the title is that way :S |
| 19:36:59 | <b4er> | boxscape, it might depend on the demographic though. |
| 19:37:05 | <boxscape> | that makes sense |
| 19:37:14 | <merijn> | b4er: I'm on a quixotic quest to correct every computer scientist that keeps citing it as "de Bruijn" :p |
| 19:37:29 | <tomsmeding> | b4er: author of the paper is probably not Dutch |
| 19:37:36 | <gentauro> | merijn: is that some "Spanish heritage"? |
| 19:37:38 | <tomsmeding> | or perhaps they are, even Dutch people get this wrong :p |
| 19:37:42 | <gentauro> | the "De …" part? |
| 19:37:47 | <gentauro> | like "De la Vega"? |
| 19:37:50 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-mualtkqzycyradrx) |
| 19:37:54 | <__monty__> | Dutch capitalization rules for names are weird. |
| 19:37:57 | <tomsmeding> | I think it's French, but then both come from Latin :p |
| 19:37:58 | <merijn> | b4er: That's because in a "full" name like "N. de Bruijn" on papers it's lowercase, but in Dutch orthography first letters of names are always capitalised :p |
| 19:38:10 | → | Jesin joins (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) |
| 19:38:21 | × | rowbee quits (~augh@theguntretort.com) (Remote host closed the connection) |
| 19:38:29 | <merijn> | __monty__: They're perfectly consistent! It's not our fault you weird Flemish guys get confused! :p |
| 19:38:43 | <gentauro> | iirc my history lessons from school/highschool both Belgium and The Netherlands were under Spain for a long period right? |
| 19:38:49 | <gentauro> | so maybe something stook :) |
| 19:38:55 | <b4er> | merijn, do you have a Wikipedia account because there you'll need to change quite a few articles |
| 19:38:56 | <merijn> | gentauro: "de" is just "the" in Dutch :p |
| 19:39:02 | <gentauro> | merijn: xD |
| 19:39:20 | <merijn> | b4er: Oh, I know. Almost every non-Dutch computer scientist in programmaning languages gets it wrong :p |
| 19:39:23 | <b4er> | The whole list of "De Bruijn" people are all spelled "Xyz de Bruijn" |
| 19:39:26 | <boxscape> | so it's like "Nick the Brown" but "The Brown" without Nick? |
| 19:39:55 | <merijn> | boxscape: Pretty much |
| 19:39:58 | <boxscape> | I see |
| 19:40:10 | <exarkun> | gentauro: Let's say I'm prototyping something and I don't want to write any C yet |
| 19:40:41 | <merijn> | boxscape: In Flanders they tend to capitalise it always, so "Nick The Brown", in Dutch it's lowercase but the "first letter of names are capitalised" rule trumps that |
| 19:40:44 | <__monty__> | gentauro: While true, we never spoke Spanish, as opposed to French which was the fancy rich people language. In Flemish the "de" is only lowercase if it's part of a noble family name. |
| 19:40:51 | <boxscape> | okay |
| 19:40:51 | <gentauro> | exarkun: which hashes are you aiming at? |
| 19:41:22 | <gentauro> | iirc most modern processors have some instructions that normally FFI libs just call |
| 19:41:23 | <exarkun> | gentauro: SHA256d |
| 19:41:30 | <gentauro> | it's pretty diffucult to beat that … |
| 19:41:33 | <merijn> | boxscape: Incidentally you can see the Dutch early immigrants to the US from names like "van der Bilt" turning into "Vanderbilt" |
| 19:41:58 | <gentauro> | exarkun: and trust me, I tried ;) http://blog.stermon.com/articles/2018/08/10/haskell-safe-sha1-only-depending-on-prelude.html |
| 19:42:00 | <boxscape> | hm ok |
| 19:42:12 | gentauro | it's almost trivial to got from SHA-1 to SHA-2 ;) |
| 19:42:20 | <merijn> | This was your annual scheduled class on Dutch naming ;) |
| 19:42:42 | <boxscape> | I already look forward to 2022-01-02 |
| 19:42:43 | <b4er> | The Wikipedia article on De Bruijn indices is not even consistent :S |
| 19:42:53 | <merijn> | exarkun: cryptonite has implementations of basically every hash you know and a whole bunch you don't ;) |
| 19:43:00 | <gentauro> | exarkun: remember to use these test cases with your implementation -> https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/secure-hashing |
| 19:43:05 | <exarkun> | merijn: I didn't see sha256d |
| 19:43:06 | <tomsmeding> | b4er: lol true |
| 19:43:15 | <merijn> | exarkun: I'm pretty sure that's in there |
| 19:43:37 | <b4er> | Consistently get it wrong (x)or right, not both that's even worse imo |
| 19:43:44 | <merijn> | exarkun: https://hackage.haskell.org/package/cryptonite-0.27/docs/Crypto-Hash-Algorithms.html#t:SHA256 |
| 19:43:47 | <exarkun> | merijn: if you have a link that would be really helpful, thanks |
| 19:43:49 | <__monty__> | gentauro: Nitpick, base and the prelude aren't equivalent. |
| 19:44:00 | <gentauro> | exarkun: isn't `sha256d` just `sha256 . sha256`? |
| 19:44:09 | <exarkun> | merijn: That's SHA256. I was planning to use that for SHA256d, for sure. |
| 19:44:23 | <gentauro> | __monty__: good point ;) |
| 19:44:25 | <exarkun> | gentauro: It isn't "just" that but it's awfully cloes, sure |
| 19:44:28 | <exarkun> | close |
| 19:44:51 | <exarkun> | gentauro: `hash xs :: Digest SHA256d` would be a very convenient way to spell it |
| 19:44:58 | <merijn> | exarkun: ah, I missed that the d would be part of the name |
| 19:45:14 | <exarkun> | gentauro: instead of breaking the pattern and needing two codepaths to support "any other hash" and "sha256d". |
| 19:45:47 | <merijn> | exarkun: If you have an existing C FFI it should be fairly trivial to implement your own bindings that work with that API |
| 19:45:49 | <exarkun> | Also half the point is just to help me learn more stuff about haskell. Getting as far as I did so far, I used `forall` for the first time, which was a useful end in itself. |
| 19:45:56 | × | ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 19:45:56 | <exarkun> | merijn: I don't |
| 19:46:10 | <exarkun> | merijn: but I have cryptonite's sha256 |
| 19:46:41 | <exarkun> | But I don't see how to implement hashInternalFinalize from Haskell |
| 19:46:58 | <exarkun> | because I can't take the (Digest SHA256) out of the (Ptr (Digest SHA256) |
| 19:47:00 | <exarkun> | ) |
| 19:47:05 | <merijn> | Sure you can |
| 19:47:13 | <merijn> | Well, maybe |
| 19:47:17 | <merijn> | is Digest Storable? |
| 19:47:24 | <exarkun> | ghc tells me no. |
| 19:47:36 | <exarkun> | I naively tried peek and poke already |
| 19:47:38 | <merijn> | hmm, it's not |
| 19:48:47 | <tomsmeding> | ByteArrayAccess seems to allow reading the thing with arbitrary type punning? |
| 19:48:59 | <merijn> | tomsmeding: You need a Digest for that |
| 19:49:04 | <merijn> | Not a Ptr to a Digest |
| 19:49:18 | <tomsmeding> | that's the third time I fuck up today |
| 19:49:34 | <exarkun> | tomsmeding: Only third? What is it, 1am there? |
| 19:49:40 | → | ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta) |
| 19:49:42 | <exarkun> | otherwise I'm envious |
| 19:49:50 | <tomsmeding> | 20:49, I'm Dutch ;) |
| 19:50:03 | <tomsmeding> | but with "third time" I meant in this channel |
| 19:52:06 | → | Hamid joins (907a6cf6@907a6cf6.drm.metu.edu.tr) |
| 19:52:17 | <Hamid> | Hello |
| 19:52:30 | Hamid | is now known as Guest91844 |
| 19:52:33 | <boxscape> | hi |
| 19:52:57 | <Guest91844> | Can you recommend me a nice and friendly IDE for haskell? |
| 19:53:02 | → | p-core joins (~Thunderbi@koleje-wifi-0045.koleje.cuni.cz) |
| 19:54:03 | <boxscape> | as far as I know the most friendly setup is VSCode + Haskell Language server, but I haven't tried it myself https://medium.com/@dogwith1eye/setting-up-haskell-in-vs-code-with-stack-and-the-ide-engine-81d49eda3ecf |
| 19:54:06 | × | Guest91844 quits (907a6cf6@907a6cf6.drm.metu.edu.tr) (Remote host closed the connection) |
| 19:54:18 | <tomsmeding> | heh |
| 19:57:28 | × | Entertainment quits (~entertain@104.246.132.210) (Ping timeout: 246 seconds) |
| 19:59:07 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Read error: Connection reset by peer) |
| 19:59:40 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 20:00:59 | → | rowbee joins (~augh@theguntretort.com) |
| 20:01:27 | × | ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Read error: Connection reset by peer) |
| 20:01:46 | → | ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta) |
| 20:02:21 | <merijn> | Personally I just recommend "whatever text editor you currently prefer" |
| 20:03:44 | <dsal> | That's also my preference. |
| 20:03:51 | → | knupfer joins (~Thunderbi@200116b824cbdc00c813c0fffe26bde0.dip.versatel-1u1.de) |
| 20:04:17 | <Rembane> | Same here |
| 20:04:25 | × | Franciman quits (~francesco@host-95-250-152-231.retail.telecomitalia.it) (Ping timeout: 265 seconds) |
| 20:04:26 | <tomsmeding> | unless you want a "nice and friendly IDE" |
| 20:04:33 | × | knupfer quits (~Thunderbi@200116b824cbdc00c813c0fffe26bde0.dip.versatel-1u1.de) (Client Quit) |
| 20:04:40 | × | Varis quits (~Tadas@unaffiliated/varis) (Ping timeout: 256 seconds) |
| 20:04:45 | → | knupfer joins (~Thunderbi@200116b824cbdc0061816201305a90f6.dip.versatel-1u1.de) |
| 20:04:46 | <aplainzetakind> | ghcid is a thing, so it may need mentioning. |
| 20:04:49 | <tomsmeding> | or is your point that you can't get that anyway currently :p |
| 20:04:58 | <tomsmeding> | aplainzetakind: that _is_ true |
| 20:05:21 | <merijn> | tomsmeding: My point is that there is no "easy" way to get an IDE, even VSCode is kind of a hassle (judging by the number of questions) |
| 20:05:45 | × | ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 20:05:54 | <tomsmeding> | (in case any ghcide/hls/... people are reading: the software is amazing, but newcomers from Java expect something different) |
| 20:05:58 | <merijn> | So *if* you already have an established editor preference, I'd recommend just sticking with that (and maybe trying to get ghcide/hls working with your current editors LSP support) |
| 20:06:12 | <tomsmeding> | fair |
| 20:06:18 | × | vs^ quits (vs@ip98-184-89-2.mc.at.cox.net) () |
| 20:06:35 | <merijn> | If you don't have a preference, sure maybe try VSCode or something |
| 20:06:59 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 20:08:06 | <b4er> | If you don't have a favourite editor let me suggest `ed`, while it doesn't do syntax highlighting it is super convenient |
| 20:09:11 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving) |
| 20:09:38 | <Melanie> | I use VSCode and the precompiled HLS binaries, it works fine on most OSes but older ones you may need to compile the lanserv yourself |
| 20:10:07 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 20:10:07 | <b4er> | On a more serious note, I'd make sure that you have at least `hlint` some way or another integrated in your editor. Its suggestions are quite useful |
| 20:13:53 | → | Franciman joins (~francesco@host-95-250-152-231.retail.telecomitalia.it) |
| 20:13:54 | <ph88_> | hey guys i used this command: stack build --executable-profiling and then stack exec -- myprogram +RTS -xc ... but i get an error that i didnt build with prof flag .. how can i fix this situation ? |
| 20:14:03 | → | cads joins (~cads@ip-64-72-99-232.lasvegas.net) |
| 20:15:02 | <tomsmeding> | stack run --profile myprogram -- +RTS -xc |
| 20:15:20 | <tomsmeding> | I think |
| 20:15:50 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 20:15:53 | <shinobi> | I think I see where my problem is for understanding applicative ((->) r). I can perform [(+100)] <*> [200] and get a result of [300], as expected. However, (+3) <*> (5) yields an error. I don't understand why. |
| 20:15:59 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@static-198-54-134-164.cust.tzulo.com) |
| 20:16:12 | → | tsrt^ joins (tsrt@ip98-184-89-2.mc.at.cox.net) |
| 20:16:34 | <tomsmeding> | shinobi: what are the types of (+3) and of 5? What is, then, type type of <*>? |
| 20:16:34 | <boxscape> | % :t (<*>) |
| 20:16:34 | <yahb> | boxscape: Applicative f => f (a -> b) -> f a -> f b |
| 20:16:46 | <tomsmeding> | does that match what boxscape just got out of yahb? :) |
| 20:16:52 | ← | pragma- parts (~chaos@unaffiliated/pragmatic-chaos) ("Bye!") |
| 20:18:13 | <b4er> | :t (<*>) @[] |
| 20:18:15 | <lambdabot> | error: |
| 20:18:15 | <lambdabot> | Pattern syntax in expression context: (<*>)@[] |
| 20:18:15 | <lambdabot> | Did you mean to enable TypeApplications? |
| 20:18:23 | <b4er> | :t (<*>) @((->) _) |
| 20:18:24 | <lambdabot> | error: parse error on input ‘->’ |
| 20:18:27 | <boxscape> | you'll need yahb for TypeApplications |
| 20:18:30 | <tomsmeding> | % :t (<*>) @[] |
| 20:18:31 | <yahb> | tomsmeding: [a -> b] -> [a] -> [b] |
| 20:18:40 | <merijn> | b4er: Use `asAppliedTo` :p |
| 20:18:47 | <b4er> | Why does lambdabot not have TypeApplications :S |
| 20:18:53 | <merijn> | :t (<*>) `asAppliedTo` [] |
| 20:18:54 | <lambdabot> | [a -> b] -> [a] -> [b] |
| 20:19:50 | <boxscape> | shinobi can you see what a, b, and f are in <*>'s type signature for [(+100)] <*> [200]? |
| 20:20:47 | <shinobi> | :t (+3) |
| 20:20:49 | <lambdabot> | Num a => a -> a |
| 20:20:56 | <shinobi> | that is what I expect |
| 20:21:03 | × | p3n quits (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) (Quit: ZNC 1.8.2 - https://znc.in) |
| 20:21:04 | <shinobi> | :t (5) |
| 20:21:06 | <lambdabot> | Num p => p |
| 20:21:29 | <shinobi> | I was hoping this would be a function |
| 20:21:36 | <tomsmeding> | => does not indicate a function |
| 20:21:37 | <boxscape> | a function from what to what? |
| 20:21:50 | <tomsmeding> | it indicates that the thing on the left of the => is a constraint on the type to the right of the => |
| 20:22:06 | → | p3n joins (~p3n@217.198.124.246) |
| 20:22:06 | <shinobi> | \_ -> 5 |
| 20:22:24 | <shinobi> | I just want the constant function 5 |
| 20:22:24 | <tomsmeding> | 'Num p => p' means "the type 'p', for all 'p' that have an instance of Num" |
| 20:22:30 | <tomsmeding> | :t const 5 |
| 20:22:31 | <lambdabot> | Num a => b -> a |
| 20:22:35 | <merijn> | shinobi: Why would it be a function? |
| 20:22:42 | <dminuoso> | A function is actually one interpretation that matches what GHC does internally. Num p => p could be thought of “taking a dictionary of Num p” |
| 20:22:53 | <merijn> | dminuoso: That is...almost certainly not helpful :p |
| 20:23:01 | dminuoso | shrugs |
| 20:23:03 | <tomsmeding> | it is, but that doesn't really help when trying to understand Applicative ((->) r) :p |
| 20:23:12 | merijn | smells "everything is a function"-fallacy :) |
| 20:23:41 | <tomsmeding> | makes one think, what would a "reader monad" over a particular constraint even mean |
| 20:23:45 | <shinobi> | I thought putting the 5 in () would make it \_ -> 5 |
| 20:23:49 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 20:24:06 | <dminuoso> | tomsmeding: You could make that happen with ‘constraints’ easily :) |
| 20:24:12 | <tomsmeding> | shinobi: that's an effect specific to operators: https://wiki.haskell.org/Section_of_an_infix_operator |
| 20:24:28 | → | Tario joins (~Tario@201.192.165.173) |
| 20:24:31 | <boxscape> | though for operators it doesn't produce a constant function |
| 20:24:51 | <boxscape> | (+5) == \x -> x + 5 |
| 20:25:06 | <shinobi> | :t (\_ -> 5) |
| 20:25:08 | <lambdabot> | Num p1 => p2 -> p1 |
| 20:25:21 | <shinobi> | this seems like it could work with the above |
| 20:25:23 | <dminuoso> | tomsmeding: arguably, that’d be just a different way to encode tag less final, no? |
| 20:25:41 | <tomsmeding> | possibly, I'm afraid I have no idea :) |
| 20:26:01 | <boxscape> | shinobi "the above" being? |
| 20:26:52 | <shinobi> | A side question: Do the letters ghci chooses for types have any meaning? E.g. is a -> a different from p2 -> p1? |
| 20:27:02 | <boxscape> | tomsmeding since (I'm pretty sure) there's an equivalence between `c => t` and `Dict c -> t`, I suppose you should be able to think of it as a reader monad over Dict c |
| 20:27:24 | <tomsmeding> | boxscape: from briefly looking at the 'constraints' haddocks, yes that makes sense |
| 20:27:25 | <hpc> | they're just variable names |
| 20:27:33 | <merijn> | shinobi: 'a -> a' is different from 'p2 -> p1', but not from 'p1 -> p1' |
| 20:27:34 | <shinobi> | (+3) <*> (\_ -> 5) doesn't work either |
| 20:27:43 | <shinobi> | what do the letters mean? |
| 20:28:02 | <merijn> | shinobi: Letters have no meaning besides "same variable names correspond to same type" |
| 20:28:07 | <monochrom> | They mean nothing. Arbitrary choice. |
| 20:28:13 | <b4er> | You might wanna expand (<*>)'s definition to see what you're actually doing |
| 20:28:26 | <shinobi> | b4er: how do I do that |
| 20:28:28 | <hpc> | shinobi: there are some conventions, but it's like how a generic function in math is called 'f' |
| 20:28:30 | <merijn> | shinobi: It *tries* to use letters based on the variable names in source code (or derived from them) but it's ultimately arbitrary |
| 20:29:04 | <carter> | sooo, when are teh Reverse and backwards Applicatives different? |
| 20:29:15 | <b4er> | You go to hackage, look up Applicative, find the instance you're working with and click the #-sign for source, |
| 20:29:18 | <monochrom> | "a" means arbitrary |
| 20:29:27 | <monochrom> | "b" means arbitary |
| 20:29:31 | <hpc> | well, you click "source" for source |
| 20:29:37 | <hpc> | "#" is a permalink |
| 20:29:39 | <carter> | (trying to figure out which one is correct for my needs) |
| 20:30:11 | <boxscape> | shinobi also try to look at the type of <*> and see what you would expect f, a, and b to be in that case, maybe that let's you see why it doesn't work |
| 20:30:22 | <b4er> | shinobi, here you go: https://hackage.haskell.org/package/base-4.14.1.0/docs/src/GHC.Base.html#line-973 |
| 20:31:39 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 20:32:01 | <carter> | ohhh traverse f (Reverse t) = |
| 20:32:01 | <carter> | fmap Reverse . forwards $ traverse (Backwards . f) t |
| 20:32:11 | <carter> | Reverse uses Backwards for its traverse |
| 20:32:17 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov) |
| 20:32:33 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 20:36:38 | × | b4er quits (~b4er@91.193.4.138) (Quit: bye!) |
| 20:36:47 | → | ces joins (~ces@fsf/member/ces) |
| 20:36:55 | → | b4er joins (~b4er@91.193.4.138) |
| 20:37:25 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
| 20:37:29 | → | juuandyy joins (~juuandyy@90.166.144.65) |
| 20:37:42 | × | juuandyy quits (~juuandyy@90.166.144.65) (Client Quit) |
| 20:37:45 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 20:38:48 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:ccd9:595d:1bc6:b87f) |
| 20:38:59 | <shinobi> | (<*>) f g x = f x (g x) It looks like x and (g x) is being applied to f. Am I reading this correctly? |
| 20:39:04 | × | v_m_v quits (~vm_v@2a02:aa12:3200:6480:5db7:7326:4789:d9fc) (Remote host closed the connection) |
| 20:39:16 | <b4er> | Yep. |
| 20:39:22 | → | v_m_v joins (~vm_v@2a02:aa12:3200:6480:5db7:7326:4789:d9fc) |
| 20:39:30 | <c_wraith> | Though usually we say functions are applied to arguments, rather than vice versa |
| 20:39:34 | <shinobi> | What if f only has 1 parameter |
| 20:39:39 | <c_wraith> | then it's a type error |
| 20:40:17 | <c_wraith> | :t negate |
| 20:40:19 | <lambdabot> | Num a => a -> a |
| 20:40:26 | <c_wraith> | Oh, too polymorphic. blah. |
| 20:40:41 | <c_wraith> | :t show <*> (+1) |
| 20:40:43 | <lambdabot> | error: |
| 20:40:43 | <lambdabot> | • Couldn't match type ‘[Char]’ with ‘a -> b’ |
| 20:40:43 | <lambdabot> | Expected type: a -> a -> b |
| 20:40:48 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:ccd9:595d:1bc6:b87f) (Client Quit) |
| 20:40:49 | <c_wraith> | see? type error |
| 20:41:05 | <monochrom> | f x (g x) = (f x) (g x), too |
| 20:41:27 | × | ces quits (~ces@fsf/member/ces) (Client Quit) |
| 20:41:50 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
| 20:43:57 | <shinobi> | monochrom: fair enough but what is the operation between (f x) (g x)? |
| 20:44:11 | <monochrom> | function application |
| 20:44:21 | <monochrom> | It's function applications all the way down. |
| 20:44:23 | <ph88_> | thanks tomsmeding |
| 20:45:30 | → | tp47 joins (1f0a80ba@31-10-128-186.cgn.dynamic.upc.ch) |
| 20:48:35 | × | HenryCH quits (~henry@5.81.254.84.ftth.as8758.net) () |
| 20:48:47 | → | Aloui joins (~Username@13.84.157.132) |
| 20:49:03 | × | Aloui quits (~Username@13.84.157.132) (Read error: Connection reset by peer) |
| 20:49:24 | → | geowiesnot joins (~user@87-89-181-157.abo.bbox.fr) |
| 20:49:56 | × | superstar64 quits (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net) (Remote host closed the connection) |
| 20:49:57 | → | vfaronov joins (~Srain@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 20:51:52 | × | vfaronov quits (~Srain@broadband-95-84-210-78.ip.moscow.rt.ru) (Remote host closed the connection) |
| 20:52:12 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 20:57:16 | <shinobi> | Let me go back a bit. ((->) r) is an applicative. <*> has the type of: Applicative f => f (a -> b) -> f a -> f b. So I would expect ((->) r1) to have a value of a function of type (a -> b) and ((->) r2) to have a value of a. Am I correct so far? |
| 20:57:46 | × | recon_- quits (~quassel@208.87.96.9) (Quit: No Ping reply in 180 seconds.) |
| 20:58:53 | × | usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving) |
| 20:59:02 | → | recon_- joins (~quassel@2602:febc:0:b6::6ca2) |
| 20:59:52 | <dminuoso> | This reads quite confused. |
| 21:00:20 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 21:00:34 | <shinobi> | That's me right now |
| 21:00:43 | <boxscape> | I'm not quite sure what it means for ((->) r1) to have a value - The important takeaway is that for the ((->) r) instance, f is ((->) r), which means the type of (<*>) is (r -> (a -> b)) -> (r -> a) -> (r -> b) |
| 21:00:57 | <b4er> | Where do you get r1 and r2 from? |
| 21:01:31 | <boxscape> | (I just substituted f with (r ->), which would be the same as ((->) r) if it were valid syntax) |
| 21:01:39 | <b4er> | Once you use (<*>) for ((->)r) r is fix, you can use r, r1 etc. but they must be equivalent |
| 21:01:48 | → | vfaronov joins (~Srain@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 21:01:48 | <dminuoso> | shinobi: In the type of <*> we have two arguments f (a -> b) and f a. If we set f ~ ((->) Int), then the type of (<*>) becomes (Int -> a -> b) -> Int a -> Int b |
| 21:01:57 | <dminuoso> | Does this make sense? |
| 21:02:06 | <dminuoso> | Oh |
| 21:02:07 | → | chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
| 21:02:27 | <dminuoso> | shinobi: In the type of <*> we have two arguments f (a -> b) and f a. If we set f ~ ((->) Int), then the type of (<*>) becomes (Int -> a -> b) -> (Int -> a) -> Int -> b |
| 21:02:37 | <dminuoso> | Sorry! Typing on this iPad is slightly different. :) |
| 21:03:20 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit) |
| 21:03:44 | × | vfaronov quits (~Srain@broadband-95-84-210-78.ip.moscow.rt.ru) (Remote host closed the connection) |
| 21:03:58 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:ccd9:595d:1bc6:b87f) |
| 21:04:02 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 21:04:12 | <shinobi> | yes, that makes sense |
| 21:04:35 | → | vfaronov joins (~Srain@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 21:05:04 | → | notzmv joins (~user@unaffiliated/zmv) |
| 21:05:22 | × | vfaronov quits (~Srain@broadband-95-84-210-78.ip.moscow.rt.ru) (Remote host closed the connection) |
| 21:05:41 | <shinobi> | That's just the type though. |
| 21:05:54 | → | Deide joins (~Deide@217.155.19.23) |
| 21:06:18 | <shinobi> | for <*> It will apply x to f and apply x to g? Then compose? |
| 21:06:44 | <b4er> | s/compose/apply |
| 21:08:00 | <dminuoso> | shinobi: What this ends up doing depends on the instance. Assuming we even have an `instance Applicative ((->) r)` (which we do), then GHC will just use the implementation of (<*>) of that instance definition |
| 21:08:18 | → | vfaronov joins (~Srain@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 21:08:53 | × | v_m_v quits (~vm_v@2a02:aa12:3200:6480:5db7:7326:4789:d9fc) (Remote host closed the connection) |
| 21:08:56 | <b4er> | Maybe this exmple helps: (mult <*> succ) 2 ≡ mult 2 (succ 2) ≡ mult 2 3 ≡ 6 |
| 21:08:57 | <b4er> | ? |
| 21:10:15 | <shinobi> | let me digest a moment |
| 21:10:34 | <shinobi> | It makes sense at the surface... still digesting |
| 21:12:27 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 21:13:15 | <shinobi> | so mult needs 2 parameters to begin with. succ only needs one. Applying the two will partially apply the mult fuction and generate a value for the second. Then it will apply the two. ?? |
| 21:14:25 | <dminuoso> | shinobi: Given the above type signature, try to implement a function of type ‘fun :: (Int -> a -> b) -> (Int -> a) -> Int -> b` |
| 21:15:00 | <dminuoso> | Stare at the type signature, write a function taking as many arguments, and implement it some sensible way. When done, lets look at your implementation |
| 21:15:16 | <dminuoso> | (Yes I intentionally do not state what this would do, just let the types guide you) |
| 21:15:21 | × | boxscape quits (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) (Quit: Connection closed) |
| 21:16:08 | <b4er> | Does it need to terminate ;P |
| 21:16:38 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 256 seconds) |
| 21:19:11 | <MrMuffles[m]> | Is there an algorithm to find free variables of a lambda expression? |
| 21:19:13 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving) |
| 21:20:42 | <dminuoso> | MrMuffles[m]: Are you writing your own binding solution, or do you use something like unbound? |
| 21:20:43 | <monochrom> | Could you find all variables? Could you find all bound variables? Could you handle name clashes and shadowing? Then you just subtract. |
| 21:22:38 | <MrMuffles[m]> | dminuoso would a binding solution just be the inverse of identifying free variable? I'm doing this in clojure, tbh, and not sure yet what tools I have |
| 21:23:25 | <dminuoso> | MrMuffles[m]: I don’t know the entirety of your problem you are dealing with. |
| 21:23:33 | × | Forlorn quits (~Forlorn@unaffiliated/forlorn) (Quit: leaving) |
| 21:23:37 | × | hiroaki quits (~hiroaki@2a02:908:4b18:8c40::4b02) (Ping timeout: 272 seconds) |
| 21:24:16 | × | kam1 quits (~kam1@24.231.108.143) (Ping timeout: 246 seconds) |
| 21:25:15 | → | Forlorn joins (~Forlorn@unaffiliated/forlorn) |
| 21:25:45 | <MrMuffles[m]> | Basically I'm curious if I can take a clojure expression (list) and generate the input parameters (free variables) for a macro for that expression |
| 21:26:37 | × | son0p quits (~son0p@181.136.122.143) (Ping timeout: 264 seconds) |
| 21:27:29 | × | worc3131 quits (~quassel@2a02:c7f:dcc4:6500:cf0e:3346:8766:ab20) (Remote host closed the connection) |
| 21:28:03 | → | son0p joins (~son0p@181.136.122.143) |
| 21:31:29 | → | dfeuer joins (~dfeuer@pool-108-18-223-60.washdc.fios.verizon.net) |
| 21:32:30 | → | boxscape joins (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) |
| 21:33:05 | → | ech joins (~user@gateway/tor-sasl/ech) |
| 21:34:27 | × | knupfer quits (~Thunderbi@200116b824cbdc0061816201305a90f6.dip.versatel-1u1.de) (Ping timeout: 268 seconds) |
| 21:34:37 | × | rsoeldner_ quits (~rsoeldner@2a02:8108:973f:eb38:5b7:e16e:247:b5fe) (Remote host closed the connection) |
| 21:34:54 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) (Remote host closed the connection) |
| 21:36:02 | <MrMuffles[m]> | > Could you find all variables? Could you find all bound variables? Could you handle name clashes and shadowing? Then you just subtract. |
| 21:36:03 | <MrMuffles[m]> | Well I guess that's pretty much it :P |
| 21:36:05 | <lambdabot> | <hint>:1:135: error: |
| 21:36:05 | <lambdabot> | <hint>:1:135: error: |
| 21:36:05 | <lambdabot> | parse error (possibly incorrect indentation or mismatched brackets) |
| 21:36:12 | → | knupfer joins (~Thunderbi@87.123.206.117) |
| 21:36:17 | <b4er> | Uhm, that comment from diminuoso made me think a bit.. Is there only one instance of `a -> a` (ie. `id`)? |
| 21:36:24 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:36:51 | <boxscape> | there's only one non-bottom function of that type, yes |
| 21:36:56 | → | cheater joins (~user@unaffiliated/cheater) |
| 21:37:03 | <Rembane> | b4er: Can you name a second one? :) |
| 21:37:05 | <b4er> | That's what I meant, yeah |
| 21:37:37 | <b4er> | No, but I can prove that a non-terminating function `a -> unit` is equal to `id` but I cannot do the same with `a -> a` (in Isabelle/HOL) |
| 21:37:56 | <b4er> | That's what is tripping me up.. |
| 21:38:02 | <Rembane> | b4er: But `a -> unit` is not `a -> a`. |
| 21:38:23 | <Rembane> | b4er: How do you prove it btw? |
| 21:38:35 | × | Goldio quits (uid478328@gateway/web/irccloud.com/x-nzbyntkcrovquvlb) (Quit: Connection closed for inactivity) |
| 21:38:36 | <boxscape> | don't you need function extensionality to prove that? |
| 21:38:37 | <b4er> | Ah, sorry. Same with `unit -> unit` really |
| 21:38:49 | <b4er> | Isabelle/HOL has functional extensionality yeah |
| 21:38:54 | <boxscape> | hm, okay |
| 21:39:27 | <Rembane> | Got it. |
| 21:39:45 | × | Lycurgus quits (~niemand@cpe-45-46-139-165.buffalo.res.rr.com) (Ping timeout: 240 seconds) |
| 21:40:05 | → | v_m_v joins (~vm_v@2a02:aa12:3200:6480:14d3:e041:99da:4fe5) |
| 21:40:07 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 21:40:14 | <gentauro> | I have never heard of this language before now. If anybody have heard about it, how much is "marketing/BS"? https://www.ponylang.io/discover/#what-makes-pony-different |
| 21:40:15 | <Rembane> | `unit -> unit` is a concrete instance of `a -> a` though. |
| 21:41:14 | <Rembane> | gentauro: Pony is cool, there's a podcast about someone using it for really high performance stuff: https://corecursive.com/055-unproven-with-sean-allen/ |
| 21:41:39 | <shinobi> | dminuoso: fun :: (Int -> a -> b) -> (Int -> a) -> Int -> b \n |
| 21:41:39 | <shinobi> | fun f g x = f x (g x) |
| 21:42:57 | → | pavonia joins (~user@unaffiliated/siracusa) |
| 21:42:58 | → | knupfer1 joins (~Thunderbi@200116b824cbdc0041d19ba065e80d02.dip.versatel-1u1.de) |
| 21:42:59 | × | knupfer quits (~Thunderbi@87.123.206.117) (Read error: Connection reset by peer) |
| 21:42:59 | knupfer1 | is now known as knupfer |
| 21:43:09 | × | knupfer quits (~Thunderbi@200116b824cbdc0041d19ba065e80d02.dip.versatel-1u1.de) (Client Quit) |
| 21:43:19 | → | knupfer joins (~Thunderbi@200116b824cbdc009ded78f9657295f0.dip.versatel-1u1.de) |
| 21:43:33 | <b4er> | If someone want to have a good laugh about a "language" that is probably solely marketing BS: https://blog.usejournal.com/monoids-to-groupoids-492c35105113?gi=17adacd5d88e |
| 21:44:17 | <dminuoso> | shinobi: There you go. Would you believe, that this implementation works for any other type than Int? I.e. that its independent of the choice whether you replace Int with say Bool? |
| 21:46:43 | <gentauro> | b4er: is it somekind of "Aprils Fool"? |
| 21:47:23 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 21:47:42 | <shinobi> | I see where you're going. Isn't <*> supposed to return another applicative though? |
| 21:48:04 | <gentauro> | b4er: the `multix.ai` makes me think that the hole blogpost + slides is made by some AI … |
| 21:48:33 | <dminuoso> | shinobi: I suggest losing the notion of “a Applicative” as something on the value level perhaps |
| 21:48:42 | <dminuoso> | If you look at the type signature again, you will see: |
| 21:48:45 | × | dandart quits (~Thunderbi@home.dandart.co.uk) (Ping timeout: 240 seconds) |
| 21:49:01 | <gentauro> | b4er: def generated by AI: https://multix.sfo2.cdn.digitaloceanspaces.com/Category%20Theory%20TallCat.pdf (nobody would ever write this BS) |
| 21:49:05 | <dminuoso> | (Int -> a -> b) -> (Int -> a) -> Int -> b |
| 21:49:14 | <dminuoso> | If I add optional parens you get |
| 21:49:22 | <dminuoso> | (Int -> a -> b) -> (Int -> a) -> (Int -> b) |
| 21:49:52 | <dminuoso> | Do you see how you have two input things that each depend on an Int, and you produce something that itself depends on an Int? |
| 21:49:58 | <shinobi> | ok. so can you walk me through one example? |
| 21:50:07 | <shinobi> | yes |
| 21:50:15 | <shinobi> | I think... haha |
| 21:50:46 | × | geekosaur quits (ac3a8f5d@172.58.143.93) (Remote host closed the connection) |
| 21:51:37 | <shinobi> | (+) <$> (+3) <*> (*100) $ 5 |
| 21:51:49 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 21:51:52 | → | dandart joins (~Thunderbi@home.dandart.co.uk) |
| 21:51:56 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 21:53:04 | × | v_m_v quits (~vm_v@2a02:aa12:3200:6480:14d3:e041:99da:4fe5) (Remote host closed the connection) |
| 21:53:20 | → | v_m_v joins (~vm_v@2a02:aa12:3200:6480:14d3:e041:99da:4fe5) |
| 21:53:37 | ← | usr25 parts (~usr25@unaffiliated/usr25) ("Leaving") |
| 21:53:47 | <b4er> | gentauro, this video suggests otherwise: youtube.com/watch?v=hU8lG-R67Qg |
| 21:54:12 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:ccd9:595d:1bc6:b87f) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 21:55:21 | <Uniaika> | holy crap |
| 21:55:43 | <Uniaika> | I just saw someone send "=#" as an emoji on an IRC server |
| 21:55:58 | <gentauro> | =# |
| 21:55:58 | <Uniaika> | and my first reflex was "Hmm, I know this operator from somewhere…" |
| 21:56:12 | <gentauro> | Uniaika: what is it? |
| 21:56:12 | <Uniaika> | What have y'all done to me?!?! |
| 21:56:39 | <kritzefitz> | When I call a C function via FFI and the C code calls a Haskell function, is the inner Haskell function executed in a new thread as per myThreadId? |
| 21:56:48 | <Uniaika> | no bloody idea, gentauro |
| 21:57:16 | <gentauro> | b4er: I have tried to watch/listen to the video. I think I loose IQ for every word I hear … I better stop :( |
| 21:57:19 | <merijn> | kritzefitz: unspecified |
| 21:57:24 | <boxscape> | I'd say it's a person with two mouths and two bandaids placed over those mouths at a right angle |
| 21:57:52 | <merijn> | kritzefitz: I'd strongly recommend changing your code so that that question becomes irrelevant ;) |
| 21:58:59 | × | tp47 quits (1f0a80ba@31-10-128-186.cgn.dynamic.upc.ch) (Remote host closed the connection) |
| 21:59:46 | <gentauro> | b4er: merijn: now I know how to pronounce De Bruijn :P https://youtu.be/hU8lG-R67Qg?t=1804 (30:04) |
| 21:59:59 | <gentauro> | b4er: this is `too much`, I'm going blind and deaf xD |
| 22:00:19 | <kritzefitz> | merijn, that seems to be the case. |
| 22:00:28 | <gentauro> | «@nythrox Yep this is applied category theory - if you are looking for the pure stuff you are better with the maths versions» The Catbox |
| 22:00:45 | <merijn> | gentauro: That is...rather off :p |
| 22:00:58 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 22:01:00 | <b4er> | Ahahahahaha, nice how we got a spelling and pronunciation class today |
| 22:01:52 | <merijn> | gentauro: This (minus microphone noise) is the right way: https://forvo.com/word/nicolaas_govert_de_bruijn/ :) |
| 22:01:54 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 22:01:58 | <kritzefitz> | Can I assume that two pieces of code (running on different or the same thread) run on the same OS thread if they run on the same capability as per threadCapability? |
| 22:02:23 | <kritzefitz> | (assuming both run on bounded threads) |
| 22:02:30 | <merijn> | kritzefitz: Maybe, although I'm not sure what's guaranteed |
| 22:02:47 | <merijn> | kritzefitz: tbh, you're in "eh, better look at the RTS source code" territory here :p |
| 22:03:15 | <gentauro> | merijn: I would expect more "throat" when hitting the "j" |
| 22:03:42 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:ccd9:595d:1bc6:b87f) |
| 22:03:46 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:ccd9:595d:1bc6:b87f) (Client Quit) |
| 22:03:50 | <gentauro> | I remember from when I went to Amsterdam, that the Dutch language has some "Danish sound word" |
| 22:04:05 | <gentauro> | so when we took the tram, I was turning around cos I though danes were talking |
| 22:04:15 | → | fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net) |
| 22:04:19 | → | Rudd0 joins (~Rudd0@185.189.115.103) |
| 22:04:23 | <boxscape> | merijn is that also how to pronounce the ij in your name |
| 22:04:32 | <boxscape> | oh waitr |
| 22:04:35 | <boxscape> | that doesn't make sense |
| 22:04:38 | <merijn> | gentauro: Well, it's an archaic spelling, in modern Dutch it'd be spelled "bruin" rather than "bruijn" and it's pronounced just like the former now (now being, as "recent" as 1900s, possibly late 1800s) |
| 22:04:39 | <boxscape> | it's not meruijn |
| 22:04:47 | <merijn> | boxscape: See above ;) |
| 22:04:53 | <boxscape> | oh |
| 22:04:57 | <boxscape> | thanks |
| 22:05:08 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:ccd9:595d:1bc6:b87f) |
| 22:08:04 | <shinobi> | fmapping (+) over (+3) seems strange to me. Is this just building up an expression tree? |
| 22:08:33 | <boxscape> | % :t fmap (+) (+3) |
| 22:08:34 | <yahb> | boxscape: Num a => a -> a -> a |
| 22:10:52 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:81fd:2b8d:9354:7a4f) |
| 22:11:15 | <Vulfe> | which instance of fmap is this using |
| 22:11:20 | <Vulfe> | or rather, which Functor instance |
| 22:11:31 | <koz_> | Vulfe: ((->) a) |
| 22:11:35 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 22:11:36 | <shinobi> | ((->) r) |
| 22:11:42 | <Vulfe> | oh okay, sure |
| 22:12:57 | <boxscape> | shinobi I' |
| 22:12:59 | <boxscape> | whoops |
| 22:14:25 | <boxscape> | shinobi it's not quite clear to me what you mean by building up an expression tree, but here I personally also find looking at the type signature quite helpful |
| 22:14:26 | <boxscape> | % :t fmap @((->) Int) |
| 22:14:26 | <yahb> | boxscape: (a -> b) -> (Int -> a) -> Int -> b |
| 22:14:31 | <boxscape> | b in this case is (a -> a) |
| 22:14:40 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 246 seconds) |
| 22:14:46 | <boxscape> | so then it's (a -> (a -> a)) -> (Int -> a) -> Int -> (a -> a) |
| 22:16:00 | <boxscape> | the implementation would be |
| 22:16:15 | <boxscape> | fmap f g x y = f (g x) y |
| 22:16:21 | <boxscape> | I think? |
| 22:16:57 | <boxscape> | yes |
| 22:17:20 | <kritzefitz> | merijn, thanks. I guess I'll have to think about this a bit more. |
| 22:17:26 | × | v_m_v quits (~vm_v@2a02:aa12:3200:6480:14d3:e041:99da:4fe5) (Remote host closed the connection) |
| 22:18:49 | × | Foritus quits (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Ping timeout: 264 seconds) |
| 22:19:51 | <Vulfe> | it's a bit clearer to me if I write this as (pure (+)) <*> ... for whatever reason |
| 22:19:59 | <shinobi> | Yes, I agree. I may have not been stating is precisely. Since the above is left associative, the above would yield fmap (+) (+3) and I was trying to figure out what that means. Now I see it would be Num a => a -> a -> a . It would need an a to fully apply (+3) and need another a to fully apply (+) |
| 22:20:05 | → | Foritus joins (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) |
| 22:20:40 | <boxscape> | right |
| 22:25:58 | → | christo joins (~chris@81.96.113.213) |
| 22:30:16 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 240 seconds) |
| 22:36:43 | × | boxscape quits (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) (Quit: Connection closed) |
| 22:37:23 | → | azure joins (~azure@36.79.200.71) |
| 22:37:47 | azure | is now known as Guest63263 |
| 22:38:01 | × | knupfer quits (~Thunderbi@200116b824cbdc009ded78f9657295f0.dip.versatel-1u1.de) (Ping timeout: 258 seconds) |
| 22:40:16 | × | zangi quits (~azure@36.79.200.71) (Ping timeout: 256 seconds) |
| 22:42:50 | → | boxscape joins (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) |
| 22:45:40 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 22:46:01 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 22:47:02 | → | christo joins (~chris@81.96.113.213) |
| 22:47:26 | → | Tario joins (~Tario@201.192.165.173) |
| 22:50:19 | <dminuoso> | shinobi: One way to think of fmap is that it maps functions to functions. |
| 22:50:50 | <dminuoso> | For instance, it can be used to map functions working on Int to functions |
| 22:50:59 | <dminuoso> | Uh, Sorry, |
| 22:51:01 | × | yorick quits (~yorick@oftn/oswg-member/yorick) (Quit: reboot) |
| 22:51:07 | <dminuoso> | For instance, it can be used to map functions working on Int to functions working on lists of Int. |
| 22:51:33 | × | fendor_ quits (~fendor@178.115.129.22.wireless.dyn.drei.com) (Remote host closed the connection) |
| 22:52:45 | → | dhil joins (~dhil@78.156.97.38) |
| 22:53:16 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 22:54:02 | → | yorick joins (~yorick@oftn/oswg-member/yorick) |
| 22:55:17 | → | hiroaki joins (~hiroaki@2a02:908:4b18:8c40::4b02) |
| 23:00:41 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 23:00:50 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 23:01:50 | → | christo joins (~chris@81.96.113.213) |
| 23:01:59 | <shinobi> | Is that why this works: (\x y z -> [x,y,z]) <$> (+3) <*> (*2) <*> (/2) $ 5 |
| 23:02:12 | <shinobi> | I wouldn't expect to apply a 5 to a list. |
| 23:03:05 | × | boxscape quits (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) (Quit: Connection closed) |
| 23:04:01 | → | xelxebar_ joins (~xelxebar@gateway/tor-sasl/xelxebar) |
| 23:04:03 | × | xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 240 seconds) |
| 23:08:12 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 23:08:42 | → | boxscape joins (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) |
| 23:08:51 | <shinobi> | ah, but fmap = (.) for ((->) r) so I think that makes more sense. |
| 23:08:56 | <shinobi> | Thank you all |
| 23:09:40 | × | Franciman quits (~francesco@host-95-250-152-231.retail.telecomitalia.it) (Quit: Leaving) |
| 23:18:43 | × | jneira quits (5127ac9c@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.172.156) (Ping timeout: 265 seconds) |
| 23:26:16 | × | dhil quits (~dhil@78.156.97.38) (Ping timeout: 240 seconds) |
| 23:27:11 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 23:32:38 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 23:33:10 | × | son0p quits (~son0p@181.136.122.143) (Quit: Lost terminal) |
| 23:33:12 | <remexre> | how should one set up version bounds for base? is it actually fine to just do base >=$lowest_version_i_tested_with && <5 ? |
| 23:34:18 | <yushyin> | seems alright to me |
| 23:34:25 | <boxscape> | any good reason to define unfix separately like this rather than as a record selector? https://hackage.haskell.org/package/recursion-schemes-5.1.3/docs/src/Data.Functor.Foldable.html#Fix |
| 23:36:06 | × | bartholin quits (~bartholin@unaffiliated/bartholin) (Quit: Leaving) |
| 23:36:08 | <boxscape> | hm I guess one reason might be it shows up as a separate thing in haddock |
| 23:36:20 | <Rembane> | boxscape: Can you do it as a record selector? |
| 23:36:36 | <Rembane> | boxscape: ...or do things go boom due to the recursive nature of it? |
| 23:36:57 | <boxscape> | seems to work |
| 23:37:08 | <boxscape> | % newtype Fix f = Fix { unFix :: f (Fix f) } |
| 23:37:09 | <yahb> | boxscape: |
| 23:37:24 | <Rembane> | boxscape: Yeah, I had a stupid happen to me: https://hackage.haskell.org/package/data-fix-0.3.0/docs/src/Data.Fix.html#Fix <- another example of it working |
| 23:38:04 | <boxscape> | hm I guess if data-fix does it the other way that at least implies that there's no deeper reason not to do it |
| 23:38:11 | × | fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9) |
| 23:38:24 | <Rembane> | Indeed, or there is one, but undocumented. |
| 23:39:41 | <lyxia> | yeah there's very little difference. another one is the Show instance but for Fix it's handwritten anyway. |
| 23:39:57 | <Squarism> | Im in a situation where i would like to have a list containing different types, so I feel my only two options are wrapping the different types in a sum type or ExistentialQuantification. Are there more routes? |
| 23:42:19 | × | ph88_ quits (~ph88@ip5f5af6cd.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 23:42:46 | → | ph88_ joins (~ph88@2a02:8109:9e00:7e5c:6177:8b5f:aca9:602e) |
| 23:42:53 | <Rembane> | Squarism: you could use Dynamic too, but why do you need to put different types in one list? |
| 23:43:22 | <boxscape> | Squarism heterogeneous lists like this exist, too, though not sure what the canonical package would be https://hackage.haskell.org/package/generic-lens-core-2.0.0.0/docs/Data-Generics-Product-Internal-HList.html#t:HList |
| 23:43:49 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:ccd9:595d:1bc6:b87f) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 23:46:33 | <EvanR> | an ordered data structure which supports append, retrieve at cursor, move cursor by an increment, including seek to beginning or end, update at cursor, and delete at the cursor? |
| 23:46:52 | <EvanR> | i think the seeking is what makes a zipper not work |
| 23:47:00 | <EvanR> | or not the best |
| 23:48:20 | <Squarism> | Rembane, The library user would want an easy representation of a datatype representing "a process". The steps in the process can have minor differences. Ie [V1,V2,V2,V5]. |
| 23:48:50 | <Squarism> | an ordered repitition of an abstract concept so to speak. |
| 23:50:39 | <Squarism> | making a sum type for all possible versions would not scale well with many versions. =/ |
| 23:51:02 | <Squarism> | boxscape, Thanks. Ill check that out |
| 23:51:25 | <Rembane> | Squarism: That's cool. I wonder if the vinyl package is a good fit for your usecase. Have you looked into it? |
| 23:51:28 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 23:51:38 | <Squarism> | nope |
| 23:51:54 | <Squarism> | i guess i need to |
| 23:52:01 | → | christo joins (~chris@81.96.113.213) |
| 23:52:19 | × | vfaronov quits (~Srain@broadband-95-84-210-78.ip.moscow.rt.ru) (Remote host closed the connection) |
| 23:53:07 | <Rembane> | Squarism: GADTs might also help you |
| 23:54:11 | <Squarism> | Rembane, could you hint how GADTs would help? |
| 23:56:10 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 246 seconds) |
| 23:56:19 | × | rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo) |
| 23:56:55 | <Rembane> | Squarism: I think I just thought of a slightly less convoluted idea. What are the steps in the process? Are they a part of the same datatype or something like that? |
| 23:57:50 | <Squarism> | They are just records that differ a tiny bit between versions |
| 23:58:16 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 240 seconds) |
| 23:58:23 | <Squarism> | But their structure is quite central to the application |
| 23:58:39 | <Squarism> | So being proper types help |
| 23:59:14 | <Rembane> | That's good, how many different types of records are they? |
| 23:59:45 | <Rembane> | And do the records change often? |
| 23:59:47 | × | p3n quits (~p3n@217.198.124.246) (Remote host closed the connection) |
All times are in UTC on 2021-01-02.