<< 21-08-2021 >>

00:36:17*pch quit (Ping timeout: 248 seconds)
00:37:22FromDiscord<codic> it would almost definitely be inlined in release build
00:37:25FromDiscord<codic> builds
00:37:43*pch joined #nim
01:47:33*Jjp137 quit (Quit: Leaving)
01:47:41*Jjp137 joined #nim
01:52:00FromDiscord<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:32FromDiscord<deech> Aside from the Nim forum are there any publicly accessible sites that use the js backend?
02:09:20FromDiscord<deech> Trying to get a feel for payload size and what the resulting JS looks like.
02:10:49FromDiscord<Elegantbeef> It's not too bad, it's not minified though
02:11:08FromDiscord<Elegantbeef> You can make a relatively simple nim program and then `nim js -d:release` on it
02:12:10FromDiscord<deech> I've done that for small things. Just wondered if there were any in the wild I could explore.
02:13:26FromDiscord<Elegantbeef> Could checkout impbox and my games
02:13:30FromDiscord<Elegantbeef> But aside from that idk
02:15:33FromDiscord<deech> Cool! Can you link some of your stuff?
02:16:10FromDiscord<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:59FromDiscord<Elegantbeef> Some of impbox's games are open source so you could see the non itch minified code
02:17:02FromDiscord<Elegantbeef> Forgot it minified it
02:33:14FromDiscord<xflywind> see also https://stardust.dev/play/client.js?t=1627224317
02:33:27FromDiscord<xflywind> nim js + closure compiler
03:10:09FromDiscord<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:11FromDiscord<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:14nrds<prestigebot99> itHub: 7"Puppy fetches HTML pages for Nim."
06:10:33FromDiscord<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:34nrds<prestigebot99> itHub: 7"Very simple PostgreSQL async api for nim."
06:10:53FromDiscord<treeform> In reply to @tandy "it doesnt sadly": I should add that.
06:12:23FromDiscord<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:04FromDiscord<treeform> sent a code paste, see https://play.nim-lang.org/#ix=3wBq
06:16:35FromDiscord<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:16FromDiscord<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:57FromDiscord<JSONBash> @treeform does jsony have equivalents to the std/json JsonNode types? Use case is explicit conversion in a case statement
06:51:19FromDiscord<treeform> jsony uses the std/json JsonNode types, so they are interchangeable.
06:52:37FromDiscord<treeform> jsony's fromJson() will give you a JsonNode, same as std/json parseJson will.
06:53:41FromDiscord<JSONBash> Ohhh sweeeeet thanks !
06:54:42FromDiscord<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:43nrds<prestigebot99> itHub: 7"A loose, direct to object json parser with hooks."
06:56:11FromDiscord<JSONBash> If I understand, toJson return JsonNode and I could do .getStr()?
06:57:41FromDiscord<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:36FromDiscord<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:37FromDiscord<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:14FromDiscord<PsychoClay> sent a code paste, see https://paste.rs/Z2v
11:15:04FromDiscord<Rika> repr of a channel?
11:15:21FromDiscord<Rika> did you mean recv?
11:15:26FromDiscord<PsychoClay> no
11:15:41FromDiscord<Rika> what do you expect to get from repr of a channel?
11:15:45FromDiscord<PsychoClay> if its a Channel[string] or Channel[int] it works
11:15:55FromDiscord<PsychoClay> just not Channel[SomeObject]
11:16:00FromDiscord<Rika> In reply to @Rika "what do you expect": .
11:16:08FromDiscord<PsychoClay> idk some text
11:16:20FromDiscord<PsychoClay> i just dont understand why it would crash
11:17:01FromDiscord<PsychoClay> also if u dont call send first it doesnt crash
11:18:53FromDiscord<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:06FromDiscord<Rika> no segfault if i remove the `id` field
11:20:26*flynn joined #nim
11:20:28FromDiscord<Rika> or the `target` field
11:20:49FromDiscord<Rika> ah wait i think that has to do with the single-field object optimisation or something
11:28:25FromDiscord<PsychoClay> maybe i should just make my own channel implementation
11:28:47FromDiscord<Rika> i dont see how getting the repr of a channel is important
11:28:59FromDiscord<Rika> and it's hard to get channels right i'm led to believe
11:29:24FromDiscord<PsychoClay> its just a queue with a lock right?
11:47:29*Vladar joined #nim
11:52:44FromDiscord<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:26FromDiscord<Rika> its just an example
11:55:02*max22- quit (Ping timeout: 245 seconds)
11:55:57FromDiscord<dain> oh
11:56:01FromDiscord<dain> so where would you use it
11:58:47FromDiscord<haxscramper> eval on `seq[Expression]` or something like that
11:58:47FromDiscord<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:42NimEventerNew thread by Alexeypetrushin: Nim stability problem, change imports slightly, and you program is broken, see https://forum.nim-lang.org/t/8347
13:31:51FromDiscord<planetis> i feel his pain thats also my most annoying nim bug
13:35:11FromDiscord<planetis> i was trying to overload supportsCopyMem the other day, still havent figured it out
13:49:49NimEventerNew 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:15FromDiscord<dankrad> sent a code paste, see https://play.nim-lang.org/#ix=3wBF
15:18:24FromDiscord<dankrad> well, i got it working
15:51:28FromDiscord<xflywind> what does "wrt" mean in Nim docs? Does it mean "with regard to"?
15:52:09FromDiscord<xflywind> For instance: `brOpen, ## open wrt overloaded symbols`
15:52:22FromDiscord<xflywind> How to understand it?
15:53:14FromDiscord<xflywind> (edit) "understand" => "explain"
15:58:26*Vladar_ joined #nim
15:58:35*Vladar_ quit (Client Quit)
16:05:04FromDiscord<Sorrow> In reply to @treeform "If you are on": Will check it out soon, thanks.
16:19:32FromDiscord<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:07FromDiscord<⃟⃟> i feel this language should have some major changes
16:46:13FromDiscord<⃟⃟> perhaps a major version 2
16:46:59FromDiscord<⃟⃟> i would rework the syntax and standard library
16:48:44FromDiscord<konsumlamm> feel free to write an RFC about what you think should be changed
16:48:49FromDiscord<Rika> You are free to fork the language and work on your improvements
16:49:01FromDiscord<konsumlamm> there definitely will be a version 2, but it likely won't have any huge changes
16:49:05FromDiscord<⃟⃟> if i did it alone it would take me too long
16:49:12FromDiscord<⃟⃟> how do i make that thing you said
16:49:36FromDiscord<konsumlamm> you open an issue here: https://github.com/nim-lang/RFCs
16:49:39nrds<prestigebot99> itHub: 7"A repository for your Nim proposals."
16:49:42FromDiscord<⃟⃟> i dont use that website
16:49:55FromDiscord<konsumlamm> that website called github?
16:49:57FromDiscord<⃟⃟> yes
16:50:11FromDiscord<konsumlamm> you'll have trouble changing anything about Nim then
16:50:26FromDiscord<haxscramper> what is wrong with the syntax reaally
16:50:43FromDiscord<haxscramper> just couple things that you need get used to, like `f (a, b)` vs `f(a, b)`
16:50:53FromDiscord<Rika> You can try using the forum
16:50:59FromDiscord<⃟⃟> and also `f (a)`
16:51:05FromDiscord<⃟⃟> knowing that this is not a tuple
16:51:20FromDiscord<haxscramper> and reworking of the standard library (certain modules) has already been discussed in seveal placed and it is a known problem
16:51:23FromDiscord<Rika> Why would it be?
16:51:26FromDiscord<haxscramper> specifically os/json modules
16:51:35FromDiscord<⃟⃟> because `f (a, b)` is
16:51:36FromDiscord<konsumlamm> why on earth should `(a)` be a tuple
16:51:44FromDiscord<konsumlamm> that's not the logic behind this
16:51:46FromDiscord<Rika> The comma makes the tuple
16:51:51FromDiscord<Rika> Not the parentheses
16:51:59FromDiscord<konsumlamm> ^ the space doesn't magically turn arguments into a tuple
16:52:11FromDiscord<⃟⃟> so the comma is some kind of operator?
16:52:11FromDiscord<konsumlamm> it just happens to be the same syntax as for function calls
16:52:14FromDiscord<Rika> No
16:52:29FromDiscord<Rika> Well you can treat it like such if you want
16:52:40FromDiscord<⃟⃟> `f a,b` does this work?↵`f a,` this?
16:53:04FromDiscord<konsumlamm> first yes, but it means `f(a, b)`
16:53:08FromDiscord<konsumlamm> second idk, try it
16:53:14FromDiscord<haxscramper> second is a syntax error
16:53:19FromDiscord<haxscramper> !eval f a,
16:53:21NimBotCompile failed: /usercode/in.nim(1, 5) Error: invalid indentation
16:53:27FromDiscord<⃟⃟> all these rules are reminding me of c++
16:53:39FromDiscord<Rika> The rules are the same in Python
16:53:45FromDiscord<⃟⃟> i dont like python
16:53:50FromDiscord<Rika> Save for the function call syntax
16:53:58FromDiscord<Rika> Then you are using the wrong language I would be led to believe
16:53:58FromDiscord<haxscramper> except you have magic `print` "operator" and other things that don't work like this
16:54:40FromDiscord<⃟⃟> pythons (3) syntax is confusing in other ways
16:54:50FromDiscord<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:54FromDiscord<⃟⃟> nim seems to have avoided those but now introduced other problems
16:55:11FromDiscord<Rika> Striving for perfection is tedious
16:56:42FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wC2
16:57:05FromDiscord<⃟⃟> the last two are doing different things
16:57:13FromDiscord<Rika> They aren’t, try it
16:57:16FromDiscord<haxscramper> the last two are doing the same thing
16:57:52FromDiscord<haxscramper> it just shows that you can pass arguments to the `.echo` the same way
16:57:58FromDiscord<haxscramper> as any regular proc invocation
16:58:06FromDiscord<⃟⃟> so that isnt calling echo with 2 strings instead of 1 ?
16:58:24FromDiscord<Rika> Ah
16:58:35FromDiscord<Rika> That’s what you mean
16:58:48FromDiscord<Rika> That is right, it is with two parameters instead of one
16:58:50FromDiscord<haxscramper> it shows that you can pass arguments to the proc using dot sntax
16:59:09FromDiscord<haxscramper> `echo("hello", " world")` `echo "hello", " world"`
16:59:09FromDiscord<⃟⃟> im already familiar with this ufcs feature cause of D
16:59:21FromDiscord<haxscramper> so what is the problem then?
16:59:38FromDiscord<⃟⃟> just because i know how it works dosent meant i like it
16:59:41FromDiscord<Rika> The command syntax is probably his issue
16:59:50FromDiscord<haxscramper> command syntax and tuples
17:00:05FromDiscord<Rika> I don’t understand, no language fits your liking perfectly unless you make it yourself
17:00:33FromDiscord<konsumlamm> it probably won't even fit then
17:01:13FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3wC7
17:01:43FromDiscord<⃟⃟> from what i understand nim dosent have methods so ufcs is probably not that big of a concern actually
17:01:47FromDiscord<⃟⃟> but the tuple thing
17:01:51FromDiscord<⃟⃟> and the omitting ()
17:02:03FromDiscord<haxscramper> it is super useful
17:02:11FromDiscord<Rika> Just don’t use the syntax if you don’t like it
17:02:21FromDiscord<⃟⃟> thats not a valid response
17:02:25FromDiscord<Rika> Why not
17:02:40FromDiscord<haxscramper> what is problematic? you personally don't like this feature while everyone else seemsm to like it very mych
17:02:45FromDiscord<⃟⃟> do you think im not going to be reading code that uses it?
17:02:54FromDiscord<Rika> Then do not use Nim.
17:03:09FromDiscord<⃟⃟> id rather just have them fix the problems than ditch the language
17:03:19FromDiscord<haxscramper> that is not a problem
17:03:24FromDiscord<Rika> They are YOUR PERSONAL PROBLEMS
17:03:28FromDiscord<haxscramper> ^
17:03:39FromDiscord<Rika> I will no longer entertain you, goodbye
17:03:45FromDiscord<konsumlamm> if you really want this to change, write an RFC
17:03:59FromDiscord<konsumlamm> if you don't want to write an RFC because github bad, then you're out of luck, i'm sorry
17:04:37FromDiscord<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:50FromDiscord<haxscramper> that are really the foundation of a syntax etc
17:04:51FromDiscord<Rika> In reply to @Rika "I will no longer": Because I’ve gotten too mad, if you wonder why
17:05:02FromDiscord<haxscramper> like style insensetivity, indentiation, ufcs, variable shadowing
17:05:36FromDiscord<haxscramper> i understand when people shit on async, threading and error messages
17:05:36FromDiscord<konsumlamm> yo guys, i think we should change Nim to have C like syntax, instead of this indentation sensitive crap /s
17:05:42FromDiscord<⃟⃟> please no
17:05:48FromDiscord<⃟⃟> C syntax is
17:05:51FromDiscord<⃟⃟> :|
17:06:13FromDiscord<codic> c syntax is awesome
17:06:13FromDiscord<haxscramper> but I like curly delimiters more
17:06:15arkanoidI'm dealing with an XmlNode.items that returns a nil. I think that this might be a bug in xmltree
17:06:19FromDiscord<codic> but if you don't like what nim is, use another language
17:06:29FromDiscord<codic> or propose the changes to fix it for you
17:06:29FromDiscord<⃟⃟> i would like `{}` too
17:06:30FromDiscord<haxscramper> like seriously, and it makes easier to write pretty-printers
17:06:46FromDiscord<haxscramper> and parse with tree-sitter etc. as well
17:06:48FromDiscord<⃟⃟> makes you think more about the structure of the code
17:07:05FromDiscord<konsumlamm> btw, since you apparently know D, what made you try out Nim?
17:07:41FromDiscord<⃟⃟> because D has so much it confuses me
17:08:14FromDiscord<⃟⃟> if i start looking into it i learn some new feature or something
17:08:21FromDiscord<⃟⃟> started feeling like c++
17:08:52FromDiscord<Rika> I’ve cooled down
17:08:53FromDiscord<haxscramper> nim has a lot of features too, though they don't fell like "lets dump together everything at once"
17:09:05FromDiscord<haxscramper> macros ...
17:09:08FromDiscord<Rika> If you really want, the best you can do is to make a tool to enforce styles
17:09:26FromDiscord<⃟⃟> does it have a spec i can read?
17:09:35FromDiscord<Rika> But then don’t expect people to follow you in fixing the “problems”
17:09:38FromDiscord<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:59FromDiscord<haxscramper> ye, of course everyone should be good, and all, etc etc.
17:10:20FromDiscord<haxscramper> nobody should ever get emotional over anything
17:10:23FromDiscord<haxscramper> but it happens sometimes
17:10:48FromDiscord<dom96> true
17:11:00FromDiscord<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:11FromDiscord<haxscramper> also compiler test suite and unit tests
17:11:27FromDiscord<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:54FromDiscord<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:09FromDiscord<haxscramper> `import compiler/`
17:12:13FromDiscord<Rika> So far we only have one for NEP
17:12:57FromDiscord<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:33FromDiscord<haxscramper> Good thing about nim is that you can actually use compiler API without begin CS professor
17:16:13FromDiscord<⃟⃟> looking at this manual there are alot of things i like and some i dont like
17:16:27FromDiscord<haxscramper> well, that is expected
17:16:39FromDiscord<haxscramper> I think everyone could say this
17:16:46FromDiscord<Rika> Yes
17:17:03FromDiscord<haxscramper> I'm not a big fan of `Defect` existing
17:17:39FromDiscord<⃟⃟> for some things they just give you the algorithm instead of explaining it in words (and they also say its pseudo code...)
17:18:25FromDiscord<Rika> Docs are plenty lacking yes
17:18:39FromDiscord<⃟⃟> also what is `{a,b,c}`
17:18:54FromDiscord<Rika> Set
17:20:22FromDiscord<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:48FromDiscord<haxscramper> Sadly you don't use github, but you can at least make a forum post and ask for clarifications for example
17:21:16FromDiscord<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:16FromDiscord<⃟⃟> the docs also use `{| |}` for scopes
17:21:21FromDiscord<⃟⃟> confused me
17:21:29FromDiscord<⃟⃟> not sure if thats even valid syntax or what
17:21:45FromDiscord<haxscramper> This is not a valid syntax
17:22:03FromDiscord<haxscramper> It does it for if statement only,
17:22:25FromDiscord<⃟⃟> should be removed
17:22:35FromDiscord<haxscramper> and replaced with?
17:23:01FromDiscord<⃟⃟> why does it need to be there ?
17:23:28FromDiscord<haxscramper> well, because if statement introduces new scope, and some templates like `=~` from re module make use of that feature
17:23:53FromDiscord<haxscramper> it is more like - it could be moved to separate section that also includes shadow stack
17:23:59FromDiscord<haxscramper> and how it interacts with things
17:24:14FromDiscord<haxscramper> and use something more distinctive, and not `{|`
17:24:46FromDiscord<⃟⃟> 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:12FromDiscord<⃟⃟> that part confused me more than it did help me understand it
17:25:32FromDiscord<haxscramper> ?
17:25:39FromDiscord<haxscramper> well, accounting for discord highlighting
17:26:06FromDiscord<⃟⃟> also
17:26:20FromDiscord<⃟⃟> according to the manual `nimvm` is used to determine if something is being run at compile time
17:26:25FromDiscord<⃟⃟> why is it called `nimvm` then?
17:26:41FromDiscord<haxscramper> because nim executes compile-time code in vm
17:27:08FromDiscord<⃟⃟> sure but what does that have to do with this symbols purpose
17:27:17FromDiscord<⃟⃟> `compileTime` or whatever would have been much clearer
17:27:42FromDiscord<haxscramper> `compiletime` is already used for variables and procs that are declared to be used only for compile-time
17:27:49FromDiscord<⃟⃟> or maybe `isCompileTime` to follow the naming of `isMainModule`
17:27:57FromDiscord<haxscramper> ^ that one would be good
17:28:15FromDiscord<haxscramper> though there is no `nimvm` symbol IIRC, `when nimvm` is a special magic
17:28:25FromDiscord<haxscramper> due to some implementation details
17:28:43FromDiscord<haxscramper> it is even put in separate manual section because of that
17:29:10FromDiscord<haxscramper> though manual says it is a symbol
17:30:52FromDiscord<⃟⃟> how does 'A' .. 'Z' work
17:31:46FromDiscord<haxscramper> range of characters from `'A'` to `'Z'`, inclusive on both ends
17:31:58FromDiscord<⃟⃟> but like
17:32:00FromDiscord<haxscramper> sent a code paste, see https://paste.rs/a5e
17:32:07FromDiscord<haxscramper> in set it is a special syntax to shorthand A,B,C,D ...
17:32:19FromDiscord<⃟⃟> would `'A' .. 5000` work
17:32:29FromDiscord<haxscramper> !eval echo 'A' .. 5000
17:32:32NimBotA .. 5000
17:32:39FromDiscord<⃟⃟> hmm
17:32:49FromDiscord<haxscramper> `..` is special only in context of set
17:32:54FromDiscord<haxscramper> otherwise it is just a user-defined operator
17:33:02FromDiscord<⃟⃟> !eval {'A' .. 500}
17:33:02FromDiscord<haxscramper> that returns `HSlice[char, int]``
17:33:04NimBotCompile failed: /usercode/in.nim(1, 6) Error: type mismatch: got <int literal(500)> but expected 'char'
17:33:22FromDiscord<haxscramper> https://nim-lang.org/docs/system.html#..%2CsinkT%2CsinkU
17:34:02FromDiscord<haxscramper> In loops it uses `..` iterator https://nim-lang.org/docs/system.html#...i%2CT%2CT
17:34:35FromDiscord<haxscramper> !eval for i in 'a' .. 'c': echo i
17:34:37NimBota↵b↵c
17:34:49FromDiscord<haxscramper> !for i in 'a' .. 500: echo i
17:34:55FromDiscord<haxscramper> !eval for i in 'a' .. 500: echo i
17:34:56NimBotCompile failed: /usercode/in.nim(1, 14) Error: type mismatch: got <HSlice[system.char, system.int]>
17:35:29FromDiscord<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:10FromDiscord<⃟⃟> i dont like the `;` and `,` thing
17:36:18FromDiscord<haxscramper> for argument separation?
17:36:21FromDiscord<⃟⃟> the manual also dosent seem to use them consistently
17:36:22FromDiscord<⃟⃟> yes
17:36:28FromDiscord<haxscramper> they are different
17:36:46FromDiscord<haxscramper> `;` is used to separate arguments that have types omitted because of "using statement"
17:36:51FromDiscord<⃟⃟> sent a code paste, see https://paste.rs/MPb
17:37:13FromDiscord<⃟⃟> wait what
17:37:39FromDiscord<haxscramper> Yes, but that part is more like legacy, because some people prefer this
17:37:48FromDiscord<haxscramper> someone called it like "dark mode" for proc arguments
17:38:04FromDiscord<⃟⃟> now i see `;` used too when not using multiple arguments for same type
17:40:24FromDiscord<⃟⃟> it also says there is `typeof` and `type` but suggests not to use `type` why isnt it just removed
17:41:08FromDiscord<⃟⃟> and it seems they made the same mistake as python did with `import`
17:41:37FromDiscord<haxscramper> In reply to @⃟⃟ "do you think im": for this reason
17:41:50FromDiscord<haxscramper> In reply to @⃟⃟ "and it seems they": what mistake?
17:41:56FromDiscord<⃟⃟> `import X`
17:42:10FromDiscord<⃟⃟> what this means depends on if `from Y` is infront of it
17:42:26FromDiscord<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:41FromDiscord<⃟⃟> i also dont get what youre trying to say
17:42:58FromDiscord<⃟⃟> 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:26FromDiscord<haxscramper> ah, you meant to completely remove from the language, not just manual
17:43:35FromDiscord<⃟⃟> yes
17:43:43FromDiscord<haxscramper> well, it would break existing code
17:44:04FromDiscord<⃟⃟> when was typeof added
17:44:13FromDiscord<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:54FromDiscord<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:13FromDiscord<haxscramper> So I would assume the feature itself was added not too long ago
17:46:48FromDiscord<⃟⃟> i would also move the section above threads higher
17:48:40FromDiscord<dom96> In reply to @⃟⃟ "i dont like the": Fwiw I dislike it too. Or at least that ; is default.
17:49:40FromDiscord<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:29FromDiscord<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:55FromDiscord<haxscramper> you need to do this for `getAst()`?
17:57:06FromDiscord<haxscramper> (edit) "`getAst()`?" => "`getAstStr()`?"
17:58:03FromDiscord<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:20FromDiscord<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:03FromDiscord<deech> I see. This would be a nice feature.
17:59:42FromDiscord<deech> I guess I could convert `someModule.SomeType` to a `NimNode` and it may work?
18:00:31FromDiscord<haxscramper> depends on what exactly you want to do
18:03:09FromDiscord<deech> In the template I'm doing something like `let x : <backtick>typ<backtick>` , `<backtick>` is an actual backtick. 🙂
18:06:27FromDiscord<haxscramper> sent a code paste, see https://paste.rs/F4X
18:06:33FromDiscord<haxscramper> Like this?
18:08:18FromDiscord<deech> yes
18:10:48FromDiscord<haxscramper> sent a code paste, see https://paste.rs/30Y
18:13:32FromDiscord<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:24FromDiscord<haxscramper> https://wandbox.org/permlink/dDJ8726fEu6FIwwR it can't `echo` anything
18:17:16FromDiscord<haxscramper> but that's not really surpirsing, considering `from system import nil`
18:18:48FromDiscord<haxscramper> yes, `from system import nil` even breaks `proc echo(s: system.string) = system.echo(s)`
18:19:10FromDiscord<haxscramper> and `system.echo("str")`
18:19:42FromDiscord<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:58FromDiscord<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:36FromDiscord<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:47FromDiscord<Kimmy> sent a code paste, see https://paste.rs/ITG
21:36:39FromDiscord<Kimmy> what's going on?
21:36:40FromDiscord<Kimmy> sent a code paste, see https://play.nim-lang.org/#ix=3wCe
21:37:27FromDiscord<Kimmy> my `Ply[A,B]` should flip back and forth between `Ply[B,A]`, so i can model successive turns, see
21:38:29FromDiscord<Kimmy> (edit) "https://play.nim-lang.org/#ix=3wCe" => "https://play.nim-lang.org/#ix=3wCf"
21:38:40FromDiscord<Kimmy> (edit) "https://play.nim-lang.org/#ix=3wCf" => "https://play.nim-lang.org/#ix=3wCg"
21:43:56FromDiscord<treeform> In reply to @JSONBash "anyone with a github": Cool, so it's kinda like nimdocs.com ?
21:44:32FromDiscord<JSONBash> yeah! just a different domain, wanted a .nim domain, thought it would be cool
21:47:39FromDiscord<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:09FromDiscord<Kimmy> sent a code paste, see https://play.nim-lang.org/#ix=3wCl
21:58:27FromDiscord<Kimmy> why does the second work but not the first o-o
22:33:01FromDiscord<theangryepicbanana> In reply to @Kimmy "an even simpler example:": curious, does `FlipFlop[B.type, A.type]` fix anything?
22:52:42FromDiscord<Kimmy> you mean the type definition for the `next` field?
22:52:55FromDiscord<Kimmy> sent a code paste, see https://play.nim-lang.org/#ix=3wCB
22:55:17FromDiscord<theangryepicbanana> oof
22:55:42FromDiscord<theangryepicbanana> dunno then. does it change if you switch `value` to type `B`?
22:57:35FromDiscord<theangryepicbanana> as a side note, my program takes ~3 minutes to compile rn 🥲
22:58:26FromDiscord<konsumlamm> looks like a bug to me
22:58:34FromDiscord<theangryepicbanana> it definitely is
22:58:37FromDiscord<Kimmy> interesting thought, but no change, sadly
22:58:43FromDiscord<Kimmy> hmmmm~ time to file an issue?
22:58:45FromDiscord<konsumlamm> you should open an issue for it
22:58:56FromDiscord<Kimmy> (thanks for working this through with me while waiting for your compiles! :p )
22:59:10FromDiscord<theangryepicbanana> re: 3 minutes to compile, it's related to that typeclass issue I was having a few weeks ago
23:01:30FromDiscord<theangryepicbanana> lol anyways it gors into an infinite loop at some point
23:01:34FromDiscord<theangryepicbanana> probably another bug
23:01:40FromDiscord<theangryepicbanana> (edit) "gors" => "goes"
23:13:24*fputs quit (Ping timeout: 258 seconds)
23:33:25FromDiscord<Kimmy> r.i.p. :/
23:33:37FromDiscord<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:44FromDiscord<theangryepicbanana> aha, I forgot that `default(ref)` is `nil`