<< 21-10-2021 >>

00:24:51Mister_Magistermeh it doesn't pass tests
00:48:25Mister_Magisterif i'm not mistaken they're simply broken
00:50:50Mister_Magistertestament doesn't download nimble deps right?
01:06:05*LyndsySimon quit (Ping timeout: 260 seconds)
01:12:19*LyndsySimon joined #nim
02:00:09FromDiscord<gogolxdong (liuxiaodong)> Is there any windows kernel development kit in Nim
02:01:24Mister_Magisterwait, there was someone here nuts enough to do AVR in nim
02:01:29Mister_Magisterany info on that topic?
02:01:35Mister_Magistercause async on avr would be just epic
02:01:52Mister_Magisteri fell in love with async
02:02:57FromDiscord<gogolxdong (liuxiaodong)> What's AVR?
02:06:52Mister_Magisterliek atmega or esp
02:07:03Mister_Magisteror audio-video receiver
02:07:21Mister_Magisterhttps://en.wikipedia.org/wiki/AVR_microcontrollers
02:07:55*rockcavera quit (Remote host closed the connection)
02:14:55FromDiscord<KimJongUnstoppable> Is there an easy way to map a char seq to an array? I'm taking in data as hex from stdin and need to map it back to the array it was generated from, but fromHex() gives a char sequence that it won't let me just copy into the array. I tried iterating through the sequence and adding each value to the array but that didn't work either since it wants bytes, not chars, and I'm not familiar with any way to convert char to byte
02:15:12FromDiscord<KimJongUnstoppable> (edit) "an" => "a byte"
02:15:27FromDiscord<Elegantbeef> `char(byte)` `byte(char)`
02:15:47FromDiscord<KimJongUnstoppable> every question I bring to you, you give me a reasonable answer and that makes it worse
02:15:48FromDiscord<KimJongUnstoppable> lol
02:15:49FromDiscord<KimJongUnstoppable> thank you
02:15:54FromDiscord<Elegantbeef> They're both 8 bit so it's a super simple (probably free)
02:17:38FromDiscord<Elegantbeef> Me giving reasonable answers is impossible
02:22:48FromDiscord<KimJongUnstoppable> haha. is there a better way to convert than iterating through the sequence and doing it one at a time in a for loop?
02:22:51*rockcavera joined #nim
02:22:51*rockcavera quit (Changing host)
02:22:51*rockcavera joined #nim
02:23:08FromDiscord<Elegantbeef> you have a seq of bytes and they're going to an array of chars?
02:23:33FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Cmi
02:23:45FromDiscord<KimJongUnstoppable> yes. and thank you again
02:23:56*arkurious quit (Quit: Leaving)
02:24:07FromDiscord<Elegantbeef> Guess you dont need the `[0].addr` for the array, only if it's a seq
03:35:54FromDiscord<codic> hmm, I don't think you need that, you can just use the seq and index into it then cast to byte
03:35:57FromDiscord<codic> (edit) "hmm, I don't think you need that, you can just use the seq and index into it then cast ... to" added "/ conv"
03:36:06FromDiscord<codic> of course unless you need an array
03:36:36FromDiscord<Elegantbeef> You of course can do it otherways
04:06:02*supakeen quit (Quit: WeeChat 3.3)
04:06:31*supakeen joined #nim
04:09:46*rockcavera quit (Remote host closed the connection)
04:49:56nrds<Prestige99> Having an issue with pointers. https://play.nim-lang.org/#ix=3CmK seeing weird values come back
04:50:38FromDiscord<Elegantbeef> pointers to stack variables
04:50:42FromDiscord<Elegantbeef> Living dangerously over there arent you
04:51:13nrds<Prestige99> hmm how should this be done?
04:52:02FromDiscord<Elegantbeef> Well if you must use a pointer heap allocating then assigning that
04:52:03FromDiscord<Elegantbeef> If otherwise using a ref
04:52:25nrds<Prestige99> How would I heap alloc an array?
04:52:29FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3CmL
04:53:06FromDiscord<Elegantbeef> Actually replace `create(typeof(result))` with `createU(array[4, cfloat])`
04:53:07nrds<Prestige99> interesting, don't think I've seen create before
04:53:24FromDiscord<Elegantbeef> It's syntax sugar over allocation + cast
04:53:39FromDiscord<Elegantbeef> It's the manual memory management equivlent of `new`
04:53:49nrds<Prestige99> interesting
04:53:59FromDiscord<Elegantbeef> Now i do have to ask, is there a reason you cannot use a `ref`?
04:54:25nrds<Prestige99> not that I know of, just playing with a wrapper. can probably use ref
04:55:04FromDiscord<Elegantbeef> then there you go replace `ptr` with `ref` and do `new result` instead of that create
04:56:22nrds<Prestige99> neat, thanks
04:56:41FromDiscord<Elegantbeef> But congrats you had your first dangler
04:56:46FromDiscord<Elegantbeef> Dangling pointer that is 😛
04:56:50nrds<Prestige99> haha
04:57:15FromDiscord<Elegantbeef> You pointed to the stack then moved on which means your pointer was unsafe, this is infact why you cannot capture `var T` parameters
05:02:15*kayabaNerve quit (Remote host closed the connection)
05:02:40*kayabaNerve joined #nim
06:06:21*tk quit (Ping timeout: 245 seconds)
06:06:59*blackbeard420_ joined #nim
06:07:00*tk joined #nim
06:07:36*blackbeard420 quit (Ping timeout: 245 seconds)
08:04:26*Guest6 joined #nim
08:07:01*Guest6 quit (Client Quit)
08:17:29*Vladar joined #nim
08:32:01NimEventerNew thread by Jasonfi: Error in chronos with Nim 1.6, see https://forum.nim-lang.org/t/8524
08:33:23*supakeen quit (Ping timeout: 264 seconds)
08:44:26NimEventerNew Nimble package! tokarax - Converts HTML to Karax representation, see https://github.com/thisago/tokarax
08:47:19*xet7 quit (Remote host closed the connection)
08:48:27*xet7 joined #nim
08:50:10*supakeen joined #nim
09:07:57FromDiscord<ruki> sent a long message, see http://ix.io/3CmO
09:08:10*PMunch joined #nim
09:24:58*neurocyte0132889 joined #nim
09:24:58*neurocyte0132889 quit (Changing host)
09:24:58*neurocyte0132889 joined #nim
09:44:24FromDiscord<Ícar> sent a code paste, see https://play.nim-lang.org/#ix=3CnL
09:48:13NimEventerNew thread by Marc: "-- template" for nimscript options, see https://forum.nim-lang.org/t/8526
09:51:44FromDiscord<Yardanico> In reply to @Ícar "Hi, could anyone explain": this is not a full error, and it's erroring out because you're not using the result of parseInt
09:52:01FromDiscord<Yardanico> parseInt returns a parsed integer so you need to assign it to something
09:53:28FromDiscord<Yardanico> In reply to @Ícar "Hi, could anyone explain": Also, you don't need to shell out to nproc to know the number of cores, see https://nim-lang.org/docs/cpuinfo.html#countProcessors
09:54:34FromDiscord<Yardanico> it works for most OSes out there, of course for win/lin/mac/bsd , etc
09:55:00FromDiscord<Ícar> sent a code paste, see https://play.nim-lang.org/#ix=3CnQ
09:55:19FromDiscord<Ícar> I'll use the `countProcessors`, thanks for pointing that out
09:55:52FromDiscord<Yardanico> In reply to @Ícar "I figured out, so": Also, just a bit of sugar - you can do ..< so you don't need to -1 yourself
09:56:07FromDiscord<Yardanico> for n in 0..<numCpus: do stuff
09:56:29FromDiscord<Ícar> Huh, nice one 😄 I started playing with Nim yesterday
10:08:49FromDiscord<OceanMongrel> Hey, just discovered Nim today. Looks really interesting - I'm going to explore game dev with it once I learn more..
10:09:35FromDiscord<Rika> Say hi in #gamedev once you’re ready
10:15:34*Vladar quit (Quit: Leaving)
10:21:26*PMunch quit (Quit: leaving)
10:24:18NimEventerNew thread by JPLRouge: Nim 1.6.0 GTK cast cstring ?, see https://forum.nim-lang.org/t/8527
11:44:36*neurocyte0132889 quit (Read error: Connection reset by peer)
11:44:59*neurocyte0132889 joined #nim
11:44:59*neurocyte0132889 quit (Changing host)
11:44:59*neurocyte0132889 joined #nim
11:50:47*blackbeard420_ quit (Quit: ZNC 1.8.2 - https://znc.in)
11:50:59*blackbeard420 joined #nim
12:00:08*Vladar joined #nim
12:06:01*supakeen quit (Quit: WeeChat 3.3)
12:06:30*supakeen joined #nim
12:08:03*neurocyte0132889 quit (Quit: The Lounge - https://thelounge.chat)
12:11:08*neurocyte0132889 joined #nim
12:11:08*neurocyte0132889 quit (Changing host)
12:11:08*neurocyte0132889 joined #nim
12:11:32*Vladar quit (Ping timeout: 258 seconds)
12:11:57*Vladar joined #nim
12:44:27*arkurious joined #nim
13:03:44FromDiscord<dom96> Interesting. Sentry.io contributed to Nim on open collective.
13:09:47*rockcavera joined #nim
13:09:47*rockcavera quit (Changing host)
13:09:47*rockcavera joined #nim
13:12:26FromDiscord<ruki> I tried to use the vcc(msvc) compiler to compile the nim program on windows, but it got stuck. I do not know why.↵`nim c --cc:vcc src/main.nim`
13:15:34FromDiscord<ruki> https://media.discordapp.net/attachments/371759389889003532/900734050543747112/IMG_20211021_211005.jpg
13:21:56*sagax joined #nim
13:24:35FromDiscord<haxscramper> Pmunch\: when you rebuild playground for 1.6, would it be possible to enable all the preview flags, such as dot and unicode operators and so on
13:26:05FromDiscord<Rika> it is already on 1.6
13:28:55FromDiscord<ruki> ? what should I do?
13:29:39FromDiscord<Rika> i dont know
13:32:25FromDiscord<haxscramper> Well, that's really unfortunate↵(@Rika)
13:33:00FromDiscord<haxscramper> I guess time to recommend wanbox exclusively then
13:33:56FromDiscord<Rika> why
13:34:09FromDiscord<pietroppeter> In reply to @dom96 "Interesting. Sentry.io contributed to": it seems on October 21st they made a batch of contributions of different sizes (5k, 2k, ... 100) to various Open Source projects, see: https://opencollective.com/sentry/transactions?offset=0
13:35:50FromDiscord<pietroppeter> btw our about section still mentions "the coveted 1.0": https://opencollective.com/nim#category-ABOUT
13:35:58FromDiscord<Rika> wandbox doesnt have 1.6 (or 1.4.8 even) afaik
13:39:21FromDiscord<haxscramper> Wanbox has latest trunk updated nearly daily or something like that↵(@Rika)
13:39:37FromDiscord<haxscramper> They don't have 1.6.0, but already have 1.7.1 and certainly have 1.4.8
13:41:58FromDiscord<haxscramper> Also does not separate compiler and runtime output
13:42:48FromDiscord<haxscramper> I personally kind of hate this part of nim playground, where I have to jump back and forth on every compile step if I'm doing something with macros
13:47:00FromDiscord<Rika> just checked
13:47:06FromDiscord<Rika> 1.4.8 isnt there 🙂
13:49:08FromDiscord<haxscramper> I wonder how they configure new versions
13:49:35FromDiscord<haxscramper> I already make sure that godbolt had the recent one, so I might as well look after this
13:51:00FromDiscord<haxscramper> Though nim playground has none of the other features, so lack of 1.4.8 (while having latest devel) is even less of an issue
14:15:54|smlckz|why exceptions are called ''Defect''s here?
14:16:12FromDiscord<Rika> that is only one kind of exception
14:16:18FromDiscord<Rika> the other one is "CatchableError"
14:16:33FromDiscord<Rika> one you shouldnt catch, one you can
14:18:39FromDiscord<Gumber> One of my co-workers shared one of Deech's talks with me about Nim the other day, umprompted
14:18:48FromDiscord<Rika> woah
14:18:57FromDiscord<Gumber> I mean - he knows I'm a big Nim fanboi but I hadn't been talking to him about Nim recently
14:21:54FromDiscord<Gumber> I guess he was impressed enough with Deech's talk and Nim to say something
14:22:33FromDiscord<Gumber> But I mean, all of deech's talks are really good
14:22:43FromDiscord<Gumber> dude has giving tech presentations nailed down to a science
14:47:40|smlckz|taking an example from the spec: is `converter toInt(x: char): int = result = ord(x)` the same as `converter toInt(x: char): int = ord(x)` ?
14:52:16FromDiscord<Yardanico> yes
14:52:43FromDiscord<Yardanico> because ord is the last expression in the routine and its value is not discarded
14:52:51FromDiscord<Yardanico> in the version without result
15:03:21FromDiscord<zetashift> Deech's talk was amazing!
15:51:34FromDiscord<dom96> In reply to @pietroppeter "btw our about section": can you submit an issue about this on the website repo?
16:37:49FromDiscord<pietroppeter> @dom96 you mean as a reminder? the change should be done in open collective, not on website repo, right?
16:38:09FromDiscord<dom96> yep
16:41:26FromDiscord<pietroppeter> done: https://github.com/nim-lang/website/issues/312
16:49:45FromDiscord<dom96> thx!
16:57:19FromDiscord<dom96> Ahhh, regarding Sentry: https://news.ycombinator.com/item?id=28945998
17:02:29FromDiscord<dom96> Python and Rust each got like ~20k 🙂
17:02:53FromDiscord<dom96> I suppose we should be thankful for somebody working at Sentry voting for Nim to get a slice of this
17:03:43nixfreak_nim[m]I'm not a developer professionally at least, but I would like to learn how to port something over , javascript/typescript to nim. Examples , something simple at first? Cause porting is literally just creating the same program in another language right?
17:03:44FromDiscord<haxscramper> Hm, with this and earlier Bitcoin donation we are well over minimum required capital for a foundation if we decide to go with this - https://forum.nim-lang.org/t/8525#55239At least a lot of languages I know have a non profit "foundation" (like zig, rust Julia etc), though it is of course depends on the location/country of where they set it up and so on
17:05:06FromDiscord<haxscramper> And from what I can tell there is no legal entity behind nim, like foundation/association - everything mostly goes between Araq and status, and maybe couple other core developers
17:05:15FromDiscord<haxscramper> Correct me if I'm wrong
17:08:49FromDiscord<haxscramper> And open collective team list is out of date
17:09:12FromDiscord<dom96> yes, a foundation would be awesome
17:09:42FromDiscord<dom96> I've been trying to push for it for many years, but doing it outside of the US isn't trivial
17:10:11FromDiscord<haxscramper> And of course there is also a question of basic "how established the language is from outside perspective" thing
17:11:18FromDiscord<dom96> Does anyone know of open source foundations established outside the US? In the UK or EU?
17:55:10*Gustavo6046 quit (Remote host closed the connection)
17:58:05*Gustavo6046 joined #nim
18:08:05EgeonI have a struct with fields in it. Is macro a right tool to dump the struct with fields information?
18:08:57FromDiscord<zetashift> oh snap Nim got 100k!?
18:12:10FromDiscord<geekrelief> In reply to @Egeon "I have a struct": You can use `fields` to iterate over the fields and use `typeof` if you need type information or go the macro route. https://nim-lang.github.io/Nim/iterators.html#fields.i%2CS%2CT
18:16:51EgeonNeato, thank you. I'd like the filed name printed out too.
18:16:59Egeon*field
18:23:32FromDiscord<geekrelief> In reply to @Egeon "Neato, thank you. I'd": `fieldPairs` gives you the name too
18:36:56Egeonthanks
18:38:27FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3Cqx
18:39:05NimEventerNew Nimble package! nanim - Create smooth GPU-accelerated animations that can be previewed live or rendered to videos., see https://github.com/ErikWDev/nanim/
18:39:14FromDiscord<geekrelief> In reply to @Smarc "https://github.com/Smarcy/nim_chess/blob/dev/src/ma": I get a 404 from the link
18:39:34FromDiscord<Smarc> my bad, its private .. just a sec!
18:39:58FromDiscord<Smarc> should work now
18:41:53FromDiscord<geekrelief> What's the error nim is reporting?
18:42:52FromDiscord<Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3Cqy
18:43:54FromDiscord<geekrelief> weird I was able to compile it
18:44:01FromDiscord<geekrelief> I'm on devel though
18:44:07FromDiscord<Smarc> huh
18:44:16FromDiscord<geekrelief> what version are you running?
18:44:42FromDiscord<Smarc> 1.4.8
18:44:51FromDiscord<geekrelief> you should try upgrading to 1.6
18:44:52FromDiscord<Smarc> `nim c main.nim` gives me the written error
18:45:48*pro joined #nim
18:46:50FromDiscord<Smarc> How do I actually update to 1.6 using nimble/choosenim? :s
18:48:26FromDiscord<geekrelief> I don't know. First time I tried choosenim on windows I had an issue. I went to `devel` and never looked back. I imagine `choosenim --help` would tell you how to upgrade.
18:49:12FromDiscord<Smarc> I'm on Manjaro, gonna look into it. But on the other hand, to me this still seems like a logical issue and I'd love to understand it
18:50:32prowhat is the best way to capture/intercept all packets that arrive on a network interface
18:53:32FromDiscord<geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3CqE
18:54:42FromDiscord<Smarc> Switched to nim 1.6.0, same error :/
18:55:05FromDiscord<geekrelief> oh I'm on master
18:55:07FromDiscord<Smarc> Are you looking at the dev branch I linked?
18:55:07FromDiscord<geekrelief> you're on dev?
18:55:10FromDiscord<Smarc> yep
18:57:34FromDiscord<geekrelief> yeah I guess you do have a cyclic dependency
18:58:31FromDiscord<Smarc> I see that, but I think having the Piece-move logic in pieces.nim would be neat
18:58:44FromDiscord<Smarc> Is there an elegant way to avoid this in this easy sample?
18:59:17FromDiscord<geekrelief> I think in general you would want the moviing logic separate from the entity being moved.
19:00:12FromDiscord<geekrelief> To me, it would make sense to put it in Board
19:00:43FromDiscord<Smarc> Hm alright, I think if I want to pass the Board as an argument that is the way
19:00:46FromDiscord<Smarc> Thank you for your time!
19:01:33FromDiscord<Elegantbeef> Hey there's the guy that credited me with a broken PR 😛
19:02:30*rockcavera quit (Remote host closed the connection)
19:06:46*Gustavo6046 quit (Ping timeout: 245 seconds)
19:07:03FromDiscord<geekrelief> who would that be? :p Should be good now though.
19:07:21FromDiscord<Elegantbeef> Well the board moving pieces makes more sense than the board asking the pieces to move imo, really there isnt any reason to use inheritance here other than "I want to" btw
19:07:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3CqK
19:08:57FromDiscord<Elegantbeef> Jeez i cannot type presently
19:09:31FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3CqM
19:10:11*Gustavo6046 joined #nim
19:14:18*rockcavera joined #nim
19:14:18*rockcavera quit (Changing host)
19:14:18*rockcavera joined #nim
19:17:38FromDiscord<Smarc> Ah I see, that would be a way to do this as well. But coming from Java I think inheritance is just in my veins :)
19:18:41FromDiscord<Elegantbeef> Yea understandable, we avoid inheritance here since it's generally unneeded 😛
19:20:19FromDiscord<Smarc> Btw what do I win/lose if i define Piece as "ref of" or "object" ?
19:20:47FromDiscord<Elegantbeef> `ref`s are heap allocated so you're getting a managed pointer, `object` is like a C struct, stack allocated
19:21:04FromDiscord<Elegantbeef> So in the case of a seq `object` is stored sequentially `ref` is thrown all over the heap
19:23:01FromDiscord<Smarc> Would it make any real difference in my Pieces sample?
19:23:07FromDiscord<Rika> it is bad for performance
19:23:15FromDiscord<Rika> if you have a few thousand of Pieces
19:23:35FromDiscord<Elegantbeef> Yea it's not really much different performance wise looking at chess, just was noting
19:23:53FromDiscord<Rika> i mean maybe you want to have 10000x10000 chess
19:24:03FromDiscord<Elegantbeef> Inheritance is a tool to be used when needed, no real point using it everywhere
19:24:38FromDiscord<Elegantbeef> Yea in that case it'd be very nice to have, since many pieces would be in your cache at once as they're stored sequentially
19:24:43FromDiscord<Elegantbeef> This is where the whole ECS conversation comes up 😀
19:25:24FromDiscord<Smarc> So the only real difference between `ref of` and direct `object` in my example would be speed right? Even if it is not noticeable by a human in such a tiny sample :)
19:26:22FromDiscord<Elegantbeef> Yea mostly just speed, the way nim does dynamic dispatch isnt too dissimilar to what you'd do with a case statement + bunch of procedures
19:26:36FromDiscord<Rika> and even if it were different it's still a matter of speed
19:27:11FromDiscord<Smarc> Okay, got it!
19:27:15FromDiscord<Elegantbeef> Which makes me wonder if i should clean up that method inspired object variant macro i made a while ago
19:28:38FromDiscord<Elegantbeef> This silly stuff if anyone is wondering https://play.nim-lang.org/#ix=3zpz
19:43:10FromDiscord<Smarc> Is there a way to make type members/fields mandatory? So if i have a type that has say `xPos, yPos: int` und can not just create it by Name() and have to pass Name(xPos: 0, yPos: 0)?
19:44:17FromDiscord<retkid> i have strings and a value association and i need to sort by the value
19:44:42FromDiscord<haxscramper> {.requiresinit.} Annotation for fields↵(@Smarc)
19:45:06FromDiscord<retkid> In reply to @haxscramper "{.requiresinit.} Annotation for fields": oh thanks my answer was way wose lol
19:45:07FromDiscord<haxscramper> xPos {.requiresinit.}\: int
19:45:14FromDiscord<retkid> (edit) "wose" => "worse"
19:45:33FromDiscord<Smarc> Thanks!
19:45:47FromDiscord<Rika> In reply to @retkid "i have strings and": Are you using ordered tables?
19:46:03FromDiscord<retkid> In reply to @Rika "Are you using ordered": Thats my instinct but i dont know if thats the best thing here
19:46:13FromDiscord<Rika> Then what do you think is?
19:46:21FromDiscord<retkid> thats why im asking here
19:46:27FromDiscord<haxscramper> If sorting for value you would need to get this into external seq, then sortByIt(it[1])
19:46:40FromDiscord<haxscramper> Because you can't sort a table, even ordered one
19:46:48FromDiscord<Rika> You can technically
19:46:51FromDiscord<retkid> In reply to @haxscramper "Because you can't sort": yea thats why im concerned
19:46:51FromDiscord<Rika> With a lot of effort
19:46:57FromDiscord<haxscramper> How?
19:47:17FromDiscord<Rika> Pop all values, sort, reinsert in desired order
19:47:26FromDiscord<haxscramper> Ordered table just remembers how you put stuff in, and if you did it right pairs() would work
19:47:42FromDiscord<haxscramper> Exactly what I proposed then
19:47:55FromDiscord<Rika> Well yes I never said it was good
19:47:57FromDiscord<Elegantbeef> There are sort procs for ordered tables
19:48:18FromDiscord<Rika> There are? I assumed so but hax said there weren’t
19:48:27FromDiscord<Elegantbeef> https://nim-lang.org/docs/tables.html#sort%2COrderedTableRef%5BA%2CB%5D%2Cproc%28%2C%29
19:48:31FromDiscord<haxscramper> https://nim-lang.org/docs/tables.html#sort%2COrderedTableRef%5BA%2CB%5D%2Cproc%28%2C%29
19:48:32FromDiscord<Elegantbeef> There are
19:48:43FromDiscord<haxscramper> Well, til
19:48:52FromDiscord<Elegantbeef> Nice link hax, very familiar URL 😛
19:49:26FromDiscord<haxscramper> But you can't add anything to the table afterwards
19:49:37FromDiscord<haxscramper> Or you would have to re-soet it
19:49:38FromDiscord<Rika> Well you can, just need to resort
19:49:39FromDiscord<haxscramper> Of course
19:49:46FromDiscord<jmgomez> hey guys, noob question: should nimble download the dlls alongside the bindings? Or the expected behavior is that the user will grab it?
19:50:12FromDiscord<Rika> I would say latter
19:50:24FromDiscord<Elegantbeef> system libraries need to sourced yourself
19:50:35FromDiscord<Rika> Otherwise nimble would become a general package manager wouldn’t it
19:50:49FromDiscord<Elegantbeef> It'd be weird is what it'd be
19:51:16FromDiscord<haxscramper> If we are on windows things might work differently and people might expect you to download every single dll and put it randomly all over the place
19:51:20FromDiscord<Elegantbeef> Though this is where we mention most Nim devs are on \nix so we dont need to fetch the .dlls 😀
19:51:39FromDiscord<jmgomez> okay, I just wanted to make sure first time using it
19:51:47FromDiscord<haxscramper> But on Linux almost all packages I've seen put notice about the required .so or something along those lines
19:52:14FromDiscord<jmgomez> thanks!
19:52:36FromDiscord<Rika> Windows dynamic libraries are a nightmare I guess
19:53:01FromDiscord<Elegantbeef> Just have a bazillion installed next to .exe's you'll get the program to work 😛
19:53:13FromDiscord<jmgomez> yeah, the downside I guess is manually matching the version
19:53:18FromDiscord<haxscramper> Well, at least it is not "fundamentally broken" like Linux
19:53:19FromDiscord<jmgomez> but that's fine
19:53:23FromDiscord<haxscramper> Right
19:53:31FromDiscord<Rika> In reply to @Elegantbeef "Just have a bazillion": Completely defeating the point of dynamic libraries
19:54:00FromDiscord<Rika> In reply to @haxscramper "Well, at least it": I assume the issue there is version management
19:54:52FromDiscord<retkid> sent a code paste, see https://play.nim-lang.org/#ix=3CqT
19:55:20FromDiscord<Elegantbeef> Sorting it to just reverse it
19:55:37FromDiscord<retkid> i need to look at the sort function again
19:55:44FromDiscord<retkid> it just sorts from lowest to high
19:55:55FromDiscord<retkid> (edit) "it just sorts from lowest to high ... " added "so i reverse it"
19:56:03FromDiscord<Elegantbeef> There is an optional sortorder
19:56:06FromDiscord<haxscramper> You can negate cmp results
19:56:13FromDiscord<haxscramper> Or sortorder, yes
19:56:14FromDiscord<Elegantbeef> `order = SortOrderDescending`
19:56:32FromDiscord<Rika> You misspelled received by the way
19:56:43FromDiscord<retkid> (edit) "https://play.nim-lang.org/#ix=3CqT" => "https://play.nim-lang.org/#ix=3CqU"
19:56:50FromDiscord<retkid> (edit) "https://play.nim-lang.org/#ix=3CqU" => "https://play.nim-lang.org/#ix=3CqV"
19:57:20FromDiscord<Elegantbeef> No you!
19:57:23FromDiscord<Hamid Bluri> `recv` is a lot better : D
19:57:48FromDiscord<retkid> In reply to @Rika "You misspelled received by": this is why i dont show my code, this specific reason
19:57:52FromDiscord<retkid> i cant spell to save my life
19:58:00FromDiscord<Rika> Don’t worry beef can’t either
19:58:09FromDiscord<Elegantbeef> Bef\
19:58:10FromDiscord<retkid> but i refuse to download the spellcheck for vscode
19:58:22FromDiscord<Rika> Beef you’re Canadian right
19:58:35FromDiscord<Elegantbeef> That's what it says on my birth certificate
19:58:44FromDiscord<Elegantbeef> "Beef is Canadian, right"
19:58:51FromDiscord<Rika> Damn
19:59:53FromDiscord<Elegantbeef> Was there follow up or did you just decide to start a list of "Which countries to avoid visiting"?
20:00:32FromDiscord<retkid> sort(uwu, system.cmp, Descending)
20:00:32FromDiscord<Hamid Bluri> : D
20:01:57FromDiscord<impbox [ftsf]> Received was misspelt when it was created
20:02:09FromDiscord<Hamid Bluri> agreed
20:06:50FromDiscord<retkid> nim was a type
20:06:52FromDiscord<retkid> (edit) "type" => "typo"
20:06:56FromDiscord<retkid> it was originally nimk
20:09:25FromDiscord<Elegantbeef> nimkrod?
20:20:53*pch_ quit (Remote host closed the connection)
20:21:28*pch_ joined #nim
20:44:46*Gustavo6046 quit (Ping timeout: 252 seconds)
20:46:32*Gustavo6046 joined #nim
20:48:05FromDiscord<jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=3Crb
20:49:36*jkl1337 quit (Quit: Gone.)
20:50:57*jkl joined #nim
20:53:45*pro quit (Ping timeout: 265 seconds)
20:56:43*Vladar quit (Quit: Leaving)
21:05:48*Gustavo6046_ joined #nim
21:06:09*Gustavo6046_ quit (Remote host closed the connection)
21:06:13*Gustavo6046 quit (Ping timeout: 252 seconds)
21:06:40*Gustavo6046 joined #nim
21:24:17FromDiscord<Elegantbeef> `debugger:native` just adds symbols to the executable, you need to run it with a debugger to get any output @jmgomez
21:26:31FromDiscord<jmgomez> it should also output a nim-gdb.py file as well. Shouldnt it?
21:26:52FromDiscord<jmgomez> Or am I mistaken?
21:27:32FromDiscord<impbox [ftsf]> I've never seen such a file
21:28:26FromDiscord<jmgomez> ohh maybe I pick it from somewhere else a while ago and assumed that it was output by the compiler :/ ↵So how are you able to see your symbols?
21:32:41FromDiscord<Elegantbeef> nim-gdb.py is in your nim directory
21:33:55FromDiscord<Elegantbeef> I havent used the debugger much, but i think gdb can find nim-gdb.py if nim is in your path so it just works, i could be wrong
21:34:13FromDiscord<Elegantbeef> I've just followed https://github.com/saem/vscode-nim#debugging for setting up the debugger in vscode
21:35:23FromDiscord<jmgomez> ohh that's useful! Thank you!
21:40:15FromDiscord<Recruit_main707> is `iterable[T]` implemented as a concept?
21:41:20FromDiscord<Elegantbeef> Nope
21:44:44FromDiscord<Yardanico> In reply to @Recruit_main707 "is `iterable[T]` implemented as": It's not what you think it is
21:44:54FromDiscord<tandy> sent a code paste, see https://paste.rs/Rv9
21:46:12FromDiscord<leorize> it means you should try to make it work but I can't guarantee that it will \:p
21:46:32FromDiscord<tandy> lol cool
21:46:39FromDiscord<leorize> I did improve generics support to the point that it can work in a function declaration context
21:46:49FromDiscord<leorize> but I haven't tested further than that
21:46:50FromDiscord<tandy> oh right that should be enough?
21:47:04FromDiscord<leorize> uniontraits might be useful if you need low level access
21:50:13FromDiscord<jmgomez> the hotreload is also working, there were two unexpected things on my end: ↵1. Contrary to the regular output I had to specify .exe↵2. I needed two dlls more and had to compile them myself (nimhcr and nimrtl)
21:50:56*Gustavo6046 quit (Ping timeout: 245 seconds)
21:51:57FromDiscord<tandy> yeah, i need the `Union` type
21:52:15*Gustavo6046 joined #nim
22:02:39*Gustavo6046 quit (Read error: Connection reset by peer)
22:05:45*Gustavo6046 joined #nim
22:16:05EgeonI know this question is more apt for the mingw-w64 community but their irc has barely many people.
22:16:26Egeonnim c --listCmd -d:mingw --passc:"-s -Os -nostdlib -nodefaultlibs -nostartfiles" --verbosity=3 -d:ssl -o:$@ $< >> builds.log
22:17:25EgeonAnyone know how to reduce the binary size when cross compile from mingw
22:17:27Egeon?
22:20:42*evoalg joined #nim
22:24:57*evoalg quit (Quit: Leaving...)
22:31:25EgeonOK found it nothing fancy passing these flags:
22:31:28Egeon-d:danger -d:strip -d:ssl --opt:size --passc=-flto --passl=-flto
22:39:19NimEventerNew Nimble package! asyncanything - make anything async [to be honest, fake async], see https://github.com/hamidb80/asyncanything
22:40:28FromDiscord<Yardanico> more npm packages
22:42:29FromDiscord<dom96> just imagine the package number growth tho
22:50:31FromDiscord<evoalg> sent a long message, see http://ix.io/3CrA
22:54:30FromDiscord<Yardanico> In reply to @evoalg "I've only recently starting": nimsuggest doesn't work well with js backend, but just to make sure - are you on 1.6?
22:55:02FromDiscord<Yardanico> and yeah, this module is only for JS backend
23:00:05FromDiscord<evoalg> I'm on 1.6 yes
23:02:58FromDiscord<evoalg> In reply to @Yardanico "and yeah, this module": Yes I used choosenim to update to nim 1.6, and when I compile using "-b:js" it compiles and runs fine, but it's just the syntax highlighting. I guess maybe I should just wait to see of the plugin will be updated
23:03:21FromDiscord<Yardanico> well, the plug-in itself can't fix that
23:04:02FromDiscord<Yardanico> nimsuggest generally doesn't work with -b:js , so you can remove that from you config and compile with "nim js" instead so you get syntax highlighting
23:07:08FromDiscord<evoalg> In reply to @Yardanico "nimsuggest generally doesn't work": Oh ok thank you - dump question: where do I find that config file?
23:08:11FromDiscord<Yardanico> oh wait sorry, I thought you had -b:js in your config file
23:08:28FromDiscord<Yardanico> if you're running it in the command line, then nimsuggest should generally work
23:11:01FromDiscord<evoalg> ah yea I'm compiling with "nim -b:js -r c <myfile.nim>"
23:11:37FromDiscord<evoalg> Those large numbers are one of the cool things about python ... exciting to see it coming into nim
23:12:10FromDiscord<ynfle (ynfle)> @Pmunch what order does `forNode` descend in macroutils descend in ?
23:15:25NimEventerNew post on r/nim by Blue_Moon_Lake: Is there options for Nim formatting ?, see https://reddit.com/r/nim/comments/qd3xjj/is_there_options_for_nim_formatting/
23:16:12FromDiscord<Yardanico> In reply to @evoalg "Those large numbers are": well js backend isn't the main one, so really jsbiginits is only useful if you're writing for a platform that only supports JS, like browsers :)
23:16:31FromDiscord<Yardanico> there are a couple of native nim libraries like that though
23:16:59FromDiscord<Yardanico> https://github.com/status-im/nim-stint
23:16:59FromDiscord<Yardanico> https://github.com/def-/nim-bigints
23:17:37FromDiscord<Yardanico> And of course you can use gmp
23:21:55FromDiscord<evoalg> sent a long message, see http://ix.io/3CrC
23:24:09FromDiscord<Yardanico> you might not always need bigints though, e.g uint64 goes to 18,446,744,073,709,551,615
23:26:33FromDiscord<Yardanico> and generally even 32-bit int is more than enough
23:26:54FromDiscord<evoalg> In reply to @Yardanico "you might not always": Ahhh true ... I guess one of the things people who aren't experienced programmers like to do is play with recursion to calculate factorial(400) and be amazed a the big number appearing on the screen. I did it in python and I was trying in nim but my recursion proc only went to factorial(20)
23:28:03FromDiscord<Gumber> sent a code paste, see https://play.nim-lang.org/#ix=3CrE
23:28:35FromDiscord<Gumber> (edit) "https://play.nim-lang.org/#ix=3CrE" => "https://play.nim-lang.org/#ix=3CrF"
23:30:52*rockcavera quit (Remote host closed the connection)