<< 03-01-2023 >>

00:04:27FromDiscord<luteva> sent a long message, see http://ix.io/4kdo
00:04:47FromDiscord<luteva> (edit) "http://ix.io/4kdo" => "http://ix.io/4kdp"
00:05:00*krux02_ quit (Remote host closed the connection)
00:05:10*DarrylTheFish quit (Remote host closed the connection)
00:05:26FromDiscord<Elegantbeef> It's not cause type def macros cannot implement procedures
00:05:37FromDiscord<Elegantbeef> So until nim2.0 that's all you get
00:05:47FromDiscord<Elegantbeef> In nim 2.0 defaults is a feature
00:05:48FromDiscord<Elegantbeef> Doesnt even require the annotation
00:08:35FromDiscord<luteva> In reply to @Elegantbeef "It's not cause type": why not? I mean you can create procedures and call them from a macro, right? wouldn't it be possible like this?
00:08:54FromDiscord<Elegantbeef> cause the compiler doesnt allow it?
00:10:18FromDiscord<Elegantbeef> You cannot create a procedure with a typedefinition macro
00:10:22FromDiscord<Elegantbeef> It's just a fact
00:10:43FromDiscord<luteva> so the macros (and the AST you can build there) are restricted to the current scope, right?
00:11:13FromDiscord<Elegantbeef> Of course
00:11:14FromDiscord<luteva> you cannot "jump out of the scope" within the macro?
00:12:15FromDiscord<Elegantbeef> Well with typesection macros there are two issues
00:13:04FromDiscord<Elegantbeef> You need/want type information so they need to be typed which is not presently implemented, and secondly you cannot emit a procedure with them inside a typesection
00:13:27FromDiscord<Elegantbeef> If i could've made it like nim's new implicit defaults i obviously would've
00:16:12FromDiscord<luteva> ok thanks a lot!↵afaik nim new default declaration doesn't allow a procedure for generating the default value so this won't be usable in some/many cases. so i probably would still use the defaults pragma 🙂
00:17:29FromDiscord<Elegantbeef> `default(MyType)` works with it
00:18:43FromDiscord<Elegantbeef> defaults doesnt work with it, so compiler support is magic
00:18:50NimEventerNew post on r/nim by His_son: I can’t for the life of me find a rsa encryption library, see https://reddit.com/r/nim/comments/101siu9/i_cant_for_the_life_of_me_find_a_rsa_encryption/
00:19:27FromDiscord<luteva> ok i only tried using a ulid/uuid lib for genrating the default value and that didn't work (although the syntax seemed to be ok). but i didn't looked deeper into that problem.
00:20:19FromDiscord<luteva> (edit) "(although" => "using the new nim version(although"
00:21:06FromDiscord<T0lk1en> Hey guys is there an actively maintained rsa encryption library
00:22:33FromDiscord<Elegantbeef> bearssl seems to have `rsa`
00:22:52FromDiscord<Elegantbeef> It's all lowlevel api though
00:22:57FromDiscord<Elegantbeef> Atleast status' is
00:23:10FromDiscord<Elegantbeef> https://github.com/status-im/nim-bearssl/blob/master/bearssl/abi/bearssl_rsa.nim
00:23:15FromDiscord<Elegantbeef> I assume openssl also has rsa
00:24:28FromDiscord<jtv> OpenSSL does support it, but why would you use RSA? Even TLS has gotten rid of it
00:25:03FromDiscord<jtv> It's so easy to mess up, and it's no longer best practice for anything. Most things only still use it in the context of digital signatures.
00:25:25FromDiscord<Elegantbeef> Hey dont look at me, the only cryptography I've used is a ceaser cipher 😄
00:25:36FromDiscord<jtv> I'm not, I'm looking at him 🙂
00:26:00FromDiscord<T0lk1en> What would you recommend then?
00:26:10FromDiscord<jtv> What are you trying to do, and why isn't TLS suitable for it?
00:26:20FromDiscord<T0lk1en> Password manager
00:26:33FromDiscord<T0lk1en> I’m super new what’s tls
00:26:35FromDiscord<jtv> You're trying to build a password manager?
00:26:40FromDiscord<T0lk1en> Yessir
00:26:52FromDiscord<T0lk1en> And I need a way to encrypt the file that stores the passwords
00:27:38FromDiscord<jtv> I'd strongly advise you against it, there are so many subtleties to doing it right. For instance, you will need some sort of PRF that protects against brute-forcing the master password.
00:27:39FromDiscord<Rika> I already said RSA is a poor choice for this in the reddit post
00:28:03FromDiscord<Rika> There’s a lot of thought that would go into this
00:28:27FromDiscord<T0lk1en> I just want to practice
00:28:50FromDiscord<jtv> Then, you're better off starting with something more basic to be honest. What do you want to learn?
00:29:07FromDiscord<T0lk1en> My major will be cyber security
00:29:24FromDiscord<T0lk1en> So I guess stuff like that
00:29:49FromDiscord<T0lk1en> I’ve made a couple programs. A calculator, a program that Rick rolls you, a notes taking app.
00:30:20FromDiscord<Rika> In reply to @T0lk1en "My major will be": Are you already in a class for such
00:30:32FromDiscord<T0lk1en> I start this summer
00:30:36FromDiscord<jtv> Which program?
00:34:31FromDiscord<jtv> Anyway, I'd start with USING out-of-the box cryptography to do something useful first, then get deep in understanding something about it that interests you
00:34:55FromDiscord<jtv> For instance, start w/ a simple client-server app using TLS, making sure it actually does proper certificate validation.
00:35:25FromDiscord<jtv> Then, this last semester, I had my students implement a minimal subset of TLS 1.3 actually, it wasn't too bad
00:35:50FromDiscord<cow> doesn't NaCl/libsodium have constructs for most use cases
00:35:57FromDiscord<cow> so you don't need to think about picking algos
00:36:05FromDiscord<cow> (edit) "algos" => "algos/combining them into schemes"
00:36:17FromDiscord<jtv> Yeah, frankly, TLS is going to suffice for 95% of what people want to do.
00:36:30FromDiscord<T0lk1en> Cyber security/information assurance
00:36:47FromDiscord<jtv> I meant what school, but whatever 🙂
00:37:34FromDiscord<cow> In reply to @T0lk1en "Cyber security/information assurance": i recommend the blog dhole moments https://soatok.blog/
00:37:36FromDiscord<cow> you might like it
00:37:42FromDiscord<Rika> In reply to @jtv "I meant what school,": Inb4 you the prof and you fail them for divulging sensitive info
00:37:51FromDiscord<huantian> In reply to @cow "i recommend the blog": their ocs are cute
00:38:26FromDiscord<Rika> In reply to @cow "i recommend the blog": Oh this dude
00:38:30FromDiscord<Rika> Cool aristos
00:38:34FromDiscord<jtv> TLS has several big advantages over the libsodium secretsbox, but one is algorithm redundancy. Most symmetric crypto relies on an underlying assumption that the core algorithm isn't broken, but occasionally we find they are, in which case TLS makes it much easier to swap to the next algorithm
00:38:35FromDiscord<Rika> Fuck
00:38:42FromDiscord<Rika> Write ups
00:39:03FromDiscord<huantian> what do you not like about write ups lmao
00:39:10FromDiscord<Rika> I miswrote it
00:39:14FromDiscord<Rika> In reply to @Rika "Cool aristos": Here
00:39:19FromDiscord<huantian> ah
00:39:24FromDiscord<huantian> ohhh
00:39:26FromDiscord<jtv> Though I trust Dan's code a lot more than the OpenSSL code base, which is sheer garbage 🙂
00:39:28FromDiscord<huantian> lol
00:39:30FromDiscord<Rika> Swipe keyboard
00:39:38FromDiscord<Rika> Lol
00:39:46FromDiscord<cow> In reply to @jtv "Though I trust Dan's": would static linking LibreSSL solve that issue
00:39:46FromDiscord<T0lk1en> So what would be a useful. Cyber security related program to write. I hate writing programs that are just proof of concepts I want them to be useful
00:39:59FromDiscord<Rika> In reply to @cow "would static linking LibreSSL": I don’t see how
00:40:10FromDiscord<cow> if you use it instead of openSSL
00:40:25FromDiscord<Rika> Oh I misread
00:40:40FromDiscord<Rika> It could if you’re fine with an older version compatibility
00:40:53FromDiscord<jtv> I haven't looked at the libreSSL code, but I think most TLS implementations are a lot more sane than OpenSSL these days
00:41:32FromDiscord<jtv> Tho the ones that are forks still are unlikely to have fixed the absolutely overwraught byzantine nature of the code
00:41:47FromDiscord<T0lk1en> In reply to @T0lk1en "So what would be": What do you guys think?
00:42:26FromDiscord<jtv> Seriously, I wrote the OpenSSL book about 20 years ago and it made me hate the library. I have gone looking recently in the code and it's not significantly improved 🙂
00:42:32FromDiscord<huantian> In reply to @Rika "Lol": but yeah protos are cute
00:42:40FromDiscord<Rika> In reply to @T0lk1en "What do you guys": You could morph the client server idea into “write a basic browser that just prints the source code of the page, but can connect to HTTPS pages”
00:42:42FromDiscord<cow> whonix's application launcher is an interesting project imo
00:43:01FromDiscord<cow> if I actually majored in cyber security I would probably be contributing to it
00:43:08FromDiscord<jtv> Yeah, I think you could also start with finding an existing project and contributing bits to it
00:43:14FromDiscord<T0lk1en> In reply to @Rika "You could morph the": What does this mean.
00:43:18FromDiscord<Rika> In reply to @cow "if I actually majored": Sounds like it’s time to switch xd
00:43:23FromDiscord<T0lk1en> In reply to @jtv "Yeah, I think you": What projects would you recommend
00:43:30FromDiscord<jtv> Trying to pick off the tickets that are good first issues, learn more, and do more complicated things over time
00:43:35FromDiscord<jtv> Depends on where your interests lie
00:43:45FromDiscord<cow> In reply to @Rika "You could morph the": but that's a proof of concept...
00:43:49FromDiscord<jtv> If you are interested in password managers, the open source one I've seen used a bunch is GoPass
00:43:58FromDiscord<T0lk1en> Gotcha
00:44:15FromDiscord<cow> In reply to @jtv "If you are interested": I have to mention bitwarden and keepass[x[c]]
00:44:16FromDiscord<T0lk1en> Thanks for the answers I’m sorry for being a dumbass just trying to learn
00:44:19FromDiscord<jtv> But if it's more generally cryptography, there are lots of ways you could take that
00:44:31FromDiscord<jtv> No, not a dumbass at all
00:44:34FromDiscord<Elegantbeef> Keepass is more popular ime
00:44:54FromDiscord<huantian> self-hosted bitwarden user
00:44:55FromDiscord<jtv> Just trying to steer you in a better, more productive direction for getting started
00:44:58FromDiscord<huantian> (edit) "self-hosted bitwarden user ... " added "here"
00:45:00FromDiscord<cow> keepassxc here
00:45:37FromDiscord<T0lk1en> I’ve used keepassxc in my time. I’ve also used tor, i2p, whonix, tails, and the xmpp messaging protocol before
00:45:40FromDiscord<cow> i agree that contributing to existing projects is good for actually being useful, and proof of concepts/rewriting from scratch is best for learning core concepts
00:46:07FromDiscord<T0lk1en> How do you find projects that could be contributed to by someone who knows little code
00:46:32FromDiscord<jtv> IDK I haven't seen a lot of keepass in a long time. You're the first people to mention it in quite a while 🙂
00:46:35FromDiscord<cow> there is a ton to contribute to documentation in many projects, and it could be a good way to get familiar I guess?
00:46:50FromDiscord<Rika> In reply to @jtv "IDK I haven't seen": Really
00:46:56FromDiscord<jtv> Yup
00:46:56NimEventerNew post on r/nim by serpentally: Could Nim be a complete replacement for Python?, see https://reddit.com/r/nim/comments/101t6ds/could_nim_be_a_complete_replacement_for_python/
00:46:59FromDiscord<Rika> I thought it was pretty popular
00:47:08FromDiscord<T0lk1en> I’ve used it forever
00:47:10FromDiscord<Rika> In reply to @NimEventer "New post on r/nim": I mean sure
00:47:12FromDiscord<jtv> It was
00:47:16FromDiscord<cow> In reply to @jtv "IDK I haven't seen": nowadays people like Techlore, and sites like privacytools.io (now privacyguides.org) have popularized it I think
00:47:53FromDiscord<T0lk1en> What operating sustenance do you guys program on?
00:47:55FromDiscord<cow> probably KeepassXC is the popular fork
00:47:58FromDiscord<T0lk1en> Systems
00:48:00FromDiscord<Rika> In reply to @T0lk1en "What operating sustenance do": Lol
00:48:15FromDiscord<Rika> Linux
00:48:15FromDiscord<T0lk1en> Lol
00:48:19FromDiscord<cow> fedora
00:48:22FromDiscord<T0lk1en> Flavor?
00:48:35FromDiscord<huantian> NixOS
00:48:57FromDiscord<jtv> There are always circles for these things. I'm sure it's just not as cool in my circles anymore 🙂
00:49:01FromDiscord<Rika> Arch base but I don’t really care as long as it isn’t Debian based I guess
00:49:25FromDiscord<Rika> In reply to @jtv "There are always circles": What does your circle use
00:49:35FromDiscord<huantian> circle? the kind you click?
00:49:37FromDiscord<Elegantbeef> Shit we're bragging about software we've used?!
00:49:38FromDiscord<Elegantbeef> I've uhhh used stuff
00:49:45FromDiscord<Rika> In reply to @huantian "circle? the kind you": Oi wait no
00:49:47FromDiscord<jtv> Frankly, in production, mainly like AWS's secrets manager or similar
00:49:50FromDiscord<cow> In reply to @huantian "circle? the kind you": the google+ kind
00:50:01FromDiscord<Rika> The clique (lol) kind
00:50:12FromDiscord<cow> there is a password manager which had a massive breach recently right
00:50:21FromDiscord<Rika> Last pass ?
00:50:22FromDiscord<jtv> But for home stuff, I know a few people who have mentioned GoPass, and a TON of people who were using stuff like LastPass who are now jumping to figure out what they should be doing
00:50:22FromDiscord<T0lk1en> Yeah lastpass
00:50:30*ehmry quit (Ping timeout: 272 seconds)
00:50:53FromDiscord<cow> i can't find GoPass, can you give a link?
00:51:04FromDiscord<cow> oh it's .pw
00:51:08FromDiscord<cow> nvm
00:51:09FromDiscord<jtv> But I've spent my whole career in security, and in more big tech circles. Like my last company had fastly, cloudflare, snowflake, spotify, etc. as customers
00:51:31FromDiscord<T0lk1en> Damn
00:52:14FromDiscord<cow> I don't like terminal password managers 😦
00:53:38FromDiscord<jtv> Yeah, they're a usability nightmare for most people who prefer everything browser integrated. That's why the most common ones beyond the browser really are things like AWS secrets and Hashicorp's stuff, because there it's about infra automation not the end user
00:56:20*ehmry joined #nim
01:05:36*Guest17 joined #nim
01:05:57*Guest17 quit (Client Quit)
01:06:21*Nim joined #nim
01:07:28NimWhich VS Code Plugin is recommended?
01:08:35*Nim quit (Client Quit)
01:08:58*Answer joined #nim
01:09:02*Answer quit (Client Quit)
01:09:37*Guest1001 joined #nim
01:11:14*Guest1001 quit (Client Quit)
01:11:52*Guest1001 joined #nim
01:11:57*Guest1001 quit (Client Quit)
01:14:43*ltriant quit (Ping timeout: 268 seconds)
01:15:25FromDiscord<cow> nimsaem's is fine
01:23:40*Batzy joined #nim
01:30:34*ehmry quit (Ping timeout: 252 seconds)
01:31:18*ehmry joined #nim
01:39:45*ltriant joined #nim
01:40:56FromDiscord<auxym> yeah, saem's, the other one is abandoned IIRC
01:44:55*Batzy quit (Quit: No Ping reply in 180 seconds.)
01:46:22*Batzy joined #nim
01:49:04*nmz left #nim (Ploop)
01:53:19*ltriant quit (Ping timeout: 260 seconds)
02:05:06*Batzy quit (Quit: No Ping reply in 180 seconds.)
02:06:32*Batzy joined #nim
02:17:58FromDiscord<gabreal> sent a code paste, see https://play.nim-lang.org/#ix=4kdC
02:21:21*ltriant joined #nim
02:27:08*ltriant quit (Ping timeout: 246 seconds)
02:28:36*ltriant joined #nim
02:35:32FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kdD
02:36:00FromDiscord<Elegantbeef> What's the entire `initSingleton`?
02:38:31FromDiscord<gabreal> sent a code paste, see https://play.nim-lang.org/#ix=4kdE
02:38:50FromDiscord<gabreal> I changed the proc a bit
02:40:10FromDiscord<Elegantbeef> `key: key`
02:40:26FromDiscord<Elegantbeef> You're attempting to hold onto a openarray, that's only valid with views
02:40:55FromDiscord<Elegantbeef> you likely want `key: @key`
02:41:39FromDiscord<gabreal> I didn't even know you could do `@`
02:41:46FromDiscord<gabreal> (edit) "`@`" => "`@key`"
02:41:48FromDiscord<Elegantbeef> You used `@[..]` 😄
02:42:02FromDiscord<Elegantbeef> `@` takes in `openArray` and converts it to a seq
02:42:26FromDiscord<huantian> In reply to @Elegantbeef "You used `@[..]` 😄": tbf that feels more like a special thing for array literals only
02:42:51FromDiscord<Elegantbeef> You're right we need to start doing `@ [...]`
02:43:17NimEventerNew Nimble package! nimcorpora - A Nim interface for Darius Kazemi's Corpora Project, see https://github.com/neroist/nimcorpora
02:43:17NimEventerNew Nimble package! pape - Pure Nim PE parsing library, see https://github.com/hdbg/pape
02:43:17FromDiscord<gabreal> In reply to @huantian "tbf that feels more": yeah it does
02:56:43FromDiscord<Rika> PE?
02:56:56FromDiscord<Elegantbeef> Portable executable i think
02:57:16FromDiscord<Rika> What a dumb acronym
03:03:46FromDiscord<ShalokShalom> In reply to @T0lk1en "What operating sustenance do": Garuda
03:07:03FromDiscord<ShalokShalom> I love when they use abbreviations that nobody explains anywhere 👀
03:13:04FromDiscord<jtv> It's the windows object file format, has been for a really long time.
03:13:34FromDiscord<jtv> Pretty recognizable for people who have ever looked at object file formats 🙂
03:17:31FromDiscord<Rika> I was thinking it was executable format related but it reallycould be anything
03:17:37FromDiscord<Rika> (edit) "reallycould" => "really could"
03:25:17*wallabra quit (Ping timeout: 246 seconds)
03:32:41*wallabra joined #nim
03:36:33*ltriant quit (Ping timeout: 268 seconds)
03:37:34*wallabra quit (Ping timeout: 265 seconds)
03:40:04*wallabra joined #nim
03:45:11*byanka quit (Ping timeout: 264 seconds)
03:59:29*ltriant joined #nim
04:04:23*ltriant quit (Ping timeout: 264 seconds)
04:14:37*ltriant joined #nim
04:36:16*arkurious quit (Quit: Leaving)
04:37:10*byanka joined #nim
05:35:16*ltriant quit (Ping timeout: 252 seconds)
05:35:19FromDiscord<Stuffe> Does someone know the call signature for overloading the slice operator? (I want to do something like `my_object[1..3]`)
05:35:54*ltriant joined #nim
05:43:39FromDiscord<demotomohiro> @Stuffe ↵You can found it on system module:↵https://nim-lang.org/docs/system.html#[],openArray[T],HSlice[U:%20Ordinal,V:%20Ordinal]
05:45:37FromDiscord<demotomohiro> And there are slice operators that return `HSlice`: https://nim-lang.org/docs/system.html#..%2CsinkT%2CsinkU
05:46:40FromDiscord<Stuffe> ok let me try
05:48:01FromDiscord<Stuffe> I guess I don't really understand this signature. It doesn't contain my object type?↵proc `..`[T, U](a: sink T; b: sink U): HSlice[T, U] {.noSideEffect, inline,↵ magic: "DotDot", ....}
05:48:33FromDiscord<Stuffe> Ah wait that one is probably just for creating slice objects
05:48:35FromDiscord<Rika> Because that’s just the dot part
05:48:41FromDiscord<Rika> And not the x[] part
05:48:43FromDiscord<Rika> Yes
05:49:15FromDiscord<demotomohiro> You can ctrl + f to find HSlice type: https://nim-lang.org/docs/system.html#HSlice
05:49:19FromDiscord<Stuffe> So I guess the signature would take my object as first arg, and a slice as second
05:49:30FromDiscord<Stuffe> but what is the name of this operator then?
05:49:37FromDiscord<Stuffe> I guess I will try with \`[]\`
05:49:55FromDiscord<albassort> im compiling using app:lib and {.exportc.} and its not coming up in the output of nm
05:50:03FromDiscord<albassort> how do i do this?
05:50:18FromDiscord<albassort> eg
05:50:25FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4ke1
05:50:36FromDiscord<albassort> sent a code paste, see https://paste.rs/fmg
05:50:43FromDiscord<Stuffe> yeah it worked, thanks guys
05:52:26FromDiscord<demotomohiro> @albassort https://nim-lang.org/docs/manual.html#foreign-function-interface-dynlib-pragma-for-export
05:53:53FromDiscord<demotomohiro> It seems you need to specify both `exportc` and `dynlib` pragmas.
05:56:05FromDiscord<albassort> magic
05:56:08FromDiscord<albassort> woa
05:56:28FromDiscord<albassort> now if only my insecure dream of a folder of libraries that get dynamically loaded works
06:01:54FromDiscord<albassort> sent a code paste, see https://play.nim-lang.org/#ix=4ke4
06:01:56FromDiscord<albassort> i presume this isn't a thing
06:03:49FromDiscord<Elegantbeef> look at the dynlib module
06:04:25FromDiscord<albassort> theres a fuckin module for that
06:04:40FromDiscord<albassort> holyshit
06:04:41FromDiscord<albassort> ti
06:04:42FromDiscord<albassort> (edit) "ti" => "til"
06:09:09FromDiscord<albassort> it works
06:09:10FromDiscord<albassort> neat
06:12:26FromDiscord<Rika> Lol
06:15:09FromDiscord<Elegantbeef> Not that long and they're going to have a whole unsafe plugin system
06:16:53*ltriant quit (Ping timeout: 268 seconds)
06:21:42FromDiscord<Rika> Lol
06:41:15*rockcavera quit (Remote host closed the connection)
06:42:10FromDiscord<Nimion #ඞ> hey, I randomly feel drawn to nim again and I was curious if https://www.amazon.de/Mastering-Nim-complete-programming-language/dp/B0B4R7B9YX was available as ebook somewhere as well nowadays?
06:54:32*ltriant joined #nim
07:04:10*ltriant quit (Ping timeout: 272 seconds)
07:14:07FromDiscord<Nimion #ඞ> I'm a turbo zoomer and the concept of owning a physical book nowadays is too abstract for me
07:14:38FromDiscord<Rika> I believe Araq specifically wanted it to be physical only to prevent piracy
07:14:56FromDiscord<Rika> I don’t recall what happened to discussions about the digital version
07:15:13FromDiscord<Rika> I think he considered it after some persuasion but such consideration has gone nowhere for now
07:29:33FromDiscord<Nimion #ඞ> Ok I guess I will buy a physical copy of a book for the first time in 5 years (besides a mandetory uni book that was only physical) 💀💀💀
07:30:30FromDiscord<Nimion #ඞ> It is complete right? Like it goes into macros, pragmas and this whole ARC ORC thing in depth?
07:33:53FromDiscord<Rika> I don’t know
07:33:56FromDiscord<Rika> I’ve never bought it
07:34:10FromDiscord<Rika> I am also not really a physical book kinda person
07:35:02FromDiscord<Elegantbeef> Reading is for nerds
07:36:29FromDiscord<Rika> Ok nerd
07:37:52FromDiscord<Elegantbeef> I'll pretend i didnt read that
07:42:24FromDiscord<Rika> So you admit you read
07:45:06*azimut joined #nim
07:51:16FromDiscord<luteva> In reply to @TryAngle "It is complete right?": if you ask me, i would suggest the "nim in action" book.
07:55:16FromDiscord<luteva> it is much easier to read (imho).
07:55:16FromDiscord<Rika> In reply to @luteva "if you ask me,": It does not go into those topics
07:56:23FromDiscord<luteva> it does for macros, templates at least a bit...
07:58:36FromDiscord<luteva> not for the arc orc part, that's true. but the nim in action book has examples that you can follow easily through the book, that makes it really much easier to read.
07:59:24FromDiscord<Elegantbeef> Sure but if the point is learning the anatomy of a potato plant you dont pick up "Calculus 101"
08:01:31FromDiscord<voidwalker> I'm tempted to buy that recent japanese book as pdf and it should translate decently, with google
08:01:39FromDiscord<voidwalker> It's rather cheap as pdf, $13 or something
08:02:43FromDiscord<voidwalker> Nim in action is very poorly strucuted imho
08:02:58FromDiscord<voidwalker> (edit) removed "in action"
08:03:15FromDiscord<voidwalker> (edit) "imho" => "imho. Nim in action too verbose :\"
08:04:28FromDiscord<voidwalker> You should write a book Elegantbeef, call it Nim foo
08:06:10FromDiscord<Elegantbeef> But then i'd have to get Rika to proof read it
08:06:17FromDiscord<Nimion #ඞ> In reply to @luteva "if you ask me,": I am familiar with the nim basics already, I'm really only interested in the topics which are nowhere explained really for some reason and only may be answered by asking the people here.
08:06:35FromDiscord<Nimion #ඞ> Or in the "new" book maybe?
08:07:31FromDiscord<Elegantbeef> Dont think many have the new book
08:08:06FromDiscord<voidwalker> ARC/ORC and what other topics .
08:08:09FromDiscord<voidwalker> (edit) "." => "?"
08:08:16FromDiscord<Nimion #ඞ> I mean with a price tag of 65 euro I don't expect many to buy it 💀
08:09:18FromDiscord<voidwalker> I bought it out of sheer enthusiasm. Downsides were, no pdf, poor print quality, half of it is the online docs. But I didn't get to the advance parts, can't comment on those. they're probably good
08:10:11FromDiscord<voidwalker> that's all it says about ARC lol
08:10:12FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4ken
08:10:31FromDiscord<Elegantbeef> There isnt really much to know about arc/orc
08:10:47FromDiscord<luteva> by "new book" you mean the "mastering nim", right?
08:11:03FromDiscord<Elegantbeef> They're scoped based memory management with move semantics, you have 4 hooks `=destroy` `=copy` `=sink` `=trace`(only for orc)
08:11:14FromDiscord<voidwalker> There's only two non-free english books, yeah. Nim in action (old), Mastering nim (new)
08:11:45FromDiscord<Nimion #ඞ> In reply to @voidwalker "ARC/ORC and what other": Mainly pragmas, macros and more "advanced" templates. Maybe some multithrading / async explanations. Working with the ARC / ORC language changes like sink. On the nim forum I've read something about that nim actually has some kind of borrow checker like rust does, and maybe how to use those things in real world not just a trivial http example
08:11:46FromDiscord<luteva> it is what voidwalker says. it is really poorly structured and most of it is online docs.
08:12:11FromDiscord<Elegantbeef> Nim's "borrow checker" is experiemental and 99% unusable
08:12:17FromDiscord<luteva> (edit) "says." => "says, for the mastering nim book."
08:12:53FromDiscord<Nimion #ඞ> In reply to @luteva "it is what voidwalker": So it's not rlly worth it?
08:13:46FromDiscord<Nimion #ඞ> No offense but buying a physical 65 euro book to then mainly use online docs kinda sounds like a scam but I might be mistaken
08:14:10FromDiscord<demotomohiro> I think this is Nim's borrow checker you mentioned: https://nim-lang.org/docs/manual_experimental.html#view-types
08:14:18FromDiscord<Elegantbeef> Yea
08:14:20FromDiscord<luteva> if you want to support andreas rumpf for his great language, there are better ways then buying the book 🙂
08:14:30FromDiscord<voidwalker> buy him a case of beer : P
08:14:43FromDiscord<voidwalker> or write a great nim lib ?
08:14:47FromDiscord<Elegantbeef> If only i had the determination and want to write a book or equivlent
08:15:02FromDiscord<Elegantbeef> Low blow
08:15:13FromDiscord<Nimion #ඞ> In reply to @voidwalker "or write a great": What if I wrote a great cyo Lib 😈😈😈
08:15:31FromDiscord<Nimion #ඞ> In reply to @Elegantbeef "If only i had": U can start doing YT series
08:15:41FromDiscord<Bung> there's also direct way, donating.
08:15:46FromDiscord<voidwalker> @Nimion #ඞ you would have to join the "dark side" : D
08:16:01FromDiscord<voidwalker> @Nimion #ඞ did you check https://ssalewski.de/nimprogramming.html#_templates ?
08:16:01FromDiscord<Elegantbeef> Oh bridge delay
08:16:02FromDiscord<Elegantbeef> Respectfully bleh to "cyo lib"
08:16:43FromDiscord<voidwalker> That cyo thing is never going to happen , right ? I mean nim itself is understaffed, and the cyo gang is even smaller, no ?
08:16:58FromDiscord<Nimion #ඞ> In reply to @TryAngle "U can start doing": I mean, the target group of nim is obviously rebellious zoomers no? YouTube vids would be 100x a book
08:17:17FromDiscord<Elegantbeef> I hate that i'm technically a zoomer
08:17:26FromDiscord<Elegantbeef> Fucking read for once in your god damn lives
08:18:23FromDiscord<Nimion #ඞ> In reply to @Elegantbeef "I hate that i'm": Why
08:18:49FromDiscord<voidwalker> you could be a boomer and never see the golden age of Nim, rejoice : P
08:19:14FromDiscord<Nimion #ඞ> In reply to @Elegantbeef "I hate that i'm": Ah true I remember I thought u were like 30+ but u actually 22 or smth
08:19:41FromDiscord<voidwalker> For some reason Elegantbeef always felt "mature" to me
08:19:51FromDiscord<Elegantbeef> It's the way i talk
08:20:14FromDiscord<Nimion #ඞ> In reply to @voidwalker "<@147447489316913152> did you check": No I did not know about that site, looks like a good start idk? I will look into it thank you
08:20:29FromDiscord<voidwalker> But then again I always thought, how tf does a mature person with presumably a job, has the time to do 50% of the nim support :here D
08:20:42FromDiscord<Nimion #ඞ> Ye same XD
08:21:02FromDiscord<Elegantbeef> > presumably a job↵There's your mistake
08:21:23FromDiscord<Nimion #ඞ> Going to uni is a full time job 🤓
08:21:30FromDiscord<voidwalker> @Nimion #ඞ It's the best book on nim imho, great structure, size/content ratio, and free. it's expanding at times with new stuff
08:21:47FromDiscord<Elegantbeef> I'm also not going to post secondary
08:23:08FromDiscord<Bung> some people occasionally passionate to contribute to nim, that's what I see from github contributors graph
08:24:13FromDiscord<Nimion #ඞ> In reply to @voidwalker "That cyo thing is": Idk, the cool thing about software engineering is a lot of things don't really require big teams.
08:25:20FromDiscord<Bung> yeah, but still there's a lot things to do , even a tiny patch would help.
08:25:47FromDiscord<voidwalker> Still, I just don't see it happening. Dev pace is too slow. And cool stuff is being added to nim. They have to integrate some of that, ideally
08:26:44FromDiscord<Nimion #ඞ> I really don't have any clue tbh, I was only just catching up reading everything related to nim skull from the past 2 month of the discord
08:27:18FromDiscord<Nimion #ඞ> Is actually only 30% of the code base shared now? That's crazy tbh
08:28:53FromDiscord<lenis> In reply to @Elegantbeef "There isnt really much": surely some of the move semantics stuff right? that's ARC/ORC specific I thought
08:30:54NimEventerNew post on r/nim by HerraHullunhuikea: Dunder methods in nimpy, see https://reddit.com/r/nim/comments/1022k79/dunder_methods_in_nimpy/
08:32:51FromDiscord<Elegantbeef> It's not that complicated
08:33:11FromDiscord<Elegantbeef> a procedure(with a `sink` parameter) or assignment can take ownership of resources if that's the last usage of the resource
08:33:31FromDiscord<Elegantbeef> You can disable `sink` or `copy`ing for a type
08:33:36FromDiscord<Elegantbeef> You also can implement your own `=destroy`
08:33:40FromDiscord<Elegantbeef> We did it we learneded arc/orc 😛
08:35:08FromDiscord<voidwalker> implement own `=destroy` where, arc or orc ?
08:35:18FromDiscord<Elegantbeef> either rc
08:35:28FromDiscord<Elegantbeef> https://nim-lang.org/docs/destructors.html
08:36:00FromDiscord<voidwalker> wow i didn't know that. so then all such data structures are not GC-ed, and there is no overhead for them ?
08:36:19FromDiscord<Elegantbeef> It uses scoped based memory management
08:36:28FromDiscord<Elegantbeef> So there is no conventional gc for any type but cyclical types
08:36:37FromDiscord<voidwalker> I always thought manual memory management means you can't use GC at all, or use GC libs
08:36:45FromDiscord<Elegantbeef> Cyclical types use a mark and sweep algorithim
08:36:52FromDiscord<Nimion #ඞ> I think pmunch told me half a year ago that =destroy is actually not fully deterministic in when it will be executed.
08:36:59FromDiscord<Elegantbeef> arc/orc arent manual memory managed
08:37:06FromDiscord<Elegantbeef> Yes destroy is deterministic
08:37:29FromDiscord<Elegantbeef> It's statically compiled in the code
08:37:39FromDiscord<Elegantbeef> It's called at the end of scope if the RC == 0 for references
08:37:43FromDiscord<Elegantbeef> Otherwise it's always called
08:38:15FromDiscord<Bung> the thing is it inject destructors with a analysis process, so it looks like u manually free the memory.
08:38:47FromDiscord<Elegantbeef> Correct it's a slight programmer optimisation above manual memory management
08:38:56FromDiscord<Bung> the interesting part it how it implemented in compiler, it's bit complicated as still have opened issues.
08:39:06FromDiscord<Bung> (edit) "it" => "is"
08:41:32FromDiscord<Elegantbeef> Unlike other languages with move semantics nim does a user friendly thing and copies when a move cannot be made
08:41:52FromDiscord<Elegantbeef> So even with move semantics Nim is actually much more approachable since you can live like they dont exist
08:43:17FromDiscord<Elegantbeef> But you'll be grateful that they do exist when you need them since they allow reducing copies and even disabling them for some types
08:43:23FromDiscord<Bung> so no gc and no manually free memory, u have both
08:43:46FromDiscord<Elegantbeef> To be fair "no gc" depends on definition
08:44:30FromDiscord<Bung> but nim defined it well , right, it become `--mm`
08:44:49FromDiscord<Elegantbeef> Depends on who you ask so no clue
08:45:04FromDiscord<Bung> alright
08:45:04FromDiscord<Elegantbeef> GC is kinda ambiguous to whether it covers RAII style memory management
09:44:08FromDiscord<willyboar> In reply to @voidwalker "That cyo thing is": I think it will happen. How things will go depends on what they will offer on their first release.
09:51:57FromDiscord<Require Support> anyone have problems using nimcrypto + orc ? if yes, how do I solve it 😄
10:15:37FromDiscord<jmgomez> Hey guys, is there a predefined comp variable that we can when against for knowing if the one compiling/reading the nim file is nimsuggest?
10:17:41FromDiscord<jmgomez> In reply to @jmgomez "Hey guys, is there": found it, it's just `nimsuggest`
10:20:28FromDiscord<Elegantbeef> `when defined(nimSuggest)` i think works, i could be wrong
10:36:11FromDiscord<jmgomez> In reply to @Elegantbeef "`when defined(nimSuggest)` i think": yeah, it worked. There is a cfg in the sources defining it
10:37:54FromDiscord<jmgomez> Do you happen to know why it still uses markAndSweep? https://github.com/nim-lang/Nim/blob/devel/nimsuggest/nimsuggest.nim.cfg
10:44:26FromDiscord<Bung> it need remain node graph in whole lifetime I guess ?
10:48:15FromDiscord<AmjadHD> Can someone review or urge the owner to review <https://github.com/nim-lang/NimLime/pull/157> ?
11:12:40*Yardanico quit (Quit: No Ping reply in 180 seconds.)
11:15:18*NimEventer quit (Ping timeout: 260 seconds)
11:17:38*jmdaemon quit (Ping timeout: 260 seconds)
11:35:43FromDiscord<Bung> @ElegantBeef https://github.com/nim-lang/Nim/pull/20892/files is this ready?
11:37:27*PMunch joined #nim
11:44:14FromDiscord<4zv4l> how can I make a proc named `div` ?
11:46:55FromDiscord<Rika> Add ` around it like an operator
11:47:54FromDiscord<Rika> You have to do it for both if you want to make a proc named it and if you want to use such proc like a normal proc
11:53:30FromDiscord<4zv4l> thanks !
11:53:56FromDiscord<4zv4l> I try to make a code in Nim that I can use in C↵is it better to use `object file` or `shared library` ?
12:05:30FromDiscord<4zv4l> is this normal ?↵also the div function doesn't seem to work properly https://media.discordapp.net/attachments/371759389889003532/1059804698061848606/image.png
12:07:52FromDiscord<Rika> In reply to @Rika "You have to do": As I’ve said, ticks also needed on the call
12:08:06FromDiscord<Rika> Wait what
12:08:14FromDiscord<Rika> Wait, sorry, you’re using it on C
12:08:19FromDiscord<4zv4l> no prob ahah
12:09:32*PMunch quit (Quit: Leaving)
12:10:06FromDiscord<Rika> Do exportc: "div" instead to force the namr
12:10:08FromDiscord<Rika> Name
12:12:04FromDiscord<4zv4l> like this ? https://media.discordapp.net/attachments/371759389889003532/1059806346402353172/image.png
12:12:27FromDiscord<planetis> I don't see anything being included...
12:13:29FromDiscord<4zv4l> you can't include a static lib in c↵you can link against it
12:13:38FromDiscord<4zv4l> which is what I do
12:16:09FromDiscord<Rika> Also add dynlib pragma then
12:16:15FromDiscord<Rika> All procs with export c
12:17:35FromDiscord<4zv4l> still https://media.discordapp.net/attachments/371759389889003532/1059807735228661831/image.png
12:17:46FromDiscord<4zv4l> only the "div" function doesn't work that's weird
12:18:05FromDiscord<4zv4l> also those warning aren't supposed to be there
12:20:50FromDiscord<planetis> Use this guide https://nim-lang.github.io/Nim/backends.html#interfacing-backend-code-calling-nim
12:23:27FromDiscord<planetis> You need to get function declarations from somewhere don't you?
12:24:43FromDiscord<4zv4l> In reply to @planetis "Use this guide https://nim-lang.github.io/Nim/backe": I checked this
12:24:46FromDiscord<4zv4l> still doesn't seem to work
12:25:04FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kf4
12:25:11FromDiscord<4zv4l> it compiles with warning always↵and functions work except `div` still
12:27:03*PMunch joined #nim
12:28:37FromDiscord<4zv4l> https://media.discordapp.net/attachments/371759389889003532/1059810510243102720/image.png
12:28:48FromDiscord<4zv4l> yeah only the div one isn't working
12:28:53FromDiscord<4zv4l> no more warning tho
12:29:07FromDiscord<planetis> Nice
12:29:31FromDiscord<planetis> Maybe you should use a different name?
12:31:18FromDiscord<4zv4l> changing the name doesn't change
12:31:55FromDiscord<4zv4l> ok I found
12:32:05FromDiscord<4zv4l> I had to change the return type from `float` to `float32`
12:32:09PMunchYup
12:32:13PMunchI was just about to say
12:32:53PMunchBy the way you might want to use `cint` in your Nim code to make sure that it maps to `int` in C
12:34:53FromDiscord<4zv4l> In reply to @PMunch "By the way you": just did, thanks !
12:35:06FromDiscord<4zv4l> changed `float32` to `cfloat`
12:35:09FromDiscord<4zv4l> (edit) "changed `float32` to `cfloat` ... " added "also"
12:35:45PMunchGood idea
12:36:06PMunchIf course you could also do it the other way and grab the NI and NFLOAT definitions from nimbase.h
13:06:20FromDiscord<jmgomez> Should nim suggest pick automatically conf.nims files? Im trying to setup some extra search paths in there but it doesnt seem to pick them
13:09:22FromDiscord<planetis> not just nimsuggest, I had conf files next to libraries and they are ignored.
13:13:01FromDiscord<Evissim> Is it possible to do switch case based on type? `case typedesc(x)` doesn't seem to be allowed.
13:13:12FromDiscord<planetis> I embedded the commands directly to the nim file, in a static section, is what a did.
13:13:46*PMunch_ joined #nim
13:15:02FromDiscord<planetis> In reply to @Evissim "Is it possible to": use when instead
13:15:48*PMunch quit (Ping timeout: 252 seconds)
13:16:50FromDiscord<jmgomez> In reply to @planetis "I embedded the commands": I was thinking on trying out something similar but not sure if it will work for paths and also there is an include that is not part of the current search path but live in the NimForUE plugin folder. Will play around with that idea and see
13:17:44*derpydoo joined #nim
13:21:52FromDiscord<Evissim> In reply to @planetis "use when instead": Thanks!
13:22:24*PMunch_ quit (Ping timeout: 252 seconds)
13:36:34*PMunch joined #nim
13:37:35FromDiscord<jmgomez> @planetis FYI cfg files are picked by the compiler
13:41:00FromDiscord<EyeCon> In reply to @T0lk1en "How do you find": https://www.codetriage.com/
13:42:58FromDiscord<EyeCon> Anyone made any headway to create MS Excel extensions with Nim?
13:45:07*PMunch quit (Ping timeout: 265 seconds)
13:45:18FromDiscord<Bung> you mean a excel lib ?
14:00:04FromDiscord<luteva> there is an excel lib for nim.
14:03:13FromDiscord<luteva> https://github.com/search?q=excel+language%3ANim&type=Repositories&ref=advsearch&l=Nim&l=
14:06:00*PMunch joined #nim
14:08:41FromDiscord<luteva> i used xlsx.
14:08:52*xet7 joined #nim
14:09:10FromDiscord<luteva> (edit) "xlsx." => "xlsx, once"
14:25:29*rockcavera joined #nim
14:35:31FromDiscord<EyeCon> No, to write an Excel extension, not to parse Excel files
14:35:50FromDiscord<EyeCon> Extensions provide functions that can be used inside Excel formulas
14:37:16FromDiscord<EyeCon> The official name seems to be "add-in"
14:41:15FromDiscord<FullValueRider> You could use nim, but you might find the up and coming replacement for VBA a suitable replacement (it has generics, overloading, class constructors, numerous other improvements) given that it comes as a COM ready language. https://twinbasic.com/preview.html
14:43:03FromDiscord<EyeCon> In reply to @FullValueRider "You could use nim,": Interesting, but not Nim and £26/month to not display a nag screen
14:54:43FromDiscord<Bung> Verifying dependencies for [email protected]↵ Error: Cannot satisfy the dependency on npeg 0.27.0 and npeg 1.0.1
14:55:35FromDiscord<Bung> am trying to install my old project dependencies, I dont understand the nimble error, since slugify and npeg both zero dependency.
14:58:43*ltriant joined #nim
15:00:04FromDiscord<Rika> In reply to @Bung "am trying to install": You don’t have dependencies that depend on it either?
15:00:43*PMunch quit (Quit: Leaving)
15:02:55*ltriant quit (Ping timeout: 252 seconds)
15:06:39FromDiscord<Bung> In reply to @Rika "You don’t have dependencies": my project `requires "npeg"` I dont know whether dependencies rely it or not
15:11:03FromDiscord<Yepoleb> When passing a reference to a procedure is the caller or callee responsible for increasing the refcount?
15:11:06FromDiscord<enthus1ast> instead of an xlsx reader/writer consider doing an .ods one
15:11:20FromDiscord<gat0r> Never again!↵(@luteva)
15:12:13FromDiscord<FullValueRider> The community edition is free, doesn't nag and would allow you to prototype before converting to nim. Converting VBA to 90% nim syntax is just a case of simple find/replace actions. If you are prepared to write a simple parser, you could probably easily do a 100% conversion. As a very vary amateur programmer I use the find/replace strategy regularly when my advent of code solutions run too slow for VBA and I convert to nim.
15:12:51FromDiscord<Phil> In reply to @luteva "i used xlsx, once": That sounds like the word-version of an Alcoholics Anynonymous group
15:19:33FromDiscord<EyeCon> In reply to @FullValueRider "The community edition is": No that I'd use it, but just to clarify if I'm misreading something - community version still displays a nag screen on 64 bit, doesn't it?↵↵> On this free tier, 64-bit EXEs and DLLs that are built with twinBASIC display a splash screen for 5-seconds during startup.
15:19:43FromDiscord<EyeCon> (edit) "No" => "Not"
15:21:38FromDiscord<Phil> Ooooooof
15:21:42FromDiscord<⚶ Zeno> what is `<=%` ?
15:22:00FromDiscord<Phil> Which module?
15:22:14FromDiscord<⚶ Zeno> system it seems
15:22:18FromDiscord<Phil> Anyone can define an operator for a given symbol in nim, thus the question
15:22:20FromDiscord<⚶ Zeno> https://github.com/dom96/nimkernel/blob/master/ioutils.nim#L77
15:22:27FromDiscord<⚶ Zeno> https://media.discordapp.net/attachments/371759389889003532/1059854258939371590/image.png
15:22:43FromDiscord<Rika> old operator for unsigned i believe
15:23:00FromDiscord<Rika> back when nim didnt have unsigned integers
15:23:11FromDiscord<Rika> the type i mean
15:23:14FromDiscord<⚶ Zeno> i see
15:23:27FromDiscord<⚶ Zeno> though i am curious specifically on what it does ?
15:23:36FromDiscord<Phil> https://nim-lang.org/docs/system.html#%3C%3D%25%2Cint%2Cint
15:23:49FromDiscord<Rika> <= but unsigned
15:23:55FromDiscord<⚶ Zeno> i see
15:23:57FromDiscord<⚶ Zeno> alright thanks
15:24:04FromDiscord<Phil> It just casts the ints to uints and that's it
15:24:29FromDiscord<Phil> I'm not sure what the supposed benefit of that is
15:24:59FromDiscord<Rika> there isnt
15:25:06FromDiscord<Rika> its there for old code reasons
15:25:12FromDiscord<Phil> Legacy, nooooo
15:25:26FromDiscord<Rika> i think it was back in 0.19 or smth
15:25:41FromDiscord<Phil> Why must all code we ever write be immediately legacy
15:26:29*krux02_ joined #nim
15:27:27FromDiscord<Bung> is there a tool see nimble dependency tree
15:28:22FromDiscord<Rika> i remember some people making one but i forgot
15:28:25FromDiscord<Rika> prolly yardanico
15:28:37FromDiscord<⚶ Zeno> is there nim equivalent of python's `bin` ? just curious
15:28:45FromDiscord<⚶ Zeno> quick google doesnt show me anything unless im stupid
15:29:19FromDiscord<Gumbercules> what does python's `bin` do?
15:29:29FromDiscord<⚶ Zeno> show binary represantion
15:29:36FromDiscord<Rika> binary rep. as string
15:29:42FromDiscord<⚶ Zeno> i.e https://media.discordapp.net/attachments/371759389889003532/1059856084992536696/image.png
15:30:03FromDiscord<Rika> https://nim-lang.org/docs/strutils.html#toBin%2CBiggestInt%2CPositive
15:30:19FromDiscord<demotomohiro> !eval import strutils; echo 22.toBin(8)
15:30:24FromDiscord<Gumbercules> https://nim-lang.org/docs/strutils.html#toBin%2CBiggestInt%2CPositive
15:30:26NimBotCompile failed: 00010110
15:30:28FromDiscord<Gumbercules> oh sorry
15:30:29FromDiscord<Gumbercules> got beat
15:30:30FromDiscord<Rika> 😛
15:30:46FromDiscord<⚶ Zeno> it was hidden in strutils and i didnt notice it even though i got `toHex` suggestions 💀
15:30:48FromDiscord<⚶ Zeno> anyways thanks
15:30:57FromDiscord<Bung> In reply to @Rika "i remember some people": yeah, am too, but cant remenber the tool name
15:31:13FromDiscord<Rika> In reply to @Rika "https://nim-lang.org/docs/strutils.html#toBin%2CBig": the speed is what happens when you live and breathe documentation
15:31:45FromDiscord<Gumbercules> and here I am relying on oxygen still
15:31:57FromDiscord<Gumbercules> need to upgrade myself apparently
15:33:40FromDiscord<Gumbercules> RemedyBG is pretty nice
15:33:58FromDiscord<Gumbercules> need more software like this
15:34:56*arkurious joined #nim
15:37:30FromDiscord<Gumbercules> https://media.discordapp.net/attachments/371759389889003532/1059858046890815648/image.png
15:37:40FromDiscord<Gumbercules> lol I always forget about my laptop's second monitor showing up in screenshots
15:38:18FromDiscord<Gumbercules> (edit) "monitor" => "display"
15:39:56FromDiscord<Rika> looks cool
15:40:54FromDiscord<Gumbercules> it only supports Windows I believe but it's a very nice debugger, and very reasonably priced too
15:41:06FromDiscord<Gumbercules> https://remedybg.itch.io/remedybg
15:45:09FromDiscord<Bung> is this really work in nimble file `when not defined(release):`
16:04:43*estiquelapice quit ()
16:05:45FromDiscord<FullValueRider> twinBasic 64 bit puts up the 5 second nag screen when you run the compiled executable. There is no nag when within the IDE doing the edit/run/debug cycle
16:05:57*estiquelapice joined #nim
16:20:18*jmdaemon joined #nim
16:21:44*tiorock joined #nim
16:21:44*tiorock quit (Changing host)
16:21:44*tiorock joined #nim
16:21:44*rockcavera is now known as Guest1175
16:21:44*Guest1175 quit (Killed (osmium.libera.chat (Nickname regained by services)))
16:21:44*tiorock is now known as rockcavera
17:16:45FromDiscord<jan0809> sb here maybe familiar with https://github.com/qb-0/pyMeow
17:44:41*wallabra quit (Ping timeout: 256 seconds)
17:48:29*wallabra joined #nim
17:54:40*pro joined #nim
17:54:43FromDiscord<Boston> Is there a way to repeatedly insert very similar but not identical items into a seq
17:55:26*pro left #nim (#nim)
18:02:11FromDiscord<voidwalker> @Boston your question does not compile very well. You can insert items into a seq with insert. You do it repeatedly with `while` or whatever flow control design you got there. What is very similar and not identical depends upon your definition of it, as long as you can define a function to determine that, you just check if it returns true before insert.
18:28:40FromDiscord<hmmm> broskis I wanted to put a bunch of procs on a seq. Didn't compile because of gcsomething and locksomething, so I checked the forums and it said to annotate the procs with {.gcsafe, locks: 0.}, now it compiles but I have no idea wtf those alien greenish pragma do to my procs 🤔 any explainings? where is our beef hero when the peasants need him
18:43:22*derpydoo quit (Ping timeout: 272 seconds)
18:52:35FromDiscord<hmmm> yea I checked, it totally works and I can loop the procs like a boss, but I get some scary nuclear vibes Warnings about declaring locks 0 but in reality locks are <<unknown>> 🤨
18:53:40*krux02_ quit (Remote host closed the connection)
18:59:12*ltriant joined #nim
19:03:35*ltriant quit (Ping timeout: 246 seconds)
19:08:30FromDiscord<Bung> locks are deprecated
19:09:00FromDiscord<Bung> what's your nim version?
19:13:34FromDiscord<hmmm> hmm 1.6.8 I think? can't check because I'm away from the pc
19:21:05FromDiscord<hmmm> sent a code paste, see https://paste.rs/h1F
19:33:18FromDiscord<hmmm> oh I see it's deprecated in 2.0rc1, hmm maybe I should updoot
19:38:39Amun-Rahmmm: pragma locks?
19:40:06FromDiscord<hmmm> In reply to @Amun-Ra "<@887269570765791243>: pragma locks?": from 2.0rc1 presentation blog: "Lock levels are deprecated, now a noop." what's a noop? 🤨
19:40:43Amun-Rano operation
19:41:03Amun-Rait does nothing
19:41:17Amun-Ralike it's not even there
19:41:49FromDiscord<hmmm> sent a code paste, see https://play.nim-lang.org/#ix=4kh4
19:42:35Amun-Rahmmm: {.gcsafe, locks: 0.} would be equal to {.gcsafe.}
19:42:51Amun-Rathe compiler will ignore locks: 0 entirely
19:43:08Amun-Rauntil they deprecate it in future versions and raise an error
19:43:17FromDiscord<hmmm> I see, ty Ra-Amun from egypt 💓
19:43:53Amun-Rano worries :>
19:44:05Amun-RaI'm a little bit north
19:44:46Amun-Ra"bulandi", what I think you call us
19:45:43FromDiscord<hmmm> as in the 2000 indian movie "bulandi"? 😃
19:46:33Amun-Rathat's outside my area of expertise, (I meant polish) ;>
19:47:13FromDiscord<abisxir> sent a long message, see https://paste.rs/PL2
19:47:53FromDiscord<abisxir> (edit) "http://ix.io/4kh5" => "http://ix.io/4kh6"
19:47:54FromDiscord<hmmm> ah ok polish, I know "kurwa" from my old gaming days. And that's the extent of my knowledge 😃 now I shut up because I'm way offtopic lol
19:48:09Amun-Ra;>
19:48:37FromDiscord<abisxir> (edit) "http://ix.io/4kh6" => "http://ix.io/4kh8"
19:56:12FromDiscord<4zv4l> https://youtu.be/Htjq9yF11m0?t=1392↵I was watching this↵is there a way to build the Nim compiler without Nim ?
19:56:36FromDiscord<4zv4l> like the way gcc does
19:57:05FromDiscord<jtv> Well, first thing you need to do @abisxir is to put the function "name" in backticks. proc `[]`[T](...)
19:57:19FromDiscord<jtv> Well, first thing you need to do @abisxir is to put the function "name" in backticks. proc \`[]\`[T](...)
19:59:02FromDiscord<abisxir> @jtv sorry my bad, in main implementation it is there: func `[]`[T](e: Entity, row: typedesc[T]): T = getComponent[T](e)
19:59:20FromDiscord<abisxir> It gets vanished in formatting.
19:59:36FromDiscord<jtv> Yeah, you have to backslash before them
19:59:39FromDiscord<abisxir> (edit) "`[]`[T](e:" => "``[]``[T](e:"
19:59:43*lumidify quit (Quit: leaving)
19:59:50FromDiscord<jtv> And where does it say your error is??
20:00:01FromDiscord<abisxir> (edit) "``[]``[T](e:" => "`\[]\`[T](e:"
20:00:12FromDiscord<abisxir> (edit) "`\[]\`[T](e:" => "`\`[]\``[T](e:"
20:00:21FromDiscord<abisxir> (edit) "`\`[]\``[T](e:" => "[][T](e:"
20:01:18FromDiscord<abisxir> when I call it, it complains there is not such a function.
20:02:50FromDiscord<jtv> That's where I'd need the context from. Because what you've defined is a reasonable declaration
20:03:03FromDiscord<abisxir> sent a long message, see https://paste.rs/obN
20:03:14FromDiscord<jtv> Though you could just do row: T
20:03:18FromDiscord<Bung> don't try define []
20:03:51FromDiscord<Bung> that's magic proc it's specially handled in compiler
20:04:35FromDiscord<jtv> Interesting; I could have sworn I've seen code overloading [] for some types, or at least []=??
20:05:07FromDiscord<Bung> they both magic procs
20:06:13FromDiscord<abisxir> sent a long message, see http://ix.io/4khh
20:07:41FromDiscord<Bung> so u can only use for particular type
20:14:16FromDiscord<jtv> So basically won't work w/ generic
20:14:20FromDiscord<jtv> Any generics
20:14:24FromDiscord<jtv> Good to know, thanks
20:16:00*lumidify joined #nim
20:17:42FromDiscord<abisxir> Ok but works guys, my problem was that I did not exposed it, One solved the issue, nim is king 🙂
20:18:16FromDiscord<jtv> LOL
20:18:21FromDiscord<jtv> Excellent
20:26:31Amun-Rait's obvious nim is king - that's why the crown logo ;)
20:37:00FromDiscord<Require Support> ELI5 when to use `ref object` vs `object`
20:39:57FromDiscord<hmmm> In reply to @Require Support "ELI5 when to use": https://media.discordapp.net/attachments/371759389889003532/1059934160539619378/FireShot_Capture_002_-_Use_of_ref_object_-_chat.openai.com.png
20:40:59FromDiscord<Require Support> hmmm indeed
20:44:21FromDiscord<jtv> Well, it's clear that AI is better trained on other languages that do have semantics where that would make sense 🙂
20:55:24FromDiscord<Elegantbeef> Clearly not, I dont know why it errors and I havent got much insight from araq↵(@Bung)
20:55:26FromDiscord<Elegantbeef> So it's mostly a pipe dream
20:55:40FromDiscord<Elegantbeef> If you need reference semantics you use `ref object`↵(@Require Support)
20:55:42FromDiscord<Elegantbeef> Boom we did it
20:56:03FromDiscord<Elegantbeef> https://internet-of-tomohiro.netlify.app/nim/faq.en.html#type-when-to-use-ref-object-vs-plain-object-qmark
20:57:19FromDiscord<Lord Hellgrim The Infinite> sent a long message, see http://ix.io/4khl
20:57:34FromDiscord<Elegantbeef> Likely not
21:00:36FromDiscord<Vindaar> In reply to @Lord Hellgrim The Infinite "Is there any way": there's multiple libraries to read / write xlsx files from Nim though. So maybe those are enough by themselves?
21:00:51FromDiscord<hmmm> I think there is a new library named xl for xlsx files
21:00:54FromDiscord<Vindaar> https://nimble.directory/search?query=xlsx
21:00:59FromDiscord<hmmm> look in the forum there is a recent post
21:01:12FromDiscord<Lord Hellgrim The Infinite> I thought nim xlsx could only read excel
21:01:21FromDiscord<hmmm> xl can write too
21:02:06FromDiscord<hmmm> https://github.com/khchen/xl
21:02:22FromDiscord<Lord Hellgrim The Infinite> Well that was easy. Thank you very much 🙂
21:02:42FromDiscord<jtv> For reference semantics for non-object variables, I think I'd always point to var params. Did let x = ref y work at some point though??
21:02:46FromDiscord<hmmm> no prob bro
21:03:36FromDiscord<Elegantbeef> What?↵(@jtv)
21:03:52FromDiscord<Elegantbeef> You can do `let x = new int; x[] = y` all day long
21:04:11FromDiscord<jtv> Sure yeah, of course.
21:04:27FromDiscord<Elegantbeef> Nim implicitly dereferences `var` parameters aswell so you can do `let x = y`
21:04:44FromDiscord<jtv> But var params give reference semantics for variables you pass in, was that bit
21:04:50*TakinOver joined #nim
21:05:22FromDiscord<willyboar> Is any way to rewrite, override or extend a type of an external library?
21:05:28FromDiscord<Elegantbeef> Dont think of `var` as reference semantics think of it as mutabillity
21:05:29FromDiscord<jtv> Meaning, I think that covers a major part of the ground for people coming from Python expecting lists to be by-reference
21:06:08FromDiscord<Elegantbeef> Nim passes by reference a lot of types, so it's a pointless distinguishing characteristic
21:07:11FromDiscord<jtv> "Reference semantics" on calls is ~60 year old term to indicate that the callee's changes will be operated on, in-place
21:08:21FromDiscord<Elegantbeef> And in Nim we have references which are managed pointers with their own semantics
21:08:28FromDiscord<jtv> There used to be other different semantics that were common that have gone away, like copy-in, copy-out (e.g., ada in out parameters)
21:10:20FromDiscord<jtv> Yes, my whole point is that when people are asking questions about how to get reference semantics, var params are one of the tools that is often going to give them the behavior they're trying to get. I'm not hung up on Nim's terminology for things.
21:10:43FromDiscord<Elegantbeef> That's not even the proper way to get reference semantics
21:10:54FromDiscord<Elegantbeef> If you want reference semantics you use `{.byRef.}` on the object
21:11:33FromDiscord<jtv> Yeah, that's a cool feature I didn't even know about.
21:12:10FromDiscord<Elegantbeef> But the simple fact is that if the object is big enough or if it's sensible enough(seq/string) it's passed by reference
21:12:58FromDiscord<jtv> Sure, the language implementation details are generally considered orthogonally to the expectations on semantics for people writing in the language, though.
21:13:29FromDiscord<Elegantbeef> Well when you want reference semantics the question is "why"
21:13:42FromDiscord<Elegantbeef> Is it for mutability if so `var` gives you a mutable reference and is what you want
21:13:54FromDiscord<Elegantbeef> If it's for optimisation, Nim makes it so you dont have to even think about it
21:14:38FromDiscord<jtv> Yes, generally it's procedural programmers expecting mutability, especially when they're coming from Python, since Python doesn't give a crap about performance 🙂
21:14:39FromDiscord<Elegantbeef> Then again i see people defaulting to `ref T` cause they dont have to write `var`
21:14:47FromDiscord<Elegantbeef> So who knows why these people write code 😄
21:18:06FromDiscord<jtv> Well, in plenty of languages historically, there was a limit to how much data could be passed in parameters, so a lot of people just expect to pass around references as a matter of habit. Esp when plenty of languages NEVER try to optimize and silently pass by reference when possible, which is another cool thing about nim
21:19:19FromDiscord<Bung> In reply to @Elegantbeef "Clearly not, I dont": it's green , I thought you fixed previous error.
21:33:43FromDiscord<Elegantbeef> Yea jtv most older languages didnt track mutabillity which means it's hard to do that optimisation
21:34:02FromDiscord<Elegantbeef> Bung i skiped CI
21:41:15*ltriant joined #nim
21:55:39*derpydoo joined #nim
22:00:43*ltriant quit (Ping timeout: 248 seconds)
22:01:04FromDiscord<luteva> In reply to @Isofruit "That sounds like the": LOL 🤣 ↵I just came back from the restaurant, having two beer (20,5L) + some more and.... after the dinner the waiter brang a cognac and after he became his tipp, he also gave a liqueur and..... let me chack what you were saying....↵"...the word-version of an Alcoholics Anynonymous group" -> oh no. it that was not anonymously! 🤣
22:02:17FromDiscord<luteva> (edit) "became" => "got"
22:02:40FromDiscord<luteva> (edit) removed "that"
22:06:10*ltriant joined #nim
22:33:14*ltriant quit (Ping timeout: 246 seconds)
22:34:03*wallabra quit (Ping timeout: 260 seconds)
22:36:55*wallabra joined #nim
22:39:00*ltriant joined #nim
22:55:39*ltriant quit (Ping timeout: 260 seconds)
22:56:47FromDiscord<ambient> In reply to @Elegantbeef "If it's for optimisation,": I wish there was a little more proof for this.
22:57:11FromDiscord<ambient> As in, how, exactly
22:57:21FromDiscord<ambient> And what are the corner cases
22:59:06FromDiscord<ambient> The biggest issues I have is to have certainty that I'm not accidentally writing stupid code that introduces unnecessary performance bottlenecks. C++ and how implicit (or cryptic) it is about memory was the biggest offender previously
23:00:17FromDiscord<ambient> Rust in comparison, was exactly what I expected and didn't introduce any unexpected issues
23:02:05FromDiscord<ambient> Like for example Nim has iterators that actually need to allocate new memory, which I have to find out. With Rust, I have to copy explicitly with .clone
23:02:59FromDiscord<ambient> So I do have to think about it, and I don't know what I don't yet know, and it introduces a roadblock in writing software as fast as I would like
23:03:36FromDiscord<Elegantbeef> I mean the proof is that anything larger than 3 pointer widths is passed by ref↵(@ambient)
23:03:39FromDiscord<Elegantbeef> It's not really a magic trick
23:04:13FromDiscord<ambient> I guess I'm just still traumatized by C++ footguns
23:05:13FromDiscord<ambient> I don't want to go through a profiler to weed out all the unnecessary memory allocations. Nim doesn't even seem to have working sampling profiling in Windows
23:05:55FromDiscord<Elegantbeef> This was in response to pass by reference.... so i'll dismiss all your following points
23:06:27FromDiscord<Elegantbeef> Closure iterators capture code which means of course they need to copy if they cannot move
23:06:36FromDiscord<Elegantbeef> well capture data
23:06:55FromDiscord<Elegantbeef> Afaik they're supposed to stack allocate where possible but that might not always be done
23:07:23FromDiscord<ambient> Is there a way to generate a warning or something when there's implicit memory allocation?
23:07:35FromDiscord<Elegantbeef> You can disable copies for specific types
23:07:56FromDiscord<ambient> Oh right, I did see this before, thanks
23:08:30FromDiscord<Elegantbeef> You can also do `--warning[Performance]: on`
23:08:43FromDiscord<Elegantbeef> Sorry `--hint[Performance]: on`
23:10:30FromDiscord<jtv> How do I pass that from nimble?
23:10:54FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4khW
23:10:59FromDiscord<Elegantbeef> Make a config.nims or `myproject.nims`
23:11:18*wallabra quit (Ping timeout: 268 seconds)
23:11:22FromDiscord<jtv> Doesn't work w/ just nim either, nvm. Is it a new feature, cause I'm testing on the stable branch
23:11:27*wallabra_ joined #nim
23:11:36FromDiscord<Elegantbeef> you need `arc`/`orc`
23:11:43FromDiscord<Elegantbeef> I used stable there
23:11:50FromDiscord<jtv> Okay, that's the missing piece for me, thanks
23:11:55FromDiscord<Elegantbeef> The implicit copies are through move semantics only
23:12:37*wallabra_ is now known as wallabra
23:14:17FromDiscord<Ailuros 💖🧡💛💚💙💜🖤> sent a long message, see http://ix.io/4khX
23:17:54*wallabra_ joined #nim
23:18:38*wallabra quit (Ping timeout: 260 seconds)
23:18:41*ltriant joined #nim
23:19:08*wallabra_ is now known as wallabra
23:29:00*ltriant quit (Ping timeout: 272 seconds)
23:29:47FromDiscord<Bung> @ElegantBeef https://github.com/beef331/nimscripter/issues/20 have u checked this ?
23:30:00FromDiscord<Elegantbeef> I've seen
23:30:04FromDiscord<Elegantbeef> But i dont know what approach i'm going to take
23:30:15FromDiscord<Elegantbeef> Dont know how responsive disruptek is going to be to `taskRequires`
23:31:48FromDiscord<Bung> am worry about that `taskRequires` breaks, since the new nimble will ship with new nim, that will make everybody un aware.
23:32:51FromDiscord<Bung> and nimble packages may use that feature or may not, that make things complicated.
23:33:39FromDiscord<Bung> and nimble also has minimal nim support, that may not satisfy any more
23:34:25FromDiscord<Elegantbeef> Well i dont know what to do as of yet
23:34:27FromDiscord<Elegantbeef> So cannot say much
23:35:30FromDiscord<Elegantbeef> I pinned assume to a specific version so i dont get how it suddenly stops working
23:37:36*ltriant joined #nim
23:38:06FromDiscord<Bung> from my point of view nimscripter dont expected something new of `assume` right? so I guess simplely copy his files.
23:38:41FromDiscord<jos> do i need to use importc for a struct that uses the default c layout?
23:38:51FromDiscord<jos> like so
23:38:53FromDiscord<Elegantbeef> No↵(@Bung)
23:39:20FromDiscord<jos> sent a code paste, see https://play.nim-lang.org/#ix=4khZ
23:39:27FromDiscord<Elegantbeef> I do not get why the solution to package management is to copy a dependencies' source
23:40:00FromDiscord<Elegantbeef> Nothing has changed for the packages nimble should fetch and the ones I've requested afaik
23:40:15FromDiscord<Elegantbeef> Why does nimble suddenly decide that it cannot install this package?
23:40:17FromDiscord<jos> do i need a header file and the {.importc: "struct GcControllerState", header: "gc.h"} bit-- because this ffi is actually exported from rust
23:40:21FromDiscord<jos> so i dont have a header file
23:41:08FromDiscord<Elegantbeef> You shouldnt
23:42:24FromDiscord<Bung> I think it's low level lib,so less dependency is better
23:43:36FromDiscord<Bung> like if it's zero dependency, I dont need write lines description in the issue.
23:43:59FromDiscord<Elegantbeef> I dont see why dependencies matter
23:44:00FromDiscord<Elegantbeef> We have a package manager
23:44:05FromDiscord<jos> In reply to @Elegantbeef "You shouldnt": ty
23:44:15FromDiscord<jos> imo the biggest problem with nimble is that people aren't using it
23:44:23FromDiscord<Elegantbeef> The entire point is to distribute the authors of software and allow software to work together
23:44:23FromDiscord<jos> someone called iface a really pivotal like basic package that a lot of people use
23:44:26FromDiscord<jos> but it ain't even on nimble 😦
23:44:44FromDiscord<Elegantbeef> Nimble is decentralised so who cares?
23:44:44FromDiscord<jos> i wish interfaces were just part of the language so libs could expose them in a meaningful way
23:44:53FromDiscord<jos> it's important for adoption
23:44:53FromDiscord<Elegantbeef> You can fetch the package easily
23:44:57FromDiscord<jos> just look at how rust scaled up, it's beautiful
23:45:04FromDiscord<jos> it all starts with a good package manager
23:45:18FromDiscord<jos> i'm okay with it though, when i write nim i just pretend i'm writing a better c
23:45:34FromDiscord<Elegantbeef> Cargo culting! 😛
23:45:47FromDiscord<jos> rust is mid but all the tooling around rust is amazing imo
23:46:03FromDiscord<Elegantbeef> At the point i might aswell use a git submodule to depend on other peoples code cause nimble apparently doesnt work is the point i just archive that repo
23:46:12FromDiscord<Bung> I'd say that's still ideal, it's always a pain track dependencies problem.
23:46:14FromDiscord<planetis> What that means, anyway?
23:46:32FromDiscord<Elegantbeef> https://en.wikipedia.org/wiki/Cargo_cult
23:46:49FromDiscord<Elegantbeef> https://en.wikipedia.org/wiki/Cargo_cult_programming
23:47:05FromDiscord<Bung> I've had experience tack a node module, in the end I forked 3 projects to fix that.
23:47:19FromDiscord<Elegantbeef> I'm not the author of assume no do i want to maintain it
23:47:37FromDiscord<planetis> Thanks, i think i get it
23:47:40FromDiscord<Elegantbeef> So why do i want to pull it in to my project and maintain a fork of it
23:48:14FromDiscord<planetis> But i am like kanye, joke flew past me
23:48:59FromDiscord<jos> i have to fork dependencies sometimes
23:49:05FromDiscord<jos> in really big projects like at work i have to do it all the time
23:49:08FromDiscord<Bung> I dont think that project will make much updates.
23:49:10FromDiscord<jos> sometimes it's just the easiest way to get shit done
23:49:18FromDiscord<Elegantbeef> I dont care if it does bung
23:49:34FromDiscord<Elegantbeef> The package installs fine.... but suddenly doesnt and nothing has changed on my end
23:49:43FromDiscord<Elegantbeef> Disruptek didnt go changing the dependencies on me
23:49:49FromDiscord<Elegantbeef> I didnt change the nimble file
23:49:57FromDiscord<Elegantbeef> So.... who's at fault?
23:50:42FromDiscord<Bung> okay then, now am tracking a dependency that my project doesn't need now.
23:51:08FromDiscord<Elegantbeef> So the issue is that disruptek doesnt use `taskRequires`
23:51:15FromDiscord<Elegantbeef> Maybe then create an issue on his repo?
23:52:28FromDiscord<Bung> that's multiple issues for me, like in the description `nimble install nimble` I still get old nimble
23:53:04FromDiscord<Elegantbeef> I'm still lost what i'm supposed to do here
23:53:26FromDiscord<Elegantbeef> I can copy assume into my repo, and now i maintain it! The problem still exists that you're having
23:53:59FromDiscord<Elegantbeef> An issue can be made on `assume` that adds `taskRequires`! Does that solve the problem you're having?
23:54:01FromDiscord<Bung> no, I can simply fork nimscripter copy assume myself
23:54:25FromDiscord<Elegantbeef> Of course, but that doesnt solve the underlying problem
23:54:39FromDiscord<Elegantbeef> You cannot install my package for X reason and i want to resolve it properly
23:54:44FromDiscord<Bung> like I said I cant use newer nimble
23:54:44FromDiscord<Elegantbeef> But i'm uncertain the cause of X reason
23:55:05FromDiscord<Bung> so even it use `taskRequires`
23:55:29FromDiscord<Elegantbeef> I'm using 0.13.1 and it installed fine
23:56:31FromDiscord<Bung> so that's 3 issues now
23:57:16FromDiscord<Bung> I'll just fork myself, so I dont need track any issue that my project doesn't need.
23:57:43FromDiscord<Elegantbeef> Sorry i could not resolve your issue
23:57:47FromDiscord<Elegantbeef> I really do want to
23:58:11FromDiscord<Elegantbeef> Also to update nimble you need to update to nim 2.0 afaik
23:58:29FromDiscord<Elegantbeef> Nimble is apart of the nim toolchain and versioned with the compiler