| 00:04:13 | FromDiscord | <sirolaf> Also got `x = newSeq(1)` working now, should make why I want it more obvious |
| 01:06:45 | FromDiscord | <konsumlamm> if i do `s.setLen(0)`, does that deallocate the seq, or is it kept around? |
| 01:06:57 | FromDiscord | <Elegantbeef> It keeps it around |
| 01:07:13 | FromDiscord | <konsumlamm> ok, thx |
| 01:07:38 | FromDiscord | <konsumlamm> sometimes i wonder if you do other things besides being in this channel xd |
| 01:07:53 | FromDiscord | <Elegantbeef> Hey I rewrote my atlasser today |
| 01:07:58 | FromDiscord | <Elegantbeef> But no I do not |
| 02:11:23 | * | rockcavera quit (Remote host closed the connection) |
| 02:44:48 | FromDiscord | <xtrayambak> In reply to @PMunch "Well someone didn't read": Shhhh. I wrote that at 11:00 PM, don't let anyone know. :') |
| 02:46:10 | FromDiscord | <xtrayambak> Plus the mersenne twister backend isn't even done yet, it's kinda there as is because I gave up in the night trying to fix the wonky typecasting. |
| 02:46:20 | FromDiscord | <xtrayambak> That's the problem with RNG algorithms to be fair |
| 02:46:34 | FromDiscord | <xtrayambak> or PRNG I should say |
| 02:47:06 | NimEventer | New question by Emilia Qtless: Send file in HappyX, see https://stackoverflow.com/questions/76746478/send-file-in-happyx |
| 02:47:20 | FromDiscord | <xtrayambak> I'll probably add a hardware based RNG generator too which is "true" RNG as far as the OS isn't just using the clock time |
| 03:04:38 | * | lucasta quit (Quit: Leaving) |
| 04:03:38 | * | azimut quit (Ping timeout: 240 seconds) |
| 06:40:31 | FromDiscord | <demotomohiro> sent a long message, see http://ix.io/4BfN |
| 06:42:10 | FromDiscord | <demotomohiro> In reply to @xtrayambak "I'll probably add a": Nim already has hardware based RNG. |
| 06:45:53 | * | junaid_ joined #nim |
| 06:48:13 | FromDiscord | <demotomohiro> And hardware based RNG is slower than PRNG. |
| 06:57:51 | FromDiscord | <demotomohiro> https://github.com/xTrayambak/librng/blob/main/src/librng.nim#L68↵https://github.com/nim-lang/Nim/pull/18744↵It uses time as seed.↵Nim's std/random initialize PRNG in the better way. |
| 06:58:50 | FromDiscord | <uninnocent> My program doesn't compile unless I import puppy |
| 06:58:53 | FromDiscord | <uninnocent> But it doesnt use puppy |
| 06:59:10 | FromDiscord | <Elegantbeef> What happens if you compile without it? |
| 06:59:29 | FromDiscord | <uninnocent> In reply to @Elegantbeef "What happens if you": Im using strenc |
| 06:59:30 | FromDiscord | <uninnocent> 1 sec |
| 07:00:00 | FromDiscord | <uninnocent> https://media.discordapp.net/attachments/371759389889003532/1132567777186676756/image.png |
| 07:00:01 | FromDiscord | <uninnocent> This is with |
| 07:00:30 | FromDiscord | <uninnocent> https://media.discordapp.net/attachments/371759389889003532/1132567901979811881/image.png |
| 07:00:31 | FromDiscord | <uninnocent> this is without |
| 07:00:45 | FromDiscord | <uninnocent> Deleting nimcache didnt fix it |
| 07:01:02 | FromDiscord | <Elegantbeef> throw a `-f` in your build flags |
| 07:01:34 | * | ntat joined #nim |
| 07:02:04 | FromDiscord | <uninnocent> Oh wait, I was mispelling release |
| 07:02:11 | FromDiscord | <Elegantbeef> Though you're clearly writing malware, so uhhh overthere |
| 07:02:16 | FromDiscord | <uninnocent> If I add -d:release it compiles no issues |
| 07:09:42 | FromDiscord | <odexine> If you’re thinking strenc would make it harder to decypher your malware then... |
| 07:12:33 | FromDiscord | <uninnocent> In reply to @odexine "If you’re thinking strenc": I don't |
| 07:13:34 | FromDiscord | <uninnocent> My program checks if a certian string is present in certain files, and strenc makes sure my program won't accidentally do something to itself |
| 07:13:47 | FromDiscord | <uninnocent> Also, it protects against script kiddies somewhat |
| 07:14:03 | FromDiscord | <uninnocent> (edit) "do something to" => "find that string in" |
| 07:15:15 | FromDiscord | <terrygillis> quick question how do you add the theta sign (in O log n) to be rendered by nim docs in docs comments? |
| 07:35:23 | FromDiscord | <demotomohiro> https://en.wiktionary.org/wiki/%CE%B8↵Copy 'θ' and paste it to your docs comment? |
| 07:38:34 | FromDiscord | <xtrayambak> In reply to @demotomohiro "Nim already has hardware": osrand? |
| 07:38:48 | FromDiscord | <xtrayambak> I don't use mersenne twister by default |
| 07:39:26 | FromDiscord | <demotomohiro> In reply to @xtrayambak "osrand?": https://nim-lang.org/docs/sysrand.html |
| 07:41:36 | FromDiscord | <xtrayambak> librng implements mersenne twister, xoroshiro128, lehmer64, marsaglia 69069 and LCG as of right now, but I hope to add more algorithms for niche use cases |
| 07:54:09 | FromDiscord | <terrygillis> just asking because it seems hacky 😄 |
| 08:01:48 | FromDiscord | <Elegantbeef> Alternatively terry gillis you can learn the unicode input for your OS |
| 08:03:13 | FromDiscord | <Elegantbeef> Like on X11 it's ctrl + shift + u then type 03b8 and bam unicode theta |
| 09:03:29 | FromDiscord | <bung8954> sent a code paste, see https://play.nim-lang.org/#ix=4Bg9 |
| 10:32:08 | NimEventer | New thread by Mark_Howser: Some of Nim's convention needs to change in order for it to succeed, see https://forum.nim-lang.org/t/10349 |
| 10:34:28 | FromDiscord | <odexine> haha |
| 10:34:29 | FromDiscord | <odexine> sure |
| 10:36:33 | FromDiscord | <arathanis> that has to be bairt |
| 10:36:35 | FromDiscord | <arathanis> (edit) "bairt" => "bait" |
| 10:40:00 | FromDiscord | <demotomohiro> In reply to @bung8954 "https://github.com/bung87/crowngui/blob/ce5d7b8a536": Is `msg.lParam` == `cast[LPARAM](cb.rawProc)`? |
| 10:42:05 | FromDiscord | <bung8954> I think so |
| 10:45:38 | * | junaid_ quit (Quit: leaving) |
| 10:50:54 | * | azimut joined #nim |
| 10:55:56 | FromDiscord | <demotomohiro> In reply to @bung8954 "https://github.com/bung87/crowngui/blob/ce5d7b8a536": Then, `cb`'s calling convention is not stdcall. But you cast it to a procedure with stdcall calling convention.↵Is it safe?↵https://en.wikipedia.org/wiki/Calling_convention |
| 10:59:02 | FromDiscord | <bung8954> why is that , cb is closure cb.rawProc is stdcall, right ? |
| 11:02:11 | FromDiscord | <demotomohiro> Nim's stdlibs document doesn't tell it is stdcall:↵https://nim-lang.org/docs/system.html#rawProc%2CT |
| 11:05:06 | FromDiscord | <demotomohiro> sent a long message, see http://ix.io/4BgM |
| 11:06:48 | FromDiscord | <summarity> hmm, a recent version of Nim 2 is suddenly nil-ing ref objects (a waterpark Pool containing database handles passed to a thread, after a random amount of time the handles disappear). Trying to bisect when this happened (somewhere between 1c7fd717206c79be400f81a05eee771823b880ca and the current commit on the 2-0 branch. |
| 11:09:41 | FromDiscord | <bung8954> In reply to @demotomohiro "> closure is the": you mean I should pass `rawEnv` too ? I thought it acess inside that rawProc |
| 11:17:43 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4BgP |
| 11:24:26 | FromDiscord | <bung8954> yeah, you're right, should cast to proc takes env as first argument |
| 11:24:59 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4BgT |
| 11:33:07 | FromDiscord | <bung8954> thanks ! my callback successfuly invoked |
| 12:10:20 | * | jmdaemon quit (Ping timeout: 246 seconds) |
| 13:30:09 | * | zaher joined #nim |
| 13:34:41 | * | zaher left #nim (#nim) |
| 13:59:01 | FromDiscord | <konsumlamm> is there some easy way to measure allocations of a nim program? |
| 14:00:30 | FromDiscord | <Andreas> In reply to @konsumlamm "is there some easy": on macOS i use `leaks`, i'm sure linux has other/more tools.. |
| 16:04:37 | FromDiscord | <voidwalker> anyone have experience building anything with maps/routes/routing in nim ? |
| 16:05:49 | FromDiscord | <voidwalker> geographical routes, not web routes : P |
| 16:31:03 | * | junaid_ joined #nim |
| 16:58:47 | * | junaid_ quit (Remote host closed the connection) |
| 17:04:14 | * | syl quit (Quit: C-x C-c) |
| 17:05:05 | * | syl joined #nim |
| 17:47:41 | FromDiscord | <huantian> I don’t know if many Nim users go outside 🙃 |
| 18:41:47 | NimEventer | New thread by khaledh-nim: Nim grammar top-level stmt vs complexOrSimpleStmt, see https://forum.nim-lang.org/t/10350 |
| 18:46:30 | FromDiscord | <Chronos [She/Her]> How should I structure my code for a programming language? Should it be 1 lexer per file or 1 lexer for all of the scanned files? |
| 18:55:38 | FromDiscord | <haywiressc> Can nim be used with c without bindings |
| 19:13:03 | FromDiscord | <michaelb.eth> In reply to @haywiressc "Can nim be used": Wdym? |
| 19:15:23 | FromDiscord | <demotomohiro> I don't think so. Nim's stdlib calls system call or windows API. They are imported using importc.↵If you dont want to use C bindings, you would need to write inline assembly code to call OS APIs. |
| 19:17:12 | FromDiscord | <michaelb.eth> In reply to @haywiressc "Can nim be used": Maybe nlvm is worth a look for you?↵↵https://github.com/arnetheduck/nlvm |
| 19:17:17 | FromDiscord | <michaelb.eth> (edit) "you?↵↵https://github.com/arnetheduck/nlvm" => "you?↵https://github.com/arnetheduck/nlvm" |
| 19:17:19 | FromDiscord | <bung8954> @elegantbeef your lib document server is down https://nimdocs.com/beef331/oopsie |
| 19:27:23 | FromDiscord | <.matrixagent> Hello guys |
| 19:27:36 | FromDiscord | <.matrixagent> is nim suitable for building highly concurrent servers? |
| 19:27:58 | FromDiscord | <.matrixagent> production grade websocket streaming servers precisely |
| 19:28:17 | FromDiscord | <.matrixagent> i need to scale to at least 400k users per second on a single server |
| 20:08:47 | FromDiscord | <Elegantbeef> @bung8954\: that's actually treeforms 😄 |
| 20:11:05 | FromDiscord | <bung8954> In reply to @.matrixagent "Hello guys": https://www.techempower.com/benchmarks/#section=data-r21&l=zhb2tb-6bj&test=plaintext |
| 20:18:49 | FromDiscord | <spotlightkid> If you want to know whether a racing car is fast enogh to give you a chance of winning a race, you would usually take it for a test drive. |
| 20:28:15 | FromDiscord | <turtlebasket> what's the standard way of populating varargs with items in a seq? like `...list` in JS or `args` in python |
| 20:30:29 | FromDiscord | <huantian> Just pass the seq directly |
| 20:31:07 | FromDiscord | <huantian> Varargs can either take multiple params, or an entire seq/array of values |
| 20:33:44 | * | ntat quit (Quit: leaving) |
| 20:37:46 | FromDiscord | <juan_carlos> In reply to @turtlebasket "what's the standard way": `varargs[SomeType]` for varargs, or `openArray[SomeType]` for 1 array of any size. |
| 20:51:32 | NimEventer | New thread by Mark_Howser: This forum software needs to go!, see https://forum.nim-lang.org/t/10351 |
| 21:04:56 | FromDiscord | <exelotl> lol |
| 21:06:26 | FromDiscord | <huantian> In reply to @juan_carlos "`varargs[SomeType]` for varargs, or": array or seq or magic 🪄 |
| 21:14:51 | FromDiscord | <turtlebasket> oh I didn't know you could just pass it in lol |
| 21:14:56 | FromDiscord | <turtlebasket> "list expansions? what for?" |
| 21:16:59 | FromDiscord | <Elegantbeef> It's really just a bad design 😄 |
| 21:17:57 | FromDiscord | <Elegantbeef> It only makes sense to unpack the fields for like `proc(a, b, c: float)` and you have `seq[float]` but still somewhat silly |
| 21:19:05 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#types-varargs↵> A varargs parameter is an openarray parameter that additionally allows to pass a variable number of arguments to a procedure. The compiler converts the list of arguments to an array implicitly: |
| 21:30:29 | FromDiscord | <caravaggio> What's a good nim framework for gui's? |
| 21:31:07 | FromDiscord | <Elegantbeef> Owlkettle is a nice GTK abstraction |
| 21:31:58 | FromDiscord | <Elegantbeef> wxnim, uing, nigui, are some others worth mentioning |
| 21:40:46 | FromDiscord | <caravaggio> Ty |
| 21:40:59 | FromDiscord | <caravaggio> Do u think interfacing with electron would be worth the hassle? |
| 21:41:12 | FromDiscord | <Elegantbeef> I don't like web apps, so no |
| 21:41:18 | FromDiscord | <turtlebasket> as in nim -\> js -\> run on electron? |
| 21:41:19 | FromDiscord | <caravaggio> 😅 |
| 21:41:23 | FromDiscord | <turtlebasket> definitely possible with something like karax |
| 21:41:23 | FromDiscord | <caravaggio> Yeah |
| 21:41:41 | FromDiscord | <turtlebasket> kind of a janky setup though fwiw |
| 21:50:15 | * | jmdaemon joined #nim |
| 23:46:10 | FromDiscord | <turtlebasket> is it possible to access params as non-NimNodes inside a macro? |
| 23:46:21 | FromDiscord | <turtlebasket> e.g. passing in an enum value or table |
| 23:47:04 | FromDiscord | <huantian> It should work if you mark the param as static right? Or am I making stuff up |
| 23:47:16 | FromDiscord | <huantian> beef you should know |
| 23:48:07 | FromDiscord | <Elegantbeef> yes static params |
| 23:57:40 | FromDiscord | <turtlebasket> damn, now we've got `lots[of[nested[brackets]]]` |
| 23:58:44 | FromDiscord | <turtlebasket> that's one gripe i have with nim, that I'm doing that a lot↵although to be fair it's `Not<Much<Better<Elsewhere, None> > >` ;) |
| 23:59:31 | FromDiscord | <Elegantbeef> `type MyType = Lots[Of[Nested[Brackets]]]` |
| 23:59:37 | FromDiscord | <turtlebasket> yes. |