00:01:15 | FromDiscord | <Rika> so is `|` a compatibility thing |
00:04:13 | shashlick | @zacharycarter figured that convertor out? |
00:13:00 | zacharycarter | shashlick: I ended up just overloading `[]=` and `[]` for that type |
00:13:12 | zacharycarter | couldn't figure out the converter |
00:15:21 | FromDiscord | <KingDarBoja> Just tested the `or` and looks like it will asign the type to the parameter on the call but then if I use a if-else statement to cast, it will throw an error |
00:17:33 | FromDiscord | <KingDarBoja> Hold a second, I will attach a pic |
00:17:39 | FromDiscord | <KingDarBoja> https://imgur.com/a/Prl8c88 |
00:25:27 | FromDiscord | <konsumlamm> ```nim |
00:25:28 | FromDiscord | <konsumlamm> proc test[T](x: T) = discard |
00:25:28 | FromDiscord | <konsumlamm> |
00:25:28 | FromDiscord | <konsumlamm> test[12](42) |
00:25:28 | FromDiscord | <konsumlamm> ``` |
00:25:32 | FromDiscord | <konsumlamm> ok, why does this work? |
00:29:57 | * | abm quit (Read error: Connection reset by peer) |
00:34:07 | FromDiscord | <KingDarBoja> idk |
00:34:28 | FromDiscord | <KingDarBoja> Maybe it discard as does return nothing |
00:36:53 | FromDiscord | <konsumlamm> ? |
00:37:15 | FromDiscord | <konsumlamm> im confused because i can pass 12 as type and 42 as argument |
00:37:32 | * | Jjp137 quit (Ping timeout: 256 seconds) |
00:38:16 | FromDiscord | <KingDarBoja> Ah, you mean that.... probably the compiler is guessing the type according to the type value |
00:38:43 | FromDiscord | <konsumlamm> ye, but why does it accept 12 as type parameter then? |
00:40:19 | * | Jjp137 joined #nim |
00:41:56 | FromDiscord | <Benumbed> Because both 12 and 42 are of type `int` |
00:42:13 | FromDiscord | <KingDarBoja> Ah, found my error, it should be `when` not `if` |
00:42:22 | FromDiscord | <Benumbed> I imagine if you tried `proc test["foo"](42)` it would fail |
00:44:31 | FromDiscord | <Benumbed> @konsumlamm For the record you don't need that [12], `test(42)` is equivalent |
00:44:35 | FromDiscord | <konsumlamm> youre right |
00:44:47 | FromDiscord | <konsumlamm> ik that i dont need it, im just confused that it works |
00:44:50 | FromDiscord | <Benumbed> The compiler infers the type `T` refers to from the `x` argument |
00:45:08 | FromDiscord | <Benumbed> π Β―\_(γ)_/Β― |
00:45:29 | FromDiscord | <konsumlamm> why does the compiler accept an instance of a type when it actually should be a type? |
00:45:38 | FromDiscord | <Benumbed> I think there's probably meta stuff where you could potentially use that? But I haven't looked that closely into it yet |
00:46:10 | FromDiscord | <Benumbed> Because an instance of a type is still typed? The compiler knows what the underlying type of that 12 is |
00:46:21 | * | brainproxy joined #nim |
00:47:19 | FromDiscord | <Benumbed> May just be because sugar, I dunno there, maybe disruptek would know, they seem pretty knowledgeable of Nim internals |
00:48:02 | FromDiscord | <Benumbed> There are other core devs over on IRC, but I forget their handles, disruptek was just the loudest when I was asking lots of questions π |
00:52:32 | * | sleepyqt quit (Ping timeout: 265 seconds) |
00:56:48 | * | uu91 quit (Read error: Connection reset by peer) |
00:57:11 | * | uu91 joined #nim |
00:58:30 | FromDiscord | <KingDarBoja> Jummm, trying to figure out if it is possible to pass a procedure to another procedure without triggering its logic. That means, not returning the value while being passed to the other proc and instead, trigger it once it is inside |
00:59:37 | FromDiscord | <konsumlamm> just pass it as an argument? |
00:59:47 | FromDiscord | <Benumbed> ^ |
01:00:17 | FromDiscord | <KingDarBoja> That's what I did |
01:00:39 | FromDiscord | <Benumbed> Did you read https://nim-lang.org/docs/manual.html#types-procedural-type in the manual? |
01:00:57 | FromDiscord | <KingDarBoja> Nope |
01:01:00 | FromDiscord | <Benumbed> That explains how to do what you're talking about |
01:05:29 | FromDiscord | <KingDarBoja> I got very confused reading that |
01:05:34 | FromDiscord | <KingDarBoja> The key is `{.closure.}` ? |
01:06:09 | FromDiscord | <Benumbed> no, the key is the `proc(someArg: someType)` |
01:06:25 | FromDiscord | <Benumbed> That's actually a type |
01:06:28 | FromDiscord | <konsumlamm> that pragma is just a calling convention |
01:06:29 | FromDiscord | <Benumbed> like an int or a string |
01:07:32 | FromDiscord | <Benumbed> So you should have a proc definition that looks like `proc someProc(firstArg: string, callback: proc(someArg: someType))` |
01:08:35 | FromDiscord | <KingDarBoja> without the return type of the proc being passed? |
01:08:41 | FromDiscord | <Benumbed> and then you'd pass your external proc in as `someProc("foo", yourProcNameHere)` |
01:08:53 | * | uu91 quit (Read error: Connection reset by peer) |
01:09:04 | * | uu91 joined #nim |
01:09:14 | FromDiscord | <Benumbed> No, if you have a return type, it needs to be in the type definition too, I just didn't use a return type for brevity |
01:09:35 | FromDiscord | <KingDarBoja> ok |
01:09:49 | FromDiscord | <Benumbed> `proc someProc(firstArg: string, callback: proc(someArg: someType):returnType)` |
01:10:17 | FromDiscord | <KingDarBoja> Done... but now getting error |
01:11:00 | FromDiscord | <KingDarBoja> "type mismatch: got <seq[proc (self: Parser): MyGenericType{.closure.}]> but expected 'seq[MyGenericType]'" while trying to trigger the proc inside a seq |
01:11:43 | FromDiscord | <KingDarBoja> Wait a second |
01:12:17 | FromDiscord | <KingDarBoja> https://imgur.com/gLHDDpj Left side is the proc and the right one the call of that procedure |
01:14:05 | FromDiscord | <konsumlamm> you have to call the proc |
01:14:18 | FromDiscord | <konsumlamm> `parseProc(self)` |
01:14:20 | FromDiscord | <konsumlamm> like this |
01:15:54 | FromDiscord | <Benumbed> They probably are calling it elsewhere, the stuff on the left is just building a dispatch list |
01:17:16 | FromDiscord | <Benumbed> Oh I see the problem |
01:17:19 | * | crem quit (Ping timeout: 252 seconds) |
01:17:27 | FromDiscord | <Benumbed> You can't do `seq[T]` |
01:17:41 | FromDiscord | <Benumbed> You're assigning a procedural type to the sequence, not the return value |
01:18:03 | FromDiscord | <Benumbed> you'd have to do `seq[proc(self: Parser):T]` |
01:18:20 | * | crem joined #nim |
01:18:20 | * | kotrcka joined #nim |
01:18:28 | FromDiscord | <Benumbed> Although I'm not quite sure why you're adding it twice π |
01:18:33 | FromDiscord | <konsumlamm> i assume they actually want a `seq[T]` and just didnt call the proc |
01:18:39 | * | uu91 quit (Read error: Connection reset by peer) |
01:18:52 | FromDiscord | <Benumbed> Good point, no idea |
01:19:04 | * | uu91 joined #nim |
01:19:09 | FromDiscord | <KingDarBoja> Neither I am sure why it got called twice on source code (Python) |
01:19:38 | FromDiscord | <Benumbed> Can you link to the Python source? |
01:19:54 | FromDiscord | <KingDarBoja> Sure! |
01:20:03 | FromDiscord | <Benumbed> May be easier for us to help you if we see what you're porting from |
01:20:07 | * | chemist69 quit (Ping timeout: 272 seconds) |
01:20:12 | * | uu91 quit (Read error: Connection reset by peer) |
01:20:51 | FromDiscord | <KingDarBoja> https://github.com/graphql-python/graphql-core/blob/master/src/graphql/language/parser.py#L1074 |
01:21:21 | * | uu91 joined #nim |
01:21:32 | * | chemist69 joined #nim |
01:21:36 | FromDiscord | <Benumbed> I continue to be uncertain whether I love or hate type-hinting in Python |
01:22:38 | FromDiscord | <Benumbed> Yeah @KingDarBoja They're calling the method not storing it, @konsumlamm was correct |
01:22:48 | FromDiscord | <Benumbed> you're trying to store it as the code stands |
01:23:01 | FromDiscord | <Benumbed> Need to call the proc |
01:23:18 | FromDiscord | <KingDarBoja> I assumed it was being called inside the other proc |
01:23:39 | FromDiscord | <KingDarBoja> But wasn't sure how it was the proper approach |
01:24:21 | FromDiscord | <Benumbed> No you need to call it within manyNode on both lines that reference it |
01:24:42 | FromDiscord | <KingDarBoja> like @konsumlamm said? right? |
01:24:46 | FromDiscord | <Benumbed> yep |
01:25:48 | * | ryan_ joined #nim |
01:26:52 | FromDiscord | <KingDarBoja> Okay, did that but still an error, I will share another pic, please forgive me if asking too much |
01:27:10 | FromDiscord | <KingDarBoja> https://imgur.com/RiDpF3Q |
01:27:52 | * | ryan_ is now known as number_one |
01:29:12 | FromDiscord | <Benumbed> Um, Not sure what you're up to with `[:DefinitionNode]` there but I think that's your problem |
01:29:19 | * | Tlongir quit (Ping timeout: 250 seconds) |
01:29:28 | FromDiscord | <Rika> That's the generic brackets thing |
01:29:43 | FromDiscord | <Rika> You need a colon at the start for it to work with method style syntax |
01:30:05 | FromDiscord | <Benumbed> I have not encountered that yet |
01:30:06 | FromDiscord | <KingDarBoja> Yup, what Rika sensei said |
01:30:16 | FromDiscord | <Rika> Suddenly Japanese word usage |
01:30:53 | FromDiscord | <Benumbed> Well I have no ideas at this point because I know nothing of the `generic brackets thing` π |
01:31:05 | * | FromDiscord <KingDarBoja> RIP |
01:31:59 | FromDiscord | <KingDarBoja> > I continue to be uncertain whether I love or hate type-hinting in Python |
01:32:15 | FromDiscord | <Rika> I hate dynamic languages because of python |
01:32:20 | FromDiscord | <KingDarBoja> I love it because it annoys me trying to guess the type everytime I declare a variable and later reasign it |
01:32:33 | FromDiscord | <KingDarBoja> And TypeScript is somewhat the same stuff on JS |
01:32:48 | FromDiscord | <KingDarBoja> Feels like C#-Script |
01:33:29 | FromDiscord | <Benumbed> @Rika You must β€οΈβ€οΈβ€οΈ JavaScript then π |
01:33:53 | FromDiscord | <Rika> γ΄γ |
01:34:03 | * | FromDiscord <KingDarBoja> Yamete Kudasai |
01:34:13 | FromDiscord | <Benumbed> Python is downright pleasant compared to JavaScript, which I, sadly, have been forced into at work |
01:34:21 | FromDiscord | <KingDarBoja> Well let's keep on the topic, I am stuck xD |
01:34:21 | FromDiscord | <Rika> Types riot? |
01:34:23 | FromDiscord | <Rika> Ugh |
01:34:26 | FromDiscord | <Rika> Typescript |
01:34:30 | FromDiscord | <Benumbed> But in these times, a steady job is a steady job |
01:34:36 | FromDiscord | <Rika> Thanks SwiftKey lmao |
01:34:52 | FromDiscord | <Rika> @KingDarBoja can you run the code so I can see the error message better lol |
01:34:53 | FromDiscord | <KingDarBoja> I use both Python and TypeScript at my job |
01:35:03 | FromDiscord | <Rika> I don't got a job |
01:35:22 | FromDiscord | <KingDarBoja> Error: type mismatch: got <Parser, TokenKind, DefinitionNode, TokenKind> |
01:35:22 | FromDiscord | <KingDarBoja> but expected one of: |
01:35:22 | FromDiscord | <KingDarBoja> proc (self: Parser, openKind: TokenKind, parseProc: proc (self: Parser): DefinitionNode{.closure.}, closeKind: TokenKind): seq[DefinitionNode]{.noSideEffect, gcsafe, locks: <unknown>.} |
01:35:22 | FromDiscord | <Benumbed> I'm most likely going to be furloughed in the next month myself :/ |
01:35:27 | FromDiscord | <KingDarBoja> There you go mate |
01:35:51 | FromDiscord | <KingDarBoja> I hate my job, not because what I do but because my boss |
01:36:41 | FromDiscord | <KingDarBoja> Tired of having to report everything I am doing besides having a software which takes screenshots every time I want to work on... and also "computes" my perfomance |
01:37:40 | leorize | KingDarBoja: looks like you're having trouble separating functions call and functions as a value |
01:38:12 | leorize | so here's the rule: function name without arguments and/or `()` = a value |
01:38:16 | leorize | otherwise it's a call |
01:42:18 | * | lritter quit (Ping timeout: 256 seconds) |
01:42:55 | FromDiscord | <KingDarBoja> So everytime I do `self.myProc()` it is a value? |
01:42:57 | * | lritter joined #nim |
01:43:25 | FromDiscord | <Benumbed> Well it will run the proc and return a value |
01:43:34 | leorize | @KingDarBoja: reread the text again :P |
01:43:40 | FromDiscord | <Benumbed> `self.myProc` without the () is a value |
01:43:48 | leorize | that's still not a value fwiw |
01:44:00 | FromDiscord | <Rika> `aProc` is a value function, `aProc()` is a called function |
01:44:00 | leorize | unless myProc is just a field |
01:44:11 | leorize | but I don't have the context here |
01:44:21 | FromDiscord | <Benumbed> Well yeah, it's techically a function pointer |
01:45:38 | FromDiscord | <KingDarBoja> -> function name without arguments and/or () = a value, i.e. `self.myProc(someArg)` ? |
01:45:50 | leorize | **without** |
01:46:02 | FromDiscord | <KingDarBoja> Ah |
01:48:49 | * | lritter quit (Ping timeout: 264 seconds) |
01:54:06 | FromDiscord | <KingDarBoja> So a **function call** is only the proc with arguments, like `self.myProc(someArg)` |
01:55:07 | FromDiscord | <KingDarBoja> Whereas the **function value** is the proc without arguments and/or "()", like `myProc` |
01:55:45 | FromDiscord | <KingDarBoja> Right? |
01:55:50 | FromDiscord | <Rika> yes |
01:56:04 | FromDiscord | <Rika> note that `self.myProc` is a **function call** since self is an argument |
01:56:25 | FromDiscord | <KingDarBoja> Yeah, I was confused by the self itself |
01:56:34 | FromDiscord | <Rika> of course, this is given that `myProc` is a ***proc*** and not a ***field that takes a proc*** |
01:58:06 | FromDiscord | <KingDarBoja> So that leads me to this question -> https://github.com/graphql-python/graphql-core/blob/master/src/graphql/language/parser.py#L434 This "partial" on Python performs a **function value** but pass the argument without making it a **function value**, right? If that's the case, is there a equivalent on Nim? |
01:58:19 | * | FromDiscord <KingDarBoja> My brain is getting overloaded |
01:58:44 | FromDiscord | <Rika> okay so partial |
01:58:48 | leorize | a closure |
01:58:53 | FromDiscord | <Rika> partial takes a function value, then returns a function value |
01:59:49 | FromDiscord | <Rika> so lets say this is passed to (next message): ```proc(a: int, b: int): int``` |
02:00:01 | FromDiscord | <Rika> ```partial(thatProc, 2)``` |
02:00:25 | FromDiscord | <Rika> partial then returns a ```proc(b: int): int```, and `a` now assumes 2 always |
02:01:32 | FromDiscord | <Rika> this is a very FP style thing so i dont think nim has it |
02:02:34 | FromDiscord | <KingDarBoja> Owwww |
02:02:48 | FromDiscord | <Rika> was my explanation good? |
02:03:07 | * | endragor joined #nim |
02:03:14 | FromDiscord | <KingDarBoja> Yeah, I knew that on Python, my question sounded like I didn't |
02:03:34 | FromDiscord | <KingDarBoja> The real question was if that's the case, Nim equivalent is? |
02:04:15 | FromDiscord | <KingDarBoja> Of course I don't expect the answer now but I am worried as now I am needing that lol |
02:04:49 | FromDiscord | <Rika> ```let newProc = do (proc arguments) -> return type: theProc(all arguments, w/ the applied and the nonapplied)``` is what i would do |
02:06:27 | FromDiscord | <KingDarBoja> Pass it like a pipe to another proc which returns a proc? |
02:08:17 | FromDiscord | <Rika> uh no, make a new proc that just uses the old proc w/ whichever filled in values you want |
02:08:42 | FromDiscord | <Rika> ok so with the old example it would be |
02:09:08 | FromDiscord | <Rika> ```let newProc = do (b: int) -> int: theProc(2, b)``` |
02:09:53 | FromDiscord | <Rika> it can also be ```let newProc = proc(b: int): int = theProc(2, b)``` i think... |
02:11:00 | * | endragor quit (Remote host closed the connection) |
02:13:11 | FromDiscord | <KingDarBoja> So in my case, would be self as argument and "isConst" as fixed value (true in this case) |
02:13:40 | * | krux02_ quit (Remote host closed the connection) |
02:14:00 | FromDiscord | <Rika> i guess eyah |
02:14:02 | FromDiscord | <Rika> yeah |
02:15:31 | FromDiscord | <KingDarBoja> "let partialValueLiteral = do (self: Parser) -> ValueNode: parseValueLiteral(self, true)" |
02:15:42 | FromDiscord | <Rika> basically yes |
02:15:46 | FromDiscord | <KingDarBoja> But getting "expression expected, but found 'keyword do'" |
02:15:48 | FromDiscord | <KingDarBoja> wtf |
02:15:52 | FromDiscord | <Rika> oh |
02:15:57 | FromDiscord | <Rika> i think do syntax needs a proc... |
02:16:00 | FromDiscord | <Rika> use the other one i sent |
02:16:16 | FromDiscord | <KingDarBoja> Ok |
02:16:38 | FromDiscord | <KingDarBoja> Ok, no error on that syntax |
02:18:49 | FromDiscord | <KingDarBoja> DUDE |
02:18:52 | FromDiscord | <KingDarBoja> I LOVE YOU |
02:18:52 | FromDiscord | <KingDarBoja> β€οΈ |
02:19:04 | FromDiscord | <KingDarBoja> Thanks all π π Manage to make it work (the test is passing now |
02:21:18 | leorize | partial is not really a thing in nim the people do afaik |
02:26:23 | FromDiscord | <KingDarBoja> I see... |
02:28:11 | FromDiscord | <eliezedeck> Good morning everyone |
02:33:15 | * | muffindrake quit (Ping timeout: 265 seconds) |
02:35:03 | * | muffindrake joined #nim |
02:36:29 | * | endragor joined #nim |
02:44:28 | * | endragor quit (Remote host closed the connection) |
02:47:40 | FromDiscord | <konsumlamm> ```nim |
02:47:40 | FromDiscord | <konsumlamm> proc test[T](x: T) = discard |
02:47:40 | FromDiscord | <konsumlamm> |
02:47:41 | FromDiscord | <konsumlamm> test[12](42) |
02:47:41 | FromDiscord | <konsumlamm> ``` |
02:48:35 | FromDiscord | <konsumlamm> i think i kinda get why this works |
02:48:42 | FromDiscord | <konsumlamm> but *why* |
02:48:56 | FromDiscord | <konsumlamm> like, whats the reasoning for this design? |
02:49:09 | FromDiscord | <konsumlamm> why isnt this an error? |
02:49:25 | number_one | Doesn't it derive the type T from the int literal? |
02:50:52 | * | zacharycarter quit (Ping timeout: 256 seconds) |
02:52:55 | FromDiscord | <konsumlamm> my question is not how it works, but rather why it isnt an error |
02:55:57 | FromDiscord | <eliezedeck> intersting |
02:59:59 | FromDiscord | <eliezedeck> it's good that the compiler can infer all sorts of thing, but here, it shouldn't try to derive for the sake of correctness ... imagine `test["hitman"](47)` ... now, it looks as if one would like to access an array that contains an element of `proc(v: int)` type and calls it ... total confusion |
03:00:50 | FromDiscord | <konsumlamm> `test["hitman"](47)` doesnt work actually, it only works when the generic parameter has the same type as the argument |
03:00:54 | FromDiscord | <eliezedeck> @konsumlamm I would suggest you report this as a bug |
03:01:07 | FromDiscord | <eliezedeck> oh, right .. but still |
03:01:26 | FromDiscord | <konsumlamm> will do Β―\\_(γ)\_/Β― |
03:01:53 | * | ryukoposting joined #nim |
03:03:11 | ryukoposting | figured out why my VN engine is so memory hungry. Every time I push the game state (which happens pretty regularly, so you can move backwards and forwards in the script), it's like 50MB of stuff lmao |
03:03:13 | FromDiscord | <eliezedeck> so, `test["hitman"]("fourty seven")` would then work, right? |
03:03:16 | * | endragor joined #nim |
03:03:23 | FromDiscord | <konsumlamm> mhm |
03:04:13 | FromDiscord | <eliezedeck> and that is still confusion |
03:16:17 | FromDiscord | <Rika> ryukoposting: maybe consider using a ref for that lmao |
03:17:36 | * | nsf joined #nim |
03:21:05 | * | chemist69 quit (Ping timeout: 272 seconds) |
03:21:58 | * | chemist69 joined #nim |
03:23:55 | * | zacharycarter joined #nim |
03:39:36 | number_one | Hey guys, am I doing exceptions wrong? Shouldn't this code be raising an EOFError and not an IOError? https://play.nim-lang.org/ |
03:39:40 | number_one | One sec, sorry |
03:39:48 | number_one | https://play.nim-lang.org/#ix=2h1p |
03:42:27 | leorize | wait, we have EOFError? |
03:42:45 | leorize | well the problem is simple, EOFError inherits from IOError |
03:42:55 | leorize | so the branch for IOError catches first |
03:44:47 | * | zacharycarter quit (Ping timeout: 265 seconds) |
03:46:07 | number_one | Ah, wow! |
03:46:10 | number_one | Thanks |
03:50:13 | companion_cube | seems like this would deserve a warning? |
03:50:19 | companion_cube | ("unreachable case") |
03:51:01 | * | zacharycarter joined #nim |
03:55:21 | * | zacharycarter quit (Ping timeout: 250 seconds) |
04:01:48 | ryukoposting | aaayy, proper image caching took idle memory usage from 900 MB to 460 MB |
04:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:11 | * | rockcavera quit (Remote host closed the connection) |
04:06:46 | * | supakeen joined #nim |
04:34:44 | * | whaletechno quit (Remote host closed the connection) |
04:35:01 | * | whaletechno joined #nim |
04:40:21 | leorize | companion_cube: feel free to open an issue for that :) |
04:45:02 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:53:02 | * | brainproxy quit (Ping timeout: 256 seconds) |
04:54:17 | * | narimiran joined #nim |
05:22:33 | * | brainproxy joined #nim |
05:28:48 | * | brainproxy quit (Ping timeout: 256 seconds) |
05:41:31 | number_one | hey guys, is it possible to ask the compiler to override the version of linenoise wrapped in the nim stdlib with a custom version when compiling a file? |
05:41:41 | * | zacharycarter joined #nim |
05:42:17 | leorize | no, sorry |
05:46:35 | * | zacharycarter quit (Ping timeout: 265 seconds) |
06:10:23 | * | kenran joined #nim |
06:12:02 | * | solitudesf joined #nim |
06:28:07 | wgetch | is there a way to inspect the type of a proc call generated by a macro? |
06:29:12 | * | nekits quit (Remote host closed the connection) |
06:36:45 | FromDiscord | <Rika> you can inspect the output of a macro with expandMacros |
06:36:50 | FromDiscord | <Rika> if thats what you need |
06:41:40 | * | gour joined #nim |
06:54:55 | * | dddddd quit (Remote host closed the connection) |
06:56:14 | * | andinus joined #nim |
06:59:39 | * | filcuc joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:00:18 | * | andinus left #nim (#nim) |
07:00:37 | * | endragor_ joined #nim |
07:02:35 | wgetch | that did end up getting me exactly what I needed! thank you |
07:02:52 | * | endragor quit (Ping timeout: 256 seconds) |
07:03:26 | * | onionhammer quit (Ping timeout: 256 seconds) |
07:03:53 | * | onionhammer joined #nim |
07:04:42 | * | gmpreussner joined #nim |
07:18:49 | * | brainproxy joined #nim |
07:22:00 | * | PMunch joined #nim |
07:22:54 | * | brainproxy quit (Ping timeout: 240 seconds) |
07:23:28 | * | kenran quit (Quit: leaving) |
07:33:54 | * | hax-scramper quit (Ping timeout: 240 seconds) |
07:35:24 | * | hax-scramper joined #nim |
07:55:13 | * | NimBot joined #nim |
07:58:39 | * | EvilKhaosKat joined #nim |
07:58:55 | * | EvilKhaosKat quit (Client Quit) |
08:00:36 | * | brainproxy joined #nim |
08:04:34 | * | dwdv joined #nim |
08:20:57 | * | sleepyqt joined #nim |
08:23:20 | * | PMunch quit (Ping timeout: 256 seconds) |
08:29:59 | FromDiscord | <eliezedeck> Hey guys, are strings passed by reference around or by value? more specifically, I'm sending a string to a `FutureStream[string]` ... is Nim going to copy the string or send it by reference, and how can I control this? |
08:34:59 | * | PMunch joined #nim |
08:36:03 | * | brainproxy quit (Ping timeout: 265 seconds) |
08:37:49 | FromDiscord | <Benumbed> It'll copy it unless its a `ref` |
08:39:49 | FromDiscord | <eliezedeck> alright, thanks |
08:49:19 | * | hax-scramper quit (Ping timeout: 260 seconds) |
09:04:47 | * | brainproxy joined #nim |
09:19:13 | Araq | it's pass by reference |
09:20:03 | Araq | don't mess with it, the compiler is good at it and getting better |
09:21:17 | FromDiscord | <eliezedeck> @Araq thanks for the clarification |
09:21:19 | FromDiscord | <Rika> so what things are pass by ref and not? |
09:21:26 | FromDiscord | <eliezedeck> so, it's safe to just pass string around |
09:22:00 | Araq | in a nutshell: Nim passes things as const& T or as T depending on sizeof(T) |
09:22:14 | Araq | if you know C++ this is the quickest explanation |
09:22:20 | FromDiscord | <eliezedeck> yes, I'd like to know that too ... looking at the output of --gc:arc ... there are `Performance` hints here and there, and so, I was wondering |
09:22:44 | FromDiscord | <eliezedeck> oh, right |
09:23:12 | FromDiscord | <eliezedeck> that sounds great |
09:24:09 | Araq | and 'sink T' is very much like C++'s "want speed, pass by value" |
09:25:03 | Araq | for a sink parameter the compiler emits a move but this means the parameter must be owned. if what you pass to it isn't owned, the compiler has to introduce a copy for correctness |
09:25:10 | Araq | and that's when the warning kicks in. |
09:30:45 | FromDiscord | <eliezedeck> and how do you control ownership? |
09:31:21 | FromDiscord | <eliezedeck> how do you know if something is owned or not |
09:31:29 | FromDiscord | <Rika> araq what size does nim convert to pass by ref |
09:33:14 | Araq | Rika: 3*sizeof(float) |
09:34:03 | Araq | eliezedeck: well the compiler knows. you own your local variables and your 'sink' parameters |
09:37:11 | FromDiscord | <eliezedeck> so, suppose that I have the warning, what should I do and should I do something about it (take below a real example that I ran just now): |
09:37:11 | FromDiscord | <eliezedeck> `Nim/lib/pure/httpclient.nim(980, 38) Hint: passing ':envP.:up.client3.userAgent' to a sink parameter introduces an implicit copy; use 'move(:envP.:up.client3.userAgent)' to prevent it [Performance]` |
09:39:50 | * | brainproxy quit (Ping timeout: 256 seconds) |
09:39:52 | * | gour left #nim ("Leaving") |
09:40:00 | Araq | eliezedeck: you cannot do anything and this warning is a bug :-) |
09:41:55 | FromDiscord | <eliezedeck> Ok, alright ... So, should I ignore all of these warnings from this point on then? I also get these warnings in my own code, and adding a `move ...` before the assignment does get rid of them, but then I seem to have a lot of move here and there ... should I remove those and stop worrying about them? |
09:42:21 | FromDiscord | <eliezedeck> not before the assignment, but as suggested by the warning, sorry |
09:44:20 | Araq | warnings in your own code might be worth looking at |
09:46:36 | FromDiscord | <eliezedeck> out of curiosity, `httpclient` doesn't seem to contain any `sink` parameter at all ... and yet, the compiler will mention about it in that file; how is that so? |
09:48:00 | FromDiscord | <eliezedeck> so, it looks as if the compiler will auto-consider certain proc to have sink parameters, is this the case? and if it so, is it worth knowing these kind of proc? |
09:49:56 | FromGitter | <Vindaar> @Araq: how experimental is `dynamicBindSym` considered to be? I think it might really help me, but I don't want to rely on it if it might disappear at some point |
09:51:12 | * | dsrw joined #nim |
09:53:17 | FromGitter | <alehander92> hey guys |
09:55:22 | FromDiscord | <eliezedeck> hello @alehander92 |
09:56:27 | FromDiscord | <eliezedeck> @alehander92 I saw you had a patch to allow using `await` in a template, but it's not yet merged ... what's the status on it? and why is it blocked? |
09:56:44 | FromGitter | <alehander92> yes |
09:56:48 | FromGitter | <alehander92> well..i dont remember |
09:56:50 | FromGitter | <alehander92> i use it! |
09:56:52 | FromGitter | <alehander92> locally in my code |
09:57:02 | FromGitter | <alehander92> i think i had some strange type error |
09:57:08 | FromGitter | <alehander92> but cant remember how to reproduce |
09:57:23 | FromGitter | <alehander92> otherwise have to check if multisync works.. but |
09:58:03 | FromGitter | <alehander92> i can try to fix it and let it be merged: i'd like to get closer to upstream! β the patch is basically just a port of the chronos solution tho |
09:58:28 | * | narimiran quit (Ping timeout: 256 seconds) |
09:58:30 | FromDiscord | <eliezedeck> I see ... I'm be interested to try it, but if it breaks multisync, then it might not be a good idea |
09:58:56 | FromDiscord | <eliezedeck> I personally prefer to be closer to upstream as well |
09:59:02 | FromGitter | <alehander92> it doesn't have to break it i think |
09:59:09 | FromGitter | <alehander92> i just dont remember, have to look again |
09:59:18 | FromGitter | <alehander92> what are you working on |
09:59:29 | FromDiscord | <eliezedeck> well, it would greatly help everyone if you manage to get it working |
09:59:40 | FromDiscord | <eliezedeck> GraphQL client |
10:00:07 | FromDiscord | <eliezedeck> I prefer to have the same exact thing on client and on server, that's why I'm writing it with Nim |
10:00:42 | FromGitter | <alehander92> yes |
10:00:58 | FromGitter | <alehander92> ok, hmm |
10:01:00 | FromDiscord | <eliezedeck> I'm planning on use it on a Flutter app |
10:01:12 | FromGitter | <alehander92> how does the dsl look |
10:01:13 | FromDiscord | <eliezedeck> unfortunately, the Dart API isn't really appealing to me |
10:01:36 | FromDiscord | <eliezedeck> and current graphql library doesn't seem to be able to do what I exactly want |
10:01:38 | FromGitter | <alehander92> i wonder because one can typecheck a lot of things in such orm-like things |
10:02:01 | FromDiscord | <eliezedeck> which dsl? |
10:02:17 | FromGitter | <alehander92> the graphql lib one |
10:02:23 | FromGitter | <alehander92> well, api* |
10:02:41 | FromDiscord | <eliezedeck> how does it look... I'm not sure I understood you |
10:02:54 | FromDiscord | <eliezedeck> (be back in an hour, lunch) |
10:03:53 | FromGitter | <alehander92> i mean |
10:04:00 | Araq | eliezedeck: the compiler does sink parameter inference |
10:04:02 | FromGitter | <alehander92> can i see how it is invoked |
10:04:04 | FromGitter | <alehander92> :D |
10:04:30 | Araq | Vindaar: if you can avoid it, do so. it's an ugly beast |
10:08:43 | FromGitter | <alehander92> i think https://github.com/nim-lang/Nim/pull/12085#discussion_r319680783 |
10:08:43 | disbot | β₯ Make await a template |
10:08:53 | FromGitter | <alehander92> i had a strange problem if not using `auto` |
10:09:12 | FromGitter | <alehander92> otherwise i should mostly answer the objections |
10:09:16 | FromGitter | <alehander92> and fix |
10:10:40 | FromGitter | <Vindaar> @Araq: ok, thanks. I'll see if I can find another way |
10:11:03 | * | Zectbumo quit (Remote host closed the connection) |
10:16:55 | * | brainproxy joined #nim |
10:21:08 | * | krux02 joined #nim |
10:22:52 | * | brainproxy quit (Ping timeout: 265 seconds) |
10:38:19 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
10:42:07 | * | pbb joined #nim |
10:44:05 | * | hax-scramper joined #nim |
10:51:44 | FromDiscord | <Recruit_main707> i am having some issues trying to override a method, what am i doing wrong here? https://play.nim-lang.org/#ix=2h2Q |
10:52:36 | * | brainproxy joined #nim |
10:58:51 | FromDiscord | <konsumlamm> you have two definitions of `get_output` that have the same sgnature |
10:59:00 | FromDiscord | <konsumlamm> you have two definitions of `get_output` that have the same signature |
10:59:13 | FromDiscord | <konsumlamm> so the compiler doesnt know which to choose |
11:01:03 | FromDiscord | <Recruit_main707> so how can i fix that? because i need a definition of get_output in the first file |
11:02:52 | FromDiscord | <konsumlamm> idk what you want |
11:03:03 | FromDiscord | <konsumlamm> dont import get_output from the first module? |
11:04:10 | PMunch | import RLNim except get_output |
11:05:39 | * | hax-scramper quit (Ping timeout: 250 seconds) |
11:06:00 | FromDiscord | <Recruit_main707> didnt work, let me elaborate a bit more that code |
11:06:30 | * | hax-scramper joined #nim |
11:07:38 | FromDiscord | <Recruit_main707> https://play.nim-lang.org/#ix=2h2T this is much more self explanatory |
11:08:08 | FromDiscord | <Rika> hi |
11:08:16 | FromDiscord | <Recruit_main707> hello Rika |
11:08:54 | FromDiscord | <Rika> thats not how methods work |
11:09:01 | FromDiscord | <Rika> the signature should be different |
11:09:11 | FromDiscord | <Rika> if you want to "override" it, exempt it from your import |
11:10:00 | FromDiscord | <Recruit_main707> ive done this, but it throws me an error still: `import RLNim except get_output` |
11:10:37 | FromDiscord | <konsumlamm> why does `get_output` in RLNim even exist? you can't override it with the same signature anyway |
11:11:22 | FromDiscord | <konsumlamm> and what error do you get when doing `import RLNim except get_output`? |
11:11:23 | FromDiscord | <Recruit_main707> because `receive_and_respond()` calls the method |
11:11:50 | FromDiscord | <Recruit_main707> the error is the same one, "should override this method" |
11:12:15 | FromDiscord | <Rika> make it a proc |
11:12:16 | FromDiscord | <konsumlamm> you need to define the two methods in the same module then |
11:12:53 | FromDiscord | <konsumlamm> or import get_output where you define receive_and_Respond |
11:16:50 | FromDiscord | <Recruit_main707> making it a proc didnt work, and if i have to import it it would kind of loose the purpose |
11:16:59 | FromDiscord | <Recruit_main707> i will see what can i do |
11:17:12 | * | tane joined #nim |
11:18:10 | * | Vladar joined #nim |
11:27:38 | * | brainproxy quit (Ping timeout: 265 seconds) |
11:27:43 | * | dddddd joined #nim |
11:48:03 | * | whaletechno quit (Read error: Connection reset by peer) |
11:48:05 | * | whaletechho joined #nim |
12:00:06 | * | brainproxy joined #nim |
12:01:20 | * | ormiret joined #nim |
12:03:27 | FromDiscord | <eliezedeck> @Araq string doesn't seem to be passed by reference as you said ... every-time I cross to another function, passing it around, the memory usage increase by the amount of the original string ... I'm testing with ~65MB file, and in the end, the memory usage of the program is 700 MB+ ... that is not good |
12:03:28 | FromDiscord | <eliezedeck> I tried both --gc:arc and without it, it's right about the same memory usage |
12:04:03 | FromDiscord | <eliezedeck> I'm using devel branch |
12:05:01 | * | brainproxy quit (Ping timeout: 264 seconds) |
12:06:01 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:14 | FromDiscord | <eliezedeck> not using any `sink` or ref or whatever ... just plain `string` ; i'm currently testing upload of a large file (65MB), and for some reason, the CPU usage also is not where it should be ... trivial task like that would typically not consume more than 5% CPU on my internet connection, yet, it reached 25 - 30% |
12:06:31 | FromDiscord | <eliezedeck> of course, I was testing with `-d:release` |
12:06:46 | * | supakeen joined #nim |
12:08:04 | FromDiscord | <eliezedeck> this is for testing the WIP that I'm hoping to contribute to Nim about the `bodyStream` for HTTP requests (https://github.com/nim-lang/Nim/issues/13856) |
12:08:06 | disbot | β₯ httpclient: Ability to stream HTTP request body |
12:09:39 | FromDiscord | <Rika> elieze are you absolutely sure its string causing you issues |
12:10:04 | zedeus | Related? https://github.com/nim-lang/Nim/pull/12982 |
12:10:05 | disbot | β₯ Implement file streaming for httpclient's MultipartData |
12:10:05 | * | narimiran joined #nim |
12:11:31 | FromGitter | <alehander92> elieze |
12:11:35 | FromGitter | <alehander92> string is just a small struct |
12:11:37 | FromGitter | <alehander92> in nim |
12:11:46 | FromGitter | <alehander92> eliezedeck* |
12:12:04 | FromGitter | <alehander92> which contains capacity, length and char pointer if i recall correctly |
12:12:15 | FromGitter | <alehander92> (maybe with some differences between gc modes) |
12:12:38 | Araq | eliezedeck: 'async' changes the picture |
12:13:04 | Araq | I described Nim's calls, not what async layers on top of it |
12:14:04 | Araq | alehander92: you're wrong, it's a pointer to a variably sized block of memory that contains the length, cap and character data |
12:14:13 | FromDiscord | <eliezedeck> @zedeus your PR is more multipart centric, I was building one that is absolutely dumb where you are responsible of the correct headers (Content-Length) and for composing the whole POST (or any request for that matter) body |
12:14:49 | FromGitter | <alehander92> Araq sorry, so a pointer (but isnt it still to a struct?) |
12:14:54 | FromDiscord | <eliezedeck> @Araq, yes, it's all async |
12:15:30 | FromDiscord | <eliezedeck> so, what is then the behavior in async context? |
12:15:40 | FromDiscord | <eliezedeck> I suppose string copy? |
12:16:11 | FromGitter | <alehander92> maybe they get preserved in the closure? |
12:16:38 | FromDiscord | <eliezedeck> no wonder a program that should stay at ~65 MB memory usage end-up using 700+ ... there is a chain of async proc that is being called until it finally arrives to socket.send() |
12:16:38 | Araq | the closure "captures" the string causing the copy, I think |
12:16:51 | * | ikan_keli joined #nim |
12:16:55 | FromGitter | <Vindaar> @Araq: managed a way around without `dynamicBindSym` by writing a macro that creates bindSym calls to my computed idents and calling that macro as an argument for another macro. Kinda hacky, but gets the job done |
12:17:40 | FromDiscord | <eliezedeck> hmmm... and how do I completely send the string fully to the next proc? may be `move`? |
12:17:55 | * | Guest29531 quit (Ping timeout: 260 seconds) |
12:17:58 | FromGitter | <alehander92> hm, thats an interesting problem |
12:19:48 | * | dadada joined #nim |
12:20:11 | * | dadada is now known as Guest58097 |
12:21:24 | FromDiscord | <eliezedeck> I'm sure this is not the first time this kind of problem has been raised here, and I'd like to know what is the idiomatic Nim-way of solving this problem |
12:25:13 | * | rockcavera joined #nim |
12:29:13 | Araq | eliezedeck: via 'move' |
12:30:14 | FromDiscord | <clyybber> eliezedeck: Are you trying async with gc:arc ? |
12:31:52 | FromDiscord | <eliezedeck> @clyybber yes |
12:31:56 | FromGitter | <alehander92> is gc:arc doing |
12:32:14 | FromGitter | <alehander92> what is it doing differently for async closures |
12:32:16 | FromDiscord | <clyybber> @eliezedeck heh, its not working yet. Its leaking |
12:32:28 | FromDiscord | <eliezedeck> oh, ok |
12:32:31 | FromDiscord | <eliezedeck> good to know |
12:37:37 | * | whaletechho quit (Remote host closed the connection) |
12:38:36 | * | whaletechno joined #nim |
12:45:44 | * | andinus joined #nim |
12:45:55 | * | brainproxy joined #nim |
12:46:44 | FromDiscord | <eliezedeck> trivial question, but I don't know the answer: how to convert `TaintedString` to `string`? |
12:46:56 | narimiran | `myTainted.string` |
12:47:05 | FromDiscord | <eliezedeck> lol... thanks |
12:47:37 | * | muffindrake quit (Quit: muffindrake) |
12:48:41 | * | zacharycarter joined #nim |
12:50:33 | * | andinus left #nim (#nim) |
12:52:16 | lqdev[m] | if you don't use taint mode you don't need to convert at all |
12:55:12 | dom96 | yeah, the compiler should probably have some logic to make it obvious that TaintedString is the same as String when tainted mode is off |
12:55:16 | * | dsrw quit (Quit: Textual IRC Client: www.textualapp.com) |
12:59:20 | FromDiscord | <eliezedeck> the issue is, on VSCode, I suppose it defaults to tainted mode = on ... unless there is a way to disable that, but I really don't want to ... I want to stay with the default behavior, plus, the `.string` is fine |
13:00:09 | FromGitter | <alehander92> hmmm |
13:03:53 | dom96 | Ehhh, VS Code shouldn't be setting that by default. |
13:04:07 | dom96 | Nim has it's own defaults, VS Code really shouldn't be changing them |
13:04:15 | dom96 | taint mode isn't on by default in Nim |
13:05:53 | zacharycarter | is a `var` return type valid, for example does this proc signature make sense? It seems to work - proc `[]`(a: var openArray[sg_color_attachment_action]; b: int): var sg_color_attachment_action = |
13:06:33 | dom96 | yes |
13:07:02 | zacharycarter | Okay thanks - I guess I'm returning a managed pointer in this case? |
13:07:09 | zacharycarter | or a managed reference? |
13:09:07 | * | sentreen_ joined #nim |
13:11:16 | * | whaletechno quit (Remote host closed the connection) |
13:11:31 | * | whaletechno joined #nim |
13:13:24 | FromDiscord | <eliezedeck> ohh |
13:15:06 | FromDiscord | <eliezedeck> @Araq ... I only managed to avoid 2 copies, once the 65MB buffer gets passed `FutureStream.write`, I no longer have the ability to have `move` applied to the rest of the call chain |
13:18:57 | FromDiscord | <eliezedeck> isn't there a way to have an immutable string that it should be copied at all? I'd like to see where is the code that does this copying ... this is a very serious problem for me |
13:19:12 | FromDiscord | <eliezedeck> *should not be copied |
13:19:50 | zacharycarter | gitub pages being down is super annoying |
13:20:05 | FromDiscord | <eliezedeck> for example, if I say: `let fileContent = readFile("...")` ... fileContent should be immutable, right? |
13:22:21 | FromDiscord | <eliezedeck> if it is immutable, the compiler shouldn't copy it at all, may be just increment GC ref counter, and as it is passed around, it stays immutable (and AFAIK, a parameter will be immutable) ... and since nobody is going to modify it, it is safe to use the original |
13:23:15 | Araq | run 'shallow(str)' on the string to do that |
13:23:26 | Araq | but this feature isn't available for ARC (yet?) |
13:23:50 | FromDiscord | <eliezedeck> i'm no longer using ARC for now, from @clyybber 's suggestion |
13:29:46 | FromDiscord | <eliezedeck> @Araq that reduced memory usage from 700+ to 350MB π ... a good progress, but not quite there yet |
13:30:11 | FromDiscord | <eliezedeck> it should be lower than 100MB |
13:31:21 | FromDiscord | <eliezedeck> there may be at least still 5 copies of that buffer, roughly ... what's the typical memory debugging tool for Nim? |
13:37:31 | * | Vladar quit (Quit: Leaving) |
13:38:12 | * | Vladar joined #nim |
13:40:36 | FromGitter | <alehander92> try to use maybe valgrind with `-d:useMalloc` |
13:40:43 | FromGitter | <alehander92> but not sure if this works only for `--gc:arc` |
13:41:04 | FromGitter | <alehander92> i think there was some config file for a normal gc and valgrind tho |
13:42:39 | zacharycarter | shashlick: I'm trying to use nimterop on another header file - https://github.com/RandyGaul/cute_headers/blob/master/cute_math.h - and a lot of types definitions are being skipped over. Mind pinging me when you're around today? |
13:48:47 | * | ikan_keli quit (Ping timeout: 260 seconds) |
13:48:54 | zacharycarter | nevermind I think I understand why it's happening |
13:49:53 | * | brainproxy quit (Ping timeout: 250 seconds) |
13:49:58 | FromDiscord | <eliezedeck> thanks @alehander92 |
13:51:12 | shashlick | Sup |
13:51:46 | zacharycarter | well I figured out it was skipping those type defs because the types had no fields |
13:51:57 | zacharycarter | now I'm trying to figure out how to make nimterop deal with namespaces |
13:52:30 | zacharycarter | also when we're out of quarantine, we should hang out. disruptek mentioned coming to Austin to visit |
13:52:53 | companion_cube | you're in Austin? damn |
13:52:54 | shashlick | That will be fun |
13:52:59 | zacharycarter | yeah! |
13:53:08 | FromDiscord | <Recruit_main707> is this the only flatbuffers implementation we have in nim? https://github.com/Skrylar/skflatbuffers |
13:53:13 | * | companion_cube moved away 2 weeks ago |
13:53:19 | zacharycarter | :( |
13:53:20 | shashlick | This header is implementation |
13:53:29 | zacharycarter | well it's everything |
13:53:36 | zacharycarter | it's just a single header lib |
13:53:59 | zacharycarter | same with the library I used nimterop for yesterday - sokol |
13:54:37 | shashlick | Ok but those online procs won't be wrapped right |
13:54:43 | shashlick | Inline |
13:56:03 | zacharycarter | gotcha |
13:56:29 | zacharycarter | maybe I'll just try to port this |
14:02:57 | * | liblq-dev joined #nim |
14:09:32 | * | waleee-cl joined #nim |
14:11:35 | shashlick | @zacharycarter: I guess you could modify the header and get a wrapper if you want |
14:21:44 | * | solitudesf quit (Remote host closed the connection) |
14:23:03 | FromGitter | <alehander92> companion_cube where you livin now |
14:24:13 | companion_cube | just moved to DC, and I miss Austin a bit already :p |
14:33:40 | FromDiscord | <eliezedeck> How to detect Linux / macOS? (using when ...) |
14:33:52 | narimiran | `when posix` |
14:34:31 | narimiran | `when defined(posix)`, to be more precize |
14:34:44 | FromDiscord | <eliezedeck> @narimiran thanks, I want to separate the two |
14:34:50 | FromDiscord | <eliezedeck> detecting Linux from macOS |
14:35:08 | narimiran | `when defined(linux)` |
14:35:16 | FromDiscord | <eliezedeck> π thanks |
14:35:22 | narimiran | you can guess the other one, i hope :P :D |
14:36:20 | * | oculuxe joined #nim |
14:36:32 | disruptek | !last zevv |
14:36:33 | disbot | Zevv spoke in 12#nim 12 days ago |
14:36:49 | * | oculux quit (Ping timeout: 264 seconds) |
14:37:08 | FromDiscord | <eliezedeck> yes π |
14:37:14 | shashlick | companion_cube: whoops |
14:42:18 | * | letto_ joined #nim |
14:44:39 | * | letto quit (Ping timeout: 258 seconds) |
14:57:29 | * | Ven`` joined #nim |
14:57:37 | * | brainproxy joined #nim |
14:58:24 | zacharycarter | companion_cube: I'm originally from Northern VA haha |
14:58:40 | zacharycarter | but I was in Helsinki for the past 9 months, just moved to Austin in Feb |
14:59:11 | companion_cube | ah well, you'll be able to enjoy Barton Spring once the quarantine is over |
14:59:29 | companion_cube | also, be careful with this thing called the sun |
14:59:30 | zacharycarter | yeah - I'm looking forward to getting out and exploring more of Austin |
14:59:49 | zacharycarter | haha yeah - I have 100 spf sunscreen. I've already had skin cancer once and I'm only 35 haha |
14:59:50 | * | salotz[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
15:00:32 | companion_cube | oh shit, yeah |
15:00:36 | companion_cube | and sunglasses |
15:01:31 | zacharycarter | for sure |
15:02:58 | companion_cube | (but yeah, look for barton springs, best thing in austin) |
15:03:56 | zacharycarter | will do - my gf lived here for a few years so she knows all the hot spots, but I've heard about barton springs from multiple people, so def going to check that out |
15:07:14 | * | whaletechno quit (Remote host closed the connection) |
15:07:31 | * | whaletechno joined #nim |
15:08:38 | Zevv | disbot: sup |
15:09:08 | companion_cube | I still have plenty of friends in Austin⦠will fly back to see them when it's safe |
15:09:38 | disruptek | hey zevv, do i just use nimLUA for lua in nim? |
15:09:41 | disruptek | or something else? |
15:13:02 | FromDiscord | <eliezedeck> Using Valgrind Massif to analyze where are the 350 MB memory usage going ... tried with and without `-d:useMalloc`: memory reported by massif is always about 78 KB (yes, kilobytes) |
15:13:03 | FromDiscord | <eliezedeck> What up here? |
15:17:47 | FromDiscord | <mratsim> with -d:useMalloc should work, if it doesn't it's a bug |
15:18:03 | FromDiscord | <mratsim> without Valgrind cannot analyze memory because Nim does raw mmap/VirtualAlloc calls |
15:21:41 | FromDiscord | <eliezedeck> so, it's a bug then ... I tried many times with -d:useMalloc, nothing |
15:22:19 | * | sendell[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
15:22:52 | FromDiscord | <eliezedeck> π |
15:24:04 | FromGitter | <alehander92> well, please just give us a repro example |
15:24:18 | FromGitter | <alehander92> its not easy to discuss without one |
15:26:48 | FromDiscord | <mratsim> And I've checked the recent refs_v2 code and it properly calls c_malloc / c_free when using -d:useMalloc |
15:27:30 | * | endragor_ quit (Remote host closed the connection) |
15:27:37 | FromGitter | <alehander92> oh i just have a nice tool to check quickly this stuff |
15:27:39 | * | filcuc quit (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/) |
15:27:39 | FromGitter | <alehander92> let me try |
15:27:44 | FromDiscord | <eliezedeck> is that dev channel? |
15:27:54 | FromGitter | <alehander92> eh? |
15:27:55 | FromDiscord | <eliezedeck> devel* |
15:28:27 | FromGitter | <alehander92> i thought stuff_v2 is only for newruntime |
15:28:35 | FromGitter | <alehander92> yes, it is in `devel` branch :) |
15:28:37 | FromDiscord | <mratsim> ah maybe |
15:29:36 | FromDiscord | <eliezedeck> is that devel branch? |
15:29:59 | FromDiscord | <eliezedeck> going to try 1.2.0 ... |
15:30:56 | ryukoposting | dom96: noticed you have a commit in the SDL2 library called "fix TextInputEventObj and TextEditingEventObj padding." I'm starting on my engine's text entry stuff today, but I'm running on the most recent tag, not #head. Did the padding break those objects to the point of un-usability? |
15:31:31 | dom96 | ryukoposting, yeah, it prevents casting because Nim checks sizeof of each type |
15:31:43 | * | brainproxy quit (Ping timeout: 250 seconds) |
15:32:50 | ryukoposting | oh man. If you guys have a process for this, obviously I understand, but if you could get that v2.0.3 tag made soon, that'd be very nice. |
15:33:07 | dom96 | why do you need a tag? |
15:34:00 | disruptek | this again. |
15:34:08 | dom96 | you can just depend on a specific commit for now |
15:34:09 | ryukoposting | I can have the engine depend on head for now, but once I move towards releasing an early beta version (which should happen in the next couple weeks), I'd prefer not to |
15:34:55 | disruptek | ryukoposting: dom only has a couple tags left and he's hoarding them. |
15:35:04 | ryukoposting | I know "make a tag so my random library will work!" is kind of an asinine question lol |
15:35:07 | * | brainproxy joined #nim |
15:35:35 | disruptek | after all, they are pretty expensive. we only use them to fix software we care about. |
15:35:45 | disruptek | yours obviously doesn't rank. |
15:36:12 | dom96 | disruptek, stop your cheek |
15:36:20 | disruptek | stop being a douchebag. |
15:36:38 | ryukoposting | oooooooh suddenly I remember why disruptek is a familiar name |
15:36:38 | disruptek | they guy is trying to help. |
15:36:42 | FromDiscord | <eliezedeck> hmm... 1.2.0 also has the same exact graph and peak of 78KB ... Wondering if it has something to do with openssl, as somewhere at the end of the call, it calls a sslWrite in an sslLoop |
15:37:19 | FromDiscord | <eliezedeck> at least, that should point to the fact that devel hasn't broken -d:useMalloc |
15:37:20 | FromGitter | <alehander92> guys i have 65k |
15:37:23 | FromGitter | <alehander92> =destroy calls |
15:37:27 | ryukoposting | dom96 I promise I don't want to come off as pushy. You surely have more important things on your plate |
15:37:27 | FromGitter | <alehander92> in one small binary |
15:37:31 | FromGitter | <alehander92> is that normal |
15:37:43 | disruptek | ryukoposting: i'll fork it and tag it. what's the package? |
15:37:44 | FromGitter | <alehander92> like, when i run it * |
15:38:00 | dom96 | ryukoposting, not pushy at all, don't worry. I just wanted to give you a workaround while the tag is made. |
15:38:12 | FromGitter | <alehander92> huh, its probably a bug because i have like super many one after another |
15:39:00 | ryukoposting | disruptek, actually, come to think of it, it wouldn't be a horrible idea for me to do that myself. I've made this giant abstraction layer over the SDL2 library to make my engine work, and that library is likely to be very useful on its own |
15:39:16 | ryukoposting | dom96, for sure. Thanks! |
15:39:21 | disruptek | cool. |
15:39:37 | disruptek | i made a tag maker because it's so hard for mere mortals to do. |
15:39:40 | disruptek | !repo bump |
15:39:41 | disbot | https://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions π» 15 13β 1π΄ 7& 1 more... |
15:39:42 | disruptek | hope it helps. |
15:39:43 | * | solitudesf joined #nim |
15:40:15 | ryukoposting | ...!repo <>, interesting command. |
15:40:33 | FromGitter | <alehander92> hm sorry probably a bug in my text graph |
15:40:34 | ryukoposting | !repo CEASER-DS |
15:40:37 | disbot | https://github.com/ryukoposting/CEASER-DS -- 9CEASER-DS: 11Directory-based cache coherence with encrypted addressing 15 0β 0π΄ |
15:40:40 | FromGitter | <alehander92> the =destroy thing |
15:40:42 | ryukoposting | oh that's really cool |
15:41:18 | ryukoposting | have a link to my project for my advanced computer architecture class last semester lmao |
15:42:38 | * | whaletechno quit (Remote host closed the connection) |
15:42:58 | * | whaletechno joined #nim |
15:44:21 | companion_cube | is disbot based on the `irc` package? |
15:45:26 | disruptek | yep. |
15:45:59 | disruptek | !repo xs |
15:46:00 | disbot | https://github.com/disruptek/xs -- 9xs: 11xstreamstartup.com 15 2β 0π΄ |
15:46:25 | companion_cube | ahah the `ix` package :D |
15:46:59 | disruptek | the bot needed it. |
15:47:10 | companion_cube | not critizing |
15:48:28 | FromGitter | <alehander92> mratsim yeah, it seems to me |
15:48:35 | FromGitter | <alehander92> the default gc doesnt use `useMalloc` |
15:51:15 | ryukoposting | dom96, for what it's worth, my engine and test game run a-okay on #head, and it uses all of the new audio-related calls. |
15:52:00 | ryukoposting | and I got to delete the module from my project that just has the new calls in it lol |
15:52:46 | dom96 | awesome :D |
15:52:51 | * | Trustable joined #nim |
15:54:45 | ryukoposting | I'm hoping to have a sort of alpha version on my gitlab soon. right now, the code is littered with uses of an old project name that I need to replace, and the test game is using art I ripped from another VN so I can't really publish that |
16:02:03 | * | aEverr quit (Ping timeout: 250 seconds) |
16:03:09 | * | aEverr joined #nim |
16:04:47 | * | Asgaroth joined #nim |
16:07:35 | * | aEverr quit (Ping timeout: 256 seconds) |
16:08:27 | * | aEverr joined #nim |
16:16:28 | * | xet7 quit (Remote host closed the connection) |
16:18:03 | * | xet7 joined #nim |
16:18:16 | * | natrys joined #nim |
16:31:52 | * | lritter joined #nim |
16:35:35 | * | brainproxy quit (Quit: WeeChat 2.8) |
16:38:26 | disruptek | why do i have to export a symbol that i use in an imported template? |
16:45:30 | disruptek | ~salewski is a cool book on nim: http://ssalewski.de/nimprogramming.html |
16:45:32 | disbot | salewski: 11a cool book on nim: http://ssalewski.de/nimprogramming.html |
16:45:46 | * | hax-scramper quit (Read error: Connection reset by peer) |
16:45:47 | disruptek | !repo inim |
16:45:49 | disbot | https://github.com/AndreiRegiani/INim -- 9INim: 11Interactive Nim Shell / REPL / Playground 15 229β 18π΄ |
16:46:15 | * | hax-scramper joined #nim |
16:49:48 | * | Zectbumo joined #nim |
16:59:01 | leorize | disruptek: shouldn't be needed |
16:59:23 | disruptek | and yet, somehow, i am still needed. |
16:59:40 | leorize | do you have an example? |
17:00:13 | disruptek | !repo nimph |
17:00:14 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future π§ 15 55β 4π΄ 7& 1 more... |
17:00:41 | disruptek | the export issue? i ran into it in the compiler. |
17:01:03 | leorize | ok I give up there :P |
17:01:40 | leorize | usually that'd only happen if the template copy the AST elsewhere than the site of declaration |
17:02:00 | leorize | you might want to employ `mixin` |
17:02:11 | disruptek | i dunno anything about mixin. |
17:02:36 | disruptek | the idea here is that the template is the api, not the goods it represents. |
17:02:49 | leorize | can I see the template? |
17:02:51 | disruptek | but i'm not working on the compiler today. |
17:03:05 | disruptek | it's in my ic2 branch, filename is compiler/rod.nim and it's at the bottom. |
17:03:21 | disruptek | or i can put it on stream quickly. |
17:05:03 | * | opal quit (Ping timeout: 240 seconds) |
17:05:31 | leorize | disruptek: hmm, interesting, the template looks fine |
17:05:52 | leorize | I don't really know why you'd need to export symbols when you use it then |
17:06:23 | disruptek | i think i can make a macro that calls it instead. |
17:06:40 | disruptek | this is probably a "feature". |
17:06:52 | leorize | nah, this kind of template is used everywhere |
17:06:57 | leorize | and you don't need to export symbols for it |
17:07:08 | leorize | it's injected to the caller's scope afterall |
17:07:20 | leorize | or do you mean that you have to export things like `.reject`? |
17:07:25 | disruptek | maybe because i have an inject stmt in there. |
17:08:08 | disruptek | i dunno, i'll take a closer look at it tomorrow. thanks for checking it out anyway. |
17:08:14 | * | narimiran quit (Quit: leaving) |
17:08:17 | leorize | np :) |
17:13:07 | * | opal joined #nim |
17:19:05 | * | koltrast joined #nim |
17:19:25 | * | koltrast_ quit (Ping timeout: 240 seconds) |
17:34:29 | * | biqqles joined #nim |
17:48:13 | disruptek | leorize: seems to be a problem for macros as well. |
17:51:19 | leorize[m] | if you can give me some examples it'd be great |
17:51:48 | disruptek | writing one now. |
18:26:16 | * | biqqles quit (Ping timeout: 240 seconds) |
18:28:04 | shashlick | great - nim-regex broke non-greedy in the latest release |
18:29:45 | * | aEverr quit (Ping timeout: 265 seconds) |
18:30:39 | * | aEverr joined #nim |
18:34:16 | FromGitter | <alehander92> disruptek `mixin` is about late binding iirc |
18:36:37 | shashlick | https://github.com/nitely/nim-regex/issues/61 |
18:36:41 | disbot | β₯ Non-greedy ? operator broken in 0.14.0 ; snippet at 12https://play.nim-lang.org/#ix=2h5j |
18:36:43 | shashlick | cc @nitely |
18:40:45 | FromDiscord | <exelotl> a friend was asking what's the best way to append 2 or more elements to a seq |
18:41:08 | FromDiscord | <exelotl> spent a long time searching the docs but couldn't find anything |
18:41:11 | leorize | .add twice or more :P |
18:41:18 | leorize | jk .add also takes an openArray |
18:43:17 | FromDiscord | <exelotl> huh, I could've sworn I tried that |
18:43:30 | FromDiscord | <exelotl> guess not |
18:46:06 | shashlick | https://github.com/yglukhov/emacs |
18:48:48 | * | whaletechno quit (Remote host closed the connection) |
18:49:23 | * | whaletechno joined #nim |
18:51:08 | leorize | krux02: ^ now you can make the ultimate nim emacs plugin |
18:55:19 | krux02 | leorize, maybe |
18:55:57 | krux02 | I currently need to reevaluate my priorities though. |
18:58:25 | * | nsf quit (Quit: WeeChat 2.7) |
19:23:57 | FromGitter | <kaushalmodi> shashlick: Thanks for sharing that link.. I have reached out to that repo's author: https://github.com/yglukhov/emacs/issues/1 |
19:24:03 | disbot | β₯ Want to collaborate? |
19:26:33 | FromDiscord | <Varriount> @krux02 You still up? |
19:34:30 | FromDiscord | <eliezedeck> @Araq, specifying `shallow` (line 212) for `data` in the `asyncnet.nim::sendPendingSslData` reduces memory usage from 350MB -> 280MB; I wonder, how many of that kind one may find in the standard library; can't the compiler know to do that automatically? it was obviously a local variable ... Behold, the quest for `shallow`ing local vars π |
19:35:53 | * | tiorock joined #nim |
19:35:53 | * | tiorock quit (Changing host) |
19:35:53 | * | tiorock joined #nim |
19:35:53 | * | rockcavera is now known as Guest36326 |
19:35:53 | * | Guest36326 quit (Killed (livingstone.freenode.net (Nickname regained by services))) |
19:35:53 | * | tiorock is now known as rockcavera |
19:47:23 | krux02 | Varriount: yes I am still up, it is not yer that late |
19:47:36 | krux02 | 21:47 |
19:47:47 | * | dddddd quit (Ping timeout: 260 seconds) |
19:47:48 | * | hax-scramper quit (Ping timeout: 256 seconds) |
19:48:42 | * | natrys quit (Quit: natrys) |
19:49:23 | * | hax-scramper joined #nim |
19:55:09 | * | muffindrake joined #nim |
19:59:07 | FromDiscord | <Varriount> eliezedeck: Do you know if sink analysis would have caught it? |
20:01:44 | * | Ven`` quit (Quit: Textual IRC Client: www.textualapp.com) |
20:09:24 | FromDiscord | <eliezedeck> @Varriount I not sure what is "sink analysis", is that a tool? |
20:10:38 | dom96 | hello hello |
20:10:53 | leorize | it's just a thing in the compiler that try to infer if move optimization if possible |
20:11:03 | leorize | it's not a thing for oldruntime strings/seqs iirc |
20:11:15 | leorize | hi dom96 |
20:12:03 | FromGitter | <awr1> @leorize thoughts on this? https://github.com/nimterop/nimterop/pull/176 |
20:12:04 | disbot | β₯ Preprocessor mode fixes |
20:12:49 | dom96 | So let's see if I can fix this openssl bug |
20:13:29 | FromDiscord | <eliezedeck> @dom96 cool ... |
20:13:48 | FromDiscord | <Varriount> leorize: If a sequence can be moved, then it doesn't need to be copied. |
20:13:54 | FromDiscord | <eliezedeck> but I don't think it's really specific to openssl |
20:14:08 | FromDiscord | <eliezedeck> it's more something that the compiler should have optimized |
20:14:13 | leorize | @Varriount: I'm not sure if it's a thing for old runtime strings |
20:14:22 | dom96 | eliezedeck: I'm referring to something else I think |
20:14:26 | FromDiscord | <eliezedeck> there's a lot of inefficient and unnecessary copy happening |
20:14:35 | dom96 | #13903 |
20:14:37 | disbot | https://github.com/nim-lang/Nim/issues/13903 -- 3openssl wrapper corrupts stack on OpenSSL 1.1.1f + Android ; snippet at 12https://play.nim-lang.org/#ix=2h0G |
20:15:01 | leorize | @awr1: please don't process .h.in |
20:15:07 | FromDiscord | <eliezedeck> oh, ok |
20:15:10 | leorize | those files are usually incomplete |
20:15:36 | leorize | they have to be passed through their build tools before they become valid C for consumption |
20:15:54 | FromGitter | <awr1> i only did it because AppVeyor was complaining about it |
20:16:02 | FromGitter | <awr1> but i will fix that |
20:16:45 | FromGitter | <awr1> specifically when processing PCRE |
20:17:07 | leorize | dom96: do you think that our implementation of dynlib isn't adequete for android? |
20:17:27 | leorize | the openssl wrapper is patchy, but I don't see any problems in it |
20:18:00 | dom96 | leorize: I'm not sure, the code works if I comment out the first attempt to load the "old" C function |
20:18:14 | leorize | yea, sounds like that might be our problem |
20:18:31 | dom96 | I tried unloading the lib handle pointer |
20:18:40 | dom96 | didn't help |
20:18:58 | dom96 | I guess I can try loading the methods using the same lib handle and see if that helps |
20:19:00 | dom96 | any other ideas? |
20:21:03 | FromGitter | <awr1> i don't get it though, aren't the build tools executed before toast |
20:21:50 | FromGitter | <awr1> https://github.com/awr1/nimterop/blob/master/tests/tpcre.nim |
20:23:01 | shashlick | hey awr1 |
20:23:16 | shashlick | yet to review that PR but same feedback as leorize |
20:25:30 | shashlick | i don't see the point of the changes in toast |
20:26:33 | FromGitter | <awr1> the issue is with c2nimport |
20:26:41 | shashlick | and why mode = "" by default |
20:26:49 | FromGitter | <awr1> because you already have mode selection |
20:27:00 | FromGitter | <awr1> *automatic mode selection |
20:27:49 | shashlick | right now, it isn't doing it at all which is why I'm debating removing c mode altogether |
20:27:51 | FromGitter | <awr1> `if gState.mode.Bl:` won't ever get followed through, unless you explicitly are like `--mode=""` to toast |
20:28:03 | shashlick | since it is set to cpp and never changed by anyone |
20:29:36 | FromGitter | <awr1> c2nimport gets toast to do the preproc pass, which does it in cpp mode |
20:29:39 | * | sleepyqt quit (Ping timeout: 258 seconds) |
20:30:03 | FromGitter | <awr1> meaning things like `#ifdef __cplusplus` get followed through |
20:31:02 | leorize | dom96: can you check if it's reproducible in environments like termux? |
20:31:16 | shashlick | okay i see where you are going |
20:31:22 | FromGitter | <awr1> and c2nim doesn't play nice with `extern "C"` so by default it tries to skip `__cplusplus`, but it can't anymore because the preproc already cleaned those out |
20:31:24 | leorize | then we can make a reproducible sample and it'd be easier to debug |
20:32:04 | * | disruptek quit (Ping timeout: 256 seconds) |
20:32:30 | * | munksgaard left #nim ("WeeChat 1.0.1") |
20:33:13 | * | disbot quit (Ping timeout: 264 seconds) |
20:33:40 | shashlick | keep c2nim aside for a minute |
20:34:00 | shashlick | looking at the issue 175 submitted |
20:35:59 | shashlick | the extern "C" piece is only of interest to the C++ compiler |
20:36:39 | shashlick | what you are saying tho is that since the mode is default c++, we end up with the extern "C" portion that c2nim doesn't like |
20:36:43 | shashlick | toast doesn't care |
20:37:36 | shashlick | what you are saying tho is that c2nim can process extern "C" but I don't think it does today |
20:38:25 | shashlick | ideally c2nim should be able to ignore that since many headers have that for compatibility |
20:38:37 | shashlick | and more often than not, c2nim is used without nimterop |
20:39:13 | shashlick | but i agree having a fix for this in nimterop will make c2nim work better in this use case |
20:39:23 | leorize | what he is saying is that c2nim doesn't define __cplusplus |
20:39:36 | leorize | so it escapes the `extern "C"` problem |
20:39:44 | shashlick | okay makes sense |
20:39:58 | shashlick | so this is finally a legitimate use case to process .h with c mode and .hpp with c++ mode |
20:40:22 | shashlick | but will need a bunch of testing to verify that it doesn't really break every wrapper out there since everything has been parsed with tree-sitter-cpp |
20:52:41 | dom96 | leorize: I guess, but seems like a faff :) |
20:53:50 | leorize | I can't really help you on this one unless I can reproduce it :P |
20:55:34 | FromGitter | <awr1> i removed the `.in` thing |
20:56:35 | shashlick | can you also check if there's any hard-coded c/cpp in build and cimport that can be handled correctly? |
20:58:23 | * | disbot joined #nim |
20:58:25 | FromGitter | <awr1> sure |
20:58:36 | * | Zectbumo quit (Remote host closed the connection) |
20:58:37 | dom96 | leorize: just grab the latest openssl and try to use httpclient.get() on an https site? |
20:59:14 | * | disruptek joined #nim |
20:59:20 | dom96 | oh, I think I just fixed it |
20:59:32 | leorize | what lol |
21:00:53 | dom96 | I believe the problem is that loadLib() and loadLibPattern are called twice |
21:01:42 | leorize | well according to linux dlopen, they can be called as much as you'd like |
21:01:58 | leorize | the entries are ref-counted |
21:02:56 | dom96 | well I moved the loading of each method into sslSym and it works |
21:03:08 | dom96 | hopefully I'm not just getting lucky |
21:03:43 | leorize | I heard that dlopen was broken on android til mashmallow |
21:03:55 | leorize | but you're unlikely to be on an android version that old |
21:04:49 | dom96 | yeah, I'm just above that, Android 7 (Nougat) |
21:06:19 | leorize | nice, nim 1.2.0 is in termux repo already |
21:07:57 | * | filcuc joined #nim |
21:08:51 | leorize | dom96: openssl 1.1.1f, no prob |
21:08:58 | leorize | on android termux env |
21:09:15 | leorize | I use get() on https://example.org |
21:09:47 | leorize | on android pie though |
21:10:30 | dom96 | interesting, thanks for checking |
21:16:29 | dom96 | #13919 |
21:16:30 | disbot | https://github.com/nim-lang/Nim/pull/13919 -- 3Fixes issues with dynamic loading OpenSSL. Fixes #13903. |
21:18:12 | leorize | dom96: that patch introduces more corruptions btw :P |
21:18:39 | leorize | sslModule() and thisModule() caches the handles they create |
21:18:50 | leorize | if you free them then they will be invalid |
21:19:36 | dom96 | I changed that |
21:19:53 | leorize | can you have them cache? |
21:20:10 | leorize | it's not cheap to open then close shared libraries, esp since they are used a lot |
21:20:19 | dom96 | yeah, I guess I should |
21:25:40 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
21:26:26 | dom96 | okay, good, it still works :) |
21:28:09 | dom96 | pushed |
21:28:11 | * | qbradley quit (Read error: Connection reset by peer) |
21:28:14 | dom96 | looks like there is a test failure |
21:29:52 | leorize | loadPSSLMethod can be make a bit simpler |
21:30:14 | leorize | you can do the cast right when you use sslSym |
21:30:31 | leorize | since it's still a pointer .isNil would still work |
21:30:48 | dom96 | why does it matter? |
21:31:08 | leorize | so you don't need the weirdly named method2Proc? |
21:31:57 | leorize | also I'd recommend dropping the `else`. `raise` is already a noreturn statement |
21:31:59 | dom96 | I disagree with you here. |
21:32:04 | dom96 | It's clearer this way. |
21:32:15 | * | Vladar quit (Quit: Leaving) |
21:35:09 | dom96 | That I can do |
21:35:31 | leorize | actually do you think sslSym can be made fatal? |
21:36:30 | leorize | the other APIs just ignore when sslSym returns nil |
21:38:17 | dom96 | federico3, props to you, your tests just caught a bug in my PR |
21:45:40 | * | solitudesf quit (Ping timeout: 256 seconds) |
21:48:10 | dom96 | GitHub's CI is pretty freaking awesome |
21:48:50 | leorize | yep |
21:49:03 | dom96 | Our CI runs each file's main module tests right? |
21:49:07 | dom96 | Any ideas how to run those? |
21:49:31 | leorize | ssl ci? |
21:49:46 | leorize | https://github.com/nim-lang/Nim/blob/devel/.github/workflows/ci_ssl.yml#L85 |
21:50:15 | dom96 | that's just for untestable things |
21:50:25 | dom96 | I'd rather be part of the main CI |
21:50:48 | leorize | just put it in a subfolder in tests |
21:50:52 | leorize | file name starts with `t` |
21:51:00 | leorize | it will be run as part of `testament all` |
21:51:25 | leorize | run individual then `testament r <category/testname>` |
21:51:40 | dom96 | yeah, but what I want to test is better being a part of openssl.nim |
21:52:38 | leorize | https://github.com/nim-lang/Nim/blob/devel/testament/categories.nim#L695 |
21:52:42 | leorize | we don't test lib/wrappers |
21:53:25 | dom96 | that sucks, I assume we've got openssl in our main CI |
21:54:57 | * | hax-scramper quit (Ping timeout: 256 seconds) |
21:55:26 | leorize | we test the things that use openssl instead |
21:55:37 | * | hax-scramper joined #nim |
21:57:44 | * | whaletechno quit (Remote host closed the connection) |
21:58:01 | * | whaletechno joined #nim |
21:58:29 | dom96 | I would like to have some unit tests for openssl specifically |
21:58:45 | dom96 | our testing infra really needs someone's time commitment |
21:58:52 | dom96 | anyway, I updated the PR |
21:58:59 | dom96 | I guess testing will have to happen some other time |
22:00:00 | leorize | you can just put it in the tests folder for now |
22:00:11 | leorize | it doesn't have to be pretty, it just have to prevent the bug |
22:01:00 | dom96 | Spent too much time on this already |
22:03:03 | * | zedeus quit (Quit: zedeus) |
22:06:46 | * | filcuc quit (Ping timeout: 265 seconds) |
22:09:51 | * | zedeus joined #nim |
22:17:51 | * | tane quit (Quit: Leaving) |
22:20:10 | * | PMunch quit (Quit: leaving) |
22:35:08 | FromDiscord | <KingDarBoja> Hi all |
22:36:57 | leorize | gah, Nim is generating overflow checks for C unsigned types |
22:56:35 | nisstyre | leorize: that doesn't sound right...maybe there's a way to disable that |
22:56:58 | nisstyre | https://forum.nim-lang.org/t/3434 |
22:57:01 | nisstyre | seems to imply there is |
22:57:04 | leorize | nah, false alarm |
22:57:12 | nisstyre | but would that disable it for signed ints too I wonder |
22:57:14 | nisstyre | ah ok |
22:57:15 | leorize | because some cross platform code is a bit out of date |
22:57:44 | nisstyre | yeah I generally think Nim does the right thing when interacting with primitive types like that |
23:02:18 | zacharycarter | https://imgur.com/a/wAq7UoG |
23:02:36 | zacharycarter | cube with sokol! |
23:03:14 | zacharycarter | now I can play with hot reloading shaders and also simd for the linalg module I'm composing |
23:09:59 | FromDiscord | <KingDarBoja> Awesome! |
23:16:47 | leorize | Araq: nim is generating range checks for importc-ed types, is this intended? |
23:20:18 | * | Guest58097 quit (Ping timeout: 256 seconds) |
23:23:01 | * | letto_ quit (Ping timeout: 264 seconds) |
23:23:22 | * | letto_ joined #nim |
23:33:18 | * | dsrw joined #nim |
23:35:48 | krux02 | zacharycarter, where do you use simd? |
23:36:06 | zacharycarter | just adding it to matrix operations |
23:36:33 | zacharycarter | adding SSE instructions |
23:37:59 | krux02 | cool |
23:39:15 | * | Trustable quit (Remote host closed the connection) |
23:39:50 | krux02 | is in an optimization for you existing vectormath operations? |
23:40:03 | krux02 | or is it custom SIMD vectormath? |
23:40:48 | * | krux02_ joined #nim |
23:41:35 | krux02_ | I am currently trying to optimize some glm as I am totally unhappy with its performance. |
23:41:48 | krux02_ | got a reconnect |
23:41:57 | krux02_ | somehow I can't set my name back to krux02 |
23:42:41 | zacharycarter | I'm porting https://github.com/HandmadeMath/Handmade-Math/blob/master/HandmadeMath.h and combining it with some of the syntactic sugar you provided in glm |
23:44:43 | * | krux02 quit (Ping timeout: 265 seconds) |
23:46:21 | FromDiscord | <Recruit_main707> We donβt have any flatbuffers parser for Nim yet right? |
23:52:58 | * | whaletechno quit (Quit: ha det bra) |
23:57:23 | FromGitter | <awr1> i have an algebra module that i never released, uses SSE intrins |
23:58:31 | FromGitter | <awr1> including SSE 4.1 |
23:59:23 | zacharycarter | linear algebra? |