00:22:40 | NimEventer | New 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:11 | arkanoid | how 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:36 | FromDiscord | <Yardanico> Yeah, 100 req/s is really low |
01:56:42 | FromDiscord | <Yardanico> for generating uuids I mean |
01:57:01 | FromDiscord | <Yardanico> What library specifically you're using arkanoid ? |
02:16:27 | arkanoid | Yardanico, I've not yet picked any. I was just asking if uuid can be the right tools for that job |
02:16:47 | arkanoid | I need an unique identifier for each incoming request to propagate it in logging and other stuff |
02:16:55 | FromDiscord | <Yardanico> It's just random number generation after all, it's fast |
02:17:10 | arkanoid | ok |
02:18:55 | arkanoid | thanks :) |
02:37:54 | * | TakinOver joined #nim |
02:59:10 | NimEventer | New 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:20 | FromDiscord | <Z3NTL3> does the IRC also include push messages when forum topics gets creatd |
09:25:31 | FromDiscord | <Z3NTL3> (edit) "messages" => "notifications" |
09:25:36 | FromDiscord | <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:19 | NimEventer | New thread by ck: Compiler limitation or wrong usage/expectation on my part?, see https://forum.nim-lang.org/t/10139 |
11:15:40 | FromDiscord | <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:59 | FromDiscord | <Z3NTL3> in some cases one another can be more handier compared to the other |
11:26:33 | FromDiscord | <Z3NTL3> sent a code paste, see https://paste.rs/Uht |
11:27:14 | FromDiscord | <Z3NTL3> sent a code paste, see https://play.nim-lang.org/#ix= |
11:27:16 | FromDiscord | <Z3NTL3> thats the only different |
11:28:53 | FromDiscord | <Z3NTL3> In reply to @Z3NTL3 "if you use &"{}"or": but as shown there is an way to achieve the escape either |
11:29:10 | FromDiscord | <Z3NTL3> (edit) "either" => "even with fmt or &" |
11:29:25 | FromDiscord | <Z3NTL3> so thats the only diff and user prefference |
11:45:07 | FromDiscord | <Rika> & escapes |
11:45:44 | FromDiscord | <Rika> !eval import strformat; let a = "e"; echo &"e\ne{a}" |
11:45:46 | FromDiscord | <Rika> iirc |
11:46:44 | NimBot | Compile failed: <no output> |
11:46:53 | FromDiscord | <Z3NTL3> ahh i though &"" was a shorthand for fmt |
11:46:56 | FromDiscord | <Rika> it is |
11:47:02 | FromDiscord | <Rika> but it allows for escaping |
11:47:06 | FromDiscord | <Z3NTL3> how does it escape then bcs it doesnt escape |
11:47:23 | FromDiscord | <Rika> https://media.discordapp.net/attachments/371759389889003532/1101112354357379072/image.png |
11:48:00 | FromDiscord | <Z3NTL3> oh k |
11:50:15 | FromDiscord | <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:49 | NimEventer | New 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:09 | FromDiscord | <Ras> sent a code paste, see https://play.nim-lang.org/#ix=4uow |
13:47:44 | FromDiscord | <Yardanico> to truncate you can just use `setLen`, although this modifies the original |
13:48:08 | FromDiscord | <Yardanico> `myoldvar.setLen(56)` |
13:48:21 | FromDiscord | <Ras> that's fine, that's actually a better solution (i was reassigning the old value anyways) |
13:48:21 | FromDiscord | <Ras> thank you! |
13:48:34 | FromDiscord | <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:51 | FromDiscord | <Yardanico> hopefully it works even with this converter :P |
13:49:07 | FromDiscord | <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:14 | FromDiscord | <Yardanico> there's only a few cases where they're used in the stdlib i think |
13:49:21 | FromDiscord | <Ras> fair enough, i'll keep that in mind |
13:54:47 | * | rockcavera joined #nim |
14:07:37 | * | beholders_eye joined #nim |
14:25:56 | arkanoid | how can I get proper stacktraces when exception are raised with async? |
14:27:09 | FromDiscord | <kfdvh> how is term rewriting macro not documented |
14:27:13 | FromDiscord | <Yardanico> it is documented |
14:27:17 | FromDiscord | <Yardanico> check experimental manual |
14:27:24 | FromDiscord | <Yardanico> https://nim-lang.github.io/Nim/manual_experimental.html#term-rewriting-macros |
14:27:29 | FromDiscord | <Yardanico> oops, this one is devel docs |
14:27:31 | FromDiscord | <kfdvh> is there a way to search full Nim docs |
14:27:47 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual_experimental.html#term-rewriting-macros |
14:28:11 | FromDiscord | <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:30 | FromDiscord | <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:43 | arkanoid | Yardanico, I'm still on stable :-/ |
14:29:03 | FromDiscord | <Yardanico> i mean they didn't change much in latest devel |
14:30:04 | arkanoid | I'm thinking abount moving from async code to multithreading. The whole advantage of async is killed when debugging without stacktrace |
14:30:52 | FromDiscord | <Yardanico> eh, it is readable |
14:31:08 | FromDiscord | <Yardanico> you just ignore all the lines that point to stdlib code |
14:31:19 | FromDiscord | <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:29 | FromDiscord | <Yardanico> and then its really easy to spot the actual line in your code that the error is happening at |
14:51:52 | FromDiscord | <sOkam!> Is it possible to control the byte padding of objects or sequences in some way? |
14:52:46 | FromDiscord | <Yardanico> you mean alignment? |
14:52:46 | FromDiscord | <Yardanico> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-align-pragma |
14:53:23 | FromDiscord | <sOkam!> yep! seems like that's what I would need |
14:55:02 | FromDiscord | <sOkam!> is it possible to use this to alias existing types with alignment specifiers? |
14:55:27 | FromDiscord | <sOkam!> (edit) "is it possible to use this to alias existing types with ... alignmentproperty?" added "an added" | "specifiers?" => "property?" |
14:57:30 | FromDiscord | <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:32 | FromDiscord | <Yardanico> In reply to @sOkam! "oh wait, the alignment": what? |
14:59:45 | FromDiscord | <Yardanico> ah, you mean in the docs, yeah |
15:00:16 | FromDiscord | <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:39 | FromDiscord | <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:39 | FromDiscord | <sOkam!> is this usable for the contents of a `seq[SomeType]`? |
15:04:31 | arkanoid | Yardanico, no, it's not readeable, it does NOT contain usercode, just stdlib lines |
15:04:44 | FromDiscord | <Yardanico> are you absolutely sure? |
15:04:55 | FromDiscord | <Yardanico> maybe it did get improved in devel then, can you check with devel? |
15:05:11 | FromDiscord | <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:28 | FromDiscord | <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:04 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4uoM |
15:22:13 | FromDiscord | <sOkam!> (edit) "https://play.nim-lang.org/#ix=4uoM" => "https://play.nim-lang.org/#ix=4uoN" |
15:22:40 | arkanoid | Ras, which case? the one exposed by yardanico, or mine? |
15:22:54 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4uoO |
15:22:59 | arkanoid | can you share a feedback async in stable vs devel? |
15:25:11 | FromDiscord | <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:17 | FromDiscord | <Yardanico> so i can't :P |
15:27:30 | * | pharonix71 joined #nim |
15:39:41 | FromDiscord | <Ras> arkanoid: sorry, meant Yardanico's |
15:40:05 | FromDiscord | <Ras> i've always had user code in exception messages |
15:40:55 | FromDiscord | <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:16 | FromDiscord | <Entikan> how do I check if an array has values assigned? |
17:44:48 | FromDiscord | <Yardanico> In reply to @Entikan "how do I check": as in? |
17:45:09 | FromDiscord | <Yardanico> if you just created an array without changing the values, it'll have whatever is the default value for the type |
17:45:18 | FromDiscord | <Yardanico> for non-ref types that's the zeroed data of the type, for ref that's nil |
17:45:46 | FromDiscord | <Yardanico> since arrays are initialized on declaration there's no way to tell if they were changed or not |
17:49:45 | FromDiscord | <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:32 | FromDiscord | <willyboar> Is there a way to get nimble pkg path? |
20:00:38 | FromDiscord | <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:05 | FromDiscord | <Elegantbeef> At compile time or runtime? |
20:15:15 | FromDiscord | <willyboar> can i have both? |
20:16:25 | FromDiscord | <willyboar> basically i want my app to copy a templates folder from it |
20:17:06 | * | hochata joined #nim |
20:17:24 | FromDiscord | <Elegantbeef> It doesnt seem that nimble has a command to show where it's installed |
20:17:24 | FromDiscord | <Elegantbeef> `which nimble` and `where nimble` might be usable to do this though that uses the shell of course |
20:17:48 | FromDiscord | <willyboar> 😦 |
20:17:56 | FromDiscord | <Elegantbeef> Though i assume installing using the system package manager means nimble installs in the wrong spot |
20:18:13 | FromDiscord | <Elegantbeef> The silliest way would be to do `nimble install somepackage` then `nimble path somepackage` |
20:20:18 | FromDiscord | <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:20 | FromDiscord | <Elegantbeef> For the picostdlib tool I did this https://github.com/EmbeddedNim/picostdlib/blob/master/src/piconim.nim#L229-L245 |
20:20:47 | FromDiscord | <Elegantbeef> Of course |
20:25:01 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/btZ |
20:25:18 | FromDiscord | <Elegantbeef> Aside from that I do not know a way to get the Nimble paths across the board |
20:25:51 | FromDiscord | <Elegantbeef> By default it installs in `~/.nimble` though one can override with the `NIMBLE_DIR` env var |
20:26:56 | FromDiscord | <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:44 | FromDiscord | <michaelb.eth> https://github.com/nim-lang/Nim/issues/21730 |
20:29:27 | FromDiscord | <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:04 | FromDiscord | <willyboar> `getAppDir()` did the job |
20:37:26 | FromDiscord | <willyboar> thanks beef |
20:37:31 | FromDiscord | <Elegantbeef> No problem |
20:37:59 | FromDiscord | <Elegantbeef> That only works for hybrid packages though I believe |
20:39:15 | FromDiscord | <willyboar> maybe but i guess is a nice start for prototyping |
20:57:42 | * | lucasta quit (Read error: Connection reset by peer) |
21:14:16 | FromDiscord | <BobBBob> sent a code paste, see https://play.nim-lang.org/#ix=4uq6 |
21:24:25 | FromDiscord | <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:14 | FromDiscord | <BobBBob> im wondering why accessing z in the second one isn't a side effect |
21:27:17 | FromDiscord | <Elegantbeef> It's not a global variable |
21:28:58 | FromDiscord | <BobBBob> hm I figured func wouldnt be able to access anything outside it |
21:29:00 | FromDiscord | <BobBBob> guess not |
21:29:20 | FromDiscord | <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:32 | FromDiscord | <Elegantbeef> Which means all calls to `addNum` generate the same result |
21:29:49 | FromDiscord | <BobBBob> 👀 |
21:30:44 | FromDiscord | <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:28 | FromDiscord | <Nlits (Ping on reply)> Should I use jwt instead of encrypted json for session cookies? |
22:05:39 | FromDiscord | <Nlits (Ping on reply)> Thinking of switching to https://nimble.directory/pkg/jwtea |
22:09:20 | FromDiscord | <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:21 | FromDiscord | <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:25 | FromDiscord | <spikeisaac> Just curious, in the future will there be more backends for nim? |
23:48:31 | * | hochata quit (Ping timeout: 240 seconds) |
23:54:40 | FromDiscord | <michaelb.eth> In reply to @spikeisaac "Just curious, in the": do you have any in mind? |