Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-16 12:52:15 <merijn> Trust no one
2021-03-16 12:52:29 <merijn> I don't trust myself, but I *especially* don't trust anyone else
2021-03-16 12:54:36 × mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew)
2021-03-16 12:54:47 <codygman`> Is there a way to see if the RTS is sending a signal? Any recommendation to debug that or ideas to chase that theory down?
2021-03-16 12:55:05 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
2021-03-16 12:55:12 <codygman`> Yeah, I lose trust the more I debug these concurrent issues :)
2021-03-16 12:55:43 ukari joins (~ukari@unaffiliated/ukari)
2021-03-16 12:56:32 <codygman`> That mistrust was why I went down to the level of "hold on, is Data.Pool even doing the right thing here" in: https://mail.haskell.org/pipermail/haskell-cafe/2021-March/133613.html
2021-03-16 12:56:33 × frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 246 seconds)
2021-03-16 12:56:33 × jespada quits (~jespada@90.254.243.187) (Ping timeout: 260 seconds)
2021-03-16 12:56:37 maroloccio joins (~marolocci@pousada3ja.mma.com.br)
2021-03-16 12:57:04 <merijn> codygman`: Seeing if the RTS is sending a signal is fairly easy
2021-03-16 12:57:08 <codygman`> The response says it seems expected though and I've not yet had time to look at it again.
2021-03-16 12:57:19 <merijn> codygman`: Just compile with -debug and run inside gdb
2021-03-16 12:58:28 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
2021-03-16 12:59:38 × esp32_prog quits (~esp32_pro@185.254.75.51) (Ping timeout: 245 seconds)
2021-03-16 12:59:40 jespada joins (~jespada@90.254.243.187)
2021-03-16 13:00:20 Deide joins (~Deide@217.155.19.23)
2021-03-16 13:00:44 Tario joins (~Tario@201.192.165.173)
2021-03-16 13:01:50 × usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving)
2021-03-16 13:03:57 <codygman`> Alright, thanks!
2021-03-16 13:04:26 Lycurgus joins (~niemand@98.4.116.165)
2021-03-16 13:04:35 jonathanx_ joins (~jonathan@h-176-109.A357.priv.bahnhof.se)
2021-03-16 13:05:15 frozenErebus joins (~frozenEre@94.128.82.20)
2021-03-16 13:05:26 × jonathanx quits (~jonathan@h-176-109.A357.priv.bahnhof.se) (Read error: No route to host)
2021-03-16 13:06:11 <curiousgay> I wonder if it's necessary to provide "+RTS -N" flags, like it can't figure that out from the amount of CPU cores?
2021-03-16 13:06:33 × hexfive quits (~hexfive@50.35.83.177) (Quit: i must go. my people need me.)
2021-03-16 13:06:46 <merijn> curiousgay: Because using 1 capability per existing core is far from optimal
2021-03-16 13:06:48 <codygman`> Yesterday I learned `-N` includes hyperthreads btw and isn't NUMCPU
2021-03-16 13:07:20 <merijn> On machines with a large number of cores you almost certainly don't want 1 thread per core
2021-03-16 13:07:44 <curiousgay> merijn: eh? doesn't runtime has M:N strategy?
2021-03-16 13:07:47 niko parts (~niko@freenode/staff/ubuntu.member.niko) ()
2021-03-16 13:08:09 <curiousgay> s/has/have/
2021-03-16 13:08:10 <merijn> Additionally, it's very likely that a program isn't, you know, the only thing running on a machine, so you don't wanna claim all cores
2021-03-16 13:08:24 × mikoto-chan quits (~anass@gateway/tor-sasl/mikoto-chan) (Remote host closed the connection)
2021-03-16 13:08:31 <merijn> curiousgay: It does, but I don't see how that relates to your question?
2021-03-16 13:08:48 mikoto-chan joins (~anass@gateway/tor-sasl/mikoto-chan)
2021-03-16 13:09:12 <curiousgay> merijn: because I don't understand why it can't create threads without "+RTS -N" flags?
2021-03-16 13:09:36 <merijn> curiousgay: -N says you want 1 OS thread per core to run stuff on
2021-03-16 13:09:53 <merijn> curiousgay: Haskell threads don't need any commandline arguments
2021-03-16 13:09:57 Sorny is now known as Sornaensis
2021-03-16 13:10:20 <merijn> curiousgay: forkIO will create new threads, regardless of how many OS threads you're specifying with -N
2021-03-16 13:10:23 <curiousgay> then I don't understand why those command line arguments are even mentioned in tutorials
2021-03-16 13:10:47 <merijn> curiousgay: Because lots of clueless people also write tutorials and there's no way to stop them
2021-03-16 13:11:01 <merijn> See: 90% of all writing on programming online
2021-03-16 13:11:08 × Rudd0^ quits (~Rudd0@185.189.115.103) (Ping timeout: 260 seconds)
2021-03-16 13:11:38 × maroloccio quits (~marolocci@pousada3ja.mma.com.br) (Read error: Connection reset by peer)
2021-03-16 13:11:42 <siraben> Which tutorial is this?
2021-03-16 13:12:00 <curiousgay> merijn: well, such kinds of people could be not mentioned on https://www.haskell.org/documentation/
2021-03-16 13:12:15 <merijn> curiousgay: In GHC parlance "a capability" is "an OS thread that's running Haskell code" (the RTS may use some more OS threads for, say, running an epoll event loop, foreign calls, etc.), -N controls the number of capabilities the RTS creates
2021-03-16 13:12:53 <merijn> curiousgay: This can also be controlled from code at runtime, via setNumCapabilities
2021-03-16 13:13:15 <curiousgay> siraben: "What I Wish I Knew When Learning Haskell" book and "Haskell in 5 steps" on Haskell wiki
2021-03-16 13:13:15 Lycurgus parts (~niemand@98.4.116.165) ("Deus Ex")
2021-03-16 13:13:17 maroloccio joins (~marolocci@pousada3ja.mma.com.br)
2021-03-16 13:13:18 ADG1089__ joins (~aditya@106.214.253.186)
2021-03-16 13:13:20 caro is now known as akhesacaro
2021-03-16 13:13:36 <merijn> curiousgay: The number of *Haskell* threads concurrently on the capabilities is always unbounded (well, it's bounded by machine resources)
2021-03-16 13:14:15 <siraben> oof WIWIKWLH has a lot of incorrect info
2021-03-16 13:14:25 <merijn> siraben: It doesn't actually mention -N
2021-03-16 13:14:30 <curiousgay> thanks
2021-03-16 13:14:31 <merijn> siraben: Only -N with an actual number
2021-03-16 13:14:37 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
2021-03-16 13:14:47 <merijn> siraben: At least, according to a quick search
2021-03-16 13:15:10 <geekosaur> -N without a number is relatively new
2021-03-16 13:15:25 <curiousgay> merijn: it does at page 296
2021-03-16 13:16:03 <merijn> I'm not sure what "page 296" is on an unnumbered website
2021-03-16 13:16:23 zaquest joins (~notzaques@5.128.210.178)
2021-03-16 13:16:52 <curiousgay> you need to get it from there as PDF file
2021-03-16 13:17:05 <curiousgay> click "Screen PDF"
2021-03-16 13:17:12 × DirefulSalt quits (~DirefulSa@109.201.152.181) (Remote host closed the connection)
2021-03-16 13:17:27 <merijn> The PDF doesn't mention -N without a number either
2021-03-16 13:17:40 DirefulSalt joins (~DirefulSa@109.201.152.168)
2021-03-16 13:17:52 <merijn> http://dev.stephendiehl.com/hask/tutorial.pdf
2021-03-16 13:18:04 <curiousgay> I know, I didn't mean to use -N without a number
2021-03-16 13:18:28 <merijn> -N8 or -N4 are perfectly fine, though
2021-03-16 13:18:32 <curiousgay> just didn't want to insert random number
2021-03-16 13:18:49 <merijn> "Additionally the program itself can be specified to take runtime options with -rtsopts such as the number of cores to"
2021-03-16 13:18:52 <merijn> use.
2021-03-16 13:18:56 <merijn> I mean, that's not incorrect
2021-03-16 13:19:14 × Benzi-Junior quits (~BenziJuni@dsl-149-67-143.hive.is) (Ping timeout: 264 seconds)
2021-03-16 13:19:17 <merijn> Without -N it will default to 1 capability = 1 OS thread running Haskell code = using only 1 core
2021-03-16 13:19:42 <merijn> It even goes into that later
2021-03-16 13:20:11 × maroloccio quits (~marolocci@pousada3ja.mma.com.br) (Quit: WeeChat 2.3)
2021-03-16 13:20:27 LKoen joins (~LKoen@194.250.88.92.rev.sfr.net)
2021-03-16 13:20:34 alx741 joins (~alx741@181.196.68.64)
2021-03-16 13:20:41 <curiousgay> if it goes later to that it's impossible to notice by someone who wants to see examples of concurrent code :)
2021-03-16 13:20:46 <merijn> curiousgay: It doesn't say you can't create threads without -N. It's just saying they won't run on multiple cores
2021-03-16 13:20:55 <merijn> Which is true
2021-03-16 13:21:09 <merijn> curiousgay: "later" as in "the very next page"
2021-03-16 13:21:20 <curiousgay> ah
2021-03-16 13:23:06 <curiousgay> well, 1 OS thread is definetely not the behavior I want, but I'd like it to automatically figure out how many OS threads need to be created just like Go runtime does that
2021-03-16 13:27:25 <yushyin> curiousgay: 'Omitting ⟨x⟩, i.e. +RTS -N -RTS, lets the runtime choose the value of ⟨x⟩ itself based on how many processors are in your machine.' https://ghc.gitlab.haskell.org/ghc/doc/users_guide/using-concurrent.html#rts-flag--N
2021-03-16 13:27:26 × molehillish quits (~molehilli@ip98-167-226-26.ph.ph.cox.net) (Remote host closed the connection)
2021-03-16 13:28:27 <yushyin> also 'Omitting -N⟨x⟩ entirely means -N1'
2021-03-16 13:28:56 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
2021-03-16 13:29:24 thc202 joins (~thc202@unaffiliated/thc202)
2021-03-16 13:30:21 × bahamas quits (~lucian@unaffiliated/bahamas) (Quit: leaving)
2021-03-16 13:30:22 × geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds)
2021-03-16 13:30:27 × Kmos quits (~Kmos@217.146.82.202) (Remote host closed the connection)
2021-03-16 13:31:23 × son0p quits (~son0p@181.58.39.182) (Quit: leaving)

All times are in UTC.