<< 02-09-2024 >>

01:24:28*pqflx3 quit (Ping timeout: 272 seconds)
03:47:11*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
03:52:36*SchweinDeBurg joined #nim
04:08:56*rockcavera quit (Remote host closed the connection)
05:25:15*ntat joined #nim
05:29:05*ntat quit (Client Quit)
05:48:14*NimBot joined #nim
05:49:37*coldfeet joined #nim
07:05:35*lucasta quit (Quit: Leaving)
07:07:14*coldfeet quit (Remote host closed the connection)
07:35:57*coldfeet joined #nim
07:37:22*ntat quit (Quit: Leaving)
08:27:47*PMunch joined #nim
08:37:50*deadmarshal_ quit (Quit: IRCNow and Forever!)
09:07:18*deadmarshal_ joined #nim
09:42:09*coldfeet quit (Remote host closed the connection)
09:47:37*Deadm0th quit (Quit: Twój stary)
10:23:18*disso-peach joined #nim
10:27:07*ntat joined #nim
10:58:32*coldfeet joined #nim
11:03:22*nyeaa49284230101 joined #nim
11:07:31*beholders_eye joined #nim
11:29:48*coldfeet quit (Remote host closed the connection)
11:32:32*PMunch quit (Quit: Leaving)
11:57:13*acidsys quit (Ping timeout: 244 seconds)
11:59:50*acidsys joined #nim
12:08:13*Artea joined #nim
12:13:06*coldfeet joined #nim
12:16:30*coldfeet quit (Remote host closed the connection)
13:31:57*ryuukk quit (Ping timeout: 246 seconds)
13:32:50*ryuukk joined #nim
14:30:45*ryuukk quit (Ping timeout: 248 seconds)
14:31:27*ryuukk joined #nim
15:26:05*TC__ joined #nim
15:34:08*tc424 quit (*.net *.split)
15:34:08*Jjp137 quit (*.net *.split)
15:34:09*via quit (*.net *.split)
15:34:09*computerquip quit (*.net *.split)
15:34:10*lumidify quit (*.net *.split)
15:35:37*Jjp137 joined #nim
15:35:37*via joined #nim
15:35:37*computerquip joined #nim
15:35:37*lumidify joined #nim
16:05:19*lucasta joined #nim
16:18:27*FromDiscord joined #nim
16:18:37*ntat quit (Quit: Leaving)
16:21:43*FromDiscord quit (Remote host closed the connection)
16:22:45*FromDiscord joined #nim
16:29:32*nimimimim joined #nim
16:43:17*nimimimimim joined #nim
16:45:16*nimimimim quit (Ping timeout: 252 seconds)
16:47:53*disso-peach quit (Quit: Leaving)
16:51:11*lucasta quit (Remote host closed the connection)
16:55:24*nimimimimim quit (Ping timeout: 260 seconds)
17:37:52*def- quit (Quit: -)
17:38:43*def- joined #nim
17:45:09*def- quit (Quit: -)
18:05:39*def- joined #nim
18:07:28*ntat joined #nim
18:23:44*def- quit (Quit: -)
18:40:55*def- joined #nim
18:44:09*coldfeet joined #nim
18:45:33*krux02 joined #nim
19:00:50*Artea quit (Remote host closed the connection)
19:15:14*ntat quit (Quit: Leaving)
20:12:59*PMunch joined #nim
20:19:47*krux02_ joined #nim
20:20:44*mronetwo_ joined #nim
20:20:53*johuck_ joined #nim
20:21:29*notchris_ joined #nim
20:25:35*johuck quit (Ping timeout: 246 seconds)
20:25:35*mronetwo quit (Ping timeout: 246 seconds)
20:25:35*krux02 quit (Ping timeout: 246 seconds)
20:25:36*notchris quit (Ping timeout: 246 seconds)
20:25:38*johuck_ is now known as johuck
20:25:38*notchris_ is now known as notchris
20:26:14*cm quit (Ping timeout: 245 seconds)
20:26:14*cm_ joined #nim
20:26:40*cm_ is now known as cm
20:30:31*def- quit (Quit: -)
20:34:06*def- joined #nim
20:34:09*Artea joined #nim
20:39:42*FromDiscord quit (Remote host closed the connection)
20:39:56*FromDiscord joined #nim
20:40:13*FromDiscord quit (Remote host closed the connection)
20:40:51*FromDiscord joined #nim
20:41:41PMunch@Phil, well that was easy :)
20:41:55FromDiscord<pmunch> Works both ways now
20:46:23FromDiscord<goerge_lsd> https://github.com/nim-lang/Nim/blob/4856beae70ba058612a07ab787c9f283f885b453/lib/pure/net.nim#L1613
20:46:53PMunchWohoo, this means I can go back to using IRC :)
20:46:54FromDiscord<goerge_lsd> any idea what this line does ? what proc does it call ?
20:47:31FromDiscord<goerge_lsd> oh it's another waitFor, not the async one, ok
20:48:39PMunch@goerge_lsd, probably this one https://github.com/nim-lang/Nim/blob/4856beae70ba058612a07ab787c9f283f885b453/lib/pure/net.nim#L1441
20:48:53FromDiscord<goerge_lsd> yeah, found it
20:49:32FromDiscord<goerge_lsd> trying to determine a strategy, how to read data from socket where you don't have expected size or expected number of lines etc
20:50:05FromDiscord<goerge_lsd> so I guess this waitFor could be useful
20:52:47FromDiscord<goerge_lsd> looks like `readLine` on socket really gets 1 char/byte at a time, I thought that would be slow
20:54:15FromDiscord<Elegantbeef> > Note\: This is not very efficient.
20:56:19PMunch@goerge_lsd, well the OS still gets it in packages
20:56:32PMunchIt's not like you're requesting and getting messages byte by byte
20:56:39*PMunch quit (Quit: Leaving)
20:57:44*coldfeet quit (Quit: leaving)
20:58:18FromDiscord<Elegantbeef> What you should do is read chunks of data to a sequence and then try to decode the data, if it fails wait for more data, then remove the data that was successfully decoded
20:58:44FromDiscord<Elegantbeef> add in a timeout to prevent waiting for over the wire delaying your entire system
21:32:57FromDiscord<goerge_lsd> well, seems like waitFor is not exported, and neither is the `bufLen` field :\ why would they hide this
21:35:30FromDiscord<Elegantbeef> Cause you likely do not need it
21:37:23FromDiscord<Elegantbeef> You can do `import std/net {.all.}` if you really think yo uneed it
21:45:34*rockcavera joined #nim
22:29:03FromDiscord<goerge_lsd> does that include just the procs or all fields of objects as well?
22:29:34FromDiscord<Elegantbeef> Nope you need `privateAccess` for that
22:38:26*nyeaa49284230101 quit (Quit: The Lounge - https://thelounge.chat)
22:48:54*xutaxkamay quit (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in)
22:49:08*xutaxkamay joined #nim
22:55:00FromDiscord<goerge_lsd> perhaps the `bufLen` field of sockets is not what the name implies
22:55:43FromDiscord<Elegantbeef> It is what it implies
22:55:50FromDiscord<Elegantbeef> It's the amount of data store in the buffer
23:03:56FromDiscord<goerge_lsd> hm was there something special about non async socket behaviour, vs async. Because this code not working as expected: https://play.nim-lang.org/#pasty=jzHlKzHD
23:05:07FromDiscord<goerge_lsd> I get 0 buflen after connect, but when I do recvLine it outputs the expected data. Then when I send a command, it says bufLen is 77, but hasBufferedData returns false, and for some reason the recvLine does not work now :-?
23:07:43FromDiscord<goerge_lsd> ah my bad, I forgot the newline chars
23:08:02FromDiscord<goerge_lsd> [but still,https://play.nim-lang.org/#pasty=zhMjfoti](https://play.nim-lang.org/#pasty=zhMjfoti)
23:08:15FromDiscord<goerge_lsd> (edit) "[but still,https://play.nim-lang.org/#pasty=zhMjfoti](https://play.nim-lang.org/#pasty=zhMjfoti)" => "https://play.nim-lang.org/#pasty=zhMjfoti"
23:09:59FromDiscord<Elegantbeef> Why would it buffer data before you attempt to read
23:10:01FromDiscord<Elegantbeef> How would it
23:10:49FromDiscord<Elegantbeef> The buffer is a user space buffer
23:10:58FromDiscord<goerge_lsd> Maybe I am missing core concepts here :\
23:11:33FromDiscord<goerge_lsd> I wanted to know how much data I can request via `recv`, so it doesn't block waiting to get more data than available
23:11:48FromDiscord<Elegantbeef> This is why selectors exists
23:11:54FromDiscord<Elegantbeef> Or async
23:12:15FromDiscord<goerge_lsd> this is not available for sync sockets ?
23:12:27FromDiscord<Elegantbeef> No clue I hardly ever do networking