00:03:39 | * | wallabra_ joined #nim |
00:04:38 | * | wallabra quit (Ping timeout: 276 seconds) |
00:05:29 | * | wallabra_ is now known as wallabra |
00:06:10 | FromDiscord | <Elegantbeef> Yea i imagine that's easier |
01:11:39 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4dT8 |
01:11:52 | FromDiscord | <sOkam!> they output `ptr 30` and `30` |
01:12:09 | FromDiscord | <Elegantbeef> `cast[ByteAddress](num.addr)` |
01:12:22 | FromDiscord | <Elegantbeef> `repr` changes its behaviour depending on mm afaik |
01:12:36 | FromDiscord | <Elegantbeef> One version prints `addressInHex => data` |
01:13:03 | FromDiscord | <Elegantbeef> Yea refc's version shows the address |
01:13:23 | FromDiscord | <Elegantbeef> The RCs do not |
01:13:57 | FromDiscord | <sOkam!> ah i must be on rc, and the tutorial was on refc |
01:14:04 | FromDiscord | <guttural666> is there an easy/ideomatic way to check if a given int is a valid value of a given enum? |
01:17:53 | arkanoid | how can I get the typeImpl of a parameter type in a macro? https://play.nim-lang.org/#ix=4dTc I've tried with generics and "static typedescr" but it doesn't work. I just get it working by using the type inside the macro |
01:40:05 | FromDiscord | <exelotl> In reply to @guttural666 "is there an easy/ideomatic": I'd do `n in ord(Foo.low)..ord(Foo.high)` |
01:40:33 | FromDiscord | <exelotl> Not sure if there's a better way |
01:42:24 | arkanoid | a clearer example of what I'm trying to achieve. Should be simple, but I'm failing hard in passing type argument to macro https://play.nim-lang.org/#ix=4dTf |
01:42:40 | arkanoid | do I have to pass a static default object instead and extract type from there? |
01:43:17 | arkanoid | but the macro should get an object as argument, instead of a generic type or a typedesc |
01:45:18 | * | arkurious quit (Quit: Leaving) |
01:47:04 | FromDiscord | <Elegantbeef> you can do `t.getTypeImpl[^1].getTypeImpl()` |
01:48:01 | arkanoid | it works! ... how? is typedesc not a type? |
01:48:17 | arkanoid | thanks! |
01:48:28 | FromDiscord | <Elegantbeef> typedesc is a type which is the issue |
01:48:36 | FromDiscord | <Elegantbeef> `getTypeImpl` of a typedesc is the typedesc |
01:51:30 | * | wallabra quit (Ping timeout: 250 seconds) |
01:52:10 | arkanoid | ok? and according to this, also the generic argument is kinda like typedesc |
01:53:52 | * | wallabra joined #nim |
02:01:29 | NimEventer | New thread by snej: Nim 2: What’s special about Task?, see https://forum.nim-lang.org/t/9543 |
02:02:56 | FromDiscord | <Elegantbeef> If you have a generic type you're not going to have fun with `getTypeImpl` |
02:03:12 | FromDiscord | <Elegantbeef> The typed AST is woefully underspecified |
02:11:25 | arkanoid | I'll stay far from it, then |
02:11:39 | FromDiscord | <Elegantbeef> Arkanoid it doesnt emit an object but https://play.nim-lang.org/#ix=4dTm does work |
02:11:52 | arkanoid | damn, nimpretty fails pretty badly in formatting the output of dumpAstGen |
02:11:52 | FromDiscord | <Elegantbeef> Yes it's a hack 😄 |
02:12:43 | arkanoid | macro in template, mixins, whoa, this is hardcore |
02:17:17 | arkanoid | ok, you went down the route of creating an object off type typ and use fields |
02:19:25 | arkanoid | I don't understand how you are building a type with a nnkTupleConstr |
02:20:02 | arkanoid | there are no nnkTuple nodes in dumpAstGen of a type block |
02:21:48 | FromDiscord | <Elegantbeef> It's a tuple alias |
02:21:56 | FromDiscord | <Elegantbeef> I'm making a tuple of the fields in this hack |
02:23:30 | arkanoid | oh! you're making an unnamed tuple there |
02:23:31 | arkanoid | got it |
02:23:34 | arkanoid | makes sense now |
02:24:00 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=4dTo is a bit less hacky |
02:24:02 | arkanoid | reading the manual about mixin now |
02:24:27 | FromDiscord | <Elegantbeef> Only used due to the hack of using a macro inside the template |
02:24:37 | FromDiscord | <Elegantbeef> I still just say use a generic instead |
02:26:04 | arkanoid | this is rocket science for my understanding |
02:26:24 | FromDiscord | <Elegantbeef> The entire point of mixin in that code was just to make it so you dont need to export `macros` or `import macros` in modules that use it |
02:26:46 | FromDiscord | <Elegantbeef> You can use `mixin` and `bind` to fix issues you'd otherwise have when the template was expanded at the callsite |
02:27:25 | FromDiscord | <Elegantbeef> The macro there is much less complicated, but still a tinge complicated |
02:29:09 | arkanoid | thanks for all of this |
02:46:18 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
02:47:02 | arkanoid | funny, path concatenation "/" happens to change sep character bases on os. But it does also when doing cross compilation, leading to a failure |
02:47:34 | FromDiscord | <Generic> oh yeah I know this issue |
02:47:39 | FromDiscord | <Elegantbeef> Yep it's not fun |
02:47:43 | arkanoid | so nim cpp -d:mingw would use build path separated by "\" even on linux |
02:47:49 | FromDiscord | <Elegantbeef> also `getSourcePath` or w/e doesnt play well with mingw |
02:48:48 | arkanoid | exactly. I'm trying to remove absolute paths from my config.nims replacing them by currentSourcePath() / ... |
02:49:03 | arkanoid | but apparently I have to put them back |
02:50:26 | * | Lord_Nightmare joined #nim |
03:05:28 | FromDiscord | <Elegantbeef> Even more fun when i was trying to get miniaudio to compile with mingw |
03:05:55 | FromDiscord | <Elegantbeef> Tried like thirty things then i just decided "you know copying this to a `.c` extension is probably what i have to do" |
03:06:51 | FromDiscord | <Elegantbeef> Fun thing is Nim's `compile` pragma doesnt seem to work with `.h` files |
03:27:42 | * | vicecea quit (Remote host closed the connection) |
03:28:30 | * | vicecea joined #nim |
04:50:38 | FromDiscord | <sOkam!> Is there a way to get the name of a value in string form, instead of the value itself converted to string? |
04:50:50 | FromDiscord | <sOkam!> (edit) "value" => "variable" |
04:51:06 | FromDiscord | <Elegantbeef> `astToStr` |
04:57:29 | FromDiscord | <sOkam!> how do you declare a generic proc to be part of a type? |
04:58:21 | FromDiscord | <Elegantbeef> What? |
04:59:25 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4dTR |
04:59:52 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4dTS |
05:01:22 | FromDiscord | <sOkam!> not sure if this is the way to do it, btw↵just trying to figure out how to map GLFWKey codes to procedures, in a way that they can be remapped |
05:03:55 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4dTU |
05:04:13 | FromDiscord | <Elegantbeef> `` goes on the symbol number one |
05:04:21 | FromDiscord | <Elegantbeef> Number to can you not just do `Table[GlfwKey, proc()]` |
05:04:21 | FromDiscord | <Elegantbeef> two even |
05:04:41 | FromDiscord | <Elegantbeef> Or `array[GlfwKey, proc()]` though know Enums are wacky in C land |
05:04:47 | FromDiscord | <sOkam!> probably can. just wondering how to do it |
05:05:34 | FromDiscord | <Elegantbeef> Well the above should work so... |
05:07:55 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4dTV |
05:08:23 | FromDiscord | <Elegantbeef> What's the type of `GlfwKey`? |
05:08:28 | FromDiscord | <sOkam!> enum |
05:10:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4dTW |
05:12:30 | FromDiscord | <sOkam!> Oh i wasn't exporting tables from the other module 🤦♂️ |
05:12:45 | FromDiscord | <sOkam!> nice 🐠 memory |
05:45:58 | FromDiscord | <ChocolettePalette> We will not back down 💪🏻💪🏻💪🏻 |
05:46:18 | FromDiscord | <Elegantbeef> I'm going to need a map to explain this |
06:19:20 | FromDiscord | <Rika> You didn’t register the s key I assume |
06:25:04 | FromDiscord | <sOkam!> #noskey #willnevergoback 🙂 |
07:36:23 | FromDiscord | <Require Support> anyone have an example of creating/read/write into async namedpipe on windows? saw this https://github.com/cheatfate/asynctools but not sure if there are examples out there that I could learn from |
07:49:40 | * | vicecea quit (Remote host closed the connection) |
07:50:11 | * | vicecea joined #nim |
08:30:35 | FromDiscord | <enthus1ast> we do not have a json schema to nim object converter right? |
08:36:48 | FromDiscord | <enthus1ast> @Require Support\: did you see the short example at the start of https://github.com/cheatfate/asynctools/blob/master/asynctools/asyncpipe.nim |
08:36:49 | FromDiscord | <enthus1ast> ? |
08:37:30 | FromDiscord | <enthus1ast> this uses waitFor though, you prolly want to use await in an async proc |
08:42:48 | FromDiscord | <Phil> In reply to @enthus1ast "we do not have": Could you define the problem a bit clearer for me? Because when I hear "json to nim object converter" I think jsony, but I know you know of jsony so I'm pretty sure that "schema" in there changes things |
08:43:52 | FromDiscord | <Elegantbeef> Take a json scheme output a Nim object |
08:43:59 | FromDiscord | <Elegantbeef> I think there are some |
08:44:15 | FromDiscord | <enthus1ast> i have a bunch of json schemas, i want to build a client for a protocol (nats.io) and one of their api's heavily uses json, so they document their api through json schema, i do not want to handle json in my code, but nim objects |
08:44:35 | FromDiscord | <Phil> I don't get the difference between a json string and a json schema |
08:44:36 | FromDiscord | <enthus1ast> so i want to have nim objects and use json.to etc |
08:44:52 | FromDiscord | <Elegantbeef> Emit the type definitions from json schemes |
08:44:54 | FromDiscord | <enthus1ast> json schema IS a json \:) |
08:44:58 | FromDiscord | <Elegantbeef> Not just convert data to file |
08:45:03 | FromDiscord | <Phil> Is JSON schema just what you'd copy paste into the browser to get a js object? |
08:45:05 | FromDiscord | <enthus1ast> but it describes other json messages |
08:45:22 | FromDiscord | <enthus1ast> like a xml schema |
08:45:36 | FromDiscord | <Phil> So you want to generate a nim type from a provided json schema? |
08:45:41 | FromDiscord | <enthus1ast> yes |
08:45:46 | FromDiscord | <Phil> That you can then just jsony convert objects into? |
08:46:02 | FromDiscord | <enthus1ast> in my case std json, but yes |
08:46:04 | FromDiscord | <Phil> (edit) "That you can then just ... jsonyto" added "use" | "usejsony ... convertactual" added "to" | "objects" => "actual json" |
08:46:29 | FromDiscord | <Phil> So what you need is a utility acts before you actually compile your project, right? |
08:46:35 | FromDiscord | <enthus1ast> yes |
08:46:46 | FromDiscord | <Phil> Okay, I think I've begun to understand the problem domain |
08:46:50 | FromDiscord | <enthus1ast> i mean, i could just do it by hand, but yeah, lazy |
08:47:02 | FromDiscord | <Require Support> In reply to @enthus1ast "we do not have": https://github.com/treeform/jsony maybe this? |
08:47:02 | FromDiscord | <carmellajones34> sent a long message, see http://ix.io/4dUv |
08:47:19 | FromDiscord | <Phil> In reply to @carmellajones34 "Win up to $1000": <@&371760044473319454> I am hostile to this trash person! |
08:47:35 | FromDiscord | <Phil> I am now no longer hostile |
08:47:52 | FromDiscord | <Elegantbeef> Again jsony doesnt take in a json file and emit a type definition |
08:48:19 | FromDiscord | <enthus1ast> imho jsony cannot act on schema's but not 100% sure↵(@Require Support) |
08:48:22 | FromDiscord | <Phil> In reply to @Elegantbeef "Again jsony doesnt take": Yeh, it's for when you have the type definition and want to convert actual JSON, got that so far |
08:48:38 | FromDiscord | <Require Support> oh sorry didnt notice |
08:48:41 | FromDiscord | <Elegantbeef> https://github.com/jiro4989/nimjson something like |
08:49:02 | FromDiscord | <enthus1ast> yes |
08:49:03 | FromDiscord | <PMunch> It's so confusing when another mod swoops in and deletes a message |
08:49:40 | FromDiscord | <Elegantbeef> The consensus in other servers is to 👍️ the summoning message to indicate someone took action |
08:51:01 | FromDiscord | <enthus1ast> we need a moderator bot |
08:51:17 | FromDiscord | <Elegantbeef> That's been said like 300 times at this point |
08:51:23 | FromDiscord | <enthus1ast> yeah can imagine |
08:52:19 | FromDiscord | <Phil> Couldn't a utility that generates type definitions as a one of be written in any language since you just need a script / binary that does the job for you once, generates the nim file with the types and you're settled for life (unless the json changes a week later) ? |
08:52:27 | FromDiscord | <Phil> (edit) "one of" => "one-of" |
08:52:35 | FromDiscord | <enthus1ast> yes sure |
08:52:44 | FromDiscord | <Elegantbeef> Well the benefit of doing it inside Nim is that if you do it at compile time you always have up to date to your json templates |
08:53:08 | FromDiscord | <enthus1ast> Elegantbeef\: this MIGHT be possible, but i would rather gen the nim code |
08:53:16 | FromDiscord | <enthus1ast> i do not like wrappers that does this |
08:53:21 | FromDiscord | <Elegantbeef> Regardless nimjson exists 😄 |
08:53:30 | FromDiscord | <Phil> In reply to @Elegantbeef "Well the benefit of": If you turn that into part of your compile-pipeline you're making compiling longer though and need to lug around json example messages forever |
08:53:32 | FromDiscord | <Elegantbeef> Fork if needbe |
08:53:39 | FromDiscord | <Elegantbeef> Oh noes↵(@Phil) |
08:53:52 | FromDiscord | <enthus1ast> (i fact, the other nats wrapper is a nimgen wrapper, which is broken and completely useless) |
08:54:14 | FromDiscord | <Elegantbeef> Have known truths isnt a big deal to me, the CT is a tinge of a deal |
08:54:16 | FromDiscord | <Phil> In reply to @Elegantbeef "Oh noes (<@180601887916163073>)": Oi, I discovered that a prologue extension of mine literally doubled to tripled compile-time since I'm generating so much code through it, so I've become a bit more mindful |
08:54:23 | FromDiscord | <Phil> (edit) "In reply to @Elegantbeef "Oh noes (<@180601887916163073>)": Oi, I discovered that a prologue extension of mine literally doubled to tripled compile-time since I'm generating so much code through it, so I've become a bit more mindful ... " added "of prolonging compiletime" |
08:55:04 | FromDiscord | <Elegantbeef> I do like concrete definitions, but i also do like having code that doesnt fail cause i forgot to run "jsongenerator thingy" |
08:55:32 | FromDiscord | <Phil> I mean, if your json-schema changes that much you have different problems |
08:55:34 | FromDiscord | <Elegantbeef> You can always do similar to futhark where you only regenerate when you need to so then CTE isnt expensive |
08:55:34 | FromDiscord | <Elegantbeef> It's just a simple check |
08:55:44 | FromDiscord | <enthus1ast> Elegantbeef\: i think this particular projects i want to speak to, is quite stable already |
08:55:45 | FromDiscord | <Require Support> is there a way to install nim 2 within a script like `curl https://nim-lang.org/choosenim/init.sh -sSf | bash -s -- -y` |
08:56:25 | FromDiscord | <enthus1ast> with choosenim you can switch between version |
08:56:30 | FromDiscord | <Require Support> or i should ask how would one install nim 2 |
08:56:39 | FromDiscord | <Phil> In reply to @Require Support "is there a way": If that script installs choosenim you can use a choosenim command to swap to devel (which is nim 2) |
08:56:43 | FromDiscord | <enthus1ast> nim 2 ? |
08:56:49 | FromDiscord | <Require Support> oh |
08:56:51 | FromDiscord | <Require Support> its devel |
08:56:57 | FromDiscord | <enthus1ast> was not gone for soo long \:) |
08:56:58 | FromDiscord | <Require Support> sorry just saw the nim conf presentation |
08:57:11 | FromDiscord | <Phil> Devel is what will be released as nim 2 at... some point |
08:57:24 | FromDiscord | <Require Support> 2022 (some point) |
08:57:31 | FromDiscord | <Elegantbeef> Araq says 'soon' |
08:57:33 | FromDiscord | <Phil> Been using it for half a year now or so, literally can not move back to 1.68 |
08:57:38 | FromDiscord | <Elegantbeef> Sooner than one would expect |
08:57:46 | FromDiscord | <Phil> Like, very literally, I'd get compiler errors |
08:58:16 | FromDiscord | <Require Support> ye decided to move to it now so i dont cry when it eventually gets released |
08:58:24 | FromDiscord | <Elegantbeef> Yea my code doesnt work on devel, though only cause i have a distinct type being passed a nil lit, so it's about 3 seconds to fix |
08:58:29 | FromDiscord | <Elegantbeef> Just havent got around to it |
08:59:07 | FromDiscord | <Elegantbeef> Hell my text editor is borked and it's code suggestions are hidden but doc comments arent |
08:59:13 | FromDiscord | <Elegantbeef> Debian sid was a choice |
09:00:22 | FromDiscord | <Phil> That kinda reminds me I should get around to making use of nim merging in default-values for objects |
09:00:34 | FromDiscord | <Elegantbeef> That was removed |
09:00:39 | FromDiscord | <Phil> Wait, it was? |
09:00:45 | FromDiscord | <enthus1ast> i learned to just use nim stable |
09:00:46 | FromDiscord | <Phil> Still addicted to constructor then |
09:01:02 | FromDiscord | <enthus1ast> for me its too annoying when my code breaks all the time \:) |
09:01:30 | FromDiscord | <Elegantbeef> I often fix things that i want to toy with so i ping pong back and forth |
09:01:31 | FromDiscord | <Phil> Well, mine hasn't broken, though I guess it would've if I had started incorporating the default value thing |
09:02:16 | FromDiscord | <enthus1ast> Elegantbeef\: its good that you can do this, i'm more than often overwhelmed by stuff i actually wanna do \:) |
09:02:27 | FromDiscord | <enthus1ast> without fixing compiler stdlib etc |
09:02:30 | FromDiscord | <Phil> I just want my compiler-warnings to work as expected and the bugfixes in the stdlib are absolutely essential |
09:03:04 | FromDiscord | <Elegantbeef> Yea i had to implement `toOpenArray` on the VM to get my current project of "Replace all string libraries to openArray[char]" |
09:04:48 | FromDiscord | <Phil> Updates devel↵> /home/philipp/.nimble/pkgs/regex-0.19.0/regex.nim(856, 18) Error: Exception can raise an unlisted exception: Exception↵Never mind, I spoke to soon, code did break |
09:05:14 | FromDiscord | <Elegantbeef> Super strict funcs |
09:05:14 | FromDiscord | <enthus1ast> haha \:) |
09:05:43 | FromDiscord | <Phil> When it's not in my own packages is the most annoying thing |
09:06:07 | FromDiscord | <Elegantbeef> Update your regex phil |
09:06:07 | FromDiscord | <enthus1ast> i know i'm completely not meant |
09:06:13 | FromDiscord | <Elegantbeef> https://github.com/nitely/nim-regex/commit/0333e127b37e499663320145aa36cd8a6ad7d6ea |
09:07:19 | FromDiscord | <Phil> Aaaaaaaand next it broke prologue↵> /home/philipp/.nimble/pkgs/prologue-0.6.0/prologue/core/context.nim(213, 8) Error: Base method 'extend' requires explicit '{.gcsafe.}' to be GC-safe |
09:07:38 | FromDiscord | <Phil> In reply to @Elegantbeef "https://github.com/nitely/nim-regex/commit/0333e127": I'll need to see where the old nim-regex dependency came in from and suggest a PR for updating the nimble file |
09:08:09 | FromDiscord | <Elegantbeef> I mean you can just do `nimble uninstall nim-regex` and then `nimble install -d` which 'should' make it work? |
09:08:28 | FromDiscord | <Elegantbeef> But yea people need to update nimble files for packages |
09:08:38 | FromDiscord | <Elegantbeef> Semver only works if people actually respect it |
09:12:28 | FromDiscord | <Phil> Alrighty, the prologue dependency was also fixable by just updating prologue, next an ndb error |
09:12:50 | FromDiscord | <Phil> Fuck, that one doesn't have an update that fixes the error |
09:17:23 | FromDiscord | <Phil> Question, if a proc is annotated with `raises: [Exception]`↵Doesn't that just mean it can raise any exception, so one might as well remove the "raises" pragma? |
09:17:34 | FromDiscord | <Elegantbeef> Correct |
09:20:09 | FromDiscord | <ringabout> In reply to @Isofruit "Question, if a proc": which line? |
09:20:49 | FromDiscord | <Phil> In reply to @flywind "which line?": That's in ndb↵↵> /.nimble/pkgs/ndb-0.19.9/ndb/sqlite.nim(314, 5) Error: tryWithStmt(db, query, @args, proc (stmt: PStmt): bool = result =↵> isSome(tryNext(stmt))) can raise an unlisted exception: Exception |
09:22:15 | FromDiscord | <ringabout> https://github.com/xzfc/ndb.nim/blob/f9c85711ffc2ba350fb3c64e5ce38ada47380742/ndb/sqlite.nim#L242 looks suspicious |
09:22:44 | FromDiscord | <Require Support> when compiling with devel breaks because of chronos 😢 |
09:23:01 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dUC |
09:23:30 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4dUC" => "https://play.nim-lang.org/#ix=4dUD" |
09:23:39 | FromDiscord | <Phil> What I don't get is that tryNext doesn't raise an exception either as per raises pragma annotation |
09:23:44 | FromDiscord | <ringabout> In reply to @flywind "https://github.com/xzfc/ndb.nim/blob/f9c85711ffc2ba": You can add `effectsOf: body` |
09:24:14 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4dUE |
09:24:14 | FromDiscord | <Phil> And tryWithStmt also doesn't raise anything |
09:24:17 | FromDiscord | <Phil> What does that do? |
09:25:08 | FromDiscord | <ringabout> `stricteffects` is enabled on the devel branch which required the effects of callback should be considered too. |
09:25:42 | FromDiscord | <ringabout> `effectsOf` takes the effects of `body` into consideration in this case. |
09:26:03 | FromDiscord | <ringabout> https://github.com/nitely/nim-regex/commit/0333e127b37e499663320145aa36cd8a6ad7d6ea is an example showing its usage. |
09:26:26 | FromDiscord | <Phil> ` Error: undeclared identifier: 'body'` |
09:26:52 | FromDiscord | <Phil> For ↵> proc tryWithStmt(db: DbConn, query: SqlQuery, args: seq[DbValue],↵> body: proc(stmt: Pstmt): bool {.raises: [], tags: [], effectsOf: body.}): bool = |
09:28:49 | FromDiscord | <ringabout> sent a code paste, see https://paste.rs/yL7 |
09:33:15 | FromDiscord | <Phil> Alright, one update of my constructor dependency from 1.0.3 to 1.0.5 later I am now at a compiler error in my own code! |
09:33:26 | FromDiscord | <Phil> One that I don't really understand, but at least we got past the dependencies |
09:33:48 | FromDiscord | <ringabout> In reply to @Isofruit "Alright, one update of": What's the error? |
09:33:59 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dUG |
09:34:48 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dUH |
09:35:02 | FromDiscord | <Phil> Ohhh I'm an idiot, forgot a default |
09:35:15 | FromDiscord | <Phil> No idea how that even compiled before |
09:35:51 | FromDiscord | <ringabout> Yeah, the compiler may accept invalid code but shouldn't. |
09:39:41 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dUK |
09:43:30 | FromDiscord | <ringabout> Is this a compiler bug or an constructor issue? |
09:44:03 | FromDiscord | <ringabout> I mean does 1.0.3 work? |
09:44:54 | FromDiscord | <Phil> It's 1.0.5 |
09:45:21 | FromDiscord | <Phil> Oh you mean the constructor update might be the cause? |
09:45:27 | FromDiscord | <ringabout> Yeah |
09:46:34 | FromDiscord | <Phil> Yeah, same error |
09:47:04 | FromDiscord | <Phil> Fascinatingly I can't manage to generate a minimal example it seems |
09:49:59 | FromDiscord | <ringabout> It's fine to be an issue |
10:02:26 | FromDiscord | <Phil> Without recreating it though there can be no troubleshooting |
10:08:24 | * | fanta1 joined #nim |
10:14:14 | FromDiscord | <Phil> Its the macro cache table screwing up somehow |
10:17:10 | FromDiscord | <Phil> Found the issue, just not sure what the fix here is |
10:19:10 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dUV |
10:19:57 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4dUV" => "https://play.nim-lang.org/#ix=4dUW" |
10:31:25 | FromDiscord | <Phil> What I don't get is that in my "playground" project it's not translating the type into a string incorrectly, aka there it removes the default value correctly |
10:32:10 | FromDiscord | <Phil> And it keeps repeating this issue across all my types that use stuff like `0..9` or `Natural` instead of `int` |
10:41:49 | FromDiscord | <Phil> At the very least I can compile my project again |
12:23:44 | * | jmdaemon quit (Ping timeout: 250 seconds) |
13:08:00 | * | xet7 joined #nim |
13:19:37 | FromDiscord | <untoreh> sent a code paste, see https://play.nim-lang.org/#ix=4dVC |
13:38:54 | FromDiscord | <auxym> not sure. For starters you could try looking at the output of `expandArc` (assuming you are using arc/orc)? If that doesn't yield anything, mighht be valgrind time. |
13:40:07 | FromDiscord | <auxym> Nim's stdlib async implementation doesn't exactly have a great reputation though. Even Araq, in yesterday's talk, called it "crazy" |
13:41:41 | FromDiscord | <auxym> you could try https://github.com/status-im/nim-chronos as an alternative |
13:50:25 | FromDiscord | <untoreh> I tried asyncdispatch after chronos, because chronos also behaves similarly |
13:54:21 | FromDiscord | <ringabout> Are you using ARC or ORC? |
13:58:45 | FromDiscord | <Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=4dVO |
13:59:02 | FromDiscord | <Tanguy> How do you measure the used ram? |
14:00:23 | FromDiscord | <untoreh> look at the process? also valgrind |
14:01:01 | FromDiscord | <Rika> You need the use malloc define flag to accurately measure memory usage with external (non Nim( tools |
14:01:06 | FromDiscord | <Rika> (edit) "Nim(" => "Nim)" |
14:05:11 | FromDiscord | <untoreh> oh it seems disabling `threadsafe` flag the memory bloat doesn't happen anymore |
14:06:03 | FromDiscord | <untoreh> no i lied wtf |
14:12:42 | FromDiscord | <untoreh> so it happens with `-d:threadsafe` with the GC and regardless of threadsafe with `--mm:orc` |
14:17:54 | FromDiscord | <Tanguy> The memory is used here (in chronos): https://github.com/status-im/nim-chronos/blob/master/chronos/ioselects/ioselectors_epoll.nim#L96↵It's necessary to use epoll to have a buffer with room for many FDs, though the default (1024) may be a bit high for your usage↵↵But all of this should be cleared by the GC at the end of the thread |
14:20:30 | FromDiscord | <Tanguy> Mhh, actually with threads "allocShared" is used and doesn't seem to be free-able |
14:39:12 | FromDiscord | <Phil> Did they buff compile-time speed in the last 6 months on devel? |
14:39:32 | FromDiscord | <Phil> Because I don't think my project compiled quite as fast before I updated my devel branch |
14:40:57 | FromDiscord | <Bung> this month as speed improvement, before I dont know |
14:42:03 | FromDiscord | <auxym> araq said in his nimconf talk that bootstrapping the compiler with orc went from 16s to 12s on his machine |
14:42:22 | FromDiscord | <auxym> (not sure exactly when this happened, I don't use devel) |
14:43:09 | FromDiscord | <Phil> I mean I'd happily support any claim of around 50-75% compile-speed improvement |
14:43:33 | FromDiscord | <Phil> I don't have any truly hard numbers but I know compilation of a release build before took around 30-45 seconds, let me see how long it is now |
14:44:36 | FromDiscord | <Phil> let me correct that, was 45-60 seconds |
14:45:06 | FromDiscord | <Phil> Hmmm release builds haven't gotten that much faster then, just the compile builds |
14:45:17 | FromDiscord | <Phil> Well, those are the ones that mostly matter for me |
14:49:39 | FromDiscord | <Phil> Yeah, debug builds build around 50% faster |
14:49:50 | FromDiscord | <Phil> (edit) "Yeah, debug builds build around 50% faster ... " added "for me, gut estimate" |
14:54:48 | * | derpydoo joined #nim |
14:55:01 | FromDiscord | <Tanguy> @untoreh https://github.com/status-im/nim-chronos/pull/326 you can use this branch, and call `closeThreadDispatcher()` at the end of each thread, which fixes the leak in chronos |
14:56:02 | FromDiscord | <Tanguy> We could probably add it to the dispatcher destructor, would have to think about it |
14:59:25 | FromDiscord | <ringabout> Or trying running `GC_runOrc` at the end of a thread proc. |
14:59:37 | FromDiscord | <ringabout> (edit) "trying" => "try" |
15:03:14 | FromDiscord | <untoreh> with `GC_runOrc` leaks almost nothing |
15:03:23 | FromDiscord | <ringabout> If thread exit may not trigger collection process if it does not exceed threshold of garbage. |
15:03:27 | FromDiscord | <ringabout> (edit) "If thread exit may not trigger ... collection" added "a" |
15:03:41 | FromDiscord | <ringabout> (edit) "If thread" => "Thread" | "Threadexit may not trigger a collection process if it does not exceed ... threshold" added "the" |
15:04:05 | FromDiscord | <ringabout> It can be possibly leaking if you don't call `GC_runOrc` manually. |
15:04:52 | FromDiscord | <ringabout> It is kind of a semi-automatical memory management. |
15:05:52 | FromDiscord | <ringabout> I have a PR to clean up before thread exit, but it was rejected => https://github.com/nim-lang/Nim/pull/19146 |
15:07:06 | FromDiscord | <Tanguy> But it will be collected eventually by another thread, since memory is shared? |
15:07:31 | FromDiscord | <Tanguy> (not familiar with memory scheme of orc) |
15:07:49 | FromDiscord | <ringabout> I don't think so, the collector of ORC is thread local. |
15:08:05 | FromDiscord | <ringabout> That's why you cannot share refs between threads. |
15:09:26 | FromDiscord | <Tanguy> Uh, that's unfortunate |
15:09:29 | FromDiscord | <ringabout> And it goes for `std/threadpool` which doesn't work for ORC. |
15:12:36 | FromDiscord | <Require Support> anyone try compiling with binaries that use chronos async + `--mm:orc` ? |
15:13:19 | FromDiscord | <Tanguy> chronos is tested with orc in the CI, but I don't know if anyone already used it in production (at status we still use refc) |
15:13:19 | FromDiscord | <Require Support> getting: `Error: unhandled exception: index out of bounds, the container is empty [IndexDefect]` but having a hard time finding whats causing it |
15:13:40 | FromDiscord | <Require Support> ah i see |
15:14:12 | FromDiscord | <Tanguy> Are you using a recent chronos version? There was a recent PR which fixed a similar issue |
15:14:57 | FromDiscord | <Require Support> I think yes but ill double check |
15:15:00 | FromDiscord | <Phil> ringabout, do you perchance know if something was changed with std/macros?↵Specifically the `getImpl` proc? |
15:16:22 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dWk |
15:17:49 | FromDiscord | <ringabout> I cannot think of something particular. You can check https://github.com/nim-lang/Nim/pulls?q=is%3Apr+author%3Ametagn+is%3Amerged or run a bisect |
15:18:19 | FromDiscord | <Phil> I have no yet suceeded in figuring out how to do a minimal replica, all I know is that the second I use a custom range (e.g. 0..9) or a somewhat abnormal int type (such as Natural) the representation of my type definition doesn't remove the assignment (`= 0` in this case) |
15:18:55 | FromDiscord | <Phil> Enums do not have this issue |
15:19:11 | FromDiscord | <ringabout> Oh, sorry. It seemed to be introduced by my object defaults PR. |
15:19:58 | FromDiscord | <ringabout> Could you possibly try `--undef:nimPreviewRangeDefault`. |
15:20:08 | FromDiscord | <ringabout> (edit) "`--undef:nimPreviewRangeDefault`." => "`--undef:nimPreviewRangeDefault`?" |
15:20:24 | FromDiscord | <ringabout> (edit) "seemed" => "seems" | "be" => "have been" |
15:20:52 | FromDiscord | <Phil> So just define that compile flag? |
15:21:14 | FromDiscord | <ringabout> It undefines the `nimPreviewRangeDefault` flag. |
15:21:26 | FromDiscord | <Phil> Yep, compiles |
15:21:27 | FromDiscord | <ringabout> Yeah |
15:21:44 | FromDiscord | <Phil> So that flag fixes my issue surprisingly enough |
15:22:36 | FromDiscord | <ringabout> Ranges in the object definition now have a default value, so `default(object)` will work correctly. |
15:23:21 | FromDiscord | <ringabout> I think constructor probably should fix this problem. |
15:23:53 | FromDiscord | <ringabout> You can open an issue for constructor. |
15:24:23 | * | nisstyre quit (Changing host) |
15:24:23 | * | nisstyre joined #nim |
15:26:20 | FromDiscord | <ringabout> You can use `--undef:nimPreviewRangeDefault` as a workaround. It is unstable. There is a critical issue to be fixed. I may figure something out in the future. |
15:28:26 | FromDiscord | <ringabout> I can add your library to important packages so that we cannot fix it at the first time, if it has a working CI and no external deps except nimble packages. |
15:29:49 | FromDiscord | <ringabout> You can also test against the devel branch using a cron CI which runs everyday. |
15:30:37 | FromDiscord | <ringabout> (edit) "using" => "setting" |
15:41:41 | * | arkurious joined #nim |
15:41:52 | * | xaltsc quit (Quit: WeeChat 3.6) |
15:42:51 | FromDiscord | <Phil> In reply to @flywind "I can add your": Sadly this is not for my lib, but rather my backend application, which isn't really going to be of use for anyone but me (unless somebody wants to throw up their own dnd wiki webpage with ridiculously fast loading times) |
15:51:18 | * | derpydoo quit (Ping timeout: 250 seconds) |
16:07:47 | * | krux02 joined #nim |
16:16:54 | * | arkanoid quit (Ping timeout: 264 seconds) |
16:45:21 | FromDiscord | <Goel> Why can't an identifier (`var a: int`) have the same name of a proc? I don't understand since they have separate structure and syntax that should be possible. `a` should be seen as identifier and `a()` always as proc/func call, no? |
16:54:54 | * | _alexr_ joined #nim |
16:57:35 | * | _alexr_ left #nim (#nim) |
17:01:02 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=4dWW |
17:01:39 | FromDiscord | <exelotl> (edit) "https://play.nim-lang.org/#ix=4dWW" => "https://play.nim-lang.org/#ix=4dWX" |
17:01:40 | FromDiscord | <Bung> a is variable now |
17:02:08 | FromDiscord | <Bung> semcheck will treat it as variable |
17:05:23 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=4dX0 |
17:05:59 | FromDiscord | <Goel> (edit) "https://play.nim-lang.org/#ix=4dX0" => "https://play.nim-lang.org/#ix=4dX1" |
17:06:52 | FromDiscord | <Bung> I think they are follow identity rules, nothing special |
17:26:43 | FromDiscord | <Phil> In reply to @flywind "Ranges in the object": Question, is the entire thing with enabling default values for objects still in devel or has it been removed? (since beef said something in that regard earlier) |
17:27:23 | FromDiscord | <ringabout> It is not |
17:28:10 | FromDiscord | <guttural666> hey, can sb give me a hint why my call of createDir gives me the run time errors seen below (Linux): https://media.discordapp.net/attachments/371759389889003532/1033793969458524273/unknown.png https://media.discordapp.net/attachments/371759389889003532/1033793969940865154/unknown.png |
17:29:01 | FromDiscord | <guttural666> ahhhh, fuck, this is the naming thing of the compiler |
17:29:21 | FromDiscord | <Phil> In reply to @guttural666 "hey, can sb give": Allow me to introduce you to nim's style indifference |
17:29:29 | FromDiscord | <guttural666> since it ignores certain writing styles |
17:29:38 | FromDiscord | <Phil> where `is_potato` counts as the same symbol as `isPotato` |
17:29:53 | FromDiscord | <guttural666> yeeeah, right, saw that in a video 2 days ago haha |
17:30:10 | FromDiscord | <Elegantbeef> `os.createFile(dir)` |
17:30:19 | FromDiscord | <guttural666> a dedicated error message for that would be cool |
17:30:22 | FromDiscord | <guttural666> yeah |
17:30:28 | FromDiscord | <Elegantbeef> It's not an error though to be fair |
17:30:53 | FromDiscord | <guttural666> technically not, but a warning would be approp |
17:30:55 | FromDiscord | <Phil> In reply to @guttural666 "a dedicated error message": I mean, the compiler can't know if you did or did not intend this, often enough it is perfectly valid for a proc to call itself to some degree |
17:30:57 | FromDiscord | <Elegantbeef> The declaration are from two seperate modules |
17:30:58 | FromDiscord | <Elegantbeef> Nim chooses the closest to the call site |
17:31:27 | FromDiscord | <Phil> If you want warnings about this stuff there's a compiler flag btw |
17:31:39 | FromDiscord | <Phil> ` --styleCheck:usages` |
17:32:02 | FromDiscord | <guttural666> ah okay, thanks for the info, nah was just confused, but now its clear 😄 |
17:32:19 | FromDiscord | <Phil> You can turn that into an error via `--styleCheck:error` |
17:32:35 | FromDiscord | <Phil> Which would give you behaviour like in other languages where style insensitivity is not a thing |
17:32:54 | FromDiscord | <guttural666> thanks for the info |
17:32:56 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4dXh |
17:33:08 | FromDiscord | <guttural666> agreed eleg |
17:33:30 | FromDiscord | <Elegantbeef> You know the aft end of my name is also 4 letters and is a word! 😛 |
17:33:48 | FromDiscord | <Phil> Eleg the beef |
17:33:51 | FromDiscord | <guttural666> 4k monitor and Discord scaling is brutal haha |
17:34:04 | FromDiscord | <guttural666> have to use binos to see Discord chat haha |
17:34:33 | FromDiscord | <Elegantbeef> Get a crt that's 4\:3 |
17:34:47 | FromDiscord | <Elegantbeef> Certainly will not have that issue |
17:35:41 | FromDiscord | <guttural666> indeed 😛 |
17:36:36 | FromDiscord | <guttural666> anybody experience in linking nim source with Qt stuff? C++ is giving me testicular cancer |
17:38:39 | FromDiscord | <Elegantbeef> FFI with QT lies madness |
17:40:19 | FromDiscord | <guttural666> have you tried it and is it hard? |
17:41:52 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dXm |
17:42:05 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4dXm" => "https://play.nim-lang.org/#ix=4dXn" |
17:42:08 | FromDiscord | <ringabout> let x = default(A) |
17:42:27 | FromDiscord | <Phil> And `new(A)` for ref types? |
17:42:32 | FromDiscord | <Phil> or default for all? |
17:43:04 | FromDiscord | <ringabout> Yeah, use `new A`, default(A) is still a nil |
17:43:22 | FromDiscord | <ringabout> Don't use `let x = A()` for now because there is a bug to be fixed. |
17:43:32 | FromDiscord | <Elegantbeef> Constructor is now dead to Phil |
17:43:49 | FromDiscord | <Phil> In reply to @Elegantbeef "Constructor is now dead": Not yet confirmed |
17:44:00 | FromDiscord | <Phil> For now I still can't compile my project without it |
17:44:30 | FromDiscord | <ringabout> It needs to fix a problem because ranges in object get a default value by default on the devel branch. |
17:44:32 | FromDiscord | <Phil> And get strange errors like `/home/philipp/.choosenim/toolchains/nim-#devel/lib/pure/collections/tables.nim(269, 6) Error: the field 'data' is not accessible.` |
17:46:56 | * | arkanoid joined #nim |
17:47:01 | arkanoid | what does "--app:console|gui|lib|staticlib" do? |
17:50:24 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dXp |
17:52:46 | FromDiscord | <ringabout> What's the type of key and value? |
17:55:27 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dXr |
17:55:53 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4dXr" => "https://play.nim-lang.org/#ix=4dXs" |
17:57:14 | FromDiscord | <ringabout> Could you possibly provide something I can run? I could give a try tomorrow. |
17:57:40 | FromDiscord | <Phil> I'll try to do a minimal example in a bit, I'm pretty close to get the project to compile |
17:58:02 | FromDiscord | <Phil> Huh, and pretty close means it just compiled, to the drawing board with me then |
17:58:45 | FromDiscord | <Elegantbeef> I mean you need to remove `defaults` |
17:58:50 | FromDiscord | <Elegantbeef> My macro axes all `=` cause they're invalid code |
17:59:31 | FromDiscord | <Phil> Did that, didn't change the issue |
18:00:09 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dXt |
18:00:11 | FromDiscord | <Elegantbeef> Likely is an issue with the new default intializers with an unexported error |
18:00:29 | FromDiscord | <ringabout> I agree so I will check soon |
18:00:31 | FromDiscord | <Phil> I'll cut it down a bit more but that was the quickest example I could whip up |
18:00:38 | FromDiscord | <Elegantbeef> also `newMemberShipTable` likely will not be allowed |
18:00:52 | FromDiscord | <Elegantbeef> iirc initalisers have a static requirement |
18:00:59 | FromDiscord | <Elegantbeef> Though dont know if the present implementation does |
18:01:50 | FromDiscord | <ringabout> It is probably fine |
18:02:05 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dXw |
18:02:47 | FromDiscord | <Phil> In reply to @Elegantbeef "also `newMemberShipTable` likely will": For now I've received neither compiler warnings nor errors for it, so I'm assuming so far I'm safe |
18:02:51 | FromDiscord | <ringabout> In reply to @flywind "It is probably fine": You can use refs in the static context after all. |
18:03:20 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4dXx |
18:03:52 | FromDiscord | <Phil> Wait a sec, sth's fishy, why does it still know of the "CampaignMemberships" type when I deleted that |
18:03:53 | FromDiscord | <Phil> one sec |
18:04:42 | FromDiscord | <Phil> Apparently it creates an alias for you, that's...kinda crazy, but also cool |
18:08:06 | FromDiscord | <guttural666> is it idiomatic to call the main file project_name.nim? or does one use main.nim? |
18:09:51 | FromDiscord | <Phil> In reply to @guttural666 "is it idiomatic to": Generally you'll find more camel case than snake case, and if you use `nimble init` you'll get `projectName.nim` |
18:10:04 | FromDiscord | <Phil> nimble init to initialize your project |
18:10:58 | FromDiscord | <guttural666> so projectName would be the main file typically? |
18:11:06 | FromDiscord | <guttural666> not main.nim |
18:12:41 | FromDiscord | <Phil> pretty much |
18:13:05 | FromDiscord | <Phil> Well, `projectName.nim`, in my case e.g. `nimstoryfont.nim` or `snorlogue.nim` or `tinypool.nim` |
18:14:09 | FromDiscord | <Patitotective> In reply to @guttural666 "is it idiomatic to": for my gui apps i use `main.nim` so its easier to rename the app name :p |
18:16:58 | FromDiscord | <wiga> I have a binary that i need to use in my project, is there a way to embed it and execute it when i run the program? |
18:17:35 | FromDiscord | <wiga> I found "staticRead" and "staticExec" but im not sure if its what i have to use |
18:17:42 | FromDiscord | <guttural666> In reply to @Patitotective "for my gui apps": like that more as well tbh, uniform entry point, easy to find for others |
18:17:45 | FromDiscord | <wiga> And im not sure how i can use it |
18:19:38 | FromDiscord | <guttural666> what's the syntax for importing my own nim files in my project? trying import src/dir_ops.nim atm |
18:22:21 | FromDiscord | <Patitotective> In reply to @guttural666 "what's the syntax for": https://nim-lang.org/docs/manual.html#modules |
18:24:33 | FromDiscord | <Patitotective> In reply to @wiga "I have a binary": do you need to execute it at run time? |
18:31:16 | FromDiscord | <wiga> In reply to @Patitotective "do you need to": Yes |
18:31:36 | FromDiscord | <wiga> Smth like upx does |
18:31:44 | FromDiscord | <wiga> Or any packer/embedder |
18:34:07 | FromDiscord | <guttural666> In reply to @Patitotective "https://nim-lang.org/docs/manual.html#modules": okay, it worked, the language server was just confused |
18:40:07 | FromDiscord | <guttural666> In reply to @exelotl "I'd do `n in": "for e in enum_type" also works mate, this is amazing, sadly no dot contains(int32): bool function I reckon |
18:41:21 | FromDiscord | <guttural666> is there an equiv to cpp lambdas in Nim? |
18:42:12 | FromDiscord | <guttural666> I think I tried defining a proc in a proc last night with let pls = proc ... but it said something about "has to be generic" or smth? |
18:43:56 | FromDiscord | <wiga> In reply to @wiga "Or any packer/embedder": Nvm found how |
18:44:25 | * | xaltsc joined #nim |
18:46:30 | FromDiscord | <guttural666> how do I escape carriage return in code for a string to stop it getting too long https://media.discordapp.net/attachments/371759389889003532/1033813683790422106/unknown.png |
18:46:35 | FromDiscord | <Phil> ElegantBeef , it appears I remain a fan of constructor |
18:47:15 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dXK |
18:48:08 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4dXL |
18:49:07 | FromDiscord | <guttural666> sent a code paste, see https://play.nim-lang.org/#ix=4dXM |
18:49:28 | FromDiscord | <Phil> I assume that is because the fields get values associated with them at compile-time, which is not going to work with stuff like DateTime-fields |
18:50:14 | FromDiscord | <Phil> In reply to @guttural666 "doesn't seem efficient to": I mean, most of the time just throwing in `\n` into my echo's worked for me |
18:50:54 | FromDiscord | <Phil> https://media.discordapp.net/attachments/371759389889003532/1033814793313857566/unknown.png |
18:51:28 | FromDiscord | <guttural666> In reply to @Isofruit "I mean, most of": I mean formatting source code to be able to comply with 80 column width limitations, not formatting program output 😄 |
18:52:06 | FromDiscord | <guttural666> (formatting source code without having to rely on ones own editor, which of course would be able to auto line break what you see) |
18:52:24 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dXN |
18:52:34 | FromDiscord | <Phil> And for carrying over lines...errr that one's a good question |
18:52:36 | FromDiscord | <guttural666> ahhhhh |
18:52:55 | FromDiscord | <guttural666> I'll try this |
18:53:28 | FromDiscord | <Phil> Like, you can break stuff in between brackets in between multiple lines, but for those times where you chain like 5 proc calls... well I think you can break them into separate lines as well but you need to be really damn careful with indentation |
18:54:35 | FromDiscord | <guttural666> the syntax checker seems to be happy with this 🙂 thanks https://media.discordapp.net/attachments/371759389889003532/1033815715951685642/unknown.png |
18:55:11 | FromDiscord | <Phil> In reply to @guttural666 "the syntax checker seems": If you have types whose definition is that long I'd recommend a type alias tbh |
18:55:19 | FromDiscord | <Phil> For the tuple at least |
18:55:23 | FromDiscord | <Horizon [She/Her]> Anyone know if there's a simple-ish way to define a library for async and synchronous use? |
18:55:24 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4dXO |
18:55:33 | FromDiscord | <Patitotective> In reply to @guttural666 "the syntax checker seems": though those are two lines, not one |
18:55:54 | FromDiscord | <Horizon [She/Her]> Would a macro be suitable for that maybe? |
18:56:14 | FromDiscord | <guttural666> In reply to @Isofruit "If you have types": if it's something I would use more often, then I agree yes |
18:56:50 | FromDiscord | <Phil> Fair |
18:57:05 | FromDiscord | <Horizon [She/Her]> `when defined(async`LibraryName`): #do async code`↵`else: #do synchronous code` |
18:58:11 | FromDiscord | <Phil> In reply to @Event Horizon "`when defined(async`LibraryName`): #do async": I'm pretty sure prologue swaps out its entire HTTP server via a when statement, should be feasible.↵If necessary write your own module that has the same public procs wherever you need it |
18:58:19 | FromDiscord | <guttural666> In reply to @Patitotective "though those are two": 2 lines in the output as well you mean? that would not be what I wanted |
18:58:42 | FromDiscord | <Horizon [She/Her]> In reply to @Isofruit "I'm pretty sure prologue": Probably gonna do that yeah |
18:59:04 | FromDiscord | <Horizon [She/Her]> I wonder if there's a way to fuck with macros to define something for async and synchronous use |
18:59:11 | FromDiscord | <Horizon [She/Her]> There'd be no point though lmao |
18:59:49 | FromDiscord | <Phil> In reply to @Event Horizon "I wonder if there's": I mean, you could write a template that tries to compile a piece of code that only works if the async lib is there and otherwise assumes the sync one |
19:00:00 | FromDiscord | <Phil> and then do a when statement around that |
19:00:19 | FromDiscord | <Phil> Though that feels like it's going into Frankenstein territory tbh |
19:00:21 | FromDiscord | <Patitotective> In reply to @guttural666 "2 lines in the": if you use multiline strings, two lines mean two lines |
19:01:40 | FromDiscord | <Elegantbeef> Nim optimises constants so it'll emit `echo "hello world"`↵(@guttural666) |
19:01:47 | FromDiscord | <Horizon [She/Her]> In reply to @Isofruit "I mean, you could": Yeahh fair enough lol |
19:02:41 | FromDiscord | <Horizon [She/Her]> May need a template anyway for deciding against `proc method() {.async.}: Future[T]` `proc method(): T` |
19:02:43 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/asyncmacro.html#multisync.m%2Cuntyped |
19:02:44 | FromDiscord | <Elegantbeef> `{.multisync.}`↵(@Horizon [She/Her]) |
19:02:44 | FromDiscord | <guttural666> In reply to @Elegantbeef "Nim optimises constants so": I figured as much yeah, but no inbuild way to escape a line break? |
19:02:50 | FromDiscord | <Horizon [She/Her]> Though I'd imagine a macro is probably better |
19:02:58 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "`{.multisync.}` (<@909883978717204561>)": Oh? Will read |
19:03:14 | FromDiscord | <Elegantbeef> What are you after guttural? |
19:04:14 | FromDiscord | <Horizon [She/Her]> That's neat! But how do you know if you're using the async or sync variant? :P does it change the name at all? |
19:04:23 | FromDiscord | <Elegantbeef> Same name |
19:04:32 | FromDiscord | <guttural666> In reply to @Elegantbeef "What are you after": line break in a string in code, so that the string (with 1000 chars) will be displayed in a pleasant and readable manner no matter what your editor is capable of auto formatting for you |
19:05:08 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "Same name": Ah so just doing `await` triggers the asynchronous proc, and otherwise it calls the synchronous proc? Useful |
19:05:16 | FromDiscord | <guttural666> (edit) "In reply to @Elegantbeef "What are you after": ... line" added "escaped" |
19:05:23 | FromDiscord | <Elegantbeef> It uses generic dispatch to distinguish between the two |
19:05:23 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/search?q=multisync |
19:07:41 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4dXT |
19:10:17 | FromDiscord | <guttural666> okay, thanks for the info! |
19:11:08 | FromDiscord | <guttural666> I think a lot of these noob question should be dumped on the net to be discovered by search engine crawlers |
19:11:27 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "It uses generic dispatch": Good to know! |
19:11:45 | FromDiscord | <guttural666> + the offical docs need unique adresses for all the entries, like cppreference.com |
19:12:06 | FromDiscord | <guttural666> (edit) "adresses" => "addresses" |
19:12:26 | FromDiscord | <Elegantbeef> 'PRs welcome' 😄 |
19:12:50 | FromDiscord | <guttural666> what's PR? |
19:13:01 | FromDiscord | <Elegantbeef> Pull request |
19:13:04 | FromDiscord | <Phil> In reply to @guttural666 "I think a lot": Do what I do, open SO questions and answer them with what you found out! |
19:13:12 | FromDiscord | <Phil> SO is always nice for searchability |
19:13:40 | FromDiscord | <guttural666> ah 😄 I'm just a noob trying to learn, I don't think I can be of much help, other than being an annoying user asking and complaining 😄 |
19:14:05 | FromDiscord | <guttural666> please no abbrev. |
19:14:08 | FromDiscord | <guttural666> SO? |
19:14:12 | FromDiscord | <Phil> I mean, we all learned at one point in time, figuring things out and then documenting it somewhere is always nice ^^↵SO = Stack Overflow |
19:14:25 | FromDiscord | <Phil> The holy bible of coding knowledge |
19:14:32 | FromDiscord | <Phil> Just holier and more useful |
19:14:33 | FromDiscord | <guttural666> Stack Overflow is a cesspool |
19:14:41 | FromDiscord | <Phil> Absolutely disagreed |
19:15:03 | FromDiscord | <Phil> 9/10 I find the answer on there that I was looking for |
19:15:29 | FromDiscord | <guttural666> yes, I'm talking about UX for people who aren't super pros at everything |
19:15:38 | FromDiscord | <Patitotective> In reply to @guttural666 "please no abbrev.": wdym |
19:15:39 | FromDiscord | <guttural666> just reading, sure |
19:15:39 | FromDiscord | <Phil> Even makes for a pretty damn good webpage to improve coding style (stackexchange.codereview) |
19:15:56 | FromDiscord | <guttural666> In reply to @Patitotective "wdym": SO = stack overflow, didn't get the abbbrevation |
19:16:11 | FromDiscord | <Patitotective> (edit) "In reply to @guttural666 "please no abbrev.": wdym ... " added "/j" |
19:16:15 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4dXW |
19:17:04 | FromDiscord | <guttural666> sent a code paste, see https://play.nim-lang.org/#ix=4dXX |
19:17:16 | FromDiscord | <guttural666> (edit) "https://play.nim-lang.org/#ix=4dXX" => "https://play.nim-lang.org/#ix=4dXY" |
19:17:31 | FromDiscord | <Phil> In reply to @guttural666 "yes, I'm talking about": I entirely disagree with SO's general UI around questions being in any way complicated (for user accounts I agree, but that doesn't detract from the point that the main UI is solid), though I guess that debate belongs in #offtopic |
19:17:59 | FromDiscord | <guttural666> yeah, didn't want to make a fuss about it |
19:18:11 | FromDiscord | <Phil> Though I guess I did accept that Stack-Overflow's internal search is atrocious and you should use google at all times ever |
19:18:27 | FromDiscord | <Phil> or related search engines |
19:18:29 | FromDiscord | <guttural666> duckduckgo/swisscows... |
19:18:31 | FromDiscord | <guttural666> haha |
19:18:48 | FromDiscord | <Phil> Ecosia is giving me pretty solid results lately, likely staying there |
19:19:17 | FromDiscord | <Patitotective> the best search engine is #main |
19:19:18 | FromDiscord | <guttural666> heard of that when I researched alts. but as you said this is offtopic |
19:19:52 | FromDiscord | <Phil> ~~Disagreed for I can't even find discussions where I know I was involved in them from 6 months ago~~ |
19:22:36 | FromDiscord | <Patitotective> In reply to @Isofruit "~~Disagreed for I can't": Search > before:june from:Isofruit#5120 |
19:30:15 | FromDiscord | <guttural666> any Vimmers hier? |
19:30:22 | FromDiscord | <guttural666> Denglisch |
19:30:27 | FromDiscord | <guttural666> -> here |
19:31:09 | FromDiscord | <guttural666> just wondered if there was an auto format tool for nim in vim |
19:34:24 | FromDiscord | <guttural666> + (lots of question): is there an optimal /preferred way in Nim to define Flags like bitsets in C/CPP? |
19:34:39 | FromDiscord | <Generic> set |
19:34:53 | FromDiscord | <guttural666> thanks, will look into that! |
19:35:33 | FromDiscord | <Patitotective> its all in the manual https://nim-lang.org/docs/manual.html#set-type-bit-fields |
19:37:08 | FromDiscord | <guttural666> I have that open at all times, just a bit tricky to a) find out the equiv. nomenclature in Nim and b) find out what "you do" in case xy in Nim yknow |
19:38:09 | FromDiscord | <guttural666> some things to get used to after years of ABAP and hobby C++ 😄 |
19:38:39 | FromDiscord | <Generic> https://github.com/nim-lang/Nim/wiki/Nim-for-C-programmers |
19:38:52 | FromDiscord | <Generic> also my condolences for having to use ABAP |
19:39:08 | FromDiscord | <Elegantbeef> "Hobby C++" isnt that akin to sticking your hand in a meat grinder as a passtime? |
19:40:19 | FromDiscord | <guttural666> hahahahahaha |
19:40:19 | FromDiscord | <Phil> In reply to @Elegantbeef ""Hobby C++" isnt that": TBH I have heard more brutal horror stories around ABAP than C++ |
19:40:31 | FromDiscord | <Phil> In fact, I've heard that C++ with smart pointers is said to be more bearable |
19:40:54 | FromDiscord | <guttural666> ABAP is a fucking breeze, such great UX |
19:41:14 | FromDiscord | <guttural666> C++ on the other hand |
19:41:33 | FromDiscord | <Elegantbeef> That's what big C++ wants you to think |
19:41:38 | FromDiscord | <guttural666> cock & ball torture, mainly because everything is just painful, i.e. reflection |
19:41:43 | Amun-Ra | abap? are all cobol programmers are stone cold by now? |
19:41:55 | Amun-Ra | s/are// |
19:42:10 | FromDiscord | <Phil> I'm pretty sure they just became rarer, I can not imagine all of them being down under by now |
19:42:24 | FromDiscord | <Phil> The power of compelling towards legacy maintenance is too strong for that |
19:42:28 | FromDiscord | <guttural666> In reply to @Amun-Ra "abap? are all cobol": looking at code in my company, apparently not, because they still use cobol idioms to this day |
19:42:46 | Amun-Ra | <; |
19:42:58 | FromDiscord | <guttural666> MOVE x TO pls. |
19:43:01 | FromDiscord | <guttural666> hell yeah |
19:43:42 | FromDiscord | <guttural666> ADD 1 to i. bahahahaha 😄 |
19:43:48 | Amun-Ra | MOVE x TO pls sound very canadian ;) |
19:43:56 | FromDiscord | <guttural666> hahahahaha 😄 |
19:44:00 | FromDiscord | <Phil> Given that even relatively "modern" german Software companies may still stick with a 10 year old java version, I foresee a still long life for cobol |
19:44:04 | Amun-Ra | sounds* |
19:44:27 | FromDiscord | <Phil> Because from what I've heard, banks are even more conservative |
19:44:52 | Amun-Ra | (sorry for those errors, sleep deprivation takes its toll) |
19:44:53 | FromDiscord | <guttural666> yeah, never change a running system ey? 😄 |
19:45:33 | FromDiscord | <Xenon> In reply to @Isofruit "Given that even relatively": COBOL is never gonna die |
19:45:40 | FromDiscord | <guttural666> hahahaha 😄 |
19:45:41 | FromDiscord | <Xenon> it's like C but more tenacious |
19:45:51 | FromDiscord | <Phil> In reply to @guttural666 "yeah, never change a": That works as long as your product isn't a webpage that needs to provide new features all the time, at that point you're starting to marry a frontend framework and then you're in a half-year-update cycle |
19:46:12 | FromDiscord | <guttural666> In reply to @Isofruit "That works as long": hear hear |
19:47:06 | FromDiscord | <guttural666> nah, ABAP is really beautiful tbh. the case insentivieness and preferred writing (keywords upper, other lower) makes it super readable |
19:47:27 | FromDiscord | <guttural666> it's just super ergonomical and well suited for the job |
19:47:38 | FromDiscord | <Elegantbeef> But but this is why people say Nim is unusable, the compiler confuses `word` for `wOrd`↵(@guttural666) |
19:47:59 | FromDiscord | <guttural666> hahahaha |
19:48:06 | FromDiscord | <guttural666> only plebs like me |
19:48:17 | FromDiscord | <Phil> If you ever want to read a book about the wars around what is called "style insensitivity", boy do I have an RFC for you |
19:48:37 | FromDiscord | <guttural666> HAHAHAHAHA 😄 |
19:48:52 | FromDiscord | <Horizon [She/Her]> In reply to @guttural666 "cock & ball torture,": Aren't C++ looking to add reflection soon? Also iirc someone made a clang plugin for reflection too |
19:48:53 | FromDiscord | <Phil> People still write in that thing |
19:49:07 | FromDiscord | <Elegantbeef> C++ has reflection already |
19:49:13 | FromDiscord | <guttural666> In reply to @Event Horizon "Aren't C++ looking to": yeh, 20 years after cool kids did |
19:49:21 | FromDiscord | <Xenon> In reply to @Elegantbeef "C++ has reflection already": uh |
19:49:22 | FromDiscord | <Horizon [She/Her]> In reply to @Elegantbeef "C++ has reflection already": Oh already? Since when? |
19:49:23 | FromDiscord | <Xenon> kinda |
19:49:25 | FromDiscord | <Xenon> not really |
19:49:27 | FromDiscord | <Xenon> like |
19:49:28 | FromDiscord | <Xenon> at all |
19:49:38 | FromDiscord | <guttural666> In reply to @Elegantbeef "C++ has reflection already": not gooood enough! |
19:49:50 | FromDiscord | <guttural666> loop over struct members or GTFO haha |
19:49:51 | FromDiscord | <Elegantbeef> You shouldnt need runtime reflection like ever |
19:50:00 | FromDiscord | <ezquerra> One thing that @Araq did not mention in his 2.0 talk is incremental compilation. Is that totally out of the scope of nim 2.0? |
19:50:34 | FromDiscord | <Horizon [She/Her]> That's already done iirc |
19:50:37 | FromDiscord | <Horizon [She/Her]> For Nim source files |
19:50:54 | FromDiscord | <guttural666> is Araq the bulgarian guy who did some Nim talks, he's really cool |
19:50:55 | FromDiscord | <Horizon [She/Her]> Just use a C compiler that supports incremental compilation and you're gucci |
19:51:10 | FromDiscord | <Horizon [She/Her]> In reply to @guttural666 "is Araq the bulgarian": Araq is one of the founders of Nim |
19:51:21 | FromDiscord | <Phil> In reply to @guttural666 "is Araq the bulgarian": IIRC Araq is a prof in germany as a sidenote |
19:51:25 | FromDiscord | <ezquerra> Is it? If so, I'm surprised it would not be worth mentioning in a talk about what's coming in 2.0... |
19:52:00 | FromDiscord | <guttural666> In reply to @Isofruit "IIRC Araq is a": things to be proud of here: Nim and KDE |
19:52:08 | FromDiscord | <Elegantbeef> No Nim's IC is not done |
19:52:08 | FromDiscord | <Elegantbeef> It can work, but it very much is still not finished |
19:52:45 | FromDiscord | <ezquerra> @ElegantBeef, but it won't be part of 2.0? |
19:53:08 | FromDiscord | <Elegantbeef> Araq is the language creator, and is not bulgarian |
19:53:22 | FromDiscord | <ezquerra> And by _can_ work you mean that you think it is possible to make it work at some point, or that it already works in some cases? |
19:53:46 | FromDiscord | <Phil> Moving this towards more nim technical bits, Beef are you familiar on whether the default-value feature in nim devel is built to assign values at compile-time? |
19:54:29 | FromDiscord | <guttural666> oh, so it's an alias of Andi Rumpf, got it |
19:54:48 | FromDiscord | <Patitotective> isnt it andreas |
19:54:53 | FromDiscord | <Elegantbeef> Let's hope for the worlds sake that's where the german pride ends |
19:54:54 | FromDiscord | <Elegantbeef> No clue i'm not apart of the core dev team |
19:54:56 | FromDiscord | <guttural666> yeh |
19:55:01 | FromDiscord | <Phil> Andi is a common shorthand for Andreas in germany |
19:55:12 | FromDiscord | <guttural666> In reply to @Isofruit "Andi is a common": so it is |
19:55:15 | Amun-Ra | and iirc dom is my countryman |
19:56:22 | FromDiscord | <Generic> Andi Scheuer 🤮 |
19:56:26 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4dY5 |
19:56:39 | FromDiscord | <Phil> In reply to @Generic "Andi Scheuer 🤮": Moderator I am hostile to having this name mentioned in my presnece |
19:56:41 | FromDiscord | <Elegantbeef> By can work it means it works in some isntances |
19:56:42 | FromDiscord | <Elegantbeef> From what araq has said he thinks that only static values should be allowed inside default values |
19:56:42 | FromDiscord | <Phil> (edit) "presnece" => "presence" |
19:56:42 | FromDiscord | <Elegantbeef> It should work regardless of backend |
19:56:58 | FromDiscord | <Phil> (jk) |
19:57:09 | FromDiscord | <guttural666> Andi B. Scheuert |
19:57:35 | FromDiscord | <Phil> In reply to @Elegantbeef "From what araq has": If that's how it'll be implemented constructor is pretty much embedded in my projects forever |
19:58:11 | FromDiscord | <Phil> Because I need solutions that allow me to instantiate objects also with DateTime fields |
19:59:15 | FromDiscord | <guttural666> what is this called in Nim? https://media.discordapp.net/attachments/371759389889003532/1033831991805759590/unknown.png |
19:59:25 | FromDiscord | <Patitotective> pragma |
19:59:36 | FromDiscord | <Patitotective> https://nim-lang.org/docs/manual.html#pragmas |
19:59:37 | FromDiscord | <guttural666> thanks |
19:59:50 | FromDiscord | <guttural666> it's like talking to the compiler yeah? |
19:59:57 | FromDiscord | <Patitotective> yea |
20:00:00 | FromDiscord | <Elegantbeef> `now` isnt static↵(@Phil) |
20:00:07 | FromDiscord | <guttural666> yeah |
20:00:25 | FromDiscord | <Phil> In reply to @guttural666 "it's like talking to": In a sense, you can provide meta information of all kinds, You can even fairly easily add your own pragmas and access them, it requires neither macros nor is it that hard |
20:00:35 | FromDiscord | <Elegantbeef> Araq's reasoning is that "It's better to have the constraint of statics and to back off if it's desired" |
20:01:32 | FromDiscord | <Phil> Meta information can include stating whether certain exceptions will be raised, whether something is gcsafe, telling the compiler to shut up and accept something is gcsafe when it disagrees, enabling or disabling certain compiler checks locally and more |
20:02:51 | FromDiscord | <guttural666> In reply to @Isofruit "Meta information can include": yeah, the power of these tools is just bonkers, that's what I could surmise from the tutorials, still learning the basics now tho |
20:03:27 | FromDiscord | <Phil> In reply to @guttural666 "yeah, the power of": Aye, makes sense, just want to state that these things are easier to grasp than macros ^^ |
20:03:43 | FromDiscord | <Phil> Though there's a lot of things that can be done with them |
20:03:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/ccl |
20:04:09 | FromDiscord | <Elegantbeef> Easy as hell serialisers that skip fields |
20:04:54 | FromDiscord | <guttural666> macros are just a Doom level power fantasy, not sure when I will be able to grasp the real potential of those, I already have real probs grasping what even is possible with C++ templates and compile time evaluations |
20:05:17 | FromDiscord | <Elegantbeef> If you can write code, you can write a macro to automate it |
20:05:29 | FromDiscord | <guttural666> not the primitive examples, I get those, but what even is possible with those tools |
20:05:43 | FromDiscord | <Elegantbeef> Async is implemented in user space with macros |
20:05:52 | FromDiscord | <guttural666> sure, but at that point imagination and creativity is required |
20:06:01 | FromDiscord | <Phil> In reply to @guttural666 "not the primitive examples,": Enthus1ast wrote a templating engine in those called nimja for example |
20:06:12 | FromDiscord | <Phil> Ormin as an ORM makes heavy use of them IIRC |
20:06:40 | FromDiscord | <Phil> Beef's constructor package generates object-construction procs with default values for you which has been a godsend for me and such a valuable feature they added it in nim 2 |
20:07:04 | FromDiscord | <Phil> (which is currently the devel branch of the compiler) |
20:07:53 | FromDiscord | <guttural666> what does devel mean |
20:08:23 | FromDiscord | <Phil> devel is the name of a git branch where the current in-development version of nim is |
20:08:34 | FromDiscord | <guttural666> okay thanks |
20:21:32 | FromDiscord | <guttural666> if anybody's bored, you can look at my 100loc Num noob code to extract files from subfolders command line tool 😄 very proud indeed haha |
20:21:34 | FromDiscord | <guttural666> https://gitlab.com/hansdampfinger666/flubber |
20:22:19 | FromDiscord | <Elegantbeef> Enums dont need commas or `()` around strings |
20:25:14 | FromDiscord | <guttural666> you mean it could be ↵none = "none"↵pls = "pls" |
20:25:30 | FromDiscord | <guttural666> if I want to keep the 0...n numbering? |
20:26:10 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4dYc |
20:26:30 | FromDiscord | <guttural666> looks good, syntax checker doesn't complain, thanks for the heads up |
20:26:43 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/PVi |
20:26:47 | FromDiscord | <Elegantbeef> Whoops missed a `(` |
20:26:52 | FromDiscord | <guttural666> got it |
20:26:56 | FromDiscord | <guttural666> thanks! |
20:27:23 | FromDiscord | <guttural666> okay, haven't dealt with exceptions yet |
20:27:28 | FromDiscord | <guttural666> gonna save that snippet |
20:29:31 | FromDiscord | <guttural666> do you use empty lines to relax the visual strain? the pure indent based syntax makes it a bit tricky, but I can't help myself throwing new lines in between single line statement blocks and multi line blocks for readability |
20:29:36 | FromDiscord | <Elegantbeef> I swear kate really just doesnt like me, downloaded the nightly appimage, my code suggestions work but the project plugin doesnt. Built from source, the project plugin works, but i have the same broken code suggestions |
20:29:57 | FromDiscord | <Elegantbeef> Of course you use emtpy lines to reduce visual noise |
20:30:04 | FromDiscord | <Elegantbeef> Just cause it's singificant white space doesnt mean you cannot have insignificant whitespace 😛 |
20:30:05 | FromDiscord | <guttural666> Vim works great with the plugins and all, really recommended |
20:30:17 | FromDiscord | <guttural666> hehehe |
20:30:17 | FromDiscord | <guttural666> okay |
20:30:21 | FromDiscord | <Elegantbeef> Cool if i want to go back to 1993 i'll consider it |
20:30:37 | FromDiscord | <Elegantbeef> I use vim for one off things, not for a serious editor |
20:31:35 | FromDiscord | <auxym> vscode with vim keybindings is king |
20:31:51 | FromDiscord | <guttural666> if this doesn't whet your toungue I dunno what will https://media.discordapp.net/attachments/371759389889003532/1033840198519361536/unknown.png |
20:32:26 | FromDiscord | <Elegantbeef> I cannot stand the fact everything is alligned to a text grid |
20:32:31 | FromDiscord | <guttural666> https://media.discordapp.net/attachments/371759389889003532/1033840365955985479/unknown.png |
20:32:44 | FromDiscord | <auxym> vim isn't the only editor that can do pretty colors and a translucid bg 😉 |
20:33:08 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1033840521594024047/image.png |
20:33:09 | FromDiscord | <Elegantbeef> nice |
20:33:25 | FromDiscord | <auxym> +1 for fish indeed |
20:33:25 | FromDiscord | <guttural666> In reply to @auxym "vim isn't the only": heresy |
20:33:34 | FromDiscord | <guttural666> fish is just so guuuuud |
20:33:48 | FromDiscord | <guttural666> + Garuda Linux KDE, pure luv |
20:33:56 | FromDiscord | <Elegantbeef> But yea this is what i'm dealing with |
20:33:57 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1033840725357506651/image.png |
20:34:18 | FromDiscord | <Elegantbeef> The suggestion window is gone, but the description window is there |
20:34:18 | FromDiscord | <Elegantbeef> Fuck me amirite |
20:34:43 | FromDiscord | <guttural666> heheheh |
20:35:25 | FromDiscord | <Elegantbeef> The best part is that it works properly briefly, but then suddenly stops |
20:35:27 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1033841104317063269/image.png |
20:35:36 | FromDiscord | <Elegantbeef> I blame debian sid |
20:35:47 | FromDiscord | <guttural666> that looks pretty solid |
20:36:11 | FromDiscord | <guttural666> with the icons and all, very nice indeed |
20:36:27 | FromDiscord | <Elegantbeef> Yea kate works well, when it doesnt shit on your door step and run away |
20:36:59 | FromDiscord | <guttural666> yeah, Kate is pretty good, but KDevelop is not so good imo |
20:37:49 | FromDiscord | <guttural666> wonder why, must be sharing some of their code bases |
20:38:03 | FromDiscord | <guttural666> Debugger in KDevelop is a joke |
20:38:12 | FromDiscord | <Elegantbeef> They're both based on KTextWrite or w/e the KDE writing stuff |
20:40:29 | FromDiscord | <guttural666> okay |
20:41:04 | * | qwestion joined #nim |
20:42:54 | FromDiscord | <guttural666> just can't stand using the mouse anymore, just makes everything slow and painful, browsing with the Firefox Vim short cut extension is amazing btw. |
20:43:14 | FromDiscord | <guttural666> also Eclipse Vim Mode for ABAP uuuuuiiii |
20:43:20 | FromDiscord | <guttural666> chef's kiss |
20:52:49 | * | xaltsc quit (Quit: WeeChat 3.7.1) |
20:53:07 | * | xaltsc joined #nim |
20:56:38 | * | xaltsc quit (Client Quit) |
20:57:03 | * | xaltsc joined #nim |
21:11:41 | FromDiscord | <guttural666> how do I only extract the nth value of a return tuple? https://media.discordapp.net/attachments/371759389889003532/1033850221341462618/unknown.png |
21:16:13 | FromDiscord | <Patitotective> In reply to @guttural666 "how do I only": indexing, just like an array |
21:16:30 | FromDiscord | <Elegantbeef> `let (_, _, ext) = f.splitFile()` or `let ext = f.splitFile()[2]` |
21:18:53 | FromDiscord | <guttural666> ident through name alone would not be possible? |
21:19:20 | FromDiscord | <guttural666> position may be subject to change |
21:21:03 | FromDiscord | <guttural666> the API will prob never break, so anyway |
21:21:05 | FromDiscord | <guttural666> thanks! 😄 |
21:21:18 | FromDiscord | <guttural666> hardcoded [2] it is |
21:21:55 | FromDiscord | <guttural666> should probably not complain, I wish I had index access to members in C/CPP structs |
21:22:22 | FromDiscord | <Patitotective> `f.splitFile().ext` (?↵) |
21:22:24 | FromDiscord | <Patitotective> (edit) "(?↵)" => "(?)" |
21:22:42 | FromDiscord | <guttural666> Bjarne why have you forsaken me |
21:22:57 | FromDiscord | <guttural666> In reply to @Patitotective "`f.splitFile().ext` (?)": what is this black magic |
21:23:32 | FromDiscord | <Patitotective> you can access named tuples just like object fields |
21:23:55 | FromDiscord | <guttural666> oh! |
21:23:58 | FromDiscord | <Patitotective> you should read some tutorial https://nim-lang.org/documentation.html |
21:24:11 | FromDiscord | <Patitotective> (edit) "tutorial" => "tutorials" |
21:24:22 | FromDiscord | <wiga> What IDE you guy using? |
21:24:24 | FromDiscord | <wiga> For nim |
21:24:29 | FromDiscord | <guttural666> suuure |
21:24:43 | FromDiscord | <Patitotective> In reply to @wiga "What IDE you guy": does sublime count? |
21:24:43 | FromDiscord | <guttural666> yeah, thanks mate!! |
21:24:46 | FromDiscord | <guttural666> Vim |
21:24:50 | FromDiscord | <wiga> In reply to @Patitotective "does sublime count?": Yes |
21:25:10 | FromDiscord | <wiga> Anything that has code completion |
21:25:18 | FromDiscord | <guttural666> Vim haha |
21:25:49 | FromDiscord | <wiga> Very Idiot Man (sry i had to say it) |
21:34:51 | * | fanta1 quit (Quit: fanta1) |
21:37:06 | FromDiscord | <guttural666> it's super effective |
21:40:36 | FromDiscord | <guttural666> also it's Voluptuous Incessant Manliness |
21:56:29 | FromDiscord | <Elegantbeef> Incestuous\ |
21:58:57 | FromDiscord | <Bung> oh, three word dont in my programming english dictionary. |
22:04:06 | FromDiscord | <Bung> https://github.com/nim-lang/Nim/pull/20636 Elegantbeef how's this look |
22:14:33 | FromDiscord | <Elegantbeef> I'm uncertain what a 'forwardGeneric' means |
22:19:19 | FromDiscord | <Bung> hmm, CI fails, doesn't work, think the behavior should same as arc does |
22:20:35 | FromDiscord | <Bung> I thought when formal type allow generic and given tyForward that can return isGeneric |
22:20:52 | FromDiscord | <albassort> Nim works on microprocessors right |
22:20:58 | FromDiscord | <albassort> As long as I have GC off |
22:21:11 | FromDiscord | <Elegantbeef> you can just use `--mm:arc` |
22:21:18 | FromDiscord | <albassort> Ahh |
22:21:28 | FromDiscord | <albassort> Now I just need to figure out how microprocessors work |
22:22:24 | FromDiscord | <albassort> I want to store my code on nand and on init, it reads from nand and enters main |
22:22:41 | FromDiscord | <albassort> And you update the firmware by flashing nand with a new binary |
22:22:56 | FromDiscord | <albassort> Inb4 That's how it already works |
22:44:15 | * | krux02 quit (Read error: Connection reset by peer) |
23:45:16 | * | jmdaemon joined #nim |
23:56:28 | FromDiscord | <auxym> assuming you mean microcontrollers, #embedded . FYI microprocessor == "CPU" as in any normal computer |
23:57:14 | * | wallabra quit (Ping timeout: 276 seconds) |
23:58:11 | * | wallabra joined #nim |