00:24:51 | Mister_Magister | meh it doesn't pass tests |
00:48:25 | Mister_Magister | if i'm not mistaken they're simply broken |
00:50:50 | Mister_Magister | testament doesn't download nimble deps right? |
01:06:05 | * | LyndsySimon quit (Ping timeout: 260 seconds) |
01:12:19 | * | LyndsySimon joined #nim |
02:00:09 | FromDiscord | <gogolxdong (liuxiaodong)> Is there any windows kernel development kit in Nim |
02:01:24 | Mister_Magister | wait, there was someone here nuts enough to do AVR in nim |
02:01:29 | Mister_Magister | any info on that topic? |
02:01:35 | Mister_Magister | cause async on avr would be just epic |
02:01:52 | Mister_Magister | i fell in love with async |
02:02:57 | FromDiscord | <gogolxdong (liuxiaodong)> What's AVR? |
02:06:52 | Mister_Magister | liek atmega or esp |
02:07:03 | Mister_Magister | or audio-video receiver |
02:07:21 | Mister_Magister | https://en.wikipedia.org/wiki/AVR_microcontrollers |
02:07:55 | * | rockcavera quit (Remote host closed the connection) |
02:14:55 | FromDiscord | <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:12 | FromDiscord | <KimJongUnstoppable> (edit) "an" => "a byte" |
02:15:27 | FromDiscord | <Elegantbeef> `char(byte)` `byte(char)` |
02:15:47 | FromDiscord | <KimJongUnstoppable> every question I bring to you, you give me a reasonable answer and that makes it worse |
02:15:48 | FromDiscord | <KimJongUnstoppable> lol |
02:15:49 | FromDiscord | <KimJongUnstoppable> thank you |
02:15:54 | FromDiscord | <Elegantbeef> They're both 8 bit so it's a super simple (probably free) |
02:17:38 | FromDiscord | <Elegantbeef> Me giving reasonable answers is impossible |
02:22:48 | FromDiscord | <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:08 | FromDiscord | <Elegantbeef> you have a seq of bytes and they're going to an array of chars? |
02:23:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3Cmi |
02:23:45 | FromDiscord | <KimJongUnstoppable> yes. and thank you again |
02:23:56 | * | arkurious quit (Quit: Leaving) |
02:24:07 | FromDiscord | <Elegantbeef> Guess you dont need the `[0].addr` for the array, only if it's a seq |
03:35:54 | FromDiscord | <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:57 | FromDiscord | <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:06 | FromDiscord | <codic> of course unless you need an array |
03:36:36 | FromDiscord | <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:56 | nrds | <Prestige99> Having an issue with pointers. https://play.nim-lang.org/#ix=3CmK seeing weird values come back |
04:50:38 | FromDiscord | <Elegantbeef> pointers to stack variables |
04:50:42 | FromDiscord | <Elegantbeef> Living dangerously over there arent you |
04:51:13 | nrds | <Prestige99> hmm how should this be done? |
04:52:02 | FromDiscord | <Elegantbeef> Well if you must use a pointer heap allocating then assigning that |
04:52:03 | FromDiscord | <Elegantbeef> If otherwise using a ref |
04:52:25 | nrds | <Prestige99> How would I heap alloc an array? |
04:52:29 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3CmL |
04:53:06 | FromDiscord | <Elegantbeef> Actually replace `create(typeof(result))` with `createU(array[4, cfloat])` |
04:53:07 | nrds | <Prestige99> interesting, don't think I've seen create before |
04:53:24 | FromDiscord | <Elegantbeef> It's syntax sugar over allocation + cast |
04:53:39 | FromDiscord | <Elegantbeef> It's the manual memory management equivlent of `new` |
04:53:49 | nrds | <Prestige99> interesting |
04:53:59 | FromDiscord | <Elegantbeef> Now i do have to ask, is there a reason you cannot use a `ref`? |
04:54:25 | nrds | <Prestige99> not that I know of, just playing with a wrapper. can probably use ref |
04:55:04 | FromDiscord | <Elegantbeef> then there you go replace `ptr` with `ref` and do `new result` instead of that create |
04:56:22 | nrds | <Prestige99> neat, thanks |
04:56:41 | FromDiscord | <Elegantbeef> But congrats you had your first dangler |
04:56:46 | FromDiscord | <Elegantbeef> Dangling pointer that is 😛 |
04:56:50 | nrds | <Prestige99> haha |
04:57:15 | FromDiscord | <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:01 | NimEventer | New 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:26 | NimEventer | New 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:57 | FromDiscord | <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:24 | FromDiscord | <Ícar> sent a code paste, see https://play.nim-lang.org/#ix=3CnL |
09:48:13 | NimEventer | New thread by Marc: "-- template" for nimscript options, see https://forum.nim-lang.org/t/8526 |
09:51:44 | FromDiscord | <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:01 | FromDiscord | <Yardanico> parseInt returns a parsed integer so you need to assign it to something |
09:53:28 | FromDiscord | <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:34 | FromDiscord | <Yardanico> it works for most OSes out there, of course for win/lin/mac/bsd , etc |
09:55:00 | FromDiscord | <Ícar> sent a code paste, see https://play.nim-lang.org/#ix=3CnQ |
09:55:19 | FromDiscord | <Ícar> I'll use the `countProcessors`, thanks for pointing that out |
09:55:52 | FromDiscord | <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:07 | FromDiscord | <Yardanico> for n in 0..<numCpus: do stuff |
09:56:29 | FromDiscord | <Ícar> Huh, nice one 😄 I started playing with Nim yesterday |
10:08:49 | FromDiscord | <OceanMongrel> Hey, just discovered Nim today. Looks really interesting - I'm going to explore game dev with it once I learn more.. |
10:09:35 | FromDiscord | <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:18 | NimEventer | New 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:44 | FromDiscord | <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:26 | FromDiscord | <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:34 | FromDiscord | <ruki> https://media.discordapp.net/attachments/371759389889003532/900734050543747112/IMG_20211021_211005.jpg |
13:21:56 | * | sagax joined #nim |
13:24:35 | FromDiscord | <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:05 | FromDiscord | <Rika> it is already on 1.6 |
13:28:55 | FromDiscord | <ruki> ? what should I do? |
13:29:39 | FromDiscord | <Rika> i dont know |
13:32:25 | FromDiscord | <haxscramper> Well, that's really unfortunate↵(@Rika) |
13:33:00 | FromDiscord | <haxscramper> I guess time to recommend wanbox exclusively then |
13:33:56 | FromDiscord | <Rika> why |
13:34:09 | FromDiscord | <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:50 | FromDiscord | <pietroppeter> btw our about section still mentions "the coveted 1.0": https://opencollective.com/nim#category-ABOUT |
13:35:58 | FromDiscord | <Rika> wandbox doesnt have 1.6 (or 1.4.8 even) afaik |
13:39:21 | FromDiscord | <haxscramper> Wanbox has latest trunk updated nearly daily or something like that↵(@Rika) |
13:39:37 | FromDiscord | <haxscramper> They don't have 1.6.0, but already have 1.7.1 and certainly have 1.4.8 |
13:41:58 | FromDiscord | <haxscramper> Also does not separate compiler and runtime output |
13:42:48 | FromDiscord | <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:00 | FromDiscord | <Rika> just checked |
13:47:06 | FromDiscord | <Rika> 1.4.8 isnt there 🙂 |
13:49:08 | FromDiscord | <haxscramper> I wonder how they configure new versions |
13:49:35 | FromDiscord | <haxscramper> I already make sure that godbolt had the recent one, so I might as well look after this |
13:51:00 | FromDiscord | <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:12 | FromDiscord | <Rika> that is only one kind of exception |
14:16:18 | FromDiscord | <Rika> the other one is "CatchableError" |
14:16:33 | FromDiscord | <Rika> one you shouldnt catch, one you can |
14:18:39 | FromDiscord | <Gumber> One of my co-workers shared one of Deech's talks with me about Nim the other day, umprompted |
14:18:48 | FromDiscord | <Rika> woah |
14:18:57 | FromDiscord | <Gumber> I mean - he knows I'm a big Nim fanboi but I hadn't been talking to him about Nim recently |
14:21:54 | FromDiscord | <Gumber> I guess he was impressed enough with Deech's talk and Nim to say something |
14:22:33 | FromDiscord | <Gumber> But I mean, all of deech's talks are really good |
14:22:43 | FromDiscord | <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:16 | FromDiscord | <Yardanico> yes |
14:52:43 | FromDiscord | <Yardanico> because ord is the last expression in the routine and its value is not discarded |
14:52:51 | FromDiscord | <Yardanico> in the version without result |
15:03:21 | FromDiscord | <zetashift> Deech's talk was amazing! |
15:51:34 | FromDiscord | <dom96> In reply to @pietroppeter "btw our about section": can you submit an issue about this on the website repo? |
16:37:49 | FromDiscord | <pietroppeter> @dom96 you mean as a reminder? the change should be done in open collective, not on website repo, right? |
16:38:09 | FromDiscord | <dom96> yep |
16:41:26 | FromDiscord | <pietroppeter> done: https://github.com/nim-lang/website/issues/312 |
16:49:45 | FromDiscord | <dom96> thx! |
16:57:19 | FromDiscord | <dom96> Ahhh, regarding Sentry: https://news.ycombinator.com/item?id=28945998 |
17:02:29 | FromDiscord | <dom96> Python and Rust each got like ~20k 🙂 |
17:02:53 | FromDiscord | <dom96> I suppose we should be thankful for somebody working at Sentry voting for Nim to get a slice of this |
17:03:43 | nixfreak_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:44 | FromDiscord | <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:06 | FromDiscord | <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:15 | FromDiscord | <haxscramper> Correct me if I'm wrong |
17:08:49 | FromDiscord | <haxscramper> And open collective team list is out of date |
17:09:12 | FromDiscord | <dom96> yes, a foundation would be awesome |
17:09:42 | FromDiscord | <dom96> I've been trying to push for it for many years, but doing it outside of the US isn't trivial |
17:10:11 | FromDiscord | <haxscramper> And of course there is also a question of basic "how established the language is from outside perspective" thing |
17:11:18 | FromDiscord | <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:05 | Egeon | I have a struct with fields in it. Is macro a right tool to dump the struct with fields information? |
18:08:57 | FromDiscord | <zetashift> oh snap Nim got 100k!? |
18:12:10 | FromDiscord | <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:51 | Egeon | Neato, thank you. I'd like the filed name printed out too. |
18:16:59 | Egeon | *field |
18:23:32 | FromDiscord | <geekrelief> In reply to @Egeon "Neato, thank you. I'd": `fieldPairs` gives you the name too |
18:36:56 | Egeon | thanks |
18:38:27 | FromDiscord | <Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3Cqx |
18:39:05 | NimEventer | New 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:14 | FromDiscord | <geekrelief> In reply to @Smarc "https://github.com/Smarcy/nim_chess/blob/dev/src/ma": I get a 404 from the link |
18:39:34 | FromDiscord | <Smarc> my bad, its private .. just a sec! |
18:39:58 | FromDiscord | <Smarc> should work now |
18:41:53 | FromDiscord | <geekrelief> What's the error nim is reporting? |
18:42:52 | FromDiscord | <Smarc> sent a code paste, see https://play.nim-lang.org/#ix=3Cqy |
18:43:54 | FromDiscord | <geekrelief> weird I was able to compile it |
18:44:01 | FromDiscord | <geekrelief> I'm on devel though |
18:44:07 | FromDiscord | <Smarc> huh |
18:44:16 | FromDiscord | <geekrelief> what version are you running? |
18:44:42 | FromDiscord | <Smarc> 1.4.8 |
18:44:51 | FromDiscord | <geekrelief> you should try upgrading to 1.6 |
18:44:52 | FromDiscord | <Smarc> `nim c main.nim` gives me the written error |
18:45:48 | * | pro joined #nim |
18:46:50 | FromDiscord | <Smarc> How do I actually update to 1.6 using nimble/choosenim? :s |
18:48:26 | FromDiscord | <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:12 | FromDiscord | <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:32 | pro | what is the best way to capture/intercept all packets that arrive on a network interface |
18:53:32 | FromDiscord | <geekrelief> sent a code paste, see https://play.nim-lang.org/#ix=3CqE |
18:54:42 | FromDiscord | <Smarc> Switched to nim 1.6.0, same error :/ |
18:55:05 | FromDiscord | <geekrelief> oh I'm on master |
18:55:07 | FromDiscord | <Smarc> Are you looking at the dev branch I linked? |
18:55:07 | FromDiscord | <geekrelief> you're on dev? |
18:55:10 | FromDiscord | <Smarc> yep |
18:57:34 | FromDiscord | <geekrelief> yeah I guess you do have a cyclic dependency |
18:58:31 | FromDiscord | <Smarc> I see that, but I think having the Piece-move logic in pieces.nim would be neat |
18:58:44 | FromDiscord | <Smarc> Is there an elegant way to avoid this in this easy sample? |
18:59:17 | FromDiscord | <geekrelief> I think in general you would want the moviing logic separate from the entity being moved. |
19:00:12 | FromDiscord | <geekrelief> To me, it would make sense to put it in Board |
19:00:43 | FromDiscord | <Smarc> Hm alright, I think if I want to pass the Board as an argument that is the way |
19:00:46 | FromDiscord | <Smarc> Thank you for your time! |
19:01:33 | FromDiscord | <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:03 | FromDiscord | <geekrelief> who would that be? :p Should be good now though. |
19:07:21 | FromDiscord | <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:57 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3CqK |
19:08:57 | FromDiscord | <Elegantbeef> Jeez i cannot type presently |
19:09:31 | FromDiscord | <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:38 | FromDiscord | <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:41 | FromDiscord | <Elegantbeef> Yea understandable, we avoid inheritance here since it's generally unneeded 😛 |
19:20:19 | FromDiscord | <Smarc> Btw what do I win/lose if i define Piece as "ref of" or "object" ? |
19:20:47 | FromDiscord | <Elegantbeef> `ref`s are heap allocated so you're getting a managed pointer, `object` is like a C struct, stack allocated |
19:21:04 | FromDiscord | <Elegantbeef> So in the case of a seq `object` is stored sequentially `ref` is thrown all over the heap |
19:23:01 | FromDiscord | <Smarc> Would it make any real difference in my Pieces sample? |
19:23:07 | FromDiscord | <Rika> it is bad for performance |
19:23:15 | FromDiscord | <Rika> if you have a few thousand of Pieces |
19:23:35 | FromDiscord | <Elegantbeef> Yea it's not really much different performance wise looking at chess, just was noting |
19:23:53 | FromDiscord | <Rika> i mean maybe you want to have 10000x10000 chess |
19:24:03 | FromDiscord | <Elegantbeef> Inheritance is a tool to be used when needed, no real point using it everywhere |
19:24:38 | FromDiscord | <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:43 | FromDiscord | <Elegantbeef> This is where the whole ECS conversation comes up 😀 |
19:25:24 | FromDiscord | <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:22 | FromDiscord | <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:36 | FromDiscord | <Rika> and even if it were different it's still a matter of speed |
19:27:11 | FromDiscord | <Smarc> Okay, got it! |
19:27:15 | FromDiscord | <Elegantbeef> Which makes me wonder if i should clean up that method inspired object variant macro i made a while ago |
19:28:38 | FromDiscord | <Elegantbeef> This silly stuff if anyone is wondering https://play.nim-lang.org/#ix=3zpz |
19:43:10 | FromDiscord | <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:17 | FromDiscord | <retkid> i have strings and a value association and i need to sort by the value |
19:44:42 | FromDiscord | <haxscramper> {.requiresinit.} Annotation for fields↵(@Smarc) |
19:45:06 | FromDiscord | <retkid> In reply to @haxscramper "{.requiresinit.} Annotation for fields": oh thanks my answer was way wose lol |
19:45:07 | FromDiscord | <haxscramper> xPos {.requiresinit.}\: int |
19:45:14 | FromDiscord | <retkid> (edit) "wose" => "worse" |
19:45:33 | FromDiscord | <Smarc> Thanks! |
19:45:47 | FromDiscord | <Rika> In reply to @retkid "i have strings and": Are you using ordered tables? |
19:46:03 | FromDiscord | <retkid> In reply to @Rika "Are you using ordered": Thats my instinct but i dont know if thats the best thing here |
19:46:13 | FromDiscord | <Rika> Then what do you think is? |
19:46:21 | FromDiscord | <retkid> thats why im asking here |
19:46:27 | FromDiscord | <haxscramper> If sorting for value you would need to get this into external seq, then sortByIt(it[1]) |
19:46:40 | FromDiscord | <haxscramper> Because you can't sort a table, even ordered one |
19:46:48 | FromDiscord | <Rika> You can technically |
19:46:51 | FromDiscord | <retkid> In reply to @haxscramper "Because you can't sort": yea thats why im concerned |
19:46:51 | FromDiscord | <Rika> With a lot of effort |
19:46:57 | FromDiscord | <haxscramper> How? |
19:47:17 | FromDiscord | <Rika> Pop all values, sort, reinsert in desired order |
19:47:26 | FromDiscord | <haxscramper> Ordered table just remembers how you put stuff in, and if you did it right pairs() would work |
19:47:42 | FromDiscord | <haxscramper> Exactly what I proposed then |
19:47:55 | FromDiscord | <Rika> Well yes I never said it was good |
19:47:57 | FromDiscord | <Elegantbeef> There are sort procs for ordered tables |
19:48:18 | FromDiscord | <Rika> There are? I assumed so but hax said there weren’t |
19:48:27 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/tables.html#sort%2COrderedTableRef%5BA%2CB%5D%2Cproc%28%2C%29 |
19:48:31 | FromDiscord | <haxscramper> https://nim-lang.org/docs/tables.html#sort%2COrderedTableRef%5BA%2CB%5D%2Cproc%28%2C%29 |
19:48:32 | FromDiscord | <Elegantbeef> There are |
19:48:43 | FromDiscord | <haxscramper> Well, til |
19:48:52 | FromDiscord | <Elegantbeef> Nice link hax, very familiar URL 😛 |
19:49:26 | FromDiscord | <haxscramper> But you can't add anything to the table afterwards |
19:49:37 | FromDiscord | <haxscramper> Or you would have to re-soet it |
19:49:38 | FromDiscord | <Rika> Well you can, just need to resort |
19:49:39 | FromDiscord | <haxscramper> Of course |
19:49:46 | FromDiscord | <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:12 | FromDiscord | <Rika> I would say latter |
19:50:24 | FromDiscord | <Elegantbeef> system libraries need to sourced yourself |
19:50:35 | FromDiscord | <Rika> Otherwise nimble would become a general package manager wouldn’t it |
19:50:49 | FromDiscord | <Elegantbeef> It'd be weird is what it'd be |
19:51:16 | FromDiscord | <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:20 | FromDiscord | <Elegantbeef> Though this is where we mention most Nim devs are on \nix so we dont need to fetch the .dlls 😀 |
19:51:39 | FromDiscord | <jmgomez> okay, I just wanted to make sure first time using it |
19:51:47 | FromDiscord | <haxscramper> But on Linux almost all packages I've seen put notice about the required .so or something along those lines |
19:52:14 | FromDiscord | <jmgomez> thanks! |
19:52:36 | FromDiscord | <Rika> Windows dynamic libraries are a nightmare I guess |
19:53:01 | FromDiscord | <Elegantbeef> Just have a bazillion installed next to .exe's you'll get the program to work 😛 |
19:53:13 | FromDiscord | <jmgomez> yeah, the downside I guess is manually matching the version |
19:53:18 | FromDiscord | <haxscramper> Well, at least it is not "fundamentally broken" like Linux |
19:53:19 | FromDiscord | <jmgomez> but that's fine |
19:53:23 | FromDiscord | <haxscramper> Right |
19:53:31 | FromDiscord | <Rika> In reply to @Elegantbeef "Just have a bazillion": Completely defeating the point of dynamic libraries |
19:54:00 | FromDiscord | <Rika> In reply to @haxscramper "Well, at least it": I assume the issue there is version management |
19:54:52 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=3CqT |
19:55:20 | FromDiscord | <Elegantbeef> Sorting it to just reverse it |
19:55:37 | FromDiscord | <retkid> i need to look at the sort function again |
19:55:44 | FromDiscord | <retkid> it just sorts from lowest to high |
19:55:55 | FromDiscord | <retkid> (edit) "it just sorts from lowest to high ... " added "so i reverse it" |
19:56:03 | FromDiscord | <Elegantbeef> There is an optional sortorder |
19:56:06 | FromDiscord | <haxscramper> You can negate cmp results |
19:56:13 | FromDiscord | <haxscramper> Or sortorder, yes |
19:56:14 | FromDiscord | <Elegantbeef> `order = SortOrderDescending` |
19:56:32 | FromDiscord | <Rika> You misspelled received by the way |
19:56:43 | FromDiscord | <retkid> (edit) "https://play.nim-lang.org/#ix=3CqT" => "https://play.nim-lang.org/#ix=3CqU" |
19:56:50 | FromDiscord | <retkid> (edit) "https://play.nim-lang.org/#ix=3CqU" => "https://play.nim-lang.org/#ix=3CqV" |
19:57:20 | FromDiscord | <Elegantbeef> No you! |
19:57:23 | FromDiscord | <Hamid Bluri> `recv` is a lot better : D |
19:57:48 | FromDiscord | <retkid> In reply to @Rika "You misspelled received by": this is why i dont show my code, this specific reason |
19:57:52 | FromDiscord | <retkid> i cant spell to save my life |
19:58:00 | FromDiscord | <Rika> Don’t worry beef can’t either |
19:58:09 | FromDiscord | <Elegantbeef> Bef\ |
19:58:10 | FromDiscord | <retkid> but i refuse to download the spellcheck for vscode |
19:58:22 | FromDiscord | <Rika> Beef you’re Canadian right |
19:58:35 | FromDiscord | <Elegantbeef> That's what it says on my birth certificate |
19:58:44 | FromDiscord | <Elegantbeef> "Beef is Canadian, right" |
19:58:51 | FromDiscord | <Rika> Damn |
19:59:53 | FromDiscord | <Elegantbeef> Was there follow up or did you just decide to start a list of "Which countries to avoid visiting"? |
20:00:32 | FromDiscord | <retkid> sort(uwu, system.cmp, Descending) |
20:00:32 | FromDiscord | <Hamid Bluri> : D |
20:01:57 | FromDiscord | <impbox [ftsf]> Received was misspelt when it was created |
20:02:09 | FromDiscord | <Hamid Bluri> agreed |
20:06:50 | FromDiscord | <retkid> nim was a type |
20:06:52 | FromDiscord | <retkid> (edit) "type" => "typo" |
20:06:56 | FromDiscord | <retkid> it was originally nimk |
20:09:25 | FromDiscord | <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:05 | FromDiscord | <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:17 | FromDiscord | <Elegantbeef> `debugger:native` just adds symbols to the executable, you need to run it with a debugger to get any output @jmgomez |
21:26:31 | FromDiscord | <jmgomez> it should also output a nim-gdb.py file as well. Shouldnt it? |
21:26:52 | FromDiscord | <jmgomez> Or am I mistaken? |
21:27:32 | FromDiscord | <impbox [ftsf]> I've never seen such a file |
21:28:26 | FromDiscord | <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:41 | FromDiscord | <Elegantbeef> nim-gdb.py is in your nim directory |
21:33:55 | FromDiscord | <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:13 | FromDiscord | <Elegantbeef> I've just followed https://github.com/saem/vscode-nim#debugging for setting up the debugger in vscode |
21:35:23 | FromDiscord | <jmgomez> ohh that's useful! Thank you! |
21:40:15 | FromDiscord | <Recruit_main707> is `iterable[T]` implemented as a concept? |
21:41:20 | FromDiscord | <Elegantbeef> Nope |
21:44:44 | FromDiscord | <Yardanico> In reply to @Recruit_main707 "is `iterable[T]` implemented as": It's not what you think it is |
21:44:54 | FromDiscord | <tandy> sent a code paste, see https://paste.rs/Rv9 |
21:46:12 | FromDiscord | <leorize> it means you should try to make it work but I can't guarantee that it will \:p |
21:46:32 | FromDiscord | <tandy> lol cool |
21:46:39 | FromDiscord | <leorize> I did improve generics support to the point that it can work in a function declaration context |
21:46:49 | FromDiscord | <leorize> but I haven't tested further than that |
21:46:50 | FromDiscord | <tandy> oh right that should be enough? |
21:47:04 | FromDiscord | <leorize> uniontraits might be useful if you need low level access |
21:50:13 | FromDiscord | <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:57 | FromDiscord | <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:05 | Egeon | I know this question is more apt for the mingw-w64 community but their irc has barely many people. |
22:16:26 | Egeon | nim c --listCmd -d:mingw --passc:"-s -Os -nostdlib -nodefaultlibs -nostartfiles" --verbosity=3 -d:ssl -o:$@ $< >> builds.log |
22:17:25 | Egeon | Anyone know how to reduce the binary size when cross compile from mingw |
22:17:27 | Egeon | ? |
22:20:42 | * | evoalg joined #nim |
22:24:57 | * | evoalg quit (Quit: Leaving...) |
22:31:25 | Egeon | OK found it nothing fancy passing these flags: |
22:31:28 | Egeon | -d:danger -d:strip -d:ssl --opt:size --passc=-flto --passl=-flto |
22:39:19 | NimEventer | New Nimble package! asyncanything - make anything async [to be honest, fake async], see https://github.com/hamidb80/asyncanything |
22:40:28 | FromDiscord | <Yardanico> more npm packages |
22:42:29 | FromDiscord | <dom96> just imagine the package number growth tho |
22:50:31 | FromDiscord | <evoalg> sent a long message, see http://ix.io/3CrA |
22:54:30 | FromDiscord | <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:02 | FromDiscord | <Yardanico> and yeah, this module is only for JS backend |
23:00:05 | FromDiscord | <evoalg> I'm on 1.6 yes |
23:02:58 | FromDiscord | <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:21 | FromDiscord | <Yardanico> well, the plug-in itself can't fix that |
23:04:02 | FromDiscord | <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:08 | FromDiscord | <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:11 | FromDiscord | <Yardanico> oh wait sorry, I thought you had -b:js in your config file |
23:08:28 | FromDiscord | <Yardanico> if you're running it in the command line, then nimsuggest should generally work |
23:11:01 | FromDiscord | <evoalg> ah yea I'm compiling with "nim -b:js -r c <myfile.nim>" |
23:11:37 | FromDiscord | <evoalg> Those large numbers are one of the cool things about python ... exciting to see it coming into nim |
23:12:10 | FromDiscord | <ynfle (ynfle)> @Pmunch what order does `forNode` descend in macroutils descend in ? |
23:15:25 | NimEventer | New 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:12 | FromDiscord | <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:31 | FromDiscord | <Yardanico> there are a couple of native nim libraries like that though |
23:16:59 | FromDiscord | <Yardanico> https://github.com/status-im/nim-stint |
23:16:59 | FromDiscord | <Yardanico> https://github.com/def-/nim-bigints |
23:17:37 | FromDiscord | <Yardanico> And of course you can use gmp |
23:21:55 | FromDiscord | <evoalg> sent a long message, see http://ix.io/3CrC |
23:24:09 | FromDiscord | <Yardanico> you might not always need bigints though, e.g uint64 goes to 18,446,744,073,709,551,615 |
23:26:33 | FromDiscord | <Yardanico> and generally even 32-bit int is more than enough |
23:26:54 | FromDiscord | <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:03 | FromDiscord | <Gumber> sent a code paste, see https://play.nim-lang.org/#ix=3CrE |
23:28:35 | FromDiscord | <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) |