00:11:42 | FromDiscord | <Avatarfighter> ok so its poopoo |
00:11:53 | FromDiscord | <Avatarfighter> its using IE as the windows webengine π¦ |
00:11:53 | FromDiscord | <Elegant Beef> Just use fidget and dont dick around wtih css π |
00:12:03 | FromDiscord | <Avatarfighter> tf fidget |
00:12:37 | FromDiscord | <Avatarfighter> oh that's hot |
00:12:52 | FromDiscord | <Avatarfighter> i like what I see Elegant |
00:15:18 | FromDiscord | <Elegant Beef> Yea it seems so much nicer than css/html in my quick toying around |
00:15:57 | Prestige | Looks great |
00:17:06 | FromDiscord | <juan_carlos> ...But wont run on Linux. :( |
00:17:15 | Prestige | what? it does |
00:17:29 | FromDiscord | <juan_carlos> Nope |
00:17:38 | Prestige | I built and ran the examples for fidget on linux earlier today |
00:18:10 | FromDiscord | <Elegant Beef> It does |
00:18:13 | FromDiscord | <Elegant Beef> I've ran all the demos |
00:19:20 | FromDiscord | <juan_carlos> Good, send the PR then https://github.com/treeform/fidget/issues/77 |
00:19:20 | disbot | β₯ Linux support + Idea (Publish the Fidget plugin so that it works on Linux) |
00:20:22 | FromDiscord | <Elegant Beef> Oh the figma plugin |
00:20:26 | Prestige | I meant fidget itself, haven't tried figma |
00:20:27 | FromDiscord | <Elegant Beef> I dont fuck with figma |
00:20:32 | Prestige | ^ |
00:24:30 | FromDiscord | <Avatarfighter> wait the fidget library looks good |
00:24:43 | Prestige | it's sexy |
00:25:05 | FromDiscord | <Avatarfighter> gems like that should be highlighted on the nim website |
00:29:23 | * | sagax quit (Ping timeout: 240 seconds) |
00:29:28 | FromDiscord | <Avatarfighter> does it work well in windows? |
00:29:59 | FromDiscord | <Avatarfighter> actually ill find out i guess |
00:32:52 | FromDiscord | <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:08 | FromDiscord | <PizzaFox> whats the reason i shouldnt be using uint types |
00:58:19 | FromDiscord | <PizzaFox> i read somewhere uint bad, `Natural` good |
01:08:31 | FromDiscord | <exelotl> @PizzaFox https://play.nim-lang.org/#ix=2xgh |
01:09:23 | FromDiscord | <exelotl> Natural has checks to make sure it doesn't accidentally go below 0 |
01:09:36 | FromDiscord | <exelotl> uint will silently wrap around without complaining |
01:09:42 | FromDiscord | <PizzaFox> surely i can get 9999999999999x performance by saving the 1 bit from using a uint |
01:11:07 | FromDiscord | <exelotl> what do you mean saving the 1 bit? |
01:11:23 | FromDiscord | <Sabena Sema> fun fact: I tend to use int instead of uint in c and c++ for this reason |
01:11:44 | FromDiscord | <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:56 | FromDiscord | <PizzaFox> ints have a bit to store what sign the number is |
01:12:01 | FromDiscord | <PizzaFox> uints have no need |
01:12:05 | FromDiscord | <PizzaFox> so they got the extra bit |
01:12:42 | FromDiscord | <exelotl> actually nope, they use a scheme called Two's Complement |
01:12:43 | FromDiscord | <exelotl> https://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html |
01:12:56 | FromDiscord | <PizzaFox> what the hell |
01:13:03 | FromDiscord | <Sabena Sema> it does end up being the case that the number is negative if the MSB is set |
01:13:42 | FromDiscord | <Sabena Sema> and floats actually do use a sign bit |
01:13:46 | FromDiscord | <exelotl> ^ |
01:13:53 | FromDiscord | <PizzaFox> thats what im remembering |
01:13:57 | FromDiscord | <PizzaFox> my mistake |
01:14:13 | FromDiscord | <PizzaFox> now all we need are ufloats π |
01:14:43 | FromDiscord | <Elegant Beef> uhh |
01:14:52 | FromDiscord | <Sabena Sema> think of 2s complement as storing the negative of a number on the "other side" of the module |
01:16:00 | FromDiscord | <Elegant Beef> It's not like using 1 less bit does a whole lot of good for your accuracy |
01:16:12 | FromDiscord | <Elegant Beef> 64 bit floats afterall are still considered impercise |
01:16:55 | FromDiscord | <Sabena Sema> doubles are very precise, you just have to actually understand how floating point works |
01:17:04 | FromDiscord | <Elegant Beef> Ok |
01:17:14 | FromDiscord | <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:40 | FromDiscord | <exelotl> I'm using fixed point because game boy advance. π
|
01:17:56 | FromDiscord | <Elegant Beef> I mean doubles are percise enough for most cases but they're still impercise |
01:17:59 | FromDiscord | <Sabena Sema> OK yeah, if you don't actually have a floating point unit then maybe |
01:19:09 | FromDiscord | <Sabena Sema> I mean doubles have, at worse like 10e-4 precision |
01:19:16 | FromDiscord | <Sabena Sema> and on average like 10e-16 |
01:19:27 | FromDiscord | <juan_carlos> Half floats or mini floats do exist tho. |
01:19:42 | FromDiscord | <Sabena Sema> 8 bit floats? |
01:19:45 | FromDiscord | <Elegant Beef> 16 |
01:19:53 | FromDiscord | <Sabena Sema> nah for mini floats |
01:20:04 | FromDiscord | <Elegant Beef> 11 bit |
01:20:17 | FromDiscord | <Elegant Beef> idk that's what shaders tend to use as a `fixed` float |
01:20:30 | FromDiscord | <exelotl> we need to go smaller |
01:20:35 | FromDiscord | <Elegant Beef> 1bit float |
01:20:37 | FromDiscord | <Sabena Sema> is that if you're squirrelling away a float inside some other value? |
01:20:49 | FromDiscord | <Sabena Sema> the 11bit |
01:21:08 | FromDiscord | <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:27 | FromDiscord | <Sabena Sema> oh, normalized floats |
01:21:44 | FromDiscord | <Elegant Beef> ah sorry -2 to 2 |
01:21:46 | FromDiscord | <juan_carlos> Squirrel floats?. :O |
01:21:50 | FromDiscord | <Sabena Sema> those tend to actually be represented as integers, with constant distribution over -1 to 1 |
01:22:21 | FromDiscord | <Sabena Sema> like NORM, UNORM, etc |
01:23:34 | FromDiscord | <exelotl> @juan_carlos yes, unless it's a witch |
01:28:34 | disruptek | see if it floats. |
01:31:18 | * | arecacea1 quit (Remote host closed the connection) |
01:31:51 | * | arecacea1 joined #nim |
01:32:34 | disruptek | -proc `$`*(loc: TLoc): string = |
01:32:35 | disruptek | - result.add "loc[" & $loc.k & "/" & $loc.storage & ": " |
01:32:35 | disruptek | - result.add $loc.flags |
01:32:39 | disruptek | oops |
01:32:46 | disruptek | https://www.youtube.com/embed/IdBkVRjEr4Y |
01:32:49 | disruptek | that's better. |
01:37:32 | * | apahl_ joined #nim |
01:41:01 | * | apahl quit (Ping timeout: 264 seconds) |
01:58:25 | FromDiscord | <PizzaFox> proc loc tloc |
02:02:02 | disruptek | the 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:29 | FromDiscord | <Avatarfighter> lmao |
03:20:02 | disruptek | Zevv: you're right, we do need a better name than Continuation. |
03:47:32 | Prestige | Is there a simple nim lib I can use to draw pixels to a frame/canvas? |
03:48:13 | Prestige | maybe nico would do |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:38 | * | supakeen joined #nim |
04:11:01 | FromDiscord | <InventorMatt> Nigui can do it as well I believe |
04:27:04 | Prestige | Hm is there some way to cast varargs[int] to varargs[float]? |
04:28:38 | Prestige | https://play.nim-lang.org/#ix=2xgV <- eg |
04:42:19 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2xgZ |
04:43:19 | Prestige | I was hoping there was a way to do it without doing an iteration over the args |
05:07:23 | FromDiscord | <Elegant Beef> Good for you prestige cause there isβ΅https://play.nim-lang.org/#ix=2xh2 |
05:07:34 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/manual.html#types-varargs |
05:09:03 | Prestige | :o |
05:09:04 | Prestige | nice find |
05:09:53 | FromDiscord | <Elegant Beef> Find?! I knew it was possible just had to find how π |
05:10:10 | Prestige | haha |
05:10:17 | Prestige | I thought there must be a way |
05:10:42 | FromDiscord | <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:32 | gmaggior | Sorry. 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:04 | narimiran | gmaggior: you're missing reading the doc for `del` ;) |
06:57:13 | narimiran | if you want to preserve the order, use `delete` |
06:57:41 | gmaggior | narimiran: fair :)) |
06:58:29 | narimiran | https://nim-lang.github.io/Nim/system.html#del%2Cseq[T]%2CNatural |
06:58:48 | narimiran | see the examples for `del` and `delete` |
07:06:02 | gmaggior | narimiran, 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:00 | FromDiscord | <Avatarfighter> Is there a way for me to get the size of an object in memory? |
07:23:41 | narimiran | `sizeof` |
07:24:23 | * | hnOsmium0001 quit (Ping timeout: 244 seconds) |
07:25:02 | FromDiscord | <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:33 | FromDiscord | <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:27 | FromDiscord | <Rika> what did you think it was |
07:40:15 | FromDiscord | <Avatarfighter> well just off the name i assumed that it was something stupid like space to tab conversion in strings |
07:43:24 | FromDiscord | <Avatarfighter> @Rika do you knwo off the top of your head the best way to keep a few hundred strings in memory? |
07:44:20 | FromDiscord | <Elegant Beef> A sequence doesnt work for you/ |
07:45:31 | FromDiscord | <Rika> how large are these strings |
07:46:46 | FromDiscord | <Avatarfighter> uhhh |
07:46:48 | FromDiscord | <Avatarfighter> urls? |
07:47:41 | * | alfabetacain[m] joined #nim |
07:48:05 | FromDiscord | <Avatarfighter> lets pretend that the strings can range from 30-50 characters |
07:48:21 | FromDiscord | <Avatarfighter> i have figured out on my own that sequences aren't efficient lol |
07:48:43 | FromDiscord | <Rika> i dont see why |
07:49:03 | FromDiscord | <Rika> are you sure its the sequences and strings thats murdering your memory |
07:49:17 | FromDiscord | <Avatarfighter> yes |
07:49:29 | FromDiscord | <Elegant Beef> 50 bytes * 100s isnt many |
07:49:33 | FromDiscord | <Avatarfighter> i have like 20GB of strings in memory |
07:49:37 | FromDiscord | <Avatarfighter> its not 100s |
07:49:43 | FromDiscord | <Avatarfighter> its like 10s of 1000s |
07:49:52 | FromDiscord | <Elegant Beef> you said hundreds |
07:50:11 | FromDiscord | <Avatarfighter> welllll |
07:50:24 | FromDiscord | <Avatarfighter> if we're being specific i said a /few/ hundred |
07:50:45 | FromDiscord | <Elegant Beef> Which means 100-1000 |
07:51:13 | FromDiscord | <Avatarfighter> well i didn't know you guys wanted exact numbers |
07:51:32 | * | Trustable joined #nim |
07:51:40 | FromDiscord | <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:54 | FromDiscord | <Avatarfighter> oh jeez i guess this issue can wait i broke my scraper |
07:55:37 | FromDiscord | <vieru> is there a way i can import a module in every file ? |
07:56:00 | FromDiscord | <vieru> without actually writing the import statement in every file |
07:57:18 | FromDiscord | <Elegant Beef> There is a compiler flag |
07:57:38 | FromDiscord | <vieru> oh rly ? |
07:57:43 | FromDiscord | <vieru> what's the flag |
07:58:02 | FromDiscord | <Elegant Beef> `--import:path` |
07:58:05 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/nimc.html |
07:58:08 | FromDiscord | <Avatarfighter> oh i didn't break my scraper i forgot to compile with ssl lmao |
07:58:19 | FromDiscord | <Avatarfighter> Elegant Beef: got any ideas on my string situation |
07:58:20 | FromDiscord | <Elegant Beef> make a config |
07:58:41 | FromDiscord | <vieru> dude thanks that might do the job |
07:59:15 | FromDiscord | <Avatarfighter> is there a way for me to iterate through two iterators on the same line? |
07:59:17 | FromDiscord | <Elegant Beef> Only thing i can thing of is something that seemlessly fetches from drives |
07:59:50 | FromDiscord | <Avatarfighter> yeah i'm shoving the strings in a db |
07:59:55 | FromDiscord | <Avatarfighter> that should help lmao |
08:00:24 | FromDiscord | <Avatarfighter> it'll be nice because then I can rebuild the scraper and have it continue from where it was |
08:01:22 | FromDiscord | <Avatarfighter> actually nevermind on the iterating on the same string, I wrote really bad code in elementary and confused myself |
08:02:33 | FromDiscord | <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:44 | FromDiscord | <Rika> for the many strings thing |
08:03:32 | FromDiscord | <Avatarfighter> yeah I'm going to adopt that Rika, you told me I was just curious if anyone had another strategy |
08:03:50 | FromDiscord | <Avatarfighter> I was in the process of writing a Patricia tree when you linked that lol |
08:05:01 | FromDiscord | <Rika> you can use the table system by using the key as "value" and the value as index looooool |
08:05:10 | FromDiscord | <Rika> abuse but w/e |
08:05:31 | FromDiscord | <Avatarfighter> LMAO |
08:06:04 | FromDiscord | <Rika> dont tell the other nimions i said that |
08:06:50 | FromDiscord | <Avatarfighter> Disruptek will never know π€ |
08:07:48 | FromDiscord | <Rika> why have you done this |
08:08:16 | FromDiscord | <Avatarfighter> hahah |
08:08:58 | FromDiscord | <Avatarfighter> so uh |
08:09:03 | FromDiscord | <Avatarfighter> async is working with arc? |
08:09:13 | FromDiscord | <Rika> use orc for that |
08:09:16 | FromDiscord | <Avatarfighter> I was under the impression that async doesn't work with arc? |
08:09:27 | FromDiscord | <Rika> should be fine with orc |
08:09:36 | FromDiscord | <Avatarfighter> I know I'm supposed to use orc but I just compiled with orc for fun and my program just worked |
08:09:38 | FromDiscord | <Elegant Beef> The entire point of orc is arc + async/threading |
08:09:49 | FromDiscord | <Avatarfighter> i just compiled with arc* |
08:10:32 | FromDiscord | <Avatarfighter> interesting! |
08:11:46 | FromDiscord | <Rika> itll work with arc |
08:11:51 | FromDiscord | <Rika> you'll get mem leaks though |
08:12:00 | FromDiscord | <Avatarfighter> ah ok |
08:12:03 | FromDiscord | <Avatarfighter> orc it is >:) |
08:13:50 | FromDiscord | <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:11 | FromDiscord | <Avatarfighter> Nah Araq Reference Counting is perfect |
08:14:36 | FromDiscord | <Avatarfighter> but i wouldn't be against something like dragon |
08:14:38 | FromDiscord | <Avatarfighter> or uhhh |
08:14:44 | FromDiscord | <Avatarfighter> goblin |
08:14:58 | FromDiscord | <Rika> Ar_q's Really Cool |
08:15:20 | FromDiscord | <Avatarfighter> I just realized am I pinging all of them when I type their name |
08:15:35 | FromDiscord | <Rika> y e s |
08:15:36 | FromDiscord | <Avatarfighter> because that's going to be REAL awkward when they check their irc tomorrow |
08:15:50 | FromDiscord | <Avatarfighter> oh gosh |
08:15:59 | FromDiscord | <Avatarfighter> I would hate for disruptek to catch wind of it |
08:16:04 | Prestige | lmao |
08:16:12 | FromDiscord | <Avatarfighter> hide the disruptek fan art that we've been working on |
08:16:22 | FromDiscord | <Avatarfighter> imagine if disruptek found it @Rika |
08:16:27 | FromDiscord | <Rika> i HATE you |
08:16:31 | FromDiscord | <Avatarfighter> ahahah |
08:16:45 | FromDiscord | <Rika> i will rip your tongue out with my bare hands if ever i see you |
08:16:53 | FromDiscord | <vieru> dude i can't get include to work lol |
08:16:55 | FromDiscord | <Avatarfighter> please no |
08:17:37 | FromDiscord | <vieru> does include allow relative path ? |
08:17:40 | FromDiscord | <vieru> (edit) 'path' => 'paths' |
08:17:57 | FromDiscord | <vieru> cus i can't get it to work |
08:18:44 | FromDiscord | <Rika> it should |
08:19:42 | FromDiscord | <vieru> nim c ... -f --include:"./src/lib/functions/mymodule.nim" ... doesn't work |
08:19:50 | FromDiscord | <vieru> (edit) 'nim' => '`nim' | '...' => '...`' |
08:20:33 | FromDiscord | <vieru> `pathto\file.nim(1, 2) Error: cannot open file: src\lib\functions\mymodule.nim` |
08:21:14 | FromDiscord | <vieru> and the file does indeed exist there and the path is correct |
08:21:14 | FromDiscord | <Rika> oh thats how youre including |
08:21:25 | FromDiscord | <Rika> i dont know how those includes work, only know the in-file includes |
08:21:41 | FromDiscord | <Rika> this is relative to your `pwd` right |
08:21:41 | FromDiscord | <vieru> yeah im reffering to the compiler includes |
08:21:47 | FromDiscord | <vieru> yep |
08:21:52 | FromDiscord | <Rika> od then |
08:22:13 | FromDiscord | <vieru> > https://discord.com/channels/371759389889003530/371759389889003532/754249447457816606β΅here |
08:22:13 | FromDiscord | <Avatarfighter> im sure disruptek would know |
08:22:27 | FromDiscord | <Elegant Beef> Why are you using include? |
08:22:41 | FromDiscord | <vieru> i have a macro that i want to include in every file |
08:22:53 | FromDiscord | <Avatarfighter> he asked earlier how to import a specific file in every file without importing it manually |
08:22:58 | FromDiscord | <Avatarfighter> he or she* |
08:22:59 | FromDiscord | <Elegant Beef> Yes but why include instead of import? |
08:23:09 | FromDiscord | <vieru> w8 |
08:23:24 | FromDiscord | <Avatarfighter> vieru rn https://media.discordapp.net/attachments/371759389889003532/754255827988119622/j7ufxw4v1vx31.jpg |
08:23:32 | FromDiscord | <vieru> i was meaning import and i think i typed include lol |
08:24:13 | FromDiscord | <Elegant Beef> did just test with relative paths with import and it works fine |
08:24:24 | FromDiscord | <vieru> well replacing include with import doesnt fix the problem lol |
08:24:38 | FromDiscord | <Elegant Beef> remove the quotes and the `.` |
08:24:54 | FromDiscord | <vieru> ok imma try this |
08:25:14 | FromDiscord | <Elegant Beef> ` nim c --import:testmodule.nim -r ./test.nim ` works for me |
08:25:58 | FromDiscord | <Elegant Beef> ah nvm subfolder causes an issue |
08:26:20 | FromDiscord | <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:58 | FromDiscord | <vieru> prod script i mean |
08:27:59 | FromDiscord | <Elegant Beef> Well relative for a file in the CWD works, weird |
08:28:26 | FromDiscord | <vieru> i tried using a full path |
08:28:32 | FromDiscord | <vieru> but i got a recursive import error |
08:29:11 | FromDiscord | <Elegant Beef> Well you're probably importing the file inside itself |
08:29:45 | FromDiscord | <vieru> nope |
08:29:46 | FromDiscord | <Elegant Beef> Ensure you dont have reference to the file you're attempting to globally import |
08:30:09 | FromDiscord | <Rika> if the file you're compiling is referencing the same file that you're including, it might error |
08:31:02 | FromDiscord | <Elegant Beef> Yea the globally included file needs 0 reference |
08:31:07 | FromDiscord | <vieru> guys that error disapearred lolβ΅i think it was because i misstyped import with include |
08:31:15 | FromDiscord | <Elegant Beef> Well |
08:31:24 | FromDiscord | <Elegant Beef> Sucks it doesnt work for relative |
08:31:32 | FromDiscord | <Elegant Beef> *Time to use a nimble file to build* |
08:31:38 | FromDiscord | <vieru> using a full path fixes it |
08:31:53 | FromDiscord | <vieru> idk actually how to use a nimble file |
08:32:17 | FromDiscord | <vieru> using a .sh file seemed easier lol |
08:32:43 | FromDiscord | <Elegant Beef> make a `.nimble` then you can easily config it |
08:33:04 | FromDiscord | <Elegant Beef> Assuming you have nimble installed and in your path |
08:33:11 | * | narimiran quit (Ping timeout: 256 seconds) |
08:33:14 | FromDiscord | <vieru> yep i do |
08:34:14 | FromDiscord | <Elegant Beef> Alternatively i suppose a `.nims` could work |
08:35:19 | FromDiscord | <vieru> using `%cd%` should work right ? |
08:35:23 | FromDiscord | <vieru> (edit) 'work' => 'work,' |
08:35:51 | * | kungtotte quit (Read error: Connection reset by peer) |
08:35:53 | FromDiscord | <Elegant Beef> Assuming that's the windows equivlent to $PWD |
08:36:13 | FromDiscord | <Clyybber> did you discover a bug? |
08:36:21 | FromDiscord | <vieru> yepβ΅> Assuming that's the windows equivlent to $PWDβ΅@Elegant Beef |
08:36:32 | FromDiscord | <Elegant Beef> Apparently yes clyybber |
08:36:36 | FromDiscord | <vieru> yeah i guess soβ΅> did you discover a bug?β΅@Clyybber |
08:36:51 | * | kungtotte joined #nim |
08:36:54 | FromDiscord | <vieru> can't use relative paths in the compiler --import flag |
08:36:58 | FromDiscord | <Elegant Beef> `--import:` only works relative to the CWD |
08:37:04 | FromDiscord | <vieru> it fails when using subfolders |
08:37:04 | FromDiscord | <Clyybber> same for include? |
08:37:09 | FromDiscord | <Elegant Beef> if the file is in the same director* |
08:37:11 | FromDiscord | <Elegant Beef> (edit) 'director*' => 'directory*' |
08:37:38 | FromDiscord | <vieru> yepβ΅> same for include?β΅@Clyybber |
08:38:14 | FromDiscord | <Elegant Beef> no not for me |
08:38:22 | FromDiscord | <Elegant Beef> include works in sub folders, import does not |
08:39:08 | FromDiscord | <Elegant Beef> https://hatebin.com/quhopcfqfq terminal output |
08:40:26 | FromDiscord | <vieru> tried include again |
08:40:29 | FromDiscord | <vieru> it works |
08:40:34 | FromDiscord | <vieru> with subfolders |
08:41:35 | FromDiscord | <Elegant Beef> So vieru go make an issue π |
08:43:06 | FromDiscord | <vieru> nah |
08:43:15 | FromDiscord | <vieru> ill let you do it if you want |
08:43:21 | FromDiscord | <vieru> idc that much |
08:43:35 | FromDiscord | <Elegant Beef> *Friggin windows users* π |
08:44:09 | FromDiscord | <vieru> its just windows on my laptop lol |
08:44:26 | FromDiscord | <vieru> my pc is dualbooting arch with win10 |
08:44:39 | FromDiscord | <vieru> *insert arch linux meme* |
08:44:47 | FromDiscord | <Avatarfighter> arch btw |
08:46:26 | FromDiscord | <Avatarfighter> oh gosh i think i need to make myself a config file for nim |
08:46:33 | FromDiscord | <Avatarfighter> this is the fourth time i've forgotten -d:ssl |
08:46:42 | FromDiscord | <Elegant Beef> Yes when using any of the `-d` features just make a config |
08:46:50 | FromDiscord | <Elegant Beef> it takes seconds and saves you headaches |
08:46:56 | FromDiscord | <Avatarfighter> yeah' |
08:47:05 | FromDiscord | <Clyybber> @Elegant Beef does it work without the preceeding dot? |
08:47:15 | FromDiscord | <Elegant Beef> nope |
08:47:17 | FromDiscord | <Avatarfighter> ive been awake for too long to write nim code its 2 am and i'm going to head out |
08:47:27 | FromDiscord | <Avatarfighter> enjoy the rest of your days everyone π |
08:48:12 | FromDiscord | <vieru> 11am gang |
08:48:14 | FromDiscord | <Elegant Beef> @Clyybber do i continue writting this issue or are you going to make that redundant? π |
08:48:19 | FromDiscord | <Elegant Beef> 11am more like 3 am |
08:48:29 | FromDiscord | <Clyybber> nah, continue |
08:48:39 | FromDiscord | <vieru> europe gang |
08:49:02 | FromDiscord | <vieru> *insert gang signs* |
08:49:47 | FromDiscord | <vieru> `--hotCodeReloading:on|off`β΅β΅does this flag watch for file changes or wut ? |
08:50:13 | FromDiscord | <Elegant Beef> No you recompile and it just transitions memory |
08:50:22 | * | Trustable quit (Remote host closed the connection) |
08:50:30 | FromDiscord | <Elegant Beef> https://nim-lang.org/docs/hcr.html |
08:51:14 | FromDiscord | <vieru> ooh |
08:51:38 | FromDiscord | <vieru> i was hoping for webpack like hot code reloading |
08:51:48 | FromDiscord | <vieru> but this is still useful |
08:52:09 | FromDiscord | <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:40 | FromDiscord | <Elegant Beef> Yea there are some nice experimental features |
08:55:14 | * | NimBot joined #nim |
08:55:22 | FromDiscord | <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:58 | FromDiscord | <Clyybber> Araq: WDYT about renaming the copy assignment `=` to `=copy` ? |
10:21:40 | * | Vladar quit (Quit: Leaving) |
10:48:45 | FromDiscord | <βββ‘β β£β β£ββ> > changes in the code can be applied automatically to a running program |
10:48:47 | FromDiscord | <βββ‘β β£β β£ββ> :FLooshed: |
10:53:11 | FromDiscord | <βββ‘β β£β β£ββ> that is kinda hto |
10:53:13 | FromDiscord | <βββ‘β β£β β£ββ> (edit) 'hto' => 'hot' |
10:53:40 | FromDiscord | <Clyybber> literally |
11:00:42 | FromDiscord | <βββ‘β β£β β£ββ> 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:19 | Araq | Clyybber: would it help us make the compiler simpler? |
13:00:05 | disruptek | lol |
13:08:57 | femtotones | suppose 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:16 | disruptek | yes. |
13:11:24 | disruptek | clyybber: any change of cps running under arc in 1.4? |
13:11:29 | disruptek | s/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:42 | FromDiscord | <exelotl> hey does anybody know of a simple solution for this? https://play.nim-lang.org/#ix=2xji |
14:18:47 | FromDiscord | <exelotl> can't write a template that uses a "whateverIt" template, if there's already a symbol called `it` defined elsewhere |
14:18:56 | disruptek | that's a bug. |
14:19:05 | FromDiscord | <exelotl> :< |
14:19:50 | disruptek | clyybber was in that code recently so i'd file an issue; he probably knows what's up. |
14:20:19 | disruptek | applyIt should be hygienic. |
14:29:06 | * | bouzu_ joined #nim |
14:30:42 | * | bouzu_ quit (Client Quit) |
14:33:30 | FromDiscord | <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:07 | FromDiscord | <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:28 | FromDiscord | <exelotl> uh oh, I broke the playground |
15:15:43 | FromDiscord | <exelotl> :x |
15:16:27 | FromDiscord | <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:16 | Prestige | Is 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:59 | federico3 | some example of non-blocking reading of ttyUSB*? |
15:45:01 | Prestige | federico3: are you asking for one, or saying there is one? |
15:45:10 | federico3 | asking |
15:46:17 | Prestige | I also need async reading for my question, looking at io right now |
15:46:31 | federico3 | I got something trivial working |
15:47:13 | shashlick | For those who want to test on osx - https://github.com/fastai/fastmac/ |
15:51:22 | Prestige | oh federico3 https://nim-lang.org/docs/asyncfile.html just found this |
15:51:55 | federico3 | but it uses asyncdispatch :( |
15:52:28 | Prestige | What's wrong with that? |
15:53:25 | FromDiscord | <ache of head> Yeah, there was something wrong with asyncdispatch lately, I tried creating the simplest webserver and something didn't work |
15:53:39 | FromDiscord | <ache of head> Is it just me or is there something up for real? |
15:54:01 | federico3 | it forces the async loop into your application and it's also very difficult to debug |
15:56:07 | Prestige | async loop? you mean something other than how other languages do async? (I haven't tried anything async in Nim, yet) |
15:56:54 | Zevv | federico3: how do you want to do non-blocking read then? Polling? |
15:58:25 | federico3 | Zevv: there are various non-blocking i/o primitives across OSes. I just used https://nim-lang.org/docs/posix.html#O_NONBLOCK |
15:59:00 | Zevv | right, that was my suggestion. But then you go polling instead |
15:59:08 | Zevv | or 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:17 | FromDiscord | <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:44 | FromDiscord | <SeanOMik> Anybody know some ways I could move stuff around to fix the issues? |
17:23:07 | FromDiscord | <Avatarfighter> Have you thought about spltting the type and its associated procs into another file? |
17:23:24 | FromDiscord | <Avatarfighter> Then you import that file into both files that require it |
17:23:32 | FromDiscord | <Avatarfighter> i had to do something similar in python |
17:23:45 | FromDiscord | <SeanOMik> Hm |
17:23:48 | FromDiscord | <SeanOMik> I guess I could do that |
17:23:54 | FromDiscord | <SeanOMik> Thanks |
17:24:14 | FromDiscord | <Avatarfighter> np itβs honestly the easiest way to do things without headaches |
17:24:21 | FromDiscord | <Avatarfighter> disruptek how are you today? |
17:25:26 | FromDiscord | <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:22 | FromDiscord | <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:36 | disruptek | i'm pissed. |
17:43:13 | Zevv | bit early for that isn't it |
17:43:33 | disruptek | it's 5 o'clock somewhere. |
17:43:48 | Zevv | fair enough |
17:43:58 | Zevv | I'll join you |
17:49:12 | Oddmonger | tea time |
17:52:22 | * | arecacea1 quit (Remote host closed the connection) |
17:53:10 | * | arecacea1 joined #nim |
18:00:22 | FromDiscord | <Avatarfighter> im having tea right now feel free to join ! |
18:00:31 | FromDiscord | <Rika> no |
18:00:39 | FromDiscord | <Avatarfighter> rika how dare you |
18:00:45 | FromDiscord | <Rika> lmao |
18:00:48 | FromDiscord | <Avatarfighter> haha |
18:00:49 | FromDiscord | <Rika> wait |
18:00:53 | FromDiscord | <Rika> fuck dont you dare |
18:01:00 | FromDiscord | <Rika> :MonkaS: |
18:01:10 | FromDiscord | <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:11 | FromDiscord | <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:22 | Zevv | welcome to the wonderful world of cross compiling |
18:41:33 | disruptek | thanks, i hate it. |
18:42:36 | FromDiscord | <kodkuce> so doom i have to compile it on arm or what? |
18:42:49 | disruptek | Error: implicit object field construction requires a .partial object, but got TSym |
18:45:31 | FromDiscord | <kodkuce> any magic workflow @Zevv or not? |
18:47:54 | * | idf joined #nim |
18:48:43 | federico3 | kodkuce I'm crosscompiling for arm with almost no configuration |
18:50:06 | FromDiscord | <kodkuce> oh i think i get how this works |
18:50:34 | FromDiscord | <kodkuce> i build it but on arm it uses distro libcrypto i guess? |
18:50:51 | FromDiscord | <kodkuce> or i am wrong |
18:52:14 | Araq | it's 2020, setup a CI, "cross compile" and also run tests afterwards |
18:53:25 | FromDiscord | <kodkuce> to test i kinda need to deply it to arm cuz cant test arm bin on x86_64 |
18:53:52 | FromDiscord | <kodkuce> i wanted to build on pc cuz guess thats faster then on rpi |
18:54:20 | Araq | and then you re-deploy it manually and re-run your tests manually? |
18:54:39 | Araq | ok, sounds like a winning strategy to me. ;-) |
18:55:52 | shashlick | Do something like travister - make the CI an extended dev machine |
18:56:41 | shashlick | https://github.com/genotrance/travister |
18:56:48 | FromDiscord | <kodkuce> was that ironic Araq, i normal logic, cuz for me it sounded normal just duno xD |
18:59:17 | FromDiscord | <kodkuce> i newer used travis but can explor that relm too |
18:59:22 | Prestige | hm what's wrong with this code? It seems like the callback is never invoked https://play.nim-lang.org/#ix=2xkC |
19:06:00 | Prestige | Oh I have to manually poll to get the callbacks to run? |
19:06:15 | FromDiscord | <kodkuce> i duno :( |
19:10:25 | FromDiscord | <kodkuce> hmm can i use docker nimlan arm so i build from his libs |
19:10:40 | FromDiscord | <kodkuce> make that multystage dockerfiel |
19:20:30 | Prestige | Hm |
19:21:04 | Prestige | Does runForever() block? |
19:21:22 | FromDiscord | <kodkuce> https://hub.docker.com/r/nimlang/nim << no arm img ? |
19:21:43 | Zevv | runForever will block |
19:21:45 | Zevv | for ever |
19:24:01 | FromDiscord | <kodkuce> no arm in tags :( |
19:24:17 | Prestige | So I need to either do that or manually poll periodically for my callbacks to get invoked? Dang |
19:24:49 | Prestige | If not, I'm missing something |
19:26:53 | Zevv | you can register timers |
19:27:11 | disruptek | there's a poll and a drain. |
19:27:20 | disruptek | y'know, |
19:27:22 | disruptek | for chumps. |
19:28:08 | FromDiscord | <kodkuce> duno if i got it wrong shoudnet he just await that readAll and use it ? |
19:28:40 | FromDiscord | <kodkuce> why no ARM nim in dockerhub :( kmeeeeee |
19:29:23 | FromDiscord | <kodkuce> tough lol now when i think of it i cant run arm docker on x86 to link to arm xD |
19:29:24 | Prestige | I'm just trying to get callbacks working, it's an example |
19:30:21 | FromDiscord | <kodkuce> isent a callback just DO something on FINISH ? |
19:30:56 | Prestige | Yep |
19:32:04 | * | Zectbumo joined #nim |
19:33:50 | Prestige | E.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:18 | FromDiscord | <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:51 | FromGitter | <alehander92> oii |
19:55:01 | FromDiscord | <Avatarfighter> Prestige i can help π |
20:07:58 | * | gmaggior joined #nim |
20:13:08 | FromDiscord | <Avatarfighter> What would be the best way to have a nim config in a nimble project? |
20:13:19 | disruptek | project.nim.cfg |
20:13:53 | FromDiscord | <Avatarfighter> project being the name of the project or just as project? |
20:14:09 | disruptek | the name of the project. |
20:14:28 | FromDiscord | <Avatarfighter> Thank you disruptek |
20:15:51 | Prestige | @Avatarfighter I think a timer calling poll will be okay.. it wish the callbacks were just automatically invoked though |
20:16:21 | FromDiscord | <Avatarfighter> Yeah that put me off when I first tried using them |
20:17:17 | Prestige | I 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:45 | Aurora_v_kosmose | Is there any info somewhere about orc gc? |
20:39:49 | FromDiscord | <kodkuce> i want my bin to run on rpi4 but i dont want to build using rpi4, kmeeeeeee |
20:39:53 | FromDiscord | <kodkuce> :( |
20:40:27 | * | lritter joined #nim |
20:40:57 | * | Aurora_v_kosmose ponders cross-compilation |
20:46:15 | FromDiscord | <kodkuce> but how to cross-compile with -d:ssl |
20:47:16 | FromDiscord | <kodkuce> i gona try it and see if it works |
20:47:25 | FromDiscord | <Elegant Beef> does `nim c --cpu:arm -d:ssl --os:linux file.nim` not work? |
20:47:56 | FromDiscord | <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:32 | FromDiscord | <kodkuce> + target is alpine linux so its musl |
20:54:14 | FromDiscord | <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:09 | FromDiscord | <kodkuce> https://hastebin.com/uhosakuzig.coffeescript |
20:59:25 | FromDiscord | <Elegant Beef> Nice characters |
21:02:57 | FromDiscord | <kodkuce> worst thing now in my dir i got ??#@?W?@8?@%$??@@@h?h?????????????????????? |
21:03:05 | FromDiscord | <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:51 | FromDiscord | <Avatarfighter> Aurora_v_kosmose from what I understand orc is just arc except it can handle cyclic structures |
21:26:08 | disruptek | they gon', son. |
21:31:15 | FromDiscord | <Avatarfighter> Disruptek how are doing now |
21:31:19 | FromDiscord | <Avatarfighter> no longer pissed off I hope |
21:31:33 | FromDiscord | <Rika> hes always pissed off tho |
21:31:48 | disruptek | i dunno. |
21:31:48 | disruptek | trying to figure out what's up with ci. |
21:31:48 | disruptek | mangling appears to be green. |
21:32:11 | FromDiscord | <Avatarfighter> its fine Rika we can show him the disruptek fan art so he isn't pissed off anymore |
21:32:45 | disruptek | Araq: merge it quick before something breaks. π |
21:33:12 | disruptek | what happened to #15306? |
21:33:13 | disbot | https://github.com/nim-lang/Nim/pull/15306 -- 5optimized ORC further |
21:33:16 | Araq | link? |
21:33:37 | Araq | I now understand why the attempted optimization is impossible |
21:33:42 | disruptek | !pull author:disruptek mangling |
21:33:44 | disbot | https://github.com/nim-lang/Nim/pull/14632 -- 3porting name mangling from ic effort |
21:34:26 | disruptek | ci is green in my fork but i guess nim's needs a re-run. |
21:34:35 | disruptek | why is it impossible? |
21:35:13 | Araq | disruptek: will review it tomorrow or on monday, it's late |
21:35:26 | disruptek | okay, don't actually merge it. |
21:35:47 | Araq | well I might after review, why? |
21:36:05 | disruptek | i mean, i doubt it truly passes. i think something must be different about ci running on my nim repo. |
21:36:15 | disruptek | well, because for example jsonutils has seen no love. |
21:36:41 | disruptek | unless something else was bugged and is now coincidentally fixed, i don't expect it to pass. |
21:37:30 | disruptek | it'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:00 | FromDiscord | <kodkuce> anyone know can i maybe run an arm in vbox or quemu to build my app for rpi? |
21:39:17 | disruptek | why can't you use travis or github actions? |
21:39:23 | disruptek | both have arm support afaik. |
21:47:43 | Araq | disruptek: well it never made sense that jsonutils failed. so if you fixed/changed your mangling it might simply work |
21:48:42 | FromDiscord | <kodkuce> i tought travis is just a CI CD tool dident know it can crosscompile |
21:48:58 | FromDiscord | <kodkuce> but ye gitlab i think it has build pipeline |
21:49:00 | FromDiscord | <Rika> CIs do compilation so i dont see why they cant cross compile |
21:49:45 | FromDiscord | <kodkuce> cuz i tough if i want to compile to rpi4 i have to do it on arm64 |
21:50:07 | FromDiscord | <kodkuce> or if somone can point me how to crosscopile from pc to arm64 |
21:50:16 | FromDiscord | <kodkuce> nim c --gcc.exe:musl-gcc -d:ssl --cpu:arm64 server.nim |
21:50:27 | FromDiscord | <kodkuce> didident work out well for me |
21:51:23 | * | lritter quit (Ping timeout: 240 seconds) |
21:52:55 | FromDiscord | <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:57 | FromDiscord | <juan_carlos> You need `--gcc.linkerexe:musl-gcc --passL:-static --passC:-static` too. |
22:07:52 | FromDiscord | <juan_carlos> But yeah check that repo is cool. |
22:08:48 | FromDiscord | <Avatarfighter> so uh stupid question but what is the logger module used for |
22:08:55 | FromDiscord | <Avatarfighter> like when one would consider using it |
22:09:05 | FromDiscord | <Avatarfighter> and is there anything wrong with echoing my "logs" |
22:09:16 | FromDiscord | <juan_carlos> When you need a .log file. :P |
22:09:20 | FromDiscord | <Avatarfighter> ahah |
22:09:23 | FromDiscord | <Avatarfighter> Ok I see π |
22:10:22 | FromDiscord | <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:34 | FromDiscord | <Avatarfighter> Oh that's sick |
22:10:47 | FromDiscord | <Avatarfighter> Ok I'll incorporate logger into my project lol |
22:10:53 | FromDiscord | <Avatarfighter> You've sold me @juan_carlos |
22:11:17 | FromDiscord | <juan_carlos> 8 Gb is exagerated but yeah basically a huge txt file |
22:11:44 | FromDiscord | <Avatarfighter> I'm planning on running my thing without stopping for as long as I can |
22:11:50 | FromDiscord | <juan_carlos> I think it depends on the scale and purpose of the app. |
22:12:25 | FromDiscord | <juan_carlos> rotating file logger from logging module then. |
22:12:56 | FromDiscord | <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:23 | disruptek | i just roll dice. |
22:13:36 | FromDiscord | <kodkuce> sorry was afk phone call |
22:13:38 | FromDiscord | <Avatarfighter> can I do something like Python where I can do `except Exception1, Exception2 as e` followed by a fat if statement |
22:13:54 | FromDiscord | <juan_carlos> check the exception yeah |
22:13:59 | disruptek | except Exception1: ... except Exception2: ... |
22:13:59 | FromDiscord | <kodkuce> > You need `--gcc.linkerexe:musl-gcc --passL:-static --passC:-static` too.β΅@juan_carlos hmm its missing --cpu:arm64 |
22:14:06 | FromDiscord | <juan_carlos> also you can have several except branches |
22:14:11 | FromDiscord | <Avatarfighter> oh that's nice |
22:14:15 | FromDiscord | <Avatarfighter> I never knew that |
22:14:25 | FromDiscord | <Avatarfighter> I had really fucking complicated except statements before :L |
22:14:31 | FromDiscord | <juan_carlos> I said you need that *too* |
22:14:32 | disruptek | the dice work best. |
22:14:33 | FromDiscord | <kodkuce> and how can it pass my libssl when i am on 64bit pc, shoudnet i have to build libss arm64 too |
22:14:37 | FromDiscord | <kodkuce> will chekc link |
22:14:39 | FromDiscord | <juan_carlos> like to add that |
22:14:56 | FromDiscord | <juan_carlos> Add to the existing command |
22:15:49 | FromDiscord | <kodkuce> ok i build it will now cp to rpi4 and see if it carsh again |
22:18:14 | FromDiscord | <kodkuce> ./serv β΅./serv: line 1: syntax error: unexpected "(" |
22:18:25 | FromDiscord | <kodkuce> :( |
22:18:47 | FromDiscord | <kodkuce> nim c --gcc.linkerexe:musl-gcc --passL:-static --passC:-static --gcc.exe:musl-gcc --cpu:arm64 server.nim |
22:19:22 | FromDiscord | <kodkuce> and cp to rpi4 and runed and doom :( tough at least it didn not created that crazy file |
22:19:43 | FromDiscord | <juan_carlos> maybe like `--passL:"-static"` |
22:20:26 | FromDiscord | <juan_carlos> I think the compiler for ARM has different name tho... |
22:20:57 | FromDiscord | <juan_carlos> gcc-arm64-something-something at least on Arch. |
22:21:22 | * | Zectbumo quit (Remote host closed the connection) |
22:21:34 | FromDiscord | <kodkuce> cross-aarch64-linux-musl-0.33_3 |
22:21:54 | FromDiscord | <kodkuce> but i dont get any error when building with this up |
22:22:52 | FromDiscord | <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:14 | FromDiscord | <Rika> its --passL:-static |
22:23:16 | FromDiscord | <Rika> note the dash |
22:23:33 | FromDiscord | <juan_carlos> But musl-gcc is for x86 at least on Arch. And it should be -static with the - thingy. |
22:25:18 | FromDiscord | <Avatarfighter> Does anyone know if the norm library plays nice when its shoved in an async proc |
22:25:48 | FromDiscord | <kodkuce> duno i kinda lost you all |
22:26:00 | FromDiscord | <kodkuce> but i tryed whout any static too and still cant run |
22:33:16 | FromDiscord | <kodkuce> tryed kushmod nim musl -d:libressl --cpu:arm64 server.nim dident work :( |
22:33:21 | FromDiscord | <kodkuce> will try gitlab |
22:33:35 | FromDiscord | <kodkuce> but tommorow i go sleep now |
22:33:40 | FromDiscord | <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:11 | FromDiscord | <XxDiCaprioxX> sent a code paste, see https://play.nim-lang.org/#ix=2xlO |
22:47:21 | FromDiscord | <XxDiCaprioxX> And if yes how can I access the "najdorf" part? |
22:47:41 | FromDiscord | <XxDiCaprioxX> (edit) 'https://play.nim-lang.org/#ix=2xlO' => 'https://play.nim-lang.org/#ix=2xlP' |
22:48:05 | FromDiscord | <Rika> yes |
22:48:17 | FromDiscord | <Rika> yourJson["sicilian"]["najdorf"] |
22:48:38 | FromDiscord | <XxDiCaprioxX> And is there a way to automate? |
22:48:49 | FromDiscord | <Rika> what do you mean |
22:48:51 | FromDiscord | <XxDiCaprioxX> Like "sicilian" is a key, but what is "najdorf" |
22:49:08 | FromDiscord | <Rika> a key |
22:49:25 | FromGitter | <ynfle> Also, `yourJson{"sicilian", "najdorf"}` |
22:49:36 | FromDiscord | <Rika> thats another way to do it |
22:49:57 | FromDiscord | <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:20 | FromDiscord | <Rika> for i in json.keys: for j in i.keys: |
22:50:29 | FromDiscord | <XxDiCaprioxX> oh okay, perfect thank you |
22:50:37 | FromGitter | <ynfle> ```for i in json.keys: β for j in i.keys: β echo j``` [https://gitter.im/nim-lang/Nim?at=5f5d50bddf4af236f902fb1d] |
22:52:49 | FromDiscord | <XxDiCaprioxX> sent a code paste, see https://play.nim-lang.org/#ix=2xlQ |
22:52:56 | FromDiscord | <Rika> [] |
22:52:57 | FromDiscord | <Rika> not {} |
22:53:00 | FromDiscord | <XxDiCaprioxX> okay |
22:53:06 | FromDiscord | <Rika> for the najdorf part |
22:53:20 | FromDiscord | <XxDiCaprioxX> yes |
22:53:28 | FromDiscord | <XxDiCaprioxX> worked, thanks |
22:55:04 | FromGitter | <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:34 | FromDiscord | <XxDiCaprioxX> ``` for key1 in dbFile.keys:β΅ for key2 in key1.keys: ``` why does this not work? |
23:00:38 | * | abm joined #nim |
23:00:59 | FromDiscord | <Rika> it should |
23:01:05 | FromDiscord | <Rika> what is your error |
23:01:20 | FromDiscord | <XxDiCaprioxX> sent a code paste, see https://play.nim-lang.org/#ix=2xlU |
23:01:36 | FromDiscord | <Rika> ah i see |
23:02:09 | * | krux02 quit (Read error: Connection reset by peer) |
23:02:15 | FromDiscord | <Rika> you need to do β΅```for key1 in dbFile.keys:β΅ for key2 in dbFile[key1].keys:``` |
23:02:39 | FromDiscord | <XxDiCaprioxX> yup works, thank you |
23:02:52 | * | krux02 joined #nim |
23:04:17 | FromGitter | <ynfle> Is there a way to run `unittest` in memory? |
23:06:35 | FromDiscord | <juan_carlos> in memory?. |
23:06:44 | FromDiscord | <juan_carlos> What does that mean. |
23:07:47 | FromGitter | <ynfle> Like import a test file, run it and get the results without having to start another os process |
23:07:52 | FromGitter | <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:10 | FromDiscord | <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:46 | FromDiscord | <Avatarfighter> oh i have a similar question to ynfle's, can i load a dynlib from memory? |
23:26:50 | FromDiscord | <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:38 | FromDiscord | <juan_carlos> So in the end is not Nims but OS. |
23:27:53 | * | abm quit (Quit: Leaving) |
23:28:14 | FromDiscord | <Avatarfighter> damn |
23:29:31 | FromDiscord | <juan_carlos> You can compile the binary with it bundled tho. |
23:30:23 | FromDiscord | <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:24 | FromGitter | <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:19 | FromDiscord | <Rika> eh? i dont understand how nimc being in nim is relevant here |
23:46:23 | FromDiscord | <Elegant Beef> Nim can dynamically evaluate nimscript if you include the compiler |
23:46:53 | FromDiscord | <Elegant Beef> But dynamically compiling/including code seems questionable at best |
23:48:30 | FromGitter | <ynfle> Well the compiler be imported. @Elegant Beef, Is there a way to import nimscript functionality |
23:49:04 | FromDiscord | <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:11 | FromDiscord | <Elegant Beef> (edit) removed 'using' |
23:49:56 | FromDiscord | <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:22 | FromDiscord | <juan_carlos> Yep, works https://github.com/juancarlospaco/nim4py#nim4python |