2021-12-15 00:00:32 +0100 | pfurla | (~pfurla@172.58.176.86) (Ping timeout: 240 seconds) |
2021-12-15 00:02:01 +0100 | kuribas | (~user@ptr-25vy0i8khbpxjegyagx.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
2021-12-15 00:02:03 +0100 | pfurla | (~pfurla@172.58.110.204) |
2021-12-15 00:02:46 +0100 | arahael | (~arahael@203.158.51.1) |
2021-12-15 00:04:13 +0100 | gehmehgeh | (~user@user/gehmehgeh) |
2021-12-15 00:04:34 +0100 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Quit: The Lounge - https://thelounge.chat) |
2021-12-15 00:05:03 +0100 | <janus> | what happens if a Haskell process forks while linear bindings are alive? it would break safety in this case :O |
2021-12-15 00:05:10 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
2021-12-15 00:05:11 +0100 | pfurla_ | (~pfurla@2804:18:5854:5897:8ac:66e0:c04d:6ee5) (Ping timeout: 252 seconds) |
2021-12-15 00:05:33 +0100 | y04nn | (~y04nn@92.223.89.196) (Ping timeout: 252 seconds) |
2021-12-15 00:05:39 +0100 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) |
2021-12-15 00:05:42 +0100 | ub | (~Thunderbi@p200300ecdf1abbee153a2c4097e8e97e.dip0.t-ipconnect.de) (Quit: ub) |
2021-12-15 00:06:05 +0100 | notzmv | (~zmv@user/notzmv) (Ping timeout: 250 seconds) |
2021-12-15 00:06:10 +0100 | <geekosaur> | I would expect both forkIO and forkProcess to be unsafe in a linear context |
2021-12-15 00:06:15 +0100 | mikail | (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) |
2021-12-15 00:06:25 +0100 | <monochrom> | Yeah I don't know of the interaction between linear typing and IO and forking. I have only heard that the IO exception system is a backdoor. I haven't bothered to ask for an example. |
2021-12-15 00:06:52 +0100 | <monochrom> | And too lazy to study one. :) |
2021-12-15 00:07:05 +0100 | <monochrom> | Category theory is so much easier! |
2021-12-15 00:07:06 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 00:08:37 +0100 | gehmehgeh | (~user@user/gehmehgeh) (Client Quit) |
2021-12-15 00:09:11 +0100 | pfurla_ | (~pfurla@2804:18:5854:5897:49e8:d425:47ba:a206) |
2021-12-15 00:11:13 +0100 | mikail | (~mikail@2a02:c7f:bc1f:4a00:fc9:3da5:3e1e:8303) (Quit: Leaving) |
2021-12-15 00:12:27 +0100 | pfurla | (~pfurla@172.58.110.204) (Ping timeout: 256 seconds) |
2021-12-15 00:12:30 +0100 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Quit: The Lounge - https://thelounge.chat) |
2021-12-15 00:13:35 +0100 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) |
2021-12-15 00:13:38 +0100 | <Axman6> | why would forkIO be unsafe in a linear context? You can still track whether something linear is used ones in the forked action or the forking action, and as long as it's not used in both you're ok. Rust does exacrtly this right? |
2021-12-15 00:14:27 +0100 | <monochrom> | Rust allows multiple readers. %1 doesn't. |
2021-12-15 00:14:59 +0100 | <geekosaur> | and I doubt linear haskell actually knows that forkIO or forkOS or forkProcess is "special" |
2021-12-15 00:15:04 +0100 | <Axman6> | so the check is even simpler for Haskell right? |
2021-12-15 00:15:04 +0100 | <monochrom> | Rust's system also aims at tracking "can I free() now?", which is quite a bit different. |
2021-12-15 00:15:50 +0100 | <geekosaur> | or any other of the variants that essentially dupliucate an execution context |
2021-12-15 00:17:32 +0100 | <geekosaur> | we already have the problem that nothing in ghc/rts knows that in the child of a forkProcess all threads have ceased to exist |
2021-12-15 00:17:42 +0100 | jespada | (~jespada@87.74.33.157) (Quit: Textual IRC Client: www.textualapp.com) |
2021-12-15 00:18:04 +0100 | <geekosaur> | (well, the rts knows to recreate its own threads, but knows nothing about the state of any user program threads after a forkProcess) |
2021-12-15 00:18:06 +0100 | pfurla | (~pfurla@185.81.136.19) |
2021-12-15 00:19:17 +0100 | pfurla_ | (~pfurla@2804:18:5854:5897:49e8:d425:47ba:a206) (Ping timeout: 250 seconds) |
2021-12-15 00:22:26 +0100 | <[itchyjunk]> | I have a question. If i wanted to learn say `datastructure and algorithms`, is haskell still a good choice for me? I am a bit intimidated by this prospect. my alternative would be java i think.. |
2021-12-15 00:23:07 +0100 | <[itchyjunk]> | I would like to learn things like trees and graphs and "depth first" type stuff |
2021-12-15 00:23:15 +0100 | <geekosaur> | depends on how you want to learn them, I think; the two have different focuses |
2021-12-15 00:23:38 +0100 | <nosewings> | Haskell is good at stuff like trees and graphs, but if you don't know Haskell, it might be a challenge to learn both at the same time |
2021-12-15 00:23:41 +0100 | pfurla | (~pfurla@185.81.136.19) |
2021-12-15 00:24:02 +0100 | <[itchyjunk]> | Right, i don't know Haskell (and much programming in general). |
2021-12-15 00:24:15 +0100 | <monochrom> | Learn programming first? :) |
2021-12-15 00:24:49 +0100 | <[itchyjunk]> | i think people pick up `algo and datascructure` in their journey to learn programming |
2021-12-15 00:24:49 +0100 | pfurla | (~pfurla@185.81.136.19) (Read error: Connection reset by peer) |
2021-12-15 00:24:51 +0100 | <monochrom> | In universities, data structure and algorithms are usually considered at least 2nd-year course(s), and even multiple courses. |
2021-12-15 00:25:07 +0100 | <[itchyjunk]> | well, if i was in uni, it would be my next course. |
2021-12-15 00:25:21 +0100 | <[itchyjunk]> | I just got done with the `Accelerated intro to OOP` |
2021-12-15 00:25:27 +0100 | <monochrom> | This means it requires the student to have spent 1 year on imperative and/or functional programming at the beginner level. |
2021-12-15 00:25:44 +0100 | <[itchyjunk]> | but i won't be taking the `data structure and algo` course but wanted to dabble with it a bit at least |
2021-12-15 00:26:37 +0100 | <monochrom> | Well if you have completed OOP-based beginner programming, you're ready for a data structure and algorithm course that presents imperative data structures and algorithms. |
2021-12-15 00:26:49 +0100 | snake | (~snake@user/snake) |
2021-12-15 00:26:54 +0100 | <monochrom> | which means not Haskell. |
2021-12-15 00:27:00 +0100 | <[itchyjunk]> | ah |
2021-12-15 00:27:09 +0100 | <[itchyjunk]> | So I should go with Java or maybe python? |
2021-12-15 00:27:13 +0100 | pfurla | (~pfurla@2804:18:5854:5897:2c6f:9eef:289e:85ce) |
2021-12-15 00:27:19 +0100 | <snake> | i just realized that whatever you print from an IO() function is also the value of that function when used in an assignment expression |
2021-12-15 00:27:34 +0100 | <nosewings> | Yeah, the other thing is that the structures/algorithms commonly used in Haskell are sometimes different from wht you might see in other languages |
2021-12-15 00:27:39 +0100 | <snake> | what if you wanted to print debug messages in between tho |
2021-12-15 00:27:40 +0100 | <monochrom> | Haskell is a good choice for a functional data structure and algorithm course, but only if you have already trained with Haskell or SML or Scheme or... |
2021-12-15 00:28:12 +0100 | <[itchyjunk]> | I thought maybe i could kill infinitely many birds at once by doing this in haskell |
2021-12-15 00:28:30 +0100 | <[itchyjunk]> | How would you learn haskell without dabbeling with these though? |
2021-12-15 00:28:37 +0100 | <snake> | itchyjunk i recommend either java or python |
2021-12-15 00:28:41 +0100 | <[itchyjunk]> | How do you first learn programming then come back to it |
2021-12-15 00:28:43 +0100 | <geekosaur> | snake: what? the result is by definition () |
2021-12-15 00:28:47 +0100 | <snake> | i dislike haskell (but here i am) |
2021-12-15 00:28:49 +0100 | CiaoSen | (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2021-12-15 00:28:53 +0100 | <[itchyjunk]> | Maybe i should get my python going on then. |
2021-12-15 00:28:58 +0100 | teo | (~teo@user/teo) (Ping timeout: 260 seconds) |
2021-12-15 00:29:00 +0100 | <snake> | geekosaur, huh, well its working check it out: |
2021-12-15 00:29:02 +0100 | <monochrom> | The human brain is weaker than the computer. The human brain blocks at information overload where the computer can productively interleave and manage. |
2021-12-15 00:29:14 +0100 | <geekosaur> | % let x = putStrLn "hello, world"; print x |
2021-12-15 00:29:14 +0100 | <snake> | let x = getNumbers "input-day-6.txt" |
2021-12-15 00:29:14 +0100 | <yahb> | geekosaur: ; <interactive>:125:41: error: parse error (possibly incorrect indentation or mismatched brackets) |
2021-12-15 00:29:22 +0100 | <nosewings> | Python's a good language to know, even it it's completely unprincipled |
2021-12-15 00:29:35 +0100 | <geekosaur> | % let x = putStrLn "hello, world" in print x |
2021-12-15 00:29:35 +0100 | <yahb> | geekosaur: ; <interactive>:126:36: error:; * No instance for (Show (IO ())) arising from a use of `print'; * In the expression: print x; In the expression: let x = putStrLn "hello, world" in print x; In an equation for `it': it = let x = putStrLn "hello, world" in print x |
2021-12-15 00:29:43 +0100 | <monochrom> | Don't use your brain to build multiple dependencies just because cabal can. |
2021-12-15 00:29:45 +0100 | <snake> | stahp |
2021-12-15 00:29:50 +0100 | AlexNoo_ | (~AlexNoo@178.34.151.66) |
2021-12-15 00:29:57 +0100 | <geekosaur> | the second one is correct, x is a value of type IO () |
2021-12-15 00:29:58 +0100 | <snake> | geekosaur, i did it in ghci actually |
2021-12-15 00:30:08 +0100 | <geekosaur> | if I unwrap it by using do, it's a value of type () |
2021-12-15 00:30:09 +0100 | <snake> | let me try with --make |
2021-12-15 00:30:16 +0100 | <dibblego> | that's ghci evaluating the IO value |
2021-12-15 00:30:19 +0100 | <nosewings> | ghci automatically runs IO actions |
2021-12-15 00:30:20 +0100 | <geekosaur> | the % invokes yahb, which is ghci |
2021-12-15 00:30:27 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 276 seconds) |
2021-12-15 00:30:49 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) |
2021-12-15 00:31:33 +0100 | <geekosaur> | % putStrLn "hello, world" >>= print |
2021-12-15 00:31:33 +0100 | <yahb> | geekosaur: hello, world; () |
2021-12-15 00:31:43 +0100 | Alex_test | (~al_test@178.34.163.33) (Ping timeout: 256 seconds) |
2021-12-15 00:31:53 +0100 | <geekosaur> | the () is from the `print` |
2021-12-15 00:32:51 +0100 | AlexZenon | (~alzenon@178.34.163.33) (Ping timeout: 256 seconds) |
2021-12-15 00:33:38 +0100 | AlexNoo | (~AlexNoo@178.34.163.33) (Ping timeout: 260 seconds) |
2021-12-15 00:34:17 +0100 | <snake> | yeah it doesn't work with --make at all |
2021-12-15 00:34:23 +0100 | <snake> | so what should i do to return a value |
2021-12-15 00:34:32 +0100 | <snake> | from a file |
2021-12-15 00:34:49 +0100 | <geekosaur> | you'd have to show us some context but probably `pure` |
2021-12-15 00:34:55 +0100 | <snake> | sure |
2021-12-15 00:35:06 +0100 | <janus> | % readFile "/proc/self/cmdline" |
2021-12-15 00:35:06 +0100 | <yahb> | janus: "/srv/sandbox/root/usr/lib/ghc-9.0.1/bin/ghc\NUL-B/srv/sandbox/root/usr/lib/ghc-9.0.1\NUL--interactive\NUL-v0\NUL-ghci-script\NUL/srv/sandbox/root/usr/lib/run/ghci-init\NUL-tmpdir\NUL/srv/sandbox/root/data/tmp/\NUL-odir\NUL/srv/sandbox/root/data/tmp/\NUL-hidir\NUL/srv/sandbox/root/data/tmp/\NUL-ignore-dot-ghci\NUL-package\NULghc\NUL+RTS\NUL-M200M\NUL-V0\NUL-C0\NUL-K100M\NUL" |
2021-12-15 00:35:45 +0100 | <snake> | https://dpaste.com/DLVAHS92Q |
2021-12-15 00:36:13 +0100 | <snake> | janus, oh |
2021-12-15 00:36:17 +0100 | <janus> | it would be easier just to read it all at once if it fits in memory... |
2021-12-15 00:36:22 +0100 | <janus> | it's a tradeoff, i guess |
2021-12-15 00:36:22 +0100 | <snake> | yeah |
2021-12-15 00:36:31 +0100 | <snake> | no i didnt see that in any tutorials |
2021-12-15 00:36:31 +0100 | <geekosaur> | yeh, you want pure |
2021-12-15 00:36:45 +0100 | <geekosaur> | specifically `pure nums` |
2021-12-15 00:37:06 +0100 | YehoshuaPesachWa | (~yehoshuap@2001:470:69fc:105::a5f) |
2021-12-15 00:37:43 +0100 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 250 seconds) |
2021-12-15 00:37:49 +0100 | Alex_test | (~al_test@178.34.151.66) |
2021-12-15 00:38:03 +0100 | AlexZenon | (~alzenon@178.34.151.66) |
2021-12-15 00:38:21 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
2021-12-15 00:38:22 +0100 | <glguy> | YehoshuaPesachWa: welcome |
2021-12-15 00:38:42 +0100 | <YehoshuaPesachWa> | Thanks! |
2021-12-15 00:39:44 +0100 | <snake> | geekosaur, wat |
2021-12-15 00:39:55 +0100 | <snake> | i am trying to google for an example of pure and getting a lot of philosophy |
2021-12-15 00:40:19 +0100 | <nosewings> | snake, what are you actually trying to do on line 20? |
2021-12-15 00:40:26 +0100 | <snake> | *shrug* |
2021-12-15 00:40:30 +0100 | <snake> | dunno |
2021-12-15 00:40:42 +0100 | <snake> | oh |
2021-12-15 00:40:42 +0100 | <janus> | snake: do you know what type classes are? |
2021-12-15 00:40:51 +0100 | <snake> | nosewings, i want an [Int] or something like that |
2021-12-15 00:40:56 +0100 | pfurla_ | (~pfurla@177.79.126.48) |
2021-12-15 00:41:05 +0100 | <snake> | janus, sorta, derek banas mentioned that in his youtube tutorial for haskell |
2021-12-15 00:41:08 +0100 | <nosewings> | oh, so you want to return that from getNumbers |
2021-12-15 00:41:12 +0100 | <snake> | like Show |
2021-12-15 00:41:17 +0100 | <snake> | nosewings, yeah |
2021-12-15 00:41:21 +0100 | jespada | (~jespada@87.74.33.157) |
2021-12-15 00:41:30 +0100 | <nosewings> | so you need to change the type to getNumbers :: String -> IO [Int] |
2021-12-15 00:41:52 +0100 | <nosewings> | and then at the end of the function put "return nums" or "pure nums" (same thing) |
2021-12-15 00:42:07 +0100 | <janus> | snake: you should read a proper book explaining these concepts from the start. they usually will explain the Applicative type class which is what pure is contained in |
2021-12-15 00:42:52 +0100 | <snake> | what proper book |
2021-12-15 00:43:12 +0100 | <janus> | @where books |
2021-12-15 00:43:12 +0100 | <lambdabot> | https://www.extrema.is/articles/haskell-books, see also @where LYAH, RWH, YAHT, SOE, HR, PIH, TFwH, wikibook, PCPH, HPFFP, HTAC, TwT, FoP, PFAD, WYAH, non-haskell-books |
2021-12-15 00:43:50 +0100 | <geekosaur> | http://www.vex.net/~trebla/haskell/IO.xhtml |
2021-12-15 00:44:25 +0100 | pfurla | (~pfurla@2804:18:5854:5897:2c6f:9eef:289e:85ce) (Ping timeout: 252 seconds) |
2021-12-15 00:44:57 +0100 | <snake> | This book will help you learn HASKELL very easily. In this book, you will learn HASKELL from scratch and discover the FULL BLUEPRINT ON HOW TO MOVE from a beginner to an expert in HASKELL, how to avoid most mistakes that most people make in HASKELL, how to become a PRO in HASKELL, and how to avoid most errors in HASKELL. |
2021-12-15 00:45:03 +0100 | <snake> | nice |
2021-12-15 00:46:03 +0100 | <janus> | snake: i would go for one that isn't self-published... |
2021-12-15 00:46:45 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) |
2021-12-15 00:47:02 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) (Remote host closed the connection) |
2021-12-15 00:47:26 +0100 | <snake> | o |
2021-12-15 00:47:39 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) |
2021-12-15 00:47:47 +0100 | <snake> | yeah it seemed like a sales pitch |
2021-12-15 00:49:32 +0100 | jgeerds | (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 240 seconds) |
2021-12-15 00:49:59 +0100 | <snake> | you guys must read a lot |
2021-12-15 00:50:03 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
2021-12-15 00:50:53 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2021-12-15 00:54:23 +0100 | <janus> | most of these books contain similar content, i don't think most people have read more than one or two |
2021-12-15 00:54:55 +0100 | <nosewings> | I mostly just read blogs |
2021-12-15 00:55:27 +0100 | <geekosaur> | I haven't read any of them, I used the so-called Gentle Introduction (which commonly is not considered very gentle at all) |
2021-12-15 00:55:42 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) (Quit: Client closed) |
2021-12-15 00:56:04 +0100 | <geekosaur> | but I have quite a lot of programming experience, including with other functional languages |
2021-12-15 00:56:14 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) |
2021-12-15 00:56:28 +0100 | <yuyua32> | Im trying to write a function which finds the index of a value in haskell |
2021-12-15 00:56:33 +0100 | <yuyua32> | returns * |
2021-12-15 00:56:40 +0100 | <yuyua32> | so if I have |
2021-12-15 00:56:45 +0100 | kranius_ | (~kranius@222.186.245.213.rev.sfr.net) |
2021-12-15 00:56:47 +0100 | <yuyua32> | Index n (x:xs) |
2021-12-15 00:58:02 +0100 | <yuyua32> | | n == x = ? |
2021-12-15 00:58:27 +0100 | <snake> | 0 |
2021-12-15 00:58:35 +0100 | <yuyua32> | but how does that return the index |
2021-12-15 00:58:45 +0100 | <hpc> | it returns the index of n in that particular list |
2021-12-15 00:58:47 +0100 | <snake> | if its the first character (x) then the index is 0 |
2021-12-15 00:58:52 +0100 | <EvanR> | if the first thing in the list is the thing you want, it's zero by definition |
2021-12-15 00:58:56 +0100 | <yuyua32> | oh right thats true |
2021-12-15 00:58:59 +0100 | <yuyua32> | but I also have |
2021-12-15 00:59:02 +0100 | <hpc> | when n == x, n is definitely at the start of (x:xs) |
2021-12-15 00:59:04 +0100 | <snake> | otherwise = Index (xs) |
2021-12-15 00:59:07 +0100 | <snake> | er 1 + |
2021-12-15 00:59:08 +0100 | <yuyua32> | | otherwise = index (xs y) |
2021-12-15 00:59:19 +0100 | <yuyua32> | sorry yeah | otherwise = 1 + index (xs y) |
2021-12-15 00:59:22 +0100 | <hpc> | snake: suppose you have a list, xs |
2021-12-15 00:59:25 +0100 | <snake> | yup you got it |
2021-12-15 00:59:27 +0100 | <hpc> | and n is at index i in xs |
2021-12-15 00:59:33 +0100 | <hpc> | where is n in (x:xs)? |
2021-12-15 00:59:40 +0100 | <hpc> | ah, yep |
2021-12-15 00:59:57 +0100 | <hpc> | the parens are wrong though |
2021-12-15 01:00:02 +0100 | <yuyua32> | so which part of the code returns the index? |
2021-12-15 01:00:19 +0100 | <snake> | yuyua32, if its not in the list tho then you will get the length of the string which is wrong |
2021-12-15 01:00:26 +0100 | <snake> | i did this yesterday trying to look for commas |
2021-12-15 01:00:32 +0100 | <hpc> | there's no "returning", the entire right hand expression is the index |
2021-12-15 01:00:42 +0100 | max22- | (~maxime@2a01cb088335980077ae04132abb6848.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
2021-12-15 01:00:59 +0100 | <hpc> | index n xs = the actual index, as whatever computation it happens to be |
2021-12-15 01:01:23 +0100 | <hpc> | ^ is how all functions are written |
2021-12-15 01:01:47 +0100 | <yuyua32> | oh right yeah thats right] |
2021-12-15 01:01:54 +0100 | <snake> | i dont mean to brag but i have a huge ego, i got a 20/20 on my recursion quiz the other day |
2021-12-15 01:01:58 +0100 | <yuyua32> | jheez |
2021-12-15 01:02:04 +0100 | <yuyua32> | so you'll be handy for this question |
2021-12-15 01:02:06 +0100 | <yuyua32> | xp |
2021-12-15 01:02:12 +0100 | <snake> | im trying |
2021-12-15 01:02:55 +0100 | <yuyua32> | index n (x:xs) |
2021-12-15 01:02:56 +0100 | <yuyua32> | | n == x = 0 |
2021-12-15 01:02:56 +0100 | <yuyua32> | | otherwise = 1 + index (n xs) |
2021-12-15 01:03:07 +0100 | <hpc> | no parens around (n xs) |
2021-12-15 01:03:08 +0100 | <yuyua32> | thats not right but what would go instead of the 0 |
2021-12-15 01:03:14 +0100 | <yuyua32> | oh right |
2021-12-15 01:03:25 +0100 | <snake> | that's right |
2021-12-15 01:03:30 +0100 | <snake> | besides the parens |
2021-12-15 01:03:35 +0100 | <yuyua32> | why is there a 1 +? |
2021-12-15 01:03:41 +0100 | <yuyua32> | because of 0 start? |
2021-12-15 01:03:43 +0100 | <snake> | each recursion adds 1 |
2021-12-15 01:03:59 +0100 | <snake> | if it wasn't at zero it might be +1 from 0 (relatively) |
2021-12-15 01:04:11 +0100 | <hpc> | yuyua32: if 'b' is at index 1 in "abc", it's at index 2 in "*abc" no matter what '*' is |
2021-12-15 01:04:32 +0100 | <yuyua32> | ah got it |
2021-12-15 01:04:37 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 01:05:01 +0100 | <hpc> | you can pop that definition into ghci and try it out |
2021-12-15 01:05:03 +0100 | <hpc> | :{ |
2021-12-15 01:05:04 +0100 | <hpc> | paste code |
2021-12-15 01:05:05 +0100 | <snake> | recursion is basically: "let's check if the first character matches, and if it doesn't, well we'll ask someone else to look for it. oh look this function does that, lets call it" and it's the same function you're in |
2021-12-15 01:05:05 +0100 | <hpc> | :} |
2021-12-15 01:05:09 +0100 | <yuyua32> | yep just about to try it |
2021-12-15 01:05:29 +0100 | <snake> | when the recursion unwinds it just adds 1 each stack frame that gets freed |
2021-12-15 01:06:09 +0100 | <yuyua32> | oh shit beautiful |
2021-12-15 01:06:21 +0100 | <EvanR> | haskell lets you use equational reasoning to see why a function works: given your code above you can be sure that e.g. index 4 [4,6,7,8] = index 4 (4:6:7:8:[]) = 0 |
2021-12-15 01:06:34 +0100 | emf_ | (~emf@2620:10d:c091:480::1:9cd9) (Read error: Connection reset by peer) |
2021-12-15 01:06:37 +0100 | epolanski | (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2021-12-15 01:06:47 +0100 | emf | (~emf@2603-6080-9403-11bf-0000-0000-0000-0009.res6.spectrum.com) |
2021-12-15 01:06:52 +0100 | <yuyua32> | haskell is so elegant |
2021-12-15 01:06:55 +0100 | <EvanR> | and index 6 (4:6:7:8:[]) = 1 + index 6 (6:7:8:[]) = 1 + 0 = 1 |
2021-12-15 01:07:07 +0100 | <hpc> | there's one possibility that's missing from your code though, unless i missed it |
2021-12-15 01:07:09 +0100 | <snake> | is it really? |
2021-12-15 01:07:41 +0100 | <yuyua32> | @hpc if the element isnt in the list? |
2021-12-15 01:07:41 +0100 | <lambdabot> | Maybe you meant: src rc pl ghc |
2021-12-15 01:07:45 +0100 | <hpc> | yep |
2021-12-15 01:08:05 +0100 | <yuyua32> | would that just be y `notElem xs = |
2021-12-15 01:08:08 +0100 | <EvanR> | if you squint, you can also see how your function will perform kind of bad on a long list |
2021-12-15 01:08:18 +0100 | <hpc> | try stepping through index '*' "abc" in your head |
2021-12-15 01:08:31 +0100 | <EvanR> | index 99 [0..99] = 1+1+1+1+...+0 |
2021-12-15 01:08:34 +0100 | <yuyua32> | whats '*' ? |
2021-12-15 01:08:40 +0100 | <hpc> | just the character * |
2021-12-15 01:08:44 +0100 | <hpc> | > '*' |
2021-12-15 01:08:46 +0100 | <lambdabot> | '*' |
2021-12-15 01:08:46 +0100 | <hpc> | > 'a' |
2021-12-15 01:08:48 +0100 | <lambdabot> | 'a' |
2021-12-15 01:08:48 +0100 | <yuyua32> | ah right |
2021-12-15 01:09:06 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 01:09:07 +0100 | <snake> | > '\x41' |
2021-12-15 01:09:08 +0100 | <lambdabot> | 'A' |
2021-12-15 01:09:15 +0100 | <snake> | sorry showing off |
2021-12-15 01:09:42 +0100 | <yuyua32> | hpc what do you mean stepping through * in abc? |
2021-12-15 01:10:07 +0100 | pfurla_ | (~pfurla@177.79.126.48) (Read error: No route to host) |
2021-12-15 01:10:11 +0100 | <hpc> | just take the expression (index '*' "abc") and think through what it would calculate without actually putting it in your computer |
2021-12-15 01:10:13 +0100 | <snake> | yuyua32, he meant search for the index of * in the string "abc" |
2021-12-15 01:10:49 +0100 | <hpc> | it's a good exercise, and this is a perfect problem to try it out on |
2021-12-15 01:10:50 +0100 | <snake> | i think the function should throw an exception |
2021-12-15 01:11:05 +0100 | <yuyua32> | yeah |
2021-12-15 01:11:06 +0100 | <EvanR> | index '*' ('a':'b':'c':[]) |
2021-12-15 01:11:10 +0100 | <EvanR> | = |
2021-12-15 01:11:11 +0100 | <yuyua32> | thats it |
2021-12-15 01:11:12 +0100 | <EvanR> | ? |
2021-12-15 01:11:14 +0100 | <snake> | it's an exceptional circumstance, the star isn't in the list |
2021-12-15 01:11:28 +0100 | <yuyua32> | so some error will be thrown |
2021-12-15 01:11:39 +0100 | <snake> | yup just crash when that happens |
2021-12-15 01:11:42 +0100 | pfurla | (~pfurla@185.81.136.21) |
2021-12-15 01:11:47 +0100 | <yuyua32> | I was thinking to fix that I could just do y `notElemen` xs |
2021-12-15 01:12:12 +0100 | <EvanR> | that's not the whole story |
2021-12-15 01:12:29 +0100 | <snake> | yup programmers will never use your function before checking if y is an element of the list so you can be sure it will never crash when used properly |
2021-12-15 01:12:37 +0100 | <hpc> | what error does it produce, and what line does it happen on? |
2021-12-15 01:13:03 +0100 | <yuyua32> | Non-exhaustive patterns in function index |
2021-12-15 01:13:19 +0100 | <EvanR> | if the list is very long or infinite, then sticking a containment test in front is kind of silly |
2021-12-15 01:13:28 +0100 | <yuyua32> | its not gonna be long |
2021-12-15 01:13:32 +0100 | <EvanR> | in the infinite case, it's just wrong |
2021-12-15 01:13:41 +0100 | <yuyua32> | im guessing it happends at 1 + index n xs |
2021-12-15 01:13:43 +0100 | <yuyua32> | when xs is empty |
2021-12-15 01:13:49 +0100 | <yuyua32> | so |
2021-12-15 01:13:54 +0100 | <snake> | maybe you can return a tuple (Bool, index) |
2021-12-15 01:13:56 +0100 | <yuyua32> | | index n [] = 0 |
2021-12-15 01:14:01 +0100 | <yuyua32> | would that work? |
2021-12-15 01:14:11 +0100 | <snake> | idk |
2021-12-15 01:14:15 +0100 | <snake> | gonna shut up now |
2021-12-15 01:14:22 +0100 | <EvanR> | 0 sounds like a false positive |
2021-12-15 01:14:32 +0100 | <yuyua32> | shit true |
2021-12-15 01:14:35 +0100 | <nosewings> | Probably not, because then you wouldn't be able to tell the difference between an element at the front and one not in it at all |
2021-12-15 01:14:39 +0100 | <nosewings> | You could return -1 |
2021-12-15 01:14:44 +0100 | <yuyua32> | got it |
2021-12-15 01:14:45 +0100 | <hpc> | depends on what you want index to return - maybe you decide that if (index n xs) > length xs, that means "not found" |
2021-12-15 01:14:49 +0100 | <EvanR> | -1, classic |
2021-12-15 01:14:55 +0100 | <hpc> | FILE_NOT_FOUND |
2021-12-15 01:14:56 +0100 | <snake> | yeah good ol -1 |
2021-12-15 01:14:57 +0100 | <nosewings> | The "real" solution is to use Maybe |
2021-12-15 01:15:02 +0100 | kranius_ | (~kranius@222.186.245.213.rev.sfr.net) (Ping timeout: 265 seconds) |
2021-12-15 01:15:03 +0100 | <geekosaur> | ^ |
2021-12-15 01:15:09 +0100 | <hpc> | but yeah, Maybe is the way here |
2021-12-15 01:15:21 +0100 | <snake> | is Maybe like Some or std::optional ? |
2021-12-15 01:15:25 +0100 | <hpc> | yes |
2021-12-15 01:15:27 +0100 | <hpc> | @src Maybe |
2021-12-15 01:15:28 +0100 | <lambdabot> | data Maybe a = Nothing | Just a |
2021-12-15 01:15:35 +0100 | <yuyua32> | as in maybe its there maybe its not XD |
2021-12-15 01:15:43 +0100 | <nosewings> | Maybe is exactly std::optional |
2021-12-15 01:16:05 +0100 | <nosewings> | (or, rather, std::optional is Maybe) |
2021-12-15 01:16:21 +0100 | machinedgod | (~machinedg@24.105.81.50) |
2021-12-15 01:16:33 +0100 | <hpc> | your index function gets a bit uglier, when you recursively call index you don't get a simple number anymore |
2021-12-15 01:16:51 +0100 | <yuyua32> | im gonna be calling this index in another recursive function |
2021-12-15 01:16:58 +0100 | <hpc> | but maybe there are some other nice functions in scope that could make that easier |
2021-12-15 01:16:59 +0100 | <yuyua32> | so index is gonna be called multiple times til the end |
2021-12-15 01:17:37 +0100 | <yuyua32> | so I cant return -1 |
2021-12-15 01:17:39 +0100 | <geekosaur> | had you given any thought to how that function deals with "not found"? |
2021-12-15 01:17:59 +0100 | <EvanR> | ah that's a great reason to not use -1 |
2021-12-15 01:18:00 +0100 | <hpc> | geekosaur: that's what we're currently discussing :P |
2021-12-15 01:18:06 +0100 | <yuyua32> | ye |
2021-12-15 01:18:11 +0100 | <glguy> | is the answer "set errno"? |
2021-12-15 01:18:29 +0100 | <EvanR> | do whatever division by zero does |
2021-12-15 01:18:32 +0100 | <EvanR> | (don't do that) |
2021-12-15 01:18:37 +0100 | jkaye | (~jkaye@2601:281:8300:7530:e7c5:c36d:91ad:b90f) |
2021-12-15 01:18:38 +0100 | <yuyua32> | funnny |
2021-12-15 01:18:53 +0100 | <yuyua32> | i might just return the length of the list |
2021-12-15 01:19:04 +0100 | <hpc> | drop down to pointer manipulation, make the list how /you/ want it! |
2021-12-15 01:19:13 +0100 | <hpc> | mutate the immutable |
2021-12-15 01:19:16 +0100 | <glguy> | hpc: it adds the element to the end of the list |
2021-12-15 01:19:19 +0100 | <hpc> | maximum evil |
2021-12-15 01:19:24 +0100 | <glguy> | found it! |
2021-12-15 01:19:28 +0100 | <EvanR> | lol |
2021-12-15 01:19:35 +0100 | <EvanR> | very convenient |
2021-12-15 01:20:26 +0100 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
2021-12-15 01:20:29 +0100 | <hpc> | this is how you end up with acme-php's "notElem x xs = elem (not x) xs" |
2021-12-15 01:20:33 +0100 | <snake> | glguy, lmao |
2021-12-15 01:20:40 +0100 | <snake> | oh man you guys are funny |
2021-12-15 01:21:06 +0100 | <EvanR> | use principle of most surprise |
2021-12-15 01:22:21 +0100 | madjestic | (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 250 seconds) |
2021-12-15 01:26:10 +0100 | <yuyua32> | this is just for testing |
2021-12-15 01:26:14 +0100 | <yuyua32> | but whats wrong this |
2021-12-15 01:26:16 +0100 | <yuyua32> | with* |
2021-12-15 01:26:17 +0100 | <yuyua32> | nsplit xs x |
2021-12-15 01:26:18 +0100 | <yuyua32> | | x `notElem` xs = [length xs] |
2021-12-15 01:26:18 +0100 | <yuyua32> | | otherwise = index xs x |
2021-12-15 01:26:25 +0100 | <yuyua32> | the last line |
2021-12-15 01:26:26 +0100 | emf | (~emf@2603-6080-9403-11bf-0000-0000-0000-0009.res6.spectrum.com) (Quit: emf) |
2021-12-15 01:26:32 +0100 | <yuyua32> | giving me some sort of error |
2021-12-15 01:27:35 +0100 | <hpc> | what's the type of nsplit? |
2021-12-15 01:27:40 +0100 | <geekosaur> | try putting a type signature on the definition of nsplit |
2021-12-15 01:28:18 +0100 | <yuyua32> | list -> int -> int |
2021-12-15 01:28:22 +0100 | <yuyua32> | ohh |
2021-12-15 01:28:23 +0100 | <yuyua32> | I see |
2021-12-15 01:29:10 +0100 | <snake> | ooh i got it |
2021-12-15 01:29:22 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-169.elisa-laajakaista.fi) (Quit: Leaving.) |
2021-12-15 01:31:00 +0100 | <yuyua32> | i swear if I stay here any longer ill get too good and be employed by some haskell company |
2021-12-15 01:31:25 +0100 | <snake> | follow your dreams |
2021-12-15 01:31:45 +0100 | <snake> | not sure why you'd dream of writing haskell but you do you |
2021-12-15 01:32:24 +0100 | <hpc> | i mostly just dream of falling asleep |
2021-12-15 01:32:27 +0100 | <hpc> | recursion is dangerous, folks |
2021-12-15 01:32:36 +0100 | <snake> | hahaha |
2021-12-15 01:33:19 +0100 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2021-12-15 01:33:25 +0100 | <monochrom> | My dream is to retire from some haskell company! |
2021-12-15 01:33:34 +0100 | burnsidesLlama | (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-12-15 01:33:53 +0100 | <EvanR> | you have a problem with our company? |
2021-12-15 01:34:07 +0100 | burnsidesLlama | (~burnsides@client-8-91.eduroam.oxuni.org.uk) |
2021-12-15 01:34:25 +0100 | <hpc> | it sounds like he has a solution for our company |
2021-12-15 01:34:42 +0100 | <monochrom> | No, I just mean dreaming for enjoying retirement life and pension etc. |
2021-12-15 01:34:46 +0100 | <hpc> | :P |
2021-12-15 01:35:37 +0100 | <monochrom> | Aim high. Dream lazy. Don't just dream of employment. Dream of all the benefit after! |
2021-12-15 01:36:51 +0100 | <hpc> | it's an inspiring tale |
2021-12-15 01:37:04 +0100 | <hpc> | if you work very hard, someday you too might be able to life the good life in weak head normal form |
2021-12-15 01:37:24 +0100 | <monochrom> | haha |
2021-12-15 01:37:32 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2021-12-15 01:38:35 +0100 | burnsidesLlama | (~burnsides@client-8-91.eduroam.oxuni.org.uk) (Ping timeout: 256 seconds) |
2021-12-15 01:39:37 +0100 | pfurla_ | (~pfurla@2804:18:5804:c94c:6161:1466:1870:aecb) |
2021-12-15 01:39:56 +0100 | emf | (~emf@2603-6080-9403-11bf-0000-0000-0000-0009.res6.spectrum.com) |
2021-12-15 01:40:53 +0100 | waleee | (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 252 seconds) |
2021-12-15 01:41:10 +0100 | euandreh | (~euandreh@2804:14c:33:9fe5:297c:42b:53ca:ec88) |
2021-12-15 01:42:21 +0100 | notzmv | (~zmv@user/notzmv) |
2021-12-15 01:43:02 +0100 | pfurla | (~pfurla@185.81.136.21) (Ping timeout: 240 seconds) |
2021-12-15 01:43:51 +0100 | emf_ | (~emf@2620:10d:c091:480::1:305b) |
2021-12-15 01:45:08 +0100 | emf | (~emf@2603-6080-9403-11bf-0000-0000-0000-0009.res6.spectrum.com) (Ping timeout: 268 seconds) |
2021-12-15 01:46:01 +0100 | <yuyua32> | ive developed my function a bit more |
2021-12-15 01:46:02 +0100 | <yuyua32> | index (x:xs) n |
2021-12-15 01:46:03 +0100 | <yuyua32> | | n == x = 0 |
2021-12-15 01:46:03 +0100 | <yuyua32> | | otherwise = 1 + index xs n |
2021-12-15 01:46:04 +0100 | <yuyua32> | -- nsplit [] _ = ([1],[2]) |
2021-12-15 01:46:04 +0100 | <yuyua32> | nsplit xs x |
2021-12-15 01:46:05 +0100 | <yuyua32> | | x `notElem` xs = 1 |
2021-12-15 01:46:05 +0100 | <yuyua32> | | otherwise = length (fst(splitAt (index xs x) xs)) : |
2021-12-15 01:46:27 +0100 | <yuyua32> | so basically it finds a certain character and splits everything before it and returns the length of before list |
2021-12-15 01:47:08 +0100 | <yuyua32> | but I want it to keep going to next n in the list if it exists and find the length i.e |
2021-12-15 01:47:31 +0100 | <yuyua32> | [1,2,3,3,4,2,4,5] 0 |
2021-12-15 01:47:44 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) |
2021-12-15 01:47:55 +0100 | <yuyua32> | [1,2,3,3,4,2,4,5] 2 would return [1,3,2] |
2021-12-15 01:48:54 +0100 | <yuyua32> | so how should I access the after of splitAt so I can recurse through it |
2021-12-15 01:48:56 +0100 | <yuyua32> | if that makes sense? |
2021-12-15 01:48:58 +0100 | mvk | (~mvk@2607:fea8:5cdd:f000::9788) |
2021-12-15 01:49:13 +0100 | megaTherion | (~therion@unix.io) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-12-15 01:49:13 +0100 | <yuyua32> | so snd splitAt? |
2021-12-15 01:49:38 +0100 | <yuyua32> | but that wouldnt work either |
2021-12-15 01:53:08 +0100 | dsrt^ | (~dsrt@wsip-98-188-240-142.mc.at.cox.net) (Remote host closed the connection) |
2021-12-15 01:53:37 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-12-15 01:54:38 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-12-15 01:57:10 +0100 | acidjnk | (~acidjnk@p200300d0c7271e736483cc3bf5018c54.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2021-12-15 01:58:55 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
2021-12-15 01:59:00 +0100 | <snake> | yuyua32, i dont understand any of that possibly because im sleep deprived for a few weeks now, cicadian rhythm is out of whack but im ok. anyways do you want to see how i did it? |
2021-12-15 01:59:02 +0100 | <snake> | https://dpaste.com/H2V2P3M75 |
2021-12-15 01:59:22 +0100 | <EvanR> | is this like, a computer class that you're both in |
2021-12-15 01:59:39 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2021-12-15 01:59:41 +0100 | <snake> | no if this was a class i'd hate my life |
2021-12-15 01:59:48 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Client Quit) |
2021-12-15 01:59:56 +0100 | <snake> | how will i get to japan if i needed to get a good grade on this |
2021-12-15 02:00:44 +0100 | Guest19 | (~Guest19@n110-33-34-202.hum1.act.optusnet.com.au) |
2021-12-15 02:00:48 +0100 | <yuyua32> | I wrote it |
2021-12-15 02:00:57 +0100 | <yuyua32> | but its the ugliest code ive ever seen |
2021-12-15 02:01:08 +0100 | <yuyua32> | and has about 20 flaws |
2021-12-15 02:01:36 +0100 | <yuyua32> | EvanR its not a class just excersices to learn haskell |
2021-12-15 02:01:57 +0100 | <snake> | EvanR, did you see my commented out code? idk what was wrong with it but the compiler complaint |
2021-12-15 02:02:18 +0100 | <snake> | i probably jsut need to crack open one of those books, "learn you a haskell for great good" has nice pictures |
2021-12-15 02:03:26 +0100 | <EvanR> | if I don't feel like I understand some code, I go back and see if I can break it down into more functions, smaller functions that make sense in isolation |
2021-12-15 02:03:47 +0100 | <snake> | oop i forgot the pretty print function, it basically just did if isJust then print else print none |
2021-12-15 02:03:54 +0100 | <EvanR> | and then test those functions for sanity check |
2021-12-15 02:04:00 +0100 | <snake> | EvanR, ah |
2021-12-15 02:04:16 +0100 | <EvanR> | then I can start to put the pieces together into something more grandiose |
2021-12-15 02:06:10 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) (Remote host closed the connection) |
2021-12-15 02:06:30 +0100 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2021-12-15 02:06:45 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) |
2021-12-15 02:06:46 +0100 | <snake> | yeah i've been a bit distracted from aoc2021 because im just wanting to understand haskell, it's so different |
2021-12-15 02:06:57 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) (Quit: Client closed) |
2021-12-15 02:06:58 +0100 | <snake> | i guess aoc2021 is more grandiose than i'm ready for |
2021-12-15 02:07:09 +0100 | <snake> | (at least in haskell) |
2021-12-15 02:07:23 +0100 | <EvanR> | as long as you can read a file you can do the first few AoCs |
2021-12-15 02:07:54 +0100 | <EvanR> | and if you can't, you paste in their example data in string literals |
2021-12-15 02:08:05 +0100 | <EvanR> | you can* |
2021-12-15 02:08:37 +0100 | <EvanR> | I heard some people paste the test data into their code somehow and skip reading a file |
2021-12-15 02:09:00 +0100 | <snake> | its just a lot, that's all, not just getting to the object of the problem, but instead ok, how does do differ from let while in etc |
2021-12-15 02:09:06 +0100 | <snake> | why is whitespace syntax etc |
2021-12-15 02:09:19 +0100 | <snake> | who's idea was this, etc |
2021-12-15 02:09:29 +0100 | <snake> | what is a monad |
2021-12-15 02:09:32 +0100 | <EvanR> | python made whitespace syntax normative, haskell's not weird anymore |
2021-12-15 02:09:38 +0100 | <snake> | haha yeah i suppose |
2021-12-15 02:10:24 +0100 | <monochrom> | If you ban "do" and use >>= directly, it is very clear why it is not "let" or "where". |
2021-12-15 02:10:36 +0100 | <monochrom> | Especially after respecting the type of >>= |
2021-12-15 02:10:44 +0100 | <snake> | what is >>= |
2021-12-15 02:11:07 +0100 | <monochrom> | As opposed to using "intuition" to ignore the exact type and handwave your way around. |
2021-12-15 02:11:07 +0100 | <EvanR> | the operator do syntax is sugar for |
2021-12-15 02:11:12 +0100 | <snake> | i was just dropping a bunch of haskell-babble i didnt think that line actually made sense |
2021-12-15 02:11:35 +0100 | <snake> | oh ok |
2021-12-15 02:11:41 +0100 | <EvanR> | [1,2,3] is sugar right, so is do syntax |
2021-12-15 02:11:44 +0100 | <monochrom> | geekosaur linked you to my tutorial so you should study it. Here it is again: http://www.vex.net/~trebla/haskell/IO.xhtml |
2021-12-15 02:11:49 +0100 | <nosewings> | "m1 >>= \x -> m2" is the same thing as "do x <- m1; m2" |
2021-12-15 02:12:12 +0100 | <snake> | ok thanks, not sure if i should start there or perhaps the learn you a haskell book |
2021-12-15 02:12:43 +0100 | <monochrom> | When I teach Haskell I teach >>=, no "do". It works great. |
2021-12-15 02:12:53 +0100 | <EvanR> | a gentle introduction is great, I don't care what anyone says https://www.haskell.org/tutorial/goodies.html |
2021-12-15 02:13:32 +0100 | <EvanR> | if it had modern css maybe people would not have forgotten about it |
2021-12-15 02:13:42 +0100 | <monochrom> | And this is not out of a one-sided bias. I once taught "do". Flopped. Students and TAs commented "yeah if you omit 'do' it's much better". |
2021-12-15 02:14:16 +0100 | <monochrom> | And yeah I learned from the Gentle Introduction too. |
2021-12-15 02:14:19 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) |
2021-12-15 02:15:16 +0100 | <yuyua32> | EvanR how would you make this functio work on strings as well |
2021-12-15 02:15:18 +0100 | <yuyua32> | index (x:xs) n |
2021-12-15 02:15:19 +0100 | <yuyua32> | | n == x = 0 |
2021-12-15 02:15:19 +0100 | <yuyua32> | | otherwise = 1 + index xs n |
2021-12-15 02:15:20 +0100 | <yuyua32> | -- nsplit [] _ = ([1],[2]) |
2021-12-15 02:15:20 +0100 | <yuyua32> | nsplit xs x |
2021-12-15 02:15:21 +0100 | <yuyua32> | | x `notElem` xs = [1] |
2021-12-15 02:15:21 +0100 | <yuyua32> | | (length (fst (splitAt (index xs x) xs))) == 0 = nsplit (tail (snd(splitAt (index xs x) xs))) x |
2021-12-15 02:15:22 +0100 | <yuyua32> | | otherwise = length (fst(splitAt (index xs x) xs)) : nsplit (tail (snd(splitAt (index xs x) xs))) x |
2021-12-15 02:15:24 +0100 | <int-e> | bind, hmm. You've got to learn the ropes (bind?) before getting your hands dirty with do-ing stuff with monads |
2021-12-15 02:15:34 +0100 | <int-e> | @where paste |
2021-12-15 02:15:34 +0100 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
2021-12-15 02:15:38 +0100 | <EvanR> | aaaaaaah use a paste site |
2021-12-15 02:15:46 +0100 | <yuyua32> | sorry will do |
2021-12-15 02:16:01 +0100 | <yuyua32> | https://paste.tomsmeding.com/wvb51sup |
2021-12-15 02:16:02 +0100 | <yuyua32> | here |
2021-12-15 02:16:07 +0100 | <EvanR> | strings are actually lists |
2021-12-15 02:16:11 +0100 | <EvanR> | so it should work? |
2021-12-15 02:16:22 +0100 | <yuyua32> | gives me this error |
2021-12-15 02:16:23 +0100 | <yuyua32> | 2:18: error: Variable not in scope: a :: Char |
2021-12-15 02:16:29 +0100 | <int-e> | I *do* like the syntactic sugar. But it's a bit too magical for beginners. |
2021-12-15 02:16:30 +0100 | <snake> | are String list or do you mean [Char] |
2021-12-15 02:16:39 +0100 | <yuyua32> | I mean "aabbaa" "a" |
2021-12-15 02:16:44 +0100 | <EvanR> | String = [Char] |
2021-12-15 02:16:49 +0100 | <snake> | oh |
2021-12-15 02:16:54 +0100 | <yuyua32> | sorry this was the error |
2021-12-15 02:16:55 +0100 | <yuyua32> | Couldn't match expected type ‘Char’ with actual type ‘[Char]’ |
2021-12-15 02:17:06 +0100 | <EvanR> | 'c' is a char, "c" is a string |
2021-12-15 02:17:14 +0100 | <EvanR> | see if that is the problem |
2021-12-15 02:17:31 +0100 | <yuyua32> | that was it |
2021-12-15 02:17:36 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex) |
2021-12-15 02:17:36 +0100 | <yuyua32> | amazin |
2021-12-15 02:17:38 +0100 | <yuyua32> | thanks |
2021-12-15 02:18:07 +0100 | <int-e> | :t span |
2021-12-15 02:18:08 +0100 | <lambdabot> | (a -> Bool) -> [a] -> ([a], [a]) |
2021-12-15 02:18:17 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2021-12-15 02:18:32 +0100 | euandreh | (~euandreh@2804:14c:33:9fe5:297c:42b:53ca:ec88) (Ping timeout: 240 seconds) |
2021-12-15 02:18:50 +0100 | <int-e> | > span (/= ',') "abc,def,ghi" |
2021-12-15 02:18:51 +0100 | <lambdabot> | ("abc",",def,ghi") |
2021-12-15 02:19:40 +0100 | bjobjo | (~bjobjo@user/bjobjo) (Ping timeout: 268 seconds) |
2021-12-15 02:20:18 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) (Remote host closed the connection) |
2021-12-15 02:20:50 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
2021-12-15 02:20:56 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) |
2021-12-15 02:23:39 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) (Quit: Client closed) |
2021-12-15 02:25:32 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-12-15 02:25:32 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-12-15 02:25:32 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-12-15 02:25:34 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2021-12-15 02:26:30 +0100 | acidsys | (~LSD@2.lsd.systems) (Excess Flood) |
2021-12-15 02:26:33 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) |
2021-12-15 02:27:02 +0100 | acidsys | (~LSD@2.lsd.systems) |
2021-12-15 02:27:27 +0100 | machinedgod | (~machinedg@24.105.81.50) (Ping timeout: 252 seconds) |
2021-12-15 02:29:37 +0100 | <Cale> | janus, monochrom, jackdk: my idea about using ST/some monad there is just to set something up where you can't refer to the linear thing directly at all, and all the linear things either turn into operations that secretly update a reference, or something which is implicitly carried around by the monad. |
2021-12-15 02:32:04 +0100 | Guest19 | (~Guest19@n110-33-34-202.hum1.act.optusnet.com.au) (Quit: Client closed) |
2021-12-15 02:32:53 +0100 | euandreh | (~euandreh@2804:14c:33:9fe5:80ee:faa6:7302:e610) |
2021-12-15 02:33:38 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-12-15 02:38:05 +0100 | bontaq | (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 256 seconds) |
2021-12-15 02:50:28 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) (Quit: Client closed) |
2021-12-15 02:56:39 +0100 | lbseale | (~ep1ctetus@user/ep1ctetus) (Quit: Leaving) |
2021-12-15 03:01:06 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds) |
2021-12-15 03:01:36 +0100 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) |
2021-12-15 03:02:56 +0100 | epolanski | (uid312403@id-312403.helmsley.irccloud.com) |
2021-12-15 03:04:13 +0100 | img | (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-12-15 03:04:16 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-12-15 03:04:50 +0100 | xff0x | (~xff0x@2001:1a81:5283:7b00:fc6:4766:ca7:9337) (Ping timeout: 260 seconds) |
2021-12-15 03:05:01 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-12-15 03:05:40 +0100 | img | (~img@user/img) |
2021-12-15 03:06:20 +0100 | xff0x | (~xff0x@2001:1a81:52c4:9100:e535:171:40b4:8c54) |
2021-12-15 03:07:20 +0100 | pfurla_ | (~pfurla@2804:18:5804:c94c:6161:1466:1870:aecb) (Quit: gone to sleep. ZZZzzz…) |
2021-12-15 03:08:18 +0100 | nvmd | (~nvmd@user/nvmd) (Quit: Later, nerds.) |
2021-12-15 03:09:36 +0100 | TonyStone | (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com) |
2021-12-15 03:09:38 +0100 | Megant_ | (megant@user/megant) (Ping timeout: 268 seconds) |
2021-12-15 03:10:49 +0100 | Megant | (megant@user/megant) |
2021-12-15 03:19:46 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) (Ping timeout: 260 seconds) |
2021-12-15 03:19:59 +0100 | mmhat | (~mmh@55d46318.access.ecotel.net) (Ping timeout: 250 seconds) |
2021-12-15 03:20:59 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:f5a3:3a61:fbe9:f021) (Ping timeout: 252 seconds) |
2021-12-15 03:23:12 +0100 | Guest64873 | (~bot@172-220-180-248.res.spectrum.com) |
2021-12-15 03:24:37 +0100 | Guest64873 | (~bot@172-220-180-248.res.spectrum.com) (Read error: Connection reset by peer) |
2021-12-15 03:26:32 +0100 | <snake> | "There are a few exceptions: a few things in the library perform lazy I/O. But I have not covered them, and I will not cover them. They are very hard to explain and understand correctly. They are also rarely used in practice, since they are hard to use correctly. You are not missing out. But their names are readFile, getContents, hGetContents, and interact."' |
2021-12-15 03:26:34 +0100 | <snake> | oop |
2021-12-15 03:26:58 +0100 | <snake> | thanks dr. monochrom that was a good read |
2021-12-15 03:27:08 +0100 | <snake> | i think i understand IO a little more now |
2021-12-15 03:27:12 +0100 | <nosewings> | There's nothing wrong with getContents for toy projects and experiments, imo |
2021-12-15 03:28:14 +0100 | SummerSonw | (~The_viole@203.77.49.232) |
2021-12-15 03:29:09 +0100 | <snake> | someone mentioned readFile earlier it looked ez |
2021-12-15 03:30:06 +0100 | <snake> | % readFile "/etc/passwd" |
2021-12-15 03:30:07 +0100 | <yahb> | snake: *** Exception: /etc/passwd: openFile: does not exist (No such file or directory) |
2021-12-15 03:30:42 +0100 | TonyStone | (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com) (Quit: Leaving) |
2021-12-15 03:31:02 +0100 | <snake> | % readFile "/etc/fstab" |
2021-12-15 03:31:02 +0100 | <yahb> | snake: *** Exception: /etc/fstab: openFile: does not exist (No such file or directory) |
2021-12-15 03:31:57 +0100 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
2021-12-15 03:33:56 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 03:34:32 +0100 | <snake> | is withFile preferable? |
2021-12-15 03:34:47 +0100 | ubert1 | (~Thunderbi@p200300ecdf1abb0650b4610a52e3eab2.dip0.t-ipconnect.de) |
2021-12-15 03:35:02 +0100 | ubert | (~Thunderbi@p200300ecdf1abbee60b6487a781d8af1.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
2021-12-15 03:35:02 +0100 | ubert1 | ubert |
2021-12-15 03:35:50 +0100 | TonyStone | (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com) |
2021-12-15 03:35:51 +0100 | <snake> | oh no that uses hHetContents |
2021-12-15 03:36:42 +0100 | aliosablack | (~chomwitt@94.66.63.187) |
2021-12-15 03:38:14 +0100 | <EvanR> | so * has precedence 7 and + has precedence 6. So there's no way to make an operator between them xD |
2021-12-15 03:38:23 +0100 | TonyStone | (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com) (Remote host closed the connection) |
2021-12-15 03:38:37 +0100 | chomwitt | (~chomwitt@2a02:587:dc0d:3700:12c3:7bff:fe6d:d374) (Ping timeout: 250 seconds) |
2021-12-15 03:38:50 +0100 | TonyStone | (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com) |
2021-12-15 03:39:58 +0100 | <snake> | let 7 = 8 |
2021-12-15 03:40:03 +0100 | <snake> | BOOM |
2021-12-15 03:40:06 +0100 | <snake> | saved your life |
2021-12-15 03:40:53 +0100 | <EvanR> | > let 7 = 8 in 7 |
2021-12-15 03:40:54 +0100 | <lambdabot> | 7 |
2021-12-15 03:40:59 +0100 | <EvanR> | didn't work |
2021-12-15 03:41:19 +0100 | <EvanR> | equational reasoning is a lie |
2021-12-15 03:41:29 +0100 | <oats> | https://github.com/oatberry/aoc2021-haskell/blob/main/src/Day9.hs |
2021-12-15 03:41:33 +0100 | <oats> | I've fallen into doing AoC in spurts |
2021-12-15 03:41:46 +0100 | <oats> | I'm ok with this 😊 |
2021-12-15 03:45:56 +0100 | <oats> | I got to explore indexed optics, that was fun |
2021-12-15 03:48:17 +0100 | <oats> | EvanR, oh, and Optics By Example uses good ol' lens |
2021-12-15 03:48:23 +0100 | <EvanR> | i see |
2021-12-15 03:49:12 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) |
2021-12-15 03:49:31 +0100 | <yuyua32> | throughOut :: Int -> Int -> String |
2021-12-15 03:49:32 +0100 | <yuyua32> | throughOut n 0 = "" |
2021-12-15 03:49:33 +0100 | <yuyua32> | with this function |
2021-12-15 03:49:39 +0100 | <yuyua32> | how would you add an if statement like |
2021-12-15 03:49:47 +0100 | <yuyua32> | | m == 0 = "" |
2021-12-15 03:49:53 +0100 | <yuyua32> | but without guards? is that possible |
2021-12-15 03:50:15 +0100 | <snake> | oats, nice i can read about 20% of that code, looks good tho |
2021-12-15 03:50:25 +0100 | <snake> | (guesstimating) |
2021-12-15 03:50:40 +0100 | <oats> | uh, is that an indictment of my code or of you lol |
2021-12-15 03:50:55 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-247-143.lut.ac.uk) (Client Quit) |
2021-12-15 03:51:02 +0100 | <EvanR> | yuyua32, there's no if statement, but there's an if expression of the form |
2021-12-15 03:51:07 +0100 | <EvanR> | if _ then _ else _ |
2021-12-15 03:51:12 +0100 | <oats> | they gone |
2021-12-15 03:51:18 +0100 | <EvanR> | blast |
2021-12-15 03:51:38 +0100 | <snake> | oats, im a newbie |
2021-12-15 03:51:43 +0100 | <oats> | oh haha |
2021-12-15 03:51:58 +0100 | <oats> | if you have any specific questions I'd love to try and answer them :P |
2021-12-15 03:52:28 +0100 | <snake> | how did you get printf |
2021-12-15 03:52:37 +0100 | nosewings | (~ngpc@2603-8081-3e05-e2d0-f324-1a41-5d30-c2c5.res6.spectrum.com) (Remote host closed the connection) |
2021-12-15 03:52:38 +0100 | <oats> | hmm? |
2021-12-15 03:52:49 +0100 | <snake> | https://github.com/oatberry/aoc2021-haskell/blob/main/src/Common.hs#L70 |
2021-12-15 03:53:06 +0100 | <oats> | snake, line 25 |
2021-12-15 03:53:06 +0100 | <snake> | oh its imported |
2021-12-15 03:55:05 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
2021-12-15 03:57:19 +0100 | <dsal> | oats: what's this sum/map stuff? sumOf folded to succ |
2021-12-15 03:58:04 +0100 | <oats> | which line? |
2021-12-15 03:58:14 +0100 | <dsal> | part1 |
2021-12-15 03:58:28 +0100 | <dsal> | If you're going to use lens, obscure harder! |
2021-12-15 03:58:55 +0100 | <oats> | hmm yes may as well |
2021-12-15 03:59:05 +0100 | <oats> | :P |
2021-12-15 03:59:10 +0100 | <dsal> | Oh, there's a _2 in there. I'm on a phone |
2021-12-15 04:00:05 +0100 | <snake> | oats, is the C.readFile the best way to read a file, i heard that readFile is rarely used |
2021-12-15 04:00:16 +0100 | <snake> | and getCOntents etc |
2021-12-15 04:00:49 +0100 | TonyStone | (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com) (Quit: Leaving) |
2021-12-15 04:00:55 +0100 | <oats> | I used readFile because it was easy ¯\_(ツ)_/¯ |
2021-12-15 04:00:59 +0100 | <dsal> | > sumOf (folded . _2 . to succ) [('a', 3), ('b', 4)] |
2021-12-15 04:01:01 +0100 | <oats> | there may be good reasons to use something else |
2021-12-15 04:01:01 +0100 | <lambdabot> | 9 |
2021-12-15 04:01:07 +0100 | <dsal> | Wow, first try |
2021-12-15 04:01:15 +0100 | <oats> | TIL of `to` |
2021-12-15 04:02:09 +0100 | <dsal> | It makes it easy for your code to succ |
2021-12-15 04:02:17 +0100 | <oats> | I was just giggling about "to succ" |
2021-12-15 04:02:27 +0100 | xff0x | (~xff0x@2001:1a81:52c4:9100:e535:171:40b4:8c54) (Ping timeout: 250 seconds) |
2021-12-15 04:04:32 +0100 | xff0x | (~xff0x@2001:1a81:52ce:1300:ffd2:54e0:463d:d772) |
2021-12-15 04:04:56 +0100 | TonyStone | (~TonyStone@2603-7080-8607-c36a-9cdb-69bc-753b-1e50.res6.spectrum.com) |
2021-12-15 04:05:29 +0100 | sleblanc | (~sleblanc@user/sleblanc) |
2021-12-15 04:08:11 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2021-12-15 04:10:02 +0100 | xkuru | (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
2021-12-15 04:10:54 +0100 | <EvanR> | I used readFile for each day so far |
2021-12-15 04:10:56 +0100 | <EvanR> | works |
2021-12-15 04:11:04 +0100 | bollu | (uid233390@id-233390.helmsley.irccloud.com) |
2021-12-15 04:12:45 +0100 | nunggu | (~q@gateway/tor-sasl/nunggu) (Ping timeout: 276 seconds) |
2021-12-15 04:13:30 +0100 | <sleblanc> | EvanR, aoc? |
2021-12-15 04:13:37 +0100 | <EvanR> | yeah |
2021-12-15 04:13:53 +0100 | <sleblanc> | have you heard of the Big Boy™ inputs? |
2021-12-15 04:13:57 +0100 | <EvanR> | yeah |
2021-12-15 04:14:06 +0100 | <EvanR> | I made a few myself for stress testing |
2021-12-15 04:14:31 +0100 | <sleblanc> | ok |
2021-12-15 04:14:38 +0100 | <sleblanc> | i'm way behind |
2021-12-15 04:14:45 +0100 | <sleblanc> | still on day4 |
2021-12-15 04:15:04 +0100 | <EvanR> | oof |
2021-12-15 04:15:13 +0100 | <EvanR> | well, I'm still on day 2 in any previous year |
2021-12-15 04:15:35 +0100 | <sleblanc> | I don't think those count |
2021-12-15 04:15:42 +0100 | <EvanR> | lol |
2021-12-15 04:15:49 +0100 | <sleblanc> | I did a bunch in the previous years |
2021-12-15 04:16:39 +0100 | <sleblanc> | 2020 from 1 to 9 |
2021-12-15 04:16:48 +0100 | <sleblanc> | oh, actually 1-14 |
2021-12-15 04:17:34 +0100 | <sleblanc> | it really made me learn about monadic parsers |
2021-12-15 04:18:48 +0100 | <sleblanc> | can we define data constructors in lambdabot? |
2021-12-15 04:19:23 +0100 | <EvanR> | so far I only used a basic split function lol |
2021-12-15 04:19:36 +0100 | <sleblanc> | > data Direction = Forward | Up | Down |
2021-12-15 04:19:38 +0100 | <lambdabot> | <hint>:1:1: error: parse error on input ‘data’ |
2021-12-15 04:19:55 +0100 | <EvanR> | @let data Direction = Forward | Up | Down deriving Show |
2021-12-15 04:19:56 +0100 | <lambdabot> | Defined. |
2021-12-15 04:20:02 +0100 | <sleblanc> | o |
2021-12-15 04:20:03 +0100 | <EvanR> | :t Up |
2021-12-15 04:20:05 +0100 | <lambdabot> | Direction |
2021-12-15 04:20:41 +0100 | <sleblanc> | @let data Move = Move Direction Int |
2021-12-15 04:20:42 +0100 | <lambdabot> | Defined. |
2021-12-15 04:20:55 +0100 | <sleblanc> | @let instance Default Move where def = Forward |
2021-12-15 04:20:56 +0100 | <lambdabot> | .L.hs:166:10: error: |
2021-12-15 04:20:56 +0100 | <lambdabot> | Not in scope: type constructor or class ‘Default’ |
2021-12-15 04:20:56 +0100 | <lambdabot> | | |
2021-12-15 04:21:07 +0100 | <sleblanc> | @let import Data.Default (Default) |
2021-12-15 04:21:08 +0100 | <lambdabot> | Defined. |
2021-12-15 04:21:11 +0100 | <sleblanc> | @let instance Default Move where def = Forward |
2021-12-15 04:21:12 +0100 | <EvanR> | Default... |
2021-12-15 04:21:12 +0100 | <lambdabot> | .L.hs:168:9: error: |
2021-12-15 04:21:12 +0100 | <lambdabot> | ‘def’ is not a (visible) method of class ‘Default’ |
2021-12-15 04:21:12 +0100 | <lambdabot> | | |
2021-12-15 04:21:23 +0100 | <sleblanc> | @let import Data.Default (Default(def)) |
2021-12-15 04:21:24 +0100 | <lambdabot> | Defined. |
2021-12-15 04:21:26 +0100 | <sleblanc> | @let instance Default Move where def = Forward |
2021-12-15 04:21:27 +0100 | <lambdabot> | .L.hs:169:15: error: |
2021-12-15 04:21:27 +0100 | <lambdabot> | • Couldn't match expected type ‘Move’ with actual type ‘Direction’ |
2021-12-15 04:21:27 +0100 | <lambdabot> | • In the expression: Forward |
2021-12-15 04:21:40 +0100 | <sleblanc> | @let instance Default Direction where def = Forward |
2021-12-15 04:21:41 +0100 | <lambdabot> | Defined. |
2021-12-15 04:21:42 +0100 | <EvanR> | the thrust to weight ratio of Default is not great |
2021-12-15 04:21:54 +0100 | <sleblanc> | :t (Move <$>) |
2021-12-15 04:21:55 +0100 | <lambdabot> | error: |
2021-12-15 04:21:55 +0100 | <lambdabot> | Data constructor not in scope: Move :: a -> b |
2021-12-15 04:22:00 +0100 | <oats> | sleblanc, if you do much more we're gonna ask you to spin up your own ghci repl :) |
2021-12-15 04:22:28 +0100 | <sleblanc> | Sorry about the noise, I'm trying to set it up for something that I found interesting |
2021-12-15 04:22:33 +0100 | <pragma-> | you can /msg it. |
2021-12-15 04:22:36 +0100 | <sleblanc> | ohhh |
2021-12-15 04:23:59 +0100 | <sleblanc> | is it sharing the same environment when I privmsg lambdabot? I can't find the definitions I just created |
2021-12-15 04:25:29 +0100 | td__ | (~td@muedsl-82-207-238-255.citykom.de) (Ping timeout: 268 seconds) |
2021-12-15 04:26:11 +0100 | <EvanR> | maybe someone undefined everything out of spite |
2021-12-15 04:26:17 +0100 | <sleblanc> | I wrote ":t (Move <$>)" in my GHCi and it said "f Direction -> f (Integer -> Move)" as I expected, but then I typed ":t flip (Move <$>)" and I don't understand the type signature |
2021-12-15 04:26:47 +0100 | td_ | (~td@94.134.91.159) |
2021-12-15 04:26:47 +0100 | <sleblanc> | flip (Move <$>) :: b -> (b -> Direction) -> Integer -> Move |
2021-12-15 04:26:47 +0100 | <EvanR> | :t (Identity <*>) |
2021-12-15 04:26:48 +0100 | <lambdabot> | error: |
2021-12-15 04:26:48 +0100 | <lambdabot> | Data constructor not in scope: Identity :: f (a -> b) |
2021-12-15 04:26:52 +0100 | <sleblanc> | the Functor has disappeared |
2021-12-15 04:26:59 +0100 | mvk | (~mvk@2607:fea8:5cdd:f000::9788) (Ping timeout: 252 seconds) |
2021-12-15 04:26:59 +0100 | jkaye | (~jkaye@2601:281:8300:7530:e7c5:c36d:91ad:b90f) (Ping timeout: 252 seconds) |
2021-12-15 04:27:05 +0100 | <EvanR> | :t (Identity <$>) |
2021-12-15 04:27:06 +0100 | <lambdabot> | error: |
2021-12-15 04:27:06 +0100 | <lambdabot> | Data constructor not in scope: Identity :: a -> b |
2021-12-15 04:27:27 +0100 | <EvanR> | suffering from a lack of Identity |
2021-12-15 04:27:57 +0100 | <sleblanc> | identity theft |
2021-12-15 04:36:24 +0100 | <monochrom> | identity theft: fmap id = id |
2021-12-15 04:37:13 +0100 | <monochrom> | I guess that's fmap theft. |
2021-12-15 04:38:02 +0100 | <monochrom> | identity theft take 2: s <> mempty = s. s stole the identity! |
2021-12-15 04:38:27 +0100 | <dsal> | On HDK, Identity steals you. |
2021-12-15 04:38:35 +0100 | <monochrom> | haha |
2021-12-15 04:38:38 +0100 | <dsal> | Damnit, I spelled HKD wrong |
2021-12-15 04:39:05 +0100 | <dsal> | And in. My phone should know what dumb thing I was trying to say. |
2021-12-15 04:40:11 +0100 | <dsal> | sleblanc: Data.Default is quite out of fashion |
2021-12-15 04:40:49 +0100 | <byorgey> | sleblanc: since flip expects a two-argument function, the only way to make f Direction -> f (Integer -> Move) into a 2-argument function is to instantiate f to (b ->) |
2021-12-15 04:41:03 +0100 | <dsal> | Closest I get in code is mempty |
2021-12-15 04:41:51 +0100 | <byorgey> | f Direction -> f (Integer -> Move) becomes (b -> Direction) -> b -> Integer -> Move |
2021-12-15 04:42:19 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) (Remote host closed the connection) |
2021-12-15 04:43:09 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) |
2021-12-15 04:43:46 +0100 | mikoto-chan | (~mikoto-ch@esm-84-240-99-143.netplaza.fi) |
2021-12-15 04:44:37 +0100 | <dsal> | I wonder if Move could be a monoid. You'd need to model it as a more general transformation, I'd think. |
2021-12-15 04:57:35 +0100 | <EvanR> | Integer -> Integer monoid |
2021-12-15 05:00:15 +0100 | <dsal> | Yeah, but in two dimensions. |
2021-12-15 05:00:28 +0100 | <dsal> | I really liked the paper folding thing. |
2021-12-15 05:00:49 +0100 | <dsal> | :t foldl1 (.) . reverse |
2021-12-15 05:00:50 +0100 | <lambdabot> | [a -> a] -> a -> a |
2021-12-15 05:05:38 +0100 | <EvanR> | product of two monoids monoid |
2021-12-15 05:06:53 +0100 | <sleblanc> | Thanks byorgey, it makes a lot of sense |
2021-12-15 05:07:05 +0100 | <int-e> | @let import qualified Data.Default |
2021-12-15 05:07:06 +0100 | <lambdabot> | Defined. |
2021-12-15 05:07:08 +0100 | <int-e> | meh |
2021-12-15 05:07:11 +0100 | <int-e> | @undef |
2021-12-15 05:07:11 +0100 | <lambdabot> | Undefined. |
2021-12-15 05:09:45 +0100 | lambdabot | (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection) |
2021-12-15 05:11:38 +0100 | lambdabot | (~lambdabot@haskell/bot/lambdabot) |
2021-12-15 05:11:39 +0100 | lambdabot | (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection) |
2021-12-15 05:11:46 +0100 | <int-e> | oops, that was terrible timing. |
2021-12-15 05:11:54 +0100 | lambdabot | (~lambdabot@silicon.int-e.eu) |
2021-12-15 05:11:54 +0100 | lambdabot | (~lambdabot@silicon.int-e.eu) (Changing host) |
2021-12-15 05:11:54 +0100 | lambdabot | (~lambdabot@haskell/bot/lambdabot) |
2021-12-15 05:13:34 +0100 | <int-e> | @let import Data.Default |
2021-12-15 05:13:34 +0100 | <lambdabot> | .L.hs:85:1: error: |
2021-12-15 05:13:34 +0100 | <lambdabot> | Could not find module ‘Data.Default’ |
2021-12-15 05:13:35 +0100 | <lambdabot> | Use -v (or `:set -v` in ghci) to see a list of the files searched for. |
2021-12-15 05:13:58 +0100 | <int-e> | Okay. Better; before this, the @let would work but > would then fail. |
2021-12-15 05:15:22 +0100 | <int-e> | (because these were done in two different package environments) |
2021-12-15 05:21:12 +0100 | pavonia | (~user@user/siracusa) |
2021-12-15 05:24:38 +0100 | <int-e> | if you're curious what exactly lambdabot has and what not, https://silicon.int-e.eu/lambdabot/State/packages.txt should be accurate |
2021-12-15 05:26:05 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
2021-12-15 05:27:27 +0100 | <int-e> | And I can add packages. I'm just not eager to :-P But the situation is nicer than the previous "whatever lambdabot happens to depend on plus a couple others" which looked like https://silicon.int-e.eu/lambdabot/tmp/packages-host.txt |
2021-12-15 05:28:39 +0100 | <int-e> | (don't ask me why stuff like wai is in there... maybe hoogle drags that in?) |
2021-12-15 05:29:37 +0100 | <int-e> | *checks* yeah it does |
2021-12-15 05:30:55 +0100 | bliminse | (~bliminse@host86-162-147-196.range86-162.btcentralplus.com) (Ping timeout: 256 seconds) |
2021-12-15 05:32:23 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Ping timeout: 250 seconds) |
2021-12-15 05:32:25 +0100 | darkstarx | (~darkstard@50.39.115.145) (Read error: Connection reset by peer) |
2021-12-15 05:32:46 +0100 | bliminse | (~bliminse@host86-186-4-210.range86-186.btcentralplus.com) |
2021-12-15 05:33:25 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-12-15 05:37:18 +0100 | darkstardevx | (~darkstard@50.39.115.145) |
2021-12-15 05:38:33 +0100 | darkstardevx | (~darkstard@50.39.115.145) (Remote host closed the connection) |
2021-12-15 05:38:57 +0100 | darkstardevx | (~darkstard@50.39.115.145) |
2021-12-15 05:43:22 +0100 | darkstardevx | (~darkstard@50.39.115.145) (Read error: Connection reset by peer) |
2021-12-15 05:47:11 +0100 | <Axman6> | We don;t have some sort of efficient type for an array of Maybe's right? I'm surrently using a smallarray of Maybe but it would be nice if we had a maybeArray which had a bit vector of positions which contained values |
2021-12-15 05:48:55 +0100 | <Axman6> | really what I want is an array of.... promises or something? I'm going to write to each position exactly once |
2021-12-15 05:49:47 +0100 | <EvanR> | an array of IVars heh |
2021-12-15 05:49:59 +0100 | <EvanR> | or, the array of reading a bunch of IVars |
2021-12-15 05:51:22 +0100 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2021-12-15 05:52:58 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-12-15 05:56:11 +0100 | <int-e> | EvanR: maybe an array of thunks works? (aka knot-tying) |
2021-12-15 05:57:42 +0100 | <energizer> | is there a name for a type that's like an enum but open to extension? |
2021-12-15 05:57:44 +0100 | <EvanR> | yeah |
2021-12-15 05:57:53 +0100 | <EvanR> | (int-e) |
2021-12-15 05:58:01 +0100 | <EvanR> | energizer, extensible variant? |
2021-12-15 05:58:48 +0100 | <EvanR> | I have a paper on it around here somewhere, explaining how polymorphism works |
2021-12-15 05:59:18 +0100 | <energizer> | EvanR: papers please |
2021-12-15 05:59:24 +0100 | <int-e> | ... cue half an hour of deafening silence |
2021-12-15 05:59:30 +0100 | <EvanR> | yeah, AoC |
2021-12-15 06:01:28 +0100 | <Axman6> | int-e: it would if I didn't need to fill the contents of the array in a PrimMonad |
2021-12-15 06:04:42 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 06:11:58 +0100 | mstksg | (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Quit: WeeChat 3.3) |
2021-12-15 06:12:10 +0100 | jle` | (~jle`@cpe-23-240-75-236.socal.res.rr.com) |
2021-12-15 06:12:29 +0100 | <EvanR> | energizer, https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/scopedlabels.pdf this paper has a section on extensible variants |
2021-12-15 06:12:44 +0100 | <energizer> | thanks EvanR |
2021-12-15 06:22:43 +0100 | epolanski | (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2021-12-15 06:22:46 +0100 | darkstardevx | (~darkstard@50.39.115.145) |
2021-12-15 06:23:36 +0100 | darkstardevx | (~darkstard@50.39.115.145) (Remote host closed the connection) |
2021-12-15 06:24:01 +0100 | darkstardevx | (~darkstard@50.39.115.145) |
2021-12-15 06:24:44 +0100 | jz99 | (~jz99@150.203.2.53) |
2021-12-15 06:27:01 +0100 | deadmarshal | (~deadmarsh@95.38.230.166) (Ping timeout: 256 seconds) |
2021-12-15 06:29:14 +0100 | zebrag | (~chris@user/zebrag) (Quit: Konversation terminated!) |
2021-12-15 06:29:29 +0100 | deadmarshal | (~deadmarsh@95.38.231.95) |
2021-12-15 06:33:05 +0100 | mbuf | (~Shakthi@122.178.199.206) |
2021-12-15 06:33:16 +0100 | darkstardevx | (~darkstard@50.39.115.145) (Remote host closed the connection) |
2021-12-15 06:33:33 +0100 | curiousgay | (~curiousga@77-120-141-90.kha.volia.net) (Ping timeout: 265 seconds) |
2021-12-15 06:34:05 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) (Remote host closed the connection) |
2021-12-15 06:34:43 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) |
2021-12-15 06:38:55 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2021-12-15 06:40:42 +0100 | bollu | (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2021-12-15 06:46:58 +0100 | <dsal> | This is another "Gets the right answer for the sample but wrong answer for my own input" problem. |
2021-12-15 06:47:02 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-12-15 06:47:47 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-12-15 06:49:13 +0100 | <int-e> | dsal: me too |
2021-12-15 06:53:46 +0100 | earendel | (uid498179@user/earendel) (Quit: Connection closed for inactivity) |
2021-12-15 06:54:22 +0100 | kayvank | (~user@52-119-115-185.PUBLIC.monkeybrains.net) |
2021-12-15 06:54:32 +0100 | kayvank | (~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection) |
2021-12-15 06:56:00 +0100 | <int-e> | dsal: But it's by design, so I expect that *all* the inputs have that property so it's fair. |
2021-12-15 06:57:55 +0100 | altern | (~Sergii@altern.corbina.com.ua) |
2021-12-15 07:02:52 +0100 | mikoto-chan | (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Quit: mikoto-chan) |
2021-12-15 07:04:24 +0100 | jonathanx_ | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
2021-12-15 07:04:43 +0100 | jonathanx_ | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
2021-12-15 07:07:55 +0100 | johnjay | (~pi@154.6.152.74) (Ping timeout: 250 seconds) |
2021-12-15 07:08:50 +0100 | Erutuon | (~Erutuon@user/erutuon) (Quit: WeeChat 2.8) |
2021-12-15 07:20:48 +0100 | johnjay | (~pi@154.6.152.74) |
2021-12-15 07:23:30 +0100 | dsrt^ | (~dsrt@wsip-98-188-240-142.mc.at.cox.net) |
2021-12-15 07:23:53 +0100 | slowButPresent | (~slowButPr@user/slowbutpresent) (Quit: leaving) |
2021-12-15 07:24:03 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-12-15 07:24:22 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-12-15 07:29:04 +0100 | <int-e> | > unwords $ map (\x -> printf "%.2f" (195-x/30)) [5759,5744,5688,5606,5580,5527,5481,5458,5419,5407] -- the missing star is counted as rank 195 |
2021-12-15 07:29:06 +0100 | <lambdabot> | "3.03 3.53 5.40 8.13 9.00 10.77 12.30 13.07 14.37 14.77" |
2021-12-15 07:29:08 +0100 | darkstardevx | (~darkstard@50.39.115.145) |
2021-12-15 07:29:55 +0100 | darkstardevx | (~darkstard@50.39.115.145) (Remote host closed the connection) |
2021-12-15 07:30:19 +0100 | darkstardevx | (~darkstard@50.39.115.145) |
2021-12-15 07:30:33 +0100 | <EvanR> | this is why I never test the example |
2021-12-15 07:30:41 +0100 | <EvanR> | just kidding |
2021-12-15 07:32:27 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2021-12-15 07:37:10 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
2021-12-15 07:44:58 +0100 | <EvanR> | what's the significance of 3.03, 14.77 etc |
2021-12-15 07:45:57 +0100 | <int-e> | it's average ranks so far on glguy's list |
2021-12-15 07:46:24 +0100 | <EvanR> | 195 is people on the list, what's 30 |
2021-12-15 07:46:51 +0100 | <int-e> | number of parts so far. (also the 195 is number of people plus 1) |
2021-12-15 07:47:16 +0100 | <int-e> | (because with 194 people, rank 1 gives 195 points) |
2021-12-15 07:47:21 +0100 | <int-e> | err |
2021-12-15 07:47:27 +0100 | <int-e> | 194 points, ugh |
2021-12-15 07:47:30 +0100 | <g> | I should probably prune again, but doing so can mess with standings |
2021-12-15 07:47:46 +0100 | <g> | So... I've been putting it off |
2021-12-15 07:47:48 +0100 | <EvanR> | lol g |
2021-12-15 07:47:55 +0100 | <c_wraith> | did you optimize your username for coding speed? |
2021-12-15 07:48:04 +0100 | <int-e> | pruning the people with no stars won't affect the order |
2021-12-15 07:48:16 +0100 | <int-e> | it'll just make the numbers smaller |
2021-12-15 07:48:30 +0100 | <g> | Oh, good point |
2021-12-15 07:48:48 +0100 | zaquest | (~notzaques@5.130.79.72) (Remote host closed the connection) |
2021-12-15 07:48:50 +0100 | <g> | Removes the same number of points from everyone |
2021-12-15 07:50:07 +0100 | zaquest | (~notzaques@5.130.79.72) |
2021-12-15 07:50:54 +0100 | <int-e> | but it can affect old leaderboards where those people may have participated, if you care about that |
2021-12-15 07:51:17 +0100 | glebg | (~user@85-192-130-19.dsl.esoo.ru) (Quit: ERC (IRC client for Emacs 27.2)) |
2021-12-15 07:51:32 +0100 | Erutuon | (~Erutuon@user/erutuon) |
2021-12-15 07:51:57 +0100 | <g> | Last time I pruned I only took people off who hadn't participated in a couple years |
2021-12-15 07:52:13 +0100 | <g> | I forget how far back I looked but maybe 3 years |
2021-12-15 07:55:25 +0100 | <g> | c_wraith: yeah, I need every advantage I can get. I'm getting old |
2021-12-15 07:55:35 +0100 | <c_wraith> | fancy tricks! |
2021-12-15 07:56:10 +0100 | EvanR | e |
2021-12-15 07:56:11 +0100 | e | Guest4358 |
2021-12-15 07:56:18 +0100 | <Guest4358> | :sunglasses: |
2021-12-15 07:56:22 +0100 | <Guest4358> | drat |
2021-12-15 07:56:28 +0100 | Guest4358 | EvanR |
2021-12-15 07:56:39 +0100 | <c_wraith> | someone else got there before you |
2021-12-15 07:57:16 +0100 | <g> | He was the first one on the network |
2021-12-15 07:58:04 +0100 | <glguy> | so that would be a hard race to win :3 |
2021-12-15 08:01:13 +0100 | bjobjo | (~bjobjo@user/bjobjo) |
2021-12-15 08:01:22 +0100 | <EvanR> | I bet no one has registered empty string yet |
2021-12-15 08:03:01 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 08:06:02 +0100 | notzmv | (~zmv@user/notzmv) (Ping timeout: 240 seconds) |
2021-12-15 08:10:01 +0100 | <int-e> | glguy: Oh wait, what I said isn't quite true: for people who don't have all stars, removing people without stars makes things easier. |
2021-12-15 08:11:20 +0100 | <glguy> | well, if we get a few more to join I'll clean 10 off |
2021-12-15 08:12:04 +0100 | <int-e> | is there a size limit for private lists? |
2021-12-15 08:12:10 +0100 | <glguy> | 200 |
2021-12-15 08:12:28 +0100 | <int-e> | I see. Yeah we're close to that. |
2021-12-15 08:15:31 +0100 | chele | (~chele@user/chele) |
2021-12-15 08:16:06 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) (Ping timeout: 260 seconds) |
2021-12-15 08:17:29 +0100 | whatif | (~whatif@2400:8902::f03c:92ff:fe60:98d8) |
2021-12-15 08:18:32 +0100 | topbloke | (~textual@27-33-31-40.tpgi.com.au) |
2021-12-15 08:18:53 +0100 | topbloke | (~textual@27-33-31-40.tpgi.com.au) (Client Quit) |
2021-12-15 08:19:29 +0100 | michalz | (~michalz@185.246.204.121) |
2021-12-15 08:20:21 +0100 | deadmarshal | (~deadmarsh@95.38.231.95) (Ping timeout: 256 seconds) |
2021-12-15 08:23:57 +0100 | deadmarshal | (~deadmarsh@95.38.231.95) |
2021-12-15 08:27:12 +0100 | topbloke | (~textual@27-33-31-40.tpgi.com.au) |
2021-12-15 08:28:04 +0100 | <int-e> | Of course if you really want to you can do a far more detailed analysis of the JSON file: https://int-e.eu/~bf3/tmp/aoc_haskell.txt |
2021-12-15 08:28:34 +0100 | <xerox> | 11 :( |
2021-12-15 08:28:44 +0100 | fr33domlover | (~fr33@2.55.142.29) |
2021-12-15 08:29:53 +0100 | darkstardevx | (~darkstard@50.39.115.145) (Read error: Connection reset by peer) |
2021-12-15 08:31:02 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-12-15 08:35:07 +0100 | darkstardevx | (~darkstard@50.39.115.145) |
2021-12-15 08:35:20 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 08:35:59 +0100 | darkstardevx | (~darkstard@50.39.115.145) (Remote host closed the connection) |
2021-12-15 08:36:46 +0100 | darkstardevx | (~darkstard@50.39.115.145) |
2021-12-15 08:38:09 +0100 | <g> | Is there existing work for ranking something like this in a sensible way? |
2021-12-15 08:41:10 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) |
2021-12-15 08:41:30 +0100 | pfurla | (~pfurla@2804:18:5804:c94c:6161:1466:1870:aecb) |
2021-12-15 08:41:35 +0100 | darkstardevx | (~darkstard@50.39.115.145) (Read error: Connection reset by peer) |
2021-12-15 08:41:52 +0100 | topbloke | (~textual@27-33-31-40.tpgi.com.au) (Quit: Textual IRC Client: www.textualapp.com) |
2021-12-15 08:42:34 +0100 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
2021-12-15 08:45:36 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) (Read error: Connection reset by peer) |
2021-12-15 08:48:07 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Ping timeout: 256 seconds) |
2021-12-15 08:48:15 +0100 | dfg | (~dfg@user/dfg) (Ping timeout: 250 seconds) |
2021-12-15 08:48:31 +0100 | dfg | (dfg@2600:3c00::f03c:92ff:feb4:be75) |
2021-12-15 08:48:31 +0100 | dfg | (dfg@2600:3c00::f03c:92ff:feb4:be75) (Changing host) |
2021-12-15 08:48:31 +0100 | dfg | (dfg@user/dfg) |
2021-12-15 08:48:41 +0100 | Clint | (~Clint@user/clint) (Ping timeout: 250 seconds) |
2021-12-15 08:49:50 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) |
2021-12-15 08:50:28 +0100 | Clint | (~Clint@user/clint) |
2021-12-15 08:52:04 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) (Read error: Connection reset by peer) |
2021-12-15 08:52:50 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) |
2021-12-15 08:53:36 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) (Read error: Connection reset by peer) |
2021-12-15 08:56:11 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-12-15 08:56:26 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2021-12-15 09:00:30 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) |
2021-12-15 09:04:16 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-12-15 09:04:52 +0100 | chele_ | (~chele@user/chele) |
2021-12-15 09:05:02 +0100 | xsperry | (~xs@user/xsperry) (Ping timeout: 240 seconds) |
2021-12-15 09:05:07 +0100 | chele | (~chele@user/chele) (Ping timeout: 256 seconds) |
2021-12-15 09:05:28 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:1b1:ff3c:2e88:391a) |
2021-12-15 09:05:54 +0100 | hololeap_ | (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
2021-12-15 09:06:06 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
2021-12-15 09:06:07 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) (Read error: Connection reset by peer) |
2021-12-15 09:06:20 +0100 | hololeap_ | (~hololeap@user/hololeap) |
2021-12-15 09:06:30 +0100 | altern | (~Sergii@altern.corbina.com.ua) (Ping timeout: 260 seconds) |
2021-12-15 09:06:50 +0100 | gehmehgeh | (~user@user/gehmehgeh) |
2021-12-15 09:09:34 +0100 | enyc | (~enyc@user/enyc) |
2021-12-15 09:09:40 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
2021-12-15 09:16:35 +0100 | chele_ | chele |
2021-12-15 09:17:43 +0100 | <int-e> | c_wraith: final octopodes update: https://gist.github.com/int-e/27962eb9a9d1980cc5b4ba8baad59a42#file-flash-cc-L22-L44 |
2021-12-15 09:18:19 +0100 | <c_wraith> | those are both quite large numbers |
2021-12-15 09:18:38 +0100 | <int-e> | imagine going for 66 steps and then entering a 2 million step cycle |
2021-12-15 09:19:38 +0100 | <int-e> | I find the length of those cycles mind-boggling even if they're rare (average cycle length is about 72.3 for the 53.9% of configurations that do not synchronize) |
2021-12-15 09:20:29 +0100 | <int-e> | c_wraith: I didn't track how many configurations I tested; I think it's about 20 billion. |
2021-12-15 09:22:05 +0100 | bahamas | (~lucian@86.120.77.115) |
2021-12-15 09:22:25 +0100 | abhixec | (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
2021-12-15 09:22:33 +0100 | <bahamas> | hello! how do I convert a string/text that represents a number into the corresponding number? |
2021-12-15 09:22:50 +0100 | <c_wraith> | > read "123" :: Int |
2021-12-15 09:22:52 +0100 | <lambdabot> | 123 |
2021-12-15 09:23:02 +0100 | <c_wraith> | assuming that's what you mean by "represents" |
2021-12-15 09:23:44 +0100 | <bahamas> | c_wraith: that's what I mean. is there a different meaning (just curious)? |
2021-12-15 09:24:16 +0100 | <c_wraith> | sure. Maybe you mean the english phrase corresponding to a number, such that f "twenty-three" = 23 |
2021-12-15 09:24:28 +0100 | <c_wraith> | Or any number of other representations :) |
2021-12-15 09:24:36 +0100 | <bahamas> | c_wraith: ah, I see :) |
2021-12-15 09:25:59 +0100 | <int-e> | c_wraith: The strange thing is... I'd expect the trails towards a cycle to be about half as long as the cycle for a random function. So this... feels decicively non-random. |
2021-12-15 09:27:08 +0100 | <c_wraith> | well, the problem had a lot of structure. I'd agree it's non-random. :) |
2021-12-15 09:28:27 +0100 | <int-e> | but then how can there be long cycles at all? it's a mystery :) |
2021-12-15 09:28:38 +0100 | <dminuoso> | bahamas: You should really use `readMaybe` though. |
2021-12-15 09:28:49 +0100 | <dminuoso> | `read` is one of those things I wish we didn't have. |
2021-12-15 09:29:18 +0100 | <dminuoso> | It must be the number #1 source of bottoms causing crashes and misbehaviors, usually even from some transitive dependency.. |
2021-12-15 09:29:23 +0100 | <bahamas> | dminuoso: yeah. I was about to ask how I handle the exception |
2021-12-15 09:29:39 +0100 | <int-e> | c_wraith: this is the kind of thing that one can /easily/ put a thesis' equivalent of work into without getting any benefit at all :) |
2021-12-15 09:30:24 +0100 | <c_wraith> | Ok, but what function do you use when you've already validated the characters are numeric and don't want to do a lot of Maybe wrapping and unwrapping? |
2021-12-15 09:30:42 +0100 | <c_wraith> | That's the majority of cases I use read |
2021-12-15 09:31:48 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) |
2021-12-15 09:32:48 +0100 | <c_wraith> | wow, my part 2 today is shockingly slow. Is PSQueue doing some sort of O(n) crap? |
2021-12-15 09:33:12 +0100 | <kritzefitz> | I guess that is a valid use case for `read`. But I am a bit surprised. I usually use `readMaybe` to determine if something is numeric in the first place. Why bother checking beforehand if you're gonna need the result of `read` anyway? |
2021-12-15 09:33:27 +0100 | <kritzefitz> | *need the result of "readMaybe" anway |
2021-12-15 09:33:34 +0100 | cfricke | (~cfricke@user/cfricke) |
2021-12-15 09:34:03 +0100 | machinedgod | (~machinedg@24.105.81.50) |
2021-12-15 09:34:04 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) (Read error: Connection reset by peer) |
2021-12-15 09:34:05 +0100 | <c_wraith> | because I write a lot of parsers where it's really easy to say read <$> some (satisfy isDigit) |
2021-12-15 09:34:10 +0100 | <int-e> | c_wraith: I did wonder about that, but I guess 500x500 is not exactly small |
2021-12-15 09:35:03 +0100 | <kritzefitz> | Makes sense. I guess I don't write parsers that often. |
2021-12-15 09:35:05 +0100 | max22- | (~maxime@2a01cb08833598009a038ff51315adf9.ipv6.abo.wanadoo.fr) |
2021-12-15 09:36:21 +0100 | ph88 | (~ph88@2a02:8109:9e00:71d0:943d:5b05:e9f7:79b5) (Ping timeout: 250 seconds) |
2021-12-15 09:36:26 +0100 | <int-e> | c_wraith: that said, I didn't use psqueue (maybe I should try...) so I can't really answer that question. |
2021-12-15 09:37:40 +0100 | <c_wraith> | I'm seeing 4 seconds on my system. That's shockingly slow for only a quarter of a million nodes with at most 4 edges from them |
2021-12-15 09:37:53 +0100 | jz99 | (~jz99@150.203.2.53) (Ping timeout: 256 seconds) |
2021-12-15 09:38:39 +0100 | <int-e> | do you track visited nodes in a Data.Set or differently? |
2021-12-15 09:38:57 +0100 | <c_wraith> | in the keys of a separate Data.Map |
2021-12-15 09:39:07 +0100 | <c_wraith> | so basically the same |
2021-12-15 09:40:09 +0100 | <c_wraith> | ok, it's not doing anything O(n), at least. |
2021-12-15 09:40:18 +0100 | <c_wraith> | I just have high constant factors around here. |
2021-12-15 09:43:24 +0100 | <c_wraith> | ugh. less than 50% productivity. that'd be the problem. |
2021-12-15 09:45:27 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 09:50:03 +0100 | <int-e> | Hmm. So psqueue performs worse for me than the S.Set (p, k) that I used as an alternative. |
2021-12-15 09:51:15 +0100 | <int-e> | Unless I'm missing a better alternative to P.insertWith min k p psq to insert or update the priority of a key. |
2021-12-15 09:52:43 +0100 | jgeerds | (~jgeerds@55d4ac73.access.ecotel.net) |
2021-12-15 09:54:26 +0100 | <int-e> | (not *much* slower; PSQueue is at 2.3 seconds; Set is at 1.5) |
2021-12-15 09:54:30 +0100 | coot | (~coot@89-64-85-93.dynamic.chello.pl) |
2021-12-15 09:57:11 +0100 | <c_wraith> | Oh, mine is somewhat slower because I'm doing a lot more work than necessary for just this problem. Actually, come to think of it, I could find a much more efficient solution for one part. |
2021-12-15 09:57:19 +0100 | earendel | (uid498179@user/earendel) |
2021-12-15 09:58:38 +0100 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) |
2021-12-15 09:59:05 +0100 | <int-e> | And that's despite the fact that using a PSQueue reduces the number of items taken from the queue from 916486 to 586012 |
2021-12-15 09:59:45 +0100 | <int-e> | > 916486/586012 |
2021-12-15 09:59:47 +0100 | <lambdabot> | 1.5639372572575305 |
2021-12-15 10:00:12 +0100 | teo | (~teo@user/teo) |
2021-12-15 10:00:14 +0100 | whatif | (~whatif@2400:8902::f03c:92ff:fe60:98d8) (Quit: Client closed) |
2021-12-15 10:00:15 +0100 | <c_wraith> | I never understood the data structure it uses anyway... |
2021-12-15 10:00:22 +0100 | <int-e> | > 916486/586012 * 2.3/1.4 -- PSQueue overhead peroperation? |
2021-12-15 10:00:23 +0100 | <lambdabot> | 2.569325494065943 |
2021-12-15 10:00:24 +0100 | teo | (~teo@user/teo) (Read error: Connection reset by peer) |
2021-12-15 10:01:00 +0100 | <int-e> | (the 2.3/1.4 is to be taken with a huge grain of salt; I'm dividing total runtimes here) |
2021-12-15 10:02:22 +0100 | <int-e> | and of course the `containers` library has seen an insane amount of effort put into optimization |
2021-12-15 10:03:10 +0100 | <int-e> | c_wraith: in any case, the times are close enough that I don't think PSQueue is doing anything bad in terms of asymptotic behavior |
2021-12-15 10:03:29 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
2021-12-15 10:03:38 +0100 | <int-e> | Oh, hmm. Maybe I should check how big these things grow |
2021-12-15 10:03:39 +0100 | YoungFrog | (~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) |
2021-12-15 10:04:04 +0100 | acidjnk | (~acidjnk@p200300d0c7271e736483cc3bf5018c54.dip0.t-ipconnect.de) |
2021-12-15 10:04:09 +0100 | <c_wraith> | yeah, I came to the conclusion that bad asymptotics would perform way worse |
2021-12-15 10:04:16 +0100 | <peddie> | https://hackage.haskell.org/package/psqueues looks like a faster implementation in their microbenchmarks |
2021-12-15 10:05:19 +0100 | <c_wraith> | that's a good find |
2021-12-15 10:06:39 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 10:06:58 +0100 | <int-e> | set grows to 3356 elements, the PSQueue grows to 1951 elements (plus a few because I'm accounting where it's convenient, rather where it's the most accurate) |
2021-12-15 10:08:04 +0100 | <c_wraith> | though... I see some oddities in that API. Like. Its version of "alter" is actually "alterF" but specialized to ((,) a), and providing no real alterF or alter without that overhead... |
2021-12-15 10:08:28 +0100 | dsrt^ | (~dsrt@wsip-98-188-240-142.mc.at.cox.net) (Remote host closed the connection) |
2021-12-15 10:11:22 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Ping timeout: 260 seconds) |
2021-12-15 10:12:33 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 256 seconds) |
2021-12-15 10:12:37 +0100 | cheater1__ | (~Username@user/cheater) |
2021-12-15 10:12:40 +0100 | cheater1__ | cheater |
2021-12-15 10:13:44 +0100 | gensyst | (gensyst@user/gensyst) |
2021-12-15 10:14:00 +0100 | <gensyst> | data MyType :: [Nat] -> * -> * where |
2021-12-15 10:14:14 +0100 | <gensyst> | How can I change that so that it's not [Nat] but [1 + Nat] ? |
2021-12-15 10:14:27 +0100 | <gensyst> | (Only positive integers allowed at the type level.) |
2021-12-15 10:15:06 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-12-15 10:16:12 +0100 | notzmv | (~zmv@user/notzmv) |
2021-12-15 10:16:27 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-12-15 10:17:40 +0100 | <dminuoso> | Mmm, is there even a difference between nat and nat-sans-zero? |
2021-12-15 10:17:53 +0100 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2021-12-15 10:17:53 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2021-12-15 10:17:56 +0100 | allbery_b | geekosaur |
2021-12-15 10:17:57 +0100 | <int-e> | c_wraith: hmm, in my adaptation it's slower than PSQueue. It looks awful too: insert m (k, p) = snd $ P.alter (maybe ((), Just (p, ())) (\(q, _) -> ((), Just (min p q, ())))) k m |
2021-12-15 10:18:41 +0100 | <int-e> | (that's for OrdPSQ) |
2021-12-15 10:19:15 +0100 | <int-e> | Oh, HashPSQ is actually faster |
2021-12-15 10:19:44 +0100 | jgeerds_ | (~jgeerds@55d4ac73.access.ecotel.net) |
2021-12-15 10:20:05 +0100 | <int-e> | (on part with Data.Set in this case) |
2021-12-15 10:22:00 +0100 | shriekingnoise | (~shrieking@186.137.144.80) (Quit: Quit) |
2021-12-15 10:22:27 +0100 | <int-e> | So maybe "for priority search queues use HashPSQ from psqueues unless you deal with adverserial input" is the right conclusion here. |
2021-12-15 10:22:39 +0100 | jgeerds | (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 265 seconds) |
2021-12-15 10:22:40 +0100 | mncheck | (~mncheck@193.224.205.254) |
2021-12-15 10:23:00 +0100 | <int-e> | It's a pity that there's no easier way to decrease-key-or-insert though. |
2021-12-15 10:23:17 +0100 | <int-e> | s/key/priority/ |
2021-12-15 10:24:03 +0100 | <YoungFrog> | I'm new to Haskell, and wanted to try Debug.Hood.Observe but "cabal install hood" fails (with [__2] rejecting: FPretty-1.1 (conflict: base==4.14.3.0/installed-4.14.3.0, FPretty => base>=4.5 && <4.11)) -- I also tried intalling Hoed instead, but that fails while compiling Text.PrettyPrint.FPretty (Ambiguous occurrence ‘<>’). am I doing something wrong ? |
2021-12-15 10:24:09 +0100 | <c_wraith> | I don't really understand why that isn't alterF with a separate alter function |
2021-12-15 10:24:14 +0100 | <int-e> | (well, it is easy enough, it's just ugly because of the extra associated values and the extra result from `alter`) |
2021-12-15 10:25:01 +0100 | bahamas | (~lucian@86.120.77.115) (Ping timeout: 256 seconds) |
2021-12-15 10:25:17 +0100 | <int-e> | Did we do that in 2014? |
2021-12-15 10:27:06 +0100 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2021-12-15 10:27:16 +0100 | <gensyst> | dminuoso, well Nat can include 0 as you may know |
2021-12-15 10:27:41 +0100 | <int-e> | (That's when the package was first uploaded to hackage, and the API has only changed minimally since then; new functions are: deleteMin, atMostView, unsafeMapMonotonic) |
2021-12-15 10:28:07 +0100 | <dminuoso> | gensyst: out of curiosity, what's the goal? |
2021-12-15 10:28:24 +0100 | <int-e> | But I honestly don't know when alterF was first seriously proposed and discussed (in the context of containers). |
2021-12-15 10:28:47 +0100 | Erutuon | (~Erutuon@user/erutuon) (Quit: WeeChat 2.8) |
2021-12-15 10:28:57 +0100 | Erutuon | (~Erutuon@user/erutuon) |
2021-12-15 10:29:30 +0100 | <gensyst> | dminuoso, I have a function that processes the data type's numbers one by one, and some functions there assume that the integer in question is positive (example: doStuff: forall n. (KnownNat n) => Vector (n + 1) Int -> String) |
2021-12-15 10:30:06 +0100 | <gensyst> | and that function call doesn't compile because at that point, that one (from "one by one") number is at that point not known to be positive as expected. |
2021-12-15 10:32:48 +0100 | <lortabac> | gensyst: in general you can use (n + 1) or Succ (if you have an inductive type) for this invariant |
2021-12-15 10:33:32 +0100 | darchitect | (~darchitec@2a00:23c6:3584:df00:7dec:bf13:8fa:748c) (Ping timeout: 240 seconds) |
2021-12-15 10:33:53 +0100 | <lortabac> | (n + 1) is guaranteed to be positive |
2021-12-15 10:33:55 +0100 | xsperry | (~xs@user/xsperry) |
2021-12-15 10:34:28 +0100 | off^ | (~off@wsip-98-188-240-142.mc.at.cox.net) |
2021-12-15 10:35:14 +0100 | <gensyst> | lortabac, yes and i have it on "doStuff". the question is, how to get it into the MyType ? |
2021-12-15 10:42:13 +0100 | <gensyst> | I think I found a way.. i had to put the KnownNat and "+1" stuff into the data *constructors*. |
2021-12-15 10:43:02 +0100 | <gensyst> | in any case this is getting kind of pity because my data type is now very specific. i wonder if haskell's type system can even generalize it at all. (so the same type can be used for both positive cases and non-negative cases) |
2021-12-15 10:47:34 +0100 | <lortabac> | gensyst: you need to define a GADT that is indexed by the same nat you gave it as a constructor argument |
2021-12-15 10:47:41 +0100 | <lortabac> | in other words, a singleton |
2021-12-15 10:48:50 +0100 | <lortabac> | but at this point things start getting really complex, and probably not worth it |
2021-12-15 10:49:03 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-12-15 10:50:59 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-12-15 10:52:04 +0100 | <gensyst> | lortabac, thanks! cool to know it's possible, but yeah, i'll keep the types specific for now and get back to those after i have read "Thinking with Types" book! |
2021-12-15 10:52:10 +0100 | <gensyst> | any other books/resources you recommend? |
2021-12-15 10:54:06 +0100 | <lortabac> | gensyst: I'll be honest, after spending a considerable amount of time on these problems, my advice is "don't" |
2021-12-15 10:54:31 +0100 | <lortabac> | use Idris or Agda |
2021-12-15 10:54:43 +0100 | <gensyst> | why? what happened :) |
2021-12-15 10:55:00 +0100 | <lortabac> | or even better, just accept that you can't encode every possible invariant in the types |
2021-12-15 10:55:45 +0100 | <lortabac> | gensyst: it gets **extremely complex** very quickly |
2021-12-15 10:56:01 +0100 | <gensyst> | It stays less complex with Idris/Agda? |
2021-12-15 10:56:26 +0100 | <gensyst> | Is this a limitation in Haskell that's here to stay on Haskell? |
2021-12-15 10:56:36 +0100 | <int-e> | The type checker should be helping you, not vice versa. |
2021-12-15 10:57:15 +0100 | <dminuoso> | gensyst: The limitation in Haskell is that type level programming is rather an artifact than a feature. |
2021-12-15 10:57:34 +0100 | <dminuoso> | It just so happens that, after enabling a bunch of bolted-on extensions, you can do a bit of type level programming. |
2021-12-15 10:57:59 +0100 | <lortabac> | do you know the "fraction of our power" meme? that describes the problem well :) |
2021-12-15 10:58:14 +0100 | <int-e> | In the same spirit, types should be dependable, not dependent. (There may be /some/ overlap.) |
2021-12-15 10:59:25 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) (Remote host closed the connection) |
2021-12-15 10:59:31 +0100 | <gensyst> | Are there any plans to remedy this in Haskell, with some breaking changes? |
2021-12-15 10:59:40 +0100 | <gensyst> | Otherwise I fear Haskell will be left in the dust :( |
2021-12-15 10:59:47 +0100 | <gensyst> | by more powerful langs |
2021-12-15 11:00:04 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) |
2021-12-15 11:00:16 +0100 | <int-e> | gensyst: Are you sure? |
2021-12-15 11:00:25 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 11:00:35 +0100 | <gensyst> | int-e, no :) |
2021-12-15 11:00:52 +0100 | <gensyst> | lortabac, didn't know the meme until now, thanks |
2021-12-15 11:00:53 +0100 | <lortabac> | gensyst: https://imgflip.com/i/5xyend :) |
2021-12-15 11:01:05 +0100 | <int-e> | Anyway, there are plans for dependent types in Haskell and the struggle is to make them *not* break things (except in exceptional cases) |
2021-12-15 11:01:36 +0100 | <gensyst> | This is sad :( Haskell is already the past :( |
2021-12-15 11:01:41 +0100 | <merijn> | Man...had an epiphany how to speed up yesterday's AOC right as I went to bed and then spend like an hour lying awake focussed on that >.> |
2021-12-15 11:01:50 +0100 | <gensyst> | but it has libraries and probably some good optimizations |
2021-12-15 11:01:56 +0100 | <merijn> | I'm not convinced Dependent Types are the future, tbh |
2021-12-15 11:02:06 +0100 | <merijn> | So not sure why you'd say Haskell is in the past |
2021-12-15 11:02:19 +0100 | <int-e> | Me neither. They make for good papers though. |
2021-12-15 11:02:33 +0100 | <gensyst> | compared to everything else i've used haskell is in the future lol. everything else seems useless in comparison |
2021-12-15 11:03:00 +0100 | <dminuoso> | gensyst: My favourite example of how "bolted on this is", is the typing the technical interview blog post. :) |
2021-12-15 11:03:00 +0100 | cosimone | (~user@93-47-228-203.ip115.fastwebnet.it) |
2021-12-15 11:03:08 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) |
2021-12-15 11:03:48 +0100 | <int-e> | (In a paper you can make up a whole world to your liking. In practice, you want to use libraries and their authors will inevitably have different ideas about which properties they'd like to track in types... so when you combine those... hmm, well, I'm speculating that it's a mess) |
2021-12-15 11:03:49 +0100 | alx741 | (~alx741@181.199.42.79) (Read error: Connection reset by peer) |
2021-12-15 11:05:23 +0100 | <gensyst> | int-e. so maybe with Haskell, we've found the right balance! |
2021-12-15 11:05:29 +0100 | <gensyst> | for the next 2 decades. |
2021-12-15 11:05:30 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) (Read error: Connection reset by peer) |
2021-12-15 11:05:44 +0100 | <oak-> | Can't you already get quite close to dependently typed programming by enabling various language extensions, such as DataKinds? |
2021-12-15 11:06:41 +0100 | <merijn> | oak-: Sure, if you like suffering |
2021-12-15 11:08:35 +0100 | <oak-> | I have anyway got the idea that it might not be always reasonable to do type level programming everywhere, but there are special cases where there are benefits |
2021-12-15 11:09:28 +0100 | tom_ | (~tom@2a00:23c8:970c:4801:f5c6:93c3:2f5e:e0) |
2021-12-15 11:10:18 +0100 | darchitect | (~darchitec@82-132-214-28.dab.02.net) |
2021-12-15 11:10:44 +0100 | <oak-> | Somehow I find Haskell's type-level programming comparable to LISP macros (although there is also Template Haskell), you don't use them everywhere but in situations where you want to create your own DSL to solve the problem |
2021-12-15 11:11:25 +0100 | zincy | (~tom@2a00:23c8:970c:4801:2c67:e51d:1302:54d3) (Ping timeout: 252 seconds) |
2021-12-15 11:11:40 +0100 | <int-e> | . o O ( Oh, while I'm quipping: Those who give up type inference for stronger type systems deserve neither. ) |
2021-12-15 11:13:06 +0100 | <int-e> | gensyst: I think that's too subjective to meaningfully confirm or deny. |
2021-12-15 11:14:52 +0100 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2021-12-15 11:15:35 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 250 seconds) |
2021-12-15 11:16:26 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) |
2021-12-15 11:17:07 +0100 | Bob_Esponja | (~Bob_Espon@240.red-176-83-54.dynamicip.rima-tde.net) (Read error: Connection reset by peer) |
2021-12-15 11:17:37 +0100 | Lord_of_Life_ | Lord_of_Life |
2021-12-15 11:19:28 +0100 | <gensyst> | well i'm betting on haskell |
2021-12-15 11:19:31 +0100 | <dminuoso> | oak-: More often than not, a simple `when badCondition (throwIO MyException)` can do wonders. |
2021-12-15 11:19:44 +0100 | <dminuoso> | It's so much easier to read and follow, and maintain, than crazy type level programming to assert something |
2021-12-15 11:20:48 +0100 | <oak-> | This reminds me that I actually bought the "Thinking with types" -book but haven't read it :D |
2021-12-15 11:20:59 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 11:21:23 +0100 | <dminuoso> | Another important thing with type level trickery is that it greatly reduces the amount of people capable or willing to help maintain your package. |
2021-12-15 11:21:51 +0100 | <dminuoso> | When you have to enable 10 extensions and be a GHC wizard to work with some given code, you essentialy ensure you're doing this all by yourself. |
2021-12-15 11:23:39 +0100 | <int-e> | Yeah maybe we could rank those extensions by how much they *help* with writing correct code. GADTs would be my number 1, I think. |
2021-12-15 11:24:32 +0100 | <int-e> | TypeInType would be near the bottom |
2021-12-15 11:24:57 +0100 | <dminuoso> | int-e: Amusingly TypeInType is implicitly enabled anyway. |
2021-12-15 11:25:04 +0100 | <dminuoso> | You cant not have it. |
2021-12-15 11:26:08 +0100 | kuribas | (~user@ip-188-118-57-242.reverse.destiny.be) |
2021-12-15 11:26:25 +0100 | <gensyst> | all i want to do is mandate equal sizes for certain vectors and it's *already* painful lol |
2021-12-15 11:26:34 +0100 | <gensyst> | i guess that's as far as i can push it |
2021-12-15 11:26:39 +0100 | <gensyst> | s/can/should |
2021-12-15 11:26:52 +0100 | <int-e> | dminuoso: It does have the advantage of not getting in the way, but I don't really have a use for the freedoms it offers. |
2021-12-15 11:27:38 +0100 | <int-e> | Also I still have ghc-8.0.2 around if needed ;) |
2021-12-15 11:35:03 +0100 | <merijn> | bleh, there's no efficient data structure for lookups with 2 different keys, I guess |
2021-12-15 11:40:00 +0100 | <int-e> | Like a 2D array? |
2021-12-15 11:40:19 +0100 | <merijn> | no, that'd just be 1 key that's a tuple |
2021-12-15 11:40:35 +0100 | <int-e> | Okay. I don't understand what you mean then. |
2021-12-15 11:41:49 +0100 | <merijn> | int-e: I have a bunch of values that have 2 independent keys, both identifying the same value and I want to look up with either. Now I'm just using 2 maps, but that's rather a PITA to keep in sync |
2021-12-15 11:41:52 +0100 | <geekosaur> | like a database table with two indexed fields? |
2021-12-15 11:42:04 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-12-15 11:42:37 +0100 | <merijn> | Essentially |
2021-12-15 11:43:19 +0100 | <geekosaur> | would consider replicating that: stick values in a vector and have both maps provide the index into the vector. still a pain to keep in sync though] |
2021-12-15 11:43:31 +0100 | pfurla[m] | (uid345156@id-345156.tinside.irccloud.com) |
2021-12-15 11:43:39 +0100 | <geekosaur> | always will be, you're just looking for someone else to have dealt with the pain :) |
2021-12-15 11:44:35 +0100 | ph88 | (~ph88@2a02:8109:9e00:71d0:943d:5b05:e9f7:79b5) |
2021-12-15 11:44:38 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-240-10.lut.ac.uk) |
2021-12-15 11:50:14 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-12-15 11:51:07 +0100 | mbuf | (~Shakthi@122.178.199.206) (Ping timeout: 250 seconds) |
2021-12-15 11:53:05 +0100 | mbuf | (~Shakthi@171.61.229.99) |
2021-12-15 11:54:11 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-12-15 11:55:07 +0100 | pfurla | (~pfurla@2804:18:5804:c94c:6161:1466:1870:aecb) (Quit: gone to sleep. ZZZzzz…) |
2021-12-15 11:55:15 +0100 | yuyua32 | (~yuyua32@wireless-student-pt3-240-10.lut.ac.uk) (Quit: Client closed) |
2021-12-15 11:58:20 +0100 | benin | (~benin@183.82.204.250) |
2021-12-15 11:58:31 +0100 | mbuf | (~Shakthi@171.61.229.99) (Ping timeout: 256 seconds) |
2021-12-15 11:58:40 +0100 | mbuf | (~Shakthi@122.178.230.23) |
2021-12-15 11:59:13 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-12-15 12:00:42 +0100 | DNH | (~DNH@8.43.122.49) |
2021-12-15 12:01:35 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 12:02:02 +0100 | benin | (~benin@183.82.204.250) (Client Quit) |
2021-12-15 12:03:22 +0100 | ubert | (~Thunderbi@p200300ecdf1abb0650b4610a52e3eab2.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2021-12-15 12:04:24 +0100 | ubert | (~Thunderbi@p200300ecdf1abb061518ea9ba8d342d1.dip0.t-ipconnect.de) |
2021-12-15 12:04:30 +0100 | jakalx | (~jakalx@base.jakalx.net) () |
2021-12-15 12:06:56 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
2021-12-15 12:06:56 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-12-15 12:07:33 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-12-15 12:07:50 +0100 | benin | (~benin@183.82.204.250) |
2021-12-15 12:08:47 +0100 | cyphase_eviltwin | cyphase |
2021-12-15 12:14:11 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-12-15 12:16:39 +0100 | Akiva | (~Akiva@user/Akiva) (Ping timeout: 256 seconds) |
2021-12-15 12:19:02 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-12-15 12:19:55 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 12:20:43 +0100 | SummerSonw | (~The_viole@203.77.49.232) (Ping timeout: 252 seconds) |
2021-12-15 12:21:33 +0100 | y04nn | (~y04nn@92.223.89.196) |
2021-12-15 12:23:44 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-12-15 12:24:49 +0100 | madjestic | (~madjestic@88-159-247-120.fixed.kpn.net) |
2021-12-15 12:25:34 +0100 | mmhat | (~mmh@55d47819.access.ecotel.net) |
2021-12-15 12:27:15 +0100 | AlexNoo_ | AlexNoo |
2021-12-15 12:29:17 +0100 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 265 seconds) |
2021-12-15 12:32:37 +0100 | koz | (~koz@121.99.240.58) (Ping timeout: 240 seconds) |
2021-12-15 12:33:54 +0100 | hololeap_ | (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
2021-12-15 12:34:03 +0100 | koz | (~koz@121.99.240.58) |
2021-12-15 12:34:05 +0100 | hololeap_ | (~hololeap@user/hololeap) |
2021-12-15 12:35:11 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 12:39:12 +0100 | jz99 | (~jz99@n110-33-34-202.hum1.act.optusnet.com.au) |
2021-12-15 12:40:14 +0100 | __monty__ | (~toonn@user/toonn) |
2021-12-15 12:40:15 +0100 | jz99 | (~jz99@n110-33-34-202.hum1.act.optusnet.com.au) (Client Quit) |
2021-12-15 12:44:20 +0100 | gensyst | (gensyst@user/gensyst) (Quit: Leaving) |
2021-12-15 12:45:17 +0100 | rembo10 | (~rembo10@remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-12-15 12:45:33 +0100 | ph88^ | (~ph88@95.90.240.104) |
2021-12-15 12:46:03 +0100 | y04nn | (~y04nn@92.223.89.196) (Remote host closed the connection) |
2021-12-15 12:46:26 +0100 | rembo10 | (~rembo10@remulis.com) |
2021-12-15 12:48:38 +0100 | acidjnk | (~acidjnk@p200300d0c7271e736483cc3bf5018c54.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2021-12-15 12:51:26 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2021-12-15 12:52:14 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 12:53:59 +0100 | CiaoSen | (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2021-12-15 12:55:18 +0100 | SummerSonw | (~The_viole@203.77.49.232) |
2021-12-15 12:57:25 +0100 | yaroot | (~yaroot@175.0.30.125.dy.iij4u.or.jp) (Ping timeout: 240 seconds) |
2021-12-15 12:57:39 +0100 | yaroot | (~yaroot@2409:12:ac0:2300:680e:dbff:fe1e:4953) |
2021-12-15 12:58:43 +0100 | mikoto-chan | (~mikoto-ch@esm-84-240-99-143.netplaza.fi) |
2021-12-15 13:03:33 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-12-15 13:03:47 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 13:04:17 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-12-15 13:05:25 +0100 | altern | (~Sergii@altern.corbina.com.ua) |
2021-12-15 13:08:53 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
2021-12-15 13:09:10 +0100 | jgeerds_ | (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 260 seconds) |
2021-12-15 13:09:55 +0100 | altern | (~Sergii@altern.corbina.com.ua) (Ping timeout: 256 seconds) |
2021-12-15 13:10:27 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 13:15:42 +0100 | jle` | (~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 260 seconds) |
2021-12-15 13:15:43 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-12-15 13:16:30 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 13:17:26 +0100 | jle` | (~jle`@cpe-23-240-75-236.socal.res.rr.com) |
2021-12-15 13:17:44 +0100 | cfricke | (~cfricke@user/cfricke) (Ping timeout: 252 seconds) |
2021-12-15 13:18:45 +0100 | hololeap_ | (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
2021-12-15 13:18:53 +0100 | Achylles | (~Achylles_@2804:431:d725:5f74:726:267b:60a8:3cf6) |
2021-12-15 13:19:33 +0100 | nfd | (~nfd@user/nfd) (Ping timeout: 256 seconds) |
2021-12-15 13:19:52 +0100 | acidjnk | (~acidjnk@p200300d0c7271e736483cc3bf5018c54.dip0.t-ipconnect.de) |
2021-12-15 13:19:55 +0100 | hololeap_ | (~hololeap@user/hololeap) |
2021-12-15 13:20:13 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 13:21:49 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2021-12-15 13:22:17 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 13:29:42 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2021-12-15 13:32:46 +0100 | yhsiveht | (~Nishant@2405:201:f005:c007:5dca:71f9:c326:6e3b) |
2021-12-15 13:33:04 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-12-15 13:33:54 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 13:34:03 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 13:36:11 +0100 | thevishy | (~Nishant@2405:201:f005:c007:49c7:f8b1:7727:93e) (Ping timeout: 250 seconds) |
2021-12-15 13:36:47 +0100 | Achylles | (~Achylles_@2804:431:d725:5f74:726:267b:60a8:3cf6) (Remote host closed the connection) |
2021-12-15 13:39:13 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
2021-12-15 13:40:01 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 13:43:03 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-12-15 13:43:38 +0100 | Vajb | (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03) |
2021-12-15 13:45:37 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2021-12-15 13:45:52 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 13:50:06 +0100 | jippiedoe | (~david@2a02-a44c-e14e-1-f6c0-f1a6-a625-ead4.fixed6.kpn.net) |
2021-12-15 13:50:07 +0100 | Vajb | (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03) (Read error: Connection reset by peer) |
2021-12-15 13:50:52 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-12-15 13:51:10 +0100 | SummerSonw | (~The_viole@203.77.49.232) (Remote host closed the connection) |
2021-12-15 13:51:17 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
2021-12-15 13:51:32 +0100 | SummerSonw | (~The_viole@203.77.49.232) |
2021-12-15 13:51:38 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 13:51:41 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 13:52:37 +0100 | <dminuoso> | int-e: Regarding GADTs, I find that somewhat surprising. I have not yet really encountered the need or usecase to write more-correect-code with them. |
2021-12-15 13:52:40 +0100 | pfurla[m] | (uid345156@id-345156.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
2021-12-15 13:52:51 +0100 | <dminuoso> | But maybe I'm missing out on some common patterns with them |
2021-12-15 13:54:23 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-12-15 13:54:24 +0100 | bontaq | (~user@ool-45779fe5.dyn.optonline.net) |
2021-12-15 13:55:09 +0100 | Vajb | (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03) |
2021-12-15 13:56:57 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2021-12-15 13:57:29 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 13:57:44 +0100 | noctux2 | (~noctux@p5b2cc15e.dip0.t-ipconnect.de) |
2021-12-15 13:58:38 +0100 | noctux2 | (~noctux@p5b2cc15e.dip0.t-ipconnect.de) (Client Quit) |
2021-12-15 14:00:01 +0100 | max22- | (~maxime@2a01cb08833598009a038ff51315adf9.ipv6.abo.wanadoo.fr) (Ping timeout: 250 seconds) |
2021-12-15 14:03:13 +0100 | SummerSonw | (~The_viole@203.77.49.232) (Remote host closed the connection) |
2021-12-15 14:03:34 +0100 | SummerSonw | (~The_viole@203.77.49.232) |
2021-12-15 14:04:05 +0100 | darchitect | (~darchitec@82-132-214-28.dab.02.net) (Read error: Connection reset by peer) |
2021-12-15 14:04:05 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 14:07:22 +0100 | gensyst | (gensyst@user/gensyst) |
2021-12-15 14:07:47 +0100 | <gensyst> | foo @Int a b is working but a `foo @Int` b is not |
2021-12-15 14:07:53 +0100 | <gensyst> | How to apply types to section operators? |
2021-12-15 14:08:13 +0100 | <merijn> | gensyst: You can't apply anything within `` it only works on single variables |
2021-12-15 14:09:11 +0100 | curiousgay | (~curiousga@77-120-141-90.kha.volia.net) |
2021-12-15 14:09:49 +0100 | <jippiedoe> | flip (foo @Int) b |
2021-12-15 14:10:28 +0100 | <dminuoso> | let f = foo @Int in l `f` r |
2021-12-15 14:11:26 +0100 | <gensyst> | ok thank you |
2021-12-15 14:11:39 +0100 | <gensyst> | not the prettiest to have those intermediate vars though, but ok |
2021-12-15 14:13:59 +0100 | <geekosaur> | the parser gets ugly if you allow more than just an identifier in `` |
2021-12-15 14:14:12 +0100 | <geekosaur> | especially whenb you try to nest them :) |
2021-12-15 14:15:04 +0100 | <dminuoso> | geekosaur: Well you can of course just write `foo @Int b a` |
2021-12-15 14:15:10 +0100 | <dminuoso> | Oh. gensyst |
2021-12-15 14:15:16 +0100 | benin | (~benin@183.82.204.250) (Quit: The Lounge - https://thelounge.chat) |
2021-12-15 14:15:21 +0100 | pfurla | (~pfurla@177.25.184.15) |
2021-12-15 14:15:32 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-12-15 14:15:41 +0100 | bahamas | (~lucian@84.232.140.13) |
2021-12-15 14:16:45 +0100 | <geekosaur> | problem there is you get "cleverly" named things like `notFollowedBy` that expect to be written infix and look bass-ackwards when written prefix |
2021-12-15 14:18:13 +0100 | benin | (~benin@183.82.204.250) |
2021-12-15 14:18:14 +0100 | SummerSonw | (~The_viole@203.77.49.232) (Ping timeout: 260 seconds) |
2021-12-15 14:18:38 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2021-12-15 14:21:23 +0100 | <dminuoso> | Fair, I tend to use isSuffixOf/isInfixOf/isPrefixOf in infix notation exclusively |
2021-12-15 14:22:07 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 14:28:11 +0100 | Erutuon | (~Erutuon@user/erutuon) (Ping timeout: 250 seconds) |
2021-12-15 14:28:36 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 14:30:32 +0100 | Ainoretho | (~ypw@huji-132-64-244-88.xt.huji.ac.il) |
2021-12-15 14:31:35 +0100 | SummerSonw | (~The_viole@203.77.49.232) |
2021-12-15 14:32:30 +0100 | <gensyst> | thanks guys |
2021-12-15 14:32:34 +0100 | gensyst | (gensyst@user/gensyst) (Quit: Leaving) |
2021-12-15 14:33:30 +0100 | benin | (~benin@183.82.204.250) (Quit: The Lounge - https://thelounge.chat) |
2021-12-15 14:33:47 +0100 | benin | (~benin@183.82.204.250) |
2021-12-15 14:36:37 +0100 | bahamas | (~lucian@84.232.140.13) (Ping timeout: 256 seconds) |
2021-12-15 14:46:32 +0100 | max22- | (~maxime@2a01cb0883359800f72e75eb3cbff1a0.ipv6.abo.wanadoo.fr) |
2021-12-15 14:46:42 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 14:51:39 +0100 | jkaye | (~jkaye@2601:281:8300:7530:323:f5e4:2678:9ded) |
2021-12-15 14:59:29 +0100 | shriekingnoise | (~shrieking@186.137.144.80) |
2021-12-15 15:00:58 +0100 | bollu | (uid233390@id-233390.helmsley.irccloud.com) |
2021-12-15 15:02:09 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
2021-12-15 15:02:22 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2021-12-15 15:02:36 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:1b1:ff3c:2e88:391a) (Quit: WeeChat 2.8) |
2021-12-15 15:04:18 +0100 | waleee | (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
2021-12-15 15:04:35 +0100 | <iphy> | is there a parser generator for trees? like happy is for token streams. I want to re-parse the tree after parsing a token stream into a tree. something like pattern matching but more concise. basically I'd like to first parse a more general language and then identify patterns on it |
2021-12-15 15:04:39 +0100 | xsperry | (~xs@user/xsperry) (Remote host closed the connection) |
2021-12-15 15:06:38 +0100 | <dminuoso> | iphy: Is that not simply an algebra on the tree? |
2021-12-15 15:07:40 +0100 | <geekosaur> | that's more or less what I'm wondering. I mean, the whole point of parsing into a tree representation is to enable such analysis |
2021-12-15 15:08:02 +0100 | <iphy> | for example, I'd parse a C file into a list of top level declarations (comments, includes, functions, defines, #ifdef/#endif, etc.) and then re-parse the list of declarations into "includes first, defines and functions next, and everything should be wrapped in a header guard" |
2021-12-15 15:08:24 +0100 | <dminuoso> | That does not sound like "parsing" |
2021-12-15 15:08:29 +0100 | <dminuoso> | That sounds like a simple tree transformation. |
2021-12-15 15:08:36 +0100 | <dminuoso> | i.e. `transform :: Tree -> Tree` |
2021-12-15 15:08:41 +0100 | <iphy> | sort of, yes |
2021-12-15 15:08:51 +0100 | <iphy> | except the output tree might be a different type, but sure, it could be the same type |
2021-12-15 15:08:58 +0100 | <iphy> | and yes, it's a simple tree transformation |
2021-12-15 15:09:05 +0100 | <iphy> | is there a "tree transformation" generator? |
2021-12-15 15:09:17 +0100 | <dminuoso> | You mean a function? |
2021-12-15 15:09:29 +0100 | <dminuoso> | I'm really unsure what you are looking for, that isn't covered by a simple function with pattern matching. |
2021-12-15 15:10:05 +0100 | <iphy> | header ::= ifndef ID define ID include+ decl+ endif |
2021-12-15 15:10:17 +0100 | <iphy> | that's what I want to express |
2021-12-15 15:10:46 +0100 | <iphy> | header ::= ifndef ID define ID include+ decl+ endif { Header $2 $5 $6 } |
2021-12-15 15:11:15 +0100 | <iphy> | or, maybe in haskell pattern matching syntax: |
2021-12-15 15:11:16 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 15:12:16 +0100 | <dminuoso> | By the way, changing the order of macros in a C program can alter its meaning. |
2021-12-15 15:12:47 +0100 | <iphy> | header = \case (Ifndef guard) (Define _) incs@[Include...] decls@[Decl...] Endif -> Header guard incs decls |
2021-12-15 15:12:50 +0100 | <iphy> | (pseudo-haskell) |
2021-12-15 15:13:26 +0100 | <iphy> | I'm not changing C programs, I'm parsing them |
2021-12-15 15:13:33 +0100 | <geekosaur> | you'd have specific AST nodes for those which you can match against |
2021-12-15 15:13:48 +0100 | <iphy> | yes, I have AST nodes for Include, Decl, etc. |
2021-12-15 15:13:48 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 15:14:13 +0100 | <iphy> | I want to match a list of nodes against this pattern |
2021-12-15 15:15:38 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Ping timeout: 260 seconds) |
2021-12-15 15:16:11 +0100 | SummerSonw | (~The_viole@203.77.49.232) (Ping timeout: 245 seconds) |
2021-12-15 15:16:17 +0100 | <iphy> | if there's a library for expressing this pattern, that's cool too |
2021-12-15 15:19:09 +0100 | yhsiveht | (~Nishant@2405:201:f005:c007:5dca:71f9:c326:6e3b) (Quit: Leaving) |
2021-12-15 15:24:40 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-12-15 15:29:19 +0100 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
2021-12-15 15:31:13 +0100 | <geekosaur> | I was thinking hoopl but that's for dataflow analysis |
2021-12-15 15:32:12 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 15:32:32 +0100 | <geekosaur> | but tbh if I know a header is going to have that pattern I build it into the parser rules and the resulting AST will have your Header node |
2021-12-15 15:33:29 +0100 | <iphy> | right, that's an option |
2021-12-15 15:33:54 +0100 | <iphy> | but I was hoping to be able to do more pattern matching and analysis that way more easily |
2021-12-15 15:34:06 +0100 | <dminuoso> | I would simply do this in haskell code. |
2021-12-15 15:34:25 +0100 | <dminuoso> | Once you have your AST, you can transform it, and if the resulting data type changes, make it a simple `f :: AST1 -> AST2` |
2021-12-15 15:34:32 +0100 | <iphy> | https://gist.github.com/iphydf/766056c412aa360946a57612b2537daa |
2021-12-15 15:34:43 +0100 | <iphy> | does this snippet make sense? what I'd like to express? |
2021-12-15 15:34:57 +0100 | <dminuoso> | No |
2021-12-15 15:35:01 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-12-15 15:35:01 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-12-15 15:35:01 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-12-15 15:35:14 +0100 | <dminuoso> | Or maybe |
2021-12-15 15:37:31 +0100 | <jippiedoe> | I don't completely know what you want, but maybe attribute grammars provide something similar? |
2021-12-15 15:39:05 +0100 | sleblanc | (~sleblanc@user/sleblanc) (Ping timeout: 252 seconds) |
2021-12-15 15:39:52 +0100 | <iphy> | https://gist.github.com/iphydf/b1fc840ae314b9e89b9f3bbaf2def78e |
2021-12-15 15:39:55 +0100 | <iphy> | more or less |
2021-12-15 15:40:09 +0100 | <iphy> | probably monadic and with Alternative instead |
2021-12-15 15:40:21 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-12-15 15:41:47 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Client Quit) |
2021-12-15 15:42:00 +0100 | <iphy> | so line 2 turns into the function on line 6 |
2021-12-15 15:42:52 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-12-15 15:43:21 +0100 | <dminuoso> | I think I have a broad understanding what you are trying to do here. |
2021-12-15 15:43:36 +0100 | <dminuoso> | And it seems you should simply write this into your happy grammar. |
2021-12-15 15:44:20 +0100 | <dminuoso> | Or potentially a separate pass, much in line with how macro expansion is implemented in C compielrs |
2021-12-15 15:44:31 +0100 | featurebug | (~featurebu@49.205.122.91) |
2021-12-15 15:44:53 +0100 | <dminuoso> | i.e. first parse the macro language into a MacroAst of course, and then parse the C bits and pieces separately |
2021-12-15 15:45:35 +0100 | <iphy> | hmm |
2021-12-15 15:45:58 +0100 | benin1 | (benin@gateway/vpn/protonvpn/benin) |
2021-12-15 15:46:11 +0100 | <iphy> | maybe I can turn ast nodes into the token type of a second happy parser |
2021-12-15 15:46:32 +0100 | <iphy> | but I'd like to make many smaller parsers like this, used for various analyses |
2021-12-15 15:46:58 +0100 | <iphy> | making many happy parsers seems a bit heavy |
2021-12-15 15:47:02 +0100 | <dminuoso> | Something like `data MacroAst = Define T.Text T.Text | If T.Text MacroAst | C T.Text |
2021-12-15 15:47:18 +0100 | <dminuoso> | And then `C T.Text` would be the raw C chunks |
2021-12-15 15:47:50 +0100 | <iphy> | right, but that would be specific to one use case |
2021-12-15 15:47:53 +0100 | darkstardevx | (~darkstard@50.39.115.145) |
2021-12-15 15:48:02 +0100 | benin | (~benin@183.82.204.250) (Ping timeout: 240 seconds) |
2021-12-15 15:48:44 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
2021-12-15 15:48:52 +0100 | benin | (~benin@183.82.204.250) |
2021-12-15 15:50:50 +0100 | benin | (~benin@183.82.204.250) (Client Quit) |
2021-12-15 15:50:51 +0100 | benin1 | (benin@gateway/vpn/protonvpn/benin) (Ping timeout: 256 seconds) |
2021-12-15 15:51:12 +0100 | SummerSonw | (~The_viole@203.77.49.232) |
2021-12-15 15:51:14 +0100 | PVPANTHONY | (~The_viole@203.77.49.232) |
2021-12-15 15:51:53 +0100 | jlamothe_ | (~jlamothe@198.251.61.229) (Quit: leaving) |
2021-12-15 15:57:05 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 15:57:22 +0100 | joeyh | (joeyh@kitenet.net) (Ping timeout: 268 seconds) |
2021-12-15 15:57:59 +0100 | joeyh | (~joeyh@kitenet.net) |
2021-12-15 15:57:59 +0100 | nshepperd | (nshepperd@2600:3c03::f03c:92ff:fe28:92c9) (Ping timeout: 268 seconds) |
2021-12-15 15:58:02 +0100 | landonf | (landonf@mac68k.info) (Ping timeout: 240 seconds) |
2021-12-15 15:58:36 +0100 | hays | (rootvegeta@fsf/member/hays) (Ping timeout: 268 seconds) |
2021-12-15 15:58:45 +0100 | h_ | (~rootveget@fsf/member/hays) |
2021-12-15 15:58:47 +0100 | <featurebug> | Hi all, I am trying to build haskell on wsl but getting this error - https://pastebin.com/Qjcxm33d . Any idea what is the problem? |
2021-12-15 15:59:33 +0100 | <merijn> | featurebug: Any specific reason you're trying to build GHC from source? |
2021-12-15 15:59:48 +0100 | nshepperd | (~nshepperd@li364-218.members.linode.com) |
2021-12-15 16:00:31 +0100 | nvmd | (~nvmd@user/nvmd) |
2021-12-15 16:01:46 +0100 | mc47 | (~mc47@xmonad/TheMC47) |
2021-12-15 16:01:49 +0100 | <featurebug> | yes I was trying to run the external-stg-interpreter, following these instructions - https://github.com/grin-compiler/ghc-whole-program-compiler-project#usage |
2021-12-15 16:02:06 +0100 | <featurebug> | part of that was building ghc. not entirely sure why that is necessary |
2021-12-15 16:02:23 +0100 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2021-12-15 16:03:09 +0100 | landonf | (landonf@mac68k.info) |
2021-12-15 16:03:13 +0100 | jlamothe | (~jlamothe@198.251.61.229) |
2021-12-15 16:03:21 +0100 | <merijn> | ah, because he forked GHC |
2021-12-15 16:04:51 +0100 | <merijn> | Looks like there's *something* broken with his GHC fork under WSL, but no clue what |
2021-12-15 16:05:11 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-12-15 16:05:11 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-12-15 16:05:11 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-12-15 16:05:34 +0100 | <featurebug> | ok ok, is it generally possible to build ghc in wsl? |
2021-12-15 16:05:42 +0100 | <merijn> | no clue, tbh |
2021-12-15 16:05:59 +0100 | <iphy> | should be |
2021-12-15 16:06:06 +0100 | <iphy> | "error: variable ‘stg_exports_GHCziDataziFastString’ has initializer but incomplete type" |
2021-12-15 16:06:13 +0100 | xkuru | (~xkuru@user/xkuru) |
2021-12-15 16:06:21 +0100 | <iphy> | that doesn't sound like an OS specific issue |
2021-12-15 16:09:53 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 252 seconds) |
2021-12-15 16:11:44 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
2021-12-15 16:14:45 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 16:18:54 +0100 | madjestic | (~madjestic@88-159-247-120.fixed.kpn.net) (Quit: Reconnecting) |
2021-12-15 16:19:06 +0100 | madjestic | (~madjestic@88-159-247-120.fixed.kpn.net) |
2021-12-15 16:19:21 +0100 | fr33domlover | (~fr33@2.55.142.29) (Remote host closed the connection) |
2021-12-15 16:20:00 +0100 | <geekosaur> | that looks to me like a missing or incomplete include file defining ForeignExportsList |
2021-12-15 16:20:28 +0100 | Sgeo | (~Sgeo@user/sgeo) |
2021-12-15 16:24:30 +0100 | tdmm | (1c9b9145fc@2604:bf00:561:2000::1c8) |
2021-12-15 16:28:17 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 16:29:46 +0100 | PVPANTHONY | (~The_viole@203.77.49.232) (Quit: Leaving) |
2021-12-15 16:30:16 +0100 | burnsidesLlama | (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
2021-12-15 16:30:19 +0100 | burnsidesLlama | (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-12-15 16:30:26 +0100 | burnsidesLlama | (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
2021-12-15 16:31:23 +0100 | SummerSonw | (~The_viole@203.77.49.232) (Quit: Leaving) |
2021-12-15 16:31:36 +0100 | pfurla | (~pfurla@177.25.184.15) (Quit: gone to sleep. ZZZzzz…) |
2021-12-15 16:32:33 +0100 | <geekosaur> | hm, conceivably that's a platform issue if whatever include file is supposed to define that is generated and the generation went wrong somehow because of platform |
2021-12-15 16:32:55 +0100 | <geekosaur> | but I'd expect ForeignExportsList to not be platform specific tbh |
2021-12-15 16:33:50 +0100 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2021-12-15 16:37:45 +0100 | ldlework | (~hexeme@user/hexeme) (Ping timeout: 250 seconds) |
2021-12-15 16:40:23 +0100 | DNH | (~DNH@8.43.122.49) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-12-15 16:40:51 +0100 | <janus> | Cale: when you say "linear things [..] secretly update a reference" do you mean they update a counter? so we're talking about run-time errors if you use it wrong? |
2021-12-15 16:41:25 +0100 | eco | (~ubuntu@ec2-54-201-230-197.us-west-2.compute.amazonaws.com) (Ping timeout: 252 seconds) |
2021-12-15 16:45:01 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 16:47:34 +0100 | bahamas | (~lucian@84.232.140.13) |
2021-12-15 16:48:30 +0100 | coot | (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
2021-12-15 16:49:02 +0100 | coot | (~coot@89-64-85-93.dynamic.chello.pl) |
2021-12-15 16:49:52 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 16:52:21 +0100 | hexeme | (~hexeme@user/hexeme) |
2021-12-15 16:52:33 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2021-12-15 16:52:45 +0100 | eco | (~ubuntu@ec2-54-201-230-197.us-west-2.compute.amazonaws.com) |
2021-12-15 16:53:38 +0100 | vincenz | (~poucet@104.134.21.7) |
2021-12-15 16:56:47 +0100 | Guest57 | (~Guest57@82.47.22.49) |
2021-12-15 16:58:41 +0100 | Guest57 | (~Guest57@82.47.22.49) (Client Quit) |
2021-12-15 16:59:38 +0100 | <merijn> | Whoo! |
2021-12-15 16:59:53 +0100 | <merijn> | New solution to Day14 takes 0.01 for part 1&2, down from 40s! |
2021-12-15 16:59:54 +0100 | <geekosaur> | moo? |
2021-12-15 17:00:06 +0100 | chizil[m] | (~chizilmat@2001:470:69fc:105::1:34ab) (Quit: You have been kicked for being idle) |
2021-12-15 17:01:27 +0100 | <Taneb> | merijn: nice! |
2021-12-15 17:03:25 +0100 | <merijn> | I realised my initial version was just a very dumb specific hack that can be trivially generalised :p |
2021-12-15 17:03:34 +0100 | lbseale | (~ep1ctetus@user/ep1ctetus) |
2021-12-15 17:03:48 +0100 | <merijn> | Of course, this only occurred to me as I hit the bed and then spent 40 minutes lying awake thinking it through, so my sleep was ruined... |
2021-12-15 17:04:31 +0100 | Morrow | (~quassel@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 252 seconds) |
2021-12-15 17:07:33 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 17:10:10 +0100 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
2021-12-15 17:11:13 +0100 | chele | (~chele@user/chele) (Remote host closed the connection) |
2021-12-15 17:12:25 +0100 | DNH | (~DNH@8.43.122.49) |
2021-12-15 17:12:25 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 17:13:02 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 17:17:27 +0100 | DavSanchez | (~DavSanche@73.red-83-34-157.dynamicip.rima-tde.net) |
2021-12-15 17:19:32 +0100 | <jippiedoe> | Did you solve it in a similar way to day6? |
2021-12-15 17:20:53 +0100 | <merijn> | Not at all :p |
2021-12-15 17:22:01 +0100 | <merijn> | Day6 has a fairly easy iterative solution |
2021-12-15 17:22:08 +0100 | <merijn> | Day14 not so much |
2021-12-15 17:22:10 +0100 | DavSanchez | (~DavSanche@73.red-83-34-157.dynamicip.rima-tde.net) (Remote host closed the connection) |
2021-12-15 17:22:20 +0100 | <c_wraith> | Day 14 has a solution almost identical to day 6 |
2021-12-15 17:22:40 +0100 | DavSanch_ | (~davsanche@73.red-83-34-157.dynamicip.rima-tde.net) |
2021-12-15 17:23:19 +0100 | <merijn> | c_wraith: Not identical to my day 6 solution :p |
2021-12-15 17:23:32 +0100 | <merijn> | c_wraith: https://github.com/merijn/AdventOfCode/blob/master/Day6.hs#L42-L51 |
2021-12-15 17:24:11 +0100 | <merijn> | I don't see how I'd apply that approach to Day14 |
2021-12-15 17:24:18 +0100 | <c_wraith> | nope, it's basically the same. The only difference is that you're working over a mildly larger state space. |
2021-12-15 17:25:05 +0100 | <merijn> | c_wraith: This is my Day14 solution: https://github.com/merijn/AdventOfCode/blob/master/Day14.hs#L71-L115 |
2021-12-15 17:28:13 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 17:31:43 +0100 | bahamas | (~lucian@84.232.140.13) (Ping timeout: 250 seconds) |
2021-12-15 17:31:55 +0100 | doyougnu | (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) |
2021-12-15 17:35:22 +0100 | Nolrai2 | (~Nolrai2@73.240.1.39) |
2021-12-15 17:35:50 +0100 | off^ | (~off@wsip-98-188-240-142.mc.at.cox.net) (Remote host closed the connection) |
2021-12-15 17:36:57 +0100 | <DavSanch_> | Good day everyone, I have a question about cabal.project files that include several packages (for example, a lib, a cli and a gui). Is there any way to make the packages defined there visible to the others? |
2021-12-15 17:37:33 +0100 | <DavSanch_> | I mean, is it possible for example that the "gui" package could import a library defined in the "lib" package, provided it hasn't been installed nor uploaded to hackage |
2021-12-15 17:37:55 +0100 | _ht | (~quassel@82-169-194-8.biz.kpn.net) |
2021-12-15 17:38:03 +0100 | biberu | (~biberu@user/biberu) (Read error: Connection reset by peer) |
2021-12-15 17:38:28 +0100 | <jippiedoe> | merijn: How is that so fast?! I thought that the final string would have been way too large to store |
2021-12-15 17:38:36 +0100 | <Nolrai2> | Is there a reason mapAccum is in Data.Conduit.List and doesn't have a renamed version in Data.Conduit.Combinators? |
2021-12-15 17:39:03 +0100 | <merijn> | jippiedoe: Who says anything about storing final strings? :) |
2021-12-15 17:40:41 +0100 | <merijn> | jippiedoe: You can check the solution at the link above :) |
2021-12-15 17:41:38 +0100 | <jippiedoe> | Ah, I read through it too fast: 'polymerInsertion' itself looks like the naive algorithm, but I have to look at fastScore a bit more |
2021-12-15 17:41:50 +0100 | <merijn> | jippiedoe: Yeah, that was is my initial simple expansion |
2021-12-15 17:42:13 +0100 | <merijn> | jippiedoe: Which works perfectly fine lazily, constant memory for 40 minutes chugging along the part 2 solution :p |
2021-12-15 17:42:24 +0100 | <merijn> | But probably won't finish before the heat death of the universe :p |
2021-12-15 17:44:37 +0100 | <Nolrai2> | DavSanch_: short answer is "yes". https://docs.haskellstack.org/en/stable/yaml_configuration/ describes how for the stack build tool, iiuc your question. |
2021-12-15 17:45:16 +0100 | ph88^ | (~ph88@95.90.240.104) (Quit: Leaving) |
2021-12-15 17:45:16 +0100 | <merijn> | DavSanch_: ah, wait, I only now see the plural "cabal.project file*s*" |
2021-12-15 17:45:24 +0100 | <merijn> | DavSanch_: Why is that plural? Because that sounds wrong |
2021-12-15 17:45:34 +0100 | ph88^ | (~ph88@ip5f5af068.dynamic.kabel-deutschland.de) |
2021-12-15 17:45:44 +0100 | ph88^ | (~ph88@ip5f5af068.dynamic.kabel-deutschland.de) (Client Quit) |
2021-12-15 17:45:47 +0100 | <DavSanch_> | You're right, I was talking about a single cabal.project file :) |
2021-12-15 17:45:58 +0100 | ph88 | (~ph88@2a02:8109:9e00:71d0:943d:5b05:e9f7:79b5) (Quit: Leaving) |
2021-12-15 17:46:15 +0100 | ph88 | (~ph88@ip5f5af068.dynamic.kabel-deutschland.de) |
2021-12-15 17:46:28 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 17:46:31 +0100 | <merijn> | DavSanch_: If you list all the package in the cabal.project packages it should "just work"? |
2021-12-15 17:46:59 +0100 | <merijn> | DavSanch_: see https://github.com/merijn/broadcast-chan/blob/master/cabal.project#L1 |
2021-12-15 17:47:30 +0100 | <jippiedoe> | merijn: Alright, I get it now, that's very neat! The solution I had / c_wraith was mentioning, is just like Day6, except you count all possible pairs |
2021-12-15 17:47:55 +0100 | <DavSanch_> | Thanks guys, most probably I have something wrong around because I'm finding errors. I'll take a look |
2021-12-15 17:47:57 +0100 | <merijn> | c_wraith already whispered me about that solution :) |
2021-12-15 17:48:02 +0100 | lechner | (~lechner@debian/lechner) (Ping timeout: 240 seconds) |
2021-12-15 17:48:14 +0100 | <merijn> | DavSanch_: helps to pastebin the errors (and/or link to repo) |
2021-12-15 17:49:22 +0100 | <DavSanch_> | It's for this one: https://github.com/DavSanchez/hematria |
2021-12-15 17:49:41 +0100 | <DavSanch_> | latest changes (i.e. the GUI importing the lib) are not up yet |
2021-12-15 17:50:27 +0100 | lechner | (~lechner@debian/lechner) |
2021-12-15 17:51:22 +0100 | <merijn> | What are the errors? |
2021-12-15 17:52:41 +0100 | slowButPresent | (~slowButPr@user/slowbutpresent) |
2021-12-15 17:53:14 +0100 | <DavSanch_> | Could not find module 'x' It is not a module in the current program, or in any known package |
2021-12-15 17:53:14 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 17:53:19 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 17:54:33 +0100 | <DavSanch_> | Ahh solved, just copied/pasted the exported lib from the library folder and it worked, had a typo somewhere |
2021-12-15 17:55:05 +0100 | <merijn> | :p |
2021-12-15 17:55:09 +0100 | <DavSanch_> | Thanks @merijin @Nolrai2 |
2021-12-15 17:55:34 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2021-12-15 17:55:57 +0100 | srk | (~sorki@user/srk) (Remote host closed the connection) |
2021-12-15 17:56:18 +0100 | srk | (~sorki@user/srk) |
2021-12-15 17:56:32 +0100 | jippiedoe | (~david@2a02-a44c-e14e-1-f6c0-f1a6-a625-ead4.fixed6.kpn.net) (Remote host closed the connection) |
2021-12-15 17:58:38 +0100 | xkuru | (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
2021-12-15 17:59:32 +0100 | econo | (uid147250@user/econo) |
2021-12-15 18:00:28 +0100 | Akiva | (~Akiva@user/Akiva) |
2021-12-15 18:01:18 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-12-15 18:02:14 +0100 | jackhill | (~jackhill@kalessin.dragonsnail.net) (Remote host closed the connection) |
2021-12-15 18:04:20 +0100 | biberu | (~biberu@user/biberu) |
2021-12-15 18:04:46 +0100 | biberu | (~biberu@user/biberu) (Remote host closed the connection) |
2021-12-15 18:05:33 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2021-12-15 18:06:04 +0100 | lambdalove-sadvi | (~user@2804:d51:47f5:ac00:9bf5:fb5f:29:c009) |
2021-12-15 18:10:01 +0100 | biberu | (~biberu@user/biberu) |
2021-12-15 18:10:53 +0100 | waleee | (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 252 seconds) |
2021-12-15 18:11:02 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 18:12:47 +0100 | xkuru | (~xkuru@user/xkuru) |
2021-12-15 18:13:12 +0100 | Guest47 | (~Guest47@2a02:8109:b63f:ed22:a45d:5f40:3bfd:dbd3) |
2021-12-15 18:13:46 +0100 | waleee | (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
2021-12-15 18:13:52 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Quit: Leaving) |
2021-12-15 18:15:02 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-12-15 18:15:31 +0100 | mvk | (~mvk@2607:fea8:5cdd:f000::9788) |
2021-12-15 18:15:31 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 18:16:25 +0100 | bahamas | (~lucian@84.232.140.13) |
2021-12-15 18:22:48 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) |
2021-12-15 18:23:49 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2021-12-15 18:24:23 +0100 | Neuromancer | (~Neuromanc@user/neuromancer) |
2021-12-15 18:26:30 +0100 | lupulo | (~lupulo_@128.red-83-35-42.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
2021-12-15 18:26:58 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2021-12-15 18:29:19 +0100 | DavSanch_ | (~davsanche@73.red-83-34-157.dynamicip.rima-tde.net) () |
2021-12-15 18:32:02 +0100 | waleee | (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds) |
2021-12-15 18:32:15 +0100 | Guest47 | (~Guest47@2a02:8109:b63f:ed22:a45d:5f40:3bfd:dbd3) (Quit: Client closed) |
2021-12-15 18:33:34 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 18:33:43 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 18:35:38 +0100 | acidjnk | (~acidjnk@p200300d0c7271e736483cc3bf5018c54.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2021-12-15 18:37:25 +0100 | ph88 | (~ph88@ip5f5af068.dynamic.kabel-deutschland.de) (Quit: Leaving) |
2021-12-15 18:38:38 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-12-15 18:40:55 +0100 | DNH | (~DNH@8.43.122.49) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-12-15 18:40:55 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 18:42:07 +0100 | <cigsender> | :q |
2021-12-15 18:42:24 +0100 | cigsender | (~cigsender@74.124.58.162) (Quit: leaving) |
2021-12-15 18:43:10 +0100 | mbuf | (~Shakthi@122.178.230.23) (Quit: Leaving) |
2021-12-15 18:43:33 +0100 | jackhill | (~jackhill@kalessin.dragonsnail.net) |
2021-12-15 18:43:45 +0100 | puke | (~puke@user/puke) (Remote host closed the connection) |
2021-12-15 18:44:00 +0100 | puke | (~puke@user/puke) |
2021-12-15 18:49:57 +0100 | coot | (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
2021-12-15 18:50:29 +0100 | curiousgay | (~curiousga@77-120-141-90.kha.volia.net) (Ping timeout: 256 seconds) |
2021-12-15 18:52:26 +0100 | aliosablack | (~chomwitt@94.66.63.187) (Quit: Leaving) |
2021-12-15 18:52:40 +0100 | aliosablack | (~chomwitt@2a02:587:dc19:a500:12c3:7bff:fe6d:d374) |
2021-12-15 18:52:40 +0100 | aliosablack | (~chomwitt@2a02:587:dc19:a500:12c3:7bff:fe6d:d374) (Remote host closed the connection) |
2021-12-15 18:52:59 +0100 | chomwitt | (~chomwitt@2a02:587:dc19:a500:12c3:7bff:fe6d:d374) |
2021-12-15 18:53:04 +0100 | kuribas | (~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 26.3)) |
2021-12-15 18:53:58 +0100 | curiousgay | (~curiousga@77-120-141-90.kha.volia.net) |
2021-12-15 18:54:34 +0100 | waleee | (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
2021-12-15 18:58:48 +0100 | hexeme | ldlework |
2021-12-15 18:59:03 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 19:01:22 +0100 | <EvanR> | hmm is there a slick ADT which is a list of alternating a and b |
2021-12-15 19:01:23 +0100 | Vajb | (~Vajb@2001:999:62:f3d1:4390:fbed:1f9b:9d03) (Read error: Connection reset by peer) |
2021-12-15 19:01:35 +0100 | <EvanR> | first element could be a or b |
2021-12-15 19:02:19 +0100 | jinsun | (~quassel@user/jinsun) (Read error: Connection reset by peer) |
2021-12-15 19:03:04 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-12-15 19:03:59 +0100 | jackhill | KM4MBG |
2021-12-15 19:04:12 +0100 | <EvanR> | data NodeA a b = NodeA a (NodeB a b) |
2021-12-15 19:04:12 +0100 | KM4MBG | jackhill |
2021-12-15 19:04:23 +0100 | <EvanR> | data NodeB a b = NodeB b (NodeA a b) |
2021-12-15 19:04:29 +0100 | <geekosaur> | % data AB a = ANil | ACons a (BA a); data BA a = BNil | BCons a (AB a) |
2021-12-15 19:04:29 +0100 | <yahb> | geekosaur: |
2021-12-15 19:04:52 +0100 | <xerox> | or [Either a b] with smart constructors / view patterns |
2021-12-15 19:04:56 +0100 | <EvanR> | BCons holds no b |
2021-12-15 19:05:14 +0100 | <monochrom> | That's probably a typo |
2021-12-15 19:05:16 +0100 | <EvanR> | yeah |
2021-12-15 19:05:20 +0100 | <geekosaur> | oh, sorry, missed that part, just had alternating as |
2021-12-15 19:05:39 +0100 | <EvanR> | so this is slick ... then what is the type of something that takes one xD |
2021-12-15 19:05:51 +0100 | <EvanR> | Either (AB a b) (BA a b) ... |
2021-12-15 19:05:52 +0100 | jinsun | (~quassel@user/jinsun) |
2021-12-15 19:06:02 +0100 | <EvanR> | not as slick |
2021-12-15 19:06:07 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 19:06:20 +0100 | zebrag | (~chris@user/zebrag) |
2021-12-15 19:06:23 +0100 | <geekosaur> | % data AB a b = ANil | ACons a (BA a b)' data BA a b = BNil | BCons b (AB a b) |
2021-12-15 19:06:23 +0100 | <yahb> | geekosaur: ; <interactive>:143:40: error: parse error on input `data' |
2021-12-15 19:06:31 +0100 | <geekosaur> | % data AB a b = ANil | ACons a (BA a b); data BA a b = BNil | BCons b (AB a b) |
2021-12-15 19:06:31 +0100 | <yahb> | geekosaur: |
2021-12-15 19:07:08 +0100 | <geekosaur> | what you'd do with it, besides possibly building an inefficient rbtree, I dunno |
2021-12-15 19:07:33 +0100 | <EvanR> | if that is what the data looks like... then it expresses that in types |
2021-12-15 19:08:21 +0100 | <EvanR> | i guess it needs a 3rd type to act as a container so it could start on A or B |
2021-12-15 19:08:34 +0100 | pfurla | (~pfurla@201.17.118.230) |
2021-12-15 19:08:36 +0100 | aforemny | (~aforemny@static.248.158.34.188.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-12-15 19:09:01 +0100 | <EvanR> | i looked at GADT that uses a toggling Bool phantom and realized where I was headed |
2021-12-15 19:09:09 +0100 | aforemny | (~aforemny@static.248.158.34.188.clients.your-server.de) |
2021-12-15 19:09:18 +0100 | akegalj | (~akegalj@141-136-187-255.dsl.iskon.hr) |
2021-12-15 19:09:30 +0100 | <monochrom> | Heh inefficient rbtree. |
2021-12-15 19:10:59 +0100 | <EvanR> | if values are like music, types are the notation that gives a partial picture of what the composer wants |
2021-12-15 19:12:04 +0100 | <akegalj> | why `(+x) 1` is valid and equal to `1+x` while `(-x) 1` is invalid? |
2021-12-15 19:12:27 +0100 | <EvanR> | which makes dynamic types death metal or something |
2021-12-15 19:12:41 +0100 | <geekosaur> | akegalj, because of a syntactic oddity |
2021-12-15 19:13:03 +0100 | <geekosaur> | (-x) is (negate x) |
2021-12-15 19:13:05 +0100 | <monochrom> | Consider (subtract x) |
2021-12-15 19:13:19 +0100 | <geekosaur> | becuase unary minus is special cased |
2021-12-15 19:13:35 +0100 | <monochrom> | But an exception was made. |
2021-12-15 19:13:39 +0100 | <geekosaur> | (but see the LexicalNegation extension) |
2021-12-15 19:13:42 +0100 | <EvanR> | :t (x -) |
2021-12-15 19:13:43 +0100 | <lambdabot> | Expr -> Expr |
2021-12-15 19:13:50 +0100 | <EvanR> | :t (x +) |
2021-12-15 19:13:51 +0100 | <lambdabot> | Expr -> Expr |
2021-12-15 19:14:03 +0100 | <EvanR> | I'm being bamboozled |
2021-12-15 19:14:14 +0100 | <geekosaur> | simple-reflect strikes again |
2021-12-15 19:14:20 +0100 | <monochrom> | Syntax decisions are social constructs. |
2021-12-15 19:14:28 +0100 | <EvanR> | :t (\x -> -(x -)) |
2021-12-15 19:14:29 +0100 | <lambdabot> | (Num a, Num (a -> a)) => a -> a -> a |
2021-12-15 19:14:35 +0100 | <EvanR> | >:D |
2021-12-15 19:14:46 +0100 | <EvanR> | wait |
2021-12-15 19:14:47 +0100 | <akegalj> | monochrom: subtract is ok, thanks! |
2021-12-15 19:14:51 +0100 | Akiva | (~Akiva@user/Akiva) (Ping timeout: 250 seconds) |
2021-12-15 19:15:12 +0100 | <EvanR> | @pl (\x -> negate . (x -)) |
2021-12-15 19:15:13 +0100 | <lambdabot> | (negate .) . (-) |
2021-12-15 19:17:27 +0100 | DNH | (~DNH@8.44.0.72) |
2021-12-15 19:21:29 +0100 | slowButPresent | (~slowButPr@user/slowbutpresent) (Quit: leaving) |
2021-12-15 19:23:29 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-12-15 19:24:32 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 19:27:53 +0100 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
2021-12-15 19:29:23 +0100 | pfurla | (~pfurla@201.17.118.230) (Quit: gone to sleep. ZZZzzz…) |
2021-12-15 19:29:24 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 19:29:38 +0100 | kranius | (~kranius@222.186.245.213.rev.sfr.net) |
2021-12-15 19:30:46 +0100 | bollu | (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2021-12-15 19:35:11 +0100 | whatsupdoc | (uid509081@id-509081.hampstead.irccloud.com) |
2021-12-15 19:35:32 +0100 | zebrag | (~chris@user/zebrag) (Quit: Konversation terminated!) |
2021-12-15 19:35:34 +0100 | doyougnu | (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 260 seconds) |
2021-12-15 19:35:37 +0100 | hgolden | (~hgolden2@cpe-172-114-81-123.socal.res.rr.com) (Quit: Konversation terminated!) |
2021-12-15 19:36:23 +0100 | kranius | (~kranius@222.186.245.213.rev.sfr.net) (Ping timeout: 256 seconds) |
2021-12-15 19:36:42 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
2021-12-15 19:37:09 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
2021-12-15 19:37:10 +0100 | Jing_ | (~hedgehog@2604:a840:3::103e) |
2021-12-15 19:39:59 +0100 | Jing | (~hedgehog@2604:a840:3::10c8) (Ping timeout: 252 seconds) |
2021-12-15 19:41:51 +0100 | waleee-cl | (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
2021-12-15 19:41:57 +0100 | waleee | (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Read error: Connection reset by peer) |
2021-12-15 19:42:28 +0100 | waleee-cl | (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Client Quit) |
2021-12-15 19:42:32 +0100 | madjestic | (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 240 seconds) |
2021-12-15 19:43:17 +0100 | waleee | (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
2021-12-15 19:43:17 +0100 | burnsidesLlama | (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-12-15 19:46:40 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 19:47:04 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 19:48:54 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-12-15 19:51:19 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-12-15 19:52:19 +0100 | <Cale> | janus: No, they do whatever we would have done with the thing that was supposed to be linearly accessed |
2021-12-15 19:53:33 +0100 | <Cale> | janus: It's just that if you don't let anyone see what the thing actually is, and you destroy the thing after each use, replacing it with the result of the operation, then you can be sure that it's accessed once. |
2021-12-15 19:53:34 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 19:54:08 +0100 | <Cale> | (well, at most once, anyway -- the "at least once" part is perhaps a bit trickier) |
2021-12-15 19:55:48 +0100 | hololeap_ | (~hololeap@user/hololeap) (Read error: Connection reset by peer) |
2021-12-15 19:57:11 +0100 | hololeap_ | (~hololeap@user/hololeap) |
2021-12-15 20:00:59 +0100 | bahamas | (~lucian@84.232.140.13) (Ping timeout: 250 seconds) |
2021-12-15 20:05:02 +0100 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3) |
2021-12-15 20:05:52 +0100 | coot | (~coot@89-64-85-93.dynamic.chello.pl) |
2021-12-15 20:06:05 +0100 | nfd | (~nfd@user/nfd) |
2021-12-15 20:10:03 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 20:10:07 +0100 | curiousgay | (~curiousga@77-120-141-90.kha.volia.net) (Quit: Leaving) |
2021-12-15 20:12:01 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
2021-12-15 20:12:04 +0100 | coot | (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
2021-12-15 20:12:59 +0100 | xff0x | (~xff0x@2001:1a81:52ce:1300:ffd2:54e0:463d:d772) (Ping timeout: 252 seconds) |
2021-12-15 20:13:59 +0100 | xff0x | (~xff0x@2001:1a81:52ce:1300:b1bd:3a1d:cfef:d772) |
2021-12-15 20:14:06 +0100 | dsrt^ | (~dsrt@wsip-98-188-240-142.mc.at.cox.net) |
2021-12-15 20:14:51 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 20:15:42 +0100 | max22- | (~maxime@2a01cb0883359800f72e75eb3cbff1a0.ipv6.abo.wanadoo.fr) (Ping timeout: 265 seconds) |
2021-12-15 20:16:54 +0100 | burnsidesLlama | (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
2021-12-15 20:20:58 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-12-15 20:23:26 +0100 | burnsidesLlama | (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Ping timeout: 252 seconds) |
2021-12-15 20:24:07 +0100 | Morrow | (~quassel@bzq-110-168-31-106.red.bezeqint.net) |
2021-12-15 20:30:40 +0100 | notzmv | (~zmv@user/notzmv) (Read error: Connection reset by peer) |
2021-12-15 20:32:35 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 20:33:34 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-12-15 20:35:55 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 20:38:22 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 20:39:43 +0100 | jakalx | (~jakalx@base.jakalx.net) () |
2021-12-15 20:40:29 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2021-12-15 20:40:43 +0100 | curiousgay | (~curiousga@77-120-141-90.kha.volia.net) |
2021-12-15 20:40:47 +0100 | k | (~user@152.1.137.158) |
2021-12-15 20:40:54 +0100 | k | Guest6770 |
2021-12-15 20:41:19 +0100 | DNH | (~DNH@8.44.0.72) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-12-15 20:41:48 +0100 | <Guest6770> | Is there a way to force the evaluation of statically known arguments (especially dictionaries) while still allowing a function to be inlined? |
2021-12-15 20:42:52 +0100 | <Guest6770> | I currently switch on a case statement of a `Maybe Dict`, which should be evaluated at compile time to `Just Dict` or `Nothing`. |
2021-12-15 20:43:15 +0100 | <Guest6770> | But the case statement is hanging around in the compiled core. |
2021-12-15 20:44:03 +0100 | DNH | (~DNH@8.43.122.49) |
2021-12-15 20:49:31 +0100 | darkstardevx | (~darkstard@50.39.115.145) (Quit: Leaving) |
2021-12-15 20:51:17 +0100 | coot | (~coot@89-64-85-93.dynamic.chello.pl) |
2021-12-15 20:54:07 +0100 | bahamas | (~lucian@84.232.140.13) |
2021-12-15 20:54:08 +0100 | neurocyte0132889 | (~neurocyte@IP-212232092128.dynamic.medianet-world.de) |
2021-12-15 20:54:08 +0100 | neurocyte0132889 | (~neurocyte@IP-212232092128.dynamic.medianet-world.de) (Changing host) |
2021-12-15 20:54:08 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) |
2021-12-15 20:54:39 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 20:54:57 +0100 | <Guest6770> | Looks like applying `inline` to the dictionary does the trick. |
2021-12-15 20:55:38 +0100 | max22- | (~maxime@2a01cb0883359800cb0bc7c67be4bc8f.ipv6.abo.wanadoo.fr) |
2021-12-15 20:58:01 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-12-15 20:58:19 +0100 | ProfSimm | (~ProfSimm@87.227.196.109) (Remote host closed the connection) |
2021-12-15 20:58:33 +0100 | bahamas | (~lucian@84.232.140.13) (Ping timeout: 256 seconds) |
2021-12-15 20:59:27 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 21:02:30 +0100 | Akiva | (~Akiva@user/Akiva) |
2021-12-15 21:02:54 +0100 | doyougnu | (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) |
2021-12-15 21:04:47 +0100 | hololeap_ | (~hololeap@user/hololeap) (Read error: Connection reset by peer) |
2021-12-15 21:04:57 +0100 | <janus> | Cale: even if you disallow serialization of something, i understand that it couldn't be e.g. written to disk. but i still don't understand what type-level feature can prevent something from being used more than once? |
2021-12-15 21:05:07 +0100 | juhp | (~juhp@128.106.188.82) (Ping timeout: 250 seconds) |
2021-12-15 21:05:27 +0100 | LiaoTao | (~LiaoTao@gateway/tor-sasl/liaotao) (Ping timeout: 276 seconds) |
2021-12-15 21:05:42 +0100 | <Cale> | janus: You can take away direct access to the thing altogether though. |
2021-12-15 21:06:05 +0100 | <janus> | ah, so the linear variables shouldn't even have names, and they should implicitly exist in the context of the monad |
2021-12-15 21:06:06 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Ping timeout: 276 seconds) |
2021-12-15 21:06:10 +0100 | <Cale> | yeah |
2021-12-15 21:06:42 +0100 | <janus> | then it becomes even harder to mix it with networking |
2021-12-15 21:06:55 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-12-15 21:07:32 +0100 | juhp | (~juhp@128.106.188.82) |
2021-12-15 21:07:34 +0100 | zaquest | (~notzaques@5.130.79.72) (Remote host closed the connection) |
2021-12-15 21:07:37 +0100 | <janus> | or maybe not, i guess it could provide MonadIO independently of this.. |
2021-12-15 21:08:02 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2021-12-15 21:08:28 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-12-15 21:08:42 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 276 seconds) |
2021-12-15 21:08:52 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2021-12-15 21:08:54 +0100 | zaquest | (~notzaques@5.130.79.72) |
2021-12-15 21:08:58 +0100 | LiaoTao | (~LiaoTao@gateway/tor-sasl/liaotao) |
2021-12-15 21:09:04 +0100 | <Cale> | The way I would have done it is to generalise Arrow and split it up so that we'd have a way of supporting all the different types of substructural things, and we wouldn't even really need anything more in the type system |
2021-12-15 21:09:08 +0100 | madjestic | (~madjestic@88-159-247-120.fixed.kpn.net) |
2021-12-15 21:09:21 +0100 | <Cale> | If we split it up so that not all the structural components were always available, you could take out the operations that let you duplicate and drop things, and then the corresponding generalisation of proc/do notation would give us back the ability to name things |
2021-12-15 21:10:16 +0100 | <Cale> | If you take that kind of idea far enough, you end up with Conal's constrained categories thing. |
2021-12-15 21:11:17 +0100 | jkaye | (~jkaye@2601:281:8300:7530:323:f5e4:2678:9ded) (Ping timeout: 252 seconds) |
2021-12-15 21:11:54 +0100 | hololeap_ | (~hololeap@user/hololeap) |
2021-12-15 21:12:11 +0100 | ub | (~Thunderbi@p200300ecdf1abb06cc2914e8ae945344.dip0.t-ipconnect.de) |
2021-12-15 21:12:36 +0100 | jgeerds_ | (~jgeerds@55d4ac73.access.ecotel.net) |
2021-12-15 21:12:51 +0100 | bollu | (uid233390@id-233390.helmsley.irccloud.com) |
2021-12-15 21:13:49 +0100 | Guest19 | (~Guest19@static.14.118.201.195.clients.your-server.de) |
2021-12-15 21:13:51 +0100 | Guest19 | (~Guest19@static.14.118.201.195.clients.your-server.de) (Client Quit) |
2021-12-15 21:14:35 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2021-12-15 21:14:48 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2021-12-15 21:15:35 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 21:16:24 +0100 | hololeap_ | (~hololeap@user/hololeap) (Read error: Connection reset by peer) |
2021-12-15 21:20:07 +0100 | jgeerds_ | (~jgeerds@55d4ac73.access.ecotel.net) (Quit: Leaving) |
2021-12-15 21:20:16 +0100 | jgeerds | (~jgeerds@55d4ac73.access.ecotel.net) |
2021-12-15 21:20:53 +0100 | zmt01 | (~zmt00@user/zmt00) |
2021-12-15 21:21:55 +0100 | xff0x | (~xff0x@2001:1a81:52ce:1300:b1bd:3a1d:cfef:d772) (Ping timeout: 265 seconds) |
2021-12-15 21:22:25 +0100 | xff0x | (~xff0x@2001:1a81:52ce:1300:b0c:6219:b31e:3167) |
2021-12-15 21:23:39 +0100 | azimut_ | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds) |
2021-12-15 21:24:14 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 21:24:49 +0100 | zmt00 | (~zmt00@user/zmt00) (Ping timeout: 265 seconds) |
2021-12-15 21:26:24 +0100 | burnsidesLlama | (~burnsides@dhcp168-019.wadham.ox.ac.uk) |
2021-12-15 21:26:46 +0100 | DNH | (~DNH@8.43.122.49) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-12-15 21:27:33 +0100 | LiaoTao | (~LiaoTao@gateway/tor-sasl/liaotao) (Ping timeout: 276 seconds) |
2021-12-15 21:29:10 +0100 | bahamas | (~lucian@84.232.140.13) |
2021-12-15 21:29:39 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2021-12-15 21:29:59 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2021-12-15 21:31:13 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
2021-12-15 21:34:06 +0100 | bahamas | (~lucian@84.232.140.13) (Ping timeout: 260 seconds) |
2021-12-15 21:34:40 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.) |
2021-12-15 21:34:45 +0100 | xff0x | (~xff0x@2001:1a81:52ce:1300:b0c:6219:b31e:3167) (Ping timeout: 252 seconds) |
2021-12-15 21:35:56 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2021-12-15 21:35:57 +0100 | Digit | (~user@user/digit) (Ping timeout: 256 seconds) |
2021-12-15 21:36:24 +0100 | <oats> | https://github.com/oatberry/aoc2021-haskell/blob/main/src/Day10.hs yeet |
2021-12-15 21:36:25 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2021-12-15 21:36:31 +0100 | kjak | (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
2021-12-15 21:37:20 +0100 | <oats> | gotta `go` fast |
2021-12-15 21:37:57 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 276 seconds) |
2021-12-15 21:39:19 +0100 | <d34df00d> | There's a bunch of functors that only control some aspect of behaviour (think First or Last or QuickCheck's NonNegative, for instance). |
2021-12-15 21:39:24 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2021-12-15 21:40:09 +0100 | <d34df00d> | There's a natural isomorphism (forgetting the behaviour part) between some type a and F a for these functors (witnessed by First and getFirst, etc). |
2021-12-15 21:40:27 +0100 | <d34df00d> | Is there any library that abstracts that away and allows me to inject/extract the underlying value from such a control/behavioural functor? |
2021-12-15 21:40:43 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2021-12-15 21:41:02 +0100 | <Taneb> | That sounds like lens's Control.Lens.Wrapped, which I think is inspired by something else |
2021-12-15 21:41:03 +0100 | <d34df00d> | It's super straighforward to roll your own, it's just that I don't want to reinvent the type class if there's a common vocabulary one. |
2021-12-15 21:41:17 +0100 | <tomsmeding> | do you know about 'coerce'? |
2021-12-15 21:41:36 +0100 | <d34df00d> | Taneb: thanks, I'll take a look! |
2021-12-15 21:42:10 +0100 | <d34df00d> | tomsmeding: well, it didn't occur to me it's useful in this context. Not sure if it communicates the intent well enough. |
2021-12-15 21:42:12 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 21:42:19 +0100 | <d34df00d> | Dunno, something just feels not right about coerce. |
2021-12-15 21:42:30 +0100 | <tomsmeding> | d34df00d: First and Last aren't quite isomorphic to the underlying type though, since newtype First a = First (Maybe a) |
2021-12-15 21:42:31 +0100 | <oats> | why, it's safe :P |
2021-12-15 21:42:45 +0100 | <tomsmeding> | sure, was just mentioning it in case you weren't aware :) |
2021-12-15 21:42:49 +0100 | <geekosaur> | isn't the underlying conceopt Iso? |
2021-12-15 21:43:02 +0100 | <d34df00d> | Oh lol, right. Well, let's think about something First-like for semigroups. |
2021-12-15 21:43:06 +0100 | <monochrom> | coerce works, but it works much more broadly, and is an operational answer. I think Wrapped may be a mathematical answer. |
2021-12-15 21:43:19 +0100 | <monochrom> | Or Iso, yeah. |
2021-12-15 21:43:21 +0100 | Erutuon | (~Erutuon@user/erutuon) |
2021-12-15 21:44:04 +0100 | <monochrom> | Sum and Product are good examples. |
2021-12-15 21:44:26 +0100 | xsperry | (~xs@user/xsperry) |
2021-12-15 21:44:40 +0100 | <d34df00d> | Sum indeed is a better example than First. |
2021-12-15 21:45:29 +0100 | xff0x | (~xff0x@2001:1a81:52ce:1300:b0c:6219:b31e:3167) |
2021-12-15 21:47:23 +0100 | DNH | (~DNH@8.43.122.49) |
2021-12-15 21:47:50 +0100 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
2021-12-15 21:49:27 +0100 | <Guest6770> | Something `First`-like for `Semigroup`s: `First`, from `Data.Semigroup`. |
2021-12-15 21:50:19 +0100 | <d34df00d> | Very efficient module organization, no room for surprise. |
2021-12-15 21:50:22 +0100 | <d34df00d> | Haskell is a boring language. |
2021-12-15 21:50:38 +0100 | <Guest6770> | Just remember to qualify your imports :-) |
2021-12-15 21:50:45 +0100 | <d34df00d> | Alrighty, Wrapped it is. Thank you folks! |
2021-12-15 21:52:41 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-12-15 21:58:10 +0100 | xff0x | (~xff0x@2001:1a81:52ce:1300:b0c:6219:b31e:3167) (Ping timeout: 265 seconds) |
2021-12-15 21:58:48 +0100 | xff0x | (~xff0x@2001:1a81:52ce:1300:fb1:616f:b19a:8052) |
2021-12-15 21:58:48 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 21:59:10 +0100 | <int-e> | dminuoso: It's not like I use GADTs everywhere, it's mostly ADTs for expressions (with result type) and existentials. I am attributing ExistentialQuantification to GADTs out of appreciation for the more intuitive (to me, at least) syntax (data HasShow where HS :: ShowA => a -> HasShow doesn't involve an awkwardly placed forall). YMMV |
2021-12-15 21:59:41 +0100 | <EvanR> | I'm doing this fold to find a minimum float value or Nothing on empty. But for some reason the use of infinity in the middle is alarming me https://paste.tomsmeding.com/seYenSws |
2021-12-15 22:01:38 +0100 | _ht | (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
2021-12-15 22:02:52 +0100 | <EvanR> | or maybe the noise from Maybe is alarming |
2021-12-15 22:03:04 +0100 | <EvanR> | maybe I should embrace infinity |
2021-12-15 22:05:39 +0100 | jkaye | (~jkaye@2601:281:8300:7530:7bc1:436b:e88b:37f9) |
2021-12-15 22:07:48 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) |
2021-12-15 22:07:50 +0100 | Pdroman | (~Android@197.red-79-156-174.staticip.rima-tde.net) |
2021-12-15 22:08:52 +0100 | DNH | (~DNH@8.43.122.49) (Quit: Textual IRC Client: www.textualapp.com) |
2021-12-15 22:10:39 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-12-15 22:12:52 +0100 | coot | (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
2021-12-15 22:13:18 +0100 | Pdroman | (~Android@197.red-79-156-174.staticip.rima-tde.net) (Quit: AndroidIrc Disconnecting) |
2021-12-15 22:15:26 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 22:16:02 +0100 | <Guest6770> | > compare (1 :: Double) (1 / 0) |
2021-12-15 22:16:03 +0100 | <lambdabot> | LT |
2021-12-15 22:16:21 +0100 | <Guest6770> | > compare (1 / 0) (1 :: Double) |
2021-12-15 22:16:22 +0100 | <lambdabot> | GT |
2021-12-15 22:16:42 +0100 | <Guest6770> | Seems legit. |
2021-12-15 22:17:23 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 22:17:34 +0100 | Guest6770 | (~user@152.1.137.158) (Quit: heading home) |
2021-12-15 22:19:26 +0100 | <tomsmeding> | EvanR: wouldn't that return Nothing if the map containss only inf values? |
2021-12-15 22:20:57 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 22:21:33 +0100 | <Taneb> | > compare (1 / 0) (1 / 0 :: Double) |
2021-12-15 22:21:33 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
2021-12-15 22:21:34 +0100 | <lambdabot> | EQ |
2021-12-15 22:21:41 +0100 | <Taneb> | > (1 / 0) == (1 / 0 :: Double) |
2021-12-15 22:21:42 +0100 | <lambdabot> | True |
2021-12-15 22:21:55 +0100 | <Taneb> | Oh yeah, that's infinity, not nan |
2021-12-15 22:22:09 +0100 | <geekosaur> | don't need a type ascription due to defaulting and that (/) is Fractional |
2021-12-15 22:22:13 +0100 | acidjnk | (~acidjnk@p200300d0c7271e9405040680e1e3c542.dip0.t-ipconnect.de) |
2021-12-15 22:22:30 +0100 | neurocyte0132889 | (~neurocyte@IP-212232092128.dynamic.medianet-world.de) |
2021-12-15 22:22:30 +0100 | neurocyte0132889 | (~neurocyte@IP-212232092128.dynamic.medianet-world.de) (Changing host) |
2021-12-15 22:22:30 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) |
2021-12-15 22:23:03 +0100 | <EvanR> | tomsmeding, yep... so just leaving Maybes out of it is turning out simpler |
2021-12-15 22:25:39 +0100 | <tomsmeding> | half-serious suggestion: newtype Min' a = Min' (Maybe a); instance Ord a => Semigroup (Min' a) where { Min' Nothing <> Min' Nothing = Min' Nothing ; Min' a <> Min' b = Min' (Just (minimum (catMaybes [a, b]))) }; instance Monoid (Min' a) where mempty = Min' Nothing |
2021-12-15 22:25:56 +0100 | <tomsmeding> | and foldMap Min' |
2021-12-15 22:26:07 +0100 | <Taneb> | geekosaur: in my particular usage there I thought it benifited from being explicit |
2021-12-15 22:26:07 +0100 | <tomsmeding> | um, foldMap (Min' . Just) |
2021-12-15 22:27:11 +0100 | <tomsmeding> | (the ' is because Min is already in Data.Semigroup but lacks the Maybe) |
2021-12-15 22:27:15 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-12-15 22:29:08 +0100 | EvanR | doing a double take at that |
2021-12-15 22:29:12 +0100 | <awpr> | > Just (Min 5) <> Just (Min 6) -- didn't the Maybe instance get changed to be the same as the above? |
2021-12-15 22:29:13 +0100 | <lambdabot> | error: |
2021-12-15 22:29:13 +0100 | <lambdabot> | • Data constructor not in scope: Min :: t0 -> a |
2021-12-15 22:29:13 +0100 | <lambdabot> | • Perhaps you meant one of these: |
2021-12-15 22:29:24 +0100 | <tomsmeding> | @let import Data.Semigroup |
2021-12-15 22:29:24 +0100 | <lambdabot> | <command line>: does not exist: .L.hs |
2021-12-15 22:29:33 +0100 | <tomsmeding> | % import Data.Semigroup |
2021-12-15 22:29:33 +0100 | <yahb> | tomsmeding: |
2021-12-15 22:29:39 +0100 | <tomsmeding> | % Just (Min 5) <> Just (Min 6) |
2021-12-15 22:29:39 +0100 | <yahb> | tomsmeding: Just (Min {getMin = 5}) |
2021-12-15 22:29:49 +0100 | <EvanR> | that's a lot for foldl' min (1/0) foos |
2021-12-15 22:30:04 +0100 | danso | (~danso@23-233-111-52.cpe.pppoe.ca) (Ping timeout: 265 seconds) |
2021-12-15 22:30:32 +0100 | <tomsmeding> | awpr: thanks, that's indeed better |
2021-12-15 22:30:33 +0100 | <Taneb> | awpr: Nothing sorts less than Just whatever, in this case we want it to sort greater |
2021-12-15 22:30:41 +0100 | <tomsmeding> | EvanR: type Min' a = Maybe (Min a) |
2021-12-15 22:30:46 +0100 | <Taneb> | % Nothing <> Just (Min 6) |
2021-12-15 22:30:46 +0100 | <yahb> | Taneb: Just (Min {getMin = 6}) |
2021-12-15 22:30:52 +0100 | <Taneb> | Oh, am I wrong? |
2021-12-15 22:31:03 +0100 | <Taneb> | Yeah, I'm being stupid |
2021-12-15 22:31:06 +0100 | <Taneb> | Carry on :) |
2021-12-15 22:31:06 +0100 | <awpr> | `min` is different from `<>` here |
2021-12-15 22:31:09 +0100 | <Artem[m]> | Is ghcup supposed to install profiling version of base? A Reddit user claims that it doesn't do it but I thought it did actually. But I see no mention of it anywhere on the ghcup site. https://www.reddit.com/r/haskell/comments/rh4ase/getting_cabal_to_profile/hooz9qd |
2021-12-15 22:31:24 +0100 | <tomsmeding> | Taneb: I think the Nothing is the mempty from the Maybe monoid |
2021-12-15 22:31:50 +0100 | <awpr> | % compare Nothing (Just (Min 6)) |
2021-12-15 22:31:50 +0100 | <yahb> | awpr: LT |
2021-12-15 22:31:53 +0100 | <tomsmeding> | Artem[m]: ghcup should install profiling versions of base for sure |
2021-12-15 22:33:18 +0100 | <tomsmeding> | EvanR: though this produces some additional branching on the maybe values through the fold; if you want the nothing in case the map is empty, probably best to handle that case separately and do 'foldl1' min' otherwise :) |
2021-12-15 22:33:49 +0100 | burnsidesLlama | (~burnsides@dhcp168-019.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-12-15 22:34:04 +0100 | <Artem[m]> | tomsmeding: thank you for confirming! I wonder if it may depend on the platform or something (e.g. aarch64 has been a curve ball I think). |
2021-12-15 22:34:32 +0100 | <EvanR> | nah infinity turns out the better |
2021-12-15 22:35:00 +0100 | curiousgay | (~curiousga@77-120-141-90.kha.volia.net) (Remote host closed the connection) |
2021-12-15 22:35:13 +0100 | <tomsmeding> | Artem[m]: that perhaps, or maybe OP is using ghcup but forgot that they also have another installation (perhaps from the system package manager) lying around that happens to get precedence or something |
2021-12-15 22:35:15 +0100 | <EvanR> | my eventual treatment of empty vs "too far in the future" ends up being the same |
2021-12-15 22:35:33 +0100 | <tomsmeding> | wouldn't be the first person to make that mistake, but no idea if that's also happening here :) |
2021-12-15 22:35:39 +0100 | curiousgay | (~curiousga@77-120-141-90.kha.volia.net) |
2021-12-15 22:35:40 +0100 | <tomsmeding> | EvanR: awesome :) |
2021-12-15 22:35:41 +0100 | machinedgod | (~machinedg@24.105.81.50) (Ping timeout: 250 seconds) |
2021-12-15 22:35:49 +0100 | benin | (~benin@183.82.204.250) |
2021-12-15 22:38:06 +0100 | zincy | (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807) |
2021-12-15 22:38:52 +0100 | alx741 | (~alx741@181.199.42.79) |
2021-12-15 22:38:54 +0100 | zincy_ | (~zincy@host86-151-99-97.range86-151.btcentralplus.com) |
2021-12-15 22:38:57 +0100 | zincy | (~zincy@2a00:23c8:970c:4801:bdb9:8c5f:3085:2807) (Read error: Connection reset by peer) |
2021-12-15 22:40:15 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-12-15 22:42:26 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
2021-12-15 22:46:19 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 22:50:38 +0100 | euandreh | (~euandreh@2804:14c:33:9fe5:80ee:faa6:7302:e610) (Ping timeout: 260 seconds) |
2021-12-15 22:52:16 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2021-12-15 22:52:41 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-12-15 22:53:30 +0100 | alx741 | (~alx741@181.199.42.79) (Read error: Connection reset by peer) |
2021-12-15 22:53:55 +0100 | <monochrom> | Yes, sometimes it's useful to equate "never" with "happens at time infinity". |
2021-12-15 22:54:14 +0100 | mc47 | (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
2021-12-15 22:54:27 +0100 | danso | (~danso@23-233-111-52.cpe.pppoe.ca) |
2021-12-15 22:55:31 +0100 | <monochrom> | https://perl.plover.com/classes/OOPSLA/samples/slide067.html (Be sure to keep clicking "next" for the subsequent slides to see what it is explaining!) |
2021-12-15 22:56:02 +0100 | lambdalove-sadvi | (~user@2804:d51:47f5:ac00:9bf5:fb5f:29:c009) (Ping timeout: 240 seconds) |
2021-12-15 22:57:07 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
2021-12-15 22:57:20 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 22:59:47 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2021-12-15 23:04:44 +0100 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) |
2021-12-15 23:04:57 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-12-15 23:06:34 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
2021-12-15 23:06:48 +0100 | Midjak | (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep) |
2021-12-15 23:07:24 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) (Remote host closed the connection) |
2021-12-15 23:08:03 +0100 | pfurla[m] | (uid345156@id-345156.tinside.irccloud.com) |
2021-12-15 23:08:43 +0100 | <Hecate> | hohai |
2021-12-15 23:09:13 +0100 | <Hecate> | I have put a path to a .so in extra-lib-dirs (in cabal.project) |
2021-12-15 23:09:14 +0100 | <geekosaur> | œ |
2021-12-15 23:09:21 +0100 | <Hecate> | but gcc is unable to find the library in question |
2021-12-15 23:10:03 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 23:10:05 +0100 | <Hecate> | the path gives access to libpq.so and GCC gives me |
2021-12-15 23:10:06 +0100 | <Hecate> | /usr/bin/ld.gold: error: cannot find -lpq |
2021-12-15 23:10:08 +0100 | <Hecate> | :( |
2021-12-15 23:11:42 +0100 | machinedgod | (~machinedg@24.105.81.50) |
2021-12-15 23:11:53 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-12-15 23:13:27 +0100 | <geekosaur> | I think I'd want to see -v output to see if it gets passed on; in particular with configure-based Setup extra-lib-dirs can end up being ignored because configure thinks it knows better (perhaps especially if there's pkgconfig foo involved?) |
2021-12-15 23:13:37 +0100 | euandreh | (~euandreh@2804:14c:33:9fe5:9d95:c71:11e4:3e0f) |
2021-12-15 23:13:54 +0100 | <Clint> | Hecate: do you need libpq.so or libpq.a? |
2021-12-15 23:15:50 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
2021-12-15 23:17:02 +0100 | <Hecate> | Clint: oh that's a good question, I don't actually know the answer |
2021-12-15 23:17:33 +0100 | <Clint> | how are you specifying the library? |
2021-12-15 23:17:59 +0100 | <Hecate> | I am not, it's postgresql-libpq that does |
2021-12-15 23:18:22 +0100 | <Clint> | oh, and you're able to build postgresql-libpq? |
2021-12-15 23:18:22 +0100 | <Hecate> | that being said, let me purge my ldconfig cache |
2021-12-15 23:18:31 +0100 | Nolrai2 | (~Nolrai2@73.240.1.39) (Quit: Client closed) |
2021-12-15 23:18:41 +0100 | <Hecate> | Clint: the log stops at one of the direct dependencies |
2021-12-15 23:18:50 +0100 | <Hecate> | let me try and build postgresql-libpq directly to see |
2021-12-15 23:20:43 +0100 | <Hecate> | grmph, no apparent problem… |
2021-12-15 23:21:20 +0100 | <Hecate> | also, weirdly, "/usr/pgsql-14/lib/" appears in /etc/ld.so.conf.d |
2021-12-15 23:21:38 +0100 | son0p | (~ff@2800:484:1d81:b700:d40b:900:b387:320) (Ping timeout: 252 seconds) |
2021-12-15 23:21:47 +0100 | <Hecate> | Clint: it would seem that postgresql-libpq uses pkg-config |
2021-12-15 23:22:02 +0100 | <Hecate> | oh no. |
2021-12-15 23:22:04 +0100 | <Hecate> | it doesn't |
2021-12-15 23:22:09 +0100 | <Hecate> | it uses… |
2021-12-15 23:22:13 +0100 | <Hecate> | ah, pg_config |
2021-12-15 23:23:18 +0100 | euandreh | (~euandreh@2804:14c:33:9fe5:9d95:c71:11e4:3e0f) (Ping timeout: 260 seconds) |
2021-12-15 23:23:22 +0100 | phma_ | (phma@2001:5b0:2144:24c8:3448:3cec:586:a41) (Read error: Connection reset by peer) |
2021-12-15 23:23:27 +0100 | michalz | (~michalz@185.246.204.121) (Remote host closed the connection) |
2021-12-15 23:24:17 +0100 | phma_ | (phma@2001:5b0:210f:4b78:b1e:6610:21b4:b15b) |
2021-12-15 23:24:35 +0100 | phma_ | phma |
2021-12-15 23:25:29 +0100 | CiaoSen | (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2021-12-15 23:27:17 +0100 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
2021-12-15 23:30:09 +0100 | <Hecate> | ugh |
2021-12-15 23:30:22 +0100 | <Hecate> | I had to add -L /usr/pgsql-14/lib to cabal.project :( :( :( |
2021-12-15 23:30:31 +0100 | chomwitt | (~chomwitt@2a02:587:dc19:a500:12c3:7bff:fe6d:d374) (Ping timeout: 250 seconds) |
2021-12-15 23:30:58 +0100 | akegalj | (~akegalj@141-136-187-255.dsl.iskon.hr) (Quit: leaving) |
2021-12-15 23:32:07 +0100 | alx741 | (~alx741@157.100.93.160) |
2021-12-15 23:32:32 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 240 seconds) |
2021-12-15 23:35:09 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2021-12-15 23:35:43 +0100 | earendel | (uid498179@user/earendel) (Quit: Connection closed for inactivity) |
2021-12-15 23:36:53 +0100 | slowButPresent | (~slowButPr@user/slowbutpresent) |
2021-12-15 23:39:29 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2021-12-15 23:45:01 +0100 | avidela | (~textual@88.98.244.170) |
2021-12-15 23:45:23 +0100 | euandreh | (~euandreh@2804:14c:33:9fe5:1e71:dc8c:d2fa:3d7e) |
2021-12-15 23:45:32 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:158b:cfc1:e7b3:d4ac) |
2021-12-15 23:45:42 +0100 | zincy_ | (~zincy@host86-151-99-97.range86-151.btcentralplus.com) (Remote host closed the connection) |
2021-12-15 23:46:28 +0100 | jakalx | (~jakalx@base.jakalx.net) () |
2021-12-15 23:46:42 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2021-12-15 23:50:12 +0100 | avidela | zephyz |
2021-12-15 23:51:58 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-12-15 23:58:13 +0100 | zephyz | (~textual@88.98.244.170) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-12-15 23:58:14 +0100 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
2021-12-15 23:58:48 +0100 | alx741 | (~alx741@157.100.93.160) (Read error: Connection reset by peer) |