<< 27-04-2023 >>

00:22:40NimEventerNew thread by AmjadBHD: Why is this `cursor` causing error ?, see https://forum.nim-lang.org/t/10138
00:32:12*rockcavera quit (Read error: Connection reset by peer)
00:32:32*rockcavera joined #nim
00:32:32*rockcavera quit (Changing host)
00:32:32*rockcavera joined #nim
01:28:11arkanoidhow fast is uuid generation in Nim/C ? can this be considered as a valid identifier for requests to be handled by a single (async) thread handling 100 req/s ?
01:37:29*krux02 quit (Remote host closed the connection)
01:56:36FromDiscord<Yardanico> Yeah, 100 req/s is really low
01:56:42FromDiscord<Yardanico> for generating uuids I mean
01:57:01FromDiscord<Yardanico> What library specifically you're using arkanoid ?
02:16:27arkanoidYardanico, I've not yet picked any. I was just asking if uuid can be the right tools for that job
02:16:47arkanoidI need an unique identifier for each incoming request to propagate it in logging and other stuff
02:16:55FromDiscord<Yardanico> It's just random number generation after all, it's fast
02:17:10arkanoidok
02:18:55arkanoidthanks :)
02:37:54*TakinOver joined #nim
02:59:10NimEventerNew Nimble package! nimwkhtmltox - Nim bindings for wkhtmltox, see https://github.com/neroist/nim-wkhtmltox
03:35:00*arkurious quit (Quit: Leaving)
03:36:50*TakinOver quit (Ping timeout: 260 seconds)
03:38:29*dv^_^ quit (Remote host closed the connection)
04:27:37*lucasta quit (Remote host closed the connection)
04:48:44*rockcavera quit (Remote host closed the connection)
05:48:23*Goodbye_Vincent quit (Quit: Ping timeout (120 seconds))
05:48:56*cm quit (Ping timeout: 257 seconds)
05:50:35*cm joined #nim
07:15:59*kenran joined #nim
07:16:12*kenran quit (Remote host closed the connection)
07:44:05*ltriant_ quit (Ping timeout: 246 seconds)
09:13:55*Notxor joined #nim
09:25:20FromDiscord<Z3NTL3> does the IRC also include push messages when forum topics gets creatd
09:25:31FromDiscord<Z3NTL3> (edit) "messages" => "notifications"
09:25:36FromDiscord<Z3NTL3> (edit) "creatd" => "created"
09:37:56*ltriant joined #nim
09:44:52*randomuser464876 joined #nim
09:51:31*cnx quit (Remote host closed the connection)
09:52:19*cnx joined #nim
10:03:19NimEventerNew thread by ck: Compiler limitation or wrong usage/expectation on my part?, see https://forum.nim-lang.org/t/10139
11:15:40FromDiscord<firasuke> is it better/preferred to concatenate two strings using `&` as in `stringOne & ' ' & stringTwo`, or to format the strings using `&` from `strformat` as in `&"{stringOne} {stringTwo}"`?
11:23:59FromDiscord<Z3NTL3> in some cases one another can be more handier compared to the other
11:26:33FromDiscord<Z3NTL3> sent a code paste, see https://paste.rs/Uht
11:27:14FromDiscord<Z3NTL3> sent a code paste, see https://play.nim-lang.org/#ix=
11:27:16FromDiscord<Z3NTL3> thats the only different
11:28:53FromDiscord<Z3NTL3> In reply to @Z3NTL3 "if you use &"{}"or": but as shown there is an way to achieve the escape either
11:29:10FromDiscord<Z3NTL3> (edit) "either" => "even with fmt or &"
11:29:25FromDiscord<Z3NTL3> so thats the only diff and user prefference
11:45:07FromDiscord<Rika> & escapes
11:45:44FromDiscord<Rika> !eval import strformat; let a = "e"; echo &"e\ne{a}"
11:45:46FromDiscord<Rika> iirc
11:46:44NimBotCompile failed: <no output>
11:46:53FromDiscord<Z3NTL3> ahh i though &"" was a shorthand for fmt
11:46:56FromDiscord<Rika> it is
11:47:02FromDiscord<Rika> but it allows for escaping
11:47:06FromDiscord<Z3NTL3> how does it escape then bcs it doesnt escape
11:47:23FromDiscord<Rika> https://media.discordapp.net/attachments/371759389889003532/1101112354357379072/image.png
11:48:00FromDiscord<Z3NTL3> oh k
11:50:15FromDiscord<Z3NTL3> oh i see its only for fmt what ive said https://media.discordapp.net/attachments/371759389889003532/1101113072174776330/image.png
12:33:44*xet7 joined #nim
12:41:49NimEventerNew post on r/nim by psx8888: Has anyone got ssh working in nim under Windows and how did you do it?, see https://reddit.com/r/nim/comments/130kwh5/has_anyone_got_ssh_working_in_nim_under_windows/
12:47:41*jmdaemon quit (Ping timeout: 256 seconds)
13:16:18*Notxor quit (Remote host closed the connection)
13:18:10*Notxor joined #nim
13:37:13*progranner joined #nim
13:42:05*xet7 quit (Ping timeout: 240 seconds)
13:47:09FromDiscord<Ras> sent a code paste, see https://play.nim-lang.org/#ix=4uow
13:47:44FromDiscord<Yardanico> to truncate you can just use `setLen`, although this modifies the original
13:48:08FromDiscord<Yardanico> `myoldvar.setLen(56)`
13:48:21FromDiscord<Ras> that's fine, that's actually a better solution (i was reassigning the old value anyways)
13:48:21FromDiscord<Ras> thank you!
13:48:34FromDiscord<Yardanico> https://nim-lang.org/docs/system.html#setLen%2Cstring%2CNatural https://nim-lang.org/docs/system.html#setLen%2Cseq%5BT%5D%2CNatural for both overloads
13:48:51FromDiscord<Yardanico> hopefully it works even with this converter :P
13:49:07FromDiscord<Yardanico> it's just that generally converters can lead to weird issues like that, that's why they're mostly avoided in Nim
13:49:14FromDiscord<Yardanico> there's only a few cases where they're used in the stdlib i think
13:49:21FromDiscord<Ras> fair enough, i'll keep that in mind
13:54:47*rockcavera joined #nim
14:07:37*beholders_eye joined #nim
14:25:56arkanoidhow can I get proper stacktraces when exception are raised with async?
14:27:09FromDiscord<kfdvh> how is term rewriting macro not documented
14:27:13FromDiscord<Yardanico> it is documented
14:27:17FromDiscord<Yardanico> check experimental manual
14:27:24FromDiscord<Yardanico> https://nim-lang.github.io/Nim/manual_experimental.html#term-rewriting-macros
14:27:29FromDiscord<Yardanico> oops, this one is devel docs
14:27:31FromDiscord<kfdvh> is there a way to search full Nim docs
14:27:47FromDiscord<Yardanico> https://nim-lang.org/docs/manual_experimental.html#term-rewriting-macros
14:28:11FromDiscord<Yardanico> In reply to @arkanoid "how can I get": there's no way to get them better than they are currently, even the current async tracebacks are much better than in the past
14:28:30FromDiscord<Yardanico> its due to the way how async generally works in nim, but you're free to try to improve all the async traceback handling :)
14:28:43arkanoidYardanico, I'm still on stable :-/
14:29:03FromDiscord<Yardanico> i mean they didn't change much in latest devel
14:30:04arkanoidI'm thinking abount moving from async code to multithreading. The whole advantage of async is killed when debugging without stacktrace
14:30:52FromDiscord<Yardanico> eh, it is readable
14:31:08FromDiscord<Yardanico> you just ignore all the lines that point to stdlib code
14:31:19FromDiscord<Yardanico> and then there's a line that points to the start of the execution of your async proc, you ignore it too
14:31:29FromDiscord<Yardanico> and then its really easy to spot the actual line in your code that the error is happening at
14:51:52FromDiscord<sOkam!> Is it possible to control the byte padding of objects or sequences in some way?
14:52:46FromDiscord<Yardanico> you mean alignment?
14:52:46FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-align-pragma
14:53:23FromDiscord<sOkam!> yep! seems like that's what I would need
14:55:02FromDiscord<sOkam!> is it possible to use this to alias existing types with alignment specifiers?
14:55:27FromDiscord<sOkam!> (edit) "is it possible to use this to alias existing types with ... alignmentproperty?" added "an added" | "specifiers?" => "property?"
14:57:30FromDiscord<sOkam!> oh wait, the alignment pragma is for variables, not for types 🤔
14:58:43*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
14:59:32FromDiscord<Yardanico> In reply to @sOkam! "oh wait, the alignment": what?
14:59:45FromDiscord<Yardanico> ah, you mean in the docs, yeah
15:00:16FromDiscord<sOkam!> basically, i have some vector types from vmath, and i want to use them aligned to 4, because the API requires that
15:00:39FromDiscord<sOkam!> so i was thinking that i would need new types, but it doesn't affect types it affects variables, which is a big difference
15:03:22*progranner joined #nim
15:03:39FromDiscord<sOkam!> is this usable for the contents of a `seq[SomeType]`?
15:04:31arkanoidYardanico, no, it's not readeable, it does NOT contain usercode, just stdlib lines
15:04:44FromDiscord<Yardanico> are you absolutely sure?
15:04:55FromDiscord<Yardanico> maybe it did get improved in devel then, can you check with devel?
15:05:11FromDiscord<Yardanico> I don't think I've met a case where there are NO lines in usercode unless the root cause is actually a crash in the stdlib
15:07:01*progranner quit (Client Quit)
15:07:28FromDiscord<Ras> as someone who's developing on `#devel` and doing a lot of async, i've found this to be the case too
15:21:04FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4uoM
15:22:13FromDiscord<sOkam!> (edit) "https://play.nim-lang.org/#ix=4uoM" => "https://play.nim-lang.org/#ix=4uoN"
15:22:40arkanoidRas, which case? the one exposed by yardanico, or mine?
15:22:54FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4uoO
15:22:59arkanoidcan you share a feedback async in stable vs devel?
15:25:11FromDiscord<Yardanico> i really don't use stable versions, so I was on something close to 1.6.x probably years ago when it was devel
15:25:17FromDiscord<Yardanico> so i can't :P
15:27:30*pharonix71 joined #nim
15:39:41FromDiscord<Ras> arkanoid: sorry, meant Yardanico's
15:40:05FromDiscord<Ras> i've always had user code in exception messages
15:40:55FromDiscord<Ras> sometimes it's been.. cryptic at best, but it's at least shown me where to look
16:09:56*progranner joined #nim
16:11:44*progranner quit (Client Quit)
16:25:07*arkurious joined #nim
16:44:51*dv^_^ joined #nim
16:48:11*progranner joined #nim
17:12:09*lucasta joined #nim
17:27:38*xet7 joined #nim
17:41:56*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
17:43:11*progranner joined #nim
17:44:16FromDiscord<Entikan> how do I check if an array has values assigned?
17:44:48FromDiscord<Yardanico> In reply to @Entikan "how do I check": as in?
17:45:09FromDiscord<Yardanico> if you just created an array without changing the values, it'll have whatever is the default value for the type
17:45:18FromDiscord<Yardanico> for non-ref types that's the zeroed data of the type, for ref that's nil
17:45:46FromDiscord<Yardanico> since arrays are initialized on declaration there's no way to tell if they were changed or not
17:49:45FromDiscord<Entikan> ah that makes sense, thanks!
18:47:27*krux02 joined #nim
19:02:58*Mister_Magister quit (Excess Flood)
19:03:23*Mister_Magister joined #nim
19:10:05*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
19:11:36*progranner joined #nim
19:26:10*junaid_ joined #nim
19:51:49*junaid_ quit (Remote host closed the connection)
19:56:32*pharonix71 quit (Remote host closed the connection)
19:57:17*pharonix71 joined #nim
19:59:32FromDiscord<willyboar> Is there a way to get nimble pkg path?
20:00:38FromDiscord<willyboar> Not mine especially. I mean dynamically.
20:04:13*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
20:05:23*progranner joined #nim
20:06:13*randomuser464876 quit (Quit: Client closed)
20:14:05FromDiscord<Elegantbeef> At compile time or runtime?
20:15:15FromDiscord<willyboar> can i have both?
20:16:25FromDiscord<willyboar> basically i want my app to copy a templates folder from it
20:17:06*hochata joined #nim
20:17:24FromDiscord<Elegantbeef> It doesnt seem that nimble has a command to show where it's installed
20:17:24FromDiscord<Elegantbeef> `which nimble` and `where nimble` might be usable to do this though that uses the shell of course
20:17:48FromDiscord<willyboar> 😦
20:17:56FromDiscord<Elegantbeef> Though i assume installing using the system package manager means nimble installs in the wrong spot
20:18:13FromDiscord<Elegantbeef> The silliest way would be to do `nimble install somepackage` then `nimble path somepackage`
20:20:18FromDiscord<willyboar> I don't want to find the path for me. I know the exactly path. But if you use my app the path would be different.
20:20:20FromDiscord<Elegantbeef> For the picostdlib tool I did this https://github.com/EmbeddedNim/picostdlib/blob/master/src/piconim.nim#L229-L245
20:20:47FromDiscord<Elegantbeef> Of course
20:25:01FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/btZ
20:25:18FromDiscord<Elegantbeef> Aside from that I do not know a way to get the Nimble paths across the board
20:25:51FromDiscord<Elegantbeef> By default it installs in `~/.nimble` though one can override with the `NIMBLE_DIR` env var
20:26:56FromDiscord<michaelb.eth> In reply to @Elegantbeef "By default it installs": note that the NIMBLE_DIR override is currently broken on Windows with Nim 2.0 RCs and devel
20:27:44FromDiscord<michaelb.eth> https://github.com/nim-lang/Nim/issues/21730
20:29:27FromDiscord<Elegantbeef> Good thing only silly people use windows 😉
20:30:39*jmdaemon joined #nim
20:35:45*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
20:36:11*progranner joined #nim
20:37:04FromDiscord<willyboar> `getAppDir()` did the job
20:37:26FromDiscord<willyboar> thanks beef
20:37:31FromDiscord<Elegantbeef> No problem
20:37:59FromDiscord<Elegantbeef> That only works for hybrid packages though I believe
20:39:15FromDiscord<willyboar> maybe but i guess is a nice start for prototyping
20:57:42*lucasta quit (Read error: Connection reset by peer)
21:14:16FromDiscord<BobBBob> sent a code paste, see https://play.nim-lang.org/#ix=4uq6
21:24:25FromDiscord<Elegantbeef> accessing a global variable is considered a side effect
21:25:43*progranner quit (Quit: My Mac has gone to sleep. ZZZzzz…)
21:26:14FromDiscord<BobBBob> im wondering why accessing z in the second one isn't a side effect
21:27:17FromDiscord<Elegantbeef> It's not a global variable
21:28:58FromDiscord<BobBBob> hm I figured func wouldnt be able to access anything outside it
21:29:00FromDiscord<BobBBob> guess not
21:29:20FromDiscord<Elegantbeef> I mean if you think about it it's a func inside a func which means that `z` is derived from no side effect code
21:29:32FromDiscord<Elegantbeef> Which means all calls to `addNum` generate the same result
21:29:49FromDiscord<BobBBob> 👀
21:30:44FromDiscord<Elegantbeef> Just do not change it to `proc add2` and check my reasoning
21:46:39*Notxor quit (Remote host closed the connection)
21:59:23*rockcavera quit (Read error: Connection reset by peer)
22:00:23*rockcavera joined #nim
22:00:23*rockcavera quit (Changing host)
22:00:23*rockcavera joined #nim
22:05:28FromDiscord<Nlits (Ping on reply)> Should I use jwt instead of encrypted json for session cookies?
22:05:39FromDiscord<Nlits (Ping on reply)> Thinking of switching to https://nimble.directory/pkg/jwtea
22:09:20FromDiscord<Nlits (Ping on reply)> or should i do both and encrypt the jwt result
22:42:08*xet7 quit (Remote host closed the connection)
22:55:21FromDiscord<Dudugz> Why? If you're talking about your site why is the session data stored on the client? They should be stored on the server(backend) if they are that important. In nodejs I usually use express-session to manage the session.
23:02:40*krux02 quit (Remote host closed the connection)
23:43:25FromDiscord<spikeisaac> Just curious, in the future will there be more backends for nim?
23:48:31*hochata quit (Ping timeout: 240 seconds)
23:54:40FromDiscord<michaelb.eth> In reply to @spikeisaac "Just curious, in the": do you have any in mind?