Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,146 events total
2021-08-20 00:40:35 <lechner> but the lack of typing drove me over here
2021-08-20 00:42:13 <lechner> dsal: you programmed Haskell for twenty years?
2021-08-20 00:42:17 <dsal> `committish <- computeCommttish (intercalate "." [major, minor, "0"]) patch`
2021-08-20 00:42:49 <dsal> Woah. My oldest haskell code is almost that old. But no, most of the last 20 years, I've been doing other random junk.
2021-08-20 00:43:32 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-08-20 00:43:53 <dsal> I haven't done very serious haskell until a few years ago.
2021-08-20 00:51:40 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
2021-08-20 00:54:47 <lechner> dsal: unbelievable, one line! which OS do you use?
2021-08-20 00:55:13 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-08-20 00:55:39 Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com)
2021-08-20 00:58:35 <janus> is there a commonly used name for 'flip foldMap' ?
2021-08-20 01:01:35 <janus> i really only need it for Maybe, and then the name "whenJust" makes sense. but that is already used in Neil Mitchell's extra package, where it returns 'm ()' (so it's not really the same at all)
2021-08-20 01:02:07 <janus> whenJustOrMempty? argh it sounds horrible
2021-08-20 01:03:03 <Axman6> :t fold foldMap
2021-08-20 01:03:04 <lambdabot> (Monoid m, Foldable t, Foldable ((->) (a -> m))) => t a -> m
2021-08-20 01:03:17 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-20 01:03:20 <Axman6> :t flip foldMap -- oops
2021-08-20 01:03:21 <lambdabot> (Foldable t, Monoid c) => t a -> (a -> c) -> c
2021-08-20 01:04:35 <janus> % :m +Data.Foldable +Data.Monoid
2021-08-20 01:04:35 <yahb> janus: syntax: :module [+/-] [*]M1 ... [*]Mn
2021-08-20 01:04:52 <janus> hmm, dunno why that is not working
2021-08-20 01:05:01 <janus> % foldMap Sum Nothing :: Sum Int
2021-08-20 01:05:01 <yahb> janus: Sum {getSum = 0}
2021-08-20 01:05:10 <janus> % foldMap Sum (Just 5) :: Sum Int
2021-08-20 01:05:10 <yahb> janus: Sum {getSum = 5}
2021-08-20 01:05:56 <janus> but i really wanted to use it in an HTML AST of an Elm AST, to render optionally available elements
2021-08-20 01:06:10 <janus> s/Elm AST/Elm clone/
2021-08-20 01:06:33 lavaman joins (~lavaman@98.38.249.169)
2021-08-20 01:06:47 <janus> so the rendering function is way larger than the maybe (which comes from the model). that's why the flip makes sense
2021-08-20 01:07:14 <janus> similar to how the State functions have flipped versions available
2021-08-20 01:08:59 × shailangsa quits (~shailangs@host86-145-14-24.range86-145.btcentralplus.com) (Ping timeout: 268 seconds)
2021-08-20 01:09:45 <janus> maybe i should just write a letter to Neil and ask him to rename his function and break everybody's code, pretty please :P
2021-08-20 01:10:22 <dsal> @hoogle whenJust
2021-08-20 01:10:23 <lambdabot> Control.Monad.Extra whenJust :: Applicative m => Maybe a -> (a -> m ()) -> m ()
2021-08-20 01:10:23 <lambdabot> Extra whenJust :: Applicative m => Maybe a -> (a -> m ()) -> m ()
2021-08-20 01:10:23 <lambdabot> Data.GI.Base.Utils whenJust :: Monad m => Maybe a -> (a -> m ()) -> m ()
2021-08-20 01:10:40 <dsal> :t traverse
2021-08-20 01:10:41 <lambdabot> (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
2021-08-20 01:10:55 × Guest372 quits (~xxx@47.245.54.240) (Remote host closed the connection)
2021-08-20 01:11:06 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds)
2021-08-20 01:11:14 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2021-08-20 01:12:02 Guest372 joins (~xxx@47.245.54.240)
2021-08-20 01:12:20 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
2021-08-20 01:13:21 <dsal> Giving stuff a local name isn't a bad idea.
2021-08-20 01:13:42 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2)
2021-08-20 01:15:16 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
2021-08-20 01:15:41 <janus> even if the name is clashing with another well known function ;) ?
2021-08-20 01:15:42 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-08-20 01:16:02 <janus> i could call it whenJustF because of the foldable. but the F usually means functor, right? so even more confusing
2021-08-20 01:16:35 Danishman joins (~Allan@2-104-144-110-cable.dk.customer.tdc.net)
2021-08-20 01:17:06 <janus> oh well, if i put Just in the name, the F is wrong anyway, it is already constraint to a specific Foldable...
2021-08-20 01:19:17 <janus> onJust? hmmm... it has nothing to do with `on` from Data.Function o_O
2021-08-20 01:19:25 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Ping timeout: 252 seconds)
2021-08-20 01:19:47 <janus> can't use "ifJust", functions with "if" are expected to run on Bools
2021-08-20 01:22:32 keutoi joins (~keutoi@157.48.195.127)
2021-08-20 01:22:41 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 248 seconds)
2021-08-20 01:27:32 mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
2021-08-20 01:30:48 Erutuon joins (~Erutuon@user/erutuon)
2021-08-20 01:33:55 <monochrom> Life hack: If you use snake case, you will not clash with the standard library, or any library for that matter.
2021-08-20 01:37:32 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
2021-08-20 01:38:24 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 250 seconds)
2021-08-20 01:41:46 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 258 seconds)
2021-08-20 01:42:50 geekosaur joins (~geekosaur@xmonad/geekosaur)
2021-08-20 01:44:37 × xff0x quits (~xff0x@2001:1a81:53ce:4000:6528:22c2:50dd:57c1) (Ping timeout: 245 seconds)
2021-08-20 01:46:28 xff0x joins (~xff0x@2001:1a81:5207:3100:ba2d:6a43:7e07:c407)
2021-08-20 01:47:40 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 240 seconds)
2021-08-20 01:48:10 geekosaur joins (~geekosaur@xmonad/geekosaur)
2021-08-20 01:48:45 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-08-20 01:53:28 sleblanc joins (~sleblanc@user/sleblanc)
2021-08-20 01:55:56 <Axman6> you might clash with style guides and other developers however
2021-08-20 01:57:54 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2)
2021-08-20 02:00:54 <dsal> I have `justM :: Monad m => (a -> m ()) -> Maybe a -> m ()`
2021-08-20 02:01:13 wrengr is now known as wrengr_away
2021-08-20 02:01:35 <Cajun> snake case also gets hlint mad :P
2021-08-20 02:01:49 <dsal> It makes sense in my codebase. I don't know that I would worry about a thing a person somewhere did.
2021-08-20 02:02:19 × wrengr_away quits (~wrengr@56.4.82.34.bc.googleusercontent.com) (Quit: leaving)
2021-08-20 02:02:48 <dsal> (that function, btw, is `traverse_` but it's clearly more readable in my codebase as `justM`)
2021-08-20 02:02:59 wrengr joins (~wrengr@56.4.82.34.bc.googleusercontent.com)
2021-08-20 02:03:55 wrengr is now known as wrengr_away
2021-08-20 02:05:40 × Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Ping timeout: 240 seconds)
2021-08-20 02:21:48 × alx741 quits (~alx741@181.196.69.234) (Quit: alx741)
2021-08-20 02:23:13 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 252 seconds)
2021-08-20 02:25:08 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
2021-08-20 02:25:50 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2021-08-20 02:39:36 × mmalter quits (~mmalter@88.171.43.194) (Quit: Lost terminal)
2021-08-20 02:41:57 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
2021-08-20 02:42:10 × td_ quits (~td@94.134.91.118) (Ping timeout: 240 seconds)
2021-08-20 02:46:52 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
2021-08-20 02:49:03 td_ joins (~td@94.134.91.77)
2021-08-20 02:56:08 <dsal> lechner: macos and nixos
2021-08-20 03:00:26 × mousey quits (~skymouse@gateway/tor-sasl/mousey) (Remote host closed the connection)
2021-08-20 03:00:47 mousey joins (~skymouse@gateway/tor-sasl/mousey)
2021-08-20 03:06:35 vysn joins (~vysn@user/vysn)
2021-08-20 03:06:57 bakinonion[m] joins (~bakinonio@2001:470:69fc:105::ddb3)
2021-08-20 03:21:38 slack1256 joins (~slack1256@191.125.37.143)
2021-08-20 03:25:33 × Guest9886 quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-08-20 03:26:28 × otto_s quits (~user@p5de2f223.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2021-08-20 03:28:18 × aegon quits (~mike@174.127.249.180) (Quit: leaving)
2021-08-20 03:28:21 otto_s joins (~user@p5de2f5f0.dip0.t-ipconnect.de)
2021-08-20 03:28:55 dsrt^ joins (~dsrt@209.65.131.194)

All times are in UTC.