00:01:16 | * | Q-Master quit (Ping timeout: 240 seconds) |
00:03:00 | FromDiscord | <Cohjellah> If you receive a message and it echo's to the terminal as you're writing a message in the input line, it'll print whatever is in the input line + the received message |
00:03:13 | FromDiscord | <shadow.> are you making a chat app? |
00:03:16 | FromDiscord | <Cohjellah> correct |
00:03:20 | FromDiscord | <shadow.> same thing happened w me lol |
00:03:38 | FromDiscord | <shadow.> tbh id just use something like `illwill` if i were you before you go too far down the stdout path |
00:03:49 | FromDiscord | <Cohjellah> illwill |
00:03:50 | FromDiscord | <Cohjellah> nani |
00:03:51 | FromDiscord | <shadow.> also, try netty instead |
00:03:59 | FromDiscord | <shadow.> udp > tcp imo lol |
00:04:03 | FromDiscord | <shadow.> https://github.com/johnnovak/illwill |
00:04:08 | FromDiscord | <shadow.> https://media.discordapp.net/attachments/371759389889003532/791818522190807060/nim-mod-1.png |
00:04:13 | FromDiscord | <shadow.> easy console graphics |
00:04:26 | FromDiscord | <shadow.> you can just make a typing box at the bottom and have a scrollable chat |
00:05:20 | FromDiscord | <Cohjellah> Interesting |
00:05:27 | FromDiscord | <Cohjellah> I don't want it to go too crazy |
00:05:39 | FromDiscord | <Cohjellah> I legit just want my messages to not be overwritten by received messages |
00:05:42 | FromDiscord | <Cohjellah> that's all ahaha. |
00:05:53 | FromDiscord | <shadow.> well the way that console works that's not really possible |
00:06:08 | FromDiscord | <Cohjellah> Yeah so I'm making it "hacky" |
00:06:12 | FromDiscord | <ElegantBeef> I gave a solution 😛 |
00:06:15 | FromDiscord | <shadow.> you did? |
00:06:17 | FromDiscord | <shadow.> im interested, what was it |
00:06:22 | FromDiscord | <Cohjellah> yeah I can't implement the solution because I am trying to read the input line |
00:06:23 | FromDiscord | <Cohjellah> but it's borked |
00:06:26 | * | Q-Master joined #nim |
00:06:35 | FromDiscord | <Cohjellah> and if i write line back to the input line, I can't backspace the line, it's fixed |
00:06:54 | FromDiscord | <shadow.> hm |
00:06:55 | FromDiscord | <Cohjellah> That was my original solution, but I don't know any of the commands ahaha |
00:06:58 | FromDiscord | <Cohjellah> I could use the getch |
00:07:11 | FromDiscord | <shadow.> actually i might make an illwill chat client rn tbh |
00:07:12 | FromDiscord | <Cohjellah> but that seems.... Really unnecessarily long but I'll do it if it's the only option in the end. |
00:07:12 | FromDiscord | <shadow.> lol |
00:07:19 | FromDiscord | <shadow.> fair enough |
00:07:50 | FromDiscord | <Cohjellah> So, how would I read the input line without actually printing it to the terminal |
00:08:02 | FromDiscord | <Cohjellah> actually, maybe I will just print it to the terminal, read the line, then delete the line but I Don't really know how to do that either. |
00:08:08 | FromDiscord | <Cohjellah> eraseline actually doesn't do anything for me for some reason |
00:09:58 | FromDiscord | <ElegantBeef> I showed you how 😄 |
00:10:39 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=2Jnv |
00:11:07 | FromDiscord | <ElegantBeef> hitting 'c' emulates recieving a message whilst typing |
00:11:33 | * | krux02 quit (Remote host closed the connection) |
00:12:26 | FromDiscord | <Cohjellah> hitting run gives me an EOF reached error |
00:12:41 | FromDiscord | <ElegantBeef> on nim playground, yes |
00:12:43 | FromDiscord | <Cohjellah> ahk |
00:12:45 | FromDiscord | <Cohjellah> gotcha |
00:12:46 | FromDiscord | <Cohjellah> sec |
00:14:04 | * | mbomba joined #nim |
00:14:11 | FromDiscord | <ElegantBeef> the double c is cause im dumb |
00:14:21 | FromDiscord | <shadow.> f |
00:14:47 | FromDiscord | <Cohjellah> this is |
00:14:50 | FromDiscord | <Cohjellah> nice that this works |
00:15:01 | FromDiscord | <Cohjellah> idk why write is broken for me but works in your case ahaha |
00:15:07 | FromDiscord | <Cohjellah> when I use write it makes the string unusable |
00:15:30 | FromDiscord | <ElegantBeef> https://play.nim-lang.org/#ix=2JrF fixes the c double print |
00:16:04 | FromDiscord | <ElegantBeef> but thats just an issue for me using the simulated print |
00:19:07 | FromDiscord | <Cohjellah> Iiinteresting |
00:19:18 | FromDiscord | <Cohjellah> I'll try implement this into my loop here |
00:19:25 | FromDiscord | <Cohjellah> might just have to do it with this method |
00:31:10 | * | mbomba quit (Quit: WeeChat 3.0) |
00:32:14 | FromDiscord | <Cohjellah> So I need to do this on an individual thread, would I just spawn it on the getch()? |
00:34:55 | FromDiscord | <ElegantBeef> This can be done single threaded |
00:38:42 | FromDiscord | <ElegantBeef> Depending on how you're networking this, you just check if you received a message before getting input |
00:39:06 | FromDiscord | <ElegantBeef> If you got a message you use that recievedMessage proc then manage your input |
00:39:38 | FromDiscord | <ElegantBeef> Although.... getch() blocks, no? |
00:42:57 | FromDiscord | <Cohjellah> I'm using asyncnet and there's a separate proc that awaits a received message |
00:43:07 | FromDiscord | <Cohjellah> But currently I just use a spawned thread on readline |
00:43:26 | FromDiscord | <ElegantBeef> Ah since it's async it's not a big deal that getch blocks then eh? |
00:43:27 | FromDiscord | <Cohjellah> As the main loop |
00:43:51 | FromDiscord | <Cohjellah> Not really but idk. To be fair I kind of know what's up, but I am following the Nim In Action book and he threads the readline |
00:44:00 | FromDiscord | <Cohjellah> Unsure why if there's an await on receiving a message |
00:44:14 | FromDiscord | <Cohjellah> I suppose it would stop you typing or something? Idk |
00:44:31 | FromDiscord | <ElegantBeef> I dont know, havent used async much |
00:44:54 | FromDiscord | <Cohjellah> Nifty. |
00:45:08 | FromDiscord | <Cohjellah> Hmm I'll play around with threading and without and see what's up |
00:45:22 | FromDiscord | <Cohjellah> This has been a good learning experience.↵Kind of salty there's no way to store the current line lol |
00:46:40 | FromDiscord | <ElegantBeef> Like i said yesterday the issue i believe is that to do that it requires reading until the end of the file and without a `\0` all the stdlib file.read procs will freeze |
00:47:23 | FromDiscord | <ElegantBeef> I'm just guessing though 😄 |
00:50:18 | FromGitter | <ynfle> What's the main difference between an `object` & a `tuple`? |
00:50:29 | FromDiscord | <ElegantBeef> You're lazy |
00:51:00 | FromDiscord | <ElegantBeef> Tuples are turned into C structs regardless so they're identical, just indexed differently |
00:51:37 | FromDiscord | <ElegantBeef> Although tuples can be unpacked so it's a nice return type for some procs |
00:52:47 | FromGitter | <ynfle> So what's the advatage other than the initilization syntax? |
00:53:34 | * | nyaa8 joined #nim |
00:53:55 | FromDiscord | <ElegantBeef> I think the main thing is that atleast anonymous tuples are just so darn easy to make 😄 |
00:54:32 | FromGitter | <ynfle> What the advantage of using an objec |
00:54:36 | FromGitter | <ynfle> *object? |
00:54:40 | FromGitter | <ynfle> I guess inheritance? |
00:55:15 | FromDiscord | <ElegantBeef> Well compared to an anonymous tuple, named fields, inheritance, no mismatching |
00:56:06 | FromDiscord | <ElegantBeef> I rarely use tuples as it just feels lazy |
00:56:49 | FromDiscord | <ElegantBeef> For instance this is probably the most compelling reason i've ever had for a tuple |
00:56:50 | FromDiscord | <ElegantBeef> https://nim-lang.github.io/Nim/strscans.html#scanTuple.m%2Cuntyped%2Cstatic%5Bstring%5D%2Cvarargs%5Buntyped%5D |
00:57:43 | FromDiscord | <ElegantBeef> Unpacking them to variables is just some nice sugar |
00:58:06 | FromGitter | <ynfle> Or returning mutiple values from a recursive call |
00:58:09 | FromDiscord | <ajusa> Might be a really dumb question, but how can I turn a table into a sequence of tuples? I tried doing `myTable.pairs.toSeq` but that doesn't seem to compile, undeclared field pairs. |
00:58:15 | FromGitter | <ynfle> `var` params are just annoying |
00:58:23 | FromDiscord | <ajusa> (edit) "table" => "countTable" |
00:58:37 | FromGitter | <ynfle> @ajusa `toSeq(myTable.pairs)` |
00:58:58 | FromDiscord | <ElegantBeef> It's an issue that i think may be resolved eventually |
00:59:22 | FromDiscord | <ajusa> Thanks, that worked! I guess I can't chain that like I thought I could |
00:59:26 | FromGitter | <ynfle> @ajusa https://nim-lang.github.io/Nim/manual.html#templates-limitations-of-the-method-call-syntax This will help to explain why |
00:59:33 | FromGitter | <ynfle> It's unique to iterators |
00:59:41 | FromGitter | <ynfle> They can't be used in that way |
01:00:16 | FromDiscord | <ajusa> Cool, I learned something today! |
01:00:42 | FromGitter | <ynfle> 👍 |
01:03:33 | * | not_lum quit (Quit: Lum: Bye!) |
01:05:23 | * | lum joined #nim |
01:07:47 | * | lum quit (Client Quit) |
01:09:46 | * | lum joined #nim |
01:10:37 | FromDiscord | <Cohjellah> Learning new things, and on Christmas too |
01:10:38 | FromDiscord | <Cohjellah> How jolly |
01:11:09 | FromDiscord | <ElegantBeef> It's not cringlesticks yet |
01:11:09 | * | lum quit (Client Quit) |
01:11:37 | * | lum joined #nim |
01:11:39 | FromDiscord | <Cohjellah> It is in upsidedown land |
01:12:15 | FromDiscord | <Cohjellah> Also with the notation ^ for threading. Does the thread sit on that spot until it's filled and the main thread does whatever in the meantime? |
01:12:33 | FromDiscord | <ElegantBeef> If getch is blocking yes 😄 |
01:12:38 | FromDiscord | <Cohjellah> Ahahahhaha yep ok |
01:12:50 | FromDiscord | <Cohjellah> Fantastic. I actually learnt more doing it your way than what I was thinking |
01:12:58 | FromDiscord | <Cohjellah> Introduced me to new things. Thanks for that btw |
01:13:10 | FromDiscord | <Cohjellah> I probably sounded a little grumpy yesterday, just bad sleep. Cheers though! |
01:13:26 | FromDiscord | <ElegantBeef> Eh, didnt notice |
01:13:30 | FromDiscord | <Cohjellah> Ez |
01:13:48 | FromDiscord | <Cohjellah> God Nim is damn nice. Hoping it catches on so bad - that's my wish for 2021 ty |
01:14:49 | FromDiscord | <ElegantBeef> We need to embed it into corona so it surefire catches on |
01:16:44 | FromDiscord | <Cohjellah> Pump it into the vaccine |
01:16:47 | FromDiscord | <Cohjellah> That's sure to work |
01:17:10 | FromDiscord | <Cohjellah> Into the chips Bill Gates is inserting. Upload straight to the neurons that Nim is the shit |
01:19:34 | * | lum quit (Quit: Lum: Bye!) |
01:22:36 | * | lum joined #nim |
01:24:10 | * | lum quit (Client Quit) |
01:24:31 | FromDiscord | <ElegantBeef> Well the things Nim really needs to take off is better tooling and less unreadable errors 😛 |
01:26:51 | FromDiscord | <ElegantBeef> Both of which i believe are getting worked on afaik |
01:27:17 | * | lum joined #nim |
01:27:50 | FromDiscord | <Cohjellah> Better tooling, like? |
01:28:00 | FromDiscord | <ElegantBeef> Less crashing nimsuggest |
01:28:12 | FromDiscord | <ElegantBeef> Less resource hogging nimsuggest |
01:28:34 | * | lum quit (Client Quit) |
01:28:52 | * | lum joined #nim |
01:29:35 | * | lum quit (Client Quit) |
01:31:45 | FromDiscord | <Quibono> Readable errors would be delightful |
01:31:52 | FromDiscord | <ElegantBeef> Yea i'm on it 😛 |
01:32:17 | FromDiscord | <ElegantBeef> Already got a measurable improvement https://media.discordapp.net/attachments/371759389889003532/791840708549017640/unknown.png |
01:33:08 | FromDiscord | <ElegantBeef> I dont feel like the errors are really that bad, more just hard to parse |
01:34:43 | FromDiscord | <ElegantBeef> plus there is `--hint:source` which is very nice |
01:52:32 | FromDiscord | <exelotl> does copyNimNode produce a shallow copy of the node? |
01:52:55 | FromDiscord | <exelotl> (i.e. doesn't clone the whole tree? just the top level node) |
01:53:29 | FromDiscord | <ElegantBeef> I assume since there is also a copyTree that it only does the single node |
01:54:43 | FromDiscord | <exelotl> hmm that'd be good |
01:57:39 | FromDiscord | <ElegantBeef> Yep only that node |
01:59:01 | FromDiscord | <exelotl> that's perfect, I should submit some docs for it 😅 |
01:59:18 | FromDiscord | <ElegantBeef> Yep you should |
02:03:52 | FromDiscord | <exelotl> tomorrow :P |
02:15:02 | * | klaufir_ quit (Ping timeout: 265 seconds) |
02:16:21 | FromDiscord | <Deleted User 5bd78114> And tomorrow never comes - |
02:17:44 | * | lum joined #nim |
02:18:06 | FromDiscord | <Avatarfighter> Happy holidays everyone thanks for making this year enjoyable 🙂 |
02:19:16 | FromDiscord | <ElegantBeef> Where's my present? |
02:20:26 | FromDiscord | <Deleted User 5bd78114> It's me being here for once- |
02:20:36 | FromDiscord | <ElegantBeef> Ah i'd like a reciept |
02:20:52 | FromDiscord | <Deleted User 5bd78114> Fair enough I also want a refund on my wasted life |
02:21:03 | FromDiscord | <Deleted User 5bd78114> But beggars can't be choosers now can they- |
02:21:21 | FromDiscord | <ElegantBeef> Oh it's you |
02:21:33 | FromDiscord | <ElegantBeef> Hello |
02:21:39 | FromDiscord | <Deleted User 5bd78114> Pfft- |
02:21:44 | FromDiscord | <Deleted User 5bd78114> Hi |
02:23:29 | FromDiscord | <Deleted User 5bd78114> This is awkward now- |
02:24:39 | FromDiscord | <Deleted User 5bd78114> Welp, anyway is it possible to make a Minecraft plugin in Nim somehow? |
02:27:41 | Prestige | how do you normally make a minecraft plugin? |
02:28:04 | FromDiscord | <Deleted User 5bd78114> Java - |
02:28:08 | FromDiscord | <Rika> what is a minecraft plugin |
02:28:16 | FromDiscord | <Deleted User 5bd78114> I know there's a way to call the JVM from Nim |
02:28:19 | FromDiscord | <Rika> do you mean a spigot plugin or a minecraft mod |
02:28:33 | FromDiscord | <Deleted User 5bd78114> A spigot plugin |
02:30:04 | FromDiscord | <Deleted User 5bd78114> I'm thinking that it'd probably have to have a loaded made in java that loads Nim .so/dll files |
02:30:32 | FromDiscord | <Deleted User 5bd78114> Then I'd also have to find a way to expose specific functions, but I have no idea how to dp.that- |
02:32:43 | FromDiscord | <ElegantBeef> Nisha back at it again, trying to abuse Nim 😛 |
02:33:03 | FromDiscord | <Deleted User 5bd78114> Also excuse my spellig.and grammar mistakes, I'm using my sister's kindle.fire.7 to code- |
02:33:06 | FromDiscord | <ElegantBeef> Doesnt Java have a CFFI so it'd be identical |
02:33:16 | FromDiscord | <Deleted User 5bd78114> Thank you :3and |
02:33:40 | FromDiscord | <ElegantBeef> mark your exposed procs with `exportC` then you should be able to call the Nim code from the jvm if it's anything like C# |
02:33:49 | FromDiscord | <Deleted User 5bd78114> And yeah it does |
02:34:10 | FromDiscord | <Deleted User 5bd78114> Thanks, but I'm struggling because.I have no idea how I'd actually make it do stuff- |
02:34:24 | FromDiscord | <Deleted User 5bd78114> I can use the file, sure |
02:34:24 | FromDiscord | <Rika> why the fuck do you use the most RANDOM of devices to program in |
02:34:44 | FromDiscord | <ElegantBeef> Oh shut up programming keyboard 😉 |
02:34:52 | FromDiscord | <Rika> smh lmao |
02:35:01 | FromDiscord | <Rika> i can program just not accurately |
02:35:15 | FromDiscord | <Deleted User 5bd78114> Because this is my talent UvU |
02:35:18 | FromDiscord | <ElegantBeef> It's an upgrade from nisha using their phone |
02:35:33 | FromDiscord | <Rika> i'll be impressed if you could somehow get to program on a convenience store atm |
02:36:57 | FromDiscord | <Deleted User 5bd78114> DON'T TEMPT ME- |
02:37:16 | FromDiscord | <Deleted User 5bd78114> I'LL EVEN USE DISCORD ON IT TOO- |
02:37:24 | FromDiscord | <Rika> do it |
02:37:30 | Prestige | How do you end up with - at the end of each sentence |
02:37:38 | FromDiscord | <Rika> totallynotaploytogettechnishaarrested |
02:37:49 | FromDiscord | <Rika> prestige it is for emphasis |
02:37:52 | FromDiscord | <Deleted User 5bd78114> XD |
02:38:05 | FromDiscord | <Deleted User 5bd78114> ^^^ Yup |
02:38:12 | Prestige | oh, just looks weird |
02:38:23 | FromDiscord | <ElegantBeef> You look weird yet no one he was pointing it out |
02:38:26 | FromDiscord | <Deleted User 5bd78114> It's to basically show the fact I'm giggling my ass off- |
02:38:34 | FromDiscord | <Deleted User 5bd78114> XD |
02:38:48 | Prestige | - means giggling? |
02:38:59 | FromDiscord | <ElegantBeef> Apparently, new age abbreviation |
02:39:02 | FromDiscord | <Deleted User 5bd78114> It's because I'm a roleplayer so I make EVERY message show emotion- |
02:39:13 | FromDiscord | <Deleted User 5bd78114> No it depends on the context- |
02:39:26 | FromDiscord | <Deleted User 5bd78114> What do you mean? |
02:39:42 | FromDiscord | <ElegantBeef> - is the new version of lol, clearly |
02:39:51 | FromDiscord | <Deleted User 5bd78114> Oh- |
02:40:02 | FromDiscord | <Deleted User 5bd78114> also that was an example of context |
02:40:20 | Prestige | Weird lol |
02:40:43 | FromDiscord | <Deleted User 5bd78114> "Oh-" as in something I didn't know "I WILL DO IT DON'T TEMPT ME-" shows I'm actual psychopath |
02:41:05 | FromDiscord | <Deleted User 5bd78114> That |
02:45:02 | FromDiscord | <Deleted User 5bd78114> So what are some good libraries for working with the JVM in Nim? Everything is pain on this tablet |
02:45:12 | FromDiscord | <Deleted User 5bd78114> It's slow and laggy as duck and barely works- |
02:45:30 | FromDiscord | <Deleted User 5bd78114> Not to mention AUTOCORRECT |
02:45:38 | FromDiscord | <ElegantBeef> For Java calling nim, there is none, just make a system library |
02:45:48 | FromDiscord | <ElegantBeef> For nim calling java you have jnim |
02:46:22 | FromDiscord | <Deleted User 5bd78114> Thanks! |
02:47:25 | FromDiscord | <Deleted User 5bd78114> I wonder if it's possible to get the JVM to send functions and Java types to Nim directly |
02:47:42 | FromDiscord | <Deleted User 5bd78114> I'll figure it out and probably make a shifty lib for it |
02:47:48 | FromDiscord | <ElegantBeef> Again that's just using the C ffi |
02:47:53 | FromDiscord | <Deleted User 5bd78114> Shitty |
02:48:07 | FromDiscord | <Deleted User 5bd78114> I'm stupid - |
02:48:16 | FromDiscord | <Deleted User 5bd78114> My sleep deprivation is getting to me |
02:49:11 | FromDiscord | <ElegantBeef> You could always make a macro to output java classes for you to use to make it a bit less tedious |
02:49:30 | FromDiscord | <Deleted User 5bd78114> Hmm, thanks! |
02:49:55 | FromDiscord | <Deleted User 5bd78114> I'll probably leave it until I can actually get back to my PC- |
02:52:21 | FromDiscord | <Deleted User 5bd78114> Since I'm already in enough pain |
02:58:46 | FromDiscord | <Chimyx> sent a code paste, see https://play.nim-lang.org/#ix=2Jsa |
02:59:19 | FromDiscord | <ElegantBeef> single lining like that isnt nice to read |
03:00:26 | FromDiscord | <ElegantBeef> sent a code paste, see https://paste.rs/5Mj |
03:00:40 | FromDiscord | <Chimyx> yeah, makes sense |
03:00:49 | FromDiscord | <ElegantBeef> Also it's Nim, not Vim 😛 |
03:01:32 | FromDiscord | <Chimyx> lol, my muscle memory isn't used to typing nim yet |
03:02:45 | FromDiscord | <Chimyx> well thanks for your answer 😉 |
03:58:52 | * | muffindrake quit (Ping timeout: 260 seconds) |
03:59:12 | FromDiscord | <Deleted User 5bd78114> Now I'm curious if Minecraft mods in Nim are feasible- |
03:59:18 | FromDiscord | <Deleted User 5bd78114> Would people use it?- |
03:59:39 | FromDiscord | <Deleted User 5bd78114> And how the fuck would it even work - |
04:00:22 | FromDiscord | <Rika> i believe someone tried already |
04:00:25 | FromDiscord | <Rika> i do not know who |
04:00:50 | FromDiscord | <Deleted User 5bd78114> Oh crap really? |
04:00:53 | FromDiscord | <Deleted User 5bd78114> Welp |
04:00:57 | * | muffindrake joined #nim |
04:01:10 | FromDiscord | <Deleted User 5bd78114> Time to reinvent the broken and old wheel!- |
04:01:24 | FromDiscord | <Deleted User 5bd78114> I don't know don't judge me I'm sleep-drunk |
04:02:38 | FromDiscord | <Rika> dont worry you sound too young to be drunk |
04:02:50 | FromDiscord | <Deleted User 5bd78114> I'm 16- |
04:02:56 | FromDiscord | <Deleted User 5bd78114> Just two years - |
04:03:15 | FromDiscord | <Deleted User 5bd78114> I might as well get drunk for the giggles in school- (jk) |
04:03:46 | FromDiscord | <Deleted User 5bd78114> (edit) "I might as well get drunk for the ... giggles" added "shits and" |
04:04:41 | FromDiscord | <Rika> 4 years in a certain country |
04:05:03 | FromDiscord | <Deleted User 5bd78114> Anyway, the main issues I can think of is now would think of are:↵ - The structure of the code↵ - And the dependencies |
04:05:48 | FromDiscord | <Deleted User 5bd78114> For example if I wanted to use Thaumcraft in my Nim mod for some godforsaken reason |
04:07:40 | FromDiscord | <Deleted User 5bd78114> And if I wanted to hook into Forge's RF System |
04:08:01 | FromDiscord | <Deleted User 5bd78114> And how would any other mod depend on this monstrosity - |
04:08:44 | FromDiscord | <Deleted User 5bd78114> Goddamn my twisted mind |
04:09:05 | FromDiscord | <Deleted User 5bd78114> This is what I'm going to be set on once I have access to my computer again- |
04:09:09 | FromDiscord | <ElegantBeef> The answer is you basically want to make a java backend |
04:09:28 | FromDiscord | <Deleted User 5bd78114> ........ |
04:09:38 | FromDiscord | <Deleted User 5bd78114> FUCK MY LIFE |
04:10:21 | FromDiscord | <Deleted User 5bd78114> Does Minecraft Java Edition run on Arch and other architects besides x86?- |
04:10:33 | FromDiscord | <Deleted User 5bd78114> If so I'm actually fucked- |
04:10:40 | FromDiscord | <ElegantBeef> It's java so it should run on arm |
04:10:50 | FromDiscord | <Deleted User 5bd78114> DAMN IT |
04:11:14 | FromDiscord | <Deleted User 5bd78114> I'm gonna have to set up so much shit for this but it'll be worth it for my college portfolio- |
04:12:45 | FromDiscord | <Deleted User 5bd78114> I really hope I can mAke a flimsy wrapper in Java and just use CFFI to use Nom code too with a few modifications - |
04:12:57 | FromDiscord | <Rika> man at that point just use kotlin |
04:13:09 | FromDiscord | <Rika> or find a way to compile nim into jvm bytecode |
04:13:16 | FromDiscord | <Deleted User 5bd78114> NOPE I WANNA TORTURE MYSELF- |
04:13:35 | FromDiscord | <Deleted User 5bd78114> Isn't there C to JVM Bytecode compilers? |
04:16:43 | FromDiscord | <Deleted User 5bd78114> if it's out there, theoretically o have most of the ground laid.out |
04:23:03 | FromDiscord | <Deleted User 5bd78114> I found this: https://stackoverflow.com/a/4221644 |
04:23:34 | FromDiscord | <Deleted User 5bd78114> But the only issue with that is that there's no way to actually properly interact with the JVM and have to JVM interact with it too |
04:23:44 | FromDiscord | <Deleted User 5bd78114> And I can't imagine how slow it'd be- |
04:24:51 | FromDiscord | <Deleted User 5bd78114> Though JNim should be good enough |
04:25:07 | FromDiscord | <ElegantBeef> Clearly you just use https://www.minecraft.net/en-us/article/scripting-api-now-public-beta |
04:25:39 | FromDiscord | <Deleted User 5bd78114> Wait what |
04:26:31 | FromDiscord | <ElegantBeef> It's the native minecraft |
04:26:39 | FromDiscord | <ElegantBeef> It has a scripting API |
04:27:35 | FromDiscord | <Deleted User 5bd78114> That's only Minecraft Win 10 edition for now, and this is for a Java Forge mos |
04:27:37 | FromDiscord | <Deleted User 5bd78114> Mod |
04:27:46 | FromDiscord | <ElegantBeef> I know, my point is you wont be able to use nim |
04:28:01 | FromDiscord | <Deleted User 5bd78114> And maybe Minecraft spigot plugins in Nim |
04:28:13 | FromDiscord | <Deleted User 5bd78114> It's possible and I shall do it- |
04:28:32 | FromDiscord | <Deleted User 5bd78114> (I totally don't say this for everything and never do it-) |
04:30:47 | FromDiscord | <Deleted User 5bd78114> But it is 100% possible |
04:31:02 | FromDiscord | <Deleted User 5bd78114> Everything is here, all I need is the motivation to get off of.my ass |
04:33:45 | * | narimiran joined #nim |
04:33:54 | FromDiscord | <CodeHz> I'm going to build server side plugin for Minecraft Bedrock edition in nim (I've tried it in c++ before, but due to some complexity management issue i give up...) |
04:34:34 | FromDiscord | <Deleted User 5bd78114> What server software are you going to use? I'm curious if I'm allowed to ask |
04:34:56 | FromDiscord | <CodeHz> Repo: github.com/Element-0/ElementZeroR |
04:35:09 | FromDiscord | <CodeHz> Official bds server |
04:35:22 | FromDiscord | <Deleted User 5bd78114> Ah, okay, thanks! |
04:35:36 | FromDiscord | <Deleted User 5bd78114> http://github.com/Element-0/ElementZeroR |
04:36:27 | FromDiscord | <CodeHz> (original version is written in c++, but it get too complicated to add new features... |
04:36:33 | FromDiscord | <Deleted User 5bd78114> Looks neat! |
04:37:01 | FromDiscord | <Deleted User 5bd78114> And the complication is most likely due to not organising the code and adding helped options |
04:38:03 | * | vicfred joined #nim |
04:38:51 | FromDiscord | <CodeHz> (the primary problem for me is lacks of abstraction layer)↵The origin api in bds is really bad for modding |
04:43:49 | FromDiscord | <Deleted User 5bd78114> Ah, alright |
04:44:04 | FromDiscord | <Deleted User 5bd78114> MAkes sense |
04:48:01 | * | spiderstew_ joined #nim |
04:49:31 | disruptek | t'was the night before christmas, and all through the house, not a creature was stirring |
04:49:35 | disruptek | except some prick on irc. |
04:50:52 | FromDiscord | <Deleted User 5bd78114> Pfft- |
04:50:58 | * | spiderstew quit (Ping timeout: 272 seconds) |
04:51:01 | FromDiscord | <Deleted User 5bd78114> Heya Disruptek |
04:51:12 | disruptek | coulda sworn i deleted user 5bd78114. |
04:52:09 | FromDiscord | <Deleted User 5bd78114> Wha- |
04:52:27 | FromDiscord | <Deleted User 5bd78114> It's me, Technisha- |
04:52:36 | FromDiscord | <ElegantBeef> Nicknames dont share |
04:55:56 | disruptek | it'd be confusing if we shared nicks. |
04:56:34 | mipri | https://irclogs.nim-lang.org/25-12-2020.html#04:09:38 |
04:56:50 | * | acidx quit (Ping timeout: 260 seconds) |
04:57:06 | disruptek | now i remember why i deleted you. |
04:57:23 | * | acidx joined #nim |
05:02:23 | FromDiscord | <Deleted User 5bd78114> ???? |
05:03:47 | disruptek | you make me feel better about myself and that's confusing for my depression and anxiety. |
05:05:36 | FromDiscord | <Deleted User 5bd78114> Yeah I tend to do that |
05:05:53 | FromDiscord | <Deleted User 5bd78114> Alot.more than I shoukd |
05:08:50 | FromDiscord | <Deleted User 5bd78114> Just gonna say that I'm a... |
05:08:58 | FromDiscord | <Deleted User 5bd78114> QUARANTEEN |
05:09:10 | FromDiscord | <Deleted User 5bd78114> Aka growing up.in this he'll of a virus- |
05:09:13 | FromDiscord | <Deleted User 5bd78114> Wrong channel |
05:09:21 | disruptek | probably. |
05:09:24 | FromDiscord | <Deleted User 5bd78114> Ignore what I said- |
05:10:11 | * | mipri left #nim (#nim) |
05:10:13 | FromDiscord | <Rika> go to sleep |
05:10:44 | FromDiscord | <Deleted User 5bd78114> No- |
05:10:48 | FromDiscord | <Deleted User 5bd78114> One more hour- |
05:10:55 | FromDiscord | <Deleted User 5bd78114> It's only 5 am- |
05:20:50 | FromDiscord | <Rika> go to sleep |
05:23:19 | FromDiscord | <Deleted User 5bd78114> No- |
05:23:25 | FromDiscord | <Deleted User 5bd78114> I can't - |
05:23:35 | FromDiscord | <Deleted User 5bd78114> I struggle too much anyway |
05:23:41 | FromDiscord | <Deleted User 5bd78114> What's the point |
05:23:46 | FromDiscord | <Deleted User 5bd78114> It's only an hour |
05:29:25 | disruptek | mratsim: https://github.com/disruptek/cps/discussions/40 |
05:29:58 | disruptek | disbot: you feel like learning how to deal with a new github feature tonight? |
05:29:59 | disbot | as i see it, yes. |
05:30:05 | disruptek | aight buddy. |
05:30:40 | FromDiscord | <Deleted User 5bd78114> I'm finally done with what I was doing, goodnight everyone, hope I'm dead tomorrow |
05:34:11 | disruptek | peace. |
06:05:40 | * | vicfred quit (Quit: Leaving) |
06:10:41 | * | vicfred joined #nim |
06:17:49 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:29:52 | * | saem joined #nim |
06:30:31 | * | vicfred quit (Quit: Leaving) |
06:57:49 | * | letto_ quit (Ping timeout: 264 seconds) |
06:57:53 | * | mipri joined #nim |
06:58:29 | * | letto_ joined #nim |
07:14:22 | * | habamax joined #nim |
07:33:59 | FromDiscord | <juan_carlos> So Ruby is JIT and Typed now. 🤔 |
07:34:46 | Prestige | interesting |
07:36:01 | FromDiscord | <Rika> Is there a blog post about it? |
07:36:40 | FromDiscord | <juan_carlos> https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released |
07:38:24 | * | Edwin joined #nim |
07:39:04 | FromDiscord | <Cohjellah> oh boy lads and lasses |
07:39:07 | FromDiscord | <Cohjellah> the plight continues |
07:39:18 | FromDiscord | <Cohjellah> terminal chat app hump be 'uge |
07:40:11 | FromDiscord | <Cohjellah> is there an equivalent of .isReady for getCh() or like, any functions? |
07:40:16 | FromDiscord | <Cohjellah> Just trying to work with threads and it's doing me head in |
07:40:32 | Prestige | terminal chat app? |
07:41:10 | FromDiscord | <Cohjellah> correct. Did the Nim In Action chat app and I'm taking it to the next level - mad road hump where when you receive a message it just echo's whatever you're currently typing |
07:41:19 | Prestige | oh |
07:42:27 | FromDiscord | <Cohjellah> So current solution is to use getCh() |
07:42:51 | mipri | if you're using threads have one block on input, and place any "has there been input?" logic in another thread, on the other side of a chan |
07:43:49 | FromDiscord | <Cohjellah> HMM |
07:43:59 | FromDiscord | <Cohjellah> chan? |
07:44:10 | mipri | although asking that question ever is probably wrong. |
07:44:30 | FromDiscord | <Cohjellah> huh |
07:44:33 | mipri | https://nim-lang.org/docs/channels.html |
07:44:38 | FromDiscord | <Cohjellah> ah, you meant channels |
07:45:14 | FromDiscord | <Cohjellah> oh boy |
07:45:19 | FromDiscord | <Cohjellah> ok so I have to do something a bit more complicated than spawn |
07:48:13 | FromDiscord | <Cohjellah> so for instance the prior main loop created a string variable using spawn for readline, and then there's a .isReady() method of the string variable |
07:48:20 | FromDiscord | <Cohjellah> is that attached to readLine or string objects? |
07:49:22 | mipri | FlowVars have an .isReady |
07:49:37 | FromDiscord | <Cohjellah> riiiiight |
07:49:38 | FromDiscord | <Cohjellah> ok I see |
07:50:19 | FromDiscord | <juan_carlos> So is interesting that the most Dynamic langs are all rushing to get typed :p Bugs were winning |
07:50:28 | Prestige | yep! haha |
07:53:24 | mipri | rather, the big choice is to A) follow the CS consensus, B) rebel against the CS consensus, or C) be an ill-conceived hack that is only accidentally divergent from the CS consensus. |
07:53:36 | FromDiscord | <Cohjellah> yo is there an "Also" in an if else |
07:53:36 | mipri | what you're seeing is a bunch of category C languages moving to category A |
07:53:46 | FromDiscord | <Cohjellah> so like, I want something to happen on every iteration of the if |
07:53:52 | FromDiscord | <Cohjellah> but I don't want to re-type it on every branch |
07:54:07 | FromDiscord | <Rika> CS consensus? |
07:54:23 | FromDiscord | <Rika> What? |
07:54:29 | mipri | 'if' don't have iterations. You can put code before or after the 'if' and have code that runs each time before or after that code. |
07:55:22 | FromDiscord | <Cohjellah> I understand there's no interations |
07:55:28 | FromDiscord | <Cohjellah> I'm interating over it using a while loop |
07:55:38 | FromDiscord | <Cohjellah> everytime it chooses a branch I want it to respawn the getCh() |
07:55:49 | FromDiscord | <Cohjellah> But I don't want to write chFlow = spawn getCh() on every branch |
07:55:53 | FromDiscord | <Cohjellah> I can, but surely there's shorthand |
07:56:01 | FromDiscord | <Rika> Do it after the if else? |
07:56:05 | FromDiscord | <Cohjellah> wow I'm stupid |
07:56:07 | FromDiscord | <Cohjellah> thanks |
07:56:18 | FromDiscord | <Cohjellah> It's the Christmas cheer and tiredness. Thanks ahahahahha |
07:56:30 | FromDiscord | <Rika> Lol |
07:56:42 | FromDiscord | <Cohjellah> wait I kind of did think of that nvm |
07:56:45 | FromDiscord | <Rika> Might be dehydration |
07:56:47 | FromDiscord | <Cohjellah> if I had it after the if statement |
07:56:53 | FromDiscord | <Cohjellah> so the if is checking .isReady() |
07:56:54 | FromDiscord | <Rika> What's the issue then? |
07:57:01 | FromDiscord | <Cohjellah> if it keeps respawning the same chFlow variable |
07:57:08 | FromDiscord | <Cohjellah> it kind of stuffs with my program as it's polling at hte bottom |
07:57:12 | FromDiscord | <Cohjellah> I get a ton of missed inputs |
07:57:31 | FromDiscord | <Rika> Might be taking too long to process |
07:57:43 | FromDiscord | <Rika> Compile as danger maybe |
07:57:46 | FromDiscord | <Cohjellah> let me hard code this in before I decide I need this, and then I'll shorten it if possible |
07:58:23 | * | Edwin quit (Remote host closed the connection) |
08:00:53 | FromDiscord | <Cohjellah> nah, I'm lost |
08:00:59 | FromDiscord | <Cohjellah> I'll just keep tinkering away and see what happens lol |
08:01:14 | FromDiscord | <Cohjellah> At the least, I'll learn something lol |
08:02:51 | FromDiscord | <Edwin> sent a code paste, see https://play.nim-lang.org/#ix=2Jt2 |
08:06:28 | mipri | you're writing NimScript and NimScript doesn't have that proc. There's nothing you can do with attributes or backends to get it back. |
08:06:51 | mipri | I suggest writing Nim instead, and using nimcr or similar to make it work like a script |
08:06:58 | mipri | !repo nimcr |
08:06:59 | disbot | https://github.com/cheatfate/nimcrypto -- 9nimcrypto: 11Nim cryptographic library 15 82⭐ 10🍴 7& 3 more... |
08:07:05 | mipri | not that one. |
08:07:28 | FromDiscord | <ElegantBeef> Well there is also using nimscript interop, but that's more work than they probably want |
08:07:35 | mipri | 'nimble search shebang' pulls two up. |
08:07:49 | FromDiscord | <ElegantBeef> !repo nim-cr |
08:07:50 | disbot | https://github.com/LemonBoy/criterion.nim -- 9criterion.nim: 11Statistic-driven micro-benchmark framework 15 37⭐ 3🍴 7& 8 more... |
08:07:53 | FromDiscord | <ElegantBeef> lol |
08:07:56 | mipri | https://github.com/PMunch/nimcr |
08:10:46 | FromDiscord | <Edwin> oh i see - thank you! |
08:14:14 | FromDiscord | <Cohjellah> @ElegantBeef hey beef. I actually got it working with threading and stuff, but I think it's... Not threadsafe with polling? |
08:14:31 | FromDiscord | <Cohjellah> For instance it's really laggy and spamming "asd asd asd" puts letters back and forth and all that good stuff |
08:15:12 | FromDiscord | <bark> I've got a dummy question, assuming this situation: https://play.nim-lang.org/#ix=2Jt8 how to bind into the GC calls to clean up the ptr field in the example? |
08:15:38 | FromDiscord | <bark> (edit) "https://play.nim-lang.org/#ix=2Jt8" => "https://play.nim-lang.org/#ix=2Jt9" |
08:15:52 | mipri | yes it'll leak. |
08:16:11 | FromDiscord | <Rika> Rename your destroy into "<backtick>=destroy<backtick>" |
08:16:12 | FromDiscord | <Rika> ? |
08:16:40 | FromDiscord | <Cohjellah> THE PLIGHT CONTINUES! ↵↵I think I'm spending way too much time on this silly little problem |
08:17:16 | FromDiscord | <Rika> Perhaps, try drinking water or taking a bath or whatever |
08:17:24 | FromDiscord | <Cohjellah> yeah I'll go soak myself |
08:17:28 | FromDiscord | <Cohjellah> go roll in some mud or something |
08:17:47 | FromDiscord | <bark> so that binds into the gc calls |
08:17:50 | FromDiscord | <Rika> Relax for a while and come back to it some other time |
08:18:01 | FromDiscord | <Rika> Not sure if it does on refc |
08:18:05 | mipri | https://play.nim-lang.org/#ix=2Jtb - using destructors for A |
08:18:23 | FromDiscord | <Cohjellah> How do I make codeblocks in Discord? |
08:18:32 | FromDiscord | <bark> three backticks to start/end |
08:18:42 | FromDiscord | <bark> like in markdown |
08:18:55 | FromDiscord | <Cohjellah> sent a code paste, see https://play.nim-lang.org/#ix=2Jtc |
08:19:16 | FromDiscord | <Cohjellah> oh no pretty colours. But this is my ugly ass code atm. The polling is causing it to be all over the place |
08:19:23 | mipri | using GC'd refs instead of ptr: https://play.nim-lang.org/#ix=2Jtd |
08:19:23 | FromDiscord | <Cohjellah> I'm definitely doing something wrong, but unsure what to do next |
08:19:43 | FromDiscord | <bark> you can add the language name directly after the first three backticks to add syntax coloring |
08:19:57 | FromDiscord | <bark> sent a code paste, see https://play.nim-lang.org/#ix=2Jte |
08:20:28 | FromDiscord | <Cohjellah> pretty |
08:20:29 | FromDiscord | <Cohjellah> (edit) |
08:20:31 | mipri | Cohjellah: that isn't complete code. where are your imports? |
08:20:41 | FromDiscord | <Cohjellah> I can send the whole thing if you'd like |
08:20:57 | FromDiscord | <Cohjellah> but parts aren't being used. This is my WIP trying to get this to work safely and non-laggy |
08:21:10 | FromDiscord | <bark> mipri, thanks for your code examples, I'll play with them but the first seems to be what I'm looking for |
08:22:59 | FromDiscord | <Cohjellah> (edit) sent a code paste, see https://play.nim-lang.org/#ix=2Jtf |
08:23:03 | FromDiscord | <Cohjellah> put the imports at the top |
08:24:06 | FromDiscord | <Cohjellah> (edit) sent a code paste, see https://play.nim-lang.org/#ix=2Jtg |
08:24:39 | FromDiscord | <bark> editing your message resends it to irc afaik |
08:24:51 | FromDiscord | <Cohjellah> I'm editing to add more things I think are useful |
08:24:55 | FromDiscord | <Cohjellah> soz if it's spamming to the poor IRC folk |
08:24:56 | FromDiscord | <bark> and (long) code blocks get (re)uploaded to play.nim-lang.org |
08:25:28 | mipri | this still isn't a complete example. where's protocol? |
08:25:55 | FromDiscord | <Cohjellah> protocol is a separate file, and I know it seems related, but all my problems are in the code block originally posted, which is why I only included it |
08:26:34 | * | bananaapple joined #nim |
08:26:40 | FromDiscord | <Cohjellah> it's to do with the whole threading problem, I'm unsure.↵When you spawn a readLine, you can already asynchronously type into the terminal and then when you press enter readLine is ready right. I need to recreate that in the terminal using getCh |
08:27:00 | FromDiscord | <Cohjellah> but it seems every time you hit a key, getCh is ready now, so it goes through the branches, and it doesn't work well with asyncdispatch.poll |
08:27:12 | FromDiscord | <Cohjellah> I mean, yeah that is how it;s coded. But I thought it would work somewhat smoothly |
08:27:54 | FromDiscord | <Cohjellah> If you really need protocol, I Can paste it too |
08:28:07 | mipri | this is getch: https://github.com/nim-lang/Nim/blob/version-1-4/lib/pure/terminal.nim#L749 |
08:28:40 | mipri | this is not actually what you want unless you want to do a lot more with the terminal |
08:28:58 | mipri | to start, this does not at all work like you just described |
08:29:16 | mipri | "input is ready when the user hits enter" is a behavior that getch is trying to avoid. |
08:29:36 | FromDiscord | <Cohjellah> Well, maybe you can provide me a cleaner solution because this is really hacky |
08:29:44 | mipri | if you want lines of input at a time from the user, just use readLine |
08:29:44 | FromDiscord | <Cohjellah> Hold up, let me pull you up the OG code before I hacked it up |
08:29:53 | FromDiscord | <Cohjellah> correct, but this is for a chat app |
08:30:02 | mipri | do you not want lines of input at a time from the user? |
08:30:04 | FromDiscord | <Cohjellah> when the terminal app receives a message, echo pastes whatever the user is currently typing into the terminal |
08:30:19 | FromDiscord | <Cohjellah> to avoid that, this is trying to capture what the user is typing |
08:30:38 | mipri | ok, so you indeed want to do a lot more with the terminal, so that you can have a nice UI and not have network output stomp over what the user is typing. |
08:30:43 | FromDiscord | <Cohjellah> then when a message is received, clear the input line, echo the received message, then write back to the input line what was being typed |
08:30:56 | FromDiscord | <Cohjellah> yeah no network stomp as you put it |
08:31:10 | FromDiscord | <Cohjellah> This is my only real hurdle haha and it' sdriving me insane. I can't really find a solution |
08:31:13 | mipri | in that case, getch can still be part of a solution, but you need to understand that it's going to return right away. There's no "wait until enter is pressed". You've thrown that whole behavior away |
08:31:41 | FromDiscord | <Cohjellah> right, so even if I spawn getCh(), isReady() instantly activates? |
08:31:49 | mipri | really what I'd suggest is to go through an ncurses tutorial. Just find one that uses C, like the official one, and follow along with a nim library. |
08:31:50 | FromDiscord | <Cohjellah> it doesn't wait for a value? |
08:32:04 | mipri | isReady() is a FlowVar method. I'm talking about getch. |
08:32:30 | FromDiscord | <ElegantBeef> We've got illwill aswell, although dont recall if it's documented well |
08:32:35 | mipri | if what your program is doing is seting the FlowVar to what getch returns, then yeah that's to return as soon as any key is typed |
08:33:04 | FromDiscord | <Cohjellah> yeah that's kind of what I want... when I comment out polling it's super smooth |
08:33:48 | FromDiscord | <Cohjellah> IS there really absolutely no way to read the line just above the cursor? |
08:34:07 | FromDiscord | <Cohjellah> because I can just echo what the user is writing, copy that line, erase it and then write it after the message received is pasted |
08:34:11 | mipri | what do you even by "read the line" there? |
08:34:21 | FromDiscord | <Cohjellah> copy it, receive it as input |
08:34:27 | FromDiscord | <Cohjellah> read it from the terminal and put it into a variable |
08:34:34 | mipri | no. what's displayed on the terminal isn't something you can read from. |
08:34:38 | FromDiscord | <Cohjellah> hmm |
08:34:42 | mipri | you can read user input, and you can print to the terminal. that's it. |
08:34:42 | FromDiscord | <Cohjellah> ok so getCh is very necessary |
08:34:43 | FromDiscord | <Cohjellah> sad times |
08:34:57 | FromDiscord | <Cohjellah> Thank you for clearing that up for me |
08:35:20 | mipri | 'man console_codes' will tell you about a lot of interesting commands that you can send, and that even extends to input 'from the terminal' with some queries, but there's absolutely no reading what's on the screen. |
08:35:35 | FromDiscord | <Cohjellah> strange |
08:35:55 | FromDiscord | <Cohjellah> Ok. So is there a better way to do what I'm doing above? Perhaps first task to tackle is the fact that it's not really thread safe |
08:36:00 | mipri | yes. use ncurses. |
08:36:02 | FromDiscord | <Cohjellah> if I spam multiple keys it puts them in weird orders |
08:36:05 | FromDiscord | <Cohjellah> ncurses |
08:36:05 | FromDiscord | <Cohjellah> ok |
08:36:53 | mipri | you probably don't really have a problem with thread safety. You're probably just interacting very strangely with the terminal. |
08:37:38 | FromDiscord | <Cohjellah> I'd think it's a thread problem because I'm spawning multiple threads with every key I press and then it pauses at polling so when it returns to the top of the loop, whatever thread beats the other prints first |
08:37:42 | FromDiscord | <Cohjellah> That's what I'd assume anyway |
08:37:52 | mipri | the non-ncurses way to do this is to save cursor location and set the scrolling region every single time you output to the terminal so that you're printing above where the user will be typing, then restore cursor location and set scrolling region to only where the user is typing. |
08:37:53 | FromDiscord | <Cohjellah> because without polling it's 100% smooth and there's no characters going into weird places |
08:38:29 | mipri | logical deducation really requires more understanding of the problem that you have here. |
08:38:33 | mipri | *deduction |
08:38:40 | FromDiscord | <Cohjellah> Amen |
08:39:17 | FromDiscord | <Cohjellah> Yeah that solution is interesting |
08:39:25 | FromDiscord | <Cohjellah> HMM |
08:39:47 | mipri | do a few exercises with ncurses to learn it, then make a UI with a separate input area. It's a very, very common use of ncurses and it'll work well in a lot of edge cases where even a very polished ad-hoc solution with getch and console codes will screw up. |
08:40:10 | mipri | and you can have all the interactions with ncurses in a dedicated UI thread. |
08:40:29 | FromDiscord | <bark> doesn't ncurses use character codes inside? |
08:41:00 | mipri | I don't know what you're asking with that. |
08:41:17 | FromDiscord | <Cohjellah> I really don't understand this ncurses. So it's a library for C |
08:41:28 | FromDiscord | <Cohjellah> so I'll need to find exactly what I'm looking for, read it in C and interpret it into Nim? |
08:41:35 | FromDiscord | <bark> isn't ncurses just doing what you described in the non-ncurses solution in the inside? |
08:41:44 | FromDiscord | <bark> there are ncurses bindings @Cohjellah |
08:41:51 | mipri | ncurses doesn't have its own special snowflake access to the terminal, right. |
08:43:03 | FromDiscord | <bark> https://github.com/rnowley/nim-ncurses is the main ncurses binding for nim, right? |
08:43:28 | FromDiscord | <bark> also, does ncurses might not work on windows |
08:43:33 | FromDiscord | <bark> (edit) removed "does" |
08:43:54 | FromDiscord | <Cohjellah> Interesting |
08:44:09 | mipri | uh, going along with ncurses indeed doing the same stuff you would do with scrolling regions et al., is that those also won't work on windows |
08:44:39 | mipri | although there are Unix-like terminals for windows. |
08:45:08 | FromDiscord | <Cohjellah> Haha okay so I Can't use that solution then anyway |
08:45:30 | mipri | what? why were you even considering a terminal UI for windows? |
08:45:52 | FromDiscord | <Cohjellah> This is literally a dead simple fun project that I can put on a server and have a few chats with friends before I don't touch it again ahaha |
08:45:54 | FromDiscord | <Cohjellah> it's not even a UI |
08:45:59 | FromDiscord | <Cohjellah> it's just a simple I type, they receive |
08:46:01 | FromDiscord | <Cohjellah> I mean it's a UI |
08:46:02 | mipri | it is, in fact, a UI. |
08:46:05 | FromDiscord | <bark> I'd personally keep a representation of the terminal screen in memory (let's call it buffer), and write to the buffer. The buffer could keep all the changes inside. And every time there's a wait for an event, just redraw all the changes. |
08:46:05 | FromDiscord | <Cohjellah> but I Don't want it to be super crazy |
08:46:15 | FromDiscord | <bark> TUI = terminal user interface |
08:46:20 | FromDiscord | <bark> ;) |
08:47:20 | mipri | well, here is the lazy way to do it: open two terminals. use one for output from your program, and use the other for input to your program. Now you can go back to readLine and not having to any terminal-UI stuff like ncurses or getch. |
08:47:26 | * | vicfred joined #nim |
08:48:18 | FromDiscord | <Cohjellah> Well, if I Can't get past getCh I might just try the lazy |
08:48:37 | FromDiscord | <Cohjellah> But I'll keep tinkering with the getCh solution for now |
08:48:49 | FromDiscord | <Cohjellah> Need to read more on the threading library because I'm probably doing something wrong |
08:48:53 | mipri | if you're still considering using getch when you don't know how terminals work or why getch has all the code it's doing and are balking at ncurses when that's enormously easier than getch, then... |
08:49:21 | FromDiscord | <Cohjellah> Well, this is helping me learn how terminals work |
08:49:23 | FromDiscord | <bark> ncurses and easy in the same sentence :O |
08:49:36 | mipri | five seconds ago: haha this just a lazy little program I don't want to do much |
08:50:27 | mipri | ncurses is easy as soon as you want to do anything hard. |
08:50:41 | FromDiscord | <Cohjellah> Correct - the current implementation is working, but I have two problems. Lag, funky character placements, need to pass a changing variable to an async'd procedure which I'm not sure how |
08:50:51 | mipri | getch is good for Tetris in Terminals where you clear the screen on every single refresh and just want arrow key input. |
08:50:55 | FromDiscord | <Cohjellah> But just above it was said I can't use ncurses for Windows? |
08:51:17 | FromDiscord | <Cohjellah> (edit) "Correct - the current implementation is working, but I have two problems. Lag, funky character placements, ... need" added "and I" |
08:51:36 | FromDiscord | <Cohjellah> Actually might have a solution to my changing variable passing to the procedure. |
08:51:46 | FromDiscord | <bark> you can, but you'd need to install ncurses and have a terminal emulator compatible with it |
08:52:29 | FromDiscord | <Cohjellah> Interesting. Thank you Bark and Mipri for your assistance |
08:52:38 | FromDiscord | <Cohjellah> going down a weird rabbit hole, but I'm learning things. |
08:53:13 | FromDiscord | <Cohjellah> Also yes, a lazy little program where I don't want interesting terminal graphics, colours, whatever. Just to have the user input not be ruined by received messages |
08:53:55 | FromDiscord | <bark> what about my buffer solution? |
08:54:04 | FromDiscord | <Cohjellah> Not sure how to implement, but will look into it |
08:54:18 | FromDiscord | <Cohjellah> I wanted your solution originally |
08:54:23 | FromDiscord | <Cohjellah> but Mipri said there's no way to read the terminal |
08:54:25 | FromDiscord | <Cohjellah> only write to it |
08:54:56 | FromDiscord | <Cohjellah> Oh |
08:54:59 | FromDiscord | <Cohjellah> I see what you mean |
08:55:19 | FromDiscord | <Cohjellah> INTERESTING that sounds kind of fun too |
09:01:57 | FromDiscord | <bark> can I add you as friend and DM you my solution Cohjellah? just for fun, I've kinda became interested |
09:02:09 | FromDiscord | <Cohjellah> ❤️ |
09:02:12 | FromDiscord | <bark> @Cohjellah |
09:02:28 | FromDiscord | <bark> thanks |
09:06:32 | FromDiscord | <Rika> Might help to look at tui spinner and progress bar libraries because they do some funky shit on the terminal as well |
09:15:25 | * | klaufir_ joined #nim |
09:25:02 | * | letto_ quit (Quit: Konversation terminated!) |
09:25:39 | * | letto joined #nim |
09:29:16 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:34:11 | * | vicfred quit (Quit: Leaving) |
09:38:19 | * | saem quit (Remote host closed the connection) |
09:53:58 | * | Arrrrrrrr joined #nim |
10:05:11 | * | NimBot joined #nim |
10:48:00 | * | NimBot joined #nim |
10:51:04 | * | Torro joined #nim |
10:52:23 | FromDiscord | <alehander42> merry Christmas ❤️ |
10:52:49 | FromDiscord | <alehander42> how are you gius |
10:52:52 | FromDiscord | <alehander42> guys |
10:56:00 | * | waleee-cl joined #nim |
11:00:02 | FromDiscord | <Ardek> merry Christmas |
12:30:38 | FromDiscord | <Cohjellah> What time is it in America land? |
12:30:50 | * | PMunch joined #nim |
12:36:59 | Zevv | America Land is a Great Country |
12:37:04 | Zevv | It has soo many times |
12:37:10 | Zevv | It has the most times of any country in the world |
12:37:40 | PMunch | Merry Christmas everyone :) |
12:37:57 | Zevv | Same to you PMunch! |
12:38:00 | PMunch | Going to stream my two last days of AoC now if anyone is up for it |
12:38:18 | Zevv | remember kids, bees also live in a 3D world |
12:38:27 | PMunch | Haha, what? :P |
12:38:38 | FromDiscord | <bark> they also live in minecraft? |
12:38:42 | FromDiscord | <bark> good to know |
12:38:51 | Zevv | Just a slice of minecraft, actually |
12:39:04 | PMunch | @bark, well Minecraft actually has bees now |
12:39:36 | PMunch | https://www.twitch.tv/pmunche https://www.youtube.com/watch?v=iw34Ya2raOM |
12:40:02 | * | bananaapple quit (Quit: leaving) |
12:40:24 | FromDiscord | <bark> im watching the stream, but I don't have a youtube account to chat :'( |
12:40:51 | PMunch | Don't worry, you can chat to me here |
12:44:56 | FromDiscord | <Shucks> I'm trying to pass openArray's to `write`. This doesn't works because openArrays doesn't have the size of regular arrays. Anyone a idea how I could solve that? https://play.nim-lang.org/#ix=2Jug |
12:47:23 | FromDiscord | <mratsim> use len, not sizeof |
12:47:36 | FromDiscord | <mratsim> the size of an openarray is 16 (ptr + len) |
12:47:51 | FromDiscord | <mratsim> @Shucks |
12:47:56 | * | narimiran quit (Ping timeout: 240 seconds) |
12:49:45 | FromDiscord | <Shucks> len would work in that case for bytes. But if I would pass an openArray[float32] with 3 floats it should be 12 not 3 |
12:51:11 | mipri | .len * float32.sizeof |
12:53:24 | FromDiscord | <mratsim> sizeof(T) len is what every C library does in malloc |
12:54:56 | FromDiscord | <Shucks> https://play.nim-lang.org/#ix=2Juo |
12:54:58 | FromDiscord | <Shucks> thanks guys |
13:07:19 | * | Torro quit (Quit: bye) |
13:15:10 | * | Torro joined #nim |
13:45:51 | FromGitter | <deech> Long shot, but does Nim have a "read-only" `ptr`? That's a pointer address you can deference but not assign to? |
13:46:55 | FromGitter | <deech> Think maybe I could wrap it up in a `distinct` type and not support assignment. |
13:48:08 | disruptek | not sure that would work, but i would try it. |
13:48:54 | disruptek | the user could simply cast it to another pointer and assign that. |
13:49:50 | disruptek | that reminds me of another addition to my style guide: |
13:49:55 | FromGitter | <deech> I guess that expires the warrany. |
13:50:05 | disruptek | you can't create distinct tuples. |
13:51:39 | FromDiscord | <bark> why is that any good |
13:51:54 | disruptek | what? |
13:52:16 | FromDiscord | <bark> I don't know why would distinct tuples be a problem for readability |
13:52:30 | FromDiscord | <haxscramper> Because they can't be unpacked, so just use object instead |
13:52:31 | disruptek | it's not a readability issue. |
13:52:38 | disruptek | they don't work. 😁 |
13:53:25 | disruptek | my tuples section advises against using them for most cases. |
13:53:31 | FromDiscord | <bark> is it possible to borrow the unpacking? 🤔 |
13:53:39 | FromDiscord | <haxscramper> not sure, probably no |
13:53:42 | Zevv | i only use tuples when i want to be quick&dirty |
13:53:52 | FromDiscord | <haxscramper> I use tuples for multiple return values |
13:53:53 | Zevv | or for multiple assignment |
13:54:11 | Zevv | let (a,b) = (10,30) |
13:54:37 | disruptek | i guess i should note that deconstruction assignment is fair game. |
13:55:44 | FromDiscord | <haxscramper> I think if you return tuple from function/iterator is is almost mandatory for it to not be anonymous |
13:57:13 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2JuH |
13:57:50 | disruptek | i don't have dns right now. what does it say? |
13:57:56 | FromDiscord | <haxscramper> With pattern matching from fusion you should be able to write custom unpackers though |
13:58:01 | FromDiscord | <bark> proc getFields(declEn: CDecl, conf: WrapConfig): tuple[↵ namedvals: Table[string, BiggestInt],↵ enfields: seq[tuple[name: string, value: Option[EnFieldVal]]]↵ ] = |
13:58:04 | disruptek | yeah, that's madness. |
13:58:49 | FromDiscord | <bark> i am thinking, is there any benefit to using tuples over objects for anything, if you're not allowed to unpack |
13:58:55 | FromDiscord | <haxscramper> https://github.com/haxscramper/fusion/blob/matching/tests/tmatching.nim#L1318 |
13:58:57 | disruptek | i do define `type KeyVal = tuple[key: ...; val: ...]` but.. |
13:59:02 | disruptek | that's about it. |
13:59:22 | FromDiscord | <haxscramper> You don't need to define named tuple, and you /can/ unpack single layer |
13:59:40 | FromDiscord | <haxscramper> This is precisely what I'd want to use tuples for |
13:59:41 | FromDiscord | <bark> yeah, but besides from multiple return values |
13:59:53 | disruptek | not really, no. |
14:00:04 | FromDiscord | <haxscramper> When you need one-time grouping for several different types |
14:00:08 | * | theelous3 joined #nim |
14:00:14 | FromDiscord | <bark> I guess you don't need to define which parts of it are public |
14:00:34 | disruptek | the subtle benefits, if any, are outweighed by the meatspace problems. |
14:00:43 | FromDiscord | <haxscramper> Like tuples are a throwaway concept really, if you find yourself using them too much |
14:00:59 | Zevv | so, lets deprecate |
14:01:15 | FromDiscord | <haxscramper> E.g making tuples that live through multiple layers of code, just use proper object |
14:01:40 | FromDiscord | <haxscramper> Especially with support for custom unpackers |
14:01:45 | disruptek | they might have a role to play in the "partial object" optimization, i dunno. |
14:02:16 | disruptek | i think education is the best solution. |
14:05:56 | * | Q-Master quit (Ping timeout: 240 seconds) |
14:19:11 | FromDiscord | <mratsim> @disruptek, @zevv, ergonomics discussion: https://github.com/disruptek/cps/discussions/42 |
14:21:10 | * | PMunch quit (Quit: leaving) |
14:21:50 | FromDiscord | <Vindaar> @deech that's also the idea behind https://github.com/mratsim/Arraymancer/blob/master/src/arraymancer/laser/tensor/datatypes.nim#L19 |
14:22:21 | * | kenran joined #nim |
14:27:27 | FromDiscord | <mratsim> I wonder if I can use `distinct openarray` and `distinct var openarray` now. |
14:27:43 | FromDiscord | <mratsim> Want to crash the compiler @Vindaar ? :p |
14:32:42 | * | Q-Master joined #nim |
14:37:20 | FromDiscord | <Vindaar> of course, always! |
14:44:26 | FromDiscord | <CodeHz> what's the purpose of the generic macro, is this useless? https://media.discordapp.net/attachments/371759389889003532/792040060912140288/unknown.png |
14:53:10 | FromDiscord | <mratsim> don't use generics macros |
14:53:48 | FromDiscord | <haxscramper> https://play.nim-lang.org/#ix=2Jv6 |
14:53:57 | FromDiscord | <mratsim> if you have to, here be dragons (note, I do use them but in one case out of all the macro code I wrote) |
14:54:16 | Torro | Happy holidays all |
14:54:18 | * | Torro left #nim ("bye") |
14:54:18 | FromDiscord | <haxscramper> Something like this, though I never needed to use, and there are some very strange things going on with them as @mratsim just said |
14:55:09 | FromDiscord | <mratsim> macro can handle generic and typedesc argument, though it's sometimes tricky to navigate, so generics macro are seldom useful |
15:07:59 | * | Vladar joined #nim |
15:15:42 | FromDiscord | <sealmove> happy holidays everyone |
15:15:56 | FromDiscord | <mratsim> sent a long message, see http://ix.io/2Jvw |
15:36:27 | Oddmonger | can you define colors with illwill lib ? |
15:36:40 | Oddmonger | i see only terminal colors in the doc |
15:37:45 | * | habamax quit (Ping timeout: 240 seconds) |
16:09:19 | * | narimiran joined #nim |
16:21:34 | FromDiscord | <mratsim> @oddmonger, terminals have broken color scheme |
16:22:46 | Oddmonger | i mean, only color definition for 16 colors |
16:22:59 | ForumUpdaterBot | New post on r/nim by cincilator: I think Nim community should focus more on Godot engine., see https://www.reddit.com/r/nim/comments/kk1k7s/i_think_nim_community_should_focus_more_on_godot/ |
16:23:35 | Oddmonger | well, if he thinks so… |
16:24:36 | FromDiscord | <mratsim> I remember looking into light blue cyan magenta and others |
16:24:50 | FromDiscord | <mratsim> and the color scheme was completely different between powershell and bash |
16:25:10 | Oddmonger | for illwill, i was thinking defining its own colors was maybe possible (reading the documention), but then i've read that: https://github.com/johnnovak/illwill/issues/16 |
16:25:11 | disbot | ➥ Support wide characters and true color |
16:26:07 | Oddmonger | maybe i could send myself escape sequences, for at least linux support |
16:26:57 | FromDiscord | <mratsim> ah I forgot to save the webpage I use with the color comparison between terminals |
16:27:00 | Oddmonger | mratsim : even in linux, you have color differences if you use 256 colors indexing mode |
16:27:17 | FromDiscord | <mratsim> spent a lot of time trying to have something that was OK for logging here: https://github.com/status-im/nim-chronicles/pull/89 |
16:27:18 | disbot | ➥ update color scheme |
16:28:45 | Oddmonger | nim-chronicles : nice name for a logger |
16:29:30 | Oddmonger | but anyway, my #1 problem for now is to output wasm bytecode from nim |
16:29:50 | Oddmonger | which is another story |
16:39:25 | FromDiscord | <mratsim> https://github.com/status-im/nimplay |
16:39:42 | * | NimBot joined #nim |
16:40:01 | FromDiscord | <mratsim> don't ask me the full inner stuff but it does output WASM |
16:40:15 | FromDiscord | <mratsim> otherwise there is emscipten and clang WASM flag |
16:41:00 | FromDiscord | <mratsim> https://github.com/status-im/nimplay/blob/master/Makefile#L5-L19 |
16:43:40 | Oddmonger | mratsim, thank you. And just for you, my last procrastination: for ((r=0; r<255; r+=10)); do for ((g=0; g<255; g+=10)); do for ((b=0; b<255; b+=10)); do printf "\033[48;2;${r};${g};${b}m "; done; done; done |
16:44:00 | Oddmonger | i think illwill will accept this |
16:44:41 | Oddmonger | i'm using alacritty terminal, i don't think the above will work with urxvt |
16:45:23 | Oddmonger | ah nimplay is using nlvm for compiling |
16:45:27 | Oddmonger | to wasm |
16:48:17 | Oddmonger | i was more thinking of something like this (i've just found this, otherwise i wouldn't have asked here before trying): https://github.com/nim-lang/Nim/issues/8713#issuecomment-586028783 |
16:48:17 | disbot | ➥ Add Emscripten compiler support |
16:52:48 | FromGitter | <deech> Vindaar: Nice! Can I ask why you're using `distinctBase` instead of `{.borrow.}`? |
16:58:38 | * | habamax joined #nim |
17:16:18 | FromDiscord | <mratsim> @oddmonger you have multiple script, nlvm or clang or others I think |
17:17:29 | FromDiscord | <mratsim> @Zevv, starting from this time this is quite interesting: https://youtu.be/KUhSjfSbINE?t=1460↵there are 5 min about the problem I have in Weave that continuation solve in a cleaner way than a memory pool.↵And it's directly followed by CSP and rendez-vous channels. |
17:17:48 | FromDiscord | <mratsim> (at the 26min mark) |
17:19:29 | FromDiscord | <mratsim> 30 nanosec to push a number across 100M coroutines using CSP 😮 |
17:19:50 | FromDiscord | <mratsim> I think he meant microsec though because nanosec sounds crazy low |
17:20:27 | disruptek | it doesn't really matter; the point is that there's nothing comparable. i try to explain this but it's like i'm talking to myself. |
17:20:33 | FromDiscord | <mratsim> ah 30 nanosec per step |
17:22:03 | FromDiscord | <mratsim> @disruptek, nothing comparable to continuations? I think that's because you didn't use the relevant examples |
17:22:30 | disruptek | it's possible. |
17:22:34 | FromDiscord | <mratsim> coroutines can get you very far and closure iterators are very similar to coroutines |
17:22:57 | FromDiscord | <mratsim> I have put relevant examples here: https://github.com/disruptek/cps/discussions/42 |
17:23:14 | disruptek | i'm just finishing my rebuttal. 😀 |
17:26:53 | disruptek | what i care about is composition ergonomics; this is the main problem i have with the coroutines i've used. |
17:27:13 | disruptek | i don't use nim because it's fast. if i wanted speed, i'd use C. |
17:28:25 | disruptek | why don't you use C instead, by the way? |
17:30:38 | FromDiscord | <mratsim> When I want speed, Nim allows me to be faster than C |
17:31:17 | FromDiscord | <mratsim> whether in cryptography or scientific computing, my Nim code reaches Assembly speed. |
17:31:45 | FromDiscord | <mratsim> ref don't compose |
17:32:04 | FromDiscord | <mratsim> you can't use them in no GC environment, you can't pass them to C libraries |
17:32:15 | FromDiscord | <mratsim> you can't use a custom allocator with them when you want them on the heap |
17:32:33 | disruptek | they don't compose /for your application/. |
17:32:37 | FromDiscord | <mratsim> they give you convenience, they don't give you composition |
17:32:40 | disruptek | they compose perfectly well for me. |
17:32:58 | disruptek | convenience is the reason i use nim. |
17:33:28 | FromDiscord | <mratsim> as i said, put the object in a ref object of RootObj in your scheduler |
17:33:29 | disruptek | anyway, i don't need a custom allocator to put them on the heap. |
17:33:42 | FromDiscord | <mratsim> and then you have the same semantics. |
17:34:00 | disruptek | as i said, write the code. 😉 |
17:34:06 | disruptek | then i'll have the same semantics. |
17:34:28 | disruptek | because, at present, i have the same semantics if i just continue to use the cps that already exists today. |
17:34:59 | disruptek | let us not bikeshed that which doesn't even exist. it's a poor practice in the nim community. |
17:36:26 | FromDiscord | <mratsim> So what scheduler do you want me to write exactly? |
17:36:48 | disruptek | i don't care. i think you want to use work-stealing. is that wrong? |
17:36:52 | FromDiscord | <mratsim> because for my purpose, I know I can adapt Weave for my needs with continuation |
17:37:00 | disruptek | sweet. |
17:37:08 | disruptek | i think weave is good stuff and i look forward to using it with cps. |
17:37:12 | FromDiscord | <mratsim> I plan to write a PoC for IO with continuation as well |
17:37:28 | FromDiscord | <mratsim> but I don't understand your ergonomics for your own scheduler? |
17:37:48 | disruptek | what do you mean? |
17:38:31 | FromDiscord | <mratsim> You mention limitations in the compiler and doubt we can achieve what you can with a ref object of RootObj, if I use a plain object and wrap it in a ref object of RootObj |
17:39:02 | FromDiscord | <mratsim> also regarding↵> Uh, no. The point of arc is reference counting. It's a garbage-free garbage collector, as Microsoft calls it. Don't conflate arc, GC, the heap, and the stack and think that no one is going to notice. laughing↵↵I disagree, one of the main draw of arc is to remove the need of --gc:none. |
17:39:04 | disruptek | if you wrap it, it's practically the same from a scheduler perspective, right? |
17:39:27 | FromDiscord | <mratsim> and make the standard library that uses string and seq widely, usable in most contexts. |
17:39:32 | * | theelous3 quit (Read error: Connection reset by peer) |
17:39:47 | FromDiscord | <mratsim> Yes if you wrap it it's the same from a scheduler perspective. |
17:40:36 | FromDiscord | <mratsim> but you have an escape hatch when your scheduler or use-case requires you not to use the heap. |
17:41:01 | disruptek | i need cps to compose my continuations correctly without regard to changing data types; for example, i want to throw away a large continuation and return a smaller one. |
17:41:05 | FromDiscord | <mratsim> this is basically splitting memory management from CPS and give people flexibility on that. |
17:41:14 | disruptek | as i said, i'm in favor of it. |
17:41:23 | disruptek | but i'm not willing to put the time in on the development. |
17:41:40 | disruptek | i really don't have time for this. i couldn't pay my phone bill last month. |
17:41:47 | FromDiscord | <mratsim> so, if I change main.nim and eventqueue that's OK? |
17:41:48 | disruptek | i need paying work. |
17:41:57 | disruptek | of course. i trust your work. |
17:42:04 | FromDiscord | <mratsim> I think those are the last one to compile. |
17:42:07 | disruptek | you can change anything you want in the project. |
17:42:19 | FromDiscord | <mratsim> well really it's a very minimal change, I would be surprised if it takes more than 20 lines |
17:42:38 | disruptek | good. i don't want to waste your time, either. |
17:42:52 | FromDiscord | <mratsim> the change to {.union.} is more invasive but that's not needed for the "ref based scheduler" |
17:43:18 | FromDiscord | <mratsim> also one limitation of union currently is that {.union.} are broken on javascript. |
17:43:42 | disruptek | yeah, that's a problem, too. |
17:43:48 | FromDiscord | <mratsim> well you trust my code but I still don't understand 80% of what is going on in the codebase |
17:44:10 | disruptek | we had some false starts and rewrites; it's not as clean as it could be. |
17:44:36 | FromDiscord | <mratsim> one question i had is, can try/finally wrap a suspension point/cps call? |
17:44:52 | disruptek | wrap it? no. |
17:44:52 | FromDiscord | <mratsim> because in C++ or Kotlin, don't remember, they forbid that for their coroutines. |
17:45:06 | disruptek | but you can always do it. |
17:45:09 | FromDiscord | <mratsim> and in Chronos we have issues with try/finally |
17:45:16 | FromDiscord | <mratsim> around yield |
17:45:32 | FromDiscord | <exelotl> heyy is it possible to make a table mapping NimNodes to NimNodes? |
17:45:34 | disruptek | i mean, it can be done. it just takes a shimming rewrite. |
17:45:47 | FromDiscord | <mratsim> okay, so it's not a fundamental limitation |
17:45:49 | disruptek | similar to how `let x = cpsCall()` works. |
17:45:53 | FromDiscord | <mratsim> @exelotl yes |
17:45:58 | disruptek | yes, we "can do it". |
17:46:28 | * | a_chou joined #nim |
17:46:47 | FromDiscord | <mratsim> here you go: https://github.com/mratsim/compute-graph-optim/blob/master/e07_part1_var_ADTs_tables.nim#L5-L13 |
17:47:48 | FromDiscord | <exelotl> ah I need to make my own hash for syms then (since I want to map syms to syms instead of idents to idents) |
17:47:56 | FromDiscord | <mratsim> yes |
17:48:11 | FromDiscord | <exelotl> cheers |
17:48:18 | FromDiscord | <mratsim> that said, since then Nim added a proc to derive an unique identifer from a NimNode |
17:48:28 | disruptek | exelotl: hey, did you catch covid? |
17:48:46 | FromDiscord | <exelotl> nooo not afaik |
17:49:09 | disruptek | hmm, there's someone in your neck of the woods that i think got sick but i can't remember who it was. |
17:50:01 | FromDiscord | <exelotl> hmm I hope they're okay :s |
17:50:11 | FromDiscord | <exelotl> oh yeah thanks for pointing me at nimcrypto the other day, it seems great |
17:50:18 | disruptek | oh, good. |
17:50:30 | disruptek | it's pretty stable. |
17:51:49 | FromDiscord | <mratsim> not that for cryptosecure RNG we don't use the one in nimcrypto |
17:51:56 | FromDiscord | <mratsim> we switched to BearSSL |
17:52:31 | disruptek | right, that's why. |
17:53:09 | FromDiscord | <mratsim> for example to generate private keys for crypto: https://github.com/status-im/nim-libp2p/blob/0f2435f551ab6d947d1927c6eef373eef435c942/libp2p/crypto/secp.nim#L37-L42 |
17:53:22 | FromDiscord | <mratsim> I'm not fan of the callback but well ... |
17:53:37 | FromDiscord | <mratsim> That said, nimcrypto's RNG has been audited as well |
17:54:42 | * | a_chou quit (Remote host closed the connection) |
17:55:26 | FromDiscord | <exelotl> I just wanted to use it for salting + hashing passwords for "my first notes app" so I'm not super worried about the RNG |
17:55:37 | FromDiscord | <exelotl> if it just uses whatever the OS provides that's fine by me |
18:19:59 | FromDiscord | <exelotl> https://play.nim-lang.org/#ix=2JwA man this error message sucks xD |
18:20:30 | FromDiscord | <exelotl> it should be "unexpected )" |
18:26:55 | FromDiscord | <Vindaar> @deech: tbh I'm not sure. @mratsim wrote that code (I only made some changes to the file on a PR). I assume it might be because `[]` should be a template instead of a proc? Or that `[]` for `ptr UncheckedArray` cannot be borrowed? |
18:39:42 | FromDiscord | <mratsim> what was the question? |
18:45:34 | FromDiscord | <Filipe Duarte> Hey guys, why use ’’ after proc’s name? Is this related to the reference? |
18:46:22 | FromDiscord | <Rika> export marker |
18:48:10 | * | vicfred joined #nim |
18:49:28 | * | hnOsmium0001 joined #nim |
18:49:46 | FromDiscord | <Filipe Duarte> I’m new to Nim and do not understand this concept. When should I use it? |
18:51:58 | FromDiscord | <Filipe Duarte> (edit) I’m new to Nim and do not understand this concept. When should I use it? Used for export the procedure? |
18:53:02 | FromDiscord | <Filipe Duarte> (edit) I’m new to Nim and do not understand this concept. When should I use it? to export the procedure? |
18:53:34 | FromDiscord | <haxscramper> yes |
18:53:36 | FromDiscord | <mratsim> if you want the procedure to be public |
18:53:44 | FromDiscord | <mratsim> usable from other files |
18:54:13 | FromDiscord | <Filipe Duarte> So are the procedures private by default? |
18:54:17 | FromDiscord | <mratsim> yes |
18:54:28 | FromDiscord | <mratsim> types and fields as well |
18:54:33 | FromDiscord | <Filipe Duarte> Thanks |
19:04:35 | FromDiscord | <dk> is there an obvious way to refer to a manually cloned lib as `import lib` instead of `import lib/src/lib`? |
19:13:19 | FromDiscord | <haxscramper> IIRC you can use `--path:lib/src`, and if you have `project/src/project.nim` it should just be able to `import project` without any additional effort |
19:15:20 | ForumUpdaterBot | New thread by Jseb: Terminal.nim says i don't have a true color term (but it's wrong), see https://forum.nim-lang.org/t/7291 |
19:29:06 | FromDiscord | <dk> ty |
19:47:35 | * | klaufir_ quit (Read error: Connection reset by peer) |
19:50:12 | FromDiscord | <Vindaar> @mratsim it was about the raw view types / why they use `[]` templates with `distinctBase` instead of just using `{.borrow.}` on the originals `[]` |
19:53:01 | * | habamax quit (Ping timeout: 264 seconds) |
20:11:19 | * | kenran quit (Quit: leaving) |
20:15:25 | * | Vladar quit (Read error: Connection reset by peer) |
20:19:39 | ForumUpdaterBot | New thread by D3zd3z: Making a closure iterator out of a non-closure one, see https://forum.nim-lang.org/t/7292 |
20:24:45 | * | qwr joined #nim |
20:28:15 | * | qwr quit (Client Quit) |
20:30:54 | FromDiscord | <Deleted User 5bd78114> Okay, so, I could write a C compiler that compiles C files to JVM byteco de, in Nim, right? Asking for a friend - |
20:31:19 | FromDiscord | <Recruit_main707> you could |
20:31:39 | FromDiscord | <Deleted User 5bd78114> Nice, this'll be a hell of a project- |
20:32:10 | FromDiscord | <Recruit_main707> does the jvm allow you to manage your own memory? |
20:32:18 | FromDiscord | <Recruit_main707> raw pointers etc? |
20:32:24 | FromDiscord | <Deleted User 5bd78114> Pretty sure it does |
20:32:28 | FromDiscord | <Deleted User 5bd78114> I can't remember |
20:37:36 | * | qwr joined #nim |
20:37:44 | FromDiscord | <Deleted User 5bd78114> I'm going to hate myself so much- |
20:38:19 | FromDiscord | <Deleted User 5bd78114> Is this good for my college portfolio? |
20:42:37 | disruptek | yeah; colleges love self-loathing, ironically. |
20:45:24 | FromDiscord | <shadow.> uhhhh |
20:45:27 | FromDiscord | <shadow.> debatable |
20:45:40 | FromDiscord | <shadow.> maybe something more useful would be better for a portfolio 💀 |
20:46:15 | FromDiscord | <shadow.> said differently, why would someone want jvm byecode from c |
20:48:17 | FromDiscord | <ElegantBeef> Especially since you want minecraft mods, it just makes more sense to work on a backend to output java code, than use C -> jvm |
20:48:43 | FromDiscord | <shadow.> oh this is for mc mods? |
20:48:50 | FromDiscord | <ElegantBeef> That was their intent as of last night |
20:48:53 | FromDiscord | <shadow.> why not make a java backend for nim then? |
20:48:56 | FromDiscord | <shadow.> that'd be sick |
20:48:58 | FromDiscord | <shadow.> lol |
20:49:07 | * | narimiran quit (Ping timeout: 265 seconds) |
20:52:09 | FromDiscord | <Filipe Duarte> Guys, another question: what's the role of {.final.} @mratsim have this example. Also, ref object of Gate[TT] is the reference for this object? https://media.discordapp.net/attachments/371759389889003532/792132596187267084/image0.png |
20:52:40 | FromDiscord | <ElegantBeef> Final means it cannot be inherited from |
20:52:55 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/manual.html#pragmas-final-pragma |
20:53:44 | FromDiscord | <ElegantBeef> `object of` is inheritance, `ref` means it's a reference object at `Gate[TT]` is what it |
20:53:51 | FromDiscord | <ElegantBeef> 's inheriting from |
20:54:42 | FromDiscord | <Filipe Duarte> Which means it only works for Gate objects? |
20:54:52 | FromDiscord | <ElegantBeef> No |
20:55:09 | FromDiscord | <ElegantBeef> `object of` means it inherits the fields of the parent object |
20:55:25 | FromDiscord | <ElegantBeef> it being a ref means it also can use the methods/procs of the parent object |
20:55:45 | FromDiscord | <ElegantBeef> (edit) "object" => "object, without manual conversion afaik" |
20:55:59 | FromDiscord | <ElegantBeef> What other language do you know? |
20:58:01 | FromDiscord | <Filipe Duarte> Is it works like Python Inheritance? Parent classes? |
20:58:10 | FromDiscord | <ElegantBeef> Yes it's inheritance |
20:58:21 | FromDiscord | <ElegantBeef> `object of T` means the object is inheriting from T |
20:58:47 | FromDiscord | <ElegantBeef> `ref` tells you it's reference object which means it lives on the heap |
20:59:05 | FromDiscord | <ElegantBeef> So like C#/Java classes |
21:00:02 | FromDiscord | <Filipe Duarte> I have to study this reference object. I understand the ”object of” |
21:01:17 | FromDiscord | <Filipe Duarte> it seems interesting for me |
21:04:16 | FromDiscord | <ElegantBeef> Arent python objects reference types? |
21:04:19 | FromDiscord | <Avatarfighter> @Filipe Duarte reference objects work like python objects |
21:04:21 | FromDiscord | <Avatarfighter> yeah they are |
21:04:50 | FromDiscord | <ElegantBeef> Then yea, just like python objects you assign a variable it doesnt copy but shares the reference |
21:05:13 | FromDiscord | <ElegantBeef> non reference objects work like integers where they are copy on assign, and do not mutate the source |
21:05:31 | FromDiscord | <ElegantBeef> They're actually typically called value types |
21:07:29 | FromDiscord | <ElegantBeef> This should explain the difference https://play.nim-lang.org/#ix=2Jxi |
21:08:14 | FromDiscord | <ElegantBeef> Didnt realize this would've worked https://play.nim-lang.org/#ix=2Jxk |
21:16:31 | FromDiscord | <lqdev> it's actually not called a "reference object" but rather a traced pointer. noone prevents you from doing `ref int` if you really wanna |
21:16:54 | FromDiscord | <ElegantBeef> Well yea ref is the "managed pointer" keyword |
21:17:09 | FromDiscord | <lqdev> iirc the `ref` stands for "reference counted" but i personally think "reference to heap memory" is a better name |
21:17:43 | FromDiscord | <ElegantBeef> I just think of it as a fancy `ptr` 😄 |
21:19:46 | FromDiscord | <Goel> Is there any book or more references for NiGui? I would like to learn it to make a windows app but i don't know where to study it |
21:20:04 | FromDiscord | <ElegantBeef> https://github.com/trustable-code/NiGui/tree/master/examples |
21:20:08 | FromDiscord | <ElegantBeef> Closest you'll get |
21:20:15 | FromDiscord | <lqdev> @Goel sorry to say that but the state of Nim app development is pretty sad atm so don't expect great documentation |
21:20:56 | FromDiscord | <ElegantBeef> It's not that sad, as much as just requires you to dig around to figure out how things work |
21:21:08 | FromDiscord | <lqdev> it is sad |
21:21:17 | FromDiscord | <lqdev> docs aren't great and libraries are generally quite poor |
21:21:28 | FromDiscord | <lqdev> maybe with the exception of gintro but that thing is a beast |
21:21:42 | FromDiscord | <lqdev> it slows down compilation considerably |
21:26:45 | FromDiscord | <Goel> The examples given in NiGui are nice, i tried them all and they do exactly what i want, but when i try to make my own simple app there are always a lot of questions or stuff that i dont know how to handle. Maybe i should just study the basics of the GUI from some other book. Any suggestion? |
21:27:26 | FromDiscord | <ElegantBeef> For using nigui i can only suggest looking at the source code for what you're using to see what it does |
21:27:59 | FromDiscord | <Deleted User 5bd78114> I'm thinking of making a Java backend instead she since after thinking about it, it'd be a lot more useful to other people too |
21:28:49 | FromDiscord | <Deleted User 5bd78114> Is it something that people.would like? |
21:29:28 | FromDiscord | <mratsim> Ah, distinct is broken with generics, you can't borrow, if it was fixed it's only very recently |
21:30:56 | FromDiscord | <ElegantBeef> Being able to export JVM compatible code would interest someone i imagine |
21:31:45 | * | saem joined #nim |
21:33:25 | * | saem waves |
21:35:25 | FromDiscord | <Deleted User 5bd78114> Yeah, and probably with some extra functions for Java specific stuff |
21:35:25 | Clonkk[m] | <FromDiscord "<ElegantBeef> Being able to expo"> Graal VM has a LLVM run time |
21:35:45 | FromDiscord | <Deleted User 5bd78114> Oh I know GraalVM |
21:36:21 | FromDiscord | <ElegantBeef> Sure, but i dont see how that relates 😄 |
21:37:39 | FromDiscord | <Deleted User 5bd78114> We could just use clang to generate LLVM code |
21:37:46 | Clonkk[m] | Well with NLVM you can probably emit LLVM IR and run it with graal VM |
21:37:50 | Clonkk[m] | Or clang |
21:38:03 | FromDiscord | <ElegantBeef> Yea but that doesnt really help, when you want to have java code that can be relied on |
21:38:24 | FromDiscord | <ElegantBeef> Remember nisha's usecase is for minecraft mods |
21:38:39 | FromDiscord | <ElegantBeef> So have to be able to depend on/be depended on |
21:38:51 | Clonkk[m] | Ah I just thought you wanted to interact with Java. |
21:38:58 | FromDiscord | <Deleted User 5bd78114> Yeah |
21:39:00 | FromDiscord | <ElegantBeef> We've got jnim for that |
21:39:31 | FromDiscord | <Deleted User 5bd78114> I wanted to actually make a JVM backend because why not :3 |
21:39:43 | FromDiscord | <ElegantBeef> The nice thing about java is it's statically typed without anything overly complex so you could make a analyser to output bindings |
21:41:53 | FromDiscord | <haxscramper> There is a tree-sitter java parser https://haxscramper.github.io/htsparse/src/htsparse/java/java_wrapper.html#parseJavaString%2Cstring |
21:43:04 | FromDiscord | <haxscramper> For a split second I thought about recommending reading nimscript vm, but I remembered it is a register-based one, while jvm uses stack-based, so you'd probably need to change quite a lot of things if you were to take this approach |
21:47:11 | FromDiscord | <ElegantBeef> I mean you'd be better off looking at jsgen |
21:48:36 | FromDiscord | <Deleted User 5bd78114> Hm |
21:48:59 | * | Arrrrrrrr quit (Remote host closed the connection) |
21:49:05 | FromDiscord | <Deleted User 5bd78114> My end goal for this is for it to run most current Nim programs in Java |
21:49:36 | FromDiscord | <Deleted User 5bd78114> So like the Doom Nim reimplementation |
21:49:49 | FromDiscord | <Deleted User 5bd78114> And maybe other small programs |
21:50:21 | FromDiscord | <ElegantBeef> Only pure nim code should work |
21:50:28 | FromDiscord | <ElegantBeef> Anything that relies on libraries would require extra work |
21:50:42 | FromDiscord | <ElegantBeef> Your current goal should just be reading jsgen to understand how it works |
21:54:32 | FromDiscord | <Deleted User 5bd78114> I will! |
21:54:33 | * | Arrrrrrrr joined #nim |
22:04:39 | Prestige | saem: hey, I hear you're working on nimsuggest or editor support? |
22:05:51 | saem | Trying to. :D |
22:06:34 | Prestige | Any room for assistance? I'd like to help, with what I can |
22:06:58 | saem | VS Code Extension ported from TS to Nim + some miscellaneous improvements. Writing tests for nimsuggest so I can then start making changes with some hope of a regression test suite (https://github.com/nim-lang/Nim/pull/16401), right now I'm trying to figure out workspace/folder stuff |
22:06:58 | disbot | ➥ Saem nimsuggest re-enable tests |
22:07:13 | saem | I'd love help in improving tooling. |
22:07:39 | Prestige | Excellent |
22:08:06 | saem | Do you have something in mind or would you like to figure out "where to start?" |
22:10:00 | Prestige | No idea where to start yet, would just like to see editor support refined. I'm not super advanced with Nim yet, but if I could see a few issues maybe I'll be able do resolve a few |
22:11:05 | saem | Have you had a chance to read/skim the extension code base? https://github.com/saem/vscode-nim |
22:11:52 | Prestige | Nope (I use nvim) but I'll read through it when I get home, soon |
22:12:12 | Prestige | I can install vscode and try in out |
22:12:27 | Prestige | it*, phone typing is hard |
22:13:04 | FromDiscord | <ElegantBeef> Saem have you submitted your version to the OSS extensions place? |
22:13:04 | saem | Sounds good -- long term I'd like to see more inside a language server, especially for folks who like to work in other editors such as yourself, but it first needs a bunch of clean-up and refining. |
22:13:43 | saem | @ElegantBeef I have, I added links in the readme recently, you can find it here: https://open-vsx.org/extension/nimsaem/nimvscode |
22:13:53 | FromDiscord | <ElegantBeef> Ah nice |
22:13:55 | saem | aside, it has more downloads there than on VSCode marketplace |
22:14:11 | FromDiscord | <ElegantBeef> Probably cause there are 5 different nim extensions on vscodes 😄 |
22:14:38 | saem | That's definitely part of it. |
22:16:10 | FromDiscord | <ElegantBeef> I'm currently using the lsp extension but it doesnt like the compiler |
22:16:17 | FromDiscord | <ElegantBeef> Never actually survives |
22:17:15 | saem | The one written by bung? |
22:17:20 | FromDiscord | <ElegantBeef> Yea |
22:17:32 | FromDiscord | <ElegantBeef> The LSP seems to die with figuring out the compiler |
22:18:23 | saem | I've been meaning to look at that again, I think the whole way packages/artifacts are declared makes this stuff really tricky. Leaves too many things as implicit so without human intervention everywhere it's really hard for a tool to figure out the intention. |
22:18:33 | saem | Which code base is it dying on? |
22:18:40 | FromDiscord | <ElegantBeef> The compiler |
22:19:04 | saem | Sorry, I parsed that poorly. |
22:19:14 | FromDiscord | <ElegantBeef> No problem |
22:19:35 | FromDiscord | <ElegantBeef> Adding colouring to the compiler with just syntax highlighting is a fun thing to do |
22:20:04 | FromDiscord | <ElegantBeef> Tons of searching manually and looking around by hand |
22:20:07 | saem | Yeah, mine has some issues there as well. I did make a tweak recently to help (need to release that) and then also made a change in my local settings that *might* improve suggestions. |
22:20:59 | FromDiscord | <ElegantBeef> Yea for some reason the lsp server cannot resolve viable code then just poops itself to death |
22:21:01 | saem | Ooph, I can imagine, writing tests for nimsuggest alone I've run into a bunch of can't click through on things. THough it seemed to get better after the tweaks. |
22:21:46 | saem | Some times that's because of the file it assumes as the project file. |
22:22:35 | saem | Then there is the whole cfg/nims/nimble/koch and flags are everywhere so it's not making good decisions. |
22:23:28 | saem | Of course, this doesn't even get to issues with suggest. |
22:25:41 | * | kwilczynski quit (Ping timeout: 268 seconds) |
22:32:19 | * | kwilczynski joined #nim |
22:42:21 | disruptek | efforts are being made to remove configuration and divorce compiler environment from package manager. |
22:43:09 | disruptek | basically, you want to trend as close as possible to the compiler. the core tooling all should follow these codepaths and when they don't, well, it's probably an oversight. |
22:46:27 | FromDiscord | <mratsim> @disruptek, hopefully ma latest post on the "next steps for CPS" thread will convince people |
22:46:31 | FromDiscord | <mratsim> going to sleep now |
22:54:14 | saem | @disruptek I'm glad to hear it. I'm hoping that results in compiler can be run with an explicitly specified cfg rather than only by a naming convention. |
22:54:45 | disruptek | mratsim: nighty night |
22:55:07 | disruptek | saem: the compiler can be run with specified configs. |
22:55:24 | disruptek | in future, the goal is to embed the config in the code, for obvious reasons. |
22:55:25 | saem | @disruptek then I'm failing at reading the docs. |
22:55:34 | disruptek | see `nim --fullhelp` |
22:58:59 | saem | I've been going off this: https://nim-lang.org/docs/nimc.html |
23:01:25 | disruptek | it seems fairly complete. |
23:01:39 | disruptek | so what's the problem, exactly? |
23:02:09 | saem | Sorry still not seeing it, nim.cfg in the various dirs, and $project.nim.cfg is all I've found. I want to be able to to do something like nim c --config:bar.nim.cfg foo.nim |
23:06:52 | * | Arrrrrrrr quit (Quit: Arrrrrrrr) |
23:07:05 | saem | Maybe that's not acceptable, but I gather when someone wants to target multiple platforms, and the support for it is a combination of tell the compiler to do things and in the code itself, having many cfgs to support the overall build matrix would help a lot. |
23:08:07 | saem | The part I'm less sure about is the ability to include another cfg, so common parts of a build matrix can be factored out. |
23:14:03 | FromGitter | <gogolxdong> @saem does your plugin fix nimsgguest issue? |
23:14:53 | FromGitter | <gogolxdong> which exhausts memory. |
23:15:04 | saem | @gogolxdong only partially, the most noticeable thing it does is pass the backend explicitly, which helps in JS projects especially. |
23:16:00 | saem | @gogolxdong is this for the compiler or another code base? |
23:16:37 | saem | In fairness, it sounds like a fundamental nimsuggest issue, which the vscode extension contributes nothing to. |
23:17:25 | FromGitter | <gogolxdong> not sure.it just resa |
23:18:02 | FromGitter | <gogolxdong> restarts many nimsuggest processes. |
23:19:19 | saem | Is this for a public code base on github I can take a quick look at or ... ? |
23:20:41 | * | fanta1 quit (Remote host closed the connection) |
23:27:18 | * | krux02 joined #nim |
23:30:11 | FromGitter | <gogolxdong> (https://files.gitter.im/5602f03e0fc9f982beb19f61/rShN/nimsuggest.png) |
23:31:05 | FromDiscord | <ElegantBeef> iirc one of the vscode implementations opens a nimsuggest per file in specific cases |
23:32:21 | FromGitter | <gogolxdong> (https://files.gitter.im/5602f03e0fc9f982beb19f61/jAdN/image.png) |
23:32:34 | FromGitter | <gogolxdong> yes, I'm using your plugin :) |
23:33:03 | FromGitter | <gogolxdong> (https://files.gitter.im/5602f03e0fc9f982beb19f61/7niR/image.png) |
23:33:14 | FromGitter | <gogolxdong> Is this should be checked? |
23:36:57 | saem | @gogolxdong you can specify settings for either nim.project to reduce the number of nimsuggest processes, the default is per file as ElegantBeef indicated. |
23:38:41 | saem | Check the options here: https://github.com/saem/vscode-nim#options |
23:39:03 | saem | I'm trying to figure out a way to make that something that can be autodetected more, but various things make that very difficult |
23:40:54 | FromGitter | <gogolxdong> I'll try again. |
23:43:18 | FromDiscord | <ElegantBeef> Ah will be nice when you can just use nimsuggest as was intended 😄 |
23:43:32 | saem | It really will |
23:44:42 | FromGitter | <gogolxdong> @mratsim where is your last post ? |
23:45:56 | FromGitter | <gogolxdong> Is async/await going to be replaced by CPS? |
23:51:05 | FromDiscord | <notchris> merry holidays friends |
23:53:09 | FromDiscord | <Deleted User 5bd78114> Merry Xmas/Holidays to you too! |
23:53:41 | mipri | mratsim's post is in https://github.com/nim-lang/RFCs/issues/295 ; async/await will just be using CPS |
23:53:42 | disbot | ➥ next steps for CPS ; snippet at 12https://play.nim-lang.org/#ix=2Gti |