<< 30-10-2023 >>

00:20:52*lumo_e joined #nim
00:21:21*def- quit (Quit: -)
00:24:08*def- joined #nim
00:27:09*def- quit (Client Quit)
00:29:52*def- joined #nim
00:36:07*def- quit (Quit: -)
00:39:28*def- joined #nim
00:42:40*def- quit (Client Quit)
00:47:00*def- joined #nim
00:50:05*def- quit (Client Quit)
00:50:18*def- joined #nim
01:03:17*Mister_Magister quit (Remote host closed the connection)
01:06:38*Mister_Magister joined #nim
03:03:09*lumo_e quit (Quit: Quit)
03:47:17FromDiscord<Yardanico> if someone has a fresh pair of eyes, can you check if I made any mistakes in <https://github.com/nim-lang/Nim/pull/22886> ? it's quite a sensitive piece of code related to parsing http responses in httpclient
03:53:27FromDiscord<Yardanico> oh, right, a small mistake - spaces in the header value is ok
03:56:37FromDiscord<Yardanico> ah nvm it already works because it parses until the colon
04:12:37FromDiscord<Yardanico> ok, right, this doesn't handle the case if the http server responds with a multiline header line (if it starts with space/tab) before the first header
04:31:58FromDiscord<Yardanico> guess i will give up and make httpclient more lenient so that it at least works like python/curl/etc, because they all seem to accept headers without any value after the colon happily even if it's not valid http spec-wise
04:32:36FromDiscord<Elegantbeef> Down with non spec compliant code! 😛
04:43:15FromDiscord<Yardanico> it's really bizzare, but I guess that's what you get with decades-old text protocols
04:43:41FromDiscord<Yardanico> weird text after the first HTTP version + status response line like " asdasdasds"? curl errors out but Python just ignores it as if it never existed
04:45:13FromDiscord<Elegantbeef> Probably either an "optimisation" or just a shitty parser
04:45:27FromDiscord<Elegantbeef> "We got a valid response for the most part, no need to validate more"
04:47:22FromDiscord<Yardanico> the best way would be to find some http 1.1 spec test suite to test clients
04:48:52FromDiscord<sOkam! 🫐> is there a way to output non-mangled `.js` symbols when compiling with the js target?
04:49:07FromDiscord<Yardanico> define "mangled"
04:49:09FromDiscord<Elegantbeef> `exportJs`
04:49:13FromDiscord<Yardanico> ah, mangled
04:58:26*Guest77 joined #nim
04:58:39*Guest77 quit (Client Quit)
05:32:32FromDiscord<sOkam! 🫐> In reply to @Elegantbeef "`exportJs`": is there a way to do that auto, without having to apply it to every single symbol manually?
05:32:51FromDiscord<Elegantbeef> No cause generics exist
05:32:59FromDiscord<Elegantbeef> `{.push exportJs.}`
05:33:21FromDiscord<sOkam! 🫐> ah push might work, true. didn't cross my mind
07:01:14*advesperacit joined #nim
07:04:05*PMunch joined #nim
08:39:49*FromDiscord quit (Remote host closed the connection)
08:40:02*FromDiscord joined #nim
12:27:42FromDiscord<kryp7on> sent a long message, see http://ix.io/4Km4
12:28:25FromDiscord<kryp7on> (edit) "http://ix.io/4Km4" => "http://ix.io/4Km5"
12:29:49*edr joined #nim
12:41:44FromDiscord<jviega> Yes, it currently generates C that gets compiled. Plenty of people do legitimate security tools in this community, and there's help for that. And Nim is fine for low level control, you have easy direct access to C if you need it.
13:01:43FromDiscord<kryp7on> In reply to @jviega "Yes, it currently generates": thanks for answers. What you mean by "direct access to C"? Does that mean that if I need low level control, I need to write code in C instead of Nim?
13:04:11FromDiscord<jviega> Well, you could, but you can just call into C functions
13:04:42FromDiscord<jviega> And most of the ones you'd ever use are already wrapped w/ a higher level interface
13:07:15FromDiscord<kryp7on> oh, thats some things that I dont know yet about, Im gonna learn Nim. thanks so much 😄
13:07:34FromDiscord<kryp7on> (edit) "Nim." => "Nim so Ill understand what you are said here ."
13:32:49PMunchTo clarify you can call C functions if you need them, for example if someone else has written something in C you want to use. But you can do low-level stuff directly in Nim if you're writing things from scratch.
13:46:59*rockcavera joined #nim
13:50:08*krux02_ joined #nim
13:52:44FromDiscord<kryp7on> thanks bot! :))
13:53:10FromDiscord<kryp7on> (edit) ":))" => ":))↵↵EDIT: I reazlied its not bot, its real human. Thanks PMunch haha 😄"
13:53:35PMunchHaha, surprisingly common mistake
14:15:16FromDiscord<kryp7on> could you recommend me Nim resources for total Nim beginner?
14:18:10PMunchhttps://nimprogrammingbook.com/, along with Nim in Action, and Mastering Nim are good resources. There's of course a list of the official tutorials along with many other good resources available here: https://nim-lang.org/documentation.html
14:30:08FromDiscord<auxym> In reply to @kryp7on "could you recommend me": IMO if you're already familiar with programming in another language, than the official tutorials at https://nim-lang.org/docs/tut1.html is good. https://nim-by-example.github.io/ is also good.
14:33:27FromDiscord<auxym> @kryp7on also see https://github.com/byt3bl33d3r/OffensiveNim. The reason some of us are a bit annoyed by such efforts is that the result is Nim (the compiler and all compiled nim programs) getting blocked by Windows Defender and many other common AV software, which blocks Nim adoption by many people (eg corporate PCs on which nim cannot be installed, or newbies who may be scared to disable AV for nim and think there's a real risk)
14:40:51FromDiscord<kryp7on> In reply to @auxym "IMO if you're already": thanks so much, I bookmarked those links.↵↵yes, read that on the internet. But its not Nim's nor it is problem in malware development, its Microsoft which sucks and I dont like them so much
14:41:06FromDiscord<kryp7on> (edit) "In reply to @auxym "IMO if you're already": thanks so much, I bookmarked those links.↵↵yes, read that on the internet. But its not Nim's ... nor" added "problem"
14:41:16FromDiscord<auxym> I agree. MS but also other AV vendors
14:41:21FromDiscord<kryp7on> they could just whitelist Nim compiler
14:41:25FromDiscord<kryp7on> yea, thats idiotic imo
14:41:25FromDiscord<auxym> yes
14:41:27PMunchWell it is a problem for Nim, regardless of whether it's Nims fault or not..
14:41:36FromDiscord<kryp7on> they should then flag Rust and C compiler also
14:41:49FromDiscord<kryp7on> yea, true
14:41:57FromDiscord<auxym> they do flag, or flagged, Go IIRC
14:49:44*itsmekali321 joined #nim
14:50:20*itsmekali321 quit (Client Quit)
14:56:43*LuxuryMode joined #nim
14:58:08FromDiscord<juancarlospaco> Time to time I get virus warnings on plain-text pure-python files. 🤷
15:03:24FromDiscord<treeform> Windows antivirus companies are basically a scam and are worse than the protection they offer. They are more likely to mine Bitcoin ( https://www.theverge.com/2022/1/7/22869528/norton-crypto-miner-security-software-reaction ) or man-in-the-middle ( https://www.thesafemac.com/avasts-man-in-the-middle/ ). Antivirus companies have become the bad actors they tried but failed to stop. (https://www.cbc.ca/news/science/antivirus-software-1.3668
15:06:04*PMunch quit (Quit: Leaving)
15:20:20FromDiscord<nervecenter> In reply to @kryp7on "could you recommend me": For learning a language, I always recommend:↵1) Open the X in Y Minutes page (https://learnxinyminutes.com/docs/nim/)↵2) Open official docs (https://nim-lang.org/docs/manual.html, https://nim-lang.org/docs/nimc.html, https://nim-lang.org/docs/lib.html)↵3) Translate a toy project you already have, or work on HackerRank or Advent of Code exercises
15:20:53FromDiscord<nervecenter> (edit) "In reply to @kryp7on "could you recommend me": For learning" => "sent" | "language, I always recommend:↵1) Open the X in Y Minutes page (https://learnxinyminutes.com/docs/nim/)↵2) Open official docs (https://nim-lang.org/docs/manual.html, https://nim-lang.org/docs/nimc.html, https://nim-lang.org/docs/lib.html)↵3) Translate a toy project you already have, or work on HackerRank or Advent of Code exercises" => "long mess
15:25:45FromDiscord<gyatsoyt> `time.now()` is not In nim?
15:27:09FromDiscord<Chronos [She/Her]> Iirc it's 'now', at least
15:27:12FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4KmN
15:27:13FromDiscord<Chronos [She/Her]> Is there a bot for searching stdlib docs? I feel like that'd be very useful
15:28:57FromDiscord<Chronos [She/Her]> https://nim-lang.org/docs/times.html#now @gyatsoyt
15:42:14*CO2 quit (Quit: WeeChat 4.1.0)
15:45:55FromDiscord<Chronos [She/Her]> https://dylibso.com/blog/hermit-actually-portable-wasm/ hm what do people think of this? It's interesting imo
15:46:22FromDiscord<Chronos [She/Her]> Tho would it be that different from using that libc to compile the code from the beginning?
15:54:36FromDiscord<juancarlospaco> In reply to @treeform "Windows antivirus companies are": Or AV actually making Viruses and Ransoms as shadow companies or financing it.
15:55:14FromDiscord<Chronos [She/Her]> Glad I use Linux, means these type of stuff are less popular :p
15:55:23FromDiscord<Chronos [She/Her]> Tho that most definitely will change someday oof
15:55:44FromDiscord<Chronos [She/Her]> Gotta run everything in a container or as a WASM app now /j
16:12:23FromDiscord<griffith1deadly> how i can get generated nim code by macro?
16:12:44FromDiscord<Phil> Echo yournimnode.repr
16:13:31FromDiscord<Phil> Or rather a macro should return a nimnode with all the you want to generate, you can echo the repr of that
16:14:37*CO2 joined #nim
16:20:59FromDiscord<griffith1deadly> In reply to @isofruit "Echo yournimnode.repr": thanks, as i can see my mapper to type work normal? https://media.discordapp.net/attachments/371759389889003532/1168585346196451328/image.png?ex=65524ce9&is=653fd7e9&hm=4d81558158ce531c23ee3656b4dd50f06dc478320df9dca3b64bab0a0c6b8266&
16:25:04FromDiscord<Phil> In reply to @griffith1deadly "thanks, as i can": Could you rephrase that ?I don't quite understand
16:26:18FromDiscord<griffith1deadly> In reply to @isofruit "Could you rephrase that": i'm trying to convert function parameters into a separate type of object type. the code generated looks like the correct type?
16:28:00FromDiscord<e.e.7> In reply to @treeform "Windows antivirus companies are": Along these lines, I always enjoy coming back to this truly wonderful issue: https://bugs.chromium.org/p/project-zero/issues/detail?id=693↵Make sure to read `exploit.html` in comment 13 too.
16:28:06FromDiscord<Phil> I don't know typedefs of the top of my head, you're better off looking at dumptree of a similar type declaration and comparing your ast to that
16:30:51FromDiscord<treeform> In reply to @e.e.7 "Along these lines, I": Wow I’ll add that to the list of links!
16:30:53FromDiscord<griffith1deadly> In reply to @isofruit "I don't know typedefs": my code as ast and output from dumpTree is the same, but the output via repr typesections looks unformatted, i think maybe I'm doing something wrong, but compilation is going fine.
16:34:38FromDiscord<Phil> In reply to @griffith1deadly "my code as ast": The ast is what matters, formatting being of is just the repr proc being weird
16:39:26FromDiscord<Chronos [She/Her]> In reply to @griffith1deadly "my code as ast": Would `treeRepr` be better?
16:40:22FromDiscord<Chronos [She/Her]> sent a code paste, see https://paste.rs/O58gs
16:44:30FromDiscord<griffith1deadly> In reply to @chronos.vitaqua "Would `treeRepr` be better?": treeRepr for NimNode dont work, which is why I asked the question.
16:44:41FromDiscord<Chronos [She/Her]> It doesn't? Huh...
16:45:15FromDiscord<Chronos [She/Her]> https://nim-lang.org/docs/macros.html#treeRepr,NimNode it accepts a NimNode though
16:46:01FromDiscord<griffith1deadly> oh, i used dumpTree, and I'm talking about treeRepr, checked - it works, thanks!
16:46:14FromDiscord<Chronos [She/Her]> No worries! :D
16:48:21FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=4Kna
16:49:29FromDiscord<Chronos [She/Her]> Not sure, tho iirc that'll be deprecated eventually, look at `std/macrocache`
16:50:15FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4Knc
16:53:34FromDiscord<griffith1deadly> In reply to @chronos.vitaqua "Not sure, tho iirc": what in the case of macrocache should I use?↵my idea is that from all the labeled functions by my pragma I can create only one types section.
16:59:05FromDiscord<Phil> Out of curiosity griffith, you also now newly experimenting with macros?
16:59:08FromDiscord<Phil> (edit) "macros?" => "macros 😄 ?"
17:02:56*derpydoo quit (Read error: No route to host)
17:03:23FromDiscord<griffith1deadly> In reply to @isofruit "Out of curiosity griffith,": aha, yes, i want to make a good system of autoparsing objects from js to call Nim procedures through jsony. and allow conversion with the possibility of using complex and complex types, by mark procedure with pragmas. i wanted to generalize the parameters of such functions into one type, then already convert json string into an object, and call the original procedure by fields
17:03:57FromDiscord<griffith1deadly> In reply to @griffith1deadly "aha, yes, i want": this would have to be used in conjunction with webview2 bindings
17:04:53*derpydoo joined #nim
17:05:25FromDiscord<Chronos [She/Her]> In reply to @griffith1deadly "what in the case": It's just a way to store data at compile time basically, that's it
17:05:44FromDiscord<Chronos [She/Her]> Compile time as in during the VM and such where it unrolls macros
17:06:04FromDiscord<Phil> In reply to @griffith1deadly "aha, yes, i want": Cool to see yet another person joining the macro folk 😄
17:06:28FromDiscord<griffith1deadly> In reply to @chronos.vitaqua "It's just a way": then I will have to make an "inline" of this type section myself somewhere?
17:26:20FromDiscord<Chronos [She/Her]> In reply to @griffith1deadly "then I will have": As long as your macro pastes uses the body then it's fine I think
17:45:41*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
17:45:58*ehmry joined #nim
17:56:55*CO2 quit (Quit: WeeChat 4.1.1)
18:17:25*rockcavera quit (Remote host closed the connection)
18:19:30*rockcavera joined #nim
18:36:15*LuxuryMode quit (Quit: Connection closed for inactivity)
18:47:32*CO2 joined #nim
19:14:47FromDiscord<Chronos [She/Her]> What's the difference between Ed25519 and Curve25519? Apparently the latter can be used for encryption and decryption, while the former is solely for signature verification
19:15:21FromDiscord<Chronos [She/Her]> I need to be able to use the public key to encrypt data, and the private key to decrypt data, so I assume Curve25519 is what I want?
19:15:24FromDiscord<Chronos [She/Her]> Unless I'm missing something
19:19:14FromDiscord<Chronos [She/Her]> Realised I can rework this so it's slightly different
19:21:58FromDiscord<Chronos [She/Her]> https://cryptobook.nakov.com/digital-signatures/eddsa-sign-verify-examples this... Is confusing me now, so I only need the private key for signing?
19:22:49FromDiscord<Chronos [She/Her]> Okay I think I'm just misunderstanding this tbh
19:23:22FromDiscord<odexine> signing/verifying is kinda basically the inverse of encrypting/decrypting
19:24:08FromDiscord<Chronos [She/Her]> Okay so, if I sign data, does that mean verifying that signed data will only work for valid data? What if the message is different but still signed with that private key?
19:24:21FromDiscord<odexine> where signing is basically "encrypting with the private key" and verifying is "decrypting with the public key"
19:24:41FromDiscord<odexine> In reply to @chronos.vitaqua "Okay so, if I": ? valid data?
19:25:07FromDiscord<Chronos [She/Her]> Ah sorry, I mean if I encode a message
19:25:09FromDiscord<odexine> the message can be whatever, as long as it's signed properly
19:25:32FromDiscord<odexine> once the signature is there, any changes without resigning will cause verification to fail
19:40:04FromDiscord<Chronos [She/Her]> Okay then I don't think Ed25519 will work for me
19:40:12FromDiscord<Chronos [She/Her]> I need to compare it against another value
20:02:07FromDiscord<leorize> just use libsodium if you want ed25519
20:05:30FromDiscord<Chronos [She/Her]> In reply to @leorize "just use libsodium if": The issue is I'm not sure what to use for ensuring that a client is legit :p↵↵My idea was to have something following this https://media.discordapp.net/attachments/371759389889003532/1168641850329014362/Initial_Authentication.png?ex=65528189&is=65400c89&hm=41fa9203b6df7cc26ebc8142251435f76735ee753ea7cf7cc6b1d7480dc6963b&
20:06:12FromDiscord<Chronos [She/Her]> But I'm trying to decide what to use for encryption
20:06:18FromDiscord<Chronos [She/Her]> I could use RSA tbh...
20:06:22FromDiscord<Chronos [She/Her]> OpenSSL provides that
20:07:32*derpydoo quit (Quit: derpydoo)
20:07:41FromDiscord<leorize> wdym client is legit?
20:07:46FromDiscord<leorize> wdym client í legit?↵(@Chronos [She/Her])
20:08:41FromDiscord<leorize> if your problem domain is authentication then picking an encryption scheme is the least of your concerns
20:09:28FromDiscord<Chronos [She/Her]> I just need a way to ensure that the server isn't impersonating a different server, really
20:10:00FromDiscord<leorize> you need a trust root then
20:10:45FromDiscord<leorize> for most systems, DNS + TLS is the trust root
20:11:14FromDiscord<leorize> you can also pin the certificate, that's what browsers does for popular sites
20:11:41FromDiscord<Chronos [She/Her]> Trust root? :p
20:12:09FromDiscord<leorize> something that you implicitly trust in your system
20:12:09FromDiscord<Chronos [She/Her]> I think the chat app being decentralised would complicate things, no?
20:12:14FromDiscord<leorize> because you have to trust /something/ to bootstrap the system
20:13:12FromDiscord<leorize> no
20:13:20FromDiscord<Chronos [She/Her]> Oh then cool
20:13:50FromDiscord<leorize> TLS is always a safe pick as your trust axiom
20:13:54FromDiscord<Chronos [She/Her]> Not sure how I'd even go about implementing that though
20:14:26FromDiscord<Elegantbeef> You use one of the countless libraries that already implement it 😄
20:14:34FromDiscord<leorize> if you can connect to the server and it presents a valid certificate, then it's verified
20:16:06FromDiscord<Chronos [She/Her]> I want to be able to block an entire instance though too, my idea with that diagram above is that I could use the pubkey in a table with an ID assigned to it
20:16:10FromDiscord<leorize> in fact this is like TLS but less secure \:P↵(@Chronos [She/Her])
20:16:13FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "You use one of": Such as? :p
20:17:11FromDiscord<Elegantbeef> Just block instances based off domain or ip
20:17:12FromDiscord<leorize> I'd recommend not muddling security details like authentication and key exchange with other properties of the system
20:18:09FromDiscord<leorize> and if you block a server via its pubkey, they can just spin another one with a different pubkey
20:18:19FromDiscord<Chronos [She/Her]> True
20:18:32FromDiscord<Chronos [She/Her]> In reply to @leorize "I'd recommend not muddling": Not sure what you mean by this though?
20:18:33FromDiscord<leorize> it's trivial to generate a keypair compared to grabbing a new domain/IP
20:18:44FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "Just block instances based": Blocking domain is probably smart
20:18:52FromDiscord<Elegantbeef> There is no solid way of blocking a decentralised system
20:19:09FromDiscord<Chronos [She/Her]> In reply to @leorize "it's trivial to generate": VPNs plus home routers though? Blocking by domain is probably alright
20:19:10FromDiscord<Elegantbeef> If you are so worried about people that you blocked interacting with you, use a whitelist instead of a blacklist
20:19:24FromDiscord<Chronos [She/Her]> Yeah was about to say I was gonna do that too :p
20:19:44FromDiscord<leorize> don't try to design a security system that does N things at once without cryptography experience↵(@Chronos [She/Her])
20:19:45FromDiscord<Elegantbeef> Why "too"
20:19:52FromDiscord<Elegantbeef> If you have a white list there is no reason to do anything else
20:20:14FromDiscord<leorize> VPNs are not magic, you can find the IP ranges for almost all VPN services online↵(@Chronos [She/Her])
20:20:18FromDiscord<Chronos [She/Her]> In reply to @leorize "don't try to design": Ah, yeah fair :p
20:21:08FromDiscord<leorize> also, with VPNs cutting off port forwarding, how do you think someone even reach the internet?
20:21:20FromDiscord<Elegantbeef> It's decentralised I can spool up a VPS or just self host on a network if I wanted to briefly bypass any blocks if you do not use a whitelist
20:21:21FromDiscord<Chronos [She/Her]> Oh VPNs cut that off?
20:21:52FromDiscord<Elegantbeef> So it's pretty moot to be that worried about blocked people
20:22:18FromDiscord<Chronos [She/Her]> The only thing I need to know now then, is how I'd make sure a TLS certificate is valid
20:22:29FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "So it's pretty moot": Fair enough :p
20:22:52FromDiscord<leorize> that's a part of the TLS handshake and many implementations does it for you
20:22:53FromDiscord<Elegantbeef> Isnt this what libraries that have SSL provides you?
20:23:50FromDiscord<Chronos [She/Her]> Oh, I would've thought I'd have to check that somehow myself
20:25:06FromDiscord<leorize> you used to
20:25:09FromDiscord<leorize> then turns out no one knows how to do it correctly
20:25:17FromDiscord<Chronos [She/Her]> Lol
20:26:19FromDiscord<Chronos [She/Her]> Though last issue is how do I know if it's a blocked domain? I assume I just have to have them pass me their domain as a string and make any requests to that?
20:26:46FromDiscord<Chronos [She/Her]> Then make any requests I need to make, back to them?
20:27:12FromDiscord<leorize> you just... have a block list?
20:27:33FromDiscord<leorize> and if you want to connect to them you need to domain to begin with, no?
20:27:37FromDiscord<Chronos [She/Her]> I don't know how I'd know what the domain is in the first place though?
20:27:53FromDiscord<Chronos [She/Her]> In reply to @leorize "and if you want": The request has to be initiated by one side
20:28:23FromDiscord<leorize> now i'm confused
20:28:28FromDiscord<leorize> how do you even initiate a connection in your architecture
20:31:17FromDiscord<Phil> asyncdispatch as a module just sucks the life out of me looking at it
20:31:54FromDiscord<Chronos [She/Her]> A user (from a Userspace) joins a Serverspace, so the Userspace has to send a request to the Serverspace that a user wants to join, and then the Serverspace should connect to the websocket send in the request from a Userspace
20:32:01FromDiscord<Chronos [She/Her]> That's how I imagined it at least
20:32:55FromDiscord<leorize> right, so what do you use to get the address to this serverspace?↵(@Chronos [She/Her])
20:33:42FromDiscord<Phil> It's got a ton of docs, but a fair few bits of information are missing and apparently you can't add them because they're only true in like half the cases the the type gets used as (from the way it looks to me) it gets used wrongly sometimes (explicitly speaking: Callback)
20:33:43FromDiscord<Chronos [She/Her]> It'd have to be user input since the user would join from a URL
20:33:58FromDiscord<Phil> (edit) "the" => "that"
20:34:03FromDiscord<Phil> (edit) "It's got a ton of docs, but a fair few bits of information are missing and apparently you can't add them because they're only true in like half ... that" added "the cases" | removed "cases the"
20:34:31FromDiscord<Elegantbeef> What do you mean phil?
20:34:34FromDiscord<leorize> I think you found your domain↵(@Chronos [She/Her])
20:34:43FromDiscord<Chronos [She/Her]> Ah
20:34:53FromDiscord<Elegantbeef> Yea chronos think about mastodon or matrix
20:35:08FromDiscord<Chronos [She/Her]> But the Serverspace is the one that has to block the Userspace :p
20:35:16FromDiscord<Chronos [She/Her]> So the Serverspace has the domain so it should be fine
20:35:18FromDiscord<Chronos [She/Her]> I think
20:35:26FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "Yea chronos think about": Idk how either works
20:35:35FromDiscord<Elegantbeef> Your first domain is got by word of mouth or your selfhosted instance
20:35:35FromDiscord<Elegantbeef> Why is the server space blocking userspace?
20:35:36FromDiscord<leorize> what is an userspace?
20:35:48FromDiscord<leorize> this is why chronos is better btw↵(@Phil)
20:35:59FromDiscord<Elegantbeef> So look at them
20:36:11FromDiscord<Phil> sent a long message, see http://ix.io/4Ko4
20:36:13FromDiscord<Elegantbeef> They're widely used decentralized programs
20:36:24FromDiscord<leorize> xmpp too if you want something that almost become the universal IM protocol
20:36:30FromDiscord<Phil> Well turns out the bool only means something in 3/4 cases where callback is used
20:36:50FromDiscord<Elegantbeef> You register to a homeserver or instance, then you block a user, when the message is forwarded to all waiting clients you check if they have that user blocked
20:36:51FromDiscord<leorize> wait until you look at the windows callback code lol
20:36:57FromDiscord<Elegantbeef> Afaik all interactions are done on server side
20:37:13FromDiscord<Phil> So you can't add a doc comment that says that the Callback bool means "if true, do not repeat execution, if false do repeat execution" (or the other way round, I honestly don't remember, the way that bool is used makes no sense to me)
20:37:16FromDiscord<Elegantbeef> Both Mastodon and Matrix do the `[email protected]`
20:37:49FromDiscord<Phil> Because it's wrong in the 4th case (with `addProcess`)
20:38:38FromDiscord<Elegantbeef> Well time to fix it all Phil, throw darts until shit works 😛
20:38:49FromDiscord<Phil> And if you added the docs to `Callback` it'd raise the expectation that it behaves this way also with `addProcess`, which it won't
20:38:51FromDiscord<leorize> or just get chronos in to replace asyncdispatch already \:P
20:39:02FromDiscord<Elegantbeef> That's at least how I PR to anything
20:39:16FromDiscord<Phil> I contribute to like 3 packages at the moment, like, just no
20:39:45FromDiscord<Phil> The plan was to make a docs PR to improve the situation a bit for an area where I recently learned a bit and wanted to add the information
20:39:59FromDiscord<Phil> And apparently now that's not possible without refactoring the actual code
20:40:13FromDiscord<Phil> And that just kills energy
20:40:14FromDiscord<Elegantbeef> Oh noes 3 packages 😛
20:40:15FromDiscord<Elegantbeef> Leo I thought you're supposed to say "Just use CPS"
20:40:17FromDiscord<leorize> I would but that hasn't fly for awhile right?
20:40:19FromDiscord<Elegantbeef> No clue
20:40:34FromDiscord<leorize> technically I could write an asyncdispatch shim for nim-sys
20:40:34FromDiscord<Elegantbeef> I used CPS once to replace closure iterators then realised it was not any better
20:40:35FromDiscord<Phil> In reply to @Elegantbeef "Oh noes 3 packages": For me that's a lot because that kind of multitasking basically kills my brain
20:40:58FromDiscord<Elegantbeef> All I needed was my own `asClosure` for my WM's iterators
20:41:05FromDiscord<Elegantbeef> Oh I'm just kidding of course Phil, I live in disarray
20:41:09FromDiscord<leorize> yea cps is not made for closure iters
20:42:05FromDiscord<Elegantbeef> I did use it here https://github.com/beef331/goodwm/blob/master/src/goodwm/layouts.nim#L162-L175 before revisting goodwm to make it compile and sorta work in 2.0
20:42:17FromDiscord<Elegantbeef> Now as you can see I just use my own closure generator macro and it's pretty nice
20:42:52FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "Why is the server": Because users are stored on the Userspace, a Userspace is basically the auth server↵↵A Serverspace is where servers (where people can talk) are stored
20:42:56FromDiscord<Phil> I may just use chronos going forward and rather contribute to the situation getter better there (I mean, if I touch async in nim again at some point, that tends to happen more by accident or when I have a curious phase)
20:43:09FromDiscord<Phil> And assuming there even is anything that needs contributing
20:43:22FromDiscord<Elegantbeef> That seems silly
20:43:32FromDiscord<leorize> please give nim-sys a try \:)↵(@Phil)
20:43:40FromDiscord<Elegantbeef> I don't know how matrix or mastodon are structured there, but it really does seem like the wrong way about it
20:43:43FromDiscord<Phil> (edit) "And assuming there even is anything that needs contributing ... " added "that an unknown can help with"
20:44:04FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "So look at them": Look at what? Did the bridge drop something?
20:44:09arkanoidI'm practicing in wrapping a C library using move semantics, so I have to use =hooks and sink/lent
20:44:12FromDiscord<Elegantbeef> You send actions to a server the server does what you tell it, why do you need two degrees of seperation
20:44:18FromDiscord<leorize> I think you're doing it the wrong way around↵(@Chronos [She/Her])
20:44:25arkanoidbut how can I test if my solution os memory safe
20:44:30FromDiscord<Elegantbeef> Look at Matrix/Mastodon
20:44:52FromDiscord<Elegantbeef> Valgrind
20:44:58FromDiscord<Elegantbeef> Though using move semantics with C is questionable unless the C tells you that it takes ownership
20:45:08FromDiscord<Elegantbeef> Depending what you mean there
20:45:15FromDiscord<Phil> ~~I wish I could actually read Valgrind output~~
20:45:21FromDiscord<Elegantbeef> If you mean using destructors for C allocated resources it's fine
20:45:33FromDiscord<leorize> some C libraries have built-in reference counting
20:45:36FromDiscord<Elegantbeef> But if you mean giving up Nim allocated resources to C code it's questionable
20:45:51arkanoidElegantbeef, yeah the API clearly express ownership in documentation
20:45:53FromDiscord<leorize> it's easy, if it says "no problem", you don't care, if it says "unreachable resource found", your code is leaking↵(@Phil)
20:45:55FromDiscord<Elegantbeef> `--debugger:native -d:useMalloc`
20:46:14FromDiscord<Elegantbeef> This isnt wasmer is it?
20:46:14FromDiscord<Elegantbeef> Or WasmEdge...
20:46:19FromDiscord<Chronos [She/Her]> In reply to @leorize "I think you're doing": How so? Serverspace instances need to be able to block Userspace instances in case they're just full of spam bots
20:46:29FromDiscord<Elegantbeef> Forget which wasm runtime used a `#define own`
20:46:43FromDiscord<Elegantbeef> That seems wrong
20:46:55FromDiscord<Elegantbeef> You have a whitelist in the first place
20:46:59FromDiscord<leorize> what I meant is that your separation sounds wrong
20:47:07FromDiscord<Phil> In reply to @leorize "it's easy, if it": hmmmmm I mean I have an owlkettle example that I'm almost certain leaks memory that should serve as a true positive to test against, I'll see whether that tracks
20:47:11FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "You send actions to": So bake it into one? I was thinking it'd be nice to make the Userspace reusable in any other project that needs an account system aha
20:47:29FromDiscord<Chronos [She/Her]> In reply to @leorize "what I meant is": Ah, so I should just merge the two components instead then?
20:47:42FromDiscord<Elegantbeef> If you do ask for permission you can never have a spam instance that you did not permit
20:47:55FromDiscord<Chronos [She/Her]> That is what I'll be doing
20:48:09FromDiscord<leorize> the big fallacy in \~\~distributed\~\~ software is thinking that you can just "reuse"↵(@Chronos [She/Her])
20:48:23FromDiscord<Chronos [She/Her]> In reply to @leorize "I think you're doing": I was confused from this message aha
20:48:39FromDiscord<Elegantbeef> You're better off just adding auth tokens for logins on other platforms 😄
20:48:42FromDiscord<leorize> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1168652582080749588): the big fallacy in ~~distributed~~ software is thinking that you can just "reuse"
20:49:16FromDiscord<Elegantbeef> "Login with your BlehInstance account"
20:49:21FromDiscord<Chronos [She/Her]> In reply to @leorize "[Edit](https://discord.com/channels/371759389889003": It'd need modifications of course but if most of the initial code is done, why would it be an issue to just rework some aspects to my needs for a later project?
20:49:35FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "You're better off just": Like GitHub?
20:49:52arkanoidI wonder if Nim program can measure used heap and use it in testcases, like "assert noHeapUsed()"
20:50:01FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Ko8
20:50:01FromDiscord<Elegantbeef> But yea arkanoid if you allocate using Nim's allocator the move semantics are not 'valid'
20:50:14FromDiscord<Elegantbeef> I mean implementing your own auth token login system for your server instance
20:50:47FromDiscord<Elegantbeef> Did you compile with `--debugger:native -d:useMalloc`?
20:51:06FromDiscord<Phil> Ah, forgot the malloc
20:51:09FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "I mean implementing your": I still don't understand... 😅
20:51:10FromDiscord<Elegantbeef> Also worth noting since you're using libgtk/libadwaita if they do not use the system's malloc it won't be tracked
20:51:23FromDiscord<leorize> because fully grasping your problem domain requires extensive experimentation↵(@Chronos [She/Her])
20:51:25FromDiscord<Elegantbeef> It'll be slow as all balls to start
20:51:29FromDiscord<leorize> and you must be ready to throw it all and redo
20:51:30FromDiscord<Elegantbeef> But it'll eventually start
20:51:49FromDiscord<leorize> if you focus too much on "reuse", you usually end up with something that is not fit for any purposes
20:52:05FromDiscord<Phil> In reply to @Elegantbeef "Did you compile with": Recompiled, still started like that 😄
20:52:23FromDiscord<Elegantbeef> I'm saying chronos just like the "login with github" or "login with google" you add the abillity to do "login with your chat server" 😛
20:52:26FromDiscord<Elegantbeef> I'm almost 100% kidding
20:52:29FromDiscord<Phil> And yeah, I remember it being slow as mollases, like "minutes" to start up
20:52:30FromDiscord<leorize> note that leak report is only shown at exit
20:52:42FromDiscord<Elegantbeef> Of course it'll start like that
20:52:44FromDiscord<Chronos [She/Her]> In reply to @leorize "if you focus too": Fair enough
20:52:46FromDiscord<Elegantbeef> valgrind is slow as balls on big things
20:52:47*neceve joined #nim
20:53:16FromDiscord<leorize> leaksanitizer is a simpler one to use if speed is of concern
20:53:18FromDiscord<Phil> Beef, this is a gtk app consisting of like... two dozen widgets total and one of those widgets is the window itself
20:53:37FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "I'm saying chronos just": Ooooh so OAuth login shit but implemented on my chat server, then allow people to be able to login with other chat servers?
20:54:10FromDiscord<leorize> valgrind can/will give you a 4x slowdown
20:54:10FromDiscord<Chronos [She/Her]> In reply to @isofruit "Beef, this is a": Isn't GTK pretty big?
20:54:26FromDiscord<leorize> address sanitizer is slightly better that it's usually 2x
20:54:49FromDiscord<Phil> In reply to @chronos.vitaqua "Isn't GTK pretty big?": Maaaaybe but you're also not compiling in a small subset of GTK and
20:54:54FromDiscord<Elegantbeef> Sorta chronos, but the entire point of decentralised is you do not need to do that 😛
20:54:57FromDiscord<leorize> if leaks are the only thing you care about then try leak sanitizer
20:55:19FromDiscord<Chronos [She/Her]> In reply to @isofruit "Maaaaybe but you're also": Fair
20:55:27FromDiscord<Phil> In reply to @leorize "valgrind can/will give you": If it were only 4x...
20:55:37FromDiscord<leorize> note that valgrind will audit /all/ memory addresses
20:55:39FromDiscord<Elegantbeef> The point was if you really wanted to reuse the account server you could add OAuth, and just disable the http side
20:55:57FromDiscord<Chronos [She/Her]> Aah
20:55:58FromDiscord<Elegantbeef> Feels like atleast 30 times slowdown with GUI programs
20:56:17FromDiscord<leorize> it depends on your memory address pattern
20:56:22FromDiscord<Elegantbeef> I've used valgrind on my game that uses SDL and Opengl, it takes forever to boot
20:56:24FromDiscord<leorize> the pointer chasing of modern GUI is definitely not gonna help
20:56:40FromDiscord<Elegantbeef> We're not even talking about running
20:56:55FromDiscord<Chronos [She/Her]> Okay, so to make it clear for my eternally chaotic mind, could a summary be made?- I'm kinda slow aha
20:56:56FromDiscord<Elegantbeef> Even just initialising it's slow
20:57:05FromDiscord<Elegantbeef> And my games are all DOD'd
20:57:06FromDiscord<Chronos [She/Her]> I feel like that'd be obvious by now but
20:57:25FromDiscord<Elegantbeef> Summary of what?
20:58:05FromDiscord<Elegantbeef> Nuke userspace(it was horridly named anyway), all interaction happens server side and propagate to users that are listening
20:58:10FromDiscord<Elegantbeef> Userspace sounds like "client side" not "Authorisation Server"
20:58:35FromDiscord<Phil> In reply to @leorize "if leaks are the": They are, I'll google it
20:58:54FromDiscord<Phil> The clang thing?
20:59:25FromDiscord<leorize> `-d:useMalloc --passC:-fsanitizer=leak --passL:-fsanitizer=leak` \<- that's all you need↵(@Phil)
20:59:28FromDiscord<leorize> clang and gcc \>=12 should support it
20:59:35FromDiscord<Elegantbeef> Should work with gcc/clang iirc
20:59:44FromDiscord<Chronos [She/Her]> Of what I need to actually do, I know that:↵- I should use an allowlist instead of a denylist↵- Merge functionality of Serverspace and Userspace (so Supernovae, which was what I was gonna call the group of components :p)↵- And have a way for users to join instances via a link?
21:00:05FromDiscord<leorize> you get speed but less accuracy so it won't tell you where you leaked
21:00:05FromDiscord<leorize> but it will tell if you leaked
21:00:06FromDiscord<Elegantbeef> Though leo doesn't this have the same issue, it only sanitises the Nim program?
21:00:29FromDiscord<leorize> I think leak sanitizer overwrites the weak malloc symbol in the program address space
21:00:43FromDiscord<leorize> instead of modifying the source
21:00:50FromDiscord<Elegantbeef> Wonder if libgtk/libadwaita use malloc 😄
21:00:56FromDiscord<leorize> they do
21:01:03FromDiscord<Elegantbeef> Ah
21:01:18FromDiscord<Phil> In reply to @leorize "you get speed but": -fsanitize=leak?
21:01:47FromDiscord<Phil> -fsanitizer=leak causes errors
21:01:53FromDiscord<Phil> (edit) "-fsanitizer=leak causes errors ... " added "that the flag doesn't exist"
21:02:00FromDiscord<leorize> gtk is a nice library, all things considered
21:02:00FromDiscord<Elegantbeef> If only windows shipped it 😛
21:02:00FromDiscord<leorize> qt is more consistent but is layered with abstraction layers
21:02:02FromDiscord<leorize> yea↵(@Phil)
21:02:15FromDiscord<leorize> my bad, that's a typo
21:03:01FromDiscord<leorize> and the C interface doesn't exist, although there is supposedly a framework for wrapping Qt now
21:03:37FromDiscord<Phil> Ahhhh crud
21:03:39FromDiscord<leorize> still very coupled with pyqt so might require a bit of work to navigate
21:04:15FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Koe
21:04:24FromDiscord<Chronos [She/Her]> Thanks Leo and Beef for helping me iron out my stupid idea :P
21:04:37FromDiscord<Phil> Well, at least I got my suspicion confirmed
21:06:01FromDiscord<Elegantbeef> The good part is not a single one of those are inside your Nim program 😄
21:06:02FromDiscord<leorize> add `--stacktrace:off --debugger:native --passC:-fno-omit-frame-pointer` and see if you get better traces↵(@Phil)
21:06:03FromDiscord<Elegantbeef> Which means the leaks are due to resource management and not Nim bugs
21:06:26FromDiscord<leorize> bold of you to assume that destructors is bug-free \:P
21:06:37arkanoidwait, I'm confused now. Should I use valgrind or -fsanitize=leak
21:06:43FromDiscord<Elegantbeef> Oh I know it's not bug free
21:06:50FromDiscord<Elegantbeef> valgrind gives more detail
21:07:04FromDiscord<Elegantbeef> It will tell you where resources were allocated
21:07:12FromDiscord<leorize> and this is my favorite tool for profiling memory\: https://github.com/KDE/heaptrack
21:07:15FromDiscord<Elegantbeef> Not as useful when you're not allocating inside Nim
21:07:17FromDiscord<leorize> infinitely faster than massif
21:07:46FromDiscord<Elegantbeef> I generally profile memory by using a microscope and a tally count
21:08:21FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Kof
21:08:35FromDiscord<Phil> Compiled with:↵` nim c --path:. -d:useMalloc --passC:-fsanitize=leak --passL:-fsanitize=leak --stacktrace:off --debugger:native --passC:-fno-omit-frame-pointer ./examples/widgets/video.nim`
21:09:00FromDiscord<leorize> heaptrack can do leaks too and it's faster than valgrind
21:09:05FromDiscord<leorize> so you can try running with that
21:09:20FromDiscord<Phil> That's a program for a change I assume?
21:09:29FromDiscord<Phil> Ah you linked it up above
21:09:50FromDiscord<Phil> Oh hey its in the arch repo
21:10:00FromDiscord<Phil> And jesus christ that's a lot of dependencies
21:10:09FromDiscord<leorize> it's a kde program
21:10:34FromDiscord<Phil> I use gnome mostly, I'm not that used to having a program come with like 30 dependencies immediately
21:11:20NimEventerNew thread by lou15b: Changing an object's field is rejected in a destructor with new syntax, see https://forum.nim-lang.org/t/10580
21:11:21FromDiscord<Phil> Should I compile the binary with anything fancy before I launch it with heaptrack?
21:11:29FromDiscord<Elegantbeef> Me overhere using awesome wm and using gnome and kde programs
21:11:40FromDiscord<leorize> turn sanitizer off \:P↵(@Phil)
21:11:51FromDiscord<leorize> keep debugger and no-omit-frame-pointer
21:11:54FromDiscord<leorize> and useMalloc
21:12:15FromDiscord<Phil> stacktrace:off (why off?) ?
21:12:31FromDiscord<leorize> because it inserts unnecessary filler code
21:12:55FromDiscord<leorize> the trace accounting is a nim-specific thing so none of these tools can read it
21:14:41FromDiscord<Phil> I have a large fascinating window now! https://media.discordapp.net/attachments/371759389889003532/1168659259806994452/image.png?ex=655291c0&is=65401cc0&hm=24ff4524ac13a281c7148db910ff04b994acd8950d97cb94b84fb795f15d0a6b&
21:14:45FromDiscord<Elegantbeef> To add, given that you are not attempting to debug Nim problems, it's just a bunch of extra nuisance that will not aid you
21:14:57FromDiscord<Phil> Based on that gtk is doing all the leaks but I'm like 60% sure that's due to wrong useage on the nim end
21:15:06FromDiscord<Elegantbeef> Lol you leaked 90% of the memory
21:15:13FromDiscord<Elegantbeef> 99%
21:15:30FromDiscord<leorize> yea you don't have a good trace
21:15:32FromDiscord<Phil> The leak was large enough for me to notice within task manager
21:15:43FromDiscord<Phil> I anticipated something like that
21:16:09FromDiscord<leorize> check the tree to see if there's any helpful traces
21:16:54FromDiscord<Phil> By tree you mean the ... bottom-up tab since that has expandable entries in a listß
21:16:55FromDiscord<Phil> (edit) "listß" => "list?"
21:17:23FromDiscord<Phil> Oh hey, a Flamegraph
21:17:24FromDiscord<leorize> yea the next 3 tabs have different view of the call tree
21:17:43FromDiscord<Chronos [She/Her]> Is there any reason to encrypt a user's email with a secret? If the database has been leaked, wouldn't it already mean that they likely have the key?
21:17:51FromDiscord<Chronos [She/Her]> Secret
21:17:56FromDiscord<leorize> you might need to use an another distro for dev to get better traces
21:18:34FromDiscord<leorize> ie. run a fedora distrobox
21:18:48FromDiscord<leorize> arch strips all debug info and frame pointers so a lot of call data might be lost there
21:18:53FromDiscord<Phil> Err... any keys to identifying "helpful traces"ß
21:18:55FromDiscord<Phil> (edit) "traces"ß" => "traces"?"
21:19:03FromDiscord<Phil> Basically look for somewhere where it mentions my own code?
21:19:45FromDiscord<leorize> if you can put up with it, maybe valgrind can give you an insight \:P
21:20:15arkanoidheaptrack seems really nice
21:20:30FromDiscord<leorize> is this code of yours public? I have a fedora box here that I can try to run for you
21:20:40FromDiscord<Phil> I mean, generally the libgstreamer stuff seems to be the main culprit https://media.discordapp.net/attachments/371759389889003532/1168660767193710652/image.png?ex=65529327&is=65401e27&hm=2056805179a0257cfe65b3f244e65bba6eb24eba5e9398d6d9cffacf80143502&
21:20:55FromDiscord<Phil> In reply to @leorize "is this code of": Yeah, it's already in owlkettle. Or rather the example in question that leaks as hell is in owlkettle
21:20:56FromDiscord<Chronos [She/Her]> I need to figure out how to properly sort my code oof, right now I'm keeping all types in one file, but if I move them into their own files I wouldn't even know how to name or organise them
21:21:11FromDiscord<Phil> One sec, looking for it
21:21:16FromDiscord<leorize> sounds like you might not be cleaning up your video widgets properly?
21:21:28FromDiscord<Phil> https://media.discordapp.net/attachments/371759389889003532/1168660971301130240/image.png?ex=65529358&is=65401e58&hm=59a937d989eee96f41b55f97327054dcc9b59856c2aa8fa25c16f049c963a95f&
21:21:35FromDiscord<Phil> https://github.com/can-lehmann/owlkettle/blob/main/examples/widgets/video.nim
21:22:02FromDiscord<Phil> Actually that is a good point, I don't think any of the widgets have destructors
21:22:18FromDiscord<Phil> Immaterial to this point in particular because mediastream does have destructors
21:23:03FromDiscord<Phil> Let me get the links to the video widget and the wrapped mediastream code and type
21:23:29FromDiscord<Elegantbeef> Widgets are refs they'd need finalizers or the manual thing you've done for things for custom dealloc
21:23:53FromDiscord<Phil> sent a long message, see http://ix.io/4Koi
21:23:55*derpydoo joined #nim
21:24:07FromDiscord<Phil> In reply to @Elegantbeef "Widgets are refs they'd": Define finalizer, you mean destructor hooks?
21:24:52FromDiscord<Phil> Note:↵The Video widget takes ownership over the MediaStream
21:25:20FromDiscord<Phil> Actually that's a lie, it doesn't, hmm
21:25:26FromDiscord<Elegantbeef> No nim allows you to do `new(T, finalizer)` to set a global finalizer for `T`
21:25:31*neceve quit (Ping timeout: 255 seconds)
21:25:46FromDiscord<Elegantbeef> This is how one did destructors for refs before 2.0
21:25:57FromDiscord<Phil> Er... does that work for inheritance?
21:26:02FromDiscord<leorize> I got you some traces
21:26:04FromDiscord<leorize> it's not pretty
21:26:06FromDiscord<Elegantbeef> It should work
21:26:18FromDiscord<Phil> So `new(GtkWidget, <finalizer>)`?
21:26:29FromDiscord<Phil> In reply to @leorize "it's not pretty": As in everything is wrong or as in hard to read ?
21:26:40FromDiscord<Elegantbeef> Yea, but I'd suggest just doing the manual technique in a macro
21:27:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Kok
21:28:01FromDiscord<leorize> hard to read↵(@Phil)
21:28:24FromDiscord<leorize> but the traces are infinitely better than the one you got on arch \:P
21:28:25FromDiscord<Phil> Hmm we might get away with defining that for using `WidgetState` for `GtkWidgetImpl` since that contains a ref to the actual GtkWidget on its `internalWidget` field
21:28:52FromDiscord<Phil> I'll take the file and look over it, I'd love to not leak memory like a sieve for that widget.↵The only reason we added it was that we concluded that the problem must lie in GTK
21:29:47FromDiscord<leorize> trace.log https://media.discordapp.net/attachments/371759389889003532/1168663062279106581/trace.log?ex=6552954a&is=6540204a&hm=63bf9d0dd7f02a079fd7aa0cdf0f16e500ff8ba68ee3d995014e972430541e6b&
21:30:29FromDiscord<leorize> there's nim code in this trace
21:30:54FromDiscord<leorize> you should consider running a fedora distrobox for this kind of work
21:31:15arkanoidwhats wmt
21:31:23FromDiscord<Phil> HmmI do have Boxes installed
21:31:39FromDiscord<leorize> use distrobox
21:31:42arkanoidwhat's the difference from nim allocator and useMalloc?
21:31:47FromDiscord<leorize> it's container-based and don't require a VM
21:31:59FromDiscord<leorize> malloc is the C allocator↵(<@709044657232936960_arkanoid=5b=49=52=43=5d>)
21:37:40FromDiscord<leorize> @Phil I can DM you my heaptrack output if you're interested
21:37:51FromDiscord<leorize> this stuff have lineinfo, unlike that trace
21:39:53FromDiscord<Phil> In reply to @leorize "<@180601887916163073> I can DM": I got nothing to loose and everything to gain.↵Like something to cross reference for when I setup distrobox on arch.↵For the most part though, I'll have to look at it tomorrow because this feels like it requires more brainpower than I have after a workday at 10pm
21:42:44FromDiscord<Phil> Ah, I was supposed to load that file into the heaptrack GUI, gotcha
21:43:55FromDiscord<Phil> Okay, stuff for tomorrow, currently still no clue how to read this compared to the trace.log
21:45:34FromDiscord<leorize> I managed to run this in valgrind and lol there's even memory corruption
21:46:00FromDiscord<leorize> but that might just be gtk problem and not yours
21:46:45FromDiscord<Elegantbeef> There has to be a fallacy about the quality of well used software
21:47:15FromDiscord<Elegantbeef> "Popular software does not give any merit in the quality of the implementation" 😄
21:47:16FromDiscord<Phil> I mean, I'd bet on wrong useage of GTK
21:47:26FromDiscord<Phil> On our end
21:47:46FromDiscord<Elegantbeef> I don't doubt it, if you are not destroying the owned GTK resources when the ref goes out of scope
21:57:51FromDiscord<System64 ~ Flandre Scarlet> https://github.com/Flix01/imgui/wiki/ImGui-Addons-Branch-Home↵Might be interesting to make bindings for this
22:01:38FromDiscord<Chronos [She/Her]> I wish Debby could have stuff like unique fields tbh, would be useful
22:01:38*deadmarshal_ quit (Remote host closed the connection)
22:07:50FromDiscord<Chronos [She/Her]> Is there any way to view older docs and such? Curious aha
22:17:21FromDiscord<Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4Kou
22:18:16arkanoidmost of the articles about valgrind vs sanitizers says that sanitizers are better because they can detect more thanks to source code and compiler magic, while valgrid is when you just have the executable
22:18:24FromDiscord<Elegantbeef> `var meh{.cursor.} = ...`
22:19:09FromDiscord<Chronos [She/Her]> `cursor`?
22:19:34FromDiscord<Elegantbeef> https://nim-lang.org/docs/destructors.html#the-cursor-pragma
22:19:53FromDiscord<Chronos [She/Her]> Ah epic, thanks!
22:20:57FromDiscord<Chronos [She/Her]> Hm
22:21:07FromDiscord<Chronos [She/Her]> The comment said `# don't copy on assignment for performance` for `encstr.shallow`
22:22:35FromDiscord<Chronos [She/Her]> I mean that small test seems to work...?
22:23:07FromDiscord<Elegantbeef> With 2.0 aslong as you do not mutate the string it probably implicitly cursors it
22:23:10FromDiscord<Chronos [She/Her]> Oh epic both tests pass now
22:24:03FromDiscord<Chronos [She/Her]> In reply to @Elegantbeef "With 2.0 aslong as": The code assigns that string to an object so
22:24:09FromDiscord<leorize> you should use an established library like libsodium for all crypto purposes
22:25:06FromDiscord<Chronos [She/Her]> Ah alright then, I was just gonna use this because it compiles the original source and such but I'll use libsodium then
22:31:15FromDiscord<Chronos [She/Her]> I'm going to struggle to implement this in a way that isn't going to slow down my entire program :p
22:32:47FromDiscord<leorize> make it work then make it fast
22:33:08FromDiscord<leorize> make it fast right away requires experiences that you don't have yet \:P
22:33:51FromDiscord<Chronos [She/Her]> Fair lol
22:33:58FromDiscord<Chronos [She/Her]> This looks a bit tricky
22:34:03FromDiscord<Chronos [She/Her]> The libsodium API :p
22:34:06FromDiscord<Chronos [She/Her]> Just confusing
22:35:53*advesperacit quit ()
22:40:57NimEventerNew thread by AntonioFS: Mismatch Nim Documentation Regarding 32-bit Floating-Point Literals., see https://forum.nim-lang.org/t/10581
22:44:44FromDiscord<Chronos [She/Her]> Ah my version of libsodium is too new :/
22:54:00FromDiscord<Chronos [She/Her]> I just made a symlink for `libsodium.so.26` to `libsodium.so.23`, only during etsting
22:54:04FromDiscord<Chronos [She/Her]> testing lol
22:56:27FromDiscord<leorize> shouldn't the libsodium wrapper link to the newest version?
22:57:13FromDiscord<leorize> when the soname changes it means the ABI/API contracts might have been broken, so I'd recommend against symlinking
22:57:34FromDiscord<leorize> (ie. function now takes 3 parameters instead of 2)
23:00:56arkanoidI just tested that gcc sanitizer does not need -debugger:native nor --debuginfo, but just -d:useMalloc. What are these two param really doing?
23:01:38arkanoidit seems to me that are just to change the debugger output to represent nim lines, instead of c ones
23:02:15FromDiscord<Elegantbeef> The debugger param adds debug information in the generated code which can be used by tooling for source line information
23:02:55arkanoidand debugger:native
23:02:58arkanoid?
23:03:13FromDiscord<Elegantbeef> That's what I talked about
23:03:52FromDiscord<Chronos [She/Her]> In reply to @leorize "shouldn't the libsodium wrapper": https://github.com/FedericoCeratto/nim-libsodium/tree/master most up-to-date one I know
23:04:00FromDiscord<Chronos [She/Her]> I did make an issue
23:04:02FromDiscord<Chronos [She/Her]> so
23:05:14*krux02__ joined #nim
23:05:15*krux02_ quit (Read error: Connection reset by peer)
23:05:48arkanoidoh! debugger:native flag is equivalent to specifying the --linedir:on and --debuginfo flags. Just found on nim blog
23:10:38FromDiscord<raynei486> @Chronos [She/Her] btw since you've been talking a lot about langdev this might be an interesting project for you↵https://gitlab.com/pmetras/nim0.git
23:11:44FromDiscord<Chronos [She/Her]> Oh interesting, thanks!
23:13:04*termer_ joined #nim
23:13:12*blackbeard420_ joined #nim
23:13:18*gshumway_ joined #nim
23:15:16*koltrast_ joined #nim
23:15:23*termer quit (Ping timeout: 264 seconds)
23:15:24*nmz quit (Ping timeout: 264 seconds)
23:15:24*gshumway quit (Ping timeout: 264 seconds)
23:15:31*nmz- joined #nim
23:15:45*blackbeard420 quit (Read error: Connection reset by peer)
23:17:07*koltrast quit (Ping timeout: 264 seconds)
23:18:20*lumo_e joined #nim
23:34:37*tiorock joined #nim
23:34:37*tiorock quit (Changing host)
23:34:37*tiorock joined #nim
23:34:37*rockcavera quit (Killed (mercury.libera.chat (Nickname regained by services)))
23:34:37*tiorock is now known as rockcavera
23:38:13arkanoidhow can I use "when defined(release):" block in config.nims ?
23:38:43arkanoidI want to enable set of switched depending if compiling with -d:debug or -d:release
23:38:56arkanoidif I try, they get ignored
23:50:14*blackbeard420_ quit (Quit: ZNC 1.8.2 - https://znc.in)
23:50:26*blackbeard420 joined #nim
23:56:09arkanoidhow do you setup your project to have different compilation flags for debug or release?
23:56:17arkanoiddo you create ad-hoc nimble tasks?
23:58:29arkanoidswitch(..) seems completely ignores in nimble file, so as "if defined(foo)" in config.nims file
23:59:35FromDiscord<juancarlospaco> In reply to @arkanoid "how can I use": https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L86-L94