00:00:09 | FromDiscord | <victory> so like this? `if not i.guild_id.isSome:` |
00:00:19 | FromDiscord | <Elegantbeef> `isNone` |
00:00:31 | FromDiscord | <victory> i want to check if its not there |
00:00:34 | FromDiscord | <victory> oh |
00:00:37 | FromDiscord | <victory> i can just do isNone |
00:00:38 | FromDiscord | <victory> i see |
00:00:58 | FromDiscord | <victory> i also had another question, do people not write `()` at the end of procedure calls if the procedure doesn't take a parameter? |
00:01:21 | FromDiscord | <Elegantbeef> Some done |
00:01:22 | FromDiscord | <Elegantbeef> dont\ |
00:01:26 | FromDiscord | <victory> i see |
00:01:26 | FromDiscord | <Elegantbeef> Some do |
00:01:29 | FromDiscord | <Elegantbeef> Depedns on the procedure name |
00:01:31 | FromDiscord | <victory> so `isNone` is a proc? |
00:01:40 | FromDiscord | <victory> (edit) "so `isNone` is a proc? ... " added "but theres no reason to use ()?" |
00:01:42 | FromDiscord | <Elegantbeef> If it's a procedure named like a property most dont |
00:01:49 | FromDiscord | <victory> ah okay |
00:01:55 | FromDiscord | <victory> ty |
00:02:11 | FromDiscord | <Elegantbeef> Indeed Nim is very flexible, so it's down to your preference |
00:02:25 | FromDiscord | <victory> okay, i'm rather new to nim but know the basics |
00:02:29 | FromDiscord | <victory> im working on a bot :D |
00:07:53 | FromDiscord | <victory> how do i get properties from ambiguous types? |
00:08:02 | FromDiscord | <huantian> don't have ambiguous types π |
00:08:06 | FromDiscord | <victory> well |
00:08:06 | FromDiscord | <Elegantbeef> Nim doesnt have ambiguous types |
00:08:28 | FromDiscord | <victory> im trying to index an interaction in dimscord but i cannot do `i.member.user.id` |
00:08:33 | FromDiscord | <victory> as its saying `member` is ambiguous |
00:08:37 | FromDiscord | <victory> or optional |
00:10:08 | FromDiscord | <huantian> member is an optional type, so you have to unwrap it |
00:10:13 | FromDiscord | <huantian> (edit) "optional" => "optiona" |
00:10:16 | FromDiscord | <victory> hm okay, ill check unwrapping out' |
00:10:17 | FromDiscord | <huantian> (edit) "optiona" => "option" |
00:10:32 | FromDiscord | <Elegantbeef> Like you said `member` is optional |
00:10:32 | FromDiscord | <Elegantbeef> You need to do `i.member.get.user.id` inside a `if i.member.isSome` |
00:10:49 | FromDiscord | <victory> ohhh |
00:10:54 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/options.html |
00:11:07 | FromDiscord | <victory> thank you |
00:17:13 | * | krux02 quit (Remote host closed the connection) |
00:19:26 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=47DU |
00:19:36 | FromDiscord | <Tuatarian> this fails to compile since s is of type `McNode:OjbectType` |
00:19:44 | FromDiscord | <Tuatarian> McNode is a ref object |
00:19:50 | FromDiscord | <Tuatarian> not sure how I should fix this? |
00:22:35 | FromDiscord | <Elegantbeef> Why are you manually calling destructors? |
00:22:55 | FromDiscord | <Elegantbeef> I'm so confused what you're doing |
00:23:12 | FromDiscord | <Elegantbeef> Why arent you just doing `n = s` |
00:23:28 | FromDiscord | <Tuatarian> I have a game tree |
00:23:40 | FromDiscord | <Tuatarian> when a move is made, not all nodes are irrelevant |
00:24:06 | FromDiscord | <Elegantbeef> So then copy what's important? |
00:24:07 | FromDiscord | <Tuatarian> the node that represents the move made and the child positions are still relevant |
00:24:19 | FromDiscord | <Tuatarian> right but why do an expensive copy of a lot of data when I can avoid it |
00:24:40 | FromDiscord | <Tuatarian> only destroying the data that is irrelevant and keeping the stuff that matters |
00:25:03 | FromDiscord | <Elegantbeef> Then use the proper GC systems and do `n: var T, a: sink McNode` |
00:25:23 | FromDiscord | <Tuatarian> can you explain what that is saying? |
00:25:38 | FromDiscord | <Elegantbeef> `sink` is Nim's "move data" |
00:25:38 | FromDiscord | <Tuatarian> I'm doing this thinking from a no-gc perspective |
00:25:47 | FromDiscord | <Tuatarian> which should be faster too I think |
00:28:38 | FromDiscord | <Tuatarian> oh wait I see |
00:28:46 | FromDiscord | <Tuatarian> wouldn't that also be expensive though? |
00:29:03 | FromDiscord | <Tuatarian> especially since the stored part of the game tree may be quite large? |
00:29:22 | FromDiscord | <Elegantbeef> With Nim you dont generally manually move |
00:29:23 | FromDiscord | <Elegantbeef> You use automatic move semantics |
00:29:39 | FromDiscord | <Tuatarian> right, but even that will move, right? |
00:29:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47DV |
00:29:44 | FromDiscord | <Tuatarian> what are move semantics btw? |
00:29:46 | FromDiscord | <Elegantbeef> Why? |
00:29:52 | FromDiscord | <Elegantbeef> ... |
00:30:02 | FromDiscord | <Elegantbeef> Move semantics are memory reuse |
00:30:07 | FromDiscord | <Elegantbeef> Instead of copying data you reuse it when you can |
00:30:21 | FromDiscord | <Elegantbeef> If you run the above program you will see that we take `a`'s string |
00:30:34 | FromDiscord | <Elegantbeef> We dont copy it |
00:30:35 | FromDiscord | <Elegantbeef> We take ownership of it |
00:30:48 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/destructors.html |
00:30:52 | FromDiscord | <Tuatarian> what does it mean to pass `sink T` as a param? |
00:31:01 | FromDiscord | <Elegantbeef> If you're using destructors and dont understand move semantics you'e got a problem |
00:31:12 | FromDiscord | <Elegantbeef> a `sink` parameter is moved |
00:31:22 | FromDiscord | <Elegantbeef> When possible |
00:31:41 | FromDiscord | <Elegantbeef> It doesnt make much sense given these are reference types though |
00:34:24 | FromDiscord | <Tuatarian> what would make more sense instead? |
00:34:43 | FromDiscord | <Elegantbeef> I dont really know what you're doing |
00:34:47 | FromDiscord | <Elegantbeef> You're just doing `n = s` |
00:34:54 | FromDiscord | <Elegantbeef> so why not just do `n = s` |
00:35:06 | FromDiscord | <Tuatarian> I'll explain, maybe will make more sense |
00:35:08 | FromDiscord | <Elegantbeef> You're already using references for the root object |
00:35:14 | FromDiscord | <Elegantbeef> So there is no copy |
00:35:17 | FromDiscord | <Tuatarian> s is a child node of the root object |
00:35:26 | FromDiscord | <Tuatarian> yes, if I do n=s I will have to use orc |
00:35:46 | FromDiscord | <Elegantbeef> Oh noes |
00:35:49 | FromDiscord | <Tuatarian> since n has params which are not referenced by s |
00:35:50 | FromDiscord | <Elegantbeef> If you have cycles you need a cycle collector |
00:35:57 | FromDiscord | <Tuatarian> no but the cycle breaker has notable overhead |
00:36:07 | FromDiscord | <Tuatarian> according to araq in that one post with a german title |
00:36:07 | FromDiscord | <Elegantbeef> Oh noes |
00:36:21 | FromDiscord | <Elegantbeef> Atlernatively dont use cyclical data types |
00:36:26 | FromDiscord | <Elegantbeef> That'd be the real solution here |
00:36:35 | FromDiscord | <Tuatarian> I mean, I'm trying to optimize this program to the greatest of my ability |
00:36:45 | FromDiscord | <Tuatarian> cyclic types are the most natural representation, not sure how else I'd go about it |
00:36:45 | FromDiscord | <Elegantbeef> So then dont use references |
00:37:03 | FromDiscord | <Elegantbeef> A sequence of entries that you use `ids` to reference |
00:37:09 | FromDiscord | <Elegantbeef> There for you do not need a reference |
00:37:24 | FromDiscord | <Tuatarian> how would I store them? |
00:37:33 | FromDiscord | <Elegantbeef> `seq[MyType]` |
00:37:36 | FromDiscord | <Elegantbeef> Super simple |
00:37:44 | FromDiscord | <Tuatarian> maybe but |
00:38:01 | FromDiscord | <Tuatarian> iirc resizable arrays resize operations are a copy |
00:38:11 | FromDiscord | <Tuatarian> assuming it is out of the "buffer" that it allocates |
00:38:46 | FromDiscord | <Tuatarian> copying multi gbs of data in memory seems like it would be unreasonably expensive |
00:39:09 | FromDiscord | <Tuatarian> is there no convenient way to do this kind of thing in Nim? |
00:39:13 | FromDiscord | <Elegantbeef> There is no but, if you dont want cyclical data types and want performance this is how you do it |
00:39:40 | FromDiscord | <Tuatarian> I don't mind cyclical data types |
00:39:47 | FromDiscord | <Elegantbeef> You're really making me cry |
00:39:50 | FromDiscord | <Tuatarian> I am happy to manage them myself |
00:39:57 | FromDiscord | <Tuatarian> but I am not sure how exactly to do it |
00:40:00 | FromDiscord | <Tuatarian> lmao |
00:40:07 | FromDiscord | <Elegantbeef> You make your own cycle collector |
00:40:18 | FromDiscord | <Elegantbeef> Wild idea i know |
00:41:06 | FromDiscord | <leorize> to judge if something is expensive, you really have to benchmark it |
00:41:21 | FromDiscord | <Elegantbeef> Nah just dick wave based off of hearsay |
00:41:28 | FromDiscord | <Tuatarian> lmao |
00:41:48 | FromDiscord | <Tuatarian> leorize: I don't know how to write the thing I would be benchmarking just using ORC against |
00:41:58 | FromDiscord | <Tuatarian> that's what I'm trying to get help with here |
00:42:02 | FromDiscord | <Elegantbeef> So just use orc... and if there is a performance issue then optimise |
00:42:14 | FromDiscord | <Tuatarian> there is always a performance issue |
00:42:15 | FromDiscord | <Elegantbeef> Premature optimisation is the enemy of production |
00:42:15 | FromDiscord | <leorize> write your entire program, then profile it, minimize time spent in hotspot, repeat |
00:42:29 | FromDiscord | <Elegantbeef> There isnt always a performance issue |
00:42:35 | FromDiscord | <Elegantbeef> Like jesus christ orc isnt going to make your program python levels of speed |
00:42:44 | FromDiscord | <Tuatarian> no one is saying that it will beef |
00:42:44 | FromDiscord | <Elegantbeef> People really need to learn that automatic memory management does not imply slow |
00:43:09 | FromDiscord | <Elegantbeef> Intelligent allocations and memory reuse is much better a solution that making your own cycle collectorr |
00:43:11 | FromDiscord | <Tuatarian> but it does possibly imply unneeded operations which may result in a slower program |
00:43:18 | FromDiscord | <Tuatarian> to know for sure, you would have to benchmark |
00:43:31 | FromDiscord | <Elegantbeef> In a normal world you write the code and if that's the hotspot you resolve it |
00:43:47 | FromDiscord | <Elegantbeef> You dont write code under an assumption without evidence |
00:44:09 | FromDiscord | <Elegantbeef> If you want a very fast program you avoid references anway |
00:44:11 | FromDiscord | <Elegantbeef> anyway\ |
00:44:23 | FromDiscord | <leorize> note that your overhead come not only from running the code, but waiting for memory reads as well |
00:44:27 | FromDiscord | <Tuatarian> are refs generally slow? |
00:44:36 | FromDiscord | <Elegantbeef> References destroy cache coherency |
00:44:38 | FromDiscord | <Tuatarian> waiting for memory reads meaning? |
00:44:51 | FromDiscord | <Elegantbeef> Reading memory is one of the slower operations you can do |
00:45:05 | FromDiscord | <Elegantbeef> It's much better to abuse the cache/cacheline and have data on your cpu |
00:45:11 | FromDiscord | <Tuatarian> right, but it is surely faster than writing right? |
00:45:16 | FromDiscord | <Tuatarian> I see |
00:45:21 | FromDiscord | <leorize> writing is actually faster |
00:45:52 | FromDiscord | <Tuatarian> huh |
00:46:10 | FromDiscord | <Elegantbeef> Given you dont understand how pointer indirection harms performance i do wonder why you think orc is so bad |
00:46:10 | FromDiscord | <leorize> since writes discard information, your CPU doesn't have to go to RAM, it just have to cache the write for future flushes |
00:46:46 | FromDiscord | <Tuatarian> I see |
00:46:55 | FromDiscord | <Tuatarian> so copy should only be super slow if the data isn't in cache? |
00:47:30 | FromDiscord | <leorize> yes |
00:47:39 | FromDiscord | <Elegantbeef> Regardless you avoid copying as much as possible |
00:47:39 | FromDiscord | <Tuatarian> that's interesting, did not know that |
00:47:49 | FromDiscord | <Tuatarian> right yeah |
00:47:57 | FromDiscord | <Elegantbeef> Copying is mainly slow due to the OS allocation heap allocations |
00:48:08 | FromDiscord | <Elegantbeef> Atleast if we're talking about sequences and the like |
00:48:11 | FromDiscord | <Tuatarian> also, do you generally know if data is in the cpucache or in RAM? |
00:48:13 | FromDiscord | <leorize> copying is not slow on its own, but it could be faster than trying not to copy, due to various CPU shenanigans |
00:48:41 | FromDiscord | <Elegantbeef> If you write intelligently designed systems you generally know when it's in the cache |
00:48:42 | FromDiscord | <Elegantbeef> π |
00:48:52 | FromDiscord | <Elegantbeef> ECS for instance heavily abuses the cache/cacheline |
00:49:14 | FromDiscord | <Elegantbeef> The entire point though is to store your data contiguously so when you fetch parts you get parts of others |
00:49:18 | FromDiscord | <ajusa> Anyone know who radsoc is on the forums? Curious because they mentioned nimja + HTMX, but they also have a 9 year gap in their post history |
00:49:37 | FromDiscord | <Elegantbeef> They're radsoc, you dont know radsoc?! |
00:49:42 | FromDiscord | <Tuatarian> lmao |
00:49:44 | FromDiscord | <Elegantbeef> They're only the greatest person known as radsoc! |
00:50:02 | FromDiscord | <victory> how can i check if the results of an `anonimongo` find query are empty? |
00:50:06 | FromDiscord | <Elegantbeef> Pointer types really are the enemy of performance |
00:50:21 | FromDiscord | <leorize> you typically load 64 \ cachelines bytes of data on memory access |
00:51:05 | FromDiscord | <leorize> if your data is too sparse, you end up filling your caches with data you don't need, trashing performance |
00:51:24 | FromDiscord | <Elegantbeef> We just need bigger caches |
00:51:28 | FromDiscord | <Tuatarian> so guys let's just sya for educational purposes or whatever, if I wanted to manually implement mem management for that data, how would I go about it? |
00:51:28 | FromDiscord | <Elegantbeef> 5700x3d is a start! |
00:51:54 | FromDiscord | <Elegantbeef> You'd need to walk the entire data finding the references that are dead then freeing htem |
00:52:28 | FromDiscord | <leorize> the simplest form of GC is reference counting |
00:53:36 | FromDiscord | <Elegantbeef> To make a cycle collector you get to make a GC that can handle that data structure |
00:54:02 | FromDiscord | <Elegantbeef> So just look at C implementation of cyclical data types and see how they free them |
00:54:29 | FromDiscord | <Elegantbeef> And after you do that consider just making a linear buffer or using orc |
00:56:31 | FromDiscord | <Elegantbeef> To elaborate more on the linear buffer, your usage of references is pretty much replicated with a type that stores a collection of integers are the indexes of the buffer |
00:57:33 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47DY |
00:57:46 | FromDiscord | <Elegantbeef> then whenever you do operations on `MCNode` you pass in the `seq[McNode]` so it can get the data it needs |
00:58:04 | FromDiscord | <Elegantbeef> This allows you to not have any cyclical graph for GC, have fewer heap allocations and more contiguous memory |
00:58:50 | FromDiscord | <leorize> it really depends on the kind of data being worked with, the rule of thumbs is to keep whatever is hot close together |
00:58:55 | FromDiscord | <Tuatarian> my biggest worry with this is that given as the seq is going to expand frequently, we may need a lot of resize ops |
00:59:02 | FromDiscord | <Elegantbeef> So what |
00:59:05 | FromDiscord | <Elegantbeef> Resizing is cheap if you preallocate |
00:59:15 | FromDiscord | <Elegantbeef> `newSeqOfCap(65000)` |
00:59:23 | FromDiscord | <Elegantbeef> Boom we just reduced resizing a lot |
00:59:30 | FromDiscord | <Tuatarian> unfortunately, these seqs are really gigantic |
00:59:39 | FromDiscord | <Elegantbeef> So what |
00:59:40 | FromDiscord | <leorize> you only have 64 bytes per cache line, so try to squeeze as much data in as you can |
00:59:51 | FromDiscord | <Elegantbeef> some have 128 π |
00:59:55 | FromDiscord | <Tuatarian> like to the point where we may well be preallocating 8+gb |
01:00:05 | FromDiscord | <leorize> also, 1GB in a seq is 1GB, but 1GB in sparse nodes can be 4GB |
01:00:20 | FromDiscord | <Tuatarian> why is that? |
01:00:32 | FromDiscord | <Tuatarian> because they have to also store each other's locations? |
01:01:13 | FromDiscord | <Tuatarian> also, that |
01:01:25 | FromDiscord | <ajusa> Nobody knows who radsoc is I guess |
01:01:57 | FromDiscord | <Tuatarian> he's probably not anybody other than himself |
01:02:05 | FromDiscord | <Elegantbeef> At that much memory you pretty much should figure out how stream operations i'd wager |
01:02:05 | FromDiscord | <leorize> this is because allocators must pack data linearly together, while sparse nodes can end up on any gap in RAM, and if your gaps are not small enough, new pages has to be allocated to store them |
01:02:05 | FromDiscord | <leorize> s/data/array/ |
01:02:07 | FromDiscord | <leorize> s/small/big |
01:03:06 | FromDiscord | <Elegantbeef> Just free all your references then regrow the structure so you have 0 heap blocks /s |
01:03:27 | FromDiscord | <leorize> lol |
01:04:12 | FromDiscord | <Tuatarian> ah I see |
01:04:16 | FromDiscord | <victory> how can i check if a property exists? i have a custom type called `BsonDocument` and its returned when you do a query to MongoDBβ΅β΅i want to check if `<Result>["id"]` exists, but I'm not sure how |
01:04:33 | FromDiscord | <leorize> btw, a cheap trick to use less ram is to... store less |
01:04:53 | FromDiscord | <Elegantbeef> Fuck dude with that statement you deserve all the acolades |
01:04:56 | FromDiscord | <SrMordred> Is there a way to `await` multiple futures until the first future resolve (like go `select`) ? |
01:05:33 | FromDiscord | <leorize> `int` is 64 bits/8 bytes, do you use all of it (you won't), or would uint32 do everything for you? |
01:06:01 | FromDiscord | <Tuatarian> In reply to @leorize "btw, a cheap trick": yeah I did an optimization pass earlier which basically amounted to this |
01:06:19 | FromDiscord | <Tuatarian> removing unneeded storage |
01:06:37 | FromDiscord | <leorize> also, take note of structure padding, something like `tuple[ok: bool, i: int]` is actually 16 bytes, twice that of an `int` |
01:06:54 | FromDiscord | <Tuatarian> oh I see |
01:07:09 | FromDiscord | <Tuatarian> I did not realize this |
01:07:10 | FromDiscord | <Elegantbeef> Sentinels are lovely for that |
01:07:26 | FromDiscord | <Elegantbeef> Aslong as you can get away with sentinels that is |
01:07:45 | FromDiscord | <Elegantbeef> shameless spam of my sentinel module |
01:07:46 | FromDiscord | <Tuatarian> what is a sentinel? |
01:07:49 | FromDiscord | <Tuatarian> never heard the term |
01:07:51 | FromDiscord | <Tuatarian> oh |
01:07:52 | FromDiscord | <Tuatarian> lmao |
01:08:05 | FromDiscord | <Elegantbeef> Designating a value as unneeded so treating it as "nothing" |
01:08:08 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimtrest/blob/master/sentinels.nim |
01:08:16 | FromDiscord | <Elegantbeef> C does this a lot |
01:08:24 | FromDiscord | <Elegantbeef> It doesnt statically type it though like the above does |
01:08:27 | FromDiscord | <Elegantbeef> So it's shit |
01:09:19 | FromDiscord | <Elegantbeef> Due to the fact it's a distinct it's the exact same size as the base which means no extra padding, so in cases you can use it it's much more memory happy |
01:12:37 | FromDiscord | <Tuatarian> thanks guys |
01:13:04 | FromDiscord | <Tuatarian> one more question, for educational purposes, how would I do what I was trying to earlier? |
01:13:15 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=47DU |
01:13:32 | FromDiscord | <Tuatarian> fails to compile since s is of type `McNode:ObjectType` |
01:13:37 | FromDiscord | <Tuatarian> how do I make this work properly? |
01:14:28 | FromDiscord | <leorize> what is your object definition? |
01:14:55 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=47Du |
01:16:56 | * | derpydoo quit (Quit: derpydoo) |
01:17:08 | FromDiscord | <leorize> ok your error is that `field` is a ref but `s` is an object |
01:17:15 | FromDiscord | <leorize> what do you want to compare? |
01:17:20 | FromDiscord | <leorize> the reference or? |
01:17:31 | FromDiscord | <Tuatarian> reference yeah |
01:17:38 | FromDiscord | <Tuatarian> if they both point to the same place |
01:17:41 | FromDiscord | <leorize> then `s` must be a reference too |
01:17:46 | FromDiscord | <Tuatarian> but `ref s` also fails to compile |
01:18:28 | FromDiscord | <Tuatarian> it says type expected |
01:18:31 | FromDiscord | <leorize> yes, line 16 won't pass, what do you want to do with it? |
01:18:31 | FromDiscord | <Tuatarian> at the very last line |
01:18:39 | FromDiscord | <Tuatarian> last char of the line |
01:18:44 | FromDiscord | <Tuatarian> wdym? |
01:18:46 | FromDiscord | <leorize> are you trying to copy all data over? |
01:18:56 | FromDiscord | <Tuatarian> I'm trying to copy the reference itself |
01:19:05 | FromDiscord | <leorize> then `n` must be `var ref` |
01:19:24 | FromDiscord | <leorize> or `var McNode` in this case |
01:19:54 | FromDiscord | <leorize> the iterator won't work because it expects an `object`, but that's easy fix |
01:20:07 | FromDiscord | <Tuatarian> oh... n is the internal representation of McNode |
01:20:08 | FromDiscord | <leorize> just `n[]` to dereference the `ref` |
01:20:12 | FromDiscord | <Tuatarian> thank you |
01:22:13 | FromDiscord | <leorize> btw, if you ever want to know the sort of savings a tree -\> seq can make, look at packedjson\: https://github.com/Araq/packedjson#to-compile-the-benchmark-run-these-commands |
01:22:59 | FromDiscord | <Tuatarian> thank you |
01:23:10 | FromDiscord | <Tuatarian> I'm getting a kind of odd error though |
01:23:17 | FromDiscord | <Tuatarian> I also defined a `=destroy` proc |
01:23:35 | FromDiscord | <Tuatarian> sent a code paste, see https://play.nim-lang.org/#ix=47E3 |
01:23:51 | FromDiscord | <Tuatarian> which errors out saying that it was already defined implicitly in this line |
01:24:04 | FromDiscord | <leorize> if that's all your destroy have then you don't need it |
01:24:11 | FromDiscord | <Tuatarian> oh ok |
01:24:15 | FromDiscord | <Tuatarian> that's convenient |
01:24:21 | FromDiscord | <leorize> Nim generates a default destructor that destroys all fields automatically |
01:24:21 | FromDiscord | <Tuatarian> ` var bestKid : (float, McNode) = (float.low, n.kids[0])` |
01:24:31 | FromDiscord | <Tuatarian> it says char 37 which is the f |
01:24:33 | FromDiscord | <leorize> you only need your own when you have to adjust the behavior |
01:24:34 | FromDiscord | <Tuatarian> just curious at this point |
01:25:01 | FromDiscord | <leorize> when it comes to `=destroy`, you have to declare it right after your object definition |
01:25:07 | FromDiscord | <Tuatarian> oh, I see |
01:25:18 | FromDiscord | <leorize> the use of the object type anywhere will cause Nim to autogenerate a `=destroy` |
01:25:26 | FromDiscord | <leorize> (if one doesn't exist yet) |
01:25:30 | FromDiscord | <Tuatarian> ohh I see |
01:25:36 | FromDiscord | <Tuatarian> thank you |
01:26:02 | FromDiscord | <Tuatarian> one more thing |
01:26:08 | FromDiscord | <Tuatarian> ` if field != nil and field != ref s:` |
01:26:18 | FromDiscord | <Tuatarian> getting an error from this line saying type expected |
01:26:22 | FromDiscord | <Tuatarian> on the very last character |
01:26:59 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=47E4 |
01:27:23 | FromDiscord | <Tuatarian> man I forgot how verbose vulkan is |
01:27:28 | FromDiscord | <Bubblie> fr π |
01:27:31 | FromDiscord | <Tuatarian> it's been a while |
01:27:36 | FromDiscord | <Bubblie> after setting it up though its really easy |
01:27:42 | FromDiscord | <Bubblie> its just |
01:27:45 | FromDiscord | <Bubblie> a pain to set up |
01:27:47 | FromDiscord | <leorize> yea, `ref s` implies `ref[s]`, a typeβ΅(@Tuatarian) |
01:28:02 | FromDiscord | <Bubblie> so much of my nim code is so unsafe though |
01:28:05 | FromDiscord | <Bubblie> like volatile π |
01:28:05 | FromDiscord | <Tuatarian> so do I do `s.addr` instead? |
01:28:31 | FromDiscord | <leorize> yes, if you really need to |
01:28:56 | FromDiscord | <Bubblie> should I switch to ORC/ARC or can I stick to the GC |
01:29:01 | FromDiscord | <Bubblie> it doesn't seem to give me many issues |
01:29:17 | FromDiscord | <Bubblie> (edit) "should I switch to ORC/ARC or can I stick to the ... GC" added "regular" |
01:29:30 | FromDiscord | <leorize> orc is recommended for games since it has a much more deterministic collection cycle, at the cost of throughput |
01:29:32 | FromDiscord | <Elegantbeef> Orc is much better to write code for, but it's pretty much the same |
01:29:44 | FromDiscord | <Bubblie> In reply to @leorize "orc is recommended for": oh so, im making a game engine |
01:29:45 | FromDiscord | <Bubblie> im assuming |
01:29:48 | FromDiscord | <Bubblie> that would be better then |
01:29:51 | FromDiscord | <Elegantbeef> You're going to love having destructors |
01:30:04 | FromDiscord | <Bubblie> destructors...? |
01:30:15 | FromDiscord | <Elegantbeef> https://github.com/beef331/miniaudio/blob/master/src/miniaudio.nim#L53-L57 for wrapping libraries destructors are lovely for instance |
01:30:17 | FromDiscord | <leorize> yea, only orc/arc have working destructors (ask me how I know...) |
01:30:20 | FromDiscord | <Tuatarian> throughput meaning memory throughput or IO? |
01:30:28 | FromDiscord | <Elegantbeef> Lol leorize |
01:30:34 | FromDiscord | <Elegantbeef> CPU throughput |
01:30:42 | FromDiscord | <leorize> memory collection throughputβ΅(@Tuatarian) |
01:30:47 | FromDiscord | <Elegantbeef> Arc/Orc deallocate memory in procedures and dont delay it |
01:30:49 | FromDiscord | <Bubblie> nim has mixins??!?!! |
01:30:52 | FromDiscord | <Bubblie> π |
01:30:55 | FromDiscord | <Bubblie> wtf |
01:30:57 | FromDiscord | <Bubblie> I did not know this |
01:31:00 | FromDiscord | <Elegantbeef> Yes |
01:31:06 | FromDiscord | <Tuatarian> so you lose throughput but not eventually I guess? |
01:31:09 | FromDiscord | <Elegantbeef> It's literally how most good Nim code is written |
01:31:15 | FromDiscord | <Bubblie> does nim have everything |
01:31:44 | FromDiscord | <leorize> it's a throughput vs latency tradeoffβ΅(@Tuatarian) |
01:32:08 | FromDiscord | <Elegantbeef> The reason it's lower latency is freeing inline is relatively easy as it's only a small part of your heap getting freed |
01:32:16 | FromDiscord | <leorize> default GC would batch collect on new allocation, so a lot of memory can be freed then reuse immediately |
01:32:22 | FromDiscord | <Elegantbeef> Whereas with normal GCs when the GC kicks in it's' a large part of the heap getting checked |
01:32:49 | FromDiscord | <leorize> the cost is that the random time slice it decides to kick in is completely undeterministic |
01:33:03 | FromDiscord | <leorize> this is the stuff behind infamous GC pauses problem |
01:33:08 | FromDiscord | <Elegantbeef> Though Nim's let you tune it a lot |
01:33:54 | FromDiscord | <Bubblie> so uh, how do I switch to orc instead if any of you know |
01:34:03 | FromDiscord | <Elegantbeef> `--mm:orc` |
01:34:26 | FromDiscord | <Elegantbeef> I do like that you're asking "if any of you know" |
01:39:59 | FromDiscord | <leorize> fun fact, Nim's allocator is `O(1)` |
01:40:28 | FromDiscord | <leorize> though you might be better off switching to a regular allocator like those used by `malloc()` |
01:40:55 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=47E7 |
01:40:58 | FromDiscord | <Elegantbeef> That's it |
01:41:11 | FromDiscord | <Elegantbeef> You can just do `nim c -r --mm:orc vulkanmain.nim` |
01:41:18 | FromDiscord | <Bubblie> okay so when I do that it gives me an error with cstringArray but with the normal gc it doesn't oh god π |
01:41:19 | FromDiscord | <Bubblie> not this again |
01:41:29 | FromDiscord | <Bubblie> NOO I JUST FIXED THIS TODAY |
01:44:26 | FromDiscord | <leorize> maybe you should make your own cstringArray \:p |
01:44:34 | FromDiscord | <Bubblie> whar |
01:44:45 | FromDiscord | <!Patitotective> pear |
01:44:47 | FromDiscord | <!Patitotective> (edit) "pear" => "peare" |
01:45:08 | FromDiscord | <Elegantbeef> Can we make it 1 terminated? |
01:45:30 | FromDiscord | <Bubblie> okay it works with refc, just not anything else like orc or arc for that matter because apparantly in those two I cannot cast cstringArray to validationLayers[0] |
01:45:37 | FromDiscord | <Bubblie> yet I can do that in refc |
01:45:49 | FromDiscord | <Bubblie> so what do I even need to add differently in that case |
01:45:53 | FromDiscord | <Bubblie> oh my fucking god |
01:45:59 | FromDiscord | <leorize> you got the code somewhere? |
01:46:13 | FromDiscord | <Bubblie> yeah! |
01:46:20 | FromDiscord | <Bubblie> actually let me put this all onto a repo |
01:46:32 | FromDiscord | <Bubblie> well I had a repo but let me just commit all of it |
01:46:35 | FromDiscord | <Bubblie> my lazy ass hasnt comitted it |
01:49:57 | FromDiscord | <leorize> you can push it to a temp branch if you want to redo the commits later |
01:50:32 | FromDiscord | <Bubblie> if ur on linux the config.nims should work |
01:50:37 | FromDiscord | <Bubblie> I made it hella specific on my end for windows cause |
01:50:38 | FromDiscord | <Bubblie> yeah |
01:50:43 | FromDiscord | <Bubblie> development is easier for me that way |
01:51:00 | FromDiscord | <Bubblie> I do have to at some point make it auto find stuff with nim's dll thing forgot the name |
01:51:02 | FromDiscord | <Bubblie> dynalib |
01:51:08 | FromDiscord | <Bubblie> not dll thing π |
01:52:08 | FromDiscord | <leorize> don't use dynlib, it will only bring pain |
01:52:14 | FromDiscord | <Bubblie> what should I use instead then |
01:53:02 | FromDiscord | <Bubblie> https://github.com/Bubblie01/Molecule |
01:53:14 | FromDiscord | <Bubblie> here is the link btw |
01:53:44 | FromDiscord | <Bubblie> I made an entirely new repo because git and vscode decided to annoy me |
01:54:05 | FromDiscord | <Elegantbeef> What line is the error on? |
01:54:17 | FromDiscord | <leorize> do you have the error message? |
01:54:36 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix= |
01:54:37 | FromDiscord | <Elegantbeef> `cast[ptr UncheckedArray[cstring]](validationLayers[0])` ? |
01:54:40 | FromDiscord | <Bubblie> yeah |
01:54:47 | FromDiscord | <Elegantbeef> Look at what you're doing |
01:54:53 | FromDiscord | <Bubblie> at first I just did |
01:54:54 | FromDiscord | <Bubblie> cstringArray |
01:55:01 | FromDiscord | <Bubblie> which worked |
01:55:26 | FromDiscord | <Elegantbeef> You're attempting to get an address to a const |
01:55:33 | FromDiscord | <Elegantbeef> that should be `validationLayers[0].addr` |
01:55:41 | FromDiscord | <Bubblie> o |
01:55:55 | FromDiscord | <Bubblie> :facepalm: |
01:55:59 | FromDiscord | <Elegantbeef> and it should be `let validationLayers = [cstring"VK_LAYER_LUNARG_standard_validation", nil]` |
01:56:38 | FromDiscord | <leorize> I'm amazed that this compiles at all |
01:56:45 | FromDiscord | <Elegantbeef> Same |
01:56:50 | FromDiscord | <Bubblie> me too |
01:57:03 | FromDiscord | <Bubblie> this entire thing is a learning process for me honestly |
01:57:08 | FromDiscord | <Rainbow Asteroids> !eval echo newSeq[byte](6) |
01:57:10 | NimBot | @[0, 0, 0, 0, 0, 0] |
01:57:19 | FromDiscord | <Rainbow Asteroids> irc repl |
01:57:38 | FromDiscord | <Elegantbeef> Putting the repl in irc |
01:59:29 | FromDiscord | <Mr.Ender> Sorry that I dont know exactly how to word this but what would it be called where you can have a file open inside of a program you made and import its data ex like a text editor where when you open the file it opens the text editor and puts the data from the file in it.β΅β΅How would I impliment this and or find documentation on it. |
01:59:37 | FromDiscord | <Mr.Ender> (edit) "dont" => "don't" | "impliment" => "implement" | "and or" => "and/or" |
01:59:45 | FromDiscord | <Mr.Ender> (edit) "data ex" => "data.ex" |
02:00:04 | FromDiscord | <leorize> @Bubblie pro tip\: `var something = when defined(this): that else: stuff` is possible syntax |
02:00:14 | FromDiscord | <Bubblie> wait π |
02:00:14 | FromDiscord | <Mr.Ender> (edit) "Sorry that I don't know exactly how to word this but what would it be called where you can have" => "sent" | "file open inside of a program you made and import its data.ex like a text editor where when you open the file it opens the text editor and puts the data from the file in it.β΅β΅How would I implement this and/or find documentation on it." => "long message, see https://paste.rs/Eqm" |
02:00:22 | FromDiscord | <Bubblie> thats actually very cool |
02:00:41 | FromDiscord | <Bubblie> sorry im so use to java π sometimes I fear im typing nim like Java/C++ and not like nim |
02:00:52 | FromDiscord | <leorize> and, uh, `defined(debug)` is a bool so you don't need your rig at all |
02:01:25 | FromDiscord | <leorize> just write Nim like you're writing JS \:p |
02:01:33 | FromDiscord | <Mr.Ender> (edit) "long message," => "code paste," | "http://ix.io/47Eb" => "https://play.nim-lang.org/#ix=47Ea" |
02:02:02 | FromDiscord | <Bubblie> Iwait so how would I set either to true or false then without checking for debug |
02:02:07 | FromDiscord | <Bubblie> (edit) "Iwait" => "wait" |
02:02:14 | FromDiscord | <Bubblie> wait |
02:02:14 | FromDiscord | <Bubblie> oh |
02:02:20 | FromDiscord | <Bubblie> nvm im clowning |
02:02:21 | FromDiscord | <Bubblie> got it |
02:03:19 | FromDiscord | <leorize> you wanna read the file?β΅(@Mr.Ender) |
02:03:43 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix=47Ec |
02:03:57 | FromDiscord | <Mr.Ender> In reply to @leorize "you wanna read the": I would like to be able to double click a file and it open and import its data into my application |
02:04:04 | FromDiscord | <nigrow> https://i.imgflip.com/6pynl9.jpg |
02:04:05 | FromDiscord | <Mr.Ender> From my file explore |
02:05:52 | FromDiscord | <leorize> can your program do that with `program /path/to/file`? |
02:06:07 | FromDiscord | <Mr.Ender> what do you mean by that |
02:06:11 | FromDiscord | <Prestige> Anyone know how to set up cors with prologue? |
02:06:50 | FromDiscord | <leorize> parse the command line to get the input file name?β΅(@Mr.Ender) |
02:07:00 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix= |
02:07:05 | FromDiscord | <Bubblie> I cantt ell if this is horrible programming or not |
02:07:10 | FromDiscord | <Mr.Ender> In reply to @leorize "parse the command line": yes |
02:07:11 | FromDiscord | <Bubblie> (edit) "cantt ell" => "cant tell" |
02:07:21 | * | jkl quit (Quit: Gone.) |
02:07:40 | FromDiscord | <leorize> it's illegal, have you verified whether it works at all?β΅(@Bubblie) |
02:07:46 | FromDiscord | <Bubblie> it works |
02:07:47 | FromDiscord | <Bubblie> somehow |
02:07:51 | FromDiscord | <Bubblie> I dont even know how the fuck |
02:07:53 | FromDiscord | <Bubblie> it works |
02:07:54 | FromDiscord | <Bubblie> but it does |
02:08:21 | FromDiscord | <leorize> then you can register a mime type with your program, the procedure is different between Linux and Win, thoughβ΅(@Mr.Ender) |
02:08:24 | FromDiscord | <Bubblie> it does die though once I close it with illegal storage access |
02:08:29 | FromDiscord | <Bubblie> but somehow it still... runs? |
02:08:30 | FromDiscord | <!Patitotective> you can pretty much just iterate through `commandLineParams()` and check if the path is validβ΅https://nim-lang.org/docs/os.html#commandLineParamsβ΅@Mr.Ender |
02:08:36 | FromDiscord | <Bubblie> what should I do instead |
02:08:41 | * | jkl joined #nim |
02:08:42 | FromDiscord | <Mr.Ender> thank you for all the help |
02:10:14 | FromDiscord | <leorize> you can stringify it to do a byte-by-byte comparison |
02:10:16 | FromDiscord | <nigrow> https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/2022-08-15_ZfjHaUHfKhmaORti?width=100&height=100&method=scale |
02:11:01 | FromDiscord | <leorize> though if you just want simple comparison, you'd need to write your own string compare proc or use libc's |
02:11:29 | FromDiscord | <Bubblie> In reply to @leorize "you can stringify it": how would one do that? im unsure how to do that in nim |
02:12:02 | FromDiscord | <leorize> a cstring is still an array, so your basic loop compare should do |
02:12:10 | FromDiscord | <Bubblie> alright! |
02:12:25 | FromDiscord | <leorize> `$` on a cstring turns it into a string btw |
02:13:00 | FromDiscord | <leorize> note that it assumes a null terminated string so don't use it on one that's not |
02:13:28 | FromDiscord | <Bubblie> so like $layerProperties.layerName[0] ? |
02:13:35 | FromDiscord | <Elegantbeef> Hey crashing your program is always up to you |
02:13:38 | FromDiscord | <Bubblie> although that might be a compile time error |
02:13:39 | FromDiscord | <Bubblie> right |
02:13:53 | FromDiscord | <nigrow> I'm jerking it |
02:14:08 | FromDiscord | <nigrow> https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/2022-08-15_ZfjHaUHfKhmaORti?width=10000&height=10000&method=scale |
02:20:39 | FromDiscord | <Bubblie> sent a code paste, see https://play.nim-lang.org/#ix= |
02:21:46 | FromDiscord | <Bubblie> Also <@&371760044473319454> |
02:23:09 | FromDiscord | <nigrow> sent a long message, see http://ix.io/47Ef |
02:23:30 | FromDiscord | <Elegantbeef> Jesus they're not even trying to be overtly stupid |
02:23:38 | FromDiscord | <Elegantbeef> Intersting name |
02:24:07 | FromDiscord | <leorize> they're swapping display names like it's irc, kinda funny |
02:24:28 | FromDiscord | <Bubblie> Are you talking about that person thats posting things |
02:24:35 | FromDiscord | <leorize> I can't moderate here so y'all have to wait til ppl woke up |
02:24:42 | FromDiscord | <Bubblie> Damn |
02:29:11 | FromDiscord | <Bubblie> wow orc is a lot faster |
02:30:04 | FromDiscord | <Elegantbeef> Sometimes |
02:51:46 | * | derpydoo joined #nim |
02:54:47 | FromDiscord | <voidwalker> meh previous unresolved issue with "weave": |
02:54:55 | FromDiscord | <voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=47Ei |
02:55:01 | FromDiscord | <voidwalker> `Error: illegal capture 'idsBuf' because 'weaveParallelForSection' has the calling convention: <inline>` |
02:55:17 | FromDiscord | <voidwalker> what am I missing? |
02:58:04 | FromDiscord | <voidwalker> that code works fine if not in a proc |
03:07:06 | * | rockcavera joined #nim |
03:07:06 | * | rockcavera quit (Changing host) |
03:07:06 | * | rockcavera joined #nim |
03:20:41 | * | arkurious quit (Quit: Leaving) |
03:41:49 | * | xcodz-dot joined #nim |
03:42:55 | xcodz-dot | Hey! How does one create variable types? Just the way AST is handled, NimNode is the variable type there. |
03:44:22 | FromDiscord | <Elegantbeef> Variable types? |
03:44:28 | FromDiscord | <Elegantbeef> You mean like object variants? |
03:51:29 | * | xcodz-dot quit (Ping timeout: 255 seconds) |
03:55:50 | * | xcodz-dot joined #nim |
03:56:00 | xcodz-dot | yes |
03:56:06 | xcodz-dot | I do mean object variants |
03:56:29 | xcodz-dot | But how do you really create one and btw whats your timezone? |
03:56:42 | FromDiscord | <huantian> beef's timezone is always awake |
03:56:58 | FromDiscord | <Elegantbeef> Ehh |
03:57:08 | FromDiscord | <Elegantbeef> Mountain time Canada |
03:57:23 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants |
03:57:28 | xcodz-dot | thanks! |
03:58:09 | FromDiscord | <huantian> I have the superior mountain time |
04:03:48 | FromDiscord | <Elegantbeef> Does yours do DST? |
04:03:50 | FromDiscord | <Elegantbeef> If so they're both shit |
04:04:05 | FromDiscord | <huantian> nah it's the bit of mst that doesn't have dst |
04:04:42 | FromDiscord | <huantian> arizona is based |
04:07:06 | FromDiscord | <Elegantbeef> What a world |
04:10:07 | FromDiscord | <flywind> Should a new feature like default fields consider refc? |
04:10:30 | FromDiscord | <flywind> (edit) "consider" => "support" |
04:10:48 | FromDiscord | <leorize> yea, until it ceases to be the default gc |
04:11:37 | * | xcodz-dot quit (Ping timeout: 244 seconds) |
04:13:02 | FromDiscord | <flywind> It is a 2.0 feature, so I probably drop refc support. |
04:17:53 | * | xcodz-dot joined #nim |
04:21:38 | * | derpydoo quit (Quit: derpydoo) |
04:23:03 | FromDiscord | <Elegantbeef> Seems odd not to support it for refc, but then again i doubt many people will opt to use refc assuming orc doesnt bug out π |
04:23:45 | * | derpydoo joined #nim |
04:27:03 | xcodz-dot | How am I supposed to construct a regular expression with double quotes in it |
04:27:05 | xcodz-dot | ? |
04:28:10 | FromDiscord | <Rika> Escape it with a backslash |
04:28:23 | xcodz-dot | I thought so, doesn't work |
04:28:36 | xcodz-dot | `let stringliteral = r""(?P<data>(\\.|[^"\\])*)(?<!\\)\""` |
04:28:37 | FromDiscord | <Rika> Ah wait this is using raw strings so |
04:28:58 | FromDiscord | <Rika> re"""content"content""" |
04:29:10 | xcodz-dot | thanks |
04:29:26 | FromDiscord | <Rika> So triple quotes around the content |
04:30:47 | FromDiscord | <Elegantbeef> Regex to parse html, ruhroh |
04:31:21 | xcodz-dot | umm, we have a problem `let stringliteral = r""""(?P<data>(\\.|[^"\\])*)(?<!\\)""""`, It thinks that I am using 4 quotes to enclose the string. |
04:31:37 | FromDiscord | <Rika> Does it not work even then? |
04:31:41 | FromDiscord | <Rika> I assume it would have |
04:31:54 | xcodz-dot | try it, not gonna work |
04:31:58 | FromDiscord | <Elegantbeef> It does work |
04:32:06 | FromDiscord | <Rika> !eval echo r""""(?P<data>(\\.|[^"\\]))(?<!\\)"""" |
04:32:10 | NimBot | "(?P<data>(\\.|[^"\\]))(?<!\\)" |
04:32:18 | FromDiscord | <Rika> Looks like it works |
04:32:31 | FromDiscord | <Elegantbeef> need a degree in workology |
04:32:47 | xcodz-dot | Huh? |
04:32:57 | FromDiscord | <Rika> What? |
04:33:06 | FromDiscord | <Elegantbeef> Hmm? |
04:33:06 | xcodz-dot | so it means my syntax highlighting is broken after using this? |
04:33:11 | FromDiscord | <Rika> Yes |
04:33:28 | FromDiscord | <Rika> Highlighting is funky still iirc |
04:33:29 | FromDiscord | <flywind> In reply to @Elegantbeef "Seems odd not to": refc seqs add some difficulties because the type is erased => `setLengthSeq(seq: PGenericSeq, elemSize, elemAlign, newLen: int)` |
04:34:56 | xcodz-dot | https://pasteboard.co/X2HpJ0PithpB.png |
04:35:40 | FromDiscord | <Rika> Yeah |
04:35:50 | FromDiscord | <Elegantbeef> `Let` |
04:36:31 | FromDiscord | <Elegantbeef> Consider looking at npeg or making your own parser with parseutils |
04:37:17 | xcodz-dot | Later maybe, I am really just converting my python code to nim. And I have been doing this for all projects that I have written to practise nim |
04:39:16 | FromDiscord | <Rika> In reply to @Elegantbeef "`Let`": Likely the βlowercase italicβ of the font somehow |
04:41:23 | xcodz-dot | Don't worry, I typed everything with lowercase. Its just the italics font that makes it look that way |
04:41:44 | xcodz-dot | It compiles btw |
04:42:13 | FromDiscord | <Rika> Yes |
04:50:21 | xcodz-dot | How to do groups in regex? Like named groups or even unnamed groups? |
04:52:12 | xcodz-dot | I have already written the patterns and have used the `re.match` function to generate matches in a `var matches: array[string]`. How am I supposed to obtain named group matches from that array? |
04:52:24 | FromDiscord | <retkid> how do i make a ref of an existing object |
04:52:34 | FromDiscord | <Elegantbeef> `type A = ref B` |
04:52:50 | FromDiscord | <Elegantbeef> or just `ref B` |
04:53:06 | xcodz-dot | I agree with later solution |
04:53:17 | FromDiscord | <Elegantbeef> Depends what you're doing |
04:53:23 | FromDiscord | <Elegantbeef> Sometimes it's better to have an alias |
04:53:26 | FromDiscord | <retkid> no i mean |
04:53:55 | FromDiscord | <Elegantbeef> What do you mean by named group matches? |
04:54:09 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=47EB |
04:54:23 | FromDiscord | <Elegantbeef> `var b = new typeof(a); b[] = a` |
04:54:32 | FromDiscord | <retkid> i shall use addr |
04:54:53 | FromDiscord | <Elegantbeef> References are managed pointers you cannot raise a stack value to a reference |
04:55:57 | FromDiscord | <Elegantbeef> You either have to make the value a reference to start or copy |
04:56:11 | xcodz-dot | https://pasteboard.co/fY3pvTMJgA8s.png |
04:56:24 | xcodz-dot | above is what I mean by named groups |
04:57:00 | FromDiscord | <Elegantbeef> sent a code paste, see https://paste.rs/fir |
04:57:16 | FromDiscord | <Elegantbeef> Yea i dont play with regex so that doesnt really help much |
04:57:35 | FromDiscord | <Bung> I got nil access line:223 , any hint? https://media.discordapp.net/attachments/371759389889003532/1008600318197629048/2022-08-15_125451.png |
04:58:16 | FromDiscord | <Bung> left is translated nim version |
04:58:25 | FromDiscord | <retkid> :| annoying cant put addr in paramaters |
04:58:38 | FromDiscord | <Elegantbeef> ... |
04:58:54 | FromDiscord | <huantian> addr doesnβt belong in parameters |
04:58:57 | FromDiscord | <Elegantbeef> Bung it's hard to tell ensure all your casts are safe |
04:59:15 | FromDiscord | <Elegantbeef> Addr is a operation to get the address of a value |
04:59:21 | FromDiscord | <Elegantbeef> It's not a type |
04:59:24 | FromDiscord | <Elegantbeef> `ptr` is a type |
04:59:32 | FromDiscord | <retkid> oh yea |
04:59:34 | FromDiscord | <retkid> braindead |
04:59:41 | FromDiscord | <retkid> my brain is actuallly made of cheese |
04:59:43 | FromDiscord | <retkid> i forgot its ptr |
05:00:33 | FromDiscord | <Elegantbeef> https://nitely.github.io/nim-regex/regex.html does support named groups it seems |
05:00:41 | FromDiscord | <Bung> In reply to @Elegantbeef "Bung it's hard to": original c verson works, I try to figure out whats wrong with translated version |
05:01:17 | * | CyberTailor quit (Quit: Konversation terminated!) |
05:01:59 | xcodz-dot | Thanks I would stick to standard library instead and do some complex stuff I would regret later. Thanks |
05:02:03 | * | nullsh quit (*.net *.split) |
05:02:05 | FromDiscord | <Bung> type defined as https://media.discordapp.net/attachments/371759389889003532/1008601443659436102/2022-08-15_130128.png |
05:02:41 | FromDiscord | <Elegantbeef> And browser is heap allocated type? |
05:03:05 | * | nullsh joined #nim |
05:04:31 | FromDiscord | <Elegantbeef> You cast browser to `ptr IUnknown` is `IUnknown` a pointer type? |
05:04:32 | FromDiscord | <Bung> `IOleObject browser;` in c |
05:05:55 | FromDiscord | <Bung> IUnknown is a object contains only on field to a pointer |
05:06:12 | FromDiscord | <Elegantbeef> Ok so then it's compatible |
05:06:15 | FromDiscord | <Bung> sent a code paste, see https://play.nim-lang.org/#ix=47EI |
05:07:15 | FromDiscord | <Elegantbeef> Is `RefId` compatible with a pointer? |
05:09:59 | FromDiscord | <Bung> it's ptr of guid |
05:10:40 | FromDiscord | <Elegantbeef> Well then time to read the docs carefully |
05:10:44 | FromDiscord | <Bung> i try to echo repr these variable , still report that line... |
05:11:49 | FromDiscord | <Elegantbeef> Oh god it's' a windows API, so it's going t obe like 9000 times wors than it should be |
05:12:43 | FromDiscord | <Bung> bad doc compare to macos's |
05:12:55 | FromDiscord | <Elegantbeef> Bad API compared to anything |
05:13:37 | FromDiscord | <Bung> yeah, param in out opt flag .. |
05:14:00 | FromDiscord | <Elegantbeef> Also worth noting the C code you showed uses C case fall through |
05:14:33 | FromDiscord | <Elegantbeef> Not that it changes anything but you should have `of Command, KeyDown, KeyUp` |
05:17:18 | FromDiscord | <Bung> oh, it's fall through, indeed |
05:22:42 | FromDiscord | <Bung> oh it's browser.lpVtbl |
05:32:40 | FromDiscord | <retkid> sent a code paste, see https://play.nim-lang.org/#ix=47EM |
05:35:08 | xcodz-dot | Why isn't `--mm:orc --deepcopy:on` default? I used it with a cpu intensive project and found out that it got me almost double speed. |
05:36:22 | FromDiscord | <Elegantbeef> Cause that's nim 2.0 |
05:37:26 | xcodz-dot | And any idea when is nim 2 coming out? |
05:38:14 | xcodz-dot | And yeah, I shouldn't complaint. What I got before that was already 100x faster than my previous python code. |
05:38:32 | FromDiscord | <Elegantbeef> Is that with `-d:release`? π |
05:38:40 | xcodz-dot | yep |
05:40:33 | xcodz-dot | Actually, if you wanna try it for yourself. The project is on `http://github.com/xcodz-dot/NimNN`. You can run it with `--timeit --generate --out simdate_temprorary --count 1000`. You can play with `--count` to directly influence the simulation time. |
05:41:26 | FromDiscord | <Elegantbeef> No no no this isnt how this works, when someone shows code I comment on their code smells π |
05:42:05 | FromDiscord | <Elegantbeef> These are just templates that are needlessly more complicated https://github.com/xcodz-dot/NimNN/blob/master/src/nn.nim#L8-L13 for instance π |
05:42:50 | FromDiscord | <Elegantbeef> https://github.com/xcodz-dot/NimNN/blob/master/src/nn.nim#L29-L44 is just silly `newSeq[float64](...)` |
05:43:20 | xcodz-dot | great. |
05:43:42 | xcodz-dot | It was actually my second program ever written in Nim. I am still pretty much new to nim. |
05:43:55 | xcodz-dot | I was trying to experiment with macros. Just to see how they work |
05:44:05 | FromDiscord | <Elegantbeef> Hey i annoy people with unasked for code reviews! |
05:44:07 | xcodz-dot | And newSeqOfCap == newSeq? |
05:44:23 | xcodz-dot | Nah, I am open to code reviews. I crave them |
05:44:31 | FromDiscord | <Elegantbeef> No `newSeqOfCap` followed by adding the 0'd data is the same as `newSeq` |
05:44:48 | FromDiscord | <Elegantbeef> `newSeq` allocates and 0's the memory |
05:45:45 | FromDiscord | <Elegantbeef> As such if you're writing the data after allocating with `seqOfCap` you're just being redundant |
05:45:50 | xcodz-dot | I am so dumb. I can not express my gratitude towards your wisdom. |
05:46:22 | FromDiscord | <Elegantbeef> Also it's up to you but `var a: seq[T]` is the same as `var a: seq[T] = @[]` |
05:46:44 | xcodz-dot | Didn't knew that either |
05:47:13 | xcodz-dot | I thought nim was more like C, uninitialized data was just null pointer |
05:48:00 | FromDiscord | <Elegantbeef> No nim 0 inits all data |
05:48:07 | FromDiscord | <Elegantbeef> Which is a pain in some regards |
05:48:15 | FromDiscord | <Elegantbeef> Another thing nim 2.0 will address |
05:48:27 | xcodz-dot | pain if viewed from performance aspects |
05:49:10 | FromDiscord | <Elegantbeef> Eh not really |
05:49:18 | xcodz-dot | then? |
05:49:19 | FromDiscord | <Elegantbeef> Nim has `{.noinit.}` if you do not want data 0'd |
05:49:34 | FromDiscord | <Elegantbeef> Think it also has `newSeqUnitintialized` |
05:49:53 | xcodz-dot | but then in which regard is it pain? |
05:50:01 | FromDiscord | <Elegantbeef> Subrange types |
05:50:11 | FromDiscord | <Elegantbeef> Things where 0'd is not valid |
05:50:18 | xcodz-dot | another concept idk about. |
05:50:20 | FromDiscord | <Elegantbeef> `var a: 1..1` should not be `0` |
05:50:42 | FromDiscord | <Elegantbeef> They're just values that are checked to between a high/low |
05:50:59 | FromDiscord | <Elegantbeef> In the case they're 0'd this means you often get invalid values |
05:52:14 | xcodz-dot | Unfortunately for you, there are 10 mins to Monday. And Here I am sitting in Monday for past 11 hours. |
05:52:19 | FromDiscord | <Elegantbeef> Should also mention that when using stdlib you should prefix the import with `std/` so like `std/[math, os, json, times]` |
05:52:27 | xcodz-dot | why? |
05:52:50 | FromDiscord | <Elegantbeef> Cause some modules require `std` and it ensures you import the stdlib module and not a same named module that's in your project |
05:53:09 | FromDiscord | <Elegantbeef> Modern stdlib modules will require `std` |
05:53:45 | xcodz-dot | Well, gonna follow that now onwards. |
05:56:10 | FromDiscord | <Elegantbeef> Also it seems you dont know you can do `proc thing(a, b, c: int)` |
05:56:14 | FromDiscord | <Elegantbeef> Or if you do you dislike it π |
05:57:00 | xcodz-dot | Oh well, I do know about it and have pretty much used it alot |
05:57:18 | xcodz-dot | It is probabbly my habits that I have carried on from Python |
05:57:41 | xcodz-dot | I always do type annotations in Python to make it look clean |
05:59:59 | FromDiscord | <huantian> People who write untyped python are monsters |
06:00:02 | FromDiscord | <huantian> Or just lazy |
06:00:36 | FromDiscord | <Elegantbeef> Also you should wrap your main code in `try: ... except UsageError as e: echo e.msg` to avoid `Error: unhandled exception: Either --generate or --load options should be provided [UsageError]` |
06:01:23 | FromDiscord | <Elegantbeef> You can atleast cheat with these types of programs to bubble up exceptions as user facing error messages |
06:01:32 | FromDiscord | <Elegantbeef> Dont know what most think of that but i think it's a fairly elegant solution |
06:01:48 | FromDiscord | <Elegantbeef> I really should write some code |
06:05:05 | xcodz-dot | Yeah, I am pretty sure that I am not going to do that for a while now. It really is a chore to refactor even a single line. |
06:05:49 | xcodz-dot | And I think I will focus on my compiler for now. Been writing a assembly compiler for custom assembly language for custom cpu architecture. |
06:06:13 | xcodz-dot | that runs on a custom cpu architecture emulator. |
06:06:18 | * | xcodz-dot quit (Quit: Leaving) |
06:06:28 | FromDiscord | <Elegantbeef> I wonder if @Girvo has had any luck with my statically typed custom allocator objects |
06:59:59 | * | derpydoo quit (Ping timeout: 268 seconds) |
07:21:30 | * | dnh joined #nim |
07:35:41 | * | PMunch joined #nim |
07:41:01 | * | PMunch quit (Quit: Leaving) |
07:41:33 | * | PMunch joined #nim |
07:44:38 | FromDiscord | <Ras> let's say i wanted to replace lines 18-19 and 26-27 with a template that looks something like what's defined in lines 13-14 - i'm probably correct in assuming that `w` will be the value of the string itself and not its identifier / variable name https://media.discordapp.net/attachments/371759389889003532/1008642358289629214/unknown.png |
07:44:54 | FromDiscord | <Ras> how would i go about referencing the variable name itself in the template |
07:45:36 | FromDiscord | <Elegantbeef> change the `w` to `str` then do `m.isSome and m.get.w == str` |
07:45:37 | FromDiscord | <Ras> oh, wait, i can't do that at all |
07:45:56 | FromDiscord | <Ras> those two functions are accessing different things |
07:45:59 | FromDiscord | <Elegantbeef> The issue is that all instances of `w` is replaced |
07:46:04 | FromDiscord | <Ras> as in, the object structure is different |
07:46:05 | FromDiscord | <Ras> my bad |
07:46:17 | FromDiscord | <Elegantbeef> That doesnt matter |
07:46:19 | FromDiscord | <Ras> but thanks for the help anyways |
07:46:47 | FromDiscord | <Elegantbeef> `if parent.windowProperties.existsAndMatches(val):` is valid |
07:47:04 | FromDiscord | <Elegantbeef> Just as `if parent.appId.existsAndMatches(val)` is |
07:47:40 | FromDiscord | <Elegantbeef> You could just do `if parent.appId == some(myStr)` if you were lazy and hope move semantics makes it cheap π |
07:48:34 | FromDiscord | <Ras> i'm accessing and checking the `class` field of the `window_properties` option in the first proc, but the `app_id` value itself in the second one |
07:48:57 | FromDiscord | <Elegantbeef> Oh i missed that |
07:50:34 | FromDiscord | <Ras> just out of curiosity, is there maybe already sugar in the std for "`isSome` and is equal to `x`" |
07:50:45 | FromDiscord | <Ras> seems like a pretty common pattern maybe |
07:51:03 | FromDiscord | <Elegantbeef> `== some(x)` would mostly be equivlent if move semantics kick in |
07:52:59 | FromDiscord | <Ras> i'm new to "move semantics", what would be the preconditions required for move semantics to kick in? |
07:53:44 | FromDiscord | <Elegantbeef> Using arc/orc and not using the variable after the `some` |
07:54:46 | FromDiscord | <Ras> the lefthand variable? or the variable in the `some` call? |
07:55:04 | FromDiscord | <Elegantbeef> Inside the some |
07:56:32 | FromDiscord | <Ras> ah, i see |
07:57:34 | FromDiscord | <Ras> i'm not using it directly in the same proc call, but the proc recursively calls itself for all child nodes and performs the check at the top again, does that count? |
07:58:45 | FromDiscord | <Elegantbeef> If it's a parameter it'd have to be passed as sink so no it doesnt |
07:59:00 | FromDiscord | <Elegantbeef> If it's not a locally scoped variable it doesnt do implicit move semantics |
07:59:30 | FromDiscord | <Ras> full source for context: https://github.com/nnsee/nim-swayipc/blob/master/src/swayipc/util.nim |
08:02:27 | FromDiscord | <Ras> i think i need to fully read and comprehend the destructors and move semantics document to understand this |
08:02:42 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47F8 |
08:03:20 | FromDiscord | <Elegantbeef> Move semantics isnt overly complicate, basicallly any variable or parameter marked `sink` can be moved, which allows reuse of it's variables instead of a copy |
08:03:49 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47F9 |
08:04:08 | FromDiscord | <Elegantbeef> In refc that's always a copy, with arc/orc it's only a copy if you use a after declaring b |
08:04:29 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47Fa |
08:04:55 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47Fb |
08:05:08 | FromDiscord | <Elegantbeef> And this applies to object fields as well |
08:05:18 | FromDiscord | <Ras> i see, that makes sense |
08:05:19 | FromDiscord | <Ras> thank you |
08:05:31 | FromDiscord | <Elegantbeef> The benefit of course is fewer copies means fewer allocations and a faster program |
08:07:29 | FromDiscord | <Elegantbeef> A future nim may infer sink by default but presently you have to manually annotate sink or use `--sinkInference:on` which is bugg |
08:07:32 | FromDiscord | <Elegantbeef> buggy |
08:07:58 | FromDiscord | <Elegantbeef> Wait it's on by default? |
08:08:30 | FromDiscord | <Elegantbeef> I could've sworn it wasnt on by default cause it caused many type mismatch issues |
08:52:39 | * | dnh quit (Quit: My MacBook has gone to sleep. ZZZzzzβ¦) |
09:01:15 | * | dnh joined #nim |
09:28:39 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=47Fl |
09:30:51 | FromDiscord | <Rika> Constants donβt exist on runtime |
09:31:36 | FromDiscord | <Rika> What you wrote is equal to `let b = [1,2,3]` |
09:35:21 | NimEventer | New thread by Void09: Wave: illegal capture ' ' because 'weaveParallelForSection' has the calling convention: <inline>, see https://forum.nim-lang.org/t/9372 |
09:35:59 | FromDiscord | <aruZeta> In reply to @Rika "What you wrote is": oh well right |
09:39:31 | FromDiscord | <Ras> i googled my project before starting it to see whether someone had already written it, and i found nothing |
09:39:55 | FromDiscord | <Ras> naturally, after getting my project into a relatively ok state, i attempted to publish the package to nimble |
09:40:51 | FromDiscord | <Ras> the PR CI failed because a package with the same name already existed - only then did i see that someone had already written the same thing i just spent my time on, and even named it the same |
09:41:00 | FromDiscord | <Rika> What was it you were making |
09:41:16 | FromDiscord | <Rika> And thereβs no problem with making the same thing, just need to make it better than the other dude |
09:41:22 | FromDiscord | <Ras> a library for communicating with sway via ipc, package name "swayipc" |
09:41:34 | FromDiscord | <Ras> In reply to @Rika "And thereβs no problem": no, i don't regret writing it anyways, was a learning experience |
09:41:40 | FromDiscord | <Rika> I see |
09:41:54 | FromDiscord | <Ras> someone named "disruptek" had already written it, and their project seems far more polished than mine |
09:42:00 | FromDiscord | <Ras> they seem to be some sort of nim guru |
09:43:00 | FromDiscord | <Rika> Ah he got banned here for communication issues but yes heβs pretty good at Nim |
09:43:14 | FromDiscord | <Ras> communication issues? π€ |
10:03:20 | FromDiscord | <Ras> ok, i searched the logs, seems like a delicate topic with lots of differing opinions so i'll just drop the topic |
10:46:21 | * | PMunch_ joined #nim |
10:46:33 | * | PMunch_ quit (Remote host closed the connection) |
10:53:45 | * | PMunch_ joined #nim |
10:55:01 | * | PMunch quit (Quit: Leaving) |
10:55:12 | FromDiscord | <offbeat-stuff (offbeat-stuff)> https://play.nim-lang.org/#ix=47FC |
10:55:12 | FromDiscord | <offbeat-stuff (offbeat-stuff)> any idea why this does not compile |
10:55:34 | FromDiscord | <offbeat-stuff (offbeat-stuff)> actually it gives sigsev |
10:55:41 | FromDiscord | <offbeat-stuff (offbeat-stuff)> segmentation fault |
10:58:27 | * | PMunch_ quit (Client Quit) |
10:59:10 | FromDiscord | <Rika> seems like a compilation issue |
11:00:30 | FromDiscord | <offbeat-stuff (offbeat-stuff)> seems like this gives the error (x\: GVec,y\: range[0 .. x.X - 1] |
11:00:39 | FromDiscord | <offbeat-stuff (offbeat-stuff)> if i change the range to a simple int |
11:00:43 | FromDiscord | <offbeat-stuff (offbeat-stuff)> it compiles |
11:03:38 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=47FF |
11:03:52 | FromDiscord | <aruZeta> But if you have `range[0 .. x.X - 1]` it does not |
11:05:15 | FromDiscord | <aruZeta> maybe because since X is a Natural, if it were 0, 0 - 1 = -1 |
11:05:41 | NimEventer | New thread by Drkameleon: Any way to compile with `-O2` or `-Ofast`?, see https://forum.nim-lang.org/t/9373 |
11:10:20 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=47FH |
11:10:58 | FromDiscord | <aruZeta> Is there a way to not declare what the returned will be |
11:11:00 | FromDiscord | <aruZeta> (edit) "Is there a way to not declare what the returned ... will" added "type" |
11:11:09 | FromDiscord | <Rika> `: auto` |
11:11:13 | FromDiscord | <aruZeta> :) |
11:11:16 | FromDiscord | <aruZeta> im dumb |
11:11:22 | FromDiscord | <Rika> no its not obvious |
11:12:30 | FromDiscord | <aruZeta> it's a bit of a pain to need to create generics in Bar to specify the generics of Foo |
11:13:04 | FromDiscord | <aruZeta> but well, the `auto` is great |
11:13:41 | FromDiscord | <aruZeta> (edit) "it's a bit of a pain to need to create generics in Bar to specify the generics of Foo ... " added "( been like 2h breaking my head to think of how to do this lol)" |
11:13:49 | * | dnh quit (Quit: My MacBook has gone to sleep. ZZZzzzβ¦) |
11:13:52 | FromDiscord | <aruZeta> (edit) "breaking" => "smashing" |
11:15:15 | * | dnh joined #nim |
11:16:34 | FromDiscord | <Rika> yeah i dont know how the fuck auto works but it does |
11:25:30 | FromDiscord | <aruZeta> sent a code paste, see https://play.nim-lang.org/#ix=47FP |
11:25:44 | FromDiscord | <aruZeta> (edit) "https://play.nim-lang.org/#ix=47FP" => "https://play.nim-lang.org/#ix=47FQ" |
11:25:45 | FromDiscord | <aruZeta> (edit) |
11:28:36 | FromDiscord | <aruZeta> I mean, I just need to create a type which holds 2 arrays of a fixed size which will be known at runtime, is it that hard? |
11:29:33 | FromDiscord | <aruZeta> What I did before is just make them seqs, and add stuff as necessary, but since I can know the size they will have, i thought it would be faster to use arrays |
11:30:31 | FromDiscord | <Rika> `arrays of a fixed size which will be known at runtime` is kind of just a seq where you dont change the size though |
11:30:37 | FromDiscord | <Rika> you cant really have it any other way |
11:30:46 | FromDiscord | <Rika> unless you want VLAs or w/e |
11:31:10 | FromDiscord | <aruZeta> In reply to @Rika "`arrays of a fixed": seems like that will be what I will be doing |
11:31:39 | FromDiscord | <aruZeta> when creating the object, `obj.seq.len = lenght` |
11:31:42 | FromDiscord | <Rika> you can preallocate the space with newSeq anyway |
11:31:58 | FromDiscord | <Rika> newSeq(length) then your seq will be filled with zeroed objects |
11:32:01 | FromDiscord | <aruZeta> will do that then |
11:32:04 | FromDiscord | <Rika> just like an array |
11:32:12 | FromDiscord | <aruZeta> seems like the best approach |
11:32:24 | FromDiscord | <Rika> In reply to @Rika "newSeq(length) then your seq": needs the generic sorry newSeq[type](length) |
11:32:38 | FromDiscord | <aruZeta> ty :3 |
11:48:47 | * | PMunch joined #nim |
11:53:31 | * | jmdaemon quit (Ping timeout: 268 seconds) |
12:44:49 | * | wallabra quit (Ping timeout: 268 seconds) |
13:28:53 | FromDiscord | <Ras> sent a code paste, see https://play.nim-lang.org/#ix=47Gt |
13:29:14 | FromDiscord | <Ras> (edit) "https://play.nim-lang.org/#ix=47Gt" => "https://play.nim-lang.org/#ix=47Gu" |
13:29:49 | FromDiscord | <Ras> i can't find where this is actually set |
13:33:50 | FromDiscord | <flywind> In reply to @Ras "when trying to generate": It seems to be a known issue => https://github.com/nim-lang/Nim/issues/14424 |
14:10:24 | * | dnh quit (Quit: Textual IRC Client: www.textualapp.com) |
14:18:04 | FromDiscord | <Knedlik> Hey guys, I'm trying to compile a Nim program on MacOS Monterey 12.5, but no matter what I do, it throws me "file not found" on C std headers... any idea how to solve that? |
14:19:39 | FromDiscord | <Ras> what file exactly |
14:21:39 | * | arkurious joined #nim |
14:22:49 | FromDiscord | <Ras> or, like, post the build log |
14:28:44 | FromDiscord | <dom96> how did you install Nim? |
14:30:25 | FromDiscord | <dom96> In reply to @Ras "when trying to generate": Nim's config. Maybe it's in /etc/nim? |
14:31:03 | FromDiscord | <dom96> You might be better off installing Nim another way though. Nim doesn't particularly like being installed across `/` |
14:45:53 | FromDiscord | <Knedlik> In reply to @dom96 "how did you install": Homebrew with `brew install nim --head` |
14:46:17 | FromDiscord | <Knedlik> In reply to @Ras "or, like, post the": Where is that? |
15:03:19 | FromDiscord | <Ras> In reply to @dom96 "Nim's config. Maybe it's": grepped around in there but didn't see anything relevant |
15:08:01 | * | disso_peach quit (Remote host closed the connection) |
15:08:16 | * | LuxuryMode joined #nim |
15:08:46 | * | disso_peach joined #nim |
15:18:11 | * | xet7 joined #nim |
15:39:42 | * | Guest5 joined #nim |
15:40:29 | * | Guest5 quit (Client Quit) |
16:14:40 | FromDiscord | <dom96> You might have better luck installing Nim via choosenim (both of you) |
16:16:58 | FromDiscord | <answer> i installed nim using choosenim on my m1 mac and it works perfectly (same version 12.5) |
16:17:18 | FromDiscord | <answer> you do also need xcode installed if you don't already have that though |
16:17:51 | FromDiscord | <answer> because xcode will install all the headers for the system and provide a compiler (a custom clang or something i believe?) |
16:20:39 | FromDiscord | <victory> does anyone have experience with anonimongo? i'm having errors for an invalid URI but the URI is what I've always used? |
16:20:54 | FromDiscord | <victory> https://media.discordapp.net/attachments/371759389889003532/1008772280551211028/unknown.png |
16:22:41 | * | ixmpp quit (Quit: Gateway shutdown) |
16:37:52 | FromDiscord | <treeform> The choosenim Nim I got is x86 not arm m1 native. |
16:38:11 | FromDiscord | <answer> hm |
16:38:34 | FromDiscord | <treeform> It's probably fine, with flags you can make arm binaries |
16:39:04 | FromDiscord | <treeform> They run 10-20% faster, but that is bout it |
16:39:21 | FromDiscord | <answer> oh so is mine, but i think it would use the arm C compiler in the end anyway (i hope)? uhh... experimenting |
16:40:02 | FromDiscord | <treeform> No x86 Nim will make x86 binaries |
16:40:10 | FromDiscord | <answer> oh darn |
16:40:24 | FromDiscord | <treeform> But you can tell it to make arm64 binaries |
16:40:52 | FromDiscord | <treeform> Or make both and use lipo tool to glue them together for a universal binary |
16:41:30 | FromDiscord | <treeform> M1 build steps are more complex |
16:41:58 | FromDiscord | <answer> maybe im lucky but https://media.discordapp.net/attachments/371759389889003532/1008777582172438565/Screen_Shot_2022-08-15_at_12.41.18_PM.png |
16:42:41 | FromDiscord | <treeform> Oh you do get arm64 neat |
16:42:58 | FromDiscord | <answer> i wanna look into lipo tool actually that sounds neat |
16:43:18 | FromDiscord | <treeform> It's very easy to use |
16:44:00 | FromDiscord | <treeform> https://github.com/treeform/pixie/blob/5f4c15c45c28b1e28439ebb47b1616ef83b3ca11/pixie.nimble#L24 |
16:44:06 | FromDiscord | <treeform> This is what we do |
16:44:20 | FromDiscord | <answer> ah thanks |
16:45:24 | FromDiscord | <treeform> And you can see the flags you need |
16:45:56 | FromDiscord | <treeform> No matter what your Nim is, you can cross compile to arm or x86 |
16:47:22 | FromDiscord | <answer> oh i don't know if you know but do you have a link to the reference for the nimble file functions? trying to find what things like `compile` do exactly |
16:47:28 | FromDiscord | <answer> (edit) "do" => "does" |
16:47:52 | FromDiscord | <treeform> Well compile is defined 3 lines above |
16:47:59 | FromDiscord | <answer> oh im |
16:48:01 | FromDiscord | <answer> lol sorry |
16:49:01 | FromDiscord | <treeform> It makes a long line of flags |
17:04:03 | * | rockcavera quit (Ping timeout: 244 seconds) |
17:27:38 | FromDiscord | <Knedlik> In reply to @dom96 "You might have better": I think the problem is an aarch64 gcc |
17:28:06 | FromDiscord | <Knedlik> Currently installing x86 homebrew |
17:29:30 | * | rockcavera joined #nim |
17:29:30 | * | rockcavera quit (Changing host) |
17:29:30 | * | rockcavera joined #nim |
17:38:41 | FromDiscord | <Yardanico> a guy in the telegram chat just hit https://github.com/nim-lang/Nim/issues/10425 |
17:38:56 | FromDiscord | <Yardanico> it's kind of a weird issue really, and newbies might get bitten hard by it |
17:39:04 | FromDiscord | <Yardanico> the problem is that `>` is a template so it doesn't honor the order of evaluation |
17:39:20 | FromDiscord | <Yardanico> @flywind do you know if it would hurt to make it a builtin (well, that'll require more compiler code), or at least an inline proc? |
17:42:57 | FromDiscord | <enthus1ast> regarding the recent "avoid gravatar in the forum", thread. It inspired me to played with pixie a little http://nimvatar.sn0re.code0.xyz/ |
17:47:10 | FromDiscord | <Yardanico> I mean, my ircord uses gravatar API for that as well, but it just uses the hashes of nicknames |
17:47:24 | FromDiscord | <Yardanico> that's the thing - you don't have to use emails to hash if you don't care about users having the same avatar as they have on gravatar |
17:47:28 | FromDiscord | <Yardanico> you can hash whatever |
17:47:31 | FromDiscord | <enthus1ast> i just wanted to generate nice images with nim \:) |
17:47:37 | FromDiscord | <Yardanico> but yeah, very cool :) |
17:47:49 | FromDiscord | <Yardanico> maybe a bit higher res would be nicer |
17:48:11 | FromDiscord | <enthus1ast> it runs at home, you have near to 0 upload in germany |
17:49:00 | FromDiscord | <Yardanico> oh |
18:32:12 | FromDiscord | <!Patitotective> In reply to @enthus1ast "regarding the recent "avoid": really cool |
18:32:14 | * | kenran joined #nim |
18:33:39 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=47HP |
18:35:19 | FromDiscord | <Phil> I can't just do `testament -d:normDebug run`, that just gives me a response in my terminal that I'm doing it wrong |
18:37:37 | FromDiscord | <domosokrat> Try `command: -d:normDebug` |
18:37:56 | FromDiscord | <domosokrat> That should result in the container running `testament run -d:normDebug` |
18:38:55 | FromDiscord | <domosokrat> But this will override a CMD that the Dockerfile defines |
18:41:53 | FromDiscord | <domosokrat> Sorry, I might have misunderstood your question. Is it about passing options to testament, or about how to do that with a docker-compose file? |
18:45:14 | FromDiscord | <Phil> Basically both. I'm not sure whether testament can even deal with "defines" for one, and for the other I'm trying to figure out how to (if testament CAN deal with defines) add that flag to the testament run command in the docker compose file |
18:45:39 | FromDiscord | <Phil> I'm currently just copy pasting the test into a playground project at this point to get a look at the failing sql statement |
18:45:50 | FromDiscord | <Phil> (edit) "failing sql statement" => "logs" |
18:45:53 | FromDiscord | <enthus1ast> @Phil\: you can use cmd\: in the test |
18:46:12 | FromDiscord | <enthus1ast> In the testfile |
18:46:16 | FromDiscord | <enthus1ast> https://nim-lang.org/docs/testament.html |
18:47:11 | FromDiscord | <enthus1ast> So for different defines I guess you must create multiple test files |
18:50:19 | FromDiscord | <rolha> Hi everyone. I've started out a Nim (Nimble) project to learn it and it grew a bit over the last months. I should really split it, but at the moment I just wanted to build different binaries and install them in different places, etc. Is Nimble suited for this? I don't mind using something else, like Makefiles if it's easier. |
18:50:23 | FromDiscord | <qb> How would I cast `@[77, 0, 97, 0, 114, 0, 111, 0, 111, 0, 110, 0]` to a not null terminated string `Maroon`? |
18:52:13 | FromDiscord | <enthus1ast> I guess just casting to string does not work |
18:52:44 | FromDiscord | <enthus1ast> Is this a wide string? |
18:53:17 | FromDiscord | <qb> Um, maybe? π |
18:53:50 | FromDiscord | <enthus1ast> rolha\: in nimble you can define tasks, this tasks run nimscript, there you can copy your stuff around |
18:54:33 | FromDiscord | <enthus1ast> Also to just copy them to the nimble dir on install create the nimble file as "application" |
18:54:53 | FromDiscord | <rolha> enthus1ast\: nice, thanks. That seems to be what I need. It's not a "proper" app, more like a loose collections of utils |
18:55:41 | FromDiscord | <enthus1ast> So you just wanna be able to call them? |
18:57:32 | FromDiscord | <rolha> It's a homegrown personal use util collection, so I might want `foo` in `/usr/local/bin` and `bar` in some other place etc... but I wanted to be able to put the build scripts in one place. A Makefile would be my first choice, but if I can do everything with Nim (nimble) it's better for learning it. |
18:57:53 | FromDiscord | <enthus1ast> sent a long message, see http://ix.io/47HX |
18:58:17 | FromDiscord | <enthus1ast> Yeah then I would use nimble |
18:59:21 | * | kenran quit (Quit: WeeChat info:version) |
19:00:18 | FromDiscord | <enthus1ast> Ahem, so both is nimble \:) β΅Either tasks or bin (I'm a slow typer on mobile) |
19:03:01 | FromDiscord | <domosokrat> sent a code paste, see https://play.nim-lang.org/#ix=47HZ |
19:04:06 | FromDiscord | <domosokrat> No casting needed, only conversion |
19:10:27 | * | jmdaemon joined #nim |
19:11:25 | FromDiscord | <dom96> In reply to @enthus1ast "Then I guess the": this is the way |
19:15:16 | * | jmd_ joined #nim |
19:16:17 | * | jmdaemon quit (Ping timeout: 252 seconds) |
19:27:11 | * | jmdaemon joined #nim |
19:27:58 | * | jmd_ quit (Ping timeout: 268 seconds) |
19:38:03 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
19:44:56 | FromDiscord | <Zeantar> sent a code paste, see https://play.nim-lang.org/#ix=47I9 |
19:53:14 | * | jmd_ joined #nim |
19:53:23 | * | jmdaemon quit (Ping timeout: 256 seconds) |
20:17:39 | * | wallabra joined #nim |
20:26:15 | FromDiscord | <pruno> sent a code paste, see https://play.nim-lang.org/#ix=47Ii |
20:35:10 | * | xet7 quit (Quit: Leaving) |
20:35:27 | * | xet7 joined #nim |
20:39:35 | * | wallabra quit (Quit: ZNC 1.8.2 - https://znc.in) |
20:41:27 | * | wallabra joined #nim |
20:42:10 | NimEventer | New thread by Rishavs: Why is db_postgres so slow?, see https://forum.nim-lang.org/t/9374 |
20:44:25 | FromDiscord | <Forest> What would be a good Nim library to look into for making a chat app? |
20:44:28 | FromDiscord | <Forest> Not chat app |
20:44:30 | FromDiscord | <Forest> Chat bot |
20:55:02 | FromDiscord | <Forest> Nevermind, mind settled on a different project |
20:58:41 | FromDiscord | <tandy> just kidding |
20:58:44 | FromDiscord | <tandy> oh do u mean an AI chat bot? |
20:58:44 | FromDiscord | <tandy> matrix-nim-sdk \:\>)β΅(@Forest) |
20:59:10 | FromDiscord | <Forest> In reply to @tandy "oh do u mean": Yeah aha |
20:59:14 | FromDiscord | <Forest> In reply to @tandy "matrix-nim-sdk \:\>) (<@909883978717204561>)": Pfff |
21:03:07 | FromDiscord | <!Patitotective> https://github.com/nim-lang/nimbot :p |
21:03:29 | FromDiscord | <enthus1ast> a api hook detours the execution to another function.β΅(@pruno) |
21:03:32 | FromDiscord | <enthus1ast> @pruno\: this means the original function is not called any more, but most hooking libs create a trampolin which is a helper function that contains the stolen bytes of the orginal function, then it jumps to the rest of the orginal code |
21:03:36 | FromDiscord | <enthus1ast> so in short, you must call the trampolin the minhook can create for you, in your replacement function |
21:03:49 | FromDiscord | <enthus1ast> the minhook nim wrapper has a nice pragma for this already |
21:04:38 | FromDiscord | <pruno> In reply to @enthus1ast "the minhook nim wrapper": I see, gonna try that, thanks for the info ! :) |
21:05:05 | * | xet7 quit (Quit: Leaving) |
21:05:26 | * | xet7 joined #nim |
21:06:52 | FromDiscord | <enthus1ast> i've written a simple (in terms of stupid) amd64 hooking lib in nim, maybe its interesting for you\: https://github.com/enthus1ast/nimhook |
21:07:17 | FromDiscord | <enthus1ast> stupid because it cannot decompile |
21:08:32 | FromDiscord | <enthus1ast> and would break some functions, when theyre not large enough |
21:08:32 | FromDiscord | <enthus1ast> and cut instructions in half |
21:10:21 | FromDiscord | <treeform> In reply to @enthus1ast "regarding the recent "avoid": Looks great. |
21:10:52 | FromDiscord | <enthus1ast> @treeform\: i was wondering how i can set the color of the font |
21:10:54 | FromDiscord | <Forest> What's a pure Nim websocket client library for Nim that can be compiled to JS? `ws`? |
21:12:27 | FromDiscord | <enthus1ast> @Forest\: imho the one karax uses |
21:12:54 | FromDiscord | <Forest> Thanks! |
21:13:23 | FromDiscord | <enthus1ast> https://github.com/karaxnim/karax/blob/12b98b2338a5cfb11f89e4fdba7e6b7b65038549/karax/jwebsockets.nim |
21:14:13 | FromDiscord | <Forest> Huh, they also have `ws` in the nimble file |
21:14:31 | FromDiscord | <enthus1ast> @treeform\: i thought fillStyle and strokeStyle but somehow it was not working |
21:15:11 | FromDiscord | <treeform> In reply to @enthus1ast "<@107140179025735680>\: i was wondering": You can set the color on the font, see: https://github.com/treeform/pixiebook/blob/master/tutorial.md#for-websites |
21:15:32 | FromDiscord | <treeform> sent a code paste, see https://play.nim-lang.org/#ix=47IA |
21:16:32 | FromDiscord | <treeform> In reply to @Forest "What's a pure Nim": I have a stub here: https://github.com/treeform/jsutils/blob/master/src/jsutils/websockets.nim |
21:17:17 | FromDiscord | <enthus1ast> ok with readFont, i use the font i set in the ctx |
21:17:23 | FromDiscord | <treeform> you can't have ws work in javascript because async does not work in javascript |
21:18:08 | FromDiscord | <treeform> In reply to @enthus1ast "ok with readFont, i": strange ctx.fillStyle should work |
21:18:21 | FromDiscord | <treeform> can you file a bug with minimal example? |
21:18:43 | FromDiscord | <enthus1ast> i tried a few things could be that i misused it |
21:18:59 | FromDiscord | <enthus1ast> when its is not working ill file a bug |
21:19:12 | FromDiscord | <treeform> it sets it right here: https://github.com/treeform/pixie/blob/master/src/pixie/contexts.nim#L212 |
21:21:54 | FromDiscord | <treeform> we even have a test for it: |
21:21:55 | FromDiscord | <treeform> https://github.com/treeform/pixie/blob/4a8894b6649bca8d5c9154caa33885bd65cd2928/tests/contexts/clip_text.png |
21:22:21 | FromDiscord | <treeform> https://github.com/treeform/pixie/blob/4a8894b6649bca8d5c9154caa33885bd65cd2928/tests/test_contexts.nim#L475 |
21:25:16 | FromDiscord | <Forest> In reply to @treeform "I have a stub": Ah nice! And it'll just work? How do i import it aha |
21:25:27 | FromDiscord | <enthus1ast> @treeform\: yep it works |
21:25:44 | FromDiscord | <enthus1ast> don't know what i have done |
21:26:32 | FromDiscord | <treeform> In reply to @Forest "Ah nice! And it'll": It's currently not in nimble, just copy the file into your source tree. |
21:26:44 | FromDiscord | <Forest> Ah okay, thanks! |
21:27:10 | FromDiscord | <treeform> its pretty easy to wrap the JS apis you need. |
21:29:03 | FromDiscord | <Forest> To basically just replace stuff that's found in the web/NodeJS? |
21:33:54 | FromDiscord | <kevin> hey all, I'm trying to do something I probably should not in Nim, which is making a single file object file (`.o`) which contains all of the Nim dependent symbols (from libraries such as stdlib/io or strformat) |
21:34:43 | FromDiscord | <enthus1ast> @kevin\: can you not do a staticlib ? |
21:35:04 | FromDiscord | <kevin> does anyone know how to create something like this? I imagine you'd have to do the linking together of `-relocatable` object files yourself with `ld` or `collect2` after the Nim compile with `--noLinking=on` flag enabled |
21:35:20 | FromDiscord | <kevin> is that a thing? I am not really familiar |
21:35:59 | FromDiscord | <enthus1ast> yes you can do a static lib, and just link it with other stuff |
21:36:14 | FromDiscord | <treeform> yeah it sounds like you want a static lib |
21:36:18 | FromDiscord | <kevin> is there info somewhere on how to do that? |
21:36:52 | FromDiscord | <enthus1ast> --app\:staticlib |
21:37:02 | FromDiscord | <treeform> ^ from https://nim-lang.org/docs/nimc.html |
21:37:31 | FromDiscord | <kevin> hmm, I am trying to create an object file (`.o`), would `--staticlib` create a `.lib` file? (Assuming windows) |
21:37:38 | FromDiscord | <enthus1ast> yes |
21:37:42 | FromDiscord | <kevin> π¦ |
21:37:49 | FromDiscord | <kevin> i need an object file specifically |
21:37:59 | FromDiscord | <treeform> nim creates a `.o` per each .nim file |
21:38:06 | FromDiscord | <treeform> you want a single `.o` file? |
21:38:29 | FromDiscord | <kevin> but with the other Nim deps (stdlib system, stdlib io, stdlib digitsutils, etc) linked in |
21:39:01 | FromDiscord | <treeform> you probably need to take all of the `.o` files and https://stackoverflow.com/questions/2980102/combine-two-gcc-compiled-o-object-files-into-a-third-o-file |
21:39:17 | FromDiscord | <treeform> I don't see how that is desirable |
21:39:19 | FromDiscord | <kevin> I've looked at the Nimcache C code, and yes, looks like it makes one object file per Nim file |
21:40:14 | FromDiscord | <kevin> In reply to @treeform "I don't see how": basically there are ways to do "dynamic linking" of object files and run them like executables |
21:40:18 | FromDiscord | <treeform> but a combination of `.o` files is usually what a `.lib` files is... |
21:40:34 | FromDiscord | <kevin> so I am trying to create a Nim object file that can be used like that |
21:40:47 | FromDiscord | <treeform> In reply to @kevin "basically there are ways": object files don't run? |
21:41:04 | FromDiscord | <kevin> In reply to @treeform "object files don't run?": https://github.com/frkngksl/NiCOFF π€· |
21:42:12 | FromDiscord | <treeform> "but why?" |
21:42:30 | FromDiscord | <treeform> I think you can glue multiple .o together into a single .o file. |
21:42:35 | FromDiscord | <treeform> with the gcc linker |
21:43:25 | FromDiscord | <kevin> In reply to @treeform ""but why?"": Because I want to be able to write code in Nim that works with this object file loader/runner |
21:43:32 | FromDiscord | <kevin> as of right now I only know how to do it in C |
21:45:11 | FromDiscord | <kevin> In reply to @treeform "I think you can": Yes, I tried using `collect2` and `ld` from mingw directly with the `-relocatable` flag to take multiple object files as input and output yet another object file |
21:46:03 | FromDiscord | <kevin> Even still, not all symbols I need are linked in properly. Right now I'm stuck on `image_base` as a symbol that isn't linked in |
21:47:05 | FromDiscord | <kevin> Given Nim outputs C code as an intermediate step, I should be able to do anything in Nim that I can do in C. I just don't know how in this case |
21:49:05 | FromDiscord | <!Patitotective> doesnt a `.lib` just work? |
21:50:12 | FromDiscord | <kevin> no, I think it has to be an object file |
21:50:28 | FromDiscord | <!Patitotective> what are you going to use it for? |
21:52:03 | FromDiscord | <kevin> specifically used in this Nim project: https://github.com/frkngksl/NiCOFF |
21:57:51 | FromDiscord | <kevin> so i did `--app:staticlib` and then used `objdump -t <file>.lib` and that's almost what I want, except instead of many object files bundled into one file, I want one object file with all required symbols linked against it (minus the ones the `.o` loader takes care of) |
22:00:25 | * | ixmpp joined #nim |
22:00:40 | FromDiscord | <kevin> I'm looking at `strip`. Maybe i can strip out the symbols I don't want |
22:16:33 | * | sagax joined #nim |
22:17:04 | FromDiscord | <EyeCon> In reply to @enthus1ast "regarding the recent "avoid": The images are beautiful |
22:28:40 | FromDiscord | <EyeCon> Do we have somewhere a documentation about how to set up vim with nimsuggest? |
22:29:00 | FromDiscord | <Elegantbeef> nim.nvim π |
22:30:31 | FromDiscord | <EyeCon> That's neovim, right? I found https://github.com/zah/nim.vim but I was wondering if there's something in the web site that I'm missing or something |
22:30:39 | FromDiscord | <victory> is there a way to cancel a `waitFor` statement? |
22:31:25 | FromDiscord | <Elegantbeef> Waitfor is blocking so how would you cancel it really |
22:31:29 | FromDiscord | <victory> true.. |
22:31:34 | FromDiscord | <victory> damn |
22:31:40 | FromDiscord | <victory> im having issues with anonimongo |
22:31:50 | FromDiscord | <victory> `.findOne()` is stopping practically forever |
22:31:54 | FromDiscord | <victory> (edit) removed "practically" |
22:37:37 | FromDiscord | <!Patitotective> you can "cancel it" (more like don't wait for it) if you're on a loop checking if it finished and just break the loop |
22:41:56 | FromDiscord | <!Patitotective> actually https://nim-lang.org/docs/asyncfutures.html#complete%2CFuture%5Bvoid%5D |
22:46:24 | FromDiscord | <Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=47IN |
22:47:07 | FromDiscord | <Rainbow Asteroids> You'll also need to install nimlsp from nimble |
22:51:04 | FromDiscord | <dom96> In reply to @Patitotective "you can "cancel it"": don't do that :) |
22:51:27 | FromDiscord | <dom96> if you want to cancel an operation just close the FD it's running on |
22:55:57 | FromDiscord | <Rainbow Asteroids> In reply to @enthus1ast "regarding the recent "avoid": no https π± |
22:56:31 | FromDiscord | <Elegantbeef> Enthus is stealing all your important information |
22:56:41 | FromDiscord | <Rainbow Asteroids> lol |
22:57:00 | FromDiscord | <Rainbow Asteroids> my browser is configured to yell at me anytime I visit an unencrypted site |
22:57:32 | FromDiscord | <Elegantbeef> Well dont type your credit card info there |
22:57:34 | FromDiscord | <!Patitotective> In reply to @Elegantbeef "Enthus is stealing all": i prefer him to do that instead of google |
22:57:38 | FromDiscord | <Rainbow Asteroids> there's no reason not to have an HTTPS site with free certs from lets encrypt |
22:57:45 | FromDiscord | <!Patitotective> In reply to @Rainbow Asteroids "my browser is configured": mine to |
22:57:56 | FromDiscord | <Rainbow Asteroids> In reply to @Elegantbeef "Well dont type your": i generated an avatar with my SSN, what do i do |
22:57:57 | FromDiscord | <!Patitotective> (edit) "to" => "too" |
22:58:18 | FromDiscord | <!Patitotective> send the immage |
22:58:19 | FromDiscord | <!Patitotective> (edit) "immage" => "image" |
22:58:40 | FromDiscord | <Rainbow Asteroids> https://media.discordapp.net/attachments/371759389889003532/1008872381147791460/unknown.png |
22:58:52 | FromDiscord | <Elegantbeef> Tear down then IRS cause SSN are not supposed to be used as they areβ΅(@Rainbow Asteroids) |
22:59:31 | FromDiscord | <Rainbow Asteroids> tear down the irs!π΄ |
23:00:03 | FromDiscord | <Elegantbeef> NA's taxes are fucked anyway so let's do it |
23:00:11 | FromDiscord | <Rainbow Asteroids> although, it's all the institutions that use SSNs, not just the IRS |
23:00:37 | FromDiscord | <!Patitotective> In reply to @Rainbow Asteroids "": they hashed it :p |
23:00:58 | FromDiscord | <Rainbow Asteroids> damn image hash |
23:01:15 | FromDiscord | <Elegantbeef> All your ID belong to us now |
23:01:36 | FromDiscord | <Rainbow Asteroids> they brought down cs;go π |
23:02:01 | FromDiscord | <Rainbow Asteroids> now i have to go back to programming in nim |
23:03:05 | FromDiscord | <Elegantbeef> Its ok you can derank later |
23:03:37 | FromDiscord | <Rainbow Asteroids> silver 3, on the road to silver 1 |
23:04:00 | FromDiscord | <Elegantbeef> The rank change didnt make you a GE? |
23:05:43 | FromDiscord | <Rainbow Asteroids> i started playing cs;go again like last week. going from silver 1 to silver 3 is the rank change making it easier |
23:05:47 | FromDiscord | <EyeCon> In reply to @Rainbow Asteroids "https://github.com/neovim/nvim-lspconfig install th": Thank you, but is that neovim or does that also work for plain vim? |
23:06:50 | FromDiscord | <Rainbow Asteroids> that's neovim. plain vim is on the nimlsp readme: https://github.com/PMunch/nimlsp |
23:06:57 | FromDiscord | <EyeCon> Thanks! |
23:12:50 | FromDiscord | <EyeCon> sent a code paste, see https://play.nim-lang.org/#ix=47IT |
23:14:38 | FromDiscord | <EyeCon> I'll see what I can do, but I don't have much hope |
23:17:29 | FromDiscord | <Rainbow Asteroids> that seems weird. stew is not a dependency of nimlsp |
23:18:33 | FromDiscord | <EyeCon> Wait, my mistake, that was nimlangserver nor nimlsp |
23:18:56 | FromDiscord | <EyeCon> (edit) "nor" => "not" |
23:19:01 | FromDiscord | <Rainbow Asteroids> nimlangserver requires a specific version of nim iirc |
23:20:00 | FromDiscord | <EyeCon> I was trying too many things at the same time |
23:22:02 | FromDiscord | <EyeCon> Whew, it seems to work now |
23:22:04 | FromDiscord | <EyeCon> Thanks a lot |