00:00:11 | * | FromDiscord joined #nim |
00:01:30 | FromDiscord | <Elegantbeef> Given that it inserts destructors at compile time, doesnt it do ref counting there too? |
00:01:43 | FromDiscord | <codic> well, but that is in the compiler |
00:01:48 | FromDiscord | <codic> i was talking about runtime |
00:01:57 | FromDiscord | <codic> also I don't think that's ref counting |
00:02:20 | FromDiscord | <Elegantbeef> I'm probably very wrong since i've never looked at how the GC works |
00:06:31 | FromDiscord | <codic> idk |
00:06:38 | FromDiscord | <leorize> `=copy` for ref increase the count |
00:06:42 | FromDiscord | <codic> don't care too much its fast enough |
00:06:43 | FromDiscord | <leorize> `=destroy` decreases it |
00:06:53 | FromDiscord | <leorize> it's not atomic fwiw |
00:06:53 | FromDiscord | <codic> hmm |
00:06:56 | FromDiscord | <leorize> so it's fast |
00:07:00 | FromDiscord | <codic> but why does it need to ref count in first place? |
00:07:15 | FromDiscord | <codic> for keeping stuff alive if ref is held to it? |
00:07:20 | FromDiscord | <treeform> multiple things can point to the same object |
00:07:22 | FromDiscord | <treeform> yeah |
00:07:23 | FromDiscord | <leorize> yea |
00:08:03 | FromDiscord | <codic> but what if your code never does that? then will the compiler optimize it away? |
00:08:32 | FromDiscord | <Elegantbeef> you dont ref count non references 😀 |
00:09:08 | FromDiscord | <leorize> ref here means the `ref` keyword in nim |
00:09:32 | FromDiscord | <codic> ahh I see |
00:09:59 | FromDiscord | <codic> ok, so my cleanup is all destructors if I don't maintain any smart references |
00:10:00 | FromDiscord | <codic> very chad |
00:10:08 | FromDiscord | <codic> 👍 |
00:11:35 | FromDiscord | <ynfle (ynfle)> @codic you can `--expandArc:<function>` name with the `nim` compiler to see the destructors for a function |
00:12:30 | FromDiscord | <codic> yeah, I was asking about where ref counting is used though |
00:12:41 | FromDiscord | <codic> i know destructors are at end of scope |
00:14:06 | FromDiscord | <treeform> desctuctors are called when object is freed, when all references are now 0 |
00:17:28 | FromDiscord | <treeform> @codic https://gist.github.com/treeform/6a0da202c5a763b941ec055f37b95517 |
00:17:41 | FromDiscord | <treeform> Sorry correction ref counts lives -8 from where the ref pointer points. |
00:17:53 | FromDiscord | <treeform> and you got to shift it a bit to get the correct integer value |
00:19:03 | FromDiscord | <codic> cool, thanks for writing that |
00:19:06 | FromDiscord | <codic> 1 sec |
00:19:22 | FromDiscord | <codic> that is cool though |
00:19:35 | FromDiscord | <codic> (edit) "that is cool though ... " added "that address of ref count is not stored anywhere but just instead offset from addr" |
00:19:45 | FromDiscord | <treeform> its still stored there |
00:19:49 | FromDiscord | <treeform> but is kind of cheating |
00:20:37 | FromDiscord | <codic> sent a code paste, see https://play.nim-lang.org/#ix=3DMk |
00:20:41 | FromDiscord | <codic> (edit) "https://play.nim-lang.org/#ix=3DMk" => "https://paste.rs/XFL" |
00:21:09 | FromDiscord | <treeform> you welcome |
00:38:09 | * | krux02 quit (Remote host closed the connection) |
01:05:43 | FromDiscord | <demotomohiro> `p3[] shr 3` is number of pointers - 1. So what is in least significant 3 bits? |
01:11:51 | FromDiscord | <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:11 | FromDiscord | <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:01 | FromDiscord | <leorize> of course not \:p |
05:13:46 | * | kayabaNerve_ quit (Quit: Leaving) |
05:21:34 | FromDiscord | <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:47 | FromDiscord | <treeform> cache line size is CPU dependent |
05:21:55 | FromDiscord | <treeform> so you just got to see if it fits for you |
05:22:20 | FromDiscord | <treeform> cache line is usually 64 bytes |
05:31:26 | FromDiscord | <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:43 | FromDiscord | <Elegantbeef> they're all oddly aliased |
05:35:26 | FromDiscord | <Elegantbeef> `type(10)` == `typeof(10)` `proc doThing(a: typedesc)` == `proc doThing(a: type)` |
05:36:31 | FromDiscord | <Elegantbeef> typeof and typedesc are "proper" |
05:54:41 | NimEventer | New thread by Jorjun_arch: The language with the most leverage wins, see https://forum.nim-lang.org/t/8585 |
06:00:01 | FromDiscord | <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:02 | FromDiscord | <cabboose> cheers |
06:10:00 | FromDiscord | <treeform> caches are very smart, are you sure you can detect the performance drop? |
06:13:42 | FromDiscord | <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:38 | FromDiscord | <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:45 | FromDiscord | <Rika> If you already do that but still need more speed, probably |
06:37:49 | FromDiscord | <demotomohiro> If cache line size is 64 bytes, 64bytes object type is more efficient than 60 bytes object type? |
06:41:48 | FromDiscord | <Rika> 32s better than 40s I would assume? |
06:44:41 | NimEventer | New Nimble package! animatecss - Easily use Animate.css classes, see https://github.com/thisago/animatecss |
06:46:38 | FromDiscord | <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:55 | FromDiscord | <cabboose> Multithreading though↵(@demotomohiro) |
07:05:57 | FromDiscord | <cabboose> Cache coherency et al |
07:06:09 | FromDiscord | <cabboose> Definitely important |
07:08:43 | NimEventer | New Nimble package! dataUrl - Easily create data urls! CLI included, see https://github.com/thisago/dataUrl |
07:42:52 | NimEventer | New thread by Elmonkey: New here, see https://forum.nim-lang.org/t/8586 |
07:44:35 | * | PMunch joined #nim |
07:46:17 | FromDiscord | <Rika> That’s one terse thread |
07:47:32 | FromDiscord | <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:14 | FromDiscord | <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:21 | FromDiscord | <that_dude> (edit) "tensors" => "tensors?" |
07:48:30 | FromDiscord | <Rika> No support afaik |
07:48:36 | FromDiscord | <Rika> No idea on the alternative |
07:48:43 | FromDiscord | <that_dude> I cry |
07:48:59 | FromDiscord | <Rika> Doing any math in JavaScript is slower than shit anyway |
07:49:35 | FromDiscord | <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:41 | FromDiscord | <Rika> That’s funky |
07:49:56 | FromDiscord | <Rika> Maybe web assembly would be a better alternative to compile to |
07:50:03 | FromDiscord | <that_dude> So super high efficiency isn't the most important right now |
07:50:37 | FromDiscord | <that_dude> But I'm also guessing that arrymancer can't compile to web assembly |
07:51:16 | FromDiscord | <Rika> I feel like you’re right |
07:51:43 | FromDiscord | <Rika> Do you need tensors or just matrices |
07:52:10 | FromDiscord | <Rika> Why do you need custom types in the tensors as well) |
07:52:11 | FromDiscord | <that_dude> I'm making a tetris clone |
07:52:23 | FromDiscord | <that_dude> And using the tensors to hold my data |
07:52:42 | FromDiscord | <Rika> So you only need matrices unless you’re doing funky 3D Tetris or whatever |
07:52:53 | FromDiscord | <that_dude> Sounds right |
07:53:06 | FromDiscord | <haxscramper> Won't seq[seq[]] work just fine? |
07:53:17 | FromDiscord | <Rika> Not even seq of seq |
07:53:24 | FromDiscord | <Rika> Just one and a few helper procs |
07:53:28 | FromDiscord | <haxscramper> Tetris is 2d grid |
07:53:39 | FromDiscord | <haxscramper> Ah, linearly put everything |
07:53:48 | FromDiscord | <Rika> Well I just assumed sir here is being lazy |
07:53:53 | FromDiscord | <that_dude> yeah lol |
07:53:55 | FromDiscord | <Rika> Which is totally fine |
07:54:09 | FromDiscord | <that_dude> I don't want to have to reinvent things if I can just use bug free versions of it |
07:54:36 | FromDiscord | <Rika> I think GLM has something for that I don’t remember I don’t do matrix math on code often enough |
07:54:52 | FromDiscord | <impbox [ftsf]> https://gist.github.com/ftsf/6d0a5eca332bcf2e1513e58bb54af8c0 here's my game grid util |
07:55:25 | FromDiscord | <Rika> Nice |
07:55:35 | FromDiscord | <impbox [ftsf]> hmm i've probably got a better newer version somewhere... |
07:55:40 | PMunch | Using arraymancer for a Tetris clone seems like quite overkill |
07:56:12 | FromDiscord | <Rika> It is but we clarified it’s just laziness |
07:56:24 | FromDiscord | <impbox [ftsf]> https://github.com/ftsf/nico/blob/main/nico/grids.nim ahh this version is better |
07:56:26 | FromDiscord | <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:31 | FromDiscord | <impbox [ftsf]> i forgot i added it to nico |
07:56:50 | FromDiscord | <Rika> In reply to @that_dude "True, but I have": Refactor once you get to that point 😛 |
07:56:56 | FromDiscord | <that_dude> Yep |
07:57:07 | FromDiscord | <Rika> Otherwise you’ll be stuck in future proofing hell like I am in some projects |
07:57:43 | FromDiscord | <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:13 | FromDiscord | <that_dude> But It has most of the features I want done or easily ready to be implemented. |
07:58:51 | FromDiscord | <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:15 | FromDiscord | <cabboose> Jesus can’t a new person asking for advice get something more than a link to the documentation? |
08:00:37 | FromDiscord | <cabboose> If my 10 attempts at signing up to the forum would have worked id respond myself lol |
08:00:42 | FromDiscord | <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:19 | FromDiscord | <Rika> Caboose what would you have said |
08:04:38 | FromDiscord | <cabboose> sent a long message, see http://ix.io/3DOy |
08:06:10 | FromDiscord | <cabboose> Anything like that would be better than a single link response from a user with a moderator shield =.= |
08:09:12 | FromDiscord | <enthus1ast> yeah i just replied |
08:11:27 | FromDiscord | <enthus1ast> im not sure if `since` brings any value, maybe one can enligthen me |
08:14:38 | FromDiscord | <Elegantbeef> Backported code? |
08:15:35 | FromDiscord | <Elegantbeef> That doesnt make sense i guess |
08:29:53 | FromDiscord | <enthus1ast> i could understand when i could write it like a case statement where each's nim version implementation is in block |
08:30:55 | FromDiscord | <enthus1ast> and also, why not use git for this? |
08:32:34 | FromDiscord | <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:57 | FromDiscord | <dom96> I think this is unlikely for most people joining the Nim community |
08:33:19 | FromDiscord | <dom96> And from what I can see the book really doesn’t talk about who it’s intended for |
08:34:02 | FromDiscord | <haxscramper> The book is good as a general source of learning nim as well |
08:34:28 | FromDiscord | <haxscramper> The fact it starts with more fundamental things and then goes to OOP, macros, generics etc. does not change anything really |
08:38:34 | FromDiscord | <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:06 | FromDiscord | <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:30 | FromDiscord | <haxscramper> you can skip sections you know?\> |
08:39:53 | FromDiscord | <haxscramper> just start with part you find interesting, the book is free so it is not like you pay for unnecessary information |
08:45:10 | FromDiscord | <cabboose> I actually found the book to be a fantastic resource even for good foundations |
08:45:53 | FromDiscord | <cabboose> As it stands, that book provides the most thorough descriptions about the workings of nim |
08:47:28 | FromDiscord | <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:03 | FromDiscord | <cabboose> I think bringing attention to me simply linking a resource as an issue to be a systematic problem. |
08:51:32 | FromDiscord | <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:10 | FromDiscord | <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:41 | FromDiscord | <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:51 | FromDiscord | <impbox [ftsf]> community is hard =( hugs |
08:59:15 | FromDiscord | <Kiloneie> When i first joined Nim by example was very nice |
09:03:18 | FromDiscord | <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:22 | FromDiscord | <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:46 | FromDiscord | <Araq> yeah and you need to read them all |
09:17:58 | FromDiscord | <haxscramper> Well, I don't see anything fundamentally wrong there except for some personal tension |
09:18:03 | PMunch | @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:13 | FromDiscord | <haxscramper> I didn't scrutinize ever single line of every single comment on every single issue though |
09:24:22 | FromDiscord | <cabboose> sent a long message, see http://ix.io/3DOS |
09:29:02 | FromDiscord | <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:26 | FromDiscord | <dom96> You found him to be kind? What about when he was rude to Kiloneie? Was that kind too? |
09:29:46 | FromDiscord | <cabboose> I have not seen that. |
09:29:58 | FromDiscord | <cabboose> As I said, I have found him to be a kind person. |
09:30:22 | FromDiscord | <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:47 | FromDiscord | <cabboose> His book does not have any negative connotations around it. |
09:31:03 | FromDiscord | <Elegantbeef> You do realize you're defending a person that explicitly stated anti-gypsy views dom? 😀 |
09:31:15 | FromDiscord | <hugogranstrom> Mentioning Nim in Action stirs up the Disruptek shit as well? 🤭 |
09:31:32 | FromDiscord | <dom96> In reply to @hugogranstrom.nim "Mentioning Nim in Action": who? |
09:31:42 | FromDiscord | <Elegantbeef> Kilo |
09:31:47 | FromDiscord | <cabboose> Well, I didn't want to bring that point into it |
09:31:55 | FromDiscord | <cabboose> which is why I'm not trying to turn this into a person bashing war |
09:32:00 | FromDiscord | <cabboose> I never did |
09:32:02 | FromDiscord | <hugogranstrom> 🏜️ |
09:32:06 | FromDiscord | <cabboose> and it is very disheartening that this is what is coming out |
09:32:31 | FromDiscord | <dom96> @ElegantBeef oh? Where did this happen? Maybe I have some reading to do as well |
09:32:41 | FromDiscord | <Elegantbeef> It was in #offtopic |
09:32:46 | FromDiscord | <dom96> And the more important question: did Kiloneie apologise when called out on it? |
09:32:52 | FromDiscord | <dom96> Remember: Stefan still has not |
09:32:52 | FromDiscord | <Elegantbeef> Nope |
09:33:05 | FromDiscord | <dom96> and you all are happy to defend and deflect |
09:33:10 | FromDiscord | <dom96> That's not cool |
09:33:20 | FromDiscord | <saem> What the actual fuck? |
09:33:20 | FromDiscord | <Elegantbeef> I'm not deflecting i've got no horse in this race |
09:33:23 | FromDiscord | <haxscramper> god damn, someone just linked a book |
09:33:25 | FromDiscord | <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:37 | FromDiscord | <haxscramper> now we are back to this crap about kilo |
09:33:42 | FromDiscord | <haxscramper> who asked?↵(@dom96) |
09:33:53 | FromDiscord | <Elegantbeef> The conversation is on the linking of media, and giving a more welcoming message to newbies |
09:33:57 | FromDiscord | <saem> Sometime spread hate and you're standng on ceremony, |
09:34:11 | FromDiscord | <haxscramper> was this discussion about a book or we are having 101 on how to drop down to personal insults?↵(@dom96) |
09:34:16 | FromDiscord | <saem> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/905389327649996801): Someone is spreading hate and you're standing on ceremony, |
09:34:24 | FromDiscord | <Elegantbeef> From what i've read stefans book is fine and this is 100% just pointless fueding |
09:35:07 | FromDiscord | <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:24 | FromDiscord | <dom96> especially when I find it hard to believe the person saying they are kind is unaware of this discussion |
09:35:30 | FromDiscord | <haxscramper> yeah, sure one person had a positive experience |
09:35:37 | FromDiscord | <haxscramper> now time to throw shit at them |
09:35:38 | FromDiscord | <haxscramper> so nice |
09:35:53 | FromDiscord | <haxscramper> cabboose\: found stefan be a good person |
09:35:54 | PMunch | Who'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:06 | FromDiscord | <Rika> What happened to separation of the creator and the work |
09:36:08 | FromDiscord | <haxscramper> quick, we need to bring up old crap |
09:36:10 | FromDiscord | <Elegantbeef> I think it's you pmunch |
09:36:20 | FromDiscord | <dom96> In reply to @Rika "What happened to separation": good point |
09:36:22 | FromDiscord | <haxscramper> to put more dirt |
09:36:30 | PMunch | @Elegantbeef, shit.. |
09:36:50 | FromDiscord | <Kiloneie> Can we all relax please, this will not lead anywhere good. |
09:36:52 | PMunch | Fuck you @Elegantbeef! |
09:36:53 | FromDiscord | <Rika> If the work has the same issues of the creator then it should matter IMO |
09:37:06 | PMunch | Phew, dodged a bullet there, who's the nicest person now? |
09:37:14 | FromDiscord | <Elegantbeef> I am a little busy right now pmunch maybe next week? |
09:37:20 | PMunch | Haha :P |
09:37:21 | FromDiscord | <haxscramper> well, the work does not have any "same issue" except for couple line note about not documenting async |
09:37:24 | FromDiscord | <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:38 | FromDiscord | <haxscramper> That is brought up as an act of treason against whole nim community |
09:37:42 | FromDiscord | <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:50 | FromDiscord | <haxscramper> what |
09:37:51 | FromDiscord | <dom96> when you were yourself concerned about the discussion I had with Gumber |
09:37:55 | FromDiscord | <haxscramper> the |
09:37:56 | FromDiscord | <haxscramper> fuck |
09:37:56 | FromDiscord | <haxscramper> holy shit |
09:38:01 | FromDiscord | <haxscramper> the book is good |
09:38:04 | FromDiscord | <haxscramper> is it wrong to link it? |
09:38:08 | FromDiscord | <dom96> hax, can you stop with the holy shits please? 🙂 |
09:38:12 | FromDiscord | <dom96> it just raises the temperature |
09:38:18 | FromDiscord | <dom96> there is no need for it |
09:38:21 | FromDiscord | <haxscramper> oh no, dom suspects stefan of somewhat unethica behavior |
09:38:32 | FromDiscord | <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:36 | FromDiscord | <dom96> well, you're misunderstanding me |
09:38:39 | FromDiscord | <haxscramper> now we need to label any link of stefan's work as suspicious |
09:38:40 | FromDiscord | <cabboose> I have long since been promoting Stefans book |
09:38:40 | FromDiscord | <dom96> I'm not suspecting Stefan |
09:38:41 | FromDiscord | <cabboose> as I found it to be an excellent resource |
09:38:55 | FromDiscord | <dom96> then I apologise for being suspicious |
09:39:24 | FromDiscord | <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:25 | FromDiscord | <haxscramper> well, you said he was rude↵(@dom96) |
09:39:28 | FromDiscord | <haxscramper> I don't mean "suspect", I mean that you said stefan was rude to kilonete |
09:39:38 | FromDiscord | <dom96> Yeah, because he was. |
09:39:53 | FromDiscord | <Elegantbeef> He criticised a publication |
09:39:55 | PMunch | I 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:57 | FromDiscord | <Elegantbeef> He didnt attack kilo as a person |
09:40:02 | FromDiscord | <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:04 | FromDiscord | <Elegantbeef> That's not rude that's critcism of art |
09:40:11 | FromDiscord | <dom96> PMunch: I agree as well. |
09:40:15 | FromDiscord | <haxscramper> is it not possible for a person to make a good book then? |
09:40:29 | FromDiscord | <haxscramper> what about separation of the person and their work |
09:40:39 | FromDiscord | <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:40 | FromDiscord | <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:47 | PMunch | @Elegantbeef, while he did criticise the video it was done in a pretty harsh tone.. |
09:40:57 | FromDiscord | <dom96> Yep ^ |
09:41:00 | FromDiscord | <hugogranstrom> In reply to @dom96 "But I think it's": Disagree |
09:41:08 | FromDiscord | <dom96> In reply to @hugogranstrom.nim "Disagree": care to elaborate? 🙂 |
09:41:14 | PMunch | Not picking sides here, just pointing out that it's not the fact that he criticised the video which is the concern |
09:41:15 | FromDiscord | <dom96> his book is aimed at kids |
09:41:15 | FromDiscord | <haxscramper> I don't think so, the book is good as a general resource for learning nim↵(@dom96) |
09:41:43 | FromDiscord | <haxscramper> Considering you are have not read it even, this is a very strange thing to say↵(@dom96) |
09:41:51 | FromDiscord | <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:02 | FromDiscord | <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:31 | FromDiscord | <dom96> I am basing what I say on what I read Stefan speaking about his book |
09:42:38 | FromDiscord | <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:56 | FromDiscord | <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:57 | FromDiscord | <haxscramper> The fact it targeted on kids does not mean it never goes into anything advanced |
09:42:59 | FromDiscord | <dom96> And also as somebody that has written a book I know it's important to keep target audiences in mind |
09:43:02 | FromDiscord | <Elegantbeef> Man he really killed kilo here |
09:43:17 | FromDiscord | <dom96> it's not about advanced or not, it's about how much you explain |
09:43:24 | FromDiscord | <dom96> over-explaining is a sure fire way to make people give up |
09:43:26 | FromDiscord | <Elegantbeef> Like yes it's harsh but it's also constructive criticism it's not just "you're shit kid git gud" |
09:43:38 | FromDiscord | <cabboose> I am flabbergasted by this.↵(@dom96) |
09:43:47 | FromDiscord | <dom96> Why? |
09:44:09 | FromDiscord | <haxscramper> have you read the book? "over-explaining" os so subjective |
09:44:10 | PMunch | @Elegantbeef, oh for sure, the criticism itself is actually pretty good |
09:44:17 | FromDiscord | <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:21 | FromDiscord | <haxscramper> for a person with no experience in let's say macros |
09:44:29 | FromDiscord | <haxscramper> what would be the correct level of detail? |
09:44:38 | FromDiscord | <haxscramper> someone comes from java and they meet nim macros |
09:44:57 | FromDiscord | <haxscramper> they are like kids at this stage really - no understanding of the domain. So you'd better explain things thoroughly |
09:45:06 | FromDiscord | <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:12 | FromDiscord | <haxscramper> everyone as a beginner at some level of programming stuff |
09:45:17 | FromDiscord | <Araq> seriously... |
09:45:29 | FromDiscord | <haxscramper> yeah, sure, four-line note on the end of the book is the worst offense there is↵(@Araq) |
09:45:32 | FromDiscord | <dom96> haxscramper: programmers don't usually meet macros, so yes, they should be explained thoroughly |
09:45:39 | FromDiscord | <dom96> most programmers on the other hand know about if statements etc |
09:45:45 | FromDiscord | <dom96> so they can be explained in less detail |
09:45:53 | PMunch | @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:53 | FromDiscord | <cabboose> Is that actually what this is all about?↵(@Araq) |
09:46:05 | FromDiscord | <dom96> A target audience of "knows at least one other language" is several orders of magnitude different to "is a kid" |
09:46:19 | PMunch | Had to find something a bit more up-tempo in order to feel like I was going anywhere |
09:46:25 | FromDiscord | <dom96> like... how is this even controversial? lol |
09:46:51 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3DPb |
09:47:01 | FromDiscord | <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:03 | FromDiscord | <haxscramper> cabboose\: thinks the same for example |
09:47:13 | FromDiscord | <haxscramper> @hugogranstrom\: |
09:47:14 | FromDiscord | <haxscramper> and some other people |
09:47:35 | FromDiscord | <haxscramper> you haven't even read the book and yet claim it is not a good idea to link this book |
09:47:52 | PMunch | Everyone 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:52 | FromDiscord | <dom96> In reply to @hugogranstrom.nim "And yet both a": yes, they are both valuable. |
09:47:53 | FromDiscord | <haxscramper> what is wrong with linking it? |
09:47:53 | FromDiscord | <saem> What's controversial is the deflecting that isn't investigating potential hate speech.↵(@dom96) |
09:48:04 | FromDiscord | <Rika> I feel like you are all just having some sort of miscommunication issue |
09:48:05 | FromDiscord | <dom96> In reply to @saem "What's controversial is the": I'm waiting for logs |
09:48:17 | FromDiscord | <dom96> Very happy to have a look |
09:48:24 | FromDiscord | <dom96> or for other mods who dealt with the issue to comment |
09:48:25 | FromDiscord | <cabboose> Yes; why wasn't this the first response from dom and Araq?↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
09:48:29 | FromDiscord | <saem> Go search yourself |
09:48:30 | PMunch | Sure 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:37 | FromDiscord | <hugogranstrom> In reply to @dom96 "yes, they are both": Why do we have this discussion then? 🙃 |
09:48:52 | FromDiscord | <haxscramper> because dom started it |
09:48:56 | FromDiscord | <dom96> @hugogranstrom because I think other books/resources are likely to fit people's experiences better |
09:48:58 | FromDiscord | <haxscramper> so we have it |
09:49:00 | FromDiscord | <dom96> most Nim learners aren't kids |
09:49:53 | FromDiscord | <dom96> PMunch: I don't think so |
09:50:03 | FromDiscord | <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:20 | FromDiscord | <dom96> I care a lot. |
09:50:27 | FromDiscord | <dom96> But there is nothing to argue about there |
09:50:27 | FromDiscord | <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:29 | FromDiscord | <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:56 | FromDiscord | <cabboose> I understand if you do; however I THINK you do not. That thought drives my feelings at this time.↵(@dom96) |
09:51:17 | FromDiscord | <cabboose> That thought is driven by the ridiculous situation we have before us. |
09:51:31 | FromDiscord | <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:53 | FromDiscord | <Rika> That’s not what you implied |
09:52:00 | FromDiscord | <Rika> That’s what I thought by miscommunication issue |
09:52:13 | FromDiscord | <haxscramper> and why shouldn't we again, if people find it a good learning resource |
09:52:13 | FromDiscord | <dom96> yeah, there are always miscommunications because we clearly don't trust each other |
09:52:17 | FromDiscord | <dom96> I have very good reason to not |
09:52:18 | FromDiscord | <Rika> Just can’t chat right now, busy |
09:52:22 | FromDiscord | <Rika> But I’m reading and yeah |
09:52:34 | FromDiscord | <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:38 | FromDiscord | <dom96> But I don't want to get into that now |
09:52:57 | FromDiscord | <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:30 | FromDiscord | <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:32 | FromDiscord | <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:46 | FromDiscord | <cabboose> This has certainly been trained in my career, but I think that it has not in yours. |
09:53:50 | FromDiscord | <hugogranstrom> In reply to @cabboose "From what I **think**,": +1 |
09:54:21 | FromDiscord | <dom96> In reply to @cabboose "From what I **think**,": Not at all. |
09:54:47 | FromDiscord | <dom96> I mean objectively I specifically mentioned target audience |
09:55:00 | FromDiscord | <dom96> Haven't mentioned anything about Stefan's personal character when we started this discussion |
09:56:42 | FromDiscord | <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:19 | FromDiscord | <cabboose> Yet no one but the kind enthusiast, kiloneie and impbox have done so.↵(@Rika) |
09:57:50 | FromDiscord | <cabboose> The staff have either provided a cold welcome, or started an argument over the intention to link stefans book. |
09:58:01 | FromDiscord | <cabboose> I am nothing but disappointed and ashamed. |
09:58:15 | FromDiscord | <Araq> good bye |
09:58:30 | FromDiscord | <cabboose> Good bye? \:/ |
09:59:01 | FromDiscord | <Araq> even if you were right (and you're not), you're happy to keep the fire burning, so yes, good bye |
09:59:40 | FromDiscord | <hugogranstrom> Someone makes a criticism. Solution: good bye 🤦♀️ |
10:00:01 | FromDiscord | <Araq> trolls are banned, it's a solution that works rather well |
10:00:14 | FromDiscord | <haxscramper> who is a troll here? |
10:00:30 | FromDiscord | <hugogranstrom> Troll == someone who want a welcoming community? |
10:00:33 | FromDiscord | <haxscramper> > ↵> dom96 banned cabboose↵> |
10:00:34 | FromDiscord | <haxscramper> nice |
10:00:43 | FromDiscord | <hugogranstrom> Sandbox level... |
10:00:44 | FromDiscord | <Rika> I have no desire to continue being in this community |
10:00:52 | PMunch | I mean the issue is not that he wanted a welcoming community |
10:00:54 | FromDiscord | <dom96> Araq asked me to fwiw |
10:01:22 | PMunch | The problem is he was stirring the channel into a fervour (again) |
10:01:31 | FromDiscord | <dom96> yep |
10:01:35 | FromDiscord | <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:45 | FromDiscord | <haxscramper> kilonete's |
10:01:45 | FromDiscord | <dom96> and as you know, bans are (almost) never permanent here |
10:01:46 | FromDiscord | <haxscramper> videos |
10:01:48 | FromDiscord | <dom96> so we can discuss this alter |
10:01:53 | FromDiscord | <dom96> I need to get to my actual work now |
10:02:00 | FromDiscord | <dom96> (edit) "alter" => "later" |
10:02:15 | FromDiscord | <dom96> (or you can discuss with Araq now of course) |
10:02:27 | FromDiscord | <Araq> er, I too have work to do |
10:02:33 | FromDiscord | <haxscramper> like it would go anywhere |
10:02:39 | FromDiscord | <haxscramper> except me being banned as well |
10:02:44 | FromDiscord | <Araq> correct |
10:02:53 | FromDiscord | <haxscramper> for "keeping the fire burning" |
10:02:53 | PMunch | @Rika, that's a shame :( |
10:03:21 | FromDiscord | <enthus1ast> imho banning should only be done for great misbehaving |
10:06:02 | PMunch | I agree |
10:06:36 | FromDiscord | <Araq> alternative we can mute the channel for 20 minutes, not sure if that feature exists |
10:07:04 | FromDiscord | <Rika> You might be able to on discord |
10:07:15 | FromDiscord | <Rika> The bridge interactions may complain |
10:11:57 | FromDiscord | <tandy> kinda sad that the paid comms person is posting `.` on the forum |
10:14:51 | PMunch | Yeah, that's not great.. |
10:14:59 | FromDiscord | <Rika> ? |
10:15:19 | FromDiscord | <hugogranstrom> https://forum.nim-lang.org/t/8586 miran's comment |
10:15:49 | FromDiscord | <xflywind> I guess it should be a `^` |
10:18:13 | FromDiscord | <hugogranstrom> Takes one second to check it a second time, and gives two very different impressions. 🤷♂️ |
10:19:11 | FromDiscord | <hugogranstrom> And if you are paid to post things, I would expect them to re-read their comments before clicking sending |
10:22:52 | FromDiscord | <Araq> I read it and he got the link correct. I don't understand the point |
10:28:49 | FromDiscord | <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:14 | FromDiscord | <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:52 | FromDiscord | <Araq> I think that's a forum bug, it won't render as a link without the dot XD |
10:29:53 | FromDiscord | <tandy> some simple copy & pasted message would work even, doesnt necesarily have to be hand written each time |
10:30:13 | FromDiscord | <Yardanico> yeah, @hugogranstrom about the dot specifically - in this case it's the fault of the forum |
10:30:38 | FromDiscord | <hugogranstrom> lol xD |
10:30:46 | FromDiscord | <Araq> yup, just tried |
10:30:50 | FromDiscord | <Araq> the dot must be there |
10:31:12 | FromDiscord | <hugogranstrom> Fix it then ;P It doesn't give a good impression IMO |
10:31:27 | FromDiscord | <Araq> will try |
10:34:42 | FromDiscord | <narimiran> In reply to @tandy "kinda sad that the": do you know why really the dot is there? |
10:35:07 | FromDiscord | <narimiran> y'all are very quick to jump to (wrong) conclusions |
10:35:58 | FromDiscord | <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:18 | FromDiscord | <hugogranstrom> We are seeing it the same way new people are seeing it then. 🤷♂️ |
10:36:33 | FromDiscord | <hugogranstrom> We nor they know that is the case |
10:37:08 | FromDiscord | <Rika> Even then it still has the connotation of RTFM |
10:37:25 | FromDiscord | <hugogranstrom> In reply to @Rika "Even then it still": True |
10:38:15 | FromDiscord | <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:43 | FromDiscord | <narimiran> ok, next time i'll make sure not to use dot when my message contains just a link. |
10:38:58 | FromDiscord | <narimiran> no more hidden-RTFM |
10:39:12 | FromDiscord | <hugogranstrom> In reply to @narimiran "ok, next time i'll": Does a smiley suffice instead of a dot? 😄 |
10:39:13 | FromDiscord | <Rika> Well I mean it would be better to not just post a link by itself |
10:39:25 | FromDiscord | <Rika> Maybe at least say something like a welcome or whatever |
10:40:04 | FromDiscord | <dom96> I agree that a welcome + some links would be better. And we really need to fix that forum bug 🙂 |
10:40:07 | FromDiscord | <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:51 | FromDiscord | <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:58 | FromDiscord | <narimiran> In reply to @tandy "do you guys really": ....in the reply to the "Trying to learn nim! Any advice?" |
10:42:54 | FromDiscord | <narimiran> https://www.youtube.com/watch?v=VvPaEsuz-tY |
10:43:15 | FromDiscord | <hugogranstrom> In reply to @narimiran "https://www.youtube.com/watch?v=VvPaEsuz-tY": Because it gives a better impression |
10:43:19 | FromDiscord | <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:38 | FromDiscord | <haxscramper> I don't as you to hand-craft page-long response with review of every single resource |
10:43:47 | FromDiscord | <narimiran> thanks for the advice, guys. i'll know better for the next time. |
10:44:08 | FromDiscord | <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:26 | FromDiscord | <hugogranstrom> In reply to @narimiran "thanks for the advice,": That's how a representative should behave! 😃 :nim1: |
10:45:35 | FromDiscord | <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:22 | FromDiscord | <haxscramper> `<insert default rant about nobody knowing hwere nim is aiming>` |
10:48:46 | FromDiscord | <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:14 | FromDiscord | <Rika> In reply to @narimiran "....in the reply to": Well, yes, even if the thread post isn’t exactly great |
11:02:28 | FromDiscord | <Jan81> well well.. lots of things happening here.. |
11:08:59 | FromDiscord | <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:24 | FromDiscord | <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:36 | FromDiscord | <Araq> view types improved quite a lot in 1.6.0 and get more fixes for 1.6.2 |
11:12:59 | PMunch | Having a more official roadmap would indeed be nice |
11:13:13 | PMunch | Maybe something we could put on the web-page? |
11:13:14 | FromDiscord | <Araq> lazy semcheck depends on timothee and he's on holidays and is not scheduled for any particular release |
11:13:46 | FromDiscord | <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:14 | supakeen | objectiveness?! in open source? |
11:14:30 | FromDiscord | <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:40 | FromDiscord | <Araq> it can be a one-shot command line tool then |
11:14:44 | FromDiscord | <tandy> ^ this please↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
11:15:08 | FromDiscord | <haxscramper> I'm mostly talking about what community could expect wrt. to already announced semi-experimental features, not internal implementation details |
11:15:20 | FromDiscord | <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:28 | FromDiscord | <Araq> very easy for editors to ask the compiler then as there is no process management complexity |
11:15:47 | FromDiscord | <tandy> its imposible to know what is currently happening in nim without scouring the repo for commits/ issues / prs |
11:16:43 | FromDiscord | <Araq> sorry, I wasn't aware |
11:17:18 | FromDiscord | <Araq> the problem for me is probably that the plan doesn't change, it feels like a looong way to go though |
11:17:41 | FromDiscord | <Araq> and the slow progress on IC is frustrating |
11:18:03 | PMunch | Having a more stable Nimble experience would be awesome! |
11:18:36 | PMunch | But 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:41 | PMunch | People keep asking for it |
11:18:45 | FromDiscord | <dom96> Having a roadmap would be nice |
11:19:08 | FromDiscord | <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:20 | FromDiscord | <tandy> some method where we can get a response and the core team is held accountable |
11:20:15 | FromDiscord | <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:33 | FromDiscord | <haxscramper> it happened then somehow disappeared suddenly |
11:20:37 | FromDiscord | <haxscramper> it also shifted format |
11:20:41 | FromDiscord | <haxscramper> first one was the best |
11:20:55 | FromDiscord | <haxscramper> last one was about compiler internals, which is a lot more niceh |
11:21:19 | FromDiscord | <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:26 | FromDiscord | <haxscramper> and it was informative for everyone involved |
11:22:06 | FromDiscord | <haxscramper> not only for a handful of people who actually contribute to the compiler, but for everyone |
11:24:49 | FromDiscord | <tandy> if weekly is too often, it could be done less often too |
11:26:06 | FromDiscord | <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:31 | FromDiscord | <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:50 | FromDiscord | <haxscramper> or what is the current state |
11:31:23 | FromDiscord | <tandy> @Araq\: what do you think? |
11:36:19 | FromDiscord | <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:09 | FromDiscord | <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:00 | FromDiscord | <Zajt> it's in the same file |
11:38:29 | FromDiscord | <haxscramper> That is weird |
11:38:58 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3DQb |
11:39:04 | FromDiscord | <haxscramper> like this (rougly) |
11:40:15 | FromDiscord | <xflywind> In reply to @haxscramper "I talked about it": Video meeting is hard for non-native speaker. |
11:40:25 | FromDiscord | <xflywind> (edit) "In reply to @haxscramper "I talked about it": ... Video" added "I agree." |
11:40:31 | FromDiscord | <xflywind> (edit) "Video" => "And video" |
11:40:38 | FromDiscord | <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:05 | FromDiscord | <Araq> @tandy I won't promise I'll be quick about it but we will write it |
11:44:14 | FromDiscord | <Araq> about Nimble, development has been outsourced, wasn't ready for 1.6.0 and I don't know the plan either |
11:44:55 | FromDiscord | <haxscramper> I think at this point I can close #368 |
11:44:57 | FromDiscord | <tandy> thats okay, good to hear theres a plan \:) thanks↵(@Araq) |
11:46:57 | FromDiscord | <haxscramper> 398\ |
11:48:17 | FromDiscord | <tandy> where? |
11:50:26 | FromDiscord | <haxscramper> https://github.com/nim-lang/RFCs/issues/398#issuecomment-958956941 |
11:50:45 | FromDiscord | <haxscramper> so tldr I don't care anymore, if anyone wants to revitalize this, they are welcome |
11:51:17 | FromDiscord | <haxscramper> also just so you know, saem (the guy who maintains vscode extension) just left this chat over this shit |
11:51:30 | FromDiscord | <haxscramper> I don't think he would want me to bring this up, but here you go |
11:51:48 | FromDiscord | <haxscramper> well, not "just", but when you banned cabbose |
11:52:05 | FromDiscord | <dom96> Please don't close #398, lots of great ideas in there |
11:52:18 | FromDiscord | <haxscramper> no, I closed it but said you are free to reopen |
11:52:26 | FromDiscord | <haxscramper> furthermore, I expect you to reopen if you want |
11:52:28 | FromDiscord | <dom96> I don't understand what's the blocker in it though |
11:52:56 | FromDiscord | <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:07 | FromDiscord | <haxscramper> status's actions undermined my resolve in a big way |
11:54:15 | FromDiscord | <dom96> I see :/ |
11:54:25 | FromDiscord | <haxscramper> well, I don't quit on spot |
11:54:31 | FromDiscord | <haxscramper> I just don't have the incentive to push for it so hard |
11:54:50 | FromDiscord | <haxscramper> so you can reopen it just now if you want |
11:58:50 | * | Vladar quit (Quit: Leaving) |
12:00:40 | FromDiscord | <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:12 | FromDiscord | <haxscramper> Because I wouldn't want to dive into the implementation at all |
12:02:18 | FromDiscord | <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:39 | FromDiscord | <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:07 | FromDiscord | <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:00 | FromDiscord | <haxscramper> you can forward-declare everythign |
12:21:48 | FromDiscord | <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:25 | PMunch | Oh yeah, that is also an option |
12:23:37 | PMunch | @Zajt, did you figure out your issue? |
12:23:47 | PMunch | It seems like you drowned a bit in other stuff |
12:30:01 | FromDiscord | <impbox [ftsf]> Yeah code reordering saves me a lot of time |
12:31:12 | FromDiscord | <Zajt> In reply to @PMunch "<@290456415963709440>, did you figure": Nope not yet |
12:32:15 | PMunch | So 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:22 | PMunch | Is the type defined before the proc? |
12:33:11 | FromDiscord | <Zajt> Nope after |
12:33:21 | PMunch | It needs to be before |
12:33:29 | FromDiscord | <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:32 | FromDiscord | <Zajt> (edit) "fiel" => "file" |
12:33:42 | PMunch | Hmm, that sounds strange |
12:34:21 | FromDiscord | <Zajt> So I think the issue is with the type somehow, or the syntax with it |
12:38:00 | PMunch | Then it's hard to help out without looking at the source |
12:39:37 | PMunch | @Zajt, but the type definitely needs to be defined first: https://play.nim-lang.org/#ix=3DQy |
12:39:39 | FromDiscord | <evoalg> what is code reordering? |
12:39:58 | PMunch | It tries to reorder your code into something that allows Nim to parse it |
12:40:24 | FromDiscord | <haxscramper> `{.experimental: "codeReordering".}` |
12:40:24 | PMunch | For example proc1 which calls proc2 is going to be moved to below proc2 |
12:43:25 | FromDiscord | <lenis> In reply to @haxscramper "you can forward-declare everythign": what do you mean |
12:43:54 | FromDiscord | <impbox [ftsf]> In reply to @haxscramper "you can forward-declare everythign": Pretty sure I couldn't forward declare an iterator |
12:43:59 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3DQA |
12:44:04 | FromDiscord | <Benjamin> The docs look pretty good for this feature with several examples\: https://nim-lang.org/docs/manual_experimental.html#code-reordering |
12:44:17 | FromDiscord | <haxscramper> `proc1()` is a "high-level" procedure, so if you want to put down highest-level fist |
12:44:35 | FromDiscord | <haxscramper> and then increase granularity, that's what this feature is for |
12:45:03 | FromDiscord | <haxscramper> though I don't understand this feature at all |
12:45:15 | FromDiscord | <haxscramper> I would just read code from bottom to top if it was structured this way |
12:48:16 | FromDiscord | <el__maco> you want the details first and high level code at the bottom? |
12:48:55 | FromDiscord | <Rika> personally thats how i read |
12:49:14 | PMunch | I read diagonally from the bottom right to the top left |
12:49:18 | FromDiscord | <haxscramper> Yes, I'm used to this way of writing from basically every compiled language |
12:49:19 | FromDiscord | <el__maco> to me that makes no sense, but each to their own I guess |
12:49:36 | FromDiscord | <haxscramper> And also I don't want global implicit transforms in the code |
12:52:06 | FromDiscord | <Rika> i mean yeah its prolly to do with how we think |
12:52:21 | FromDiscord | <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:54 | FromDiscord | <lenis> so with high level at the top you write the files top to bottom which is more natural |
12:52:55 | FromDiscord | <haxscramper> I write types first |
12:52:55 | FromDiscord | <haxscramper> And I put them on toplevel as well |
12:53:00 | FromDiscord | <lenis> and you also get to read the code top to bottom which is even more important |
12:53:03 | FromDiscord | <Solitude> i write types and lower level procs first |
12:53:16 | FromDiscord | <Solitude> and you dont read source files like a fucking book, you search throught them |
12:53:35 | FromDiscord | <lenis> you never search through books? |
12:53:38 | FromDiscord | <haxscramper> well, a lot of times you just read |
12:53:51 | FromDiscord | <haxscramper> At least I read a lot of times |
12:53:57 | FromDiscord | <Solitude> In reply to @lenis "you never search through": how is that related |
12:54:44 | FromDiscord | <haxscramper> For example some GH project - it is easier to just open it, look through modules just to see the general architecture |
12:55:02 | FromDiscord | <haxscramper> Than to clone, or just around in different tabs/files searching |
12:55:09 | FromDiscord | <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:22 | FromDiscord | <lenis> so, imports, then types, then exported procs then implementation procs |
12:55:33 | FromDiscord | <Rika> In reply to @lenis "for me it makes": i conceptualise high -> low but i write low -> high |
12:55:47 | FromDiscord | <Solitude> In reply to @lenis "anyway, the way i": and how is that different from just having it reversed? |
12:56:05 | FromDiscord | <lenis> you mean imports and types at the bottom? |
12:56:12 | FromDiscord | <Rika> are we arguing about anything |
12:56:18 | FromDiscord | <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:22 | FromDiscord | <Rika> if not then what are we talking about exactly |
12:56:22 | FromDiscord | <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:32 | FromDiscord | <Solitude> wow |
12:56:44 | FromDiscord | <lenis> and you read the procs top to bottom but the proc definitions bottom to top which doesnt make sense |
12:57:19 | FromDiscord | <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:57 | FromDiscord | <Rika> whatever, i shouldnt argue about this |
12:58:00 | FromDiscord | <Rika> nothing to argue about |
12:58:49 | FromDiscord | <lenis> lol |
12:59:27 | FromDiscord | <lenis> thanks for the tip about the codeReordering feature. works great |
13:00:46 | FromDiscord | <el__maco> yea I love it. It works with variables and types too |
13:01:49 | FromDiscord | <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:01 | FromDiscord | <lenis> I've been defining all types in one statement so that hasn't been an issue anyway |
13:03:08 | FromDiscord | <lenis> but it's nice for the rest |
13:05:37 | FromDiscord | <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:44 | FromDiscord | <Rika> indeed |
13:07:39 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix= |
13:07:43 | FromDiscord | <haxscramper> no code |
13:07:45 | FromDiscord | <haxscramper> most readable code |
13:08:01 | FromDiscord | <haxscramper> I don't find any code readable really, even stuff I wrote myself |
13:08:08 | FromDiscord | <haxscramper> I mean I have to think through it |
13:50:24 | * | Vladar joined #nim |
13:58:17 | FromDiscord | <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:29 | nrds | <Prestige99> What do you mean empty list? you just want elements [1] to the last? |
14:03:40 | FromDiscord | <Rika> basically if list.len <= 1, tail will return empty list, otherwise it will return tail |
14:04:02 | FromDiscord | <Rika> no i dont think one exists |
14:05:25 | nrds | <Prestige99> ah I see. Would be very easy to write a template I would think |
14:19:00 | FromDiscord | <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:39 | nrds | <Prestige99> Need to specify the information about the tuple |
14:25:20 | nrds | <Prestige99> I think if you did something like Table[string, tuple[name: string, age: int]] it would work |
14:26:02 | FromDiscord | <evoalg> ohhh I see what you mean - thanks I'll have a play! |
14:33:23 | FromDiscord | <evoalg> it works! |
14:33:42 | nrds | <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:33 | FromDiscord | <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:54 | FromDiscord | <gerwy> at least the name `XWindowAttributes` sounds very like it is from X11 |
15:40:57 | nrds | <Prestige99> It is - what is the problem you're having? |
15:41:21 | FromDiscord | <gerwy> sent a code paste, see https://play.nim-lang.org/#ix=3DSa |
15:41:39 | FromDiscord | <gerwy> In reply to @nrds "<Prestige> It is -": whenever i compile it always shows↵`Error: undeclared identifier: 'XWindowAttributes'` |
15:42:13 | FromDiscord | <gerwy> and here is link to the library i want to make wrapper for↵https://github.com/cntools/rawdraw |
15:43:24 | FromDiscord | <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:30 | FromDiscord | <gerwy> sent a code paste, see https://play.nim-lang.org/#ix=3DSc |
15:51:54 | FromDiscord | <gerwy> and importing made wrapper still results in million `undefined reference to` lol |
15:52:44 | nrds | <Prestige99> Hm I don't know much about nimterop |
16:00:25 | FromDiscord | <gerwy> Its very cool but there is not enough examples... and the ones that are there doesn't really help much |
16:00:59 | FromDiscord | <gerwy> anyone with big experience on nimterop? |
16:04:33 | FromDiscord | <haxscramper> https://irclogs.nim-lang.org/27-11-2018.html#16:26:11 there is a table with some wrapped libraries |
16:04:48 | FromDiscord | <haxscramper> Maybe you find more examples there |
16:07:30 | FromDiscord | <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:03 | NimEventer | New thread by Vsajip: Printing a typedesc - compilation errors, see https://forum.nim-lang.org/t/8589 |
17:20:52 | FromDiscord | <hmmm> an imported module will execute any toplevel instruction before the main module is loaded, right? |
17:22:54 | FromDiscord | <Rika> yes |
17:23:13 | FromDiscord | <hmmm> 😦 |
17:23:17 | FromDiscord | <hmmm> I didn't know |
17:23:28 | FromDiscord | <hmmm> spent 1 hour looking for a bug it wasn't there |
17:23:34 | FromDiscord | <hmmm> rika give me back my 1 hour |
17:23:55 | FromDiscord | <Rika> you didnt ask one hour ago |
17:24:27 | FromDiscord | <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:32 | FromDiscord | <hmmm> 😦 |
17:26:00 | FromDiscord | <haxscramper> > hexxy↵sigh |
17:26:10 | FromDiscord | <hmmm> him! |
17:26:19 | FromDiscord | <Rika> haxboi |
17:26:22 | FromDiscord | <haxscramper> anyway, I just never put any executable code at toplevel so I didn't recall this |
17:26:52 | FromDiscord | <haxscramper> and I prefer my name typed somewhat legibly, at least for the sake of pings on matrix |
17:27:23 | FromDiscord | <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:29 | FromDiscord | <haxscramper> I have some additional patterns like "scramper" etc., but it is still hard to notice |
17:28:13 | FromDiscord | <haxscramper> you mean how to handle wrong floats? |
17:28:24 | FromDiscord | <IsaacPaul> lmboo |
17:28:25 | FromDiscord | <Rika> also |
17:28:37 | FromDiscord | <Rika> when you do put code outside an imported module |
17:28:42 | FromDiscord | <Rika> what happens when it is imported twice |
17:28:47 | FromDiscord | <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:59 | FromDiscord | <Rika> like main -> a and main -> b -> a |
17:30:17 | * | Guest3657 joined #nim |
17:31:30 | FromDiscord | <hmmm> wot, there is people out there that import circular modules? how they live with themselves |
17:32:15 | FromDiscord | <haxscramper> hm, what exactly is this?↵(@Rika) |
17:32:27 | FromDiscord | <haxscramper> Like `{.define.}`? |
17:32:42 | FromDiscord | <Rika> sorry, i mean s/outside/at the top level of/ |
17:33:46 | Amun-Ra | hmmm: combine them into one |
17:34:19 | FromDiscord | <haxscramper> and module might check for defines |
17:34:19 | FromDiscord | <haxscramper> Don't remember exact syntax |
17:34:24 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3DT4 |
17:35:29 | Amun-Ra | you can also do user switchable defines, ie: const foo {.booldefine.} = true |
17:35:49 | * | stkrdknmibalz joined #nim |
17:37:27 | FromDiscord | <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:00 | FromDiscord | <geekrelief> In reply to @Life Sucks "anyone with big experience": I'm using a custom nimterop to wrap The Machinery. |
17:38:19 | Amun-Ra | I make wrappers w/o nimterop |
17:38:20 | FromDiscord | <haxscramper> yesterday I forgot I had a todo list for a spec tests |
17:38:24 | FromDiscord | <haxscramper> sent a long message, see http://ix.io/3DT6 |
17:38:39 | FromDiscord | <geekrelief> https://github.com/geekrelief/nimterop |
17:39:37 | FromDiscord | <geekrelief> In reply to @Amun-Ra "I make wrappers w/o": What kind of stuff are yo wrapping? |
17:41:36 | Amun-Ra | geekrelief: various libraries for my own use: ncurses, slang, aalib, libcaca, sdl2 (they're not 1:1 wrappers, I export only "safe" types) |
17:43:03 | FromDiscord | <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:40 | FromDiscord | <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:03 | FromDiscord | <gerwy> im getting tired of fixing all of this, i will just use c++ if i need to |
17:45:07 | FromDiscord | <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:16 | FromDiscord | <geekrelief> In reply to @Life Sucks "cool, can you look": where's the nim file? |
17:45:34 | FromDiscord | <gerwy> which one? raw.nim? in the same dir as the rawdraw header |
17:45:59 | FromDiscord | <geekrelief> link? |
17:46:19 | FromDiscord | <geekrelief> it's hard to help without exactly what you're doing. |
17:46:23 | FromDiscord | <geekrelief> (edit) "it's hard to help without ... exactly" added "seeing" |
17:46:36 | FromDiscord | <geekrelief> On top of that I'm not on linux. |
17:46:56 | FromDiscord | <geekrelief> I'm not even sure it's an issue with nimterop you're having. |
17:47:06 | FromDiscord | <geekrelief> Seems like you're missing some header. |
17:47:14 | FromDiscord | <geekrelief> (edit) "header." => "header, based on the error message." |
17:48:23 | FromDiscord | <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:20 | FromDiscord | <gerwy> sent a long message, see http://ix.io/3DTe |
17:50:46 | FromDiscord | <gerwy> its dynamically linked thats why its getting problems probably i really don't know |
17:50:51 | FromDiscord | <gerwy> and im too tired to fix it |
17:51:25 | FromDiscord | <RattleyCooper> how would I turn a `seq[uint8]` with 4-byte length into a `uint32`? |
17:52:11 | Amun-Ra | see endians module |
17:52:29 | FromDiscord | <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:55 | Amun-Ra | combobox? |
17:53:04 | FromDiscord | <hmmm> you might be a genius |
17:53:06 | FromDiscord | <hmmm> wait I check |
17:53:13 | Amun-Ra | I actually am |
17:53:33 | FromDiscord | <RattleyCooper> In reply to @Amun-Ra "see endians module": I've never used pointers. I feel like imma break something |
17:56:19 | FromDiscord | <RattleyCooper> So second question, how would I use endians module to turn a `seq[uint8]` into a `uint32`? |
17:56:27 | Amun-Ra | RattleyCooper: I'd do it that way https://play.nim-lang.org/#ix=3DTf |
17:57:15 | FromDiscord | <RattleyCooper> Can someone point me to something I can read so I understand what I'm doing? |
17:57:51 | FromDiscord | <hmmm> Amun ra you are the egytian god of the day, take this 👑 |
17:58:13 | Amun-Ra | hmmm: that's one of my perks, yes ;) |
17:59:48 | FromDiscord | <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:29 | FromDiscord | <gerwy> In reply to @geekrelief "Just a guess, but": how should i add it? just `cIncludeDir([place where X11 are])` ?? |
18:03:43 | FromDiscord | <gerwy> i have no idea where they are lmao, i guess i will look for them |
18:05:19 | FromDiscord | <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:31 | FromDiscord | <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:57 | FromDiscord | <gerwy> well it should be obviously in PATH or something like this |
18:06:17 | FromDiscord | <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:20 | FromDiscord | <haxscramper> You can try `cast[seq[uint32]](<seq of uint8>)` but this might just crash instantly↵(@RattleyCooper) |
18:06:56 | FromDiscord | <haxscramper> try cast then add/remove from sequence and if it works fine then you might go with this one |
18:06:57 | FromDiscord | <gerwy> okay i think i got it |
18:07:03 | FromDiscord | <gerwy> `/usr/include/X11/Xlib.h` |
18:07:19 | FromDiscord | <gerwy> so if its dir↵i should include `/usr/include/X11` right? |
18:07:58 | FromDiscord | <geekrelief> Yeah give it a try. I don't know for sure, just a guess. |
18:08:07 | FromDiscord | <RattleyCooper> In reply to @haxscramper "You can try `cast[seq[uint32]](<seq": I'll give it a shot |
18:09:11 | FromDiscord | <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:36 | FromDiscord | <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:50 | FromDiscord | <gerwy> sent a code paste, see https://play.nim-lang.org/#ix=3DTk |
18:09:59 | * | vicfred joined #nim |
18:10:02 | FromDiscord | <geekrelief> but you're closer! 🙂 |
18:10:03 | FromDiscord | <gerwy> but it seems it did something |
18:10:33 | FromDiscord | <gerwy> yeah! maybe i should add suffix or something? using cPlugin i guess |
18:10:34 | FromDiscord | <geekrelief> Yeah, so nimterop is not magic unfortunately. You might have to override symbols as the documentation sugges. |
18:10:37 | FromDiscord | <geekrelief> (edit) "sugges." => "suggests." |
18:10:53 | Amun-Ra | RattleyCooper: not really |
18:12:40 | FromDiscord | <gerwy> but i have no idea how |
18:12:46 | FromDiscord | <gerwy> i will maybe look at some examples |
18:13:28 | FromDiscord | <geekrelief> here's what my generator file looks like: https://github.com/geekrelief/tm-nim/blob/main/tm_gen.nim |
18:13:43 | FromDiscord | <geekrelief> https://github.com/geekrelief/tm-nim/blob/main/tm_gen_override.nim |
18:14:25 | FromDiscord | <geekrelief> I learned from this example: https://gist.github.com/geekrelief/4e849477aa0710fe96ca3bbfc64d5725 and reading the docs |
18:15:01 | FromDiscord | <geekrelief> Play around with it. It's not an simple process if you want to wrap something big. |
18:15:08 | FromDiscord | <geekrelief> (edit) "an" => "a" |
18:16:11 | FromDiscord | <gerwy> yeah i will try to do something with this onSymbol proc |
18:16:17 | FromDiscord | <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:45 | FromDiscord | <geekrelief> In reply to @Life Sucks "yeah i will try": Or you can use `cOverride` to fix the one symbol. |
18:17:01 | FromDiscord | <geekrelief> That's what I'm doing in `tm_gen_override.nim` |
18:17:03 | FromDiscord | <gerwy> we don't know if its not problem for more symbols |
18:17:22 | FromDiscord | <gerwy> but i will try |
18:17:23 | FromDiscord | <hmmm> maybe break? |
18:17:24 | FromDiscord | <geekrelief> yeah you know, so that's why it's better to fix 1 thing that try to fix them all |
18:17:33 | FromDiscord | <hmmm> I might be a genius |
18:18:27 | FromDiscord | <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:57 | FromDiscord | <gerwy> hmm, the problem is that i have no idea what to override XLookupKeysym with |
18:19:09 | FromDiscord | <geekrelief> What's the definition look like? |
18:19:14 | FromDiscord | <geekrelief> (edit) "definition" => "definition/declaration" |
18:19:20 | FromDiscord | <gerwy> its something from X11 i think↵there is nothing about it in the header |
18:19:23 | FromDiscord | <gerwy> just two uses of it |
18:19:54 | FromDiscord | <geekrelief> You'll need to find how/where it's declared. |
18:20:16 | FromDiscord | <geekrelief> ohh |
18:20:17 | FromDiscord | <gerwy> found X11/keysym.h maybe thats it |
18:20:21 | FromDiscord | <geekrelief> I see the error is a case issue. |
18:20:32 | FromDiscord | <gerwy> oh |
18:20:33 | FromDiscord | <geekrelief> yeah cPlugin is the way to go |
18:20:54 | FromDiscord | <geekrelief> `XLookupKeysym` vs `XLookupKeySym` |
18:21:04 | FromDiscord | <geekrelief> so you'll need to rename one of them in `onSymbol` |
18:21:56 | FromDiscord | <geekrelief> one step closer 🙂 |
18:23:11 | FromDiscord | <geekrelief> @gerwy geez can we read the errors please? j/k lol I gotta get back to my stuff. good luck! |
18:23:22 | FromDiscord | <geekrelief> (edit) "@gerwy ... geez" added "" |
18:24:14 | FromDiscord | <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:57 | FromDiscord | <gerwy> hah well, its not the only error i see |
18:31:06 | FromDiscord | <gerwy> sent a code paste, see https://play.nim-lang.org/#ix= |
18:31:09 | FromDiscord | <gerwy> i need a break |
18:35:37 | FromDiscord | <geekrelief> In reply to @Life Sucks "hah well, its not": I'd imagine that wouldn't be the only instance of it. |
18:35:55 | FromDiscord | <gerwy> nah it was me calling `sys` instead of `sym` |
18:36:37 | FromDiscord | <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:42 | FromDiscord | <gerwy> sent a code paste, see https://play.nim-lang.org/#ix=3DTw |
18:38:42 | FromDiscord | <gerwy> thats the current one i get |
18:42:05 | FromDiscord | <gerwy> there are too many duplicates for me to override them manually |
18:45:31 | FromDiscord | <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:18 | FromDiscord | <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:16 | FromDiscord | <enthus1ast> There is a nim project called 'nsu' which can do this↵(@qb) |
19:03:17 | FromDiscord | <leorize> you might want a `ref` object then |
19:03:32 | FromDiscord | <leorize> alternatively return `var T`↵(@that_dude) |
19:03:43 | FromDiscord | <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:09 | FromDiscord | <enthus1ast> @qb\: 👌 |
19:05:04 | FromDiscord | <enthus1ast> I've forked it and patched it a little, but iirc only the windows side |
19:07:07 | FromDiscord | <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:20 | FromDiscord | <that_dude> (edit) "`T" => "`type T" |
19:08:41 | FromDiscord | <enthus1ast> @that_dude\: that sounds strange |
19:08:55 | FromDiscord | <that_dude> Like what do I put after the `:` in the first proc definition line, and what goes after the return? |
19:09:07 | FromDiscord | <enthus1ast> Code? |
19:11:17 | FromDiscord | <enthus1ast> Ah I see, try to make the object a 'ref object' |
19:11:35 | FromDiscord | <that_dude> Trying to move it to the playground |
19:11:50 | FromDiscord | <enthus1ast> In the typedef |
19:11:51 | FromDiscord | <that_dude> Isn't there a high chance that it will cause issues else where? |
19:12:15 | FromDiscord | <that_dude> This is the only time I want it to to return a mutable? object |
19:13:10 | FromDiscord | <enthus1ast> MH I thinks it's possible to return a var object when the parameter is also var |
19:13:37 | FromDiscord | <enthus1ast> But I'm on mobile and can't test |
19:15:24 | FromDiscord | <that_dude> https://play.nim-lang.org/#ix=3CGD I think this shows my issue |
19:17:18 | FromDiscord | <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:20 | FromDiscord | <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:51 | FromDiscord | <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:01 | FromDiscord | <leorize> @that_dude\: I'm not sure what are you trying to do from that sample |
19:22:18 | FromDiscord | <leorize> you're trying to get a mutable view to an array entry, right? |
19:22:21 | FromDiscord | <that_dude> yeah |
19:28:38 | FromDiscord | <leorize> https://play.nim-lang.org/#ix=3DTM |
19:28:39 | FromDiscord | <leorize> ^ is that what you're looking for? |
19:34:22 | FromDiscord | <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:40 | FromDiscord | <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:38 | FromDiscord | <that_dude> Doesn't `=` do a deep copy be default or something? |
19:37:41 | FromDiscord | <leorize> in that case you'd have to use `views` |
19:37:48 | FromDiscord | <leorize> which is an experimental feature that doesn't work |
19:38:01 | FromDiscord | <leorize> `ref` might be your best bet then |
19:39:06 | FromDiscord | <that_dude> Alright, thanks man |
19:42:10 | * | krux02 joined #nim |
21:34:27 | * | vicfred quit (Quit: Leaving) |
21:37:08 | FromDiscord | <tandy> is there a way to copy a seqs content? |
21:37:13 | FromDiscord | <tandy> not its reference? |
21:38:30 | FromDiscord | <ynfle (ynfle)> `=` |
21:38:37 | FromDiscord | <Elegantbeef> `var yourSeq = otherSeq` |
21:38:45 | FromDiscord | <Elegantbeef> Seq's copy on assignment |
21:38:56 | FromDiscord | <ynfle (ynfle)> `./koch pdf` |
21:39:09 | FromDiscord | <ynfle (ynfle)> Is it supposed to work on macos? |
21:39:26 | FromDiscord | <tandy> i did this but i think it didnt work |
21:39:53 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=3DUx |
21:39:58 | FromDiscord | <Elegantbeef> Dont you go lying to me that's |
21:40:47 | FromDiscord | <Elegantbeef> The only way this will not copy is if you've got `ref seq[T]` |
21:40:55 | FromDiscord | <Elegantbeef> But that'd be intentionally done that way |
21:42:21 | FromDiscord | <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:38 | FromDiscord | <tandy> youre right, im jus silly |
22:03:52 | FromDiscord | <tandy> minmax tictactoe is harder than i thought lol |
23:01:27 | FromDiscord | <treeform> In reply to @qb "My bad. Pixie uses": You can use Color (that is floats) or RGBA (that is bytes) |
23:01:41 | FromDiscord | <treeform> (edit) "RGBA" => "ColorRGBA" |
23:02:00 | FromDiscord | <Elegantbeef> [tandy](https://matrix.to/#/@tandy1000:matrix.org)\: what's minmax tictactoe? |
23:32:12 | FromDiscord | <Schelz> how could i get the resolution of a window ? |
23:32:37 | FromDiscord | <Schelz> code ex would be great for understanding |
23:33:38 | FromDiscord | <Schelz> (edit) removed "for understanding" |
23:33:44 | FromDiscord | <Elegantbeef> Depends on OS |
23:34:08 | FromDiscord | <Schelz> windows |
23:34:53 | * | xet7 quit (Ping timeout: 264 seconds) |
23:34:53 | nrds | <Prestige99> Maybe I'm going crazy but, why can't I do this? https://play.nim-lang.org/#ix=3DV5 |
23:35:57 | FromDiscord | <Elegantbeef> There is `GetWindowInfo` in the windows API and i assume is in winim |
23:36:09 | FromDiscord | <Elegantbeef> So if you have a windowID you can call that and get the info |
23:36:27 | FromDiscord | <Elegantbeef> `.mitems` prestige |
23:36:39 | FromDiscord | <Elegantbeef> Track is an `object` so you need a `mutable` view to it |
23:36:50 | nrds | <Prestige99> ah, ty |
23:37:14 | FromDiscord | <Schelz> thx im gonna look up |
23:38:11 | FromDiscord | <Elegantbeef> I'm not on windows so cannot really give you an example |