Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-04-28 12:21:09 × ech quits (~user@gateway/tor-sasl/ech) (Ping timeout: 240 seconds)
2021-04-28 12:22:49 L29Ah joins (~L29Ah@unaffiliated/l29ah)
2021-04-28 12:29:06 jgt_ joins (~jgt@176.232.60.233)
2021-04-28 12:30:11 × enthropy quits (~aavogt@135-23-166-92.cpe.pppoe.ca) (Ping timeout: 240 seconds)
2021-04-28 12:30:51 × wmacmil quits (~wmacmil@c83-248-72-252.bredband.comhem.se) (Ping timeout: 265 seconds)
2021-04-28 12:31:01 × ulidtko|kk quits (~ulidtko@194.54.80.38) (Read error: Connection reset by peer)
2021-04-28 12:31:15 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:d5ef:86b3:afc4:9258) (Ping timeout: 260 seconds)
2021-04-28 12:32:03 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
2021-04-28 12:35:08 wmacmil joins (~wmacmil@c83-248-72-252.bredband.comhem.se)
2021-04-28 12:36:19 mauro^ joins (dsrt@ip98-184-89-2.mc.at.cox.net)
2021-04-28 12:39:01 × hpc quits (~juzz@ip98-169-35-13.dc.dc.cox.net) (Ping timeout: 252 seconds)
2021-04-28 12:39:03 ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta)
2021-04-28 12:39:16 × CMCDragonkai2 quits (~Thunderbi@60-242-118-130.tpgi.com.au) (Remote host closed the connection)
2021-04-28 12:39:34 × Maxdamantus quits (~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 252 seconds)
2021-04-28 12:40:46 hpc joins (~juzz@ip98-169-35-13.dc.dc.cox.net)
2021-04-28 12:41:02 <thblt> I have a (finite) bunch of objects that link to each other (let's say books and their authors). Is it reasonable/idiomatic to store the objects in some sort of indexed container (eg `Map Int Object`) and have those links represented as indexes? Eg newtype ObjectId = Int; data Book = Book { author :: ObjectId, title :: String}? (The actual model is more complex, I would just like to know if it makes sense)
2021-04-28 12:41:25 <merijn> "maybe"?
2021-04-28 12:41:30 <thblt> Ha.
2021-04-28 12:41:43 <thblt> :)
2021-04-28 12:43:54 × ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds)
2021-04-28 12:43:57 carbolymer just found memleak
2021-04-28 12:44:23 <carbolymer> Someone used mapConcurrently spawning a gazillion of threads :/
2021-04-28 12:44:37 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.1)
2021-04-28 12:44:40 <merijn> carbolymer: Yes, mapConcurrently doesn't do any limiting
2021-04-28 12:44:56 <merijn> That's why I wrote my own version(s) :p
2021-04-28 12:45:05 <carbolymer> Any ideas how can I limit nr of concurrent threads?
2021-04-28 12:45:26 <carbolymer> merijn: nice, is it open-source?;)
2021-04-28 12:46:14 <merijn> carbolymer: Yes, which is another way of saying "It doesn't support 9.0 or 9.2 yet, because I don't have time to update all my packages until, like, June :p)
2021-04-28 12:46:18 <merijn> carbolymer: https://hackage.haskell.org/package/broadcast-chan-0.2.1.1/docs/BroadcastChan.html#g:4
2021-04-28 12:46:27 <carbolymer> Thx!
2021-04-28 12:46:45 <merijn> carbolymer: Got a conduit version too: https://hackage.haskell.org/package/broadcast-chan-conduit-0.2.1.1/docs/BroadcastChan-Conduit.html
2021-04-28 12:47:17 × frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds)
2021-04-28 12:49:00 ulidtko joins (~ulidtko@31.133.98.224)
2021-04-28 12:51:32 idhugo_ joins (~idhugo@87-49-45-4-mobile.dk.customer.tdc.net)
2021-04-28 12:51:32 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:b0db:882b:fd7b:c02e) (Remote host closed the connection)
2021-04-28 12:52:22 nicholasbulka joins (~nicholasb@2601:900:4301:da0:b0db:882b:fd7b:c02e)
2021-04-28 12:52:46 × dpl quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 260 seconds)
2021-04-28 12:53:52 × idhugo__ quits (~idhugo@80-62-116-231-mobile.dk.customer.tdc.net) (Ping timeout: 252 seconds)
2021-04-28 12:54:10 ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-04-28 12:55:20 Maxdamantus joins (~Maxdamant@unaffiliated/maxdamantus)
2021-04-28 12:56:26 geekosaur joins (930099da@rrcs-147-0-153-218.central.biz.rr.com)
2021-04-28 12:56:39 × nicholasbulka quits (~nicholasb@2601:900:4301:da0:b0db:882b:fd7b:c02e) (Ping timeout: 245 seconds)
2021-04-28 12:56:59 carlomagno joins (~cararell@148.87.23.8)
2021-04-28 12:57:04 dpl joins (~dpl@77-121-78-163.chn.volia.net)
2021-04-28 12:57:56 × wmacmil quits (~wmacmil@c83-248-72-252.bredband.comhem.se) (Remote host closed the connection)
2021-04-28 12:58:26 × ddellacosta quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 240 seconds)
2021-04-28 12:58:30 <tomsmeding> thblt: you're losing type safety that way, since you're mapping to a generic Object, not a Book or an Author specifically. Whether that's okay depends on your application :)
2021-04-28 12:58:37 clownfisch joins (5b27fb77@p5b27fb77.dip0.t-ipconnect.de)
2021-04-28 12:58:54 <tomsmeding> If that's okay, I think it's a fine way of making a very flexible data structure for this purpose
2021-04-28 12:59:12 wmacmil joins (~wmacmil@c83-248-72-252.bredband.comhem.se)
2021-04-28 12:59:20 urodna joins (~urodna@unaffiliated/urodna)
2021-04-28 12:59:26 × wmacmil quits (~wmacmil@c83-248-72-252.bredband.comhem.se) (Remote host closed the connection)
2021-04-28 12:59:46 wmacmil joins (~wmacmil@c83-248-72-252.bredband.comhem.se)
2021-04-28 13:00:01 jamm_ joins (~jamm@unaffiliated/jamm)
2021-04-28 13:00:40 ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-04-28 13:01:26 × wmacmil quits (~wmacmil@c83-248-72-252.bredband.comhem.se) (Remote host closed the connection)
2021-04-28 13:02:01 × mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Remote host closed the connection)
2021-04-28 13:02:05 bahamas joins (~lucian@188.27.62.94)
2021-04-28 13:02:05 × bahamas quits (~lucian@188.27.62.94) (Changing host)
2021-04-28 13:02:05 bahamas joins (~lucian@unaffiliated/bahamas)
2021-04-28 13:02:12 kiweun joins (~kiweun@2607:fea8:2a62:9600:a4e9:813e:57ef:7f40)
2021-04-28 13:02:16 <thblt> tomsmeding: Thanks. I was planning of using phantom types to mitigate the first issue.
2021-04-28 13:02:46 mnrmnaugh joins (~mnrmnaugh@unaffiliated/mnrmnaugh)
2021-04-28 13:03:41 ulidtko|k joins (~ulidtko@194.54.80.38)
2021-04-28 13:03:42 ech joins (~user@gateway/tor-sasl/ech)
2021-04-28 13:04:13 × clownfisch quits (5b27fb77@p5b27fb77.dip0.t-ipconnect.de) (Quit: Connection closed)
2021-04-28 13:04:39 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
2021-04-28 13:05:53 × ulidtko quits (~ulidtko@31.133.98.224) (Ping timeout: 246 seconds)
2021-04-28 13:07:09 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
2021-04-28 13:07:19 × kiweun quits (~kiweun@2607:fea8:2a62:9600:a4e9:813e:57ef:7f40) (Ping timeout: 276 seconds)
2021-04-28 13:10:36 DavidEichmann joins (~david@156.59.147.147.dyn.plus.net)
2021-04-28 13:12:31 × acidjnk_new2 quits (~acidjnk@p200300d0c72b9524d9e45372e00f3038.dip0.t-ipconnect.de) (Ping timeout: 276 seconds)
2021-04-28 13:13:23 × stree quits (~stree@68.36.8.116) (Ping timeout: 265 seconds)
2021-04-28 13:14:16 <haasn> There's a name for the concept of abstractions like `data Widget = Widget { doSomething :: Bool -> Widget, doSomethingElse :: Int -> Widget }`, as opposed to e.g. `class Widget w where doSomething :: w -> Bool -> w; doSomethingElse :: w -> Int -> w`
2021-04-28 13:14:20 <haasn> What is the name for this first type of design?
2021-04-28 13:15:57 × dvdp73 quits (59736826@38.104.115.89.rev.vodafone.pt) (Quit: Connection closed)
2021-04-28 13:16:56 ddellac__ joins (~ddellacos@86.106.143.73)
2021-04-28 13:17:10 dmytrish joins (~mitra@2a02:8084:a82:d900:6df4:a206:6bd4:dc59)
2021-04-28 13:20:19 st8less joins (~st8less@2603:a060:11fd:0:2197:ee43:9ac5:11fd)
2021-04-28 13:20:42 × bahamas quits (~lucian@unaffiliated/bahamas) (Quit: leaving)
2021-04-28 13:21:22 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 252 seconds)
2021-04-28 13:21:55 × ddellac__ quits (~ddellacos@86.106.143.73) (Ping timeout: 252 seconds)
2021-04-28 13:22:44 nicholasbulka joins (~nicholasb@2601:900:4301:da0:b0db:882b:fd7b:c02e)
2021-04-28 13:25:34 vladan1 joins (~vladan@195.140.213.38)
2021-04-28 13:26:16 stree joins (~stree@68.36.8.116)
2021-04-28 13:28:07 × ddellacosta quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection)
2021-04-28 13:28:21 ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net)
2021-04-28 13:28:58 <sshine> haasn, good question.
2021-04-28 13:29:40 vk3wtf_ joins (~doc@61.68.250.44)
2021-04-28 13:30:14 <sshine> haasn, I think that could depend on how you deal with w. but one very general term would be type-parameterised?
2021-04-28 13:30:30 <merijn> haasn: I usually call it "OO Haskell" :p
2021-04-28 13:31:13 <merijn> Because it basically behaves like OO interfaces
2021-04-28 13:31:31 × vk3wtf quits (~doc@115-64-102-158.tpgi.com.au) (Ping timeout: 248 seconds)
2021-04-28 13:33:26 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Remote host closed the connection)
2021-04-28 13:33:34 <sshine> haasn, if you have something like 'data Widget w = Widget { doSomething :: w Bool, doSomethingElse :: Int -> w () }', you'd have a Barbie. :-D http://hackage.haskell.org/package/barbies -- i.e., if your type parameter is specifically a unary type-constructor.
2021-04-28 13:33:47 malumore_ joins (~malumore@151.62.119.140)
2021-04-28 13:34:10 × geekosaur quits (930099da@rrcs-147-0-153-218.central.biz.rr.com) (Quit: Connection closed)
2021-04-28 13:34:34 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 245 seconds)
2021-04-28 13:34:49 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
2021-04-28 13:35:55 geekosaur joins (930099da@rrcs-147-0-153-218.central.biz.rr.com)

All times are in UTC.