<< 03-11-2021 >>

00:00:11*FromDiscord joined #nim
00:01:30FromDiscord<Elegantbeef> Given that it inserts destructors at compile time, doesnt it do ref counting there too?
00:01:43FromDiscord<codic> well, but that is in the compiler
00:01:48FromDiscord<codic> i was talking about runtime
00:01:57FromDiscord<codic> also I don't think that's ref counting
00:02:20FromDiscord<Elegantbeef> I'm probably very wrong since i've never looked at how the GC works
00:06:31FromDiscord<codic> idk
00:06:38FromDiscord<leorize> `=copy` for ref increase the count
00:06:42FromDiscord<codic> don't care too much its fast enough
00:06:43FromDiscord<leorize> `=destroy` decreases it
00:06:53FromDiscord<leorize> it's not atomic fwiw
00:06:53FromDiscord<codic> hmm
00:06:56FromDiscord<leorize> so it's fast
00:07:00FromDiscord<codic> but why does it need to ref count in first place?
00:07:15FromDiscord<codic> for keeping stuff alive if ref is held to it?
00:07:20FromDiscord<treeform> multiple things can point to the same object
00:07:22FromDiscord<treeform> yeah
00:07:23FromDiscord<leorize> yea
00:08:03FromDiscord<codic> but what if your code never does that? then will the compiler optimize it away?
00:08:32FromDiscord<Elegantbeef> you dont ref count non references 😀
00:09:08FromDiscord<leorize> ref here means the `ref` keyword in nim
00:09:32FromDiscord<codic> ahh I see
00:09:59FromDiscord<codic> ok, so my cleanup is all destructors if I don't maintain any smart references
00:10:00FromDiscord<codic> very chad
00:10:08FromDiscord<codic> 👍
00:11:35FromDiscord<ynfle (ynfle)> @codic you can `--expandArc:<function>` name with the `nim` compiler to see the destructors for a function
00:12:30FromDiscord<codic> yeah, I was asking about where ref counting is used though
00:12:41FromDiscord<codic> i know destructors are at end of scope
00:14:06FromDiscord<treeform> desctuctors are called when object is freed, when all references are now 0
00:17:28FromDiscord<treeform> @codic https://gist.github.com/treeform/6a0da202c5a763b941ec055f37b95517
00:17:41FromDiscord<treeform> Sorry correction ref counts lives -8 from where the ref pointer points.
00:17:53FromDiscord<treeform> and you got to shift it a bit to get the correct integer value
00:19:03FromDiscord<codic> cool, thanks for writing that
00:19:06FromDiscord<codic> 1 sec
00:19:22FromDiscord<codic> that is cool though
00:19:35FromDiscord<codic> (edit) "that is cool though ... " added "that address of ref count is not stored anywhere but just instead offset from addr"
00:19:45FromDiscord<treeform> its still stored there
00:19:49FromDiscord<treeform> but is kind of cheating
00:20:37FromDiscord<codic> sent a code paste, see https://play.nim-lang.org/#ix=3DMk
00:20:41FromDiscord<codic> (edit) "https://play.nim-lang.org/#ix=3DMk" => "https://paste.rs/XFL"
00:21:09FromDiscord<treeform> you welcome
00:38:09*krux02 quit (Remote host closed the connection)
01:05:43FromDiscord<demotomohiro> `p3[] shr 3` is number of pointers - 1. So what is in least significant 3 bits?
01:11:51FromDiscord<treeform> no clue
02:22:54*Guest62 joined #nim
02:23:57*Guest62 quit (Client Quit)
03:00:55*arkurious quit (Quit: Leaving)
03:01:13*neurocyte0132889 quit (Ping timeout: 268 seconds)
03:06:19*rockcavera joined #nim
03:06:19*rockcavera quit (Changing host)
03:06:19*rockcavera joined #nim
03:18:11FromDiscord<cabboose> so from my understanding, if I do manual allocations of cache line size, it would return a pointer to a region that is contained within 1 cache line and should not possibly overlap two cache lines right? That would mean I have to do some manual arithmetic and management to ensure it's on a single cache line
04:06:01*supakeen quit (Quit: WeeChat 3.3)
04:06:31*supakeen joined #nim
04:42:14*rockcavera quit (Remote host closed the connection)
04:54:01FromDiscord<leorize> of course not \:p
05:13:46*kayabaNerve_ quit (Quit: Leaving)
05:21:34FromDiscord<treeform> In reply to @cabboose "so from my understanding,": it looks like I always get memory 16 bytes aligned, but its probably os/arch dependent.
05:21:47FromDiscord<treeform> cache line size is CPU dependent
05:21:55FromDiscord<treeform> so you just got to see if it fits for you
05:22:20FromDiscord<treeform> cache line is usually 64 bytes
05:31:26FromDiscord<evoalg> type, typeof, typedesc all seem to do the same thing ... is that right? I looked in the system module but it's not clear to me
05:34:43FromDiscord<Elegantbeef> they're all oddly aliased
05:35:26FromDiscord<Elegantbeef> `type(10)` == `typeof(10)` `proc doThing(a: typedesc)` == `proc doThing(a: type)`
05:36:31FromDiscord<Elegantbeef> typeof and typedesc are "proper"
05:54:41NimEventerNew thread by Jorjun_arch: The language with the most leverage wins, see https://forum.nim-lang.org/t/8585
06:00:01FromDiscord<cabboose> Yeah I've got a crossplatform check that will just output a warning if the cache line size isnt 64 bytes that'll be something like "expect performance drops"↵(@treeform)
06:00:02FromDiscord<cabboose> cheers
06:10:00FromDiscord<treeform> caches are very smart, are you sure you can detect the performance drop?
06:13:42FromDiscord<cabboose> Not that it will necessarily, but I will be doing optimisations with cache lines in mind. If the cpu uses a different architecture to what is quite standard then I can't be sure if things like false sharing will crop up. Simply providing a warning that I can't necessarily accomodate those structures with the original software design.
06:28:38FromDiscord<demotomohiro> Just use less memory and access memory as linearly(less randomly) as possile is not enough to write fast code? Do we really need to know the cache line size to do that?
06:31:45FromDiscord<Rika> If you already do that but still need more speed, probably
06:37:49FromDiscord<demotomohiro> If cache line size is 64 bytes, 64bytes object type is more efficient than 60 bytes object type?
06:41:48FromDiscord<Rika> 32s better than 40s I would assume?
06:44:41NimEventerNew Nimble package! animatecss - Easily use Animate.css classes, see https://github.com/thisago/animatecss
06:46:38FromDiscord<demotomohiro> If cache line size is 64 bytes, two 32 byte objects can be read with 1 memory read if they aligned well. Reading two 40 bytes object requires 2 memory reads.
07:03:55FromDiscord<cabboose> Multithreading though↵(@demotomohiro)
07:05:57FromDiscord<cabboose> Cache coherency et al
07:06:09FromDiscord<cabboose> Definitely important
07:08:43NimEventerNew Nimble package! dataUrl - Easily create data urls! CLI included, see https://github.com/thisago/dataUrl
07:42:52NimEventerNew thread by Elmonkey: New here, see https://forum.nim-lang.org/t/8586
07:44:35*PMunch joined #nim
07:46:17FromDiscord<Rika> That’s one terse thread
07:47:32FromDiscord<that_dude> I love arraymancer, but there is some code I'm working on that I want to complile to js which is causing issues. Is that something that arraymancer doesn't support yet, or am I getting a bug?
07:48:14FromDiscord<that_dude> And if it doesn't support it, is there any decent alternative that can do about the same with that allows me to use custom types in the tensors
07:48:21FromDiscord<that_dude> (edit) "tensors" => "tensors?"
07:48:30FromDiscord<Rika> No support afaik
07:48:36FromDiscord<Rika> No idea on the alternative
07:48:43FromDiscord<that_dude> I cry
07:48:59FromDiscord<Rika> Doing any math in JavaScript is slower than shit anyway
07:49:35FromDiscord<that_dude> I know that, but I'm using arraymancer for a game thing I'm working on and I'd like to be able to throw it onto a website
07:49:41FromDiscord<Rika> That’s funky
07:49:56FromDiscord<Rika> Maybe web assembly would be a better alternative to compile to
07:50:03FromDiscord<that_dude> So super high efficiency isn't the most important right now
07:50:37FromDiscord<that_dude> But I'm also guessing that arrymancer can't compile to web assembly
07:51:16FromDiscord<Rika> I feel like you’re right
07:51:43FromDiscord<Rika> Do you need tensors or just matrices
07:52:10FromDiscord<Rika> Why do you need custom types in the tensors as well)
07:52:11FromDiscord<that_dude> I'm making a tetris clone
07:52:23FromDiscord<that_dude> And using the tensors to hold my data
07:52:42FromDiscord<Rika> So you only need matrices unless you’re doing funky 3D Tetris or whatever
07:52:53FromDiscord<that_dude> Sounds right
07:53:06FromDiscord<haxscramper> Won't seq[seq[]] work just fine?
07:53:17FromDiscord<Rika> Not even seq of seq
07:53:24FromDiscord<Rika> Just one and a few helper procs
07:53:28FromDiscord<haxscramper> Tetris is 2d grid
07:53:39FromDiscord<haxscramper> Ah, linearly put everything
07:53:48FromDiscord<Rika> Well I just assumed sir here is being lazy
07:53:53FromDiscord<that_dude> yeah lol
07:53:55FromDiscord<Rika> Which is totally fine
07:54:09FromDiscord<that_dude> I don't want to have to reinvent things if I can just use bug free versions of it
07:54:36FromDiscord<Rika> I think GLM has something for that I don’t remember I don’t do matrix math on code often enough
07:54:52FromDiscord<impbox [ftsf]> https://gist.github.com/ftsf/6d0a5eca332bcf2e1513e58bb54af8c0 here's my game grid util
07:55:25FromDiscord<Rika> Nice
07:55:35FromDiscord<impbox [ftsf]> hmm i've probably got a better newer version somewhere...
07:55:40PMunchUsing arraymancer for a Tetris clone seems like quite overkill
07:56:12FromDiscord<Rika> It is but we clarified it’s just laziness
07:56:24FromDiscord<impbox [ftsf]> https://github.com/ftsf/nico/blob/main/nico/grids.nim ahh this version is better
07:56:26FromDiscord<that_dude> True, but I have a lot of plans with my clone, one of the being is to use it as a basis for an engine in which speed will matter when I get to it.
07:56:31FromDiscord<impbox [ftsf]> i forgot i added it to nico
07:56:50FromDiscord<Rika> In reply to @that_dude "True, but I have": Refactor once you get to that point 😛
07:56:56FromDiscord<that_dude> Yep
07:57:07FromDiscord<Rika> Otherwise you’ll be stuck in future proofing hell like I am in some projects
07:57:43FromDiscord<that_dude> Well in that case it's already a bit too late lol. I'm on my 3rd rewrite because I kept changing the structure
07:58:13FromDiscord<that_dude> But It has most of the features I want done or easily ready to be implemented.
07:58:51FromDiscord<that_dude> I just wanted to slowly replace arraymancer with something of similar speed that also works on js when I want it to
08:00:15FromDiscord<cabboose> Jesus can’t a new person asking for advice get something more than a link to the documentation?
08:00:37FromDiscord<cabboose> If my 10 attempts at signing up to the forum would have worked id respond myself lol
08:00:42FromDiscord<enthus1ast> i'm thinking about this since pragma, i cannot imagine that this will work how it is used, since the procs that are annotated with since, will return their default value when the body is not defined. In some cases it might work, though. ↵How and why is it used? Why not just use the real old version of the stdlib, since we're using git?
08:01:19FromDiscord<Rika> Caboose what would you have said
08:04:38FromDiscord<cabboose> sent a long message, see http://ix.io/3DOy
08:06:10FromDiscord<cabboose> Anything like that would be better than a single link response from a user with a moderator shield =.=
08:09:12FromDiscord<enthus1ast> yeah i just replied
08:11:27FromDiscord<enthus1ast> im not sure if `since` brings any value, maybe one can enligthen me
08:14:38FromDiscord<Elegantbeef> Backported code?
08:15:35FromDiscord<Elegantbeef> That doesnt make sense i guess
08:29:53FromDiscord<enthus1ast> i could understand when i could write it like a case statement where each's nim version implementation is in block
08:30:55FromDiscord<enthus1ast> and also, why not use git for this?
08:32:34FromDiscord<dom96> In reply to @cabboose "Hey, welcome to the": if you’re new to programming then you can have a look at the book Stefan is writing
08:32:57FromDiscord<dom96> I think this is unlikely for most people joining the Nim community
08:33:19FromDiscord<dom96> And from what I can see the book really doesn’t talk about who it’s intended for
08:34:02FromDiscord<haxscramper> The book is good as a general source of learning nim as well
08:34:28FromDiscord<haxscramper> The fact it starts with more fundamental things and then goes to OOP, macros, generics etc. does not change anything really
08:38:34FromDiscord<dom96> It does. Target audiences for a book are important. Most people don’t enjoy having to skip long sections about topics they already have knowledge about for fear of missing something.
08:39:06FromDiscord<dom96> And since the book is aimed at kids it most definitely goes into a lot of detail about things that most programmers will find boring to read about
08:39:30FromDiscord<haxscramper> you can skip sections you know?\>
08:39:53FromDiscord<haxscramper> just start with part you find interesting, the book is free so it is not like you pay for unnecessary information
08:45:10FromDiscord<cabboose> I actually found the book to be a fantastic resource even for good foundations
08:45:53FromDiscord<cabboose> As it stands, that book provides the most thorough descriptions about the workings of nim
08:47:28FromDiscord<cabboose> I understand you have a book too, I have it myself; however, I think Stefans book is a wonderful resource regardless. I am upset because I think that you have brought this to attention when the fact that a moderator provided a single linked response to a new member of the community was not more concerning?↵(@dom96)
08:50:03FromDiscord<cabboose> I think bringing attention to me simply linking a resource as an issue to be a systematic problem.
08:51:32FromDiscord<cabboose> Of the responses provided to a new member, only enthusiast and kiloneie have provided assistance that is more than a simple link. It is disappointing that a moderator rather berated my choice of resource to want to provide instead of formulating an appropriate introduction to the new member to provide a better tasting experience from a moderator than that currently left.
08:53:10FromDiscord<cabboose> At the end of the day, say what you will, but newer users get to decide which resource helped them the most. I found that Stefans book helped me. I am allowed to subjectively say that.
08:53:41FromDiscord<cabboose> Sorry, I understand you were just trying to clarify things maybe. This kind of community related things makes me upset is all.
08:56:51FromDiscord<impbox [ftsf]> community is hard =( hugs
08:59:15FromDiscord<Kiloneie> When i first joined Nim by example was very nice
09:03:18FromDiscord<Araq> Mr Salewski is not easy to deal with, the issue tracker of his book contains multiple offending things
09:05:26*Vladar joined #nim
09:10:22FromDiscord<haxscramper> There are like 4 issues total - "Permission to translate the book", "Expand section on templates", one about typos and one with question about the license
09:10:46FromDiscord<Araq> yeah and you need to read them all
09:17:58FromDiscord<haxscramper> Well, I don't see anything fundamentally wrong there except for some personal tension
09:18:03PMunch@cabboose, unfortunate to hear that you haven't been able to get help. We try our best, but sometimes problems don't have an easy solution and people have other stuff to do. But we try our best :(
09:18:13FromDiscord<haxscramper> I didn't scrutinize ever single line of every single comment on every single issue though
09:24:22FromDiscord<cabboose> sent a long message, see http://ix.io/3DOS
09:29:02FromDiscord<cabboose> Also I have found Dr Salewski to be a kind person who truly is doing his best to progress the story of nim by providing more resources for it.
09:29:26FromDiscord<dom96> You found him to be kind? What about when he was rude to Kiloneie? Was that kind too?
09:29:46FromDiscord<cabboose> I have not seen that.
09:29:58FromDiscord<cabboose> As I said, I have found him to be a kind person.
09:30:22FromDiscord<dom96> Then you might want to have a look and learn about that whole discussion. Because what you are doing by mentioning his book explicitly is effectively stirring the same old shit again
09:30:47FromDiscord<cabboose> His book does not have any negative connotations around it.
09:31:03FromDiscord<Elegantbeef> You do realize you're defending a person that explicitly stated anti-gypsy views dom? 😀
09:31:15FromDiscord<hugogranstrom> Mentioning Nim in Action stirs up the Disruptek shit as well? 🤭
09:31:32FromDiscord<dom96> In reply to @hugogranstrom.nim "Mentioning Nim in Action": who?
09:31:42FromDiscord<Elegantbeef> Kilo
09:31:47FromDiscord<cabboose> Well, I didn't want to bring that point into it
09:31:55FromDiscord<cabboose> which is why I'm not trying to turn this into a person bashing war
09:32:00FromDiscord<cabboose> I never did
09:32:02FromDiscord<hugogranstrom> 🏜️
09:32:06FromDiscord<cabboose> and it is very disheartening that this is what is coming out
09:32:31FromDiscord<dom96> @ElegantBeef oh? Where did this happen? Maybe I have some reading to do as well
09:32:41FromDiscord<Elegantbeef> It was in #offtopic
09:32:46FromDiscord<dom96> And the more important question: did Kiloneie apologise when called out on it?
09:32:52FromDiscord<dom96> Remember: Stefan still has not
09:32:52FromDiscord<Elegantbeef> Nope
09:33:05FromDiscord<dom96> and you all are happy to defend and deflect
09:33:10FromDiscord<dom96> That's not cool
09:33:20FromDiscord<saem> What the actual fuck?
09:33:20FromDiscord<Elegantbeef> I'm not deflecting i've got no horse in this race
09:33:23FromDiscord<haxscramper> god damn, someone just linked a book
09:33:25FromDiscord<cabboose> I feel ashamed that my desire to ensure new members receive appropriate welcomes to grow the community is being overridden by this garbage. I am disappointed.
09:33:37FromDiscord<haxscramper> now we are back to this crap about kilo
09:33:42FromDiscord<haxscramper> who asked?↵(@dom96)
09:33:53FromDiscord<Elegantbeef> The conversation is on the linking of media, and giving a more welcoming message to newbies
09:33:57FromDiscord<saem> Sometime spread hate and you're standng on ceremony,
09:34:11FromDiscord<haxscramper> was this discussion about a book or we are having 101 on how to drop down to personal insults?↵(@dom96)
09:34:16FromDiscord<saem> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/905389327649996801): Someone is spreading hate and you're standing on ceremony,
09:34:24FromDiscord<Elegantbeef> From what i've read stefans book is fine and this is 100% just pointless fueding
09:35:07FromDiscord<dom96> I think it's fair to bring up an example of when somebody was not kind when somebody says explicitly they found them to be kind
09:35:24FromDiscord<dom96> especially when I find it hard to believe the person saying they are kind is unaware of this discussion
09:35:30FromDiscord<haxscramper> yeah, sure one person had a positive experience
09:35:37FromDiscord<haxscramper> now time to throw shit at them
09:35:38FromDiscord<haxscramper> so nice
09:35:53FromDiscord<haxscramper> cabboose\: found stefan be a good person
09:35:54PMunchWho's the nicest person in the Nim community? Could we have them write a book on Nim to avoid this weird personal insults when the question of who's resources to share with newcomers comes up?
09:36:06FromDiscord<Rika> What happened to separation of the creator and the work
09:36:08FromDiscord<haxscramper> quick, we need to bring up old crap
09:36:10FromDiscord<Elegantbeef> I think it's you pmunch
09:36:20FromDiscord<dom96> In reply to @Rika "What happened to separation": good point
09:36:22FromDiscord<haxscramper> to put more dirt
09:36:30PMunch@Elegantbeef, shit..
09:36:50FromDiscord<Kiloneie> Can we all relax please, this will not lead anywhere good.
09:36:52PMunchFuck you @Elegantbeef!
09:36:53FromDiscord<Rika> If the work has the same issues of the creator then it should matter IMO
09:37:06PMunchPhew, dodged a bullet there, who's the nicest person now?
09:37:14FromDiscord<Elegantbeef> I am a little busy right now pmunch maybe next week?
09:37:20PMunchHaha :P
09:37:21FromDiscord<haxscramper> well, the work does not have any "same issue" except for couple line note about not documenting async
09:37:24FromDiscord<cabboose> I understand if there are issues between people. I am discontent that you are making this a bigger deal than what should really be at the centre of the communities concern -\> difficulty in converting newcomers to nim. I pointed out that the initial response by a moderator was dissatisfactory. I specifically mentioned and promoted kiloneies response. I am heavily disappointed in the moderating team involved.
09:37:38FromDiscord<haxscramper> That is brought up as an act of treason against whole nim community
09:37:42FromDiscord<dom96> FWIW I haven't read the book, I don't have anything against it. But I find it highly suspicious that you are specifically linking to it
09:37:50FromDiscord<haxscramper> what
09:37:51FromDiscord<dom96> when you were yourself concerned about the discussion I had with Gumber
09:37:55FromDiscord<haxscramper> the
09:37:56FromDiscord<haxscramper> fuck
09:37:56FromDiscord<haxscramper> holy shit
09:38:01FromDiscord<haxscramper> the book is good
09:38:04FromDiscord<haxscramper> is it wrong to link it?
09:38:08FromDiscord<dom96> hax, can you stop with the holy shits please? 🙂
09:38:12FromDiscord<dom96> it just raises the temperature
09:38:18FromDiscord<dom96> there is no need for it
09:38:21FromDiscord<haxscramper> oh no, dom suspects stefan of somewhat unethica behavior
09:38:32FromDiscord<cabboose> If you would look at the issues in Stefans tracker, you would see I am one of the authors of those issues.
09:38:36FromDiscord<dom96> well, you're misunderstanding me
09:38:39FromDiscord<haxscramper> now we need to label any link of stefan's work as suspicious
09:38:40FromDiscord<cabboose> I have long since been promoting Stefans book
09:38:40FromDiscord<dom96> I'm not suspecting Stefan
09:38:41FromDiscord<cabboose> as I found it to be an excellent resource
09:38:55FromDiscord<dom96> then I apologise for being suspicious
09:39:24FromDiscord<cabboose> For me to give the real reasons as to why I link his resource over others would be suggesting I insult those other resource authors.
09:39:25FromDiscord<haxscramper> well, you said he was rude↵(@dom96)
09:39:28FromDiscord<haxscramper> I don't mean "suspect", I mean that you said stefan was rude to kilonete
09:39:38FromDiscord<dom96> Yeah, because he was.
09:39:53FromDiscord<Elegantbeef> He criticised a publication
09:39:55PMunchI have to say I agree with @cabboose on the original point that a moderator just posting a link to the documentation without any other words comes across as a bit of "RTFM noob"
09:39:57FromDiscord<Elegantbeef> He didnt attack kilo as a person
09:40:02FromDiscord<haxscramper> And then you say "But I find it highly suspicious that you are specifically linking to it"↵"when you were yourself concerned about the discussion I had with Gumber"
09:40:04FromDiscord<Elegantbeef> That's not rude that's critcism of art
09:40:11FromDiscord<dom96> PMunch: I agree as well.
09:40:15FromDiscord<haxscramper> is it not possible for a person to make a good book then?
09:40:29FromDiscord<haxscramper> what about separation of the person and their work
09:40:39FromDiscord<dom96> But I think it's fair to note that Stefan's book might not be right for the general target audience that are learning Nim
09:40:40FromDiscord<cabboose> I understand if you think this was some sort of attack due to that gumber situation involving Stefan; I am upset because I think that it is a shallow view of me if you think that is what is at play.↵(@dom96)
09:40:47PMunch@Elegantbeef, while he did criticise the video it was done in a pretty harsh tone..
09:40:57FromDiscord<dom96> Yep ^
09:41:00FromDiscord<hugogranstrom> In reply to @dom96 "But I think it's": Disagree
09:41:08FromDiscord<dom96> In reply to @hugogranstrom.nim "Disagree": care to elaborate? 🙂
09:41:14PMunchNot picking sides here, just pointing out that it's not the fact that he criticised the video which is the concern
09:41:15FromDiscord<dom96> his book is aimed at kids
09:41:15FromDiscord<haxscramper> I don't think so, the book is good as a general resource for learning nim↵(@dom96)
09:41:43FromDiscord<haxscramper> Considering you are have not read it even, this is a very strange thing to say↵(@dom96)
09:41:51FromDiscord<hugogranstrom> In reply to @dom96 "care to elaborate? 🙂": Read it and you'll see that it contains a lot of stuff people who come from Python like me have very much use for
09:42:02FromDiscord<cabboose> I disagree. I have read both your book and his book. I find his book to be fantastic. Your book is also good. You have clearly targetted different audiences. I would suggest his book first as it targets a lower level audience first. You mentioned you had not read the book, so I find it difficult to take your comments on the matter as being based on evidence.↵(@dom96)
09:42:31FromDiscord<dom96> I am basing what I say on what I read Stefan speaking about his book
09:42:38FromDiscord<cabboose> He says that from a position of having a PhD in University. I personally found the book to be perfect for my level (having no computer science background).↵(@dom96)
09:42:56FromDiscord<Elegantbeef> > ↵> But indeed the videos are not bad, they reminds me to lessions of some of our teachers in school. Sometimes it was hard to stay awake -- and maybe the teachers did not understand the stuff they presented well too. Today some people are not able to read longer text segments, and I think for these people the videos of Mr. Kiloneie are really helpful to learn some Nim.↵>
09:42:57FromDiscord<haxscramper> The fact it targeted on kids does not mean it never goes into anything advanced
09:42:59FromDiscord<dom96> And also as somebody that has written a book I know it's important to keep target audiences in mind
09:43:02FromDiscord<Elegantbeef> Man he really killed kilo here
09:43:17FromDiscord<dom96> it's not about advanced or not, it's about how much you explain
09:43:24FromDiscord<dom96> over-explaining is a sure fire way to make people give up
09:43:26FromDiscord<Elegantbeef> Like yes it's harsh but it's also constructive criticism it's not just "you're shit kid git gud"
09:43:38FromDiscord<cabboose> I am flabbergasted by this.↵(@dom96)
09:43:47FromDiscord<dom96> Why?
09:44:09FromDiscord<haxscramper> have you read the book? "over-explaining" os so subjective
09:44:10PMunch@Elegantbeef, oh for sure, the criticism itself is actually pretty good
09:44:17FromDiscord<cabboose> Because there is no truth in that. And it goes against every principle of education and science that is important to me.
09:44:21FromDiscord<haxscramper> for a person with no experience in let's say macros
09:44:29FromDiscord<haxscramper> what would be the correct level of detail?
09:44:38FromDiscord<haxscramper> someone comes from java and they meet nim macros
09:44:57FromDiscord<haxscramper> they are like kids at this stage really - no understanding of the domain. So you'd better explain things thoroughly
09:45:06FromDiscord<Araq> the correct level of detail is always "I don't want to document async because the core devs might lose interest in it"
09:45:12FromDiscord<haxscramper> everyone as a beginner at some level of programming stuff
09:45:17FromDiscord<Araq> seriously...
09:45:29FromDiscord<haxscramper> yeah, sure, four-line note on the end of the book is the worst offense there is↵(@Araq)
09:45:32FromDiscord<dom96> haxscramper: programmers don't usually meet macros, so yes, they should be explained thoroughly
09:45:39FromDiscord<dom96> most programmers on the other hand know about if statements etc
09:45:45FromDiscord<dom96> so they can be explained in less detail
09:45:53PMunch@haxscramper, fair enough. But I but down the "Head first Java" book I read as a kid because it was so basic that I felt it didn't go anywhere
09:45:53FromDiscord<cabboose> Is that actually what this is all about?↵(@Araq)
09:46:05FromDiscord<dom96> A target audience of "knows at least one other language" is several orders of magnitude different to "is a kid"
09:46:19PMunchHad to find something a bit more up-tempo in order to feel like I was going anywhere
09:46:25FromDiscord<dom96> like... how is this even controversial? lol
09:46:51FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3DPb
09:47:01FromDiscord<hugogranstrom> In reply to @dom96 "A target audience of": And yet both a valueable learning resources, because you don't know how much experience a new user in Nim has...
09:47:03FromDiscord<haxscramper> cabboose\: thinks the same for example
09:47:13FromDiscord<haxscramper> @hugogranstrom\:
09:47:14FromDiscord<haxscramper> and some other people
09:47:35FromDiscord<haxscramper> you haven't even read the book and yet claim it is not a good idea to link this book
09:47:52PMunchEveryone has their favourite resource, and the way the topic is now where everyone chimes in with their favourite resource is great to see
09:47:52FromDiscord<dom96> In reply to @hugogranstrom.nim "And yet both a": yes, they are both valuable.
09:47:53FromDiscord<haxscramper> what is wrong with linking it?
09:47:53FromDiscord<saem> What's controversial is the deflecting that isn't investigating potential hate speech.↵(@dom96)
09:48:04FromDiscord<Rika> I feel like you are all just having some sort of miscommunication issue
09:48:05FromDiscord<dom96> In reply to @saem "What's controversial is the": I'm waiting for logs
09:48:17FromDiscord<dom96> Very happy to have a look
09:48:24FromDiscord<dom96> or for other mods who dealt with the issue to comment
09:48:25FromDiscord<cabboose> Yes; why wasn't this the first response from dom and Araq?↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
09:48:29FromDiscord<saem> Go search yourself
09:48:30PMunchSure the initial response leaves something to be desired, but arguing about which book is the one true book to link sounds an awful lot like arguing religion..
09:48:37FromDiscord<hugogranstrom> In reply to @dom96 "yes, they are both": Why do we have this discussion then? 🙃
09:48:52FromDiscord<haxscramper> because dom started it
09:48:56FromDiscord<dom96> @hugogranstrom because I think other books/resources are likely to fit people's experiences better
09:48:58FromDiscord<haxscramper> so we have it
09:49:00FromDiscord<dom96> most Nim learners aren't kids
09:49:53FromDiscord<dom96> PMunch: I don't think so
09:50:03FromDiscord<cabboose> I should probably leave the conversation now because I am so incredulous over how this has all gone down. I am honestly disappointed in the handling of this situation. I would wish @dom96 and @Araq would care more about welcoming a new member than creating a rift in this channel over my choice of literature to link to the new member.
09:50:20FromDiscord<dom96> I care a lot.
09:50:27FromDiscord<dom96> But there is nothing to argue about there
09:50:27FromDiscord<cabboose> By which I wish I could link and introduce myself, however the forum has proved impossible for me to correctly verify sign up to over 5 attempts
09:50:29FromDiscord<hugogranstrom> In reply to @dom96 "<@!454991120028663809> because I think": Then mention other resource in addition to it, not as a you must read this instead-replacement
09:50:56FromDiscord<cabboose> I understand if you do; however I THINK you do not. That thought drives my feelings at this time.↵(@dom96)
09:51:17FromDiscord<cabboose> That thought is driven by the ridiculous situation we have before us.
09:51:31FromDiscord<dom96> In reply to @hugogranstrom.nim "Then mention other resource": That is what I want. I don't think we should be just linking to Stefan's book is all I am saying
09:51:53FromDiscord<Rika> That’s not what you implied
09:52:00FromDiscord<Rika> That’s what I thought by miscommunication issue
09:52:13FromDiscord<haxscramper> and why shouldn't we again, if people find it a good learning resource
09:52:13FromDiscord<dom96> yeah, there are always miscommunications because we clearly don't trust each other
09:52:17FromDiscord<dom96> I have very good reason to not
09:52:18FromDiscord<Rika> Just can’t chat right now, busy
09:52:22FromDiscord<Rika> But I’m reading and yeah
09:52:34FromDiscord<cabboose> Such a disappointing comment to make. Loathe the person who has spent time trying to make a resource for the community. Loathe the person who tries to ensure a new member gets a welcome.↵(@dom96)
09:52:38FromDiscord<dom96> But I don't want to get into that now
09:52:57FromDiscord<cabboose> Rue the day I make a resource myself, because as it stands, I think you would ensure it is never linked to any person who might benefit from it.
09:53:30FromDiscord<cabboose> From what I think, this has all been based on your person opinions of Stefan. This is not what professionals should be doing.
09:53:32FromDiscord<hugogranstrom> In reply to @dom96 "That is what I": Then make a better effort to convey that message instead next time :) And not as you did today
09:53:46FromDiscord<cabboose> This has certainly been trained in my career, but I think that it has not in yours.
09:53:50FromDiscord<hugogranstrom> In reply to @cabboose "From what I **think**,": +1
09:54:21FromDiscord<dom96> In reply to @cabboose "From what I **think**,": Not at all.
09:54:47FromDiscord<dom96> I mean objectively I specifically mentioned target audience
09:55:00FromDiscord<dom96> Haven't mentioned anything about Stefan's personal character when we started this discussion
09:56:42FromDiscord<Rika> He said “just” his resource, he thinks it’s fine to link it yes but it’s always better to link more is what he means I think
09:57:19FromDiscord<cabboose> Yet no one but the kind enthusiast, kiloneie and impbox have done so.↵(@Rika)
09:57:50FromDiscord<cabboose> The staff have either provided a cold welcome, or started an argument over the intention to link stefans book.
09:58:01FromDiscord<cabboose> I am nothing but disappointed and ashamed.
09:58:15FromDiscord<Araq> good bye
09:58:30FromDiscord<cabboose> Good bye? \:/
09:59:01FromDiscord<Araq> even if you were right (and you're not), you're happy to keep the fire burning, so yes, good bye
09:59:40FromDiscord<hugogranstrom> Someone makes a criticism. Solution: good bye 🤦‍♀️
10:00:01FromDiscord<Araq> trolls are banned, it's a solution that works rather well
10:00:14FromDiscord<haxscramper> who is a troll here?
10:00:30FromDiscord<hugogranstrom> Troll == someone who want a welcoming community?
10:00:33FromDiscord<haxscramper> > ↵> dom96 banned cabboose↵>
10:00:34FromDiscord<haxscramper> nice
10:00:43FromDiscord<hugogranstrom> Sandbox level...
10:00:44FromDiscord<Rika> I have no desire to continue being in this community
10:00:52PMunchI mean the issue is not that he wanted a welcoming community
10:00:54FromDiscord<dom96> Araq asked me to fwiw
10:01:22PMunchThe problem is he was stirring the channel into a fervour (again)
10:01:31FromDiscord<dom96> yep
10:01:35FromDiscord<haxscramper> the issue in these retorts about "just read the issue tracker of the book", or "stefan is hard to deal with" or bringing up old stuff like
10:01:45FromDiscord<haxscramper> kilonete's
10:01:45FromDiscord<dom96> and as you know, bans are (almost) never permanent here
10:01:46FromDiscord<haxscramper> videos
10:01:48FromDiscord<dom96> so we can discuss this alter
10:01:53FromDiscord<dom96> I need to get to my actual work now
10:02:00FromDiscord<dom96> (edit) "alter" => "later"
10:02:15FromDiscord<dom96> (or you can discuss with Araq now of course)
10:02:27FromDiscord<Araq> er, I too have work to do
10:02:33FromDiscord<haxscramper> like it would go anywhere
10:02:39FromDiscord<haxscramper> except me being banned as well
10:02:44FromDiscord<Araq> correct
10:02:53FromDiscord<haxscramper> for "keeping the fire burning"
10:02:53PMunch@Rika, that's a shame :(
10:03:21FromDiscord<enthus1ast> imho banning should only be done for great misbehaving
10:06:02PMunchI agree
10:06:36FromDiscord<Araq> alternative we can mute the channel for 20 minutes, not sure if that feature exists
10:07:04FromDiscord<Rika> You might be able to on discord
10:07:15FromDiscord<Rika> The bridge interactions may complain
10:11:57FromDiscord<tandy> kinda sad that the paid comms person is posting `.` on the forum
10:14:51PMunchYeah, that's not great..
10:14:59FromDiscord<Rika> ?
10:15:19FromDiscord<hugogranstrom> https://forum.nim-lang.org/t/8586 miran's comment
10:15:49FromDiscord<xflywind> I guess it should be a `^`
10:18:13FromDiscord<hugogranstrom> Takes one second to check it a second time, and gives two very different impressions. 🤷‍♂️
10:19:11FromDiscord<hugogranstrom> And if you are paid to post things, I would expect them to re-read their comments before clicking sending
10:22:52FromDiscord<Araq> I read it and he got the link correct. I don't understand the point
10:28:49FromDiscord<hugogranstrom> In reply to @Araq "I read it and": It's the "." under the link that gives the impression of "sigh, RDFM". Totally unnecessary addition to the message
10:29:14FromDiscord<tandy> as said above, i would also expect miran to send some nice welcoming message if they were to reply to forum posts - i would expect this of paid community people↵(@Araq)
10:29:52FromDiscord<Araq> I think that's a forum bug, it won't render as a link without the dot XD
10:29:53FromDiscord<tandy> some simple copy & pasted message would work even, doesnt necesarily have to be hand written each time
10:30:13FromDiscord<Yardanico> yeah, @hugogranstrom about the dot specifically - in this case it's the fault of the forum
10:30:38FromDiscord<hugogranstrom> lol xD
10:30:46FromDiscord<Araq> yup, just tried
10:30:50FromDiscord<Araq> the dot must be there
10:31:12FromDiscord<hugogranstrom> Fix it then ;P It doesn't give a good impression IMO
10:31:27FromDiscord<Araq> will try
10:34:42FromDiscord<narimiran> In reply to @tandy "kinda sad that the": do you know why really the dot is there?
10:35:07FromDiscord<narimiran> y'all are very quick to jump to (wrong) conclusions
10:35:58FromDiscord<narimiran> try making a message on the forum with just a link, it won't be properly rendered - you need some extra character, and i chose dot. no hidden meaning there.
10:36:18FromDiscord<hugogranstrom> We are seeing it the same way new people are seeing it then. 🤷‍♂️
10:36:33FromDiscord<hugogranstrom> We nor they know that is the case
10:37:08FromDiscord<Rika> Even then it still has the connotation of RTFM
10:37:25FromDiscord<hugogranstrom> In reply to @Rika "Even then it still": True
10:38:15FromDiscord<hugogranstrom> Making a template for these kinds of questions that come up time and time again wouldn't be too hard? "Welcome to Nim. Here are a few useful links you might find useful:"
10:38:43FromDiscord<narimiran> ok, next time i'll make sure not to use dot when my message contains just a link.
10:38:58FromDiscord<narimiran> no more hidden-RTFM
10:39:12FromDiscord<hugogranstrom> In reply to @narimiran "ok, next time i'll": Does a smiley suffice instead of a dot? 😄
10:39:13FromDiscord<Rika> Well I mean it would be better to not just post a link by itself
10:39:25FromDiscord<Rika> Maybe at least say something like a welcome or whatever
10:40:04FromDiscord<dom96> I agree that a welcome + some links would be better. And we really need to fix that forum bug 🙂
10:40:07FromDiscord<haxscramper> > ↵> Hi, welcome to the community! I hope you enjoy nim, here’s our basic documentation\: xxxxx, was there something more specific you wanted help with though? Do not hesitate to let us know! Thanks!↵>
10:40:51FromDiscord<tandy> do you guys really not understand the point? its not about the dot, its the lack of any "hello ... blah blah "↵(@narimiran)
10:41:58FromDiscord<narimiran> In reply to @tandy "do you guys really": ....in the reply to the "Trying to learn nim! Any advice?"
10:42:54FromDiscord<narimiran> https://www.youtube.com/watch?v=VvPaEsuz-tY
10:43:15FromDiscord<hugogranstrom> In reply to @narimiran "https://www.youtube.com/watch?v=VvPaEsuz-tY": Because it gives a better impression
10:43:19FromDiscord<haxscramper> I mean it is not exactly our missing to educate people on how to google or RTFM, so yes, in response to the "Trying to learn nim! Any advice?" it is justified to put up a templated "hello" message
10:43:38FromDiscord<haxscramper> I don't as you to hand-craft page-long response with review of every single resource
10:43:47FromDiscord<narimiran> thanks for the advice, guys. i'll know better for the next time.
10:44:08FromDiscord<Benjamin> I'm happy to see this discussion becoming much more constructive. However, maybe we should have a separate "meta" or "community" channel for such discussions; I doubt that's what most people are in this room for.
10:45:26FromDiscord<hugogranstrom> In reply to @narimiran "thanks for the advice,": That's how a representative should behave! 😃 :nim1:
10:45:35FromDiscord<haxscramper> If there was some incentive to do a real community management here this would fly, but as of right now I barely see anything except spontaneous discussions
10:46:22FromDiscord<haxscramper> `<insert default rant about nobody knowing hwere nim is aiming>`
10:48:46FromDiscord<hugogranstrom> In reply to @haxscramper "`<insert default rant about": It's kinda like christmas, we make a list but we have no idea what will be under the tree in the end 🎄
10:50:14FromDiscord<Rika> In reply to @narimiran "....in the reply to": Well, yes, even if the thread post isn’t exactly great
11:02:28FromDiscord<Jan81> well well.. lots of things happening here..
11:08:59FromDiscord<Araq> we aim for 1.6.2 fixing regressions, 2.0 will make --gc:orc the default. The plan doesn't constantly change either.
11:10:24FromDiscord<haxscramper> What about concepts, view types, lazy semcheck that have been mentioned, changes in nimble, tooling improvements (that seem to be the most wanted feature of all), IC and so on.
11:11:36FromDiscord<Araq> view types improved quite a lot in 1.6.0 and get more fixes for 1.6.2
11:12:59PMunchHaving a more official roadmap would indeed be nice
11:13:13PMunchMaybe something we could put on the web-page?
11:13:14FromDiscord<Araq> lazy semcheck depends on timothee and he's on holidays and is not scheduled for any particular release
11:13:46FromDiscord<Araq> of course it doesn't help that I'm skeptical of the approach and have alternative ideas but I'm always trying to stay objective (believe it or not)
11:14:14supakeenobjectiveness?! in open source?
11:14:30FromDiscord<Araq> tooling improvements and IC are the same thing to me. make IC work well and nimsuggest doesn't have to be a server
11:14:40FromDiscord<Araq> it can be a one-shot command line tool then
11:14:44FromDiscord<tandy> ^ this please↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
11:15:08FromDiscord<haxscramper> I'm mostly talking about what community could expect wrt. to already announced semi-experimental features, not internal implementation details
11:15:20FromDiscord<tandy> make a blog post talking about the direction of nim, do some communication, or make it obvious from the repo milestones / projects
11:15:28FromDiscord<Araq> very easy for editors to ask the compiler then as there is no process management complexity
11:15:47FromDiscord<tandy> its imposible to know what is currently happening in nim without scouring the repo for commits/ issues / prs
11:16:43FromDiscord<Araq> sorry, I wasn't aware
11:17:18FromDiscord<Araq> the problem for me is probably that the plan doesn't change, it feels like a looong way to go though
11:17:41FromDiscord<Araq> and the slow progress on IC is frustrating
11:18:03PMunchHaving a more stable Nimble experience would be awesome!
11:18:36PMunchBut yeah, if there is a plan, even just the stuff you've outlined here, and it doesn't change a lot, why not create a page about it on the website?
11:18:41PMunchPeople keep asking for it
11:18:45FromDiscord<dom96> Having a roadmap would be nice
11:19:08FromDiscord<tandy> thats okay, i think the community needs a better method for communicating with core team because weve been moaning about this for months in this channel↵(@Araq)
11:19:20FromDiscord<tandy> some method where we can get a response and the core team is held accountable
11:20:15FromDiscord<tandy> i think thats what used to happen in the weekly meetings? not sure i never went to one but having those again would be really good if possible..
11:20:33FromDiscord<haxscramper> it happened then somehow disappeared suddenly
11:20:37FromDiscord<haxscramper> it also shifted format
11:20:41FromDiscord<haxscramper> first one was the best
11:20:55FromDiscord<haxscramper> last one was about compiler internals, which is a lot more niceh
11:21:19FromDiscord<haxscramper> yes it is a "developer" meeting technically, but at the same time first one started with discussing of the current state of nim development
11:21:26FromDiscord<haxscramper> and it was informative for everyone involved
11:22:06FromDiscord<haxscramper> not only for a handful of people who actually contribute to the compiler, but for everyone
11:24:49FromDiscord<tandy> if weekly is too often, it could be done less often too
11:26:06FromDiscord<haxscramper> I talked about it earlier, but it does not even have to be a real meeting, some kind of regular bi-weekly/montly posts on the website/forum are also fine
11:26:31FromDiscord<haxscramper> The main question is that you need to drill down the github repo, or personally talk to one of the developers to see where are we heading
11:26:50FromDiscord<haxscramper> or what is the current state
11:31:23FromDiscord<tandy> @Araq\: what do you think?
11:36:19FromDiscord<Zajt> I have defined this in a file , but when compiling, it still says `Error: undeclared identifier: 'SECTION_INHERIT'` and I don't understand why. Any ideas? https://media.discordapp.net/attachments/371759389889003532/905420119054889001/unknown.png
11:37:09FromDiscord<haxscramper> do you import file where `SECTION_INHERIT` is defined, or use it in the same file?
11:37:33*rockcavera joined #nim
11:37:33*rockcavera quit (Changing host)
11:37:33*rockcavera joined #nim
11:38:00FromDiscord<Zajt> it's in the same file
11:38:29FromDiscord<haxscramper> That is weird
11:38:58FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3DQb
11:39:04FromDiscord<haxscramper> like this (rougly)
11:40:15FromDiscord<xflywind> In reply to @haxscramper "I talked about it": Video meeting is hard for non-native speaker.
11:40:25FromDiscord<xflywind> (edit) "In reply to @haxscramper "I talked about it": ... Video" added "I agree."
11:40:31FromDiscord<xflywind> (edit) "Video" => "And video"
11:40:38FromDiscord<Zajt> In reply to @haxscramper "That is weird": It's used as argument to a proc function in the same file https://media.discordapp.net/attachments/371759389889003532/905421203936784384/unknown.png
11:43:05FromDiscord<Araq> @tandy I won't promise I'll be quick about it but we will write it
11:44:14FromDiscord<Araq> about Nimble, development has been outsourced, wasn't ready for 1.6.0 and I don't know the plan either
11:44:55FromDiscord<haxscramper> I think at this point I can close #368
11:44:57FromDiscord<tandy> thats okay, good to hear theres a plan \:) thanks↵(@Araq)
11:46:57FromDiscord<haxscramper> 398\
11:48:17FromDiscord<tandy> where?
11:50:26FromDiscord<haxscramper> https://github.com/nim-lang/RFCs/issues/398#issuecomment-958956941
11:50:45FromDiscord<haxscramper> so tldr I don't care anymore, if anyone wants to revitalize this, they are welcome
11:51:17FromDiscord<haxscramper> also just so you know, saem (the guy who maintains vscode extension) just left this chat over this shit
11:51:30FromDiscord<haxscramper> I don't think he would want me to bring this up, but here you go
11:51:48FromDiscord<haxscramper> well, not "just", but when you banned cabbose
11:52:05FromDiscord<dom96> Please don't close #398, lots of great ideas in there
11:52:18FromDiscord<haxscramper> no, I closed it but said you are free to reopen
11:52:26FromDiscord<haxscramper> furthermore, I expect you to reopen if you want
11:52:28FromDiscord<dom96> I don't understand what's the blocker in it though
11:52:56FromDiscord<dom96> I've been very positive about it and even asked you to implement a bunch of stuff in it. Is it that you just don't have bandwidth?
11:54:07FromDiscord<haxscramper> status's actions undermined my resolve in a big way
11:54:15FromDiscord<dom96> I see :/
11:54:25FromDiscord<haxscramper> well, I don't quit on spot
11:54:31FromDiscord<haxscramper> I just don't have the incentive to push for it so hard
11:54:50FromDiscord<haxscramper> so you can reopen it just now if you want
11:58:50*Vladar quit (Quit: Leaving)
12:00:40FromDiscord<haxscramper> Another large blow was the fact I had to migrate haxdoc to new nimble, and there was so much changes everywhere, that I just gave up
12:01:12FromDiscord<haxscramper> Because I wouldn't want to dive into the implementation at all
12:02:18FromDiscord<haxscramper> and with nimph I'm supposed to just call into `nim dump` (etc.) to get all available paths, so documentation generator would not have to be a package managere resolution at the same time
12:03:39FromDiscord<haxscramper> There are some rough edges elsewhere, though, so I won't advertise it as "the solution" to everything
12:06:02*supakeen quit (Quit: WeeChat 3.3)
12:06:32*supakeen joined #nim
12:17:07FromDiscord<lenis> Its a bit annoying that you cant use procedures until they are defined in the file. I like to define the highest level functions at the top
12:18:00FromDiscord<haxscramper> you can forward-declare everythign
12:21:48FromDiscord<el__maco> I also like to define functionality in a top-down fashion. I've been using ``{.experimental: "codeReordering".}`` and so far its been working wonders
12:23:25PMunchOh yeah, that is also an option
12:23:37PMunch@Zajt, did you figure out your issue?
12:23:47PMunchIt seems like you drowned a bit in other stuff
12:30:01FromDiscord<impbox [ftsf]> Yeah code reordering saves me a lot of time
12:31:12FromDiscord<Zajt> In reply to @PMunch "<@290456415963709440>, did you figure": Nope not yet
12:32:15PMunchSo you have a type and a proc trying to use that proc in the same file and the proc doesn't see the type?
12:32:22PMunchIs the type defined before the proc?
12:33:11FromDiscord<Zajt> Nope after
12:33:21PMunchIt needs to be before
12:33:29FromDiscord<Zajt> Maybe that's the issue but it didn't complain for that on the other type I have which is also at the end of the fiel
12:33:32FromDiscord<Zajt> (edit) "fiel" => "file"
12:33:42PMunchHmm, that sounds strange
12:34:21FromDiscord<Zajt> So I think the issue is with the type somehow, or the syntax with it
12:38:00PMunchThen it's hard to help out without looking at the source
12:39:37PMunch@Zajt, but the type definitely needs to be defined first: https://play.nim-lang.org/#ix=3DQy
12:39:39FromDiscord<evoalg> what is code reordering?
12:39:58PMunchIt tries to reorder your code into something that allows Nim to parse it
12:40:24FromDiscord<haxscramper> `{.experimental: "codeReordering".}`
12:40:24PMunchFor example proc1 which calls proc2 is going to be moved to below proc2
12:43:25FromDiscord<lenis> In reply to @haxscramper "you can forward-declare everythign": what do you mean
12:43:54FromDiscord<impbox [ftsf]> In reply to @haxscramper "you can forward-declare everythign": Pretty sure I couldn't forward declare an iterator
12:43:59FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3DQA
12:44:04FromDiscord<Benjamin> The docs look pretty good for this feature with several examples\: https://nim-lang.org/docs/manual_experimental.html#code-reordering
12:44:17FromDiscord<haxscramper> `proc1()` is a "high-level" procedure, so if you want to put down highest-level fist
12:44:35FromDiscord<haxscramper> and then increase granularity, that's what this feature is for
12:45:03FromDiscord<haxscramper> though I don't understand this feature at all
12:45:15FromDiscord<haxscramper> I would just read code from bottom to top if it was structured this way
12:48:16FromDiscord<el__maco> you want the details first and high level code at the bottom?
12:48:55FromDiscord<Rika> personally thats how i read
12:49:14PMunchI read diagonally from the bottom right to the top left
12:49:18FromDiscord<haxscramper> Yes, I'm used to this way of writing from basically every compiled language
12:49:19FromDiscord<el__maco> to me that makes no sense, but each to their own I guess
12:49:36FromDiscord<haxscramper> And also I don't want global implicit transforms in the code
12:52:06FromDiscord<Rika> i mean yeah its prolly to do with how we think
12:52:21FromDiscord<lenis> for me it makes more sense with high level at the top because i always start with writing high level functions, and break it down into detail/helper functions as I go
12:52:54FromDiscord<lenis> so with high level at the top you write the files top to bottom which is more natural
12:52:55FromDiscord<haxscramper> I write types first
12:52:55FromDiscord<haxscramper> And I put them on toplevel as well
12:53:00FromDiscord<lenis> and you also get to read the code top to bottom which is even more important
12:53:03FromDiscord<Solitude> i write types and lower level procs first
12:53:16FromDiscord<Solitude> and you dont read source files like a fucking book, you search throught them
12:53:35FromDiscord<lenis> you never search through books?
12:53:38FromDiscord<haxscramper> well, a lot of times you just read
12:53:51FromDiscord<haxscramper> At least I read a lot of times
12:53:57FromDiscord<Solitude> In reply to @lenis "you never search through": how is that related
12:54:44FromDiscord<haxscramper> For example some GH project - it is easier to just open it, look through modules just to see the general architecture
12:55:02FromDiscord<haxscramper> Than to clone, or just around in different tabs/files searching
12:55:09FromDiscord<lenis> anyway, the way i like is is where the information at the top explains how to use it, the lower down you go the more it becomes about implementation
12:55:22FromDiscord<lenis> so, imports, then types, then exported procs then implementation procs
12:55:33FromDiscord<Rika> In reply to @lenis "for me it makes": i conceptualise high -> low but i write low -> high
12:55:47FromDiscord<Solitude> In reply to @lenis "anyway, the way i": and how is that different from just having it reversed?
12:56:05FromDiscord<lenis> you mean imports and types at the bottom?
12:56:12FromDiscord<Rika> are we arguing about anything
12:56:18FromDiscord<haxscramper> Well, I would say I do rougly the same, except for procs, but I don't maintain high discipline in code, so it is kind of mixed↵(@lenis)
12:56:22FromDiscord<Rika> if not then what are we talking about exactly
12:56:22FromDiscord<lenis> i mean, its different because you will have to scroll down if you want to know how to use the exports in a file
12:56:32FromDiscord<Solitude> wow
12:56:44FromDiscord<lenis> and you read the procs top to bottom but the proc definitions bottom to top which doesnt make sense
12:57:19FromDiscord<Rika> so do you proclaim reading japanese in the traditional style (top down right to left) doesnt make sense because its not how you do things?
12:57:57FromDiscord<Rika> whatever, i shouldnt argue about this
12:58:00FromDiscord<Rika> nothing to argue about
12:58:49FromDiscord<lenis> lol
12:59:27FromDiscord<lenis> thanks for the tip about the codeReordering feature. works great
13:00:46FromDiscord<el__maco> yea I love it. It works with variables and types too
13:01:49FromDiscord<el__maco> its neat that I can use a variable that's something ugly like a glsl shader in a string, and define the string somewhere way below
13:03:01FromDiscord<lenis> I've been defining all types in one statement so that hasn't been an issue anyway
13:03:08FromDiscord<lenis> but it's nice for the rest
13:05:37FromDiscord<Benjamin> I'd be interested in seeing the most readable code each of you can find on Github. I imagine you'd be linking very different types of programs where your preferred style shines.
13:06:44FromDiscord<Rika> indeed
13:07:39FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=
13:07:43FromDiscord<haxscramper> no code
13:07:45FromDiscord<haxscramper> most readable code
13:08:01FromDiscord<haxscramper> I don't find any code readable really, even stuff I wrote myself
13:08:08FromDiscord<haxscramper> I mean I have to think through it
13:50:24*Vladar joined #nim
13:58:17FromDiscord<deech> Dumb q, is there a `tail` function for `openArray` so that `myArray[1..^1]` is the empty list?
14:00:52*arkurious joined #nim
14:01:29nrds<Prestige99> What do you mean empty list? you just want elements [1] to the last?
14:03:40FromDiscord<Rika> basically if list.len <= 1, tail will return empty list, otherwise it will return tail
14:04:02FromDiscord<Rika> no i dont think one exists
14:05:25nrds<Prestige99> ah I see. Would be very easy to write a template I would think
14:19:00FromDiscord<evoalg> When I do`var g: Table[string, int]` it works fine, but when I try to do: `var g: Table[string, tuple]` but I get Error: invalid type: 'Table[system.string, tuple]' for var ... am I not allowed to use tuples in a table?
14:24:39nrds<Prestige99> Need to specify the information about the tuple
14:25:20nrds<Prestige99> I think if you did something like Table[string, tuple[name: string, age: int]] it would work
14:26:02FromDiscord<evoalg> ohhh I see what you mean - thanks I'll have a play!
14:33:23FromDiscord<evoalg> it works!
14:33:42nrds<Prestige99> \o/
15:02:26*PMunch quit (Quit: Leaving)
15:19:51*neurocyte0132889 joined #nim
15:19:51*neurocyte0132889 quit (Changing host)
15:19:52*neurocyte0132889 joined #nim
15:22:49*vicecea quit (Remote host closed the connection)
15:24:19*vicecea joined #nim
15:39:33FromDiscord<gerwy> hi, so im trying to make a wrapper for myself for rawdraw using nimterop and i have some issues↵i think it might be because of the X11 library (that i have installed im sure) because it doesn't recognize the type from that header i think
15:39:54FromDiscord<gerwy> at least the name `XWindowAttributes` sounds very like it is from X11
15:40:57nrds<Prestige99> It is - what is the problem you're having?
15:41:21FromDiscord<gerwy> sent a code paste, see https://play.nim-lang.org/#ix=3DSa
15:41:39FromDiscord<gerwy> In reply to @nrds "<Prestige> It is -": whenever i compile it always shows↵`Error: undeclared identifier: 'XWindowAttributes'`
15:42:13FromDiscord<gerwy> and here is link to the library i want to make wrapper for↵https://github.com/cntools/rawdraw
15:43:24FromDiscord<gerwy> and of course to be sure, i compiled some example C script, using the same header and it works fine so its something with nimterop, i need to add something to it? compile something or idk
15:48:30FromDiscord<gerwy> sent a code paste, see https://play.nim-lang.org/#ix=3DSc
15:51:54FromDiscord<gerwy> and importing made wrapper still results in million `undefined reference to` lol
15:52:44nrds<Prestige99> Hm I don't know much about nimterop
16:00:25FromDiscord<gerwy> Its very cool but there is not enough examples... and the ones that are there doesn't really help much
16:00:59FromDiscord<gerwy> anyone with big experience on nimterop?
16:04:33FromDiscord<haxscramper> https://irclogs.nim-lang.org/27-11-2018.html#16:26:11 there is a table with some wrapped libraries
16:04:48FromDiscord<haxscramper> Maybe you find more examples there
16:07:30FromDiscord<gerwy> okaay, thaanks i will look at it, i don't know if there would be anything that i can really add to my script but sure i will try
17:09:03NimEventerNew thread by Vsajip: Printing a typedesc - compilation errors, see https://forum.nim-lang.org/t/8589
17:20:52FromDiscord<hmmm> an imported module will execute any toplevel instruction before the main module is loaded, right?
17:22:54FromDiscord<Rika> yes
17:23:13FromDiscord<hmmm> 😦
17:23:17FromDiscord<hmmm> I didn't know
17:23:28FromDiscord<hmmm> spent 1 hour looking for a bug it wasn't there
17:23:34FromDiscord<hmmm> rika give me back my 1 hour
17:23:55FromDiscord<Rika> you didnt ask one hour ago
17:24:27FromDiscord<hmmm> yesterday I asked hexxy if there was something I needed to know about importing modules and he said "hmm you are golden you know everything you need to know"
17:24:32FromDiscord<hmmm> 😦
17:26:00FromDiscord<haxscramper> > hexxy↵sigh
17:26:10FromDiscord<hmmm> him!
17:26:19FromDiscord<Rika> haxboi
17:26:22FromDiscord<haxscramper> anyway, I just never put any executable code at toplevel so I didn't recall this
17:26:52FromDiscord<haxscramper> and I prefer my name typed somewhat legibly, at least for the sake of pings on matrix
17:27:23FromDiscord<hmmm> yea I do suspect things like that. Another suspect thing I do is controlflow with exceptions of Parsefloat and parse datetime but I have no idea what is the correct way
17:27:29FromDiscord<haxscramper> I have some additional patterns like "scramper" etc., but it is still hard to notice
17:28:13FromDiscord<haxscramper> you mean how to handle wrong floats?
17:28:24FromDiscord<IsaacPaul> lmboo
17:28:25FromDiscord<Rika> also
17:28:37FromDiscord<Rika> when you do put code outside an imported module
17:28:42FromDiscord<Rika> what happens when it is imported twice
17:28:47FromDiscord<hmmm> no I call parsefloat and if I get an error I guess it wasn't a float and go from there lol
17:28:59FromDiscord<Rika> like main -> a and main -> b -> a
17:30:17*Guest3657 joined #nim
17:31:30FromDiscord<hmmm> wot, there is people out there that import circular modules? how they live with themselves
17:32:15FromDiscord<haxscramper> hm, what exactly is this?↵(@Rika)
17:32:27FromDiscord<haxscramper> Like `{.define.}`?
17:32:42FromDiscord<Rika> sorry, i mean s/outside/at the top level of/
17:33:46Amun-Rahmmm: combine them into one
17:34:19FromDiscord<haxscramper> and module might check for defines
17:34:19FromDiscord<haxscramper> Don't remember exact syntax
17:34:24FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3DT4
17:35:29Amun-Rayou can also do user switchable defines, ie: const foo {.booldefine.} = true
17:35:49*stkrdknmibalz joined #nim
17:37:27FromDiscord<geekrelief> In reply to @Life Sucks "whenever i compile it": I searched the repo for `XWindowsAttributes`, and don't see it. What header is it defined it?
17:38:00FromDiscord<geekrelief> In reply to @Life Sucks "anyone with big experience": I'm using a custom nimterop to wrap The Machinery.
17:38:19Amun-RaI make wrappers w/o nimterop
17:38:20FromDiscord<haxscramper> yesterday I forgot I had a todo list for a spec tests
17:38:24FromDiscord<haxscramper> sent a long message, see http://ix.io/3DT6
17:38:39FromDiscord<geekrelief> https://github.com/geekrelief/nimterop
17:39:37FromDiscord<geekrelief> In reply to @Amun-Ra "I make wrappers w/o": What kind of stuff are yo wrapping?
17:41:36Amun-Rageekrelief: various libraries for my own use: ncurses, slang, aalib, libcaca, sdl2 (they're not 1:1 wrappers, I export only "safe" types)
17:43:03FromDiscord<gerwy> In reply to @geekrelief "I searched the repo": it's in X11↵i figured out its some error with linking X11 to it which i solved by providing `-lm -lX11` to it i guess but it still has some problems↵it says ↵`~Documents/rawdraw/raw.nim(9, 36) Error: undeclared identifier: 'X11'` which well... makes sense because looking at raw.nim it uses X11 but don't declare it anywhere, idk how i could link it to X11, i have x11 wrapper in nimble in
17:43:06*Guest3657 quit (Quit: Client closed)
17:43:40FromDiscord<gerwy> In reply to @geekrelief "I'm using a custom": cool, can you look at rawdraw? maybe it will be similar to it, i wanted to try nimterop because it looked more stable and reliable than c2nim but idk
17:44:03FromDiscord<gerwy> im getting tired of fixing all of this, i will just use c++ if i need to
17:45:07FromDiscord<hmmm> hmm I use: import A/[X, Y, Z], from A import B, the stars thingy and now I have the tattooed knowledge of toplevel execution. Rest I never used. Months ago I knew what include was for but forgot ever since
17:45:16FromDiscord<geekrelief> In reply to @Life Sucks "cool, can you look": where's the nim file?
17:45:34FromDiscord<gerwy> which one? raw.nim? in the same dir as the rawdraw header
17:45:59FromDiscord<geekrelief> link?
17:46:19FromDiscord<geekrelief> it's hard to help without exactly what you're doing.
17:46:23FromDiscord<geekrelief> (edit) "it's hard to help without ... exactly" added "seeing"
17:46:36FromDiscord<geekrelief> On top of that I'm not on linux.
17:46:56FromDiscord<geekrelief> I'm not even sure it's an issue with nimterop you're having.
17:47:06FromDiscord<geekrelief> Seems like you're missing some header.
17:47:14FromDiscord<geekrelief> (edit) "header." => "header, based on the error message."
17:48:23FromDiscord<qb> Trying to take a screenshot on x11. Anyone an idea what could be wrong with the color math? https://play.nim-lang.org/#ix=3DTd
17:50:20FromDiscord<gerwy> sent a long message, see http://ix.io/3DTe
17:50:46FromDiscord<gerwy> its dynamically linked thats why its getting problems probably i really don't know
17:50:51FromDiscord<gerwy> and im too tired to fix it
17:51:25FromDiscord<RattleyCooper> how would I turn a `seq[uint8]` with 4-byte length into a `uint32`?
17:52:11Amun-Rasee endians module
17:52:29FromDiscord<hmmm> damn what is the english word for the gui thingy that you click on it and makes you select one element from a list. It's not a listbox because it's flat
17:52:55Amun-Racombobox?
17:53:04FromDiscord<hmmm> you might be a genius
17:53:06FromDiscord<hmmm> wait I check
17:53:13Amun-RaI actually am
17:53:33FromDiscord<RattleyCooper> In reply to @Amun-Ra "see endians module": I've never used pointers. I feel like imma break something
17:56:19FromDiscord<RattleyCooper> So second question, how would I use endians module to turn a `seq[uint8]` into a `uint32`?
17:56:27Amun-RaRattleyCooper: I'd do it that way https://play.nim-lang.org/#ix=3DTf
17:57:15FromDiscord<RattleyCooper> Can someone point me to something I can read so I understand what I'm doing?
17:57:51FromDiscord<hmmm> Amun ra you are the egytian god of the day, take this 👑
17:58:13Amun-Rahmmm: that's one of my perks, yes ;)
17:59:48FromDiscord<geekrelief> In reply to @Life Sucks "im trying to make": Just a guess, but I think maybe you're missing a `cIncludeDir` pointing to where the X11 headers live.
18:00:24*neurocyte0132889 quit (Quit: The Lounge - https://thelounge.chat)
18:03:11*neurocyte0132889 joined #nim
18:03:11*neurocyte0132889 quit (Changing host)
18:03:12*neurocyte0132889 joined #nim
18:03:29FromDiscord<gerwy> In reply to @geekrelief "Just a guess, but": how should i add it? just `cIncludeDir([place where X11 are])` ??
18:03:43FromDiscord<gerwy> i have no idea where they are lmao, i guess i will look for them
18:05:19FromDiscord<RattleyCooper> In reply to @Amun-Ra "<@408056314342932491>: I'd do it": Is there a way that doesn't require people to understand binary operations and whatnot? I'm trying to do this in a way that I can actually understand and that's over my head
18:05:31FromDiscord<geekrelief> In reply to @Life Sucks "i have no idea": Yes,`cIncludeDir([the path to X11 headers])`. If you don't know where they are then how should the nimterop know? 🙂
18:05:57FromDiscord<gerwy> well it should be obviously in PATH or something like this
18:06:17FromDiscord<RattleyCooper> I will also probably need to do more of this type of thing with byte sequences so I'd rather understand what I'm doing so I can continue with my project without having to ask each time I run into it
18:06:20FromDiscord<haxscramper> You can try `cast[seq[uint32]](<seq of uint8>)` but this might just crash instantly↵(@RattleyCooper)
18:06:56FromDiscord<haxscramper> try cast then add/remove from sequence and if it works fine then you might go with this one
18:06:57FromDiscord<gerwy> okay i think i got it
18:07:03FromDiscord<gerwy> `/usr/include/X11/Xlib.h`
18:07:19FromDiscord<gerwy> so if its dir↵i should include `/usr/include/X11` right?
18:07:58FromDiscord<geekrelief> Yeah give it a try. I don't know for sure, just a guess.
18:08:07FromDiscord<RattleyCooper> In reply to @haxscramper "You can try `cast[seq[uint32]](<seq": I'll give it a shot
18:09:11FromDiscord<RattleyCooper> In reply to @haxscramper "try cast then add/remove": It appears to work. Not sure that it results in the correct number but it doesn't crash 😄
18:09:36FromDiscord<RattleyCooper> And I only don't know bc I still don't really know what's going on but it appears to be what I need
18:09:50FromDiscord<gerwy> sent a code paste, see https://play.nim-lang.org/#ix=3DTk
18:09:59*vicfred joined #nim
18:10:02FromDiscord<geekrelief> but you're closer! 🙂
18:10:03FromDiscord<gerwy> but it seems it did something
18:10:33FromDiscord<gerwy> yeah! maybe i should add suffix or something? using cPlugin i guess
18:10:34FromDiscord<geekrelief> Yeah, so nimterop is not magic unfortunately. You might have to override symbols as the documentation sugges.
18:10:37FromDiscord<geekrelief> (edit) "sugges." => "suggests."
18:10:53Amun-RaRattleyCooper: not really
18:12:40FromDiscord<gerwy> but i have no idea how
18:12:46FromDiscord<gerwy> i will maybe look at some examples
18:13:28FromDiscord<geekrelief> here's what my generator file looks like: https://github.com/geekrelief/tm-nim/blob/main/tm_gen.nim
18:13:43FromDiscord<geekrelief> https://github.com/geekrelief/tm-nim/blob/main/tm_gen_override.nim
18:14:25FromDiscord<geekrelief> I learned from this example: https://gist.github.com/geekrelief/4e849477aa0710fe96ca3bbfc64d5725 and reading the docs
18:15:01FromDiscord<geekrelief> Play around with it. It's not an simple process if you want to wrap something big.
18:15:08FromDiscord<geekrelief> (edit) "an" => "a"
18:16:11FromDiscord<gerwy> yeah i will try to do something with this onSymbol proc
18:16:17FromDiscord<hmmm> hey I have a if condition in a for loop, but I want to execute the body of the if only once on the first element that qualifies then the loop should stop, how do I do dat
18:16:45FromDiscord<geekrelief> In reply to @Life Sucks "yeah i will try": Or you can use `cOverride` to fix the one symbol.
18:17:01FromDiscord<geekrelief> That's what I'm doing in `tm_gen_override.nim`
18:17:03FromDiscord<gerwy> we don't know if its not problem for more symbols
18:17:22FromDiscord<gerwy> but i will try
18:17:23FromDiscord<hmmm> maybe break?
18:17:24FromDiscord<geekrelief> yeah you know, so that's why it's better to fix 1 thing that try to fix them all
18:17:33FromDiscord<hmmm> I might be a genius
18:18:27FromDiscord<geekrelief> In reply to @Life Sucks "but i will try": Fix the error directly, then see if more errors pop up before you try to generalize the fix.
18:18:57FromDiscord<gerwy> hmm, the problem is that i have no idea what to override XLookupKeysym with
18:19:09FromDiscord<geekrelief> What's the definition look like?
18:19:14FromDiscord<geekrelief> (edit) "definition" => "definition/declaration"
18:19:20FromDiscord<gerwy> its something from X11 i think↵there is nothing about it in the header
18:19:23FromDiscord<gerwy> just two uses of it
18:19:54FromDiscord<geekrelief> You'll need to find how/where it's declared.
18:20:16FromDiscord<geekrelief> ohh
18:20:17FromDiscord<gerwy> found X11/keysym.h maybe thats it
18:20:21FromDiscord<geekrelief> I see the error is a case issue.
18:20:32FromDiscord<gerwy> oh
18:20:33FromDiscord<geekrelief> yeah cPlugin is the way to go
18:20:54FromDiscord<geekrelief> `XLookupKeysym` vs `XLookupKeySym`
18:21:04FromDiscord<geekrelief> so you'll need to rename one of them in `onSymbol`
18:21:56FromDiscord<geekrelief> one step closer 🙂
18:23:11FromDiscord<geekrelief> @gerwy geez can we read the errors please? j/k lol I gotta get back to my stuff. good luck!
18:23:22FromDiscord<geekrelief> (edit) "@gerwy ... geez" added ""
18:24:14FromDiscord<gerwy> i will try to override it and tell what the results are if i will do it correctly byee and thanks for the help
18:30:57FromDiscord<gerwy> hah well, its not the only error i see
18:31:06FromDiscord<gerwy> sent a code paste, see https://play.nim-lang.org/#ix=
18:31:09FromDiscord<gerwy> i need a break
18:35:37FromDiscord<geekrelief> In reply to @Life Sucks "hah well, its not": I'd imagine that wouldn't be the only instance of it.
18:35:55FromDiscord<gerwy> nah it was me calling `sys` instead of `sym`
18:36:37FromDiscord<geekrelief> if there's only one instance you can use `cOverride` to override it. The generated file should have something in regarding what it came across.
18:38:42FromDiscord<gerwy> sent a code paste, see https://play.nim-lang.org/#ix=3DTw
18:38:42FromDiscord<gerwy> thats the current one i get
18:42:05FromDiscord<gerwy> there are too many duplicates for me to override them manually
18:45:31FromDiscord<qb> In reply to @qb "Trying to take a": My bad. Pixie uses normalized rgb values. https://play.nim-lang.org/#ix=3DTD
18:59:18FromDiscord<that_dude> I want to use proc to locate and return a custom object in a seq so I can, by modifying the returned object, also change the original. How would I do that? Anything I seem to do returns a copy that wont save any changes. I did find a way to do it with ptr and addr, but I thought that is frowned upon
19:03:16FromDiscord<enthus1ast> There is a nim project called 'nsu' which can do this↵(@qb)
19:03:17FromDiscord<leorize> you might want a `ref` object then
19:03:32FromDiscord<leorize> alternatively return `var T`↵(@that_dude)
19:03:43FromDiscord<qb> In reply to @enthus1ast "There is a nim": Yea I got that as a reference. It's not up 2 date. My code works
19:04:09FromDiscord<enthus1ast> @qb\: 👌
19:05:04FromDiscord<enthus1ast> I've forked it and patched it a little, but iirc only the windows side
19:07:07FromDiscord<that_dude> In my definition, I am using `T = object`, How would I return var T? I keep getting `got <type var Error Type>`
19:07:20FromDiscord<that_dude> (edit) "`T" => "`type T"
19:08:41FromDiscord<enthus1ast> @that_dude\: that sounds strange
19:08:55FromDiscord<that_dude> Like what do I put after the `:` in the first proc definition line, and what goes after the return?
19:09:07FromDiscord<enthus1ast> Code?
19:11:17FromDiscord<enthus1ast> Ah I see, try to make the object a 'ref object'
19:11:35FromDiscord<that_dude> Trying to move it to the playground
19:11:50FromDiscord<enthus1ast> In the typedef
19:11:51FromDiscord<that_dude> Isn't there a high chance that it will cause issues else where?
19:12:15FromDiscord<that_dude> This is the only time I want it to to return a mutable? object
19:13:10FromDiscord<enthus1ast> MH I thinks it's possible to return a var object when the parameter is also var
19:13:37FromDiscord<enthus1ast> But I'm on mobile and can't test
19:15:24FromDiscord<that_dude> https://play.nim-lang.org/#ix=3CGD I think this shows my issue
19:17:18FromDiscord<that_dude> I'm kinda hoping there's an easy change to `var Action_event` and `return var a` to make it work
19:20:20FromDiscord<that_dude> Well `T = ref object` works so I'll use it, I just hope there won't be any issues due to not planning on using the ref originally
19:21:51FromDiscord<that_dude> I guess as a follow up, is there safe alternative to ptr and addr that works in almost the same way? Or is `type T = ref object` the only way?
19:22:01FromDiscord<leorize> @that_dude\: I'm not sure what are you trying to do from that sample
19:22:18FromDiscord<leorize> you're trying to get a mutable view to an array entry, right?
19:22:21FromDiscord<that_dude> yeah
19:28:38FromDiscord<leorize> https://play.nim-lang.org/#ix=3DTM
19:28:39FromDiscord<leorize> ^ is that what you're looking for?
19:34:22FromDiscord<that_dude> While yes, I think I have a similar form but it isn't working for me. I do have in iterator in the proc to find the correct one
19:35:40FromDiscord<that_dude> Also I'm saving the object to a `var` after finding it so I can poke at it to see if it has the info I care about
19:36:38FromDiscord<that_dude> Doesn't `=` do a deep copy be default or something?
19:37:41FromDiscord<leorize> in that case you'd have to use `views`
19:37:48FromDiscord<leorize> which is an experimental feature that doesn't work
19:38:01FromDiscord<leorize> `ref` might be your best bet then
19:39:06FromDiscord<that_dude> Alright, thanks man
19:42:10*krux02 joined #nim
21:34:27*vicfred quit (Quit: Leaving)
21:37:08FromDiscord<tandy> is there a way to copy a seqs content?
21:37:13FromDiscord<tandy> not its reference?
21:38:30FromDiscord<ynfle (ynfle)> `=`
21:38:37FromDiscord<Elegantbeef> `var yourSeq = otherSeq`
21:38:45FromDiscord<Elegantbeef> Seq's copy on assignment
21:38:56FromDiscord<ynfle (ynfle)> `./koch pdf`
21:39:09FromDiscord<ynfle (ynfle)> Is it supposed to work on macos?
21:39:26FromDiscord<tandy> i did this but i think it didnt work
21:39:53FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3DUx
21:39:58FromDiscord<Elegantbeef> Dont you go lying to me that's
21:40:47FromDiscord<Elegantbeef> The only way this will not copy is if you've got `ref seq[T]`
21:40:55FromDiscord<Elegantbeef> But that'd be intentionally done that way
21:42:21FromDiscord<ynfle (ynfle)> https://play.nim-lang.org/#ix=3DUy
21:50:24*Vladar quit (Quit: Leaving)
21:56:10*pch quit (Remote host closed the connection)
21:57:13*pch joined #nim
22:03:38FromDiscord<tandy> youre right, im jus silly
22:03:52FromDiscord<tandy> minmax tictactoe is harder than i thought lol
23:01:27FromDiscord<treeform> In reply to @qb "My bad. Pixie uses": You can use Color (that is floats) or RGBA (that is bytes)
23:01:41FromDiscord<treeform> (edit) "RGBA" => "ColorRGBA"
23:02:00FromDiscord<Elegantbeef> [tandy](https://matrix.to/#/@tandy1000:matrix.org)\: what's minmax tictactoe?
23:32:12FromDiscord<Schelz> how could i get the resolution of a window ?
23:32:37FromDiscord<Schelz> code ex would be great for understanding
23:33:38FromDiscord<Schelz> (edit) removed "for understanding"
23:33:44FromDiscord<Elegantbeef> Depends on OS
23:34:08FromDiscord<Schelz> windows
23:34:53*xet7 quit (Ping timeout: 264 seconds)
23:34:53nrds<Prestige99> Maybe I'm going crazy but, why can't I do this? https://play.nim-lang.org/#ix=3DV5
23:35:57FromDiscord<Elegantbeef> There is `GetWindowInfo` in the windows API and i assume is in winim
23:36:09FromDiscord<Elegantbeef> So if you have a windowID you can call that and get the info
23:36:27FromDiscord<Elegantbeef> `.mitems` prestige
23:36:39FromDiscord<Elegantbeef> Track is an `object` so you need a `mutable` view to it
23:36:50nrds<Prestige99> ah, ty
23:37:14FromDiscord<Schelz> thx im gonna look up
23:38:11FromDiscord<Elegantbeef> I'm not on windows so cannot really give you an example