<< 04-03-2025 >>

00:02:41FromDiscord<smallwebisawesome> how do i send messages using nim std/net sockets i have tried socket.send but my client gets no response
00:04:28FromDiscord<Elegantbeef> Send is it
00:04:28FromDiscord<Elegantbeef> Is it the same protocol?
00:08:26FromDiscord<smallwebisawesome> yes tcp
00:10:56FromDiscord<Elegantbeef> No exceptions thrown?
00:11:34FromDiscord<smallwebisawesome> none but i did not add code to check the program compiles without any errors
00:13:02FromDiscord<Elegantbeef> Is the server and client written in Nim?
00:15:18FromDiscord<smallwebisawesome> yes i can send link to the code on a privatebin instance
00:18:26FromDiscord<Elegantbeef> It would be easier to see what you're doing 😄
00:21:41*xet7 quit (Quit: Leaving)
00:24:48FromDiscord<smallwebisawesome> meaning ?
00:25:10FromDiscord<Elegantbeef> Send the code
00:25:53FromDiscord<smallwebisawesome> https://bin.bloat.cat/?93bd4a156cfa0df0#EtpPd7NHDTk3fX7TSkKFtRymPV6DZUvCe1yP8RVE2BoZ
00:29:10*tiorock joined #nim
00:29:10*tiorock quit (Changing host)
00:29:10*tiorock joined #nim
00:29:10*rockcavera quit (Killed (zirconium.libera.chat (Nickname regained by services)))
00:29:10*tiorock is now known as rockcavera
00:36:57FromDiscord<Elegantbeef> Ah the typical `recv` block
00:36:57FromDiscord<Elegantbeef> If I recall correctly `recv` waits for `size` when you do not supply a timeout
00:37:00FromDiscord<Elegantbeef> You certainly want to supply `buffered = false` inside `newSocket`
00:37:26FromDiscord<smallwebisawesome> i still get nothing printed to stdout
00:37:55FromDiscord<Elegantbeef> Yea still the blocking issue, I swear std/net's recv never does what one really wants 😄
00:40:58FromDiscord<Elegantbeef> Oh wait you did `socket.send` in the server
00:41:16FromDiscord<smallwebisawesome> yes
00:41:24FromDiscord<Elegantbeef> you want `client.send`
00:41:48FromDiscord<Elegantbeef> Otherwise you're sending to yourself
00:42:24FromDiscord<smallwebisawesome> why do i want client.send what does client.send do
00:42:30FromDiscord<Elegantbeef> `client.send` will send to the connecting client
00:42:30FromDiscord<Elegantbeef> Instead of the server's socket
00:44:06FromDiscord<smallwebisawesome> so var client\: Socket is the connecting socket
00:44:15FromDiscord<Elegantbeef> It's the client yes
00:44:43FromDiscord<Elegantbeef> When you do `acceptAddr` you write the connecting client to the `var Socket`
00:51:28FromDiscord<smallwebisawesome> ok thanks for all the help it works now. i have been programming a client server application for about 3 weeks now i first tried using websockets on python with cmd that did not work switched to muti choice options() function wrote the code on problem i could not find a way to get the code to run in a loop and have server always running. then switched to nim sockets. any idea why nim has not so great documentation i cant even f
00:51:56FromDiscord<Elegantbeef> Documentation requires someone to write them 😄
00:53:22FromDiscord<smallwebisawesome> oh ok maybe i good side project for me i quite like nim first tried programming it when i was 17 or 16 found it too frustrating coming from python so i learned c instead
01:10:49FromDiscord<smallwebisawesome> if i mutiple function that are called upon certain messages being sent do they have to do the var client\: Socket setup
01:13:26FromDiscord<Elegantbeef> The socket setup is to accept a client once a client is connected you can do whatever you want with those sockets
01:13:43FromDiscord<Elegantbeef> If you want to store it into a sequence then pass a sequence of sockets around it's fair game
01:16:05FromDiscord<smallwebisawesome> ok thanks does the client at all have to do client.recv() at all
01:16:25FromDiscord<Elegantbeef> On the client side of course
01:19:55FromDiscord<smallwebisawesome> how would i go about doing this
01:20:26FromDiscord<Elegantbeef> You already are
01:21:54FromDiscord<Elegantbeef> If you need a message from the socket you call `recv`
01:22:31FromDiscord<smallwebisawesome> ahh but i have socket.recv(1024) do i just call recv()
01:22:47FromDiscord<Elegantbeef> Call it with however many you want
01:22:58FromDiscord<Elegantbeef> On the client side `.recv` is just to get a message from the server
01:34:56FromDiscord<smallwebisawesome> thaks
03:09:23*rockcavera is now known as Guest7528
03:09:23*tiorock joined #nim
03:09:23*Guest7528 quit (Killed (platinum.libera.chat (Nickname regained by services)))
03:09:23*tiorock is now known as rockcavera
03:09:26*rockcavera quit (Remote host closed the connection)
03:12:08*rockcavera joined #nim
03:17:53*ehmry quit (Ping timeout: 252 seconds)
04:11:38*ensyde joined #nim
04:57:57*beholders_eye quit (Ping timeout: 248 seconds)
05:34:55*tiorock joined #nim
05:34:55*tiorock quit (Changing host)
05:34:55*tiorock joined #nim
05:34:55*rockcavera quit (Killed (silver.libera.chat (Nickname regained by services)))
05:34:55*tiorock is now known as rockcavera
06:29:01*fallback quit (*.net *.split)
06:29:02*Jjp137 quit (*.net *.split)
06:29:02*GnuYawk6733 quit (*.net *.split)
06:29:02*Ekho quit (*.net *.split)
06:29:02*nyeaa49284230101 quit (*.net *.split)
06:29:03*termer quit (*.net *.split)
06:29:03*syl_ quit (*.net *.split)
06:29:03*hernan604 quit (*.net *.split)
06:29:03*flynn quit (*.net *.split)
06:29:03*maytham quit (*.net *.split)
06:29:05*sh4 quit (*.net *.split)
06:29:05*mal`` quit (*.net *.split)
06:29:05*dza quit (*.net *.split)
06:29:06*pbsds35 quit (*.net *.split)
06:29:06*kasimir_ quit (*.net *.split)
06:29:07*lumidify quit (*.net *.split)
06:29:07*Artea quit (*.net *.split)
06:29:07*_________ quit (*.net *.split)
06:29:08*acidsys quit (*.net *.split)
06:29:08*noeontheend quit (*.net *.split)
06:29:09*tmpod quit (*.net *.split)
06:29:11*Amun-Ra quit (*.net *.split)
06:29:12*mahlon quit (*.net *.split)
06:29:12*SchweinDeBurg quit (*.net *.split)
06:29:12*marcus quit (*.net *.split)
06:29:13*strogon14 quit (*.net *.split)
06:29:13*GreaseMonkey quit (*.net *.split)
06:29:13*oisota quit (*.net *.split)
06:29:14*ttkap quit (*.net *.split)
06:29:15*pmp-p quit (*.net *.split)
06:29:16*FromDiscord quit (*.net *.split)
06:29:16*jkl quit (*.net *.split)
06:29:20*ormiret quit (*.net *.split)
06:29:20*ensyde quit (*.net *.split)
06:29:20*def- quit (*.net *.split)
06:29:21*attah quit (*.net *.split)
06:29:21*khazakar quit (*.net *.split)
06:29:22*Goodbye_Vincent1 quit (*.net *.split)
06:30:14*ensyde joined #nim
06:30:14*def- joined #nim
06:30:14*fallback joined #nim
06:30:14*mahlon joined #nim
06:30:14*SchweinDeBurg joined #nim
06:30:14*Amun-Ra joined #nim
06:30:14*noeontheend joined #nim
06:30:14*tmpod joined #nim
06:30:14*acidsys joined #nim
06:30:14*ttkap joined #nim
06:30:14*oisota joined #nim
06:30:14*GreaseMonkey joined #nim
06:30:14*strogon14 joined #nim
06:30:14*marcus joined #nim
06:30:14*maytham joined #nim
06:30:14*flynn joined #nim
06:30:14*hernan604 joined #nim
06:30:14*syl_ joined #nim
06:30:14*termer joined #nim
06:30:14*nyeaa49284230101 joined #nim
06:30:14*Ekho joined #nim
06:30:14*GnuYawk6733 joined #nim
06:30:14*Jjp137 joined #nim
06:30:14*sh4 joined #nim
06:30:14*mal`` joined #nim
06:30:14*pmp-p joined #nim
06:30:14*dza joined #nim
06:30:14*attah joined #nim
06:30:14*khazakar joined #nim
06:30:14*FromDiscord joined #nim
06:30:14*pbsds35 joined #nim
06:30:14*jkl joined #nim
06:30:14*kasimir_ joined #nim
06:30:14*lumidify joined #nim
06:30:15*Artea joined #nim
06:30:15*_________ joined #nim
06:30:15*Goodbye_Vincent1 joined #nim
06:30:15*ormiret joined #nim
06:30:25*ntat joined #nim
06:30:31*ursa-major quit (Max SendQ exceeded)
06:30:58*fallback quit (*.net *.split)
06:30:58*Jjp137 quit (*.net *.split)
06:30:58*GnuYawk6733 quit (*.net *.split)
06:30:58*Ekho quit (*.net *.split)
06:30:59*nyeaa49284230101 quit (*.net *.split)
06:30:59*termer quit (*.net *.split)
06:30:59*syl_ quit (*.net *.split)
06:30:59*hernan604 quit (*.net *.split)
06:30:59*flynn quit (*.net *.split)
06:30:59*maytham quit (*.net *.split)
06:31:31*noeontheend quit (Ping timeout: 246 seconds)
06:31:34*tmpod quit (Ping timeout: 246 seconds)
06:31:37*casaca quit (Ping timeout: 247 seconds)
06:32:03*Freneticks quit (Ping timeout: 276 seconds)
06:32:42*johuck quit (Ping timeout: 263 seconds)
06:32:42*adigitoleo quit (Ping timeout: 240 seconds)
06:33:30*fallback joined #nim
06:33:30*Jjp137 joined #nim
06:33:30*GnuYawk6733 joined #nim
06:33:30*Ekho joined #nim
06:33:30*nyeaa49284230101 joined #nim
06:33:30*termer joined #nim
06:33:30*syl_ joined #nim
06:33:30*hernan604 joined #nim
06:33:30*flynn joined #nim
06:33:30*maytham joined #nim
06:33:36*Ekho quit (Max SendQ exceeded)
06:33:57*adigitoleo joined #nim
06:33:58*noeontheend joined #nim
06:34:24*johuck joined #nim
06:34:29*tmpod joined #nim
06:34:33*om3ga quit (*.net *.split)
06:34:33*gshumway quit (*.net *.split)
06:34:33*via quit (*.net *.split)
06:34:35*m5zs7k quit (*.net *.split)
06:34:35*end quit (*.net *.split)
06:34:37*blackbeard420 quit (*.net *.split)
06:35:08*casaca joined #nim
06:35:21*m5zs7k joined #nim
06:35:21*end joined #nim
06:35:21*blackbeard420 joined #nim
06:35:27*m5zs7k quit (Max SendQ exceeded)
06:35:41*m5zs7k_ joined #nim
06:36:06*ursa-major joined #nim
06:36:30*om3ga joined #nim
06:36:31*gshumway joined #nim
06:36:31*via joined #nim
06:36:52*bcksl quit (*.net *.split)
06:36:52*xutaxkamay quit (*.net *.split)
06:36:52*oddish quit (*.net *.split)
06:36:53*tk quit (*.net *.split)
06:37:35*bcksl joined #nim
06:37:35*xutaxkamay joined #nim
06:37:35*oddish joined #nim
06:37:35*tk joined #nim
06:38:06*casaca quit (*.net *.split)
06:38:06*noeontheend quit (*.net *.split)
06:38:07*anddam quit (*.net *.split)
06:38:07*mronetwo quit (*.net *.split)
06:38:08*oz quit (*.net *.split)
06:38:12*nisstyre quit (*.net *.split)
06:38:47*nisstyre joined #nim
06:40:44*casaca joined #nim
06:40:44*noeontheend joined #nim
06:40:44*anddam joined #nim
06:40:44*mronetwo joined #nim
06:40:44*oz joined #nim
06:40:49*casaca quit (Max SendQ exceeded)
06:42:29*casaca joined #nim
06:44:01*Ekho- joined #nim
06:44:59*m5zs7k_ is now known as m5zs7k
06:52:15*Freneticks joined #nim
07:12:42*ntat quit (Quit: Leaving)
07:41:25*MauGal joined #nim
07:55:44*coldfeet joined #nim
07:59:19*coldfeet quit (Client Quit)
08:27:29FromDiscord<morgan (ping with reply)> sent a long message, see https://pasty.ee/cGeMCUOf
08:27:54FromDiscord<morgan (ping with reply)> discord's preview for thin images being useless again
08:33:32FromDiscord<morgan (ping with reply)> this specializes \`\` but as on set[float] somehow https://media.discordapp.net/attachments/371759389889003532/1346400157880684584/image.png?ex=67c80c5c&is=67c6badc&hm=b56cce12703e4c94f5aaefc9a7db3a0f74cf8b612fcb211b8b2f1d3e2f863700&
08:34:02FromDiscord<Elegantbeef> Cause `` overload is generic for `set[T]`
08:34:32FromDiscord<Elegantbeef> There is no way to infer the first parameter though
08:34:40FromDiscord<morgan (ping with reply)> darn
08:34:52FromDiscord<Elegantbeef> you need to do `(proc(_, _: float): float)(`\`)`
08:35:15FromDiscord<Elegantbeef> But you'll run into "You cannot use this as a procvar"
08:36:25FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=JhaJcNrf
08:36:29FromDiscord<Elegantbeef> This will error due to `` being magic
08:36:42FromDiscord<Elegantbeef> Really though the compiler should just generate a proc for you
08:38:05FromDiscord<morgan (ping with reply)> i'll prob just make dedicated float \ and + procs for now
08:38:59FromDiscord<morgan (ping with reply)> i was hoping i could do it some way like that to make it easier to work on a variety of types
08:40:17FromDiscord<morgan (ping with reply)> oh wait i just realized the error i got last was probably about it alloc0ing some memory into a const
08:41:35FromDiscord<morgan (ping with reply)> ok now it's about `` being a builtin
08:47:11FromDiscord<morgan (ping with reply)> ok ill just leave it with the necessary stuff for now
08:47:51FromDiscord<morgan (ping with reply)> maybe ill try to figure out a better way to do a larger set of operations on a larger set of types if i make it a library
09:17:27*ntat joined #nim
09:19:57*coldfeet joined #nim
09:24:20*coldfeet quit (Client Quit)
09:49:41*_________ quit (Ping timeout: 268 seconds)
09:56:10*_________ joined #nim
10:06:25*ntat quit (Quit: Leaving)
10:46:12*dv^_^ quit (Ping timeout: 276 seconds)
10:50:54*dv^_^ joined #nim
11:01:19*ntat joined #nim
11:23:33*beholders_eye joined #nim
11:43:25*ensyde quit (Ping timeout: 265 seconds)
12:14:49*MauGal quit (Ping timeout: 252 seconds)
12:23:06FromDiscord<jaar23> In reply to @goerge_lsd "https://github.com/jaar23/tui_widget trying to comp": Haven't been active for last few months, due to busy with work. Has this been fixed by just upgrading to nim 2.2.0? I haven't tested its compatibility on windows yet.
12:31:24*ntat quit (Quit: Leaving)
12:58:40*tiorock joined #nim
12:58:40*tiorock quit (Changing host)
12:58:40*tiorock joined #nim
12:58:40*rockcavera is now known as Guest3240
12:58:40*Guest3240 quit (Killed (tungsten.libera.chat (Nickname regained by services)))
12:58:40*tiorock is now known as rockcavera
13:37:08FromDiscord<pmunch> I believe that should be fixed, yes
13:47:00*MauGal joined #nim
13:57:54*ntat joined #nim
15:26:58*ntat quit (Quit: Leaving)
15:30:29*beholders_eye quit (Quit: WeeChat 4.5.1)
15:30:47*beholders_eye joined #nim
15:48:05*MauGal quit (Ping timeout: 248 seconds)
15:59:52*MauGal joined #nim
16:30:45*ehmry joined #nim
16:48:12*MauGal quit (Ping timeout: 246 seconds)
16:57:55*tiorock joined #nim
16:57:55*tiorock quit (Changing host)
16:57:55*tiorock joined #nim
16:57:55*rockcavera quit (Killed (copper.libera.chat (Nickname regained by services)))
16:57:55*tiorock is now known as rockcavera
17:00:02*tiorock joined #nim
17:00:02*tiorock quit (Changing host)
17:00:02*tiorock joined #nim
17:00:02*rockcavera is now known as Guest9791
17:00:02*Guest9791 quit (Killed (silver.libera.chat (Nickname regained by services)))
17:00:02*tiorock is now known as rockcavera
17:41:20*beholders_eye quit (Ping timeout: 260 seconds)
17:48:49FromDiscord<jseb> i hope i don't have missed in in the newbie manual, but is it possible to compile modules only, with nim, and not compile everything each time ? (like .c.o rules in makefile for C)
17:57:19FromDiscord<jseb> ah but nim seems smart and doesn't recompile module already compiled, nice
18:05:31*coldfeet joined #nim
18:15:00*MauGal joined #nim
18:21:00*coldfeet quit (Quit: Lost terminal)
18:22:24*tiorock joined #nim
18:22:24*tiorock quit (Changing host)
18:22:24*tiorock joined #nim
18:22:24*rockcavera quit (Killed (erbium.libera.chat (Nickname regained by services)))
18:22:24*tiorock is now known as rockcavera
18:24:32*tiorock joined #nim
18:24:32*tiorock quit (Changing host)
18:24:32*tiorock joined #nim
18:24:32*rockcavera is now known as Guest4065
18:24:32*tiorock is now known as rockcavera
18:27:25*Guest4065 quit (Ping timeout: 260 seconds)
18:29:38*ntat joined #nim
18:50:00*beholders_eye joined #nim
18:58:03*MauGal quit (Ping timeout: 246 seconds)
19:12:04*rockcavera quit (Remote host closed the connection)
19:39:12FromDiscord<nervecenter> In reply to @jseb "ah but nim seems": Yes, and the big project being worked on right now, NIFC, will support incremental compilation for things like REPL support and possibly even hotloading someday.
19:42:00*jjido joined #nim
19:53:06FromDiscord<aintea> With all the new features announced it seems like Nim 2 was only the warm up
19:57:48FromDiscord<Elegantbeef> I do have to say with a bit of tinkering you can get hot code reloading now @nervecenter https://github.com/beef331/potato
19:58:56FromDiscord<Elegantbeef> https://streamable.com/0m89k3 it totes mcgoats works
20:00:02FromDiscord<nervecenter> In reply to @Elegantbeef "https://streamable.com/0m89k3 it totes mcgoats": Hey neat!
20:07:09FromDiscord<Robyn [She/Her]> In reply to @aintea "With all the new": I'm looking forward to built-in cps ngl
20:07:33FromDiscord<Robyn [She/Her]> means that hopefully nimsuggest won't crash and die with complex macros
20:08:35FromDiscord<Elegantbeef> Well the fact everything will be query based solves that CPS doesn't do much in that department
20:12:21FromDiscord<Robyn [She/Her]> In reply to @Elegantbeef "Well the fact everything": ah fair enough
20:12:41FromDiscord<Robyn [She/Her]> yeah idk what i was thinking
20:12:47FromDiscord<Robyn [She/Her]> still, built-in cps would be hella nice
20:15:12FromDiscord<that_dude.> I looked at CPS once and to me it just looked like fancy gotos. What makes them so interesting/special
20:15:18FromDiscord<that_dude.> (edit) "interesting/special" => "interesting/special?"
20:16:34*Lord_Nightmare joined #nim
20:36:54FromDiscord<fabric.input_output> userspace implementation of iterators, coroutines and exceptions
20:37:06FromDiscord<fabric.input_output> in a more concise way that gotos
20:38:59FromDiscord<Elegantbeef> Not to mention it gives you colorless functions
21:06:21FromDiscord<aintea> In reply to @battery.acid.bubblegum "I'm looking forward to": What's that
21:14:12*strogon14 quit (Remote host closed the connection)
21:15:27*beholders_eye quit (Ping timeout: 252 seconds)
21:17:13*strogon14 joined #nim
21:20:33*ursa-major quit (*.net *.split)
21:20:34*acidsys quit (*.net *.split)
21:20:36*Amun-Ra quit (*.net *.split)
21:21:01*ursa-major joined #nim
21:21:01*acidsys joined #nim
21:21:01*Amun-Ra joined #nim
21:22:09*ursa-major quit (Max SendQ exceeded)
21:25:24*ursa-major joined #nim
21:27:58FromDiscord<fabric.input_output> continuation passing style
21:32:24*beholders_eye joined #nim
21:54:23FromDiscord<aintea> no idea what that is
22:07:08*ntat quit (Quit: Leaving)
23:49:04*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)