00:14:04 | * | tane quit (Quit: Leaving) |
00:20:26 | * | D_ quit (Remote host closed the connection) |
00:20:30 | * | Tlangir quit (Ping timeout: 265 seconds) |
00:21:22 | * | D_ joined #nim |
00:25:12 | * | rockcavera is now known as Guest78996 |
00:25:13 | * | Guest78996 quit (Killed (tepper.freenode.net (Nickname regained by services))) |
00:25:14 | * | rockcavera joined #nim |
00:35:37 | * | D_ quit (Ping timeout: 250 seconds) |
00:37:41 | * | zacharycarter joined #nim |
00:38:38 | zacharycarter | Ugh - so my third RAM slot isn't posting as far as I can tell. The RAM I bought is RGB and one of the new sticks in the third slot is not lighting up. I know it's not the RAM because I tried putting it in the fourth slot and it posted |
00:39:01 | zacharycarter | Also - now discord just crashes on start, wtf... It continually tries to start and just keeps crashing and trying again |
00:39:01 | zacharycarter | so weird |
00:40:51 | zacharycarter | going to try to put ram in that slot and none in the fourth and see what happens... brb |
00:41:01 | * | zacharycarter quit (Read error: Connection reset by peer) |
00:41:42 | FromDiscord | <Zachary Carter> If anyone has any ideas tho I'm all ears |
00:45:27 | FromDiscord | <Zachary Carter> Hmm it definitely works with just ran in that slot |
00:45:29 | FromDiscord | <ElegantBeef> Sounds like a mobo issue, try a known good stick in third slot |
00:46:06 | FromDiscord | <Zachary Carter> So it's when I have a stick in both the 3rd and 4th slots that shit doesn't work |
00:46:12 | FromDiscord | <Zachary Carter> Weirddddd |
00:51:34 | FromDiscord | <Zachary Carter> Wewt |
00:51:44 | FromDiscord | <Zachary Carter> Moved some sticks around and |
00:51:54 | FromDiscord | <Zachary Carter> https://media.discordapp.net/attachments/371759389889003532/825170225670520842/20210326_195150.jpg |
00:52:17 | FromDiscord | <Zachary Carter> Now to figure out this discord thing... |
00:56:53 | leorize | @Zachary are you running on XMP? |
00:56:56 | leorize | and what CPU is that? |
00:58:07 | FromDiscord | <Zachary Carter> AMD Ryzen 7 2700X Wraithp |
00:58:15 | FromDiscord | <Zachary Carter> So no intel xmp |
01:00:50 | * | zacharycarter joined #nim |
01:00:55 | zacharycarter | well I guess I'm done with discord lol |
01:00:58 | zacharycarter | ]what the fuckkkkkkk |
01:01:33 | zacharycarter | it crashes on start and I've tried wiping everything in AppData, uninstalling it, rebooting, reinstalling it and same issue |
01:01:57 | leorize | your motherboard might call it DOCP or A-XMP |
01:02:00 | leorize | it's the same thing |
01:02:08 | leorize | are you using it? |
01:02:13 | leorize | and what ram is that? |
01:02:33 | * | D_ joined #nim |
01:02:38 | FromDiscord | <Zachary Carter> I'm not sure I'll have to look |
01:02:51 | leorize | are all of them come from the same kit? |
01:03:14 | FromDiscord | <Zachary Carter> They're all the same two are 8gb sticks and two are 16gb |
01:03:48 | FromDiscord | <Zachary Carter> It's all skillz triz d4 3200 rgb |
01:03:58 | leorize | that's very tight for your cpu |
01:04:11 | FromDiscord | <Zachary Carter> What do you mean right? |
01:04:15 | FromDiscord | <Zachary Carter> Tight? |
01:04:22 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:04:41 | * | njoseph joined #nim |
01:04:42 | leorize | and you're potentially mixing dual rank ram and single rank... |
01:05:05 | zacharycarter | Hmmmmm |
01:05:41 | zacharycarter | Well it seems to be working but :shrug: |
01:05:48 | zacharycarter | Unless the discord thing is somehow related |
01:06:13 | leorize | a ryzen 2000 series can barely achieve 3200MT/s with two sticks |
01:06:27 | leorize | get memtest86 and run a test |
01:06:33 | zacharycarter | Okay I'll do that now |
01:06:41 | leorize | it will take a few hours so be patient |
01:07:31 | zacharycarter | alright I will do it tonight then |
01:07:43 | zacharycarter | I'm going to try to figure out this discord thing in the mean time and try playing a game or two as well |
01:07:55 | leorize | I would advise against running unstable ram on your machine... |
01:08:08 | zacharycarter | oh |
01:08:14 | zacharycarter | okay well then I guess I will run it now |
01:08:22 | zacharycarter | :) let me find a flash drive |
01:10:20 | leorize | do you know what is your motherboard? |
01:10:23 | zacharycarter | yeah |
01:10:32 | zacharycarter | ASUS ROG STRIX B450F GAMNG ATX |
01:12:20 | leorize | if you're in a hurry and need your machine to be stable, just get to bios and turn off D.O.C.P. |
01:12:56 | leorize | turning that off will force the RAM to run under JEDEC, which is very lax and all RAM/CPU can handle |
01:12:59 | zacharycarter | okay cool I will do that now thanks |
01:13:24 | zacharycarter | brb |
01:13:55 | * | zacharycarter quit (Read error: Connection reset by peer) |
01:17:39 | FromDiscord | <Zachary Carter> Leorize: it's set to auto right now for Ai Overclock Tuner. The other options are manual and docp standard |
01:17:48 | FromDiscord | <Zachary Carter> Should I change it from auto? |
01:21:18 | leorize | @Zachary you'll have to google it, sorry, I don't own an asus board |
01:22:10 | FromDiscord | <Zachary Carter> Okay |
01:27:04 | leorize | though mixing dual rank and single rank RAM is pretty dangerous (or at least not a common case) |
01:27:31 | leorize | 16gb dimms are usually dual rank and 8gb dimms are usually single rank, hence my guess |
01:30:14 | FromDiscord | <Zachary Carter> Hmmm let me try to find out |
01:31:54 | * | zacharycarter joined #nim |
01:32:19 | zacharycarter | leorize: I'm not sure how to determine if the ram is single or dual rank, but this is the ram I originally ordered with the machine: https://www.microcenter.com/product/478373/gskill-trident-z-rgb-16gb-(2-x-8gb)-ddr4-3200-pc4-25600-cl16-dual-channel-desktop-memory-kit-f4-320016d-16gtzr---black |
01:33:02 | zacharycarter | and here's the ram I just installed: https://www.amazon.com/gp/product/B07DMNZY56/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1 |
01:33:23 | FromDiscord | <JSGRANT> Ahhh; They're multiplying! :^))) https://media.discordapp.net/attachments/371759389889003532/825180667683667978/unknown.png |
01:34:52 | FromDiscord | <JSGRANT> I have 32gb of Ram in my low-profile workstation pooter; And I literally know nothing about it besides its DDR3. loool |
01:37:24 | leorize[m] | zacharycarter: you can usually make an educated guess by looking under the heatspreader. If there are chips on both sides, then it's very likely to be dual rank, otherwise single rank |
01:37:42 | zacharycarter | okay let me look |
01:37:51 | * | wasted_youth2 quit (Ping timeout: 245 seconds) |
01:37:55 | leorize[m] | there's also a software known as typhoon burner that can read from ram chips and let you know the exact details |
01:38:27 | * | wasted_youth2 joined #nim |
01:41:27 | zacharycarter | okay I installed typhoon burner and yeah I have mixed ranks |
01:41:37 | zacharycarter | I'll order two more 8gb sticks and just use these 16gb in something else |
01:42:05 | zacharycarter | thanks for the help and protips leorize! for now I'll take the new ram out |
01:42:50 | leorize[m] | you're welcome |
01:48:08 | * | zacharycarter quit (Read error: Connection reset by peer) |
02:00:31 | ForumUpdaterBot | New thread by Tsojtsoj: How to best access a potentially const variable in a func that is to big for default stack?, see https://forum.nim-lang.org/t/7704 |
02:00:46 | * | aeverr quit (Ping timeout: 240 seconds) |
02:01:09 | * | aeverr joined #nim |
03:00:48 | FromDiscord | <Zachary Carter> Streaming on twitch if anyone wants to watch / join me: https://dashboard.twitch.tv/u/hahahaitsfunny |
03:04:02 | Prestige | dashboard link eh |
03:04:54 | FromDiscord | <Zachary Carter> OH SORRY |
03:05:09 | FromDiscord | <Zachary Carter> https://www.twitch.tv/hahahaitsfunny |
03:05:11 | FromDiscord | <Zachary Carter> I'm nubs at twitch |
03:10:07 | FromDiscord | <Zachary Carter> No it's not code Prestige haha |
03:10:13 | Prestige | :P |
03:26:46 | * | wasted_youth2 quit (Quit: Leaving) |
03:37:00 | saem | I wanted code. 😓 |
03:43:38 | FromDiscord | <ElegantBeef> Prestige are you using nimscript still or waiting for that PR to be accepted? |
03:44:58 | Prestige | Waiting for the merge |
03:46:53 | FromDiscord | <ElegantBeef> Yea i'm 90% certain it's fine, but i might've missed some weird side effect it causes 😄 |
03:47:11 | FromDiscord | <Zachary Carter> I'll stream some code this weekend maybe |
03:54:20 | * | zedeus quit (Ping timeout: 246 seconds) |
03:55:35 | * | zedeus joined #nim |
03:58:03 | Prestige | we should have bugged araq about it Beef :P |
04:02:44 | FromDiscord | <ElegantBeef> I dont bug anyone |
04:05:39 | * | rockcavera quit (Remote host closed the connection) |
04:41:38 | FromGitter | <bung87> does nim has mkdirp? |
04:42:05 | FromDiscord | <Rika> In reply to @ElegantBeef "I dont bug anyone": lies |
04:44:10 | FromDiscord | <ElegantBeef> Hey being annoying and purposely bugging people are two different things |
04:44:18 | FromGitter | <bung87> createDir is.. |
04:45:39 | FromDiscord | <ElegantBeef> yea create dir should do the same |
04:46:39 | FromGitter | <bung87> I previous use existsOrCreateDir that doesn't do as I expected |
04:46:57 | FromDiscord | <ElegantBeef> yea it doesnt create any other directories other than the last one |
04:47:00 | FromDiscord | <ElegantBeef> Says so in the docs |
04:48:17 | FromDiscord | <ElegantBeef> createDir doesnt error if the directory already exists, so aslong as you properly cache it it's fine |
04:48:19 | FromDiscord | <zajrik> Anyone know how I can get type of a ref object? I can iterate all the fields of of a non-ref object with `for field in obj.getType()[2]` but that breaks if it's a ref object. I can deref the object before passing but I'd like to accept ref and non-ref |
04:48:26 | FromDiscord | <ElegantBeef> catch not cache 😄 |
04:49:42 | FromDiscord | <zajrik> This is the code in question: |
04:49:53 | FromDiscord | <zajrik> sent a code paste, see https://play.nim-lang.org/#ix=2Uea |
04:50:17 | FromDiscord | <ElegantBeef> Oh you can handle it in the macro |
04:50:42 | FromDiscord | <ElegantBeef> Since it's typed you can `getImpl` and return the type section it was declared in |
04:51:50 | FromDiscord | <zajrik> Got an example? :ablobsweats: |
04:51:55 | FromDiscord | <ElegantBeef> One second |
04:51:57 | FromDiscord | <zajrik> I barely understand what I'm doing lol |
04:54:20 | FromDiscord | <ElegantBeef> Also you know you dont need `: TheType` everywhere right? |
04:54:53 | FromDiscord | <zajrik> I prefer to explicitly declare types |
04:54:54 | FromDiscord | <zajrik> always have |
04:54:58 | FromDiscord | <ElegantBeef> Ah |
04:55:02 | FromDiscord | <ElegantBeef> Makes it annoying to modify 😄 |
04:55:06 | FromDiscord | <zajrik> I've never like implicit typing in any lang :p |
04:55:58 | FromDiscord | <zajrik> I tend to spend long periods of time not programming due to lack of motivation so explicit typing helps me remember what things are easier when I come back to it way later on |
04:56:57 | FromDiscord | <ElegantBeef> Here you go https://play.nim-lang.org/#ix=2Ueb |
04:57:54 | FromDiscord | <zajrik> Thank you! |
04:59:11 | * | spiderstew joined #nim |
04:59:28 | FromDiscord | <ElegantBeef> Also worth noting your macro will explode with a object variant 😄 |
04:59:34 | FromDiscord | <ElegantBeef> Atleast i think so |
04:59:59 | * | spiderstew_ quit (Ping timeout: 245 seconds) |
05:01:12 | FromDiscord | <zajrik> oh fun lol |
05:01:13 | FromDiscord | <ElegantBeef> Yep, can see why here https://play.nim-lang.org/#ix=2Uee |
05:02:02 | FromDiscord | <ElegantBeef> you just need to check when creating the declarations if it's a `reclist` then if so iterate over all children emitting the `sym` nodes, which are rather easy to extract 😄 |
05:02:25 | FromDiscord | <zajrik> Cool cool cool, idk how to do that either lmao |
05:02:32 | leorize | we have std/with and zevv/with btw |
05:02:58 | FromDiscord | <ElegantBeef> leorize you cannot point that out you have to let them make their own then point it out |
05:03:13 | FromDiscord | <ElegantBeef> Learning macros is a great thing to do |
05:03:22 | FromDiscord | <ElegantBeef> Though it's a lot of what i do, so i'm a biased numpty |
05:03:36 | FromDiscord | <zajrik> buuuuut I have a very specific usecase for this macro so I'm fine with it not supporting case objects |
05:03:53 | FromDiscord | <ElegantBeef> Seems your main thing is just unpacking objects |
05:04:19 | leorize | we do have an unpack library :P |
05:04:47 | FromDiscord | <ElegantBeef> Well they're unpacking to immutable objects |
05:05:00 | FromDiscord | <zajrik> I just want to expose the object fields within a block because wnim's autolayout doesn't support accessing values on an object |
05:05:05 | leorize | does the pattern matching unpacker not support that? |
05:05:32 | FromDiscord | <ElegantBeef> No clue really |
05:05:33 | FromDiscord | <zajrik> sent a code paste, see https://play.nim-lang.org/#ix=2Ueg |
05:05:33 | FromDiscord | <zajrik> I did it with pattern matching first |
05:05:46 | FromDiscord | <zajrik> but I wanted to use a macro to reduce all that duplication |
05:05:59 | FromDiscord | <zajrik> also I don't think std/with does what I'm trying to accomplish here |
05:06:18 | FromDiscord | <ElegantBeef> does it not using `.field` |
05:06:24 | FromDiscord | <ElegantBeef> Or am i thinking of a different with macro |
05:06:40 | leorize | https://github.com/Zevv/with |
05:06:54 | FromDiscord | <zajrik> nah, it won't let me do like `H:|-{self.foo}-|` |
05:07:17 | FromDiscord | <zajrik> That one DOES do what I want, leo lol |
05:07:27 | FromDiscord | <zajrik> but it was nice to figure this out myself (with help) |
05:08:44 | FromDiscord | <zajrik> oh, actually, looking at the readme, that might not work |
05:08:53 | leorize | we should probably make std/with match `_` in more than one position :P |
05:09:14 | FromDiscord | <zajrik> it says it expands the fields to templates of the same name, which I can't imagine would work with the autolayout macro |
05:10:18 | FromDiscord | <ElegantBeef> I'm a little scared of autolayout since it uses a string |
05:10:23 | FromDiscord | <zajrik> mhmm |
05:10:31 | FromDiscord | <zajrik> It took me a while to figure it out lol |
05:10:56 | leorize | what does autolayout do that the layout dsl doesn't? |
05:10:56 | FromDiscord | <ElegantBeef> yea i dont know what it's doing so dont know why it uses a string |
05:11:19 | FromDiscord | <zajrik> it's easier for me to understand? idk lol |
05:11:31 | FromDiscord | <zajrik> maybe I'll try the layout dsl |
05:11:43 | FromDiscord | <ElegantBeef> What library is that again? |
05:12:06 | FromDiscord | <zajrik> wnim |
05:12:23 | FromDiscord | <zajrik> https://github.com/khchen/wNim |
05:12:39 | FromDiscord | <ElegantBeef> Ah windows centric, explained why i've never seen that before 😄 |
05:14:01 | FromDiscord | <zajrik> yeah. I didn't need cross-platform for this project since it's just a work util and we work on windows at work |
05:14:17 | FromDiscord | <zajrik> and also I use windows when working from home |
05:19:59 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
05:20:08 | * | njoseph joined #nim |
05:20:38 | FromDiscord | <zajrik> ugh now you got me determined to try and support case objects lol |
05:20:42 | FromDiscord | <zajrik> just for the hell of it |
05:20:43 | FromDiscord | <ElegantBeef> lol |
05:20:53 | FromDiscord | <zajrik> It'll be a good learning experience |
05:21:03 | FromDiscord | <ElegantBeef> Well i gave your a breadcrumb in the link that fails |
05:21:09 | FromDiscord | <ElegantBeef> (edit) "your" => "you" |
05:21:19 | FromDiscord | <ElegantBeef> Prints out the tree of the returned type |
05:21:27 | FromDiscord | <zajrik> mhmm, I'm looking at that now |
05:21:59 | FromDiscord | <ElegantBeef> Well if you give up or want a look at your impl feel free to ping me 😄 |
05:22:13 | FromDiscord | <zajrik> I probably will |
05:22:15 | FromDiscord | <zajrik> :drakeLUL: |
05:23:13 | * | casaca quit (Remote host closed the connection) |
05:24:18 | * | casaca joined #nim |
05:26:43 | FromDiscord | <zajrik> I think I have somewhat of an idea of how to go about it thanks to your help. I mostly just had no idea how to access things on nim nodes and stuff |
05:26:47 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
05:27:10 | * | Gustavo6046 joined #nim |
05:35:24 | FromDiscord | <zajrik> Changed my mind. No idea what I'm doing |
05:35:27 | FromDiscord | <ElegantBeef> Lol |
05:35:27 | FromDiscord | <zajrik> :blobfingerguns: |
05:44:12 | FromDiscord | <Rika> am i using gcov improperly? some lines (like blank lines and comment-only lines) show run counts |
05:44:36 | leorize[m] | you're using it properly |
05:44:53 | FromDiscord | <Rika> so whats the issue then ._. |
05:45:24 | leorize[m] | the line directives in C are not properly scoped |
05:45:36 | leorize[m] | not something we can ever fix |
05:45:46 | FromDiscord | <Rika> unfortunate |
05:46:02 | FromDiscord | <Rika> anything better i can use for code cov without me putting pragmas on my library code? |
05:46:24 | leorize[m] | if we ever get native llvm support it would be simpler |
05:46:56 | leorize[m] | since llvm has source-based coverage |
05:47:48 | leorize[m] | @Rika you'll need to write one of those "coverage data cleaner" tool |
05:47:56 | leorize[m] | that's the best bet |
05:48:01 | FromDiscord | <Rika> ive never heard of such thing |
05:48:10 | FromDiscord | <Rika> ill look at it |
05:48:22 | leorize[m] | basically something that parses gcov output and try to "fix" it |
05:48:53 | leorize[m] | C++ got a fair share of those afair |
05:50:58 | leorize[m] | gcovr is a tool that can do this for c++ source |
05:52:23 | FromDiscord | <ElegantBeef> @zajrik here you go 😛 https://play.nim-lang.org/#ix=2Uen |
05:52:34 | FromDiscord | <ElegantBeef> Though doesnt work for `else` branches 😄 |
05:52:53 | FromDiscord | <zajrik> lmao |
05:55:06 | FromDiscord | <zajrik> still more or less over my head :drakeLUL: |
05:55:30 | FromDiscord | <zajrik> why doesn't it work with else branches? Is it not just another branch that would come up when iterating them? |
05:56:41 | FromDiscord | <ElegantBeef> Well it just requires getting all the values from the branches and injecting them in a silly `if kind != a and kind != b....` |
05:57:20 | FromDiscord | <zajrik> oof, okay that makes sense. I was anticipating something like that which is part of why I gave up |
05:57:35 | FromDiscord | <ElegantBeef> It's not overly difficult, just annoying 😄 |
05:58:17 | * | narimiran joined #nim |
06:09:12 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:57:23 | * | lritter joined #nim |
07:27:24 | * | waleee-cl joined #nim |
07:31:33 | * | haxscramper joined #nim |
08:18:27 | * | ^Q-Master^ quit (Ping timeout: 248 seconds) |
08:22:18 | * | Q-Master joined #nim |
08:38:03 | * | narimiran quit (Quit: leaving) |
08:38:41 | * | NimBot joined #nim |
08:54:36 | FromGitter | <gogolxdong> Anyone know how to listen on ipv6 with geth, which is Ethereum Go client. |
08:56:10 | * | superbia joined #nim |
09:05:23 | ForumUpdaterBot | New thread by Drkameleon: Demystifying nimDecRefIsLast, see https://forum.nim-lang.org/t/7705 |
09:37:50 | * | shirty joined #nim |
10:43:41 | * | wasted_youth2 joined #nim |
10:57:09 | * | Gustavo6046 quit (Ping timeout: 252 seconds) |
11:01:23 | * | Gustavo6046 joined #nim |
11:06:27 | FromDiscord | <hamidb80> does let <varname> = `x` copy `x`? |
11:06:54 | FromDiscord | <hamidb80> if x is seq |
11:07:40 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/825325194070458368/Screenshot_2.png |
11:07:41 | * | Gustavo6046 quit (Ping timeout: 240 seconds) |
11:07:41 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/825325195287986236/Screenshot_3.png |
11:09:06 | FromDiscord | <hamidb80> here `org` modifies when i delete something from `m` |
11:10:17 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/825325849069879316/unknown.png |
11:10:45 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/825325965693419550/unknown.png |
11:12:10 | FromDiscord | <haxscramper> You create `m` and work on it all the time. Or I'm missing where you assign from `m`. |
11:12:18 | FromDiscord | <haxscramper> You do `var m = ` and then `m.del |
11:12:20 | FromDiscord | <haxscramper> (edit) "`m.del" => "`m.del`" |
11:13:06 | FromDiscord | <hamidb80> In reply to @haxscramper "You create `m` and": m assings in line 23 - you can see it in the pic |
11:13:21 | FromDiscord | <hamidb80> (edit) "m assings" => "`m` assigns" |
11:14:16 | * | Gustavo6046 joined #nim |
11:14:22 | FromDiscord | <hamidb80> shouldn't `org` copy `m` in line 25? |
11:16:35 | FromDiscord | <haxscramper> Ah, yes, sorry. But I think `let` copies sequence full - https://play.nim-lang.org/#ix=2Ufi |
11:17:46 | FromDiscord | <hamidb80> your code works fine |
11:18:09 | FromDiscord | <hamidb80> but i have no idea whats going on in my code |
11:18:28 | FromDiscord | <haxscramper> Can you send the whole code, not just screenshot |
11:18:34 | FromDiscord | <haxscramper> (edit) "screenshot" => "screenshot?" |
11:20:09 | FromDiscord | <hamidb80> In reply to @haxscramper "Can you send the": https://github.com/hamidb80/chem-balancer/blob/master/nim/src/solver.nim#L21-L42 |
11:22:08 | * | Vladar joined #nim |
11:25:01 | * | vicfred quit (Quit: Leaving) |
11:25:07 | FromDiscord | <haxscramper> Strange. Example code that also uses `seq[seq[ref T]]` (which is closer to your implementation) also does work perfectly fine https://play.nim-lang.org/#ix=2Ufn |
11:29:51 | FromDiscord | <hamidb80> yeah that's intresting |
11:41:17 | FromDiscord | <hamidb80> i can even reproduce this into another code |
11:42:04 | FromDiscord | <hamidb80> (edit) "can" => "can't" |
11:46:15 | * | m4r35n357 joined #nim |
12:10:48 | * | Vladar quit (Quit: Leaving) |
12:41:16 | FromDiscord | <clyybber> @hamidb80 use --gc:arc; on refc let has slightly different semantics |
12:44:25 | * | superbia quit (Quit: WeeChat 3.1) |
12:47:28 | FromDiscord | <dom96> how does cacert.pem end up in Nim's bin folder? https://github.com/nim-lang/nimble/issues/904 |
13:00:06 | * | superbia joined #nim |
13:13:26 | * | Vladar joined #nim |
13:33:23 | * | rockcavera joined #nim |
13:56:44 | FromDiscord | <hamidb80> In reply to @haxscramper "Strange. Example code that": hey i found the bug |
13:56:55 | FromDiscord | <hamidb80> put that code inside a proc |
13:58:05 | FromDiscord | <haxscramper> In reply to @Clyybber "<@!745944009918251010> use --gc:arc; on": https://play.nim-lang.org/#ix=2Ug2 is this an expected behavior on default GC? |
13:59:24 | FromDiscord | <haxscramper> In reply to @hamidb80 "put that code inside": Assigning to `var` fixes the issue, but I find it very strange |
14:00:44 | FromDiscord | <haxscramper> Because it basically the same as using `unsafeAddr` on let and implicitly mutating immutable variable as a result. Not something you would expect - I though that assigning from `seq[]` always copies because it has value semantics |
14:01:06 | FromDiscord | <clyybber> @haxscramper It's kind of a bug, but the reasoning was that let mimicked parameter passing behaviour |
14:01:08 | FromDiscord | <clyybber> https://github.com/nim-lang/Nim/issues/2314 |
14:01:34 | FromDiscord | <clyybber> it's fixed with gc:arc |
14:01:47 | FromDiscord | <clyybber> so there's less incentive to fix it for refc |
14:01:57 | FromDiscord | <clyybber> especially since the fix changes semantics and performance |
14:01:57 | ForumUpdaterBot | New Nimble package! icon - Generate icon files from PNG files., see https://github.com/bung87/icon |
14:03:04 | FromDiscord | <hamidb80> ok, what gc should i use? |
14:03:50 | FromDiscord | <haxscramper> orc will be a new default, arc if you don't have cycles. Or you can just assign to `var` - it will copy |
14:08:46 | FromDiscord | <hamidb80> In reply to @haxscramper "Because it basically the": value semantic? could you suggest any article about it? |
14:09:18 | FromDiscord | <hamidb80> (edit) "could" => "do" |
14:09:47 | FromDiscord | <hamidb80> (edit) removed "do you suggest any article about it?" |
14:19:47 | FromDiscord | <hamidb80> https://media.discordapp.net/attachments/371759389889003532/825373538584231956/unknown.png |
14:20:33 | FromDiscord | <hamidb80> where can i see the exact implementation of these codes? |
14:21:26 | FromDiscord | <clyybber> they are implemented in the compiler |
14:21:48 | FromDiscord | <hamidb80> In reply to @Clyybber "they are implemented in": so, i can't see them |
14:21:51 | FromDiscord | <hamidb80> (edit) "them" => "them?" |
14:24:03 | saem | You absolutely can, the compiler is written in nim |
14:24:06 | FromDiscord | <clyybber> In reply to @hamidb80 "so, i can't see": https://github.com/nim-lang/Nim/blob/devel/compiler/vmgen.nim#L1081 for the VM and https://github.com/nim-lang/Nim/blob/devel/compiler/ccgexprs.nim#L636 for the C backend and https://github.com/nim-lang/Nim/blob/devel/compiler/jsgen.nim#L394 for the JS backend |
14:24:35 | saem | It might not always be easy to grok but don't shy away from the compiler. |
14:24:52 | FromDiscord | <hamidb80> tnx |
14:34:58 | * | superbia quit (Quit: WeeChat 3.1) |
15:08:24 | * | l1x quit (Quit: Connection closed for inactivity) |
15:28:36 | FromDiscord | <Rika> why do norm models have to be inherited? |
15:28:48 | FromDiscord | <zetashift> Did anyone get `neovim` + `compe.nvim` + `nim.nvim` working by any chance? |
15:30:53 | FromDiscord | <zetashift> I guess I could just use lspconfig and nimlsp |
15:31:52 | FromDiscord | <Lefl> Hey, how do I convert a float to int without rounding it? |
15:32:01 | liblq-dev | you can't |
15:32:06 | liblq-dev | an int has no decimal places |
15:32:18 | liblq-dev | so you have to round the float first |
15:32:23 | FromDiscord | <Lefl> Nah that's not what I meant |
15:32:34 | FromDiscord | <shirleyquirk> do you want to round down? floor(float) |
15:32:39 | FromDiscord | <Lefl> Hmm |
15:32:43 | FromDiscord | <Lefl> Yes |
15:32:46 | liblq-dev | i suppose `x.int`? |
15:33:10 | FromDiscord | <Lefl> Yeah |
15:33:14 | liblq-dev | though using `x.int` will truncate instead of rounding |
15:33:33 | FromDiscord | <Lefl> Yeah that's exactly what I want |
15:33:34 | FromDiscord | <Lefl> Thanks |
15:33:43 | liblq-dev | !eval import std/math; echo (int(-1.2), floor(-1.2).int) |
15:33:45 | NimBot | (-1, -2) |
15:33:59 | liblq-dev | ^ keep this in mind |
15:34:15 | FromDiscord | <Lefl> Why does floor round up? |
15:34:24 | FromDiscord | <shirleyquirk> it rounds towards zero |
15:34:33 | FromDiscord | <shirleyquirk> wait. |
15:34:37 | FromDiscord | <Lefl> Yeah |
15:34:52 | FromDiscord | <shirleyquirk> ok, towards negative infinity then |
15:35:27 | FromDiscord | <Lefl> Oh wait |
15:35:39 | FromDiscord | <Lefl> I've got confused by the `-` haha |
15:36:00 | FromDiscord | <Lefl> Thanks again |
15:37:24 | liblq-dev | yeah, just converting to `int` truncates the floating point part (so effectively rounds towards 0) and `floor` rounds towards -∞ |
15:37:48 | FromDiscord | <shirleyquirk> nice catch liblq |
15:38:57 | liblq-dev | yeah it bit me in the ass when i was dealing with infinite tilemaps made up of chunks so i thought i'd bring it up here |
15:41:22 | FromDiscord | <shirleyquirk> i should have remembered, i wrote a bithacking floor function just a couple weeks ago |
15:42:32 | FromDiscord | <Lefl> btw what are you guys making in nim? |
15:52:24 | ForumUpdaterBot | New thread by Jseb: Respecting the conventions when declaring a function pointer in a tuple, see https://forum.nim-lang.org/t/7706 |
16:05:29 | * | lritter quit (Ping timeout: 246 seconds) |
16:07:31 | FromDiscord | <exelotl> hey, does anyone have an idea how to debug an `ld` failure like this? https://media.discordapp.net/attachments/371759389889003532/825400652083232818/unknown.png |
16:08:16 | FromDiscord | <exelotl> it's basically just saying "ld failed" without telling me why... |
16:10:32 | FromDiscord | <Zachary Carter> Might need to update gcc? I don't know |
16:11:47 | FromDiscord | <Zachary Carter> Have you tried copying and pasting the command that is produced there and executing it without Nim in the picture? |
16:12:26 | FromDiscord | <Zachary Carter> the one that invokes `arm-none-eabi-gcc.exe` ? |
16:15:27 | FromDiscord | <exelotl> oh that sounds sensible, I'll try that |
16:22:23 | FromDiscord | <exelotl> it still gives the same error, basically no useful info :( https://media.discordapp.net/attachments/371759389889003532/825404393447882792/unknown.png |
16:22:36 | FromDiscord | <exelotl> 53 is the number of files |
16:23:41 | FromDiscord | <Zachary Carter> hmm is there like a verbose option to GCC? |
16:24:06 | FromDiscord | <Zachary Carter> try throwing a `-v` in there @exelotl |
16:24:21 | FromDiscord | <Zachary Carter> before the `-o` |
16:28:00 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/825405804177784862/unknown.png |
16:28:19 | FromDiscord | <flywind> what's purpose for this? |
16:29:51 | FromDiscord | <flywind> https://media.discordapp.net/attachments/371759389889003532/825406273037664266/unknown.png |
16:38:51 | FromDiscord | <treeform> In reply to @flywind "what's purpose for this?": I did not write that code, but I do use similar construct in my code, its so that I don't have to cut parts of strings out which creates new allocations, I can just pass a region of the string to operate on. Its performance thing for me to reduce allocations and copies. |
16:39:21 | FromDiscord | <Rika> so when views are stable that will be deprecated right? |
16:40:06 | FromDiscord | <Solitude> In reply to @treeform "I did not write": you can pass region with just openarray |
16:40:08 | FromDiscord | <treeform> I don't know. Its very easy to use. Views have to give some thing that is so good... |
16:40:55 | FromDiscord | <treeform> In reply to @Solitude "you can pass region": I basically don't use openarray because it gives me strange compile errors some times. |
16:41:09 | FromDiscord | <Rika> perhaps sooner or later [n..m] will be a view |
16:41:55 | FromDiscord | <dk> wouldn't that break backward compatibility |
16:43:45 | FromDiscord | <exelotl> In reply to @Zachary Carter "try throwing a `-v`": aaaaah it's because the toolchain has an important folder with DLLs and such which is _not_ added to the PATH as part of the installation (nor does it tell you to do so) |
16:44:37 | FromDiscord | <exelotl> thoughout my nimscript I've been sure to use the full path any time I use a program from that folder... but that won't help for the DLLs |
16:46:24 | * | rockcavera quit (Ping timeout: 246 seconds) |
16:46:51 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2Uhd |
17:26:48 | FromDiscord | <jfmonty2> Is it possible to define a proc that takes two openArray arguments, both of which default to empty sequences if not given? E.g. https://play.nim-lang.org/#ix=2Uhy |
17:28:43 | FromDiscord | <shirleyquirk> sure: https://play.nim-lang.org/#ix=2Uhz |
17:28:55 | FromDiscord | <shirleyquirk> just need to specify the types |
17:30:10 | FromDiscord | <jfmonty2> Oh I see, I was missing the [int] |
17:30:46 | FromDiscord | <shirleyquirk> yep, either there or make the proc openarray[int] |
17:32:39 | ForumUpdaterBot | New thread by Lhupfeldt: Testament documentation - test-case, test-step, setup, tearDown, see https://forum.nim-lang.org/t/7707 |
17:34:39 | ForumUpdaterBot | New thread by Stefan_Salewski: Initializing subclassed objects, like C++ Constructors, see https://forum.nim-lang.org/t/7708 |
17:36:14 | * | vicfred joined #nim |
17:37:17 | * | arecaceae quit (Remote host closed the connection) |
17:38:24 | * | arecaceae joined #nim |
17:40:02 | Prestige | @ElegantBeef did CI pass on your PR btw? |
17:52:11 | * | shirty quit (Remote host closed the connection) |
17:56:43 | FromDiscord | <no name fits> hey guys. What's the recommended way to test performance on Windows? |
18:09:41 | * | tane joined #nim |
18:21:45 | * | Gustavo6046 quit (Ping timeout: 240 seconds) |
18:30:09 | * | jess quit () |
18:30:34 | * | Gustavo6046 joined #nim |
18:33:11 | reversem3 | What are more people using for interfacing with arduino based boards |
18:33:48 | reversem3 | right now I'm looking at https://github.com/markspanbroek/nim-arduino and https://github.com/zevv/nim-arduino |
18:35:59 | * | krux02 joined #nim |
18:56:39 | FromDiscord | <gruebite> what can macros do that templates can't? |
18:59:29 | FromDiscord | <haxscramper> Perform transformations based on user-defined logic |
19:00:41 | FromDiscord | <haxscramper> So template just fills in parts of the code based on your arguments, |
19:01:06 | FromDiscord | <haxscramper> And in macro you can create completely custom AST shape |
19:22:33 | * | hsh joined #nim |
19:32:41 | * | xet7 quit (Remote host closed the connection) |
19:33:51 | FromDiscord | <haxscramper> Is it possible to push additional stack trace entry in the code? I want to get better naming for anonymous callbacks (right now I just get `:anonymous`, which is not really informative) |
19:37:46 | FromDiscord | <shirleyquirk> theres stuff in macros that lets you attach lineinfo to a NimNode...dunno if that helps |
19:38:39 | FromDiscord | <haxscramper> It is useful for making good stack trace positions from macro-generated code, but sadly it doesn't allow creating new entries if I remember correctly |
19:38:50 | FromDiscord | <shirleyquirk> not that i can see |
19:40:47 | FromDiscord | <haxscramper> Although I can always `{.emit: "nimfr_("procname", "filename");".}` |
19:41:30 | FromDiscord | <shirleyquirk> https://github.com/nim-lang/Nim/issues/5617 |
19:41:56 | FromDiscord | <shirleyquirk> https://github.com/nim-lang/Nim/blob/3e7077ac7d2f4867ecabff09b730b6bc9356979d/tests/macros/tmacros_various.nim#L92 |
19:42:01 | FromDiscord | <shirleyquirk> maybe? |
19:43:40 | FromDiscord | <haxscramper> There is also a `{.line:.}` pragma that allows to set lineinfo information for a block of code, but that's now what I'm looking for |
19:45:46 | FromDiscord | <shirleyquirk> i think i get what you're after, the raw emit might be the thing |
19:46:47 | FromDiscord | <shirleyquirk> de-anonymize the anonymous |
19:48:57 | FromDiscord | <haxscramper> https://play.nim-lang.org/#ix=2Uih yes, it works, though it is not particularly pretty |
19:53:08 | FromDiscord | <shirleyquirk> {.line: ("custom message",0).}: |
19:53:15 | FromDiscord | <shirleyquirk> does the same kinda thing |
20:04:33 | * | leorize quit (Remote host closed the connection) |
20:05:14 | * | leorize joined #nim |
20:26:04 | * | haxscramper quit (Remote host closed the connection) |
20:26:30 | * | haxscramper joined #nim |
20:27:01 | * | haxscramper quit (Remote host closed the connection) |
20:28:48 | * | Jesin joined #nim |
20:47:10 | * | valorzard joined #nim |
20:53:22 | FromDiscord | <Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2Uiu |
20:54:04 | FromDiscord | <Zachary Carter> 😑 |
21:04:46 | FromDiscord | <ElegantBeef> Prestige it always passed |
21:04:52 | * | arecaceae quit (Remote host closed the connection) |
21:05:11 | * | arecaceae joined #nim |
21:06:48 | Prestige | Cool stuff |
21:06:56 | Prestige | we should merge that puppy down |
21:09:34 | FromDiscord | <ElegantBeef> Well go petition a core member 😛 |
21:24:51 | FromDiscord | <no name fits> How would you guys measure "robustness" of software? |
21:25:03 | FromDiscord | <ElegantBeef> Whether an idiot can use it without self imolating |
21:25:19 | FromDiscord | <no name fits> I mean |
21:27:26 | FromDiscord | <zetashift> In reply to @no name fits "How would you guys": How close it looks like mratsims code |
21:27:48 | FromDiscord | <zetashift> Or treeforms |
21:28:52 | FromDiscord | <no name fits> I see |
21:29:25 | FromDiscord | <no name fits> So it's not a well defined topic, I take it |
21:31:35 | FromDiscord | <ElegantBeef> Zeta you left out the lower end of the scale, if it looks like my code it's probably not 😄 |
21:33:47 | FromDiscord | <no name fits> It's just "robustness" pops up a lot when reading about server software |
21:41:29 | FromDiscord | <Beck> Evening all |
21:41:44 | FromDiscord | <Beck> Does anyone know how to pass -d:ssl flag to the `nimble install` command? |
21:43:17 | FromDiscord | <Zachary Carter> In reply to @no name fits "How would you guys": do you consider discord robust? |
21:43:24 | FromDiscord | <Zachary Carter> because if you do - then pretty much any software is robust |
21:44:34 | FromDiscord | <Beck> Figured it out |
21:44:36 | FromDiscord | <Zachary Carter> joking aside - robustness is generally a term to describe how fault tolerant software is |
21:44:56 | FromDiscord | <Zachary Carter> so software that can recover from failure or exceptional cases is considered robust |
21:45:24 | FromDiscord | <Zachary Carter> this is why a lot of people look at the beam vm for really robust server-side solutions |
21:46:09 | FromDiscord | <Zachary Carter> because erlang's supervisor pattern and let it crash philosophy leads to really robust software which can recover gracefully from failure |
21:46:34 | FromDiscord | <Zachary Carter> the opposite of robust software would be software that is brittle or flimsy |
21:46:51 | FromDiscord | <Zachary Carter> where it doesn't handle exceptional cases well and can't recover from failure and crashes often |
21:47:12 | FromDiscord | <Zachary Carter> this is very generalized obviously but hopefully it helps you understand a bit better |
21:48:22 | FromDiscord | <Zachary Carter> let's take a very trivial example - let's say you've written a command line interface and when your program executes a user supplies a value that causes your program to crash, because you're expecting value A but you've been provided value B |
21:48:36 | FromDiscord | <Zachary Carter> your software is not robust - to make it robust you should handle the case where user supplies unexpected input |
21:48:39 | FromDiscord | <Zachary Carter> now your program is robust |
21:48:59 | FromDiscord | <Zachary Carter> (edit) "now your program is ... robust" added "more" |
21:49:08 | FromDiscord | <Zachary Carter> @no name fits ^ |
21:51:06 | * | clyybber joined #nim |
21:51:28 | FromDiscord | <no name fits> In reply to @Zachary Carter "do you consider discord": I do not. You can crash Discord with a video file, so |
21:51:59 | FromDiscord | <no name fits> And thanks for the input |
21:53:04 | FromDiscord | <no name fits> So how would you measure robustness? Edge cases covered? |
21:56:16 | FromDiscord | <Zachary Carter> Probably by collecting statistics around unhandled exceptions and crashes |
21:57:03 | FromDiscord | <Zachary Carter> basically you want to measure how often your program fails or fails to do what you intend it to do |
21:58:06 | FromDiscord | <Zachary Carter> I can crash discord just by opening it on my machine |
21:58:12 | FromDiscord | <Zachary Carter> and what makes it really lack robustness is the fact that it doesn't log anything |
21:58:35 | FromDiscord | <Zachary Carter> and it broke after a windows update |
21:58:48 | FromDiscord | <Zachary Carter> which means it can't handle changes to its execution environment - another obvious sign that your software is not robust |
22:13:32 | * | xet7 joined #nim |
22:15:29 | FromDiscord | <Zachary Carter> https://www.twitch.tv/hahahaitsfunny - vidya game dev |
22:46:37 | * | fredrikhr joined #nim |
23:09:13 | * | tane quit (Quit: Leaving) |
23:17:03 | FromDiscord | <zidsal> is there a way I can do a nim build and tell it to ignore the cache? or do I need to just tear down the nimcache each time? |
23:17:31 | FromDiscord | <ElegantBeef> `-f` |
23:23:07 | FromDiscord | <zidsal> perfect, and 1 last horrible question. I have a macro that takes in a static[string] if I store a readFile value in a variable and pass it in it fails as thats a TaintedString. If I instead call that macro directly with readFile it works why? |
23:24:05 | FromDiscord | <zidsal> ignore the previous question, the variable stored was not a constant! but onto the next question why is that allowed of its a TaintedString |
23:25:09 | FromDiscord | <ElegantBeef> TaintedString is a string alias unless a flag is set iirc |
23:25:22 | FromDiscord | <zidsal> ah, I thought it was a distinct type |
23:25:28 | FromDiscord | <ElegantBeef> https://nim-lang.org/docs/manual_experimental.html#taint-mode |
23:26:03 | FromDiscord | <zidsal> ok thats good to know, guess I don't need to cast it |
23:26:08 | FromDiscord | <ElegantBeef> It's opt in and generally not used |
23:28:36 | FromDiscord | <zidsal> in other news I've finally got my interop with CastleDb working! now I can create my data in CastleDb and it will not only generate the type information in nim but physically load the files in as a tuple of sequences |
23:28:46 | FromDiscord | <ElegantBeef> Grats |
23:29:01 | FromDiscord | <ElegantBeef> Dont like the use of tuples, but congrats 😄 |
23:29:52 | FromDiscord | <zidsal> well the objects are nicely defined for each sheet(Table) I just return a tuple of Tables because I didn't see the point in making a parent type 😛 |
23:40:34 | FromDiscord | <Casey.McMahon> sent a code paste, see https://play.nim-lang.org/#ix=2UiW |
23:42:48 | FromDiscord | <konsumlamm> `TaintedString` is also deprecated by now |
23:43:24 | FromDiscord | <zidsal> @konsumlamm good to know @Casey.McMahon you can't store Type Fields it needs to be Fields[Something] https://play.nim-lang.org/#ix=2UiY |
23:44:08 | FromDiscord | <zidsal> so an easy thing to do is also make the Image generic, but I suspect this is probably not the best way to model this |
23:51:39 | FromDiscord | <Casey.McMahon> In reply to @zidsal "<@!312654963694108674> good to know": ah thanks! |
23:52:49 | FromDiscord | <zidsal> you may want to look at object variants, after all there are only so many image formats |
23:54:22 | FromDiscord | <zidsal> I clearly need to go to bed as you're using a object variant |
23:55:01 | FromDiscord | <Casey.McMahon> yeah, I was trying to use composition and try to experiment with some functional programming ideas. |
23:58:20 | FromDiscord | <Mustache Man> basic question about inheritance/dispatch in Nim's OO |