<<07-05-2021>>

00:00:46*clyybber quit (Ping timeout: 252 seconds)
00:07:33FromDiscord<exelotl> h0ff https://www.youtube.com/watch?v=1yNZ7JW0yEA
00:07:57FromDiscord<ElegantBeef> That's not dustin hoffman
00:09:35FromDiscord<matf> Yes to trackers. Cut my teeth on screamtracker in the 90s and now still fire up renoise and mess around with it (renoise _rules_).
00:10:06*Tlanger quit (Ping timeout: 240 seconds)
00:11:23*Gustavo6046 quit (Ping timeout: 260 seconds)
00:11:40FromDiscord<exelotl> oh yeah renoise is extremely good :D
00:13:53FromDiscord<exelotl> I started out making music in NitroTracker on my DS around 2009 (i was like 12)
00:27:13*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
00:27:31*Gustavo6046 joined #nim
00:27:34*njoseph joined #nim
00:52:25FromDiscord<Varriount> In reply to @matf "Yes to trackers. ": Not that I have much experience with tracking software itself, but I listened to quite a bit of tracker-made music growing up (I didn't have the money to spend on music).
00:58:33FromDiscord<hamidb80> Error: request to generate code for .compileTime proc: Lit
00:58:39FromDiscord<hamidb80> what does this even mean
00:59:22FromDiscord<hamidb80> (edit) "mean" => "mean?"
01:00:13FromDiscord<hamidb80> https://play.nim-lang.org/#ix=3m19
01:00:56FromDiscord<hamidb80> error from line 46
01:03:49FromDiscord<ElegantBeef> You've somehow attempted to call a compiletime only procedure at runtime
01:05:03FromDiscord<hamidb80> what proc?
01:05:14FromDiscord<hamidb80> `$` ?
01:05:21FromDiscord<ElegantBeef> Yep
01:05:29FromDiscord<hamidb80> (edit) "what" => "which"
01:06:39FromDiscord<hamidb80> i'm almost sure that's not true
01:07:08FromDiscord<ElegantBeef> macroutils is causing it to call a version of `$` that isnt available at runtime it seems
01:07:35FromDiscord<hamidb80> In reply to @ElegantBeef "macroutils is causing it": oh
01:07:48FromDiscord<hamidb80> what should i then?
01:09:22FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3m1d import it to remove the converter
01:09:47FromDiscord<ElegantBeef> Pmunch emits some converters that are "nice", but due to how converters work they dont play nice
01:11:47FromDiscord<hamidb80> i really love that macro
01:14:26FromDiscord<hamidb80> do you know what does `typed` mean?
01:14:46FromDiscord<hamidb80> i saw it in `mapIt` implementation
01:17:20FromDiscord<hamidb80> https://nim-lang.org/docs/manual.html#templates-typed-vs-untyped-parameters
01:18:40FromDiscord<ElegantBeef> Hamidb no point deleting messages, irc still sees it 😛
01:18:56FromDiscord<ElegantBeef> Also isnt helpful for any one else
01:25:01*FromGitter quit (Ping timeout: 276 seconds)
01:26:58*oprypin quit (Ping timeout: 276 seconds)
01:28:23*oprypin joined #nim
01:29:22*FromGitter joined #nim
01:31:46*Tanger joined #nim
02:02:03*oddp quit (Quit: quit)
02:05:19*FromGitter quit (Ping timeout: 276 seconds)
02:05:19*oprypin quit (Ping timeout: 276 seconds)
02:06:33*oprypin joined #nim
02:06:44*FromGitter joined #nim
02:09:58FromDiscord<Anonymous Poet> hey beef, you still around?
02:11:25FromDiscord<Rika> No I killed him
02:11:34FromDiscord<Anonymous Poet> oh :/
02:11:44FromDiscord<Anonymous Poet> i dont suppose i can bug you with a question instead then?
02:11:57FromDiscord<Rika> Lol just ask maybe me or someone else can answer
02:12:30FromDiscord<Anonymous Poet> i may have just realized that it was stupid in the first place
02:12:56FromDiscord<Rika> Good talk
02:13:02FromDiscord<Anonymous Poet> but the feature i wanted might still be interesting: does nim have tuple unpacking similar to javascript's `...` operator?
02:13:12FromDiscord<hamidb80> In reply to @Anonymous Poet "but the feature i": no
02:13:14FromDiscord<Rika> A package has it
02:13:22FromDiscord<hamidb80> In reply to @Rika "A package has it": what package
02:13:24FromDiscord<Rika> I think it’s called unpack
02:13:24FromDiscord<hamidb80> ?
02:13:34FromDiscord<Rika> Or something similar
02:13:46FromDiscord<hamidb80> https://github.com/technicallyagd/unpack
02:13:55FromDiscord<Rika> Yup
02:14:14FromDiscord<Rika> Ah I don’t know about tuples
02:14:16FromDiscord<Anonymous Poet> hmm, not quite the use case i wante
02:14:40FromDiscord<Anonymous Poet> i have a function that writes to a db right now, and i wanted to turn it into an iterator for testing purposes
02:14:41FromDiscord<Rika> Hm? Why
02:15:01FromDiscord<Anonymous Poet> what i wanted to do was have it yield a tuple, and then just unpack the tuple into the function that is currently using it
02:15:05FromDiscord<Rika> Did you look at the read me or just the description
02:15:10FromDiscord<Anonymous Poet> the readme
02:15:15FromDiscord<Rika> Ah into a function
02:15:18FromDiscord<ElegantBeef> Yea i was killed, real shame
02:15:23FromDiscord<Anonymous Poet> all the examples were like `obj.unpack(val1, val2, ...)`
02:15:26FromDiscord<Rika> How’s the afterlife?
02:15:30FromDiscord<ElegantBeef> Dark
02:15:34FromDiscord<Anonymous Poet> where i want something like `my_func(obj.unpack)`
02:15:41FromDiscord<Rika> Yeah I can see
02:16:07FromDiscord<Anonymous Poet> i realized it might be stupid though because this can produce very different objects, so yielding doesnt make much sense
02:16:14FromDiscord<hamidb80> In reply to @ElegantBeef "Dark": can you use discord there?
02:16:26FromDiscord<Anonymous Poet> although really the conclusion might be that my architecture might be dumb
02:16:37FromDiscord<ElegantBeef> Time to make a new operator for a tuple/object unpack call
02:16:48FromDiscord<Anonymous Poet> this is why i ask for beef
02:17:04FromDiscord<Rika> xd
02:17:13FromDiscord<Anonymous Poet> sometimes he actually does it too
02:17:29*Tlangir joined #nim
02:17:36FromDiscord<Rika> Smh you make me sound useless
02:17:58FromDiscord<Anonymous Poet> i just havent known you as well yet :/
02:18:09FromDiscord<hamidb80> :nimAngry:
02:18:19FromDiscord<ElegantBeef> Rika you dont have a problem with macros, i do 😄
02:18:32FromDiscord<Rika> What do you mean I don’t have a problem with macros
02:18:36FromDiscord<Rika> I have plenty of them
02:18:53FromDiscord<ElegantBeef> I mean you dont seem to overuse them and write them for people in here often
02:19:09FromDiscord<hamidb80> :nimRawr:
02:19:18FromDiscord<Rika> Well because I’m usually in class or fucking dead from class
02:19:22FromDiscord<Rika> Or injured apparently
02:19:27FromDiscord<ElegantBeef> Take no offence it's just that you've killed me
02:19:50FromDiscord<Rika> I haven’t actually written proper Nim libraries in a while
02:19:58FromDiscord<Rika> How do y’all have so much time
02:20:10FromDiscord<ElegantBeef> I have nothing but time
02:20:13*Tanger quit (Ping timeout: 260 seconds)
02:20:23FromDiscord<Anonymous Poet> In reply to @ElegantBeef "I have nothing but": 😮 teach
02:20:31FromDiscord<ElegantBeef> Teach what?
02:20:36FromDiscord<ElegantBeef> How to be a leach?
02:20:38FromDiscord<Rika> Man just keeps on pulling in more fans smfh
02:20:47FromDiscord<Anonymous Poet> teach how to have time
02:21:06FromDiscord<ElegantBeef> Step 1: be a leech.↵Step 2: There is no step 2.
02:21:20FromDiscord<hamidb80> In reply to @ElegantBeef "Step 1: be a": omg
02:21:33FromDiscord<Rika> Beef do you live with your parents xd
02:21:36FromDiscord<ElegantBeef> Yes
02:21:49FromDiscord<Rika> Oh…
02:25:58FromDiscord<Anonymous Poet> i changed my mind again
02:26:06FromDiscord<Anonymous Poet> tuple unpacking would still be really nice
02:26:38FromDiscord<Anonymous Poet> can i just write an overloaded function that does the unpacking for this particular use case?
02:26:49FromDiscord<Anonymous Poet> its not great, but at least it's readable
02:27:21FromDiscord<Anonymous Poet> hmmm ... but then id need to export the type and everything
02:27:39FromDiscord<ElegantBeef> Lazy macro away 😄 https://play.nim-lang.org/#ix=3m1q
02:28:21FromDiscord<ElegantBeef> With absolutely 0 protections, so much like living in rural Canada during a pandemic
02:28:45FromDiscord<Anonymous Poet> i didnt know you could do `proc` as a type without anything else
02:29:12FromDiscord<ElegantBeef> Yep it's the generic for "infer any procedure here"
02:29:42FromDiscord<Anonymous Poet> this is a great starting point, ill play around with it. it might be good enough as is
02:30:11FromDiscord<ElegantBeef> You do need to use either something prefix or infix for this just simply due to not being able to do `a(tuple.expand)`
02:30:46FromDiscord<Anonymous Poet> i assume `a(tuple.expand)` doesnt get the `a`?
02:30:52FromDiscord<Anonymous Poet> in the expand macro
02:31:44FromDiscord<ElegantBeef> Well yea, the issue is that you cannot add the proper AST to the `a` call, as the valid code for `a(t[0], t[1])` is not the same as the valid `t[0]` iirc
02:32:09FromDiscord<ElegantBeef> I think your or someone asked how to do something similar, but dont recall
02:32:11FromDiscord<ElegantBeef> (edit) "your" => "you"
02:32:37FromDiscord<ElegantBeef> think in that case it was `proc <- object or tuple`
02:32:57FromDiscord<Anonymous Poet> i dont think that was me, ive been afk for a few months
02:33:24FromDiscord<Anonymous Poet> question: if this fails, will it be a compile time or run time error?
02:33:34FromDiscord<ElegantBeef> Compile time
02:33:39FromDiscord<Anonymous Poet> ok perfect
02:33:57FromDiscord<ElegantBeef> When it fails it'll be a `tuple[index] is not of type X` or similar
02:34:13FromDiscord<ElegantBeef> like change my test proc to a float
02:34:56FromDiscord<ElegantBeef> Do want to note, that since macros are expanded at compile time the codegeneration issues will never be at runtime
02:35:14FromDiscord<Anonymous Poet> i thought that would be the case, but i havent used nim macros much
02:35:36FromDiscord<ElegantBeef> Yea was just making it concrete, any code they generate has to be valid nim code
02:35:49FromDiscord<Anonymous Poet> its kind of sad because they were what made me really dive into trying nim, knowing that the power is there
02:35:58FromDiscord<ElegantBeef> Yea i clearly love them
02:36:04FromDiscord<ElegantBeef> You can do so much cool stuff with them
02:36:34FromDiscord<ElegantBeef> Coming from C# where that wasnt available in the Unity engine, it is wild the power
02:36:41FromDiscord<ElegantBeef> (edit) "Coming from C# where that wasnt available in the Unity engine, it is wild the power ... " 03added "you get"
02:37:27FromDiscord<ElegantBeef> My experience with macro style stuff was tediously searching app domains for finding some attributes on specific classes, and then emitting logic afterwords
02:37:39FromDiscord<ElegantBeef> All at runtime of course, so you either cache it or get performance issues 😄
02:38:23FromDiscord<Anonymous Poet> i previously worked at a c++ gamedev shop where one of the guys wrote compile-time reflection for c++ using templates
02:38:46FromDiscord<Anonymous Poet> that was a level of dark magic that i dont think i could get to myself
02:39:09FromDiscord<ElegantBeef> Lol indeed, though it's quite amazing what you can do with compile time expansion and introspection
02:39:35FromDiscord<Rika> In reply to @Anonymous Poet "that was a level": Now you can in Nim xd
02:40:02FromDiscord<Anonymous Poet> yeah, exactly, haha, nim makes it feel approachable
02:40:05FromDiscord<ElegantBeef> It's less cryptic here!
02:40:30FromDiscord<Rika> Nah it’s more of C++ being in an alien language
02:40:32FromDiscord<Anonymous Poet> doing generics is fine in c++, but most things beyond that is venturing into the arcane
02:40:55FromDiscord<Anonymous Poet> i grew up with it so i always found it fine
02:41:24FromDiscord<Anonymous Poet> but after having my hand held with python for the last few years its definitely not the same anymore
02:42:43FromDiscord<Anonymous Poet> btw, does nim have a special type for named tuples?
02:43:01FromDiscord<Rika> No
02:43:11FromDiscord<Rika> I don’t think there is at least
02:44:25FromDiscord<Anonymous Poet> rip
02:44:35FromDiscord<Anonymous Poet> that wouldve made this pretty foolproof
02:44:46FromDiscord<ElegantBeef> I mean you can just check if it's a named tuple in the macro
02:45:22FromDiscord<Anonymous Poet> how?
02:45:30FromDiscord<Rika> The type looks different
02:45:52FromDiscord<Rika> Anonymous tuples are always in the () form
02:46:48FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=3m1x
02:47:55FromDiscord<Anonymous Poet> ah, i see
02:48:45FromDiscord<Rika> Beef what if there is no type A
02:48:54FromDiscord<ElegantBeef> I didnt even use the A type there cause i'm dumb
02:49:02FromDiscord<Rika> Nice
02:50:21FromDiscord<ElegantBeef> But yea if the `a.getTypeInst.kind != nnkTupleConstr` you want to get the impl to see if it's a named tuple, and while you're at it you might aswell support object unpacking aswell since it's the same thing
02:50:26*thomasross quit (Ping timeout: 240 seconds)
02:50:42FromDiscord<ElegantBeef> But worth noting you can still do `[0]` on a named tuple
02:53:58FromDiscord<Rika> Sure would be nice to use that pattern matching library now would it
02:54:26FromDiscord<Anonymous Poet> is there an eta on when itll merge with the stdlib?
02:55:16FromDiscord<Rika> I don’t think it will? I’m not sure, the info about the standard library is kinda messy in my head
02:56:22FromDiscord<Rika> I’m still for the splitting of the standard library into packages and Nim just pulling them on install
02:56:49FromDiscord<Rika> Though actually there’s still a whole host of issues with that approach
02:57:19FromDiscord<ElegantBeef> Well seems like a distro approach might be what it's moving towards based off conversations about it
02:57:42FromDiscord<ElegantBeef> Eitherway the package manager needs lockfiles for that to happen and has a PR that needs reviewed
02:57:51FromDiscord<Rika> Well I worry about api mismatches in transient dependencies
02:58:28FromDiscord<Rika> Like what if a and b use different JSON versions, and b imports a, and a exports JSON
02:58:32FromDiscord<ElegantBeef> One small segment of the conversation if anyone hasnt read https://github.com/nim-lang/RFCs/issues/371
03:00:24FromDiscord<Anonymous Poet> i feel like theres no way to get around the fact that there will always be a standard library
03:00:44FromDiscord<Anonymous Poet> having it be split up will probably cause more issues
03:00:49FromDiscord<Rika> Like?
03:01:00FromDiscord<Anonymous Poet> exactly the transient deps you talked about
03:01:13FromDiscord<Rika> I mean other than that
03:01:19FromDiscord<ElegantBeef> Well yea, but as time progresses the stdlib will be deprecated in favour of packages due to whatever reason, so then the purpose of it kinda ceases to be seen
03:01:19FromDiscord<Anonymous Poet> from an enterprise point of view, thats a pretty big deal
03:01:39FromDiscord<Rika> In reply to @ElegantBeef "Well yea, but as": But it’s an important issue to fix
03:01:55FromDiscord<Anonymous Poet> if you work in something like banking, where all of the code needs to be vetted, having it split up like that is such a huge hassle nim might be dead on arrival
03:01:58FromDiscord<Rika> If two dependencies rely on two different versions of the same dependency, how do you fix that?
03:02:25FromDiscord<Anonymous Poet> i also doubt that the stdlib will be deprecated
03:02:50FromDiscord<Anonymous Poet> unless a feature is almost entirely unused, thats a huge challenge as well
03:03:18FromDiscord<Rika> In reply to @Rika "If two dependencies rely": Of course this isn’t an issue if the second order dependency isn’t exposed to the main program, but often they are
03:03:21FromDiscord<ElegantBeef> The current example is json, and it presently is desired to replaced with a new version that isnt as slow and doesnt have the same api, so it's already a thing
03:03:37FromDiscord<Rika> Well it doesn’t matter what package
03:03:48FromDiscord<ElegantBeef> In reply to @Anonymous Poet "i also doubt that": Talking to this
03:03:53FromDiscord<Rika> If whichever package ever changes API again then
03:03:57FromDiscord<Rika> Okay
03:04:37leorize[m]how would the stdlib being splitted up make nim DOA?
03:05:01ForumUpdaterBotNew thread by Ward: Memlib - Load Windows DLL from memory, see https://forum.nim-lang.org/t/7943
03:05:09FromDiscord<Rika> The banking example doesn’t make sense
03:05:27FromDiscord<Rika> They’ll have to vet the library no matter if it is split or not
03:05:27FromDiscord<Anonymous Poet> In reply to @leorize "how would the stdlib": for example, ive worked at a bank that was still using angular.js (v1) because they insisted on vetting absolutely everything
03:05:28FromDiscord<ElegantBeef> The same people are working on the stdlib, it's just no longer shipped with the compiler
03:05:56leorize[m]and how does splits make it hard to vet?
03:06:04FromDiscord<Anonymous Poet> i imagine that the prospect of having to vet a bunch of small, disparate libraries which may or may not be used, would be arduous enough to be not worth it
03:06:09FromDiscord<ElegantBeef> What's the vetting process reading over the source code? Which would be identical source code just in different repos?
03:06:18leorize[m]uh... no?
03:06:25FromDiscord<Rika> … the standard library is still going to be vetted split or not
03:06:40FromDiscord<Anonymous Poet> ok, hold on, to be clear
03:06:44FromDiscord<Anonymous Poet> when you say split
03:06:45leorize[m]you don't vet random libraries
03:06:53FromDiscord<Anonymous Poet> do you imagine it is one single chunk?
03:07:05leorize[m]wdym?
03:07:14FromDiscord<Anonymous Poet> like, `nimble install std`
03:07:19FromDiscord<Rika> The standard library will be split into its individual provided modules
03:07:20FromDiscord<ElegantBeef> A single versioned stdlib or each package versioned
03:07:27leorize[m]no
03:07:37FromDiscord<Anonymous Poet> In reply to @ElegantBeef "A single versioned stdlib": this ^
03:07:42FromDiscord<Rika> I imagine the latter
03:07:54FromDiscord<Rika> Either case still doesn’t make it harder to vet
03:07:58leorize[m]even if it's a collection of nimble packages, what say you can't just fetch all of your deps in a folder then vet that?
03:08:08leorize[m]it's has zero difference to a standard library
03:08:20FromDiscord<Rika> It’s not going to be much larger than the whole standard library
03:08:50FromDiscord<ElegantBeef> I mean it might grow larger, but why would you vet `db_mysql` if you dont use it 😄
03:08:51FromDiscord<Anonymous Poet> speaking from experience, the bureaucracy of the process is enough for people to not want to even ask for the vetting
03:09:12FromDiscord<Rika> In reply to @ElegantBeef "I mean it might": It’s only going to be larger when multiple (compatible) versions are used
03:09:17FromDiscord<Anonymous Poet> and beef's point is also a counterpoint
03:09:25FromDiscord<Rika> (Unused modules are ignored in both cases)
03:09:34FromDiscord<Anonymous Poet> because in the original pass, no one was using mysql, but then someone had a use case for it
03:09:48leorize[m]well, I'm pretty sure companies are very interested in rust and rust does exactly this
03:09:49FromDiscord<Anonymous Poet> so now you have to add that to the list of things to be vetted
03:09:52FromDiscord<Rika> Your argument still doesn’t make sense
03:09:54FromDiscord<ElegantBeef> And now you vet 1 more module, the exact same as you would have to do that way
03:10:01FromDiscord<Rika> It’s the same thing with the standard library now
03:10:12FromDiscord<ElegantBeef> Are you suggesting that people vet the entire stdlib
03:10:12FromDiscord<Anonymous Poet> In reply to @Rika "It’s the same thing": the standard library is implicitly trusted
03:10:17FromDiscord<Rika> That’s stupid
03:10:18FromDiscord<ElegantBeef> And it'd still be the stdlib
03:10:21FromDiscord<Rika> No one would do that
03:10:34leorize[m]that's stupid, no one should ever trust the stdlib if they're paranoid
03:10:54FromDiscord<Rika> If you’re that paranoid you would vet literally everything anyway
03:11:02FromDiscord<ElegantBeef> Like it's no different, it has the same maintaners writers, and under the same organization, why does it suddenly change cause it's hosted on seperate repos
03:11:04FromDiscord<Rika> That includes the compiler
03:11:20FromDiscord<ElegantBeef> You could always clone all the modules into a single folder then use that as the stdlib
03:11:29FromDiscord<ElegantBeef> And there you have the same thing as present
03:11:54FromDiscord<Anonymous Poet> i mean, at the end of the day, im just a random person sharing their opinion; no need to convince me one way or the other
03:12:16FromDiscord<Anonymous Poet> but i suspect you'll find that a lot of people wont see the two things as equivalent even though they are
03:12:39FromDiscord<Anonymous Poet> the decision makers often arent well-versed in cs
03:12:59FromDiscord<Rika> Then they are doomed to fail sooner or later
03:13:05leorize[m]usually they just hire a third-party auditor
03:13:15leorize[m]because if you don't understand something you don't do it
03:13:33FromDiscord<ElegantBeef> If that's actually an issue you have an automated constructed package which is identical to the stdlib we have now and ticks up every time one of the packages updates
03:13:39FromDiscord<Anonymous Poet> In reply to @leorize "usually they just hire": this is probably true, though that introduces a cost
03:14:02leorize[m]cost less than screwing things up yourself
03:14:05FromDiscord<Anonymous Poet> In reply to @Rika "Then they are doomed": with due respect, if the goal is to grow nim's enterprise adoption, thats not a winning attitude, even if it might be reasonable
03:14:41FromDiscord<Anonymous Poet> that said, of course, that may not be the goal
03:14:57FromDiscord<Anonymous Poet> and it may introduce costs to the nim team (maybe, idk), so it might not be worth it
03:15:04FromDiscord<Anonymous Poet> (edit) "and it may introduce costs to the nim team (maybe, idk), so it might not be worth ... itanyways" 03added "worrying about" | "worrying aboutit ... " 03added "anyways"
03:15:41FromDiscord<Rika> The argument does not make sense
03:16:09FromDiscord<Anonymous Poet> maybe im not doing a good job explaining? im happy to try again if you can clarify what doesnt make sense
03:16:38FromDiscord<Rika> I don’t understand why you think companies would implicitly trust the standard library
03:17:06*rockcavera quit (Remote host closed the connection)
03:17:10FromDiscord<Anonymous Poet> my base case here is c++. im not saying that they wouldnt vet it at all, just that theres a higher fault tolerance
03:17:58FromDiscord<Anonymous Poet> the three main c++ compilers have so many eyes on them that i suspect there may be a lot of companies comfortable saying "if there were any issues, someone else wouldve found them"
03:18:16FromDiscord<Rika> C++ has been around for so much longer than Nim so it’s fine to trust the library there
03:18:49FromDiscord<Anonymous Poet> suppose we took it from the other perspective
03:18:54leorize[m]people said the same about the linux kernel and some "researchers" got some security issues in un-noticed
03:19:28FromDiscord<Anonymous Poet> In reply to @leorize "people said the same": if you're talking about the recent university of michigan (?) thing, all the changes were rejected
03:20:05FromDiscord<Anonymous Poet> In reply to @Anonymous Poet "suppose we took it": these kinds of companies would probably vet once and self-host all of the code thereafter anyways. so what do you gain by splitting up the stdlib?
03:20:09FromDiscord<ElegantBeef> Their entire research pattern was to "Submit flawed PR's then if they get accepted, tell the maintainers 'dont merge it's dangerous code'"
03:20:42FromDiscord<ElegantBeef> So the code supposedly wouldnt get merged anyway, due to the minor ethics of them
03:21:15FromDiscord<Anonymous Poet> my understanding is that that's what the researchers wanted to do, but none of the proposed changes were accepted to begin with
03:21:37leorize[m]one of them did get accepted
03:22:07FromDiscord<Anonymous Poet> ah, ty for the correction
03:23:10leorize[m]anyhow, that's beside the point. the point is that a bad actor can always slip something in if they are competent enough
03:23:20FromDiscord<Rika> In reply to @Anonymous Poet "these kinds of companies": The other benefits are discussed in the issue sent above isn’t it?
03:23:29leorize[m]hell, even good intentioned fixes can introduce serious security issues
03:24:05leorize[m]the point is that you can't implicitly trust code without vetting it if you're paranoid
03:24:38FromDiscord<ElegantBeef> Well if you're auditing you have to audit all the code you're planning on using or you're wasting your time
03:35:19FromDiscord<Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=3m21
03:36:16FromDiscord<Anonymous Poet> as an individual user, nim makes using packages easy enough (as does npm, for example), that it isnt really a big burden either way
03:36:50FromDiscord<Anonymous Poet> but that doesnt mean that there arent contexts where it can be a very big deal
03:40:44FromDiscord<Anonymous Poet> thanks guys for the interesting discussion and links, im going to hop off for tonight
03:40:53FromDiscord<ElegantBeef> Buh bye
03:44:45*spiderstew joined #nim
03:46:43*spiderstew_ quit (Ping timeout: 276 seconds)
04:00:45*leorize quit (Ping timeout: 240 seconds)
04:02:56*leorize joined #nim
04:05:44FromDiscord<ajusa> In reply to @Anonymous Poet "if you're talking about": It wasn't Michigan, it was Minnesota I think
04:21:39*Tlangir quit (Ping timeout: 268 seconds)
04:27:33FromDiscord<lamersc> Anyone else have choosenim on windows install set off windows defender?
04:29:05FromDiscord<lamersc> https://media.discordapp.net/attachments/371759389889003532/840082784365051904/image0.jpg
04:30:23FromDiscord<AlexRM> What's the color theme of the sample code on the home page?
04:32:20FromDiscord<ElegantBeef> In reply to @lamersc "Anyone else have choosenim": Due to what the antivirus is looking for, all nim software using 1.4.6 trips antivirus with a false positive
04:32:44*Tanger joined #nim
04:38:17FromDiscord<ElegantBeef> You should be able to download a older release and it shouldnt complain
04:59:30*idf joined #nim
05:13:22*vicfred_ joined #nim
05:13:43*letto quit (Ping timeout: 252 seconds)
05:15:41*vicfred quit (Ping timeout: 240 seconds)
05:18:40*narimiran joined #nim
05:51:30*vicfred_ quit (Quit: Leaving)
06:00:48*vicfred joined #nim
06:35:49ForumUpdaterBotNew thread by Niminem: How to keep Javascript expression in generated code, see https://forum.nim-lang.org/t/7944
06:48:04*PMunch joined #nim
06:50:53ForumUpdaterBotNew Nimble package! memlib - Load Windows DLL from memory, see https://github.com/khchen/memlib
06:54:00*letto joined #nim
06:56:11FromDiscord<Rika> What are the memory implications of closures, like what kind of and how much memory is occupied when a closure is made
06:58:34FromDiscord<ElegantBeef> Have you read the internal docs on how closures are generated?
06:59:01FromDiscord<ElegantBeef> http://nim-lang.github.io/Nim/intern.html#code-generation-for-closures if not
06:59:50FromDiscord<ElegantBeef> Seems it's mostly just a case of the data it captures
07:02:46FromDiscord<Rika> Nothing else hidden? Okay
07:03:02FromDiscord<ElegantBeef> atleast that indicates a reference to the data it captures
07:05:06FromDiscord<Rika> Yeah I plan to have literally no references so I don’t need to know about those issues
07:05:29FromDiscord<Rika> What is the main reason they’re called slow?
07:06:43FromDiscord<ElegantBeef> I dont know, havent used them much.
07:07:13FromDiscord<Rika> Funny how that also implies that you don’t use async that often either
07:15:47FromDiscord<Rika> I didn’t realise, closures need a ref
07:16:05FromDiscord<Rika> Well whatever, should be fine given I only need around 5 or so closures
07:22:47FromDiscord<ElegantBeef> In reply to @Rika "Funny how that also": Comically i've only used closure iterators as far as i remember 😄
07:26:37*Vladar joined #nim
07:27:43FromDiscord<Rika> Given that my processor has two cores, what do I need to manually implement to have threading in an embedded environment
07:28:20FromDiscord<ElegantBeef> There is 0 chance it's a pico right?
07:28:34FromDiscord<Rika> Not a poco
07:28:37FromDiscord<Rika> Pico
07:28:49FromDiscord<Rika> STM chip
07:29:02FromDiscord<Rika> I’m not actually using it either
07:29:05FromDiscord<Rika> Just wondering
07:30:06FromDiscord<ElegantBeef> Yea i was just curious since i know the pico has a C api which takes a function callback for threading, to support Nim's threading you need the OS calls and similar implemented for your hardware i imagine
07:33:37FromDiscord<ElegantBeef> The entire thread module is a few hundred lines and should atleast show what is needed
07:35:33FromDiscord<ElegantBeef> Though there might be more stuff needed, i dont know so i should shush
07:36:34PMunchOh damn, didn't realise the Pico was dual-core
07:36:56FromDiscord<ElegantBeef> Yea it's really nifty
07:47:16FromDiscord<Varriount> In reply to @Rika "Funny how that also": If I had to guess, a closure environment is represented as a `ref object` full of other `ref object` values, so you're paying for the double-indirection.
07:52:55PMunchHmm, does anyone have a really long log-file of some kind hanging about?
07:53:48PMunchI need something to try some compression benchmark against :P
07:55:13saemIf you're running a modern Linux distro I'm sure journald can drown you in logs.
07:55:25PMunchWell, I've already used those :P
07:55:44PMunchIt only had about a years worth
08:01:45*NimBot joined #nim
08:02:32saemDoes this work? https://github.com/logpai/loghub
08:03:11PMunchOoh, that's perfect!
08:03:32FromDiscord<ElegantBeef> > All these logs amount to over 77GB in total↵Still not large enough?
08:04:27PMunchI mean I just wanted some other logs to check that I hadn't over-tuned it to my specific data :P
08:05:02FromDiscord<ElegantBeef> I really like to believe saem used github's search and just typed in "Big fucking logs"
08:06:32saemHandy in a pinch
08:06:54FromDiscord<ElegantBeef> Time for me to browse through nim projects
08:07:03FromDiscord<ElegantBeef> See someone is remaking wolfenstein in nim
08:07:36PMunchWait really?
08:08:00FromDiscord<ElegantBeef> https://github.com/sidrym/wolfenim
08:08:01FromDiscord<ElegantBeef> Yep
08:08:14*Vladar quit (Quit: Leaving)
08:08:29FromDiscord<ElegantBeef> Seems they're doing proper 2D rendering using raycasting
08:08:53FromDiscord<ElegantBeef> Line 86 probably means they didnt expect anyone to find this
08:09:13*hyiltiz quit (Ping timeout: 240 seconds)
08:10:49Amun_RaElegantBeef: and 149
08:11:07Amun_Raand that's the only line with an error
08:11:21FromDiscord<ElegantBeef> Look at this i have summoning powers, lurkers now speaketh 😄
08:11:34*hyiltiz joined #nim
08:11:34*hyiltiz quit (Changing host)
08:11:34*hyiltiz joined #nim
08:12:18Amun_RaI tend to write something once a week ;>
08:12:56FromDiscord<ElegantBeef> Ah i've never seen you before
08:15:13PMunchPfft, do you even Nim @ElegantBeef :P
08:15:23PMunchI spoke to him just yesterday!
08:15:23FromDiscord<ElegantBeef> Havent recently no
08:15:32FromDiscord<ElegantBeef> Lol, apparently not
08:15:38PMunchHaha
08:15:51Amun_Ra:P
08:16:17FromDiscord<ElegantBeef> I did recently refactor my RPC macro and made it less hideous, but then finally tested it remotely for the first time and it didnt work, so that was fun
08:17:42PMunchHaha, that's always fun
08:18:07PMunchI've recently done some shared header compression stuff for work, and used Nim for benchmarking
08:19:06FromDiscord<ElegantBeef> Nice
08:19:18FromDiscord<ElegantBeef> Actually using nim and getting paid for it, wild stuff
08:19:22Amun_Rabtw, what's the difference between array[uint8, int] and array[256, int]?
08:19:39FromDiscord<ElegantBeef> Nothing
08:19:55FromDiscord<ElegantBeef> Nim lets you use ordinal types for array index size
08:20:06Amun_Rawell, I've encountered the difference
08:20:12Amun_Ralet me reproduce it
08:20:23FromDiscord<ElegantBeef> You probably have to explicitly convert to byte on indexing
08:20:39Amun_RaI did
08:21:19FromDiscord<ElegantBeef> But yea repro and throw on nim-playground
08:21:43PMunchIt's handy to lock it to a type if you use a distinct int, range, or an enum
08:22:19Amun_Rahttps://play.nim-lang.org/#ix=3m2R
08:22:43PMunchDamn ElegantBeef, the Pico library is very large!
08:23:10FromDiscord<ElegantBeef> unsigned integers over/underflow
08:23:33FromDiscord<Tavon> The error is actually coming from the `uint8 res`
08:23:34FromDiscord<ElegantBeef> Yea i know, you can always download it once and use a system variable
08:23:59FromDiscord<ElegantBeef> I just dont explain that since that's apart of the pico-sdk which i think everyone should still read
08:24:00Amun_Rahmm, I thought 'uint8 res' makes the value 8-bit
08:24:24FromDiscord<ElegantBeef> Well it attempts to convert it and it can error, if you want to just get the first byte you can `cast[byte](res)`
08:24:44FromDiscord<ElegantBeef> And yes my years of C# says it's `byte` not `uint8`, sorry not sorry
08:24:54Amun_Raso the question is - why does it work on [256, uint8] array
08:25:07FromDiscord<Tavon> sent a code paste, see https://play.nim-lang.org/#ix=3m2S
08:26:41FromDiscord<ElegantBeef> For some reason doing the conversion inside the bracket expr is the issue
08:26:43FromDiscord<Tavon> I think in your example, the cast is actually ignored for some reason, hence the error
08:27:24PMunchHmm, curiously enough assigning uint8 res to a variable makes it work
08:27:27PMunchThat's odd
08:27:27Amun_Raso I've found a bug
08:27:39PMunchLooks like it
08:27:45Amun_RaPMunch: yes, it works if you assing to a uint8 var
08:28:08FromDiscord<Tavon> Probably coming from type inference weirdness
08:28:13PMunch@ElegantBeef, yeah I wasn't saying it was your fault :P I just didn't expect the Pico libraries to be that big
08:28:50FromDiscord<ElegantBeef> Well obviously, i was just saying if you want to only download it for a single project you can and should do as such
08:29:04FromDiscord<ElegantBeef> Instead of cloning it many times 😛
08:30:50FromDiscord<Tavon> @Amun_Ra do you want to create an issue?
08:31:30FromDiscord<ElegantBeef> They damn well better, as far i as i know they've been here for all of 3 minutes and found a bug 😛
08:32:15Amun_RaTavon: yes, I'll post it in a 1h
08:37:26Amun_Rak, done
08:37:52PMunchOh damn, that hour flew by..
08:38:04Amun_Ra;)
08:38:06FromDiscord<ElegantBeef> Must be daylight savings again
08:38:35FromDiscord<ElegantBeef> I'm going to start storing all my clocks in ice to prevent them from changing back an hour, though they're electric so let's hope it works
08:39:53ForumUpdaterBotNew question by Abhimanyu Desai: Error importing faster_than_requests on windows, see https://stackoverflow.com/questions/67431610/error-importing-faster-than-requests-on-windows
08:40:44FromDiscord<Rika> How about async? What would I need for async in embedded
08:41:51FromDiscord<ElegantBeef> It uses system calls, so i figure a fair bit
08:48:15saemOh joy, meeting at 8am
08:48:23saemProbably won't go.
08:48:34FromDiscord<ElegantBeef> Join the club
08:49:03saemInsomnia sucks
08:49:55FromDiscord<ElegantBeef> Yea that's totally my problem too, not that i'm a person that sleeps from 3am to 12pm 😄
08:51:34saemI'm a natural night owl, but there were years where I could take being a morning person.
08:52:35FromDiscord<Rika> In reply to @ElegantBeef "It uses system calls,": Hm, okay
08:53:34*clyybber joined #nim
08:54:15*hoijui joined #nim
08:56:58FromDiscord<Rika> Kinda gonna be difficult to translate ISRs to async is it
08:57:25FromDiscord<Rika> Wait a minute isn’t this just CPS
09:00:49FromDiscord<Rika> No not really
09:01:51FromDiscord<clyybber> In reply to @Tavon "@Amun_Ra do you want": It's because the conversion is done at compile time I think
09:02:09FromDiscord<clyybber> And at compile time conversions from uintXX to uint8 are range checked
09:02:24FromDiscord<Tavon> Yes you're right
09:02:56FromDiscord<Tavon> sent a code paste, see https://play.nim-lang.org/#ix=3m36
09:03:36FromDiscord<Tavon> But I don't think the range check is the issue, I think the conversion doesn't ensure that the result is inside the bounds of the new type
09:03:41FromDiscord<Tavon> I'm lookink into it
09:05:28FromDiscord<Tavon> (edit) "lookink" => "looking"
09:06:02FromDiscord<Tavon> Oh no you're right
09:08:19FromDiscord<Rika> Why would that be an oh no
09:08:59FromDiscord<Tavon> sent a code paste, see https://play.nim-lang.org/#ix=3m37
09:09:13FromDiscord<Tavon> (edit) "https://play.nim-lang.org/#ix=3m37" => "https://play.nim-lang.org/#ix=3m38"
09:09:35FromDiscord<Tavon> So I guess the uint8 cast shouldn't work in RT in the first place
09:09:46FromDiscord<ElegantBeef> Rika it's more of an "Oh no i was wrong, you are right" just ac orrection
09:10:35FromDiscord<ElegantBeef> But clyybber being right isnt something you want, it'll just swell his already bloated ego 😛
09:14:37FromDiscord<clyybber> lol
09:15:05FromDiscord<clyybber> In reply to @Tavon "So I guess the": It's intentional that it works at runtime, and intentional that it doesn't at compile time
09:15:24FromDiscord<Tavon> But why only for unsigned?
09:16:48FromDiscord<clyybber> Because unsigned integers are often used for bitop things, and are "more" unsafe than int's
09:16:50FromDiscord<clyybber> (edit) "int's" => "ints"
09:16:54FromDiscord<clyybber> It's documented here https://nim-lang.github.io/Nim/manual#statements-and-expressions-type-conversions
09:18:23FromDiscord<Tavon> Okay
09:19:47Oddmongeris it worth using nimscript ? I wonder what could be the interest (ok no compilation, but compilation is fast anyway)
09:20:43Oddmongeri know nimble use it (nake was compiling itself)
09:25:03*alri[m] joined #nim
09:33:43FromDiscord<Rika> In reply to @ElegantBeef "Rika it's more of": So an ah no
09:34:43*lritter joined #nim
09:45:09alri[m]I'm working with asyncnet and I'm running into an issue where I simply cannot close a socket, and the number of `/proc/PID/fd` items reaches a limit because of it. I don't want to start raising the limit, I don't need that many sockets. I'd just like to close some. It's very likely my code is at fault but it's starting to dawn on me that maybe it's not. So, I'm asking, is this a known issue?
09:46:38*idf quit (Ping timeout: 268 seconds)
10:04:39*xet7 joined #nim
10:15:17*pbb joined #nim
10:15:28FromDiscord<Varriount> In reply to @alri "I'm working with asyncnet": @alri You'll need to post code. As far as I know, you should be able to close sockets.
10:15:50FromDiscord<Varriount> (I'm going to bed, so you might have to wait for someone else)
10:16:17alri[m]Thanks, I was just about to tell everyone to ignore the above. I think I figured it out. Soon after I opened my mouth naturally
10:20:48FromDiscord<Rika> Oof
10:38:44FromDiscord<mlokis> how can i deal wint variable amount of microsecond digits in date?
10:38:55FromDiscord<mlokis> (edit) "wint" => "with"
11:10:29ForumUpdaterBotNew thread by Kaushalmodi: How to map to a pointer to array of function symbols in a C header? , see https://forum.nim-lang.org/t/7945
11:24:00*hoijui quit (Quit: Leaving)
11:55:45ForumUpdaterBotNew post on r/nim by msouza_rj: Use of func versus proc, see https://reddit.com/r/nim/comments/n6wqs8/use_of_func_versus_proc/
12:17:47*idf joined #nim
12:27:21*rockcavera joined #nim
12:27:27*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
12:27:42*Gustavo6046 joined #nim
12:37:09*leorize quit (Ping timeout: 240 seconds)
12:54:47*leorize joined #nim
12:57:57*Tanger quit (Quit: Leaving)
13:34:09FromDiscord<Rika> aw, i cant have a generic generic? `type a[T,U] = object ... field: T[U]`
13:35:55FromDiscord<konsumlamm> nope
13:36:10FromDiscord<konsumlamm> that's called higher kinded types, btw
13:38:00FromDiscord<Rika> why cant i tho
13:41:21FromDiscord<haxscramper> https://github.com/nim-lang/RFCs/issues/5 not implemented
13:41:23FromDiscord<konsumlamm> because it hasn't been implemented
13:41:39FromDiscord<konsumlamm> that's the answer for most things you can't do