00:02:01 | dom96 | as a side note, it really sucks that this sort of thing is being merged #13394 |
00:02:03 | disbot | https://github.com/nim-lang/Nim/pull/13394 -- 6Fix to asynchttpserver form data/body broken with #13147 |
00:10:28 | dom96 | also, I'm really skeptical about this NimVersion >= (1,1) stuff |
00:11:38 | * | Trustable quit (Remote host closed the connection) |
00:19:40 | FromDiscord | <clyybber> dom96: Its for backwards compatibilty |
00:19:58 | FromDiscord | <clyybber> The thing you showed special care for IIRC |
00:20:10 | FromDiscord | <clyybber> The thing you showed specialdesire for IIRC |
00:20:33 | FromDiscord | <clyybber> dom96: Btw, do you rebuild nim-forum once in a while? |
00:20:36 | dom96 | clyybber: hah, yes, I did. But that's not for backwards compatibility, that's for emulating a stdlib that's old |
00:20:43 | dom96 | which makes no sense to me |
00:20:51 | dom96 | Why not just use Nim 1.0 for that? |
00:21:00 | dom96 | if 1.1 really breaks something for you? (Which it shouldn't) |
00:21:31 | FromDiscord | <clyybber> Hmm |
00:21:38 | FromDiscord | <clyybber> dunno |
00:21:42 | dom96 | lol |
00:22:07 | dom96 | I might be missing something |
00:22:10 | FromDiscord | <clyybber> so about the nim-forum thing, I was wondering, because the 1.0 pr got merged |
00:22:13 | dom96 | but if not then this is really a waste of time |
00:22:25 | dom96 | no, I don't rebuild the forum unless there is a new feature |
00:22:28 | FromDiscord | <clyybber> dom96: I think its to ease transition to newer versions |
00:22:32 | FromDiscord | <clyybber> like 1.X |
00:22:42 | FromDiscord | <clyybber> dom96: Ah okay |
00:23:12 | FromGitter | <Varriount> dom96: new language features? |
00:23:21 | FromGitter | <Varriount> Compiler improvements? |
00:25:33 | dom96 | Varriount: I'm complaining because it's used for new stdlib features |
00:25:38 | dom96 | and changes |
00:25:41 | dom96 | this cannot scale IMO |
00:25:53 | dom96 | if you want to gate some new language feature then fine |
00:26:11 | dom96 | but otherwise we'll be maintaining dozens of different implementations of asynchttpserver |
00:26:34 | dom96 | having so much code duplication is super convoluted |
00:28:45 | FromGitter | <Varriount> You make a good point |
00:30:22 | FromGitter | <Varriount> dom96: perhaps moving implementations to separate files would help? |
00:30:53 | FromGitter | <Varriount> Or copying the entire standard library to a version folder |
00:33:06 | * | krux02_ joined #nim |
00:35:27 | * | krux02 quit (Ping timeout: 240 seconds) |
00:46:02 | * | abm quit (Ping timeout: 240 seconds) |
00:48:31 | * | ftsf joined #nim |
01:00:43 | * | NimBot joined #nim |
01:25:27 | * | tribly joined #nim |
01:56:32 | * | rockcavera joined #nim |
02:02:23 | disruptek | no, the idea is to be able to build code that may rely upon different versions of the stdlib... using the same compiler. |
02:02:51 | disruptek | this is useful because software can outlive the stdlib. |
02:04:01 | disruptek | it's hard to make things like incremental compilation work otherwise. |
02:12:18 | * | krux02_ quit (Remote host closed the connection) |
02:21:55 | * | chemist69 quit (Ping timeout: 272 seconds) |
02:23:40 | * | chemist69 joined #nim |
02:25:37 | FromDiscord | <Elegant Beef> So for my ECS the components clearly shouldnt be normal nim objects, but i assume should be made from macros, any suggestions on how to handle this |
02:25:57 | disruptek | why do you say this? |
02:26:13 | FromDiscord | <Elegant Beef> Well since procs arent inherited you cant override the base methods |
02:26:17 | FromDiscord | <Elegant Beef> Well since procs arent inherited you cant override the base procs |
02:27:08 | FromDiscord | <clyybber> @Elegant Beef WDYM? |
02:27:14 | disruptek | procs can call their super procs. |
02:27:23 | FromDiscord | <clyybber> I thought you were doing interface? |
02:27:28 | disruptek | er, methods. |
02:27:29 | FromDiscord | <clyybber> like storing the proc as a field |
02:27:30 | FromDiscord | <Elegant Beef> Interface was for a different project |
02:27:33 | FromDiscord | <clyybber> ah |
02:27:39 | * | dadada quit (Ping timeout: 260 seconds) |
02:27:43 | disruptek | make it simple. |
02:27:46 | disruptek | make it work. |
02:27:50 | FromDiscord | <Elegant Beef> well i mean you have the Component.update |
02:28:07 | FromDiscord | <Elegant Beef> now let's say we have a SinWaveFollower.update |
02:28:09 | FromDiscord | <clyybber> @Elegant Beef So you want to add inheritance to the ECS? |
02:28:20 | FromDiscord | <Elegant Beef> Well for components for basic calls |
02:28:33 | FromDiscord | <Elegant Beef> onCreated,update,onDestroy |
02:28:46 | FromDiscord | <clyybber> Ah, you want them overwritable? |
02:28:50 | FromDiscord | <Elegant Beef> Yea |
02:28:52 | FromDiscord | <clyybber> Just make a very generic one |
02:29:05 | FromDiscord | <clyybber> And then you can overload it |
02:29:11 | FromDiscord | <clyybber> by being "tighter" |
02:29:16 | FromDiscord | <clyybber> or do you need runtime dispatch? |
02:29:24 | FromDiscord | <Elegant Beef> runtime dispatch? |
02:29:30 | FromDiscord | <clyybber> aight |
02:29:35 | FromDiscord | <clyybber> then store it |
02:29:38 | disruptek | inheritance uses runtime dispatch. |
02:29:43 | FromDiscord | <Elegant Beef> That was a question of what? |
02:29:53 | FromDiscord | <clyybber> store it as a field |
02:30:10 | FromDiscord | <clyybber> I would |
02:30:12 | FromDiscord | <Elegant Beef> ah so manually point it to a proc that takes the same component |
02:30:39 | FromDiscord | <Elegant Beef> that seems ok |
02:30:49 | disruptek | your factory can do that. |
02:30:55 | FromDiscord | <Elegant Beef> in the constructor set the onCreate,update, and onDestroy method |
02:30:56 | FromDiscord | <Elegant Beef> in the constructor set the onCreate,update, and onDestroy methods |
02:30:59 | FromDiscord | <Elegant Beef> Yea i know that |
02:31:24 | FromDiscord | <Elegant Beef> I have to think differently than im used to here |
02:31:35 | FromDiscord | <Elegant Beef> since in C# there isnt a compile time vs runtime difference |
02:31:43 | FromDiscord | <Elegant Beef> since in C# there isnt realy a compile time vs runtime difference |
02:31:43 | FromDiscord | <clyybber> yeah |
02:31:46 | FromDiscord | <Elegant Beef> since in C# there isnt really a compile time vs runtime difference |
02:31:58 | FromDiscord | <clyybber> @Elegant Beef btw, do you know ss13? |
02:32:12 | FromDiscord | <Elegant Beef> the shitty game written in byond 😄 |
02:32:15 | FromDiscord | <clyybber> yeah |
02:32:16 | FromDiscord | <clyybber> haha |
02:32:18 | FromDiscord | <Elegant Beef> *triggering commencing* |
02:32:23 | FromDiscord | <clyybber> its getting remade with .Net |
02:33:25 | FromDiscord | <clyybber> SS14 |
02:34:41 | FromDiscord | <Elegant Beef> I guess oncreated doesnt make much sense considering having to write your own constructor |
02:35:12 | FromDiscord | <clyybber> Yeah |
02:35:29 | FromDiscord | <clyybber> I also removed that setup proc thing I had in my framegraph |
02:35:43 | disruptek | on-created can include event data. |
02:36:01 | FromDiscord | <clyybber> doesn't make much sense when you can just construct it yourself and then pass to framegraph/ecs/whatever stores something |
02:36:09 | FromDiscord | <clyybber> disruptek: Hmm |
02:36:22 | FromDiscord | <clyybber> Like what? |
02:36:36 | disruptek | whatever caused the object to get created. |
02:36:42 | FromDiscord | <clyybber> Ah |
02:37:03 | disruptek | something more variant than the constructor's inputs. |
02:37:17 | FromDiscord | <clyybber> Sounds not really useful |
02:37:31 | FromDiscord | <clyybber> Where you construct it you know that "event" is happening |
02:37:31 | disruptek | don't write it, then. |
02:37:37 | FromDiscord | <clyybber> yep |
02:37:56 | FromDiscord | <clyybber> disruptek: Btw, are you far north? |
02:38:13 | disruptek | nope. |
02:38:38 | FromDiscord | <clyybber> ah, was wondering how you are always up |
02:38:40 | * | dadada joined #nim |
02:38:51 | disruptek | would being far north help? |
02:38:52 | FromDiscord | <clyybber> its always sunny at <disrupteks home> I guess |
02:39:03 | * | dadada is now known as Guest62904 |
02:39:04 | FromDiscord | <clyybber> disruptek: well during the no night period |
02:39:05 | FromDiscord | <clyybber> I guess |
02:39:34 | disruptek | i'm not sure it works that way for them, but more importantly, how is it that you don't know that? |
02:39:48 | disruptek | you shut off when the sun goes away and turn back on when it reappears? |
02:40:07 | disruptek | you're solar-powered? |
02:40:28 | disruptek | some of us are not, you see. |
02:40:48 | FromDiscord | <clyybber> I mean |
02:41:49 | FromDiscord | <clyybber> cold blooded ppl |
02:41:52 | FromDiscord | <clyybber> you know |
02:41:56 | FromDiscord | <clyybber> we even lay eggs |
02:42:00 | disruptek | fish? |
02:42:09 | FromDiscord | <clyybber> ~clyybber |
02:42:10 | disbot | clyybber: 11[redacted] |
02:42:46 | FromDiscord | <clyybber> disruptek: no no no |
02:42:55 | FromDiscord | <clyybber> proto mammal human |
02:45:34 | FromDiscord | <clyybber> disruptek: Btw, I always wondered, whats xstreamstartup.com ? |
02:45:39 | FromDiscord | <clyybber> was it your startup idea? |
02:49:00 | disruptek | one of many, sure. |
02:49:34 | FromDiscord | <Elegant Beef> hmm getting a type mismatch got <float32>, expecting var Component, float32 |
02:49:37 | FromDiscord | <Elegant Beef> on a |
02:49:41 | FromDiscord | <Elegant Beef> component.update |
02:49:59 | disruptek | bummer. |
02:50:06 | disruptek | i had a feeling it wouldn't work. |
02:50:29 | FromDiscord | <Elegant Beef> lol i have a feeling the issue is a PEBKAC |
02:50:44 | disruptek | assume nothing. |
02:51:21 | disruptek | mostly i'm trying to work out how nigel works. |
02:51:29 | FromDiscord | <Elegant Beef> ` update* : proc(comp : var Component, deltaTime : float32)` |
02:51:31 | FromDiscord | <Elegant Beef> Ugh |
02:51:42 | FromDiscord | <Elegant Beef> how do i use that on the component |
02:51:47 | disruptek | you pass it an event. |
02:51:51 | FromDiscord | <Elegant Beef> yea did that |
02:51:58 | FromDiscord | <Elegant Beef> but actually calling it's not working |
02:52:07 | FromDiscord | <Elegant Beef> `x.update(float32)` |
02:52:09 | disruptek | make sure you're calling it with a mutable component. |
02:52:16 | disruptek | dispatch occurs on mutability. |
02:52:26 | * | Guest62904 quit (Ping timeout: 240 seconds) |
02:52:31 | FromDiscord | <Elegant Beef> issue is a type mismatch |
02:52:43 | disruptek | x.update(42.0) |
02:53:31 | FromDiscord | <Elegant Beef> Here is my lovely proc |
02:53:31 | FromDiscord | <Elegant Beef> https://hastebin.com/bazolebezi.rb |
02:53:43 | FromDiscord | <clyybber> @ElCusanero Yeah its ugly |
02:53:44 | * | dadada_ joined #nim |
02:53:50 | FromDiscord | <clyybber> you do x.update(x, float32) |
02:53:51 | disruptek | why do you people insist on fucking with me right now. |
02:54:06 | disruptek | and you ask me why i drink... |
02:54:14 | disruptek | i drink because you cry! |
02:54:21 | FromDiscord | <clyybber> I |
02:54:25 | FromDiscord | <Elegant Beef> the first param is passed as a var in the proc declaration |
02:54:27 | FromDiscord | <clyybber> IIIIIIIIIIII |
02:54:45 | FromDiscord | <clyybber> @Elegant Beef yes |
02:54:52 | FromDiscord | <clyybber> but since you have it as a field |
02:54:56 | FromDiscord | <Elegant Beef> this makes me feel dumb |
02:54:56 | FromDiscord | <Elegant Beef> https://cdn.discordapp.com/attachments/371759389889003532/678071717423480852/unknown.png |
02:55:03 | FromDiscord | <clyybber> you have to get the field |
02:55:05 | disruptek | you think you'll yield a nil in that iteration? |
02:55:06 | FromDiscord | <clyybber> and then call it |
02:55:08 | FromDiscord | <clyybber> like |
02:55:14 | FromDiscord | <clyybber> x.update(x, float32) |
02:55:18 | FromDiscord | <Elegant Beef> i know that clyybber |
02:55:31 | FromDiscord | <clyybber> oh |
02:55:37 | FromDiscord | <clyybber> I'm like internet explorer |
02:55:46 | FromDiscord | <Elegant Beef> Yea disruptek i will get nils |
02:55:48 | FromDiscord | <clyybber> your x has to be a var |
02:55:56 | disruptek | yes. |
02:56:01 | FromDiscord | <Elegant Beef> uhh |
02:56:22 | FromDiscord | <clyybber> or you make the proc not take a var |
02:56:32 | FromDiscord | <clyybber> if its a ref anyways it doesn't matter |
02:56:33 | disruptek | yield some mutable nils. |
02:56:37 | FromDiscord | <clyybber> unless you want to replace it |
02:56:38 | disruptek | that sounds amazing right now. |
02:56:48 | FromDiscord | <Elegant Beef> Well i may want to change fields on that component |
02:56:51 | disruptek | daddy drinks because you cry. |
02:57:03 | FromDiscord | <clyybber> @Elegant Beef No need for var then I think |
02:57:16 | FromDiscord | <clyybber> because var means being able to modifiy the ref |
02:57:20 | FromDiscord | <clyybber> not the thing it points to |
02:57:25 | FromDiscord | <clyybber> which you can anyways |
02:57:28 | FromDiscord | <clyybber> I *think* |
02:57:37 | FromDiscord | <Elegant Beef> Well i had issues before without using var on entity |
02:57:54 | FromDiscord | <Elegant Beef> That was when the type was = object iirc |
02:57:55 | FromDiscord | <Elegant Beef> idk |
02:57:56 | FromDiscord | <clyybber> well you cant reassign it |
02:58:05 | FromDiscord | <clyybber> @Elegant Beef yeah |
02:58:07 | FromDiscord | <clyybber> makes sense |
02:58:08 | FromDiscord | <Elegant Beef> well i mean adding values to it's entity |
02:58:15 | FromDiscord | <clyybber> semantics change when using ref |
02:58:19 | FromDiscord | <clyybber> ref is an indirection |
02:58:27 | FromDiscord | <clyybber> so to change contents you don't need var |
02:58:29 | FromDiscord | <Elegant Beef> Yea, seems like there are a lot of instance going around |
02:58:34 | FromDiscord | <Elegant Beef> with object |
02:58:38 | FromDiscord | <Elegant Beef> which is just weird to me |
02:58:41 | FromDiscord | <clyybber> object is on stack |
02:58:43 | FromDiscord | <clyybber> so |
02:58:55 | FromDiscord | <clyybber> it just gets copied |
02:59:03 | FromDiscord | <Elegant Beef> Ah it's a proper datatype value |
02:59:03 | FromDiscord | <clyybber> when you assign |
02:59:09 | FromDiscord | <Elegant Beef> an actual struct |
02:59:10 | FromDiscord | <clyybber> its a struct |
02:59:12 | FromDiscord | <clyybber> yeah |
02:59:13 | FromDiscord | <Elegant Beef> where as ref is more of an object |
02:59:18 | FromDiscord | <clyybber> yeah |
02:59:21 | FromDiscord | <Elegant Beef> ok |
02:59:25 | FromDiscord | <Elegant Beef> cause it's a reference to the memory |
02:59:28 | disruptek | uhh, nah. |
02:59:32 | disruptek | yes. |
02:59:37 | disruptek | it's more of a managed pointer. |
02:59:43 | FromDiscord | <Elegant Beef> same shit to me 😄 |
02:59:44 | FromDiscord | <clyybber> its a pointer to a struct |
02:59:47 | FromDiscord | <clyybber> bascially |
02:59:51 | disruptek | i think they call them managed in c#. |
03:00:05 | FromDiscord | <Elegant Beef> Pointers to me are things used to point on white boards not in memory |
03:00:16 | FromDiscord | <clyybber> lol |
03:00:41 | FromDiscord | <Elegant Beef> Ok so in theory since these are all proper references i should be able to remove all my vars infront of entity |
03:00:42 | FromDiscord | <Elegant Beef> cool |
03:00:48 | FromDiscord | <Elegant Beef> will have to try it after this |
03:01:05 | FromDiscord | <clyybber> yote |
03:01:26 | disruptek | i doubt it. |
03:02:58 | FromDiscord | <Elegant Beef> Also for the nil thing, for my entities and components im using sequences and replacing with nil when removed so i dont have to worry about indicies on the components and entities getting ruined |
03:03:28 | disruptek | uhh |
03:03:46 | FromDiscord | <Elegant Beef> so i basically get dynamically size arrays that i can remove objects from and not have them shrink |
03:04:22 | disruptek | what's the value of indices that hold nil values? |
03:04:33 | FromDiscord | <Elegant Beef> On removal i readd those indicies back to the queue, and if i create a new object it pulls from the queue |
03:04:35 | disruptek | to me, the only possible answer is `nil`. |
03:04:43 | FromDiscord | <clyybber> my faith is nil |
03:04:52 | disruptek | oh, it's an object pool. |
03:04:56 | FromDiscord | <clyybber> I believe that even jesus has a way to kill |
03:04:59 | FromDiscord | <Elegant Beef> yes |
03:05:07 | disruptek | okay, that makes more sense. |
03:05:36 | FromDiscord | <Elegant Beef> If i didnt do this since sequences resize to their data the ints would go outta range |
03:05:38 | disruptek | it still sounds strange to me, though. |
03:05:47 | FromDiscord | <clyybber> its *optimal* |
03:06:09 | FromDiscord | <Elegant Beef> you store an int on the entity/component of it's index in the ECS, and on the entity respectively |
03:06:29 | FromDiscord | <Elegant Beef> then you can use that for anything you want, whilst not losing reference to the other objects on destruction |
03:06:35 | FromDiscord | <Elegant Beef> then you can use that for anything you want, whilst not losing reference to the other objects on destruction of others |
03:06:42 | disruptek | to me it's only optimal if you never have holes in your ranges. |
03:06:42 | FromDiscord | <Elegant Beef> then you can use that for anything you want, whilst not losing reference to the other objects on destruction of other entities |
03:06:49 | FromDiscord | <Elegant Beef> What? |
03:07:02 | FromDiscord | <Elegant Beef> The whole point is to reuse indicies when entities are destroyed |
03:07:08 | FromDiscord | <Elegant Beef> if you need a new index you extend the sequence |
03:07:19 | disruptek | a linked list is also easily extended. |
03:07:27 | * | dadada_ quit (Ping timeout: 265 seconds) |
03:07:51 | FromDiscord | <Elegant Beef> so with 10 objects, say you remove 9, you have 1 active index, then you spawnn 11, it starts at the first index that was destroyed and works it's way back up |
03:07:55 | FromDiscord | <Elegant Beef> so with 10 objects, say you remove 9, you have 1 active index, then you spawn 11, it starts at the first index that was destroyed and works it's way back up |
03:08:06 | FromDiscord | <Elegant Beef> eventually it'll grab a new index outside of the original 10 |
03:08:10 | FromDiscord | <Elegant Beef> idk seems fine to me |
03:08:17 | FromDiscord | <Elegant Beef> but havent tested it in any proper scenario |
03:08:20 | FromDiscord | <Elegant Beef> cause i cant really 😄 |
03:08:39 | * | dadada_ joined #nim |
03:08:39 | FromDiscord | <Elegant Beef> no graphics means no proper testing 😦 |
03:08:49 | FromDiscord | <clyybber> disruptek: A linked list is not a good idea here |
03:09:24 | disruptek | i understand the concept of how the use of your ecs makes a linked list more challenging. |
03:09:49 | FromDiscord | <Elegant Beef> i'd really like a dynamic array, which i may look at making after but this will have to do |
03:09:50 | disruptek | but you can't make a statement like, "it's optimal" and not get an immediate example of another design that is more efficient. |
03:10:11 | FromDiscord | <Elegant Beef> basically internallizing all of the logic i did |
03:10:26 | FromDiscord | <Elegant Beef> so then you just go, add this object and it does all this |
03:10:37 | FromDiscord | <clyybber> disruptek: But its not more efficient |
03:10:40 | FromDiscord | <clyybber> have a seq |
03:10:50 | FromDiscord | <clyybber> if you don't use an element anymore |
03:10:55 | FromDiscord | <clyybber> add it to the queue |
03:11:07 | disruptek | i understand how it works. cripes. |
03:11:07 | FromDiscord | <clyybber> so it will get preferred in id assignment |
03:11:12 | disruptek | please stop trying to explain it. |
03:11:20 | FromDiscord | <clyybber> sorry |
03:11:39 | disruptek | it all depends upon what you're trying to do. |
03:11:51 | FromDiscord | <clyybber> I guess a doubly linked list could work |
03:12:01 | FromDiscord | <clyybber> but linked lists are getting less relevant these days |
03:12:12 | disruptek | nested sets, materialized path, a proper graph... |
03:12:23 | FromDiscord | <clyybber> I mean performance wise |
03:12:38 | FromDiscord | <clyybber> pointer indirections are getting worse |
03:12:41 | FromDiscord | <clyybber> relativley speaking |
03:13:06 | disruptek | well, they suck. but sometimes they are the right solution. |
03:13:21 | disruptek | it comes down to the semantics that you need to achieve. |
03:13:27 | FromDiscord | <clyybber> yeah |
03:13:49 | FromDiscord | <clyybber> disruptek: are you working on nigel? |
03:13:54 | disruptek | yeah. |
03:14:03 | FromDiscord | <clyybber> its repo is so barren |
03:14:11 | FromDiscord | <clyybber> it screams for a git push |
03:14:15 | FromDiscord | <clyybber> :p |
03:14:17 | disruptek | well i'm still building toys and stuff. |
03:14:31 | FromDiscord | <clyybber> for nigel |
03:15:22 | disruptek | oooh ooooh |
03:15:55 | FromDiscord | <clyybber> now its stuck in my head |
03:15:59 | FromDiscord | <clyybber> and I wanted to sleep |
03:16:31 | disruptek | i hear the nouvelle vagues version all the time but i can only think of the primus cover. |
03:17:39 | disruptek | you're a pianist, right? |
03:17:52 | FromDiscord | <clyybber> yeah, how you figured? |
03:18:30 | disruptek | i think you said something about playing a piano piece, so i put two and two together. |
03:18:37 | FromDiscord | <clyybber> ah |
03:19:10 | FromDiscord | <clyybber> that oooh |
03:19:18 | FromDiscord | <clyybber> in the primus cover |
03:19:21 | FromDiscord | <clyybber> reminds me of https://www.youtube.com/watch?v=6f78_Tf4Tdk |
03:20:43 | disruptek | i can see how. |
03:20:58 | disruptek | anyway, isn't it like 4a where you are? |
03:21:04 | disruptek | go to bed. |
03:21:09 | FromDiscord | <clyybber> yeah |
03:21:24 | FromDiscord | <clyybber> music gettin me all pumped up |
03:21:30 | FromDiscord | <clyybber> I think imma go for a run |
03:21:40 | FromDiscord | <clyybber> see ya |
03:21:44 | FromDiscord | <clyybber> good nite |
03:21:47 | disruptek | peace |
03:22:55 | * | dadada_ quit (Ping timeout: 265 seconds) |
03:23:34 | * | dadada_ joined #nim |
03:29:22 | FromDiscord | <Elegant Beef> Yay a functioning component! |
03:29:23 | FromDiscord | <Elegant Beef> https://cdn.discordapp.com/attachments/371759389889003532/678080385334378496/unknown.png |
03:29:56 | FromDiscord | <Elegant Beef> And it's actually not ugly |
03:29:56 | FromDiscord | <Elegant Beef> https://hastebin.com/otokocadey.cs |
03:32:03 | * | muffindrake quit (Ping timeout: 246 seconds) |
03:34:31 | * | muffindrake joined #nim |
03:37:55 | * | dadada_ quit (Ping timeout: 272 seconds) |
03:38:39 | * | dadada joined #nim |
03:39:02 | * | dadada is now known as Guest49256 |
03:53:07 | * | Guest49256 quit (Ping timeout: 272 seconds) |
03:53:38 | * | dadada_ joined #nim |
04:07:03 | * | dadada_ quit (Ping timeout: 260 seconds) |
04:08:48 | * | dadada_ joined #nim |
04:22:55 | * | dadada_ quit (Ping timeout: 260 seconds) |
04:23:44 | * | dadada_ joined #nim |
04:37:50 | * | dadada_ quit (Ping timeout: 265 seconds) |
04:38:44 | * | dadada joined #nim |
04:39:07 | * | dadada is now known as Guest34374 |
04:44:49 | FromDiscord | <ejstembler> Anyone know how to use `db_postgres` with `sslmode=require`? |
04:46:06 | * | sz0 joined #nim |
04:46:40 | FromGitter | <ejstembler_gitlab> Anyone know how to use `db_postgres` with `sslmode=require`? |
04:47:38 | * | LER0ever joined #nim |
04:52:49 | * | Guest34374 quit (Ping timeout: 265 seconds) |
04:53:43 | * | dadada_ joined #nim |
05:00:45 | FromGitter | <Varriount> @ejstembler_gitlab Put it as part of the connection string? |
05:07:43 | * | dadada_ quit (Ping timeout: 260 seconds) |
05:08:15 | FromGitter | <ejstembler_gitlab> @Varriount Does Oh, I didn't relalize there was a second way to use open with the connection string and blank preceeding parameters. Thanks! I received a new error now, though I'm one step closer. `Error: unhandled exception: sslmode value "require" invalid when SSL support is not compiled in` |
05:08:39 | * | dadada_ joined #nim |
05:11:28 | FromGitter | <ejstembler_gitlab> @Varriount I see this is an issue on macOS: https://github.com/PostgREST/postgrest/issues/1034. I think I need to re-compile psql on macOS, or switch to a Linux Docker container... |
05:11:30 | disbot | ➥ sslmode value "require" invalid when SSL support is not compiled ; snippet at 12https://play.nim-lang.org/#ix=2bKL |
05:20:17 | FromGitter | <ejstembler_gitlab> @Varriount I finally got it to work. Oddly enough, `brew install postgresql` fixed it: https://stackoverflow.com/a/53893271/691816 |
05:22:47 | * | dadada_ quit (Ping timeout: 265 seconds) |
05:28:35 | * | dadada_ joined #nim |
05:37:38 | * | dadada_ quit (Ping timeout: 240 seconds) |
05:38:39 | * | dadada joined #nim |
05:39:02 | * | dadada is now known as Guest80935 |
05:46:57 | * | narimiran joined #nim |
05:55:29 | * | prcups joined #nim |
05:56:49 | * | prcups quit (Client Quit) |
06:07:06 | * | chemist69 quit (Ping timeout: 246 seconds) |
06:07:23 | * | Guest80935 quit (Ping timeout: 272 seconds) |
06:08:06 | * | chemist69 joined #nim |
06:08:38 | * | dadada_ joined #nim |
06:09:10 | * | ptdel quit (Remote host closed the connection) |
06:21:55 | * | dadada_ quit (Ping timeout: 260 seconds) |
06:23:39 | * | dadada_ joined #nim |
06:37:42 | * | dadada_ quit (Ping timeout: 265 seconds) |
06:38:38 | * | dadada joined #nim |
06:39:02 | * | dadada is now known as Guest25513 |
06:52:43 | * | Guest25513 quit (Ping timeout: 260 seconds) |
06:53:34 | * | rockcavera quit (Remote host closed the connection) |
06:53:42 | * | dadada_ joined #nim |
07:07:38 | * | dadada_ quit (Ping timeout: 268 seconds) |
07:08:41 | * | dadada_ joined #nim |
07:14:58 | * | letto quit (Quit: Konversation terminated!) |
07:22:26 | * | dadada_ quit (Ping timeout: 268 seconds) |
07:23:39 | * | dadada_ joined #nim |
07:34:24 | * | letto joined #nim |
07:37:19 | * | dadada_ quit (Ping timeout: 272 seconds) |
07:38:37 | * | dadada joined #nim |
07:39:00 | * | dadada is now known as Guest55567 |
07:51:25 | * | solitudesf- joined #nim |
07:53:16 | * | Guest55567 quit (Ping timeout: 268 seconds) |
07:53:43 | * | dadada_ joined #nim |
08:03:52 | * | Vladar joined #nim |
08:05:01 | * | gmpreussner joined #nim |
08:06:55 | * | dadada_ quit (Ping timeout: 260 seconds) |
08:08:44 | * | dadada_ joined #nim |
08:22:17 | * | dadada_ quit (Ping timeout: 272 seconds) |
08:23:39 | * | dadada_ joined #nim |
08:38:07 | * | dadada_ quit (Ping timeout: 272 seconds) |
08:38:28 | * | gour joined #nim |
08:38:38 | * | dadada joined #nim |
08:39:01 | * | dadada is now known as Guest69125 |
08:41:46 | * | gour left #nim ("Leaving") |
08:52:39 | * | Guest69125 quit (Ping timeout: 260 seconds) |
08:53:39 | * | dadada_ joined #nim |
08:59:50 | * | JustASlacker joined #nim |
09:07:32 | * | JustASlacker quit (Ping timeout: 265 seconds) |
09:07:53 | * | dadada_ quit (Ping timeout: 272 seconds) |
09:12:58 | * | tefter joined #nim |
09:13:26 | * | dddddd quit (Ping timeout: 268 seconds) |
09:13:33 | * | dadada_ joined #nim |
09:13:43 | * | leorize quit (Ping timeout: 240 seconds) |
09:14:13 | * | leorize joined #nim |
09:19:40 | Araq | clyybber: can you play "Cohen's Masterpiece"? ;-) |
09:20:49 | Zevv | Oh, that's not as hard as it sounds. |
09:20:52 | * | JustASlacker joined #nim |
09:20:59 | Zevv | It's much, much worse. |
09:21:42 | * | hinst joined #nim |
09:22:48 | Araq | how do you know? tried it? |
09:22:59 | * | dadada_ quit (Ping timeout: 260 seconds) |
09:23:44 | * | dadada_ joined #nim |
09:24:00 | Zevv | No, that was the #1 comment on youtube :) |
09:24:10 | Zevv | So it must be true |
09:26:24 | Araq | indeed |
09:26:48 | Zevv | *you* tried? |
09:30:04 | Araq | I don't play the piano at all. I regret it a bit though |
09:30:41 | Araq | it's the one instrument I can imagine to enjoy playing |
09:31:31 | Zevv | There is still time :) |
09:32:54 | * | jjido joined #nim |
09:33:23 | Zevv | I started as a kid but I don't play that much anymore. My wife started to learn at 40 but she kind of gave up on it. It's quite an effort to start late in life it seems |
09:37:06 | * | dadada_ quit (Ping timeout: 246 seconds) |
09:37:31 | * | dadada joined #nim |
09:37:55 | * | dadada is now known as Guest1754 |
09:38:12 | FromGitter | <Varriount> I can sing, but (oddly enough) you really need to know an instrument to perform most music |
09:38:57 | Zevv | I bet it does help yes |
09:39:13 | FromGitter | <Varriount> (that is, most songs don't sound right if sung Acapella) |
09:40:12 | * | hinst quit (Ping timeout: 272 seconds) |
09:41:37 | * | hinst joined #nim |
09:43:43 | * | Guest1754 is now known as dadada |
09:44:04 | dadada | this is a good write-up on nim: https://analyticsindiamag.com/will-this-statically-typed-language-replace-python/ |
09:44:38 | Zevv | hey that's pmunch's head |
09:44:52 | zedeus | oh nice, this one doesn't claim Nim is interpreted :) |
09:45:53 | zedeus | it's still not a very good article, it skimps on the details everywhere |
09:46:32 | dadada | zedeus: yes, keep in mind that readers don't always have time, they probably cater to those |
09:46:46 | dadada | Ross Baker |
09:46:58 | dadada | is a commenter below the article, who wrote "Why not just use C? I will stick with python and cython and C." |
09:47:17 | * | hinst_ joined #nim |
09:47:50 | dadada | it seems like dozens of severe security threats due to C code over the years, still hasn't convinced everyone that dropping old habits is sometimes a good thing |
09:48:35 | * | hinst quit (Ping timeout: 268 seconds) |
09:48:55 | zedeus | dadada: that's a fine argument, but then explain this "File Extensions: The file extensions of Python include .py, .pyi, .pyd, .pyo, .pyw, .pyz, .pyx whereas the file extensions of Nim include .nim, .nims." |
09:49:33 | zedeus | for completion's sake, they forgot .cfg and .nimf |
09:49:43 | Araq | .cfg is not Nim code |
09:49:56 | Araq | and .nimf is Nim code in a different syntax |
09:50:18 | Araq | but why would you list the file extensions? who cares |
09:50:24 | zedeus | indeed, it's pointless |
09:50:32 | * | hinst_ quit (Client Quit) |
09:50:34 | dadada | judging by his picture he is an older guy, so he has probably coded a lot in C over decades, which means he doesn't want to live in a world where his C skillset is devalued, I just wonder how you can write comments like that before you have given a chance to a language? |
09:51:35 | Araq | you never convince C programmers, you wait for them to die out. |
09:51:53 | Zevv | I'm not dead |
09:52:18 | Araq | Zevv: you're a Nim programmer now :P |
09:52:28 | Zevv | I got convinced, right? |
09:52:46 | Zevv | And without realizing I did my part of infecting the obligatory 2.7 others, I just heard this week |
09:52:50 | Zevv | so I did my part |
09:53:07 | Araq | tbh I wasn't aware you were a C programmer |
09:53:17 | Araq | so I need to reconsider my opinion |
09:53:36 | Zevv | Did mostly embedded and linux stuff for 20 years |
09:53:44 | dadada | I once programmed in C also, it's probably just the knowledge that there are hundreds of proclaimed alternatives to it, so their reaction is to shrug everytime, it would be nice if a popular system level application was written in nim, that could change attitudes, something like openssl rewritten to nim |
09:54:30 | Araq | dadada: not sure if it helps, there is likely an SSL impl written in Rust by now |
09:54:39 | Araq | yet you simply don't care either :P |
09:54:55 | dadada | you mean I don't care about rust? |
09:55:17 | Araq | no argh. not 'you', 'the typical C programmer' |
09:55:25 | Araq | if that means anything |
09:56:24 | dadada | well, I think the learning curve with rust is a problem, and then you're still writing curly braces and semicolons for no good reason |
09:56:53 | FromDiscord | <Recruit_main_70007> Araq, yeah, I think so, I know a rust programmer and I am pretty sure he mentioned his web had ssl |
09:57:29 | Araq | it's all excuses, "C still rulez because X is written in it" -- "but look, Y is written in Rust/Nim/D/etc and it works too" -- "ok, but it compiles more slowly" -- "but look, they have a module system and it's getting better" -- "ok, but the compiler uses more memory" -- "but look we measure it and it doesn't" -- "ok, but I will continue to use C" |
09:59:20 | dadada | Araq: there are some who are like that, certainly, and some will just need to make some initial contacts with nim programming to question their prior reservations |
10:01:08 | Araq | Some programmers are quite reactionary and I'm not sure why they use computers, computers are rather new. |
10:02:23 | Araq | Many also have reservations against automation, ironic, isn't it. |
10:05:46 | dadada | maybe, some just have difficulty with deciding where they should invest their precious time, there are a ton of options at this point, I wouldn't lump everyone who disagrees with me into a category such as "reactionary", at this point you might as well say "you're better than them", and I think many will come around to nim eventually |
10:08:14 | * | Trustable joined #nim |
10:09:51 | Araq | they are not "reactionary" because they disagree with me, they are because they keep using C in 2020, the one language with an unprecedented track record of security problems. |
10:10:18 | Araq | many language that predate C by decades had fewer problems. |
10:13:36 | dadada | I'll probably never write a pure C application again, unless someone or something forces me to, but if I may place devils advocate here for a second, the tooling around C is getting better, and even the C standard is still seeing new revisions, there's definitely a possibility that there will be an analysis tool for C code some day, that's good enough to catch every dangerous expression, on the other hand I |
10:13:42 | dadada | don't know why you would use C in the meantime :-) |
10:14:29 | dadada | s/place/play |
10:15:11 | Zevv | One of these macro things again. How do I 'resolve' my symbol inside the 'foo' macro to get the string "John"? https://play.nim-lang.org/#ix=2bLk |
10:16:13 | Araq | dadada: There is C++, it has effectively the same tooling and better stdlib and superb interop with C. |
10:17:22 | Araq | it can be faster than C too, "insert the old qsort vs std::sort comparison here" |
10:17:57 | Araq | and you conveniently use an Integer library that checks for overflows |
10:18:00 | Araq | *can use |
10:18:18 | Araq | in C everything that departs from being builtin is rather tedious to use. |
10:18:34 | dadada | I'm with you anyway ... I'm a C++ guy |
10:18:45 | dadada | at least I used to be |
10:26:25 | lqdev[m] | Zevv: use `typed` params |
10:29:38 | Demos[m] | I'm a c++ guy too, but there are reasons to use C, or to write Cish c++ code |
10:30:00 | Demos[m] | the main reason is that C compilers are easy to implement and bootstrap |
10:30:22 | Demos[m] | and it's much harder to control/stabalize your ABI in c++ as compared to C |
10:31:07 | Demos[m] | I'm sitting in the C++ standards commette and writing nim on my laptop :D |
10:31:24 | Demos[m] | (I can't vote so I don't have much to do) |
10:31:28 | dom96 | Araq, please read https://irclogs.nim-lang.org/15-02-2020.html#00:02:01 |
10:31:44 | dom96 | also https://irclogs.nim-lang.org/14-02-2020.html#23:57:33 |
10:32:27 | Araq | ok, for some reason the "revert PR" button was missing |
10:32:51 | Araq | I'm positive that the contributor will create another PR though to fixup his mess |
10:33:25 | Araq | and yeah, I should have been more careful but I assumed that the code was tested well |
10:33:32 | Araq | with jester and rosencrantz |
10:33:44 | Zevv | lqdev[m]: sure, but then what? |
10:33:47 | Araq | no idea about emscripten segfaults |
10:34:08 | lqdev[m] | Zevv: then you can call getImpl on your node. |
10:34:36 | dom96 | Araq, okay fair enough. What about my comments about NimVersion checks |
10:34:57 | Araq | most of the time it's a simple .since annotation |
10:35:18 | Araq | and doesn't cause the code duplication, you've seen an extreme case |
10:36:18 | dom96 | IMO code that modifies data structures should do so in a way that's compatible with 1.0 and future versions |
10:36:18 | Araq | Demos[m]: I've seen macro heavy C code that effectively lacked a stable ABI |
10:36:24 | dom96 | we shouldn't be encouraging this code duplication |
10:37:03 | Araq | ABIs are hard but either way you have to stick to subsets of what the language offers |
10:37:46 | Zevv | lqdev[m]: Yeah, tried that, but I keep getting lost. "node is not a symbol": https://play.nim-lang.org/#ix=2bLm |
10:38:05 | Zevv | Ooh dang |
10:38:11 | Zevv | of course. sigh |
10:38:44 | Araq | and C compilers are not exactly easy to build either, the language is full of quirks too and GCC being free killed the market |
10:38:51 | Zevv | lqdev: ok, so this can't be used wher I want it too because of the untyped/typed. Thanks anyway! |
10:39:59 | lqdev[m] | Zevv: take a look https://play.nim-lang.org/#ix=2bLn |
10:40:26 | Demos[m] | Araq: I agree, and I’ve seen cxx projects with a very stable abi (hell I work on one). But there’s more subtle stuff that can break abi |
10:40:35 | Zevv | Yeah I found out and it works now. My goal was to implement backticks in npeg to refer grammar constants from outside the grammar |
10:40:46 | Zevv | but that won't work because the grammar itself is passed as an untyped |
10:40:48 | Zevv | so that makes sense |
10:41:13 | Demos[m] | Anyway I appreciate that a ton of nim semantics are lifted from cxx |
10:51:03 | * | opal quit (Ping timeout: 240 seconds) |
10:55:09 | Araq | Demos[m]: one more thing: I only have experience with c2nim's parser but IME parsing C vs C++ makes almost no difference, you need arbitrary lookahead, heuristics and backtracking for both |
10:56:23 | FromDiscord | <Recruit_main_70007> Can —os:any work on windows, linux, iOS, etc at the same time? |
10:56:51 | Araq | they are both unbelievably bad to parse and I suspect that's a bit of a reason for their success, it's a lock-in, header files are hard to translate into something better |
10:57:11 | Araq | Recruit_main_70007: yes |
10:57:59 | * | Vladar quit (Quit: Leaving) |
10:58:04 | dom96 | Araq, if I repro a emscripten segfault can you help me debug? |
11:00:23 | * | opal joined #nim |
11:02:31 | Araq | maybe, it's worth a try |
11:06:48 | dom96 | either I'll fix this or I'll need to figure out how to optimise our JS backend A LOT :) |
11:23:55 | * | tefter quit (Quit: WeeChat 2.7) |
11:28:25 | FromDiscord | <Rika> Stupid question, is karax nims counterpart to js's electron? |
11:29:59 | Araq | a bit, yes |
11:31:40 | lqdev[m] | not really |
11:31:49 | lqdev[m] | it's more like react.js |
11:32:07 | FromDiscord | <Rika> But it can compile to the c target? |
11:32:16 | FromDiscord | <Rika> That's what I read in the readme |
11:33:36 | FromDiscord | <Rika> I misread |
11:35:06 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:39:31 | FromGitter | <xflywind> For C target,Karax is more like template engine or Nim builtin Filter, but more power(except make writing linking CSS a bit more difficult). |
11:41:45 | * | jjido joined #nim |
11:52:41 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:58:13 | * | setenforce quit (Ping timeout: 245 seconds) |
11:58:16 | * | qwertfisch_ is now known as qwertfisch |
12:00:52 | livcd | Are there some perf issues with the JS backend? |
12:13:14 | FromDiscord | <clyybber> Araq: I tried once, but wasn't proficient enough at the time |
12:13:36 | FromDiscord | <clyybber> Interestingly enough the rythm is what I struggled with |
12:13:56 | * | zedeus quit (Ping timeout: 268 seconds) |
12:16:25 | * | jjido joined #nim |
12:34:34 | dom96 | livcd, certainly too slow for my game |
12:34:42 | dom96 | hard to say how much of that is my fault though |
12:37:33 | * | marmotini_ quit (Ping timeout: 268 seconds) |
12:41:56 | lqdev[m] | man, nimsuggest really dislikes templates and macros |
12:42:04 | lqdev[m] | or really anything related to the VM |
12:54:48 | FromGitter | <xflywind> Hello, how can I parse StingTableRef from string?Is there any way easier than using parseutils? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e47ea1818ac9b0fb5c08341] |
13:10:47 | * | JustASlacker quit (Ping timeout: 240 seconds) |
13:16:35 | FromDiscord | <Rika> If it's in JSON, there's the json module |
13:17:29 | FromDiscord | <Rika> The format you pasted looks like json without the quotation marks, so unless you can't add quotation marks, add them and use parseJson |
13:26:49 | Araq | lqdev[m]: yeah we need to fix it |
13:35:51 | FromGitter | <xflywind> Thanks for your advice @Rika, but I'm writing session module based on signedcookie, I need serialize StringTable and ⏎ deserialize StringTable.So I don't want to use parseJson. I'll use parseutils instead. |
13:40:47 | Zevv | Rika: show an example pleas |
13:41:00 | Zevv | oh wait wrong person |
13:47:00 | * | dddddd joined #nim |
13:50:13 | Zevv | xflywind: https://play.nim-lang.org/#ix=2bM1 fwiw |
13:52:07 | FromDiscord | <Recruit_main_70007> how can you add the numbers of two arrays of unkown size? |
13:52:28 | FromDiscord | <clyybber> you mean sum them? |
13:52:35 | FromDiscord | <clyybber> pairwise or the whole sum? |
13:52:36 | FromDiscord | <Recruit_main_70007> yes, sorry |
13:52:54 | FromDiscord | <clyybber> like do you want an array as output or an int |
13:53:00 | FromDiscord | <Recruit_main_70007> res[0] = a[0] + b[0] |
13:53:04 | FromDiscord | <Recruit_main_70007> and so on |
13:53:18 | FromDiscord | <clyybber> first check if a and b's len are the same |
13:53:36 | FromDiscord | <clyybber> and if they are just do for i in a.low..b.high: |
13:53:39 | FromGitter | <xflywind> @Zevv Thanks.It looks nice, I'll try it. |
13:54:30 | FromDiscord | <clyybber> @Recruit_main_70007 Eh, if you don't know wether they start at 0 or something else, you gotta check a.low == b.low too |
13:54:52 | * | lritter joined #nim |
13:55:28 | Zevv | Recruit_main_70007: unfortunately the implementation is not very efficient, but the code looks nice: `zip(a, b).mapIt(it.a + it.b)` |
13:56:40 | FromDiscord | <Recruit_main_70007> ok, thanks, also i am hving this issue: |
13:56:40 | FromDiscord | <Recruit_main_70007> |
13:56:40 | FromDiscord | <Recruit_main_70007> proc len(x: (type array) | array): int |
13:56:41 | FromDiscord | <Recruit_main_70007> first type mismatch at position: 1 |
13:56:41 | FromDiscord | <Recruit_main_70007> required type for x: type array or array |
13:56:41 | FromDiscord | <Recruit_main_70007> but expression 'a' is of type: array |
13:57:36 | Zevv | Recruit_main_70007: funny, can you share a complete snippet? |
13:57:37 | Araq | that's not as crazy as it sounds |
13:57:54 | Araq | the 'array' typeclass itself has no length information |
13:59:02 | FromDiscord | <Recruit_main_70007> how can i check if they have the same lenght then? |
13:59:29 | Zevv | Recruit_main_70007: show your code |
13:59:39 | Zevv | nevermind Araq, he never gives the simple answers :) |
14:00:19 | FromDiscord | <Recruit_main_70007> proc `+`*(a, b: array): array = |
14:00:20 | FromDiscord | <Recruit_main_70007> if a.len() != b.len(): |
14:00:20 | FromDiscord | <Recruit_main_70007> return [0] |
14:00:20 | FromDiscord | <Recruit_main_70007> |
14:00:20 | FromDiscord | <Recruit_main_70007> for i in a.low..b.high: |
14:00:20 | FromDiscord | <Recruit_main_70007> result[i] = a[i] + b[i] |
14:00:42 | FromDiscord | <Recruit_main_70007> i guess i cant just say their type is just `array` |
14:00:57 | Zevv | Nope |
14:01:17 | Zevv | Use generics, something like proc `+`[T](a, b: array[T]): array[T] = |
14:01:20 | Araq | proc `+`*[T, I](a, b: array[T, I]): array[T, I] |
14:01:28 | Zevv | oh right of course |
14:01:32 | Zevv | always listen to araq |
14:01:43 | Araq | and then by construction the arrays need the same lengths, enforced by the type system |
14:01:49 | * | FromGitter quit (Read error: Connection reset by peer) |
14:02:06 | FromDiscord | <Recruit_main_70007> and then, will it still look nice when calling it? |
14:02:08 | * | FromGitter joined #nim |
14:02:16 | FromDiscord | <Recruit_main_70007> like just array1 + array2? |
14:02:21 | Araq | yes |
14:02:49 | FromDiscord | <Recruit_main_70007> oh cool! |
14:02:49 | FromDiscord | <Recruit_main_70007> i thought it was not gonna work, thanks |
14:03:06 | FromDiscord | <Recruit_main_70007> Nim is nuts |
14:03:47 | Araq | it certainly has its upsides ;-) |
14:11:18 | * | nsf joined #nim |
14:14:25 | * | krux02 joined #nim |
14:19:02 | * | NimBot joined #nim |
14:22:32 | * | LER0ever quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:22:57 | FromDiscord | <Recruit_main_70007> does nlvm work on windows? |
14:23:10 | FromDiscord | <Recruit_main_70007> @arnetheduck? |
14:24:27 | * | Hideki_ joined #nim |
14:47:22 | FromDiscord | <arnetheduck> @Recruit_main_70007 patches welcome |
14:48:06 | FromDiscord | <arnetheduck> would be really good for it though - could use nim without the whole mingw/msvc mess |
14:48:58 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:52:28 | * | fvs joined #nim |
14:52:29 | * | jjido joined #nim |
14:55:25 | FromDiscord | <Recruit_main_70007> I wish I had the skills to help |
14:55:39 | * | nsf quit (Quit: WeeChat 2.7) |
15:04:12 | disruptek | me too. |
15:05:16 | FromDiscord | <clyybber> nobody is born with the skills |
15:05:18 | FromDiscord | <clyybber> just try |
15:05:19 | FromDiscord | <clyybber> it |
15:05:25 | disruptek | shhh |
15:06:09 | disruptek | i was born with skills. |
15:08:25 | disruptek | tags in the effects system are atomic, right? indivisible? |
15:08:42 | FromDiscord | <clyybber> what would you devide them into? |
15:09:08 | disruptek | the point is that they are types but not instances that hold values. |
15:09:33 | * | Vladar joined #nim |
15:09:54 | disruptek | if i want an ecosystem of tags, i have to compose them from types. |
15:10:34 | disruptek | so tagElvis0 + tagElvis2 == 5 |
15:11:58 | disruptek | ...and the channel gets /very/ quiet... |
15:12:41 | FromDiscord | <Rika> f |
15:12:50 | * | ftsf quit (Ping timeout: 240 seconds) |
15:13:09 | FromDiscord | <clyybber> disruptek: ah |
15:14:23 | FromDiscord | <clyybber> I think they are transitive |
15:14:44 | FromDiscord | <clyybber> so you are still gonna see tagElvis0 and tagElvis2 |
15:14:45 | disruptek | astute observation about c/++ lock-in due to translation effort. |
15:19:04 | disruptek | i don't care if i see the tags. |
15:19:14 | disruptek | i just want to act on them as data. |
15:20:55 | disruptek | can you use typeclasses as tags? |
15:21:12 | disruptek | tagElvis5 = tagElvis0 | tagElvis2 |
15:24:16 | disruptek | seems like no. |
15:24:49 | disruptek | you can use aliases, but they have to be concrete types. |
15:25:06 | disruptek | no distinct, either. |
15:25:43 | disruptek | i guess that's surprising. |
15:27:49 | * | Vladar quit (Remote host closed the connection) |
15:31:14 | disruptek | seems like i want more access to the cfg from code. |
15:32:03 | * | sagax quit (Ping timeout: 240 seconds) |
15:33:46 | disruptek | well, wishin' won't make it so. |
15:38:11 | * | rockcavera joined #nim |
15:45:00 | * | Kaivo joined #nim |
15:47:13 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:55:34 | * | Kaivo quit (Quit: WeeChat 2.7) |
15:56:25 | * | Kaivo joined #nim |
16:13:39 | * | marmotini_ joined #nim |
16:21:31 | * | nsf joined #nim |
16:23:29 | * | Trustable quit (Remote host closed the connection) |
16:23:44 | * | Hideki_ quit (Remote host closed the connection) |
16:23:49 | * | marmotini_ quit (Remote host closed the connection) |
16:25:32 | * | Trustable joined #nim |
16:31:02 | * | Hideki_ joined #nim |
16:33:48 | * | sagax joined #nim |
16:35:21 | * | Hideki_ quit (Ping timeout: 246 seconds) |
16:44:44 | * | Trustable quit (Remote host closed the connection) |
16:45:40 | * | Trustable joined #nim |
16:57:38 | * | marmotini_ joined #nim |
17:03:50 | Zevv | ping lqdev[m] |
17:05:45 | * | Hideki_ joined #nim |
17:16:57 | * | krux02 quit (Remote host closed the connection) |
17:30:51 | * | Hideki_ quit (Ping timeout: 240 seconds) |
17:40:58 | * | Trustable quit (Remote host closed the connection) |
18:00:01 | FromDiscord | <Kiloneie> Did someone share my videos somewhere ? i am seeing un usual amounts of subs and views... |
18:00:23 | disruptek | someone with 150k subscribers trashed nim on youtube. |
18:01:35 | FromDiscord | <Kiloneie> trashed as in, shat on it ?... |
18:04:25 | disruptek | sure. |
18:04:48 | Araq | didn't seem to work out then :P |
18:04:56 | solitudesf- | he probably measures languages by how easy it is to get a job with it. thats usual stuff with programming youtubers. |
18:05:08 | disruptek | well, the thesis was: don't learn nim because you cannot make money with it. |
18:05:16 | disruptek | it's a dead language. |
18:05:59 | disruptek | i mean, he's not wrong today. but he has surprisingly little foresight given his age. |
18:06:08 | Araq | fair enough |
18:06:14 | disruptek | on the other hand, i'm the homeless vagrant who writes nim all day. |
18:07:03 | Araq | and you're getting paid to do it |
18:07:09 | FromDiscord | <Kiloneie> well i benefited some, case closed |
18:07:22 | disruptek | maybe one day. |
18:08:16 | disruptek | i do think i underestimated how hard it is to grow this thing. |
18:08:54 | Araq | you can always base your startup/product on Nim though, if you happen to be in charge |
18:08:57 | disruptek | Araq: did you watch the video? |
18:09:04 | FromDiscord | <Kiloneie> i am thinking of restarting but, idk, should just open up a patreon site, give me money and il do it xD |
18:09:05 | Araq | no |
18:09:49 | disruptek | https://invidio.us/embed/DCfDLWfPqiA |
18:10:07 | leorize | technically you can make money with nim if you work for status :P |
18:10:09 | Araq | oh funny I know this guy |
18:10:23 | disruptek | yeah, he seems like a big fan of yours. |
18:10:25 | Araq | from youtube, I mean |
18:10:28 | disruptek | ah. |
18:10:56 | Araq | he's cool, I like him |
18:11:22 | * | ptdel joined #nim |
18:11:40 | Araq | I know him from his videos about how C++ rules, iirc |
18:12:14 | disruptek | he seems pretty python-centric based upon his link section. |
18:12:15 | lqdev[m] | Zevv: sup |
18:12:18 | Zevv | oi! |
18:12:20 | planetis[m] | i think instead of dissing nim, he should rest his voice, sounds terrible! |
18:12:23 | Zevv | tell me about nadio |
18:12:52 | lqdev[m] | so nadio is supposed to be a digital audio workstation with a keyboard-centric interface, with vim-like controls |
18:13:32 | lqdev[m] | it's sort of a hybrid between propellerhead reason's rack and blender's node editor |
18:13:32 | Zevv | how DAW do you want to make it? On a scale of puredata/nordmodular/ableton? |
18:13:47 | Zevv | reason \o/ |
18:14:09 | lqdev[m] | idk, really. I just want to make a thing for sound synthesis ;) |
18:14:12 | FromDiscord | <clyybber> puredata |
18:14:14 | FromDiscord | <clyybber> then |
18:14:28 | Zevv | Sweet. If you want a mate on that, I'm in |
18:14:37 | Zevv | I got 15 years of DSP ideas lingering around that need a framework to go in |
18:14:44 | disruptek | oh shoot |
18:14:51 | lqdev[m] | I want something with a piano roll like FL Studio |
18:15:09 | FromDiscord | <clyybber> I want to make something like that too |
18:15:13 | Zevv | I want something like my Nord Modular classic |
18:15:17 | lqdev[m] | Zevv: sure, I'll try to add plugin support |
18:15:20 | Zevv | It seems that that should nicely fit |
18:15:51 | Zevv | I hate making UI's but I do love doing the DSP basics |
18:16:14 | Zevv | I spent a week of my life making a proper bandlimited sawtooth generator |
18:16:23 | Zevv | it deserves to be used |
18:17:10 | lqdev[m] | you'll be able to make a plugin for nadio that makes use of it :) |
18:17:24 | disruptek | you'll have to write it in wren, though. |
18:17:31 | disruptek | s/wren/rod/ |
18:17:31 | lqdev[m] | what? |
18:17:55 | lqdev[m] | running a scripting language like that would be too expensive, I'm going with the DLL approach |
18:18:26 | lqdev[m] | either that or JIT |
18:18:27 | * | lritter quit (Ping timeout: 240 seconds) |
18:18:46 | Zevv | don't even answer the man lqdev[m]. you know better then that |
18:18:53 | FromDiscord | <clyybber> lol |
18:18:55 | disruptek | rude. |
18:19:01 | Zevv | asking for it, no? |
18:19:08 | disruptek | no? |
18:19:11 | Zevv | no! |
18:19:14 | disruptek | no! |
18:19:18 | FromDiscord | <clyybber> hoe |
18:19:34 | FromDiscord | <clyybber> I wanted to ask something now I forgot |
18:19:36 | dadada | disruptek: I have to disagree hard with this guy, even if your goal is to make money, features/concepts of languages sometimes translate well to other languages, if you can learn to dive into a new language, this should make it easier to understand similar patterns in others ... also the same thing was said about Python, and many other languages before, Pascal once was a language you could make money with, it |
18:19:43 | dadada | hasn't remained that way ... and then there's the fact that if you're in control over a whole project, of course you can choose Nim or any other language, he's only right for getting a corporate Job where they tell you to use .NET or JAVA. Of course, you know all that, but I had to vent after listening at 4:32 in the video :D |
18:19:43 | Zevv | anyhow, lqdev[m]: keeping an eye on your project. If you're doing the wrong thing I will fork you and go for world domination myself |
18:20:08 | disruptek | honestly, i didn't learn nim to make money. |
18:20:23 | dadada | I don't either |
18:20:24 | disruptek | i was looking for the right language to invest in for my own use. |
18:20:29 | dadada | me too |
18:20:32 | FromDiscord | <clyybber> right, now I now; does anybody know of a laptop without a touchpad? |
18:20:33 | * | rockcavera quit (Remote host closed the connection) |
18:20:36 | FromDiscord | <clyybber> but with touchscreen? |
18:20:41 | disruptek | it's my own fault i'm stick with nim. |
18:20:50 | Zevv | clyybber: touchpads can be disabled? |
18:20:59 | lqdev[m] | Zevv: go on, it's open source anyways. |
18:21:03 | FromDiscord | <clyybber> Zevv: True |
18:21:13 | disruptek | clyybber: i have a gpd pocket 2. |
18:21:19 | FromDiscord | <clyybber> too small |
18:21:22 | FromDiscord | <clyybber> my hands are big |
18:21:28 | leorize | you need some space for that palm rest though |
18:21:44 | FromDiscord | <clyybber> I can rest my hands on my legs/desk comfortably |
18:21:47 | FromDiscord | <clyybber> and still reach the keys |
18:21:54 | leorize | zenbook duo? |
18:21:57 | disruptek | duck tape. |
18:22:11 | leorize | that thing have two screens, and touchpad is also a numpad if you don't use the touch mode |
18:22:12 | FromDiscord | <clyybber> leorize: THank! |
18:22:24 | FromDiscord | <clyybber> yeah, I saw that one, but forgot the name |
18:22:36 | FromDiscord | <clyybber> Hmm |
18:22:41 | FromDiscord | <clyybber> I think I have a DIY project |
18:22:50 | FromDiscord | <clyybber> rip out the touchpad of my laptop |
18:22:54 | FromDiscord | <clyybber> and replace the lower case |
18:22:57 | FromDiscord | <clyybber> with a midi keyboard |
18:23:12 | Zevv | woohoo :) |
18:23:14 | disruptek | why both. |
18:23:16 | disruptek | bother. |
18:23:21 | FromDiscord | <clyybber> problem is my current laptop doesn't have touchscreen |
18:23:29 | FromDiscord | <clyybber> hmm |
18:23:34 | leorize | why touchscreen? :p |
18:23:35 | FromDiscord | <clyybber> maybe I should just buy a tablet |
18:23:42 | disruptek | yes. |
18:24:00 | FromDiscord | <clyybber> leorize: It feels amazing to use vcvrack/puredata on touchscreens |
18:24:07 | disruptek | for $2-3k you can get a quality midi keyboard. |
18:24:09 | FromDiscord | <clyybber> also I recently got attached to touchscreens |
18:24:16 | FromDiscord | <clyybber> disruptek: I have one already |
18:24:20 | disruptek | so...? |
18:24:22 | FromDiscord | <clyybber> for 200euros |
18:24:37 | FromDiscord | <clyybber> I guess it would just be cool to have it in your laptop |
18:24:39 | disruptek | i mean something with the feel of a real piano. |
18:24:43 | disruptek | ah. |
18:24:50 | FromDiscord | <clyybber> disruptek: I have an e piano |
18:24:58 | FromDiscord | <clyybber> my parents bought it for us when we were kids |
18:25:05 | disruptek | nice. |
18:25:11 | disruptek | that's not a bad piece of kit, right? |
18:25:15 | FromDiscord | <clyybber> nope |
18:25:32 | FromDiscord | <clyybber> maybe I should just buy a tablet |
18:25:47 | FromDiscord | <clyybber> does anybody know of tablets with power? |
18:25:55 | disruptek | i don't know anything about pianos. i just toy with the idea of building such an instrument. |
18:26:01 | leorize | tablets with power? |
18:26:05 | leorize | what is that? |
18:26:08 | FromDiscord | <clyybber> eh |
18:26:14 | FromDiscord | <clyybber> performance |
18:26:15 | FromDiscord | <clyybber> I meant |
18:26:19 | disruptek | something with a microsoft sticker, i guess. |
18:26:21 | vegai | ipads, obviously |
18:26:26 | FromDiscord | <clyybber> bruh |
18:26:26 | leorize | tablets and performance don't go together :P |
18:26:38 | leorize | but I might have a different metric regarding performance than you do |
18:26:42 | FromDiscord | <clyybber> nah |
18:26:48 | FromDiscord | <clyybber> thats why I'm asking here |
18:26:49 | leorize | so specifying your use case would be better |
18:26:54 | FromDiscord | <clyybber> since I havent found any myself |
18:27:04 | FromDiscord | <clyybber> leorize: I want to replace my current laptop |
18:27:16 | FromDiscord | <clyybber> which I use for gaming, computing and shit |
18:27:25 | vegai | oh, then no tablets obviously :P |
18:27:27 | leorize | wait for ryzen 4000 series laptop :P |
18:27:39 | disruptek | eh.. my little m3-1800y is spicy enough for my purposes. |
18:27:46 | FromDiscord | <clyybber> buy a two in one and glue the sides together :d |
18:27:52 | disruptek | i don't really understand the point of laptops, i guess. |
18:28:00 | FromDiscord | <clyybber> me neither |
18:28:06 | FromDiscord | <clyybber> ah |
18:28:15 | FromDiscord | <clyybber> wacom tablets have performance |
18:28:22 | leorize | please no |
18:28:26 | leorize | wacom is just overpriced |
18:28:27 | FromDiscord | <clyybber> why? |
18:28:31 | FromDiscord | <clyybber> hmm |
18:28:32 | FromDiscord | <clyybber> true |
18:28:34 | disruptek | use one first. they are a nightmare. |
18:28:52 | FromDiscord | <clyybber> never drew on a graphics tablet |
18:29:01 | FromDiscord | <clyybber> but it was always a dream of mine to own one |
18:29:27 | disruptek | unless you spend serious coin, they are going to disappoint. |
18:29:34 | FromDiscord | <clyybber> yeah |
18:29:41 | FromDiscord | <clyybber> khajits |
18:30:18 | leorize | I think you can get away with a weak laptop if you have a beefy desktop |
18:30:25 | FromDiscord | <clyybber> problem is |
18:30:30 | FromDiscord | <clyybber> I don't have a beefy desktop |
18:30:44 | FromDiscord | <clyybber> I replaced my desktop with my laptop |
18:30:44 | leorize | do you work on-the-go? |
18:30:44 | dadada | disruptek: nah, I'm not really impressed with some of the main points of this guy, nim will climb in popularity inspite of naysayers, I also disagree with him on other points ... |
18:30:57 | FromDiscord | <clyybber> leorize: often yeah |
18:31:15 | leorize | wait for ryzen 4000 series, then get a thinkpad :P |
18:31:31 | disruptek | what he's missing is that new paradigms enhance your use of existing tools. |
18:31:39 | livcd | I need a new laptop/desktop :X |
18:31:44 | leorize | thinkpads usually have good thermal performance, so they don't run toasty and throttle themselves |
18:31:48 | disruptek | you learn a new language and your bring some of what you learn into your use of older tech. |
18:31:56 | FromDiscord | <clyybber> leorize: yeah, I was thinking of getting a thinkpad |
18:32:38 | livcd | my company provided us with thinkpads but honestly I was not impressed |
18:32:40 | FromDiscord | <clyybber> perfect thing would be a tablet/small all in one with touch amd ryzen 4000 and an amd gpu |
18:32:48 | FromDiscord | <clyybber> so I can enjoy wiggle with touch |
18:32:52 | FromDiscord | <clyybber> lol |
18:32:57 | disruptek | it's too bad this guy doesn't provide some examples of stuff that he chose to learn which was then deprecated and died. |
18:33:02 | livcd | the only ones making good laptops are apple and microsoft |
18:33:20 | leorize | all in ones have a high chance of hinge breakage |
18:34:02 | leorize | I don't usually see the appeal in puttin a beefy gpu and cpu in a laptop |
18:34:12 | leorize | their thermal solution can never handle it |
18:34:19 | leorize | that's why apus are more popular |
18:34:43 | * | Hideki_ joined #nim |
18:35:02 | FromDiscord | <clyybber> leorize: There are laptops that can handle beefy gpus |
18:35:17 | leorize | and they scream when you start using those things |
18:35:21 | FromDiscord | <clyybber> I think some asus ones extend their case upon opening for more airflow |
18:35:22 | disruptek | what games do you play? |
18:35:22 | leorize | also they are thick |
18:35:24 | FromDiscord | <clyybber> leorize: True |
18:35:28 | FromDiscord | <clyybber> but that doesn't bother me |
18:35:32 | disruptek | i'm with leorize here. |
18:35:40 | disruptek | i've tried laptops. i think they are stupid. |
18:35:45 | leorize | I thought it didn't bother me, then I built a proper desktop |
18:36:02 | livcd | I have always used my macbook as a desktop :/ |
18:36:04 | FromDiscord | <clyybber> other way around here |
18:36:08 | FromDiscord | <clyybber> it bothers me to have multiple devices |
18:36:20 | FromDiscord | <clyybber> also, my sisters need a laptop |
18:36:27 | FromDiscord | <clyybber> so my old one can go to them :p |
18:36:37 | FromDiscord | <clyybber> well one |
18:37:07 | disruptek | i thought you were done school. |
18:37:12 | FromDiscord | <clyybber> yeah |
18:37:16 | FromDiscord | <clyybber> university |
18:37:18 | FromDiscord | <clyybber> i am in rn |
18:37:30 | disruptek | what? |
18:37:58 | FromDiscord | <clyybber> what what? |
18:38:17 | disruptek | i thought you were done school. |
18:38:17 | leorize | clyybber: well the next asus rog with ryzen 4000 seems promising, if you got the funds for those |
18:38:26 | dadada | disruptek, Araq: he's largely judging nim by the fact that many other programming languages have decent web development frameworks and he doesn't need anything else ... |
18:38:39 | FromDiscord | <clyybber> disruptek: I mean, dunno. Here in germany we call school the thing you do before going to university |
18:38:52 | disruptek | which uni? |
18:38:59 | FromDiscord | <clyybber> leorize: I'll aqcuire them :p |
18:38:59 | FromDiscord | <clyybber> thanks |
18:39:02 | dadada | he's not even considering embedded systems, desktop/game development and other such areas, that have vastly differnt needs than webdevelopment |
18:39:02 | FromDiscord | <clyybber> disruptek: TUM |
18:39:15 | * | Hideki_ quit (Ping timeout: 260 seconds) |
18:39:18 | disruptek | TUM? isn't that an airport code? |
18:39:31 | FromDiscord | <clyybber> technical university munich |
18:39:33 | FromDiscord | <clyybber> lol |
18:39:51 | FromDiscord | <clyybber> I just found out they do the physics engine for the new blender version |
18:40:05 | disruptek | dadada: i was old, once. |
18:40:18 | disruptek | i look at this guy and i think, "is this what i sound like?" |
18:40:22 | disruptek | christ. |
18:40:43 | disruptek | i never should have retired. |
18:40:54 | * | jjido joined #nim |
18:41:00 | leorize | clyybber: you are younger than I expected |
18:41:15 | disruptek | yeah, clyybber is a badass. |
18:41:28 | dadada | disruptek: alone the question "Should you Learn Nim over Python?" is a strawman, why can't you learn both |
18:41:28 | disruptek | i just wish he'd fix a bug or two now and then. |
18:41:36 | FromDiscord | <clyybber> heh |
18:41:37 | disruptek | obviously. |
18:41:53 | disruptek | i just don't know how to frame the argument for nim. |
18:41:58 | Araq | dadada: we do have web development, we cover both frontend and backend |
18:42:20 | Araq | compared to Python which has no frontend support whatsoever |
18:42:35 | dadada | Araq: that's not my point though, obviously I know that already |
18:42:55 | dadada | Araq: well there's a python interpreter written in javascript ... :D |
18:43:03 | Araq | yeah ... right |
18:43:07 | disruptek | it's not any /one/ thing. maybe it's easier to build a "why nim" article in the socratic method. |
18:43:35 | Araq | well we can all reply on his youtube video that it's poorly argued, poorly researched |
18:43:58 | Araq | and poorly thought through |
18:44:04 | dadada | you should, although I doubt that the people who are dissuaded by him are likely candidates for nim contributors |
18:44:20 | disruptek | i think he drove traffic to nim. |
18:44:48 | FromDiscord | <clyybber> leorize: heh, how old did you expect me to be? |
18:44:53 | disruptek | felt like we got some new people in the channel, and dom said we had 11x the usual traffic. |
18:45:04 | dadada | I mean the person who thinks for himself, doesn't make decisions based on someone who read one article, and never had actual experience with the language |
18:45:13 | FromDiscord | <clyybber> yeah |
18:45:25 | FromDiscord | <clyybber> sometimes you attract the "wrong" people |
18:45:32 | FromDiscord | <clyybber> ~& |
18:45:32 | disbot | &: 11unreachable |
18:46:12 | leorize | clyybber: probably 25+? |
18:46:24 | FromDiscord | <clyybber> leorize: I'm 19 |
18:46:41 | FromDiscord | <clyybber> You are 20? |
18:47:20 | FromGitter | <ejstembler_gitlab> It looks like for database (`db_postgres`) row retrieval rows are returned as arrays (or sequences?). Is there a way to get results as a dict/hash/named tuple or Type? ⏎ ⏎ `for author in fastRows(db, sql"SELECT id, name FROM authors"): ⏎ echo author.name ⏎ ` [https://gitter.im/nim-lang/Nim?at=5e483cb7b401eb68a57d2242] |
18:47:28 | dadada | Araq: https://brython.info/ ... :D I know you won't care about this, but due to the network effect everything will be ported to JS once its popular |
18:47:30 | leorize | clyyber: does it count if I haven't got my birthday? |
18:47:46 | FromDiscord | <clyybber> I'll let it slip |
18:48:02 | dadada | this is one of my great fears, that JavaScript will be the universally accepted programming language on all platforms |
18:48:26 | leorize | now I feel old |
18:48:47 | FromDiscord | <clyybber> leorize: Hey, we are all old because of lqdev |
18:48:50 | Araq | ejstembler_gitlab: Ormin can do that |
18:48:59 | Araq | but the stdlib can't |
18:49:13 | dadada | and all because Netscape gave a programmer a weekend task, which ended up being JavaScript, he chose the name because of the similarity to Java ... it's pure marketing |
18:49:34 | FromDiscord | <clyybber> Araq: Btw you changed your opinion on https://github.com/nim-lang/Nim/pull/13356 ? |
18:49:36 | disbot | ➥ capture macro now accepts variables of different types |
18:49:38 | leorize | better than vbs on the web |
18:49:48 | Araq | I haven't |
18:50:43 | FromDiscord | <clyybber> I think it feels a bit more like a keyword without the square brakcets |
18:50:53 | Araq | leorize: I'm not sure. because curlies are superior to 'end if'? |
18:51:03 | Araq | hmm |
18:53:05 | FromDiscord | <clyybber> Araq: My PR also allows us to use both, so we can do the openarray change later |
18:53:21 | Araq | fine so merge it |
18:53:31 | FromDiscord | <clyybber> alright, thanks! |
18:53:46 | disruptek | i think [x, y] where typeof(x) != typeof(y) is a little creepy. |
18:54:37 | disruptek | what's the difference between capture and do? |
18:54:43 | FromGitter | <ejstembler_gitlab> > *<Araq>* @ejstembler_gitlab: Ormin can do that ⏎ ⏎ Okay, I'll check that out, thanks! Btw, I am enjoying learning about your language. I like it a lot so far! |
18:55:22 | FromDiscord | <clyybber> disruptek: I think do makes a lambda |
18:55:29 | FromDiscord | <clyybber> so it will just capture by ref |
18:55:34 | FromDiscord | <clyybber> you can put a do inside a capture |
18:55:46 | FromDiscord | <clyybber> and then it will capture by value, whatever you give capture as arguments |
18:55:58 | disruptek | i guess that works. you can capture x, y, do: right. |
19:00:35 | Araq | I consider https://github.com/nim-lang/RFCs/issues/192 settled |
19:00:37 | disbot | ➥ outplace and chaining ; snippet at 12https://play.nim-lang.org/#ix=2bIT |
19:00:55 | Araq | outplace should become 'dup' and support varargs and blocks |
19:01:10 | Araq | and there should be a new module 'chaining' that implements 'chain' |
19:01:29 | Araq | since these are rather simple, I'm trying to get the community to take over |
19:02:23 | FromDiscord | <clyybber> since dup will then be like copy + chain |
19:02:40 | FromDiscord | <clyybber> maybe we can introduce a general copy proc that just returns a copy? |
19:02:47 | FromDiscord | <clyybber> and when you want dup behaviour |
19:02:54 | FromDiscord | <clyybber> you just do .copy.chain |
19:04:46 | FromDiscord | <clyybber> or we teach the compiler to optimize stuff like `x = x.dup(...)` to `x = x.dupWithoutTheCopy(...)` |
19:04:54 | FromDiscord | <clyybber> eh, ingore the latter |
19:05:09 | Araq | I'm ignoring everything |
19:05:13 | FromDiscord | <clyybber> I meant to write x.dupWithoutTheCopy(...) # So chain essentially |
19:05:18 | FromDiscord | <clyybber> Araq: 😦 |
19:05:46 | FromDiscord | <clyybber> Araq: I mean, dup and chain would be the same basically, just dup makes a copy before chaining |
19:05:56 | FromDiscord | <clyybber> so I'm thinking about ways to "unite" them |
19:06:00 | disruptek | i have no opinion because i cannot use it in nim-1.0. |
19:06:04 | dadada | Araq: what swung you against "with", your argument that it has the same use in some other languages had me convinced |
19:07:37 | Araq | dadada: people complained x.with(setPosition(1, 2), setFlags(forChildren)) isn't that readable |
19:07:37 | Araq | 'with' is good for blocks, 'chain' is better for expression lists |
19:07:37 | Araq | sometimes you can't win |
19:07:59 | Araq | with x: (a; b) also would work though. *shrug* |
19:08:25 | Araq | I don't care about chain, all I want is 'dup' |
19:08:41 | Araq | because with 'dup' we can cleanup the stdlib |
19:09:09 | FromDiscord | <clyybber> We don't need chain |
19:09:17 | FromDiscord | <clyybber> when we implement this optimization: |
19:09:18 | Araq | and could get really slick string handling into Nim |
19:09:49 | Araq | clyybber: look, chain results in 'void', dup in 'T'. there is no way to unify them |
19:10:17 | FromDiscord | <clyybber> Araq: I mean chain would just be `x = x.dup(...)` |
19:10:45 | FromDiscord | <clyybber> But I guess `x.chain(...)` is more beautiful |
19:10:50 | FromDiscord | <clyybber> I dunno |
19:11:40 | Araq | the only thing that matters about chain is that it's quite consistent with dup in the end |
19:11:46 | disruptek | i find it confusing that we passing `sort()` to dup instead of `sort`. |
19:12:20 | Araq | disruptek: we don't with the latest update of my proposal |
19:12:29 | Araq | x.dup(sort) # works |
19:13:11 | * | disruptek searches. |
19:13:14 | dadada | how about cc instead of chain, which would be short for ConCatenate, it also looks like a chain visually -> ---cccccccccccc----<- like rings that are intertwined foo.cc().this().that().theOther() cc foo: (this; that; theOther) |
19:13:17 | FromDiscord | <clyybber> sort() or sort(_) should continue to work IMO |
19:13:26 | * | dadada is a fan of ASCII art |
19:13:29 | FromDiscord | <clyybber> otherwise we can only pass arity-one procs |
19:13:34 | Araq | clyybber: yes |
19:13:45 | FromDiscord | <clyybber> cool |
19:14:08 | Araq | we could forbid sort() though and enforce sort(_) but meh |
19:14:23 | disruptek | i think that looks better. |
19:14:29 | disruptek | it's more explicit and less magical. |
19:14:29 | FromDiscord | <clyybber> Araq: sort() is not bad for those that think of it like methods |
19:14:39 | FromDiscord | <clyybber> I think allowing all 3 variants is best |
19:14:56 | disruptek | then it looks like "anything goes" |
19:15:14 | disruptek | the idea is that the human and the compiler can both easily grok the syntax. |
19:15:16 | FromDiscord | <clyybber> disruptek: No, its like UFCS |
19:15:24 | FromDiscord | <clyybber> call it like a method |
19:15:29 | FromDiscord | <clyybber> pass it like a function |
19:15:33 | disruptek | will you allow it like _.sort, too? |
19:15:34 | FromDiscord | <clyybber> call it like a proc |
19:15:58 | FromDiscord | <clyybber> Makes sense to |
19:16:00 | disruptek | |.sort |
19:16:02 | Araq | well since this whole thing is about syntactic sugar enforcing '_' seems counter productive |
19:16:08 | FromDiscord | <clyybber> Yeah |
19:16:14 | disruptek | with x: |.sort; |.reverse |
19:16:27 | FromDiscord | <clyybber> no |
19:16:30 | FromDiscord | <clyybber> why | ? |
19:16:48 | Araq | cause we're back throwing ideas around :P |
19:17:15 | dadada | with x: filterByName("John").filterByAge(10) |
19:17:28 | FromGitter | <matrixbot> `reversem3` I rather learn nim then python , nim is always backwards compatible |
19:17:35 | disruptek | well, again, it's hard for me to get interested. i feel like i'm stuck writing simple code that runs. by choice. and that means simplistic nim-1.0 that people can read and run through their own compilers. |
19:17:56 | FromGitter | <matrixbot> `reversem3` I have so many issues compiling programs that require different versions of python |
19:18:18 | disruptek | i like | because on multi-line, it lines up... easier to identify a series. |
19:18:39 | FromDiscord | <clyybber> but its used for pattern matching |
19:18:56 | FromDiscord | <clyybber> normally |
19:19:38 | FromDiscord | <clyybber> also _ is commonly used as a placeholder |
19:19:44 | FromDiscord | <clyybber> so it just fits |
19:20:41 | disruptek | i think it's better than nothing, literally. |
19:20:58 | dadada | I dislike being forced to write _ |
19:21:02 | disruptek | seems reasonable to disagree with that, of course. |
19:21:16 | disruptek | ~_ is unreachable |
19:21:17 | disbot | _: 11unreachable |
19:21:21 | FromDiscord | <clyybber> dadada: And you won't be |
19:21:25 | FromDiscord | <clyybber> Its optional |
19:21:26 | FromDiscord | <clyybber> you don't have to |
19:21:40 | disruptek | yeah, i don't think it should be optional. |
19:21:51 | disruptek | pick something. |
19:21:56 | FromDiscord | <clyybber> no? |
19:22:06 | FromDiscord | <clyybber> flexibility |
19:22:09 | Araq | I dislike the '_', if it's not the first argument, write it out as multiple statements without 'dup'. but some compromise had to be made |
19:22:20 | FromGitter | <matrixbot> `reversem3` So pyjamas was an awesome project that got turned into pyjs. Then died. Pyjs was working on using webgl also. |
19:22:24 | disruptek | why is it good to have it and also not have it? |
19:22:44 | disruptek | the flexibility is just more code in the compiler to worry about colliding with later. |
19:22:46 | dadada | clyybber, and why even have this option then? what exactly does _ add? and why do other languages not need it for chaining? I know this is probably frowned upon to bring up other languages as argument, but ... usually I think of Nim being the one offering nice syntax, and not make me type extra stuff |
19:22:50 | FromDiscord | <clyybber> disruptek: No |
19:22:58 | FromDiscord | <clyybber> this won't be done in the compiler |
19:23:13 | disruptek | it'll be in the compiler eventually. |
19:23:23 | Araq | disruptek: the motivation is to *enable* calls like x.dup(inPlaceFilter(f, _)) |
19:23:29 | FromDiscord | <clyybber> dadada: So you can specify the argument position |
19:23:43 | disruptek | fair enough. |
19:23:48 | FromDiscord | <clyybber> and if its an *option* IT DOESNT make you type extra stuff |
19:23:52 | FromGitter | <matrixbot> `reversem3` Is there any talk about nim compiling to web assembly? |
19:23:54 | disruptek | can i foo(f, _, y, _)? |
19:23:59 | FromDiscord | <clyybber> no |
19:24:02 | disruptek | see nlvm |
19:24:05 | disruptek | !repo nlvm |
19:24:05 | disbot | https://github.com/arnetheduck/nlvm -- 9nlvm: 11LLVM-based compiler for the Nim language 15 259⭐ 18🍴 7& 1 more... |
19:24:07 | FromDiscord | <clyybber> but you can foo(, _, y) |
19:24:18 | disruptek | oi |
19:24:31 | disruptek | you are making my balls throb. |
19:24:36 | Araq | reversem3: you can do it but then you cannot do anything with today's wasm yet as the spec is in development for forever |
19:24:55 | disruptek | my opinion, _ is required. |
19:25:16 | Araq | but that's just my opinion, still looking for anything in wasm that convinces me of its merits |
19:25:20 | FromDiscord | <clyybber> dadadas opinion: He doesn't like it |
19:25:33 | FromDiscord | <clyybber> so my opinion: Allow both |
19:25:39 | FromDiscord | <clyybber> and also allow sort |
19:25:42 | disruptek | i don't want to guess at what exists and where. |
19:25:49 | FromDiscord | <clyybber> bruh |
19:25:53 | disruptek | bra |
19:25:58 | Araq | lol |
19:26:11 | FromDiscord | <clyybber> there are already many ways to call a proc in nim :p |
19:26:17 | FromGitter | <matrixbot> `reversem3` @Araq if don’t mind me asking what do you in nvim for indentation? |
19:26:17 | Araq | if you don't want to guess, reading about a topic usually helps |
19:26:25 | FromDiscord | <clyybber> why should we artificially restrain it in dup ? |
19:26:43 | disruptek | i don't want to guess while reading. i want to look for _ and find it. |
19:26:44 | * | abm joined #nim |
19:26:50 | FromGitter | <matrixbot> `reversem3` * @Araq if don’t mind me asking what do you use in nvim for indentation? |
19:26:57 | FromDiscord | <clyybber> you can |
19:26:57 | dadada | Araq: not being stuck with JavaScript is a big reason to like WASM, it's supposedly a bit faster, it will probably allow for porting complex games to the web in the future that are written in ie. C++, and will target the new WebGPU standard ... |
19:26:58 | FromDiscord | <clyybber> in your code :p |
19:27:03 | disruptek | !repo nvim |
19:27:04 | disbot | https://github.com/jangko/nvim_client -- 9nvim_client: 11Neovim Client Library for Nim -- MsgPack RPC API 15 3⭐ 0🍴 |
19:27:16 | disruptek | !repo nvim author:alaviss |
19:27:17 | disbot | no results 😢 |
19:27:22 | disruptek | dafuq |
19:27:26 | dadada | WebGPU being a lightVulkan |
19:27:27 | FromDiscord | <clyybber> hmm |
19:27:37 | disruptek | !repo nim.nvim |
19:27:37 | FromDiscord | <clyybber> dadada: light as in heavy? |
19:27:39 | disbot | https://github.com/baabelfish/nvim-nim -- 9nvim-nim: 11Vim support for nim. 15 53⭐ 17🍴 7& 3 more... |
19:27:43 | disruptek | he's not heavy, he's my brother. |
19:27:54 | FromDiscord | <clyybber> dadada: Nah, webgpu is cool, but its a layer on Top of vulkan |
19:27:58 | disruptek | https://github.com/alaviss/nim.nvim |
19:28:07 | FromDiscord | <clyybber> and its API is not really simpler |
19:28:17 | dadada | clyybber: no, as in a little less low-level, thus a little easier to program for, but still pretty low-level compared to OpenGL |
19:28:54 | Araq | no threading, no file API |
19:29:04 | Araq | no OS |
19:29:14 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:29:21 | dadada | there's even support for accessing USB in chrome by now :-) and bluetooth |
19:29:23 | Araq | I'd rather have native applications |
19:29:38 | FromDiscord | <clyybber> same |
19:30:05 | dadada | what's this native thing? do I have to program in assembler? |
19:30:11 | disruptek | yep. |
19:30:22 | dadada | obviously I understand what you're getting at |
19:31:03 | Araq | last time I checked wasm uses the same workarounds for function pointers as asm.js does |
19:31:21 | dadada | Araq: when was that time? |
19:31:32 | Araq | maybe 6 months ago |
19:31:37 | disruptek | can't be as bad as using strings for dynamic dispatch on native. |
19:31:53 | Araq | disruptek: hey hey now! |
19:31:58 | disruptek | oh my bad |
19:32:25 | dadada | Araq: regarding what browser, they're definitely improving it at different speeds, chrome usually being ahead, but not always |
19:32:26 | Araq | I can fix it. can wasm be fixed? |
19:32:47 | disruptek | who cares? |
19:33:05 | FromDiscord | <clyybber> dadada: In the end you either have the same problems like you have in native |
19:33:10 | FromDiscord | <clyybber> or you have google monopoly |
19:33:11 | Araq | https://emscripten.org/docs/porting/guidelines/function_pointer_issues.html |
19:34:08 | disruptek | seems like you can fix it for nim-wasm. |
19:34:21 | disruptek | but again, who cares... |
19:34:30 | dadada | clyybber: of course there'll always be issues, now regarding monopoly, I hope firefox can keep up somehow, and we must be grateful that MS didn't win the browser war |
19:34:50 | dadada | clyybber: it's not a given that the most popular browser has FOSS code |
19:35:00 | dadada | clyybber: IE used to dominate for many years |
19:35:13 | FromDiscord | <clyybber> if MS did win we wouldn't have shit storms |
19:35:21 | disruptek | have you heard about their new 20mb runtime? |
19:35:29 | dadada | clyybber: by what logic? |
19:35:30 | FromDiscord | <clyybber> since by the time you load the page, the storm is over |
19:35:36 | disruptek | yeah, it was rewritten from scratch. ie11. only 20mb. |
19:35:46 | disruptek | that's all it took, apparently. |
19:35:53 | disruptek | just a from-scratch rewrite of a modern browser. |
19:36:01 | disruptek | fun weekend project. and in only 20mb. |
19:36:19 | disruptek | i'm sure there's no foss in there. |
19:36:24 | disruptek | where would they fit it? |
19:38:57 | * | sigmapie8 joined #nim |
19:39:20 | * | sigmapie8_ joined #nim |
19:39:28 | * | sigmapie8_ quit (Client Quit) |
19:39:43 | Araq | disruptek: link? |
19:40:04 | disruptek | some knucklehead looking at a windows ps. |
19:41:53 | * | Hideki_ joined #nim |
19:44:59 | disruptek | posted here earlier: http://roryok.com/blog/2017/08/electron-memory-usage-compared-to-other-cross-platform-frameworks/ |
19:46:03 | * | Hideki_ quit (Ping timeout: 240 seconds) |
19:49:33 | FromDiscord | <exelotl> does `end` mean anything in Nim? |
19:49:43 | disruptek | end? |
19:50:10 | leorize | it's used for source code filters |
19:50:40 | disruptek | is it documented anywhere other than doc/keywords.txt? |
19:50:56 | dadada | disruptek: Qt was used with python, so without python Qt would've absolutely smoked the rest in memory usage |
19:51:59 | disruptek | i've used it with and without. but this is just a ridiculously flawed collection of "data", afaic. |
19:53:49 | Araq | yeah, it's pretty worthless |
19:54:14 | Araq | in practice this web stuff adds up and does have higher memory consumption |
19:57:29 | * | marmotini_ quit (Remote host closed the connection) |
19:57:43 | * | solitudesf joined #nim |
19:58:03 | * | marmotini_ joined #nim |
19:59:15 | * | solitudesf- quit (Ping timeout: 240 seconds) |
20:02:03 | * | marmotini_ quit (Ping timeout: 240 seconds) |
20:14:18 | * | fvs quit (Quit: leaving) |
20:15:59 | * | jjido joined #nim |
20:27:50 | FromGitter | <ejstembler_gitlab> I'm using `db_postgres`. Is there a way to consolidate these two procs below into one? Using generics or something? `InstantRow` seems to be indexable like `seq[string]` (Row). ⏎ ⏎ `proc authorFromSeqString(row: seq[string]): Author = ...` ⏎ `proc authorFromInstantRow(row: InstantRow): Author = ...` [https://gitter.im/nim-lang/Nim?at=5e48544518ac9b0fb5c17991] |
20:51:53 | dadada | is this https://github.com/nim-lang/Nim/blob/devel/lib/wrappers/mysql.nim |
20:51:56 | dadada | autogenerated? |
21:05:30 | * | krux02 joined #nim |
21:09:59 | Araq | sure |
21:10:49 | disruptek | you know what we should do? |
21:10:58 | disruptek | you can msg the bot to paste. |
21:11:05 | Araq | ejstembler_gitlab: yeah but why would you, make up your mind and use only one variant |
21:11:20 | disruptek | you just message whatever you want and the bot turns it into playground and pastebin and whatever. |
21:11:27 | disruptek | and links it all to the channel. |
21:11:44 | disruptek | and it can pick up discord/gitter pastes and do the same thing. |
21:12:07 | Araq | disruptek: sounds like a good idea |
21:12:24 | disruptek | yeah, i think it could work well. |
21:12:48 | disruptek | it can also teach people whenever they paste in the channel. |
21:12:56 | disruptek | so no one else has to. |
21:12:58 | FromDiscord | <clyybber> and the bot will be on discord? |
21:13:09 | disruptek | i mean, it's in here. same as ever. |
21:13:12 | dadada | https://play.nim-lang.org/#ix=2bOU ... is there any plan to support a syntax without the paranthesis? |
21:13:24 | disruptek | it can't get in front of the discord users, but it can teach them to use it as their relay. |
21:13:38 | FromDiscord | <clyybber> disruptek: Ah, yeah |
21:14:00 | disruptek | dadada: i don't think it's easily done, no. |
21:14:05 | FromDiscord | <clyybber> I thought when it is on discord directly then it could detect pastes and make it into a ix io |
21:14:09 | FromDiscord | <clyybber> before it reaches irc |
21:14:14 | disruptek | yeah, it can. |
21:14:21 | disruptek | if it's the bridge. |
21:14:25 | FromDiscord | <clyybber> tho its probably a job for the bridge |
21:14:26 | FromDiscord | <clyybber> yeah |
21:14:52 | disruptek | another idea i had for the bot: |
21:15:21 | disruptek | it has a radio that you can tune. the radio picks up github traffic/chatter and relays it. |
21:15:40 | disruptek | it can tell you when prs pass, for example. |
21:15:54 | disruptek | new issues, even new posts. |
21:16:31 | * | nsf quit (Quit: WeeChat 2.7) |
21:16:35 | FromDiscord | <clyybber> rss over irc |
21:17:19 | disruptek | well, it works well for me because it lets me use irc notification delivery, which i already have a lot of code around. |
21:17:42 | disruptek | but i think we had talked about a #nim-news where the bot would post notable stuff. |
21:18:12 | disruptek | even if it was just, "pr passed" and "pr merged", i think it would improve my life. |
21:18:53 | disruptek | i would personally like to see new packages added, maybe even new repos. |
21:19:47 | disruptek | because getting that info in my email is completely useless, as i documented in my nimble pr. |
21:20:27 | FromDiscord | <clyybber> which pr? |
21:20:45 | disruptek | it was a thing against `nimble publish`. |
21:20:55 | FromDiscord | <clyybber> ah |
21:21:07 | disruptek | !pull author:disruptek nimble publish |
21:21:08 | disbot | no results 😢 |
21:21:18 | * | narimiran quit (Quit: leaving) |
21:21:34 | disruptek | disbot: you're really useless sometimes, you know that? |
21:21:35 | disbot | yep. 😊 |
21:24:04 | disruptek | anyway, what do you think? |
21:26:59 | * | Trustable joined #nim |
21:27:43 | FromDiscord | <clyybber> approval |
21:27:53 | FromDiscord | <clyybber> Sounds like a cool idea |
21:29:20 | disruptek | i need to figure out irssi windows at some point. i just hate to. i guess i can run two clients on the bouncer... hmm. |
21:31:06 | disruptek | here's an rss cli in nim: |
21:31:08 | disruptek | !repo roman |
21:31:09 | disbot | https://github.com/lcrees/romans -- 9romans: 11Convertions between integers and Roman numerals 15 2⭐ 0🍴 7& 1 more... |
21:31:15 | disruptek | nope, not that one. |
21:31:21 | disruptek | i will beat you black and blue, disbot. |
21:31:30 | disruptek | !repo reesmichael1/roman |
21:31:31 | disbot | https://github.com/reesmichael1/roman -- 9roman: 11A CLI RSS reader. Mirror of https://git.sr.ht/~reesmichael1/roman 15 0⭐ 0🍴 |
21:32:07 | disruptek | !repo johnconway/feed-nim |
21:32:08 | disbot | https://github.com/johnconway/feed-nim -- 9feed-nim: 11A feed parsing module for Nim 15 13⭐ 2🍴 |
21:32:15 | disruptek | this is 9mos old. |
21:32:37 | disruptek | it's based upon this one: |
21:32:44 | disruptek | !repo achesak/nim-rss |
21:32:45 | disbot | https://github.com/achesak/nim-rss -- 9nim-rss: 11Nim RSS (Really Simple Syndication) module 15 3⭐ 4🍴 |
21:33:04 | * | Hideki_ joined #nim |
21:33:39 | FromDiscord | <clyybber> disruptek: U usin weechat? |
21:34:12 | FromGitter | <ejstembler_gitlab> @Araq I have one proc which returns all of the records (`proc authors*: seq[Author] = ...`) which uses `instantRows` and another one (`proc findAuthorById*(id: int): Author = ...`) which only one row which is using `getRow`. I guess I could change the one using `instantRows ` to `getAllRows` instead. |
21:34:38 | disruptek | johnconway is obviously someone who wants us to know that we shouldn't trust his code or knowledge, despite rewriting someone else's nim module as a novice to the language. then they go on to demonstrate that they know way more about the rss format than i do. |
21:35:34 | disruptek | ejstembler_gitlab: what you want is a common request; as common as your solution. |
21:37:04 | disruptek | an expansion to that api would probably make for a welcome pr. |
21:37:36 | dadada | it would be nice to have code completion on playground |
21:37:45 | * | Hideki_ quit (Ping timeout: 272 seconds) |
21:37:52 | disruptek | sounds easy. |
22:05:47 | Araq | https://erikmcclure.com/blog/debugging-through-webassembly-is-impossible/ not sure if it's correct |
22:06:23 | Araq | but it's from 2020 |
22:06:25 | FromDiscord | <clyybber> Regarding dup |
22:06:42 | Araq | clyybber are you in our telegram group? |
22:06:46 | FromDiscord | <clyybber> do we want .dup: sort; insert(10) |
22:06:48 | Araq | disruptek: same question |
22:06:49 | FromDiscord | <clyybber> Araq: Nope |
22:06:58 | Araq | well please join |
22:07:04 | FromDiscord | <clyybber> Araq: k |
22:07:11 | FromDiscord | <clyybber> where? |
22:07:52 | FromDiscord | <clyybber> https://t.me/nim_lang |
22:09:09 | Araq | maybe, I dunno, narimiran seems asleep |
22:10:21 | FromDiscord | <clyybber> regarding my dup question I mean to ask wether we want block syntax or call |
22:10:27 | FromDiscord | <clyybber> I would vote for block |
22:10:41 | FromDiscord | <clyybber> so we do x.dup: sort; insert(10) |
22:10:52 | FromDiscord | <clyybber> instead of x.dup(sort, insert(10)) |
22:11:42 | Araq | no, we do both |
22:12:01 | FromDiscord | <clyybber> Hmm ok |
22:12:16 | FromDiscord | <clyybber> So we make it take varargs |
22:12:28 | FromDiscord | <clyybber> and then check if the first arg is a stmtlist? |
22:13:16 | Araq | exactly |
22:14:26 | FromDiscord | <clyybber> Araq: joined |
22:14:53 | Araq | wrong one :P |
22:15:57 | * | NimBot joined #nim |
22:16:06 | Araq | btw my araq-arc-optimizations branch has some progress |
22:16:14 | Araq | for scope based destruction |
22:17:04 | disruptek | i thought we already had that. |
22:17:22 | clyybber | Oh, nice |
22:17:22 | * | opal quit (Remote host closed the connection) |
22:17:33 | FromDiscord | <exelotl> it's funny that you arrived at this syntax (allowing both block and call syntax), I settled on exactly the same thing for my GBA library just a few days before |
22:17:36 | * | opal joined #nim |
22:17:37 | FromDiscord | <exelotl> https://github.com/exelotl/natu/blob/master/natu/private/reg.nim#L399 |
22:18:06 | disruptek | yeah, i think it's an invention, honestly. |
22:18:25 | FromDiscord | <clyybber> ok, lets call it exellyybber syntax |
22:18:31 | FromDiscord | <clyybber> who makes the wikipedia entry? |
22:18:44 | disruptek | that guy with the funny name. |
22:18:48 | disruptek | jimmy. |
22:18:51 | FromDiscord | <clyybber> nigel |
22:19:00 | FromDiscord | <clyybber> ah wait |
22:19:09 | FromDiscord | <clyybber> he would need a helping hand |
22:21:00 | clyybber | Araq: This https://github.com/nim-lang/Nim/pull/13325/files/333b0fcd84987d32c561857000c8b55069a77f65..aa8a37e1f208768431d6f74bb4e9148bad50bc79#diff-586c73babdc7aadda90947310df85afcR428 is needed because E could use x or y right? |
22:21:01 | disbot | ➥ arc optimizations |
22:21:02 | Araq | https://emscripten-discuss.narkive.com/v9pRizaR/struggling-with-function-pointers oh look at that |
22:21:19 | FromDiscord | <exelotl> I needed it for optimisation reasons, because when `a` is a volatile variable it means `a.foo = 10; a.bar = 20` is likely to be slower than `var tmp = a; tmp.foo = 10; tmp.bar = 20; a = tmp` |
22:21:39 | FromDiscord | <exelotl> hence I settled on `a.edit(foo=10, bar=20)` which creates the temp behind the scenes |
22:22:09 | * | solitudesf quit (Ping timeout: 268 seconds) |
22:22:13 | * | sigmapie8 quit (Quit: Leaving) |
22:22:16 | Araq | clyybber: was the simplest transformation, no idea if it's correct |
22:22:30 | Araq | I didn't test this at all yet |
22:22:33 | FromDiscord | <clyybber> I think it is |
22:22:56 | Araq | exelotl: nice |
22:23:01 | FromDiscord | <clyybber> But if E is a func and doesn't take x or y we can elide the temporary |
22:23:07 | FromDiscord | <clyybber> though thats maybe a bit overkill |
22:23:55 | Araq | I'm tired of writing AST to AST transformations tbh |
22:24:12 | Araq | in my holidays I'll play around with alternative IRs |
22:24:13 | disruptek | that's a bad place to be. |
22:24:34 | disruptek | are you serious right now? |
22:24:49 | Araq | most of these things seem to be unnecessarily complicated (yes, I am) |
22:25:49 | clyybber | I doubt another IR makes it easier |
22:25:55 | clyybber | feel free to prove me wrong :) |
22:26:06 | disruptek | if you listen carefully, you can hear hundreds of programmer heads exploding. |
22:30:23 | Araq | disruptek: well good IRs are an art |
22:30:45 | clyybber | disruptek: Why are you dom? |
22:31:02 | disruptek | hum. |
22:31:21 | disruptek | i am just starting to get my head around it, myself. |
22:34:58 | disruptek | i'm starting to think about compile-time as a workshop where i build the machine that runs at runtime and does the i/o i give it. |
22:50:21 | disruptek | does that make sense? |
22:50:42 | FromDiscord | <clyybber> yeah |
22:51:21 | disruptek | so like, if i instrument a field in an object, i can have it write its value to a stream whenever it changes. |
22:51:37 | FromDiscord | <clyybber> yeah |
22:51:44 | disruptek | pretty doable. |
22:51:52 | FromDiscord | <clyybber> overwrite `field=` |
22:52:08 | FromDiscord | <clyybber> disruptek: Every program is just a lookup table for inputs |
22:52:14 | disruptek | so then we say, instrument /and run some compile-time code to do work/ |
22:52:31 | FromDiscord | <clyybber> but compressed very well |
22:52:39 | disruptek | right. |
22:53:03 | disruptek | so when we find more optimal versions of each, they should succeed. |
22:53:26 | FromDiscord | <clyybber> *they* ? |
22:54:08 | disruptek | the idea is minimal energy loss and the mass varies with the length of the program. |
22:54:51 | FromDiscord | <clyybber> and if you consider your inputs to be infinite |
22:55:55 | FromDiscord | <clyybber> I forgot what I wanted to say |
22:56:10 | disruptek | well, all bets are off for infinite input. |
22:56:36 | FromDiscord | <clyybber> |
22:56:36 | FromDiscord | <clyybber> https://cdn.discordapp.com/attachments/371759389889003532/678374123214471197/1534353932160111059013.png |
22:57:09 | FromDiscord | <Elegant Beef> Next you're going to say RTFM 😄 |
22:57:29 | FromDiscord | <Elegant Beef> So now im no longer iterating over empty entities in my ECS |
22:57:31 | FromDiscord | <Elegant Beef> im a genius 😄 |
22:57:42 | disruptek | yay |
22:58:10 | disruptek | i feel like we lost weight. |
22:59:26 | clyybber | Araq: Is it possible to have pop a value out of an intset with O(1) ? |
22:59:55 | clyybber | The only constraint is that the value has to be in the intset |
23:00:24 | FromGitter | <deech> Dumb q, how do I "import" a NimScript module? Or do I have to `include` it? |
23:02:22 | FromDiscord | <Elegant Beef> isnt poping a value out of a set inheritely O(1)? |
23:02:33 | FromDiscord | <Elegant Beef> thought the point of a set was O(1) access and removale |
23:02:34 | FromDiscord | <Elegant Beef> thought the point of a set was O(1) access and removal |
23:02:40 | FromDiscord | <Elegant Beef> guess that's a hashset im thinking of |
23:02:54 | clyybber | Elegant Beef: No you are right |
23:03:00 | clyybber | But I mean popping any value |
23:03:06 | clyybber | you don't say what value you want to pop |
23:03:14 | clyybber | it just pops you some value that is in the intset |
23:03:36 | clyybber | it feels like it should be O(1) |
23:03:37 | FromDiscord | <Elegant Beef> You'd have to get the iterator to get the value |
23:03:45 | FromDiscord | <Elegant Beef> since there is no accessor method |
23:03:50 | FromDiscord | <Elegant Beef> atleast currently 😄 |
23:04:05 | clyybber | Ah |
23:04:10 | FromDiscord | <Elegant Beef> Could always have a pop method that removes the first element |
23:04:24 | clyybber | Elegant Beef: Yeah |
23:04:28 | FromDiscord | <Elegant Beef> But even then that's dubious |
23:04:37 | FromDiscord | <Elegant Beef> since idk how sets store data exactly 😄 |
23:05:00 | clyybber | Elegant Beef: I think you can use intset for your ID mechanism then |
23:05:05 | FromDiscord | <Elegant Beef> already did |
23:05:06 | clyybber | instead of a queue |
23:05:08 | clyybber | oh |
23:05:13 | FromDiscord | <Elegant Beef> queue is for past keys |
23:05:21 | clyybber | I mean for past keys |
23:05:29 | clyybber | just incl them in the intset |
23:05:32 | clyybber | and write a pop proc |
23:06:03 | FromDiscord | <Elegant Beef> Well you need to get the items to get the elements |
23:06:16 | FromDiscord | <Elegant Beef> so unless a pointer can always point to it's iterator that'd be slower i imagine |
23:06:30 | clyybber | Just break on the first iteration |
23:06:41 | clyybber | Or make a PR for a pop proc :) |
23:06:44 | FromDiscord | <Elegant Beef> yes but the getting of the iterator is an operation i believe |
23:07:14 | clyybber | its inlined |
23:07:29 | clyybber | so theres no overhead |
23:08:14 | FromDiscord | <Elegant Beef> ok i guess |
23:10:16 | FromGitter | <deech> Yep, have to `include` `.nims` files if you want to reuse. |
23:12:48 | disruptek | sets are 16bit, right? |
23:13:06 | clyybber | yeah |
23:13:13 | clyybber | but intsets are bigger |
23:13:25 | FromGitter | <deech> I made a little downloader in NimScript that just downloads a file from a URL. It's just a little wrapper around `curl` and `powershell`. The existing stdlib HTTPClient doesn't run in NimScript and this one also supports proxy digest auth across platforms. https://github.com/deech/nimscript_downloader |
23:13:38 | disruptek | yeah. i just keep confusing them with something else. |
23:13:45 | FromGitter | <deech> You can use it to pull something off the web at build time. |
23:14:16 | clyybber | deech: Ha, cool |
23:14:25 | clyybber | Why not make it pure nims? |
23:14:29 | disruptek | deech: that sounds like something either shashlick made or is very interested in. |
23:14:46 | FromGitter | <deech> How would you make it pure nims? |
23:16:45 | clyybber | I mean, remove the .sh and .psh file |
23:16:54 | clyybber | and call curl from nims directly |
23:19:24 | FromGitter | <deech> Ah, IME it's easier to debug if you have separate files. |
23:20:33 | FromDiscord | <Elegant Beef> Ah nice for some reason i can make this pop work when it's in another nim file |
23:20:36 | FromDiscord | <Elegant Beef> cant* |
23:21:11 | clyybber | Elegent Beef: Argh, yeah you hit this https://github.com/nim-lang/Nim/issues/11167 bug I think |
23:21:13 | disbot | ➥ for loop invoked from generic procedure defined in another module cant find `items` iterator ; snippet at 12https://play.nim-lang.org/#ix=2bPm |
23:22:00 | FromDiscord | <Elegant Beef> i mean i just declared a proc in on file, it says it cant be found, i move it to the file it works |
23:22:04 | FromDiscord | <Elegant Beef> so that's nice 😄 |
23:22:52 | FromDiscord | <Kiloneie> When will the Nim survey be aprox doney im very curious. |
23:24:01 | FromDiscord | <Elegant Beef> Just for context this is my proc |
23:24:01 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2bPp |
23:24:58 | FromDiscord | <clyybber> @Elegant Beef workaround is to call items explicitily |
23:25:09 | FromDiscord | <Elegant Beef> you mean filename.proc? |
23:25:14 | FromDiscord | <Elegant Beef> already tried that |
23:25:20 | FromDiscord | <clyybber> no |
23:25:25 | FromDiscord | <clyybber> for x in iSet.items: |
23:26:01 | FromDiscord | <clyybber> also why do you check for the length? |
23:26:23 | FromDiscord | <Elegant Beef> cause if it's -1 i want to expand the sequence |
23:26:33 | FromDiscord | <clyybber> yeah |
23:26:42 | FromDiscord | <clyybber> but the check is unneccessary |
23:27:00 | FromDiscord | <Elegant Beef> yea you're right |
23:27:30 | FromDiscord | <Elegant Beef> that didnt fix it btwe |
23:27:31 | FromDiscord | <Elegant Beef> that didnt fix it btw |
23:27:37 | FromDiscord | <clyybber> oh |
23:28:02 | FromDiscord | <Elegant Beef> |
23:28:02 | FromDiscord | <Elegant Beef> https://cdn.discordapp.com/attachments/371759389889003532/678382033352785920/unknown.png |
23:28:06 | FromDiscord | <Elegant Beef> Doesnt seem to find a viable method |
23:28:49 | FromDiscord | <Kiloneie> Sorry, if anyone knows Nim 2019 or 2020, not sure how this goes knows survey results, please @ me, i am very curious. |
23:28:56 | FromDiscord | <clyybber> haha |
23:29:03 | FromDiscord | <clyybber> @Elegant Beef you missed the export star |
23:29:08 | FromDiscord | <Elegant Beef> ... |
23:29:13 | FromDiscord | <Elegant Beef> can i have my public 😄 |
23:29:53 | FromDiscord | <clyybber> you can do export pop |
23:29:54 | FromDiscord | <clyybber> too |
23:30:11 | FromDiscord | <Elegant Beef> oh |
23:30:14 | FromDiscord | <Elegant Beef> im doing that then |
23:30:19 | FromDiscord | <clyybber> wait a minute |
23:30:23 | FromDiscord | <Elegant Beef> cause that something my brain doesnt mis |
23:30:23 | FromDiscord | <Elegant Beef> cause that something my brain doesnt miss |
23:30:27 | FromDiscord | <clyybber> I'll write you a public template |
23:30:31 | FromDiscord | <Elegant Beef> lol |
23:31:06 | FromDiscord | <Elegant Beef> that little asterix isnt visible enough to my small brain to notice it being gone |
23:31:42 | disruptek | kiloneie: the results will come out within a month or two. |
23:31:56 | FromDiscord | <Elegant Beef> I do like that "hey i want this", "Ok it'll be done" method of nim |
23:32:29 | disruptek | that sounds great, what is it? |
23:33:12 | FromDiscord | <Kiloneie> Thank you bot. 0 promises, i might restart, i feel so damn guilty for not finishing my series. |
23:33:23 | FromDiscord | <Elegant Beef> That's no bot |
23:33:33 | FromDiscord | <Elegant Beef> that's the irc bridge, why you gotta disrespect disruptek |
23:33:45 | disruptek | lol |
23:34:30 | disruptek | but seriously. |
23:34:38 | disruptek | what the hell are you talking about, beef? |
23:34:42 | FromDiscord | <Kiloneie> Sorry, im not 100% sober |
23:34:59 | disruptek | me too. this might require a very sharp wit. |
23:34:59 | FromDiscord | <Kiloneie> More like 15% |
23:35:07 | FromDiscord | <Elegant Beef> well clyyber making a public template instead of using export or * |
23:35:10 | disruptek | shit man, get behind me. |
23:35:20 | FromDiscord | <Elegant Beef> also seems the language itself is very modifiable |
23:35:23 | FromDiscord | <Elegant Beef> So feature you want can be added |
23:35:36 | disruptek | right, that's the idea. |
23:35:45 | FromDiscord | <Kiloneie> Anything is possible. |
23:35:53 | FromDiscord | <Elegant Beef> I know |
23:35:55 | disruptek | almost. i couldn't add for: else: |
23:36:08 | FromDiscord | <Elegant Beef> Im saying it's cool |
23:36:22 | disruptek | hell no it ain't. |
23:36:24 | FromDiscord | <Elegant Beef> in most languages i've used it's not that expandable |
23:38:29 | disruptek | this isn't most languages. |
23:39:05 | FromDiscord | <Elegant Beef> yes i know |
23:39:12 | FromDiscord | <Elegant Beef> what's the method of making a public getter? |
23:39:25 | FromDiscord | <Elegant Beef> i mean the standard method |
23:39:25 | disruptek | what does it do? |
23:39:30 | FromDiscord | <Elegant Beef> gets a private variable |
23:39:34 | FromDiscord | <Elegant Beef> gets a private unexposed variable |
23:39:46 | FromDiscord | <Elegant Beef> so it's a internally read only variable |
23:39:57 | FromDiscord | <Elegant Beef> proper protection/access levels |
23:40:01 | disruptek | sure. |
23:40:10 | FromDiscord | <Elegant Beef> so it's a externally read only variable |
23:40:50 | FromDiscord | <Elegant Beef> like in C# the standard is _variableName for the private field and VariableName for the public getter |
23:40:52 | disruptek | getters and setters are easily modeled with `name=`() procs. |
23:41:06 | FromDiscord | <Elegant Beef> well that's a setter |
23:41:12 | disruptek | yes. |
23:41:46 | FromDiscord | <Elegant Beef> im just talking about the naming scheme |
23:41:59 | disruptek | there's no such thing. |
23:42:07 | FromDiscord | <Elegant Beef> ok so just do whatever works |
23:42:08 | FromDiscord | <Elegant Beef> lol |
23:42:08 | FromGitter | <Varriount> `proc name*(f: Foo): int = foo.privateInt` |
23:42:28 | FromDiscord | <Elegant Beef> yea i got how it was more how do you name this in nim |
23:42:28 | FromDiscord | <Elegant Beef> 😄 |
23:43:07 | FromGitter | <Varriount> Any particular reason it needs to be read-only? |
23:43:27 | FromDiscord | <Elegant Beef> It's time for in theory a game engine |
23:43:29 | FromDiscord | <clyybber> @Elegant Beef https://play.nim-lang.org/#ix=2bPu |
23:43:30 | FromDiscord | <Kiloneie> Naming scheme in Nim is very, very flexible, so choose your naming scheme according to your programming techinues. |
23:43:41 | FromDiscord | <Elegant Beef> so i want it to update itself but not be changable from outside |
23:43:57 | FromDiscord | <Elegant Beef> `echo "beef sucks"` i like your style |
23:44:11 | FromDiscord | <clyybber> only does it if you do use it incorrectly :p |
23:44:20 | disruptek | holy smokes this wasm debug problem. |
23:44:56 | FromDiscord | <Elegant Beef> Is there a way to expose an import project wide? |
23:45:03 | FromDiscord | <Elegant Beef> export in the main file? |
23:45:10 | FromDiscord | <clyybber> nah |
23:45:18 | disruptek | no. imports have a simple and effective semantic. |
23:45:24 | * | dadada quit (Ping timeout: 268 seconds) |
23:45:32 | FromDiscord | <clyybber> that would be a bad idea |
23:45:47 | FromDiscord | <Elegant Beef> Well it allows things like this without having to modify nim |
23:46:01 | FromDiscord | <clyybber> its how you get blog posts about some company abondoning nim because it "doesnt scale" |
23:46:03 | FromDiscord | <Elegant Beef> assuming you want to be able to use this project wide without importing public every single time |
23:46:11 | disruptek | i think it should be hard to implement bad ideas. |
23:46:23 | FromDiscord | <Elegant Beef> Well then ill go be stupid elsewhere |
23:46:39 | FromDiscord | <clyybber> minuto |
23:46:41 | FromGitter | <Varriount> Elegant Beef: Macros. The answer is always macros |
23:46:43 | FromDiscord | <clyybber> might be actually possible |
23:47:07 | FromGitter | <Varriount> Elegant Beef: There might also be a way to do it from the command line, or by using patchfile |
23:47:22 | FromDiscord | <Elegant Beef> Doesnt a patchfile mean you have to rebuild nim? 😄 |
23:47:32 | disruptek | you can do it from the command-line. |
23:47:37 | disruptek | but that's not the point. |
23:47:53 | FromDiscord | <clyybber> hmm |
23:48:12 | FromGitter | <Varriount> Ah, here it is: `--import:PATH add an automatically imported module` |
23:48:22 | FromDiscord | <clyybber> ah, that was it |
23:48:35 | FromDiscord | <Elegant Beef> ah so there is a way to globally import 😄 |
23:48:41 | disruptek | and still not the point. |
23:48:54 | FromDiscord | <Elegant Beef> calm down lads im not doing it |
23:48:58 | FromDiscord | <Elegant Beef> It's going to be ok |
23:49:04 | FromDiscord | <clyybber> do it anyways |
23:49:11 | disruptek | awww shoot |
23:49:12 | FromGitter | <Varriount> Burn the world >:D |
23:49:23 | FromGitter | <Varriount> Or at least, your program |
23:49:34 | FromDiscord | <clyybber> @Elegant Beef and for coninience |
23:49:59 | FromGitter | <Varriount> `--import` is likely meant for some esoteric cases |
23:49:59 | FromDiscord | <clyybber> simply add switch("import", "public.nim") to your config.nims |
23:50:12 | FromDiscord | <clyybber> @Elegant Beef voncienience |
23:50:15 | FromDiscord | <clyybber> convinience |
23:50:17 | FromDiscord | <clyybber> guddamnit |
23:50:38 | FromDiscord | <Elegant Beef> "config.nims" |
23:50:39 | FromDiscord | <Elegant Beef> Ha! |
23:50:51 | FromDiscord | <Elegant Beef> Like i have anything other than .nim files and git files |
23:50:59 | FromDiscord | <clyybber> create it |
23:51:07 | FromDiscord | <clyybber> touch it |
23:51:12 | FromDiscord | <Elegant Beef> caress it? |
23:51:13 | FromDiscord | <clyybber> prof it |
23:51:15 | FromDiscord | <clyybber> ??? |
23:52:11 | FromDiscord | <clyybber> then caress it |
23:52:34 | FromDiscord | <Elegant Beef> Look at this nice getID proc though |
23:52:34 | FromDiscord | <Elegant Beef> https://cdn.discordapp.com/attachments/371759389889003532/678388211009060903/unknown.png |
23:52:48 | FromDiscord | <Elegant Beef> I know i can just use len |
23:52:49 | FromDiscord | <Elegant Beef> leave me alone! |
23:52:53 | FromDiscord | <clyybber> its nice |
23:53:01 | disruptek | this wasm postmortem is insane. |
23:53:48 | * | dadada joined #nim |
23:54:11 | * | dadada is now known as Guest81820 |
23:54:27 | FromDiscord | <Kiloneie> It will get easier over time. |
23:54:35 | FromDiscord | <clyybber> dieing? |
23:54:44 | FromDiscord | <clyybber> good to know.. |
23:54:54 | FromDiscord | <Elegant Beef> So has anyone actually looked at my nimcs code? 😄 |
23:54:55 | FromGitter | <Varriount> alias caress='touch' |
23:55:02 | FromDiscord | <clyybber> @Elegant Beef I did |
23:55:07 | FromDiscord | <Elegant Beef> ah good |
23:55:12 | FromDiscord | <clyybber> no bad |
23:55:17 | FromDiscord | <clyybber> jk lol |
23:55:50 | FromDiscord | <Elegant Beef> hey considering i just forgot to expose a proc and was confused why it wasnt working, it probably looks better than it is |
23:56:06 | FromDiscord | <Kiloneie> Show it |
23:56:11 | FromDiscord | <Elegant Beef> !repo nimcs |
23:56:11 | disbot | https://github.com/beef331/nimcs -- 9nimcs: 11Nim ECS 15 0⭐ 0🍴 |
23:56:16 | FromDiscord | <Elegant Beef> Ehhh |
23:56:30 | FromDiscord | <clyybber> whoo, your famous |
23:56:37 | FromDiscord | <Elegant Beef> Yes i know move everything into a src folder |
23:56:52 | FromDiscord | <clyybber> no |
23:56:54 | FromDiscord | <clyybber> don't |
23:56:57 | FromDiscord | <clyybber> be the rebellion |
23:57:01 | FromDiscord | <clyybber> the rebel |
23:57:02 | FromDiscord | <Elegant Beef> lol |
23:57:21 | FromDiscord | <clyybber> disbot is a huge fan of yours |
23:57:23 | FromDiscord | <Elegant Beef> Im making quite a bit of backend for a gameengine apparently 😄 |
23:57:35 | FromDiscord | <Elegant Beef> probably named after that disruptek guy |
23:57:57 | FromDiscord | <clyybber> nah its the other way around |
23:58:12 | FromDiscord | <clyybber> disbot created this ruptek guy |
23:58:21 | FromDiscord | <clyybber> hes the source of all chaos |
23:58:31 | FromDiscord | <Elegant Beef> so clyybber when do i get access to your game engine so i can feed the ecs into something? |
23:59:04 | FromDiscord | <clyybber> when its ready TM |
23:59:06 | FromDiscord | <clyybber> lol |
23:59:25 | FromDiscord | <Elegant Beef> my ecs or your engine? |
23:59:30 | FromDiscord | <clyybber> my engine |
23:59:34 | FromDiscord | <Kiloneie> Don't be greedy :P. |