00:05:56 | * | abm joined #nim |
00:19:14 | FromDiscord | <gcao> sent a code paste, see https://play.nim-lang.org/#ix=2NHl |
00:19:27 | FromDiscord | <gcao> (edit) "https://play.nim-lang.org/#ix=2NHl" => "https://play.nim-lang.org/#ix=2NHm" |
00:19:33 | FromDiscord | <gcao> Should s be de-allocated? |
00:19:40 | FromDiscord | <gcao> (edit) "s" => "`s`" |
00:25:09 | * | adnan338 quit (Remote host closed the connection) |
00:35:20 | * | oddp quit (Ping timeout: 272 seconds) |
00:52:34 | leorize | @gcao no, in fact you might have corrupted the heap... |
01:00:00 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:01:06 | * | njoseph joined #nim |
01:02:56 | FromDiscord | <gcao> Thanks. I'm expecting the last `echo` statement to throw an error because memory behind `s` is deallocated. but it didn't happen. |
01:09:19 | leorize | static strings are statically allocated for the most part |
01:09:34 | leorize | only when you modify them would they be moved to the memory |
01:09:57 | leorize | and strings might not be a pointer, they might be an object instead |
01:17:56 | FromDiscord | <gcao> I don't understand how pointer and dealloc work. Based on the doc, `dealloc` frees the memory allocated with alloc, alloc0 or realloc. so it won't dealloc `s` here because it's not allocated using any of those? |
01:29:15 | FromDiscord | <demotomohiro> string type is actually a pointer and `s.addr` in your code is address of `s`'s pointer.↵That pointer exists on static memory and that exists in static memory. |
01:30:09 | leorize | the string type is not guaranteed to be a pointer... |
01:30:14 | FromDiscord | <demotomohiro> That pointer exists on static memory and you cannot dealloc it. |
01:30:35 | leorize | in newruntime (used by the newer arc/orc), the string type is an object |
01:30:51 | leorize | so `s.addr` will only get you the object on the stack, which you can't free |
01:31:12 | leorize | @gcao in a way, yes |
01:32:01 | FromDiscord | <gcao> thank you @demotomohiro @leo |
01:32:18 | FromDiscord | <gcao> (edit) "@leo" => "@leorize" |
01:35:03 | FromDiscord | <gcao> Let me get back to what I want to achieve, I would like to define a generic type like A that stores a pointer of any type, and would like to avoid memory leak. So I want to call `dealloc` in A's `=destroy`. Is this going to work in general? |
01:35:51 | FromDiscord | <gcao> if something in stack can not be deallocated, that's fine |
01:35:55 | FromDiscord | <gcao> (edit) "in" => "on" |
01:36:47 | leorize | are you trying to implement a smart pointer type? |
01:37:02 | FromDiscord | <gcao> yes pretty much |
01:37:15 | leorize | fusion has those |
01:37:46 | leorize | https://nim-lang.github.io/fusion/src/fusion/smartptrs.html |
01:39:19 | FromDiscord | <gcao> great! I'll take a look |
01:40:57 | leorize | and here's the source: https://github.com/nim-lang/fusion/blob/master/src/fusion/smartptrs.nim |
01:46:55 | FromDiscord | <gcao> Behind the scenes, what is really a pointer? is it an int, or an int and a size of the memory? how does the compiler know it's dealing with a real pointer or some random number? |
01:48:14 | leorize | depends on the allocator implementation |
01:48:43 | leorize | most allocators use a tree to keep track of memory roots, and yes there are metadata like size and all that stuff |
01:48:47 | FromDiscord | <gcao> assuming we're talking about Nim ORC |
01:49:13 | leorize | it still depends on the allocator, orc is just a memory management algo :) |
01:49:26 | leorize | Nim's allocator is TSLF if you wanna read more on it |
01:50:04 | FromDiscord | <gcao> thanks. haven't even heard of it 😛 |
01:51:01 | FromDiscord | <ElegantBeef> For the most part you can just think of a pointer as an integer the size of the arch it's running on |
01:51:36 | FromDiscord | <ElegantBeef> Atleast in modern computing since the address sizes are the same as the cpu arch, none of that 8 bit cpu with 16 bit addresses 😄 |
01:52:32 | FromDiscord | <gcao> yeah. that's all I know till today |
02:27:36 | * | Gustavo6046 quit (Ping timeout: 246 seconds) |
02:28:15 | * | Gustavo6046 joined #nim |
02:37:21 | * | wasted_youth quit (Quit: Leaving) |
02:52:12 | * | mmohammadi9812 quit (Ping timeout: 264 seconds) |
02:55:22 | * | mmohammadi9812 joined #nim |
02:57:18 | * | abm quit (Read error: Connection reset by peer) |
03:54:05 | * | mmohammadi9812 quit (Ping timeout: 240 seconds) |
03:55:42 | * | mmohammadi9812 joined #nim |
04:01:50 | * | muffindrake quit (Ping timeout: 264 seconds) |
04:02:21 | ForumUpdaterBot | New thread by Gcao: Looking for advices on data design for a dynamic language, see https://forum.nim-lang.org/t/7449 |
04:03:10 | * | muffindrake joined #nim |
04:03:38 | * | D_ quit (Ping timeout: 264 seconds) |
04:32:10 | * | rockcavera quit (Remote host closed the connection) |
04:51:07 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
05:10:37 | saem | Sup? |
05:10:48 | FromDiscord | <ElegantBeef> My ceiling |
05:11:10 | saem | Good news |
05:11:25 | FromDiscord | <Rika> is there bad news after that> |
05:11:37 | saem | You become a fabulously rich game dev yet, beef? |
05:11:59 | saem | Rika, nah. |
05:12:21 | FromDiscord | <ElegantBeef> Nah that requires publishing and selling my game |
05:12:36 | FromDiscord | <Rika> i had a game idea a day ago but i dont know a lick of game dev |
05:13:14 | saem | Maybe tomorrow |
05:13:36 | FromDiscord | <ElegantBeef> Havent done any further programming today |
05:14:11 | FromDiscord | <ElegantBeef> Mostly just need to get level editor loading/saving through gui, and make levels, then it's "done" |
05:14:37 | saem | I'm trying to get myself to not program tonight, hopefully be more recharged tomorrow. |
05:14:48 | saem | Need a clear head. |
05:15:46 | FromDiscord | <ElegantBeef> Have you played my game? |
05:15:59 | saem | Haven't caught up on the channel to not tempt myself. |
05:16:06 | saem | I haven't played it. |
05:16:24 | FromDiscord | <ElegantBeef> https://jbeetham.itch.io/linerino go play it, dont program 😛 |
05:16:30 | saem | Hehe |
05:16:46 | saem | You gone mine crypto on my machine? |
05:16:56 | saem | 😉 |
05:17:03 | FromDiscord | <ElegantBeef> Probably, only way i could make money 😛 |
05:17:14 | saem | "money" |
05:19:06 | saem | I'm gonna try a video game that is going to thoroughly disappointment me. |
05:19:33 | saem | Not yours, warhammer 40k inquisitor |
05:19:50 | saem | Then play yours after 40k let's me down |
05:22:14 | FromDiscord | <ElegantBeef> Aw that way you can have 2 disappointments in a single night? |
05:23:05 | saem | Double header! |
05:51:38 | * | def- quit (Quit: -) |
05:51:49 | * | def- joined #nim |
05:53:16 | * | a_chou joined #nim |
06:11:06 | * | a_chou quit (Remote host closed the connection) |
06:12:08 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
06:13:36 | * | pbb joined #nim |
07:43:44 | * | narimiran joined #nim |
07:47:23 | FromDiscord | <lantos> sent a code paste, see https://play.nim-lang.org/#ix=2NIx |
07:48:09 | FromDiscord | <lantos> (edit) "https://play.nim-lang.org/#ix=2NIx" => "https://paste.rs/v4S" |
07:48:12 | FromDiscord | <lantos> (edit) "https://paste.rs/lOG" => "https://play.nim-lang.org/#ix=2NIy" |
07:48:18 | FromDiscord | <ElegantBeef> Over sensitive anti-virus |
07:48:38 | FromDiscord | <lantos> https://pastebin.com/5Sz5bSrB |
07:48:43 | FromDiscord | <lantos> is my code |
07:48:48 | FromDiscord | <lantos> Its windows defender lol |
07:49:10 | FromDiscord | <ElegantBeef> Well disable defender 😄 |
07:50:37 | FromDiscord | <ElegantBeef> I havent used windows in a while so that's my view, defender tends to be very very annoying |
07:51:19 | FromDiscord | <lantos> when I compiled it before it was fine, the moment I compiled with --d:danger windows said it was avirus |
07:51:27 | FromDiscord | <lantos> (edit) "avirus" => "a virus" |
08:28:45 | * | narimiran quit (Ping timeout: 240 seconds) |
08:31:48 | * | mmohammadi9812 quit (Ping timeout: 264 seconds) |
08:38:44 | * | mmohammadi9812 joined #nim |
09:29:41 | FromDiscord | <Rika> That’s just the nature of antivirus isn’t it? |
09:31:03 | * | mmohammadi9812 quit (Ping timeout: 260 seconds) |
09:32:22 | * | antranigv_ is now known as antranigv |
09:34:27 | * | mmohammadi9812 joined #nim |
10:05:04 | * | krux02 joined #nim |
10:07:59 | * | oddp joined #nim |
10:34:19 | FromDiscord | <lantos> Yeah I suppose windows didn't like me touching user32.dll |
10:56:35 | * | hmmm joined #nim |
10:56:55 | hmmm | oh noes! disruptek got hammered...again :o |
10:57:07 | hmmm | our boy can't stay out of trouble :| |
11:03:54 | planetis[m] | just unban him already ffs |
11:04:28 | planetis[m] | im not a newcommer and wasn't offended, also he made a good point about the irc guidelines |
11:19:23 | Zevv | well well well. "intentionally causing chaos in the IRC channel" |
11:20:13 | * | Zevv left #nim ("well well well") |
11:21:03 | FromDiscord | <lqdev> was he really though |
11:21:06 | FromDiscord | <lqdev> he's always like that |
11:37:27 | FromDiscord | <Recruit_main707> he sometimes makes it too personal with dom |
11:41:37 | planetis[m] | well i would argue that dom baited him, maybe he should be banned for a change |
11:46:09 | * | jk13579[m] joined #nim |
11:49:44 | FromDiscord | <dom96> I baited him? |
11:49:46 | FromDiscord | <dom96> How? |
11:50:03 | FromDiscord | <dom96> What good point has he made? |
11:59:56 | FromDiscord | <konsumlamm> does anyone happen to know which part of the compiler is responsible for making variables inside templates gensym'd? |
12:00:53 | FromGitter | <Araq> evaltempl.nim or maybe semtempl.nim |
12:00:57 | FromDiscord | <Clyybber> @konsumlamm semtempl |
12:01:05 | FromDiscord | <Clyybber> looking at the set bug? |
12:01:20 | FromDiscord | <konsumlamm> if you mean `{k: v}`, yes |
12:01:29 | FromDiscord | <Clyybber> yep |
12:01:48 | FromDiscord | <Clyybber> Araq: Oh, while you're here: We still need a place to store otherRead |
12:02:04 | FromDiscord | <Clyybber> For better error messages |
12:02:30 | planetis[m] | oh god i wont even try to argue rn |
12:02:31 | planetis[m] | i made my points as clear as i can, i will drop it now |
12:04:07 | FromDiscord | <Clyybber> Araq: I thought about putting the error message in the .comment field |
12:04:46 | FromDiscord | <Clyybber> The "otherRead here: ... " part |
12:05:21 | FromDiscord | <Clyybber> @Araq But I'm not sure if we want to get rid of .comment eventually. But rn this seems like the best solution |
12:08:52 | FromDiscord | <lqdev> well all i can say is that disruptek has been banned for a stupid joke he made towards an existing member of the community. nice job, guys |
12:11:16 | FromDiscord | <Rika> Was it a joke really |
12:12:24 | FromDiscord | <lqdev> > we don't call it whitespace anymore; that's racist. |
12:12:28 | FromDiscord | <lqdev> hard to believe that wasn't a joke |
12:13:36 | FromDiscord | <dom96> Pretty sure he wasn’t banned for that |
12:14:34 | FromDiscord | <lqdev> well i do agree he did say some harsh criticism towards you |
12:14:58 | FromDiscord | <konsumlamm> hmm, what is PNode and why isn't is NimNode? |
12:15:52 | FromDiscord | <dom96> What was the criticism? |
12:16:03 | FromDiscord | <Clyybber> @konsumlamm PNode is NimNode, but in the compiler |
12:16:08 | FromGitter | <Araq> he wasn't banned for the joke. he was banned for the constant bullying of dom96 |
12:23:47 | FromGitter | <Araq> Clyybber: hmm, don't know where to store it either |
12:24:28 | FromDiscord | <Recruit_main707> imho disruptek could be less harsh to dom |
12:31:54 | Amun_Ra | well, now he's going to be |
12:32:40 | * | natrys joined #nim |
12:33:51 | FromDiscord | <Recruit_main707> ehehehehehe |
12:38:34 | Amun_Ra | my $0.02 reading backlog, he was well aware what he's doing and how it'll end |
12:40:16 | FromDiscord | <Meowz> I'm pretty surprised. You guys aren't and sound like that happens often. I never saw someone on Nims Channel flaming or being rough 😄 |
12:40:49 | FromDiscord | <Meowz> Even if I ask how to do hello world I'll get an honest answer |
12:41:01 | FromDiscord | <Rika> disruptek is really the only one that would be like that |
12:41:19 | FromDiscord | <Rika> maybe araq a few years ago or something but thats the past |
12:46:32 | FromDiscord | <konsumlamm> so, i think i now know why the bug happens: there is no case to handle TableConstr, so i'ts children get analyzed, where the elements are interpreted as ExprColonExpr, so the first element isn't gensym'd |
12:46:51 | FromDiscord | <konsumlamm> now i only need to sigure out what i need to write in the TableConstr case... |
12:46:51 | FromDiscord | <Clyybber> yep, looks like thats the case |
12:46:58 | FromDiscord | <konsumlamm> (edit) "sigure" => "figure" |
12:47:02 | federico3 | I'd love to see some higher signal-to-noise ratio on the Nim channels... |
12:52:01 | FromDiscord | <konsumlamm> ig i should move my rambling to #internals |
12:55:11 | FromDiscord | <haxscramper> By the way @Araq, Zevv , saem (and others). - I maybe you missed it, but Yardanico bridged `#internals` to IRC (and matrix/gitter I suppose) |
12:55:32 | FromDiscord | <haxscramper> `#nim-internals` on IRC |
12:56:21 | FromGitter | <Araq> I'm not on IRC anymore |
12:56:53 | FromGitter | <Araq> and there are too many channels, if you have questions regarding Nim's internals, I'm here |
12:57:00 | FromDiscord | <Yardanico> Gitter only has #nim and #nim-offtopic bridged |
12:57:20 | FromDiscord | <Yardanico> @haxscramper the Gitter bridge isn't controlled by me |
12:57:42 | FromDiscord | <Yardanico> and didn't gitter switch to matrix? |
12:57:53 | FromDiscord | <dom96> Yeah. I think it’s fine to discuss internals here. Just be on the look out for newbies asking questions amongst the discussions 🙂 |
12:58:12 | FromDiscord | <konsumlamm> then i'll move back here lol |
12:58:16 | FromDiscord | <haxscramper> Maybe add `#beginners`? I porposed it coule of time |
12:58:18 | FromDiscord | <haxscramper> (edit) "time" => "times" |
12:58:23 | FromDiscord | <haxscramper> (edit) "coule" => "couple" |
12:58:28 | FromDiscord | <konsumlamm> can the children of TableConstr be something other than ExprColonExpr? |
12:58:43 | FromGitter | <Araq> no (konsumlamm) |
12:59:16 | FromDiscord | <haxscramper> Because I think we can't just keep `#main` as a discussion for everything, as we get more people there will be more discussions each going on at the same time |
13:00:02 | FromDiscord | <haxscramper> Crosstalking over everything |
13:00:57 | FromDiscord | <dom96> Yeah. We should look into doing this long term. For now I think there isn’t enough discussion to warrant it |
13:01:00 | FromDiscord | <haxscramper> And like almost every other programming discord has `#beginners` so people might expect something like this |
13:01:28 | FromDiscord | <dom96> I’d like irc logs for that channel too first |
13:01:33 | FromDiscord | <Yardanico> The problem is that we need enough people to check out #beginners then, otherwise people's questions wouldn't be answered that fast |
13:01:54 | FromDiscord | <Yardanico> #main is the main channel on all platforms (gitter, irc, discord, matrix) so there are plenty of people here |
13:02:11 | FromDiscord | <konsumlamm> i'd be happy if someone could explain how the stuff in `semtempl.semTemplBody` for `nkCurlyExpr` works, i hope i can then figure out how to do it for `nkTableConstr` (though gtg for a bit now) |
13:02:37 | FromDiscord | <Yardanico> I think that most people who are in #nim IRC don't even know that we have like 10 more channels on IRC |
13:02:59 | FromDiscord | <Yardanico> (they're "documented" here btw - https://github.com/nim-lang/Nim/wiki#bridged-real-time-chats) |
13:03:20 | federico3 | Yardanico: 10? |
13:03:53 | FromDiscord | <Yardanico> we have 10 channels exactly that are bridged between discord and irc |
13:04:31 | FromDiscord | <Yardanico> #nim #nim-offtopic #nimble #nim-internals #nimconf #nim-gamedev #nim-webdev #nim-langdev #nim-science #nim-embedded |
13:04:42 | FromDiscord | <Meowx> +1 |
13:05:33 | FromDiscord | <Yardanico> I mean a #beginners channel would be nice, but not all people will actively look there (especially the ones who are on IRC) |
13:06:13 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/805061302393110548/unknown.png |
13:07:38 | FromDiscord | <Rika> huh lots of game devs |
13:08:28 | FromGitter | <adammflax> I know chat from different nim communities sync to each other, but whats the "main" chat is it gitter? |
13:08:42 | FromDiscord | <Yardanico> nowadays it's Discord I'd say |
13:08:47 | FromDiscord | <Yardanico> second most popular is IRC |
13:12:32 | hmmm | as a newbie I get my questions answered instantly here so my vote is do not change a thing :3 |
13:13:19 | FromDiscord | <Rika> you're a noob? |
13:13:31 | hmmm | biggest one there is :> |
13:14:01 | FromDiscord | <Rika> doesnt sound like it |
13:15:32 | hmmm | well I have a lot of questions anyway and the support has been amazing by countless lads (disruptek included) |
13:17:24 | * | filcuc joined #nim |
13:25:20 | * | rockcavera joined #nim |
13:28:36 | * | filcuc quit (Ping timeout: 240 seconds) |
13:32:48 | * | wasted_youth joined #nim |
13:38:09 | * | filcuc joined #nim |
13:44:31 | FromDiscord | <dom96> @Yardanico I wonder if we should just hook up the Nim blog RSS to the announcements channel |
13:45:02 | FromDiscord | <Yardanico> yeah that might be a good idea |
13:45:04 | FromDiscord | <Yardanico> found https://monitorss.xyz/ |
13:45:25 | * | filcuc quit (Ping timeout: 240 seconds) |
13:46:14 | * | mmohammadi9812 quit (Ping timeout: 246 seconds) |
13:47:26 | * | mmohammadi9812 joined #nim |
13:51:53 | * | filcuc joined #nim |
13:56:16 | * | filcuc quit (Ping timeout: 240 seconds) |
13:58:39 | FromDiscord | <zetashift> I like that idea |
14:00:24 | FromDiscord | <Recruit_main707> how do you access an index of a `ptr UncheckedArray[T]`? |
14:00:43 | * | filcuc joined #nim |
14:02:03 | FromDiscord | <lqdev> yourUncheckedArray[0] |
14:02:27 | Oddmonger | it's like a normal array in fact |
14:02:38 | Oddmonger | but not watched by the gc |
14:02:44 | FromDiscord | <Recruit_main707> then its not taking the correct arg i think |
14:03:44 | * | mmohammadi9812 quit (Ping timeout: 246 seconds) |
14:04:27 | * | mmohammadi9812 joined #nim |
14:04:34 | FromDiscord | <Recruit_main707> `meshes {.importc: "meshes".}: ptr UncheckedArray[Mesh]`↵`model.meshes[0]`↵`Error: type mismatch: got <ptr Mesh, int literal(0)>`ç |
14:05:18 | * | rockcavera quit (Read error: Connection reset by peer) |
14:05:48 | * | rockcavera joined #nim |
14:08:18 | FromDiscord | <Yardanico> @dom96 check #announcements for how it will look |
14:08:25 | FromDiscord | <Yardanico> looks okay since discord also auto-embeds |
14:09:47 | * | filcuc quit (Ping timeout: 272 seconds) |
14:16:01 | * | mmohammadi9812 quit (Ping timeout: 272 seconds) |
14:16:58 | * | mmohammadi9812 joined #nim |
14:17:07 | FromDiscord | <dom96> Looks good |
14:25:45 | * | mmohammadi9812 quit (Ping timeout: 240 seconds) |
14:27:04 | * | mmohammadi9812 joined #nim |
14:30:50 | * | narimiran joined #nim |
14:34:50 | * | filcuc joined #nim |
14:39:34 | * | mmohammadi9812 quit (Ping timeout: 272 seconds) |
14:44:24 | * | mmohammadi9812 joined #nim |
14:59:45 | * | Thisago joined #nim |
15:01:10 | Thisago | Hi everyone! |
15:01:29 | * | xet7 joined #nim |
15:01:46 | FromDiscord | <Rika> hello there |
15:01:56 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
15:02:14 | Oddmonger | hi (let's get friendly, we never know :þ) |
15:02:22 | * | njoseph joined #nim |
15:03:31 | FromGitter | <offbeat-stuff> Just made my first macro |
15:03:32 | FromGitter | <offbeat-stuff> https://play.nim-lang.org/#ix=2NKi |
15:04:22 | FromDiscord | <dom96> offbeat-stuff: nice! |
15:04:48 | FromDiscord | <dom96> Welcome Thisago |
15:05:22 | Thisago | This language is awesome! Im migrating from typescript to nim. congratulations to everyone working on it |
15:05:31 | * | narimiran quit (Quit: leaving) |
15:09:24 | Thisago | Thanks dom96 |
15:14:00 | FromDiscord | <Recruit_main707> sent a long message, see http://ix.io/2NKm |
15:14:46 | FromDiscord | <Rika> try model.meshes[][0] |
15:14:47 | FromDiscord | <Rika> maybe |
15:14:47 | FromDiscord | <lqdev> it's either a bug or meshes is not a ptr UncheckedArray[Mesh] |
15:14:52 | FromDiscord | <Rika> it seems odd |
15:17:03 | FromDiscord | <Recruit_main707> 🥴 github shows ptr unCheckedArray, but its actually ptr Mesh locally |
15:17:10 | filcuc | is it safe to call multiple times setupForeignGc |
15:17:14 | filcuc | ? |
15:18:29 | FromDiscord | <Recruit_main707> in the same thread? |
15:18:36 | FromDiscord | <zetashift> Welcomeeee Thisago |
15:19:26 | filcuc | yes |
15:19:37 | filcuc | in the same thread |
15:20:02 | * | waleee-cl joined #nim |
15:20:27 | FromDiscord | <Recruit_main707> https://nim-lang.org/docs/system.html#setupForeignThreadGc |
15:20:44 | FromDiscord | <Yardanico> yeah "so the GC for this thread will only be initialized once per thread, no matter how often it is called." |
15:20:57 | FromDiscord | <Recruit_main707> was about to paste it :P |
15:26:32 | filcuc | sorry i should have RTFM |
15:26:35 | filcuc | thanks |
15:39:48 | * | Vladar joined #nim |
15:46:08 | * | mmohammadi9812 quit (Ping timeout: 260 seconds) |
15:46:38 | * | mmohammadi9812 joined #nim |
15:51:02 | * | mmohammadi9812 quit (Ping timeout: 264 seconds) |
15:58:58 | * | DrWhax quit (Quit: leaving) |
16:05:25 | saem | For what it's worth, I think folks new to Nim shouldn't have to figure out which channel to join to ask questions or whatever, it's yet another thing. I do like the internals channel as it's focused. |
16:07:03 | saem | hax: thanks for the heads up. |
16:07:33 | FromDiscord | <zetashift> I don't there is enough traffic (yet) to warrant a beginners channel, but hopefully there will be! Cause if enough join, questions could get lost and convo's can get messy |
16:07:50 | * | filcuc quit (Ping timeout: 264 seconds) |
16:08:51 | saem | Honestly can't think of a good reason why this would ever not be the beginners channel. |
16:09:22 | * | haxscramper joined #nim |
16:09:39 | haxscramper | I actually thought about it for some time again - and I think it is basically a chicken-egg problem: we won't add `#beginners` because there are not enough people who will be checking on it, and we don't have enough beginner questions flooding `#main` to make everyone feel like it is needed addition. |
16:10:03 | haxscramper | So it's not like this is something that requires action |
16:10:30 | * | blueberrypie quit (Remote host closed the connection) |
16:10:50 | * | blueberrypie joined #nim |
16:12:15 | haxscramper | And `#internals` is mostly about 'we don't have enough compiler devs' - like yes, we wont have them if starting with compiler basically means you are on your own and there is no dedicated go-to place for that. I'm not saying that I'm particularly good with new codebases, but man this is annoying to figure out 10k sloc software. With `#internals` I can just put up a question and don't worry about it being washed away by hundreds of |
16:12:15 | haxscramper | messages. |
16:13:46 | FromDiscord | <Yardanico> well, we need Araq there for internals to truly be useful :P |
16:13:49 | haxscramper | And people who know compiler stuff can just check it up when they feel comfortable. I mean I really don't want to be a nuisanse to other people who are doing important stuff, but sometimes I just need to ask a question from compier devs |
16:13:50 | saem | Araq: for the macro error count fix, was your intention to keep working on that or would you mind if I carry on that line of work? |
16:14:06 | * | rockcavera quit (Remote host closed the connection) |
16:14:23 | FromDiscord | <Yardanico> Also, doesn't Araq not receive pings now since he's in Gitter and not IRC? |
16:14:27 | FromDiscord | <Yardanico> you have to use @ to ping him now |
16:14:31 | krux02 | @zetashift, your emoji reaction in discord can't be seen on IRC |
16:14:53 | FromDiscord | <Yardanico> oh nvm, he's still on IRC |
16:15:02 | FromDiscord | <Yardanico> @zetashift ^ |
16:15:51 | krux02 | seems like pinging someone through the IRC bridge doesn't seem to work either. |
16:15:55 | Yardanico | it works |
16:16:01 | Yardanico | @yardanico |
16:16:04 | Yardanico | oh wait why |
16:16:07 | Yardanico | need to restart the bridge heh |
16:16:14 | * | FromDiscord quit (Remote host closed the connection) |
16:16:31 | * | FromDiscord joined #nim |
16:16:43 | FromDiscord | <Yardanico> let's see now |
16:16:44 | FromDiscord | <Yardanico> 123 |
16:16:45 | Yardanico | @yardanico |
16:16:47 | Yardanico | yeah works now |
16:17:08 | FromDiscord | <arne> Yordanico, cool |
16:17:59 | FromDiscord | <Yardanico> it's just that discord requires special logic for handling pings since you have to ping by user's ID, not just "@nick" |
16:18:00 | krux02 | stable reliable software in action |
16:18:05 | FromDiscord | <Yardanico> xD |
16:19:43 | ForumUpdaterBot | New thread by Mantielero: Compiling some functions into a lib from nim itself, see https://forum.nim-lang.org/t/7451 |
16:22:50 | FromDiscord | <zetashift> @krux02 @Yardanico I keep doing that out of habit haha, thanks but yea basically I agree with @haxscramper |
16:23:08 | FromDiscord | <Yardanico> well, I'm not against #internals, it's good to have |
16:25:30 | FromDiscord | <arne> To be honst, there is already a channel for nim compiler developers, but it is not exposed to the public as it is meant for people who work on the compiler only. |
16:25:41 | FromDiscord | <arne> in the sense of full time compiler developers. |
16:26:09 | FromDiscord | <dom96> You mean the telegram channel? |
16:26:21 | saem | That also means it's really hard to learn for those who are starting our part time |
16:26:23 | FromDiscord | <arne> no |
16:27:08 | FromDiscord | <arne> well, it it tough getting into full time compiler development, not sure if reading chat would be any help anyway. |
16:27:48 | FromDiscord | <arne> That channel isn't supposed for external people to ask questions, that one can be done in main and a reply usually doesn't wait for a long time |
16:28:34 | FromDiscord | <arne> @dom96 I was talking about an IRC channel. |
16:28:44 | saem | I'm not referring to asking questions, but it does build up a certain context or sense. |
16:28:59 | FromDiscord | <arne> But is not a locked channel by any means, the name is just not published |
16:29:53 | saem | I'd rather not sure up unwelcome so it's out of reach. |
16:30:05 | saem | show |
16:30:32 | FromDiscord | <dom96> I wasn’t aware of this channel. |
16:30:47 | FromDiscord | <dom96> Would be cool if we could bridge #internals there. |
16:30:54 | FromDiscord | <dom96> And be more open 🙂 |
16:31:30 | krux02 | take the perspective of a compiler developer please. |
16:32:16 | krux02 | You don't want that every little discussion is open for any unqualifiend opinion to be exposed or every comment that is judged by externals. |
16:33:30 | krux02 | it is mostly made to have some form of privacy. If the channel would be bridged to something public the point of the channel would be gone and another non public channel would be opened. |
16:35:25 | saem | I am considering that, every channel being public isn't helpful, entirely why I'm not going to find it. Merely stating that presently it's really difficult to grow in being able to contribute to the compiler, which seems important a without big company budgets a more distributed model with more part time folks makes sense. |
16:36:07 | saem | But that's advocating for the distributed model, not assuming it to be a conclusion. |
16:37:03 | krux02 | Well I certainly had my very own problems contributing to the compiler. It is not an easy task. |
16:37:49 | saem | That is to say, presently the complexities of working on the compiler have more to do with information over and above the core problem. |
16:37:50 | krux02 | Usually when I don't understand something I just start with cleaning up something to get used to the sourcecode and te get working with the sourcecode. Not to achive anything in particular. And then I grow on my tasks. |
16:38:27 | krux02 | The broblem though is, this model doesn't work very well in Nim for reasons that shall not be said. |
16:38:39 | krux02 | Reasons I am not contributing to Nim anymore. |
16:38:43 | saem | Yes, but it's the clean up going to be accepted, that's what I'm looking at right now. |
16:38:48 | saem | Ah |
16:39:13 | saem | For me it's a sense, perhaps for you it's an experience. |
16:39:16 | krux02 | cleanup is generally not accepted. |
16:40:35 | saem | I mean as long as there are principles behind it, that get better over time, that's would be ideal. |
16:41:00 | krux02 | Whenever I did some cleanup that did not directly implement a feature or anything that was explicity asked for. It was either rejected for that reason, or it was a very long and weary fight. |
16:41:20 | krux02 | I am not sure about any principles. |
16:42:37 | krux02 | even code that was entirely my own grown code and logic, where I was responsible for. I had to fight for to refactor it. |
16:43:50 | saem | I will admit I find the current decomposition of sem related functionality increase the cost of reasoning for a language feature or lifetimes/phases/guarantees of transforms. |
16:44:07 | * | audiophile joined #nim |
16:44:49 | krux02 | My goal, before 1.0 was released was all the time to cut away everything that isn't essential. |
16:45:06 | krux02 | Remove features that are not well implemented or thought through. |
16:45:28 | krux02 | And when completely unused and undocumented, just cut it away and try to remove traces of it. |
16:45:49 | krux02 | and then improve dead code analysis for the language to find all the functions and symbols that aren't used anymore. |
16:46:12 | krux02 | in general, try to simplify and reduce as much as possible. |
16:46:34 | krux02 | These methods were radical |
16:47:00 | saem | My goal right now would be to as much as possible encode pre and post conditions, lifetimes of internal phases, etc directly in the code so it's easier to reason about. |
16:47:55 | saem | Maybe it's there and it simply needs minor things like comments and recognizing the conventions more. |
16:48:47 | FromDiscord | <hamidb80> what is `when false:` in nim? 😕 |
16:48:58 | FromDiscord | <hamidb80> (edit) "is" => "does" | "does`when false:` ... in" added "mean" |
16:48:59 | FromDiscord | <haxscramper> `#ifdef 0` |
16:49:10 | FromDiscord | <hamidb80> what's the point? |
16:49:10 | FromDiscord | <haxscramper> Just don't compile piece of code |
16:49:20 | saem | It's an easy way to "comment out" a bunch of code |
16:49:46 | krux02 | comment out, but keep syntax highlighting in the editor on. |
16:52:00 | krux02 | code in `when false:` blocks is supposed to be deleted. The only reason it isn't deleted yet is probably the auther still feels personally attached to the code or he things that there might be still some value in it. |
16:52:02 | saem | The debugger helped a lot, but looking at the call stack and the bouncing between modules, and what seems like a number of procs called at different times with conditionals to guard for those differences, means there is a lot of carrying around of when and implied layers. |
16:52:14 | saem | But that could be my inexperience with it. |
16:52:53 | saem | I doubt that it is as callgraphs and change sets don't lie. |
16:53:29 | FromDiscord | <konsumlamm> krux02: or, in examples/tests, that the code doesn't compile yet, because there's a bug |
16:53:49 | krux02 | yea, I implemented the gdb script mainly to help me debug and understand the compiler a bit better. |
16:54:07 | saem | I updated it for the same reason |
16:54:52 | krux02 | I made stuff like the rope type printable |
16:55:53 | krux02 | imagine trying to debug the compiler, and then you want to inspect a string variable, but everything yousee are indirections over indirections but you joust don't get to actual import string data. |
16:56:07 | krux02 | I think there is a lot of wasted memory in the rope type. |
16:56:24 | saem | It really helps, I think the number of folks who could make deep and meaningful improvements to the compiler could be significant increased if the architecture favored rigorous and explicit phases and life times, with features adhering to those. I think that would also ensure that new and old features will tend to be orthogonal be default. |
16:57:41 | krux02 | I don't think I totally understand the details here, but yes, I agree that the code really needs to be improved for readability. |
16:58:43 | FromDiscord | <dom96> Last time I heard Araq was up for getting rid of the rope type |
16:58:46 | * | filcuc joined #nim |
16:59:11 | FromDiscord | <dom96> Could be an interesting refactoring if so |
17:01:14 | saem | I'm going to do something to illustrate what I mean, but I'm sure it'll bother some folks so apologies to those that are offended. Rather than in a separate doc, but instead in the code itself clarify the internals and guarantees like this stays to do for rust: https://rustc-dev-guide.rust-lang.org/overview.html |
17:01:30 | * | mmohammadi9812 joined #nim |
17:02:12 | saem | So at the top level the module graph and it's phases are pretty straightforward and that's great. |
17:02:51 | saem | Then comes sem and the fun begins with semgenericsandstmts |
17:03:29 | saem | Which is where we seem to do an early check and guarantee that the system module is preliminarily imported. |
17:03:48 | FromGitter | <Araq> lexer -> parser -> sem'check -> codegen |
17:03:57 | FromGitter | <Araq> is the pipeline. |
17:04:00 | saem | That high level I know and it's easy |
17:04:14 | saem | I mean the nitty gritty in sem |
17:04:29 | saem | That's the really cool stuff. |
17:05:09 | FromGitter | <Araq> the uncool stuff is the crap that is simply misdesigned, no amount of documentation would fix that |
17:05:13 | FromGitter | <Araq> bbl |
17:07:28 | saem | I can see some of the guarantees a proc is making/trying to make some times but the intention (spec?) is unclear. |
17:07:42 | saem | Which I mean it's living software so that will happen |
17:10:33 | saem | Personally, what I believe would greatly help raining and I perceive as missing, is the core procs that form sems internal phases and their invariants highlighted. |
17:13:54 | saem | My hunch is that arranging code to expose that as a linear flow, which will come at the expense of other lines of inquiry, is the better trade-off as the approach to sem seems to be a sort of breath first successive set of traversals each "clarifying" the AST as it goes deeper and deeper. |
17:14:38 | krux02 | @dom96: last time I heard him that he was up to get rid of something. I did it, and then He said "I never asked for that" and I had to point him to the exact quote from himself where he did. |
17:17:23 | saem | Orienting the code around that core traversal would really help in a number of key scenarios. It seems to be not how it's arranged right now, or I'm missing something, and more arranged for fast proc lookup by memory. Which I totally appreciate why as that is/was a struggle for a long time. |
17:18:15 | saem | Not asking anyone to do the rearrangement, if like to do the work of that's going to be accepted. |
17:18:16 | * | filcuc quit (Ping timeout: 240 seconds) |
17:19:31 | saem | The exact style of course can be slowly figured out over time, just a notional approval of the philosophy and maybe a few points to stick to at the outset that can be noted somewhere explicitly and it can be a slow/gentle refactor. |
17:20:59 | krux02 | saem: In my experience, code that doesn't explicity fix an issue with a title isn't merged. So you have to keep refactoring until it will become impossible to merge with the main branch aund all your changes will be just your personal experience. |
17:22:02 | saem | krux02: that's exactly why the upfront commitment to principles is what I'm looking for, so the small changes can be treated against those and accepted against those on that basis. |
17:23:36 | saem | I'm a huge fan of very tiny changes, so one or two procs at a time. Is what I'd want to aim for, but the first trick would be agreeing to accept the inconvenience of that transform. |
17:23:36 | krux02 | I am not sure what you mean by that. |
17:24:01 | * | a_chou joined #nim |
17:25:01 | saem | Hmm, maybe this is easier if there was a table with the current typical sem callgraph (abridged) and showing how that might differ post any such transform |
17:25:10 | * | audiophile_ joined #nim |
17:25:18 | saem | I could use a hand with annotating the semantics |
17:25:23 | krux02 | I am generally a fan of thanges that reduce the complexity of code and improve on the structure of code. I was explicity asked to not merge PRs anymore, and by now my right to merge PRs has been revoked. |
17:26:50 | saem | krux02: don't suppose you'd be willing to lend a hand on a Google drawing, I'll drive but an editor with compiler knowledge would help. Assuming you're interested? |
17:27:37 | saem | Let me make a first sketch so perhaps it's a bit more clear what I'm asking |
17:28:00 | krux02 | yes please |
17:28:47 | * | audiophile quit (Ping timeout: 260 seconds) |
17:28:55 | * | audiophile_ is now known as audiophile |
17:29:21 | saem | Let me see what I rough out in 15 minutes and you and others can poke at. |
17:42:15 | FromDiscord | <zetashift> So if I have a module named `player.nim` I and I import it in `foo.nim`, I can't have a variable `var player: Player`? |
17:45:55 | * | caesarsalad joined #nim |
17:51:24 | krux02 | I don't recommend it. |
17:51:34 | krux02 | but I think it is possible. |
18:00:44 | leorize | @zetashift: should be possible |
18:01:18 | leorize | compiler bugs occur when your player module have a variable/function called player |
18:01:24 | leorize | otherwise it should be fine |
18:02:15 | leorize | you can use `import x as y` to rename the import if there are any problems |
18:07:44 | FromDiscord | <zetashift> @leorize but my variable is in `foo.nim` and I still got redefinition of player, I fixed it with the `import as` trick but it seemed weird |
18:08:29 | FromDiscord | <zetashift> sent a code paste, see https://play.nim-lang.org/#ix=2NLz |
18:09:05 | leorize | that's weird then |
18:14:10 | FromDiscord | <carpal> is this absolutely the same of↵`Y = object↵ name: string`↵or actually not? https://media.discordapp.net/attachments/371759389889003532/805138802859180092/unknown.png |
18:14:33 | * | hyiltiz quit (Quit: hyiltiz) |
18:14:35 | FromDiscord | <carpal> (edit) "is this absolutely the same of↵`Y = object↵ name: string`↵or actually not? https://media.discordapp.net/attachments/371759389889003532/805138802859180092/unknown.png" => "sent a code paste, see https://play.nim-lang.org/#ix=2NLF" |
18:15:01 | leorize | yes |
18:33:00 | FromDiscord | <carpal> okay thanks |
18:33:04 | FromDiscord | <carpal> another thing |
18:33:48 | FromDiscord | <carpal> is there a way to make not the compiler to generate safe exception alerts? |
18:34:41 | FromDiscord | <carpal> for example, using c/c++ when you get an element out of the bounds of the array the program crashes |
18:34:45 | FromDiscord | <carpal> (edit) "for example, using c/c++ when you get an element out of the bounds of the array the program crashes ... " added "directly" |
18:35:01 | FromDiscord | <carpal> (edit) "for example, using c/c++ when you get an element out of the bounds of the array the program crashes directly ... " added "without saying you the problem etc..." |
18:35:52 | FromDiscord | <carpal> while the same case but in nim is printed on the screen |
18:36:02 | FromDiscord | <carpal> (edit) "while ... the" added "in" |
18:36:14 | FromDiscord | <carpal> (edit) "while in the same case but in nim ... is" added "the crash way" |
18:36:25 | FromDiscord | <haxscramper> You can just catch exception in `main()` and get it's stacktrace |
18:36:27 | FromDiscord | <carpal> (edit) "way" => "reason" |
18:36:32 | FromDiscord | <carpal> no no |
18:36:47 | FromDiscord | <carpal> I don't need to handle the error |
18:37:53 | * | Thisago quit (Ping timeout: 248 seconds) |
18:39:18 | * | tane joined #nim |
18:41:20 | FromDiscord | <carpal> for example overflow checks make the program slower |
18:41:31 | FromDiscord | <carpal> and I would to avoid that delay |
18:41:48 | haxscramper | `-d:danger` and `-d:release` disable most of the runtime checks |
18:42:19 | haxscramper | There might be some other flags, but those ones are should provide most of the necessary checks IIRC |
18:47:04 | FromDiscord | <carpal> eh in fact I was asking for those flags |
18:47:34 | FromDiscord | <carpal> I already knew danger and release |
18:47:40 | FromDiscord | <carpal> but thank you anyway |
18:49:03 | FromDiscord | <konsumlamm> `-d:danger` should disable out of bounds exceptions though |
18:49:16 | FromDiscord | <carpal> ok, testing, release already make something useful |
18:49:58 | FromDiscord | <carpal> a last thing |
18:50:55 | FromDiscord | <carpal> here, with var the stack instance should be passed for reference, but what it happens if I use inline pragma https://media.discordapp.net/attachments/371759389889003532/805148051328598016/unknown.png |
18:51:02 | FromDiscord | <carpal> (edit) "here, with var the stack instance should be passed for reference, but what ... itpragma?" added "does" | "pragma" => "pragma?" |
18:51:03 | * | hyiltiz joined #nim |
18:51:06 | FromDiscord | <carpal> (edit) "happens" => "happen" |
18:51:17 | Prestige | all the edits |
18:51:49 | FromDiscord | <carpal> I hope the compiler won't create a reference for self |
18:53:36 | FromDiscord | <konsumlamm> @haxscramper i think you misunderstood what i meant by `Some(<pattern>)` - `<pattern>` means an arbitrary pattern, which includes variables, option patterns, object patterns etc., so something like `Some(Some(None))` should be possible, but also `Some((field: @a))` or `Some([@head, .._])` |
18:55:02 | FromDiscord | <haxscramper> Yes, of course `Some(<pattern>)` is a valid pattern therefore `Some(Some(<pattern>))` is a valid pattern - i just wanted to make accent on nested options. |
18:55:31 | FromDiscord | <Rika> var types in params are pointers internally |
18:55:33 | FromDiscord | <haxscramper> So I fully agree with you on this one, just used wrong wording |
18:57:22 | FromDiscord | <konsumlamm> kk |
19:26:43 | FromGitter | <Araq> saem: refactorings should be discussed with me first but that's all |
19:33:44 | * | PMunch joined #nim |
19:34:33 | * | a_chou quit (Quit: a_chou) |
19:35:36 | FromDiscord | <basdk> hi i'm trying to install nimlsp on my system via nimble install nimlsp, when i try to do it i get this error /home/basdk/Desktop/nimlsp/nimlsp/src/nimlsppkg/suggestlib.nim(7, 14) Error: cannot open file: /usr/nimsuggest/nimsuggest.nim↵i have installed nimsuggest but idk what's wrong |
19:35:59 | PMunch | That's pretty common |
19:36:03 | PMunch | Hold on a sec |
19:37:11 | PMunch | https://github.com/PMunch/nimlsp/issues/67 |
19:39:10 | FromDiscord | <xCFF> Is there a built in way to get a LPCWSTR (ptr uint16) from a nim string when working with windows? |
19:41:50 | PMunch | Well you'd have to convert it to utf-16 |
19:46:08 | FromDiscord | <Yardanico> https://nim-lang.org/docs/widestrs.html |
19:46:22 | FromDiscord | <Yardanico> @xCFF this is probably what you want |
19:48:29 | * | oddp quit (Quit: quit) |
19:50:49 | FromDiscord | <xCFF> kk |
19:51:00 | FromDiscord | <xCFF> https://khchen.github.io/winim/winstr.html#L.t%2Cstring also looks promising 😄 |
19:54:56 | * | glguy joined #nim |
20:01:06 | FromDiscord | <xCFF> hmm getting some weird results when i pass in a ptr to a wstring for a LPCWSTRING. I should be passing in &my_wstring for an arg to LPCWSTRING right? |
20:02:15 | PMunch | &? |
20:03:32 | PMunch | WideCString from the widestrs module is already a pointer |
20:03:38 | PMunch | Or a pointer type |
20:04:15 | FromDiscord | <xCFF> sorry too much golang |
20:04:20 | FromDiscord | <xCFF> ref(my_wstring) |
20:06:34 | PMunch | myWstring.addr surely |
20:06:55 | audiophile | so anything new with nim in last 3 months? |
20:06:56 | FromDiscord | <xCFF> addr |
20:06:58 | audiophile | new/cool |
20:07:06 | PMunch | Oh hi audiophile |
20:07:10 | audiophile | hullo! |
20:07:26 | PMunch | There's a new version I think |
20:07:28 | audiophile | hows it going PMunch |
20:07:29 | PMunch | 1.4.2 |
20:07:39 | audiophile | ah, nice time to check out the changelog ig |
20:07:44 | PMunch | Going pretty well, getting stoked for FOSDEM next weekend |
20:09:43 | audiophile | oooh nice |
20:09:47 | PMunch | But @xCFF you shouldn't need to do anything more than newWideCString(mystring) and pass the result of that to a LPCWSTRING |
20:09:51 | audiophile | a pity what's going on with element just before fosdem though :/ |
20:10:02 | PMunch | What's going on with it? |
20:10:13 | audiophile | it was removed from playstore recently |
20:10:24 | PMunch | Oh really? |
20:10:25 | PMunch | That certainly isn't good |
20:10:27 | PMunch | Why? |
20:10:29 | audiophile | https://www.androidpolice.com/2021/01/30/google-pulls-federated-chat-app-element-from-the-play-store/ |
20:10:48 | PMunch | That explains why I couldn't install it earlier today |
20:10:59 | audiophile | apparently for 'abusive content' but that seems like a catch-all nowadays |
20:11:27 | PMunch | It's a messaging service, of course it has abusive content.. |
20:12:02 | audiophile | heh yeah, not sure what they were smoking |
20:12:13 | audiophile | 1.4.2 looks like a LOT of bugfixes which is great! |
20:12:27 | audiophile | oh and are you giving a talk at fosdem? |
20:13:06 | PMunch | Yes :) |
20:13:31 | PMunch | https://fosdem.org/2021/schedule/event/nimdsl/ |
20:14:50 | audiophile | that's awesome! I think you gave a talk earlier on nimscript? I'll be sure to attend |
20:15:05 | PMunch | Indeed, this will be my third FOSDEM talk I think |
20:15:38 | audiophile | will you be showing benchmarks for C vs nim on microcontrollers? |
20:15:39 | audiophile | curious about that |
20:15:54 | PMunch | I have a slide on that yes |
20:16:00 | PMunch | But in my testing it's 1:1 with C |
20:16:28 | PMunch | Sometimes even beating it because you're hiding optimisations |
20:16:38 | audiophile | suoh wow tha's impressive |
20:17:01 | PMunch | I mean it compiles to C so it's not that surprising |
20:17:13 | audiophile | yeah, but the beating nim part is surprising |
20:17:13 | PMunch | And my tests have been pretty native ports |
20:17:22 | audiophile | s/nim/c |
20:17:49 | PMunch | Well Nim spits out highly optimisable C code, code you wouldn't write yourself |
20:18:30 | audiophile | wouldn't or couldn't? if it's the latter I'm reeaaaaly intrigued! |
20:18:45 | PMunch | Wouldn't |
20:18:56 | PMunch | I mean you can write assembly in C, but you wouldn't |
20:19:52 | PMunch | You can write assembly in Nim as well thoug |
20:19:52 | FromDiscord | <Recruit_main707> doesnt optimisable mean it can be further optimised, ie its not optimised? |
20:20:21 | PMunch | Well the code Nim spits out is pretty optimised, but it also lends itself to be optimised by the C compiler by design |
20:23:44 | audiophile | hmm i see |
20:24:43 | FromDiscord | <basdk> Thanks i'll see that PMunch |
20:28:33 | * | natrys quit (Quit: natrys) |
20:28:57 | ee7[m] | PMunch: slide number 7 of your slides on that FOSDEM link has the heading "Nims killer feature" - can you add an apostrophe? This also avoids a theoretical misreading of ".nims killer feature". |
20:29:42 | PMunch | Well I could update the slides, but the video is already recorded and uploaded |
20:30:24 | ee7[m] | Ah :) |
20:31:03 | ee7[m] | Maybe invent a time machine? |
20:32:04 | audiophile | what's that first language in slide 5 |
20:32:07 | audiophile | M? |
20:32:25 | ee7[m] | Is there going to be official live chat during the talks, or is FOSDEM less sophisticated than nimconf? |
20:32:31 | * | zedeus quit (Quit: zedeus) |
20:33:46 | * | NimBot joined #nim |
20:33:48 | PMunch | I explain it all in the talk :P |
20:34:23 | PMunch | ee7[m], you will be able to submit questions and then there will be a Q&A after the video where the questions are asked by a host and answered by the speaker |
20:34:42 | PMunch | Then there's a "hallway" discussion where you can voice chat with the speaker of the talk |
20:34:53 | Yardanico | we could also have voice chat in discord :) |
20:34:57 | Yardanico | like we did after nimconf |
20:35:13 | PMunch | The Q&A session will be recorded |
20:35:18 | Yardanico | oh right |
20:35:27 | Yardanico | but how will they choose the questions? |
20:35:33 | Yardanico | which one is the first? |
20:35:34 | Yardanico | or random? |
20:35:54 | PMunch | It's chosen by the host and the speaker |
20:36:22 | Yardanico | It's just that because it'll be online, I expect much more people "being there" and asking more questions |
20:36:29 | Yardanico | I hope their infrastructure is ready |
20:36:53 | PMunch | They're using Matrix and Jitsi I think |
20:37:07 | Prestige | Nice |
20:37:27 | Yardanico | well last time I tried Jitsi for call + screen sharing with my friend it was a bit laggy, but I hope it'll be ok this time :) |
20:38:00 | PMunch | I've had no issues with it in the past |
20:38:01 | ee7[m] | PMunch: audiophile is talking about this slide https://i.imgur.com/cphMxVp.png |
20:38:11 | PMunch | Oh, that is MicroPython |
20:38:27 | PMunch | Chosen because it looks a bit like Nim |
20:38:49 | PMunch | And is often used for a more ergonomic microcontroller programming experience |
20:40:43 | * | dom96 quit (Changing host) |
20:40:43 | * | dom96 joined #nim |
20:40:55 | PMunch | This localtime issue is so puzzling |
20:41:16 | PMunch | This snippet: http://ix.io/2NMl |
20:41:26 | dom96 | yay, we now have custom cloaks on Freenode :) |
20:42:00 | PMunch | Returns this (with a modified times.nim to output the timestamp to Tm structure in getLocalOffsetAndDst): http://ix.io/2NMm |
20:42:04 | PMunch | dom96, custom cloaks? |
20:42:22 | ee7[m] | PMunch: In case you wanted nitpicks, and you were going to edit the slides anyway: I claim that slide 5 chart could be easier to read - bigger is better for the first bar, but worse for the second bar |
20:42:45 | PMunch | Yeah I know.. |
20:42:51 | PMunch | I explain that in the presentation though |
20:42:58 | dom96 | Check out /msg NickServ info dom96 |
20:43:42 | ee7[m] | I guess you could make the first bar be time taken for x iterations. Then lower would be better for both bars. |
20:43:54 | FromDiscord | <basdk> thanks so much PMunch i re-installed nim with choosenim and now that's actually works correctly |
20:44:04 | PMunch | @basdk, great :) |
20:44:09 | ee7[m] | more tedious pedantry: "k" is not a SI unit of memory usage. |
20:44:18 | PMunch | I really should add this to the README |
20:44:32 | PMunch | ee7[m], that is true |
20:44:49 | PMunch | And I can never remember which unit I'm supposed to use.. |
20:44:50 | ee7[m] | Don't make a dimensionless number and memory usage have the same suffix :( |
20:45:22 | PMunch | Oh, that is 1000ths |
20:45:40 | PMunch | So it's 45000 iterations per second and 639000 bytes of memory |
20:45:42 | dom96 | PMunch, that slide looks great btw, but it bothers me that one of the bars is "lower is better" and the other is the exact opposite :) |
20:45:57 | ee7[m] | Use KiB or KB. Just not k. |
20:46:13 | PMunch | Yeah, it was a bit lazy when I made that graph.. |
20:46:32 | PMunch | ee7[m], it was really just to be able to fit the numbers on there |
20:46:55 | PMunch | But I see your point |
20:47:30 | dom96 | brilliant slides though otherwise |
20:47:36 | PMunch | Thanks :) |
20:47:44 | PMunch | Hopefully the talk will live up to them |
20:48:04 | ee7[m] | Yeah - I'm looking forward to the talk. |
20:48:31 | ee7[m] | But I'll make a bunch of bots that start complaining in chat during slide 5 and 7. |
20:48:54 | PMunch | Haha :P |
20:49:07 | ee7[m] | "Why is this Nimscript's killer feature?" |
20:49:48 | PMunch | I'll just excuse me as not being a native speaker :P |
20:51:03 | PMunch | Seriously, how can localtime fail at one point but work just fine right before? |
20:51:14 | ee7[m] | Some quick googling tells me Norwegian uses the apostrophe to form the possessive for words ending in s... |
20:51:31 | PMunch | Yeah |
20:51:44 | ee7[m] | So I'm not sure that your excuse is good enough :) |
20:52:33 | ee7[m] | (at least apostrophes for possessives exist to some extent) |
20:53:22 | PMunch | Well we don't use apostrophes for possessives if the word doesn't end in s.. |
20:53:45 | PMunch | Unless it's an acronym written with lowercase letters but pronounces letter by letter |
20:53:49 | audiophile | what'd you have for breakfast |
20:54:00 | FromDiscord | <lqdev> ee7: KB - Kelvinobytes |
20:54:03 | ee7[m] | Yeah. I guess the slide is less ambiguous for Norwegian speakers because it says Nims not Nims' |
20:54:08 | audiophile | oops sorry, wrong windows |
20:54:13 | FromDiscord | <lqdev> if you wanna go with SI units that would be kB |
20:54:29 | PMunch | Two slices of bread, one with advocado and one with egg, paired with half a grapefruit and some blueberry flavoured soured milk |
20:54:38 | PMunch | And a large spoonful of cod liver oil |
20:54:39 | PMunch | Why? |
20:54:49 | PMunch | Haha |
20:55:01 | FromDiscord | <VVX7> hey @dom96 can I DM you? |
20:55:21 | audiophile | oooh ok I love avocado toast and what is blueberry flavoured soured milk -- is that yogurt? |
20:55:24 | FromDiscord | <dom96> sure |
20:56:01 | PMunch | Uhm, it's this stuff: https://www.tine.no/merkevarer/biola |
20:56:51 | ee7[m] | lqdev: No. kilobyte is kB, and kibibyte is KiB. |
20:56:58 | audiophile | oooh like kefir |
20:56:58 | ee7[m] | I meant to write "Use KiB or kB". |
20:57:03 | FromDiscord | <lqdev> that's what i'm saying |
20:57:10 | PMunch | Kinda, but it's a different culture of bacteria |
20:57:15 | ee7[m] | Oh. |
20:57:26 | ee7[m] | :D |
20:57:38 | audiophile | why does that remind me of probiotic drinks |
20:57:44 | PMunch | Google translate this: https://www.tine.no/helse/sunt-kosthold/forskjellen-p%C3%A5-biola-cultura-kefir-og-kulturmelk |
20:58:08 | PMunch | Well it kinda is a probiotic I think |
20:58:22 | PMunch | I just drink it because it's crazy good though :P |
20:59:15 | audiophile | oooh nice |
20:59:20 | audiophile | that *is* a healthy breakfast |
20:59:27 | audiophile | sorry for ot tho |
21:00:40 | PMunch | No worries, we tend to go off-topic quite often |
21:02:27 | audiophile | hehe fair enough. If I'm not privy to an ot channel for nim do lmk! |
21:02:40 | PMunch | It's #nim-offtopic |
21:02:50 | PMunch | But sometimes that one is more on-topic than this one :P |
21:02:59 | audiophile | lmaoo |
21:03:41 | PMunch | This is seriously confusing.. |
21:04:04 | audiophile | what is |
21:04:17 | PMunch | `localtime` doesn't work within `getLocalOffsetAndDst` in the times module. But it works just fine if I include `times` and call it myself |
21:05:04 | PMunch | But only on my RPi |
21:05:14 | PMunch | It works fine on my machine |
21:05:25 | dom96 | yay, we now own #nimble |
21:05:34 | PMunch | Who had it before? |
21:06:01 | dom96 | some random person not in this channel afaik |
21:06:25 | PMunch | Ah but it was still about our nimble? |
21:06:37 | dom96 | don't think so |
21:06:41 | dom96 | it was registered in 2014 |
21:06:43 | dom96 | so unlikely |
21:06:46 | PMunch | Aight |
21:06:50 | * | audiophile quit (Remote host closed the connection) |
21:12:08 | dom96 | lol, why does the topic for #nim have "Topic for #nim is:" |
21:14:50 | PMunch | Oops, that might've been me |
21:15:13 | PMunch | I think I ran /topic when I wanted to update it to 1.4.2 |
21:15:21 | PMunch | And I must've copied a tad too much |
21:15:25 | PMunch | Or the person before me did |
21:15:35 | dom96 | hehe, it happens |
21:16:11 | FromDiscord | <konsumlamm> anyone wanna look at my small bugfix? |
21:16:15 | FromDiscord | <konsumlamm> https://github.com/nim-lang/Nim/pull/16874 |
21:17:25 | * | glguy left #nim ("enjoy!") |
21:18:43 | PMunch | Okay wtf.. |
21:18:54 | * | audiophile joined #nim |
21:19:12 | PMunch | I looked at the generated C code and the only difference I could spot was that the variable in my minimal example was a global variable |
21:19:43 | PMunch | Tried to put the `a` on line 1240 outside the procedure and it works.. |
21:19:51 | audiophile | just curious, what prerequisite knowledge is required for tinkering with the nim compiler? I didn't pay much attention during my compilers class :/ |
21:19:59 | audiophile | all i remember is context free grammar |
21:26:07 | PMunch | Well nothing formal, feel free to poke around |
21:26:11 | FromDiscord | <konsumlamm> tfw i found yet another template hygiene bug |
21:28:54 | FromDiscord | <basdk> A question:↵Does nim have a matplotlib-like library? |
21:29:30 | FromDiscord | <basdk> I didn't searched a lot but i don't don't found nothing maybe i juste didn't search enough or just i didn't see that |
21:29:34 | ee7[m] | basdk: there is https://github.com/Vindaar/ggplotnim |
21:29:39 | FromDiscord | <basdk> (edit) "juste" => "just" |
21:29:44 | PMunch | A couple: https://nimble.directory/search?query=plot |
21:30:07 | FromDiscord | <basdk> Thanks |
21:33:10 | PMunch | Not quite sure what I'm going to use this newfound knowledge for though.. |
21:33:19 | PMunch | It doesn't really help me explain why |
21:34:36 | PMunch | They're both the same type |
21:34:45 | PMunch | Although one is annotated with N_LIB_PRIVATE |
21:34:57 | PMunch | Otherwise they are used exactly the same |
21:37:12 | PMunch | Hmm, that is on my machine though |
21:37:52 | PMunch | I guess they might be different on the RPi |
21:40:23 | FromDiscord | <konsumlamm> why is noone looking at my PR ;-; |
21:40:39 | PMunch | I'm busy chasing weird bugs |
21:42:01 | * | audiophile_ joined #nim |
21:44:35 | FromDiscord | <Deorder> Can I already experiment with the incremental compiler? What is the current status? I actually already tried it by defining `nimIncremental`, but I get some errors about not being able to read some of the cache files. |
21:45:12 | FromDiscord | <Deorder> (edit) "Can I already experiment with the incremental compiler? What is the current status? I actually already tried it by ... defining" added "building the `araq-ic11` branch +" |
21:45:55 | * | audiophile quit (Ping timeout: 256 seconds) |
21:45:58 | * | audiophile_ is now known as audiophile |
22:15:24 | * | haxscramper quit (Remote host closed the connection) |
22:19:22 | FromDiscord | <carpal> yes, my question was: will compiler generate a pointer for `var` param even if the proc has that param is inline? |
22:20:21 | PMunch | Welp, it's pretty much the exact same code: http://ix.io/2NN0 |
22:21:09 | FromDiscord | <lqdev> latest devel can't even compile cflang lol |
22:30:40 | * | audiophile_ joined #nim |
22:33:25 | * | audiophile quit (Ping timeout: 240 seconds) |
22:33:32 | * | audiophile_ is now known as audiophile |
22:36:54 | * | Vladar quit (Quit: Leaving) |
22:38:40 | PMunch | I'm not even sure if reporting this on the Nim bug-tracker would be the right thing to do |
22:38:54 | PMunch | I seriously have absolutely no idea why localtime fails in this way |
22:46:05 | Prestige | who wrote it |
22:51:10 | PMunch | The times module? |
22:52:24 | Prestige | Yeah, could as them |
22:52:28 | Prestige | ask* |
22:53:42 | PMunch | GULPF it seems |
23:06:30 | PMunch | Created my bug report, it's a bit rambley :P https://github.com/nim-lang/Nim/issues/16881 |
23:57:43 | * | PMunch quit (Quit: leaving) |