Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,803,202 events total
2021-07-22 01:15:29 × favonia quits (~favonia@user/favonia) (Ping timeout: 255 seconds)
2021-07-22 01:15:49 favonia joins (~favonia@user/favonia)
2021-07-22 01:16:21 retroid_ joins (~retro@97e2ba5d.skybroadband.com)
2021-07-22 01:18:36 pavonia joins (~user@user/siracusa)
2021-07-22 01:20:26 × xff0x_ quits (~xff0x@2001:1a81:530d:8900:7530:d6ba:9d47:69d1) (Ping timeout: 255 seconds)
2021-07-22 01:22:12 xff0x_ joins (~xff0x@2001:1a81:5345:c200:35ab:ec93:2501:2232)
2021-07-22 01:22:39 agua joins (~agua@2804:14c:8793:8e2f:6091:e445:c3bf:d39e)
2021-07-22 01:23:10 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Ping timeout: 256 seconds)
2021-07-22 01:23:49 × zeenk quits (~zeenk@2a02:2f04:a008:d600:18f2:3421:bac6:8f38) (Quit: Konversation terminated!)
2021-07-22 01:25:51 <Boarders> this question might be sort of nonsense but is there any version of having Reader where if you throw an error you also get access to the local environment at that point?
2021-07-22 01:26:06 × pesada quits (~agua@2804:18:4e:2dda:1:0:4058:6b7c) (Ping timeout: 255 seconds)
2021-07-22 01:26:07 <Boarders> I don't really want state because I don't want to do stateful things other than that
2021-07-22 01:27:10 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
2021-07-22 01:27:55 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-07-22 01:28:48 <dsal> State has a lot of downsides.
2021-07-22 01:29:13 <dsal> I'm not sure what you mean by throwing an error, though. You can do `ReaderT ExceptT` I assume.
2021-07-22 01:30:17 <arkanoid> is there a builtin function that filters a list in order until a condition is met on an element? I've built mine, but I'm interested in knowing
2021-07-22 01:31:01 <dibblego> @type find
2021-07-22 01:31:02 <lambdabot> Foldable t => (a -> Bool) -> t a -> Maybe a
2021-07-22 01:31:17 dajoer joins (~david@user/gvx)
2021-07-22 01:31:22 <dibblego> > find even [1,3,5,7,8,3,5]
2021-07-22 01:31:24 <lambdabot> Just 8
2021-07-22 01:31:28 <dibblego> > find even [1,3,5,7]
2021-07-22 01:31:30 <lambdabot> Nothing
2021-07-22 01:34:13 <arkanoid> and to return [1,3,5,7] instead of Just 8? (elements up to found one)
2021-07-22 01:34:26 × Deide quits (~Deide@user/deide) (Quit: Seeee yaaaa)
2021-07-22 01:35:00 <geekosaur> > takeWhile odd [1,3,5,7,8,3,5]
2021-07-22 01:35:02 <lambdabot> [1,3,5,7]
2021-07-22 01:37:38 <dsal> > takeWhile (not . even) [1,3,5,7,8,3,5] -- if you want to think about it that way
2021-07-22 01:37:40 <lambdabot> [1,3,5,7]
2021-07-22 01:41:05 <arkanoid> yeah! very nice
2021-07-22 01:42:55 × Null_A quits (~null_a@2601:645:8700:2290:c911:1c05:b98d:d069) (Remote host closed the connection)
2021-07-22 01:43:48 <arkanoid> and to return 8,5,3? Like "discard until condition"
2021-07-22 01:45:32 <arkanoid> or "filter with stop condition"
2021-07-22 01:49:37 Axman6 joins (~Axman6@user/axman6)
2021-07-22 01:50:44 <monochrom> dropWhile
2021-07-22 01:51:32 × Atum_ quits (~IRC@user/atum/x-2392232) (Quit: Atum_)
2021-07-22 01:52:23 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-22 01:53:44 × smichel17 quits (~smichel17@c-73-68-217-18.hsd1.ma.comcast.net) (Quit: smichel17)
2021-07-22 01:57:16 Codaraxis_ joins (~Codaraxis@ip68-5-90-227.oc.oc.cox.net)
2021-07-22 01:57:51 <sm> see also break, span, partition
2021-07-22 02:00:34 × Codaraxis quits (~Codaraxis@user/codaraxis) (Ping timeout: 240 seconds)
2021-07-22 02:00:44 <arkanoid> thanks (also for your patience)
2021-07-22 02:01:13 × Guest84 quits (~Guest84@199.19.226.242) (Quit: Client closed)
2021-07-22 02:09:30 × td_ quits (~td@muedsl-82-207-238-072.citykom.de) (Ping timeout: 240 seconds)
2021-07-22 02:10:44 × alx741 quits (~alx741@186.178.108.210) (Quit: alx741)
2021-07-22 02:11:35 td_ joins (~td@94.134.91.91)
2021-07-22 02:15:08 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
2021-07-22 02:16:40 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
2021-07-22 02:16:40 Lord_of_Life_ is now known as Lord_of_Life
2021-07-22 02:19:07 Matthias1 joins (~Matthias1@cpe-76-170-236-166.socal.res.rr.com)
2021-07-22 02:21:11 × cjb quits (~cjb@user/cjb) (Quit: rcirc on GNU Emacs 28.0.50)
2021-07-22 02:22:12 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 245 seconds)
2021-07-22 02:23:06 <dsal> Or just read Data.List docs. :) And maybe Foldable.
2021-07-22 02:25:23 <sm> and the split library. (List part deux)
2021-07-22 02:25:41 <sm> it's never "just" with Haskell :)
2021-07-22 02:26:31 <dsal> Ha. Yeah. "Oh, you think you've read all the docs? ..."
2021-07-22 02:26:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2021-07-22 02:29:39 <arkanoid> well, I've finally succeeded in passing the test for my first haskell program. Also first use of Maybe monad! No bind yet and surely I've been missing all possible chances to write better code, but this made my day https://exercism.io/tracks/haskell/exercises/acronym/solutions/fd01b2dda63344518e86b263aaeac983
2021-07-22 02:29:51 <jeetelongname> hoogle is a wonderful reasourse if you have not checked it out
2021-07-22 02:30:03 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
2021-07-22 02:30:10 <arkanoid> yeah I've been using it quite a lot on the last couple hours
2021-07-22 02:30:30 <sm> congrats!
2021-07-22 02:31:22 <arkanoid> any suggestion is welcome!
2021-07-22 02:31:38 <sm> maybe too late now, but I enjoyed project euler in the beginning - it was more about numbers, which were easier
2021-07-22 02:32:25 <jeetelongname> another reasourse I have been using is https://www.cis.upenn.edu/~cis194/spring13/lectures.html its a uni course that takes you through the basics to monads. all with reasources and assignments
2021-07-22 02:32:49 <arkanoid> sm: I've consumed project euler back in the days of my advanced programming classes. We used python metaprogramming and aspectj (java)
2021-07-22 02:33:13 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
2021-07-22 02:33:13 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (cadmium.libera.chat (Nickname regained by services)))
2021-07-22 02:33:13 finn_elija is now known as FinnElija
2021-07-22 02:33:37 × Matthias1 quits (~Matthias1@cpe-76-170-236-166.socal.res.rr.com) (Remote host closed the connection)
2021-07-22 02:33:40 <glguy> If you're looking for exercises to learn on I thought the previous advent of code was pretty good https://adventofcode.com/2019 and it has a nice feature that year where half the problems built on the same "virtual machine" so you got a chance to reuse some code across problems
2021-07-22 02:34:03 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-22 02:34:15 <sm> that is waay harder for a haskell beginner...
2021-07-22 02:35:07 <glguy> euler won't give you very much haskell learning opportunity and the advent of code problems aren't generally that hard
2021-07-22 02:35:12 Matthias1 joins (~Matthias1@cpe-76-170-236-166.socal.res.rr.com)
2021-07-22 02:35:19 <sm> ha says you :)
2021-07-22 02:35:32 <jeetelongname> hackerrank would probably be a better fit. tho the templates are way to overcomplicated and its just easier to replace them
2021-07-22 02:35:39 <glguy> half the problems that year are stand-alone and the other half has some common code to share which I think it way better for learning than starting over every time
2021-07-22 02:35:59 <arkanoid> I like the exercism way to teach
2021-07-22 02:36:13 <arkanoid> it gives some context with test code and tools
2021-07-22 02:37:02 <sm> each at the proper tiem
2021-07-22 02:37:06 <sm> time
2021-07-22 02:37:17 <jeetelongname> I have a bone to pick with AOC. I swear it made my blood pressure rise a good couple of units just to try and solve the problem in one day
2021-07-22 02:37:34 <arkanoid> when I think adventofcode I feel like want use my main language
2021-07-22 02:37:44 <sm> clash of code teaches only certain small skills, but is fun
2021-07-22 02:38:59 <jeetelongname> AOC was meant to be my way of picking up a new language (ruby in this case (this was before I was enlightened go easy on me)) but I just got bogged down in the problems and didn't learn all to much
2021-07-22 02:39:00 <sm> exercism, project euler, advent of code, hackerrank, clash of code.. any notable others ?
2021-07-22 02:39:02 × fresheyeball quits (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9)
2021-07-22 02:39:41 <arkanoid> I just want to learn how to write more pure code in other imperative languages, and >>= there too
2021-07-22 02:40:12 <keltono> arkanoid: nice solution! one thing I would note is that you didn't need to define consumeWhile
2021-07-22 02:40:18 <keltono> @hoogle dropWhile
2021-07-22 02:40:18 <lambdabot> Prelude dropWhile :: (a -> Bool) -> [a] -> [a]
2021-07-22 02:40:18 <lambdabot> Data.List dropWhile :: (a -> Bool) -> [a] -> [a]
2021-07-22 02:40:18 <lambdabot> Data.List.NonEmpty dropWhile :: (a -> Bool) -> NonEmpty a -> [a]
2021-07-22 02:40:28 lavaman joins (~lavaman@98.38.249.169)
2021-07-22 02:40:30 <sm> didn't johann tibbell or someone make a learn-haskell-by-making-a-game thing ?
2021-07-22 02:41:54 jeetelongname parts (~jeet@host-89-241-98-229.as13285.net) (oh wow I need to sleep. Night!)
2021-07-22 02:43:20 <sm> can't find it
2021-07-22 02:43:21 <arkanoid> keltono: thanks! Actually I forgot to replace at the end (I reinvented the wheel before finding out dropWhile)

All times are in UTC.