00:00:02 | FromDiscord | <shadow.> odd |
00:00:05 | FromDiscord | <shadow.> thats what i was thinking lmfoa |
00:00:08 | FromDiscord | <shadow.> (edit) "lmfoa" => "lmfao" |
00:00:50 | FromDiscord | <shadow.> i also thought it was just compile-time if |
00:00:57 | FromDiscord | <ElegantBeef> Apparently `when false` isnt semantically checked so it seems like it's used here as an example |
00:01:27 | FromDiscord | <shadow.> ohh ok |
00:02:16 | FromDiscord | <ElegantBeef> There is a `when false` in the manual which i guess is applied to showcase that code is uncompilable...? https://media.discordapp.net/attachments/371759389889003532/780584028943155260/unknown.png |
00:03:26 | * | letto quit (Remote host closed the connection) |
00:03:49 | * | letto joined #nim |
00:04:07 | FromDiscord | <shadow.> ah |
00:04:24 | FromDiscord | <shadow.> i just thought it was odd bc they wrote a whole like 70 lines of code under it in the `openFileStream` definition lol |
00:31:06 | FromDiscord | <cabboose> hey y'all, need some help; I'm using db_mysql to insert entries to my database, the entries include special characters such as ":" which get converted into numbers that translates loosely to their html encoded counter parts |
00:31:21 | FromDiscord | <cabboose> for instance ":" gets converted into "58" |
00:31:26 | FromDiscord | <cabboose> anyone know what the deal is there? |
00:31:40 | FromDiscord | <cabboose> i've tried setEncoding to utf8 on the database connection |
00:31:51 | FromDiscord | <cabboose> the strings themselves seem to be fine when printed to stdout |
00:32:15 | FromDiscord | <cabboose> the strings are web scraped off a website but that also has utf8 encoding |
00:34:00 | FromDiscord | <cabboose> https://media.discordapp.net/attachments/371759389889003532/780592018350538762/unknown.png |
00:34:16 | FromDiscord | <cabboose> https://media.discordapp.net/attachments/371759389889003532/780592084058243072/unknown.png |
00:34:52 | FromDiscord | <cabboose> https://media.discordapp.net/attachments/371759389889003532/780592237494665236/unknown.png |
00:35:23 | FromDiscord | <cabboose> this is driving me nuts |
00:36:13 | FromDiscord | <cabboose> https://media.discordapp.net/attachments/371759389889003532/780592572640395275/unknown.png |
00:38:35 | FromDiscord | <cabboose> https://media.discordapp.net/attachments/371759389889003532/780593161336651786/unknown.png |
00:39:35 | FromDiscord | <cabboose> The easiest solution is to just cease the use of special characters but as this database was being populated previously and includes special characters it'll make it easier if i just continue the trend |
00:40:10 | FromDiscord | <cabboose> not the WORST thing in the world if I have to stop but if anyone has any enlightenment itll be awesome |
00:42:39 | FromDiscord | <cabboose> using stable nim 1.4.0 |
00:46:28 | FromDiscord | <cabboose> Ok i see the special characters are converted to UTF-8 decimal format |
00:57:18 | FromDiscord | <cabboose> Ok i need to delve into this more and make sure that my updates are at least being performed correctly |
01:10:32 | * | lritter joined #nim |
01:18:15 | FromDiscord | <nikki> @For Your Health thinking aboout it a bit more; i think the main part of what the `self` thing taps into that i did a bad job articulating was -- i think for good perf in a lot of game scenarios you want to not couple your data and code that operates on that data as individual pieces, but think of a lot of it more as batch operations, or at least even if starting simple, to allow the evolution of your code for batch operations later |
01:19:11 | FromDiscord | <nikki> like, if you have a `updateParticle` function that does all of the steps of updating one particle, it forces an architecture that does all of the steps per particle one by one, but i think structuring it more just as "ok what's the data structure that contains particles" and then separately what the processes are that are running on them helps a lot |
01:19:54 | FromDiscord | <nikki> even outside the perf stuff in particular though, i've found that for me it helps organize things to allow mixing and matching functionality later |
01:21:10 | FromDiscord | <nikki> so it's not necessarily that there is a player object that manages itself, or even a line segment object that manages itself, but more just the layout of player data and line segments and also -- an accumulation of transformations for manipulating those but that is amenable to restructuring |
01:25:37 | * | lritter quit (Quit: Leaving) |
01:37:14 | FromDiscord | <For Your Health> @nikki I'm trying to get into that line of thinking more and break away from being tied to object oriented-ness so much. Perhaps switching off of using self as an argument would help in that. |
01:37:30 | * | Tanger joined #nim |
01:49:01 | FromDiscord | <nikki> yeah that was the idea basically. like, you don't lose anything because you pretty much can still write the `line.foo()` at callsites, which i also vibe with for sure: it's useful to have the 'obj.foo(...)' syntax to clarify "on what" some operation is operating. i just think that that's a callsite perogative and not the callee perogative, and the callee is just like "hey you asked me to do something, ok i'll do it!" |
01:49:25 | FromDiscord | <nikki> the idea is to move that decision of how to organize things upstream, while having sure the encapsulated logic downstream |
01:49:37 | FromDiscord | <nikki> but the downstream isn't the owner of whether you're thinking of this piece of data as a distinct "object" or not |
01:50:12 | FromDiscord | <nikki> i think that's the strength of ufcs: organize your functionality as data and separately operations on data; but still get the benefit of "data.foo()" when that's the best way to express what you're doing to the data, at the callsite |
01:55:55 | * | abm quit (Read error: Connection reset by peer) |
01:56:16 | FromDiscord | <nikki> i feel like in your particular scenario too, especially with geometry stuff like line segments or vectors, math literature is usually written as `dot(a, b) = a.x b.x + a.y b.y + ...` and not `dot(self, b) = self.x b.x + ...` -- so it just feels like the actual normal approach to writing something |
02:17:19 | FromDiscord | <For Your Health> Also another aspect I thought of is for named arguments since nim allows them. Self isn't the best for named arguments if you use it that way. |
02:18:25 | FromDiscord | <nikki> that's a great point actually yeah |
02:18:51 | FromDiscord | <nikki> and in that case, clearly `copy(source = a, destination = b)` is nice for example |
02:19:05 | FromDiscord | <nikki> even if you could think of a copy as a method on the destination |
02:20:58 | FromDiscord | <For Your Health> I think Rust is where I was mainly getting it from. They use self in idiomatic Rust. |
02:21:23 | FromDiscord | <cabboose> ok so I've determined the issue lies in either nims encoding of strings or the mysql connection thinking the encoding of my upload is something other than what it is |
02:21:25 | FromDiscord | <For Your Health> And that was my most recent language I was using before nim |
02:22:14 | FromDiscord | <nikki> @For Your Health it makes a lot of sense in rust i think because of not having ufcs and also because trait objects are dynamically dispatched on that self arg |
02:24:12 | * | lritter joined #nim |
02:24:38 | * | mfiano quit (Quit: WeeChat 2.9) |
02:24:57 | * | jxy quit (Quit: leaving) |
02:25:14 | * | jxy joined #nim |
02:25:57 | * | mfiano joined #nim |
02:26:12 | FromDiscord | <For Your Health> Yeah, I do like Nim's approach better I think though. The idea of having calling functions with the dot syntax being a syntax sugar thing is pretty cool. Although I guess you have to manually specify when you want dynamic dispatch as a result. |
02:27:51 | * | apahl quit (Ping timeout: 272 seconds) |
02:29:09 | * | apahl joined #nim |
02:47:22 | FromDiscord | <Quibono> Is it insane to try and write an arbitrary precision floating point library as a newb? I feel like I could do it, I just expect it'll be hella slow. |
02:57:15 | disruptek | pretty much, yes. |
02:57:49 | * | lritter quit (Ping timeout: 264 seconds) |
03:00:24 | FromDiscord | <Daniel> what is "sugar" in this context you speak of? |
03:00:59 | FromDiscord | <Quibono> Pretty much insane disruptek? |
03:07:02 | FromDiscord | <For Your Health> I'm referring to method call syntax, which lets you do `foo.bar` instead of `bar(foo)` |
03:18:38 | FromDiscord | <cabboose> ok so the issue looks like db_mysql is sending the string as bytes, but converting the ":" to "58" and then turning the "58" into bytes and sending it? |
03:18:46 | FromDiscord | <cabboose> does this have something to do with dbQuoting? |
03:18:58 | FromDiscord | <cabboose> anyhalp? |
03:22:30 | FromGitter | <iffy> How do I iterate over a list of procs, calling each one? https://play.nim-lang.org/#ix=2FgB |
03:22:53 | FromDiscord | <ElegantBeef> I havent ever touched DBs but there is probably an escape sequence for special characters |
03:23:51 | * | filpAM quit (Ping timeout: 256 seconds) |
03:24:13 | FromDiscord | <ElegantBeef> iffy looks like you just need to convert https://play.nim-lang.org/#ix=2FgC |
03:24:51 | FromGitter | <iffy> ElegantBeef, oh weird; I didn't think of that. I just found `nimcall`: https://play.nim-lang.org/#ix=2FgD Is one better than the other? |
03:25:09 | FromDiscord | <ElegantBeef> Nimcall is probably cleaner |
03:25:26 | FromDiscord | <cabboose> This is aids; for speeds sake I’ll probably have to just ignore the special characters until the app is functional as this is a barrier preventing this from enterprise usage |
03:25:31 | FromDiscord | <cabboose> 😂 |
03:31:19 | disruptek | quibono: yes; it has been done too many times. |
03:35:04 | FromDiscord | <nikki> @For Your Health oh yeah. yeah all other things considered equal, definitely prefer ufcs. mostly meant that -- the self thing starts to make sense specifically within the no-ufcs scenario. re: dynamic dispatch, just given the kind of stuff i tend to work on i can / want to just hold onto some procs and call 'em usually |
03:35:55 | FromDiscord | <Quibono> @disruptek Are there helpful projects for a nim beginner to work on then? |
03:37:30 | FromDiscord | <nikki> but yeah specifically without ufcs -- a method-y proc has this namespace surrounding it at the syntax level that binds what data it's about (like literally needing to nest member fns within the struct's { } in c++ for example) and also identifies the proc (the symbol is `Foo::bar` not just `bar` at the module scope) -- at that point the special-ness of `self` isn't out-of-place |
03:45:54 | disruptek | yes; tell us what sucked when you were learning nim. |
03:47:15 | disruptek | nimble has a ton of open issues. if you don't like the code, i have a lot of simple projects with open issues. i don't really write complex stuff. |
03:49:32 | FromDiscord | <Quibono> Mhmm, most of what 'sucks' has been like explanatory content, less so code. |
03:53:16 | disruptek | you could create a PR to change occurences of `countup` in the compiler to `countUp`. |
03:56:49 | FromDiscord | <Quibono> Lol what is Dim? |
03:57:11 | FromDiscord | <Quibono> You only have "an experimental language" written down |
03:57:39 | disruptek | i was playing with different languages for a GA project. |
03:57:45 | FromDiscord | <nikki> maybe it's like https://en.wikipedia.org/wiki/Dumb_Starbucks |
03:57:51 | disruptek | just gonna use nim for fun factor, i think. |
03:58:14 | disruptek | dim might be a stripped-down version that just runs in an accelerated vm. |
03:59:36 | FromDiscord | <Quibono> GA? |
03:59:48 | FromDiscord | <Quibono> So like a limited subset of vim that is /faster/? |
04:00:02 | disruptek | genetic algos. |
04:01:12 | disruptek | i'm not sure i want to fuck around with actually compiling the algos. i haven't really decided. i might actually just write incremental compilation cache files directly instead of going through the vm. |
04:01:39 | FromDiscord | <Quibono> Ahh, cool. Yeah I've wanted to play around with that, but all sorts of AI/ML topics seem... kinda daunting. |
04:02:00 | disruptek | neural nets are pretty boring, ime. |
04:02:38 | FromDiscord | <Quibono> Have you tried like NEAT? |
04:02:45 | disruptek | nope. |
04:04:49 | disruptek | well what is it? |
04:05:30 | disruptek | oh right. |
04:05:51 | disruptek | i'm not against NN, i just don't find they make fun players. |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:34 | * | supakeen joined #nim |
04:07:50 | FromDiscord | <Quibono> So what sort of things do you like within GAs? |
04:08:02 | FromDiscord | <Quibono> It's a field I'd love to learn more about |
04:09:23 | disruptek | i dunno, i feel like development has been pretty stagnant but i don't follow it closely, so take that with a grain of salt. |
04:10:10 | disruptek | i had a lot of fun with a program called tierra a few decades ago. |
04:10:34 | disruptek | i'd like to build something at cloudscale using nim as the language. |
04:12:07 | FromDiscord | <Quibono> Tierra looks interesting, I played around a bit with Darwinbots, which had a similar idea. |
04:12:15 | FromDiscord | <Quibono> A cloudscale GA thing? |
04:12:20 | disruptek | ah, yeah, i vaguely remember that. |
04:13:27 | disruptek | whenever i play path of exile, i think about writing the program that discovers new techniques for me. |
04:13:53 | disruptek | i think it has to be a GA. |
04:16:14 | FromDiscord | <Quibono> I wish PoE was less clickspammy, that was my biggest issue with it |
04:16:34 | disruptek | what is clickspammy? |
04:16:55 | FromDiscord | <Quibono> It just feels like you're having to click a ton. |
04:17:01 | FromDiscord | <Quibono> Which as I get older is more annoying. |
04:17:12 | disruptek | huh. how old are you? |
04:17:29 | FromDiscord | <Quibono> Lol 24, I've got wrists of wet noodles. |
04:17:32 | disruptek | i mostly just drag in that game. |
04:17:57 | disruptek | i've blown out both my wrists working on cars and had surgery on one of them. |
04:19:14 | FromDiscord | <Quibono> Nice, I've not had to do surgery so far, but had a few times where I was double wrist bracing it lol. |
04:19:59 | disruptek | my wrist was immobilized for so long that i lost the wrinkles where hand turns into arm. |
04:20:05 | disruptek | it was pretty creepy looking. |
04:20:23 | FromDiscord | <Quibono> Oh damn, yeah that sounds creepy. |
04:20:34 | FromDiscord | <Quibono> Kinda freaking me out to think that the wrinkles can go away |
04:20:55 | disruptek | one of those super weird things that just looks inhuman. |
04:21:05 | disruptek | like my 14" cock, y'know? |
04:21:34 | FromDiscord | <Quibono> Inches, milimeters... |
04:22:27 | disruptek | it was a porsche shop, so.. metric. but when you do a lot of machining work, everything is in inches. annoying. |
04:24:27 | disruptek | anyway, poe just strikes me as a very solvable set of problems. |
04:24:40 | FromDiscord | <Quibono> Like optimizing the builds? |
04:24:45 | disruptek | yeah. |
04:25:08 | FromDiscord | <Quibono> Is there an easy way to scrape the item/ability data? |
04:25:11 | disruptek | it's not like eve online where the mathematic underpinning is designed to ruin your day. |
04:25:35 | FromDiscord | <Quibono> Lol, I wish EVE was okay with botting, now that I can code some I'd love to do a trading bot. |
04:25:49 | disruptek | all the data is available either from the web-site, the raw files, or other tools. |
04:26:07 | FromDiscord | <ElegantBeef> Yea space engineers is pretty interesting in that regard, but it's just a sandbox |
04:26:18 | disruptek | i did some trade route generators for eve a few years ago. |
04:26:23 | FromDiscord | <ElegantBeef> Can program AI if you really wanted to for specific tasks |
04:27:11 | * | vicfred quit (Quit: Leaving) |
04:27:16 | disruptek | everything's different in eve now. not that i don't want to take another crack at it. |
04:28:50 | disruptek | hmm, i'll have to look at space engineers. |
04:29:50 | disruptek | looks super crude. |
04:30:51 | disruptek | probably too small a playerbase, too. |
04:31:11 | FromDiscord | <ElegantBeef> Not an MMO |
04:31:13 | disruptek | i only got into PoE because i was watching their dev videos. |
04:31:23 | FromDiscord | <ElegantBeef> It's very much a small player coop sandbox |
04:31:31 | FromDiscord | <ElegantBeef> So exactly not much like Eve |
04:31:49 | FromDiscord | <ElegantBeef> Though it has programable blocks, so you can program ships to do specific things |
04:32:24 | disruptek | it doesn't look like it'll surprise me, though. |
04:33:50 | FromDiscord | <Quibono> Hrmmm, dwarf fortress? |
04:34:12 | disruptek | yeah, that's another good one. not enough visibility, though. |
04:35:09 | FromDiscord | <Quibono> visibility how? |
04:35:50 | disruptek | well, originally i was trying to come up with a good project for streaming. |
04:36:27 | FromDiscord | <Quibono> Ahh. |
04:36:29 | disruptek | the idea was that i'd write something like a WoW market maker and then show it working on-stream. |
04:37:00 | disruptek | like, spend 80% of the stream building it and 20% showing it working. |
04:37:40 | disruptek | then release it monetized with ads or something. |
04:38:38 | disruptek | i keep gravitating to poe because i wanna work for them and their mechanics are complex enough to form a tech moat that keeps the competition at bay. |
04:41:39 | disruptek | i think i can break their game. i wanna try. |
04:44:19 | FromDiscord | <SirJosh> sorry for a bit of a noobish question, but i'm going to write a unix-esque cli utility which i'll primarily test it by feeding input to it via stdin & calling it with args, and then checking the output. how should i go about testing it? im new to using testament or unittest or whatever (sorry, just don't nkow the direction i should go in for this) |
04:44:51 | disruptek | use unittest and ignore the recommendation for testament -- it was written by a compiler author who hates unix. |
04:45:40 | disruptek | it would work for you but basically, it's too alien. |
04:46:11 | FromDiscord | <ElegantBeef> How can you hate unix |
04:46:37 | disruptek | he hates all oses; he just hates windows less. |
04:47:16 | FromDiscord | <ElegantBeef> That's objectively the wrong way about hating oses |
04:48:06 | FromDiscord | <ElegantBeef> @dom96 @treeform one of you schmucks want to add some nim branding to the subreddit? 😛 |
04:48:43 | FromDiscord | <nikki> hating on unix is pretty big in the unix sphere |
04:48:58 | disruptek | it's boring, honestly. |
04:49:22 | FromDiscord | <nikki> time to run nim on plan9 or templeos |
04:49:29 | FromDiscord | <nikki> or just nimkernel |
04:49:34 | FromDiscord | <nikki> a unikernel lib that comes with the stdlib |
04:49:46 | disruptek | i think i'd rather get work done. |
04:50:06 | FromDiscord | <ElegantBeef> then you got those musl or broke guys ;D |
05:17:04 | * | leorize joined #nim |
05:19:17 | * | NimBot joined #nim |
05:19:54 | FromDiscord | <nikki> right, what's the syntax for specifying the fields? |
05:20:11 | disruptek | it's not anonymous; it's a generic. |
05:20:19 | disruptek | enum is a typeclass. |
05:20:43 | FromDiscord | <nikki> oh i was asking if i can define an anonymous enum type in a proc tho |
05:20:50 | disruptek | you cannot. |
05:24:11 | leorize | there's no such thing as an anonymous enum (though I guess in a way you can count `int` as one) |
05:38:17 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
05:39:34 | FromDiscord | <nikki> if you count those then `range[a..b]` seems pretty anonymous too |
05:40:30 | leorize | I don't see the point of erasing the type of enums though :P |
05:40:50 | disruptek | chuckleheads gonna chuckle. |
05:42:17 | FromDiscord | <nikki> mostly -- had this one proc for loading scenes in a game like `load("beach")` or w/e. and it keeps track of all scene names available by reading the assets dir too. and `load(Next)` / `load(Prev)` woulda been nice with `enum[Next, Prev]` in a proc and not needing to make a `LoadDirection` enum just for this one proc |
05:42:48 | FromDiscord | <nikki> i'm going with `load(range[-1..1])` for now which also allows restarting the current scene i guess lol |
05:43:13 | leorize | it never hurts to make enums :P |
05:43:22 | leorize | it's not like those are even expensive |
05:43:40 | leorize | and you can put the declaration right on top of the proc for all that matter |
05:43:50 | FromDiscord | <nikki> yeah i'd've done that if i had to |
05:43:59 | FromDiscord | <nikki> but `range[-1...1]` isn't actually bad |
05:44:08 | FromDiscord | <nikki> it maybe conveys the intent here i guess? lol |
05:44:29 | FromDiscord | <nikki> also bc. `currIndex + param` ends up being the new index (with wrap around) |
05:45:00 | leorize | so now you gotta document this magic parameter that takes seemingly arbirtary numbers? |
05:45:07 | leorize | which basically is an enum :P |
05:46:14 | FromDiscord | <nikki> nah, i don't, because it documents itself |
05:46:45 | leorize | my experience with "documents itself" is that nothing ever does |
05:46:46 | FromDiscord | <nikki> mainly idk if i'm gonna stick with this proc, just needed it for some quick scene switching ui that i may throw away soon |
05:47:08 | FromDiscord | <nikki> sure, if i had to write crappy open source libraries for other people to use then yeah |
05:47:28 | FromDiscord | <nikki> i'd do that by not documenting them |
05:48:20 | FromDiscord | <nikki> probably really need to just have a `loadPrev` and `loadNext` proc anyways xD |
05:48:38 | leorize | :p |
06:06:22 | * | narimiran joined #nim |
06:12:27 | * | vicfred joined #nim |
06:18:19 | * | bung joined #nim |
06:34:32 | * | narimiran quit (Ping timeout: 260 seconds) |
06:35:35 | * | narimiran joined #nim |
06:43:37 | * | vicfred quit (Quit: Leaving) |
06:50:44 | FromDiscord | <mratsim> @eagledot yes I'm active on Arraymancer channel, but was off for 10 days |
07:01:25 | * | Cthalupa quit (Ping timeout: 264 seconds) |
07:02:38 | * | Cthalupa joined #nim |
07:24:49 | * | habamax joined #nim |
07:39:50 | FromDiscord | <cabboose> is there anyway to edit the std library for our nim install? |
07:40:14 | FromDiscord | <Rika> just edit it |
07:40:22 | FromDiscord | <cabboose> que? |
07:40:25 | FromDiscord | <cabboose> where is it |
07:40:27 | FromDiscord | <Rika> oh |
07:40:29 | FromDiscord | <Rika> thats what yo umena |
07:40:30 | FromDiscord | <Rika> mean |
07:40:40 | FromDiscord | <cabboose> because im using choosenim im a bit lost |
07:41:13 | FromDiscord | <Rika> its in your home folder, .choosenim i think then toolchains |
07:41:31 | FromDiscord | <cabboose> found it cheers |
07:44:55 | FromDiscord | <cabboose> this seems to be the bastard line |
07:44:56 | FromDiscord | <cabboose> result.add "\\" & $ord(c) |
07:48:37 | FromDiscord | <Rika> banned |
07:48:44 | FromDiscord | <Rika> what are you trying to do? |
07:49:33 | FromDiscord | <cabboose> im updating MySql db with entries containing special characters, for instance: "78:PER" |
07:49:56 | FromDiscord | <cabboose> gets dbQuoted to "78\58PER" |
07:50:06 | FromDiscord | <cabboose> and then reflects in my db as "7858PER" |
07:50:27 | FromDiscord | <cabboose> sorry dbQuoted to "78\\58PER" if you want to take into account escapes |
07:51:57 | FromDiscord | <cabboose> the cheat sheet the block is based off says any ASCII character under 256 should just be escaped with "\c" where c is the character |
07:53:12 | * | lritter joined #nim |
07:53:40 | FromDiscord | <cabboose> but im not that well read on issues surrounding SQL injection so I'm not sure if theres a reason or a method to the madness but the current dbQuote block just converts all the special characters to UTF-8 Dec values which is just sent on through |
08:07:53 | * | PMunch joined #nim |
08:19:34 | * | haxscramper joined #nim |
08:26:27 | haxscramper | I have two template overloads - first with two `untyped` parameters, and second with `a: untyped, b: int`. https://play.nim-lang.org/#ix=2Fhx . I get `undeclared identifier` error when trying to call `test(12, it + 2)` - it seems like compiler is trying to use `<untyped, int> version of the template even though `<untyped, untyped>` qualifies perfectly fine. From my understanding all-untyped template should trigger immediately, or at |
08:26:28 | haxscramper | least before semantic checking. |
08:26:28 | haxscramper | |
08:26:28 | haxscramper | I also tried to use `{.immediate.}` pragma but got `Error: cannot attach a custom pragma to 'test'`. |
08:27:55 | haxscramper | My original use case has templates with different number of arguments, so I can probably make all arguments untyped, but I'd rather prefer to have less drastic solution. |
08:31:21 | FromDiscord | <lqdev> .immediate was replaced by untyped |
08:32:43 | FromDiscord | <lqdev> the compiler always tries to match the most specific overload, so `<untyped, int>` takes precedence over `<untyped, untyped>` |
08:54:04 | FromDiscord | <shad0w> i am trying to run nimlsp on emacs in windows |
08:54:17 | FromDiscord | <shad0w> it works on the same machine when i use linux |
08:54:24 | FromDiscord | <shad0w> but on windows. nada |
08:54:58 | FromDiscord | <shad0w> emacs has lsp-mode installed and working. it shows `connected`. nimlsp seems to be in path aswell |
08:55:16 | FromDiscord | <shad0w> everything seems to be working. yet no autocomplete or anything |
09:01:47 | PMunch | Have you tried enabling logging for nimlsp and see if it says anything? |
09:03:59 | FromDiscord | <shad0w> i tried removing nimlsp |
09:04:08 | FromDiscord | <shad0w> nimble says permission denied |
09:04:15 | FromDiscord | <shad0w> im looking if that'd be the issue |
09:04:43 | haxscramper | Does nimlsp have the same issues as nimsuggest, or it somehow manages to avoid them? (I know it is built on the same code base so I suppose there is no different, but I want to confirm). |
09:05:41 | PMunch | haxscramper, depends on which issues you are thinking about |
09:05:58 | FromDiscord | <shad0w> sent a code paste, see https://play.nim-lang.org/#ix=2FhJ |
09:06:04 | PMunch | But in general nimlsp is by design a thin wrapper around nimsuggest |
09:06:09 | FromDiscord | <shad0w> then a bunch of same cancelling statements |
09:06:10 | haxscramper | 100% cpu usage, needs to kill it repeatedly and so on. I mean stuff mentioned in #16001 |
09:06:11 | disbot | https://github.com/nim-lang/Nim/issues/16001 -- 5Nimsuggest sucks, but newcomers use it |
09:06:24 | FromDiscord | <shad0w> thats the lsp-log |
09:07:07 | PMunch | @shad0w, why is it calling it `nimls`? |
09:07:22 | haxscramper | And other common complaints about nimsuggest. I also want to try nimlsp with emacs sometimes later |
09:07:44 | PMunch | haxscramper, yeah all those should be present in nimlsp, but I haven't noticed too much of them |
09:07:50 | FromDiscord | <shad0w> PMunch: i have no idea. that's what i got by default |
09:08:32 | PMunch | Seems like a type in your emacs config |
09:09:13 | FromDiscord | <shad0w> the only relevant config i did here was add hook to lsp on nim-mode |
09:09:30 | FromDiscord | <shad0w> could this be a lsp-mode error ? |
09:10:54 | PMunch | No idea TBH, I don't know anything about Emacs system for plug-ins |
09:11:56 | FromDiscord | <shad0w> not any different from vscode plugins i guess? you install them, configure them and hope that theyr un |
09:12:11 | FromDiscord | <shad0w> which reminds me. i have no completion in vscode either |
09:12:16 | FromDiscord | <shad0w> fml |
09:12:47 | FromDiscord | <ElegantBeef> do you have nimsuggest installed? |
09:13:22 | FromDiscord | <shad0w> i saw the exe in the nimble bin folder |
09:13:27 | FromDiscord | <shad0w> so, must be ? |
09:13:29 | FromDiscord | <ElegantBeef> is nimsuggest in your path |
09:13:43 | FromDiscord | <shad0w> yeap |
09:13:57 | FromDiscord | <ElegantBeef> Then vscode Should work afaik |
09:14:26 | FromDiscord | <shad0w> i get nothing |
09:14:39 | FromDiscord | <shad0w> but vscode and emacs are installed in D:/ |
09:14:47 | FromDiscord | <shad0w> while all nimble stuff is in C:/ |
09:15:08 | FromDiscord | <shad0w> and i cant seem to figure if this is a stupid pemission issue |
09:15:15 | FromDiscord | <shad0w> permission |
09:18:05 | PMunch | nimlsp doesn't require nimsuggest by the way |
09:21:40 | FromDiscord | <shad0w> https://github.com/emacs-lsp/lsp-mode/blob/3a59fc1d7fd6f2635caa4ebc1dbbf154bd17a718/clients/lsp-nim.el#L35-L39 |
09:21:53 | FromDiscord | <shad0w> looks like nimls is just the server-id ? |
09:22:10 | FromDiscord | <shad0w> that shouldn't screw anything up i guess |
09:22:44 | PMunch | Right |
09:27:24 | FromDiscord | <shad0w> lmao |
09:27:37 | FromDiscord | <shad0w> switched to devel on choosenim |
09:27:45 | FromDiscord | <shad0w> now vscode completion works |
09:27:49 | FromDiscord | <shad0w> emacs still nada |
09:27:57 | FromDiscord | <shad0w> but its progress lol |
09:34:56 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
09:40:30 | Prestige | PMunch: I thought nimlsp uses nimsuggest? |
09:43:40 | PMunch | It uses it as a library |
09:43:45 | PMunch | So it is compiled into nimlsp |
09:44:10 | PMunch | So it doesn't need the nimsuggest binary to exist |
09:46:30 | Prestige | Ah I see what you mean |
09:59:25 | Zoom[m] | Is there any build-in way to reverse the iterator when it's possible (like arrays)? |
09:59:38 | Zoom[m] | It's strange that iterators like filter take arrays |
09:59:49 | Zoom[m] | and not iterators |
10:09:16 | PMunch | No there is no built-in way to reverse an iterator |
10:09:28 | PMunch | (And it's not really something that could be implemented either |
10:14:32 | * | Vladar joined #nim |
10:17:09 | Zoom[m] | I think it could with Concepts. But I'm not sure how experimental they are still |
10:19:44 | FromDiscord | <haxscramper> To reverse iterator you need just reimplement it with different order, or collect results into intermedate sequence and traverse it from the end. |
10:19:47 | Zoom[m] | I mean, probably not the part of taking an iterator... |
10:20:16 | FromDiscord | <haxscramper> For filter on iterators there is `mapIt`, `filterIt` and so on |
10:23:39 | planetis[m] | does manually calling `=destroy`(a) need to be accompanied with wasMoved(a) nowadays? |
10:27:01 | planetis[m] | im dumb, i should have set up ci for my package, now its broken and don't know what's going on |
10:37:17 | FromDiscord | <AmjadHD> sent a code paste, see https://play.nim-lang.org/#ix=2Fi5 |
10:39:35 | FromDiscord | <AmjadHD> sent a code paste, see https://play.nim-lang.org/#ix=2Fi7 |
10:40:08 | FromDiscord | <AmjadHD> Why is that ? |
10:42:30 | FromDiscord | <lqdev> i think you're supposed to use `nim e` to execute nims files |
10:44:03 | planetis[m] | do you get an exec? |
10:46:06 | FromDiscord | <iWonderAboutTuatara> So I've managed to get an (apparently) bugless rubiks cube representation running |
10:46:46 | PMunch | That is a tad weird @AmjadHD, but I'm guessing Nim reads the .nims file as the configuration file (because it does that when there is a file named <project>.nims) when it is compiling. |
10:46:52 | FromDiscord | <iWonderAboutTuatara> With all rotations, an easy way to print it, and such |
10:46:58 | FromDiscord | <iWonderAboutTuatara> How do I make this a module? |
10:47:00 | PMunch | @IWonder oh cool |
10:47:08 | FromDiscord | <iWonderAboutTuatara> Thanks lol |
10:47:10 | PMunch | Are you writing a solver? |
10:47:15 | FromDiscord | <iWonderAboutTuatara> Eventually |
10:47:29 | FromDiscord | <iWonderAboutTuatara> By eventually I mean pretty much asap so yeah |
10:47:42 | FromDiscord | <iWonderAboutTuatara> Not an original method though |
10:48:08 | FromDiscord | <iWonderAboutTuatara> I'll just use thistlewaite to avoid dealing with pruning tables |
10:48:32 | FromDiscord | <iWonderAboutTuatara> Anyway, how do I make this as a Nim module? |
10:48:39 | FromDiscord | <iWonderAboutTuatara> That can be imported by other files etc |
10:48:48 | FromDiscord | <iWonderAboutTuatara> Module is the wrong word, I meant library |
10:49:19 | PMunch | Uhm, just make it a file? |
10:49:30 | PMunch | Or do you want a proper nimble module? |
10:50:48 | FromDiscord | <AmjadHD> @planetis yes |
10:51:47 | planetis[m] | so maybe it runs once in the vm and then gets compiled an the exec is run again |
10:52:28 | planetis[m] | does the same happen with nim e? |
10:54:24 | FromDiscord | <AmjadHD> No |
10:54:41 | planetis[m] | yay mystery solved |
10:54:59 | planetis[m] | good job team |
10:55:48 | FromDiscord | <AmjadHD> I thought of that but I was asking if it should behave like that ? |
10:56:29 | planetis[m] | well dont really know but I think not |
10:56:48 | planetis[m] | however nims files are run when you compile the .nim file |
10:57:21 | planetis[m] | so the compiler should try to catch you are trying to compile a nims file and prevent it |
10:57:27 | planetis[m] | or error |
10:58:15 | FromDiscord | <AmjadHD> Probably worth an issue. |
10:58:53 | planetis[m] | agreed |
11:03:22 | FromGitter | <eagledot> @mratsim hey.... |
11:03:38 | FromDiscord | <mratsim> yep? |
11:04:03 | FromGitter | <eagledot> i also sent a message on arraymancer...may be not active on that right now? |
11:05:35 | FromDiscord | <mratsim> no not right now |
11:05:40 | FromDiscord | <mratsim> checking |
11:17:55 | bung | `Content-Disposition: form-data; name="field2"; filename="example.txt" ` |
11:18:06 | bung | is the quote required or optional ? |
11:18:47 | bung | I've see boundary 's quote could be optional |
11:24:48 | * | luis2 joined #nim |
11:34:44 | * | luis2 quit (Quit: WeeChat 2.9) |
12:02:14 | FromDiscord | <inv> sent a code paste, see https://play.nim-lang.org/#ix=2Fiu |
12:03:18 | FromDiscord | <inv> the problem - if I add exportpy to inc proc - then I have No callable attribute: MyClass [Exception] on t.MyClass() |
12:03:44 | FromDiscord | <inv> oh, I forgot about irc<=>gate and copy-paste, sorry 😦 |
12:04:50 | PMunch | Don't worry, the new bot automatically makes code pastes into links :) |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:20 | FromDiscord | <inv> uff, nice. I just had idea to suggest to implement it 🙂 |
12:06:37 | * | supakeen joined #nim |
12:13:09 | * | luis_ joined #nim |
12:18:32 | * | abm joined #nim |
12:22:46 | FromDiscord | <Vindaar> @inv so it works if the file exists before compilation, right? |
12:25:02 | FromDiscord | <inv> I tried it before I created the example which creates file - let me try one more time |
12:25:37 | FromDiscord | <Vindaar> ah, in my head I somehow though the `writeFile` was what caused the issues in the first place, sorry |
12:26:51 | * | koltrast quit (Quit: ZNC - http://znc.in) |
12:28:29 | FromDiscord | <Vindaar> I don't know if this can work in nimpy currently. `exportpy` is only required to handle the case when you want to compile a shared library from a Nim module to use from python iirc |
12:28:38 | FromDiscord | <inv> I would say I have two problems here:↵1) I mentioned↵2) I cannot export NimObj to python. I was trying to extend it from PyNimObjectBaseToInheritFromForAnExportedType and pyexportTypeExperimental - but did not help |
12:29:41 | * | koltrast joined #nim |
12:30:02 | FromDiscord | <Vindaar> what you want is to call python from nim, but the call a nim proc from python. Not sure if that can work. I'd search through the nimpy issues and see if something pops up. If not open one. yglukhov is really helpful 🙂 |
12:30:24 | * | Vladar quit (Quit: Leaving) |
12:31:16 | FromDiscord | <inv> Thank you, I migrate from that's pyo3 and did not know that it's a special case - it worked there |
12:31:29 | FromDiscord | <inv> (edit) "that's" => "rust's" |
12:31:53 | FromDiscord | <Vindaar> oh, good to know that it worked there |
12:32:02 | FromDiscord | <Vindaar> that means it's not an inherent problem to the approach 🙂 |
12:32:27 | FromDiscord | <inv> Also, I think that the implementation is not so good - probably better design would be to extend python class from nim base python-class |
12:33:45 | FromDiscord | <Vindaar> you mean the implementation of your code here? |
12:35:11 | FromDiscord | <Vindaar> The problem as I see it with your current code is that the Nim `inc` proc is not in any way attached to the `NimObj`. That means once you're on the python side there's no way for the `inc` to be visible, since it's not something attached to the pointer given to Python |
12:35:31 | * | luis_ quit (Quit: luis_) |
12:35:58 | * | luis_ joined #nim |
12:36:49 | FromDiscord | <Vindaar> When compiling a Nim module for python these things work, because each proc will be a symbol in the shared library. The problem is that `exportpy` cannot be used to register symbols from C at runtime to python as far as I know. I suppose that could work somehow though |
12:59:51 | planetis[m] | getType vs getTypeImpl how the differ? whats the recommended one? |
13:27:54 | Zevv | I always try them both and pick the one that gives the result I hope for |
13:35:31 | * | luis_ quit (Quit: luis_) |
13:36:01 | * | luis_ joined #nim |
13:38:46 | * | hmmm joined #nim |
13:43:42 | FromDiscord | <haxscramper> I also just try all possible combinations until it works, I still can't figure out how to /properly/ get implementation for `ref` type from symbol of that type. I ended up putting a lot of tests in https://github.com/haxscramper/hax-nim/blob/master/hack-test/get_type_impl.nim - can run & try to see what fits your use case |
13:43:45 | FromDiscord | <haxscramper> I usually do this |
13:45:08 | planetis[m] | thanks haxscramper |
14:07:46 | * | Torro joined #nim |
14:11:15 | * | Torro quit (Quit: Leaving) |
14:11:30 | * | Torro joined #nim |
14:13:21 | * | disruptek throbs. |
14:15:46 | disruptek | i heard a rumor that araq performs staircase traversal in log n time. |
14:20:27 | Zoom[m] | Hey chat, what do you think of Discord banning third-party clients? |
14:21:40 | FromDiscord | <Clyybber> disruptek: aka falling down? |
14:24:34 | FromDiscord | <Clyybber> eh nevermind |
14:28:17 | Prestige | Zoom[m]: they banned 3 of my accounts so I stopped using discord |
14:28:39 | * | rokups joined #nim |
14:29:00 | Zoom[m] | I'd be happy to not see that "From Discord" bridge here anymore ;) |
14:29:40 | * | hmmm quit () |
14:31:00 | Zoom[m] | All the messages from Discord appear as sent from a single user with messages starting <ActualUser> . That's ugly. IRC bridges properly. |
14:31:45 | Zoom[m] | If you're interested why I'm talking about this: https://github.com/Bios-Marcel/cordless |
14:32:14 | Prestige | Yeah, I contributed to that project multiple times and know the developer |
14:32:23 | Prestige | I think my accounts got locked from using it |
14:32:58 | haxscramper | How expensive is generally (compilation and execution speed, ease of understanding for others) is to use callbacks for implementations everywhere. For example, now I'm writing tree diffing implementation. So, the problem is: it is not really possible to provide generic implementation for 'create new node', so I use callback. The same for setting value, deleting subnode etc. And In the end I have accumulated 4 callback procs. Maybe this |
14:32:58 | haxscramper | is not a lot, but still |
14:33:38 | haxscramper | And they will be called quite frequently too, although this is probably not that different compared to regular proc call. |
14:34:53 | haxscramper | E.g. maybe someone can suggest better alternative than passing 4+ callbacks to proc? Second alternative is to require implementation of some specific functions, but this is more restrictive requirements are not clearly stated in proc API |
14:35:01 | FromDiscord | <inv> @Vindaar Do you think the solution is possible? I compile my own base.pyd, inherit it in example.py and override some methods calling base methods. Then I call the method from nim, but the method calls base method, which calls nim function back somehow.↵↵run from nim: t.method1 => super().method1, which do something from initial "run from nim" |
14:36:28 | haxscramper | And implementing separate type/requiring users to derive from somethig is not an options, since I want to diff any tree type, not only specific ones. |
14:36:47 | * | waleee-cl joined #nim |
14:38:21 | FromDiscord | <lqdev> @Zoom unfortunately there isn't a better solution |
14:38:41 | FromDiscord | <lqdev> another one would be connecting a billion IRC users for each active user on IRC |
14:38:45 | FromDiscord | <lqdev> but that's just retarded |
14:38:56 | FromDiscord | <lqdev> and also what matrix-freenode bridge does |
14:40:36 | Zoom[m] | We could discourage users from using Discord for starters |
14:41:12 | FromDiscord | <lqdev> i'd rather discourage users from using matrix and gitter for starters |
14:41:34 | FromDiscord | <lqdev> look mate. i have all my contacts on discord |
14:41:59 | FromDiscord | <lqdev> i'm not gonna open a special browser tag just for this channel when there's clearly a better solution |
14:42:05 | FromDiscord | <lqdev> (edit) "tag" => "tab" |
14:43:24 | Zoom[m] | lqdev I'm not gonna try to dissuade you, I think when the critical mass of the users will be in other place, the problem will solve itself |
14:44:26 | FromDiscord | <inv> in favor of irc ? 🙂 |
14:44:34 | haxscramper | IRC requries convoluted setup, doesn't adequately on mobile (i shuffled through five different clients until I found one that doesn't suck totally). Doesn't save history, no images, not multiline etc. Matrix is ... I know exactly zero people who use matrix. Gitter is better, but still. And discord is more popular, better suited for comminiti splits. I only use IRC sometimes becose emacs comes with client built-in and I have VIM keys for |
14:44:35 | haxscramper | editing messages. |
14:44:55 | haxscramper | So if anything, discord is going to win over IRC/matrix/gitter |
14:45:07 | haxscramper | /especially/ for new users |
14:45:27 | Zoom[m] | haxscramper: there's at least leorize, planetis and me using Matrix |
14:45:48 | haxscramper | And 1000+ people on discord server? |
14:46:00 | FromDiscord | <inv> Why no one mentioned telegram? |
14:46:45 | Zoom[m] | inv, because it's irrelevant, I guess |
14:46:48 | haxscramper | Because it is not bridged, and has somewhat separte community. Although I would probably advocate for bridge anyway |
14:46:51 | FromDiscord | <lqdev> telegram isn't bridged here |
14:47:06 | FromDiscord | <lqdev> the thing with discord is that everything is well-organized |
14:47:12 | FromDiscord | <lqdev> i can hop from main to gamedev without hassle |
14:47:17 | FromDiscord | <lqdev> that just doesn't apply to matrix and IRC |
14:47:24 | FromDiscord | <lqdev> and gitter doesn't have those channels at all |
14:47:44 | haxscramper | But it has 650+ members, just dumping them here would create chaos *for some time*, but in the end it would not make any difference. |
14:47:49 | Zoom[m] | Gitter is now Matrix, right? |
14:47:52 | FromDiscord | <lqdev> no |
14:47:58 | FromDiscord | <lqdev> they have been bought by matrix |
14:48:01 | FromDiscord | <inv> Yep, it is the main reason I set the discord few days ago, with bridge to nim-channels I would not use anything except telegram on my pc and mobile |
14:48:51 | Zoom[m] | #nim:matrix.org is taken by Node.js Inspector Manager 🤦♂️ |
14:51:11 | * | h2o2c2 joined #nim |
14:51:12 | 7IZAACLGQ | I already did that for nim-science |
14:51:12 | 7IZAACLGQ | also you should point people to |
14:51:12 | 7IZAACLGQ | ~matrix |
14:51:12 | 7IZAACLGQ | oh no disbot is off |
14:51:12 | 7IZAACLGQ | +nim:asra.gr <- here then |
14:51:13 | disbot | matrix: 11Nim channels on Matrix can be found at +nim:asra.gr (https://matrix.to/#/+nim:asra.gr) |
14:51:49 | leorize | wait what is this user name that I'm having lol |
14:52:05 | h2o2c2 | hi, how can i compile nim1.2 with gcc4? |
14:52:26 | * | 7IZAACLGQ is now known as leorize[m] |
14:55:16 | leorize | h2o2c2: are you facing any errors? |
14:55:28 | h2o2c2 | yeah: stdlib_system.nim.c:(.text+0x8010): undefined reference to `__builtin_smulll_overflow' |
14:55:42 | leorize | that's during koch boot, right? |
14:56:00 | leorize | then please add -d:nimEmulatedOverflowChecks to the command line |
14:56:26 | h2o2c2 | it's when I download the nim package from the official site and run ./build.sh |
14:56:27 | leorize | it should disable the faster integer overflow check that's only supported by gcc >= 6 |
14:56:36 | leorize | oh |
14:56:48 | leorize | then you need the older csources |
14:57:08 | leorize | https://github.com/nim-lang/csources <- here it is |
14:57:37 | leorize | clone it then run build.sh |
14:57:52 | leorize | then copy bin/nim to the bin/ folder in the nim source you downloaded |
14:58:27 | leorize | then cd to the nim source and run `bin/nim c koch` |
14:58:38 | leorize | ./koch boot -d:release -d:nimEmulatedOverflowChecks |
14:58:46 | leorize | should get you a working compiler |
14:58:51 | narimiran | or don't use gcc from 2005 |
14:58:53 | * | narimiran hides |
14:59:22 | h2o2c2 | thanks @leorize! @narimiran we're on centos6 |
15:00:14 | leorize | h2o2c2: you'll want to add "define=nimEmulatedOverflowChecks" to config/nim.cfg so it's applied to all invocation of the compiler |
15:00:37 | narimiran | h2o2c2: centos6, which will be outdated in exactly 6 days? :P |
15:00:58 | leorize | and I'd recommend updating gcc though, afaik centos has toolchain backports? |
15:01:16 | h2o2c2 | I've no power over the platform, the migration is slow |
15:06:28 | h2o2c2 | it worked, thanks again, @leorize! |
15:06:54 | leorize | you're welcome :) |
15:07:35 | disruptek | discord will never beat an open platform if i can help it. |
15:08:37 | disruptek | maybe they will develop the market and let an open upstart take it from them overnight. |
15:09:57 | * | h2o2c2 quit (Remote host closed the connection) |
15:10:49 | Prestige | disruptek: I'm hoping matrix and element get their shit together and take over |
15:11:38 | leorize | element seems to be going on the right track, they're basically cloning discord at this point :P |
15:11:42 | disruptek | yeah. |
15:12:02 | Prestige | Yeah, it's just.. very buggy, right now |
15:12:08 | * | habamax quit (Quit: leaving) |
15:12:29 | disruptek | it's hard to believe such a simple fucking thing is so hard for millenials. |
15:12:41 | * | habamax joined #nim |
15:12:48 | * | xet7 joined #nim |
15:13:41 | Prestige | creating the application? |
15:13:49 | disruptek | replacing irc. |
15:13:56 | Prestige | ah. |
15:14:30 | Prestige | I feel like discord and slack are very similar. I don't like either of them though |
15:14:41 | disruptek | nah; they suck for the same reason. |
15:15:25 | disruptek | lqdev: if you weren't tethered to your browser, you might feel differently. |
15:16:28 | FromDiscord | <inv> unfortunately discord is not so good on mobile, on PC is it not perfect also |
15:16:58 | disruptek | i vibrate enough testicles; no one needs me in their pocket. |
15:17:39 | Prestige | It felt fine on mobile for me, as in not buggy. It seems worse on the desktop |
15:20:16 | FromGitter | <iffy> My macro is making some AST with idents, but expandMacros is showing that a suffix "_18095001" is being added to the ident. Can I prevent that? I'm using `ident("MyThing")` |
15:20:29 | bung | how to get array of char element mutable addr ? |
15:20:53 | disruptek | iffy: don't use genSym if you don't want a unique symbol. |
15:20:53 | leorize | bung: wdym? |
15:21:36 | bung | a proc need `var ptr char` |
15:21:39 | disruptek | iffy: wait, are you using these idents in the backend? |
15:21:50 | FromGitter | <iffy> in a macro, yes |
15:21:54 | bung | I dont know how to pass my array of char to it |
15:21:56 | leorize | bung: so what are you trying to do? |
15:21:57 | disruptek | then you have to export them. |
15:22:05 | leorize | try getting rid of `var` :P |
15:22:07 | disruptek | else normal mangling will take place... |
15:22:14 | FromGitter | <iffy> export them with '*'? |
15:22:21 | disruptek | .exportc |
15:22:46 | disruptek | is this android? |
15:22:57 | bung | if i get rid of var can that ptr char move ? |
15:23:19 | bung | `buf += 1` inside that proc |
15:23:56 | FromGitter | <iffy> disruptek: no, normal computers (macos) |
15:24:10 | FromGitter | <iffy> let me make a small example (exportc didn't work) |
15:24:31 | disruptek | when i say, "using it in the backend", i mean, via export to C. |
15:27:32 | bung | editor hints me can't move then |
15:28:47 | FromDiscord | <flywind> Hi, what does this mean here? ↵> This implementation was extracted rom the Mongodb interface and it thus binary compatible with a Mongo OID. |
15:28:49 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/blob/d306a04466b7f1129620dc3ab35443119ed4c867/lib/pure/oids.nim#L13 |
15:29:16 | disruptek | it means the datatype is designed to match that of mongo's oid. |
15:29:31 | disruptek | like, bit-for-bit, an' shit. |
15:29:54 | FromDiscord | <flywind> I see, thanks |
15:30:29 | FromGitter | <eagledot> what would be equivalent of something like ``union{ int i; char str[20];} in C code `` in nim ? |
15:30:55 | disruptek | rtfm object variants. |
15:31:23 | disruptek | but if you don't want a discriminator, you're going to need to cast it around. |
15:31:35 | leorize | bung: assign the pointer to a var |
15:31:45 | leorize | better yet, cast it to `ptr UncheckedArray[char]` |
15:31:52 | narimiran | disruptek: irc-bot idea: when you type "RTFM <topic>", it gives you the link to the manual |
15:31:54 | leorize | because pointer math is ugly |
15:32:18 | disruptek | narimiran: i know. i wrote a google api for it but i never bothered to put it in the bot. |
15:32:28 | FromGitter | <eagledot> i am trying to create bindings to some library, how to create something in nim ,that can be passed to C function? |
15:32:35 | FromDiscord | <flywind> sent a code paste, see https://play.nim-lang.org/#ix=2FjJ |
15:33:11 | FromDiscord | <flywind> (edit) "https://play.nim-lang.org/#ix=2FjJ" => "https://play.nim-lang.org/#ix=2FjL" |
15:33:11 | FromGitter | <eagledot> Thanks, i was looking for a union pragma .. |
15:34:36 | disruptek | holy shit, i totally missed that. |
15:35:21 | disruptek | why is it on the symbol? bleh. |
15:35:36 | * | luis_ quit (Quit: luis_) |
15:35:44 | bung | leorize yeah, assign to a var works |
15:41:00 | FromDiscord | <For Your Health> What's the general way of dealing with division by 0 in a proc? So say you have a function that calculates the slope of a line, you can get an infinite slope. Do you just let the caller deal with it as is? |
15:41:27 | disruptek | what is infinite slope? |
15:42:02 | FromDiscord | <For Your Health> A vertical line |
15:42:21 | disruptek | why wouldn't you want those? they are super useful. |
15:42:30 | leorize | if it's floating point then you can always return Inf |
15:42:46 | disruptek | leorize is trolling you. |
15:43:34 | FromGitter | <iffy> disruptek: aha, it's because I put stuff in a block: https://play.nim-lang.org/#ix=2FjQ in that example the Bob type is named "Bob" but the Another type is named "Another_4855001". Can I tell it to use "Another" even though it's in a block? |
15:43:52 | FromDiscord | <For Your Health> In the calculation you end up dividing by 0 if the line is vertical. It doesn't crash though and returns inf if you don't deal with it. I was just wondering if it is customary to do that |
15:44:05 | FromDiscord | <For Your Health> And let the caller deal with the inf |
15:45:09 | disruptek | iffy: wtf. |
15:46:21 | disruptek | health: it's customary for the programmer to tell the computer what to do. |
15:46:21 | * | Vladar joined #nim |
15:46:31 | disruptek | iffy: hard not to see this as a bug. |
15:51:32 | FromDiscord | <For Your Health> I'm just wondering if it's normal to pass around infinity in Nim, or if you handle it when it's generated. |
15:51:54 | disruptek | i've tried to handle infinity, but i ran outta hands. |
15:52:19 | leorize | iffy: looks like a bug to me, that symbol should not be gensymed |
15:52:54 | leorize | @Health my guess is that it's normal but you should ask the #science folks for more info |
15:53:20 | leorize | my expectations would be to get inf |
15:53:37 | leorize | but the people who do actual maths might think otherwise |
15:55:23 | FromDiscord | <For Your Health> I guess I'll roll with it for now and change it if I get problems |
16:04:32 | ForumUpdaterBot | New thread by Alexiss: Compile-time import, see https://forum.nim-lang.org/t/7150 |
16:05:01 | * | PMunch quit (Quit: leaving) |
16:05:26 | disruptek | why do you hate me so much? |
16:08:24 | FromGitter | <alehander92> disruptek |
16:08:28 | FromGitter | <alehander92> we love you |
16:08:30 | FromGitter | <alehander92> so much |
16:08:33 | FromGitter | <alehander92> why do we love you so much |
16:08:36 | FromGitter | <alehander92> is another question |
16:08:39 | narimiran | love overflow |
16:08:44 | narimiran | now we hate you very very much |
16:08:46 | FromGitter | <alehander92> i just watched news from 90s |
16:08:50 | disruptek | damnit. |
16:08:52 | FromGitter | <alehander92> it was a wild time |
16:09:00 | FromGitter | <alehander92> here people in strange clothes |
16:09:11 | supakeen | the 90s were the best |
16:09:20 | FromGitter | <alehander92> coupons and eating empty bowls with "if you dont vote you shouldn't eat" |
16:09:41 | disruptek | the world really took a turn for the worse when i was born. |
16:09:57 | supakeen | back when video was still in a proper 4:3 format |
16:09:58 | FromGitter | <alehander92> pmunch do you habe a beard still |
16:10:23 | narimiran | supakeen: and computers had TURBO button! |
16:10:24 | * | habamax quit (Quit: leaving) |
16:10:29 | supakeen | TURBO |
16:10:38 | FromGitter | <alehander92> RFC WHEN |
16:10:48 | supakeen | otherwise your games played too fast! |
16:11:02 | disruptek | yeah, great. |
16:11:06 | supakeen | i always liked that the turbo did the exact reverse |
16:11:08 | FromGitter | <alehander92> turbo pascal turbo button, ppl were very cute back then |
16:11:11 | supakeen | e.g. clock down to 4.7 mhz |
16:11:39 | FromGitter | <alehander92> imagine `turbo call()` making your code aritifically sslow |
16:11:41 | supakeen | and you had a little segment display if you were lucky to show current clock speed! |
16:11:50 | FromGitter | <alehander92> inserting `sleeps` at different points |
16:12:02 | narimiran | and only the meanest cars had turbo, not like today |
16:12:42 | disruptek | Error: unhandled exception: /home/adavidoff/git/Nim/compiler/modulegraphs.nim(419, 16) `false` imagine the two of us, meeting like this [AssertionDefect] |
16:12:57 | disruptek | don't use drugs, kids. |
16:12:58 | supakeen | and seatbelts weren't mandatory on the back seat of cars :D |
16:13:12 | disruptek | in the '90s, my cars didn't have back seats. |
16:13:24 | narimiran | supakeen: and pop-up headlights were still legal! |
16:13:31 | narimiran | disruptek: do tell more! |
16:13:40 | disruptek | MK1 MR-2 |
16:13:48 | narimiran | ooooooooooooooh niiiiiiiiiiiiceeee |
16:13:56 | disruptek | actually, my 911 doesn't have rear seats. |
16:14:20 | disruptek | MKIV Supra TT. |
16:14:34 | narimiran | so you went from mid-engine to rear-engine? you definitely are special! |
16:14:36 | ForumUpdaterBot | New thread by Xigoi: Custom source code filters?, see https://forum.nim-lang.org/t/7151 |
16:14:49 | disruptek | the Corrado had rear seats, basically. |
16:15:07 | narimiran | ok, now i want to know ALL the cars you had/have! |
16:15:59 | disruptek | well, i bought and sold sportscars for awhile. |
16:16:41 | disruptek | before focusing on porsche, i mean. |
16:17:08 | disruptek | pop-up headlights are illegal now? |
16:17:19 | narimiran | illegal for ~20 years, i think |
16:17:27 | disruptek | why is that? |
16:17:35 | narimiran | miata NB (released in '99) already didn't have them |
16:17:41 | narimiran | because of pedestrian safety |
16:18:02 | disruptek | people shouldn't be walking on my headlamps. |
16:18:11 | narimiran | :D |
16:18:34 | narimiran | what generation of 911 do you have? |
16:18:34 | disruptek | i had a supercharged miata M. |
16:19:09 | disruptek | i've owned everything through the 997. |
16:19:13 | narimiran | special again! everybody is turbocharging them, you do a supercharger |
16:19:38 | disruptek | well, the SC was just better for getting the car moving. |
16:19:51 | narimiran | opinion about water-cooled 911s? |
16:19:52 | disruptek | a turbo is cheaper and easier, though. |
16:20:37 | disruptek | the water-cooled cars are great, honestly. |
16:20:54 | disruptek | but the air-cooled cars are just so much more entertaining in any dimension. |
16:21:08 | disruptek | more fun to hack, more fun to drive, more fun to play with. |
16:22:04 | disruptek | i have a '76 with a 993 engine that is getting snowed on right now. stripped out racer with r compound tires. i'm pretty well fucked. |
16:22:40 | * | narimiran is not jealous at all |
16:23:10 | narimiran | so, most fun non-porsche car? |
16:23:33 | FromGitter | <iffy> @leorize a bug worth filing? |
16:23:38 | disruptek | that's a great question. |
16:23:48 | disruptek | iffy: yep. |
16:23:55 | narimiran | disruptek: should we switch to PM? :) |
16:24:04 | disruptek | nah, fuck them kids. |
16:24:27 | disruptek | i had a datsun 210 that was a total piece of shit. |
16:24:36 | disruptek | i bought it for $300 plus $80 for a new battery. |
16:24:57 | narimiran | disruptek: see telegram :) |
16:24:59 | disruptek | the car had holes everywhere. you could take a leak through the floorboard while driving along. |
16:25:28 | disruptek | great car to really wring the nuts off with. |
16:26:44 | disruptek | i would say the MR2 might be the most fun. |
16:27:14 | disruptek | my buddy bought one a few years ago, it was a total blast from the past to drive it. |
16:28:02 | FromDiscord | <exelotl> lmao are we really arguing about tabs vs spaces on the forums again |
16:28:14 | disruptek | nope. |
16:28:59 | narimiran | @exelotl nope, we're ignoring those posts ;) |
16:29:32 | * | Torro quit (Quit: quit) |
16:34:35 | FromDiscord | <exelotl> oh, okay, you two are off the hook |
16:37:26 | * | vicfred joined #nim |
16:55:55 | * | hnOsmium0001 joined #nim |
17:07:02 | * | junland quit (Ping timeout: 272 seconds) |
17:20:26 | FromDiscord | <haxscramper> Forgot to ask - what is considered 'more specific'. For example if I have `<untyped, untyped, typed>` and `<untyped, untyped>` the answer is clear |
17:20:27 | FromDiscord | <haxscramper> but suppose I have `<untyped, int, untyped>` and `<untyped, untyped, int>` - https://play.nim-lang.org/#ix=2Fkt in that case what is the logic behind selecting second overload (and failing as result) |
17:20:55 | FromDiscord | <haxscramper> Both templates have the same number of `untyped` arguments |
17:21:33 | disruptek | it can ultimately be a function of sem order. |
17:22:03 | FromDiscord | <haxscramper> Moving declarations around doesn't change anything, I tried |
17:22:14 | disruptek | oh, is it not ambiguous? |
17:22:26 | disruptek | i didn't look at the paste. 😉 |
17:22:59 | FromDiscord | <haxscramper> Well, it /might/ be, but I have `t(12, it 2, 2)` and one of templates has `int` as third parameters |
17:23:26 | FromDiscord | <haxscramper> So it should take priority - `t(a: untyped, b: int, c: untyped)` vs `t(a: untyped, b: untyped, c: int)` |
17:24:02 | FromDiscord | <haxscramper> I wouldn't say I /expect/ it to select second one, but it would be logical choice I suppose |
17:24:03 | disruptek | it wouldn't be the first sigmatch bug. |
17:25:26 | * | luis_ joined #nim |
17:35:44 | * | luis_ quit (Quit: luis_) |
17:36:14 | * | luis_ joined #nim |
17:37:13 | Zevv | nor the last |
17:48:43 | * | Kaivo quit (Ping timeout: 246 seconds) |
17:51:17 | * | Kaivo joined #nim |
17:57:29 | * | rokups quit (Quit: Connection closed for inactivity) |
18:03:34 | FromDiscord | <shadow.> sent a code paste, see https://play.nim-lang.org/#ix=2FkU |
18:05:16 | FromDiscord | <Recruit_main707> doesnt \`varName.strVal` work? |
18:05:35 | * | nixfreak joined #nim |
18:05:36 | FromDiscord | <shadow.> `Error: type mismatch: got <int, string>` |
18:05:40 | FromDiscord | <shadow.> seems not |
18:05:55 | FromDiscord | <shadow.> thats why i was confused as well lmao |
18:06:05 | nixfreak | after I connect to an address using socket , how can I retrieve information from that ip,port |
18:08:02 | * | luis_ left #nim (#nim) |
18:08:24 | FromDiscord | <shadow.> you mean receive procs? |
18:08:45 | FromDiscord | <shadow.> https://nim-lang.org/docs/net.html#recvLine%2CSocket |
18:08:52 | FromDiscord | <shadow.> this should block until a string is received terminated by a newline |
18:09:15 | reversem3 | Like banner information |
18:12:37 | leorize | @shadow. https://play.nim-lang.org/#ix=2FkZ |
18:13:31 | FromDiscord | <shadow.> tysm |
18:14:35 | * | habamax joined #nim |
18:16:55 | * | luis_ joined #nim |
18:24:12 | FromDiscord | <SirJosh> can i build a self-contained nim binary that contain's nim's compiler to compile nim programs on the fly? |
18:24:20 | FromDiscord | <SirJosh> or would that require the user to have gcc installed |
18:24:30 | FromDiscord | <SirJosh> (edit) "gcc" => "a c compiler" |
18:26:53 | FromDiscord | <Recruit_main707> wut? |
18:27:18 | FromDiscord | <nikki> @SirJosh if you use nlvm then no c compiler needed |
18:27:40 | FromDiscord | <SirJosh> oh neat |
18:28:03 | FromDiscord | <SirJosh> looks like something interesting to look at, thanks ! |
18:28:34 | FromDiscord | <SirJosh> @Recruit_main707 i had the idea to build some kind of transpiler, where i'll turn user code into nim and want a way to embed in a compiler so the user doesn't have to install nim, so just exploring my options |
18:28:36 | FromDiscord | <SirJosh> not anything serious just for fun |
18:29:26 | FromDiscord | <Recruit_main707> well, you can use the compiler as a library, but im not sure how well that works without having nim installed |
18:29:45 | FromDiscord | <Recruit_main707> and i really doubt it works without a c compiler |
18:32:09 | FromDiscord | <SirJosh> hence my question :D |
18:35:39 | FromDiscord | <Recruit_main707> better solution, install nim on their pc and then do whatever you need |
18:35:41 | FromDiscord | <Recruit_main707> https://tenor.com/view/feel-me-think-about-it-meme-gif-7715402 |
18:35:52 | * | luis_ quit (Quit: luis_) |
18:36:12 | * | luis_ joined #nim |
18:37:01 | leorize | there's nimscript if you don't need the performance of native code |
18:54:51 | FromDiscord | <haxscramper> !requires fusion |
18:54:53 | disbot | fusion: 11nim-lang/usion 71 total |
18:58:59 | FromDiscord | <lqdev> @shadow. have you seen sugar.dump? |
18:59:05 | FromDiscord | <zetashift> Well since fusion was mentioned, what's up with https://github.com/nim-lang/fusion/pull/33 can it be merged? |
18:59:05 | disbot | ➥ Pattern matching implementation |
18:59:10 | FromDiscord | <shadow.> @lqdev i have not |
18:59:30 | FromDiscord | <lqdev> https://nim-lang.org/docs/sugar.html#dump.m%2Cuntyped |
19:00:16 | FromDiscord | <haxscramper> @zetashift AFAIC yes, but I guess nobody has time to review it, so ETA is totally unknown |
19:00:28 | FromDiscord | <shadow.> ah that seems useful but im doing this more for learning macros |
19:00:35 | FromDiscord | <shadow.> so that kind of defeats the purpose haha |
19:00:53 | FromDiscord | <zetashift> @haxscramper aww, hope someone gets to it when they have time 😄 |
19:07:21 | * | letto quit (Quit: Konversation terminated!) |
19:08:11 | FromDiscord | <haxscramper> But I guess you can do `nimble install https://github.com/haxscramper/fusion.git` and try it out |
19:09:43 | FromDiscord | <haxscramper> I would appreciate feedback, suggestions etc. - I tested it, but since it is relatively complex library there are of course places where things could be documented better/bugs fixed/examples added |
19:17:01 | FromDiscord | <Clownstick Von FuckFace> Does Nim have a QUIC/HTTP3 implementation? |
19:29:09 | FromDiscord | <SirJosh> sent a code paste, see https://play.nim-lang.org/#ix=2Flw |
19:29:45 | * | habamax quit (Ping timeout: 240 seconds) |
19:29:51 | FromDiscord | <haxscramper> yes, `not cond` is a right way. |
19:30:32 | FromDiscord | <haxscramper> There is no `return` in iterators, you can just not `yield` any values |
19:30:52 | * | letto joined #nim |
19:32:11 | * | hmmm joined #nim |
19:33:06 | hmmm | heeey |
19:33:33 | hmmm | wait a moment, why echo(1, 2) and echo (1, 2) are two different things in nim? |
19:33:38 | hmmm | :o |
19:34:25 | FromDiscord | <nikki> first one is a call with two args, second is with one arg that's a tuple |
19:34:32 | FromDiscord | <nikki> i think? |
19:34:39 | FromDiscord | <haxscramper> https://nim-lang.org/docs/manual.html#procedures-method-call-syntax |
19:34:42 | FromDiscord | <haxscramper> yes |
19:34:42 | FromDiscord | <nikki> !eval echo (1, 2) |
19:34:45 | NimBot | (1, 2) |
19:34:48 | FromDiscord | <nikki> ya |
19:35:03 | disruptek | it's like a bad dream. |
19:35:29 | hmmm | !eval echo(1,2) |
19:35:32 | NimBot | 12 |
19:35:38 | hmmm | hmmm |
19:35:46 | FromDiscord | <Idefau> !eval echo [1][0] |
19:35:48 | NimBot | 1 |
19:36:48 | hmmm | and why echo(1, 2) and echo 1, 2 are the same thing? |
19:37:56 | FromDiscord | <lqdev> `someProc a, b, c` is called command call syntax |
19:38:15 | FromDiscord | <lqdev> whether a call is a regular proc call or a command call is controlled by the space immediately after the proc name |
19:39:02 | disruptek | nope. |
19:39:21 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=2FlC |
19:39:24 | disruptek | /i alone/ control your calls. |
19:39:30 | haxscramper | What is the recommendation for debugging generic instantiation issues if you have absolutely |
19:39:30 | haxscramper | I have a generic `proc`, that returns `auto`, but as soon as I specify more concrete (for return value) type I get type mismatch in *somewhere inside* `std/tables`. More specifically, - it fails becase it cannot do `<string> == <NodeId[string]` during instantiation of the `[<NodeId>]= <NodeId>`. |
19:39:30 | haxscramper | So this is like completely unrelated to anything I know |
19:39:55 | * | tane joined #nim |
19:40:02 | haxscramper | And I can't even make small reproducible example, since it seems like it triggers for completely unrelated cause |
19:40:21 | disruptek | sounds like ref equality but might also be due to hashing. |
19:40:24 | * | Jesin quit (Quit: Leaving) |
19:40:54 | disruptek | i cannot make sense of your `<>` line noise. |
19:41:09 | haxscramper | The same goes if I instantiate template type that involves `Table[NodeId[L, V], NodeId[L, V]]`. So `var tmp: Mapping[L, V]` breaks everything too |
19:41:36 | * | bung quit (Quit: Lost terminal) |
19:42:10 | disruptek | what does it mean to instantiate a template type? |
19:42:15 | * | letto quit (Quit: Konversation terminated!) |
19:42:37 | disruptek | also, rule out converters. |
19:42:57 | FromDiscord | <j-james> Is there a general way to convert a JsonNode to a string? |
19:43:07 | disruptek | $ has always worked for me. |
19:43:23 | disruptek | you are probably looking for getStr, though. |
19:44:08 | * | letto joined #nim |
19:44:36 | FromDiscord | <j-james> Oh, I am |
19:44:56 | haxscramper | disruptek: There are not converters AFAIC. And for template instantiation - maybe I'm using wrong terminology, but I mean that if I have any variable/argument of the type `Table[NodeId[L, V], NodeId[L, V]]` with concrete `L` and `V` I get this error. |
19:44:58 | FromDiscord | <j-james> (Thanks - somehow missed that in the json docs) |
19:45:12 | disruptek | np |
19:45:56 | haxscramper | So I have `makeIndex` that uses `[]=` and if I add `var tmp: Table[NodeId[L, V], NodeId[L, V]]` **before** it I get this error but not after |
19:46:03 | disruptek | well, start by ruling out ref equality. |
19:46:18 | disruptek | then make sure your hash(NodeId[L, V]) works correctly. |
19:46:48 | * | Jesin joined #nim |
19:47:46 | FromDiscord | <lqdev> haxscramper: that's generic instantiation, not template instantiation |
19:47:56 | FromDiscord | <lqdev> nim's not c++ :) |
19:48:19 | haxscramper | oh, yeah, sorry. Yes, I meant generic instantiation of course, just have C++ brain fart |
19:49:14 | disruptek | i'll be surprised if NodeId isn't a ref. |
19:49:50 | haxscramper | disruptek: It does - work correctly, in terms of types (until I move lines around). I suppose at least: `func hash*[L, V](id: NodeId[L, V]): Hash`. And can you elaborate what you mean by 'ref equality'. |
19:49:50 | haxscramper | `NodeId` is not a ref, but it as a ref field. Does this count? |
19:52:46 | disruptek | look at how equality is defined for an arbitrary ref; it's used in tables and in fact performs a value comparison of a[] == b[], basically. |
19:53:41 | disruptek | point is, tables demands that you can measure equality correctly between keys. |
19:54:30 | disruptek | moving lines around to change behavior is troubling, though. |
19:54:56 | haxscramper | https://pastebin.com/wsTVhD7d |
19:55:30 | haxscramper | playground died when I tried to make link, so pastebin for now |
19:55:39 | disruptek | kk |
19:56:16 | haxscramper | And I'm working on it right now, can just push to show CI failure |
19:56:25 | haxscramper | With the error |
19:56:45 | haxscramper | Because I still have zero ideas how to reproduce |
19:58:45 | disruptek | neat. |
19:59:10 | disruptek | you manage to have multiple expr in one overload miss error. |
20:04:24 | haxscramper | So, full context - https://github.com/haxscramper/hmisc/runs/1449805846?check_suite_focus=true#step:4:46 and what I've changed: https://github.com/haxscramper/hmisc/commit/1c63e6eec89772d905c68f09e5c10d706242b944 |
20:04:49 | haxscramper | s/context/error/ |
20:06:47 | disruptek | leorize: how hard would it be to generate links to repo files from the test output in ci? |
20:07:06 | disruptek | seems pretty doable but i dunno if the ci itself would make it harder. |
20:07:09 | leorize | disruptek: you'd have to elaborate a bit more |
20:07:17 | leorize | what exactly are you aiming to do? |
20:07:34 | disruptek | i just wanna click on /home/runner/work/hmisc/hmisc/tests/tHTreeDistance.nim(36, 24) template/generic instantiation of `simpleTreeDiff` from here |
20:07:43 | disruptek | and jump to the file and line. |
20:08:12 | * | lritter quit (Remote host closed the connection) |
20:08:41 | disruptek | i guess the easiest solution would be to just output the url and let ci render it as a link. |
20:09:41 | leorize | ah you want that? |
20:09:46 | leorize | I already made that in setup-nim :P |
20:09:52 | disruptek | lol nice. |
20:10:00 | leorize | it should produce annotations by the end of the run |
20:10:08 | haxscramper | I use setup-nim |
20:10:21 | leorize | you can look at the setup-nim ci to see how that'd look like |
20:10:46 | leorize | it couldn't link to any real file because I tested those with files made on-the-fly |
20:11:39 | haxscramper | Oh, you mean those links warning/error annotations here: https://github.com/haxscramper/hmisc/actions/runs/381810009 |
20:15:11 | disruptek | haxscramper: your scorecmpproc[v] takes strings and yields v? |
20:16:28 | haxscramper | No, it takes `V,V` and returns integer: `type ScoreCmpProc*[T] = proc(x, y: T): int` scored comparison for two objects. |
20:18:38 | disruptek | okay, that makes sense. |
20:28:51 | * | narimiran quit (Quit: leaving) |
20:35:54 | * | luis_ quit (Quit: luis_) |
20:36:17 | * | luis_ joined #nim |
20:38:00 | * | kungtotte quit (Read error: Connection reset by peer) |
20:39:00 | * | kungtotte joined #nim |
20:44:04 | * | junland joined #nim |
20:44:04 | * | junland quit (Remote host closed the connection) |
20:48:26 | * | junland joined #nim |
20:49:46 | * | junland quit (Client Quit) |
20:54:56 | * | junland joined #nim |
20:55:05 | * | hmmm quit (Ping timeout: 240 seconds) |
20:55:41 | * | junland quit (Client Quit) |
20:56:31 | * | junland joined #nim |
21:01:38 | * | junland quit (Quit: %ZNC Disconnected%) |
21:02:32 | * | junland joined #nim |
21:05:45 | * | junland quit (Client Quit) |
21:06:44 | * | junland joined #nim |
21:07:27 | * | junland quit (Client Quit) |
21:07:51 | * | Jesin quit (Quit: Leaving) |
21:08:15 | * | junland joined #nim |
21:09:18 | * | junland quit (Client Quit) |
21:10:09 | * | junland joined #nim |
21:12:46 | * | Jesin joined #nim |
21:12:46 | * | junland quit (Client Quit) |
21:14:25 | FromDiscord | <SirJosh> sent a code paste, see https://play.nim-lang.org/#ix=2Fmb |
21:15:06 | * | junland joined #nim |
21:15:37 | FromDiscord | <haxscramper> idk what exactly do you mean by 'arc pointer', but you can have `ptr Example` and `addr <whatewher>` |
21:16:13 | FromDiscord | <haxscramper> And use `items[2][].id = 2`. `[]` is a dereference operator |
21:16:54 | FromDiscord | <SirJosh> i dont wanna use `ptr`s cuz those are unsafe, right? |
21:17:12 | FromDiscord | <haxscramper> Those are not 'unsafe' if you use them safely |
21:17:15 | FromDiscord | <SirJosh> ill write an example of code i'd write in rust |
21:17:26 | FromDiscord | <haxscramper> I mean, use a knife but don't cut your hands |
21:17:50 | FromDiscord | <haxscramper> For ref you need to use ref object, and then it is just |
21:17:51 | FromDiscord | <SirJosh> im gonna be writing a transpiler so i can't trust it to not cut my hands lol |
21:18:19 | leorize | so you want borrowing? |
21:18:22 | FromDiscord | <haxscramper> Well, if you have ref object you can just add `items.add(<some ref[T]>)` |
21:18:26 | FromDiscord | <SirJosh> yes borrowing! |
21:18:27 | FromDiscord | <tomck> ref == Rc, afaik there is no Arc in nim - you just use channels / unsafe ptrs |
21:18:45 | FromDiscord | <SirJosh> ah if we're talking rust `Rc` is fine yeah |
21:18:59 | leorize | Nim's views are not that good yet, but you can give them a try |
21:19:01 | leorize | ~views |
21:19:01 | disbot | views: 11https://nim-lang.github.io/Nim/manual_experimental.html#view-types |
21:19:05 | FromDiscord | <tomck> if you just want Rc, use `ref` |
21:19:16 | FromDiscord | <SirJosh> how can i use `ref` here? |
21:19:43 | leorize | you're looking for `seq[lent T]` if you want to use views |
21:19:45 | FromDiscord | <tomck> not sure i understand your example, where's the issue |
21:19:52 | FromDiscord | <SirJosh> `items.add(# ? #)` not sure what to write here |
21:20:10 | FromDiscord | <tomck> i don't think he wants views, Arc is a specific type in rust for threadsafe refcounting, Rc is the non-threadsafe version ? |
21:20:25 | FromDiscord | <SirJosh> yeah this is gonna be single threaded so Rc is fine |
21:20:26 | FromDiscord | <haxscramper> What do you want to add to `items` |
21:20:34 | FromDiscord | <haxscramper> Single item? |
21:20:37 | FromDiscord | <tomck> he wants to add `item` |
21:20:37 | FromDiscord | <SirJosh> a reference to `item` |
21:20:39 | leorize | they did say that they want borrowing, so I point them to views |
21:21:00 | FromDiscord | <SirJosh> Rc is close to borrowing i think, isn't it? probably not exactly |
21:21:11 | mipri | no, not at all. |
21:21:12 | FromDiscord | <tomck> no, Rc isn't borrowing @SirJosh , it's refcounting |
21:21:17 | FromDiscord | <SirJosh> ah my bad then |
21:21:30 | FromDiscord | <tomck> borrowing is raw pointers with extra compiler checks |
21:21:45 | leorize | "restricted pointers" as I like to call them |
21:21:50 | FromDiscord | <haxscramper> Then AFAIK `item` must be a `ref`, otherwise you can't add it. `ref`is heap-allocated, regular `Example` is regular (non-ref) type, so you would need to take pointer |
21:21:53 | FromDiscord | <tomck> lol, very restricted |
21:22:00 | mipri | what I'd suggest is to write some code that works, in Nim, and show us that, and say "I don't like this for such-and-such reason. Can it be improved?" |
21:22:51 | FromDiscord | <SirJosh> will do then |
21:23:36 | * | junland quit (Quit: %ZNC Disconnected%) |
21:23:42 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2Fmf |
21:26:25 | * | junland joined #nim |
21:27:25 | * | junland quit (Client Quit) |
21:28:00 | FromDiscord | <nikki> if item is not referenced again it'll be a move and not a copy, too |
21:28:13 | FromDiscord | <nikki> which is good if you have no-copy members |
21:28:38 | * | junland joined #nim |
21:28:39 | leorize | needs `sink` to make it a move |
21:29:44 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2Fmh |
21:30:01 | FromDiscord | <nikki> leorize: or sink inference 😮 |
21:30:23 | FromDiscord | <nikki> which i've turned on and take for granted now sry lol |
21:31:33 | leorize | @tomck patty |
21:31:36 | leorize | !repo patty |
21:31:37 | disbot | https://github.com/andreaferretti/patty -- 9patty: 11A pattern matching library for Nim 15 211⭐ 11🍴 |
21:32:38 | * | junland quit (Client Quit) |
21:32:43 | leorize | @nikki careful with that one, it's turned off for now due to being overzealous and causing memory corruptions in closures |
21:33:00 | FromDiscord | <nikki> oh noez |
21:33:25 | mipri | sink inference is on by default now |
21:33:29 | * | junland joined #nim |
21:33:43 | mipri | it's off for now? is fullhelp lying about that? |
21:34:10 | leorize | it's on for stdlib iirc |
21:34:22 | leorize | might have been turned on by default, gotta query Araq for that |
21:34:39 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2Fmi |
21:35:09 | leorize | solved in patty, it generates different variant types |
21:35:15 | FromDiscord | <tomck> oh, yes it is: > A limitation of the variant macro is that field names must be unique across branches (that is, different variants cannot have two fields with the same name). This is actually a limitation of Nim. |
21:35:16 | FromDiscord | <tomck> oh |
21:35:40 | leorize | oh wait I thought it generates separated objects? |
21:35:52 | FromDiscord | <tomck> apparently not, unless the readme is out of date |
21:35:53 | FromDiscord | <nikki> maybe i should just disable closures |
21:36:15 | FromDiscord | <tomck> that's the main problem with variant objects, means i need to create a new type for each variant branch, i think my ast type decl is like 200 lines or something silly |
21:36:16 | * | luis_ quit (Quit: luis_) |
21:36:38 | * | luis_ joined #nim |
21:36:43 | leorize | @tomck feel free to fork patty to make its variant macro generate object types :P |
21:36:49 | leorize | it should be simple |
21:36:56 | FromDiscord | <tomck> > it should be simple |
21:36:59 | FromDiscord | <tomck> mm |
21:37:10 | nixfreak | I feel so stupid going through prologue blog example , this css is way beyond me lol |
21:38:15 | leorize | @tomck I imagine it'd have to generate the IdentDefs to put into each branches, just take them out and make a new object type instead, they use the same stuff |
21:41:06 | FromDiscord | <tomck> i will.. have a look |
21:43:02 | * | hmmm joined #nim |
21:48:47 | hmmm | hmm weird |
21:49:25 | hmmm | I installed a package with nimble, copypasted an example program and I get an error on import of the main library |
21:49:40 | leorize | username checks out |
21:49:40 | mipri | what's the error? |
21:49:53 | hmmm | 6, 8) Error: cannot open file: imageIO |
21:50:16 | mipri | which package is that? |
21:50:32 | hmmm | https://github.com/dizzyliam/inumon |
21:51:23 | FromDiscord | <SirJosh> sent a code paste, see https://play.nim-lang.org/#ix=2Fmn |
21:51:31 | FromDiscord | <SirJosh> the reason i dont wanna use a `ref object` is cuz id like to avoid heap allocations if possible for performance™️ |
21:51:52 | mipri | the Rcs you want are heap allocated though. |
21:51:57 | hmmm | leorize :> |
21:52:24 | FromDiscord | <SirJosh> oh didn't know that. kinda sad :( |
21:52:38 | FromDiscord | <SirJosh> an rc is smaller than an object though right |
21:52:38 | leorize | use the right tool for the right job :P |
21:52:39 | mipri | hmmm: which is the example that fails? |
21:52:43 | FromDiscord | <SirJosh> (edit) "an rc is smaller than an ... object" added "Example" |
21:52:57 | leorize | nope |
21:53:04 | hmmm | this one |
21:53:05 | hmmm | https://github.com/dizzyliam/inumon/blob/master/inumon/gui.nim |
21:53:12 | disruptek | the rc is bigger on the outside. |
21:53:58 | leorize | hmmm: can you post the snippet you're trying to compile? |
21:54:08 | mipri | hmmm: that's located in the same directory with the modules it's importing. if you're going to use that in your own code you'll want add a inumon/ prefix to them |
21:54:23 | mipri | import inumon/[imageIO, coreTypes] |
21:54:26 | hmmm | ohhh |
21:54:35 | hmmm | I knew I was failing somehow |
21:54:41 | hmmm | thanks mipri I'l try |
21:55:00 | leorize | you can also just `import inumon/gui` :P |
21:55:05 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
21:55:13 | leorize | then you have access to all of the procs |
21:55:23 | * | pbb joined #nim |
21:56:07 | hmmm | that worked beautifully except I get another kind of error :D |
21:56:33 | hmmm | but I'll try to figure it out don't want to waste your time :> ty both |
21:58:47 | FromDiscord | <SirJosh> mipri i think in the actual usecases im going to be using this in, having heap allocated rcs will actually make more sense than having heap allocated objects (but for this example, it's not good) |
21:59:28 | leorize | if you're using rc, then it has to be heap allocated |
21:59:55 | leorize | (because it doesn't make sense to do so if it's stack allocated) |
22:00:02 | haxscramper | disruptek: If you are still looking into this - I found that `hashcommon.rawGet` takes `Table[NodeId[string, string], seq[NodeId[string, string]]]`, but if I do `echo typeof` on the `t.data`. I get `KeyValuePair[system.string, seq[string]]` |
22:00:08 | haxscramper | Which is really odd. |
22:00:45 | FromDiscord | <SirJosh> right yeah heap allocated RCs will make more sense than a heap allocated object for the other usecases i have planned for this |
22:01:04 | Zoom[m] | Hey everyone, I've written a reverse iterator for narimiran's fusion/btreetables. https://play.nim-lang.org/#ix=2Fml Could anyone please review? I didn't particularly dig the experience, but it works. |
22:01:42 | FromDiscord | <SirJosh> does nim have an `rc` datatype? |
22:01:45 | FromDiscord | <SirJosh> (edit) "`rc`" => "`Rc`" |
22:01:56 | leorize | it's called `ref` |
22:02:02 | FromDiscord | <SirJosh> or do i have to switch to `orc` gc |
22:02:13 | FromDiscord | <nikki> yeah just use `ref T`? and use with `--gc:arc` or `--gc:orc` |
22:02:29 | FromDiscord | <SirJosh> oh so `type Example = ref object`? |
22:02:34 | leorize | yes |
22:02:35 | FromDiscord | <nikki> there's one heap allocation per object, the rc is in a header before the object |
22:02:49 | FromDiscord | <nikki> yeah or you can also just write `type Example = object` and then `ref Example` everywhere |
22:02:57 | disruptek | sirjosh: what's the application? |
22:03:12 | FromDiscord | <SirJosh> here's the example from earlier <https://discord.com/channels/371759389889003530/371759389889003532/780904166280396881> |
22:03:21 | FromDiscord | <nikki> one nice way to go about things also is to wrap the `ref` inside an object, and have more of an interface in that handle object |
22:03:23 | FromDiscord | <SirJosh> of where i want to use refs for the sake of getting to know nim |
22:03:26 | disruptek | haxscramper: weird. |
22:03:32 | haxscramper | https://play.nim-lang.org/#ix=2Fmt |
22:04:00 | haxscramper | That's what I'm getting right now |
22:05:03 | disruptek | well, i'm not really familiar with the tables impl but that's not what i expected. |
22:06:21 | haxscramper | And again - this is only due to line moves, nothing else. Haven't touched other part of the code. The only thing I figured out is that I can't instantiate `Mapping[string, string]` in any way before calling `makeIndex`. |
22:06:32 | disruptek | i would expect the data to be keyval[hash, seq[valueType]] |
22:07:25 | haxscramper | And in 'normal' state it is - `KeyValuePairSeq[NodeId[system.int, system.string]]` to be precise |
22:07:27 | FromDiscord | <nikki> @SirJosh in the `?` part in your code you can write `(ref Example)(id: 2)` for example |
22:07:34 | FromDiscord | <nikki> that's just a constructor for a ref'd object |
22:08:35 | disruptek | haxscramper: again, the reordering-of-stmts-changes-the-behavior is the most worrying bit. |
22:08:43 | FromDiscord | <SirJosh> and that'll construct an rc if the gc is orc/arc? |
22:09:16 | FromDiscord | <nikki> yes |
22:09:18 | leorize | it's always an rc for most of the supported gc |
22:09:21 | FromDiscord | <SirJosh> alright cool thanks |
22:09:42 | disruptek | ref == managed pointer, not necessarily rc'd. |
22:10:06 | leorize | well I'm talking about "most of the supported gc" :P |
22:10:22 | disruptek | you're right, of course. |
22:10:28 | haxscramper | And just noticed another strange thing. `KeyValuePairSeq[A, B]` has two generic parameters, but in 'normal' case it `typeof(t.data)` is has type `KeyValuePairSeq[NodeId[system.int, system.string]]`, which, AFAIC is generic specialization with single parameter |
22:10:51 | leorize | but tbh I wouldn't use `rc` because it's `rc` |
22:11:35 | FromDiscord | <nikki> what does "use `rc`" mean? |
22:11:36 | FromDiscord | <SirJosh> the problem is though i want all of the elements of the array to be linked to the same base item, that seems like it'll just construct a new `Example` for each element? |
22:11:49 | disruptek | don't confuse the lad. |
22:12:01 | FromDiscord | <nikki> tbh @SirJosh i don't think it's clear what you want to do |
22:12:02 | disruptek | haxscramper: what do you mean by "normal"? |
22:12:10 | haxscramper | one that compiles |
22:12:16 | disruptek | oh. |
22:12:22 | disruptek | a reordered version. |
22:12:24 | disruptek | this is madness. |
22:12:30 | disruptek | can it be reduced? |
22:12:53 | FromDiscord | <nikki> if you want multiple refs pointing to the same thing, then do `let theThing = (ref Example)(id: 1); for elem in arr.mitems: elem = theThing` |
22:13:05 | FromDiscord | <nikki> where `arr` elements are `ref Example` type |
22:13:14 | FromDiscord | <nikki> it |
22:13:19 | haxscramper | I tried, but well ... reduced version works just fine. I will try just copying all related parts and cutting out things |
22:13:20 | FromDiscord | <nikki> woops. sorry. it's just regular code 😄 |
22:13:50 | leorize | @SirJosh wanted safe references to the objects, when you want that you should use `ref` because that's a "managed pointer", not because it's implemented with ref-counting |
22:13:58 | FromDiscord | <SirJosh> i want to make an array of 10 elements where each element points to `item`↵- dont wanna use `ptr` because it's unsafe and i don't trust it to be used in this example↵- don't wanna turn `Example` from an `object` into a `ref object` because in the usecases i plan to have this in, i dont wanna encur a heap allocation per Example |
22:14:46 | FromDiscord | <nikki> can you clarify that first sentence more -- you want all of the elements to be a pointer to the same thing? |
22:15:03 | FromDiscord | <nikki> the rest of your sentences are about what you want to not do, but still trying to clarify what you do wnat to do |
22:15:58 | * | nixfreak quit (Ping timeout: 260 seconds) |
22:16:03 | disruptek | just use an array of objects, then. |
22:16:08 | disruptek | no heap alloc, no pointers. |
22:16:15 | disruptek | to refer to just one, use a static index. |
22:16:24 | FromDiscord | <nikki> disruptek: it seems like they're saying they want all of the elements to refer to the same underlying instance |
22:16:28 | FromDiscord | <SirJosh> yes |
22:16:29 | FromDiscord | <nikki> but, i still can't glean if that's what they mean |
22:16:32 | FromDiscord | <SirJosh> all of them should refer to the same instance |
22:16:35 | FromDiscord | <SirJosh> via reference counting |
22:16:47 | leorize | then just use `ref`? |
22:16:48 | FromDiscord | <nikki> reference counting is about lifetime management, not about referring |
22:16:50 | disruptek | so use a pointer to a single object on the stack. |
22:16:51 | FromDiscord | <nikki> if you want a reference to a non-heap allocated thing, you need to use views or ptrs, or eg. `{.byaddr.}` which really is a ptr anyway |
22:17:25 | FromDiscord | <nikki> `let theObj = Example(id: 3); let thePtr = theObj.addr; for elem in arr.mitems: elem = thePtr;` |
22:17:50 | disruptek | he wants rc but he doesn't want heap alloc. 🙄 |
22:18:07 | FromDiscord | <SirJosh> each rc can be heap allocated that's fine |
22:18:09 | disruptek | count your own references, i guess. |
22:18:14 | FromDiscord | <SirJosh> but does the instance itself have to be heap alloced? |
22:18:24 | FromDiscord | <nikki> there's one rc per instance |
22:18:29 | FromDiscord | <nikki> not one rc per ref |
22:18:34 | disruptek | that's the whole point. |
22:19:00 | FromDiscord | <nikki> so if you're not heapallocating the instance, why would you heap allocate the rc + if you're not heap allocating it, its lifetime is managed anyway, so what does the rc mean? |
22:19:07 | FromDiscord | <nikki> it seems like you might be confusing concepts a bit? |
22:19:10 | leorize | https://play.nim-lang.org/#ix=2FmB |
22:19:15 | * | hmmm quit (Quit: zZz) |
22:19:16 | leorize | I believe this is what you're aiming for |
22:19:36 | leorize | get it right first, performance later |
22:19:52 | FromDiscord | <ElegantBeef> Why not be idiomatic instead of idiotic 😄 |
22:20:33 | mipri | actually I think he just wants reference semantics but is confused. https://play.nim-lang.org/#ix=2FmC |
22:20:56 | mipri | an array of ten Examples that are all the same one, without incurring ten separate allocations. |
22:21:19 | FromDiscord | <nikki> all of these heap allocate the one instance, which they're saying they don't want (but you need, and i agree with the examples lol) |
22:21:23 | disruptek | well, doing it that way will incur a couple allocs for the seq. |
22:21:41 | mipri | more recently, he said he doesn't want ten heap allocations for ten references of item |
22:21:57 | disruptek | sure. |
22:22:02 | FromDiscord | <nikki> it's funny because they said each rc can be heap allocated but the instance doesn't |
22:22:09 | disruptek | sequences start at size 4, iirc. |
22:22:11 | FromDiscord | <nikki> which is just -- there's only one rc per instance. so like what? |
22:22:47 | FromDiscord | <SirJosh> yeah i think im just confused about nim semantics and how it works and how rcs are implemented |
22:22:52 | FromDiscord | <SirJosh> one sec a bit busy |
22:22:57 | disruptek | don't worry about it. |
22:23:05 | FromDiscord | <nikki> just use refs, get on with things 😄 |
22:23:09 | FromDiscord | <ElegantBeef> Cant you see how RCs are implemented by doing `--expandarc`? |
22:23:15 | leorize | nope :P |
22:23:23 | disruptek | it doesn't matter. |
22:23:30 | FromDiscord | <nikki> arc.nim or look at gen'd C code |
22:23:34 | mipri | http://zevv.nl/nim-memory/ is a good document for understanding how memory works in Nim. |
22:24:01 | leorize | @SirJosh if you have any questions regarding the example I sent, just comment your questions on it then share it here with us |
22:24:04 | FromDiscord | <nikki> expandarc doesn't actually show the refcount calls, only shows the =sink =copy etc. insertions |
22:24:07 | disruptek | and outside of nim. |
22:24:11 | leorize | that might help clear things up |
22:28:12 | * | apahl quit (Ping timeout: 260 seconds) |
22:29:06 | * | apahl joined #nim |
22:42:47 | * | vicfred quit (Quit: Leaving) |
22:50:11 | * | luis_ quit (Ping timeout: 272 seconds) |
22:50:30 | haxscramper | disruptek: https://play.nim-lang.org/#ix=2FmL - minimized version |
22:50:31 | haxscramper | |
22:51:05 | haxscramper | Thomas Had Never Seen Such Bullshit Before |
22:56:41 | * | tane quit (Quit: Leaving) |
22:58:43 | haxscramper | More mimized version: https://play.nim-lang.org/#ix=2FmO |
22:59:38 | haxscramper | I will be off until tomorrow, but so far I could only say that I still have absolutely no idea what is going on |
23:00:09 | haxscramper | And in last version I failed to just remove `TreeIndex` completely - no errors then. |
23:00:44 | * | haxscramper quit (Remote host closed the connection) |
23:04:08 | * | D_ quit (Remote host closed the connection) |
23:05:03 | * | D_ joined #nim |
23:16:56 | disruptek | haxscramper: if you're still here, why are your equality and hash funcs simply discarding? |
23:18:56 | disruptek | i cannot imagine how changing the order of those two statements should cause an error. |
23:23:49 | FromDiscord | <haxscramper> Because it doesn't matter when they return as long as it compiles. Runtime behavior is of no importance at this stage |
23:24:14 | FromDiscord | <haxscramper> what they return |
23:24:43 | disruptek | fair. |
23:27:54 | disruptek | it's bananas. |
23:32:46 | FromDiscord | <Quibono> Is it possible to implement a lock that rate limits access to a resource? |
23:32:57 | disruptek | completely impossible. |
23:34:46 | FromDiscord | <Quibono> Gotcha, so you'd have to basically make a lock that isn't a lock, lol. |
23:36:11 | mipri | https://nim-lang.org/docs/manual_experimental.html#guards-and-locks |
23:36:51 | FromDiscord | <Recruit_main707> wait, so disruptek was wrong? |
23:36:58 | FromDiscord | <Recruit_main707> impossible |
23:39:18 | FromDiscord | <iWonderAboutTuatara> wait can you not name a variable the name of an import? |
23:39:22 | FromDiscord | <iWonderAboutTuatara> wow |
23:44:27 | FromDiscord | <Quibono> So I make a template of a lock, that contains a counter, that keeps it locked unless the counter is in a certain state? |
23:44:59 | disruptek | of course you can. to both of you. |
23:45:27 | disruptek | quibono: you want a semaphore. |
23:47:06 | FromDiscord | <Quibono> Thank you for giving me a name for the thing, I wouldn't have known to look. |
23:48:36 | FromDiscord | <Quibono> SOO I have a variable, hidden behind a lock so it is threadsafe, which is the counter |
23:49:07 | disruptek | there's a semaphore in stdlib but iirc it's not exported. but you can copy it. |
23:49:19 | disruptek | i wrote one for cps, too. |
23:49:20 | disruptek | !repo cps |
23:49:20 | disbot | https://github.com/disruptek/cps -- 9cps: 11Continuation-Passing Style for Nim 🔗 15 40⭐ 2🍴 |
23:50:06 | disruptek | maybe i based it on the stdlib version, i dunno. |
23:55:56 | FromDiscord | <Quibono> Cool, I'll take a look. |
23:59:33 | * | vicfred joined #nim |