00:36:17 | * | pch quit (Ping timeout: 248 seconds) |
00:37:22 | FromDiscord | <codic> it would almost definitely be inlined in release build |
00:37:25 | FromDiscord | <codic> builds |
00:37:43 | * | pch joined #nim |
01:47:33 | * | Jjp137 quit (Quit: Leaving) |
01:47:41 | * | Jjp137 joined #nim |
01:52:00 | FromDiscord | <Ricky Spanish> Anyone know if you can use a in memory file descriptor as a full file input to a command u want to execute? I have a binary that requires a - f flag so requires a full path and can't pipe input, is it possible to pass it a memfd instead? |
02:01:00 | * | arkurious quit (Quit: Leaving) |
02:05:57 | * | ecs quit (Ping timeout: 245 seconds) |
02:06:22 | * | blackbeard420 quit (Ping timeout: 245 seconds) |
02:06:33 | * | blackbeard420 joined #nim |
02:07:12 | * | lucerne quit (Ping timeout: 245 seconds) |
02:07:28 | * | ecs joined #nim |
02:08:10 | * | lucerne joined #nim |
02:08:32 | FromDiscord | <deech> Aside from the Nim forum are there any publicly accessible sites that use the js backend? |
02:09:20 | FromDiscord | <deech> Trying to get a feel for payload size and what the resulting JS looks like. |
02:10:49 | FromDiscord | <Elegantbeef> It's not too bad, it's not minified though |
02:11:08 | FromDiscord | <Elegantbeef> You can make a relatively simple nim program and then `nim js -d:release` on it |
02:12:10 | FromDiscord | <deech> I've done that for small things. Just wondered if there were any in the wild I could explore. |
02:13:26 | FromDiscord | <Elegantbeef> Could checkout impbox and my games |
02:13:30 | FromDiscord | <Elegantbeef> But aside from that idk |
02:15:33 | FromDiscord | <deech> Cool! Can you link some of your stuff? |
02:16:10 | FromDiscord | <Elegantbeef> https://itch.io/c/1064082/games-made-with-nico dont know if burger stack uses wasm or js, but most of the stuff here is going to be js |
02:16:59 | FromDiscord | <Elegantbeef> Some of impbox's games are open source so you could see the non itch minified code |
02:17:02 | FromDiscord | <Elegantbeef> Forgot it minified it |
02:33:14 | FromDiscord | <xflywind> see also https://stardust.dev/play/client.js?t=1627224317 |
02:33:27 | FromDiscord | <xflywind> nim js + closure compiler |
03:10:09 | FromDiscord | <impbox [ftsf]> The js output is not particularly readable, but you can debug it in browser easily |
03:35:07 | * | pch_ joined #nim |
03:35:07 | * | pch quit (Read error: Connection reset by peer) |
04:06:01 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:30 | * | supakeen joined #nim |
05:20:14 | * | pro joined #nim |
05:32:25 | * | pch_ is now known as pch |
06:08:11 | FromDiscord | <treeform> In reply to @Sorrow "Just a basic script": If you are on windows and only using http client to make simple http calls and don't want dll dependencies on the libssl.dll and the libeay64.dll try out my library https://github.com/treeform/puppy which just uses the windows API to fetch stuff from URLs. It does not require any external dlls. |
06:08:14 | nrds | <prestigebot99> itHub: 7"Puppy fetches HTML pages for Nim." |
06:10:33 | FromDiscord | <treeform> In reply to @rishavs (Rishav Sharan) "@treeform does https://github.com/treeform/pg being": I use it in production. Did you find a bug? |
06:10:34 | nrds | <prestigebot99> itHub: 7"Very simple PostgreSQL async api for nim." |
06:10:53 | FromDiscord | <treeform> In reply to @tandy "it doesnt sadly": I should add that. |
06:12:23 | FromDiscord | <treeform> In reply to @tandy "how can i test": I usually add print statements into the hooks, if its rough tough I also throw a quit() in there. |
06:14:04 | FromDiscord | <treeform> sent a code paste, see https://play.nim-lang.org/#ix=3wBq |
06:16:35 | FromDiscord | <treeform> In reply to @Chiggy "looks like jsony doesnt": You right it does not, I could make that better. |
06:20:56 | * | beshr joined #nim |
06:32:16 | FromDiscord | <Chiggy> In reply to @treeform "You right it does": That would be pretty sweet. Currently I am just using the dump hook and manually appending data to string. It doesnt matter much tho |
06:34:28 | * | xxov joined #nim |
06:47:57 | FromDiscord | <JSONBash> @treeform does jsony have equivalents to the std/json JsonNode types? Use case is explicit conversion in a case statement |
06:51:19 | FromDiscord | <treeform> jsony uses the std/json JsonNode types, so they are interchangeable. |
06:52:37 | FromDiscord | <treeform> jsony's fromJson() will give you a JsonNode, same as std/json parseJson will. |
06:53:41 | FromDiscord | <JSONBash> Ohhh sweeeeet thanks ! |
06:54:42 | FromDiscord | <treeform> See https://github.com/treeform/jsony#full-support-for-json-in-json you can parse the parts that are regular (or that you know about as objects) but parse things that are strange, hard to parse or unknown as JsonNode. |
06:54:43 | nrds | <prestigebot99> itHub: 7"A loose, direct to object json parser with hooks." |
06:56:11 | FromDiscord | <JSONBash> If I understand, toJson return JsonNode and I could do .getStr()? |
06:57:41 | FromDiscord | <JSONBash> Yeah I obviously can, once it’s a JsonNode it’s a JsonNode |
06:58:39 | * | jjido joined #nim |
07:19:01 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
07:26:36 | FromDiscord | <treeform> Yep |
07:39:22 | * | jjido joined #nim |
07:46:26 | * | max22- joined #nim |
07:49:07 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
07:56:40 | * | xxov quit (Ping timeout: 246 seconds) |
07:58:26 | * | xxov joined #nim |
08:16:21 | * | xet7 quit (Remote host closed the connection) |
08:17:11 | * | xet7 joined #nim |
08:34:00 | * | KurtGodel left #nim (Closing Window) |
08:51:01 | * | jjido joined #nim |
09:01:50 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
09:26:37 | FromDiscord | <rishavs (Rishav Sharan)> > I use it in production. Did you find a bug?↵No bug @treeform . I had added the nim stdlib test to techempower but the performance, mainly due to a lack of async drivers, was bad. Wondering if your pg drivers have better perf than db\_postgres and if you have benchmarked the two |
09:32:40 | * | kayabaNerve quit (Ping timeout: 252 seconds) |
09:53:20 | * | kayabaNerve joined #nim |
09:54:28 | * | flynn quit (Read error: Connection reset by peer) |
09:55:35 | * | flynn joined #nim |
10:06:13 | * | xxov quit (Quit: Client closed) |
10:52:14 | FromDiscord | <PsychoClay> sent a code paste, see https://paste.rs/Z2v |
11:15:04 | FromDiscord | <Rika> repr of a channel? |
11:15:21 | FromDiscord | <Rika> did you mean recv? |
11:15:26 | FromDiscord | <PsychoClay> no |
11:15:41 | FromDiscord | <Rika> what do you expect to get from repr of a channel? |
11:15:45 | FromDiscord | <PsychoClay> if its a Channel[string] or Channel[int] it works |
11:15:55 | FromDiscord | <PsychoClay> just not Channel[SomeObject] |
11:16:00 | FromDiscord | <Rika> In reply to @Rika "what do you expect": . |
11:16:08 | FromDiscord | <PsychoClay> idk some text |
11:16:20 | FromDiscord | <PsychoClay> i just dont understand why it would crash |
11:17:01 | FromDiscord | <PsychoClay> also if u dont call send first it doesnt crash |
11:18:53 | FromDiscord | <Rika> perhaps a bug with repr, but i dont think this would be classified as high priority |
11:19:10 | * | flynn quit (Read error: Connection reset by peer) |
11:20:06 | FromDiscord | <Rika> no segfault if i remove the `id` field |
11:20:26 | * | flynn joined #nim |
11:20:28 | FromDiscord | <Rika> or the `target` field |
11:20:49 | FromDiscord | <Rika> ah wait i think that has to do with the single-field object optimisation or something |
11:28:25 | FromDiscord | <PsychoClay> maybe i should just make my own channel implementation |
11:28:47 | FromDiscord | <Rika> i dont see how getting the repr of a channel is important |
11:28:59 | FromDiscord | <Rika> and it's hard to get channels right i'm led to believe |
11:29:24 | FromDiscord | <PsychoClay> its just a queue with a lock right? |
11:47:29 | * | Vladar joined #nim |
11:52:44 | FromDiscord | <dain> https://nim-lang.org/docs/manual.html#methods↵↵can someone explain the purpose of this? I don't understand why we need to use dynamic dispatch here. surely all the types are known in the code snippet? why couldn't eval just be defined as a number of procs with different signatures? |
11:53:26 | FromDiscord | <Rika> its just an example |
11:55:02 | * | max22- quit (Ping timeout: 245 seconds) |
11:55:57 | FromDiscord | <dain> oh |
11:56:01 | FromDiscord | <dain> so where would you use it |
11:58:47 | FromDiscord | <haxscramper> eval on `seq[Expression]` or something like that |
11:58:47 | FromDiscord | <haxscramper> Or `parse(): Expresssion` |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:31 | * | supakeen joined #nim |
12:55:15 | * | arkurious joined #nim |
13:15:42 | NimEventer | New thread by Alexeypetrushin: Nim stability problem, change imports slightly, and you program is broken, see https://forum.nim-lang.org/t/8347 |
13:31:51 | FromDiscord | <planetis> i feel his pain thats also my most annoying nim bug |
13:35:11 | FromDiscord | <planetis> i was trying to overload supportsCopyMem the other day, still havent figured it out |
13:49:49 | NimEventer | New thread by Kalbhairab: Recursive function not working, see https://forum.nim-lang.org/t/8348 |
14:08:55 | * | jjido joined #nim |
14:21:37 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
14:55:18 | * | jjido joined #nim |
15:02:40 | * | max22- joined #nim |
15:07:15 | FromDiscord | <dankrad> sent a code paste, see https://play.nim-lang.org/#ix=3wBF |
15:18:24 | FromDiscord | <dankrad> well, i got it working |
15:51:28 | FromDiscord | <xflywind> what does "wrt" mean in Nim docs? Does it mean "with regard to"? |
15:52:09 | FromDiscord | <xflywind> For instance: `brOpen, ## open wrt overloaded symbols` |
15:52:22 | FromDiscord | <xflywind> How to understand it? |
15:53:14 | FromDiscord | <xflywind> (edit) "understand" => "explain" |
15:58:26 | * | Vladar_ joined #nim |
15:58:35 | * | Vladar_ quit (Client Quit) |
16:05:04 | FromDiscord | <Sorrow> In reply to @treeform "If you are on": Will check it out soon, thanks. |
16:19:32 | FromDiscord | <treeform> In reply to @rishavs (Rishav Sharan) "> I use it": I have not bench marked my `pg` lib vs std `db_postgres`. `pg` is just a simple wrapper around the std `db_postgres` lib that ads async (its just 100 lines https://github.com/treeform/pg/blob/master/src/pg.nim ). I don't think it will be faster in absolute sense. PostgreSQL has a complex story with parallelism usually its the bottleneck. I would use PostgreSQL perf tools increase perfo |
16:46:07 | FromDiscord | <⃟⃟> i feel this language should have some major changes |
16:46:13 | FromDiscord | <⃟⃟> perhaps a major version 2 |
16:46:59 | FromDiscord | <⃟⃟> i would rework the syntax and standard library |
16:48:44 | FromDiscord | <konsumlamm> feel free to write an RFC about what you think should be changed |
16:48:49 | FromDiscord | <Rika> You are free to fork the language and work on your improvements |
16:49:01 | FromDiscord | <konsumlamm> there definitely will be a version 2, but it likely won't have any huge changes |
16:49:05 | FromDiscord | <⃟⃟> if i did it alone it would take me too long |
16:49:12 | FromDiscord | <⃟⃟> how do i make that thing you said |
16:49:36 | FromDiscord | <konsumlamm> you open an issue here: https://github.com/nim-lang/RFCs |
16:49:39 | nrds | <prestigebot99> itHub: 7"A repository for your Nim proposals." |
16:49:42 | FromDiscord | <⃟⃟> i dont use that website |
16:49:55 | FromDiscord | <konsumlamm> that website called github? |
16:49:57 | FromDiscord | <⃟⃟> yes |
16:50:11 | FromDiscord | <konsumlamm> you'll have trouble changing anything about Nim then |
16:50:26 | FromDiscord | <haxscramper> what is wrong with the syntax reaally |
16:50:43 | FromDiscord | <haxscramper> just couple things that you need get used to, like `f (a, b)` vs `f(a, b)` |
16:50:53 | FromDiscord | <Rika> You can try using the forum |
16:50:59 | FromDiscord | <⃟⃟> and also `f (a)` |
16:51:05 | FromDiscord | <⃟⃟> knowing that this is not a tuple |
16:51:20 | FromDiscord | <haxscramper> and reworking of the standard library (certain modules) has already been discussed in seveal placed and it is a known problem |
16:51:23 | FromDiscord | <Rika> Why would it be? |
16:51:26 | FromDiscord | <haxscramper> specifically os/json modules |
16:51:35 | FromDiscord | <⃟⃟> because `f (a, b)` is |
16:51:36 | FromDiscord | <konsumlamm> why on earth should `(a)` be a tuple |
16:51:44 | FromDiscord | <konsumlamm> that's not the logic behind this |
16:51:46 | FromDiscord | <Rika> The comma makes the tuple |
16:51:51 | FromDiscord | <Rika> Not the parentheses |
16:51:59 | FromDiscord | <konsumlamm> ^ the space doesn't magically turn arguments into a tuple |
16:52:11 | FromDiscord | <⃟⃟> so the comma is some kind of operator? |
16:52:11 | FromDiscord | <konsumlamm> it just happens to be the same syntax as for function calls |
16:52:14 | FromDiscord | <Rika> No |
16:52:29 | FromDiscord | <Rika> Well you can treat it like such if you want |
16:52:40 | FromDiscord | <⃟⃟> `f a,b` does this work?↵`f a,` this? |
16:53:04 | FromDiscord | <konsumlamm> first yes, but it means `f(a, b)` |
16:53:08 | FromDiscord | <konsumlamm> second idk, try it |
16:53:14 | FromDiscord | <haxscramper> second is a syntax error |
16:53:19 | FromDiscord | <haxscramper> !eval f a, |
16:53:21 | NimBot | Compile failed: /usercode/in.nim(1, 5) Error: invalid indentation |
16:53:27 | FromDiscord | <⃟⃟> all these rules are reminding me of c++ |
16:53:39 | FromDiscord | <Rika> The rules are the same in Python |
16:53:45 | FromDiscord | <⃟⃟> i dont like python |
16:53:50 | FromDiscord | <Rika> Save for the function call syntax |
16:53:58 | FromDiscord | <Rika> Then you are using the wrong language I would be led to believe |
16:53:58 | FromDiscord | <haxscramper> except you have magic `print` "operator" and other things that don't work like this |
16:54:40 | FromDiscord | <⃟⃟> pythons (3) syntax is confusing in other ways |
16:54:50 | FromDiscord | <Rika> If you want to make really radical changes to Nim, either do them yourself or somehow convince everyone else working with it to implement the changes |
16:54:54 | FromDiscord | <⃟⃟> nim seems to have avoided those but now introduced other problems |
16:55:11 | FromDiscord | <Rika> Striving for perfection is tedious |
16:56:42 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wC2 |
16:57:05 | FromDiscord | <⃟⃟> the last two are doing different things |
16:57:13 | FromDiscord | <Rika> They aren’t, try it |
16:57:16 | FromDiscord | <haxscramper> the last two are doing the same thing |
16:57:52 | FromDiscord | <haxscramper> it just shows that you can pass arguments to the `.echo` the same way |
16:57:58 | FromDiscord | <haxscramper> as any regular proc invocation |
16:58:06 | FromDiscord | <⃟⃟> so that isnt calling echo with 2 strings instead of 1 ? |
16:58:24 | FromDiscord | <Rika> Ah |
16:58:35 | FromDiscord | <Rika> That’s what you mean |
16:58:48 | FromDiscord | <Rika> That is right, it is with two parameters instead of one |
16:58:50 | FromDiscord | <haxscramper> it shows that you can pass arguments to the proc using dot sntax |
16:59:09 | FromDiscord | <haxscramper> `echo("hello", " world")` `echo "hello", " world"` |
16:59:09 | FromDiscord | <⃟⃟> im already familiar with this ufcs feature cause of D |
16:59:21 | FromDiscord | <haxscramper> so what is the problem then? |
16:59:38 | FromDiscord | <⃟⃟> just because i know how it works dosent meant i like it |
16:59:41 | FromDiscord | <Rika> The command syntax is probably his issue |
16:59:50 | FromDiscord | <haxscramper> command syntax and tuples |
17:00:05 | FromDiscord | <Rika> I don’t understand, no language fits your liking perfectly unless you make it yourself |
17:00:33 | FromDiscord | <konsumlamm> it probably won't even fit then |
17:01:13 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wC7 |
17:01:43 | FromDiscord | <⃟⃟> from what i understand nim dosent have methods so ufcs is probably not that big of a concern actually |
17:01:47 | FromDiscord | <⃟⃟> but the tuple thing |
17:01:51 | FromDiscord | <⃟⃟> and the omitting () |
17:02:03 | FromDiscord | <haxscramper> it is super useful |
17:02:11 | FromDiscord | <Rika> Just don’t use the syntax if you don’t like it |
17:02:21 | FromDiscord | <⃟⃟> thats not a valid response |
17:02:25 | FromDiscord | <Rika> Why not |
17:02:40 | FromDiscord | <haxscramper> what is problematic? you personally don't like this feature while everyone else seemsm to like it very mych |
17:02:45 | FromDiscord | <⃟⃟> do you think im not going to be reading code that uses it? |
17:02:54 | FromDiscord | <Rika> Then do not use Nim. |
17:03:09 | FromDiscord | <⃟⃟> id rather just have them fix the problems than ditch the language |
17:03:19 | FromDiscord | <haxscramper> that is not a problem |
17:03:24 | FromDiscord | <Rika> They are YOUR PERSONAL PROBLEMS |
17:03:28 | FromDiscord | <haxscramper> ^ |
17:03:39 | FromDiscord | <Rika> I will no longer entertain you, goodbye |
17:03:45 | FromDiscord | <konsumlamm> if you really want this to change, write an RFC |
17:03:59 | FromDiscord | <konsumlamm> if you don't want to write an RFC because github bad, then you're out of luck, i'm sorry |
17:04:37 | FromDiscord | <haxscramper> idk it is really annoying when someone comes around and starts throwing suggestions/talks about nim being "broken", "weird syntax", having "latent bugs" and "weird semantics" and points out exact parts of the language( |
17:04:50 | FromDiscord | <haxscramper> that are really the foundation of a syntax etc |
17:04:51 | FromDiscord | <Rika> In reply to @Rika "I will no longer": Because I’ve gotten too mad, if you wonder why |
17:05:02 | FromDiscord | <haxscramper> like style insensetivity, indentiation, ufcs, variable shadowing |
17:05:36 | FromDiscord | <haxscramper> i understand when people shit on async, threading and error messages |
17:05:36 | FromDiscord | <konsumlamm> yo guys, i think we should change Nim to have C like syntax, instead of this indentation sensitive crap /s |
17:05:42 | FromDiscord | <⃟⃟> please no |
17:05:48 | FromDiscord | <⃟⃟> C syntax is |
17:05:51 | FromDiscord | <⃟⃟> :| |
17:06:13 | FromDiscord | <codic> c syntax is awesome |
17:06:13 | FromDiscord | <haxscramper> but I like curly delimiters more |
17:06:15 | arkanoid | I'm dealing with an XmlNode.items that returns a nil. I think that this might be a bug in xmltree |
17:06:19 | FromDiscord | <codic> but if you don't like what nim is, use another language |
17:06:29 | FromDiscord | <codic> or propose the changes to fix it for you |
17:06:29 | FromDiscord | <⃟⃟> i would like `{}` too |
17:06:30 | FromDiscord | <haxscramper> like seriously, and it makes easier to write pretty-printers |
17:06:46 | FromDiscord | <haxscramper> and parse with tree-sitter etc. as well |
17:06:48 | FromDiscord | <⃟⃟> makes you think more about the structure of the code |
17:07:05 | FromDiscord | <konsumlamm> btw, since you apparently know D, what made you try out Nim? |
17:07:41 | FromDiscord | <⃟⃟> because D has so much it confuses me |
17:08:14 | FromDiscord | <⃟⃟> if i start looking into it i learn some new feature or something |
17:08:21 | FromDiscord | <⃟⃟> started feeling like c++ |
17:08:52 | FromDiscord | <Rika> I’ve cooled down |
17:08:53 | FromDiscord | <haxscramper> nim has a lot of features too, though they don't fell like "lets dump together everything at once" |
17:09:05 | FromDiscord | <haxscramper> macros ... |
17:09:08 | FromDiscord | <Rika> If you really want, the best you can do is to make a tool to enforce styles |
17:09:26 | FromDiscord | <⃟⃟> does it have a spec i can read? |
17:09:35 | FromDiscord | <Rika> But then don’t expect people to follow you in fixing the “problems” |
17:09:38 | FromDiscord | <dom96> In reply to @haxscramper "i understand when people": We shouldn't "shit on" anything, instead have constructive arguments for how things could be better |
17:09:59 | FromDiscord | <haxscramper> ye, of course everyone should be good, and all, etc etc. |
17:10:20 | FromDiscord | <haxscramper> nobody should ever get emotional over anything |
17:10:23 | FromDiscord | <haxscramper> but it happens sometimes |
17:10:48 | FromDiscord | <dom96> true |
17:11:00 | FromDiscord | <haxscramper> In reply to @⃟⃟ "does it have a": nim https://nim-lang.org/docs/manual.html is closes to the spec you can get |
17:11:11 | FromDiscord | <haxscramper> also compiler test suite and unit tests |
17:11:27 | FromDiscord | <haxscramper> don't have C++ level of spec right now |
17:11:47 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
17:11:54 | FromDiscord | <Rika> In reply to @Rika "If you really want,": Perhaps we should make the tool to appease this audience, but then that may spawn many unwarranted issues and whatsoever |
17:12:09 | FromDiscord | <haxscramper> `import compiler/` |
17:12:13 | FromDiscord | <Rika> So far we only have one for NEP |
17:12:57 | FromDiscord | <haxscramper> In reply to @haxscramper "`import compiler/`": https://github.com/haxscramper/hack/blob/master/testing/nim/compilerapi/pattern_linter.nim @⃟⃟ if you want to write own compiler-based tools for syntax |
17:14:33 | FromDiscord | <haxscramper> Good thing about nim is that you can actually use compiler API without begin CS professor |
17:16:13 | FromDiscord | <⃟⃟> looking at this manual there are alot of things i like and some i dont like |
17:16:27 | FromDiscord | <haxscramper> well, that is expected |
17:16:39 | FromDiscord | <haxscramper> I think everyone could say this |
17:16:46 | FromDiscord | <Rika> Yes |
17:17:03 | FromDiscord | <haxscramper> I'm not a big fan of `Defect` existing |
17:17:39 | FromDiscord | <⃟⃟> for some things they just give you the algorithm instead of explaining it in words (and they also say its pseudo code...) |
17:18:25 | FromDiscord | <Rika> Docs are plenty lacking yes |
17:18:39 | FromDiscord | <⃟⃟> also what is `{a,b,c}` |
17:18:54 | FromDiscord | <Rika> Set |
17:20:22 | FromDiscord | <haxscramper> In reply to @⃟⃟ "for some things they": Actually it is problematic because people who write manual can't really know if it is simple enough |
17:20:48 | FromDiscord | <haxscramper> Sadly you don't use github, but you can at least make a forum post and ask for clarifications for example |
17:21:16 | FromDiscord | <haxscramper> Not "this part is bad" but something ... I'm sure I don';t need to explain in detail how to ask questions |
17:21:16 | FromDiscord | <⃟⃟> the docs also use `{| |}` for scopes |
17:21:21 | FromDiscord | <⃟⃟> confused me |
17:21:29 | FromDiscord | <⃟⃟> not sure if thats even valid syntax or what |
17:21:45 | FromDiscord | <haxscramper> This is not a valid syntax |
17:22:03 | FromDiscord | <haxscramper> It does it for if statement only, |
17:22:25 | FromDiscord | <⃟⃟> should be removed |
17:22:35 | FromDiscord | <haxscramper> and replaced with? |
17:23:01 | FromDiscord | <⃟⃟> why does it need to be there ? |
17:23:28 | FromDiscord | <haxscramper> well, because if statement introduces new scope, and some templates like `=~` from re module make use of that feature |
17:23:53 | FromDiscord | <haxscramper> it is more like - it could be moved to separate section that also includes shadow stack |
17:23:59 | FromDiscord | <haxscramper> and how it interacts with things |
17:24:14 | FromDiscord | <haxscramper> and use something more distinctive, and not `{|` |
17:24:46 | FromDiscord | <⃟⃟> by this point of the manual i dont think you would need that, but if they really want to have it they should just use something else like comments or whatever thats valid code |
17:25:12 | FromDiscord | <⃟⃟> that part confused me more than it did help me understand it |
17:25:32 | FromDiscord | <haxscramper> ? |
17:25:39 | FromDiscord | <haxscramper> well, accounting for discord highlighting |
17:26:06 | FromDiscord | <⃟⃟> also |
17:26:20 | FromDiscord | <⃟⃟> according to the manual `nimvm` is used to determine if something is being run at compile time |
17:26:25 | FromDiscord | <⃟⃟> why is it called `nimvm` then? |
17:26:41 | FromDiscord | <haxscramper> because nim executes compile-time code in vm |
17:27:08 | FromDiscord | <⃟⃟> sure but what does that have to do with this symbols purpose |
17:27:17 | FromDiscord | <⃟⃟> `compileTime` or whatever would have been much clearer |
17:27:42 | FromDiscord | <haxscramper> `compiletime` is already used for variables and procs that are declared to be used only for compile-time |
17:27:49 | FromDiscord | <⃟⃟> or maybe `isCompileTime` to follow the naming of `isMainModule` |
17:27:57 | FromDiscord | <haxscramper> ^ that one would be good |
17:28:15 | FromDiscord | <haxscramper> though there is no `nimvm` symbol IIRC, `when nimvm` is a special magic |
17:28:25 | FromDiscord | <haxscramper> due to some implementation details |
17:28:43 | FromDiscord | <haxscramper> it is even put in separate manual section because of that |
17:29:10 | FromDiscord | <haxscramper> though manual says it is a symbol |
17:30:52 | FromDiscord | <⃟⃟> how does 'A' .. 'Z' work |
17:31:46 | FromDiscord | <haxscramper> range of characters from `'A'` to `'Z'`, inclusive on both ends |
17:31:58 | FromDiscord | <⃟⃟> but like |
17:32:00 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/a5e |
17:32:07 | FromDiscord | <haxscramper> in set it is a special syntax to shorthand A,B,C,D ... |
17:32:19 | FromDiscord | <⃟⃟> would `'A' .. 5000` work |
17:32:29 | FromDiscord | <haxscramper> !eval echo 'A' .. 5000 |
17:32:32 | NimBot | A .. 5000 |
17:32:39 | FromDiscord | <⃟⃟> hmm |
17:32:49 | FromDiscord | <haxscramper> `..` is special only in context of set |
17:32:54 | FromDiscord | <haxscramper> otherwise it is just a user-defined operator |
17:33:02 | FromDiscord | <⃟⃟> !eval {'A' .. 500} |
17:33:02 | FromDiscord | <haxscramper> that returns `HSlice[char, int]`` |
17:33:04 | NimBot | Compile failed: /usercode/in.nim(1, 6) Error: type mismatch: got <int literal(500)> but expected 'char' |
17:33:22 | FromDiscord | <haxscramper> https://nim-lang.org/docs/system.html#..%2CsinkT%2CsinkU |
17:34:02 | FromDiscord | <haxscramper> In loops it uses `..` iterator https://nim-lang.org/docs/system.html#...i%2CT%2CT |
17:34:35 | FromDiscord | <haxscramper> !eval for i in 'a' .. 'c': echo i |
17:34:37 | NimBot | a↵b↵c |
17:34:49 | FromDiscord | <haxscramper> !for i in 'a' .. 500: echo i |
17:34:55 | FromDiscord | <haxscramper> !eval for i in 'a' .. 500: echo i |
17:34:56 | NimBot | Compile failed: /usercode/in.nim(1, 14) Error: type mismatch: got <HSlice[system.char, system.int]> |
17:35:29 | FromDiscord | <haxscramper> but this won't work because there is no `..` iterator, so it uses proc that returns hslice, but hslice does not have an implicit items iterator defined so it fails |
17:36:10 | FromDiscord | <⃟⃟> i dont like the `;` and `,` thing |
17:36:18 | FromDiscord | <haxscramper> for argument separation? |
17:36:21 | FromDiscord | <⃟⃟> the manual also dosent seem to use them consistently |
17:36:22 | FromDiscord | <⃟⃟> yes |
17:36:28 | FromDiscord | <haxscramper> they are different |
17:36:46 | FromDiscord | <haxscramper> `;` is used to separate arguments that have types omitted because of "using statement" |
17:36:51 | FromDiscord | <⃟⃟> sent a code paste, see https://paste.rs/MPb |
17:37:13 | FromDiscord | <⃟⃟> wait what |
17:37:39 | FromDiscord | <haxscramper> Yes, but that part is more like legacy, because some people prefer this |
17:37:48 | FromDiscord | <haxscramper> someone called it like "dark mode" for proc arguments |
17:38:04 | FromDiscord | <⃟⃟> now i see `;` used too when not using multiple arguments for same type |
17:40:24 | FromDiscord | <⃟⃟> it also says there is `typeof` and `type` but suggests not to use `type` why isnt it just removed |
17:41:08 | FromDiscord | <⃟⃟> and it seems they made the same mistake as python did with `import` |
17:41:37 | FromDiscord | <haxscramper> In reply to @⃟⃟ "do you think im": for this reason |
17:41:50 | FromDiscord | <haxscramper> In reply to @⃟⃟ "and it seems they": what mistake? |
17:41:56 | FromDiscord | <⃟⃟> `import X` |
17:42:10 | FromDiscord | <⃟⃟> what this means depends on if `from Y` is infront of it |
17:42:26 | FromDiscord | <haxscramper> In reply to @haxscramper "for this reason": manual contains full description of the language, tutorial is an introduction, Though I would not be surprisied that tutorial also shows both |
17:42:41 | FromDiscord | <⃟⃟> i also dont get what youre trying to say |
17:42:58 | FromDiscord | <⃟⃟> it would be better if theres just one function instead of two that seemingly work the same |
17:43:14 | * | xet7 quit (Remote host closed the connection) |
17:43:26 | FromDiscord | <haxscramper> ah, you meant to completely remove from the language, not just manual |
17:43:35 | FromDiscord | <⃟⃟> yes |
17:43:43 | FromDiscord | <haxscramper> well, it would break existing code |
17:44:04 | FromDiscord | <⃟⃟> when was typeof added |
17:44:13 | FromDiscord | <haxscramper> For not reason other than "there should be only one way", which is not strong enough of a justufucation |
17:44:15 | * | xet7 joined #nim |
17:45:54 | FromDiscord | <haxscramper> In reply to @⃟⃟ "when was typeof added": it was added to docs two years ago https://github.com/nim-lang/Nim/commit/fcd3b0c4d8f266ca60aa0b2afe1f00bb68b4a9a4 |
17:46:13 | FromDiscord | <haxscramper> So I would assume the feature itself was added not too long ago |
17:46:48 | FromDiscord | <⃟⃟> i would also move the section above threads higher |
17:48:40 | FromDiscord | <dom96> In reply to @⃟⃟ "i dont like the": Fwiw I dislike it too. Or at least that ; is default. |
17:49:40 | FromDiscord | <haxscramper> In reply to @haxscramper "So I would assume": can't tell exactly, seems like typeof() and type() magic share part of the implementation, but ~3 years ago and ~7-8 |
17:56:29 | FromDiscord | <deech> How do I pass a qualified `typedesc` to a template? eg. if I have `template t(typ: typedesc ...)` and I call `t(someModule.SomeType)`, the `someModule` part gets stripped when `typ` is used in the template. |
17:56:55 | FromDiscord | <haxscramper> you need to do this for `getAst()`? |
17:57:06 | FromDiscord | <haxscramper> (edit) "`getAst()`?" => "`getAstStr()`?" |
17:58:03 | FromDiscord | <haxscramper> `typedesc` only contains type symbol - you can resolve it by fully qualifying module, but I don't think you can add it to typedesc |
17:58:20 | FromDiscord | <haxscramper> (edit) "`typedesc` only contains type symbol - you can resolve it by fully qualifying module, but I don't think you can add it ... to" added "[module name]" |
17:59:03 | FromDiscord | <deech> I see. This would be a nice feature. |
17:59:42 | FromDiscord | <deech> I guess I could convert `someModule.SomeType` to a `NimNode` and it may work? |
18:00:31 | FromDiscord | <haxscramper> depends on what exactly you want to do |
18:03:09 | FromDiscord | <deech> In the template I'm doing something like `let x : <backtick>typ<backtick>` , `<backtick>` is an actual backtick. 🙂 |
18:06:27 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/F4X |
18:06:33 | FromDiscord | <haxscramper> Like this? |
18:08:18 | FromDiscord | <deech> yes |
18:10:48 | FromDiscord | <haxscramper> sent a code paste, see https://paste.rs/30Y |
18:13:32 | FromDiscord | <deech> That's odd. It doesn't seem to work for my project modules, does it still work if you try it with `from system import nil` and if the template is in a separate module? |
18:16:24 | FromDiscord | <haxscramper> https://wandbox.org/permlink/dDJ8726fEu6FIwwR it can't `echo` anything |
18:17:16 | FromDiscord | <haxscramper> but that's not really surpirsing, considering `from system import nil` |
18:18:48 | FromDiscord | <haxscramper> yes, `from system import nil` even breaks `proc echo(s: system.string) = system.echo(s)` |
18:19:10 | FromDiscord | <haxscramper> and `system.echo("str")` |
18:19:42 | FromDiscord | <haxscramper> and even `system.echo(system.string("str"))` |
18:21:51 | * | jjido joined #nim |
18:35:45 | * | byanka quit (Ping timeout: 248 seconds) |
19:22:27 | * | supakeen quit (Remote host closed the connection) |
19:22:52 | * | supakeen joined #nim |
19:50:51 | * | XDiamond7D7 joined #nim |
19:57:46 | * | XDiamond7D7 quit (Quit: Client closed) |
20:58:40 | * | pro quit (Ping timeout: 240 seconds) |
21:08:58 | FromDiscord | <JSONBash> anyone with a github pages website for their repo willing to help me test https://www.nim.wiki/ |
21:11:57 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
21:32:19 | * | beshr quit (Remote host closed the connection) |
21:34:36 | * | Vladar quit (Quit: Leaving) |
21:35:36 | FromDiscord | <Kimmy> hey, i have a question about specialization of generics: seems when i'm making a type that has multiple generics, they aren't being instantiated properly and i'm not sure what's going on? |
21:35:47 | FromDiscord | <Kimmy> sent a code paste, see https://paste.rs/ITG |
21:36:39 | FromDiscord | <Kimmy> what's going on? |
21:36:40 | FromDiscord | <Kimmy> sent a code paste, see https://play.nim-lang.org/#ix=3wCe |
21:37:27 | FromDiscord | <Kimmy> my `Ply[A,B]` should flip back and forth between `Ply[B,A]`, so i can model successive turns, see |
21:38:29 | FromDiscord | <Kimmy> (edit) "https://play.nim-lang.org/#ix=3wCe" => "https://play.nim-lang.org/#ix=3wCf" |
21:38:40 | FromDiscord | <Kimmy> (edit) "https://play.nim-lang.org/#ix=3wCf" => "https://play.nim-lang.org/#ix=3wCg" |
21:43:56 | FromDiscord | <treeform> In reply to @JSONBash "anyone with a github": Cool, so it's kinda like nimdocs.com ? |
21:44:32 | FromDiscord | <JSONBash> yeah! just a different domain, wanted a .nim domain, thought it would be cool |
21:47:39 | FromDiscord | <JSONBash> In reply to @treeform "Cool, so it's kinda": and uses a subdomain |
21:49:52 | * | sagax joined #nim |
21:56:09 | * | max22- quit (Quit: Leaving) |
21:58:09 | FromDiscord | <Kimmy> sent a code paste, see https://play.nim-lang.org/#ix=3wCl |
21:58:27 | FromDiscord | <Kimmy> why does the second work but not the first o-o |
22:33:01 | FromDiscord | <theangryepicbanana> In reply to @Kimmy "an even simpler example:": curious, does `FlipFlop[B.type, A.type]` fix anything? |
22:52:42 | FromDiscord | <Kimmy> you mean the type definition for the `next` field? |
22:52:55 | FromDiscord | <Kimmy> sent a code paste, see https://play.nim-lang.org/#ix=3wCB |
22:55:17 | FromDiscord | <theangryepicbanana> oof |
22:55:42 | FromDiscord | <theangryepicbanana> dunno then. does it change if you switch `value` to type `B`? |
22:57:35 | FromDiscord | <theangryepicbanana> as a side note, my program takes ~3 minutes to compile rn 🥲 |
22:58:26 | FromDiscord | <konsumlamm> looks like a bug to me |
22:58:34 | FromDiscord | <theangryepicbanana> it definitely is |
22:58:37 | FromDiscord | <Kimmy> interesting thought, but no change, sadly |
22:58:43 | FromDiscord | <Kimmy> hmmmm~ time to file an issue? |
22:58:45 | FromDiscord | <konsumlamm> you should open an issue for it |
22:58:56 | FromDiscord | <Kimmy> (thanks for working this through with me while waiting for your compiles! :p ) |
22:59:10 | FromDiscord | <theangryepicbanana> re: 3 minutes to compile, it's related to that typeclass issue I was having a few weeks ago |
23:01:30 | FromDiscord | <theangryepicbanana> lol anyways it gors into an infinite loop at some point |
23:01:34 | FromDiscord | <theangryepicbanana> probably another bug |
23:01:40 | FromDiscord | <theangryepicbanana> (edit) "gors" => "goes" |
23:13:24 | * | fputs quit (Ping timeout: 258 seconds) |
23:33:25 | FromDiscord | <Kimmy> r.i.p. :/ |
23:33:37 | FromDiscord | <Kimmy> i filed https://github.com/nim-lang/Nim/issues/18728 if anyone's curious |
23:46:24 | * | flynn quit (Read error: Connection reset by peer) |
23:47:32 | * | flynn joined #nim |
23:56:32 | * | audiophile_ joined #nim |
23:59:03 | * | nrds quit (Remote host closed the connection) |
23:59:16 | * | nrds joined #nim |
23:59:44 | FromDiscord | <theangryepicbanana> aha, I forgot that `default(ref)` is `nil` |