<< 08-12-2022 >>

00:39:39*pbottle quit (Quit: WeeChat 3.7.1)
00:41:34*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:42:31*dnh joined #nim
00:45:24FromDiscord<b1rdf00d> XmlNode question, I've got the following XmlNode and I'm trying to get the data for `src`? I've been reading the docs but can't work it out↵↵`<img src="https://t6.rbxcdn.com/b7104ffe13f1d6b3f74191d2b4640765" class="" />`
00:45:59FromDiscord<Elegantbeef> `myXml.attr("src")`?
00:47:31FromDiscord<b1rdf00d> 🤦‍♂️ I'm _sure_ I tried that. Thanks Beef
00:48:01FromDiscord<Elegantbeef> I'm not sure you did 😛
00:48:02FromDiscord<b1rdf00d> Must have been trying to use attr for something else and remembered wrong
00:55:28NimEventerNew thread by oldMan: Noob: getch giving AssertionDefect etc, see https://forum.nim-lang.org/t/9702
01:15:29FromDiscord<albassort> i have an idea for a new lang
01:16:44*xaltsc quit (Ping timeout: 260 seconds)
01:18:41*xaltsc joined #nim
01:48:04*ltriant quit (Ping timeout: 248 seconds)
02:27:14*ltriant joined #nim
02:37:41NimEventerNew thread by Ward: NimPk, see https://forum.nim-lang.org/t/9703
02:38:17FromDiscord<Elegantbeef> @Horizon [She/Her]\: here you go got your python https://github.com/khchen/nimpk 😄
02:39:50FromDiscord<Elegantbeef> Of course i'm mostly joking
02:46:40FromDiscord<! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4i1X
02:49:05FromDiscord<Elegantbeef> I really should learn npeg's syntax given how much i promote it 😄
03:13:06*derpydoo quit (Ping timeout: 256 seconds)
04:41:26*arkurious quit (Quit: Leaving)
04:44:39FromDiscord<jtv> I just checked out npeg, and I will never ever use it. I could always hand-write the equivalent parser faster than figuring out their syntax :). is both concatenation AND a kleene closure?? And that's prefix?
04:44:43FromDiscord<jtv> Wow
04:45:11FromDiscord<jtv> Clearly I have too much grey in my beard 🙂
04:46:35FromDiscord<jtv> Generally, I have always thought any time people get beyond the simplest of regexps (glob-like), they are sacrificing both clarity and almost always accuracy, and should just learn how to write parsers, it's not that hard 🙂
04:57:10FromDiscord<voidwalker> seq[seq[T]] to seq[0] & seq[1] & .. seq[n] ? concat needs varargs
05:00:35FromDiscord<voidwalker> lol I guess foldl could work, a & b
05:11:19FromDiscord<sexnine> play.nim-lang.org down?
05:25:43Zevvjtv: I couldn't agree more. Unfortunately, what it can do is limited by what Nim can parse, and the Nim author states that "Macros cannot change Nim's syntax because there is no need for it — the syntax is flexible enough"
05:25:46ZevvThere you have it.
05:26:11ZevvI even got a PR through to take that particular scentence of the Nim site front page, but they put it back.
06:40:17*rockcavera quit (Remote host closed the connection)
06:44:19FromDiscord<Horizon [She/Her]> In reply to @Elegantbeef "<@909883978717204561>\: here you go": PocketLang actually looks quite nice haha
06:47:29*jmdaemon quit (Ping timeout: 260 seconds)
07:45:05FromDiscord<jtv> In reply to @Zevv "I even got a": I mean, write a recursive descent parser, or use a parser generator
07:46:16FromDiscord<jtv> Haven't used this, but it looks decent syntactically anyway: https://github.com/loloicci/nimly
07:47:49*xet7 quit (Remote host closed the connection)
07:49:49*xet7 joined #nim
08:03:15Zevvjtv: sure, you can write your parsers however you like to write them.
08:07:14*kenran joined #nim
08:11:55*kenran quit (Ping timeout: 252 seconds)
08:16:47FromDiscord<scruz> does nim use `=>` anywhere?
08:17:03FromDiscord<scruz> https://media.discordapp.net/attachments/371759389889003532/1050325119874113596/image.png
08:17:27FromDiscord<Bung> it's from sugar module
08:18:47Zevvhttps://nim-lang.github.io/Nim/sugar.html#%3D%3E.m%2Cuntyped%2Cuntyped
08:19:33FromDiscord<scruz> thanks, ↵i asked the question on chatgpt and got the answer
08:19:40FromDiscord<scruz> https://media.discordapp.net/attachments/371759389889003532/1050325777364815872/image.png
08:19:48FromDiscord<scruz> lol
08:28:16FromDiscord<Slava0135> In reply to @Bung "it's from sugar module": ~~that's why it didn't work when i tried it in aoc~~
09:15:28FromDiscord<j-james> does there exist some syntax sugar along the lines of `bluh = for k in l: if cond: result += 1`?
09:17:08FromDiscord<j-james> `collect` _almost_ does this but not quite
09:21:03FromDiscord<j-james> like immediately running an anonymous function ig
09:28:04*PMunch joined #nim
09:31:29FromDiscord<Rika> i dont understand what this is supposed to do
09:32:14FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=4i2P
09:33:20FromDiscord<j-james> kind of a bad example
09:33:29FromDiscord<Rika> its hard to understand, sorry
09:33:30FromDiscord<Elegantbeef> someone is doing aoc? 😄
09:33:49FromDiscord<Elegantbeef> `result += ord(cond)`
09:35:36FromDiscord<j-james> sent a code paste, see https://play.nim-lang.org/#ix=4i2R
09:35:40FromDiscord<j-james> In reply to @Elegantbeef "someone is doing aoc?": perhaps 👀
09:36:00FromDiscord<j-james> it's a bit of a painful one today
09:36:26FromDiscord<Elegantbeef> It's not too bad imo, though i havent done part 2 yet
09:38:52FromDiscord<j-james> yea just prickly
09:38:56FromDiscord<j-james> lots of places to mess up
09:39:31FromDiscord<Rika> In reply to @apropos "i got it working": looks cursed
09:41:08FromDiscord<j-james> yup
09:41:42FromDiscord<j-james> i do wish sequtils had `take`, `takeWhile`, `takeUntil` functions
09:41:53FromDiscord<j-james> i should write some 🤔
09:45:18FromDiscord<Rika> the keep functions?
09:45:54FromDiscord<Rika> what would take do?
09:51:13FromDiscord<j-james> terminate early
09:52:02FromDiscord<j-james> In reply to @apropos "i got it working": like the `if cond: break` portion here
09:54:10FromDiscord<Rika> i see
10:47:24FromDiscord<bren> sent a code paste, see https://play.nim-lang.org/#ix=4i3f
10:52:06FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=4i3h
10:58:42*junaid_ joined #nim
11:05:34NimEventerNew thread by Siltaar: A new way for Nim to shine ? Faster than NodeJS interpreted Nim, taking advantage of declared types, see https://forum.nim-lang.org/t/9704
11:05:47FromDiscord<bren> sent a code paste, see https://play.nim-lang.org/#ix=4i3l
11:10:10*junaid_ quit (Quit: leaving)
11:10:53*junaid_ joined #nim
11:12:07*Guest20 joined #nim
11:12:35*Guest20 quit (Client Quit)
11:13:29*junaid_ quit (Client Quit)
11:13:54*junaid_ joined #nim
11:14:13*junaid_ quit (Client Quit)
11:14:36*junaid_ joined #nim
11:19:52*ltriant quit (Ping timeout: 256 seconds)
11:26:58FromDiscord<amadan> That splits into groups properly for me
11:29:27FromDiscord<amadan> Though tbh I'm kinda confused as to why it does instead of joining it all into one list
11:30:38*junaid_ quit (Remote host closed the connection)
11:55:21FromDiscord<wiga> I found a weird thing idk if its an external cause. Whenever i execute a powershell command with osproc it gives me a weird output. It gives me the actual output that i want and some xml things
11:56:07FromDiscord<wiga> I tried digging out the potential causes so i tried running the same thing but with python, nodejs, java, C#, etc
11:56:37FromDiscord<wiga> But gives me the actual output i am looking for
11:57:24FromDiscord<wiga> So it maybe has something to do with osproc idk
11:58:29FromDiscord<wiga> (i cannot show the code cuz i am not at home rn)
11:59:45FromDiscord<ghkdgfs> is there a way to zip n openArray at runtime?↵e.g. @[@[4,5],@[9,3]] to @[@[4,9],@[5,3]]
12:03:04*ltriant joined #nim
12:15:32*ltriant quit (Ping timeout: 260 seconds)
12:40:47FromDiscord<bren> In reply to @amadan "That splits into groups": Oh, I just tried it, and you're right. But what's different from the previous example? It's weird
12:44:51*ltriant joined #nim
12:49:30*pro joined #nim
12:49:37*pro left #nim (#nim)
12:49:40*ltriant quit (Ping timeout: 252 seconds)
13:11:39FromDiscord<Require Support> sent a code paste, see https://play.nim-lang.org/#ix=4i3T
13:12:25FromDiscord<scruz> show the Fetch proc
13:13:42FromDiscord<Require Support> just trying to understand what the error means
13:14:20*TakinOver quit (Ping timeout: 256 seconds)
13:15:29FromDiscord<scruz> maybe you're using Fetch before defining it
13:16:05FromDiscord<scruz> (edit) "it" => "it?"
13:16:44FromDiscord<Require Support> weird that it errors out on the linker and nim compiler doesn't saying anything
13:22:23FromDiscord<scruz> https://nim-lang.org/docs/tut1.html#procedures-forward-declarations
13:38:32*TakinOver joined #nim
13:40:51FromDiscord<Require Support> hmmm checked for it but it's not the problem
13:43:37FromDiscord<juelix> What is the best library to connect with MySQL? I am using windows 11/64bit.
13:50:41FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=4i41
13:54:16FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=
13:58:05FromDiscord<auxym> yeah it's a special "table constructor syntax", it creates an array of tuples IIRC, which you can then pass to `toTable` (if you import std/tables)
13:58:49*Phytolizer joined #nim
14:03:09FromDiscord<ambient> I find reasoning around the types of these things quite challenging
14:04:05FromDiscord<ambient> because you need matching types and if there's any non-matching types it breaks the entire program
14:04:55FromDiscord<jtv> That's how you dramatically decrease the number of bugs that show up at runtime, by not allowing type errors in :). So it might be a transition to learn, but worth it
14:05:33FromDiscord<ambient> It's not that I'm against types, but I'm against lack of documentation, lack of examples, lack of tooling support, lack of good error messages
14:05:53FromDiscord<ambient> I'm shooting blind here
14:07:18FromDiscord<starch> In reply to @auxym "(if it's a nim": nim source file...?
14:07:24FromDiscord<jtv> I just started using Nim a few weeks ago; I agree the error messages can be a bit arcane, and not everything that should be well documented is :). But I think when you could use some clarity just ask and will try to help
14:12:23*Phytolizer quit (Remote host closed the connection)
14:12:40FromDiscord<ambient> here's an example where I can't figure out the type (AoC 2022 spoiler): https://github.com/amb/aoc2022/blob/master/8/s.nim#L50 keyWarpWorks works, keyWarpBroken can't figure it out
14:12:59FromDiscord<auxym> In reply to @starch "nim source file...?": source code. code. programming language
14:14:58FromDiscord<jtv> Well, tell me what's "not working", what error do you get?? That one function looks syntactically fine
14:14:59FromDiscord<auxym> In reply to @ambient "It's not that I'm": I agree tooling isn't nim's strong point, but the docs specify the types for all procs in the standard library. Table constructor syntax is documented here: https://nim-lang.org/docs/manual.html#statements-and-expressions-table-constructor
14:15:44FromDiscord<ambient> In reply to @jtv "Well, tell me what's": Type mismatch
14:16:48FromDiscord<jtv> Well, I don't see the function warp you're calling there, so hard to say without more info
14:16:54FromDiscord<starch> In reply to @auxym "source code. code. programming": yeah but subprocess wont run as nim source code?
14:17:12FromDiscord<ambient> In reply to @jtv "Well, I don't see": The entire source is there, you just need to run the file
14:18:54FromDiscord<! Nilts> In reply to @jtv "Generally, I have always": Like standard peg or raw? I chose npeg because i can put code to manage values in the parser
14:21:17FromDiscord<jtv> You've got a dependency on zero_functional in there, I don't know what that is. You also import sugar in aoc.nim but sure aren't using it
14:24:32FromDiscord<jtv> sent a long message, see http://ix.io/4i4a
14:25:28FromDiscord<jtv> But again, that's why you can just write a spec and let a generator give you a full parser for your spec. Easy to build, easy to debug, and can accept any context-free language and many context-sensitive ones
14:27:20FromDiscord<! Nilts> I know EBNF is a parsing thing and that's all i know
14:28:20FromDiscord<ambient> I guess the point here is that tables are just not something Nim natively supports, and at best it's syntactic sugar for arrays and tuples
14:28:24FromDiscord<jtv> On a quick google search, this looks like a reasonable intro to ebnf: https://matt.might.net/articles/grammars-bnf-ebnf/
14:28:28FromDiscord<ambient> so I have to work around it
14:29:41FromDiscord<jtv> "work around it"? I use tables extensively, a lot of people do. The implementation is just in a library so that you can choose not to pull it in.
14:30:04FromDiscord<ambient> there seem to be gotchas, like collect doesn't recognize a table element coming from a function
14:30:19FromDiscord<ambient> it creates a seq instead of a table
14:31:15FromDiscord<jtv> What language are you coming from?
14:31:18*PMunch quit (Quit: Leaving)
14:35:40FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=4i4c
14:35:52FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=4i4d
14:36:50*Phytolizer joined #nim
14:36:53FromDiscord<jtv> sent a long message, see http://ix.io/4i4e
14:37:06FromDiscord<ambient> @jtv that's completely tangential and irrelevant to the problem
14:37:12FromDiscord<jtv> The second is that dictionaries live in a library, they have NO special treatment in the language
14:37:21FromDiscord<jtv> So you need to "import tables" there
14:38:14FromDiscord<jtv> {x : a, y : b} in Nim is the same as writing [(x, a), (y, b)]
14:38:21FromDiscord<jtv> It is not special to dictionaries
14:38:50FromDiscord<jtv> The dictionary constructor functions take your array and hash it all for you
14:40:17FromDiscord<jtv> The reason for that, it gives you the option to use an implementation that doesn't hash, so you can use an "associative array" implementation, ie one that doesn't hash
14:40:18FromDiscord<ambient> Is there a way to define a return type as a part of a table or is there not?
14:40:26FromDiscord<jtv> Which can be faster when you have small tables
14:40:36FromDiscord<jtv> Yes, of course
14:40:53FromDiscord<jtv> x: Table[string, int]
14:41:05FromDiscord<jtv> That declares x as a table with strings for keys, ints for values
14:42:21FromDiscord<ambient> I think the point here is that I'm trying to collect items from a function and make a table out of that
14:43:59FromDiscord<ambient> how would you write function foo to make the results match? https://github.com/amb/aoc2022/blob/master/8/problem.nim
14:44:26*kenran joined #nim
14:45:37FromDiscord<ambient> either you can or I have to figure out another way of doing it
14:46:59*kenran quit (Remote host closed the connection)
14:48:21FromDiscord<jtv> Well, I'm not here to do your work for you, I'm here to try to help you understand the language. If you want foo to return a dictionary, why are you specifying that it returns an array?
14:49:05FromDiscord<ambient> because type of {'a':1} is array[0..0, (char, int)]
14:49:28FromDiscord<jtv> No, it's whatever the language infers, which it infers from your return type here
14:50:04FromDiscord<ambient> Setting it to auto changes nothing
14:50:29FromDiscord<jtv> Well, you're not calling toTable actually
14:51:39FromDiscord<jtv> Something like this:
14:51:40FromDiscord<jtv> proc bar(k : char, v : int): Table[char, int] =↵ {k : v+1}.toTable()
14:52:20FromDiscord<ambient> that just gives me seq[Table[char, int]]
14:52:24FromDiscord<ambient> instead of Table[char,int]
14:52:28FromDiscord<jtv> Because like I said, the literal does NOT create a dictionary behind your back, dictionaries get no special treatment
14:53:03FromDiscord<jtv> I assume you're trying to merge a bunch of dictionaries of the same type here?
14:53:07*ltriant joined #nim
14:53:08FromDiscord<ambient> Look, I'm just looking for a simple answer if this is possible to do and I'm assuming the answer is no so I'm just going to try something else
14:53:27FromDiscord<ambient> I'm trying to transform a table
14:53:37FromDiscord<ambient> with a function
14:53:41FromDiscord<jtv> In what way?
14:54:01FromDiscord<jtv> You want to change the values in the table you created?
14:54:06FromDiscord<ambient> pseudo: table.map(x => {x.key: x.value+1})
14:54:55FromDiscord<ambient> or pseudo: table.makeNew(x => {(-x.key[1], x.key[0]): x.value})
14:56:00FromDiscord<jtv> And you want to change the table or just yield another table?
14:56:10FromDiscord<ambient> either would work
14:56:14FromDiscord<jtv> And is the type of the inputs important??
14:57:19FromDiscord<ambient> I don't think I'm going to get any answers here so I'll get back to hacking 🫡
14:57:54FromDiscord<jtv> I'm about to write it for you
14:58:10FromDiscord<jtv> Just waiting for you to answer my question 🙂
14:58:59*ltriant quit (Ping timeout: 256 seconds)
15:07:56FromDiscord<jtv> Okay, I'll just assume then
15:08:08FromDiscord<jtv> 2 mins
15:09:35FromDiscord<jtv> Okay, this assumes you just want char mapped to int only, and is thus a little simpler:
15:09:53FromDiscord<jtv> sent a code paste, see https://play.nim-lang.org/#ix=4i4o
15:10:42FromDiscord<jtv> And if you'd rather it work generically, like a good map function should, change the mapTable function to this:
15:10:49FromDiscord<jtv> sent a code paste, see https://play.nim-lang.org/#ix=4i4p
15:11:09*dtomato4 is now known as dtomato
15:12:04FromDiscord<jtv> @ambient I am sorry if you feel like I wasn't being helpful, I felt like you weren't being clear about what you didn't understand and was trying to help you understand, not just give you an answer
15:14:21*dtomato quit (Quit: The Lounge - https://thelounge.chat)
15:14:46*dtomato joined #nim
15:15:01FromDiscord<kots> sent a code paste, see https://play.nim-lang.org/#ix=4i4r
15:30:08*Phytolizer quit (Ping timeout: 260 seconds)
15:40:49FromDiscord<Require Support> i wish async errors weren't riddles 😦
15:45:01*dnh quit (Ping timeout: 265 seconds)
15:47:22FromDiscord<auxym> In reply to @starch "yeah but subprocess wont": as i said, you can use subprocess to first run the nim compiler to compile the file
15:51:55FromDiscord<Require Support> sent a code paste, see https://play.nim-lang.org/#ix=4i4A
15:54:05FromDiscord<jtv> The C function _setjmp only takes a jmpbuf as an argument
15:54:11FromDiscord<jtv> I don't know what that second argument is
15:57:57FromDiscord<ringabout> In reply to @Require Support "can someone translate this": Did you use 1.6.8?
15:58:06FromDiscord<ringabout> (edit) "1.6.8?" => "1.6.8 or 1.6.6?"
16:01:28FromDiscord<ringabout> In reply to @Require Support "can someone translate this": Use 1.6.10 or a C compiler supports `_setjmp` extension (e.g. the officially recommended C compiler).
16:23:10*Phytolizer joined #nim
16:23:38Phytolizerhttps://pasteboard.co/pyDZPljn3Uan.png what is being destroyed here? it is taking a lot of my runtime
16:25:50FromDiscord<guttural666> how do I do dis? https://media.discordapp.net/attachments/371759389889003532/1050448124109393990/image.png
16:56:05FromDiscord<guttural666> In reply to @guttural666 "how do I do": https://stackoverflow.com/questions/72406736/using-mutable-varargs-doesnt-work-as-expected-in-nim↵seems to be the answer, sad face
16:56:12NimEventerNew post on r/nim by pentothal: typetraits and inheritance, see https://reddit.com/r/nim/comments/zg4itc/typetraits_and_inheritance/
17:01:54*pro joined #nim
17:02:00*pro left #nim (#nim)
17:05:35FromDiscord<Require Support> In reply to @ringabout "Did you use 1.6.8": im on devel, and im cross compiling using mingw
17:12:24FromDiscord<ambient> sent a code paste, see https://play.nim-lang.org/#ix=4i4U
17:13:14FromDiscord<ambient> The collect macro needs the {} to work, as @kots said
17:13:38*ltriant joined #nim
17:15:34FromDiscord<jtv> Yes, sure. I didn't even bother with it, yYou seemed to be asking about dictionary type semantics, and I gave you much clearer code that does exactly what you were asking for, you didn't say you had to use the collect macro.
17:16:00FromDiscord<ambient> well if I had all the puzzle pieces I would not have to ask questions 🤔
17:16:32FromDiscord<jtv> I'm saying you need to be more specific with your questions, it was very hard to figure out what you were really trying to accomplish, what you didn't understand, etc.
17:16:48FromDiscord<ambient> noted
17:17:59FromDiscord<jtv> You seemed to be not understanding the type system, and the examples I gave were meant to show some of the optionality you have there
17:18:45*ltriant quit (Ping timeout: 260 seconds)
17:37:52arkanoidin unittest, check foo = 42 returns nice output, showing the value of foo when it doesn't match. I need to perform same test but on floats using almostEqual, but check math.almostEqual(foo, 42.1275368121) returns just test passed or not without showing value
17:38:05arkanoidis there a "checkAlmostEqual"?
17:43:52Phytolizeris there a way to *not* zero out memory constantly? it is taking over 13% on my runtime
17:46:55FromDiscord<planetis> Yes compile with -d:release. It lts not an issue with optimized builds
17:47:08FromDiscord<guttural666> In reply to @Phytolizer "is there a way": wtf are you programming haha
17:47:21Phytolizeradvent of code
17:47:39FromDiscord<guttural666> In reply to @Phytolizer "advent of code": ah nice
17:47:52Phytolizer@planetis: is there a way to keep line number info etc in optimized builds? i want to profile my code
17:48:19FromDiscord<planetis> Yes -g
17:48:36FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4i4X
17:49:35FromDiscord<planetis> Better?
17:50:07FromDiscord<sOkam!> i've never stored an array of arrays or arrays, so might be missing something
17:50:10Phytolizeromg how did i miss that, thanks
17:50:25Phytolizernow i have to figure out why `eqcopy` is being called 200k times...
17:51:06FromDiscord<sOkam!> (edit) "or" => "of"
17:53:36Phytolizerhttps://pasteboard.co/87aBm3OJbcYM.png what is happening here?
17:55:30FromDiscord<planetis> What's the signature of this eqcopy, what type does it copy,?
17:56:28FromDiscord<Phytolizer> I'm not really sure how to tell
17:56:51Phytolizerthis is kcachegrind
17:57:09FromDiscord<planetis> Try to make dir a template instaed of let
17:57:51FromDiscord<planetis> template dir: untyped = t.fs.child[]
17:58:22FromDiscord<planetis> (edit) "t.fs.child[]" => "t.fs[child.int]"
17:58:35FromDiscord<planetis> (edit) "instaed" => "instead"
17:59:29Phytolizerthe copies are still present but they moved
18:00:05Phytolizerto some `==` proc in system.comparisons
18:00:14Phytolizerwhich i assume is *the* `==` proc
18:01:07FromDiscord<planetis> Screen?
18:02:01Phytolizerhttps://pasteboard.co/xIp31EOkwE3L.png doesn't make much sense here and im not sure where it's called from
18:02:43FromDiscord<planetis> Weird...
18:03:20FromDiscord<planetis> You need to open the .c file in nimcache and find out what that proc copies
18:05:38FromDiscord<planetis> In Linux it's ~/.cache/nim/filename_r/@mfilename.c
18:05:43Phytolizeri found it
18:05:46Phytolizerit copies the FsTree
18:07:02Phytolizerno, sorry
18:07:03PhytolizerFsNode
18:07:08Phytolizeri was looking at the wrong one
18:07:54FromDiscord<planetis> So it copies the whole subtrees!
18:07:57Phytolizeroh dammit it's the childNode
18:08:19Phytolizerno this is a linear DS, it is just copying one node an inordinate number of times
18:08:55Phytolizeri got rid of it by making childNode a template yay!
18:09:23Phytolizeri'm going to look for these random copies elsewhere in my code
18:10:03Phytolizerthanks for showing me how to figure this stuff out, i didnt know the C code was cached
18:10:18Phytolizerthat literally halved my solve time for day 7 btw
18:12:07FromDiscord<planetis> Happy to help!
18:52:26*hochata joined #nim
18:54:37*hochata quit (Client Quit)
18:55:28*hochata joined #nim
19:01:16*rockcavera joined #nim
19:24:38*Phytolizer quit (Ping timeout: 260 seconds)
19:31:11FromDiscord<@thatrandomperson5-6310e3b26da03> `nim doc --project --index:on --git.url:https://github.com/zevv/npeg --outdir:htmldocs npeg.nim` gives OsError file not found
19:31:23FromDiscord<@thatrandomperson5-6310e3b26da03> I need some docs for npeg
19:33:46Zevvnpeg.nim should be src/npeg.nim
19:34:17FromDiscord<@thatrandomperson5-6310e3b26da03> Now im getting getDocHackJs errrors
19:34:48Zevvalso, the embedded docs is not the main documentation, check the github README, it's all there
19:36:17FromDiscord<@thatrandomperson5-6310e3b26da03> > also, the embedded docs is not the main documentation, check the github README, it's all there↵Ok then how do i get a seq of all the “$” captures inside a code capture handler
19:37:14Zevvthey are available in @capture[].s $n is sugar for capture[n].s
19:37:36Zevvhttps://github.com/zevv/npeg#code-block-captures
19:55:40FromDiscord<Michal Maršálek> https://github.com/MichalMarsalek/Advent-of-code/blob/master/2022/Nim/day8.nim
19:56:20FromDiscord<Michal Maršálek> finally I could utilize the Grid ops and the Vector ops I have in my aoc library
19:58:40FromDiscord<Horizon [She/Her]> https://github.com/nim-lang/Nim/issues/21052 broken essentially for a year, fun xD
20:12:56*hochata quit (Remote host closed the connection)
20:22:34*Phytolizer joined #nim
20:26:24FromDiscord<ShalokShalom> 🥳
20:27:10arkanoidif my project uses C as backend, but requires a package that wants C++ as backend in it's nimble file, what's the backend used when I "nimble run" my project?
20:29:51FromDiscord<Horizon [She/Her]> It'll use the C++ backend, i assume
20:37:39*Phytolizer quit (Remote host closed the connection)
20:38:47*Phytolizer joined #nim
20:40:06*neceve joined #nim
20:44:34*arkurious joined #nim
20:45:03FromDiscord<@thatrandomperson5-6310e3b26da03> I get type mistmatch for @ and []↵(<@709044657232936960_=5aevv=5b=49=52=43=5d>)
20:57:39FromDiscord<MetuMortis> I can't use nim playground, can you?
20:59:20*jmdaemon joined #nim
21:02:07*neceve quit (Quit: ZNC - https://znc.in)
21:05:02FromDiscord<demotomohiro> When Nim playground go down, https://wandbox.org/
21:05:40FromDiscord<demotomohiro> !eval echo "Working?"
21:05:55*neceve joined #nim
21:06:40NimBotCompile failed: <no output>
21:10:41Phytolizer@MetuMortis it's been down since at least a couple of days, it's annoying on IRC because code snippets get auto-redirected there and i can't see them at all
21:14:17FromDiscord<MetuMortis> !eval echo "Hi!"
21:14:32FromDiscord<MetuMortis> :d
21:15:18NimBotCompile failed: <no output>
21:15:31*ltriant joined #nim
21:15:31arkanoidHorizon, thanks
21:20:19*ltriant quit (Ping timeout: 252 seconds)
21:35:16*ltriant joined #nim
21:43:45*v28p joined #nim
21:58:13FromDiscord<Horizon [She/Her]> Np ^^
22:15:27FromDiscord<MetuMortis> sent a code paste, see https://play.nim-lang.org/#ix=4i64
22:15:37FromDiscord<MetuMortis> (edit) "https://play.nim-lang.org/#ix=4i64" => "https://play.nim-lang.org/#ix=4i65"
22:33:22*TakinOver quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
22:46:13FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4i6a
22:46:30FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4i6b
22:46:59FromDiscord<voidwalker> I am having trouble understanding why the expression with the mapIt doesn't return the same thing as the first one :\
22:50:23FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4i6d
22:53:12FromDiscord<voidwalker> `seq[seq[PeerAddr]]` as expected
22:54:58FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=4i6e
22:55:10FromDiscord<voidwalker> (edit) "https://play.nim-lang.org/#ix=4i6e" => "https://play.nim-lang.org/#ix=4i6f"
22:55:11FromDiscord<voidwalker> (edit) "https://play.nim-lang.org/#ix=4i6f" => "https://play.nim-lang.org/#ix=4i6g"
22:55:24FromDiscord<Elegantbeef> Now that i realise what you're doing
22:56:01FromDiscord<Elegantbeef> Isnt there a template or procedure for this
22:56:06FromDiscord<voidwalker> I have no idea what I am doing tbh, I only know what I want to do
22:56:57FromDiscord<Elegantbeef> Yea there is `all`
22:56:58FromDiscord<voidwalker> I am trying to launch requests to all the torrent trackers concurrently, and then combine/deduplicate the results
22:57:54FromDiscord<voidwalker> this all ? `proc all[T](s: openArray[T]; pred: proc (x: T): bool {.closure.}): bool {.↵ effectsOf: pred.}`
22:58:14FromDiscord<Elegantbeef> No
22:58:17FromDiscord<Elegantbeef> Inside asyncfutures
22:58:19FromDiscord<Elegantbeef> There is an all
22:58:40FromDiscord<voidwalker> oh I kinda remembered about that, but couldn't find it in index google : )
22:59:04FromDiscord<Elegantbeef> https://nim-lang.org/docs/theindex.html
22:59:04FromDiscord<Elegantbeef> That's the index you use
22:59:06FromDiscord<Elegantbeef> Dont use google when you have that
22:59:56FromDiscord<voidwalker> yeah I bookmarked that
23:00:50FromDiscord<voidwalker> oh i had to search for `add:`
23:00:55FromDiscord<voidwalker> (edit) "`add:`" => "`all:`"
23:01:18FromDiscord<voidwalker> good to know, cause I had a ` waitFor (futs[0] and futs[1] and futs[2] and futs[3] and futs[4] and futs[5])` : S
23:02:12FromDiscord<voidwalker> still, how does this answer my question, what is wrong with that mapIt expression ?
23:02:15FromDiscord<! Nilts> Anyone have any idea how i would make a ast gen in npeg, i'm having trouble finding out how to get the children / parents and whatnot
23:07:14*Phytolizer quit (Remote host closed the connection)
23:14:30arkanoidI'm fighting "arraymancer-0.7.17/arraymancer/laser/private/memory.nim(9, 23) Error: undeclared identifier: 'KnownSupportsCopyMem'", any idea what could cause this?
23:16:51arkanoidif I change Tensor[uint16] to Tensor[int], I get different error: arraymancer-0.7.17/arraymancer/laser/strided_iteration/foreach_common.nim(69, 44) Error: attempting to call undeclared routine: 'unsafe_raw_offset'
23:29:32FromDiscord<! Nilts> sent a code paste, see https://paste.rs/7rR
23:31:57FromDiscord<Elegantbeef> `ref` alone is a generic
23:32:51FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4i6n
23:35:44FromDiscord<! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4i6o
23:36:18FromDiscord<Elegantbeef> I dont even know what you mean
23:38:12FromDiscord<! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4i6p
23:38:41FromDiscord<Elegantbeef> You're not elaborating
23:39:44FromDiscord<! Nilts> In reply to @Elegantbeef "You're not elaborating": ????? I mean i cannot do the above, i can only define MyType not othertype
23:40:35FromDiscord<Elegantbeef> What you're after makes no sense presently
23:41:36FromDiscord<! Nilts> i have this issue with giving people what they want when they don't specify, so don't say "you're not elaborating" say what you want me to elaborate on
23:41:46arkanoidnevermind, solved
23:42:13FromDiscord<b1rdf00d> In reply to @not logged in "i have this issue": why can't you define 2 types?
23:42:42FromDiscord<! Nilts> In reply to @b1rdf00d "why can't you define": because im using some macro to define one of the macros
23:42:47FromDiscord<! Nilts> (edit) "macros" => "types"
23:43:15FromDiscord<ShalokShalom> @! Nilts i would suggest to show us more of your code 🙂
23:45:08FromDiscord<! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4i6w
23:48:00FromDiscord<Elegantbeef> replace `OrlNode` with `ref ObjNodeObj`
23:48:10FromDiscord<Elegantbeef> then do `type OrlNode = ref ObjNodeObj`
23:52:47FromDiscord<! Nilts> In reply to @Elegantbeef "replace `OrlNode` with ": that works, i don't event need orlNodeObj, thanks!
23:53:12*v28p quit (Remote host closed the connection)