00:00:46 | * | clyybber quit (Ping timeout: 252 seconds) |
00:07:33 | FromDiscord | <exelotl> h0ff https://www.youtube.com/watch?v=1yNZ7JW0yEA |
00:07:57 | FromDiscord | <ElegantBeef> That's not dustin hoffman |
00:09:35 | FromDiscord | <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:40 | FromDiscord | <exelotl> oh yeah renoise is extremely good :D |
00:13:53 | FromDiscord | <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:25 | FromDiscord | <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:33 | FromDiscord | <hamidb80> Error: request to generate code for .compileTime proc: Lit |
00:58:39 | FromDiscord | <hamidb80> what does this even mean |
00:59:22 | FromDiscord | <hamidb80> (edit) "mean" => "mean?" |
01:00:13 | FromDiscord | <hamidb80> https://play.nim-lang.org/#ix=3m19 |
01:00:56 | FromDiscord | <hamidb80> error from line 46 |
01:03:49 | FromDiscord | <ElegantBeef> You've somehow attempted to call a compiletime only procedure at runtime |
01:05:03 | FromDiscord | <hamidb80> what proc? |
01:05:14 | FromDiscord | <hamidb80> `$` ? |
01:05:21 | FromDiscord | <ElegantBeef> Yep |
01:05:29 | FromDiscord | <hamidb80> (edit) "what" => "which" |
01:06:39 | FromDiscord | <hamidb80> i'm almost sure that's not true |
01:07:08 | FromDiscord | <ElegantBeef> macroutils is causing it to call a version of `$` that isnt available at runtime it seems |
01:07:35 | FromDiscord | <hamidb80> In reply to @ElegantBeef "macroutils is causing it": oh |
01:07:48 | FromDiscord | <hamidb80> what should i then? |
01:09:22 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3m1d import it to remove the converter |
01:09:47 | FromDiscord | <ElegantBeef> Pmunch emits some converters that are "nice", but due to how converters work they dont play nice |
01:11:47 | FromDiscord | <hamidb80> i really love that macro |
01:14:26 | FromDiscord | <hamidb80> do you know what does `typed` mean? |
01:14:46 | FromDiscord | <hamidb80> i saw it in `mapIt` implementation |
01:17:20 | FromDiscord | <hamidb80> https://nim-lang.org/docs/manual.html#templates-typed-vs-untyped-parameters |
01:18:40 | FromDiscord | <ElegantBeef> Hamidb no point deleting messages, irc still sees it 😛 |
01:18:56 | FromDiscord | <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:58 | FromDiscord | <Anonymous Poet> hey beef, you still around? |
02:11:25 | FromDiscord | <Rika> No I killed him |
02:11:34 | FromDiscord | <Anonymous Poet> oh :/ |
02:11:44 | FromDiscord | <Anonymous Poet> i dont suppose i can bug you with a question instead then? |
02:11:57 | FromDiscord | <Rika> Lol just ask maybe me or someone else can answer |
02:12:30 | FromDiscord | <Anonymous Poet> i may have just realized that it was stupid in the first place |
02:12:56 | FromDiscord | <Rika> Good talk |
02:13:02 | FromDiscord | <Anonymous Poet> but the feature i wanted might still be interesting: does nim have tuple unpacking similar to javascript's `...` operator? |
02:13:12 | FromDiscord | <hamidb80> In reply to @Anonymous Poet "but the feature i": no |
02:13:14 | FromDiscord | <Rika> A package has it |
02:13:22 | FromDiscord | <hamidb80> In reply to @Rika "A package has it": what package |
02:13:24 | FromDiscord | <Rika> I think it’s called unpack |
02:13:24 | FromDiscord | <hamidb80> ? |
02:13:34 | FromDiscord | <Rika> Or something similar |
02:13:46 | FromDiscord | <hamidb80> https://github.com/technicallyagd/unpack |
02:13:55 | FromDiscord | <Rika> Yup |
02:14:14 | FromDiscord | <Rika> Ah I don’t know about tuples |
02:14:16 | FromDiscord | <Anonymous Poet> hmm, not quite the use case i wante |
02:14:40 | FromDiscord | <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:41 | FromDiscord | <Rika> Hm? Why |
02:15:01 | FromDiscord | <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:05 | FromDiscord | <Rika> Did you look at the read me or just the description |
02:15:10 | FromDiscord | <Anonymous Poet> the readme |
02:15:15 | FromDiscord | <Rika> Ah into a function |
02:15:18 | FromDiscord | <ElegantBeef> Yea i was killed, real shame |
02:15:23 | FromDiscord | <Anonymous Poet> all the examples were like `obj.unpack(val1, val2, ...)` |
02:15:26 | FromDiscord | <Rika> How’s the afterlife? |
02:15:30 | FromDiscord | <ElegantBeef> Dark |
02:15:34 | FromDiscord | <Anonymous Poet> where i want something like `my_func(obj.unpack)` |
02:15:41 | FromDiscord | <Rika> Yeah I can see |
02:16:07 | FromDiscord | <Anonymous Poet> i realized it might be stupid though because this can produce very different objects, so yielding doesnt make much sense |
02:16:14 | FromDiscord | <hamidb80> In reply to @ElegantBeef "Dark": can you use discord there? |
02:16:26 | FromDiscord | <Anonymous Poet> although really the conclusion might be that my architecture might be dumb |
02:16:37 | FromDiscord | <ElegantBeef> Time to make a new operator for a tuple/object unpack call |
02:16:48 | FromDiscord | <Anonymous Poet> this is why i ask for beef |
02:17:04 | FromDiscord | <Rika> xd |
02:17:13 | FromDiscord | <Anonymous Poet> sometimes he actually does it too |
02:17:29 | * | Tlangir joined #nim |
02:17:36 | FromDiscord | <Rika> Smh you make me sound useless |
02:17:58 | FromDiscord | <Anonymous Poet> i just havent known you as well yet :/ |
02:18:09 | FromDiscord | <hamidb80> :nimAngry: |
02:18:19 | FromDiscord | <ElegantBeef> Rika you dont have a problem with macros, i do 😄 |
02:18:32 | FromDiscord | <Rika> What do you mean I don’t have a problem with macros |
02:18:36 | FromDiscord | <Rika> I have plenty of them |
02:18:53 | FromDiscord | <ElegantBeef> I mean you dont seem to overuse them and write them for people in here often |
02:19:09 | FromDiscord | <hamidb80> :nimRawr: |
02:19:18 | FromDiscord | <Rika> Well because I’m usually in class or fucking dead from class |
02:19:22 | FromDiscord | <Rika> Or injured apparently |
02:19:27 | FromDiscord | <ElegantBeef> Take no offence it's just that you've killed me |
02:19:50 | FromDiscord | <Rika> I haven’t actually written proper Nim libraries in a while |
02:19:58 | FromDiscord | <Rika> How do y’all have so much time |
02:20:10 | FromDiscord | <ElegantBeef> I have nothing but time |
02:20:13 | * | Tanger quit (Ping timeout: 260 seconds) |
02:20:23 | FromDiscord | <Anonymous Poet> In reply to @ElegantBeef "I have nothing but": 😮 teach |
02:20:31 | FromDiscord | <ElegantBeef> Teach what? |
02:20:36 | FromDiscord | <ElegantBeef> How to be a leach? |
02:20:38 | FromDiscord | <Rika> Man just keeps on pulling in more fans smfh |
02:20:47 | FromDiscord | <Anonymous Poet> teach how to have time |
02:21:06 | FromDiscord | <ElegantBeef> Step 1: be a leech.↵Step 2: There is no step 2. |
02:21:20 | FromDiscord | <hamidb80> In reply to @ElegantBeef "Step 1: be a": omg |
02:21:33 | FromDiscord | <Rika> Beef do you live with your parents xd |
02:21:36 | FromDiscord | <ElegantBeef> Yes |
02:21:49 | FromDiscord | <Rika> Oh… |
02:25:58 | FromDiscord | <Anonymous Poet> i changed my mind again |
02:26:06 | FromDiscord | <Anonymous Poet> tuple unpacking would still be really nice |
02:26:38 | FromDiscord | <Anonymous Poet> can i just write an overloaded function that does the unpacking for this particular use case? |
02:26:49 | FromDiscord | <Anonymous Poet> its not great, but at least it's readable |
02:27:21 | FromDiscord | <Anonymous Poet> hmmm ... but then id need to export the type and everything |
02:27:39 | FromDiscord | <ElegantBeef> Lazy macro away 😄 https://play.nim-lang.org/#ix=3m1q |
02:28:21 | FromDiscord | <ElegantBeef> With absolutely 0 protections, so much like living in rural Canada during a pandemic |
02:28:45 | FromDiscord | <Anonymous Poet> i didnt know you could do `proc` as a type without anything else |
02:29:12 | FromDiscord | <ElegantBeef> Yep it's the generic for "infer any procedure here" |
02:29:42 | FromDiscord | <Anonymous Poet> this is a great starting point, ill play around with it. it might be good enough as is |
02:30:11 | FromDiscord | <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:46 | FromDiscord | <Anonymous Poet> i assume `a(tuple.expand)` doesnt get the `a`? |
02:30:52 | FromDiscord | <Anonymous Poet> in the expand macro |
02:31:44 | FromDiscord | <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:09 | FromDiscord | <ElegantBeef> I think your or someone asked how to do something similar, but dont recall |
02:32:11 | FromDiscord | <ElegantBeef> (edit) "your" => "you" |
02:32:37 | FromDiscord | <ElegantBeef> think in that case it was `proc <- object or tuple` |
02:32:57 | FromDiscord | <Anonymous Poet> i dont think that was me, ive been afk for a few months |
02:33:24 | FromDiscord | <Anonymous Poet> question: if this fails, will it be a compile time or run time error? |
02:33:34 | FromDiscord | <ElegantBeef> Compile time |
02:33:39 | FromDiscord | <Anonymous Poet> ok perfect |
02:33:57 | FromDiscord | <ElegantBeef> When it fails it'll be a `tuple[index] is not of type X` or similar |
02:34:13 | FromDiscord | <ElegantBeef> like change my test proc to a float |
02:34:56 | FromDiscord | <ElegantBeef> Do want to note, that since macros are expanded at compile time the codegeneration issues will never be at runtime |
02:35:14 | FromDiscord | <Anonymous Poet> i thought that would be the case, but i havent used nim macros much |
02:35:36 | FromDiscord | <ElegantBeef> Yea was just making it concrete, any code they generate has to be valid nim code |
02:35:49 | FromDiscord | <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:58 | FromDiscord | <ElegantBeef> Yea i clearly love them |
02:36:04 | FromDiscord | <ElegantBeef> You can do so much cool stuff with them |
02:36:34 | FromDiscord | <ElegantBeef> Coming from C# where that wasnt available in the Unity engine, it is wild the power |
02:36:41 | FromDiscord | <ElegantBeef> (edit) "Coming from C# where that wasnt available in the Unity engine, it is wild the power ... " added "you get" |
02:37:27 | FromDiscord | <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:39 | FromDiscord | <ElegantBeef> All at runtime of course, so you either cache it or get performance issues 😄 |
02:38:23 | FromDiscord | <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:46 | FromDiscord | <Anonymous Poet> that was a level of dark magic that i dont think i could get to myself |
02:39:09 | FromDiscord | <ElegantBeef> Lol indeed, though it's quite amazing what you can do with compile time expansion and introspection |
02:39:35 | FromDiscord | <Rika> In reply to @Anonymous Poet "that was a level": Now you can in Nim xd |
02:40:02 | FromDiscord | <Anonymous Poet> yeah, exactly, haha, nim makes it feel approachable |
02:40:05 | FromDiscord | <ElegantBeef> It's less cryptic here! |
02:40:30 | FromDiscord | <Rika> Nah it’s more of C++ being in an alien language |
02:40:32 | FromDiscord | <Anonymous Poet> doing generics is fine in c++, but most things beyond that is venturing into the arcane |
02:40:55 | FromDiscord | <Anonymous Poet> i grew up with it so i always found it fine |
02:41:24 | FromDiscord | <Anonymous Poet> but after having my hand held with python for the last few years its definitely not the same anymore |
02:42:43 | FromDiscord | <Anonymous Poet> btw, does nim have a special type for named tuples? |
02:43:01 | FromDiscord | <Rika> No |
02:43:11 | FromDiscord | <Rika> I don’t think there is at least |
02:44:25 | FromDiscord | <Anonymous Poet> rip |
02:44:35 | FromDiscord | <Anonymous Poet> that wouldve made this pretty foolproof |
02:44:46 | FromDiscord | <ElegantBeef> I mean you can just check if it's a named tuple in the macro |
02:45:22 | FromDiscord | <Anonymous Poet> how? |
02:45:30 | FromDiscord | <Rika> The type looks different |
02:45:52 | FromDiscord | <Rika> Anonymous tuples are always in the () form |
02:46:48 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=3m1x |
02:47:55 | FromDiscord | <Anonymous Poet> ah, i see |
02:48:45 | FromDiscord | <Rika> Beef what if there is no type A |
02:48:54 | FromDiscord | <ElegantBeef> I didnt even use the A type there cause i'm dumb |
02:49:02 | FromDiscord | <Rika> Nice |
02:50:21 | FromDiscord | <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:42 | FromDiscord | <ElegantBeef> But worth noting you can still do `[0]` on a named tuple |
02:53:58 | FromDiscord | <Rika> Sure would be nice to use that pattern matching library now would it |
02:54:26 | FromDiscord | <Anonymous Poet> is there an eta on when itll merge with the stdlib? |
02:55:16 | FromDiscord | <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:22 | FromDiscord | <Rika> I’m still for the splitting of the standard library into packages and Nim just pulling them on install |
02:56:49 | FromDiscord | <Rika> Though actually there’s still a whole host of issues with that approach |
02:57:19 | FromDiscord | <ElegantBeef> Well seems like a distro approach might be what it's moving towards based off conversations about it |
02:57:42 | FromDiscord | <ElegantBeef> Eitherway the package manager needs lockfiles for that to happen and has a PR that needs reviewed |
02:57:51 | FromDiscord | <Rika> Well I worry about api mismatches in transient dependencies |
02:58:28 | FromDiscord | <Rika> Like what if a and b use different JSON versions, and b imports a, and a exports JSON |
02:58:32 | FromDiscord | <ElegantBeef> One small segment of the conversation if anyone hasnt read https://github.com/nim-lang/RFCs/issues/371 |
03:00:24 | FromDiscord | <Anonymous Poet> i feel like theres no way to get around the fact that there will always be a standard library |
03:00:44 | FromDiscord | <Anonymous Poet> having it be split up will probably cause more issues |
03:00:49 | FromDiscord | <Rika> Like? |
03:01:00 | FromDiscord | <Anonymous Poet> exactly the transient deps you talked about |
03:01:13 | FromDiscord | <Rika> I mean other than that |
03:01:19 | FromDiscord | <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:19 | FromDiscord | <Anonymous Poet> from an enterprise point of view, thats a pretty big deal |
03:01:39 | FromDiscord | <Rika> In reply to @ElegantBeef "Well yea, but as": But it’s an important issue to fix |
03:01:55 | FromDiscord | <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:58 | FromDiscord | <Rika> If two dependencies rely on two different versions of the same dependency, how do you fix that? |
03:02:25 | FromDiscord | <Anonymous Poet> i also doubt that the stdlib will be deprecated |
03:02:50 | FromDiscord | <Anonymous Poet> unless a feature is almost entirely unused, thats a huge challenge as well |
03:03:18 | FromDiscord | <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:21 | FromDiscord | <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:37 | FromDiscord | <Rika> Well it doesn’t matter what package |
03:03:48 | FromDiscord | <ElegantBeef> In reply to @Anonymous Poet "i also doubt that": Talking to this |
03:03:53 | FromDiscord | <Rika> If whichever package ever changes API again then |
03:03:57 | FromDiscord | <Rika> Okay |
03:04:37 | leorize[m] | how would the stdlib being splitted up make nim DOA? |
03:05:01 | ForumUpdaterBot | New thread by Ward: Memlib - Load Windows DLL from memory, see https://forum.nim-lang.org/t/7943 |
03:05:09 | FromDiscord | <Rika> The banking example doesn’t make sense |
03:05:27 | FromDiscord | <Rika> They’ll have to vet the library no matter if it is split or not |
03:05:27 | FromDiscord | <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:28 | FromDiscord | <ElegantBeef> The same people are working on the stdlib, it's just no longer shipped with the compiler |
03:05:56 | leorize[m] | and how does splits make it hard to vet? |
03:06:04 | FromDiscord | <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:09 | FromDiscord | <ElegantBeef> What's the vetting process reading over the source code? Which would be identical source code just in different repos? |
03:06:18 | leorize[m] | uh... no? |
03:06:25 | FromDiscord | <Rika> … the standard library is still going to be vetted split or not |
03:06:40 | FromDiscord | <Anonymous Poet> ok, hold on, to be clear |
03:06:44 | FromDiscord | <Anonymous Poet> when you say split |
03:06:45 | leorize[m] | you don't vet random libraries |
03:06:53 | FromDiscord | <Anonymous Poet> do you imagine it is one single chunk? |
03:07:05 | leorize[m] | wdym? |
03:07:14 | FromDiscord | <Anonymous Poet> like, `nimble install std` |
03:07:19 | FromDiscord | <Rika> The standard library will be split into its individual provided modules |
03:07:20 | FromDiscord | <ElegantBeef> A single versioned stdlib or each package versioned |
03:07:27 | leorize[m] | no |
03:07:37 | FromDiscord | <Anonymous Poet> In reply to @ElegantBeef "A single versioned stdlib": this ^ |
03:07:42 | FromDiscord | <Rika> I imagine the latter |
03:07:54 | FromDiscord | <Rika> Either case still doesn’t make it harder to vet |
03:07:58 | leorize[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:08 | leorize[m] | it's has zero difference to a standard library |
03:08:20 | FromDiscord | <Rika> It’s not going to be much larger than the whole standard library |
03:08:50 | FromDiscord | <ElegantBeef> I mean it might grow larger, but why would you vet `db_mysql` if you dont use it 😄 |
03:08:51 | FromDiscord | <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:12 | FromDiscord | <Rika> In reply to @ElegantBeef "I mean it might": It’s only going to be larger when multiple (compatible) versions are used |
03:09:17 | FromDiscord | <Anonymous Poet> and beef's point is also a counterpoint |
03:09:25 | FromDiscord | <Rika> (Unused modules are ignored in both cases) |
03:09:34 | FromDiscord | <Anonymous Poet> because in the original pass, no one was using mysql, but then someone had a use case for it |
03:09:48 | leorize[m] | well, I'm pretty sure companies are very interested in rust and rust does exactly this |
03:09:49 | FromDiscord | <Anonymous Poet> so now you have to add that to the list of things to be vetted |
03:09:52 | FromDiscord | <Rika> Your argument still doesn’t make sense |
03:09:54 | FromDiscord | <ElegantBeef> And now you vet 1 more module, the exact same as you would have to do that way |
03:10:01 | FromDiscord | <Rika> It’s the same thing with the standard library now |
03:10:12 | FromDiscord | <ElegantBeef> Are you suggesting that people vet the entire stdlib |
03:10:12 | FromDiscord | <Anonymous Poet> In reply to @Rika "It’s the same thing": the standard library is implicitly trusted |
03:10:17 | FromDiscord | <Rika> That’s stupid |
03:10:18 | FromDiscord | <ElegantBeef> And it'd still be the stdlib |
03:10:21 | FromDiscord | <Rika> No one would do that |
03:10:34 | leorize[m] | that's stupid, no one should ever trust the stdlib if they're paranoid |
03:10:54 | FromDiscord | <Rika> If you’re that paranoid you would vet literally everything anyway |
03:11:02 | FromDiscord | <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:04 | FromDiscord | <Rika> That includes the compiler |
03:11:20 | FromDiscord | <ElegantBeef> You could always clone all the modules into a single folder then use that as the stdlib |
03:11:29 | FromDiscord | <ElegantBeef> And there you have the same thing as present |
03:11:54 | FromDiscord | <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:16 | FromDiscord | <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:39 | FromDiscord | <Anonymous Poet> the decision makers often arent well-versed in cs |
03:12:59 | FromDiscord | <Rika> Then they are doomed to fail sooner or later |
03:13:05 | leorize[m] | usually they just hire a third-party auditor |
03:13:15 | leorize[m] | because if you don't understand something you don't do it |
03:13:33 | FromDiscord | <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:39 | FromDiscord | <Anonymous Poet> In reply to @leorize "usually they just hire": this is probably true, though that introduces a cost |
03:14:02 | leorize[m] | cost less than screwing things up yourself |
03:14:05 | FromDiscord | <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:41 | FromDiscord | <Anonymous Poet> that said, of course, that may not be the goal |
03:14:57 | FromDiscord | <Anonymous Poet> and it may introduce costs to the nim team (maybe, idk), so it might not be worth it |
03:15:04 | FromDiscord | <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:41 | FromDiscord | <Rika> The argument does not make sense |
03:16:09 | FromDiscord | <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:38 | FromDiscord | <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:10 | FromDiscord | <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:58 | FromDiscord | <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:16 | FromDiscord | <Rika> C++ has been around for so much longer than Nim so it’s fine to trust the library there |
03:18:49 | FromDiscord | <Anonymous Poet> suppose we took it from the other perspective |
03:18:54 | leorize[m] | people said the same about the linux kernel and some "researchers" got some security issues in un-noticed |
03:19:28 | FromDiscord | <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:05 | FromDiscord | <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:09 | FromDiscord | <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:42 | FromDiscord | <ElegantBeef> So the code supposedly wouldnt get merged anyway, due to the minor ethics of them |
03:21:15 | FromDiscord | <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:37 | leorize[m] | one of them did get accepted |
03:22:07 | FromDiscord | <Anonymous Poet> ah, ty for the correction |
03:23:10 | leorize[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:20 | FromDiscord | <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:29 | leorize[m] | hell, even good intentioned fixes can introduce serious security issues |
03:24:05 | leorize[m] | the point is that you can't implicitly trust code without vetting it if you're paranoid |
03:24:38 | FromDiscord | <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:19 | FromDiscord | <Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=3m21 |
03:36:16 | FromDiscord | <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:50 | FromDiscord | <Anonymous Poet> but that doesnt mean that there arent contexts where it can be a very big deal |
03:40:44 | FromDiscord | <Anonymous Poet> thanks guys for the interesting discussion and links, im going to hop off for tonight |
03:40:53 | FromDiscord | <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:44 | FromDiscord | <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:33 | FromDiscord | <lamersc> Anyone else have choosenim on windows install set off windows defender? |
04:29:05 | FromDiscord | <lamersc> https://media.discordapp.net/attachments/371759389889003532/840082784365051904/image0.jpg |
04:30:23 | FromDiscord | <AlexRM> What's the color theme of the sample code on the home page? |
04:32:20 | FromDiscord | <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:17 | FromDiscord | <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:49 | ForumUpdaterBot | New 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:53 | ForumUpdaterBot | New Nimble package! memlib - Load Windows DLL from memory, see https://github.com/khchen/memlib |
06:54:00 | * | letto joined #nim |
06:56:11 | FromDiscord | <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:34 | FromDiscord | <ElegantBeef> Have you read the internal docs on how closures are generated? |
06:59:01 | FromDiscord | <ElegantBeef> http://nim-lang.github.io/Nim/intern.html#code-generation-for-closures if not |
06:59:50 | FromDiscord | <ElegantBeef> Seems it's mostly just a case of the data it captures |
07:02:46 | FromDiscord | <Rika> Nothing else hidden? Okay |
07:03:02 | FromDiscord | <ElegantBeef> atleast that indicates a reference to the data it captures |
07:05:06 | FromDiscord | <Rika> Yeah I plan to have literally no references so I don’t need to know about those issues |
07:05:29 | FromDiscord | <Rika> What is the main reason they’re called slow? |
07:06:43 | FromDiscord | <ElegantBeef> I dont know, havent used them much. |
07:07:13 | FromDiscord | <Rika> Funny how that also implies that you don’t use async that often either |
07:15:47 | FromDiscord | <Rika> I didn’t realise, closures need a ref |
07:16:05 | FromDiscord | <Rika> Well whatever, should be fine given I only need around 5 or so closures |
07:22:47 | FromDiscord | <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:43 | FromDiscord | <Rika> Given that my processor has two cores, what do I need to manually implement to have threading in an embedded environment |
07:28:20 | FromDiscord | <ElegantBeef> There is 0 chance it's a pico right? |
07:28:34 | FromDiscord | <Rika> Not a poco |
07:28:37 | FromDiscord | <Rika> Pico |
07:28:49 | FromDiscord | <Rika> STM chip |
07:29:02 | FromDiscord | <Rika> I’m not actually using it either |
07:29:05 | FromDiscord | <Rika> Just wondering |
07:30:06 | FromDiscord | <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:37 | FromDiscord | <ElegantBeef> The entire thread module is a few hundred lines and should atleast show what is needed |
07:35:33 | FromDiscord | <ElegantBeef> Though there might be more stuff needed, i dont know so i should shush |
07:36:34 | PMunch | Oh damn, didn't realise the Pico was dual-core |
07:36:56 | FromDiscord | <ElegantBeef> Yea it's really nifty |
07:47:16 | FromDiscord | <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:55 | PMunch | Hmm, does anyone have a really long log-file of some kind hanging about? |
07:53:48 | PMunch | I need something to try some compression benchmark against :P |
07:55:13 | saem | If you're running a modern Linux distro I'm sure journald can drown you in logs. |
07:55:25 | PMunch | Well, I've already used those :P |
07:55:44 | PMunch | It only had about a years worth |
08:01:45 | * | NimBot joined #nim |
08:02:32 | saem | Does this work? https://github.com/logpai/loghub |
08:03:11 | PMunch | Ooh, that's perfect! |
08:03:32 | FromDiscord | <ElegantBeef> > All these logs amount to over 77GB in total↵Still not large enough? |
08:04:27 | PMunch | I mean I just wanted some other logs to check that I hadn't over-tuned it to my specific data :P |
08:05:02 | FromDiscord | <ElegantBeef> I really like to believe saem used github's search and just typed in "Big fucking logs" |
08:06:32 | saem | Handy in a pinch |
08:06:54 | FromDiscord | <ElegantBeef> Time for me to browse through nim projects |
08:07:03 | FromDiscord | <ElegantBeef> See someone is remaking wolfenstein in nim |
08:07:36 | PMunch | Wait really? |
08:08:00 | FromDiscord | <ElegantBeef> https://github.com/sidrym/wolfenim |
08:08:01 | FromDiscord | <ElegantBeef> Yep |
08:08:14 | * | Vladar quit (Quit: Leaving) |
08:08:29 | FromDiscord | <ElegantBeef> Seems they're doing proper 2D rendering using raycasting |
08:08:53 | FromDiscord | <ElegantBeef> Line 86 probably means they didnt expect anyone to find this |
08:09:13 | * | hyiltiz quit (Ping timeout: 240 seconds) |
08:10:49 | Amun_Ra | ElegantBeef: and 149 |
08:11:07 | Amun_Ra | and that's the only line with an error |
08:11:21 | FromDiscord | <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:18 | Amun_Ra | I tend to write something once a week ;> |
08:12:56 | FromDiscord | <ElegantBeef> Ah i've never seen you before |
08:15:13 | PMunch | Pfft, do you even Nim @ElegantBeef :P |
08:15:23 | PMunch | I spoke to him just yesterday! |
08:15:23 | FromDiscord | <ElegantBeef> Havent recently no |
08:15:32 | FromDiscord | <ElegantBeef> Lol, apparently not |
08:15:38 | PMunch | Haha |
08:15:51 | Amun_Ra | :P |
08:16:17 | FromDiscord | <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:42 | PMunch | Haha, that's always fun |
08:18:07 | PMunch | I've recently done some shared header compression stuff for work, and used Nim for benchmarking |
08:19:06 | FromDiscord | <ElegantBeef> Nice |
08:19:18 | FromDiscord | <ElegantBeef> Actually using nim and getting paid for it, wild stuff |
08:19:22 | Amun_Ra | btw, what's the difference between array[uint8, int] and array[256, int]? |
08:19:39 | FromDiscord | <ElegantBeef> Nothing |
08:19:55 | FromDiscord | <ElegantBeef> Nim lets you use ordinal types for array index size |
08:20:06 | Amun_Ra | well, I've encountered the difference |
08:20:12 | Amun_Ra | let me reproduce it |
08:20:23 | FromDiscord | <ElegantBeef> You probably have to explicitly convert to byte on indexing |
08:20:39 | Amun_Ra | I did |
08:21:19 | FromDiscord | <ElegantBeef> But yea repro and throw on nim-playground |
08:21:43 | PMunch | It's handy to lock it to a type if you use a distinct int, range, or an enum |
08:22:19 | Amun_Ra | https://play.nim-lang.org/#ix=3m2R |
08:22:43 | PMunch | Damn ElegantBeef, the Pico library is very large! |
08:23:10 | FromDiscord | <ElegantBeef> unsigned integers over/underflow |
08:23:33 | FromDiscord | <Tavon> The error is actually coming from the `uint8 res` |
08:23:34 | FromDiscord | <ElegantBeef> Yea i know, you can always download it once and use a system variable |
08:23:59 | FromDiscord | <ElegantBeef> I just dont explain that since that's apart of the pico-sdk which i think everyone should still read |
08:24:00 | Amun_Ra | hmm, I thought 'uint8 res' makes the value 8-bit |
08:24:24 | FromDiscord | <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:44 | FromDiscord | <ElegantBeef> And yes my years of C# says it's `byte` not `uint8`, sorry not sorry |
08:24:54 | Amun_Ra | so the question is - why does it work on [256, uint8] array |
08:25:07 | FromDiscord | <Tavon> sent a code paste, see https://play.nim-lang.org/#ix=3m2S |
08:26:41 | FromDiscord | <ElegantBeef> For some reason doing the conversion inside the bracket expr is the issue |
08:26:43 | FromDiscord | <Tavon> I think in your example, the cast is actually ignored for some reason, hence the error |
08:27:24 | PMunch | Hmm, curiously enough assigning uint8 res to a variable makes it work |
08:27:27 | PMunch | That's odd |
08:27:27 | Amun_Ra | so I've found a bug |
08:27:39 | PMunch | Looks like it |
08:27:45 | Amun_Ra | PMunch: yes, it works if you assing to a uint8 var |
08:28:08 | FromDiscord | <Tavon> Probably coming from type inference weirdness |
08:28:13 | PMunch | @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:50 | FromDiscord | <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:04 | FromDiscord | <ElegantBeef> Instead of cloning it many times 😛 |
08:30:50 | FromDiscord | <Tavon> @Amun_Ra do you want to create an issue? |
08:31:30 | FromDiscord | <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:15 | Amun_Ra | Tavon: yes, I'll post it in a 1h |
08:37:26 | Amun_Ra | k, done |
08:37:52 | PMunch | Oh damn, that hour flew by.. |
08:38:04 | Amun_Ra | ;) |
08:38:06 | FromDiscord | <ElegantBeef> Must be daylight savings again |
08:38:35 | FromDiscord | <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:53 | ForumUpdaterBot | New 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:44 | FromDiscord | <Rika> How about async? What would I need for async in embedded |
08:41:51 | FromDiscord | <ElegantBeef> It uses system calls, so i figure a fair bit |
08:48:15 | saem | Oh joy, meeting at 8am |
08:48:23 | saem | Probably won't go. |
08:48:34 | FromDiscord | <ElegantBeef> Join the club |
08:49:03 | saem | Insomnia sucks |
08:49:55 | FromDiscord | <ElegantBeef> Yea that's totally my problem too, not that i'm a person that sleeps from 3am to 12pm 😄 |
08:51:34 | saem | I'm a natural night owl, but there were years where I could take being a morning person. |
08:52:35 | FromDiscord | <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:58 | FromDiscord | <Rika> Kinda gonna be difficult to translate ISRs to async is it |
08:57:25 | FromDiscord | <Rika> Wait a minute isn’t this just CPS |
09:00:49 | FromDiscord | <Rika> No not really |
09:01:51 | FromDiscord | <clyybber> In reply to @Tavon "@Amun_Ra do you want": It's because the conversion is done at compile time I think |
09:02:09 | FromDiscord | <clyybber> And at compile time conversions from uintXX to uint8 are range checked |
09:02:24 | FromDiscord | <Tavon> Yes you're right |
09:02:56 | FromDiscord | <Tavon> sent a code paste, see https://play.nim-lang.org/#ix=3m36 |
09:03:36 | FromDiscord | <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:41 | FromDiscord | <Tavon> I'm lookink into it |
09:05:28 | FromDiscord | <Tavon> (edit) "lookink" => "looking" |
09:06:02 | FromDiscord | <Tavon> Oh no you're right |
09:08:19 | FromDiscord | <Rika> Why would that be an oh no |
09:08:59 | FromDiscord | <Tavon> sent a code paste, see https://play.nim-lang.org/#ix=3m37 |
09:09:13 | FromDiscord | <Tavon> (edit) "https://play.nim-lang.org/#ix=3m37" => "https://play.nim-lang.org/#ix=3m38" |
09:09:35 | FromDiscord | <Tavon> So I guess the uint8 cast shouldn't work in RT in the first place |
09:09:46 | FromDiscord | <ElegantBeef> Rika it's more of an "Oh no i was wrong, you are right" just ac orrection |
09:10:35 | FromDiscord | <ElegantBeef> But clyybber being right isnt something you want, it'll just swell his already bloated ego 😛 |
09:14:37 | FromDiscord | <clyybber> lol |
09:15:05 | FromDiscord | <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:24 | FromDiscord | <Tavon> But why only for unsigned? |
09:16:48 | FromDiscord | <clyybber> Because unsigned integers are often used for bitop things, and are "more" unsafe than int's |
09:16:50 | FromDiscord | <clyybber> (edit) "int's" => "ints" |
09:16:54 | FromDiscord | <clyybber> It's documented here https://nim-lang.github.io/Nim/manual#statements-and-expressions-type-conversions |
09:18:23 | FromDiscord | <Tavon> Okay |
09:19:47 | Oddmonger | is it worth using nimscript ? I wonder what could be the interest (ok no compilation, but compilation is fast anyway) |
09:20:43 | Oddmonger | i know nimble use it (nake was compiling itself) |
09:25:03 | * | alri[m] joined #nim |
09:33:43 | FromDiscord | <Rika> In reply to @ElegantBeef "Rika it's more of": So an ah no |
09:34:43 | * | lritter joined #nim |
09:45:09 | alri[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:28 | FromDiscord | <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:50 | FromDiscord | <Varriount> (I'm going to bed, so you might have to wait for someone else) |
10:16:17 | alri[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:48 | FromDiscord | <Rika> Oof |
10:38:44 | FromDiscord | <mlokis> how can i deal wint variable amount of microsecond digits in date? |
10:38:55 | FromDiscord | <mlokis> (edit) "wint" => "with" |
11:10:29 | ForumUpdaterBot | New 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:45 | ForumUpdaterBot | New 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:09 | FromDiscord | <Rika> aw, i cant have a generic generic? `type a[T,U] = object ... field: T[U]` |
13:35:55 | FromDiscord | <konsumlamm> nope |
13:36:10 | FromDiscord | <konsumlamm> that's called higher kinded types, btw |
13:38:00 | FromDiscord | <Rika> why cant i tho |
13:41:21 | FromDiscord | <haxscramper> https://github.com/nim-lang/RFCs/issues/5 not implemented |
13:41:23 | FromDiscord | <konsumlamm> because it hasn't been implemented |
13:41:39 | FromDiscord | <konsumlamm> that's the answer for most things you can't do |
14:33:01 | ForumUpdaterBot | New 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:20 | ForumUpdaterBot | New 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:33 | narimiran | Nim 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:02 | FromDiscord | <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:53 | FromDiscord | <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:32 | FromDiscord | <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:27 | FromDiscord | <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:49 | FromDiscord | <Hi02Hi> `items` |
16:48:45 | * | leorize quit (Ping timeout: 240 seconds) |
16:49:43 | FromDiscord | <Hi02Hi> i think items is the implicit iterator, so to speak |
16:51:02 | FromDiscord | <reilly> Story checks out, thanks. |
16:51:03 | FromDiscord | <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:57 | FromGitter | <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:15 | FromDiscord | <jtiai> Is there somewhere documentation how to create bindings for C library? |
18:55:56 | FromDiscord | <haxscramper> https://nim-lang.org/docs/manual.html#foreign-function-interface |
19:09:55 | FromDiscord | <jtiai> Let's see if I can do some GIS magic here... |
19:12:07 | * | idf quit (Ping timeout: 268 seconds) |
19:16:26 | ForumUpdaterBot | New thread by Kaushalmodi: How to convert a string to an identifer or symbol?, see https://forum.nim-lang.org/t/7947 |
19:23:55 | FromDiscord | <codic> can I collect a range directly into a seq? like if I wish to write↵`` |
19:24:03 | FromDiscord | <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:14 | FromDiscord | <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:35 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3m6M |
19:29:47 | FromDiscord | <haxscramper> Latter one is more efficient as it does not create an intermediate sequence |
19:30:51 | FromDiscord | <codic> oh so i cant just use the val directly, I need to put it into a seq |
19:31:20 | FromDiscord | <codic> wait what is sewSeq? |
19:31:26 | FromDiscord | <haxscramper> `newSeq` |
19:31:31 | FromDiscord | <codic> oh |
19:32:19 | FromDiscord | <codic> ok that works, great |
19:32:34 | FromDiscord | <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:57 | FromDiscord | <ajusa> do I do something like `-o: /dev/null`? |
19:33:57 | FromDiscord | <haxscramper> `nim check` |
19:34:10 | FromDiscord | <haxscramper> it does not compile to C code, only confirms nim part is correct |
19:34:25 | FromDiscord | <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:11 | FromDiscord | <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:35 | FromDiscord | <dom96> hello hello |
20:12:37 | FromDiscord | <dom96> happy friday |
20:12:58 | FromDiscord | <reilly> How can `stats.mean(s: RunningStat): float` return NaN? |
20:13:07 | PMunch | Well, half happy, half working with F# for a uni-project.. |
20:17:10 | FromDiscord | <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:55 | FromDiscord | <ElegantBeef> nigui is probably the best due to using native gui or gtk |
20:19:05 | FromDiscord | <Varriount> If I had to guess offhand, NimQML |
20:19:42 | FromDiscord | <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:53 | FromDiscord | <James> Native or Qt seem like good guesses. Thanks! |
20:19:55 | FromDiscord | <Varriount> In reply to @ajusa "What's the best way": Can you explain? |
20:20:39 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3m76 |
20:21:01 | FromDiscord | <ElegantBeef> `parseuntil(str, delimStart)` `parseUntil(delimEnd` |
20:21:10 | FromDiscord | <ElegantBeef> Rather skipUntil for the first one |
20:21:51 | FromDiscord | <ajusa> Ah, I see. I was looking at `captureBetween` in parseutils, thanks! |
20:22:37 | * | rockcavera quit (Remote host closed the connection) |
20:23:43 | FromDiscord | <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:46 | FromDiscord | <Varriount> @ajusa If you need anything more complicated, you might look at NPeg |
20:25:56 | FromDiscord | <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:58 | Amun_Ra | but not too complicated |
20:32:56 | FromDiscord | <reilly> What conditions could cause something to return NaN? I've never had this problem before. |
20:44:03 | FromGitter | <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:43 | FromDiscord | <Varriount> In reply to @reilly "What conditions could cause": Dividing by zero, operations against infinity values |
21:04:03 | FromDiscord | <Varriount> If you're targetting a non-x86 platform, possibly other operations too |
21:12:57 | * | thomasross joined #nim |
21:51:29 | FromDiscord | <brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3m7C |
21:51:56 | FromDiscord | <brainproxy> not sure how to to do it, `var running = ...` didn't work |
21:53:09 | FromDiscord | <ElegantBeef> replace `var` with `ptr` and it should work, though what are you converting from |
21:53:28 | FromDiscord | <brainproxy> trying |
21:56:23 | FromDiscord | <brainproxy> sent a code paste, see https://paste.rs/pcp |
21:56:25 | FromDiscord | <brainproxy> it wants a var |
21:57:15 | FromDiscord | <ElegantBeef> `running[].load` |
21:57:20 | FromDiscord | <ElegantBeef> Ah |
21:58:10 | FromDiscord | <ElegantBeef> What is the type of `runningPtr`? |
21:59:09 | FromDiscord | <brainproxy> it's the `addr` of a field on a ref object that's of type `Atomic[bool]` |
21:59:34 | FromDiscord | <brainproxy> sent a code paste, see https://play.nim-lang.org/#ix=3m7F |
21:59:53 | FromDiscord | <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:02 | FromDiscord | <brainproxy> (edit) "`Atomic[bool]`" => "`Atomic[bool]`; the addr is" |
22:00:26 | * | letto quit (Ping timeout: 240 seconds) |
22:00:36 | FromDiscord | <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:45 | FromDiscord | <ElegantBeef> There could possibly be a better impl but without the entire code, hard to tell |
22:00:58 | FromDiscord | <brainproxy> I'm doing some crazy multithreaded thing |
22:01:06 | FromDiscord | <brainproxy> I'm not sure I can decomplect it |
22:08:11 | * | letto joined #nim |
22:27:07 | ForumUpdaterBot | New 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:49 | FromGitter | <Knaque> Does anyone know if Dimscord has a way of sending messages periodically? I didn't see one. |