<< 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 ... " added "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" added "worrying about" | "worrying aboutit ... " added "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
14:33:01ForumUpdaterBotNew question by user15795022: Converting a log analysis script from Python to Nim, see https://stackoverflow.com/questions/67436850/converting-a-log-analysis-script-from-python-to-nim
14:35:20ForumUpdaterBotNew thread by Shirleyquirk: Is there a way to detect if template is expanded at global scope or within a function, see https://forum.nim-lang.org/t/7946
15:00:33narimiranNim Dev Meet starting now: https://meet.jit.si/NimDevMeet
15:22:14*letto quit (Quit: Konversation terminated!)
15:24:08*letto joined #nim
15:27:02FromDiscord<no name fits> So I tried to implement float comparison, but can someone help me make my algorithm less ugly? https://play.nim-lang.org/#ix=3m58
16:22:15*icebattle quit (Quit: leaving)
16:40:53FromDiscord<Gary M> so I'm trying to pass a different C compiler using -cc:env which works fine with --compile_only but I want it to do the whole linking process and everything.
16:41:50*kitech1- joined #nim
16:42:16*kitech1 quit (Ping timeout: 268 seconds)
16:45:32FromDiscord<reilly> Is there a way I can make an object seamlessly iterable? My object contains a seq, and I'd like to be able to just do `for x in myObject` without the need for anything extra, like `for x in myObject.records` or `for x in iter(myObject)`.
16:46:27FromDiscord<reilly> I would assume that there's a special iterator name I could use (similar to how `contains` works with `in`), but I don't know what it would be.
16:46:49FromDiscord<Hi02Hi> `items`
16:48:45*leorize quit (Ping timeout: 240 seconds)
16:49:43FromDiscord<Hi02Hi> i think items is the implicit iterator, so to speak
16:51:02FromDiscord<reilly> Story checks out, thanks.
16:51:03FromDiscord<Rika> yes
17:01:21*Jeff[m]2 is now known as altarrel
17:06:17*leorize joined #nim
17:07:37*Guest94576 joined #nim
17:07:47*kayabaNerve quit (Quit: Leaving)
17:10:57FromGitter<bung87> anyone can give me idea why my client -server test randomly fails on mac and windows? it just three http requests, I found it runs in wrong call order with chronos's async https://github.com/bung87/scorper/blob/devel/tests/trange.nim
17:31:16*lritter quit (Quit: Leaving)
17:33:54*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
17:35:50*Lord_Nightmare joined #nim
18:03:32*motersen quit (Remote host closed the connection)
18:03:48*motersen joined #nim
18:31:14*notchris quit (Ping timeout: 245 seconds)
18:31:47*raboof quit (Ping timeout: 260 seconds)
18:35:43*notchris joined #nim
18:36:15*raboof joined #nim
18:55:15FromDiscord<jtiai> Is there somewhere documentation how to create bindings for C library?
18:55:56FromDiscord<haxscramper> https://nim-lang.org/docs/manual.html#foreign-function-interface
19:09:55FromDiscord<jtiai> Let's see if I can do some GIS magic here...
19:12:07*idf quit (Ping timeout: 268 seconds)
19:16:26ForumUpdaterBotNew thread by Kaushalmodi: How to convert a string to an identifer or symbol?, see https://forum.nim-lang.org/t/7947
19:23:55FromDiscord<codic> can I collect a range directly into a seq? like if I wish to write↵``
19:24:03FromDiscord<codic> (edit) "can I collect" => "sent" | "range directly into a seq? like if I wish to write↵``" => "code paste, see https://play.nim-lang.org/#ix=3m6J"
19:27:44*Guest94576 quit (Quit: Guest94576)
19:29:14FromDiscord<haxscramper> `echo toSeq(0 .. 1000).filterIt(it mod 2 == 0)`, or `collect(sewSeq): for i in 1 .. 1000: if i mod 2 == 0: i`
19:29:35FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3m6M
19:29:47FromDiscord<haxscramper> Latter one is more efficient as it does not create an intermediate sequence
19:30:51FromDiscord<codic> oh so i cant just use the val directly, I need to put it into a seq
19:31:20FromDiscord<codic> wait what is sewSeq?
19:31:26FromDiscord<haxscramper> `newSeq`
19:31:31FromDiscord<codic> oh
19:32:19FromDiscord<codic> ok that works, great
19:32:34FromDiscord<ajusa> bit of a strange question, but is there anyway to compile code from stdin, and have the output binary be deleted as well? Like if I just want to make sure something from stdin compiles? (note that this is for the js backend so I don't think `nim check` works)
19:32:57FromDiscord<ajusa> do I do something like `-o: /dev/null`?
19:33:57FromDiscord<haxscramper> `nim check`
19:34:10FromDiscord<haxscramper> it does not compile to C code, only confirms nim part is correct
19:34:25FromDiscord<haxscramper> so `echo "echo 12" | nim check -` should wokr
19:53:33*leorize quit (Ping timeout: 240 seconds)
19:54:01*xet7_ joined #nim
19:54:16*xet7_ quit (Remote host closed the connection)
19:54:41*xet7_ joined #nim
19:55:59*xet7 is now known as Guest91791
19:56:31*Guest91791 quit (Ping timeout: 268 seconds)
19:57:18*xet7_ quit (Remote host closed the connection)
19:57:42*xet7_ joined #nim
20:10:11FromDiscord<ajusa> Hm, that doesn't seem to work for the `js` backend - `nim check` gives errors but `nim js` works fine. I ended up just going with `nim js -` instead.
20:10:57*leorize joined #nim
20:12:35FromDiscord<dom96> hello hello
20:12:37FromDiscord<dom96> happy friday
20:12:58FromDiscord<reilly> How can `stats.mean(s: RunningStat): float` return NaN?
20:13:07PMunchWell, half happy, half working with F# for a uni-project..
20:17:10FromDiscord<James> I see there are a number of cross platform GUI libraries that Nim folks are using. Anyone know which one has the best a11y support?
20:18:55FromDiscord<ElegantBeef> nigui is probably the best due to using native gui or gtk
20:19:05FromDiscord<Varriount> If I had to guess offhand, NimQML
20:19:42FromDiscord<ajusa> What's the best way for getting a list of strings between two strings? I've looked at strscans, parseutils, re, and nre but none of them seem to have a simple way of doing it
20:19:53FromDiscord<James> Native or Qt seem like good guesses. Thanks!
20:19:55FromDiscord<Varriount> In reply to @ajusa "What's the best way": Can you explain?
20:20:39FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3m76
20:21:01FromDiscord<ElegantBeef> `parseuntil(str, delimStart)` `parseUntil(delimEnd`
20:21:10FromDiscord<ElegantBeef> Rather skipUntil for the first one
20:21:51FromDiscord<ajusa> Ah, I see. I was looking at `captureBetween` in parseutils, thanks!
20:22:37*rockcavera quit (Remote host closed the connection)
20:23:43FromDiscord<ajusa> In reply to @ElegantBeef "Rather skipUntil for the": skip until doesn't seem to have a string version for the thing to be skipped until, so seems like parseUntil is the best option
20:24:14*narimiran quit (Ping timeout: 246 seconds)
20:24:46FromDiscord<Varriount> @ajusa If you need anything more complicated, you might look at NPeg
20:25:56FromDiscord<ajusa> Yeah, I've glanced at that as well lol. This is exactly as complicated as I need. I would have loved it if I could use `strscans`, but it doesn't really play well with multiple matches (no indexes are returned)
20:25:58Amun_Rabut not too complicated
20:32:56FromDiscord<reilly> What conditions could cause something to return NaN? I've never had this problem before.
20:44:03FromGitter<bung87> parse number from string that doesn't seem to be numberic
21:01:16*azed joined #nim
21:03:01*Gustavo6046 quit (Remote host closed the connection)
21:03:41*Gustavo6046 joined #nim
21:03:43FromDiscord<Varriount> In reply to @reilly "What conditions could cause": Dividing by zero, operations against infinity values
21:04:03FromDiscord<Varriount> If you're targetting a non-x86 platform, possibly other operations too
21:12:57*thomasross joined #nim
21:51:29FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3m7C
21:51:56FromDiscord<brainproxy> not sure how to to do it, `var running = ...` didn't work
21:53:09FromDiscord<ElegantBeef> replace `var` with `ptr` and it should work, though what are you converting from
21:53:28FromDiscord<brainproxy> trying
21:56:23FromDiscord<brainproxy> sent a code paste, see https://paste.rs/pcp
21:56:25FromDiscord<brainproxy> it wants a var
21:57:15FromDiscord<ElegantBeef> `running[].load`
21:57:20FromDiscord<ElegantBeef> Ah
21:58:10FromDiscord<ElegantBeef> What is the type of `runningPtr`?
21:59:09FromDiscord<brainproxy> it's the `addr` of a field on a ref object that's of type `Atomic[bool]`
21:59:34FromDiscord<brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3m7F
21:59:53FromDiscord<brainproxy> (edit) "it's the `addr` of a field on a ref object that's of type `Atomic[bool]` ... " added "cast to `pointer`"
22:00:02FromDiscord<brainproxy> (edit) "`Atomic[bool]`" => "`Atomic[bool]`; the addr is"
22:00:26*letto quit (Ping timeout: 240 seconds)
22:00:36FromDiscord<brainproxy> (edit) "it's the `addr` of a field ... onobject;" added "of type `Atomic[bool]`" | "object that's of type `Atomic[bool]`;" => "object;"
22:00:45FromDiscord<ElegantBeef> There could possibly be a better impl but without the entire code, hard to tell
22:00:58FromDiscord<brainproxy> I'm doing some crazy multithreaded thing
22:01:06FromDiscord<brainproxy> I'm not sure I can decomplect it
22:08:11*letto joined #nim
22:27:07ForumUpdaterBotNew thread by Alexeypetrushin: How to auto-initialise ref object from the raw data?, see https://forum.nim-lang.org/t/7949
22:51:56*azed quit (Ping timeout: 260 seconds)
22:56:44*azed joined #nim
23:42:15*beshr joined #nim
23:58:49FromGitter<Knaque> Does anyone know if Dimscord has a way of sending messages periodically? I didn't see one.