<< 27-03-2021 >>

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:38zacharycarterUgh - 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:01zacharycarterAlso - now discord just crashes on start, wtf... It continually tries to start and just keeps crashing and trying again
00:39:01zacharycarterso weird
00:40:51zacharycartergoing 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:42FromDiscord<Zachary Carter> If anyone has any ideas tho I'm all ears
00:45:27FromDiscord<Zachary Carter> Hmm it definitely works with just ran in that slot
00:45:29FromDiscord<ElegantBeef> Sounds like a mobo issue, try a known good stick in third slot
00:46:06FromDiscord<Zachary Carter> So it's when I have a stick in both the 3rd and 4th slots that shit doesn't work
00:46:12FromDiscord<Zachary Carter> Weirddddd
00:51:34FromDiscord<Zachary Carter> Wewt
00:51:44FromDiscord<Zachary Carter> Moved some sticks around and
00:51:54FromDiscord<Zachary Carter> https://media.discordapp.net/attachments/371759389889003532/825170225670520842/20210326_195150.jpg
00:52:17FromDiscord<Zachary Carter> Now to figure out this discord thing...
00:56:53leorize@Zachary are you running on XMP?
00:56:56leorizeand what CPU is that?
00:58:07FromDiscord<Zachary Carter> AMD Ryzen 7 2700X Wraithp
00:58:15FromDiscord<Zachary Carter> So no intel xmp
01:00:50*zacharycarter joined #nim
01:00:55zacharycarterwell I guess I'm done with discord lol
01:00:58zacharycarter]what the fuckkkkkkk
01:01:33zacharycarterit crashes on start and I've tried wiping everything in AppData, uninstalling it, rebooting, reinstalling it and same issue
01:01:57leorizeyour motherboard might call it DOCP or A-XMP
01:02:00leorizeit's the same thing
01:02:08leorizeare you using it?
01:02:13leorizeand what ram is that?
01:02:33*D_ joined #nim
01:02:38FromDiscord<Zachary Carter> I'm not sure I'll have to look
01:02:51leorizeare all of them come from the same kit?
01:03:14FromDiscord<Zachary Carter> They're all the same two are 8gb sticks and two are 16gb
01:03:48FromDiscord<Zachary Carter> It's all skillz triz d4 3200 rgb
01:03:58leorizethat's very tight for your cpu
01:04:11FromDiscord<Zachary Carter> What do you mean right?
01:04:15FromDiscord<Zachary Carter> Tight?
01:04:22*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:04:41*njoseph joined #nim
01:04:42leorizeand you're potentially mixing dual rank ram and single rank...
01:05:05zacharycarterHmmmmm
01:05:41zacharycarterWell it seems to be working but :shrug:
01:05:48zacharycarterUnless the discord thing is somehow related
01:06:13leorizea ryzen 2000 series can barely achieve 3200MT/s with two sticks
01:06:27leorizeget memtest86 and run a test
01:06:33zacharycarterOkay I'll do that now
01:06:41leorizeit will take a few hours so be patient
01:07:31zacharycarteralright I will do it tonight then
01:07:43zacharycarterI'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:55leorizeI would advise against running unstable ram on your machine...
01:08:08zacharycarteroh
01:08:14zacharycarterokay well then I guess I will run it now
01:08:22zacharycarter:) let me find a flash drive
01:10:20leorizedo you know what is your motherboard?
01:10:23zacharycarteryeah
01:10:32zacharycarterASUS ROG STRIX B450F GAMNG ATX
01:12:20leorizeif 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:56leorizeturning that off will force the RAM to run under JEDEC, which is very lax and all RAM/CPU can handle
01:12:59zacharycarterokay cool I will do that now thanks
01:13:24zacharycarterbrb
01:13:55*zacharycarter quit (Read error: Connection reset by peer)
01:17:39FromDiscord<Zachary Carter> Leorize: it's set to auto right now for Ai Overclock Tuner. The other options are manual and docp standard
01:17:48FromDiscord<Zachary Carter> Should I change it from auto?
01:21:18leorize@Zachary you'll have to google it, sorry, I don't own an asus board
01:22:10FromDiscord<Zachary Carter> Okay
01:27:04leorizethough mixing dual rank and single rank RAM is pretty dangerous (or at least not a common case)
01:27:31leorize16gb dimms are usually dual rank and 8gb dimms are usually single rank, hence my guess
01:30:14FromDiscord<Zachary Carter> Hmmm let me try to find out
01:31:54*zacharycarter joined #nim
01:32:19zacharycarterleorize: 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:02zacharycarterand 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:23FromDiscord<JSGRANT> Ahhh; They're multiplying! :^))) https://media.discordapp.net/attachments/371759389889003532/825180667683667978/unknown.png
01:34:52FromDiscord<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:24leorize[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:42zacharycarterokay let me look
01:37:51*wasted_youth2 quit (Ping timeout: 245 seconds)
01:37:55leorize[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:27zacharycarterokay I installed typhoon burner and yeah I have mixed ranks
01:41:37zacharycarterI'll order two more 8gb sticks and just use these 16gb in something else
01:42:05zacharycarterthanks for the help and protips leorize! for now I'll take the new ram out
01:42:50leorize[m]you're welcome
01:48:08*zacharycarter quit (Read error: Connection reset by peer)
02:00:31ForumUpdaterBotNew 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:48FromDiscord<Zachary Carter> Streaming on twitch if anyone wants to watch / join me: https://dashboard.twitch.tv/u/hahahaitsfunny
03:04:02Prestigedashboard link eh
03:04:54FromDiscord<Zachary Carter> OH SORRY
03:05:09FromDiscord<Zachary Carter> https://www.twitch.tv/hahahaitsfunny
03:05:11FromDiscord<Zachary Carter> I'm nubs at twitch
03:10:07FromDiscord<Zachary Carter> No it's not code Prestige haha
03:10:13Prestige:P
03:26:46*wasted_youth2 quit (Quit: Leaving)
03:37:00saemI wanted code. 😓
03:43:38FromDiscord<ElegantBeef> Prestige are you using nimscript still or waiting for that PR to be accepted?
03:44:58PrestigeWaiting for the merge
03:46:53FromDiscord<ElegantBeef> Yea i'm 90% certain it's fine, but i might've missed some weird side effect it causes 😄
03:47:11FromDiscord<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:03Prestigewe should have bugged araq about it Beef :P
04:02:44FromDiscord<ElegantBeef> I dont bug anyone
04:05:39*rockcavera quit (Remote host closed the connection)
04:41:38FromGitter<bung87> does nim has mkdirp?
04:42:05FromDiscord<Rika> In reply to @ElegantBeef "I dont bug anyone": lies
04:44:10FromDiscord<ElegantBeef> Hey being annoying and purposely bugging people are two different things
04:44:18FromGitter<bung87> createDir is..
04:45:39FromDiscord<ElegantBeef> yea create dir should do the same
04:46:39FromGitter<bung87> I previous use existsOrCreateDir that doesn't do as I expected
04:46:57FromDiscord<ElegantBeef> yea it doesnt create any other directories other than the last one
04:47:00FromDiscord<ElegantBeef> Says so in the docs
04:48:17FromDiscord<ElegantBeef> createDir doesnt error if the directory already exists, so aslong as you properly cache it it's fine
04:48:19FromDiscord<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:26FromDiscord<ElegantBeef> catch not cache 😄
04:49:42FromDiscord<zajrik> This is the code in question:
04:49:53FromDiscord<zajrik> sent a code paste, see https://play.nim-lang.org/#ix=2Uea
04:50:17FromDiscord<ElegantBeef> Oh you can handle it in the macro
04:50:42FromDiscord<ElegantBeef> Since it's typed you can `getImpl` and return the type section it was declared in
04:51:50FromDiscord<zajrik> Got an example? :ablobsweats:
04:51:55FromDiscord<ElegantBeef> One second
04:51:57FromDiscord<zajrik> I barely understand what I'm doing lol
04:54:20FromDiscord<ElegantBeef> Also you know you dont need `: TheType` everywhere right?
04:54:53FromDiscord<zajrik> I prefer to explicitly declare types
04:54:54FromDiscord<zajrik> always have
04:54:58FromDiscord<ElegantBeef> Ah
04:55:02FromDiscord<ElegantBeef> Makes it annoying to modify 😄
04:55:06FromDiscord<zajrik> I've never like implicit typing in any lang :p
04:55:58FromDiscord<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:57FromDiscord<ElegantBeef> Here you go https://play.nim-lang.org/#ix=2Ueb
04:57:54FromDiscord<zajrik> Thank you!
04:59:11*spiderstew joined #nim
04:59:28FromDiscord<ElegantBeef> Also worth noting your macro will explode with a object variant 😄
04:59:34FromDiscord<ElegantBeef> Atleast i think so
04:59:59*spiderstew_ quit (Ping timeout: 245 seconds)
05:01:12FromDiscord<zajrik> oh fun lol
05:01:13FromDiscord<ElegantBeef> Yep, can see why here https://play.nim-lang.org/#ix=2Uee
05:02:02FromDiscord<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:25FromDiscord<zajrik> Cool cool cool, idk how to do that either lmao
05:02:32leorizewe have std/with and zevv/with btw
05:02:58FromDiscord<ElegantBeef> leorize you cannot point that out you have to let them make their own then point it out
05:03:13FromDiscord<ElegantBeef> Learning macros is a great thing to do
05:03:22FromDiscord<ElegantBeef> Though it's a lot of what i do, so i'm a biased numpty
05:03:36FromDiscord<zajrik> buuuuut I have a very specific usecase for this macro so I'm fine with it not supporting case objects
05:03:53FromDiscord<ElegantBeef> Seems your main thing is just unpacking objects
05:04:19leorizewe do have an unpack library :P
05:04:47FromDiscord<ElegantBeef> Well they're unpacking to immutable objects
05:05:00FromDiscord<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:05leorizedoes the pattern matching unpacker not support that?
05:05:32FromDiscord<ElegantBeef> No clue really
05:05:33FromDiscord<zajrik> sent a code paste, see https://play.nim-lang.org/#ix=2Ueg
05:05:33FromDiscord<zajrik> I did it with pattern matching first
05:05:46FromDiscord<zajrik> but I wanted to use a macro to reduce all that duplication
05:05:59FromDiscord<zajrik> also I don't think std/with does what I'm trying to accomplish here
05:06:18FromDiscord<ElegantBeef> does it not using `.field`
05:06:24FromDiscord<ElegantBeef> Or am i thinking of a different with macro
05:06:40leorizehttps://github.com/Zevv/with
05:06:54FromDiscord<zajrik> nah, it won't let me do like `H:|-{self.foo}-|`
05:07:17FromDiscord<zajrik> That one DOES do what I want, leo lol
05:07:27FromDiscord<zajrik> but it was nice to figure this out myself (with help)
05:08:44FromDiscord<zajrik> oh, actually, looking at the readme, that might not work
05:08:53leorizewe should probably make std/with match `_` in more than one position :P
05:09:14FromDiscord<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:18FromDiscord<ElegantBeef> I'm a little scared of autolayout since it uses a string
05:10:23FromDiscord<zajrik> mhmm
05:10:31FromDiscord<zajrik> It took me a while to figure it out lol
05:10:56leorizewhat does autolayout do that the layout dsl doesn't?
05:10:56FromDiscord<ElegantBeef> yea i dont know what it's doing so dont know why it uses a string
05:11:19FromDiscord<zajrik> it's easier for me to understand? idk lol
05:11:31FromDiscord<zajrik> maybe I'll try the layout dsl
05:11:43FromDiscord<ElegantBeef> What library is that again?
05:12:06FromDiscord<zajrik> wnim
05:12:23FromDiscord<zajrik> https://github.com/khchen/wNim
05:12:39FromDiscord<ElegantBeef> Ah windows centric, explained why i've never seen that before 😄
05:14:01FromDiscord<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:17FromDiscord<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:38FromDiscord<zajrik> ugh now you got me determined to try and support case objects lol
05:20:42FromDiscord<zajrik> just for the hell of it
05:20:43FromDiscord<ElegantBeef> lol
05:20:53FromDiscord<zajrik> It'll be a good learning experience
05:21:03FromDiscord<ElegantBeef> Well i gave your a breadcrumb in the link that fails
05:21:09FromDiscord<ElegantBeef> (edit) "your" => "you"
05:21:19FromDiscord<ElegantBeef> Prints out the tree of the returned type
05:21:27FromDiscord<zajrik> mhmm, I'm looking at that now
05:21:59FromDiscord<ElegantBeef> Well if you give up or want a look at your impl feel free to ping me 😄
05:22:13FromDiscord<zajrik> I probably will
05:22:15FromDiscord<zajrik> :drakeLUL:
05:23:13*casaca quit (Remote host closed the connection)
05:24:18*casaca joined #nim
05:26:43FromDiscord<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:24FromDiscord<zajrik> Changed my mind. No idea what I'm doing
05:35:27FromDiscord<ElegantBeef> Lol
05:35:27FromDiscord<zajrik> :blobfingerguns:
05:44:12FromDiscord<Rika> am i using gcov improperly? some lines (like blank lines and comment-only lines) show run counts
05:44:36leorize[m]you're using it properly
05:44:53FromDiscord<Rika> so whats the issue then ._.
05:45:24leorize[m]the line directives in C are not properly scoped
05:45:36leorize[m]not something we can ever fix
05:45:46FromDiscord<Rika> unfortunate
05:46:02FromDiscord<Rika> anything better i can use for code cov without me putting pragmas on my library code?
05:46:24leorize[m]if we ever get native llvm support it would be simpler
05:46:56leorize[m]since llvm has source-based coverage
05:47:48leorize[m]@Rika you'll need to write one of those "coverage data cleaner" tool
05:47:56leorize[m]that's the best bet
05:48:01FromDiscord<Rika> ive never heard of such thing
05:48:10FromDiscord<Rika> ill look at it
05:48:22leorize[m]basically something that parses gcov output and try to "fix" it
05:48:53leorize[m]C++ got a fair share of those afair
05:50:58leorize[m]gcovr is a tool that can do this for c++ source
05:52:23FromDiscord<ElegantBeef> @zajrik here you go 😛 https://play.nim-lang.org/#ix=2Uen
05:52:34FromDiscord<ElegantBeef> Though doesnt work for `else` branches 😄
05:52:53FromDiscord<zajrik> lmao
05:55:06FromDiscord<zajrik> still more or less over my head :drakeLUL:
05:55:30FromDiscord<zajrik> why doesn't it work with else branches? Is it not just another branch that would come up when iterating them?
05:56:41FromDiscord<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:20FromDiscord<zajrik> oof, okay that makes sense. I was anticipating something like that which is part of why I gave up
05:57:35FromDiscord<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:36FromGitter<gogolxdong> Anyone know how to listen on ipv6 with geth, which is Ethereum Go client.
08:56:10*superbia joined #nim
09:05:23ForumUpdaterBotNew 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:27FromDiscord<hamidb80> does let <varname> = `x` copy `x`?
11:06:54FromDiscord<hamidb80> if x is seq
11:07:40FromDiscord<hamidb80> https://media.discordapp.net/attachments/371759389889003532/825325194070458368/Screenshot_2.png
11:07:41*Gustavo6046 quit (Ping timeout: 240 seconds)
11:07:41FromDiscord<hamidb80> https://media.discordapp.net/attachments/371759389889003532/825325195287986236/Screenshot_3.png
11:09:06FromDiscord<hamidb80> here `org` modifies when i delete something from `m`
11:10:17FromDiscord<hamidb80> https://media.discordapp.net/attachments/371759389889003532/825325849069879316/unknown.png
11:10:45FromDiscord<hamidb80> https://media.discordapp.net/attachments/371759389889003532/825325965693419550/unknown.png
11:12:10FromDiscord<haxscramper> You create `m` and work on it all the time. Or I'm missing where you assign from `m`.
11:12:18FromDiscord<haxscramper> You do `var m = ` and then `m.del
11:12:20FromDiscord<haxscramper> (edit) "`m.del" => "`m.del`"
11:13:06FromDiscord<hamidb80> In reply to @haxscramper "You create `m` and": m assings in line 23 - you can see it in the pic
11:13:21FromDiscord<hamidb80> (edit) "m assings" => "`m` assigns"
11:14:16*Gustavo6046 joined #nim
11:14:22FromDiscord<hamidb80> shouldn't `org` copy `m` in line 25?
11:16:35FromDiscord<haxscramper> Ah, yes, sorry. But I think `let` copies sequence full - https://play.nim-lang.org/#ix=2Ufi
11:17:46FromDiscord<hamidb80> your code works fine
11:18:09FromDiscord<hamidb80> but i have no idea whats going on in my code
11:18:28FromDiscord<haxscramper> Can you send the whole code, not just screenshot
11:18:34FromDiscord<haxscramper> (edit) "screenshot" => "screenshot?"
11:20:09FromDiscord<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:07FromDiscord<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:51FromDiscord<hamidb80> yeah that's intresting
11:41:17FromDiscord<hamidb80> i can even reproduce this into another code
11:42:04FromDiscord<hamidb80> (edit) "can" => "can't"
11:46:15*m4r35n357 joined #nim
12:10:48*Vladar quit (Quit: Leaving)
12:41:16FromDiscord<clyybber> @hamidb80 use --gc:arc; on refc let has slightly different semantics
12:44:25*superbia quit (Quit: WeeChat 3.1)
12:47:28FromDiscord<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:44FromDiscord<hamidb80> In reply to @haxscramper "Strange. Example code that": hey i found the bug
13:56:55FromDiscord<hamidb80> put that code inside a proc
13:58:05FromDiscord<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:24FromDiscord<haxscramper> In reply to @hamidb80 "put that code inside": Assigning to `var` fixes the issue, but I find it very strange
14:00:44FromDiscord<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:06FromDiscord<clyybber> @haxscramper It's kind of a bug, but the reasoning was that let mimicked parameter passing behaviour
14:01:08FromDiscord<clyybber> https://github.com/nim-lang/Nim/issues/2314
14:01:34FromDiscord<clyybber> it's fixed with gc:arc
14:01:47FromDiscord<clyybber> so there's less incentive to fix it for refc
14:01:57FromDiscord<clyybber> especially since the fix changes semantics and performance
14:01:57ForumUpdaterBotNew Nimble package! icon - Generate icon files from PNG files., see https://github.com/bung87/icon
14:03:04FromDiscord<hamidb80> ok, what gc should i use?
14:03:50FromDiscord<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:46FromDiscord<hamidb80> In reply to @haxscramper "Because it basically the": value semantic? could you suggest any article about it?
14:09:18FromDiscord<hamidb80> (edit) "could" => "do"
14:09:47FromDiscord<hamidb80> (edit) removed "do you suggest any article about it?"
14:19:47FromDiscord<hamidb80> https://media.discordapp.net/attachments/371759389889003532/825373538584231956/unknown.png
14:20:33FromDiscord<hamidb80> where can i see the exact implementation of these codes?
14:21:26FromDiscord<clyybber> they are implemented in the compiler
14:21:48FromDiscord<hamidb80> In reply to @Clyybber "they are implemented in": so, i can't see them
14:21:51FromDiscord<hamidb80> (edit) "them" => "them?"
14:24:03saemYou absolutely can, the compiler is written in nim
14:24:06FromDiscord<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:35saemIt might not always be easy to grok but don't shy away from the compiler.
14:24:52FromDiscord<hamidb80> tnx
14:34:58*superbia quit (Quit: WeeChat 3.1)
15:08:24*l1x quit (Quit: Connection closed for inactivity)
15:28:36FromDiscord<Rika> why do norm models have to be inherited?
15:28:48FromDiscord<zetashift> Did anyone get `neovim` + `compe.nvim` + `nim.nvim` working by any chance?
15:30:53FromDiscord<zetashift> I guess I could just use lspconfig and nimlsp
15:31:52FromDiscord<Lefl> Hey, how do I convert a float to int without rounding it?
15:32:01liblq-devyou can't
15:32:06liblq-devan int has no decimal places
15:32:18liblq-devso you have to round the float first
15:32:23FromDiscord<Lefl> Nah that's not what I meant
15:32:34FromDiscord<shirleyquirk> do you want to round down? floor(float)
15:32:39FromDiscord<Lefl> Hmm
15:32:43FromDiscord<Lefl> Yes
15:32:46liblq-devi suppose `x.int`?
15:33:10FromDiscord<Lefl> Yeah
15:33:14liblq-devthough using `x.int` will truncate instead of rounding
15:33:33FromDiscord<Lefl> Yeah that's exactly what I want
15:33:34FromDiscord<Lefl> Thanks
15:33:43liblq-dev!eval import std/math; echo (int(-1.2), floor(-1.2).int)
15:33:45NimBot(-1, -2)
15:33:59liblq-dev^ keep this in mind
15:34:15FromDiscord<Lefl> Why does floor round up?
15:34:24FromDiscord<shirleyquirk> it rounds towards zero
15:34:33FromDiscord<shirleyquirk> wait.
15:34:37FromDiscord<Lefl> Yeah
15:34:52FromDiscord<shirleyquirk> ok, towards negative infinity then
15:35:27FromDiscord<Lefl> Oh wait
15:35:39FromDiscord<Lefl> I've got confused by the `-` haha
15:36:00FromDiscord<Lefl> Thanks again
15:37:24liblq-devyeah, just converting to `int` truncates the floating point part (so effectively rounds towards 0) and `floor` rounds towards -∞
15:37:48FromDiscord<shirleyquirk> nice catch liblq
15:38:57liblq-devyeah 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:22FromDiscord<shirleyquirk> i should have remembered, i wrote a bithacking floor function just a couple weeks ago
15:42:32FromDiscord<Lefl> btw what are you guys making in nim?
15:52:24ForumUpdaterBotNew 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:31FromDiscord<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:16FromDiscord<exelotl> it's basically just saying "ld failed" without telling me why...
16:10:32FromDiscord<Zachary Carter> Might need to update gcc? I don't know
16:11:47FromDiscord<Zachary Carter> Have you tried copying and pasting the command that is produced there and executing it without Nim in the picture?
16:12:26FromDiscord<Zachary Carter> the one that invokes `arm-none-eabi-gcc.exe` ?
16:15:27FromDiscord<exelotl> oh that sounds sensible, I'll try that
16:22:23FromDiscord<exelotl> it still gives the same error, basically no useful info :( https://media.discordapp.net/attachments/371759389889003532/825404393447882792/unknown.png
16:22:36FromDiscord<exelotl> 53 is the number of files
16:23:41FromDiscord<Zachary Carter> hmm is there like a verbose option to GCC?
16:24:06FromDiscord<Zachary Carter> try throwing a `-v` in there @exelotl
16:24:21FromDiscord<Zachary Carter> before the `-o`
16:28:00FromDiscord<flywind> https://media.discordapp.net/attachments/371759389889003532/825405804177784862/unknown.png
16:28:19FromDiscord<flywind> what's purpose for this?
16:29:51FromDiscord<flywind> https://media.discordapp.net/attachments/371759389889003532/825406273037664266/unknown.png
16:38:51FromDiscord<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:21FromDiscord<Rika> so when views are stable that will be deprecated right?
16:40:06FromDiscord<Solitude> In reply to @treeform "I did not write": you can pass region with just openarray
16:40:08FromDiscord<treeform> I don't know. Its very easy to use. Views have to give some thing that is so good...
16:40:55FromDiscord<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:09FromDiscord<Rika> perhaps sooner or later [n..m] will be a view
16:41:55FromDiscord<dk> wouldn't that break backward compatibility
16:43:45FromDiscord<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:37FromDiscord<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:51FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2Uhd
17:26:48FromDiscord<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:43FromDiscord<shirleyquirk> sure: https://play.nim-lang.org/#ix=2Uhz
17:28:55FromDiscord<shirleyquirk> just need to specify the types
17:30:10FromDiscord<jfmonty2> Oh I see, I was missing the [int]
17:30:46FromDiscord<shirleyquirk> yep, either there or make the proc openarray[int]
17:32:39ForumUpdaterBotNew thread by Lhupfeldt: Testament documentation - test-case, test-step, setup, tearDown, see https://forum.nim-lang.org/t/7707
17:34:39ForumUpdaterBotNew 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:02Prestige@ElegantBeef did CI pass on your PR btw?
17:52:11*shirty quit (Remote host closed the connection)
17:56:43FromDiscord<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:11reversem3What are more people using for interfacing with arduino based boards
18:33:48reversem3right 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:39FromDiscord<gruebite> what can macros do that templates can't?
18:59:29FromDiscord<haxscramper> Perform transformations based on user-defined logic
19:00:41FromDiscord<haxscramper> So template just fills in parts of the code based on your arguments,
19:01:06FromDiscord<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:51FromDiscord<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:46FromDiscord<shirleyquirk> theres stuff in macros that lets you attach lineinfo to a NimNode...dunno if that helps
19:38:39FromDiscord<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:50FromDiscord<shirleyquirk> not that i can see
19:40:47FromDiscord<haxscramper> Although I can always `{.emit: "nimfr_("procname", "filename");".}`
19:41:30FromDiscord<shirleyquirk> https://github.com/nim-lang/Nim/issues/5617
19:41:56FromDiscord<shirleyquirk> https://github.com/nim-lang/Nim/blob/3e7077ac7d2f4867ecabff09b730b6bc9356979d/tests/macros/tmacros_various.nim#L92
19:42:01FromDiscord<shirleyquirk> maybe?
19:43:40FromDiscord<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:46FromDiscord<shirleyquirk> i think i get what you're after, the raw emit might be the thing
19:46:47FromDiscord<shirleyquirk> de-anonymize the anonymous
19:48:57FromDiscord<haxscramper> https://play.nim-lang.org/#ix=2Uih yes, it works, though it is not particularly pretty
19:53:08FromDiscord<shirleyquirk> {.line: ("custom message",0).}:
19:53:15FromDiscord<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:22FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=2Uiu
20:54:04FromDiscord<Zachary Carter> 😑
21:04:46FromDiscord<ElegantBeef> Prestige it always passed
21:04:52*arecaceae quit (Remote host closed the connection)
21:05:11*arecaceae joined #nim
21:06:48PrestigeCool stuff
21:06:56Prestigewe should merge that puppy down
21:09:34FromDiscord<ElegantBeef> Well go petition a core member 😛
21:24:51FromDiscord<no name fits> How would you guys measure "robustness" of software?
21:25:03FromDiscord<ElegantBeef> Whether an idiot can use it without self imolating
21:25:19FromDiscord<no name fits> I mean
21:27:26FromDiscord<zetashift> In reply to @no name fits "How would you guys": How close it looks like mratsims code
21:27:48FromDiscord<zetashift> Or treeforms
21:28:52FromDiscord<no name fits> I see
21:29:25FromDiscord<no name fits> So it's not a well defined topic, I take it
21:31:35FromDiscord<ElegantBeef> Zeta you left out the lower end of the scale, if it looks like my code it's probably not 😄
21:33:47FromDiscord<no name fits> It's just "robustness" pops up a lot when reading about server software
21:41:29FromDiscord<Beck> Evening all
21:41:44FromDiscord<Beck> Does anyone know how to pass -d:ssl flag to the `nimble install` command?
21:43:17FromDiscord<Zachary Carter> In reply to @no name fits "How would you guys": do you consider discord robust?
21:43:24FromDiscord<Zachary Carter> because if you do - then pretty much any software is robust
21:44:34FromDiscord<Beck> Figured it out
21:44:36FromDiscord<Zachary Carter> joking aside - robustness is generally a term to describe how fault tolerant software is
21:44:56FromDiscord<Zachary Carter> so software that can recover from failure or exceptional cases is considered robust
21:45:24FromDiscord<Zachary Carter> this is why a lot of people look at the beam vm for really robust server-side solutions
21:46:09FromDiscord<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:34FromDiscord<Zachary Carter> the opposite of robust software would be software that is brittle or flimsy
21:46:51FromDiscord<Zachary Carter> where it doesn't handle exceptional cases well and can't recover from failure and crashes often
21:47:12FromDiscord<Zachary Carter> this is very generalized obviously but hopefully it helps you understand a bit better
21:48:22FromDiscord<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:36FromDiscord<Zachary Carter> your software is not robust - to make it robust you should handle the case where user supplies unexpected input
21:48:39FromDiscord<Zachary Carter> now your program is robust
21:48:59FromDiscord<Zachary Carter> (edit) "now your program is ... robust" added "more"
21:49:08FromDiscord<Zachary Carter> @no name fits ^
21:51:06*clyybber joined #nim
21:51:28FromDiscord<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:59FromDiscord<no name fits> And thanks for the input
21:53:04FromDiscord<no name fits> So how would you measure robustness? Edge cases covered?
21:56:16FromDiscord<Zachary Carter> Probably by collecting statistics around unhandled exceptions and crashes
21:57:03FromDiscord<Zachary Carter> basically you want to measure how often your program fails or fails to do what you intend it to do
21:58:06FromDiscord<Zachary Carter> I can crash discord just by opening it on my machine
21:58:12FromDiscord<Zachary Carter> and what makes it really lack robustness is the fact that it doesn't log anything
21:58:35FromDiscord<Zachary Carter> and it broke after a windows update
21:58:48FromDiscord<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:29FromDiscord<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:03FromDiscord<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:31FromDiscord<ElegantBeef> `-f`
23:23:07FromDiscord<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:05FromDiscord<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:09FromDiscord<ElegantBeef> TaintedString is a string alias unless a flag is set iirc
23:25:22FromDiscord<zidsal> ah, I thought it was a distinct type
23:25:28FromDiscord<ElegantBeef> https://nim-lang.org/docs/manual_experimental.html#taint-mode
23:26:03FromDiscord<zidsal> ok thats good to know, guess I don't need to cast it
23:26:08FromDiscord<ElegantBeef> It's opt in and generally not used
23:28:36FromDiscord<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:46FromDiscord<ElegantBeef> Grats
23:29:01FromDiscord<ElegantBeef> Dont like the use of tuples, but congrats 😄
23:29:52FromDiscord<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:34FromDiscord<Casey.McMahon> sent a code paste, see https://play.nim-lang.org/#ix=2UiW
23:42:48FromDiscord<konsumlamm> `TaintedString` is also deprecated by now
23:43:24FromDiscord<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:08FromDiscord<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:39FromDiscord<Casey.McMahon> In reply to @zidsal "<@!312654963694108674> good to know": ah thanks!
23:52:49FromDiscord<zidsal> you may want to look at object variants, after all there are only so many image formats
23:54:22FromDiscord<zidsal> I clearly need to go to bed as you're using a object variant
23:55:01FromDiscord<Casey.McMahon> yeah, I was trying to use composition and try to experiment with some functional programming ideas.
23:58:20FromDiscord<Mustache Man> basic question about inheritance/dispatch in Nim's OO