Logs: freenode/#haskell
| 2020-09-30 20:28:37 | <nobody239419341> | I can imagine |
| 2020-09-30 20:28:40 | → | _ashbreeze_ joins (~mark@72-161-254-200.dyn.centurytel.net) |
| 2020-09-30 20:28:42 | <Cheery> | or reverse x == x |
| 2020-09-30 20:28:46 | <monochrom> | No, nobody239419341's explanation. |
| 2020-09-30 20:29:10 | <Cheery> | btw.. on functors of.. not functions but partially applied functions. |
| 2020-09-30 20:29:30 | <Cheery> | djinn finds a value for a type. |
| 2020-09-30 20:29:37 | <Cheery> | @djinn (a -> b) -> (c -> a) -> (c -> b) |
| 2020-09-30 20:29:37 | <lambdabot> | f a b c = a (b c) |
| 2020-09-30 20:30:04 | <monochrom> | See, in the first place, I am against tackling >>= at a beginner stage in the first stage, especially for a palindrome exercise that can be done in 10 different elementary ways already. |
| 2020-09-30 20:30:09 | → | mahene joins (~mahene@2a02:8109:86c0:8d68:5400:2bfd:d746:732c) |
| 2020-09-30 20:30:23 | <Cheery> | yup. but he asked for it. :) |
| 2020-09-30 20:30:36 | <monochrom> | I have no idea why you people decided to entertain this request and get into such a rabbit hole. |
| 2020-09-30 20:30:38 | <Cheery> | and I guess this is helpful to see.. how this comes up together. |
| 2020-09-30 20:30:55 | <p0a> | I think it's a show-off really, to write a palindrome like that |
| 2020-09-30 20:31:10 | <nobody239419341> | I'm just stuck in a loop for creating recursive functions and exercises for two months |
| 2020-09-30 20:31:20 | <monochrom> | It takes like 2-4 weeks of preparations before >>= makes sense for this exercise. Not 2 hours. |
| 2020-09-30 20:31:23 | <nobody239419341> | I can't get progress without having eaten some parts of the FP |
| 2020-09-30 20:31:53 | <p0a> | nobody239419341: In my opinion it's better to start with `Maybe' and `IO' |
| 2020-09-30 20:31:59 | <Cheery> | :t (.) |
| 2020-09-30 20:32:00 | <lambdabot> | (b -> c) -> (a -> b) -> a -> c |
| 2020-09-30 20:32:16 | <p0a> | Write programs that do simple tasks but require some checking of values. You'll have to be using Maybe and IO for that |
| 2020-09-30 20:32:16 | × | mu__ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-30 20:32:22 | <nobody239419341> | I see maybe as like a box |
| 2020-09-30 20:32:35 | <Cheery> | https://hackage.haskell.org/package/base-4.14.0.0/docs/src/GHC.Base.html#line-969 |
| 2020-09-30 20:32:37 | × | kindaro quits (1f08d381@h31-8-211-129.dyn.bashtel.ru) (Remote host closed the connection) |
| 2020-09-30 20:32:42 | <Cheery> | there reads.. fmap = (.) |
| 2020-09-30 20:32:43 | → | mu_ joins (~mu@unaffiliated/mu) |
| 2020-09-30 20:32:57 | hackage | error-or 0.1.0.0 - Composable, hierarchical errors. https://hackage.haskell.org/package/error-or-0.1.0.0 (luntain) |
| 2020-09-30 20:33:08 | <xsperry> | cheers fmap is (.) for function functor |
| 2020-09-30 20:33:14 | <xsperry> | Cheery* |
| 2020-09-30 20:33:21 | <p0a> | nobody239419341: Write a program that keeps an address book and looks up a name in it, allows you to modify a record and save/load records from a file |
| 2020-09-30 20:33:27 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 2020-09-30 20:33:32 | <monochrom> | Well, I stuck my students in a loop for creating recursive functions and exercises for two months. And only then they are ready for >>= |
| 2020-09-30 20:34:05 | <monochrom> | People really don't realize the effect and benefits of "repetitive" immersion. |
| 2020-09-30 20:34:28 | <xsperry> | Cheery, for list (for example), it is just map |
| 2020-09-30 20:35:56 | <tomsmeding> | @tell kindaro here is something: https://paste.tomsmeding.com/WWaRcppB |
| 2020-09-30 20:35:56 | <lambdabot> | Consider it noted. |
| 2020-09-30 20:36:35 | <nobody239419341> | okay guys thank you all for the suggestions. I'll keep doing exercises and try out that address book application |
| 2020-09-30 20:37:07 | <Cheery> | nobody239419341: np. I hope it helped. It's just a fancy trick and nothing wrong with those, but it involves understanding this kind of things. |
| 2020-09-30 20:37:42 | × | ryansmccoy quits (~ryansmcco@156.96.151.132) (Ping timeout: 272 seconds) |
| 2020-09-30 20:37:58 | <Cheery> | at some context the idea of (->) a as a monad, does make sense. |
| 2020-09-30 20:38:09 | → | ryansmccoy joins (~ryansmcco@156.96.151.132) |
| 2020-09-30 20:38:51 | × | mahene quits (~mahene@2a02:8109:86c0:8d68:5400:2bfd:d746:732c) (Ping timeout: 272 seconds) |
| 2020-09-30 20:39:21 | <monochrom> | Well first thing you have to embrace that "X->Y" is "((->) X) Y" and the shock that the "(->) X" part can be isolated out as a standalone thing. |
| 2020-09-30 20:39:38 | <monochrom> | That alone probably takes a week to absorb already. |
| 2020-09-30 20:39:50 | <p0a> | Why is X->Y parsed like that? |
| 2020-09-30 20:39:57 | <p0a> | is 1 + 2 also the same? |
| 2020-09-30 20:40:00 | <Cheery> | for instance, a program requires an additional parameter, but it's not used too often, you might supply it as last parameter and form a monad around it. |
| 2020-09-30 20:40:01 | <monochrom> | Yes. |
| 2020-09-30 20:40:04 | × | nobody239419341 quits (5e7be5a0@94.123.229.160) (Remote host closed the connection) |
| 2020-09-30 20:40:15 | <monochrom> | See? So much prerequisites. |
| 2020-09-30 20:40:36 | <Rembane> | > (+) 1 2 |
| 2020-09-30 20:40:39 | <lambdabot> | 3 |
| 2020-09-30 20:40:40 | × | mirrorbird quits (~psutcliff@m83-187-182-226.cust.tele2.se) (Quit: Leaving) |
| 2020-09-30 20:40:48 | <monochrom> | But you're confusing the term level and the type level. |
| 2020-09-30 20:41:01 | <p0a> | Right, okay. Because I was thinking of - now |
| 2020-09-30 20:41:26 | <p0a> | I'm just confused, ignore me |
| 2020-09-30 20:42:12 | × | mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-30 20:42:28 | <p0a> | I'm impressed at how quickly I was able to whip together a simple file database program that helps me keep track of my books and notes |
| 2020-09-30 20:42:42 | → | mu_ joins (~mu@unaffiliated/mu) |
| 2020-09-30 20:42:42 | <p0a> | took me 2 days of maybe 30 minutes each (well thanks to this channel as well) |
| 2020-09-30 20:44:13 | <sm[m]> | p0a: nice! |
| 2020-09-30 20:45:06 | × | madjestic quits (~madjestic@86-88-72-244.fixed.kpn.net) (Ping timeout: 265 seconds) |
| 2020-09-30 20:46:57 | × | Raito_Bezarius quits (~Raito_Bez@unaffiliated/raito-bezarius/x-8764578) (Ping timeout: 260 seconds) |
| 2020-09-30 20:46:58 | × | coot quits (~coot@37.30.59.214.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 2020-09-30 20:47:12 | <Cheery> | about that.. I'm thinking of a little project.. I start looking what kind of html/tagsoup functionality my blog driver would require to be written in haskell |
| 2020-09-30 20:47:51 | <p0a> | sm[m]: thank you :) I agree |
| 2020-09-30 20:48:00 | <p0a> | I'll share it here once it's looking good |
| 2020-09-30 20:48:05 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 2020-09-30 20:48:27 | × | motersen quits (~user@2001-4dd1-ce19-0-41b8-8f35-edf5-ff23.ipv6dyn.netcologne.de) (Ping timeout: 240 seconds) |
| 2020-09-30 20:49:47 | → | mirrorbird joins (~psutcliff@2a00:801:3fb:53b9:b09b:cd4e:4e4a:44a9) |
| 2020-09-30 20:51:32 | → | mnrmnaugh joins (~mnrmnaugh@unaffiliated/mnrmnaugh) |
| 2020-09-30 20:52:16 | × | mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-30 20:52:46 | → | mu_ joins (~mu@unaffiliated/mu) |
| 2020-09-30 20:54:29 | <Cheery> | aside just going to google each function, is there a page dedicated to giving haskell equivalents for os.walk, os.path.join, etc... ? |
| 2020-09-30 20:54:33 | <sm[m]> | I think there's a lot of speed-of-development and power in haskell & libs, just waiting for a bit more refinement/curation/tooling to come together |
| 2020-09-30 20:55:02 | <sm[m]> | not yet tapped, I mean |
| 2020-09-30 20:55:07 | <Rembane> | Cheery: System.Directory, System.Environment, hm... and more! :D |
| 2020-09-30 20:55:38 | <Rembane> | Cheery: If you happen to know the C stdlib, the functions are named almost the same in Haskell, but they are slightly more sane. |
| 2020-09-30 20:56:00 | <Cheery> | I'd also like about a function that gives current date, and some datetime handling. |
| 2020-09-30 20:56:01 | × | xcmw quits (~textual@dyn-72-33-0-89.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-09-30 20:56:03 | → | artotrie joins (~private@2604:2000:1540:4121:c018:ab87:8515:a83a) |
| 2020-09-30 20:56:14 | <aldessa> | I'd like to learn numerical methods. I hear Haskell is a bad language to do it in, is this true if I'm using unboxed mutable arrays in the ST monad? |
| 2020-09-30 20:56:31 | <Rembane> | Cheery: That's trickier |
| 2020-09-30 20:56:53 | <Rembane> | aldessa: It depends, if you can work with slow numerical methods it's alright |
| 2020-09-30 20:57:07 | × | _ashbreeze_ quits (~mark@72-161-254-200.dyn.centurytel.net) (Ping timeout: 240 seconds) |
| 2020-09-30 20:57:47 | <aldessa> | why is it slow Rembane? i thought Haskell was slower because of garbage collection; does the ST monad not avoid that? |
| 2020-09-30 20:59:00 | <Rembane> | aldessa: Laziness has a tendency to bite if not properly contained and Haskell is slower than Fortran for such things. |
| 2020-09-30 20:59:01 | → | _ashbreeze_ joins (~mark@72-161-254-200.dyn.centurytel.net) |
| 2020-09-30 20:59:02 | ← | artotrie parts (~private@2604:2000:1540:4121:c018:ab87:8515:a83a) ("Leaving") |
| 2020-09-30 20:59:20 | <Rembane> | Cheery: I used thyme for that, but I think it's needlessly complicated. |
| 2020-09-30 21:00:01 | × | patryk_ quits (~patryk_@84.39.117.57) () |
| 2020-09-30 21:00:03 | → | Raito_Bezarius joins (~Raito_Bez@unaffiliated/raito-bezarius/x-8764578) |
| 2020-09-30 21:00:11 | → | bitmagie joins (~Thunderbi@200116b806af9800a5686823a67cc6e9.dip.versatel-1u1.de) |
| 2020-09-30 21:01:16 | <monochrom> | unboxed mutable array likely kills most of the laziness. |
| 2020-09-30 21:02:19 | <xsperry> | Cheery, also System.FilePath, and for dates there's time package |
| 2020-09-30 21:02:19 | × | mu_ quits (~mu@unaffiliated/mu) (Read error: Connection reset by peer) |
| 2020-09-30 21:02:42 | → | mu_ joins (~mu@unaffiliated/mu) |
| 2020-09-30 21:02:46 | <monochrom> | But it still stands to reason to re-use existing C-bound numerical libraries like LAPACK because they are both well-tuned and well-tested over the years. |
| 2020-09-30 21:02:47 | <Cale> | Slow is relative -- people do all kinds of numerical stuff in Python, so no doubt Haskell is an option for a lot of applications. |
All times are in UTC.