<< 02-12-2020 >>

00:04:54FromDiscord<mratsim> @fwsgonzo the plan is to move towards formal verification: https://nim-lang.org/docs/drnim.html
00:05:37FromDiscord<mratsim> Also see the destructors article and this RFC which has been implemented as of 1.4: https://github.com/nim-lang/RFCs/issues/178
00:05:38disbotlent/var/openArray inside objects/containers
00:15:51FromDiscord<fwsgonzo> looks awesome 🙂
00:57:24*lritter quit (Quit: Leaving)
00:59:33*Sembei quit (Quit: WeeChat 3.0)
01:08:24*apahl quit (Ping timeout: 240 seconds)
01:09:28*vesper11 joined #nim
01:09:37*apahl joined #nim
01:17:35*xace quit (Ping timeout: 265 seconds)
01:19:20*xace joined #nim
01:19:43*Tanger joined #nim
01:20:20FromDiscord<Rebel> Best way to do pipelining in Nim or distributed task scheduling?
01:23:59FromDiscord<Zachary Carter> Is disruptek ever coming back?
01:26:08FromDiscord<shadow.> no idea
01:32:52FromDiscord<Rebel> ¯\\_(ツ)\_/¯
01:33:04FromDiscord<Rebel> All caused due to the great debate
01:33:14FromDiscord<Rebel> And the worse part is my code is still blocking asf
01:33:53FromDiscord<Zachary Carter> nah you didn't cause that, it was long overdue
01:34:11FromDiscord<Zachary Carter> they just need to block one another - but I guess due to the fact that one uses discord and the other uses IRC it's not possible
01:47:45FromDiscord<Zachary Carter> I don't know what you're trying to build so I can't really comment on your code blocking issues
01:48:11FromDiscord<Zachary Carter> if you're used to multithreaded programming in other languages - doing it in Nim shouldn't be too difficult
01:48:44FromDiscord<Zachary Carter> if you're not, you're probably better off learning the basics in another language that has more learning resources available and then coming back to your Nim issue
01:50:23FromDiscord<Zachary Carter> but again - not really sure what you're trying to build / where you're running into issues
02:13:38*abm quit (Quit: Leaving)
02:14:09*apahl_ joined #nim
02:16:05FromDiscord<Theodore> Nim equiv. of numpy?
02:16:52FromDiscord<flywind> !arraymancer
02:16:56*apahl quit (Ping timeout: 240 seconds)
02:17:07FromDiscord<flywind> (edit) "!arraymancer" => "!repo arraymancer"
02:17:23FromDiscord<Theodore> perfecto
02:18:24FromDiscord<flywind> and https://github.com/xflywind/awesome-nim#matrix
02:25:54FromDiscord<Quibono> I think you mean the python equivalent of arraymancer lol
02:45:32FromDiscord<Quibono> So I've got to write an API layer for a website in Nim. It's already got an official python sdk, do you think it would be faster to just port that to nim, or write from scratch>
02:46:38FromDiscord<flywind> which `sdk`?
02:46:57FromDiscord<Quibono> https://github.com/Kucoin/kucoin-python-sdk
02:49:53FromDiscord<flywind> If you only need small parts of it, I think you could write from scratch in Nim.
02:50:14FromDiscord<Quibono> Lol it's hard to decide how much I'll need.
02:51:07FromDiscord<flywind> You could port them first, then decide whether rewrite it in Nim.
02:54:49FromDiscord<emizzle> Is there a known way to download a resource in a sandbox (for the purposes of getting its byte header content type)?
03:04:32FromDiscord<Rebel> Is it possible to make a table a threadvar in Nim? running into some very weird errors...
03:14:15FromDiscord<Rebel> nvm was being smoothbrained
03:39:54*kiwi_83 joined #nim
03:40:27kiwi_83the parentheses surrounding the ternary conditional expression in a one-liner is to initiate a new block rite
03:44:05FromDiscord<William_CTO> why is `!=` deprecated?
03:44:28FromDiscord<William_CTO> `if resp.status != Http200:`↵Warning: Deprecated since v1.2; use rawCode == $code instead; == is deprecated [Deprecated]
03:47:59FromDiscord<Rebel> yikes I use `!=` in a lot of places in my codebase...
03:48:15FromDiscord<Rebel> ok well actually just 14 places
03:48:26FromDiscord<William_CTO> wait
03:48:29FromDiscord<Rebel> Also Python's asyncio.Queue is == to x in Nim
03:48:35FromDiscord<Rebel> (edit) removed "is"
03:48:41FromDiscord<Rebel> (edit) removed "to"
03:48:41FromDiscord<William_CTO> I think that's a deprecation notice from httpclient
03:48:43FromDiscord<William_CTO> one moment
03:49:04FromDiscord<William_CTO> yep
03:49:20FromDiscord<William_CTO> I understand the message now
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:33*supakeen joined #nim
04:08:57*nixfreak joined #nim
04:09:18FromDiscord<nikki> @William_CTO pretty cool tho right
04:14:36FromDiscord<William_CTO> hmm?
04:18:47*apahl_ quit (Ping timeout: 260 seconds)
04:19:41*apahl joined #nim
04:27:17leorize[m]1@William_CTO use `resp.code == Http200` instead. `status` is the entire status line
04:28:02FromDiscord<William_CTO> 🤦‍♂️
04:28:47FromDiscord<William_CTO> Thanks
04:41:23*a_chou joined #nim
04:46:25*narimiran joined #nim
04:58:34*a_chou quit (Remote host closed the connection)
05:07:11FromDiscord<Bahaa> Sorry what debate?
05:07:35FromDiscord<Bahaa> Gotta know what debate caused someone to quit the server 😅
05:16:15*waleee-cl quit (Quit: Connection closed for inactivity)
05:19:43FromDiscord<Rebel> Just do `from:Rebel#1782 job` in discord search and find the message at 11/26/2020 at 2:09 PM EST and read from there
05:22:16*thomasross quit (Ping timeout: 240 seconds)
05:25:00FromDiscord<Bahaa> So someone quit the server because they don't like async and apparently not everyone agrees?
05:36:58FromDiscord<Avatarfighter> wait who quit
05:37:04FromDiscord<Avatarfighter> this is some juicy nim drama
05:37:08FromDiscord<Avatarfighter> @Bahaa spill da beans
05:42:20FromDiscord<Rika> @Avatarfighter disruptek I believe
05:42:42FromDiscord<Avatarfighter> WHAT
05:42:51FromDiscord<Avatarfighter> has he come back too irc?
05:43:09FromDiscord<Rika> I don't know dude
05:43:16FromDiscord<Avatarfighter> wtf
05:43:33FromDiscord<Rebel> bruh just read from where I said if you want to get filled in lol
05:43:47FromDiscord<Rebel> Also realize I maybe should've just coroutines 😦
05:44:28FromDiscord<Rebel> I did end up going the thread route as idk how to do this fully asynchronous without introducing threads into the mix. My while true loop is blocking and will not exit so big sad.
05:46:23FromDiscord<Idefau> hmm i like the second advent of code problem
05:46:55FromDiscord<Rebel> hmmm yeah might try and do it in one line
05:47:11FromDiscord<Rebel> Can easily do it in one line with Python but idk about Nim
05:47:22FromDiscord<Rebel> at least the first part lol idk about the second
05:49:01kiwi_83`"abcdefg"[0 .. ^2]` what does ^ mean here
05:49:26FromDiscord<Idefau> "until the penultimate item"
05:49:57FromDiscord<Avatarfighter> https://nim-lang.org/docs/theindex.html#%60..%5E%60
05:50:08narimirankiwi_83: second from last
05:50:20narimirankiwi_83: like `-2` in python
05:54:59kiwi_83ohhh thanks! I kept thinking 'this can't be a power raised to 2 lmao'
06:08:19leorize[m]1wait disruptek quit? what?
06:12:09FromDiscord<Idefau> yay i finished both parts
06:12:59FromDiscord<Idefau> how are scores calculated
06:13:09FromDiscord<Idefau> like how soon did you finish the exercise?
06:16:25narimiranscores: how fast you are compared to other on the leaderboard
06:16:42narimiran*others
06:17:13narimiranexample: a leaderboard with 50 people. if you solve first: 50 points, second: 49 points, etc.
06:17:25narimirana leaderboard with 120 people. if you solve first: 120 points, second: 119 points, etc.
06:17:55narimiranthat's for each part, so per day you can win 2*(number of people) if you're first on both parts
06:23:51FromDiscord<Idefau> welp
06:23:53FromDiscord<Idefau> i got place 25
06:24:47FromDiscord<ThatTrollzer> Nice
06:25:31FromDiscord<ThatTrollzer> ~~top place used kotlin~~
06:30:36*vicfred quit (Remote host closed the connection)
06:32:29*vicfred joined #nim
06:33:06*vicfred quit (Max SendQ exceeded)
06:34:34FromDiscord<Idefau> brutal
06:52:00*habamax joined #nim
06:56:04Zevvdisruptek got muted by araq, and doesn't want to return
06:57:17Zevvnarimiran: https://raw.githubusercontent.com/zevv/aoc2020/master/02/main.nim
06:57:25Zevvyou feel like me parole officer, I need to check in every day
07:06:07narimiranZevv: nice! (eating your own dog food, huh?)
07:07:20Zevvit's the only food I eat
07:09:18narimiranZevv: why CountTable tho?
07:09:42ZevvI started typing before reading the whole thing and expecter part2 to need that
07:09:45Zevvbut it didn't
07:20:07FromDiscord<Rebel> Disruptek should return he is a 5head and a pretty jovial nihilistic cynical person
07:21:35FromDiscord<Rebel> Not should but needs to! It's a calling
07:23:07FromDiscord<Idefau> this
07:32:26*kiwi_83 quit (Quit: Connection closed)
07:41:50*nixfreak quit (Ping timeout: 265 seconds)
08:07:47*NimBot joined #nim
08:13:20*mbomba quit (Quit: WeeChat 3.0)
08:15:29*PMunch joined #nim
08:27:11Zevvnarimiran: ok, counttable is out. now I need to do work.
08:27:17narimiran:)
08:43:41PMunchZevv, didn't I unmute disruptek?
08:45:49PMunchWoops
08:53:55supakeenI believe they don't want to come back purely because they were muted at some point in time.
08:54:17PMunchWell I hope that's not the case..
08:57:24*Tanger quit (Quit: Leaving)
08:57:36FromDiscord<lqdev> that'd be sad
08:57:43FromDiscord<lqdev> #nim without disruptek is just not the same
09:00:07*jrhawley[m] quit (Quit: Idle for 30+ days)
09:03:28ZevvPMunch: he chooses not to return because he was aksed to leave
09:03:42Zevvand he highly respects the one who asked him
09:07:49PMunchWell he wasn't really asked to leave, he was asked to take five
09:08:42Zevvthat's not his interpretation
09:09:06PMunchThat's unfortunate
09:09:48PMunchI don't think (at least I hope not) that Araq meant to ban him indefinitely..
09:09:51Zevvhe's a dirtmouth but I value him as part of the community. He regulary picks up newbies, has a lot of opinions and is prolific as hell
09:10:05PMunchSame!
09:10:24Zevvgerman and american humor also differ, I guess
09:10:58PMunchYeah I guess
09:11:00supakeenI didn't find many of it particularly funny but it's up to people if they accept that behavior in return for contribution.
09:11:15supakeenNot so much the language but the hate on people who also build things was a bit much?
09:11:32PMunchHere in northern Norway people probably wouldn't even bat an eye about half the stuff people react to online though..
09:12:05PMunchDid he hate an anybody?
09:12:11supakeenIf he wants to offer blowjobs to people that's on him; but all the negativity around async, build times, other things they had a problem with.
09:12:46PMunchI mean the async implementation isn't perfect, I can see why he is frustrated with it
09:13:21PMunchDidn't catch his comments regarding build times, but those (almost) always seem good to me
09:13:24supakeenYes, and that was clear.
09:13:33PMunchOne of the things I really like about Nim is the fast build times
09:13:42supakeenBut I didn't read things like "no one had to make a new version of async for themselves because you were too egotistical to accept patches" and such as ok.
09:14:18Zevvsupakeen: he's never hateful ad hominem, he just bashes code he thinks is bad.
09:14:20supakeenOr, when people give help they get met with "ignore that chucklehead, you're practically done", etc.
09:14:46Zevvanyway, it's between A and D, so leave it to them to solve this
09:14:52PMunchNah I agree that those comments might've crossed a line, but I still think shunning him from the community is waaay to harsh
09:15:11PMunchFair enough, as long as he knows that we still like him .)
09:15:24Zevvgo tell him then
09:15:32Zevvhe didn't leave earth
09:15:32PMunchI have already
09:16:38*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:18:26FromDiscord<lqdev> tbh i didn't mind disruptek's "harsh" comments
09:18:55FromDiscord<lqdev> at least he was honest
09:18:58supakeenIt's a community thing to figure out if you want or do not want it but you definitely don't want to special case it.
09:21:09ZevvI think the reason for this mute was one single word that was deemed inappropriate
09:22:13FromDiscord<Idefau> heck
09:22:34PMunchsupakeen, well it's important to see everything in context
09:22:45supakeenAnd the context being 'oh its just disruptek'?
09:22:58PMunchJust straight up language bans for example are stupid
09:23:51PMunchNo, the context is that we know he's actually a nice guy who can sometimes be a bit abrasive, especially when he's passionate about something or frustrated.
09:24:08supakeenExactly, so the context is things that a lot of people don't know; like me.
09:24:12PMunchIf he was just a straight up troll who did nothing but spew horrible things I would be all for a ban
09:24:32supakeenI just see him calling people names, making lewd comments, etc.
09:24:47FromDiscord<lqdev> like, i kinda get his behavior sometimes
09:24:54FromDiscord<i_right_i> Hey, All been away from the nim community for a while what cool project are being done in Nim these days?
09:24:55FromDiscord<lqdev> especially when people can't even use common sense
09:25:02supakeenBut, I also don't really feel comfortable talking about people when they're not here to talk back to me.
09:25:04PMunchHmm, I can see how that could be off-putting for some newcomers
09:25:05supakeenSo I'll leave it at that!
09:25:16PMunch@i_right_i, what kind of projects are you looking for?
09:25:44FromDiscord<i_right_i> Game projects to start
09:25:48FromDiscord<lqdev> @i_right_i i've been working on a dynamic scripting language but i'm doing something else for december
09:26:04FromDiscord<lqdev> secret project. can't share
09:26:09PMunchWell there's the #nim-gamedev channel in case you haven't seen that as well :)
09:26:21FromDiscord<Idefau> i wanted to do a fantasy console in nim
09:26:22PMunchEnu was featured during NimConf 2020 which looks really cool
09:26:33FromDiscord<i_right_i> @lqdev anyone implementing ECS in Nim?
09:26:37PMunch@Idefau, fantasy console?
09:26:56FromDiscord<lqdev> iirc @planetis was implementing an ECS breakout clone
09:26:57FromDiscord<lqdev> also
09:27:01FromDiscord<Idefau> yeah like pico8 or tic, an emulator for a system that doesnt exist
09:27:05FromDiscord<lqdev> https://github.com/PixeyeHQ/pixecs
09:27:23PMunchAaah right
09:27:41FromDiscord<Idefau> the thing is i want to make it have its own language but i have no idea how to write interpreters
09:27:54FromDiscord<Idefau> i was thinking of making it use assembly or something
09:28:00FromDiscord<Idefau> so its easier to implement
09:28:40FromDiscord<lqdev> tcc maybe?
09:28:41FromDiscord<i_right_i> @Idefau I was just looking into lexing and parsing
09:28:45PMunchWriting a simple opt-code based thing isn't all that hard
09:28:57FromDiscord<Idefau> yeah thats what i wanted to do
09:29:04FromDiscord<lqdev> @Idefau you can steal my lang's code when i publish it
09:29:04FromDiscord<Idefau> make an opt-code thing then make an assembler for it
09:29:09FromDiscord<Idefau> wow
09:29:12PMunchI created my calculator language thingy stacklang
09:29:30FromDiscord<i_right_i> There are some smart guys that know how to do it here
09:29:44PMunchRPN based calculator with programming capabilities so you can make simple scripts
09:29:54FromDiscord<Idefau> i did some rpn thing a while back
09:30:57FromDiscord<lqdev> what is opt-code btw
09:30:59FromDiscord<Idefau> yeah actually making an assembly language like TIS-100 has would be fun
09:31:23FromDiscord<Idefau> ah i meant opcode
09:31:39FromDiscord<lqdev> PMunch said that
09:32:01FromDiscord<i_right_i> @Idefau what you probably want to look into are Virtual Machines
09:32:07FromDiscord<Idefau> yes
09:32:11FromDiscord<Idefau> im already looking into vms
09:32:30supakeenMaking a virtual machine and an assembler is a lot of fun!
09:32:36FromDiscord<Idefau> yup
09:32:57supakeenI think I found implementing `call` was the best part.
09:32:59*sunwukong joined #nim
09:33:00FromDiscord<Rika> Y’all making me tempted
09:33:24FromDiscord<Idefau> i still dont know on what platform should it run, js would make it more accessible and i could put it in my itch.io pages directly in case i do something with it, but js is cringe
09:33:33FromDiscord<Idefau> then i could do it with C and sdl
09:33:36FromDiscord<i_right_i> @Idefau https://www.youtube.com/watch?v=OjaAToVkoTw&t=1429s
09:33:39supakeenI made one for a challenge a while back which had stack-based overflows in it but *also* if you managed to execute arbitrary executions through that you could enable CPU flags which then let people break out of the VM.
09:33:43supakeenSuper fun thing to make.
09:33:47FromDiscord<Idefau> thanks, i might take a look
09:34:31supakeenhttps://craftinginterpreters.com/
09:34:33FromDiscord<i_right_i> @Idefau I just watched half of it the other night its not bad
09:34:35supakeenYou might enjoy this too.
09:34:41FromDiscord<i_right_i> good starting point
09:34:42supakeenAnd do the implementation in Nim :)
09:34:48FromDiscord<Idefau> i already have craftinginterpreters in my bookmarks
09:34:54FromDiscord<Idefau> i didnt get to read much of it
09:35:01supakeenIt's shaping up to be great.
09:36:04FromDiscord<Idefau> a fun thing would be to make the fantasy console with its asm, then make a compiler for the console
09:36:21supakeenYea you can go wild with peripherals.
09:36:40supakeenIn my 'vm' I had an opcode to open a secoket and opcodes to wait for a byte, send a byte, etc.
09:36:50FromDiscord<Idefau> interesting
09:37:44supakeenFor the challenge it was described as a virtual machine with highly secure custom firmware to manage authentication ;)
09:37:51supakeenSo password goes in over socket, answer comes back.
09:37:59FromDiscord<Idefau> sounds fun
09:38:24FromDiscord<i_right_i> @supakeen thanks for the link I have read his book on Programming Patterns
09:38:27FromDiscord<Idefau> i was thinking more of the opposite side, a "templeos" machine if you will, insecure but a programmers sandbox
09:38:41FromDiscord<lqdev> i gotta buy crafting interpreters when it's out
09:38:45supakeenOh, this was quite insecure as well since the 'challenges' I write are for CTFs.
09:38:54FromDiscord<Idefau> i see
09:38:56supakeenBut only insecure in very specific ways :)
09:42:07FromDiscord<i_right_i> @supakeen Like a backdoor 😉 😉 I gotchya
09:42:31*sunwukong left #nim ("ERC (IRC client for Emacs 27.1)")
09:42:38supakeenKind of like that yes, my job is to write software for people to 'practice' their skills on or to be used to learn new things.
09:42:53supakeenGenerally people are at the level that any mistakes you didn't want to make are also found and that's not the point.
09:42:58supakeenKinda fun :)
09:43:02FromDiscord<i_right_i> oh your IRC there was a (; (;
09:43:50supakeenAh!
09:43:52Clonkk[m]<FromDiscord "<Idefau> i was thinking more of "> So a JS VM inside a browser basically :D ?
09:44:10FromDiscord<Idefau> pretty much
09:44:24FromDiscord<Idefau> but written in nim
09:47:31FromDiscord<Idefau> to make it more fun(or just more painful), i would make it a stack machine and the assembler's most important opcodes would be `PUSH` and `POP`
09:47:34FromDiscord<Idefau> and a few registers
09:48:51FromDiscord<mratsim> a stack machine with registers is a register machine
09:48:56FromDiscord<Idefau> god damn
09:48:58FromDiscord<Idefau> you are right
09:50:09FromDiscord<i_right_i> another cool resource to look into is llvm's IR
09:52:33FromDiscord<i_right_i> it's like portable assembly
09:53:01*hmmmmm joined #nim
09:53:08*natrys joined #nim
09:53:24*Vladar joined #nim
09:56:11FromDiscord<Idefau> interesting, ill look into that too
09:57:00FromDiscord<mratsim> you can look into some of the resources I collected here as well: https://github.com/status-im/nimbus-eth1/wiki/Interpreter-optimization-resources
09:57:54FromDiscord<mratsim> it's not directly about stack vs registers but some of the papers do cover it.
09:59:47FromDiscord<lqdev> stack-based is much simpler to implement ime
10:01:40FromDiscord<Idefau> yeah
10:03:00Clonkk[m]<FromDiscord "<i_right_i> another cool resourc"> In that case, why not straight go with NLVM and WebAssembly ?
10:04:10*paul__ joined #nim
10:04:40PMunch!eval echo NimVersion
10:04:43NimBot1.4.0
10:04:50*zahary quit (Quit: Connection closed for inactivity)
10:04:52PMunchHmm, it seems like my script is broken
10:06:44*paul__ is now known as spiderstew
10:08:12FromDiscord<i_right_i> @Clonkk not very familiar with either but I believe llvm has a webassembly backend
10:09:13*hmmmmm quit (Remote host closed the connection)
10:18:03spiderstewHi, I'm new to Nim and trying to get a sense of what kind of memory safety Nim ensures. Is my assumption right that var parameters allow for use-after-free bugs like this: https://play.nim-lang.org/#ix=2GeZ And if so is there some mitigation Nim is doing?
10:19:12*mbomba joined #nim
10:39:42Clonkk[m]I think you are confusing seq with pointers.
10:43:42supakeenWoo, part one of my secret project passes its tests.
10:43:46supakeenThis must mean my tests are not good enough.
10:51:01*clyybber joined #nim
11:04:00spiderstewClonkk[m]: In my example I'm passing "xs[0]" as the var parameter "x", my understanding is that this is implemented by passing a pointer to the backing structure of the seq. When repeatedly appending to the seq the backing structure will run out of space and seq will reallocate it. So the pointer used for the var parameter "x" is now dangling right?
11:04:22*abm joined #nim
11:07:27FromDiscord<mratsim> you can't return a var seq/string/ref because that would be unsafe
11:07:43FromDiscord<mratsim> if you can that's a bug
11:08:06FromDiscord<mratsim> the message is likely to be "illegal capture T" or something in that genre though
11:08:14*superbia joined #nim
11:08:15FromDiscord<mratsim> which is true but might be unclear
11:08:33dom96You sure? Pretty sure you can, otherwise `mget` for Table[string, string] wouldn't work
11:09:12FromDiscord<mratsim> mmmmmhhhh
11:09:46FromDiscord<mratsim> ah maybe the GC does point to the correct var then
11:13:24dom96but yeah, then what spiderstew describes sounds like a bug. Not sure though, Araq?
11:25:45FromGitter<ynfle> What are the speed and memory trade offs for tuple versus objects? I like tuple unpacking but other than that
11:26:03spiderstewmratsim: I'm not sure how that applies to my example. You mean "xs[0]" would not return a var and therefore the parameter "x" in the procedure "mess" wouldn't point inside "xs"?
11:26:46FromDiscord<mratsim> @ynfle no tradeoff, in C both are plain structs
11:27:01FromGitter<ynfle> mrastim
11:27:23FromGitter<ynfle> Thanks
11:28:31FromDiscord<mratsim> @spiderstew, I meant the compiler should prevent that from compiling
11:28:36Clonkk[m]<spiderstew "Clonkk: In my example I'm passin">
11:28:44spiderstewI'm pretty sure "x" does point into the backing structure of the "xs" seq, because if I mutate the "x" first the content of "xs[0]" also changes: https://play.nim-lang.org/#ix=2Gff
11:28:45FromDiscord<mratsim> you can raise that on Github
11:28:58Clonkk[m]https://play.nim-lang.org/#ix=2Gfd See the memory address
11:29:23Clonkk[m]After reallocating the seq, the memory is moved but the ``var int``parameters retains its original memory address
11:31:39Clonkk[m] * After reallocating the seq, the memory is copied but the `var int`parameters retains its original memory address
11:32:05Clonkk[m] * After reallocating the seq, the memory is copied but the `var int`parameters retains its original memory address.
11:34:25Clonkk[m]What I find strange, is that the variable is still accessible even after explicitly calling GC_fullCollect() after reallocating the seq ?
11:38:59*kiwi_83 joined #nim
11:43:20spiderstewmratsim: I see, thanks. I'll report it on Github.
11:45:50kiwi_83nim compile to m1 mac arm?
11:50:21supakeen0Did something change in regards to compiler messages, they seem super helpful nowadays :)
11:50:35kiwi_83any examples?
11:51:05supakeen`Error: inheritance only works with non-final objects; for Context to be inheritable it must be 'object of RootObj' instead of 'object'`
11:51:31kiwi_83oh wow, that is more detail than python's error messages!
11:51:40kiwi_83it even provides suggestions!
11:51:56supakeenOr even.
11:51:59supakeen`Error: invalid indentation; an export marker '*' follows the declared identifier`
11:52:15kiwi_83wait what code generated this ^
11:52:24supakeenWhat code generated the first one?
11:52:54supakeenI had a `type Context* = object` and another `type IRCContext* = object of Context`
11:53:17kiwi_83oh I meant the second one :)
11:53:30supakeenAh for the second one I wrote `proc next()* =` :p
11:53:51kiwi_83damn the compiler msgs are really helpful
11:54:16kiwi_83at this rate we will probably have suggestions to fix the code in the message itself
11:54:38supakeenI like it a lot :)
11:56:22kiwi_83indeed! is this new with the latest nim release?
12:00:33FromDiscord<Idefau> yeah nim has very nice errors
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:34*supakeen joined #nim
12:11:39supakeenkiwi_83: I am on the latest yes.
12:22:40*kiwi_835 joined #nim
12:26:36*kiwi_83 quit (Ping timeout: 240 seconds)
12:26:45*hmmmmm joined #nim
12:29:20*hmmmmm quit (Remote host closed the connection)
12:29:55ForumUpdaterBotNew thread by HJarausch: Converter - how to switch is off, see https://forum.nim-lang.org/t/7189
12:29:55Zoom[m]@flywind see my PR for awesome-nim
12:34:50PMunchkiwi_835, you PMed me about a README typo?
12:34:55PMunchI was in a meeting at work
12:36:07kiwi_835yes did you not get the message??
12:36:22kiwi_835i sent direct link :)
12:39:05PMunchI got a message saying one of my repos had a type in the readme :P
12:39:11PMunchBut not which repo or what the typo was
12:47:57*mbomba quit (Quit: WeeChat 3.0)
12:53:16*vesper11 quit (Ping timeout: 240 seconds)
12:58:41*hmmm joined #nim
13:03:14Zoom[m]It's probably about notifishower
13:03:47PMunchNah, it was protobuf
13:04:07Zoom[m]Or, as I've recently taken to calling it, "not iFish however"
13:04:21PMunch-_-
13:04:52*Q-Master joined #nim
13:05:13Zoom[m]You desperately need a cool fish for a mascot
13:05:38PMunchDo you have anything against my shower?
13:05:40hmmmno it is a fish shower
13:05:53Zoom[m]Cool and well-informed fish
13:05:54hmmmit might be the best software name ever
13:06:08hmmmwill it work on windows munchie
13:06:16Zoom[m]Shower is a logo, fish is a mascot
13:06:35*Q-Master quit (Client Quit)
13:07:07PMunchhmmm, not at all
13:07:27hmmmmeh, those linux users always building cool stuff for themselves
13:07:34PMunchIt's built using X11 and imlib2, neither of which run on Windows :P
13:07:53PMunchFeel free to join the dark side :)
13:07:55PMunchIt's free
13:08:01Zoom[m]Even with X-on-windows?
13:08:17hmmmwell I'd like to get a linux laptop but I'm worried it won't be supported
13:08:18PMunchNo idea, I haven't used Windows since Windows 7..
13:08:48PMunchBut if it runs X I guess it should work
13:09:23Zoom[m]What do you mean 'since', nothing came after.
13:09:36PMunchHaha :P
13:09:45hmmmdude please we have the adaware bundle w10
13:10:00hmmmlots of colored icons of things you can buy for cheap
13:10:00Zoom[m]Please, guys, don't ruin it.
13:10:51Zoom[m]I chose the life of ignorance
13:11:24*Q-Master joined #nim
13:13:29hmmmhonestly w10 is not half bad if you are not grossed out by the spy stuff and the advertising on your start menu
13:14:17PMunchThat's a huuuuge if...
13:14:35FromGitter<HJarausch_gitlab> Tuple unpack : is there some simple ⏎ Given ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5fc7933b87cac84fcd036f9b]
13:14:47hmmmalso is free as in actually russian botnet freedom
13:14:48PMunchGuantanamo isn't that bad if you don't mind the torture and being locked up without trial
13:15:19hmmmmunchie :p
13:15:48PMunch@HJara, do you mean a generic macro that can take any tuple?
13:16:02PMunchOr just that one?
13:16:15PMunchWoops, the Gitter and Discord bots work a bit differently
13:16:26PMunchI of course meant to tag HJarausch_gitlab
13:16:30narimiranthere is unpack library in nimble
13:16:36PMunch@HJarausch_gitlab
13:18:52FromGitter<HJarausch_gitlab> I'd like to write a simple one just for a tuple of two ints myself. ⏎ Any pointers? ⏎ Thanks
13:20:02ForumUpdaterBotNew thread by Pietroppeter: How to import pathutils, see https://forum.nim-lang.org/t/7190
13:21:39hmmmactually I was wondering, microsoft must have something like 10k devs working on windows. But W10 is pretty mature now, so...what are all those devs working on right now?
13:21:55*waleee-cl joined #nim
13:22:06PMunchMore adware probably
13:22:08hmmmwe might actually just steal a team or two and put them on working on nim and no one would know the difference
13:22:11narimiranhmmm: solitaire
13:22:13FromGitter<haxscramper> @HJarausch_gitlab if you need to single tuple into two function arguments you probably need to rewrite AST to something like `let (a, b) = refTuple(); echo getTuple(a, b)`
13:23:23FromGitter<haxscramper> So you could write `unpackCall` macro that would transform `echo unpackCall getTuple(unpack(retTuple()))`
13:26:23*spiderstew quit (Quit: spiderstew)
13:26:36*spiderstew joined #nim
13:36:48*abm quit (Quit: Leaving)
13:39:55*superbia quit (Quit: WeeChat 2.9)
14:09:35FromDiscord<fwsgonzo> is there a guide to use for porting to 32-bit RISC-V?
14:11:34*abm joined #nim
14:15:16*mfiano quit (Ping timeout: 265 seconds)
14:15:36FromDiscord<Clyybber> narimiran: Damn, that doc comment bug; not sure how it slipped my review sorry
14:16:25FromDiscord<shadow.> lol im just waiting for the rise of aoc-related questions
14:16:41FromDiscord<shadow.> im forecast regex questions today
14:18:32FromDiscord<shadow.> (edit) "forecast" => "forecasting"
14:20:54PMunchToday?
14:21:06PMunchOh for parsing that format?
14:21:21PMunchI just went with a bunch of `split`
14:21:55FromDiscord<fwsgonzo> do I have to rebuild nim or something if I add a new platform?
14:22:14PMunchDepends on where you add it
14:22:48supakeen> The absence of a value is often represented by nil, but it is not always available, nor is it always a good solution.
14:22:56supakeenWhen is it not available or not a good option? :)
14:23:22FromDiscord<fwsgonzo> well, grepping nim reveals it contains "riscv" string, so maybe
14:23:31*xet7 quit (Quit: Leaving)
14:24:42PMunchNot available: when the value is not a pointer, eg. when it is an int. You probably don't want to represent the lack of a number as 0.
14:25:23supakeenAh yes.
14:25:26supakeennil has meaning there.
14:25:55supakeenBut `Option[Event]` in my case makes less sense
14:26:09PMunchWhy?
14:27:17supakeenWell, I could use `nil` instead.
14:28:18FromDiscord<shadow.> oh with split? thats smart haha
14:28:36FromDiscord<shadow.> for the second part since it was 1-indexed i just split on ":" since there was a space after so it worked itself out
14:28:42FromDiscord<shadow.> lol
14:28:58PMunchHaha, I didn't even think of that :P
14:29:45FromDiscord<shadow.> lol i finally got to use the xor operator for part two
14:29:56FromDiscord<shadow.> != prolly woulda worked too but xor looks smarter
14:31:05*lritter joined #nim
14:31:09PMunchOh yeah, I used xor as well
14:31:13FromDiscord<shadow.> nice nice
14:31:34FromDiscord<shadow.> strutils came in handy as well lol
14:31:37FromDiscord<shadow.> parseInt and count
14:31:56PMunchhttp://ix.io/2GfG/ my solution, if you're curious
14:32:35FromDiscord<shadow.> internal server error hm
14:32:37FromDiscord<Idefau> same
14:32:51PMunchYeah seems like ix.io is struggling
14:32:51FromDiscord<Idefau> i got internal server error too
14:32:55FromDiscord<Idefau> makes sense, its a server error
14:33:02FromDiscord<shadow.> https://play.nim-lang.org/#ix=2GfH
14:33:04FromDiscord<shadow.> here's my part two
14:33:18FromDiscord<shadow.> `import re, strutils`
14:33:21PMunchBade gateway
14:33:23PMunchBad*
14:33:34PMunchThe playground also uses ix
14:33:36FromDiscord<Idefau> https://play.nim-lang.org/#ix=2GfI here's mine that does both parts
14:33:43FromDiscord<shadow.> ohh ok
14:33:43FromDiscord<shadow.> hmm
14:33:48FromDiscord<shadow.> ill put mine on hastebin
14:33:54FromDiscord<shadow.> oh idf04's worked for me
14:34:03FromDiscord<shadow.> oh damn scanf thats smart
14:34:21PMunchI get: Unable to load ix paste, file too large, or download is too slow
14:34:30FromDiscord<shadow.> https://hatebin.com/alobwtqmvh
14:34:35FromDiscord<shadow.> here's my part two
14:36:34FromDiscord<shadow.> hatebin should work lol
14:36:53FromDiscord<shadow.> oh pmunch i can view your solution now
14:37:00PMunchHere's mine: https://hatebin.com/qlovnmqius
14:37:00PMunchAh
14:37:13FromDiscord<shadow.> oh nice nic e
14:37:14FromDiscord<shadow.> (edit) "nic e" => "nice"
14:37:18FromDiscord<shadow.> lol i shoulda used a let block
14:38:47PMunchBlocks are nice
14:40:13FromDiscord<shadow.> haha yeah
14:40:22FromDiscord<shadow.> i completely forgot abt scanf
14:40:50PMunchHmm, I could write this an an npeg pattern I think
14:41:09FromDiscord<shadow.> what was your day one solution?
14:41:18FromDiscord<Idefau> i already saw a solution using npeg i think
14:41:41FromDiscord<shadow.> oh nice nice
14:41:45FromDiscord<shadow.> https://hatebin.com/enaumbjoyi
14:41:46FromDiscord<shadow.> this was my part one
14:41:49FromDiscord<shadow.> of day one
14:41:49FromDiscord<shadow.> lol
14:41:53PMunchhttp://ix.io/2G8p
14:42:11FromDiscord<shadow.> ix is still goin crazy lol
14:42:14FromDiscord<Idefau> https://play.nim-lang.org/#ix=2GfK this monstrosity i wired up
14:42:54FromDiscord<shadow.> oh lord
14:43:05FromDiscord<shadow.> what is that
14:43:06FromDiscord<shadow.> O(n^3)
14:43:07FromDiscord<shadow.> haha
14:43:14PMunchI can't see it :(
14:43:34FromDiscord<Idefau> its better if you dont see it
14:43:40FromDiscord<shadow.> LOL
14:43:41PMunchAh, similar to what I'm doing actually :P
14:43:51PMunchI've just thrown in a couple optimisations
14:43:52FromDiscord<shadow.> https://hatebin.com/uadkairdqq
14:43:56FromDiscord<shadow.> here's my part two
14:44:00FromDiscord<shadow.> i believe i did it in O(n^2)
14:44:12FromDiscord<shadow.> yeah only two nested loops haha
14:44:37FromDiscord<Idefau> hashset
14:44:38FromDiscord<Idefau> interesting
14:44:53FromDiscord<Idefau> i wanted to do something similar but i was tired so i said fuck it
14:44:57FromDiscord<Idefau> 3 nested loops should do it
14:45:04FromDiscord<shadow.> haha fair enough
14:45:09FromDiscord<shadow.> i think for this input set its fine anyways
14:45:13FromDiscord<shadow.> only 200 200 200 iterations
14:45:15FromDiscord<shadow.> if it were like
14:45:24FromDiscord<shadow.> 1000
14:45:27FromDiscord<shadow.> then maybe not
14:45:27FromDiscord<shadow.> lol
14:45:45FromDiscord<Idefau> yeah
14:45:50FromDiscord<shadow.> but ye i just realized since you can calculate the complement you can just store all numbers as you loop and look for the compliment (part one)
14:45:54FromDiscord<shadow.> then on part two just do that for each num
14:45:56FromDiscord<Idefau> yeah
14:46:06FromDiscord<shadow.> ig since part one was o(n) that would make this o(n^2) ye
14:46:13FromDiscord<shadow.> idk this is what i get for grinding leetcode i suppose
14:46:15FromDiscord<shadow.> lmao
14:46:44FromDiscord<Idefau> i wonder what day 3 would be
14:46:48FromDiscord<Idefau> (edit) "would" => "will"
14:46:48FromDiscord<shadow.> hmm
14:46:52FromDiscord<shadow.> prolly a little harder
14:47:07FromDiscord<shadow.> what sucks is where i live it goes up at 12am
14:47:15FromDiscord<shadow.> so i cant really do them until about 7-8 hours later
14:47:20FromDiscord<shadow.> no chance of getting on lb lmao
14:47:37FromDiscord<Idefau> for me it gets at 7 am i think
14:47:41FromDiscord<Idefau> so if i wake up early i might do it
14:47:53FromDiscord<shadow.> oh nice nice
14:48:01FromDiscord<Idefau> there are two problems here tho, that i must wake up early and that my brain must function at that time
14:48:08FromDiscord<shadow.> lmao true
14:48:15FromDiscord<shadow.> if my brain isnt functioning enough ill just whip out the pypy
14:48:16FromDiscord<shadow.> lmfao
14:48:35PMunchTried to run your code on my inputs shadow, my version beats it on performance for the 200 set
14:48:44PMunchWe should have a larger data set to try against..
14:48:48FromDiscord<shadow.> fr?
14:48:52FromDiscord<shadow.> dang
14:48:53FromDiscord<shadow.> hm
14:49:01FromDiscord<shadow.> for the 2sum or 3sum?
14:49:07FromDiscord<shadow.> i dont think i saw your code yet
14:49:42PMunch1.15ms for your version 0.43ms for mine
14:49:57PMunchOh, didn't the ix link load yet?
14:50:06FromDiscord<shadow.> lemme check
14:50:11FromDiscord<shadow.> oh it worked
14:50:29FromDiscord<shadow.> hmm
14:50:33FromDiscord<shadow.> lemme try adding an optimization haha
14:51:10FromDiscord<fwsgonzo> what does "reExeNotFound" mean when running tests? do I have to install some regex library?
14:51:37PMunchIf you're using the built-in regex module, yes
14:51:46PMunchIf you are using nre then no
14:51:58FromDiscord<shadow.> https://hatebin.com/aarbpbtseu
14:51:59FromDiscord<shadow.> try this pmunch
14:52:00PMunchOr whatever the pure Nim implementation is called
14:52:33FromDiscord<shadow.> yeah its nre
14:52:49FromDiscord<shadow.> gotta love `import nre except toSeq` lol
14:53:38PMunchThat just ran slower
14:53:42FromDiscord<shadow.> hUH
14:53:43FromDiscord<shadow.> confusing
14:53:45FromDiscord<shadow.> hmm
14:53:50FromDiscord<shadow.> lemme try benchmarking
14:53:51PMunchYour optimisation just makes it worse because there are no numbers > 2020
14:54:01FromDiscord<shadow.> oh fr?
14:54:03FromDiscord<shadow.> ah ok
14:54:09FromDiscord<shadow.> hn
14:54:10FromDiscord<shadow.> hm
14:54:31FromDiscord<shadow.> lemme run yours against mine and try optimizing it haha
14:56:04FromDiscord<shadow.> handy
14:56:06FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2GfN
14:56:39FromDiscord<Idefau> nice
14:57:05narimiran@Clyybber don't worry :)
14:57:08*hmmm quit ()
14:57:15PMunchOh I did 50 runs with perf :P
14:57:28PMunchand -d:release --gc:arc
14:57:38FromDiscord<shadow.> haha
14:57:42FromDiscord<shadow.> thanks
14:57:46FromDiscord<Idefau> try -d:danger
14:57:49FromDiscord<shadow.> lol
14:57:53FromDiscord<shadow.> and --passc:"-flto"
14:58:09narimiranpro tip: for integer set use IntSet
14:58:43FromDiscord<Idefau> nice tip
14:58:52PMunchJust about the same
14:59:43PMunchOh well, I'm off
14:59:44*PMunch quit (Quit: Leaving)
15:00:29FromDiscord<shadow.> rip
15:00:56FromDiscord<kodkuce> huh nice there where no zilion loop for AoC
15:01:00FromDiscord<shadow.> hm you are correct
15:01:02FromDiscord<shadow.> yours was faster
15:01:04FromDiscord<shadow.> 96 times out of 100
15:01:05FromDiscord<shadow.> lmao
15:01:06FromDiscord<shadow.> gg
15:01:06Zevvhey nice, countIt()
15:02:44supakeenhttps://bpa.st/K6CA
15:02:50supakeenSlowly starting to enjoy my API a tiny bit.
15:07:08FromDiscord<Idefau> i was very confused when i saw IRC stuff because i thought its an AoC solution
15:07:39supakeennot everyone does aoc :D
15:09:36FromDiscord<shadow.> haha fair enough
15:10:10FromDiscord<shadow.> any reason for the newline under ever `var` or `let`?
15:10:12FromDiscord<shadow.> just stylistic?
15:10:15FromDiscord<shadow.> (edit) "stylistic?" => "stylistic preference?"
15:10:31FromDiscord<Cloufish> a silly question, but how to install nimscript? Does it come with nim already?
15:11:00FromDiscord<shadow.> well
15:11:19FromDiscord<shadow.> nim is just the subset of nim thats comprehendible by the vm
15:11:39FromDiscord<shadow.> so im fairly certain it would "come with nim"
15:11:43FromDiscord<shadow.> dont take my word for it tho
15:12:13FromDiscord<Cloufish> thanks Karma
15:12:20FromDiscord<shadow.> ofc nemo
15:12:24FromDiscord<Cloufish> XD
15:12:26FromDiscord<shadow.> lol
15:12:38supakeenjust stylistic for me :)
15:13:02FromDiscord<shadow.> oh haha fair enough
15:14:28FromDiscord<shadow.> lol im already itching for day 3
15:14:35FromDiscord<shadow.> i wish leetcode had nim
15:14:39FromDiscord<shadow.> i would be grindingg rn lmao
15:16:07FromDiscord<Cloufish> you're on NoFap?
15:16:59Zoom[m]@shadow. CodeWars has Nim
15:17:07FromDiscord<haxscramper> If you want to run nimscript code from file you can do it using nim compiler `nim e code.nims` - note `.nims` extension
15:17:31FromDiscord<haxscramper> Otherwise, it is what runs when you use macros, `static:` blocks and so on
15:18:28FromDiscord<Cloufish> I have another question. What pros do I have from using nimscript instead of just using os module in normal nim?
15:18:42FromDiscord<Cloufish> I see that nimscript still has os module
15:18:55FromDiscord<Cloufish> but what If I were to use it on normal nim
15:19:11FromDiscord<shadow.> @Zoom oh damn thats wonderful news ty
15:20:19FromDiscord<haxscramper> Are you referring to https://nim-lang.org/docs/nimscript.html vs https://nim-lang.org/docs/os.html for regular nim code? Then use `std/os`.
15:20:26*vicfred joined #nim
15:22:00FromDiscord<haxscramper> `nimscript` module is a wrapper for `os` procs, which rely on low-level os-specific details (and based on C code AFAIK), so they had to be wrapped for use in VM.
15:33:06*nnn85 joined #nim
15:36:39federico3https://nim-lang.org/docs/nimc.html should provide a list of supported architecture
15:41:22*nnn85 quit (Remote host closed the connection)
15:44:01FromGitter<HJarausch_gitlab> How to pass a slice? ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Nim doesn't accept *varargs[HSlice]* - why and is there are work around? [https://gitter.im/nim-lang/Nim?at=5fc7b64032153f0d4440ae4c]
15:45:19FromDiscord<mratsim> what about varargs Slice[T]?
15:46:15FromGitter<haxscramper> @HJarausch_gitlab you forgot generic parameters for `HSLice` - https://nim-lang.org/docs/system.html#HSlice
15:46:22FromGitter<haxscramper> https://play.nim-lang.org/#ix=2Gg5
15:46:32FromDiscord<mratsim> I think it's generics interacting with varargs that cause a semantic check issue
15:47:15FromGitter<haxscramper> Although error message is admittedly bad in this case, maybe because of what mratsim said
15:47:46FromDiscord<shadow.> hmm interesting question, i know its partially dependent on what type of program but what compiler flags typically speed up execution time
15:48:11FromDiscord<shadow.> i typically use `-d:danger --passc:"-flto"` and i was wondering if changing gc or `--opt:speed` would do anything lol
15:50:06FromGitter<HJarausch_gitlab> @haxscramper Many thanks!
16:09:59kiwi_835when should i use variant types
16:20:48kiwi_835https://forum.nim-lang.org/t/1151
16:20:48FromDiscord<martinium> is there a decent nim tutorial on multithreading that can save me time learning best practices?
16:20:50kiwi_835whoa
16:21:00kiwi_835didn'tn know using top level variables etc would be this slow
16:28:24narimirankiwi_835: did you try to run those examples from 2015 in 2020?
16:28:43kiwi_835what
16:28:49kiwi_835wrong tag?
16:28:54FromDiscord<lqdev> take a look at the date
16:29:04narimiranthe thread you linked is from 2015
16:29:15FromDiscord<martinium> it got bumped though
16:29:16narimiranand now somebody resurrected it
16:29:17FromDiscord<martinium> 😄
16:29:31FromDiscord<martinium> I like how the forum visibly denotes 6 YEARS LATER
16:29:34FromDiscord<martinium> 😄
16:30:06kiwi_835oh lmao I just browse the forum homepage
16:30:12kiwi_835blame the necroposter
16:31:47leorize[m]1we should have old topic autolock at some point
16:31:53leorize[m]1like 3mo after last post or smt
16:32:32FromDiscord<Rika> 3mo sounds too short
16:32:36FromDiscord<Rika> Maybe 9
16:40:35FromDiscord<shadow.> how can i write lambdas with sugar? im still unsure lmao
16:40:45FromDiscord<shadow.> sent a code paste, see https://paste.rs/lYa
16:40:48FromDiscord<shadow.> for instance, how could that be made into a lambda
16:40:53FromDiscord<shadow.> (edit) "for instance, how could that be made into a ... lambda" added "sugar"
16:41:54FromDiscord<shadow.> nvm i got it
16:41:57narimiran`(a, b) => (if f(a) < f(b): -1 else: 1)` ?
16:42:13FromDiscord<shadow.> yeye just figured it out ty tho haha
16:43:02*hnOsmium0001 joined #nim
16:47:53FromDiscord<Cloufish> I'm too searching for this topic
16:50:06FromDiscord<Cloufish> there was a great presentation on NimConf2020
16:50:07FromDiscord<Cloufish> https://www.youtube.com/watch?v=NOAI2wH9Cf0
16:50:46FromDiscord<Cloufish> Though to me it is too complicated
16:51:27FromDiscord<Cloufish> It's more about great practices to me, rather than tutorial on Multithreading in Nim
16:59:27FromDiscord<martinium> yeah I'll take a look but def would like to see some well documented code that explains the whys and whats
17:02:57reversem3Is anyone compiling nim code on the fly using neovim ?
17:03:07reversem3I'm trying to get lazier
17:03:34*habamax quit (Ping timeout: 272 seconds)
17:07:48reversem3!block
17:07:57Clonkk[m]Not really on the fly
17:08:14Clonkk[m]But ctrl+z -> nim c file -> fg do the trick
17:08:51reversem3Yeah I'm trying to make neovim my IDE for everything
17:08:52Clonkk[m]Unless you mean as a plugin , in which case there is Nimlsp
17:09:18reversem3question though , is it possible to use block with two different functions ?
17:09:38reversem3I'll look up nimlsp thanks
17:09:54Clonkk[m]What do you mean ?
17:10:16Clonkk[m]Block with different function ?
17:10:48reversem3I'll show you one moment
17:14:31reversem3http://pastebin.ws/47ly4w
17:15:07reversem3Ok so I want to connect to one box extract info , then move on another and so on.
17:15:32reversem3I heard block might work for this but I'm not really sure how
17:23:41FromDiscord<shadow.> has anyone used the `comprehension` package?
17:24:29FromDiscord<shadow.> it seems to be giving me errors
17:24:38FromDiscord<shadow.> `C:\Users\shado\.nimble\pkgs\comprehension-0.1.0\comprehension.nim(29, 69) Error: index 3 not in 0 .. 2`
17:26:32FromDiscord<shadow.> nvm ill just make my own
17:27:36Clonkk[m]<reversem3 "I heard block might work for thi"> Do you mean a block statement or do you mean reading in a blocking operation for your async procedure ?
17:28:43FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Ggo
17:28:44FromDiscord<shadow.> is this code incorrect?
17:28:53FromDiscord<shadow.> (edit) "https://play.nim-lang.org/#ix=2Ggo" => "https://paste.rs/E7l"
17:29:12FromDiscord<shadow.> or rather why is it raising an error haha
17:32:10Clonkk[m]Lines is an iterator
17:32:31FromDiscord<shadow.> am i misunderstanding how filterIt works
17:33:52FromDiscord<shadow.> lol i could really use a comprehension right abt now but i cant figure out `comprehension`
17:33:57narimiranuse `readlines` instead of `lines`
17:34:08FromDiscord<shadow.> thanks
17:34:32narimiranbut i think it still won't work :)
17:34:47FromDiscord<shadow.> lol doesnt work with comprehension at least
17:34:49FromDiscord<shadow.> lemme try filter
17:35:07Clonkk[m]What comprehension package are you talking about ?
17:35:26FromDiscord<shadow.> unofficial
17:35:27narimiranthe easiest way is to not force FP in nim
17:35:30FromDiscord<shadow.> lemme find it lmao
17:35:34FromDiscord<shadow.> lmao fair enough
17:35:38narimiranit took me some time to realize that
17:35:56FromDiscord<shadow.> idk i find fp more fun to code with but it does get really obstructed and messy
17:36:05FromDiscord<shadow.> https://github.com/alehander92/comprehension
17:36:07FromDiscord<shadow.> this was the package
17:37:38FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Ggs
17:38:16FromDiscord<shadow.> ig ill just do that
17:38:16FromDiscord<shadow.> lmao
17:44:07reversem3I don't know , I thought you could use block to execute some code then break then go on to something else, but I don't think that will work with async
17:47:46*superbia joined #nim
17:49:47*lytedev[m] joined #nim
18:16:22FromDiscord<Gabben> sent a code paste, see https://play.nim-lang.org/#ix=2Ggy
18:16:49FromDiscord<Gabben> (edit) "https://paste.rs/mcr" => "https://play.nim-lang.org/#ix=2Ggz"
18:19:13FromGitter<matrixbot> `lytedev` Hey, all -- working on Advent of Code and was wanting to put each day's code in a different module and was hoping to use a macro/static to easily wrap some metaprogramming around it to simplify some things, but I can't get it working: http://0x0.st/i7Jw.txt
18:22:01FromDiscord<lqdev> ~matrix
18:22:02disbotmatrix: 11Nim channels on Matrix can be found at +nim:asra.gr (https://matrix.to/#/+nim:asra.gr)
18:22:29FromDiscord<lqdev> that's not really how static works
18:23:01FromDiscord<lqdev> you need to wrap your code in a `macro` declaration and call that instead
18:29:33*habamax joined #nim
18:34:15FromDiscord<Esbeesy> Anyone done todays advent of code? Total nim noob and was looking to compare notes/code review
18:34:38lytedev[m]When I do that, I get an error that seems to indicate that the compiler cannot find the file for importing, while adding the same `from` statement works just fine
18:41:02FromDiscord<Vindaar> @Esbeesy check out the forum thread https://forum.nim-lang.org/t/7162 Has some links to AoC repositories. Also narimiran's repo here: https://github.com/narimiran/AdventOfCode2020 and my own here: https://github.com/Vindaar/AdventOfCode2020
18:41:34FromDiscord<Esbeesy> Awesome
18:49:56*vicfred quit (Ping timeout: 240 seconds)
18:51:26*ryanhowe quit (Quit: ZNC 1.8.2 - https://znc.in)
18:53:06FromDiscord<lytedev> This is what I have now, still no luck =( http://0x0.st/i7Jk.txt
18:54:08*vicfred joined #nim
18:55:06*thomasross joined #nim
18:55:14*Vladar quit (Quit: Leaving)
18:55:49Zevvhttps://github.com/zevv/aoc2020/blob/master/02/main.nim
18:57:17*abm quit (Quit: Leaving)
18:58:49FromDiscord<Recruit_main707> vars are always initialised (unless they are marked with {.noInit.} right?
18:59:11*vicfred quit (Quit: Leaving)
19:01:45*kiwi_835 quit (Ping timeout: 240 seconds)
19:07:42FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2GgN
19:07:45FromDiscord<shadow.> im making a comprehension using macros
19:07:50FromDiscord<shadow.> would there be any way to automatically determine the type?
19:07:59FromDiscord<shadow.> so that i dont have to pass int to the end
19:08:06FromDiscord<shadow.> im guessing i could just evaluate the type of the expression once?
19:08:46FromDiscord<shadow.> (edit) "type?" => "type of seq to return?"
19:08:55FromDiscord<Vindaar> @shadow. yes, that's kind of what the templates in `sequtils` do. Works fine if you have something well defined
19:09:12FromDiscord<shadow.> hmm ok
19:09:23FromDiscord<shadow.> i think i would need to find what type the identifier is
19:09:28FromDiscord<shadow.> and then just auto-zero the identifier
19:09:32FromDiscord<shadow.> and run the expression on it?
19:09:34FromDiscord<shadow.> something like that
19:09:46FromDiscord<shadow.> or i guess i could just run the loop for one iteration
19:10:21FromDiscord<shadow.> nvm cant do that
19:10:35FromDiscord<shadow.> @Vindaar would you happen to know some source i could look at?
19:12:40*superbia quit (Quit: WeeChat 2.9)
19:13:49FromDiscord<Vindaar> "working with types in macros is difficult" is the thought that comes to mind always (ref https://github.com/nim-lang/RFCs/issues/44)
19:13:49disbot[RFC] Working with types in macro is difficult.
19:15:04FromDiscord<Vindaar> as I said here: https://github.com/nim-lang/Nim/blob/devel/lib/pure/collections/sequtils.nim#L932↵and give me a sec
19:16:50FromDiscord<shadow.> alr ill take a look ty
19:16:51FromDiscord<Vindaar> aside from that you already saw @alehander42's comprehension package. Don't know how he deduces the types there
19:17:01FromDiscord<shadow.> yeah i tried looking at it but
19:17:07FromDiscord<shadow.> his variable names arent very
19:17:08FromDiscord<shadow.> meaningful
19:17:21FromDiscord<shadow.> hard to read
19:19:59FromDiscord<Vindaar> sent a long message, see https://paste.rs/utG
19:20:16FromDiscord<shadow.> haha fair enough
19:20:24FromDiscord<shadow.> hmm well my thoughts are
19:20:32FromDiscord<shadow.> 1. the expression will always return the type of the seq
19:20:48FromDiscord<shadow.> 2. the identifier that is used in the for loop is just the type of the iterable / container
19:20:57FromDiscord<shadow.> since auto-zeroing is easy
19:21:00*Vladar joined #nim
19:21:04FromDiscord<shadow.> i just need a way to get the type of a iterable lmao
19:21:17FromDiscord<shadow.> so i could technically just look it once and break but the issue is empty iterables
19:25:28FromDiscord<Vindaar> 1. yes, so the inner type of the result is not a problem↵2. getting the type of the container isn't a problem in principle either, cause it's handed to you. The problem then is writing the correct resulting code for each type, no?
19:25:53FromDiscord<shadow.> well im trying to go from
19:25:56FromDiscord<shadow.> to
19:25:57FromDiscord<shadow.> sent a code paste, see https://paste.rs/yMi
19:26:05FromDiscord<shadow.> sent a code paste, see https://paste.rs/pNn
19:26:10FromDiscord<shadow.> just making sure we're on the same page lol
19:26:22*vicfred joined #nim
19:26:37FromDiscord<Vindaar> yes we are haha
19:26:42FromDiscord<shadow.> ok haha
19:26:45FromDiscord<shadow.> so i needa find a way to get
19:26:47FromDiscord<shadow.> what kind of type
19:26:50FromDiscord<shadow.> 1..100 returns
19:27:56FromDiscord<shadow.> something like that?
19:27:56FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2GgT
19:28:03FromDiscord<shadow.> first line is prolly not correct
19:28:07FromDiscord<shadow.> i forget how to make a var hold a type
19:28:17*Jesin quit (Quit: Leaving)
19:28:47*Zoom[m] adds ESP32 library elcritch/nesper to awesome-nim
19:29:08*Zoom[m] finds out the board he has on hand is actually ESP8266, and not ESP32
19:29:14FromDiscord<Vindaar> you didn't forget, cause you can't do that
19:30:03*habamax quit (Quit: Lost terminal)
19:30:12FromDiscord<Vindaar> well, in principle you can always do a `typeof(<what's after in>)`. The problem starts if you need to have more knowledge about the type in the context of generating the code. As long as you can just emit something that will then be compiled to something that works (what e.g. is done in `mapIt`), you're fine
19:31:50FromDiscord<shadow.> hmmm
19:31:52FromDiscord<shadow.> well
19:32:43FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2GgX
19:33:31FromDiscord<lqdev> sure can
19:33:42FromDiscord<lqdev> but typeof is preferred, so `newSeq[x.typeof]()`
19:33:52FromDiscord<lqdev> also `var s: seq[x.typeof]` just looks nicer doesn't it
19:34:39FromDiscord<shadow.> hmm
19:34:47FromDiscord<shadow.> well
19:35:02FromDiscord<shadow.> i am kinda used to declarations not being equal to definitions
19:35:04FromDiscord<shadow.> c/c++
19:35:05*Jesin joined #nim
19:35:11FromDiscord<shadow.> so that kinda syntax sometimes
19:35:13FromDiscord<shadow.> worries me lol
19:35:44FromDiscord<shadow.> (edit) "not being equal to definitions" => "without values causing undefined behaviour"
19:35:54FromDiscord<shadow.> obvi ik it works but idk
19:35:58FromDiscord<shadow.> the newSeq[]() seems more natural to me
19:44:33FromDiscord<lytedev> anybody have any idea why this doesn't work? http://0x0.st/i7yb.txt
19:45:59FromDiscord<Recruit_main707> it is not finding day1.nim
19:46:23FromDiscord<Recruit_main707> yay, i think i got my first compiler crash :p
19:47:03FromDiscord<Recruit_main707> well, internal error, they are not the same are they?
19:49:39FromDiscord<lytedev> correct, it does seem that way - but if I pull the `from` statement out of the macro, it works perfectly fine
19:49:49FromDiscord<shadow.> @lytedev may i ask some questions lol
19:49:54FromDiscord<lytedev> please lol
19:49:58FromDiscord<shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2Gh4
19:49:58FromDiscord<shadow.> purpose?
19:50:03FromDiscord<shadow.> and why use a format string
19:50:26FromDiscord<lytedev> ultimately, I just want to import days 1-25 without 25 lines of copy/paste
19:50:53FromDiscord<lytedev> sent a code paste, see https://play.nim-lang.org/#ix=2Gh5
19:50:59FromDiscord<lytedev> so ignore it T_T
19:54:15FromDiscord<shadow.> ohh
19:54:22FromDiscord<shadow.> hm
19:54:27FromDiscord<shadow.> yeah that means it couldn't find day1
19:54:33FromDiscord<shadow.> is it in the same directory?
19:54:38FromDiscord<shadow.> that you ran the compiler from
19:54:42FromDiscord<shadow.> or in a path
19:54:44FromDiscord<shadow.> (edit) removed "a"
19:55:09FromDiscord<lytedev> it's in `src`, while I run `nimble run` from the repo root
19:55:34FromDiscord<lytedev> does nimble add some magic to import, then?
19:56:40FromDiscord<lytedev> ooooof I'm dumb
19:56:53FromDiscord<lytedev> adding `switch("path", "src/")` to my `config.nims` worked
19:56:56FromDiscord<lytedev> thanks
19:57:09FromDiscord<lytedev> so nimble does do some magic I guess
19:59:45*fredrikhr3 joined #nim
20:03:01*fredrikhr quit (Ping timeout: 260 seconds)
20:03:01*fredrikhr3 is now known as fredrikhr
20:03:35FromDiscord<enthus1ast> does someone has used niv's websocket lately?
20:03:50FromDiscord<enthus1ast> I don't know exactly but it seems broken
20:05:30FromDiscord<enthus1ast> i receive just one FRAME not even data
20:05:52FromDiscord<enthus1ast> i'm a little bit puzzled
20:06:34FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/GvJ
20:08:02FromDiscord<enthus1ast> sent a code paste, see https://paste.rs/XD5
20:08:23FromDiscord<enthus1ast> can someone please try it on their machines :/
20:09:00*kinkinkijduet joined #nim
20:09:15kinkinkijduetusing nim on an arm based chromebook
20:09:30kinkinkijduetlets see if theres any significant unique bugs eh?
20:09:36FromDiscord<Avatarfighter> lmao
20:09:37FromDiscord<Avatarfighter> mood
20:09:46FromDiscord<Avatarfighter> does your chromebook have fans?
20:09:50kinkinkijduetnope
20:09:54FromDiscord<Avatarfighter> haaha
20:09:55FromDiscord<Avatarfighter> same
20:10:02FromDiscord<Avatarfighter> mine STRUGGLED to compile nim it was crazy
20:10:02kinkinkijduetit's a lenovo duet
20:10:20kinkinkijduetoh mine is probably the fastest arm chromebook on the market
20:10:27kinkinkijduetor one of
20:10:34FromDiscord<Avatarfighter> that's really nice
20:10:40kinkinkijduetit's genuinely one of the faster computers ive used
20:10:41FromDiscord<Avatarfighter> Mine has an intel m3 chip or something
20:10:49FromDiscord<Avatarfighter> really fast little chip when its cool
20:10:59kinkinkijduetonly beat by my current x86_64 desktop
20:11:04FromDiscord<Rebel> Please tell me after I went to asleep at 3 am disruptek came back 😄
20:11:13FromDiscord<Avatarfighter> @Rebel he has not 😦
20:11:19FromDiscord<Rebel> Nooooooooooooooooooooooooooo
20:11:32kinkinkijduetdid disruptek declare quit or something?
20:13:14clyybberAraq: time to unmute disruptek? :p
20:15:34*vesper11 joined #nim
20:16:27reversem3How come I can't create two different procs for two different ssh connections? http://pastebin.ws/76bstk
20:17:01reversem3If I understand waitFor correctly , its waiting till all actions are complete
20:17:39FromDiscord<enthus1ast> you can
20:17:47FromDiscord<enthus1ast> asyncCheck both
20:17:55FromDiscord<enthus1ast> when have one waitForever
20:18:27FromDiscord<enthus1ast> (edit) "when" => "then"
20:18:46FromDiscord<dom96> runForever 🙂
20:18:53FromDiscord<enthus1ast> yeah
20:19:34FromDiscord<enthus1ast> i'm a little nervous now that my favourite websocket library seems broken 😉
20:19:52FromDiscord<enthus1ast> (edit) "waitForever" => "runForever"
20:19:53*vesper joined #nim
20:19:56*vesper11 quit (Ping timeout: 240 seconds)
20:20:33reversem3so asyncCheck then runForever ?
20:20:37FromDiscord<enthus1ast> yes
20:21:23FromDiscord<enthus1ast> but your example should still work, but in sequence
20:21:24reversem3cool I'll try that thanks
20:21:42reversem3I wish it did
20:22:33reversem3it only connects to the first session
20:25:03*tane joined #nim
20:26:43FromDiscord<enthus1ast> can someone please confirm that niv's websocket still works and that it's something on my end?
20:29:24FromDiscord<dom96> @enthus1ast a version of it definitely works, I use it for Stardust
20:30:15FromDiscord<dom96> looks like I'm pinned on this https://github.com/dom96/websocket.nim/tree/fixes-client-connections
20:34:58FromDiscord<enthus1ast> thank you @dom96 i'll try this version (i use it in several projects, most of them are ancients already but still running)
20:35:30FromDiscord<enthus1ast> (edit) "ancients" => "ancient"
20:38:14*narimiran quit (Ping timeout: 260 seconds)
20:45:57FromDiscord<Rebel> Use that or https://github.com/treeform/ws 🤔
20:46:13reversem3Do I still have to make to procs? or can I add another ssh session to the same proc?
20:50:16FromDiscord<enthus1ast> the thing i did not like about treeforms ws is that i cannot create websockets beforehand
20:50:35FromDiscord<enthus1ast> but yeah maybe i can use this
20:52:24*kungtotte quit (Read error: Connection reset by peer)
20:52:47*kungtotte joined #nim
20:56:06FromDiscord<Rebel> hmmm please let me know which one you end up going with
20:56:15FromDiscord<Rebel> I plan to use websockets as well for a project
20:56:24FromDiscord<Rebel> Already have enough code to refactor 😅
20:57:54ForumUpdaterBotNew thread by Niminem: How to wrap a C object when field names are Nim keywords?, see https://forum.nim-lang.org/t/7191
21:00:32*clyybber quit (Quit: WeeChat 3.0)
21:02:09FromDiscord<Recruit_main707> hmmm, how can this be fixed?
21:05:52Zevvhttps://www.buymeacoffee.com/disruptek
21:06:35*vesper quit (Ping timeout: 265 seconds)
21:10:58FromDiscord<Rebel> `py
21:11:01FromDiscord<Rebel> sent a long message, see https://paste.rs/Esd
21:11:29FromDiscord<Rebel> (edit) "`py" => "sent a code paste, see https://play.nim-lang.org/#ix=2Gho"
21:11:30FromDiscord<Rebel> in Nim == ?
21:11:51FromDiscord<Rebel> Guess I could just write one quickly from scratch
21:14:18FromDiscord<enthus1ast> i'll use the one that works for this project, i'll hack together a 'Virtual World' in the browser, to pep up a Zoom Christimas Party (fck Covid)
21:14:54FromDiscord<Rebel> https://media.discordapp.net/attachments/371759389889003532/783803401767092314/89b.png
21:14:59reversem3WOW I'm an idiot , it wasn't the code it was the command I screwed up on the second session
21:15:17reversem31 char off and I loose my mind
21:15:36FromDiscord<enthus1ast> but for my "long term projects" i use niv's ws, and for this i guess i have to fix it
21:19:50FromDiscord<lqdev> @Rebel there's a count table, hold on a sec
21:20:03FromDiscord<lqdev> https://nim-lang.org/docs/tables.html#CountTable
21:23:33FromDiscord<Rebel> hot
21:23:45FromDiscord<Rebel> realized I didn't need it 😛 but nice to know
21:28:00FromDiscord<shadow.> whats the difference between quote and quote do?
21:29:53FromDiscord<Esbeesy> Hey I was looking at your day 2, and noticed you used `block Part1:` and `block Part2:` - What's the reasoning behind the block part?
21:30:00*vesper11 joined #nim
21:30:13FromDiscord<Esbeesy> Why not just echo the results?
21:32:56*hmmm joined #nim
21:34:46FromDiscord<shadow.> sent a code paste, see https://paste.rs/WCo
21:35:27FromDiscord<lqdev> not using quote?
21:35:36FromDiscord<lqdev> hoisting the for loop out to a separate variable?
21:35:43FromDiscord<lqdev> using result?
21:35:47FromDiscord<lqdev> using if expressions?
21:36:01FromDiscord<lqdev> idk man so much you could to
21:36:03FromDiscord<lqdev> (edit) "to" => "do"
21:44:02*mfiano joined #nim
21:56:46FromDiscord<Vindaar> @Esbeesy No real reason. I like named blocks, because they give some more meaning to code. here of course it's just a simple way to highlight what's part 1 and 2 and allows me to reuse the same variable name 🙃
21:59:09FromDiscord<Esbeesy> Ahh cool, I thought there was some hidden magic to Nim that I was missing there
22:01:01*Q-Master quit (Quit: Ушел)
22:01:55PrestigeJ
22:02:02Prestigewoops
22:02:28*Q-Master joined #nim
22:02:47FromDiscord<fwsgonzo> `'str' is not accessible using discriminant 'kind' of type 'JsonNodeObj'`↵what does that mean? ^
22:02:56FromDiscord<fwsgonzo> I
22:03:17FromDiscord<fwsgonzo> I'm calling `j.pretty()` on a `var j = % { ... }`
22:03:30FromDiscord<fwsgonzo> (edit) "I'm calling `j.pretty()` on a `var j = % { ... ..." added ""blah" ="
22:03:40FromDiscord<fwsgonzo> (edit) ""blah" =" => ""blah":"
22:06:46*Q-Master quit (Client Quit)
22:06:57*Q-Master joined #nim
22:08:02FromDiscord<fwsgonzo> (edit) sent a code paste, see https://paste.rs/Usx
22:09:00*kinkinkijduet quit (Ping timeout: 244 seconds)
22:09:31*kinkinkijduet joined #nim
22:09:52*mbomba joined #nim
22:12:14*mbomba quit (Client Quit)
22:17:17FromDiscord<lytedev> in a macro, how can I interpolate a string literally instead of having it wrapped in quotes when I use backticks?
22:26:56FromDiscord<fwsgonzo> it seems like it's very dangerous to use the cpp backend - my issues went away when going back to the C backend
22:32:06reversem3I know its not the greatest idea , but I added some code to a library I downloaded from nimble. I want to import that library now , how do I compile so its the new version I edited ?
22:32:25reversem3I'll do a pull request later , but I want to test it firest
22:32:29reversem3 * I'll do a pull request later , but I want to test it first
22:36:19voltistCould someone link me to an example or two about returning data from threads?
22:37:17voltistI'm surprised that I can't find any
22:39:49*Q-Master quit (Read error: Connection reset by peer)
22:39:56*Q-Master joined #nim
22:44:08*alexander92 joined #nim
22:44:29*natrys quit (Quit: natrys)
22:45:13FromDiscord<j-james> Is there a nice way to do something like `for number in parseInt(lines(input)):`?
22:47:45*Vladar quit (Quit: Leaving)
22:48:13FromDiscord<fwsgonzo> it seems like recent nim has broken --standalone with the nimErrorFlag addition, which looks like it could be supplied to --standalone if I
22:48:18FromDiscord<fwsgonzo> (edit) "I" => "I'm reading the code correctly"
22:48:49*alexander92 left #nim (#nim)
22:48:50*alexander92 joined #nim
22:54:48Zoom[m]nixfreak: If you modified the files directly, it should work automatically, where do you think the compiler takes the libraries from? ;)
22:55:19FromDiscord<Esbeesy> Not really, is this for the AoC Day 1?
22:55:53FromDiscord<Esbeesy> (edit) "really," => "really (as far as I know but I'm new to Nim),"
22:56:13reversem3yeah I get it Zoom but its not working , is there a cache maybe ?
22:57:13FromDiscord<Esbeesy> sent a code paste, see https://play.nim-lang.org/#ix=2GhL
22:57:39FromDiscord<Esbeesy> sent a code paste, see https://play.nim-lang.org/#ix=2GhM
22:57:44Zoom[m]Not sure. Check out the cache for your project in ~/.cache/nim/
23:03:50reversem3lol yeah lots of instances in multiple files , ok I get it don't delete if you don't need to
23:03:54FromDiscord<j-james> @Esbeesy Yes it is 😃
23:05:07FromDiscord<j-james> My reason for asking was that I iterated through the input three times, and had to wrap each occurance of `number` in a `parseInt` which was just a bit ugly
23:05:56*tane quit (Quit: Leaving)
23:08:52FromDiscord<Quibono> So for fast json parsing is packedjson the best?
23:14:33*abm joined #nim
23:16:30FromDiscord<Esbeesy> Yeah I just blasted every line into a big integer sequence as you can see in my first snippet there 😹 https://github.com/sambeckingham/advent-of-code-2020 (Disclaimer: I'm a Go/.NET dev by trade so my Nim is most likely not idiomatic Nim by any stretch)
23:29:45*nisstyre quit (Quit: WeeChat 2.8)
23:30:14*nisstyre joined #nim
23:33:53*lum quit (Read error: Connection reset by peer)
23:33:58*not_lum joined #nim
23:39:14FromDiscord<Quibono> Has anyone used JSMN? It seems like either that or Disruptek's jason is what I want.
23:44:50*Gustavo6046 quit (Ping timeout: 246 seconds)
23:46:03*mbomba joined #nim
23:55:53*lbart quit (Ping timeout: 260 seconds)