<< 12-09-2020 >>

00:11:42FromDiscord<Avatarfighter> ok so its poopoo
00:11:53FromDiscord<Avatarfighter> its using IE as the windows webengine 😦
00:11:53FromDiscord<Elegant Beef> Just use fidget and dont dick around wtih css πŸ˜›
00:12:03FromDiscord<Avatarfighter> tf fidget
00:12:37FromDiscord<Avatarfighter> oh that's hot
00:12:52FromDiscord<Avatarfighter> i like what I see Elegant
00:15:18FromDiscord<Elegant Beef> Yea it seems so much nicer than css/html in my quick toying around
00:15:57PrestigeLooks great
00:17:06FromDiscord<juan_carlos> ...But wont run on Linux. :(
00:17:15Prestigewhat? it does
00:17:29FromDiscord<juan_carlos> Nope
00:17:38PrestigeI built and ran the examples for fidget on linux earlier today
00:18:10FromDiscord<Elegant Beef> It does
00:18:13FromDiscord<Elegant Beef> I've ran all the demos
00:19:20FromDiscord<juan_carlos> Good, send the PR then https://github.com/treeform/fidget/issues/77
00:19:20disbotβž₯ Linux support + Idea (Publish the Fidget plugin so that it works on Linux)
00:20:22FromDiscord<Elegant Beef> Oh the figma plugin
00:20:26PrestigeI meant fidget itself, haven't tried figma
00:20:27FromDiscord<Elegant Beef> I dont fuck with figma
00:20:32Prestige^
00:24:30FromDiscord<Avatarfighter> wait the fidget library looks good
00:24:43Prestigeit's sexy
00:25:05FromDiscord<Avatarfighter> gems like that should be highlighted on the nim website
00:29:23*sagax quit (Ping timeout: 240 seconds)
00:29:28FromDiscord<Avatarfighter> does it work well in windows?
00:29:59FromDiscord<Avatarfighter> actually ill find out i guess
00:32:52FromDiscord<Elegant Beef> Probably works fine there
00:46:11*abm quit (Read error: Connection reset by peer)
00:56:54*a_chou joined #nim
00:58:08FromDiscord<PizzaFox> whats the reason i shouldnt be using uint types
00:58:19FromDiscord<PizzaFox> i read somewhere uint bad, `Natural` good
01:08:31FromDiscord<exelotl> @PizzaFox https://play.nim-lang.org/#ix=2xgh
01:09:23FromDiscord<exelotl> Natural has checks to make sure it doesn't accidentally go below 0
01:09:36FromDiscord<exelotl> uint will silently wrap around without complaining
01:09:42FromDiscord<PizzaFox> surely i can get 9999999999999x performance by saving the 1 bit from using a uint
01:11:07FromDiscord<exelotl> what do you mean saving the 1 bit?
01:11:23FromDiscord<Sabena Sema> fun fact: I tend to use int instead of uint in c and c++ for this reason
01:11:44FromDiscord<Sabena Sema> if you screw up a loop the int behavior is much better, even if you don't expect the variable to go below zero
01:11:56FromDiscord<PizzaFox> ints have a bit to store what sign the number is
01:12:01FromDiscord<PizzaFox> uints have no need
01:12:05FromDiscord<PizzaFox> so they got the extra bit
01:12:42FromDiscord<exelotl> actually nope, they use a scheme called Two's Complement
01:12:43FromDiscord<exelotl> https://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html
01:12:56FromDiscord<PizzaFox> what the hell
01:13:03FromDiscord<Sabena Sema> it does end up being the case that the number is negative if the MSB is set
01:13:42FromDiscord<Sabena Sema> and floats actually do use a sign bit
01:13:46FromDiscord<exelotl> ^
01:13:53FromDiscord<PizzaFox> thats what im remembering
01:13:57FromDiscord<PizzaFox> my mistake
01:14:13FromDiscord<PizzaFox> now all we need are ufloats 😎
01:14:43FromDiscord<Elegant Beef> uhh
01:14:52FromDiscord<Sabena Sema> think of 2s complement as storing the negative of a number on the "other side" of the module
01:16:00FromDiscord<Elegant Beef> It's not like using 1 less bit does a whole lot of good for your accuracy
01:16:12FromDiscord<Elegant Beef> 64 bit floats afterall are still considered impercise
01:16:55FromDiscord<Sabena Sema> doubles are very precise, you just have to actually understand how floating point works
01:17:04FromDiscord<Elegant Beef> Ok
01:17:14FromDiscord<Sabena Sema> I s2g if I have to talk another poor guy (who's not doing finance) out of using fixed point for no good reason
01:17:40FromDiscord<exelotl> I'm using fixed point because game boy advance. πŸ˜…
01:17:56FromDiscord<Elegant Beef> I mean doubles are percise enough for most cases but they're still impercise
01:17:59FromDiscord<Sabena Sema> OK yeah, if you don't actually have a floating point unit then maybe
01:19:09FromDiscord<Sabena Sema> I mean doubles have, at worse like 10e-4 precision
01:19:16FromDiscord<Sabena Sema> and on average like 10e-16
01:19:27FromDiscord<juan_carlos> Half floats or mini floats do exist tho.
01:19:42FromDiscord<Sabena Sema> 8 bit floats?
01:19:45FromDiscord<Elegant Beef> 16
01:19:53FromDiscord<Sabena Sema> nah for mini floats
01:20:04FromDiscord<Elegant Beef> 11 bit
01:20:17FromDiscord<Elegant Beef> idk that's what shaders tend to use as a `fixed` float
01:20:30FromDiscord<exelotl> we need to go smaller
01:20:35FromDiscord<Elegant Beef> 1bit float
01:20:37FromDiscord<Sabena Sema> is that if you're squirrelling away a float inside some other value?
01:20:49FromDiscord<Sabena Sema> the 11bit
01:21:08FromDiscord<Elegant Beef> I dont think so, i think it's generally just used on the gpu when you dont really care about being percise and are only in the -1 to 1 range
01:21:27FromDiscord<Sabena Sema> oh, normalized floats
01:21:44FromDiscord<Elegant Beef> ah sorry -2 to 2
01:21:46FromDiscord<juan_carlos> Squirrel floats?. :O
01:21:50FromDiscord<Sabena Sema> those tend to actually be represented as integers, with constant distribution over -1 to 1
01:22:21FromDiscord<Sabena Sema> like NORM, UNORM, etc
01:23:34FromDiscord<exelotl> @juan_carlos yes, unless it's a witch
01:28:34disrupteksee if it floats.
01:31:18*arecacea1 quit (Remote host closed the connection)
01:31:51*arecacea1 joined #nim
01:32:34disruptek-proc `$`*(loc: TLoc): string =
01:32:35disruptek- result.add "loc[" & $loc.k & "/" & $loc.storage & ": "
01:32:35disruptek- result.add $loc.flags
01:32:39disruptekoops
01:32:46disruptekhttps://www.youtube.com/embed/IdBkVRjEr4Y
01:32:49disruptekthat's better.
01:37:32*apahl_ joined #nim
01:41:01*apahl quit (Ping timeout: 264 seconds)
01:58:25FromDiscord<PizzaFox> proc loc tloc
02:02:02disruptekthe best part of compiler code is you can delete it and nothing bad happens.
02:06:29*krux02 quit (Remote host closed the connection)
02:34:51*femtotones quit (Quit: Default Quit Message)
02:48:05*muffindrake quit (Ping timeout: 272 seconds)
02:49:49*muffindrake joined #nim
03:00:29FromDiscord<Avatarfighter> lmao
03:20:02disruptekZevv: you're right, we do need a better name than Continuation.
03:47:32PrestigeIs there a simple nim lib I can use to draw pixels to a frame/canvas?
03:48:13Prestigemaybe nico would do
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:38*supakeen joined #nim
04:11:01FromDiscord<InventorMatt> Nigui can do it as well I believe
04:27:04PrestigeHm is there some way to cast varargs[int] to varargs[float]?
04:28:38Prestigehttps://play.nim-lang.org/#ix=2xgV <- eg
04:42:19FromDiscord<Rika> https://play.nim-lang.org/#ix=2xgZ
04:43:19PrestigeI was hoping there was a way to do it without doing an iteration over the args
05:07:23FromDiscord<Elegant Beef> Good for you prestige cause there is↡https://play.nim-lang.org/#ix=2xh2
05:07:34FromDiscord<Elegant Beef> https://nim-lang.org/docs/manual.html#types-varargs
05:09:03Prestige:o
05:09:04Prestigenice find
05:09:53FromDiscord<Elegant Beef> Find?! I knew it was possible just had to find how πŸ˜›
05:10:10Prestigehaha
05:10:17PrestigeI thought there must be a way
05:10:42FromDiscord<Elegant Beef> I knew there was a way just couldnt recall the syntax
05:22:38*narimiran joined #nim
05:29:26*waleee-cl quit (Quit: Connection closed for inactivity)
05:42:55*vicfred quit (Quit: Leaving)
05:42:56*arecacea1 quit (Read error: Connection reset by peer)
05:43:34*arecacea1 joined #nim
06:02:17*tsujp joined #nim
06:06:12*solitudesf joined #nim
06:36:58*endragor joined #nim
06:42:34*gmaggior joined #nim
06:56:32gmaggiorSorry. I do var s = @[1, 5, 3, 4, 9, 3], then I s.del(3) and I obtain @[1, 5, 3, 3, 9] == type seq[int] ie. 3, 9 in reversed order. What I am missing?
06:57:04narimirangmaggior: you're missing reading the doc for `del` ;)
06:57:13narimiranif you want to preserve the order, use `delete`
06:57:41gmaggiornarimiran: fair :))
06:58:29narimiranhttps://nim-lang.github.io/Nim/system.html#del%2Cseq[T]%2CNatural
06:58:48narimiransee the examples for `del` and `delete`
07:06:02gmaggiornarimiran, thanks. Actually I read the tutorial (part 1) where del/delete is not mentioned, then I tried the first remove method name who came to mind in assonance with add() :)
07:19:00FromDiscord<Avatarfighter> Is there a way for me to get the size of an object in memory?
07:23:41narimiran`sizeof`
07:24:23*hnOsmium0001 quit (Ping timeout: 244 seconds)
07:25:02FromDiscord<Avatarfighter> thank you, I don't know why i didn't try that
07:25:30*sirn quit (Ping timeout: 244 seconds)
07:25:56*lnxw37d4 quit (Ping timeout: 240 seconds)
07:26:01*rakgew[m] quit (Ping timeout: 244 seconds)
07:26:26*euantorano quit (Ping timeout: 240 seconds)
07:26:31*hnOsmium0001 joined #nim
07:27:43*rakgew[m] joined #nim
07:28:05*vycb[m] quit (Ping timeout: 244 seconds)
07:28:15*euantorano joined #nim
07:28:33*sirn joined #nim
07:30:10*lnxw37d4 joined #nim
07:30:15*alfabetacain[m] quit (Ping timeout: 244 seconds)
07:32:24*vycb[m] joined #nim
07:33:55*MTRNord[m] quit (Ping timeout: 240 seconds)
07:35:33FromDiscord<Avatarfighter> the module strtabs is not at all what i was expecting, I didn't think that meant it was an efficient string to string hashtable πŸ’€
07:37:27FromDiscord<Rika> what did you think it was
07:40:15FromDiscord<Avatarfighter> well just off the name i assumed that it was something stupid like space to tab conversion in strings
07:43:24FromDiscord<Avatarfighter> @Rika do you knwo off the top of your head the best way to keep a few hundred strings in memory?
07:44:20FromDiscord<Elegant Beef> A sequence doesnt work for you/
07:45:31FromDiscord<Rika> how large are these strings
07:46:46FromDiscord<Avatarfighter> uhhh
07:46:48FromDiscord<Avatarfighter> urls?
07:47:41*alfabetacain[m] joined #nim
07:48:05FromDiscord<Avatarfighter> lets pretend that the strings can range from 30-50 characters
07:48:21FromDiscord<Avatarfighter> i have figured out on my own that sequences aren't efficient lol
07:48:43FromDiscord<Rika> i dont see why
07:49:03FromDiscord<Rika> are you sure its the sequences and strings thats murdering your memory
07:49:17FromDiscord<Avatarfighter> yes
07:49:29FromDiscord<Elegant Beef> 50 bytes * 100s isnt many
07:49:33FromDiscord<Avatarfighter> i have like 20GB of strings in memory
07:49:37FromDiscord<Avatarfighter> its not 100s
07:49:43FromDiscord<Avatarfighter> its like 10s of 1000s
07:49:52FromDiscord<Elegant Beef> you said hundreds
07:50:11FromDiscord<Avatarfighter> welllll
07:50:24FromDiscord<Avatarfighter> if we're being specific i said a /few/ hundred
07:50:45FromDiscord<Elegant Beef> Which means 100-1000
07:51:13FromDiscord<Avatarfighter> well i didn't know you guys wanted exact numbers
07:51:32*Trustable joined #nim
07:51:40FromDiscord<Avatarfighter> so anyways got any ideas lmao
07:52:15*a_chou quit (Quit: a_chou)
07:53:10*MTRNord[m] joined #nim
07:54:54FromDiscord<Avatarfighter> oh jeez i guess this issue can wait i broke my scraper
07:55:37FromDiscord<vieru> is there a way i can import a module in every file ?
07:56:00FromDiscord<vieru> without actually writing the import statement in every file
07:57:18FromDiscord<Elegant Beef> There is a compiler flag
07:57:38FromDiscord<vieru> oh rly ?
07:57:43FromDiscord<vieru> what's the flag
07:58:02FromDiscord<Elegant Beef> `--import:path`
07:58:05FromDiscord<Elegant Beef> https://nim-lang.org/docs/nimc.html
07:58:08FromDiscord<Avatarfighter> oh i didn't break my scraper i forgot to compile with ssl lmao
07:58:19FromDiscord<Avatarfighter> Elegant Beef: got any ideas on my string situation
07:58:20FromDiscord<Elegant Beef> make a config
07:58:41FromDiscord<vieru> dude thanks that might do the job
07:59:15FromDiscord<Avatarfighter> is there a way for me to iterate through two iterators on the same line?
07:59:17FromDiscord<Elegant Beef> Only thing i can thing of is something that seemlessly fetches from drives
07:59:50FromDiscord<Avatarfighter> yeah i'm shoving the strings in a db
07:59:55FromDiscord<Avatarfighter> that should help lmao
08:00:24FromDiscord<Avatarfighter> it'll be nice because then I can rebuild the scraper and have it continue from where it was
08:01:22FromDiscord<Avatarfighter> actually nevermind on the iterating on the same string, I wrote really bad code in elementary and confused myself
08:02:33FromDiscord<Rika> https://nim-lang.org/docs/critbits.html as ive told someone here already, if you dont care about the order, this is good
08:02:44FromDiscord<Rika> for the many strings thing
08:03:32FromDiscord<Avatarfighter> yeah I'm going to adopt that Rika, you told me I was just curious if anyone had another strategy
08:03:50FromDiscord<Avatarfighter> I was in the process of writing a Patricia tree when you linked that lol
08:05:01FromDiscord<Rika> you can use the table system by using the key as "value" and the value as index looooool
08:05:10FromDiscord<Rika> abuse but w/e
08:05:31FromDiscord<Avatarfighter> LMAO
08:06:04FromDiscord<Rika> dont tell the other nimions i said that
08:06:50FromDiscord<Avatarfighter> Disruptek will never know 🀐
08:07:48FromDiscord<Rika> why have you done this
08:08:16FromDiscord<Avatarfighter> hahah
08:08:58FromDiscord<Avatarfighter> so uh
08:09:03FromDiscord<Avatarfighter> async is working with arc?
08:09:13FromDiscord<Rika> use orc for that
08:09:16FromDiscord<Avatarfighter> I was under the impression that async doesn't work with arc?
08:09:27FromDiscord<Rika> should be fine with orc
08:09:36FromDiscord<Avatarfighter> I know I'm supposed to use orc but I just compiled with orc for fun and my program just worked
08:09:38FromDiscord<Elegant Beef> The entire point of orc is arc + async/threading
08:09:49FromDiscord<Avatarfighter> i just compiled with arc*
08:10:32FromDiscord<Avatarfighter> interesting!
08:11:46FromDiscord<Rika> itll work with arc
08:11:51FromDiscord<Rika> you'll get mem leaks though
08:12:00FromDiscord<Avatarfighter> ah ok
08:12:03FromDiscord<Avatarfighter> orc it is >:)
08:13:50FromDiscord<Elegant Beef> I still say arc needs to be renamed something fantasy inspired, so we can have elf and orc or w/e the name is πŸ˜›
08:14:11FromDiscord<Avatarfighter> Nah Araq Reference Counting is perfect
08:14:36FromDiscord<Avatarfighter> but i wouldn't be against something like dragon
08:14:38FromDiscord<Avatarfighter> or uhhh
08:14:44FromDiscord<Avatarfighter> goblin
08:14:58FromDiscord<Rika> Ar_q's Really Cool
08:15:20FromDiscord<Avatarfighter> I just realized am I pinging all of them when I type their name
08:15:35FromDiscord<Rika> y e s
08:15:36FromDiscord<Avatarfighter> because that's going to be REAL awkward when they check their irc tomorrow
08:15:50FromDiscord<Avatarfighter> oh gosh
08:15:59FromDiscord<Avatarfighter> I would hate for disruptek to catch wind of it
08:16:04Prestigelmao
08:16:12FromDiscord<Avatarfighter> hide the disruptek fan art that we've been working on
08:16:22FromDiscord<Avatarfighter> imagine if disruptek found it @Rika
08:16:27FromDiscord<Rika> i HATE you
08:16:31FromDiscord<Avatarfighter> ahahah
08:16:45FromDiscord<Rika> i will rip your tongue out with my bare hands if ever i see you
08:16:53FromDiscord<vieru> dude i can't get include to work lol
08:16:55FromDiscord<Avatarfighter> please no
08:17:37FromDiscord<vieru> does include allow relative path ?
08:17:40FromDiscord<vieru> (edit) 'path' => 'paths'
08:17:57FromDiscord<vieru> cus i can't get it to work
08:18:44FromDiscord<Rika> it should
08:19:42FromDiscord<vieru> nim c ... -f --include:"./src/lib/functions/mymodule.nim" ... doesn't work
08:19:50FromDiscord<vieru> (edit) 'nim' => '`nim' | '...' => '...`'
08:20:33FromDiscord<vieru> `pathto\file.nim(1, 2) Error: cannot open file: src\lib\functions\mymodule.nim`
08:21:14FromDiscord<vieru> and the file does indeed exist there and the path is correct
08:21:14FromDiscord<Rika> oh thats how youre including
08:21:25FromDiscord<Rika> i dont know how those includes work, only know the in-file includes
08:21:41FromDiscord<Rika> this is relative to your `pwd` right
08:21:41FromDiscord<vieru> yeah im reffering to the compiler includes
08:21:47FromDiscord<vieru> yep
08:21:52FromDiscord<Rika> od then
08:22:13FromDiscord<vieru> > https://discord.com/channels/371759389889003530/371759389889003532/754249447457816606↡here
08:22:13FromDiscord<Avatarfighter> im sure disruptek would know
08:22:27FromDiscord<Elegant Beef> Why are you using include?
08:22:41FromDiscord<vieru> i have a macro that i want to include in every file
08:22:53FromDiscord<Avatarfighter> he asked earlier how to import a specific file in every file without importing it manually
08:22:58FromDiscord<Avatarfighter> he or she*
08:22:59FromDiscord<Elegant Beef> Yes but why include instead of import?
08:23:09FromDiscord<vieru> w8
08:23:24FromDiscord<Avatarfighter> vieru rn https://media.discordapp.net/attachments/371759389889003532/754255827988119622/j7ufxw4v1vx31.jpg
08:23:32FromDiscord<vieru> i was meaning import and i think i typed include lol
08:24:13FromDiscord<Elegant Beef> did just test with relative paths with import and it works fine
08:24:24FromDiscord<vieru> well replacing include with import doesnt fix the problem lol
08:24:38FromDiscord<Elegant Beef> remove the quotes and the `.`
08:24:54FromDiscord<vieru> ok imma try this
08:25:14FromDiscord<Elegant Beef> ` nim c --import:testmodule.nim -r ./test.nim ` works for me
08:25:58FromDiscord<Elegant Beef> ah nvm subfolder causes an issue
08:26:20FromDiscord<vieru> this is my full script↡`nim c --cpu:i386 -t:-m32 -l:-m32 -d:ssl -f --import:src/lib/functions/file.nim -d:isProd=true -d:release -d:danger --opt:size --app:gui --passC:-flto -o:./dist/app.exe ./src/app.nim`
08:26:58FromDiscord<vieru> prod script i mean
08:27:59FromDiscord<Elegant Beef> Well relative for a file in the CWD works, weird
08:28:26FromDiscord<vieru> i tried using a full path
08:28:32FromDiscord<vieru> but i got a recursive import error
08:29:11FromDiscord<Elegant Beef> Well you're probably importing the file inside itself
08:29:45FromDiscord<vieru> nope
08:29:46FromDiscord<Elegant Beef> Ensure you dont have reference to the file you're attempting to globally import
08:30:09FromDiscord<Rika> if the file you're compiling is referencing the same file that you're including, it might error
08:31:02FromDiscord<Elegant Beef> Yea the globally included file needs 0 reference
08:31:07FromDiscord<vieru> guys that error disapearred lol↡i think it was because i misstyped import with include
08:31:15FromDiscord<Elegant Beef> Well
08:31:24FromDiscord<Elegant Beef> Sucks it doesnt work for relative
08:31:32FromDiscord<Elegant Beef> *Time to use a nimble file to build*
08:31:38FromDiscord<vieru> using a full path fixes it
08:31:53FromDiscord<vieru> idk actually how to use a nimble file
08:32:17FromDiscord<vieru> using a .sh file seemed easier lol
08:32:43FromDiscord<Elegant Beef> make a `.nimble` then you can easily config it
08:33:04FromDiscord<Elegant Beef> Assuming you have nimble installed and in your path
08:33:11*narimiran quit (Ping timeout: 256 seconds)
08:33:14FromDiscord<vieru> yep i do
08:34:14FromDiscord<Elegant Beef> Alternatively i suppose a `.nims` could work
08:35:19FromDiscord<vieru> using `%cd%` should work right ?
08:35:23FromDiscord<vieru> (edit) 'work' => 'work,'
08:35:51*kungtotte quit (Read error: Connection reset by peer)
08:35:53FromDiscord<Elegant Beef> Assuming that's the windows equivlent to $PWD
08:36:13FromDiscord<Clyybber> did you discover a bug?
08:36:21FromDiscord<vieru> yep↡> Assuming that's the windows equivlent to $PWD↡@Elegant Beef
08:36:32FromDiscord<Elegant Beef> Apparently yes clyybber
08:36:36FromDiscord<vieru> yeah i guess so↡> did you discover a bug?↡@Clyybber
08:36:51*kungtotte joined #nim
08:36:54FromDiscord<vieru> can't use relative paths in the compiler --import flag
08:36:58FromDiscord<Elegant Beef> `--import:` only works relative to the CWD
08:37:04FromDiscord<vieru> it fails when using subfolders
08:37:04FromDiscord<Clyybber> same for include?
08:37:09FromDiscord<Elegant Beef> if the file is in the same director*
08:37:11FromDiscord<Elegant Beef> (edit) 'director*' => 'directory*'
08:37:38FromDiscord<vieru> yep↡> same for include?↡@Clyybber
08:38:14FromDiscord<Elegant Beef> no not for me
08:38:22FromDiscord<Elegant Beef> include works in sub folders, import does not
08:39:08FromDiscord<Elegant Beef> https://hatebin.com/quhopcfqfq terminal output
08:40:26FromDiscord<vieru> tried include again
08:40:29FromDiscord<vieru> it works
08:40:34FromDiscord<vieru> with subfolders
08:41:35FromDiscord<Elegant Beef> So vieru go make an issue πŸ˜›
08:43:06FromDiscord<vieru> nah
08:43:15FromDiscord<vieru> ill let you do it if you want
08:43:21FromDiscord<vieru> idc that much
08:43:35FromDiscord<Elegant Beef> *Friggin windows users* πŸ˜„
08:44:09FromDiscord<vieru> its just windows on my laptop lol
08:44:26FromDiscord<vieru> my pc is dualbooting arch with win10
08:44:39FromDiscord<vieru> *insert arch linux meme*
08:44:47FromDiscord<Avatarfighter> arch btw
08:46:26FromDiscord<Avatarfighter> oh gosh i think i need to make myself a config file for nim
08:46:33FromDiscord<Avatarfighter> this is the fourth time i've forgotten -d:ssl
08:46:42FromDiscord<Elegant Beef> Yes when using any of the `-d` features just make a config
08:46:50FromDiscord<Elegant Beef> it takes seconds and saves you headaches
08:46:56FromDiscord<Avatarfighter> yeah'
08:47:05FromDiscord<Clyybber> @Elegant Beef does it work without the preceeding dot?
08:47:15FromDiscord<Elegant Beef> nope
08:47:17FromDiscord<Avatarfighter> ive been awake for too long to write nim code its 2 am and i'm going to head out
08:47:27FromDiscord<Avatarfighter> enjoy the rest of your days everyone πŸ˜„
08:48:12FromDiscord<vieru> 11am gang
08:48:14FromDiscord<Elegant Beef> @Clyybber do i continue writting this issue or are you going to make that redundant? πŸ˜›
08:48:19FromDiscord<Elegant Beef> 11am more like 3 am
08:48:29FromDiscord<Clyybber> nah, continue
08:48:39FromDiscord<vieru> europe gang
08:49:02FromDiscord<vieru> *insert gang signs*
08:49:47FromDiscord<vieru> `--hotCodeReloading:on|off`↡↡does this flag watch for file changes or wut ?
08:50:13FromDiscord<Elegant Beef> No you recompile and it just transitions memory
08:50:22*Trustable quit (Remote host closed the connection)
08:50:30FromDiscord<Elegant Beef> https://nim-lang.org/docs/hcr.html
08:51:14FromDiscord<vieru> ooh
08:51:38FromDiscord<vieru> i was hoping for webpack like hot code reloading
08:51:48FromDiscord<vieru> but this is still useful
08:52:09FromDiscord<vieru> (edit) 'i was hoping for ... webpack' => 'i was hoping for0 config'
08:53:06*Zevv quit (Quit: leaving)
08:53:27*Zevv joined #nim
08:53:27*Zevv quit (Changing host)
08:53:27*Zevv joined #nim
08:54:40FromDiscord<Elegant Beef> Yea there are some nice experimental features
08:55:14*NimBot joined #nim
08:55:22FromDiscord<Elegant Beef> lets you convert `a.invoke(args)` into `a(args)`, which is what i was using it for in some events i made
08:57:19*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:18:11*FromDiscord quit (Remote host closed the connection)
09:18:29*FromDiscord joined #nim
09:40:44*Vladar joined #nim
10:19:58FromDiscord<Clyybber> Araq: WDYT about renaming the copy assignment `=` to `=copy` ?
10:21:40*Vladar quit (Quit: Leaving)
10:48:45FromDiscord<ⓗⓐⓑⓓ β“£β“ž ⓣⓐⓖ> > changes in the code can be applied automatically to a running program
10:48:47FromDiscord<ⓗⓐⓑⓓ β“£β“ž ⓣⓐⓖ> :FLooshed:
10:53:11FromDiscord<ⓗⓐⓑⓓ β“£β“ž ⓣⓐⓖ> that is kinda hto
10:53:13FromDiscord<ⓗⓐⓑⓓ β“£β“ž ⓣⓐⓖ> (edit) 'hto' => 'hot'
10:53:40FromDiscord<Clyybber> literally
11:00:42FromDiscord<ⓗⓐⓑⓓ β“£β“ž ⓣⓐⓖ> yes
11:30:26*arecacea1 quit (Remote host closed the connection)
11:31:12*arecacea1 joined #nim
11:31:57*krux02 joined #nim
11:37:12*narimiran joined #nim
11:39:36*waleee-cl joined #nim
12:04:45*gmaggior quit (Quit: Leaving)
12:06:01*supakeen quit (Quit: WeeChat 2.9)
12:06:39*supakeen joined #nim
12:31:07*Vladar joined #nim
12:31:51*sagax joined #nim
12:32:33*Vladar quit (Remote host closed the connection)
12:34:18*femtotones joined #nim
12:34:39*Vladar joined #nim
12:51:08*FromDiscord quit (Remote host closed the connection)
12:51:21*FromDiscord joined #nim
12:52:50*FromDiscord quit (Remote host closed the connection)
12:53:06*FromDiscord joined #nim
12:55:19AraqClyybber: would it help us make the compiler simpler?
13:00:05disrupteklol
13:08:57femtotonessuppose i have a nim project on github and want releases as binaries. can i use github ci or actions or something to generate it as I push?
13:09:16disruptekyes.
13:11:24disruptekclyybber: any change of cps running under arc in 1.4?
13:11:29disrupteks/change/chance/
13:18:07*endragor quit (Ping timeout: 240 seconds)
13:48:01*fowl quit (Ping timeout: 272 seconds)
13:48:11*fowl joined #nim
14:08:21*natrys joined #nim
14:17:42FromDiscord<exelotl> hey does anybody know of a simple solution for this? https://play.nim-lang.org/#ix=2xji
14:18:47FromDiscord<exelotl> can't write a template that uses a "whateverIt" template, if there's already a symbol called `it` defined elsewhere
14:18:56disruptekthat's a bug.
14:19:05FromDiscord<exelotl> :<
14:19:50disruptekclyybber was in that code recently so i'd file an issue; he probably knows what's up.
14:20:19disruptekapplyIt should be hygienic.
14:29:06*bouzu_ joined #nim
14:30:42*bouzu_ quit (Client Quit)
14:33:30FromDiscord<exelotl> I can probably trick it into working with a macro that throws information away (where it sees a SymChoice "it", replace with Ident "it")
14:34:07FromDiscord<exelotl> but yeah will file an issue
14:44:07*superbia1 joined #nim
14:46:45*superbia quit (Ping timeout: 240 seconds)
14:55:25*Vladar quit (Quit: Leaving)
14:58:23*lritter joined #nim
14:59:04*Trustable joined #nim
15:00:20*superbia1 is now known as superbia
15:15:28FromDiscord<exelotl> uh oh, I broke the playground
15:15:43FromDiscord<exelotl> :x
15:16:27FromDiscord<exelotl> oh it came back
15:23:23*D_ quit (Quit: πŸ’¨)
15:27:02*arecacea1 quit (Remote host closed the connection)
15:27:35*arecacea1 joined #nim
15:30:06*Vladar joined #nim
15:37:16PrestigeIs there a way to create and deal with named pipes in Nim or should I just invoke mkfifo from a shell command? Not seeing anything in os
15:39:59federico3some example of non-blocking reading of ttyUSB*?
15:45:01Prestigefederico3: are you asking for one, or saying there is one?
15:45:10federico3asking
15:46:17PrestigeI also need async reading for my question, looking at io right now
15:46:31federico3I got something trivial working
15:47:13shashlickFor those who want to test on osx - https://github.com/fastai/fastmac/
15:51:22Prestigeoh federico3 https://nim-lang.org/docs/asyncfile.html just found this
15:51:55federico3but it uses asyncdispatch :(
15:52:28PrestigeWhat's wrong with that?
15:53:25FromDiscord<ache of head> Yeah, there was something wrong with asyncdispatch lately, I tried creating the simplest webserver and something didn't work
15:53:39FromDiscord<ache of head> Is it just me or is there something up for real?
15:54:01federico3it forces the async loop into your application and it's also very difficult to debug
15:56:07Prestigeasync loop? you mean something other than how other languages do async? (I haven't tried anything async in Nim, yet)
15:56:54Zevvfederico3: how do you want to do non-blocking read then? Polling?
15:58:25federico3Zevv: there are various non-blocking i/o primitives across OSes. I just used https://nim-lang.org/docs/posix.html#O_NONBLOCK
15:59:00Zevvright, that was my suggestion. But then you go polling instead
15:59:08Zevvor combine with poll/select/epoll yourself
16:12:01*endragor joined #nim
16:24:33*a_chou joined #nim
16:49:43*a_chou quit (Ping timeout: 260 seconds)
17:20:21*vicfred joined #nim
17:22:17FromDiscord<SeanOMik> I'm having issues with recursive module dependency. I have a module that requires a certain type which is in a seperate module, but the issue is that the 3rd module imports the first module
17:22:44FromDiscord<SeanOMik> Anybody know some ways I could move stuff around to fix the issues?
17:23:07FromDiscord<Avatarfighter> Have you thought about spltting the type and its associated procs into another file?
17:23:24FromDiscord<Avatarfighter> Then you import that file into both files that require it
17:23:32FromDiscord<Avatarfighter> i had to do something similar in python
17:23:45FromDiscord<SeanOMik> Hm
17:23:48FromDiscord<SeanOMik> I guess I could do that
17:23:54FromDiscord<SeanOMik> Thanks
17:24:14FromDiscord<Avatarfighter> np it’s honestly the easiest way to do things without headaches
17:24:21FromDiscord<Avatarfighter> disruptek how are you today?
17:25:26FromDiscord<Avatarfighter> federico3: i dont know if you want to use this but the way i do io and async is by having a while true that checks if there are pending operations and does poll(-1)
17:27:22FromDiscord<Avatarfighter> federico3: here is my basic queue loop, it isn't much but it works and its fast imo https://dsh.re/fbe55
17:41:36disrupteki'm pissed.
17:43:13Zevvbit early for that isn't it
17:43:33disruptekit's 5 o'clock somewhere.
17:43:48Zevvfair enough
17:43:58ZevvI'll join you
17:49:12Oddmongertea time
17:52:22*arecacea1 quit (Remote host closed the connection)
17:53:10*arecacea1 joined #nim
18:00:22FromDiscord<Avatarfighter> im having tea right now feel free to join !
18:00:31FromDiscord<Rika> no
18:00:39FromDiscord<Avatarfighter> rika how dare you
18:00:45FromDiscord<Rika> lmao
18:00:48FromDiscord<Avatarfighter> haha
18:00:49FromDiscord<Rika> wait
18:00:53FromDiscord<Rika> fuck dont you dare
18:01:00FromDiscord<Rika> :MonkaS:
18:01:10FromDiscord<Avatarfighter> how could you INSULT me like that
18:31:37*idf joined #nim
18:34:37*idf quit (Quit: ZNC 1.7.2+deb3 - https://znc.in)
18:35:20*Vladar quit (Quit: Leaving)
18:37:09*hnOsmium0001 joined #nim
18:39:11FromDiscord<kodkuce> i have one question if i want to compile for arm with static link how would that work when example libssl or libcrypto on mypc is for pc64 not arm64
18:41:22Zevvwelcome to the wonderful world of cross compiling
18:41:33disruptekthanks, i hate it.
18:42:36FromDiscord<kodkuce> so doom i have to compile it on arm or what?
18:42:49disruptekError: implicit object field construction requires a .partial object, but got TSym
18:45:31FromDiscord<kodkuce> any magic workflow @Zevv or not?
18:47:54*idf joined #nim
18:48:43federico3kodkuce I'm crosscompiling for arm with almost no configuration
18:50:06FromDiscord<kodkuce> oh i think i get how this works
18:50:34FromDiscord<kodkuce> i build it but on arm it uses distro libcrypto i guess?
18:50:51FromDiscord<kodkuce> or i am wrong
18:52:14Araqit's 2020, setup a CI, "cross compile" and also run tests afterwards
18:53:25FromDiscord<kodkuce> to test i kinda need to deply it to arm cuz cant test arm bin on x86_64
18:53:52FromDiscord<kodkuce> i wanted to build on pc cuz guess thats faster then on rpi
18:54:20Araqand then you re-deploy it manually and re-run your tests manually?
18:54:39Araqok, sounds like a winning strategy to me. ;-)
18:55:52shashlickDo something like travister - make the CI an extended dev machine
18:56:41shashlickhttps://github.com/genotrance/travister
18:56:48FromDiscord<kodkuce> was that ironic Araq, i normal logic, cuz for me it sounded normal just duno xD
18:59:17FromDiscord<kodkuce> i newer used travis but can explor that relm too
18:59:22Prestigehm what's wrong with this code? It seems like the callback is never invoked https://play.nim-lang.org/#ix=2xkC
19:06:00PrestigeOh I have to manually poll to get the callbacks to run?
19:06:15FromDiscord<kodkuce> i duno :(
19:10:25FromDiscord<kodkuce> hmm can i use docker nimlan arm so i build from his libs
19:10:40FromDiscord<kodkuce> make that multystage dockerfiel
19:20:30PrestigeHm
19:21:04PrestigeDoes runForever() block?
19:21:22FromDiscord<kodkuce> https://hub.docker.com/r/nimlang/nim << no arm img ?
19:21:43ZevvrunForever will block
19:21:45Zevvfor ever
19:24:01FromDiscord<kodkuce> no arm in tags :(
19:24:17PrestigeSo I need to either do that or manually poll periodically for my callbacks to get invoked? Dang
19:24:49PrestigeIf not, I'm missing something
19:26:53Zevvyou can register timers
19:27:11disruptekthere's a poll and a drain.
19:27:20disrupteky'know,
19:27:22disruptekfor chumps.
19:28:08FromDiscord<kodkuce> duno if i got it wrong shoudnet he just await that readAll and use it ?
19:28:40FromDiscord<kodkuce> why no ARM nim in dockerhub :( kmeeeeee
19:29:23FromDiscord<kodkuce> tough lol now when i think of it i cant run arm docker on x86 to link to arm xD
19:29:24PrestigeI'm just trying to get callbacks working, it's an example
19:30:21FromDiscord<kodkuce> isent a callback just DO something on FINISH ?
19:30:56PrestigeYep
19:32:04*Zectbumo joined #nim
19:33:50PrestigeE.g. if I wanted to do multiple async operations at the same time and echo what time each finishes, callbacks would be nice. If I await each operation I lose out on the benefits of async
19:35:18FromDiscord<kodkuce> async check one and other await?
19:36:06*femtotones quit (Quit: Default Quit Message)
19:38:18*narimiran quit (Ping timeout: 260 seconds)
19:38:51FromGitter<alehander92> oii
19:55:01FromDiscord<Avatarfighter> Prestige i can help πŸ˜„
20:07:58*gmaggior joined #nim
20:13:08FromDiscord<Avatarfighter> What would be the best way to have a nim config in a nimble project?
20:13:19disruptekproject.nim.cfg
20:13:53FromDiscord<Avatarfighter> project being the name of the project or just as project?
20:14:09disruptekthe name of the project.
20:14:28FromDiscord<Avatarfighter> Thank you disruptek
20:15:51Prestige@Avatarfighter I think a timer calling poll will be okay.. it wish the callbacks were just automatically invoked though
20:16:21FromDiscord<Avatarfighter> Yeah that put me off when I first tried using them
20:17:17PrestigeI feel like it should be possible to have that happen, but idk what's going on behind the scenes
20:28:08*idf left #nim ("ERC (IRC client for Emacs 27.1)")
20:33:25*lritter quit (Ping timeout: 244 seconds)
20:35:34*idf joined #nim
20:37:38*Aurora_v_kosmose joined #nim
20:37:45Aurora_v_kosmoseIs there any info somewhere about orc gc?
20:39:49FromDiscord<kodkuce> i want my bin to run on rpi4 but i dont want to build using rpi4, kmeeeeeee
20:39:53FromDiscord<kodkuce> :(
20:40:27*lritter joined #nim
20:40:57*Aurora_v_kosmose ponders cross-compilation
20:46:15FromDiscord<kodkuce> but how to cross-compile with -d:ssl
20:47:16FromDiscord<kodkuce> i gona try it and see if it works
20:47:25FromDiscord<Elegant Beef> does `nim c --cpu:arm -d:ssl --os:linux file.nim` not work?
20:47:56FromDiscord<kodkuce> ye but i wanted to static link libs cuz last time i tryed dynamit it dident work :(
20:50:28*Trustable quit (Remote host closed the connection)
20:52:32FromDiscord<kodkuce> + target is alpine linux so its musl
20:54:14FromDiscord<Elegant Beef> Yea i've not a got a clue im a numpty that uses mainstream linux distros πŸ˜„
20:56:42*solitudesf quit (Ping timeout: 258 seconds)
20:59:09FromDiscord<kodkuce> https://hastebin.com/uhosakuzig.coffeescript
20:59:25FromDiscord<Elegant Beef> Nice characters
21:02:57FromDiscord<kodkuce> worst thing now in my dir i got ??#@?W?@8?@%$??@@@h?h??????????????????????
21:03:05FromDiscord<kodkuce> and i cant delete it
21:03:23*Aurora_v_kosmose left #nim ("Guess I'm just going to go read the commit log later")
21:10:03*vicfred_ joined #nim
21:12:25*vicfred quit (Ping timeout: 240 seconds)
21:25:51FromDiscord<Avatarfighter> Aurora_v_kosmose from what I understand orc is just arc except it can handle cyclic structures
21:26:08disruptekthey gon', son.
21:31:15FromDiscord<Avatarfighter> Disruptek how are doing now
21:31:19FromDiscord<Avatarfighter> no longer pissed off I hope
21:31:33FromDiscord<Rika> hes always pissed off tho
21:31:48disrupteki dunno.
21:31:48disruptektrying to figure out what's up with ci.
21:31:48disruptekmangling appears to be green.
21:32:11FromDiscord<Avatarfighter> its fine Rika we can show him the disruptek fan art so he isn't pissed off anymore
21:32:45disruptekAraq: merge it quick before something breaks. 😁
21:33:12disruptekwhat happened to #15306?
21:33:13disbothttps://github.com/nim-lang/Nim/pull/15306 -- 5optimized ORC further
21:33:16Araqlink?
21:33:37AraqI now understand why the attempted optimization is impossible
21:33:42disruptek!pull author:disruptek mangling
21:33:44disbothttps://github.com/nim-lang/Nim/pull/14632 -- 3porting name mangling from ic effort
21:34:26disruptekci is green in my fork but i guess nim's needs a re-run.
21:34:35disruptekwhy is it impossible?
21:35:13Araqdisruptek: will review it tomorrow or on monday, it's late
21:35:26disruptekokay, don't actually merge it.
21:35:47Araqwell I might after review, why?
21:36:05disrupteki mean, i doubt it truly passes. i think something must be different about ci running on my nim repo.
21:36:15disruptekwell, because for example jsonutils has seen no love.
21:36:41disruptekunless something else was bugged and is now coincidentally fixed, i don't expect it to pass.
21:37:30disruptekit's annoying, because i'm trying to test ic as i merge it into my ice branch and if i cannot trust the ci, that's a problem.
21:39:00FromDiscord<kodkuce> anyone know can i maybe run an arm in vbox or quemu to build my app for rpi?
21:39:17disruptekwhy can't you use travis or github actions?
21:39:23disruptekboth have arm support afaik.
21:47:43Araqdisruptek: well it never made sense that jsonutils failed. so if you fixed/changed your mangling it might simply work
21:48:42FromDiscord<kodkuce> i tought travis is just a CI CD tool dident know it can crosscompile
21:48:58FromDiscord<kodkuce> but ye gitlab i think it has build pipeline
21:49:00FromDiscord<Rika> CIs do compilation so i dont see why they cant cross compile
21:49:45FromDiscord<kodkuce> cuz i tough if i want to compile to rpi4 i have to do it on arm64
21:50:07FromDiscord<kodkuce> or if somone can point me how to crosscopile from pc to arm64
21:50:16FromDiscord<kodkuce> nim c --gcc.exe:musl-gcc -d:ssl --cpu:arm64 server.nim
21:50:27FromDiscord<kodkuce> didident work out well for me
21:51:23*lritter quit (Ping timeout: 240 seconds)
21:52:55FromDiscord<Rika> @kodkuce https://github.com/kaushalmodi/hello_musl/ maybe you can try using this?
22:04:33*Zectbumo quit (Remote host closed the connection)
22:04:51*Zectbumo joined #nim
22:06:57FromDiscord<juan_carlos> You need `--gcc.linkerexe:musl-gcc --passL:-static --passC:-static` too.
22:07:52FromDiscord<juan_carlos> But yeah check that repo is cool.
22:08:48FromDiscord<Avatarfighter> so uh stupid question but what is the logger module used for
22:08:55FromDiscord<Avatarfighter> like when one would consider using it
22:09:05FromDiscord<Avatarfighter> and is there anything wrong with echoing my "logs"
22:09:16FromDiscord<juan_carlos> When you need a .log file. :P
22:09:20FromDiscord<Avatarfighter> ahah
22:09:23FromDiscord<Avatarfighter> Ok I see πŸ˜›
22:10:22FromDiscord<juan_carlos> It also rotates the .log files, so you dont have open a 8 Gb log file on RAM for long running apps.
22:10:34FromDiscord<Avatarfighter> Oh that's sick
22:10:47FromDiscord<Avatarfighter> Ok I'll incorporate logger into my project lol
22:10:53FromDiscord<Avatarfighter> You've sold me @juan_carlos
22:11:17FromDiscord<juan_carlos> 8 Gb is exagerated but yeah basically a huge txt file
22:11:44FromDiscord<Avatarfighter> I'm planning on running my thing without stopping for as long as I can
22:11:50FromDiscord<juan_carlos> I think it depends on the scale and purpose of the app.
22:12:25FromDiscord<juan_carlos> rotating file logger from logging module then.
22:12:56FromDiscord<Avatarfighter> I have another question, if I can multiple exceptions in my `try: except Exception1, Exception2:` statement is there any way I can figure out which exception just occurred ?
22:13:23disrupteki just roll dice.
22:13:36FromDiscord<kodkuce> sorry was afk phone call
22:13:38FromDiscord<Avatarfighter> can I do something like Python where I can do `except Exception1, Exception2 as e` followed by a fat if statement
22:13:54FromDiscord<juan_carlos> check the exception yeah
22:13:59disruptekexcept Exception1: ... except Exception2: ...
22:13:59FromDiscord<kodkuce> > You need `--gcc.linkerexe:musl-gcc --passL:-static --passC:-static` too.↡@juan_carlos hmm its missing --cpu:arm64
22:14:06FromDiscord<juan_carlos> also you can have several except branches
22:14:11FromDiscord<Avatarfighter> oh that's nice
22:14:15FromDiscord<Avatarfighter> I never knew that
22:14:25FromDiscord<Avatarfighter> I had really fucking complicated except statements before :L
22:14:31FromDiscord<juan_carlos> I said you need that *too*
22:14:32disruptekthe dice work best.
22:14:33FromDiscord<kodkuce> and how can it pass my libssl when i am on 64bit pc, shoudnet i have to build libss arm64 too
22:14:37FromDiscord<kodkuce> will chekc link
22:14:39FromDiscord<juan_carlos> like to add that
22:14:56FromDiscord<juan_carlos> Add to the existing command
22:15:49FromDiscord<kodkuce> ok i build it will now cp to rpi4 and see if it carsh again
22:18:14FromDiscord<kodkuce> ./serv ↡./serv: line 1: syntax error: unexpected "("
22:18:25FromDiscord<kodkuce> :(
22:18:47FromDiscord<kodkuce> nim c --gcc.linkerexe:musl-gcc --passL:-static --passC:-static --gcc.exe:musl-gcc --cpu:arm64 server.nim
22:19:22FromDiscord<kodkuce> and cp to rpi4 and runed and doom :( tough at least it didn not created that crazy file
22:19:43FromDiscord<juan_carlos> maybe like `--passL:"-static"`
22:20:26FromDiscord<juan_carlos> I think the compiler for ARM has different name tho...
22:20:57FromDiscord<juan_carlos> gcc-arm64-something-something at least on Arch.
22:21:22*Zectbumo quit (Remote host closed the connection)
22:21:34FromDiscord<kodkuce> cross-aarch64-linux-musl-0.33_3
22:21:54FromDiscord<kodkuce> but i dont get any error when building with this up
22:22:52FromDiscord<kodkuce> tough ye i think if it link my pc64 ssl with -d:sll it should crash will try whiout --passL:static << guessi this for lib
22:23:14FromDiscord<Rika> its --passL:-static
22:23:16FromDiscord<Rika> note the dash
22:23:33FromDiscord<juan_carlos> But musl-gcc is for x86 at least on Arch. And it should be -static with the - thingy.
22:25:18FromDiscord<Avatarfighter> Does anyone know if the norm library plays nice when its shoved in an async proc
22:25:48FromDiscord<kodkuce> duno i kinda lost you all
22:26:00FromDiscord<kodkuce> but i tryed whout any static too and still cant run
22:33:16FromDiscord<kodkuce> tryed kushmod nim musl -d:libressl --cpu:arm64 server.nim dident work :(
22:33:21FromDiscord<kodkuce> will try gitlab
22:33:35FromDiscord<kodkuce> but tommorow i go sleep now
22:33:40FromDiscord<kodkuce> good night all cya
22:44:34*natrys quit (Ping timeout: 244 seconds)
22:45:01*natrys joined #nim
22:45:03*natrys quit (Client Quit)
22:47:11FromDiscord<XxDiCaprioxX> sent a code paste, see https://play.nim-lang.org/#ix=2xlO
22:47:21FromDiscord<XxDiCaprioxX> And if yes how can I access the "najdorf" part?
22:47:41FromDiscord<XxDiCaprioxX> (edit) 'https://play.nim-lang.org/#ix=2xlO' => 'https://play.nim-lang.org/#ix=2xlP'
22:48:05FromDiscord<Rika> yes
22:48:17FromDiscord<Rika> yourJson["sicilian"]["najdorf"]
22:48:38FromDiscord<XxDiCaprioxX> And is there a way to automate?
22:48:49FromDiscord<Rika> what do you mean
22:48:51FromDiscord<XxDiCaprioxX> Like "sicilian" is a key, but what is "najdorf"
22:49:08FromDiscord<Rika> a key
22:49:25FromGitter<ynfle> Also, `yourJson{"sicilian", "najdorf"}`
22:49:36FromDiscord<Rika> thats another way to do it
22:49:57FromDiscord<XxDiCaprioxX> But like if I want "sicilian" I can do `for i in json.keys:` but how would I make it if I want to access najdorf?
22:50:20FromDiscord<Rika> for i in json.keys: for j in i.keys:
22:50:29FromDiscord<XxDiCaprioxX> oh okay, perfect thank you
22:50:37FromGitter<ynfle> ```for i in json.keys: ⏎ for j in i.keys: ⏎ echo j``` [https://gitter.im/nim-lang/Nim?at=5f5d50bddf4af236f902fb1d]
22:52:49FromDiscord<XxDiCaprioxX> sent a code paste, see https://play.nim-lang.org/#ix=2xlQ
22:52:56FromDiscord<Rika> []
22:52:57FromDiscord<Rika> not {}
22:53:00FromDiscord<XxDiCaprioxX> okay
22:53:06FromDiscord<Rika> for the najdorf part
22:53:20FromDiscord<XxDiCaprioxX> yes
22:53:28FromDiscord<XxDiCaprioxX> worked, thanks
22:55:04FromGitter<ynfle> Checkout https://beginnersbook.com/2015/04/json-tutorial/#:~:text=JSON%20stands%20for%20JavaScript%20Object,JSON%20concepts%20and%20its%20usages.
22:57:24*vicfred_ quit (Quit: Leaving)
23:00:34FromDiscord<XxDiCaprioxX> ``` for key1 in dbFile.keys:↡ for key2 in key1.keys: ``` why does this not work?
23:00:38*abm joined #nim
23:00:59FromDiscord<Rika> it should
23:01:05FromDiscord<Rika> what is your error
23:01:20FromDiscord<XxDiCaprioxX> sent a code paste, see https://play.nim-lang.org/#ix=2xlU
23:01:36FromDiscord<Rika> ah i see
23:02:09*krux02 quit (Read error: Connection reset by peer)
23:02:15FromDiscord<Rika> you need to do ↡```for key1 in dbFile.keys:↡ for key2 in dbFile[key1].keys:```
23:02:39FromDiscord<XxDiCaprioxX> yup works, thank you
23:02:52*krux02 joined #nim
23:04:17FromGitter<ynfle> Is there a way to run `unittest` in memory?
23:06:35FromDiscord<juan_carlos> in memory?.
23:06:44FromDiscord<juan_carlos> What does that mean.
23:07:47FromGitter<ynfle> Like import a test file, run it and get the results without having to start another os process
23:07:52FromGitter<ynfle> Something like https://www.nuget.org/packages/xunit.runner.utility/
23:19:52*femtotones joined #nim
23:25:00*krux02 quit (Remote host closed the connection)
23:25:10FromDiscord<juan_carlos> It does not say what you are saying. But .NET is a virtual machine, it is always already runing when the code runs anyway.
23:25:46FromDiscord<Avatarfighter> oh i have a similar question to ynfle's, can i load a dynlib from memory?
23:26:50FromDiscord<juan_carlos> I think it loads them by filename, so I think is OS job to find it or fail to find it.
23:27:38FromDiscord<juan_carlos> So in the end is not Nims but OS.
23:27:53*abm quit (Quit: Leaving)
23:28:14FromDiscord<Avatarfighter> damn
23:29:31FromDiscord<juan_carlos> You can compile the binary with it bundled tho.
23:30:23FromDiscord<Avatarfighter> yeah i know, im fetching a dynlib from a server and I was curious to see if i could load the file in memory
23:41:51*arecacea1 quit (Remote host closed the connection)
23:42:20*arecacea1 joined #nim
23:42:24FromGitter<ynfle> @juan_carlos thanks that makes sense. What about compiling in memory? Is that documented somewhere? I know it can be done because the nim compiler is written in nim
23:45:19FromDiscord<Rika> eh? i dont understand how nimc being in nim is relevant here
23:46:23FromDiscord<Elegant Beef> Nim can dynamically evaluate nimscript if you include the compiler
23:46:53FromDiscord<Elegant Beef> But dynamically compiling/including code seems questionable at best
23:48:30FromGitter<ynfle> Well the compiler be imported. @Elegant Beef, Is there a way to import nimscript functionality
23:49:04FromDiscord<Elegant Beef> Yes you can pmunch has a whole blog about using embedding nimscript in nim↡https://peterme.net/using-nimscript-as-a-configuration-language-embedding-nimscript-pt-1.html
23:49:11FromDiscord<Elegant Beef> (edit) removed 'using'
23:49:56FromDiscord<Elegant Beef> Basically by importing the compiler you get access to the nimvm at runtime, so you can evaluate and cross communicate with nimscript
23:53:50*Zectbumo joined #nim
23:59:22FromDiscord<juan_carlos> Yep, works https://github.com/juancarlospaco/nim4py#nim4python