00:01:58 | Yardanico | metaprogramming be like https://i.imgur.com/y7F7jeB.png |
00:02:34 | Yardanico | and yes I took this print macro from nimpylib XD |
00:08:54 | FromDiscord | <KingDarBoja> https://github.com/nim-lang/Nim/wiki/Nim-for-Java-programmers |
00:09:38 | disruptek | ot |
00:10:01 | disruptek | er, there's nothing inherently wrong with discarding a future. |
00:11:33 | FromGitter | <alehander92> but there is |
00:11:53 | FromGitter | <alehander92> it seems that an error can just stay hidden |
00:11:59 | FromGitter | <alehander92> which seems as a bad thing |
00:12:27 | FromGitter | <alehander92> maybe i am wrong, but if that's wrong, then we need to fix the "Futures should *never* be discarded." docs |
00:13:04 | disruptek | unless they MUST never be discarded, i'm okay with it. |
00:13:47 | disruptek | should we also deny except:? |
00:13:47 | FromGitter | <alehander92> well, never makes it sounds like it should've been |
00:13:51 | FromGitter | <alehander92> must never |
00:15:25 | FromGitter | <alehander92> the problem is that i can easily imagine cases where you discard an async call and this leads to annoying non-obvious bug |
00:15:42 | FromGitter | <alehander92> and i cant imagine situation where you're like "oh no i need to discard this future" |
00:16:02 | disruptek | i guess i have a vivid imagination. |
00:16:19 | FromGitter | <alehander92> ok, give such a case |
00:16:24 | FromGitter | <alehander92> i am just trying to understand it, sorry |
00:16:57 | disruptek | i like to think that i'm god when it comes to software. unless i'm going to break the laws of physics, the machine should kowtow to me -- not the other way around. |
00:17:27 | disruptek | if i chose to type `discard` in front of a future, damnit what do you think i want to do with it? |
00:17:52 | FromGitter | <alehander92> but many users would just discard asyncCall() as the first obvious way |
00:17:55 | FromGitter | <alehander92> to run in background |
00:17:59 | FromDiscord | <Rika> @exelotl ok so after reading a bit of the article you sent, i have a question; how would i ensure that what objects i allocate on the heap are adjacent to each other? |
00:18:03 | FromGitter | <alehander92> thats just bad language design |
00:18:11 | disruptek | i'm going to give them all your cell-phone number so you can tutor them. |
00:18:17 | disruptek | isn't that what you want? |
00:18:18 | FromGitter | <alehander92> to make the easiest thing a buggy thing |
00:18:21 | disruptek | a better user-experience? |
00:18:44 | FromGitter | <alehander92> i want less bugs |
00:18:48 | disruptek | discard should be introduced later in the manual. that's a patch i'd support. |
00:19:05 | FromGitter | <alehander92> language design is not about "order in manuals" |
00:19:11 | FromDiscord | <Rika> then we'd have a lot of random people asking how to have an empty block |
00:19:27 | disruptek | it's not introduced in that context. |
00:19:30 | FromGitter | <alehander92> its about less "surprises which woudlnt be surprises if you read manual #2.7" |
00:19:34 | disruptek | better would be to really explain what it is. |
00:19:40 | FromGitter | <alehander92> dont we have enough with tax laws |
00:19:59 | disruptek | i think your argument might make sense for some languages, but not nim. |
00:20:11 | FromDiscord | <exelotl> if you have a seq of ref objects, where each one is allocated individually with new(), then you have no guarantee where each object will end up in memory |
00:20:14 | FromGitter | <alehander92> i dont want bugs in my programs in any language |
00:20:22 | FromGitter | <alehander92> its as simple as that |
00:20:33 | disruptek | then don't program. |
00:20:34 | FromDiscord | <exelotl> but if you have a seq of non-ref objects, then those objects are guaranteed to be contiguous |
00:20:44 | FromDiscord | <Never Listen To Beef> Damn it disruptek, stealing my jokes |
00:20:47 | FromDiscord | <Rika> but non-ref are stackk |
00:20:50 | FromGitter | <alehander92> the other option is to make discard asyncCall() actually do what asyncCheck does |
00:20:51 | FromDiscord | <Rika> ? |
00:20:56 | FromDiscord | <exelotl> not if they're in a seq |
00:20:58 | FromDiscord | <Never Listen To Beef> Was going to say "Cant have any bugs in your programs if you dont make any" |
00:21:00 | FromGitter | <alehander92> but to just swallow errors |
00:21:03 | FromDiscord | <Rika> well i never mentioned a seq |
00:21:04 | disruptek | if i cannot discard a future, i cannot use async. |
00:21:09 | disruptek | that's just nuts. |
00:21:12 | FromGitter | <alehander92> you cant philosophy your way out of it |
00:21:21 | FromDiscord | <Rika> okay, how would i make ref objects be contiguous with each other |
00:21:33 | * | xet7 quit (Quit: Leaving) |
00:21:36 | disruptek | use memory regions or perform your own alloc. |
00:21:59 | FromDiscord | <Rika> memory regions? |
00:22:03 | FromGitter | <alehander92> i dont care about the discard, i care about the "raise error from it if it fails" part |
00:22:06 | disruptek | --gc:regions |
00:22:09 | FromDiscord | <Rika> if i perform my own alloc then am i really using nim at this point |
00:22:25 | disruptek | asyncCheck is terrible. i never use it and i cannot imagine why it exists. |
00:22:41 | FromDiscord | <exelotl> if it's a worthwhile optimisation then sure rika |
00:22:58 | FromGitter | <alehander92> ok, i am stupid |
00:23:00 | FromGitter | <alehander92> so, what should happen |
00:23:05 | FromGitter | <alehander92> when you do discard a() |
00:23:10 | disruptek | having related data nearby in memory is almost always an optimization. |
00:23:10 | FromDiscord | <Rika> okay, ill just keep that in mind; i fear that i am totally doing premature optim. right now |
00:23:12 | FromGitter | <alehander92> and a completes with fail |
00:23:28 | disruptek | make it work, make it correct, make it fast. |
00:23:35 | FromDiscord | <Rika> disruptek: the thing is whether it is worthwhile or not |
00:23:52 | disruptek | if it's not worthwhile, don't even bother to make it work. |
00:23:53 | FromGitter | <alehander92> disruptek stop with the slogans |
00:24:00 | disruptek | that's how i hack on the compiler. |
00:24:02 | FromGitter | <alehander92> this isnt a socialist demonstration |
00:24:05 | FromGitter | <alehander92> even if its 1 may |
00:24:05 | FromGitter | <alehander92> :D |
00:24:12 | FromDiscord | <KingDarBoja> Who said socialism? |
00:24:18 | FromGitter | <alehander92> this really doesnt answer a question |
00:24:21 | FromDiscord | <KingDarBoja> ☭ |
00:24:26 | disruptek | you haven't asked one worthy of answer. |
00:24:28 | * | xet7 joined #nim |
00:24:40 | FromGitter | <alehander92> and you can always do |
00:24:48 | FromGitter | <alehander92> let ignorename = future |
00:24:50 | FromGitter | <alehander92> here |
00:24:57 | FromGitter | <alehander92> you have it, discard workaround |
00:25:08 | disruptek | uh, no. |
00:25:15 | FromGitter | <alehander92> so this is bad |
00:25:22 | FromGitter | <alehander92> but *ignoring* errors on purpose |
00:25:23 | FromGitter | <alehander92> is fine |
00:25:37 | disruptek | that's why we have discard. |
00:25:45 | disruptek | because programmers know better than us sometimes. |
00:25:52 | FromGitter | <alehander92> discard is for ignoring *values* |
00:26:01 | disruptek | dude. |
00:26:05 | disruptek | read the code. |
00:26:18 | FromGitter | <alehander92> dude, you can still ignore an error if you want |
00:26:18 | FromDiscord | <exelotl> throwback to the time I saw discard in a shader and assumed it was the same as discard in nim |
00:26:28 | FromDiscord | <Never Listen To Beef> lol |
00:26:39 | FromDiscord | <Never Listen To Beef> It sorta is, you say you dont want that pixel 😛 |
00:26:40 | FromGitter | <alehander92> the problem is that i've seen that in node |
00:27:04 | FromGitter | <alehander92> writing several random background calls, never seeing any actual error, random stuff breaks |
00:27:07 | FromGitter | <alehander92> its just super annoying bugs |
00:27:39 | FromGitter | <alehander92> you cant discard an exception in sync code |
00:27:46 | FromGitter | <alehander92> if you could, then ok |
00:30:02 | disruptek | sure you can. |
00:30:03 | FromDiscord | <Rika> try: code except: discard |
00:30:05 | FromDiscord | <Rika> ???? |
00:30:14 | disruptek | nailed it. |
00:30:22 | FromGitter | <alehander92> and .. you use .. except |
00:30:23 | FromDiscord | <Rika> with that code you've essentially discarded an exception |
00:30:26 | FromGitter | <alehander92> totally the same code |
00:30:31 | disruptek | uh, no. |
00:30:32 | FromGitter | <alehander92> that's exactly what i am saying |
00:30:33 | FromGitter | <alehander92> make it raise |
00:30:41 | FromGitter | <alehander92> then yeah, use try except |
00:30:43 | FromDiscord | <Never Listen To Beef> ``` |
00:30:43 | FromDiscord | <Never Listen To Beef> a |
00:30:44 | FromDiscord | <Never Listen To Beef> defer: discard |
00:30:44 | FromDiscord | <Never Listen To Beef> ``` |
00:30:44 | FromGitter | <alehander92> somehow |
00:30:48 | FromDiscord | <KingDarBoja> From past disruptek: _basically, it's a nice feature and discard discards it. keep it and use it instead._ |
00:30:50 | disruptek | but it's fine. i know araq agrees with me. 😁 |
00:30:56 | FromDiscord | <Rika> @Never Listen To Beef what's that supposed t odo |
00:30:59 | FromDiscord | <KingDarBoja> Still no idea what he meant hahaha |
00:31:17 | FromGitter | <alehander92> but araq agreeing with you doesnt make it correct |
00:31:34 | FromDiscord | <Never Listen To Beef> i mean that'd put all the stuff inside a try block then discard the finally |
00:31:36 | disruptek | i'm saying that i'm not terribly motivated to convince you. |
00:31:52 | FromDiscord | <Never Listen To Beef> I mean it's silly cause it's silly |
00:31:54 | FromDiscord | <Rika> @Never Listen To Beef it wouldnt catch the exception |
00:32:02 | FromDiscord | <Never Listen To Beef> Doesnt he want to discard the exception? |
00:32:09 | FromDiscord | <Rika> thats what he said |
00:32:12 | disruptek | i want to discard /futures/ |
00:32:24 | FromDiscord | <Rika> oh, you mean disruptek |
00:32:44 | FromDiscord | <Rika> well i dont understand why you want to but eh i might just not know |
00:32:49 | FromDiscord | <Never Listen To Beef> I mean i dont either |
00:32:53 | FromDiscord | <Never Listen To Beef> Exceptions exist to help you |
00:32:55 | FromGitter | <alehander92> which you can |
00:33:08 | FromDiscord | <Never Listen To Beef> Although the xlib library stuff i dont catch any of the errors directly |
00:35:23 | FromGitter | <alehander92> ok disruptek |
00:35:30 | FromGitter | <alehander92> you need to then solve for me |
00:35:40 | disruptek | unlikely. |
00:35:43 | FromGitter | <alehander92> how can i detect if "background" async calls |
00:35:48 | FromGitter | <alehander92> in my codebase |
00:35:54 | FromGitter | <alehander92> written from other random people |
00:36:02 | FromGitter | <alehander92> dont error |
00:36:06 | FromGitter | <alehander92> detect on runtime* |
00:37:07 | disruptek | how do you detect any runtime error? |
00:37:20 | FromGitter | <alehander92> by seeing the exception |
00:37:24 | FromGitter | <alehander92> or crash |
00:37:34 | disruptek | well, do that. |
00:37:36 | FromGitter | <alehander92> or *explicitly* handling it in try except |
00:37:40 | FromGitter | <alehander92> but i *cant* do that |
00:37:45 | FromGitter | <alehander92> if somebody just goes discard a() |
00:37:49 | disruptek | a future is not an exception. |
00:38:10 | FromGitter | <alehander92> but an async call can be |
00:38:26 | disruptek | show me your problematic code. |
00:38:55 | FromGitter | <alehander92> every code that does discard aCall() |
00:39:18 | disruptek | oh, i see. we should break discard for just this one library in stdlib. |
00:39:22 | disruptek | that's your position? |
00:39:44 | disruptek | because someone /could/ write something that has an unexpected effect. |
00:39:53 | disruptek | because they didn't read the manual. |
00:39:57 | FromGitter | <alehander92> every time you write discard asyncCall() # you just say "go silent errors" |
00:40:04 | FromGitter | <alehander92> the language doesnt work that way |
00:40:13 | FromGitter | <alehander92> it doesnt happen when you call sync calls |
00:40:18 | FromGitter | <alehander92> when you await normal calls |
00:40:18 | disruptek | if you don't understand it after your work on await, i don't think i can explain it to you. |
00:40:26 | FromGitter | <alehander92> oh, i understand it |
00:40:33 | disruptek | but, look. we don't /have/ to agree. |
00:40:37 | FromGitter | <alehander92> but does one need to be an expert in async |
00:40:47 | FromGitter | <alehander92> or to have been bitten 5 times by it? |
00:40:54 | disruptek | they do if they cannot discard a future, i guess. |
00:41:04 | FromGitter | <alehander92> ok, lets differentiate |
00:41:12 | FromGitter | <alehander92> i am ok with discarding a future variable |
00:41:20 | FromGitter | <alehander92> i dont want to discard an async call |
00:41:27 | disruptek | dude, i am trying to invent a new try/except. i really don't want to argue with you. |
00:41:28 | FromGitter | <alehander92> if it was possible to make the difference somehow |
00:41:32 | FromGitter | <alehander92> i would be ok with it |
00:41:44 | FromDiscord | <Rika> disruptek: do you think its a stupid idea to introduce a `new` proc that can be passed a count to initialize x ref objects of that type contiguously? |
00:41:48 | FromGitter | <alehander92> well if you dont want to, dont block useful additions |
00:42:09 | disruptek | there's no point to argue because it won't be changed. |
00:42:14 | leorize | Rika: newSeqWith? |
00:42:16 | disruptek | i'm not blocking anything. |
00:42:35 | FromGitter | <alehander92> ok, sorry for the wrong way to word it |
00:42:50 | FromDiscord | <Rika> leorize: ? |
00:42:53 | FromDiscord | <Rika> hm? |
00:43:06 | FromGitter | <alehander92> probably we still kinda misunderstand each other |
00:43:07 | disruptek | discarding an async call... that's another story. |
00:43:16 | disruptek | discarding a future... this is something else. |
00:43:31 | leorize | Rika: `newSeqWith` seems to be what you're looking for :P |
00:43:32 | FromGitter | <alehander92> i agree, sorry, i should've separated them early |
00:43:51 | FromGitter | <alehander92> but is there a way to detect that on compile time? |
00:44:03 | disruptek | you could have a macro that detects it. |
00:44:29 | FromGitter | <alehander92> maybe term rewriting macros can |
00:44:32 | FromDiscord | <Rika> leorize: i dont see how |
00:44:36 | FromGitter | <alehander92> but i am very unfamiliar with them |
00:44:50 | FromDiscord | <Rika> does it guarantee that the objects are near each other in memory? |
00:45:04 | disruptek | yes. |
00:45:26 | disruptek | the refs, anyway. |
00:45:29 | disruptek | not their values. |
00:45:37 | FromDiscord | <Rika> i mean their values |
00:45:47 | disruptek | use value types if you want values? |
00:45:57 | disruptek | value types are better. |
00:46:30 | FromDiscord | <Rika> that'd be a bit difficult |
00:46:37 | FromDiscord | <Rika> ill think about it more |
00:47:22 | leorize | if you want object next to each other, use a seq of values? |
00:47:31 | leorize | don't copy C's broken semantics |
00:48:48 | * | PMunch quit (Quit: leaving) |
00:49:24 | FromDiscord | <Never Listen To Beef> You say value types are better but my OOP brain says, suuuuure 😄 |
00:49:43 | FromDiscord | <KingDarBoja> You mean object variants? 😄 |
00:50:16 | FromDiscord | <KingDarBoja> Btw, what's the recommended way of documenting a type, right after the type Rika = enum line? |
00:50:31 | leorize | when I first pick up programming I avoided OOP at all costs :P |
00:50:35 | FromDiscord | <KingDarBoja> Or between type and MyHumbleType (separated lines) |
00:50:49 | leorize | one indent, then a doc comment |
00:51:18 | FromDiscord | <KingDarBoja> Okie Dokie 🙂 |
00:51:34 | FromDiscord | <KingDarBoja> `type MyHumble = enum` |
00:51:44 | FromDiscord | <KingDarBoja> ` ## My docstirng` |
00:51:57 | FromDiscord | <exelotl> Pick two: by-reference semantics, contiguity, resizable container |
00:51:59 | FromDiscord | <KingDarBoja> ` north, west, etc..` |
00:52:07 | FromDiscord | <KingDarBoja> Like that? |
00:52:26 | leorize | yea |
00:52:30 | FromDiscord | <KingDarBoja> 😗 |
00:53:01 | FromDiscord | <exelotl> by which I mean, you can have a seq of values and take pointers to those values, but all the pointers will become invalid if the sequence is ever reallocated |
00:53:53 | FromDiscord | <Rika> i dont think i need resizing |
00:54:35 | FromDiscord | <Rika> man this is a headache |
00:55:41 | leorize | what are you trying to do? |
00:55:47 | leorize | maybe I can figure out a way |
00:56:03 | leorize | are you by any chance attempting object pooling? |
00:58:25 | FromDiscord | <Never Listen To Beef> I am sorta interested on how you guys would design a system where Screens have positions, sizes, Workspaces and a selected workspace, and those workspaces have windows, and a selected window |
00:58:45 | FromDiscord | <Never Listen To Beef> *I feel like you guys wouldnt use ref objects* 😄 |
00:58:47 | FromGitter | <alehander92> disruptek sorry again |
00:59:03 | FromGitter | <alehander92> and thanks for the direction, i think i found a way |
00:59:05 | disruptek | we're cool, dude. |
00:59:10 | FromGitter | <alehander92> to adapt this guy's macro |
01:00:09 | disruptek | you could use the effect system. |
01:00:35 | FromGitter | <alehander92> no https://github.com/nim-lang/Nim/issues/11912 |
01:00:36 | disbot | ➥ Add undiscardable pragma and forbid Futures from being discarded |
01:00:38 | FromGitter | <alehander92> it seems it works |
01:02:35 | FromDiscord | <Rika> i think i know what to do now |
01:02:56 | FromGitter | <alehander92> sorry https://github.com/nim-lang/Nim/issues/11912#issuecomment-622645281 |
01:02:56 | disbot | ➥ Add undiscardable pragma and forbid Futures from being discarded |
01:02:57 | FromDiscord | <Rika> `object`s in a seq act like a `ref object` no? |
01:03:04 | FromGitter | <alehander92> yeah it seems this sould be an ok version |
01:09:01 | FromGitter | <alehander92> do we have a way to say "dont rewrite that more" |
01:09:40 | leorize | Rika: no, they don't have ref semantics |
01:09:58 | leorize | you can "refer" to them via indices though |
01:12:42 | * | muffindrake quit (Quit: muffindrake) |
01:14:15 | disruptek | alehander92: the best solution is to not add the code in the first place. |
01:18:41 | * | muffindrake joined #nim |
01:31:12 | FromDiscord | <Rika> leorize: i misphrased |
01:31:21 | FromDiscord | <Rika> ill just do whatever and see if i get issues |
01:38:36 | FromGitter | <alehander92> disruptek its like public safety |
01:38:58 | FromGitter | <alehander92> sometimes its ok to forbid people entering the hazard zone |
01:41:30 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
01:42:18 | FromGitter | <alehander92> otherwise i am ok with giving `ignoreErrors a()` instead of discard |
01:42:22 | FromGitter | <alehander92> so at least one can grep |
01:44:21 | FromGitter | <alehander92> (which one can still do now just by using try/empty except around await and run that in the background) |
01:45:26 | FromGitter | <alehander92> and this way we dont break one such "law" of physics: exceptions travel up to an except clause |
01:45:41 | FromGitter | <alehander92> not to an except clause or one case of discard |
01:46:11 | disruptek | discarding a future isn't an exception. |
01:46:22 | FromGitter | <alehander92> yes, i am not talking about this |
01:46:29 | FromGitter | <alehander92> i am talking about discard asyncCall() |
01:46:50 | disruptek | what's the difference? |
01:47:00 | FromGitter | <alehander92> it is that now suddenly my exception |
01:47:05 | FromGitter | <alehander92> never gets to an except clause |
01:47:11 | FromGitter | <alehander92> because it is .. discarded ?? |
01:47:16 | FromGitter | <alehander92> it doesnt make sense |
01:47:23 | FromGitter | <alehander92> it breaks the laws of physics |
01:47:48 | disruptek | what exception? |
01:47:58 | disruptek | i'm talking about futures. |
01:48:00 | FromGitter | <alehander92> the one somewhere inside asyncCall children |
01:48:04 | disruptek | y'know, the value you want to discard. |
01:48:06 | FromGitter | <alehander92> i agreed with you for futures |
01:48:13 | FromGitter | <alehander92> i changed the title of my issue |
01:48:18 | disruptek | what do your async procs return? |
01:48:30 | FromGitter | <alehander92> futures |
01:48:34 | disruptek | okay? |
01:48:48 | FromGitter | <alehander92> so then |
01:48:57 | FromGitter | <alehander92> discard asyncCall() should register an error callback. |
01:49:21 | disruptek | what's the error? |
01:49:53 | FromGitter | <alehander92> possibly an exception raised inside |
01:50:00 | disruptek | so what? |
01:50:19 | FromGitter | <alehander92> so your whole argument is that discard should not be broken for one case |
01:50:27 | * | chemist69 quit (Ping timeout: 240 seconds) |
01:50:29 | FromGitter | <alehander92> and my whole argument is that i also want raise to not be broken for one case |
01:50:30 | disruptek | it shouldn't be broken at all. |
01:50:34 | FromGitter | <alehander92> i want my raise |
01:50:38 | FromGitter | <alehander92> to raise |
01:50:42 | leorize[m] | what is this discard argument? |
01:50:43 | disruptek | raise isn't broken. |
01:50:49 | FromGitter | <alehander92> and the exception to travel until an except |
01:50:52 | FromGitter | <alehander92> not until a discard |
01:50:56 | disruptek | it does. |
01:50:58 | leorize[m] | can someone fill me in on this? |
01:51:00 | FromGitter | <alehander92> it does not |
01:51:08 | disruptek | not really, it's silly. |
01:51:10 | FromGitter | <alehander92> i do asyncCall() = .. raise |
01:51:11 | disruptek | #11912 |
01:51:12 | disbot | https://github.com/nim-lang/Nim/issues/11912 -- 3Add undiscardable pragma and forbid Futures from being discarded (EDIT: only async calls maybe) |
01:51:17 | FromGitter | <alehander92> discard asyncCall() # bam no error |
01:51:23 | FromGitter | <alehander92> no except: |
01:51:26 | FromGitter | <alehander92> still no error |
01:51:30 | FromGitter | <alehander92> broken law |
01:51:45 | disruptek | you just don't understand async. |
01:52:00 | FromGitter | <alehander92> so, explain it to me |
01:52:00 | disruptek | it's okay; i'm pretty sure dom doesn't understand it, either. |
01:52:09 | FromGitter | <alehander92> this is bullshit |
01:52:19 | FromGitter | <alehander92> with all my love for ya |
01:52:31 | disruptek | it's a closure. if you don't iterate over it, it doesn't run. if it does except, it stores the exception in the future. |
01:52:43 | disruptek | you can query it if you want, or don't. |
01:52:49 | * | chemist69 joined #nim |
01:52:53 | disruptek | you can raise it in sync code, or not. |
01:53:08 | disruptek | ima go play video games. maybe leorize can convince you. |
01:53:15 | FromGitter | <alehander92> i know well the code which is generated |
01:53:16 | disruptek | i need to learn PoE for work. |
01:53:33 | disruptek | gotta get those exalts. |
01:53:39 | FromGitter | <alehander92> but this doesnt address my concerns at all |
01:53:43 | FromGitter | <alehander92> you still have silent bugs |
01:53:46 | disruptek | i'm okay with that. |
01:53:49 | FromGitter | <alehander92> and raise still works unexpectedly |
01:54:15 | FromGitter | <alehander92> and it shoudln't have anything to do with "its a closure" imho |
01:54:16 | disruptek | there are lots of fair criticisms to be made of async. |
01:54:26 | FromGitter | <alehander92> closures dont know of "Futures" |
01:54:32 | FromGitter | <alehander92> this is not a property of closures |
01:56:20 | FromGitter | <alehander92> the whole "stores exception" thing is just an asyncmacro invention |
01:57:14 | FromGitter | <alehander92> and my problem is |
01:57:36 | FromGitter | <alehander92> i can see how let a = asyncCall() # ignore errors but maybe later do something about them somehow |
01:57:39 | FromGitter | <alehander92> can be useful |
01:58:34 | FromGitter | <alehander92> but discard asyncCall() just doesnt serve any useful purpose in my mind, it's just "lets not write let ignored = so people can suffer by silent bugs" |
01:58:54 | FromGitter | <alehander92> but maybe i am too emotional about it, sorry again, have a great night :D |
02:01:50 | * | Senketsu joined #nim |
02:07:06 | * | Senketsu quit (Quit: WeeChat 2.8) |
02:08:20 | * | Senketsu joined #nim |
02:08:43 | * | tlanger joined #nim |
02:09:13 | * | Senketsu quit (Client Quit) |
02:11:15 | * | ryan_ joined #nim |
02:11:38 | FromDiscord | <KingDarBoja> Rika, Yard? |
02:13:05 | * | Senketsu joined #nim |
02:14:27 | * | tlanger quit (Ping timeout: 258 seconds) |
02:15:14 | * | mono joined #nim |
02:17:42 | * | monok quit (Ping timeout: 260 seconds) |
02:26:22 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:28:20 | * | muffindrake joined #nim |
02:28:37 | * | Senketsu quit (Quit: WeeChat 2.8) |
02:31:49 | FromDiscord | <Rika> hi |
02:32:39 | FromDiscord | <Rika> @KingDarBoja wat |
02:45:35 | FromGitter | <bung87> how to do seq equals? |
02:48:01 | FromDiscord | <Rika> ==? |
02:50:33 | FromGitter | <bung87> hmm, my bad , there's one item not equals. |
03:01:59 | * | zacharycarter quit (Ping timeout: 258 seconds) |
03:12:36 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
03:13:54 | * | zacharycarter joined #nim |
03:48:06 | FromDiscord | <KingDarBoja> Rika, I am back, sorry 😄 |
03:51:36 | * | GabbyWest joined #nim |
03:52:36 | FromDiscord | <KingDarBoja> Was going to ask if it is possible to create methods at runtime |
03:53:58 | * | GabbyWest quit (Client Quit) |
03:54:32 | FromDiscord | <bedwardly-down> @Never Listen To Beef , so i spent part of the day learning how parsing works and some of the weird basic stuff that’s actually pretty intuitive |
03:55:03 | FromDiscord | <Rika> @KingDarBoja but? |
03:55:52 | FromDiscord | <KingDarBoja> Just that, 🙂 |
03:56:23 | FromDiscord | <KingDarBoja> I swear I need another monitor |
03:56:36 | FromDiscord | <KingDarBoja> Can't look at multiple windows, only two max and it is still small |
03:56:48 | FromDiscord | <Rika> you cannot |
03:57:32 | FromDiscord | <KingDarBoja> Ah, okay |
03:57:48 | FromDiscord | <KingDarBoja> Right now comparison 3 different implementations of same module |
03:58:11 | FromDiscord | <KingDarBoja> The original in JS, the Python one and GO one, this last one seems intuitive as it is strong typed |
03:58:48 | FromDiscord | <Rika> go will be easiest to port i assume |
04:00:14 | FromDiscord | <KingDarBoja> But it is the longest one lol |
04:01:16 | skrylar[m] | Go is cute. I didn't mind writing some of it |
04:01:40 | FromDiscord | <KingDarBoja> https://github.com/graphql-go/graphql/blob/master/language/visitor/visitor.go |
04:02:00 | FromDiscord | <KingDarBoja> Source implementation in JS -> https://github.com/graphql/graphql-js/blob/master/src/language/visitor.js |
04:02:12 | FromDiscord | <KingDarBoja> I feel like it is a mess hahaha |
04:02:15 | skrylar[m] | when i tried to look up how graphql worked what i found was that apparently its just the whole query string jammed in a GET request o.O |
04:02:41 | FromDiscord | <KingDarBoja> Oh yeah |
04:02:47 | FromDiscord | <KingDarBoja> It is |
04:03:05 | FromDiscord | <KingDarBoja> The parser and lexer works, just need to get the rest of stuff done |
04:03:09 | skrylar[m] | should probably experiment with it some time; never actually got around to using it for anything. :X |
04:03:16 | FromDiscord | <KingDarBoja> And ofc use object variants |
04:03:25 | skrylar[m] | was thinking of toying around with beeflang but the ide is required for some hcr stuff, and the ide doesn't work on linux, so rip. |
04:03:39 | FromDiscord | <KingDarBoja> It is awesome as it will give u better error responses and type safety |
04:04:30 | FromDiscord | <KingDarBoja> Did you saw the visitor on JS? |
04:04:57 | FromDiscord | <KingDarBoja> They using Flow with JS, I really hope the Typescript migration happens on the short term |
04:04:59 | FromDiscord | <KingDarBoja> x.x |
04:05:11 | skrylar[m] | whats wrong with flow |
04:06:00 | skrylar[m] | i gave typescript a light poke and was not impressed waiting 5 seconds for hello world to 'build' |
04:06:01 | FromDiscord | <KingDarBoja> They had to rely on workarounds for some type definitions |
04:06:01 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:32 | FromDiscord | <KingDarBoja> Remember that TS does Type checking and transpile into JS |
04:06:43 | * | supakeen joined #nim |
04:07:01 | FromDiscord | <KingDarBoja> So everything will take a bit to transpile into JS then execute |
04:07:04 | skrylar[m] | yeah so does nim and v |
04:07:31 | FromDiscord | <KingDarBoja> You're right |
04:07:53 | skrylar[m] | i still need to check what the opengl module is doing because when i imported it my import stack exploded and my builds went from 1s to 5-7s ... which is weird because it SHOULD just be a pile of innocent getproc's |
04:08:33 | FromDiscord | <KingDarBoja> Anyway, I will try to port that module, seems messy lol |
04:09:20 | skrylar[m] | it looks pretty gnarly which is weird for a visitor |
04:09:42 | FromDiscord | <KingDarBoja> gnarly? |
04:11:00 | FromDiscord | <KingDarBoja> Also, what you guys recommend for exporting proc / vars on a module |
04:11:12 | FromDiscord | <KingDarBoja> use `*` or declare at top level using export ? |
04:11:18 | skrylar[m] | it looks like a hot mess to me; i'm used to seeing visitors just like. switch on a type and then call accept_foo to recurse |
04:11:52 | skrylar[m] | pretty sure `export` has to do with making it C accessible and `*` is about making it public in the module to other nim code |
04:11:58 | leorize[m] | @KingDarBoja: export at top level is not designed for exporting proc inside your module |
04:12:03 | FromDiscord | <KingDarBoja> Ah ok |
04:12:08 | FromDiscord | <KingDarBoja> Thanks |
04:12:24 | FromDiscord | <KingDarBoja> skylar: at some part (the visit function) seems to do that but very messy |
04:13:10 | FromDiscord | <KingDarBoja> Also, do you know Go right? I think you mentioned that few comments ago |
04:13:33 | skrylar[m] | i dunno enough about what they are doing. i've just seen very clean visitors in Pharo/Squeak and i write them the same way they did elsewhere. it might be more clogged looking because they have to do some extra reflecting or something :shrug: |
04:14:21 | skrylar[m] | closures in nim are very nice and its pretty easy to do sax style visitors with a struct of them and then just call those. |
04:14:40 | * | FromDiscord <KingDarBoja> Too bad I am still noobish |
04:15:00 | FromDiscord | <bedwardly-down> How noobish are you? Day 2 here |
04:15:11 | FromDiscord | <KingDarBoja> 1 month I think |
04:15:18 | skrylar[m] | https://github.com/Skrylar/skcbor/blob/master/skcbor.nim#L66 =p |
04:15:38 | FromDiscord | <KingDarBoja> 2 months to be honest |
04:16:15 | FromDiscord | <KingDarBoja> Ahhhh |
04:16:22 | FromDiscord | <bedwardly-down> Nothing wrong with that if you're willing to learn and improve |
04:16:23 | FromDiscord | <bedwardly-down> 😄 |
04:16:37 | FromDiscord | <KingDarBoja> Skrylar: pretty clever approach |
04:17:00 | FromDiscord | <KingDarBoja> I am worried about the visit function as it returns `Any` on JS-base implementation |
04:17:12 | FromDiscord | <KingDarBoja> Python does the same and Golang defines interface{} |
04:17:21 | FromDiscord | <KingDarBoja> Which I have no idea what that means on GO lol |
04:17:32 | skrylar[m] | `interface{}` is basically `void*` |
04:17:58 | FromDiscord | <Rika> so nim's `pointer` xd |
04:18:06 | FromDiscord | <bedwardly-down> Is that the same as Void in most languages where it returns nothing and cannot be returned? |
04:18:21 | FromDiscord | <Rika> no |
04:18:24 | skrylar[m] | no the star makes it a pointer |
04:18:30 | FromDiscord | <bedwardly-down> Most languages like Java or Haxe |
04:18:37 | FromDiscord | <Rika> it is the same as "literally any data type" |
04:18:53 | FromDiscord | <KingDarBoja> Wait calm down |
04:18:58 | FromDiscord | <Rika> and "good luck figuring out what this type is" |
04:19:01 | FromDiscord | <bedwardly-down> I missed the pointer comment. I was refering to Void |
04:19:08 | skrylar[m] | go interfaces have automatic membership and `interface{}` is an interface with no required method, thus every struct is a valid member |
04:19:34 | skrylar[m] | although go still type checks casting from `interface{}` so there is some safety and runtime overhead |
04:19:34 | FromDiscord | <KingDarBoja> JS -> Any , Python -> Any (it is just a type hint), Go -> interface{}, Nim -> ? |
04:19:45 | FromDiscord | <Rika> `pointer` |
04:19:48 | FromDiscord | <KingDarBoja> Ok |
04:19:50 | skrylar[m] | not quite |
04:19:58 | FromDiscord | <bedwardly-down> How do you guys find time to understand as many languages as you do and then apply them in this context? |
04:19:59 | FromDiscord | <Rika> its the closest thing |
04:20:04 | skrylar[m] | i think we do have an "any" module but its a little screwy |
04:20:17 | skrylar[m] | nim's equivalent would be ref rootobj |
04:20:24 | FromDiscord | <Rika> just dont use it, convert it into a proper static typing system |
04:20:30 | FromDiscord | <KingDarBoja> I do know Python and TS |
04:20:32 | skrylar[m] | because if you put something in a pointer it doesn't inform the gc what you did |
04:20:35 | FromDiscord | <KingDarBoja> Rika: yup |
04:20:55 | FromDiscord | <KingDarBoja> So anything like skrylar shared |
04:21:06 | FromDiscord | <KingDarBoja> right? I mean -> https://github.com/Skrylar/skcbor/blob/master/skcbor.nim#L66 |
04:21:12 | skrylar[m] | this problem is why that skcbor module has a box type |
04:21:32 | * | zacharycarter quit (Ping timeout: 272 seconds) |
04:21:47 | skrylar[m] | but nims equivalent to `interface{}` is `ref RootObj` |
04:22:55 | FromDiscord | <KingDarBoja> So the idea should be |
04:23:20 | FromDiscord | <KingDarBoja> Use the kind (object variants) and call a proc per kind |
04:24:19 | leorize[m] | skrylar[m]: Nim do have typesafe conversion between ref object types |
04:27:52 | skrylar[m] | unrelatedly should probably bother someone that `after_code_reload:` causes segfaults on windows in devel |
04:28:20 | leorize | can you file an issue? |
04:29:16 | FromDiscord | <KingDarBoja> I like the Golang impl organization of the AST lol |
04:29:42 | skrylar[m] | go and v are cute. |
04:29:51 | FromDiscord | <KingDarBoja> https://github.com/graphql-go/graphql/blob/master/language/ast/node.go |
04:30:07 | FromDiscord | <KingDarBoja> I assume this is equivalent to the object variants |
04:30:26 | skrylar[m] | are you just parsing graphql? |
04:30:51 | FromDiscord | <KingDarBoja> By parsing what u mean? |
04:30:54 | FromDiscord | <KingDarBoja> Porting? |
04:31:03 | leorize | parsing |
04:31:16 | leorize | like read the language and understand it kind of thing :P |
04:31:28 | * | silvernode joined #nim |
04:31:38 | FromDiscord | <KingDarBoja> Yes |
04:31:47 | FromDiscord | <KingDarBoja> It does |
04:31:52 | silvernode | good morning |
04:32:03 | FromDiscord | <KingDarBoja> Or not sure if you mean reading the spec and doing that |
04:32:10 | skrylar[m] | if you're just trying to get a nim program to read graphql queries you're probably better off looking at references for parsing in static languages (like npeg or mratsim's thing) than trying to copy how dynamic languages do it |
04:32:40 | FromDiscord | <KingDarBoja> That's why I started to look at Go |
04:33:21 | FromDiscord | <KingDarBoja> But the source implementation was done in JS so that's why it gets harder to understand things and how stuff got implemented |
04:33:38 | skrylar[m] | yea parsing used to be my nemesis |
04:34:01 | leorize | if you write a parser, lexbase is an excellent base |
04:35:14 | FromDiscord | <KingDarBoja> It's not only a parser 😛 |
04:35:50 | silvernode | Can anyone explain what scenario I might want to use a reference object? Still trying to make my grid map for my game and someone here recommened making a position type that takes a reference to the grid type but I am not really sure how to approach this or why I would want to. |
04:36:00 | FromDiscord | <KingDarBoja> But been able to overcome some stuff and learn Nim on the way |
04:36:08 | FromDiscord | <KingDarBoja> Thanks to you guys ofc |
04:36:26 | leorize | silvernode: you use a ref object when you need the reference semantics |
04:36:42 | skrylar[m] | well when it comes to ASTs they are purely there for the convenience of a program trying to understand stuff; there is often no point in trying to be exactly close to another AST |
04:36:57 | leorize | silvernode: the "I want this to reference the same thing when I 'copy' it" and not "I want to optimize" |
04:37:52 | skrylar[m] | @silvernode references are pointers but garbage collected |
04:39:06 | silvernode | hmm, this all sort of makes sense to me but I'll be honest, I am still trying to comprehend the concept of pointers/refs. |
04:40:07 | leorize | there's the low level and the high level aspect of them |
04:40:57 | leorize | let me see if I can still find this documentation Zevv wrote |
04:41:18 | silvernode | leorize: thanks |
04:41:27 | FromDiscord | <KingDarBoja> skrylar: https://graphql.org/code/ look at all the current graphql implementation languages |
04:43:49 | leorize | silvernode: http://zevv.nl/nim-memory/ |
04:44:43 | silvernode | leorize: hopefully this will help me understand, thank you :) |
04:46:06 | leorize | I don't think I remember how I understood pointers, but I think what I did was that I played a lot with them |
04:46:22 | FromDiscord | <KingDarBoja> That's a neat doc |
04:46:26 | FromDiscord | <KingDarBoja> Bookmarked |
04:46:33 | leorize | ~memory |
04:46:39 | leorize | disbot? |
04:46:42 | FromDiscord | <KingDarBoja> Rip |
04:46:50 | leorize | disruptek: your bot is dead again |
04:48:24 | * | zacharycarter joined #nim |
04:49:44 | leorize | playing with pointers seem to be the way. I've just read some of the materials I used back when I step in programming and none of them fully explain the concept |
04:50:24 | skrylar[m] | beef has some interesting memory operators |
04:50:55 | skrylar[m] | mostly around letting you muck with custom mallocs for certain purposes |
04:51:17 | skrylar[m] | but they are explicitly gc-less so they can get away with more silly things easier |
04:53:12 | * | zacharycarter quit (Ping timeout: 272 seconds) |
04:53:22 | leorize | Rika: we do actually have a way to allocate a block of GC-ed memory |
04:53:26 | leorize | not that I recommend it |
04:53:37 | FromDiscord | <Rika> which is |
04:54:41 | leorize | unsafeNew |
04:56:45 | leorize | but note that this is for allocating a block |
04:56:54 | leorize | not for "a bunch of refs side by side" |
04:57:27 | * | silvernode quit (Ping timeout: 260 seconds) |
05:02:05 | * | chemist69 quit (Ping timeout: 240 seconds) |
05:02:56 | leorize | what would be a sane default for a process spawning interface? |
05:03:01 | leorize | what do people use the most? |
05:03:18 | * | chemist69 joined #nim |
05:04:44 | FromGitter | <bung87> `execCmdEx` seems good |
05:06:04 | FromGitter | <bung87> it return exitcode and stdout , quite common use case. |
05:10:02 | FromDiscord | <Never Listen To Beef> If i see another person talk about the beef programming language i think i have to change my name |
05:10:10 | FromDiscord | <KingDarBoja> Beeeef |
05:10:24 | FromDiscord | <KingDarBoja> I can't belive it is actually a language |
05:10:28 | FromDiscord | <KingDarBoja> With a beef logo lol |
05:11:59 | FromDiscord | <Rika> ref seqs are identical to seqs in memory? |
05:12:00 | FromDiscord | <Rika> cool |
05:13:44 | FromDiscord | <Rika> ah nvm, zev's article is outdated? |
05:14:35 | leorize | not that outdated |
05:15:15 | leorize | actually it's super up to date regarding old runtime |
05:15:59 | FromDiscord | <Rika> hmm, i think its just how nim's repr prints seqs now |
05:16:13 | FromDiscord | <Rika> i dont think repr for seqs show that its from a ptr anymore? |
05:16:38 | leorize | !eval echo repr @[ 0x30, 0x40, 0x50 ] |
05:16:41 | NimBot | 0x563e87311860@[48, 64, 80]↵ |
05:18:05 | * | NimBot joined #nim |
05:25:46 | disruptek | ~memory |
05:25:47 | disbot | no footnotes for `memory`. 🙁 |
05:25:57 | disruptek | when was that ever a thing? |
05:27:29 | leorize | I was checking to see if it's free |
05:27:30 | * | zacharycarter joined #nim |
05:28:09 | FromDiscord | <Rika> so why doesnt nim show that seqs are pointers tho |
05:28:13 | leorize | ~memory: The Nim memory model: https://zevv.nl/nim-memory/ |
05:28:13 | FromDiscord | <Rika> in repr |
05:28:14 | disbot | no footnotes for `memory:`. 🙁 |
05:28:21 | leorize | ~memory The Nim memory model: https://zevv.nl/nim-memory/ |
05:28:22 | disbot | no footnotes for `memory`. 🙁 |
05:28:22 | FromDiscord | <Rika> its memory is |
05:28:27 | leorize | ~memory is The Nim memory model: https://zevv.nl/nim-memory/ |
05:28:28 | disbot | memory: 11The Nim memory model: https://zevv.nl/nim-memory/ |
05:28:33 | leorize | thanks :P |
05:32:01 | * | zacharycarter quit (Ping timeout: 265 seconds) |
05:51:20 | FromGitter | <dawkot> Is VSCode Nim extension popular? |
05:51:23 | FromGitter | <dawkot> Seems pretty inactive on github |
05:51:39 | Yardanico | well it's ok |
05:51:49 | Yardanico | I think it's still the most popular choice for nim |
05:52:31 | FromDiscord | <Never Listen To Beef> Use gary's branch for nicer syntax highlighting |
05:52:31 | FromDiscord | <Never Listen To Beef> https://marketplace.visualstudio.com/items?itemName=garym.nim-alt |
05:53:34 | Yardanico | well syntax highlighting isn't the main issue with it |
05:54:28 | FromDiscord | <Never Listen To Beef> Sure, well i didnt say it was, just saying it has better syntax highlighting 😄 |
06:13:27 | FromDiscord | <KingDarBoja> Installing rightnow |
06:15:16 | FromDiscord | <KingDarBoja> Done, seems ok |
06:15:18 | FromDiscord | <KingDarBoja> good night |
06:17:44 | * | solitudesf joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:02:06 | FromGitter | <bung87> how to do async test? |
07:04:45 | * | gmpreussner joined #nim |
07:15:35 | * | Vladar joined #nim |
07:57:52 | * | voltist joined #nim |
08:07:04 | FromDiscord | <Benumbed> Can anyone spot what I'm doing wrong here? https://play.nim-lang.org/#ix=2kqM as far as I undersood, default params are fine in templates... |
08:15:32 | FromDiscord | <Rika> @Benumbed `(ref exceptn)(class: class, meth: meth, code: code, msg: message)` becomes `(ref exceptn)(0: 0, 0: 0, 0: 0, msg: message)` |
08:15:38 | FromDiscord | <Rika> rename the variables to something ele |
08:15:40 | FromDiscord | <Rika> else* |
08:17:43 | FromDiscord | <Benumbed> oh my god I feel quite stupid, thanks @Rika |
08:17:47 | * | dddddd joined #nim |
08:17:47 | FromDiscord | <Benumbed> I should go to bed I think lol |
09:26:00 | * | Trustable joined #nim |
09:34:11 | * | fredrikhr joined #nim |
09:39:12 | * | dddddd quit (Ping timeout: 256 seconds) |
09:46:20 | * | krux02 joined #nim |
09:48:42 | voltist | It seemed only fitting that my website, made with Nim, should use the Dracula theme: https://liamsc.com/ |
09:51:57 | * | krux02 quit (Remote host closed the connection) |
09:54:01 | * | fredrikhr quit (Read error: Connection reset by peer) |
09:54:26 | * | fredrikhr joined #nim |
10:04:30 | * | fredrikhr quit (Read error: Connection reset by peer) |
10:04:55 | * | fredrikhr joined #nim |
10:30:21 | * | filcuc joined #nim |
10:31:01 | * | zacharycarter joined #nim |
10:31:29 | * | fredrikhr quit (Read error: Connection reset by peer) |
10:31:54 | * | fredrikhr joined #nim |
10:35:43 | * | zacharycarter quit (Ping timeout: 256 seconds) |
10:36:40 | Prestige | voltist: bad gateway |
10:37:20 | voltist | Prestige: Seems fine to me |
10:37:28 | Prestige | huh weird |
10:37:30 | * | fredrikhr quit (Read error: Connection reset by peer) |
10:37:49 | Prestige | https://0x0.st/i2qs.png |
10:37:58 | * | fredrikhr joined #nim |
10:40:18 | solitudesf | 502 for me too |
10:42:30 | * | fredrikhr quit (Read error: Connection reset by peer) |
10:42:55 | * | fredrikhr joined #nim |
10:45:17 | * | zacharycarter joined #nim |
10:46:16 | * | filcuc_ joined #nim |
10:46:28 | * | filcuc quit (Ping timeout: 256 seconds) |
10:48:38 | * | waleee-cl joined #nim |
10:48:58 | Araq | Yardanico: your bug is killing me... :P |
10:49:52 | Araq | ah no |
10:49:58 | * | fredrikhr quit (Read error: Connection reset by peer) |
10:50:12 | Araq | found it |
10:50:14 | Araq | lol |
10:50:25 | * | fredrikhr joined #nim |
10:51:28 | * | fredrikhr quit (Read error: Connection reset by peer) |
10:51:56 | * | fredrikhr joined #nim |
10:54:28 | * | fredrikhr quit (Read error: Connection reset by peer) |
10:54:55 | * | fredrikhr joined #nim |
10:55:34 | * | fredrikhr quit (Read error: Connection reset by peer) |
10:56:00 | * | fredrikhr joined #nim |
11:00:52 | * | filcuc_ quit (Ping timeout: 260 seconds) |
11:14:14 | * | lritter joined #nim |
11:48:41 | * | zacharycarter quit (Ping timeout: 258 seconds) |
11:48:43 | * | nsf joined #nim |
12:02:13 | FromDiscord | <Zed> is it faster to return a new object or edit the object passed into a proc as a variable? |
12:02:31 | FromDiscord | <Zed> is it bad practice to edit the parameter rather then returning a new object? |
12:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:41 | * | supakeen joined #nim |
12:07:34 | Araq | a good rule is that inplace mutation is fine if there is only a single owner |
12:08:15 | Araq | and in general inplace mutation is faster unless the optimizer can remove the spurious copies but it's hard to tell without seeing any code |
12:08:57 | FromGitter | <bung87> edit param is programming like c way, that depends, on the other hand programming like functional, just get input and put output, logical simple |
12:09:44 | Araq | in general optimizers in 2020 are still disappointing unless you're into heavy number crunching code |
12:09:55 | Araq | IME anyway, ymmv |
12:10:39 | Araq | on the other hand just today I fixed Nim's move optimizer to be less aggressive |
12:11:54 | dom96 | good afternoon |
12:12:00 | Prestige | o/ |
12:12:16 | FromGitter | <bung87> optimizer? is it about compiler? |
12:13:42 | Araq | bung87: yes. Nim does optimize too, not only the C step, but you can't disable it |
12:14:49 | dom96 | Why are we still arguing about disallowing `discard`? |
12:14:55 | FromDiscord | <Zed> thanks Araq! |
12:15:28 | Araq | dom96, we aren't, the discussion is over :P |
12:15:29 | FromGitter | <bung87> oh,I have no idea about compiler optimizer, I just know react and parcel's optimization |
12:17:07 | dom96 | Araq, so your problem is with how it's implemented |
12:17:18 | dom96 | I don't really care how, do you at least agree that discarding futures should be disallowed? |
12:17:35 | dom96 | The bottom line is, either we disallow it or we make `asyncCheck` implicit |
12:17:44 | Araq | I don't agree that it should be disallowed |
12:17:50 | Araq | not anymore. |
12:17:58 | dom96 | I'm pretty sure the latter was tried and it caused bugs |
12:18:21 | Araq | it would only introduce a subtle case where 'let _ = f()' is not the same as 'discard f()' anymore |
12:18:22 | dom96 | This is an obvious source of bugs |
12:18:42 | dom96 | no, and that should be disallowed as well. |
12:19:00 | Araq | I don't agree, today I can write 'discard posix_api_call()' and it's a code smell too |
12:19:02 | dom96 | but really if someone tries `discard future` and they see "Do not use this in async procs, it's a stupid thing to do" |
12:19:09 | dom96 | then if they work around it then it's their own stupid fault |
12:19:15 | FromGitter | <bung87> discard async proc will make it like js behavior? |
12:19:19 | dom96 | how is someone meant to know that discarding futures is bad without that message? |
12:19:25 | Araq | it's all their own stupid fault to begin with |
12:20:11 | Araq | it's like "'cast' needs more hand holding from the compiler", no it doesn't need that, it's a dangerous sharp weapon. |
12:20:39 | dom96 | Okay, it's a fair argument to correlate it to discarding posix API return values (which can indicate errors) |
12:23:20 | Araq | having said that, can we improve the tooling in other ways? how about we add future leak detection at runtime. or "warn me for blocking calls" at runtime |
12:25:30 | * | zacharycarter joined #nim |
12:25:48 | dom96 | I think in the end we may need to be pragmatic here. The compiler's current error messages are not good enough. |
12:26:59 | FromDiscord | <dom96> https://play.nim-lang.org/#ix=2kse |
12:27:16 | FromDiscord | <dom96> Error: expression 'foo()' is of type 'Future[system.void]' and has to be discarded |
12:27:23 | FromDiscord | <dom96> The compiler leads the user in the wrong path |
12:27:37 | Araq | aha |
12:27:40 | FromDiscord | <dom96> Implying the use of `discard` |
12:27:48 | Araq | 'and has to be *used* ' |
12:28:11 | dom96 | ideally we should mention `asyncCheck` |
12:28:29 | Araq | that's acceptable, library specific error messages / filters should be a thing |
12:29:01 | zedeus | +1 for a pragma to specify custom "dont discard" message as the reason can vary |
12:29:27 | Araq | but in the general case replacing 'discarded' with 'used' would be a nice improvement |
12:29:39 | dom96 | sure, seems like a quick and easy fix |
12:30:35 | zedeus | 'discarded' serves as a hint to new users that may not be very familiar with the discard keyword |
12:31:56 | Araq | zedeus, yeah that was the idea but for async is counter productive advice |
12:32:41 | zedeus | yeah I agree, it's a pretty ironic error message :) |
12:34:08 | dom96 | I updated #11912 to reflect what we discussed |
12:34:24 | dom96 | disbot down? |
12:34:49 | zedeus | can anything be done for cases where async is used, but the return value is optional and rarely used? example is Redis where for most commands 0 or 1 is returned, and you very rarely need it. {.discardable.} doesn't work since that would apply to the future. I'd like to avoid `discard await ..` everywhere, gets hairy quickly |
12:35:17 | zedeus | I guess it's less of a problem now with await being a template |
12:35:33 | dom96 | how does `await` being a template affect this? |
12:36:04 | zedeus | you could make a `dawait` template that just does `discard await` |
12:36:05 | dom96 | yeah, that's a problem, because you want the result of future.read to be discardable not the result of the async call |
12:36:14 | zedeus | yep |
12:36:15 | dom96 | which we have no way to model, and likely won't :/ |
12:36:25 | dom96 | zedeus, please don't do that :( |
12:36:41 | Araq | zedeus, do that, it's cool :-) |
12:38:06 | zedeus | I might.. it almost kept me from using redis because 10 lines of `discard await` isn't nice to read |
12:39:37 | * | filcuc joined #nim |
12:39:47 | zedeus | oh you're gonna love this one. for my chat bot I made a `safeAsync` proc that's basically `asyncCheck` but it ignores exceptions :) |
12:41:46 | dom96 | yeah.. have fun with that |
12:42:45 | dom96 | hopefully by "ignores" you mean it at least logs them |
12:43:59 | zedeus | sure. the problem with asyncCheck exceptions is it crashes the program with nothing to catch them |
12:45:01 | * | zacharyc1rter joined #nim |
12:45:26 | zacharyc1rter | is it possible to do `amd64.macosx.gcc.linkerexe` in a nims file? or on a nim.cfg file? |
12:45:42 | zacharyc1rter | can I just use - `switch("amd64.macosx.gcc.linkerexe", "clang++")` ? |
12:46:43 | dom96 | zedeus, yep, the intention is actually to allow people to create their own `asyncCheck` variants |
12:47:18 | dom96 | we should probably add some common ones, I for example have one in my game that uses the logging module to log the exceptions |
12:47:54 | * | filcuc quit (Ping timeout: 240 seconds) |
12:48:00 | zedeus | that would be great, asyncCheck is useful as a way to say "go do that elsewhere", but also often useless because of the exceptions |
12:48:58 | * | fredrikhr quit (Read error: Connection reset by peer) |
12:49:26 | * | fredrikhr joined #nim |
12:52:22 | dom96 | btw you could have defined a dawait before await became a template, you just need to use `yield` in the template |
12:52:56 | Araq | zacharyc1rter, I think so, yes, try it |
12:53:24 | Araq | 'dawait', come on, it's awesome. it almost sounds like a real word |
12:53:41 | zacharyc1rter | Araq: I think I'm doing something wrong anyway as I'm trying to get clang++ to link my program but whether I use nim.cfg or config.nims it doesn't work |
12:54:13 | Araq | use 'nim cpp --cc:clang' |
12:54:27 | zacharyc1rter | well I'm compiling with clang but I want to link with clang++ |
12:54:37 | zacharyc1rter | since I have an objectfile that was comiled with C++ |
12:54:45 | zacharyc1rter | compiled* |
12:55:26 | zacharyc1rter | I'm not sure it even matters because things seem to work even when I just link with clang |
12:55:34 | zacharyc1rter | but I thought it would... |
12:56:21 | Araq | had the same problem with DrNim and my solution was 'nim cpp' |
12:57:06 | zacharyc1rter | unfortunatley that breaks nimterop and what I"m using that for :/ |
12:57:36 | zacharyc1rter | I guess I could compile that code separately and link it |
12:57:36 | Araq | you can also link with C++'s stdlib, somehow |
12:57:54 | zacharyc1rter | oh yeah I'm doing that already `--passL:-lc++` |
12:58:09 | Araq | well then you should be fine |
12:58:13 | zacharyc1rter | ah okay - thanks |
12:58:53 | * | xcm quit (Ping timeout: 246 seconds) |
12:59:26 | FromDiscord | <bedwardly-down> Tbf, dawait sounds very catchy and rolls well off the tongue. It also describes how async can feel, since you have “the wait” until it hits |
12:59:43 | * | tane joined #nim |
12:59:51 | FromDiscord | <bedwardly-down> I like puns in code i read |
12:59:59 | * | idf joined #nim |
13:00:03 | * | xcm_ joined #nim |
13:00:05 | Araq | 1 showstopper bug left :-) |
13:00:10 | zacharyc1rter | \o/ |
13:00:33 | disruptek | the bot isn't stable on orc/arc. 🙁 |
13:00:40 | FromDiscord | <bedwardly-down> Nice. Morning all. O7 |
13:00:55 | Araq | disruptek, fixed an important bug |
13:00:56 | zacharyc1rter | morning |
13:01:17 | disruptek | cool, i will try new builds. |
13:01:26 | Araq | wait until I merged my PR |
13:01:37 | FromDiscord | <bedwardly-down> Got a link? Disruptek was a pleasant host yesterday during his stream |
13:01:40 | dom96 | Araq, you asked me a while ago about which Nimble to bundle with the new release |
13:01:41 | disruptek | i saw you fixed the cyclic error. |
13:01:49 | dom96 | never replied to my questions, which version are you releasing? |
13:02:05 | Araq | disruptek, it was not just a cycle error, it was a 'sink' parameter bug |
13:02:17 | Araq | dom96, read the top of koch.nim |
13:02:26 | disruptek | oh wow. |
13:02:28 | Araq | but we already updated it |
13:02:36 | disruptek | that's kinda critical. |
13:02:45 | Araq | disruptek, I know :-) |
13:03:00 | dom96 | you're bundling a non-released Nimble commit? |
13:03:16 | Araq | dom96, in devel |
13:03:42 | dom96 | okay, what about the release, that was what your question was about AFAIK |
13:03:43 | Araq | not in an official release |
13:03:55 | Araq | well make a Nimble release please for us |
13:04:24 | Araq | gah, it's raining again. :-( |
13:04:46 | Araq | anyhow the real question I wanted to ask if we should ship the new cycle collector in 1.2.2 |
13:05:16 | * | ftsf joined #nim |
13:05:18 | dom96 | sure, why not? |
13:05:36 | Araq | dom96, because some might say it's a new feature |
13:06:06 | dom96 | so release 1.4.0? |
13:06:49 | dom96 | or 1.3.0 or however the versioning works these days |
13:07:12 | disruptek | if you don't cut a new minor then other software cannot easily /require/ your new feature. |
13:07:18 | disruptek | that's the point. |
13:09:19 | Araq | dom96, it would be 1.4.0 indeed and the versioning works as it always worked |
13:10:35 | disruptek | "my async code leaks", "what ver?", "1.3", "use >=1.4.0 and --gc:orc", "ah, cool, thanks" |
13:13:12 | FromDiscord | <dom96> https://github.com/nim-lang/nimble/releases/tag/v0.11.2 |
13:13:29 | Araq | disruptek, *shrug* what about it, we never said --gc:arc is production ready for async. we're working hard to make it production ready |
13:14:00 | disruptek | costs us nothing to use fresh integers; there are plenty left. |
13:14:10 | dom96 | Araq, be sure to include that Nimble 0.11.2 in the new release. |
13:17:34 | Araq | what's new in Nimble 0.11.2? |
13:17:51 | Araq | never mind, I was blind |
13:19:15 | FromDiscord | <mratsim> I'm really interested in your plans to make closures gc-safe so that we can pass them through channels. |
13:20:32 | * | filcuc joined #nim |
13:25:13 | * | nsf quit (Quit: WeeChat 2.8) |
13:25:36 | FromDiscord | <bedwardly-down> I love the changelog. It's slim enough that it's easy to parse and understand but detailed enough that I can decide whether or not to upgrade since it's such a minor release. \o/ |
13:26:19 | Araq | mratsim: with orc we have a new tool 'proc isIsolated[T: ref|closure](x: T): bool' available. isolated subgraphs can be transferred to a different thread safely |
13:26:41 | * | Vladar quit (Quit: Leaving) |
13:27:02 | Araq | that's the plan. |
13:28:55 | dom96 | bedwardly-down: thanks, glad someone appreciates my changelogs :) |
13:29:17 | zedeus | it would be real nice if you could do a new jester release |
13:29:41 | disruptek | zacharyc1rter: anyone can make new rooms on the mumble server so they have low-latency voice chat on their stream. |
13:29:53 | disruptek | i |
13:30:02 | disruptek | i'm happy to see it get used by the community. |
13:31:53 | zacharyc1rter | that's awesome thanks mannnnn |
13:32:01 | zacharyc1rter | I will do that today when I start streaming |
13:32:10 | disruptek | cool. |
13:32:57 | zedeus | what are you going to do on stream? |
13:33:25 | zacharyc1rter | continue working on game engine dev from yesterday - still trying to figure out why the f this code works in one project and not in this new one |
13:33:37 | zacharyc1rter | I don't want to bore users with this debugging |
13:33:37 | zedeus | ah cool |
13:33:54 | disruptek | it's not that easy, is it? |
13:34:06 | zacharyc1rter | streaming? |
13:34:11 | disruptek | yeah. |
13:34:16 | FromDiscord | <bedwardly-down> dom96, are you the core maintainer of nimble? I appreciate the TAB cycling approach for going through its interactive options. Not many devs have that down. |
13:34:17 | zacharyc1rter | yeah it's a task for sure |
13:35:02 | dom96 | bedwardly-down: I'm the one that originally created it, nowadays I have very little time to maintain it, but I do what I can. That particular feature was contributes by our community :) |
13:35:15 | dom96 | *contributed |
13:35:50 | FromDiscord | <bedwardly-down> Zachary, if you're streaming, I'd be interested in seeing some debugging stuff. Debugging is very much where I struggle in all languages I dabble in |
13:37:03 | zacharyc1rter | disruptek: I think I need to be an admin to create channels |
13:37:06 | zacharyc1rter | could you create one for me? |
13:37:13 | zacharyc1rter | bedwardly-down: wish granted - I'm about to start my stream |
13:37:31 | FromGitter | <dawkot> Is there a way to make compiler check if a method has been overloaded on all subclasses? |
13:37:38 | disruptek | yeah, i was hoping you'd figure it out for me. 🤣 |
13:37:43 | zacharyc1rter | lol |
13:38:18 | zacharyc1rter | https://www.twitch.tv/zachary_carter |
13:38:37 | FromDiscord | <bedwardly-down> I'm there. Zach |
13:39:11 | FromDiscord | <bedwardly-down> @Zachary Carter https://gettc.xyz/ that's pleasantly easy to setup on Linux |
13:39:46 | FromDiscord | <bedwardly-down> It's a straight Appimage. Just make sure you close out the stream preview or else you'll get audio feedback |
13:39:52 | * | filcuc quit (Ping timeout: 256 seconds) |
13:44:28 | * | filcuc joined #nim |
13:45:58 | * | fredrikhr quit (Read error: Connection reset by peer) |
13:46:26 | * | fredrikhr joined #nim |
13:49:45 | * | Vladar joined #nim |
13:51:08 | shashlick | @zacharycarter why is nimterop breaking |
13:51:16 | zacharyc1rter | it only is when I'm using C++ |
13:51:19 | zacharyc1rter | or at least it was in previous versions |
13:51:46 | shashlick | Any details you can share? Am curious |
13:52:00 | zacharyc1rter | I can put up an example later today |
13:52:06 | zacharyc1rter | with sokol |
13:52:56 | shashlick | Ok thanks |
13:53:00 | zacharyc1rter | np! |
13:57:40 | * | dddddd joined #nim |
14:01:32 | Araq | any love for type (Node, NodeKind) = ref object ? |
14:01:42 | Araq | see https://github.com/nim-lang/RFCs/issues/219 for the context |
14:01:45 | disbot | ➥ Object variant kind field type inference ; snippet at 12https://play.nim-lang.org/#ix=2ksV |
14:01:54 | disruptek | thanks, i hate it. |
14:04:16 | dom96 | no, if you want to improve it then go all the way and add some syntax inspired by sum types in other langs |
14:04:47 | dom96 | maybe we can come up with something that feels like idiomatic Nim |
14:05:15 | disruptek | one field two branches is the more important feature. |
14:05:30 | companion_cube | sum types ♥ |
14:06:14 | Araq | dom96, we can also simply add patty to the stdlib |
14:06:26 | * | filcuc_ joined #nim |
14:06:31 | dom96 | disruptek, +1 |
14:06:35 | Araq | but it's worth exploring how to change today's syntax |
14:06:45 | * | filcuc quit (Ping timeout: 272 seconds) |
14:07:18 | Araq | type |
14:07:25 | Araq | T = case kind |
14:07:35 | Araq | of intVal: x: int |
14:07:43 | Araq | meh |
14:08:12 | Araq | the ref vs non-ref distinction alone indicates the old syntax is good |
14:10:12 | dom96 | heh, nice, we're actually mentioned in https://en.wikipedia.org/wiki/Tagged_union#2000s |
14:11:18 | dom96 | Maybe we should copy Haxe's syntax: https://play.nim-lang.org/#ix=2ksZ |
14:11:35 | companion_cube | it's a bit cheating because nim doesn't check for invalid field access :> |
14:11:54 | dom96 | in fact, I really like that syntax |
14:13:19 | Araq | companion_cube, it does check, use warn[ProveField]:on |
14:13:43 | FromDiscord | <bedwardly-down> Amen to that, dom96. There are things that drive me nuts about Haxe and its development at times, but the syntax is spot on, at least to me |
14:14:03 | FromDiscord | <bedwardly-down> That's part of why I love using it as my main |
14:14:08 | companion_cube | ok, but why is it opt in?! |
14:14:31 | * | Zevv joined #nim |
14:14:39 | Araq | companion_cube, because a day only has 24 hours |
14:14:56 | FromDiscord | <bedwardly-down> dom, `/usercode/in.nim(3, 12) Error: identifier expected, but got '('` |
14:15:08 | dom96 | The English language should have a word for "because a day only has 24 hours" |
14:15:11 | FromDiscord | <bedwardly-down> that's what running it as C gets me in the link |
14:15:28 | dom96 | Many things are not so because they simply haven't been implemented yet |
14:15:42 | disruptek | ~features |
14:15:43 | disbot | features: 11begin in the unfortunate state of /unimplemented/ -- disruptek |
14:15:44 | dom96 | bedwardly-down: it's a syntax proposal, of course it doesn't work |
14:15:47 | companion_cube | but in this case it's implemented, right? |
14:16:03 | dom96 | companion_cube, presumably it needs refining and testing |
14:16:16 | dom96 | Araq, what do you think about that syntax? |
14:16:38 | Araq | it's implemented but probably needs more refinement if we enable it for everybody |
14:16:40 | zedeus | dom96: that syntax is pretty much what patty does, it's great. I think it doesn't support multiple branch values (of a, b: ...) and it makes it more strict since you can't have other shared fields in the object |
14:17:21 | Araq | dom96, as I said, how to make the 'ref object' vs object distinction with your syntax? |
14:17:31 | dom96 | hm |
14:17:34 | dom96 | `ref enum` :P |
14:17:51 | Araq | Swift uses 'indirect enum' fwiw |
14:18:05 | Araq | 'ref enum' could work though |
14:18:06 | dom96 | what does the `indirect` imply? |
14:18:10 | disruptek | i don't want to define both at once. |
14:18:49 | Araq | dom96, that it's a 'ref' ;-) |
14:19:07 | disruptek | i personally won't use the inference, either. i like that it's explicit, unambiguous. |
14:19:21 | FromDiscord | <bedwardly-down> Gotya, dom. 😓 |
14:20:09 | dom96 | Araq, yeah, meh, I prefer `ref` |
14:20:23 | dom96 | but I suppose the point is that Swift also has this additional keyword |
14:20:36 | dom96 | using `ref` for us would be nicely consistent |
14:21:22 | Araq | indeed, looks lovely |
14:21:29 | dom96 | on the other hand, it would put the Nim philosophy of "Small core and macros" in the coffin :P |
14:21:37 | dom96 | We have a macro for this, why don't we use it? |
14:21:55 | dom96 | Language features are more official and therefore are easier to adopt |
14:22:05 | * | silvernode joined #nim |
14:22:28 | Araq | true but maybe it's time to grow up and accept that Nim is more about what is practical rather than theoretically perfect |
14:22:42 | dom96 | yep |
14:22:52 | disruptek | what a lame argument. |
14:22:59 | Araq | and we don't do type system extensions via macros |
14:23:17 | Araq | we never did that, it's too hard to let the macro writers do it |
14:23:31 | Araq | type systems are beasts |
14:23:42 | disruptek | i'm doing it in my persistence project. |
14:23:56 | disruptek | and |
14:23:58 | disruptek | !repo nesm |
14:23:59 | disbot | https://github.com/xomachine/NESM -- 9NESM: 11NESM stands for Nim's Easy Serialization Macro. The macro that allowing generation of serialization functions by one line of code! (It is a mirror of https://gitlab.com/xomachine/NESM) 15 40⭐ 2🍴 |
14:24:23 | disruptek | technically, that's not a type extension. |
14:24:32 | Araq | exactly |
14:25:01 | Araq | but you're right, the big problem is how to do serialization of sum types in a composable manner |
14:25:03 | disruptek | write it as a macro. |
14:25:36 | disruptek | prove that it cannot be done correctly. 😉 |
14:25:37 | dom96 | that's not a problem |
14:25:52 | Araq | dom96, it is |
14:26:04 | dom96 | what does "in a composable manner" mean? |
14:26:17 | Araq | I know code that uses .push fieldChecks: off in order to accomplish it |
14:26:40 | Araq | dom96, it means you can construct via 'obj.kind = X; obj.field = value' |
14:26:58 | Araq | instead of 'obj = Constr(field: value)' |
14:27:01 | dom96 | hrm |
14:27:23 | zedeus | json's `to` can do it |
14:27:47 | * | filcuc_ quit (Ping timeout: 246 seconds) |
14:27:53 | Araq | zedeus, it can do it because Nim's case objects allow for it |
14:28:15 | Araq | we need to be careful that the new, superior way can also do it... |
14:28:30 | dom96 | json's `to` would be able to do it if you allowed expressions in these Constructor nodes |
14:28:33 | * | solitudesf quit (Ping timeout: 260 seconds) |
14:28:39 | zedeus | hm, msgpack4nim can't do it so I'm a little confused |
14:28:42 | dom96 | but json's `to` doesn't really scale well |
14:29:28 | dom96 | but yeah, this does pose a problem |
14:29:36 | Araq | dom96, I cannot easily allow it if we're after more static checking |
14:29:45 | dom96 | My thrift deserializer uses fieldPairs so it also suffers from this |
14:30:04 | disruptek | i'm all for improvements, but this isn't a priority right now and the community could make more progress with an RFC until the priority increases. |
14:30:18 | Araq | disruptek, indeed. bbl |
14:30:26 | dom96 | true |
14:31:20 | FromDiscord | <bedwardly-down> Nimble init does something goofy when a project directory has a '-' in it. It creates a subdirectory with the root directory's name but replaces '-' with '_' |
14:31:46 | disruptek | imports cannot contain '-' |
14:31:47 | FromDiscord | <bedwardly-down> Example: `nimble-echo` becomes `nimble-echo/nimble_echo` |
14:31:52 | FromDiscord | <bedwardly-down> Gotya |
14:32:21 | disruptek | s/imports/identifiers/ |
14:32:36 | FromDiscord | <bedwardly-down> Substitute? |
14:33:12 | FromDiscord | <bedwardly-down> And in the global config I'm guessing? |
14:34:55 | FromDiscord | <bedwardly-down> Solved the issue by just passing it as an argument when initting |
14:35:26 | FromDiscord | <Zed> has anybody had any trouble using nim with emacs? |
14:35:27 | FromDiscord | <Zed> I cant seem to get indentation working properly |
14:36:18 | zedeus | hey other Zed, yeah I'm using nim with emacs, you're probably missing the nimsuggest settings |
14:36:47 | dom96 | bedwardly-down: you shouldn't force the naming, you will need to use underscores |
14:36:53 | silvernode | So I got a Raspberry Pi 4 and tried a Nim nightly version. I think 1.3.0, but it complained about my nimble file that works fine on earlier versions. Not a big deal, just wanted to share my experience. I can load it up again if someone wants the error. |
14:36:56 | zedeus | @Zed: http://ix.io/2kta |
14:36:58 | FromDiscord | <Zed> hey other zed :), i downloaded nim-mode from melpa, is it not included? |
14:36:59 | FromGitter | <Vindaar> @Zed: I'm using NIm with emacs without nimsuggest. Aside from a couple of cases where indentation is messed up it works well |
14:37:07 | dom96 | silvernode, yes please |
14:37:22 | FromGitter | <Vindaar> @zedeus: does nimsuggest work well with emacs nowadays? |
14:37:34 | zedeus | yes, sometimes, sort of |
14:37:38 | FromDiscord | <Zed> ok you know whats creepy |
14:37:42 | silvernode | dom96: Oh ok, I should have it going in a few minutes here then. Will report back. |
14:38:00 | FromDiscord | <Zed> other zeds home directory is the same as mine |
14:38:11 | dom96 | silvernode, please report such things on the issue tracker, I might not always be here to ask for details :) |
14:38:12 | FromDiscord | <Zed> are you my fbi agent? |
14:38:17 | zedeus | seeing a Zed here made me feel the same way, man |
14:39:01 | silvernode | dom96: I suspected the problem was just a known change between versions or something |
14:39:18 | FromDiscord | <Zed> lol, it's good to meet you, i have never met anybody else called zed before |
14:40:08 | zedeus | yeah, we're a rare breed |
14:40:10 | FromDiscord | <bedwardly-down> Maybe you two are twins from different parents? 😄 |
14:40:23 | FromDiscord | <bedwardly-down> Or even clones? 😮 |
14:40:55 | FromDiscord | <Zed> lol maybe |
14:41:03 | zedeus | what are you working on? |
14:41:38 | FromDiscord | <Zed> i am trying to build a ray tracer with nim and and set up bloody spacemacs to work with nim properly. |
14:41:38 | FromDiscord | <Zed> you? |
14:42:07 | dom96 | when I see the name Zed I think of Zed Shaw. You're not that Zed right? :) |
14:42:34 | zedeus | oh cool. my main project is nitter.net but I'm working on a syncplay/cytube replacement (90% done), that supports mpv and a web client |
14:42:46 | FromDiscord | <Zed> no |
14:42:52 | FromDiscord | <Zed> i cna change my name if you want? |
14:43:43 | FromDiscord | <Zed> what is nitter.net? |
14:43:54 | zedeus | https://github.com/zedeus/nitter |
14:44:12 | zedeus | afaik the most popular Nim project besides the compiler |
14:44:26 | FromDiscord | <Zed> damn that's impressive |
14:44:47 | FromDiscord | <Zed> looks really clean as well!! |
14:45:01 | zedeus | thanks :) i'll be back later, food is calling |
14:46:26 | FromDiscord | <Zed> haha, sleep is calling me |
14:46:52 | zacharyc1rter | shashlick: nimterop isn't working for me with sokol anymore, the latest version |
14:47:05 | * | solitudesf joined #nim |
14:47:21 | zacharyc1rter | I saw all of the overrides that get generated and passed to toast, but I"m running into an error that one of the overridden types is undeclared |
14:47:28 | zacharyc1rter | will post an example later |
14:49:08 | FromDiscord | <Zed> hey @vindarr how have you got emacs setup? |
14:55:08 | FromGitter | <Vindaar> @Zed: pretty much close to default (regarding nim specific settings that is). Added a couple of minor modes, but other than that using just normal `nim-mode` and having set the `nimsuggest-path` to `""` via `M-x customize-variable` |
14:55:40 | FromGitter | <Vindaar> mostly rely on helm functionality to find stuff tbh |
14:56:57 | FromGitter | <Vindaar> my emacs settings are here: https://github.com/Vindaar/emacs.d/ ⏎ But probably rather check out @kaushalmodi's settings: https://github.com/kaushalmodi/.emacs.d |
14:58:16 | dom96 | zedeus, got any nitter usage numbers you're willing to share? :) |
14:59:52 | FromDiscord | <Zed> awesome thanks, ill test them out and see what works |
15:03:18 | * | chapl joined #nim |
15:04:00 | * | chapl quit (Remote host closed the connection) |
15:04:22 | * | chapl joined #nim |
15:16:11 | * | filcuc_ joined #nim |
15:18:30 | * | fredrikhr quit (Read error: Connection reset by peer) |
15:18:55 | * | fredrikhr joined #nim |
15:20:24 | shashlick | @zacharycarter sounds good, will fix once we have some detail |
15:21:47 | FromDiscord | <bedwardly-down> I'm live at https://www.twitch.tv/bedwardly_down . I'm not really a streamer, but I'm trying to get back into it. |
15:25:58 | shashlick | @zacharycarter latest version of nimterop or sokol |
15:26:04 | zacharyc1rter | shashlick both |
15:26:17 | shashlick | Head? |
15:26:23 | shashlick | Of nimterop |
15:26:24 | zacharyc1rter | whatever nimble installs |
15:26:37 | shashlick | Ok that's old |
15:26:58 | shashlick | Then it sounds like a sokol change that's breaking |
15:27:06 | shashlick | But 0.5.0 is coming very soon |
15:41:11 | zedeus | dom96: sure, according to nginx, since the 12th of april there has been 400k unique visitors, 36m requests |
15:42:00 | * | FromGitter quit (Remote host closed the connection) |
15:42:18 | dom96 | zedeus, any DAU/MAU numbers? |
15:42:20 | * | FromGitter joined #nim |
15:43:14 | * | setenforce joined #nim |
15:54:49 | * | ChantalZale joined #nim |
15:55:12 | * | ChantalZale quit (Client Quit) |
15:56:30 | * | setenforce quit (Quit: WeeChat 2.8) |
15:57:50 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
15:58:59 | FromDiscord | <Broadwell> I'm trying to write unit tests for my macros, and it seems that I cannot (1) run unittest at compile time or (2) manipulate NimNodes at runtime. Are there any tools to facilitate this? |
15:59:13 | * | sagax quit (Excess Flood) |
16:02:27 | zedeus | dom96: about 15k daily |
16:04:21 | FromDiscord | <Recruit_main707> https://play.nim-lang.org/#ix=2ktM is that go code the same as the nim one? (both in there) |
16:05:58 | zedeus | maybe. depends on what "Unique visitors per day" means |
16:06:24 | * | Lord_Nightmare joined #nim |
16:06:25 | dom96 | zedeus, I guess you don't have Google analytics on it? |
16:06:31 | zedeus | indeed |
16:10:58 | * | fredrikhr quit (Read error: Connection reset by peer) |
16:11:23 | * | fredrikhr joined #nim |
16:17:03 | * | filcuc_ quit (Ping timeout: 260 seconds) |
16:27:52 | zedeus | and ofc that doesn't include usage stats from the other 10 instances, I know some of them also get a nice amount of traffic |
16:28:28 | * | ptdel joined #nim |
17:01:28 | * | fredrikhr quit (Read error: Connection reset by peer) |
17:01:55 | * | fredrikhr joined #nim |
17:14:47 | * | ftsf quit (Ping timeout: 260 seconds) |
17:19:36 | * | filcuc_ joined #nim |
17:25:59 | * | NimBot joined #nim |
17:34:20 | disruptek | broadwell: run your ct tests in a static: in your unittest file or w/e. |
17:36:24 | FromDiscord | <bedwardly-down> How types and variables of those types work with nim is definitely not something I've seen before. I'm going to have to stew on them a bit |
17:36:47 | FromDiscord | <bedwardly-down> Not terrible but definitely different to me |
17:44:28 | zacharyc1rter | hmm - so I'm importing a module in my host app and my plugin and now I get errors about a class being implemented in both places |
17:44:55 | disruptek | nodecl? |
17:45:08 | zacharyc1rter | well the module being imported is using nimterop |
17:46:03 | zacharyc1rter | actually I'm importing a module that's importing a module that uses nimterop |
17:46:12 | zacharyc1rter | in the plugin |
17:46:30 | zacharyc1rter | I tried using `import except` but that doesn't solve the problem either |
17:46:58 | zacharyc1rter | but yeah maybe I can just redefine the type with nodecl |
17:50:10 | * | fredrikhr quit (Quit: Client Disconnecting) |
17:52:21 | shashlick | any details? |
17:52:54 | zacharyc1rter | I have a single nimterop module that creates bindings for `sokol_app.h` and `sokol_gfx.h` |
17:53:22 | zacharyc1rter | I used one module because I need to compile the implementations for these header files - which are in the header files |
17:54:16 | shashlick | are both pulling in the same header |
17:54:23 | zacharyc1rter | so in the nimterop module i use `cCompile` and I have a `.m` file which includes those two header files and defines some preprocessor directives like `#define SOKOL_IMPL` so that the implementations are included when I compile the header files |
17:54:54 | zacharyc1rter | I included both APIs in a single nimterop module, because I only want to define `SOKOL_IMPL` once and breaking them up into two nim modules seems to break everything |
17:55:18 | zacharyc1rter | here let me commit and I can point you to the relevant files |
17:56:07 | zacharyc1rter | https://github.com/zacharycarter/frag/blob/master/lib/sokol.nim |
17:56:09 | shashlick | but what's the actual error |
17:56:31 | zacharyc1rter | the way I have it now I don't get an error from nimterop |
17:56:58 | zacharyc1rter | the problem is when I import a module in my plugin code that imports this module which uses nimterop |
17:57:06 | zacharyc1rter | I get an error about the same class being implemented twice |
17:57:28 | zacharyc1rter | I'd break the nimterop module into two modules and only import the one I need - except them the nimterop module fails to compile |
17:57:34 | shashlick | output |
17:57:41 | zacharyc1rter | one sec I need to redo splitting it |
17:57:44 | zacharyc1rter | will take a moment |
17:57:48 | shashlick | no problem |
18:03:45 | zacharyc1rter | I think it was user error - I wasn't defining one of the preprocessor directives in both source files and I needed to - now it's compiling |
18:05:50 | shashlick | okay cool |
18:05:56 | zacharyc1rter | thanks for offering to help |
18:06:02 | shashlick | you're still using v0.4.4 right? not nimterop@#master |
18:06:09 | zacharyc1rter | 0.4.3 I think |
18:06:20 | zacharyc1rter | I'll try with master later today |
18:06:27 | shashlick | okay big release coming soon |
18:06:31 | zacharyc1rter | and report any issues I encounter |
18:06:34 | shashlick | need to publish the changelog |
18:06:34 | zacharyc1rter | okay I'll just wait for that :) |
18:08:55 | * | krux02 joined #nim |
18:10:45 | * | jwm224 quit (Quit: WeeChat 2.8-dev) |
18:13:06 | * | filcuc_ quit (Ping timeout: 272 seconds) |
18:14:21 | federico3 | https://github.com/nim-lang/Nim/wiki/BuildServices updated |
18:29:38 | FromDiscord | <Broadwell> disruptek: https://play.nim-lang.org/#ix=2kuP |
18:33:51 | FromGitter | <Vindaar> shashlick: just tried out nimterop for the first time. Have to say I'm *very* impressed! |
18:35:59 | * | lain quit (Quit: brb) |
18:40:26 | disruptek | broadwell: you cannot use unittest for it; just write your tests differently. you can also check a result value at runtime after storing it in a const, etc. |
18:41:13 | zacharyc1rter | first example works with hot reloading now - https://github.com/zacharycarter/frag/blob/master/examples/00-minimal/minimal.nim - on osx anyway |
18:49:29 | * | chapl quit (Ping timeout: 272 seconds) |
18:52:47 | * | lain joined #nim |
18:53:17 | FromDiscord | <KingDarBoja> Hi guys |
18:53:44 | * | disruptek quit (Read error: Connection reset by peer) |
18:54:05 | * | disbot quit (Read error: Connection reset by peer) |
18:54:59 | * | disbot joined #nim |
18:55:59 | * | disruptek joined #nim |
19:04:52 | * | chapl joined #nim |
19:05:35 | * | chapl quit (Remote host closed the connection) |
19:05:57 | * | chapl joined #nim |
19:09:54 | * | chapl quit (Remote host closed the connection) |
19:12:39 | * | chapl joined #nim |
19:25:37 | FromDiscord | <Weaponized Lego> Hey guys. I'm s little curious about nim, i wanted to pick up a novelty language as i haven't really had the need to pick up a second one as JavaScript and node.js pretty much solves all my problems right now. |
19:25:37 | FromDiscord | <Weaponized Lego> |
19:25:37 | FromDiscord | <Weaponized Lego> What are some ideas / problems where nim can be applied? I prefer to work on issues presented and work from there rather than video tutorials. |
19:26:10 | FromDiscord | <clyybber> just work an what you want. I for example use it for gamedev |
19:26:36 | FromDiscord | <clyybber> its a general purpose language though, so you should be able to use it for pretty much everything |
19:26:44 | FromDiscord | <clyybber> from webdev to embedded |
19:27:24 | FromDiscord | <Weaponized Lego> I'll start with data manipulation then, I have a few CSV files I need to process |
19:29:54 | FromDiscord | <KingDarBoja> Welcome Zoiberg! |
19:30:01 | * | FromDiscord <KingDarBoja> I love your profile pic |
19:30:08 | * | def- quit (Quit: -) |
19:30:16 | FromDiscord | <KingDarBoja> And yeah, pretty much you can use it for whatever you want |
19:30:19 | * | def- joined #nim |
19:30:42 | FromDiscord | <KingDarBoja> Someone said it was the lego language as you can build powerful stuff using macros and all that |
19:33:15 | * | chaplchapl joined #nim |
19:33:25 | * | chaplchapl quit (Client Quit) |
19:37:08 | FromDiscord | <KingDarBoja> Arrghh I lost the example of nested object kinds, anyone can share it? |
19:42:12 | FromDiscord | <KingDarBoja> Nvm I think I got it |
19:42:23 | planetis[m] | Imo, case object syntax is fine as is. Biggest nuisance is not being able to define same object field for different branches. Can this ever be fixed? |
19:43:10 | leorize | currently it's fixable with a macro, as long as you different branches share the same type for that field |
19:44:13 | leorize | there were proposed syntax but I think no one was bothered enough to actually work on it |
19:44:14 | * | nsf joined #nim |
19:45:17 | * | idf quit (Ping timeout: 260 seconds) |
19:45:39 | planetis[m] | Does patty implements it? |
19:45:51 | planetis[m] | Or any other macro |
19:46:17 | zedeus | patty does not, but you can use the intended names with `match` |
19:47:30 | zacharyc1rter | stream is back online - https://www.twitch.tv/zachary_carter |
19:47:47 | FromDiscord | <Varriount> @Zachary Carter Are you on Mumble? |
19:47:56 | FromDiscord | <Varriount> Or zacharyc1rter |
19:49:14 | FromDiscord | <KingDarBoja> https://github.com/nim-lang/RFCs/issues/19 |
19:49:44 | FromDiscord | <KingDarBoja> leorize: too bad you have to use the same type on the same field for different branches :/ |
19:54:50 | planetis[m] | Oh my god, idont care about the syntax i want that 🥺 |
19:56:20 | * | silvernode quit (Ping timeout: 272 seconds) |
19:57:58 | * | inv2004 joined #nim |
19:58:29 | inv2004 | Hello, is it possible to point nimble requires to local directory ? |
19:59:04 | FromDiscord | <Never Listen To Beef> Why would you want to? |
19:59:09 | zedeus | run `nimble develop` in the directory then add the package name to your .nimble |
19:59:44 | * | Trustable quit (Remote host closed the connection) |
20:01:28 | * | Trustable joined #nim |
20:03:25 | FromDiscord | <mratsim> inv2004: export NIMBLE_DIR=path/to/local/nimbledir |
20:03:59 | FromDiscord | <mratsim> ah sorry misunderstood, do as zedeus said |
20:06:04 | inv2004 | `nimble develop` in package directory I am going to require ? |
20:06:17 | zedeus | yes |
20:07:12 | leorize[m] | KingDarBoja: it's a reasonable limitation |
20:07:18 | leorize[m] | same field of the same type with different type per branch is a nightmare |
20:08:35 | FromDiscord | <KingDarBoja> Still I like the suggestion of 4raq of shared fields, which seems to fit my need |
20:08:39 | leorize | no strongly typed language have return type overloading for a good reason |
20:09:23 | FromDiscord | <KingDarBoja> Getting used to the strong typing, I like it |
20:09:38 | FromDiscord | <Never Listen To Beef> IIRC dont you come from python? |
20:09:47 | FromDiscord | <Never Listen To Beef> That's strongly typed 😛 |
20:09:59 | FromDiscord | <KingDarBoja> I come from Python lol |
20:10:09 | FromDiscord | <KingDarBoja> I do TypeScript but ain't the same at all |
20:11:20 | FromDiscord | <Never Listen To Beef> I come from C# so i have the type system down, the big issue i have is C# is a heavy OOP language and nim is certainly not |
20:11:29 | FromDiscord | <KingDarBoja> right |
20:11:54 | FromDiscord | <Never Listen To Beef> *that and compile time vs runtime* |
20:12:26 | FromDiscord | <KingDarBoja> TS is more like C# |
20:12:34 | FromDiscord | <KingDarBoja> But ofc has the JS things |
20:12:46 | FromDiscord | <Never Listen To Beef> Yea i know what TS is, not that i've ever touched it |
20:13:00 | FromDiscord | <KingDarBoja> That's why they said "Composition oevr Inheritance" |
20:13:09 | FromDiscord | <KingDarBoja> Just saying 🙂 |
20:13:32 | leorize | I come from pascal, which has a lot of concepts in common with Nim |
20:13:50 | * | vqrs quit (Ping timeout: 246 seconds) |
20:13:52 | leorize | I'd say that makes Nim really easy to pick up for me |
20:14:09 | FromDiscord | <Never Listen To Beef> I tend to write nim code like i would in C# then realize that C#'s OOP has more features so then have to reevaluate |
20:14:29 | FromDiscord | <KingDarBoja> Yeah, if you go OOP in Nim, you need to be careful with child types |
20:14:41 | Yardanico | well nim OOP has it's advantages too |
20:14:44 | Yardanico | like multimethods |
20:14:55 | FromDiscord | <Never Listen To Beef> I mean my biggest gripe is runtime interfaces, since im used to having runtime mutable things |
20:14:58 | leorize | multimethods is deprecated |
20:14:59 | FromDiscord | <Never Listen To Beef> Yea but it's foreign to me |
20:15:10 | * | Hexeratops joined #nim |
20:15:39 | * | vqrs joined #nim |
20:16:04 | * | Senketsu joined #nim |
20:16:22 | inv2004 | next question: the requires from nimble tries to compile the develop package, but cannot find .h header |
20:16:26 | FromDiscord | <KingDarBoja> I hate casting everytime I need to get a property of a child type as the code on cimpile time will thell me it doesn't exist |
20:16:30 | inv2004 | Locally everything is ok in the package |
20:16:40 | FromDiscord | <KingDarBoja> But I know it does but it is using the base type |
20:16:54 | leorize | casting? you means converting, right? :P |
20:16:59 | * | Senketsu quit (Client Quit) |
20:17:38 | FromDiscord | <KingDarBoja> Not really `cast` but doing `childType(myVarW)` |
20:17:45 | leorize | yea |
20:17:48 | FromDiscord | <KingDarBoja> 😛 |
20:17:50 | Yardanico | well that's very different from "casting" |
20:17:59 | FromDiscord | <Never Listen To Beef> Coming from C# you're wrong 😛 |
20:18:20 | * | Senketsu joined #nim |
20:18:38 | leorize | the C family of language bundles all kind of conversion into one thing |
20:19:13 | leorize | iirc only C++ have different operators for different kinds of conversions |
20:20:39 | FromDiscord | <KingDarBoja> As `myVarW` is truly `childType` butbeing recognized as the base type due to proc call |
20:20:44 | FromDiscord | <Never Listen To Beef> Yea idk why you get a compiletime error, i know my ECS converted components to their true type seemlessly |
20:21:11 | Yardanico | Araq: thanks, with #14159 fixed nimes works with sink inference on, although nimes for some reason generally doesn't perform that well with arc (it's like 2-3x slower than with default gc) |
20:23:26 | Yardanico | although 70% of the time is still spent in __strstr_sse2 from libc |
20:24:33 | FromDiscord | <KingDarBoja> @Never Listen To Beef too lazy to explain now |
20:25:01 | leorize | note that Nim's proc use static binding, so "seamless" conversion isn't a thing here |
20:25:35 | FromDiscord | <KingDarBoja> Pretty much what leorize said |
20:25:49 | FromDiscord | <KingDarBoja> Doing the object variant conversion now |
20:26:05 | * | Senketsu quit (Quit: WeeChat 2.8) |
20:29:34 | FromDiscord | <mratsim> you are supposed to use methods on inherited stuff |
20:29:52 | Yardanico | oh seems like strstr is called by isObj |
20:30:37 | Yardanico | hmm maybe it due to nimes using inheritance for different mappers, lemme try without them |
20:32:25 | leorize | shashlick: #14180 is merged :) |
20:33:35 | Yardanico | lol wtf |
20:33:39 | Yardanico | I was right |
20:33:42 | * | sagax joined #nim |
20:33:53 | Yardanico | after removing inheritance for mappers it now performs like 3x better (same as with default gc) |
20:34:43 | FromDiscord | <7815> if i'd want to statically link with sdl2, what do i do? |
20:35:05 | leorize | what sdl2 wrapper are you using? |
20:35:17 | FromDiscord | <7815> the "standard one" |
20:35:26 | leorize | nim-lang/sdl2? |
20:36:14 | FromDiscord | <7815> the one that comes with `nimble install sdl2` |
20:36:39 | leorize | then --dynlibOverride:SDL --passL:"<flags for linking with sdl2 here>" |
20:36:49 | FromDiscord | <7815> very thanks |
20:38:46 | * | lritter quit (Quit: Leaving) |
20:39:44 | Yardanico | Araq: sorry for pinging again, so is it expected that --gc:arc performs much slower with ref objects with inheritance than default GC? in nimes it's a hot path since for PPU and for some CPU addresses it has to call a [] method for Mapper (so for one of its inherited objects) |
20:40:04 | Yardanico | a lot of time is spent in strstr (which is called from isObj) with that |
20:40:33 | Yardanico | without inheritance it performs just as well as in the default gc (I don't have specific benchmarks, but 5fps vs 30 fps can be noticed by a naked eye :D) |
20:42:06 | Yardanico | although I guess it won't be hard to fully remove inheritance for mappers from nimes |
20:42:45 | FromDiscord | <Never Listen To Beef> Well leorize my components were just data holder so i was accessing the properties on child not using procs on them |
20:43:15 | FromDiscord | <KingDarBoja> Hey guys, how I can call a type which is going to be declared later on the object variant? |
20:43:28 | Yardanico | wdym "call a type"? |
20:43:36 | Yardanico | well you can have recursive dependencies in types if you declare them in the same type block |
20:43:55 | FromDiscord | <KingDarBoja> I am using the same type block |
20:43:57 | FromDiscord | <KingDarBoja> But hold on |
20:43:58 | leorize | Yardanico: I think it's kinda unexpected. reading refs_v2 it seems that it's expected that the performance will be the same |
20:44:22 | Yardanico | leorize: well yeah I was initially suprised too, literally 69% of the time was spent in __strstr_sse2 from libc |
20:45:10 | FromDiscord | <KingDarBoja> https://imgur.com/VprFPUu |
20:45:11 | Yardanico | in C there are lines like "if (!((m) && (isObj((*m).Sup.m_type, "|nimes.mapper3.Mapper3:ObjectType|nimes.types.Mapper:ObjectType"" |
20:45:23 | Yardanico | and isObj does T1_ = strstr((*obj).name, subclass); |
20:45:37 | leorize | turns out pointer tracing is still faster than substring search :P |
20:45:47 | Yardanico | @KingDarBoja then you'll have to declare these types separately |
20:45:56 | Yardanico | you couldn't do what you showed in a screenshot |
20:46:04 | Yardanico | can't* |
20:46:15 | FromDiscord | <KingDarBoja> Ugh |
20:46:31 | leorize | KingDarBoja: you can't enforce which variant goes where |
20:46:44 | leorize | at least you can't do that in the type system |
20:47:16 | FromDiscord | <KingDarBoja> So I must declare them separately before using |
20:47:23 | FromDiscord | <KingDarBoja> On a separate object variant type |
20:47:57 | leorize | your type system is creepily complex |
20:48:10 | Yardanico | leorize: it's a port from JS afaik |
20:48:15 | Yardanico | of graphql |
20:48:20 | FromDiscord | <KingDarBoja> ye |
20:48:29 | FromDiscord | <KingDarBoja> It works with OOP as I mentioned |
20:49:04 | * | chapl quit (Quit: Leaving) |
20:49:21 | FromDiscord | <KingDarBoja> Just seeing if I can replace the OOP approach with the object variants |
20:49:27 | leorize | well your system is just too complex |
20:49:31 | leorize | simplify it to the barebones |
20:50:39 | leorize | conversion from inheritance to variants requires rethinking some of the approach |
20:51:09 | leorize | don't be overspecific, be "just specific enough" |
20:51:39 | FromDiscord | <Rika> its really hard for me to convert inheritance to variants |
20:51:54 | Yardanico | just think in the nim way :P |
20:52:01 | FromDiscord | <KingDarBoja> How is the Nim way? |
20:52:04 | leorize | yea, you don't "convert" |
20:52:10 | FromDiscord | <Rika> it'd be easier with the "same field same type" thing for 2 different variants |
20:52:35 | FromDiscord | <KingDarBoja> I am once again requesting your help 😄 |
20:52:38 | leorize | I can help with that |
20:52:41 | FromDiscord | <Rika> like, much easier for me |
20:52:44 | FromDiscord | <KingDarBoja> Hold on |
20:52:46 | leorize | "same field same type" thing |
20:53:12 | FromDiscord | <KingDarBoja> https://github.com/graphql/graphql-js/blob/master/src/language/ast.js#L135 scroll down and see what I can't see |
20:53:41 | FromDiscord | <Rika> leorize: see only "Individual" and "Overall" |
20:53:41 | FromDiscord | <Rika> https://cdn.discordapp.com/attachments/371759389889003532/706247061271740487/unknown.png |
20:53:44 | FromDiscord | <KingDarBoja> So far I made it with OOP but the drawback is that my proc calls are using the base type for some of them |
20:54:05 | Yardanico | @KingDarBoja I'm not saying it's easy, but do you really think that if Nim's own AST can be constructed with object variants, graphql's AST can't? :) |
20:54:08 | FromDiscord | <Rika> `column` and `column count` are intentionally (meant to be) different |
20:55:30 | FromDiscord | <KingDarBoja> Wdym Yard? |
20:55:45 | * | FromDiscord <KingDarBoja> reading it slowly |
20:56:11 | FromDiscord | <KingDarBoja> I mean, it can be, just probably lacking the thinking |
20:56:27 | leorize | Rika: yea I have an idea |
20:56:56 | FromDiscord | <Rika> other than renaming the two fields? ;; |
20:57:02 | * | Vladar quit (Quit: Leaving) |
20:57:19 | FromDiscord | <Rika> maybe ill just take the "rename the two fields" or smth |
20:57:38 | leorize | Rika: use genSym to generate a field that can't be accessed normally, then generate an accessor template that yield it for the fields you'd like |
20:57:57 | FromDiscord | <Rika> oh yeah, macros exist |
20:58:01 | FromDiscord | <Rika> what a big brain |
20:58:10 | FromDiscord | <Rika> forgive me for i am a brainlet |
20:58:31 | leorize | I've seen no one actually attempted that path though |
20:58:33 | FromDiscord | <Rika> ill prolly even just do it manually... |
20:58:49 | Araq | accessor templates are totally a thing |
20:59:27 | * | chapl joined #nim |
21:01:26 | FromDiscord | <7815> can you even link sdl2 statically? i'm getting tons of `__declspec(dllimport)` errors |
21:01:50 | leorize | yes you can |
21:02:07 | leorize | how did you link and what's the full output? |
21:02:16 | Araq | you can also just ship software that consists of more than a single file though |
21:02:44 | Araq | static linking is the new cargo cult |
21:03:05 | FromDiscord | <7815> `--dynlibOverride:SDL2 --passL:-lSDL2` |
21:03:05 | FromDiscord | <7815> libSDL2 is in my directory |
21:03:11 | FromDiscord | <7815> `--dynlibOverride:SDL2 --passL:-lSDL2` |
21:03:11 | FromDiscord | <7815> libSDL2 is in my cwd |
21:03:18 | Araq | number of software I use daily consisting of a single file: 0 |
21:03:20 | FromDiscord | <7815> `--dynlibOverride:SDL2 --passL:-lSDL2` |
21:03:20 | FromDiscord | <7815> libSDL2.a is in my cwd |
21:03:58 | FromDiscord | <7815> araq, i don't think you forcing your ideals on others is a helpful trait for anybody |
21:04:09 | Araq | I'm saving your time |
21:04:19 | Araq | and that's helpful for anybody |
21:04:54 | FromDiscord | <7815> dependencies are certainly fun to deal with |
21:05:11 | Araq | copy sdl.dll next to your .exe, done. |
21:05:13 | * | Senketsu joined #nim |
21:06:44 | FromDiscord | <7815> https://hastebin.com/eyinoxurex.shell |
21:06:58 | inv2004 | zedeus, Do you know what to do with C-header from develop package ? |
21:07:51 | FromDiscord | <Rika> how do i make a fail on compile time? |
21:07:57 | Yardanico | {.error.} |
21:08:09 | FromDiscord | <Rika> okay thanks |
21:08:11 | Yardanico | !eval {.error: "no".} |
21:08:12 | NimBot | Compile failed: /usercode/in.nim(1, 8) Error: no |
21:08:23 | Yardanico | @7815 well if you cross-compile for windows you should have a static version of SDL2 for windows |
21:08:34 | Yardanico | also you need to pass --os:windows |
21:09:40 | FromDiscord | <7815> it links correctly with my zig project |
21:09:46 | Yardanico | well nim is not zig |
21:09:52 | Yardanico | you should also tell nim that you're compiling to windows |
21:10:08 | Yardanico | and in the paste you only tell zig to compile to windows, and nim still thinks you're compiling for linux |
21:11:12 | FromDiscord | <7815> `--os:windows` doesn't stop it from compiling `src\timer\windows\SDL_*.c` |
21:12:29 | FromDiscord | <7815> `--os:windows` doesn't give `src\timer\windows\SDL_*.c` its necessary link symbols... |
21:12:52 | Yardanico | Araq: would you like a relatively short code example for inheritance where --gc:arc is ~5x slower? |
21:13:11 | Araq | Yardanico, ok |
21:13:13 | inv2004 | how to include imported c-header into package? |
21:14:26 | Yardanico | Araq: https://gist.github.com/Yardanico/61384b0fe3a7913eb231cc0c9d3b996a |
21:14:35 | Yardanico | the slowest part there is ppu.mapper.step() |
21:14:48 | Yardanico | (for arc) |
21:15:38 | Yardanico | although it's not so high priority since I think it can be reworked to avoid methods |
21:15:52 | Araq | any idea why it's 5x slower? |
21:16:01 | Yardanico | Araq: because it calls isObj for each step call |
21:16:06 | Yardanico | and isObj calls strstr |
21:16:49 | Yardanico | inv2004: it should work by default, is your header in the src folder too? |
21:16:54 | Yardanico | Araq: https://i.imgur.com/MdMqIki.png there |
21:17:03 | shashlick | @Vindaar: glad to hear |
21:17:08 | shashlick | what were you wrapping |
21:17:13 | shashlick | and which version of nimterop |
21:17:13 | Yardanico | and full c src https://gist.github.com/Yardanico/6173219bfd29544087d055650e13388d |
21:17:36 | inv2004 | @Yardanico, yep, here it is https://github.com/inv2004/kdb_nim |
21:17:51 | inv2004 | I just removed bin in nimble if it matters |
21:18:00 | Araq | Yardanico, 'won't fix'? :P |
21:18:16 | Yardanico | Araq: well I'm really not sure if that's intended behaviour or not :D |
21:18:21 | Araq | but hmm my suspicion was that isObj is fast enough in practice |
21:18:33 | Araq | strstr vs pointer chasing |
21:18:41 | Yardanico | well nimes is using methods in an a bit surprising way |
21:18:59 | Yardanico | for each PPU step or some CPU step it calls a method of a mapper (NES roms can have different mappers) |
21:19:00 | Araq | though the old implementation also was tuned to remember the hot path |
21:19:06 | Yardanico | oh |
21:19:40 | Araq | maybe it's time to embrace VTables |
21:20:04 | FromDiscord | <KingDarBoja> leorize, u around? |
21:22:00 | Yardanico | inv2004: read https://forum.nim-lang.org/t/2668 |
21:22:05 | FromDiscord | <Rika> man this new template thing idea works SWELL |
21:22:09 | Yardanico | https://forum.nim-lang.org/t/2668#22111 |
21:22:58 | inv2004 | @Yardanico, thx |
21:23:01 | Yardanico | also you don't have to do importc, header for every proc |
21:23:11 | Yardanico | you can just do {.push importc, header: "yourheader.h".} |
21:23:24 | Yardanico | importc by default uses the same nim proc name for the relevant C function |
21:24:48 | FromDiscord | <mratsim> Before embracing VTables I want private imports. |
21:24:52 | Yardanico | :P |
21:25:03 | FromDiscord | <mratsim> Having proc public just for testing is so so annoying when refactoring |
21:25:20 | Araq | so write an include file for testing |
21:26:10 | Araq | "I need X to be public for testing" is so far among my top ten of the least convincing issues ever brought up |
21:29:19 | FromDiscord | <mratsim> As I said, include hides generic bugs |
21:30:39 | FromDiscord | <mratsim> This bug is caught with import but not with include: https://github.com/nim-lang/Nim/issues/6387 |
21:30:58 | FromGitter | <Vindaar> @shashlick: I wanted to call a function from the GNU scientific library and thought nimterop might make that easier. It certainly did. |
21:31:02 | FromGitter | <Vindaar> https://github.com/Vindaar/gsl-nim |
21:31:38 | FromGitter | <Vindaar> I'll turn that into a full wrapper when I have a better idea on how to properly use nimterop. |
21:32:34 | FromDiscord | <Rika> ??? |
21:32:34 | FromDiscord | <Rika> https://cdn.discordapp.com/attachments/371759389889003532/706256845517619212/unknown.png |
21:32:39 | FromDiscord | <Rika> oops |
21:32:46 | FromDiscord | <Rika> it says "expected float" |
21:33:07 | Yardanico | show errors from the nim compiler itself :) |
21:33:13 | Yardanico | when compiling |
21:33:13 | FromDiscord | <mratsim> template + return is a recipe for bugs |
21:33:22 | Yardanico | ah you're in a template |
21:33:26 | FromDiscord | <Rika> |
21:33:26 | FromDiscord | <Rika> https://cdn.discordapp.com/attachments/371759389889003532/706257064120418334/unknown.png |
21:33:27 | FromDiscord | <mratsim> you should use a proc, otherwise you will return from the caller |
21:33:27 | * | tane quit (Quit: Leaving) |
21:33:35 | Yardanico | you can't call return in templates |
21:33:38 | FromDiscord | <Rika> i know |
21:33:42 | Yardanico | it'll be inserted as-is to the original proc |
21:33:57 | FromDiscord | <Rika> but im unsure why it wouldnt give me the Duration w/o return |
21:34:00 | FromDiscord | <Rika> which is odd |
21:34:01 | Yardanico | you should remove "return" statements from the template |
21:34:04 | Yardanico | then it might work |
21:34:06 | FromDiscord | <Rika> it just "expects a discard |
21:34:42 | FromDiscord | <mratsim> remove the "return" and replace discard by `@[]` |
21:34:43 | FromDiscord | <Rika> |
21:34:43 | FromDiscord | <Rika> https://cdn.discordapp.com/attachments/371759389889003532/706257388843565107/unknown.png |
21:34:51 | FromDiscord | <Rika> hmm |
21:35:13 | FromDiscord | <Rika> seems good |
21:35:19 | FromDiscord | <Rika> ill runtime error the discard instea |
21:35:26 | Yardanico | you can compile-time error it |
21:35:29 | FromDiscord | <mratsim> also template chaining via method call syntax is buggy because one of the template is not properly triggered |
21:36:02 | FromDiscord | <Rika> compile time erroring it doesnt work i dont think |
21:36:08 | FromDiscord | <mratsim> i.e. holdEndTimes.anyIt might give you undeclared identifier |
21:36:11 | FromDiscord | <Rika> i tried it and it doesnt work |
21:36:19 | Yardanico | what does it say? |
21:36:34 | FromDiscord | <Rika> it just compile time errors no matter correct usage or not |
21:36:37 | FromDiscord | <mratsim> are you writing a Stepmania clone? |
21:36:40 | FromDiscord | <Rika> no |
21:37:18 | Yardanico | @mratsim https://github.com/de-odex/circa |
21:38:08 | FromDiscord | <Rika> i really havent committed in a while |
21:38:22 | FromDiscord | <Rika> because i've been traumatized by git too much |
21:38:42 | Yardanico | well I really see no issue with git even if you do spontaneous commits and stuff like that |
21:38:49 | Yardanico | just commit at the end of the day lol |
21:38:59 | Yardanico | it's still better than not commiting |
21:39:01 | FromDiscord | <Rika> i dont know, im not a fan of not properly using it |
21:39:04 | Yardanico | commits help you discover regressions and stuff |
21:39:26 | FromDiscord | <Rika> if there were a good sourcetree equivalent on linux that isnt gitkraken |
21:39:37 | FromDiscord | <Rika> i'd deffo fix it up right now |
21:39:49 | Yardanico | i don't think it's really hard to use git from terminal for simple commits |
21:39:52 | FromDiscord | <KingDarBoja> Having big brain time trying to figure out object variant simplification lol |
21:39:53 | Yardanico | VSCode has GitLens too btw |
21:40:05 | FromDiscord | <Rika> i can use TUI, not git TUI |
21:40:13 | FromDiscord | <Rika> git subcommand names make 0 sense to me |
21:40:38 | Yardanico | use vscode with gitlens plugin then |
21:40:42 | FromDiscord | <Never Listen To Beef> I tend to use git cli and then use vscode's git tools to ensure im not pushing useless files cause it's a nice easy method imo |
21:40:52 | FromDiscord | <Rika> will do, just installed |
21:41:03 | FromDiscord | <Rika> does it have gitflow stuff? |
21:41:11 | FromDiscord | <Rika> not that i cant do it myself |
21:41:15 | FromDiscord | <KingDarBoja> Gitlens is awesome imo |
21:42:19 | Araq | mratsim: I don't see the connection as the symbol binding rules within generics do not depend on private vs public |
21:45:52 | FromDiscord | <exelotl> "git subcommand names make 0 sense to me" saaaame |
21:46:24 | FromDiscord | <exelotl> been using git for like 7 years now and I still have to google how to do the most basic things |
21:46:34 | FromDiscord | <Rika> struggle of a non-english native i guess? |
21:46:55 | FromDiscord | <exelotl> nah I'm a native speaker |
21:47:03 | FromDiscord | <Rika> :monkaHmm: |
21:47:31 | FromDiscord | <exelotl> it's actually ridiculous how bad the interface is |
21:49:49 | * | zacharyc1rter quit (Ping timeout: 246 seconds) |
21:50:20 | * | zacharycarter quit (Ping timeout: 272 seconds) |
21:55:38 | FromDiscord | <KingDarBoja> lol |
21:59:47 | Araq | exelotl: but it's pretty simple, 'git checkout' does everything ;-) |
22:00:32 | Araq | for a system created by a guy who cannot stand GCs or overloading git's commands are surprisingly overloaded and git also has a GC... |
22:00:38 | FromDiscord | <Rika> i cant seem to stage a folder for some reason... |
22:02:39 | * | Senketsu quit (Quit: WeeChat 2.8) |
22:05:58 | FromDiscord | <Never Listen To Beef> I mean linus started git, he went pretty hands off rather quickly from my understanding |
22:07:46 | * | nsf quit (Quit: WeeChat 2.8) |
22:08:30 | FromDiscord | <Never Listen To Beef> No clue when the GC was implemented so my point is irrelevant yes |
22:12:45 | leorize | to be fair, linus is not that against a gc |
22:12:52 | leorize | the kernel have a gc itself |
22:13:24 | leorize | KingDarBoja: you called? |
22:14:01 | Araq | leorize, which kind of GC does the kernel have? |
22:14:24 | Araq | so ... number of showstopper bugs: 0 :-) |
22:14:41 | leorize | simple ref counting the last time I checked |
22:14:55 | Araq | leorize, doesn't count |
22:15:16 | Yardanico | Araq: new 1.2 release soon? :P |
22:15:33 | leorize | 1.4 when? :P |
22:15:52 | Araq | Yardanico, who knows. maybe we should make 'koch boot --gc:orc' work and release 1.4 |
22:15:58 | supakeen | gc:orc |
22:16:00 | supakeen | mrm |
22:16:04 | supakeen | i like it |
22:16:10 | FromDiscord | <KingDarBoja> Yeah, was going to ask something but I think I got it |
22:16:15 | FromDiscord | <KingDarBoja> The idea of simplify stuff |
22:16:18 | shashlick | @Vindaar: awesome - let me know when you need any help with nimterop |
22:16:35 | shashlick | And feedback obviously to make it easier to get up to speed |
22:17:02 | FromDiscord | <KingDarBoja> Instead of specifying the node kind on some child, I just put the base type |
22:17:10 | FromDiscord | <Rika> haa, pushed to temp-all branch now |
22:17:16 | FromDiscord | <KingDarBoja> `Node` and let the proc handle the leaf kind 🤔 |
22:17:45 | Yardanico | in the meantime I guess I'll fork nimes and replace inheritance with something else + use computedGoto for CPU opcodes to possibly speed it up even more (right now it uses an array of procedures, I guess that's already quite fast) |
22:18:09 | Araq | embrace computedGoto |
22:18:23 | Yardanico | yeah it's a very cool optimization |
22:18:26 | FromGitter | <Vindaar> @shashlick: Thanks, will do! |
22:18:49 | Yardanico | but why nim vm has it disabled? :P https://github.com/nim-lang/Nim/blob/devel/compiler/vm.nim#L543 |
22:19:13 | leorize | Yardanico: have you reported the async bug with gc:orc for the irc module? |
22:19:22 | Yardanico | leorize: it turns out it's a bug with sink inference |
22:19:28 | Yardanico | not gc:arc or gc:orc themselves |
22:19:32 | Yardanico | it works with --sinkInference:off |
22:19:43 | leorize | so... did you report it? :P |
22:20:14 | Yardanico | no, actually lemme try to run it again, who knows, maybe it was solved by #14183 |
22:21:54 | Yardanico | btw what happened with disbot? :P |
22:22:01 | Yardanico | it doesn't reference PRs now |
22:22:09 | leorize | it bugs out once in awhile |
22:22:13 | leorize | ping disruptek I guess |
22:22:35 | Araq | disbot was built with --gc:arc, that's why :-) |
22:23:06 | Yardanico | well it's async, doesn't it leak memory this way |
22:23:31 | Yardanico | also yeah, irc module doesn't work in async mode with gc:orc, works with sink inference disabled |
22:23:35 | Yardanico | although the error is different than before |
22:23:46 | Araq | well we'll soon build it with orc |
22:24:20 | leorize | guess you should report that bug now so we can tackle it |
22:24:27 | Araq | Yardanico, produce a reduced test case please, it really speeds up our development |
22:24:35 | Yardanico | well I'll try :P |
22:24:41 | Yardanico | irc module itself is ~700 loc |
22:24:57 | Araq | lol but async is a big lib |
22:25:02 | Yardanico | ah xd |
22:25:06 | Araq | anyhow, good night |
22:25:09 | Yardanico | good night |
22:25:19 | leorize | g'night |
22:25:39 | * | Hexeratops quit (Quit: Take care :)) |
22:26:05 | leorize | why does fork() on linux have to be so ridiculously inefficient... |
22:26:51 | * | inv2004 quit (Read error: Connection reset by peer) |
22:32:09 | FromDiscord | <Rika> huh, what does "expression has no address" mean now... |
22:33:04 | leorize | that means you're trying to take an address of a const |
22:35:29 | FromDiscord | <Rika> but im not? |
22:35:31 | FromDiscord | <Rika> hm |
22:36:15 | leorize | can I see the code? |
22:36:40 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2kwB |
22:36:57 | FromDiscord | <Rika> error at `case` |
22:37:25 | FromDiscord | <Generic> that is an unfortunate short coming |
22:37:25 | leorize | can I have the typedef too? |
22:37:59 | FromDiscord | <Generic> https://github.com/nim-lang/Nim/issues/13033 |
22:38:01 | leorize | though this is probably just due to the `var` thingy |
22:38:33 | leorize | try result = |
22:38:36 | leorize | should work |
22:39:11 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2kwD |
22:39:31 | FromDiscord | <Rika> bah, the result fixed it |
22:40:09 | FromDiscord | <Rika> i see |
22:40:39 | leorize | can you merge maniaIndividual and maniaOverall? |
22:41:01 | leorize | the diff seems to be the column thingy only :P |
22:41:48 | leorize | though I'm for certain don't understand how this code work or what it's used for |
22:42:07 | leorize | why does this look like an osu! parser :P |
22:42:30 | FromDiscord | <Rika> it is. |
22:44:58 | FromDiscord | <KingDarBoja> 😄 |
22:45:08 | FromDiscord | <KingDarBoja> From desperation comes innovation |
22:45:26 | * | solitudesf quit (Ping timeout: 272 seconds) |
22:46:54 | leorize | well I still don't understand osu! beatmaps so I can't say much about this code :P |
22:46:55 | FromDiscord | <Rika> leorize: maniaIndividual and maniaOverall are totally separate |
22:47:17 | FromDiscord | <Rika> this isnt parsing the beatmap its the difficulty calculation code |
22:47:29 | FromDiscord | <Rika> im still having difficulty converting the heavy OOP of C# |
22:47:55 | leorize | I don't know how the game work is the point actually :P |
22:48:21 | FromDiscord | <Rika> i see |
22:48:52 | FromDiscord | <Rika> i still dont know if this code will work |
22:49:50 | Yardanico | ok I started minimizing it, now I managed to use expandMacros to get output of the async macro stuff |
22:49:57 | Yardanico | and yes I managed to compile it after removing tons of `gensym things |
22:53:46 | Yardanico | right now it's 600 lines but at least it only needs asyncdispatch for the dispatcher and asyncfutures for futures, now I need to start removing functionality :P |
22:55:46 | Yardanico | compiled C is 6.4k lines though |
22:56:27 | FromDiscord | <KingDarBoja> I am mixing OOP with object variants |
22:56:30 | FromDiscord | <KingDarBoja> and so far, so good |
22:56:40 | FromDiscord | <KingDarBoja> Using it to group leaf types |
22:56:52 | FromDiscord | <KingDarBoja> And OOP to keep parent types inherit from a single base |
22:57:34 | FromDiscord | <KingDarBoja> Also, I noticed I can't declared shared fields using multiple kinds on same case then another different for a specific field |
22:57:37 | FromDiscord | <KingDarBoja> 🤔 |
22:58:01 | Yardanico | https://github.com/nim-lang/RFCs/issues/19 |
22:58:23 | FromDiscord | <KingDarBoja> Yeah I saw that |
22:59:21 | * | chapl left #nim (#nim) |
22:59:30 | FromDiscord | <KingDarBoja> https://github.com/nim-lang/RFCs/issues/19#issuecomment-173529871 this comment is what I am looking for |
22:59:34 | FromDiscord | <KingDarBoja> But still RFC 😢 |
23:01:50 | FromDiscord | <KingDarBoja> https://imgur.com/4met1K4 pretty much had to use a different name for that |
23:02:33 | FromDiscord | <KingDarBoja> But after running the test, I will get an error as I am trying to access `value` on `IntValueNode` |
23:02:50 | FromDiscord | <KingDarBoja> But the funny thing is that the terminal doesn't point me to the error :S |
23:09:41 | FromDiscord | <bedwardly-down> Not even with —verbose flag on? |
23:09:55 | FromDiscord | <KingDarBoja> Had no idea about that flag |
23:09:57 | FromDiscord | <KingDarBoja> Let me try |
23:10:04 | FromDiscord | <KingDarBoja> `nimble tests --verbose` ? |
23:10:17 | FromDiscord | <bedwardly-down> Should be |
23:10:23 | FromDiscord | <KingDarBoja> Nope |
23:10:54 | FromDiscord | <bedwardly-down> I’m not able to test but nimble —verbose c *somenimfile* works for me |
23:11:12 | FromDiscord | <bedwardly-down> That stinks. |
23:11:40 | FromDiscord | <KingDarBoja> I have defined it like `exec "nim c -r tests/language/test_parser"` on my packageName.nimble file |
23:14:13 | FromDiscord | <KingDarBoja> @bedwardly-down your approach works |
23:14:15 | FromDiscord | <KingDarBoja> Thank you 🙂 |
23:14:37 | FromDiscord | <KingDarBoja> `Error: undeclared field: 'strValue' for type ast.NameNode` this is what I was looking for |
23:15:17 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
23:15:26 | FromDiscord | <bedwardly-down> Depending on what system you’re on, you could possibly create an alias for your shell where nim and nimble always run with that flag on when you call them |
23:15:56 | FromDiscord | <KingDarBoja> I use Windows |
23:16:03 | * | pbb joined #nim |
23:16:09 | FromDiscord | <KingDarBoja> All my tests are defined at the .nimble file with the above script |
23:16:47 | FromDiscord | <bedwardly-down> Using Powershell, you could possibly do the same. I’m just not sure on specifics there |
23:19:01 | FromDiscord | <KingDarBoja> using `nimble test --verbose` works lol |
23:19:08 | FromDiscord | <KingDarBoja> I had a typo |
23:19:51 | FromDiscord | <bedwardly-down> Did you put 1 - instead of 2? |
23:22:49 | * | zacharyc1rter joined #nim |
23:22:49 | * | zacharycarter joined #nim |
23:23:49 | FromDiscord | <KingDarBoja> It is 1 by default |
23:32:33 | * | Trustable quit (Remote host closed the connection) |
23:42:25 | * | stefantalpalaru quit (Changing host) |
23:42:25 | * | stefantalpalaru joined #nim |
23:46:50 | * | nim669 joined #nim |
23:47:21 | * | nim669 quit (Client Quit) |
23:49:25 | FromDiscord | <Rika> can i make an object variant based on a field of a field? i know the answer's pretty much no, but i'd like to know of alternatives |
23:49:27 | FromDiscord | <bedwardly-down> For -v in most apps yeah |
23:49:39 | Yardanico | ? |
23:49:54 | FromDiscord | <bedwardly-down> @KingDarBoja |
23:50:09 | Yardanico | "object variant based on a field of a field" the only way to know that is to embed the other object variant in your own object variant if I understood you correctly |
23:50:14 | Yardanico | show code :P |
23:50:17 | FromDiscord | <KingDarBoja> Wait |
23:50:36 | FromDiscord | <KingDarBoja> Object variant based on a filed of a field ? Nested? |
23:51:00 | FromDiscord | <Rika> one moment |
23:51:30 | FromDiscord | <bedwardly-down> How deep can you even go with that anyway? |
23:53:49 | FromDiscord | <KingDarBoja> Deeper as long as you don't need previous object variant kinds |
23:54:06 | FromDiscord | <Rika> something like this? https://play.nim-lang.org/#ix=2kx0 |
23:55:23 | Yardanico | yeah as I said the only way for that is to embed modeHitObject definition inside of your DifficultyHitObject |
23:56:06 | FromDiscord | <Rika> but theyre separate objects |
23:56:21 | Yardanico | then no |
23:56:41 | FromDiscord | <Rika> okay |
23:57:56 | * | krux02_ joined #nim |