<< 03-08-2022 >>

00:44:58*xet7 joined #nim
00:52:26FromDiscord<gibson> In reply to @Elegantbeef "Atleast it shouldnt 😄": Well then, surprisingly it does! I don't know enough about concepts to have had an opinion either way. Why did you think it would not work?
01:44:38FromDiscord<Elegantbeef> refer to the typeclass comments
01:44:40FromDiscord<Elegantbeef> @gibson\:
02:13:28FromDiscord<wiga> any idea on how i can get the total amount of files in a directory
02:15:13FromDiscord<!Patitotective> In reply to @wiga "any idea on how": https://nim-lang.org/docs/os.html#walkDir.i%2Cstring
02:17:22FromDiscord<wiga> uh
02:17:29FromDiscord<wiga> doesnt work
02:17:36FromDiscord<wiga> or im just too tired idk
02:17:51FromDiscord<!Patitotective> what doesnt work?
02:18:00FromDiscord<wiga> how am i suppose to use it
02:18:02FromDiscord<wiga> im
02:18:04FromDiscord<wiga> e
02:18:20FromDiscord<Elegantbeef> It's an iterator so `for dir in walkDir`
02:18:31FromDiscord<wiga> but i just want a number...
02:19:07FromDiscord<!Patitotective> https://nim-lang.org/docs/sequtils.html#toSeq.t%2Cuntyped
02:19:43FromDiscord<wiga> ?&&?????
02:19:56FromDiscord<wiga> im
02:19:57FromDiscord<huantian> Don’t use toSeq beef is shivering from the extra allocations
02:20:11FromDiscord<wiga> i just want
02:20:15FromDiscord<wiga> total files
02:20:17FromDiscord<wiga> in
02:20:20FromDiscord<wiga> a dir
02:20:28FromDiscord<wiga> like an int
02:20:44FromDiscord<Elegantbeef> I swear people dont want to write a single line of code
02:20:51FromDiscord<Prestige> Lol
02:20:56FromDiscord<wiga> but i tried
02:21:03FromDiscord<!Patitotective> In reply to @Elegantbeef "I swear people dont": true
02:21:16FromDiscord<wiga> i just want to finish that thing so i can go to sleep
02:21:28FromDiscord<Prestige> Beef that reminds me: How can I create a set of all enum values at compile time?
02:21:42FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46uH
02:21:43FromDiscord<Elegantbeef> enumtils.fullset
02:21:49FromDiscord<wiga> tysm
02:21:53FromDiscord<Elegantbeef> Or `{MyEnum.low..myEnum.high}`
02:22:15FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46uI
02:22:17FromDiscord<Prestige> hm I don't see `fullset` in enumutils, maybe I'm looking at something eld
02:22:19FromDiscord<Prestige> (edit) "eld" => "old"
02:22:29FromDiscord<Elegantbeef> It's in setutils maybe
02:22:30FromDiscord<wiga> In reply to @Patitotective "you need to check": i only have files in the directory i want to check
02:22:31FromDiscord<Elegantbeef> I always forget
02:22:46FromDiscord<demotomohiro> Calculating total number of files would requires count number of files in each directory recursively.
02:23:28FromDiscord<Elegantbeef> No one write the solution if they need recursive just mention `walkDirRec` and carry on
02:24:19FromDiscord<!Patitotective> In reply to @Elegantbeef "No one write the": he must be sleeping already lmao
02:53:18FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46uX
02:54:50FromDiscord<Elegantbeef> I dont follow the issue
02:55:06FromDiscord<!Patitotective> see the last line↵why are they not the same
02:55:11FromDiscord<!Patitotective> they should, right?
02:55:21FromDiscord<Elegantbeef> They're floats
02:55:33FromDiscord<Elegantbeef> I mean they should be the same
02:55:47FromDiscord<!Patitotective> yes, but `self.data[^1].padding` is 0 0
02:55:50FromDiscord<Elegantbeef> But we'll blame it on them being floats
02:56:00FromDiscord<!Patitotective> let me put this on github
03:01:30FromDiscord<!Patitotective> https://github.com/Patitotective/ImNotify
03:01:46FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46v0
03:04:08FromDiscord<Elegantbeef> What gc are you using by default?
03:04:45FromDiscord<!Patitotective> the default one
03:06:02*arkurious quit (Quit: Leaving)
03:07:00FromDiscord<Elegantbeef> Is there any chance imgui is mutating it?
03:07:11FromDiscord<Elegantbeef> Or anything is mutating it
03:07:43FromDiscord<flywind> nim secret seems to have a regression on Linux since 1.6.0?
03:07:57FromDiscord<Elegantbeef> In what way?
03:08:09FromDiscord<flywind> https://media.discordapp.net/attachments/371759389889003532/1004224126128488519/unknown.png
03:08:12FromDiscord<flywind> 1.6.0
03:08:38FromDiscord<!Patitotective> In reply to @Elegantbeef "Or anything is mutating": no, they're just objects↵no pointers
03:09:53FromDiscord<flywind> In reply to @flywind "1.6.0": The prompt showed for results not for user inputs
03:10:23FromDiscord<flywind> At 1.4.8
03:10:30FromDiscord<flywind> https://media.discordapp.net/attachments/371759389889003532/1004224714274771014/unknown.png
03:10:43FromDiscord<Elegantbeef> Well patito something is changing the values after adding
03:10:51FromDiscord<Elegantbeef> So i can only assume something unsafe is happening
03:11:16FromDiscord<!Patitotective> weird :/
03:14:51FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46v1
03:15:10FromDiscord<Elegantbeef> No you cant
03:15:12FromDiscord<!Patitotective> btw @flywind how did you get to that interactive console?
03:15:39FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46v2
03:15:43FromDiscord<Elegantbeef> `nim secret` opens up a nimscript repl
03:16:20FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46v3
03:16:39FromDiscord<Elegantbeef> Dont find/fix the issue just work around it
03:16:42FromDiscord<Elegantbeef> That's never a good way to work
03:17:02FromDiscord<!Patitotective> hehe
03:32:20FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46v5
03:35:01FromDiscord<!Patitotective> i should report this to nimgl/imgui, right?
03:35:15FromDiscord<Elegantbeef> Perhaps
03:35:32FromDiscord<Elegantbeef> See if you can remove the imgui dependency
03:36:37FromDiscord<!Patitotective> at first instance replacing imgui's ImVec2 seems to fix it
03:36:47FromDiscord<!Patitotective> and thats all im using form imgui
03:40:11FromDiscord<!Patitotective> https://github.com/nimgl/nimgl/issues/83
03:41:34FromDiscord<!Patitotective> 🌃
03:49:03FromDiscord<demotomohiro> That looks like compiler bug. It seems just set value of the object and add it to seq. It uses types in imgui but not calling procs in imgui.
03:50:43FromDiscord<demotomohiro> Does `echo data` or `echo data[^1]` print incorrect value?
03:51:47FromDiscord<wiga> In reply to @Patitotective "he must be sleeping": No im eating
03:51:59FromDiscord<wiga> Sleep comes after
04:06:54FromDiscord<!&luke> In reply to @Patitotective "btw <@658563905425244160> how did": Is that not inim?
04:07:08FromDiscord<Elegantbeef> No that's nim secret
04:07:17FromDiscord<!&luke> Wot
04:07:40FromDiscord<!&luke> Oh wow
04:52:59*jmd_ joined #nim
04:53:02*jmdaemon quit (Ping timeout: 240 seconds)
05:09:07FromDiscord<Phil> In reply to @ripluke "Oh wow": inim --> Full feature support for all nim libs↵nim secret --> no support for some of them
05:16:41NimEventerNew Nimble package! thes - Thesaurus CLI/Library & Analyzer in Nim, see https://github.com/c-blake/thes
05:21:17FromDiscord<pepperoni> how do u do functions in nim
05:21:18*jmdaemon joined #nim
05:22:26*jmd_ quit (Ping timeout: 268 seconds)
05:28:25FromDiscord<!&luke> proc
05:29:14FromDiscord<!&luke> https://nim-lang.org/docs/tut1.html
05:30:06FromDiscord<!&luke> https://nim-lang.org/docs/tut1.html#procedures
05:30:39FromDiscord<!&luke> @pepperoni
06:03:19*rockcavera quit (Remote host closed the connection)
06:04:43*jmd_ joined #nim
06:06:13*jmdaemon quit (Ping timeout: 268 seconds)
06:49:48FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=46vW
07:42:05FromDiscord<Hamid_Bluri> what the hell is going on https://media.discordapp.net/attachments/371759389889003532/1004293057753124905/unknown.png
07:43:28FromDiscord<Prestige> What's the value of mySet.compliment?
07:44:15FromDiscord<Hamid_Bluri> it's even fails on `{1, 2}` == `{1, 2}`
07:44:20FromDiscord<Hamid_Bluri> (edit) "it's" => "it"
07:44:40FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=46w8
07:45:40FromDiscord<Hamid_Bluri> i think that's `check` problem
07:46:34FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=46wa
07:48:55FromDiscord<Prestige> Wrap in parens
07:49:15FromDiscord<flywind> unittest has some limitations like https://nim-lang.org/docs/unittest.html#limitationsslashbugs Probbably related.
07:49:30FromDiscord<flywind> (edit) "Probbably" => "Probably"
07:49:41FromDiscord<Prestige> I wrote my own little testing framework because of weird nonsense like that
07:59:33FromDiscord<Hamid_Bluri> no really looks like `==` proc is not defined for `set`
08:00:11FromDiscord<Hamid_Bluri> https://media.discordapp.net/attachments/371759389889003532/1004297614872813578/unknown.png
08:02:09*fallback quit (Ping timeout: 268 seconds)
08:09:10FromDiscord<Hamid_Bluri> debugEcho "---------------------"
08:09:21FromDiscord<Hamid_Bluri> uncomment this
08:09:22FromDiscord<Hamid_Bluri> https://play.nim-lang.org/#ix=46wg
08:09:27FromDiscord<Hamid_Bluri> and get different result
08:10:45FromDiscord<Hamid_Bluri> I guess it's somehow related to the number of the lines 😄
08:13:39*fallback joined #nim
08:36:15FromDiscord<Hamid_Bluri> https://github.com/nim-lang/Nim/issues/20142
08:44:47FromDiscord<flywind> In reply to @hamidb80 "https://github.com/nim-lang/Nim/issues/20142": remove the range subtype, it works too.
08:45:35FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=46wq
08:45:40FromDiscord<Elegantbeef> Ah the issue is that `T` is inferred to be the subrange type and it "converts" the latter to it
08:46:02FromDiscord<Elegantbeef> As such it's data is off
08:46:32FromDiscord<flywind> Yeah, I think so.
08:49:05FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/wVy
08:49:31FromDiscord<Elegantbeef> Line 7 errors since `T` is bound to `set[char]`
08:51:17FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46wt
08:51:32FromDiscord<Elegantbeef> So probably in everyone's favourite `typerel` procedure
08:53:09FromDiscord<Elegantbeef> Maybe i'm wrong? https://github.com/nim-lang/Nim/blob/devel/compiler/sigmatch.nim#L1311-L1322
09:10:49FromDiscord<flywind> In reply to @Elegantbeef "Maybe i'm wrong? https://github.com/nim-lang/Nim/bl": git blame is quite useful
09:10:58FromDiscord<flywind> https://github.com/nim-lang/Nim/issues/16270
09:11:03FromDiscord<flywind> (edit)
09:12:12FromDiscord<Elegantbeef> I really hope that it doesnt drop the optimization
09:12:13FromDiscord<Elegantbeef> That'd be a shame
09:12:39FromDiscord<Elegantbeef> Though i guess it doesnt change much
09:13:26FromDiscord<Elegantbeef> Anyway I dont know if i'd argue `set[char] + set['a'..'c']` should even be legal
09:15:03FromDiscord<flywind> It seems to be an existing issue https://github.com/nim-lang/Nim/issues/18396
09:15:13FromDiscord<flywind> (edit) "existing" => "pre-existing"
09:26:52FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=46wG
09:26:59FromDiscord<jmgomez> https://media.discordapp.net/attachments/371759389889003532/1004319458145345566/message.txt
09:27:21*LaughingBubba joined #nim
09:27:38FromDiscord<jmgomez> Seems to be that the ptr is not valid? But cant see why if it's just being created there
09:33:18LaughingBubbaHi I'd like to submit a PR to fix a problem with xmltree. Do you want me to raise an issue in GH and link the PR to that or can I write a meaningful commit message and PR body? I've already talked about the problem in the forum here: https://forum.nim-lang.org/t/9335#61306
09:34:42FromDiscord<flywind> Either way is fine.
09:35:20LaughingBubbaOk cool. Thanks
10:33:10FromDiscord<EyeCon> Don't we have `enumerate` anymore? I can't import it
10:33:51FromDiscord<EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=46wY
10:34:40NimEventerNew thread by Yglukhov: Associating compile time data with function identifiers, see https://forum.nim-lang.org/t/9344
10:35:33FromDiscord<Rika> In reply to @EyeCon "Don't we have `enumerate`": How do you import it?
10:35:34FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=46wZ
10:36:26FromDiscord<EyeCon> In reply to @Rika "How do you import": I'm not sure what you are asking exactly, hope this helps https://media.discordapp.net/attachments/371759389889003532/1004336936137277500/unknown.png
10:36:34FromDiscord<Rika> That’s wrong
10:36:39FromDiscord<Rika> You must have the std prefix
10:36:43FromDiscord<Rika> std/enumerate
10:37:06FromDiscord<EyeCon> Previously that was optional, has something changed?
10:37:18FromDiscord<Rika> It has never been optional for enumerate
10:37:31FromDiscord<Rika> All new standard library packages require this, only old packages have it as optional
10:37:54FromDiscord<EyeCon> OK, thanks
10:46:31*krux02 joined #nim
10:55:59FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=46x4
10:56:16FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=46x5
10:56:25FromDiscord<4zv4l> is there another formater that could work ?
10:57:05FromDiscord<dom96> it wants a `string` you're giving it a `char`
10:57:12FromDiscord<dom96> put `$` in front of every `board`
10:57:38FromDiscord<4zv4l> what will this change ?
10:57:53FromDiscord<Rika> It will make the characters strings
10:57:57*LaughingBubba quit (Quit: Client closed)
10:57:57FromDiscord<Rika> And then it will work
10:58:27FromDiscord<4zv4l> alright, some black magic ok xD
11:02:29FromDiscord<4zv4l> is there a quicker way to write that type↵`array[3, array[3, char]]` ?
11:04:35FromDiscord<konsumlamm> you can make a type alias for it
11:04:44FromDiscord<konsumlamm> but there's no sugar for it
11:07:39FromDiscord<4zv4l> alright I'm a bit struggling with the pointer syntax also
11:08:13FromDiscord<4zv4l> how do I give a reference of a variable to a function ?
11:08:25FromDiscord<4zv4l> I tried the `ref` but it doesn't seem to work
11:08:53FromDiscord<konsumlamm> first, why do you want to pass a reference of a variable?
11:08:59FromDiscord<4zv4l> well
11:09:38FromDiscord<4zv4l> sent a long message, see http://ix.io/46x8
11:09:42FromDiscord<Generic> ref objects need to be created as ref
11:09:43FromDiscord<4zv4l> (edit) "http://ix.io/46x8" => "http://ix.io/46x9"
11:09:49FromDiscord<4zv4l> `ptr` then ?
11:09:55FromDiscord<Generic> no, you can use var parameters
11:09:59FromDiscord<konsumlamm> in this case you want to pass an `openArray`
11:10:02FromDiscord<enthus1ast> do\:↵board\: var Board
11:10:07FromDiscord<Generic> yes this ^
11:10:16FromDiscord<konsumlamm> but in general, you'll want a `var T` argument
11:10:36FromDiscord<Generic> you don't need to do anything on the call site
11:11:16FromDiscord<4zv4l> so it's when I call the function that I precise if I copy it or pass the pointer of it ?
11:11:24FromDiscord<konsumlamm> In reply to @konsumlamm "in this case you": nvm, it was `var openArray[T]`
11:11:52FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=46xa
11:11:58FromDiscord<4zv4l> I just wanna make play able to modify the board
11:12:07FromDiscord<Generic> yeah then use var parameters
11:12:20FromDiscord<4zv4l> var ?
11:12:29FromDiscord<Generic> board: var Board
11:12:35FromDiscord<Generic> in the definition of play
11:12:47FromDiscord<4zv4l> but then it will change play only in the function stack no ?
11:12:56FromDiscord<4zv4l> it will copy it no ?
11:13:16FromDiscord<Generic> it will implicitly pass a pointer
11:13:32FromDiscord<4zv4l> the syntax seems weird
11:13:37FromDiscord<4zv4l> adding var to tell that's a pointer ?
11:13:39FromDiscord<Generic> and modify the variable given at call site
11:13:52FromDiscord<Generic> well "pointer" is what happens behind the scenes
11:14:07FromDiscord<Generic> from a user perspective it's more comparable to C++'s references
11:14:30FromDiscord<Generic> you'd write Board& board there
11:14:50FromDiscord<enthus1ast> when you pass it pass ptr board, then the semantic changes later\:board[].doStuff, when you do just var then it does not change↵(@4zv4l)
11:15:19FromDiscord<4zv4l> In reply to @Generic "from a user perspective": I never really coded in C++
11:15:35FromDiscord<4zv4l> so I only know C/Go/Rust/Zig pointers way
11:15:42FromDiscord<4zv4l> which seems more understandable than Nim pointers
11:16:12FromDiscord<konsumlamm> itcs like `&mut` in Rust
11:16:46FromDiscord<4zv4l> yeah but using `var` sounds like creating a new var in the function stack which isn't what it's actually doing
11:17:17FromDiscord<4zv4l> func (var i )↵you don't expect that i to actually be a pointer to the func(i)
11:17:33FromDiscord<4zv4l> more looks like a new fresh variable
11:17:33FromDiscord<enthus1ast> var in this context could be called "out" or "modifieable" or so, but this ship has sailed i guess
11:18:12FromDiscord<konsumlamm> i find the behaviour pretty intuitive ¯\\_(ツ)\_/¯
11:18:22FromDiscord<enthus1ast> same↵(@konsumlamm)
11:18:34FromDiscord<4zv4l> sent a long message, see http://ix.io/46xc
11:18:36FromDiscord<enthus1ast> but its stuff you must know i guess \:)
11:18:37FromDiscord<4zv4l> seems more intuitive to me
11:19:03FromDiscord<4zv4l> I mean it's weird to use the same keyword you use to create a new variable to also tell that's a pointer
11:19:10FromDiscord<enthus1ast> sent a long message, see http://ix.io/46xe
11:19:19FromDiscord<4zv4l> In reply to @enthus1ast "then you would use\:": we can do that ?
11:19:20FromDiscord<konsumlamm> ptr is a raw pointer in Nim, nothing you wanna use directly usually
11:20:35FromDiscord<4zv4l> also metaprogramming is nice but having to write `mod` instead of using `%` or `addr` instead of `&` is a bit weird to me also for now↵I guess I'll get used to it
11:21:40FromDiscord<4zv4l> but the `addr`|`ptr` is ok, more understandable
11:22:16FromDiscord<konsumlamm> also more unsafe
11:22:30FromDiscord<4zv4l> why more unsafe ?
11:22:36FromDiscord<4zv4l> more unsafe than `var` ?
11:23:00FromDiscord<4zv4l> why ?
11:23:44FromDiscord<enthus1ast> because a pointer can point to null↵(@4zv4l)
11:23:46FromDiscord<enthus1ast> or anywhere
11:23:49FromDiscord<konsumlamm> because it operates on raw pointers, there's no guarantee that an arbitrary pointer is valid
11:23:57FromDiscord<enthus1ast> you cannot reassign a ref
11:24:16FromDiscord<konsumlamm> In reply to @konsumlamm "because it operates on": whereas for `var` parameters, there is
11:24:45FromDiscord<enthus1ast> ref is also more userfriendly, since you do not have to deref all the time
11:25:46FromDiscord<planetis> It's managed by the compiler and hidden from the user. So you don't have to worry for things like dereferencing or lifetimes
11:26:57FromDiscord<4zv4l> alright, I need to get used to that xD
11:27:29FromDiscord<enthus1ast> i mean, c also has -\@4zv4l)
11:27:54FromDiscord<enthus1ast> which is (\foo).baa ?
11:28:01FromDiscord<4zv4l> yeah for struct
11:28:29FromDiscord<4zv4l> I just mean↵having to use `var` in a function arguments is weird to me↵even more if it means it's a pointer
11:28:40FromDiscord<enthus1ast> its a ref
11:28:42FromDiscord<enthus1ast> not a pointer
11:28:48FromDiscord<enthus1ast> a pointer can be reassigned
11:28:51FromDiscord<enthus1ast> a ref cannot
11:30:57FromDiscord<konsumlamm> it's not a `ref`
11:31:13FromDiscord<konsumlamm> `ref` is a garbage collected pointer
11:32:20FromDiscord<planetis> My problem was getting used to the other way around. This so much easier.
11:35:29FromDiscord<Zectbumo> is there a way to exec a process and have it replace the current nim process?
11:35:40FromDiscord<enthus1ast> https://www.reddit.com/r/nim/comments/rpw5xf/difference_between_ref_and_a_var_inside_proc/↵↵PMunch describes it nicely
11:36:14*TakinOver quit (Ping timeout: 240 seconds)
11:37:43FromDiscord<enthus1ast> start a new process, then exit the current one?↵(@Zectbumo)
11:40:36FromDiscord<Zectbumo> that would give me a new pid. I'm looking for something like the bourne shell `exec` command
11:42:55FromDiscord<Rika> posix execv()
11:43:39FromDiscord<Rika> https://linux.die.net/man/3/execv
11:43:48FromDiscord<Rika> I don’t recall if it’s POSIX actually
11:44:06FromDiscord<Rika> Yup it is
11:44:07FromDiscord<Zectbumo> oh I'll check the posix module
11:44:12FromDiscord<Rika> Don’t ask me about windows
11:45:25FromDiscord<enthus1ast> what is the usecase for this btw?
11:45:26FromDiscord<Zectbumo> I won't be 😉 here it is↵https://nim-lang.org/docs/posix.html#execv%2Ccstring%2CcstringArray
11:45:29FromDiscord<enthus1ast> why one want this?
11:47:16FromDiscord<Zectbumo> I'm using nim more and more and I'm replacing shell stuff with nim code. one case is when a process calls a program and waits for that process to exit (my nim code). If it forks and spawns a new process and main pid exits then the original watching process erroneously thinks it's done.
11:48:16FromDiscord<enthus1ast> ok i see, thank you
11:50:09FromDiscord<deech> This maybe better asked on the forum but besides Status and the Nim team itself who is working on a large-ish Nim codebase with a team size of more than 3 people or so?
12:03:41FromDiscord<epesrihar1970> https://sites.google.com/view/viagra-sale-online/viagra-from-0-36
12:04:02FromDiscord<epesrihar1970> Sale of drugs for the treatment of erectile dysfunction with a discount of up to 90%!
12:04:31FromDiscord<epesrihar1970> Viagra - from $0.36 per pill, Levitra - from $0.99 per pill, Cialis - from $1.07 per pill and much, much more!
12:04:37FromDiscord<epesrihar1970> Confidentiality is 100%!
12:04:43FromDiscord<epesrihar1970> Free shipping!
12:09:30FromDiscord<konsumlamm> <@&371760044473319454>
12:12:07FromDiscord<wiga> Wtf lmfao
12:13:06FromDiscord<wiga> Google site
12:13:12FromDiscord<wiga> Hdveheisksmkslsl
12:13:17FromDiscord<wiga> Ahahahagag
12:14:18FromDiscord<Rika> Damn I sure wish I could buy some viagra right now
12:14:29FromDiscord<wiga> lol?
12:14:46FromDiscord<enthus1ast> what they sell is not viagra but, dirt with color↵(@Rika)
12:14:59FromDiscord<Rika> What’s the difference anyway
12:15:10FromDiscord<wiga> Its not viagra its extazy
12:15:14FromDiscord<wiga> Literally
12:15:38FromDiscord<wiga> Its not the first time i come across weird shits like these
12:15:52FromDiscord<wiga> The site looks like silk road
12:15:56FromDiscord<wiga> But dark theme lol
12:16:14FromDiscord<wiga> Shady stuff going on
12:37:15FromDiscord<dom96> Dollar per pill? wtf, that's expensive
12:44:34FromDiscord<Rika> Sus, how would you know
12:55:48FromDiscord<dom96> hah
12:55:58FromDiscord<dom96> no pill should be more than a dollar per pill
12:56:57*rockcavera joined #nim
12:56:57*rockcavera quit (Changing host)
12:56:57*rockcavera joined #nim
13:04:28FromDiscord<Phil> In reply to @deech "This maybe better asked": I assume you mean applications and not libs?
13:06:36FromDiscord<deech> In reply to @Isofruit "I assume you mean": Either is fine.
13:07:22FromDiscord<flywind> https://github.com/nim-lang/Nim/wiki/Organizations-using-Nim some companies of that list I guess
13:09:14FromDiscord<flywind> In reply to @deech "Either is fine.": Or https://nitter.net/tacen_app which uses Nim in their application.
13:10:54FromDiscord<deech> In reply to @flywind "Or https://nitter.net/tacen_app which uses": Is that still the case? They're hiring Go & Rust devs now. https://tacen.breezy.hr/p/c1f3fb206216-backend-engineer
13:16:37FromDiscord<Phil> In reply to @deech "Either is fine.": I'm not sure that would count since I'd guess even norm, prologue or jester might qualify for this and I don't think these are what you meant
13:17:28FromDiscord<Phil> So I guess flywind's posted list is the best resource at a glance
13:17:48FromDiscord<flywind> In reply to @deech "Is that still the": I don't know. They used to use Nim extensively https://nitter.net/jae_tacen/status/1527559262427222016#m
13:18:37FromDiscord<Phil> That was merely 3 months ago so possibly there's a separate project
13:19:01FromDiscord<deech> In reply to @flywind "I don't know. They": Interesting, that is a good indication. They may be listing Go/Rust to get more applications.
13:19:48FromDiscord<Phil> That or there's a separate project with those languages going on. Because if you're actually looking for nim devs you'd at least mention the language
13:29:43*jmd_ quit (Ping timeout: 244 seconds)
14:10:44*arkurious joined #nim
14:23:18FromDiscord<Phil> Question, what is an "output" parameter, since araq is talking about those in one of the nimv2 RFCs↵https://github.com/nim-lang/RFCs/issues/378
14:23:47FromDiscord<dom96> similar to `var T` I guess
14:24:36FromDiscord<PyryTheBurger> what are hashes and intsets i didnt understand it from nim docs
14:24:59FromDiscord<Phil> In reply to @dom96 "similar to `var T`": The way I read it `var T` is the output parameter.↵What I don't get is what differentiates that from a "read-write parameter"
14:25:31FromDiscord<Phil> The concept appears to exist in other languages, I just never used any of those I don't think
14:25:43FromDiscord<Phil> That or it's something common used in a specific way and I'm confused by the wording
14:26:01FromDiscord<konsumlamm> i think an out parameter is only meant for writing
14:26:46FromDiscord<konsumlamm> like an extra return value
14:26:49FromDiscord<enthus1ast> like this? https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/out-parameter-modifier
14:27:25FromDiscord<enthus1ast> you often see "output" annotations in ms docs, when they wanna make sure you understand that this param is used for outputting stuff
14:28:08FromDiscord<konsumlamm> ye
14:28:48FromDiscord<Phil> Wait, is that this ~~nonsense~~ pattern where the "return" of your proc is that the operation succeeded and your actual result is the parameter?
14:29:13FromDiscord<Phil> Well, the contents of the parameter
14:30:41FromDiscord<enthus1ast> a hash is a not reversible function, that always generates the same output for the same input↵an intset is a set of ints \:)↵(@PyryTheBurger)
14:30:47FromDiscord<dom96> oh gosh, glad to see people not wanting that RFC 👎
14:30:58FromDiscord<enthus1ast> which rfc?
14:31:06FromDiscord<dom96> the out parameter one
14:31:20FromDiscord<PyryTheBurger> In reply to @enthus1ast "a hash is a": why not use seq[int]
14:32:10FromDiscord<enthus1ast> because a seq[int] is slower for larger data
14:32:37FromDiscord<PyryTheBurger> so if i want a seq of ints i always want to use intset
14:33:41FromDiscord<enthus1ast> mh, maybe when the order is not important
14:33:49FromDiscord<Phil> In reply to @PyryTheBurger "so if i want": enthus1ast may shoot me if I'm wrong in case intset is a special case of Sets, but generally Sets are used to allow really fast checking if an integer you have is contained in a group of ints
14:34:02FromDiscord<Phil> That's their main usecase, check if X is in Y
14:34:08FromDiscord<enthus1ast> yeah
14:34:24FromDiscord<enthus1ast> and join them and get the difference etc
14:34:26FromDiscord<Phil> They're way faster than seqs at that job, also comparing sets to other sets is a useful thing for them
14:34:46FromDiscord<enthus1ast> maybe seq are faster for smaller datasets
14:34:58FromDiscord<enthus1ast> but bechmark
14:35:39FromDiscord<Phil> So if you have a set of ids that represent admins in a set in ram, checking "is the id of value 5 in my set of admin ids" is faster with a set than a seq. That's the general idea anyway
14:36:18FromDiscord<PyryTheBurger> i also didnt really understand your description of hashes
14:36:56FromDiscord<enthus1ast> do you know what sha or md5 does?
14:37:13FromDiscord<PyryTheBurger> havent heard if them
14:38:30FromDiscord<enthus1ast> you have an input of variable size; the hash function generates an output (eg a number) of the same predefined size, and if something (even one bit) in the input changes, the hash changes completely
14:40:13FromDiscord<enthus1ast> so eg\: they say on a website "this big iso image has hash\: xyz123" but after downloading you do the hash yourself and is has\: "abc999" you know the files are not the same
14:41:23FromDiscord<enthus1ast> so, in nim's case, hashes are used for example to check if two objects are the same
14:44:22FromDiscord<Phil> Hashing often just means "transform an object somehow into a number that is always the same for any object that looks like this"
14:46:05FromDiscord<Phil> sent a long message, see http://ix.io/46yl
14:46:58FromDiscord<Phil> If you compare two strings you have to compare each byte in the byte-array that is the string for equality.↵If you compare two numbers for equality you're checking typically at most 8 bytes (at least I assume hashes are calculated as int64 and not int32).
14:47:33FromDiscord<Phil> (edit) "at most 8 bytes (at least I assume hashes are calculated as int64 and not int32)." => "a lot less bytes."
14:47:38FromDiscord<Phil> I think the edit is more correct.
14:49:45FromDiscord<Phil> this is particularly useful for Hashsets and strings.↵Because if I want to figure out "is this object in my hashset of objects" I calculate the hash of my object once and then I'm just comparing the number against a set of other numbers, which is fast.↵If I directly had to compare my object against all other objects in the set, I'd be comparing the values of each field individually with one another.
15:03:38FromDiscord<PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=46yD
15:05:44FromDiscord<Phil> I work way too rarely with cast to be able to answer that
15:13:51FromDiscord<Tanguy> No, the first is safe, not the second (as in, cast can cause memory corruptions)
15:22:55FromDiscord<domosokrat> sent a code paste, see https://play.nim-lang.org/#ix=46yR
15:25:53NimEventerNew question by azyx: Why calling times.cpuTime() is slow in Nim?, see https://stackoverflow.com/questions/73223884/why-calling-times-cputime-is-slow-in-nim
15:26:22FromDiscord<domosokrat> The cast means 'interprete the internal representaion of the float 1.5 as an int'
15:42:11*joshbaptiste1 quit (Ping timeout: 272 seconds)
16:02:06FromDiscord<PyryTheBurger> sent a code paste, see https://paste.rs/lD4
16:51:11*wallabra quit (Ping timeout: 252 seconds)
16:51:52*jkl1337 quit (Quit: Gone.)
16:53:15*jkl joined #nim
16:54:27FromDiscord<Generic> wow, threads:on destroyed performance in my emulator
16:55:52FromDiscord<Generic> like I thought I didn't even allocate that much
17:24:07NimEventerNew thread by Pietroppeter: How to call a function (that works on the dom) in karax after page is loaded, see https://forum.nim-lang.org/t/9345
18:05:25FromDiscord<krisppurg> When I compile my code with `--threads:on` I only get Execution of program failed error and that's it? Why's that?
18:06:55FromDiscord<Rika> Your program is probably getting a signal of some sort and dying without any output
18:09:41FromDiscord<krisppurg> how could I avoid that?
18:15:28FromDiscord<Prestige> Declaring a const _inside_ a proc declaration I'm assuming is similar to declaring a const at top-level, with the difference being scope, right?
18:16:16FromDiscord<Rika> In reply to @krisppurg "how could I avoid": You’ll have to figure that out somehow because it could be for any reason, try using GDB or Valgrind to analyse what’s happening
18:23:16FromDiscord<krisppurg> and what command would I need to execute when inspecting with the complier using gdb?
18:26:43FromDiscord<Rika> Is your compiler failing or your program
18:26:56FromDiscord<Rika> Just run your program under GDB if latter
18:27:14FromDiscord<Rika> I can’t really tell you how but it’s just like any other C binary so you can search it
18:27:32FromDiscord<Rika> If the compiler is failing then there’s a different way
18:28:32FromDiscord<krisppurg> the program is failing
18:30:17NimEventerNew thread by Jasonfi: Threads dying, memory issues?, see https://forum.nim-lang.org/t/9346
18:30:58FromDiscord<auxym> debugging: https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html
18:31:10FromDiscord<Rika> @jasonfi maybe try using Clang ASan and MSan
18:46:46*rockcavera quit (Remote host closed the connection)
18:49:18*cyraxjoe quit (Ping timeout: 264 seconds)
18:49:32*cyraxjoe joined #nim
18:53:50*cyraxjoe quit (Ping timeout: 240 seconds)
18:55:12*cyraxjoe joined #nim
19:06:55*Guest2776 quit (Ping timeout: 268 seconds)
19:07:45*wallabra joined #nim
19:08:35*kenran joined #nim
19:09:32*Guest2776 joined #nim
19:14:01*kenran quit (Quit: WeeChat info:version)
19:51:32*jmdaemon joined #nim
20:11:54*krux02 quit (Remote host closed the connection)
20:14:38*ingy joined #nim
20:14:47NimEventerNew question by azyx: Nim closure doesn&#39;t update captured variable when running in thread. Why?, see https://stackoverflow.com/questions/73227303/nim-closure-doesnt-update-captured-variable-when-running-in-thread-why
20:21:15FromDiscord<!Patitotective> how does inim works?
20:37:48FromDiscord<pietroppeter> can't remember how to transform a identifier into a string inside a template. e.g. a template `myVar(foo)` that does for example `var foo = "foo"`
20:55:24*rwb joined #nim
20:57:19*pch joined #nim
20:59:11*rwb quit (Client Quit)
21:02:00*rwb joined #nim
21:02:21FromDiscord<!Patitotective> In reply to @pietroppeter "can't remember how to": https://nim-lang.org/docs/system.html#astToStr%2CT ?
21:03:10FromDiscord<Phil> If I have a question about nim's fatal.nim module... does that belong under "internals"?
21:04:24*krux02 joined #nim
21:06:58FromDiscord<pietroppeter> In reply to @Patitotective "https://nim-lang.org/docs/system.html#astToStr%2CT ": thanks!
21:07:03FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=46At
21:08:35FromDiscord<Phil> What's weird as heck to me is that these consts are not exported. Yet if I do any search for usages of the variable in the file, I come up with no hits beyond when the variable gets declared. I'm not sure these 4 lines actually fulfil any purpose whatsoever
21:09:39FromDiscord<Elegantbeef> Phil that file is probably included in system
21:10:46FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=46Ax
21:10:53FromDiscord<Phil> You are indeed correct
21:11:38FromDiscord<Phil> Wait, that const is still never used in system itself... wait but now I have to check every single include of system
21:12:01FromDiscord<!Patitotective> just search through all files
21:12:02FromDiscord<Elegantbeef> https://github.com/nim-lang/Nim/search?q=gotoBasedExceptions
21:13:32FromDiscord<Phil> Wait... but then... but these use the const, why does the compiler state otherwise
21:13:45FromDiscord<Elegantbeef> What?
21:13:49FromDiscord<Phil> Does the compiler just complain about any variable that is never called at runtime?
21:14:15FromDiscord<Elegantbeef> What are you talking about?
21:15:36FromDiscord<Phil> sent a long message, see https://paste.rs/wym
21:15:42FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/aru
21:16:11FromDiscord<Elegantbeef> Oh right foreign package doesnt show the hint
21:16:35FromDiscord<Elegantbeef> yea i imagine using a constant in a `when` statement presently doesnt make it uused
21:17:18FromDiscord<Phil> How hard is it to make such a flag not apply to foreign packages (which includes nim core modules) ?
21:17:44FromDiscord<Elegantbeef> No clue
21:17:56FromDiscord<Elegantbeef> It'd be better to make when statements mark symbols as used 😄
21:18:29FromDiscord<Phil> I'll just open an issue and bring up possible approaches
21:41:29FromDiscord<Phil> Oh lord, part of an issue means rebuilding the compiler, well down that rabithole i gues
21:42:11FromDiscord<Phil> Right, now I remember again, last time I also got stuck at this koch.nim file thing
21:42:22FromDiscord<Elegantbeef> `choosenim devel`?
21:42:39FromDiscord<Phil> Tested on that one already, the bug form tells me to check on git head though
21:42:50FromDiscord<Phil> > please check whether the problem still exists in git head before posting,↵> see [rebuilding the compiler](https://nim-lang.github.io/Nim/intern.html#rebuilding-the-compiler).
21:43:02FromDiscord<Elegantbeef> You can install a specific commit
21:43:03FromDiscord<Phil> And that link immediately assumes you have the koch file
21:43:06FromDiscord<Elegantbeef> `choosenim #commit`
21:43:57FromDiscord<Phil> Wouldn't git devel have the most recent devel thingy already and basically be the most up to date thing there is?
21:44:34FromDiscord<Phil> Ohhhh and choosenim #head does work
21:44:37*rockcavera joined #nim
21:44:37*rockcavera quit (Changing host)
21:44:37*rockcavera joined #nim
21:51:42*rwb is now known as rb
21:57:28FromDiscord<Elegantbeef> Devel is nightly so it might
21:58:53FromDiscord<!&luke> In reply to @Isofruit "Ohhhh and choosenim #head": Yea
22:01:48FromDiscord<exelotl> In reply to @Elegantbeef "Phil that file is": I actually depend on this being the case, as it allows me to implement a custom panic handler for my projects (via `patchFile`)
22:02:29FromDiscord<exelotl> Similar to the "panicoverrides" thing from --os:standalone
22:58:34FromDiscord<LNSD> sent a long message, see http://ix.io/46B1
22:59:36FromDiscord<LNSD> (edit) "http://ix.io/46B1" => "http://ix.io/46B2"
23:05:15FromDiscord<Elegantbeef> https://forum.nim-lang.org/t/9323 might interest you
23:07:56FromDiscord<Elegantbeef> Ah nvm
23:07:59FromDiscord<Elegantbeef> You want import graphs
23:08:49FromDiscord<Elegantbeef> I think hax has something working with source trail
23:09:18FromDiscord<Elegantbeef> https://github.com/haxscramper/nimtrail i think, might be wrong
23:16:57FromDiscord<!Patitotective> soooo beef, i dont think someone will ever answer to the issue soo↵whats the next step before work arounding it 🤨 ↵debugging?
23:17:41FromDiscord<Elegantbeef> Yes or looking at the generated code
23:17:57FromDiscord<!Patitotective> generated c code?
23:18:01FromDiscord<Elegantbeef> Yes
23:18:04FromDiscord<!Patitotective> ok
23:18:44FromDiscord<Elegantbeef> `-d:danger --gc:arc` helps a lot to make the code more readable
23:18:48FromDiscord<!Patitotective> its cpp actually
23:18:51FromDiscord<!Patitotective> In reply to @Elegantbeef "`-d:danger --gc:arc` helps a": :]
23:25:27FromDiscord<!Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=46B6
23:39:33FromDiscord<Girvo> Morning all 🙂
23:40:26*tiorock joined #nim
23:40:26*tiorock quit (Changing host)
23:40:26*tiorock joined #nim
23:40:26*rockcavera quit (Killed (lead.libera.chat (Nickname regained by services)))
23:40:26*tiorock is now known as rockcavera
23:40:45*krux02 quit (Remote host closed the connection)
23:42:41FromDiscord<Girvo> How would one write a proc (or more likely, a generic type or concept) to disallow `ref` objects for a param -- that one I can do, but here's the more interesting bit: anyone know of a way to disallow `refs` as properties for that same type? We've got a C-level function called `xQueueSend` that is thread (well, Task) safe and passes messages to the queue by-copy, and I wanted to make a nicer Nim interface on top of it
23:43:41FromDiscord<Elegantbeef> A concept
23:46:10FromDiscord<!Patitotective> sooo beef↵generated code seems ok to me (i dont really know a lot of cpp but at least the padding is being set)↵so how would i go to do the debugging?
23:48:06FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=46Bi
23:49:03FromDiscord<Girvo> Sweet! Appreciate it
23:50:04FromDiscord<Girvo> @ElegantBeef I'll post up the PSRAM "allocator" once I've it today 😄 should be nice