<< 07-06-2021 >>

00:35:02*D_ quit (Ping timeout: 245 seconds)
00:36:00*fputs joined #nim
00:38:39ForumUpdaterBotNew thread by Fire: Just starting with Nim and loving it! , see https://forum.nim-lang.org/t/8093
00:50:41*D_ joined #nim
00:56:40*nphg joined #nim
00:59:56*nphg1 quit (Ping timeout: 260 seconds)
01:33:26*fputs quit (Remote host closed the connection)
01:50:45*aeverr quit ()
01:59:17*keisisqrl joined #nim
01:59:47*keisisqrl quit (Remote host closed the connection)
02:11:46FromDiscord<Goat> Made a bot with dimscord https://media.discordapp.net/attachments/371759389889003532/851282254570848296/unknown.png
02:12:48*stealthii28 joined #nim
02:12:51*stealthii28 quit (Remote host closed the connection)
02:15:48Prestigenice
02:18:07*Ghosthree328 joined #nim
02:18:45*Ghosthree328 quit (Remote host closed the connection)
02:33:24*emptty404621 joined #nim
02:33:32*emptty404621 quit (Remote host closed the connection)
02:38:38FromDiscord<Goat> https://media.discordapp.net/attachments/371759389889003532/851289013536555038/unknown.png
02:40:54FromDiscord<Rika> sus
03:18:27*ryerf_ joined #nim
03:18:46*ryerf_ quit (Remote host closed the connection)
03:50:52*spiderstew_ joined #nim
03:51:42*spiderstew quit (Ping timeout: 245 seconds)
04:03:46*timlegge17 joined #nim
04:04:02*timlegge17 quit (Remote host closed the connection)
05:04:02*joey25 joined #nim
05:04:26*joey25 quit (Remote host closed the connection)
05:49:08*blackpawn quit (Ping timeout: 272 seconds)
05:53:25*narimiran joined #nim
06:01:41*kmh joined #nim
06:01:47*kmh quit (Remote host closed the connection)
06:20:50*Vladar joined #nim
06:22:51*blackpawn joined #nim
06:25:50*tito joined #nim
06:25:57*tito is now known as Guest17468
06:26:21*Guest17468 quit (Remote host closed the connection)
07:06:05*PMunch joined #nim
07:09:54FromDiscord<hamidb80> hey
07:10:27FromDiscord<ElegantBeef> Hello
07:10:44FromDiscord<hamidb80> is there any library that create constructor for objects?
07:11:03FromDiscord<hamidb80> (edit) "create" => "creates"
07:11:04FromDiscord<ElegantBeef> You already know there is
07:11:31FromDiscord<ElegantBeef> You've starred constructor, so unless you star everything with no memory 😛
07:12:02FromDiscord<hamidb80> i dont remember actually
07:12:11FromDiscord<ElegantBeef> ah in that case https://github.com/beef331/constructor
07:12:31FromDiscord<hamidb80> i knew i saw it somewhere
07:12:45FromDiscord<ElegantBeef> Both constructor/defaults will give you constructors depending on what you're after
07:18:52*huz[m]0 joined #nim
07:19:02*huz[m]0 quit (Remote host closed the connection)
07:32:00FromDiscord<hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3p0H
07:32:45FromDiscord<hamidb80> same with `let`
07:33:08FromDiscord<hamidb80> (edit) "https://play.nim-lang.org/#ix=3p0H" => "https://paste.rs/Rtq"
07:34:16FromDiscord<hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3p0I
07:34:24FromDiscord<hamidb80> (edit) "https://play.nim-lang.org/#ix=3p0I" => "https://play.nim-lang.org/#ix=3p0J"
07:35:01*seankndy joined #nim
07:35:19FromDiscord<hamidb80> https://github.com/nim-lang/Nim/issues/6343
07:35:31*seankndy quit (Remote host closed the connection)
07:36:02FromDiscord<ElegantBeef> Presently you cannot hold onto openArray's directly afaik
07:37:38FromDiscord<hamidb80> `openArray` is sorta tricky
07:38:11FromDiscord<ElegantBeef> Using view types makes it less tricky, but yea they're considered borrowed memory so it really shouldnt ever outlive what they're referencing
07:45:18*Hack519024 joined #nim
07:46:02*Hack519024 quit (Remote host closed the connection)
08:03:50FromDiscord<System64 ~ Flandre Scarlet> In reply to @ElegantBeef "Ah `GmeTypeT` should be": I have an error there and I don't understand why https://media.discordapp.net/attachments/371759389889003532/851370855023378493/unknown.png
08:05:09planetis[m]Can a forum admin review the accounts ahmaada and Menny11?
08:09:17PMunchplanetis[m], try and ping @dom96
08:09:36FromDiscord<ElegantBeef> Might need to be turned into a type block
08:09:57FromDiscord<ElegantBeef> Since it seems it's just a types for specific consts but idk
08:10:31FromDiscord<ElegantBeef> Uncertain why this exists in the C code https://github.com/mmontag/game-music-emu/blob/master/gme/gme.h#L164-L175
08:11:56FromDiscord<System64 ~ Flandre Scarlet> maybe I should use the C++ header
08:12:09FromDiscord<ElegantBeef> Nah C++ tends to make it more annoying
08:12:20FromDiscord<System64 ~ Flandre Scarlet> ah alright I avoid it so
08:12:42FromDiscord<ElegantBeef> You can probably just remove them but idk how they're used
08:15:29*NimBot joined #nim
08:17:31*tehgooch joined #nim
08:17:32*tehgooch is now known as Guest67049
08:17:54*Guest67049 quit (Remote host closed the connection)
08:20:44*gbmor joined #nim
08:20:53*gbmor quit (Remote host closed the connection)
08:21:49FromDiscord<System64 ~ Flandre Scarlet> I can't remove them
08:26:54FromDiscord<ElegantBeef> What's the entire line for one of those imported variables?
08:28:54FromDiscord<Araq> @Varriount I'm sorry to think so, but I see no "hacks where we could have fixed it properly", we spend lots of hours on the design aspect of features. As for the lack of replies, well we reply to many many things and we cannot do more. Just because you disagree on `shouldAcceptRequest` that doesn't mean it's a hack.
08:28:59FromDiscord<System64 ~ Flandre Scarlet> in the header or nim?
08:29:04FromDiscord<ElegantBeef> In nim
08:29:50FromDiscord<Araq> (edit) "to" => "you"
08:29:51FromDiscord<System64 ~ Flandre Scarlet> https://media.discordapp.net/attachments/371759389889003532/851377399781261332/unknown.png
08:32:01FromDiscord<ElegantBeef> shouldnt those be consts
08:32:14FromDiscord<Araq> sent a long message, see http://ix.io/3p0U
08:32:41FromDiscord<System64 ~ Flandre Scarlet> they should be consts?
08:33:04FromDiscord<System64 ~ Flandre Scarlet> they're consts
08:33:04FromDiscord<ElegantBeef> Well i imagine atleast, speaking out my arse mostly but they're const's in C and i dont know how you import a runtime value like that
08:33:36FromDiscord<ElegantBeef> well presently they're vars not consts
08:33:48FromDiscord<Araq> > I rarely know if I need to devote time to only a↵> brief comment, or a long, explanatory one.↵Brief comments are fine as you don't have to lecture me...
08:34:16FromDiscord<System64 ~ Flandre Scarlet> if I put const I have a lot of errors
08:34:32*MorbidMind-M27 joined #nim
08:34:36*MorbidMind-M27 quit (Remote host closed the connection)
08:36:36FromDiscord<Araq> sent a long message, see http://ix.io/3p0V
08:39:57FromDiscord<Unaimend> Is there some plan to enable the "redefinition" of fields in object variants? Is that even a good idea?↵For clarification https://play.nim-lang.org/#ix=3p0X
08:42:12FromDiscord<Araq> there are RFCs about it, it's widely regarded to be good idea, however not your particular version of it
08:42:40FromDiscord<ElegantBeef> Typically what is talked about is with sharing fields across variants
08:43:08FromDiscord<Unaimend> In reply to @Araq "there are RFCs about": I just oriented myself on existing nim syntax
08:43:41FromDiscord<Unaimend> In reply to @ElegantBeef "Typically what is talked": should have the same effect for my use case and seems like a good idea
08:43:42FromDiscord<ElegantBeef> Think the current plan for variants is to allow the branches to be additive instead of identical to the `case`
08:44:44FromDiscord<Unaimend> In reply to @Araq "there are RFCs about": Does someone have the link to this RFC, it does not seem to be in the nim-lang/RFC repo
08:45:50FromDiscord<System64 ~ Flandre Scarlet> I have all theses errors https://media.discordapp.net/attachments/371759389889003532/851381420756041768/unknown.png
08:46:09FromDiscord<ElegantBeef> https://github.com/nim-lang/RFCs/issues/19 @Unaimend
08:46:32FromDiscord<ElegantBeef> Ah goes to https://github.com/nim-lang/RFCs/issues/368
08:52:23FromDiscord<ElegantBeef> ponders how you even handle shared field names nicely
08:52:25FromDiscord<Unaimend> Thank you
08:52:46FromDiscord<Unaimend> In reply to @ElegantBeef "*ponders how you even": Does it seem hard to you?
08:55:20FromDiscord<ElegantBeef> Well i'm not a compiler dev so take that into consideration, but when you do `.field1` the type system needs to be able to know what that type is, so that means when you grab `.field1` you have to have a hidden branch that occurs based off the discriminator of the type, but also with the body following expecting a given type
08:56:34FromDiscord<ElegantBeef> So afaik it requires an unpack step which only allows for the expected type
08:57:49FromDiscord<ElegantBeef> I ran into a similar issue when testing the unpack with my variant generator
08:58:32FromDiscord<ElegantBeef> Atleast in this case the value could just be stored as a union since the discriminator of the type tells you the type
09:07:24*Dyavol-m1 joined #nim
09:07:36*Dyavol-m1 quit (Remote host closed the connection)
09:15:01FromDiscord<Unaimend> Ahh ookk, I am sure Araq will find a way 🙂
09:15:11planetis[m]I think using ``--nomain:on`` causes exceptions (and other ref objects) not to be initialized properly, their destructor field seems empty. Am I close or is it smth else?
09:16:19planetis[m]specifically the PreMain function, it seems isn't run
09:25:50*Vohveli15 joined #nim
09:26:07*Vohveli15 quit (Remote host closed the connection)
09:27:23*Graypup_ joined #nim
09:27:49*Graypup_ quit (Remote host closed the connection)
09:33:18FromDiscord<Unaimend> In reply to @ElegantBeef "Well i'm not a": So I am not sure if I like araqs proposal on shared field but it has its advantages, but if I understand it correctly his way would not allow fields with the same name but different types. Correct?
09:34:33FromDiscord<ElegantBeef> Yea presently that isnt possible but i do have an idea that'd enable it using a macro, but i dont think i should implement it since it's a rather minimal thing, but basically just use a union for the variable, still has that unpacking issue but minor issue
09:35:13FromDiscord<Unaimend> In reply to @ElegantBeef "Yea presently that isnt": Seems interesting, my knowledge and macro/template stuff is sadly really bad 😢
09:36:04FromDiscord<ElegantBeef> Well it's not overly beneficial since you'd have to declare you type in a macro block it'd emit it then you're pretty much required to do `thing.unpackField1`
09:38:02ForumUpdaterBotNew thread by Xigoi: Nimly parser generator does not work in JavaScript backend, see https://forum.nim-lang.org/t/8094
09:38:16planetis[m]yeah I think that was the cause of the memory leaks
09:38:26FromDiscord<Unaimend> In reply to @ElegantBeef "Well it's not overly": ahh ok, I am just used too ADTs from Haskell and really like them there. At the moment I am using object variants to implement a file format spec which imo gives really nice code
09:41:29*Arrrrrrrr joined #nim
09:46:30*winny4 joined #nim
09:46:44*winny4 quit (Remote host closed the connection)
09:50:32*arkurious joined #nim
10:01:16*m0rr1gan joined #nim
10:01:47*m0rr1gan quit (Remote host closed the connection)
10:06:21FromDiscord<haxscramper> Different types for fields only make sense in guarded access, where you can infer which field in particular was accessed. This can easily be implemented using macros, https://play.nim-lang.org/#ix=3n4G
10:06:43FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3p1k
10:07:18FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3p1l
10:09:12FromDiscord<haxscramper> Current macro solutions require separate hack around type definition, where you can't put things in regular type section, but it can be done using `VariantName: tuple[field: int]`, `OtherVariant: tuple [field: string]`
10:09:29*walzu116 joined #nim
10:09:50FromDiscord<haxscramper> Which is a valid filed definition syntax. And then rewritten into corresponding case objects
10:09:50*walzu116 quit (Remote host closed the connection)
10:10:45FromDiscord<haxscramper> And this would even work with current patter matching implementation for the most part, though constructors still have to be defied externally
10:12:30FromDiscord<haxscramper> So it does not make any sense to implement anything more than shared fields (because this is insanely annoying when working with regular case objects) from #368. Maybe pattern matching from fusion should provide this macro
10:12:56FromDiscord<Unaimend> Thanks for your insight
10:12:59FromDiscord<haxscramper> Implementation, though I'm not really sure if this is the right place. Maybe fusion/variants
10:13:21FromDiscord<Unaimend> I am just baffled what can be achieved with nim macros
10:13:25FromDiscord<haxscramper> Or something like that, for common boilerplate implementation and helpers
10:15:28FromDiscord<Unaimend> Damn, you are some kind of macro god, aren't you ? 😂
10:17:01FromDiscord<haxscramper> It is not that complicated once you get used to it
10:18:04FromDiscord<Unaimend> I try so stay away from them, because "with great power comes great responsibility" . And at least in the first days of working with them I would totally overuse them 🙈
10:20:51FromDiscord<haxscramper> I think it is better to start with macros, get burned by own errors and bad design decisions and figure out what they can be used for, and where it's better to avoid. For example I write less DSL now, and instead opt for better functions/object with small number of strategically placed templates/macros, most of which are pretty simple
10:21:11*pelle21 joined #nim
10:21:20*pelle21 quit (Remote host closed the connection)
10:22:14FromDiscord<haxscramper> OR I go for DSL that tries to match regular code as closely as possible, like with fusion matching, and then figure out excessive parts that were over engineered
10:23:10FromDiscord<Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=3p1o
10:23:26FromDiscord<haxscramper> In order to make improved DSL that takes in account earlier shortcomings.
10:23:46FromDiscord<haxscramper> Not really different from general code cycle basically
10:23:47FromDiscord<Unaimend> In reply to @haxscramper "*OR* I go for": Seems reasonable
10:26:09FromDiscord<Unaimend> In reply to @haxscramper "In order to make": I will look into them when I finished the first part of my bioinformatics lib
10:26:28FromDiscord<Unaimend> But there still a few file format specs to implement
10:26:45FromDiscord<Unaimend> sent a code paste, see https://play.nim-lang.org/#ix=3p1p
10:27:00FromDiscord<haxscramper> Time to write an AI in nim macros
10:27:08FromDiscord<Unaimend> And even more tests and documentation to write 😢
10:28:51FromDiscord<Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=3p1r
10:29:58FromDiscord<Unaimend> I think DSLs can be pretty cool, I presume there a quite few usecases in my domain for them
10:31:51FromDiscord<haxscramper> DSL is basically a separate language, and most people are not language developers
10:32:15FromDiscord<haxscramper> You need either in-depth knowledge of the particular domain,or very concise DSL
10:32:54FromDiscord<Unaimend> yeah, I work alot with biologists so domain knowledge exists
10:32:55FromDiscord<haxscramper> And usually you get "smaller language" that is struggling to get out of your initial DSL version
10:33:46FromDiscord<Unaimend> At the moment, nim is clear enough
10:33:48FromDiscord<haxscramper> In reply to @Unaimend "yeah, I work alot": Users must be familiar with this as well. E.g. if you opt for verbose procedures it might be more annoying to use, but easier to figure out
10:34:04FromDiscord<Unaimend> In reply to @haxscramper "Users must be familiar": Yeah I agree
10:40:27FromDiscord<System64 ~ Flandre Scarlet> @haxscramper do you know why I have theses errors?
10:43:39FromDiscord<haxscramper> Const requires explicit initialization, and this is a syntax requirement
10:44:21FromDiscord<haxscramper> So it tries to parse `const a and expects `= 333`, but you don't have this, which result in invalid indentation error
10:44:36FromDiscord<haxscramper> I think you should wrap this as 'var' instead
10:46:52FromDiscord<System64 ~ Flandre Scarlet> alright↵But I have weird errors
10:47:27FromDiscord<System64 ~ Flandre Scarlet> When I run the program, it instant crash with this error https://media.discordapp.net/attachments/371759389889003532/851412031110512650/unknown.png
10:48:40FromDiscord<System64 ~ Flandre Scarlet> And it comes from there https://media.discordapp.net/attachments/371759389889003532/851412336542482482/unknown.png
10:51:33FromDiscord<haxscramper> If I understand correctly it means there is no such symbol in the dynamic library you are trying to use
10:51:59FromDiscord<haxscramper> But I'm not sure since I haven't used dynlib for anything yet
10:52:12FromDiscord<System64 ~ Flandre Scarlet> that's weird
10:52:23PMunchYou can use `nm -a` to see all the symbols available in a dynamic library
10:52:37FromDiscord<System64 ~ Flandre Scarlet> nm -a file.dll?
10:52:55PMunchAh.. You have a DLL..
10:53:02PMunchIt might work still though
10:53:20FromDiscord<Rainbow Asteroids> it is in a saucecode tho 🤔 https://github.com/mcfiredrill/libgme/blob/ae76c88be9beb5132ee0e50c5006bbcb2ccb798e/gme/gme.h#L156
10:54:04FromDiscord<System64 ~ Flandre Scarlet> that's what I used
10:54:33FromDiscord<System64 ~ Flandre Scarlet> "libgme.dll : no symbols"
10:54:52PMunchThen I guess it doesn't work for DLLs :P
10:55:38FromDiscord<Rainbow Asteroids> what if you try grepping the dll 😆
10:55:56FromDiscord<Rainbow Asteroids> for `gme_ay_type`
10:56:35FromDiscord<Rainbow Asteroids> or do they not store the symbol as ascii text
10:56:54PMunchThere probably is a Windows utility created by a third party with a janky UI that you can download from a random file-share site behind an ad.fly link :P (assuming you don't grab a virus instead)
10:57:17FromDiscord<System64 ~ Flandre Scarlet> what is grepping a dll?
10:57:34PMunchgrep is a text search utility
10:57:36FromDiscord<Rainbow Asteroids> lol
10:57:51planetis[m]dom96: can you review two new forum accounts: https://forum.nim-lang.org/profile/Menny11 https://forum.nim-lang.org/profile/ahmadaa
10:57:55FromDiscord<Rainbow Asteroids> yeah, its a linux core util, i didn't realize you were on windows
10:58:04FromDiscord<Rainbow Asteroids> he's offline on discord
10:58:56FromDiscord<System64 ~ Flandre Scarlet> ah yeah
10:59:37FromDiscord<System64 ~ Flandre Scarlet> I dunno if it's ascii or not
11:02:52FromDiscord<dom96> In reply to @planetis "<@132595483838251008>: can you review": planetis: looks like they're already reviewed, one marked as spammer
11:03:09planetis[m]ok thank you
11:06:05PMunchHave you been spamming the forum planetis[m]? :P
11:06:25planetis[m]what me
11:06:29planetis[m]how comes?
11:06:58planetis[m]I though it was a new user of my library and I wanted to see what they had to say
11:07:13planetis[m]but it turns out there were a stupid spammer
11:08:10PMunchAah right, I thought it were new accounts you had made :P
11:08:38FromDiscord<System64 ~ Flandre Scarlet> But seems this Library is weird
11:08:43*Nazara joined #nim
11:08:47planetis[m]lol
11:09:11FromDiscord<System64 ~ Flandre Scarlet> And I don't find any Chiptune module
11:09:12*Nazara quit (Remote host closed the connection)
11:12:39planetis[m]i will though make a new account bc I need my new username
11:14:26*himcesjf13 joined #nim
11:15:09*himcesjf13 quit (Remote host closed the connection)
11:18:46*noidea_ joined #nim
11:19:23*noidea_ quit (Remote host closed the connection)
12:36:52PMunchHmm, it's easy to forget how much extra typing and repetition there typically is in other languages after having used Nim for a while
12:41:57*ve7it joined #nim
12:42:37*ve7it quit (Remote host closed the connection)
13:10:55*ZoomZoomZoom joined #nim
13:21:44*ZoomZoom joined #nim
13:24:46*DuncanT29 joined #nim
13:25:01*ZoomZoomZoom quit (Ping timeout: 248 seconds)
13:25:09*DuncanT29 quit (Remote host closed the connection)
13:41:00planetis[m]btw what code like this: https://github.com/treeform/flatty/blob/master/src/flatty/binny.nim#L25 do when the size of the string is less than 8 bytes?
13:41:43planetis[m]does it read garbage?
13:45:42*vsantana joined #nim
13:45:44PrestigeI'd assume so
13:45:48PMunchHmm, probably yeah
13:45:57PMunchOr crash
13:46:21PMunchIf the OS doesn't want you to access that memory
13:51:26planetis[m]how to put it politely... I just wish people who put my libraries on their benchmarks, at least dont screw up stuff like that
13:52:10*ClaytonargiloVE3 joined #nim
13:52:16*ClaytonargiloVE3 quit (Remote host closed the connection)
13:53:36planetis[m]or commits like this: https://github.com/guzba/supersnappy/commit/7090bf79ab5d8de2443e6788e3e51764a7f460b1 fucking investigate why your software is slower, dont micro optimize, there is a reported memory leak
13:53:43planetis[m]/rant
13:54:30planetis[m](and cast does a copy)
13:58:57*rockcavera joined #nim
14:04:50*vsantana quit (Quit: Leaving)
14:05:36*PMunch quit (Quit: leaving)
14:28:04*tane joined #nim
14:34:10*xet7 quit (Remote host closed the connection)
14:34:38*letto quit (Ping timeout: 258 seconds)
14:35:21*xet7 joined #nim
14:36:50*aenesidemus joined #nim
14:48:18FromGitter<kaushalmodi> PMunch: Hello! Are you here?
14:49:51*ohama2 joined #nim
14:50:18*ohama2 quit (Remote host closed the connection)
14:50:49*aenesidemus quit (Quit: Leaving)
14:57:42FromDiscord<hamidb80> why do i get error when i trying to do this?↵↵`body.kind in (nnkProcDef, nnkFuncDef)`
14:58:15FromGitter<kaushalmodi> The `in` would expect a set. So try replace `( .. )` with `{ .. }`
14:58:53FromDiscord<hamidb80> In reply to @kaushalmodi "The `in` would expect": tnks
15:00:25*fputs joined #nim
15:01:26FromDiscord<sdmcallister> wondering if it is possible in karax to disable redraw after onclick? Have a side menu but don't want a full redraw.
15:03:55FromDiscord<codic> is `when` just for checking types?
15:04:37FromDiscord<haxscramper> no, `when` is for any `bool` expression that can be evaluated at compile-time
15:04:50*arecaceae quit (Remote host closed the connection)
15:04:53*asdflkj joined #nim
15:04:56FromDiscord<haxscramper> Even for things like `when exists(currentSourceDir() / "c_header.h")`
15:06:00*arecaceae joined #nim
15:07:59FromDiscord<konsumlamm> it's a compile-time `if`, that doesn't open a new scope
15:16:25FromDiscord<System64 ~ Flandre Scarlet> Is when something unique to Nim ?
15:20:00FromDiscord<konsumlamm> no, D has `static if` for example
15:20:31FromDiscord<System64 ~ Flandre Scarlet> Oh I see
15:25:40FromDiscord<haxscramper> What is the recommended profiling tool if I just want to get a quick overview where my application spends most of the time?
15:28:34*ZoomZoom quit (Ping timeout: 252 seconds)
15:31:46*letto joined #nim
15:31:58FromDiscord<hamidb80> can anyone help me with
15:32:11FromDiscord<hamidb80> https://play.nim-lang.org/#ix=3p2P↵↵> Error: internal error: environment misses:
15:32:15FromDiscord<mlokis> do you know any library that implements directory embedding? So i can specify directory at compile time and it will load all files into recursive structure from which i can read as from file system
15:32:24FromDiscord<hamidb80> (edit) "https://play.nim-lang.org/#ix=3p2P↵↵> Error: internal error: environment misses: ... " added "<argument>"
15:36:05FromDiscord<hamidb80> In reply to @hamidb80 "https://play.nim-lang.org/#ix=3p2P > Error:": fixed with `copy body[3] #formalParams`
15:36:30FromDiscord<haxscramper> In reply to @mlokis "do you know any": You can do `staticRead` for a file, but IIRC there is not out-of-the-box way to do what you've described
15:36:49FromDiscord<mlokis> guess i have to invent the wheel
15:37:00FromDiscord<mlokis> how should i name it
15:37:03FromDiscord<haxscramper> But it would not be particularly difficult to implement if you only work with `readFile`/`writeFile`
15:37:42FromDiscord<mlokis> well as i can use walkDirRec at compile time it will be eazy
15:38:00FromDiscord<Rika> ~~dyringe~~
15:38:01FromDiscord<haxscramper> https://gist.github.com/doccaico/a9a27ec452ff4a09e4b6e399171e8b77#file-main-nim-L163
15:43:21FromDiscord<mlokis> i already know slurp, i used it when generating code with macros.
15:43:56FromDiscord<mlokis> In reply to @Rika "~~dyringe~~": i think nimembed will be easier to find
15:44:12FromDiscord<Rika> Eh you do you
15:44:44FromDiscord<mlokis> In reply to @Rika "Eh you do you": wha?
15:44:58FromDiscord<Rika> You do you
15:45:39FromDiscord<Rika> you do you↵↵used to say that someone should do what they think is best, what they enjoy most, or what suits their personality
15:45:52FromDiscord<mlokis> i see
15:53:25*ZoomZoom joined #nim
15:53:46*infy- joined #nim
15:54:09*infy- quit (Remote host closed the connection)
15:57:12*hberaud24 joined #nim
15:57:32*hberaud24 quit (Remote host closed the connection)
16:00:13FromDiscord<dsd> hi i have kinda of a newb question im to do an exercise by the nim tutorial "Collatz conjecture" and im kinda stuck
16:00:15FromDiscord<dsd> https://play.nim-lang.org/#ix=3p35
16:00:20FromDiscord<dsd> here is my code
16:01:01FromDiscord<dsd> of course i get an error that from what i understand its from trying to assign a float to integer right?
16:01:07FromDiscord<dsd> i = i / 2
16:01:47FromDiscord<Rika> If you want integer division use div
16:02:26FromGitter<kaushalmodi> dsd: or declare `i` to be a float
16:03:11FromDiscord<Hi02Hi> the collatz conjecture uses integers, so say `i = i div 2`
16:04:11FromDiscord<dsd> ok thx for the help
16:06:23FromDiscord<hamidb80> can't I add pragma to a template?
16:07:23FromDiscord<hamidb80> > Error: cannot attach a custom pragma to `<template name>`
16:11:18*felix-M20 joined #nim
16:11:40*felix-M20 quit (Remote host closed the connection)
16:12:30FromDiscord<hamidb80> fantastic
16:14:06FromDiscord<Lefl> sent a code paste, see https://play.nim-lang.org/#ix=3p3j
16:14:29FromDiscord<Lefl> But if it's a python script it doesn't output anything and gets stuck on `readLine`
16:14:54FromDiscord<Lefl> In both cases I'm outputing simple strings, in python using `print` and in nim using `echo`
16:16:26FromDiscord<Rika> Python is probably not flushing the output
16:16:47*mdzn26 joined #nim
16:16:52FromDiscord<Lefl> yeah I just noticed that, thanks anyway
16:16:53*mdzn26 quit (Read error: Connection reset by peer)
16:19:33*fputs quit (Remote host closed the connection)
16:21:20FromDiscord<mlokis> is it possible to get a module path as constant?
16:22:21FromDiscord<mlokis> when i compile module from different directory or compile an dependency i want to know the module is from the module code
16:22:55*Arrrrrrrr quit (Quit: Arrrrrrrr)
16:25:37FromDiscord<haxscramper> `currentSourcePath()` gives you full path for current module
16:25:53FromDiscord<haxscramper> (edit) "`currentSourcePath()`" => "`currentSourcePath(fullPaths = true)`"
16:27:14*willyboar joined #nim
16:30:23FromDiscord<mlokis> In reply to @haxscramper "`currentSourcePath(fullPaths = true)` gives": thanks 🙂
16:41:38*Dyavol2-m14 joined #nim
16:41:48*Dyavol2-m14 quit (Remote host closed the connection)
16:57:10FromDiscord<hamidb80> In reply to @hamidb80 "> Error: cannot attach": is it a bug ?
16:57:19FromDiscord<hamidb80> should i open an issue?
16:57:24FromDiscord<hamidb80> (edit) "issue?" => "issue for it??"
16:57:57FromDiscord<hamidb80> sent a code paste, see https://play.nim-lang.org/#ix=3p3Y
16:58:45FromDiscord<hamidb80> (edit) "https://play.nim-lang.org/#ix=3p3Y" => "https://play.nim-lang.org/#ix=3p40"
16:59:23*ClaytonargiloVE3 joined #nim
16:59:45*ClaytonargiloVE3 quit (Remote host closed the connection)
17:00:33FromDiscord<haxscramper> It seems you can't atttach custom pragmas to tempaltes
17:00:36FromDiscord<haxscramper> (edit) "tempaltes" => "templates"
17:03:16FromDiscord<Unaimend> In reply to @haxscramper "What is the recommended": BUMP
17:03:34FromDiscord<Unaimend> (edit) "BUMP" => "BUMP, is there a profiling overview like the one in clion"
17:07:23FromDiscord<hamidb80> In reply to @Unaimend "BUMP, is there a": look at this: https://github.com/treeform/hottie
17:07:36FromDiscord<hamidb80> (edit) "In reply to @Unaimend "BUMP, is there a": ... look" added "take a"
17:08:36FromDiscord<Unaimend> Sadly windows only 😢
17:09:31FromDiscord<Unaimend> And I would like to get a somekind of runtime percentage for each function in the code
17:09:55FromDiscord<Unaimend> Like this? https://media.discordapp.net/attachments/371759389889003532/851508276495384616/unknown.png
17:17:01*ZoomZoom quit (Ping timeout: 248 seconds)
17:29:50FromDiscord<System64 ~ Flandre Scarlet> Is there a Chiptune player library for Nim ?
18:06:30FromDiscord<0ffh> In reply to @Unaimend "Sadly windows only 😢": With NIM's metaprogramming capabilities it shouldn't be too hard to instrument any arbitraty piece of source code. Just add check points on entry and exit and write the ID and time stamp into a buffer. Then you can sort out the timings afterwards.
18:06:59FromDiscord<Lefl> sent a code paste, see https://play.nim-lang.org/#ix=3p4Q
18:07:42FromDiscord<0ffh> (edit) "In reply to @Unaimend "Sadly windows only 😢": With NIM's metaprogramming capabilities it shouldn't be too hard to instrument any arbitraty piece of source code. Just add check points on entry and exit ... and" added "of every procedure"
18:14:16FromDiscord<Lefl> Hmm I think i need threadin
18:16:07FromDiscord<Lefl> (edit) "threadin" => "threading"
18:18:05*helgefonnum[m|gr joined #nim
18:18:45*helgefonnum[m|gr quit (Remote host closed the connection)
18:28:45*willyboar quit (Remote host closed the connection)
18:29:19*willyboar joined #nim
18:30:10*ZoomZoom joined #nim
19:07:00*TheoBrrrrCloud15 joined #nim
19:07:23*TheoBrrrrCloud15 quit (Remote host closed the connection)
19:14:46ForumUpdaterBotNew thread by Matthesoundman: Add to a seq inside an ordered table, see https://forum.nim-lang.org/t/8096
19:14:51*ZoomZoom quit (Ping timeout: 258 seconds)
19:18:54FromDiscord<Gary M> sent a code paste, see https://play.nim-lang.org/#ix=3p5s
19:23:05*fecub[m]1 joined #nim
19:23:16*fecub[m]1 quit (Remote host closed the connection)
19:23:54FromDiscord<haxscramper> You need to create `var a: (Tile[int] ...)`
19:24:11FromDiscord<haxscramper> I.e. there is no need to explicitly initialize it using `[0, 0, 0`
19:24:12FromDiscord<Varriount> sent a long message, see http://ix.io/3p5u
19:25:06FromDiscord<haxscramper> If you do want to partially initialize it and then create an immutable `let` variable, then you can do `let a = (var t: Tile[int]; t[0][1] = 12; t)`
19:26:28FromDiscord<System64 ~ Flandre Scarlet> Do you know what can I do for my libgme binding please?
19:27:25FromDiscord<haxscramper> What do you want to do?
19:27:58FromDiscord<System64 ~ Flandre Scarlet> Making it working
19:28:30FromDiscord<haxscramper> In reply to @System64 "When I run the": You refer to this error still?
19:28:54FromDiscord<System64 ~ Flandre Scarlet> yeah
19:29:56FromDiscord<haxscramper> Well, if it was on linux I would suggest running `strace` to check what libraries are loaded, then checking if it provides correct symbols and so on. Not a big expert on debugging `so/dll`, anyway.
19:30:07FromDiscord<haxscramper> Is the code on GitHub up to date?
19:30:22FromDiscord<haxscramper> I think you uploaded it and put link, but I kind of lost it
19:30:25FromDiscord<System64 ~ Flandre Scarlet> I'm on Windows and no
19:30:34FromDiscord<System64 ~ Flandre Scarlet> I'll commit again
19:31:52FromDiscord<haxscramper> Btw, does C/C++ example code work correctly? It might not be a nim-related issue
19:35:21FromDiscord<System64 ~ Flandre Scarlet> I pushed↵Normally yeah
19:39:42FromDiscord<haxscramper> In reply to @System64 "And it comes from": Maybe I'm missing something, but this part of the code is not there. It imports `libgme` in the helloworld (assuming that's that part you are working on right now), but it also fails to compile
19:41:20FromDiscord<System64 ~ Flandre Scarlet> Ah wait I forgot to git add lol
19:43:49FromDiscord<System64 ~ Flandre Scarlet> Now it's good I think
19:46:15FromDiscord<haxscramper> Nothing changed. Forgot to push?
19:48:29FromDiscord<System64 ~ Flandre Scarlet> NOW it's good sorry
19:50:31*svedrin14 joined #nim
19:50:53*svedrin14 quit (Remote host closed the connection)
19:54:19FromDiscord<System64 ~ Flandre Scarlet> @haxscramper is it pushed now?
19:57:06FromDiscord<haxscramper> Yes, and it is working property. It loads `/usr/lib/libgme.so` which contains `gme_ay_type` file and runs without any issues
19:58:49FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3p5O
19:59:19FromDiscord<System64 ~ Flandre Scarlet> Wtf why it doesn't work for me ?
20:02:20FromDiscord<haxscramper> `libgme.dll` does not seem to contain necessary symbols - at least there is no `gme_ay_type`
20:03:37FromDiscord<System64 ~ Flandre Scarlet> And did you compiled thé lib ?
20:03:54FromDiscord<haxscramper> libgme?
20:03:58FromDiscord<System64 ~ Flandre Scarlet> Yeah
20:04:30FromDiscord<haxscramper> I already had it in the system from some package, so no.
20:04:53FromDiscord<haxscramper> and your dll comes with github repo, so I didn't have to compile it either
20:05:09FromDiscord<System64 ~ Flandre Scarlet> And does it work with Github's dll ?
20:08:16FromDiscord<haxscramper> I'm on Linux, so I don't think I can just use `.dll`. But dumping symbols indicates that (at least I'm fairly certain of it) that issues is with incorrect dll
20:09:18FromDiscord<System64 ~ Flandre Scarlet> Can you send the link to the proper dll p'ease ?
20:09:56FromDiscord<quarternion> Is there a reverse version of `dumpTree`, to generate ast without calling `newTree` with a lot of parenthesis?
20:10:04FromDiscord<quarternion> Giving this,
20:10:31Prestigedo you mean like using quote do in a macro?
20:10:34FromDiscord<quarternion> sent a code paste, see https://play.nim-lang.org/#ix=3p5U
20:10:57FromDiscord<quarternion> (edit)
20:11:02FromDiscord<haxscramper> In reply to @quarternion "Is there a reverse": https://nim-lang.github.io/fusion/src/fusion/matching.html#tree-construction
20:11:47FromDiscord<haxscramper> https://github.com/nim-lang/fusion/blob/master/tests/tmatching.nim#L568
20:12:25*x0908d3b211 joined #nim
20:12:48*x0908d3b211 quit (Remote host closed the connection)
20:13:27FromDiscord<haxscramper> It is not really polished right now, but I can explain missing parts if you get confused by something
20:13:44FromDiscord<System64 ~ Flandre Scarlet> where did you found the so and dll please?
20:15:09FromDiscord<quarternion> @haxscramper Thanks. I will take some time to digest that. I just got into nim macros and templates, and it's amazing compared to c++ templates nightmare.
20:16:23Prestige@quarternion check out https://play.nim-lang.org/#ix=3p5W and https://dev.to/beef331/demystification-of-macros-in-nim-13n8 too
20:17:01FromDiscord<haxscramper> https://www.youtube.com/watch?v=GJpn6SfR_1M
20:17:15FromDiscord<Alea> sent a code paste, see https://play.nim-lang.org/#ix=3p5X
20:17:24FromDiscord<haxscramper> Also this video is quite nice for getting started with pattern matching, though it does not cover `makeTree`
20:18:17FromDiscord<haxscramper> In reply to @System64 "where did you found": Just installed libgme with package manager. I don't remember how this stuff works on windows so I can't provide any links/etc. on how to fix this
20:18:21FromDiscord<Jonah> crypto bots are mass dming on this server
20:18:44Prestige@Alea you just want to know how to use arrays and sequences?
20:18:52FromDiscord<Fish-Face> how many did they promise 0.497 BTC to 😛
20:19:12Prestigehttps://nim-lang.org/docs/tut1.html#advanced-types-arrays @Alea
20:19:15FromDiscord<Jonah> @Glorious Ladder https://media.discordapp.net/attachments/371759389889003532/851555926490218526/unknown.png
20:19:30FromDiscord<Alea> In reply to @Prestige "https://nim-lang.org/docs/tut1.html#advanced-types-": thanks, that's what I was looking for!
20:19:31FromDiscord<samthecoy> yeah me too: mine was Reflecting#5354
20:19:44FromDiscord<Generational Me!> https://media.discordapp.net/attachments/371759389889003532/851556046538670080/unknown.png
20:19:46FromDiscord<nikneym> @Warm Judgment https://media.discordapp.net/attachments/371759389889003532/851556056542478396/unknown.png
20:19:49FromDiscord<samthecoy> (edit) "too:" => "too @Jonah:"
20:19:56FromDiscord<Generational Me!> wahhh they're everywhere
20:20:05FromDiscord<samthecoy> four different accounts, wowee
20:20:19FromDiscord<˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞> Scrawny Client↵#9570
20:20:21FromDiscord<˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞˞> (edit) "Client↵#9570" => "Client#9570"
20:20:23FromDiscord<haxscramper> I think I've seen another three in the last couple of monts
20:20:46*fputs joined #nim
20:21:03FromDiscord<quarternion> @haxscramper mega thanks. I got a little bored in learning nim last week, but this macro stuff is giving me extra Benzin
20:21:06FromDiscord<Generational Me!> dus he think someone from a Nim server would really fall for this shit
20:21:13FromDiscord<Generational Me!> lul
20:21:13FromDiscord<System64 ~ Flandre Scarlet> @haxscramper what's the version of your libgme?
20:21:29FromDiscord<haxscramper> `libgme 0.6.3-1`
20:22:03FromDiscord<System64 ~ Flandre Scarlet> Thanks
20:27:36FromDiscord<WhoIsAbishag 👽 Alien API 👽> I'm new
20:27:59FromDiscord<WhoIsAbishag 👽 Alien API 👽> Does this server have any mods?
20:28:22FromDiscord<WhoIsAbishag 👽 Alien API 👽> Otherwise no big deal I handled the situation
20:28:31FromDiscord<Yardanico> I already banned most of these spammers
20:28:43FromDiscord<WhoIsAbishag 👽 Alien API 👽> Cool
20:29:00FromDiscord<WhoIsAbishag 👽 Alien API 👽> I just blocked on my end, thanks
20:29:15FromDiscord<Sander> got a spammer as well @Good Rise
20:29:43*tane quit (Quit: Leaving)
20:29:58*narimiran quit (Ping timeout: 252 seconds)
20:29:59FromDiscord<System64 ~ Flandre Scarlet> https://github.com/ShiftMediaProject/game-music-emu/↵Does it work?
20:30:24FromDiscord<quarternion> Is it possible to add simple test to prevent bot joining this channel? Like asking how to print "hello world" in nim?
20:30:30FromDiscord<WhoIsAbishag 👽 Alien API 👽> I have a friend who is more active here. He speaks highly of Num"!"
20:31:40FromDiscord<Yardanico> In reply to @quarternion "Is it possible to": They're not spamming in this channel so captchas wouldn't really help
20:31:45FromDiscord<WhoIsAbishag 👽 Alien API 👽> NIM ( sorry I'm blind, typos slip in after the screen reader has read it )
20:31:48FromDiscord<Yardanico> They join a server just to get members less
20:31:54FromDiscord<Yardanico> (edit) "less" => "list"
20:32:32FromDiscord<WhoIsAbishag 👽 Alien API 👽> Last I knew each person has to secure / manage their own DMs
20:32:53FromGitter<kaushalmodi> Does anyone know how to fix the links pasted in Discord? In gitter, that last link links to https://github.com/ShiftMediaProject/game-music-emu/%E2%86%B5Does
20:33:27FromGitter<kaushalmodi> I think the fix might be to simply put a space or something before that ↵ unicode.
20:33:44FromDiscord<WhoIsAbishag 👽 Alien API 👽> @kaushalmodi what? A BOT intiating a Conversation!
20:33:50FromDiscord<Hi02Hi> why is that even there?
20:34:04FromGitter<kaushalmodi> hmm? I didn't follow
20:34:12FromDiscord<Xananax> This is a bridge from gitter
20:34:20FromGitter<kaushalmodi> gitter sees message from Discord and IRC
20:34:30FromDiscord<WhoIsAbishag 👽 Alien API 👽> @kaushalmodi
20:34:37FromDiscord<WhoIsAbishag 👽 Alien API 👽> Hmmm
20:34:38FromGitter<kaushalmodi> links pasted in Discord are unclickable in gitter
20:34:46FromGitter<kaushalmodi> so .. who can fix that bridge?
20:35:44FromDiscord<WhoIsAbishag 👽 Alien API 👽> Oh, that's right, you guys have a whole web of comms ...
20:35:46FromDiscord<Hi02Hi> In reply to @WhoIsAbishag 👽 Alien API 👽 "Hmmm": so basically there is another group of people on gitter here:https://gitter.im/nim-lang/Nim, and they need a bot to communicate between the two
20:36:03FromDiscord<WhoIsAbishag 👽 Alien API 👽> In reply to @Hi02Hi "so basically there is": 👍
20:36:26FromDiscord<WhoIsAbishag 👽 Alien API 👽> To bad they can't be replied to here
20:36:43FromDiscord<Hi02Hi> In reply to @kaushalmodi "hmm? I didn't follow": i meant why is the ↵ there on gitter?
20:36:54FromDiscord<Hi02Hi> instead of a newline
20:37:24FromGitter<kaushalmodi> Hio2Hi: I don't mind the ↵.. just that it should not fuse with the link
20:37:38FromDiscord<haxscramper> In reply to @Hi02Hi "i meant why is": Because bridge works via IRC
20:37:45FromGitter<kaushalmodi> (https://files.gitter.im/5602f03e0fc9f982beb19f61/RDTC/image.png)
20:37:47FromGitter<kaushalmodi> For e.g. see how this link looks
20:38:10FromDiscord<haxscramper> #science is bridged directly, but #main etc. have this discord -> irc -> gitter IIRC
20:38:41FromGitter<kaushalmodi> btw it now looks like I am the only one from Gitter right now 😆
20:39:23FromDiscord<haxscramper> It is not particularly popular compared to discord or even IRC
20:39:48FromGitter<kaushalmodi> I have never used Discord.. may be I should try it out
20:40:22FromDiscord<willyboar> is better than gitter
20:40:28FromGitter<kaushalmodi> I used Gitter just because it notifies me if someone pings me on IRC while I am away
20:40:30FromDiscord<willyboar> imo
20:41:02FromDiscord<haxscramper> IRC -> discord bridge converts pings here
20:43:18*willyboar quit ()
20:44:29FromDiscord<Rainbow Asteroids> i like matrix, but the matrix bridge y'all have here is pretty bad compared to the one void linux has
20:47:12FromDiscord<kaushalmodi> .. and now I am on discord
20:53:30*fputs quit (Remote host closed the connection)
20:55:19*fputs joined #nim
21:03:35*Sembei joined #nim
21:03:43*Sembei is now known as Guest41523
21:04:11*Guest41523 quit (Remote host closed the connection)
21:08:28termerI hadn't ever seen someone use gitter till I was in this channel
21:08:38termerit seemed so odd to me cause there were so many other things you could use
21:09:11FromDiscord<kaushalmodi> In reply to @termer "it seemed so odd": I guess I am an "oldie" here.. when I started using Nim 2-3 years back, there were quite many folks on Gitter
21:15:29*Guest1330 joined #nim
21:15:46*Guest1330 quit (Remote host closed the connection)
21:26:07*Vladar quit (Quit: Leaving)
21:30:25FromDiscord<Randall> Is there a version of `unicode.runeAt` that also looks backwards if the initial byte that's checked is not the start of the rune? (ex: `assert "🌂🍕".runeAt(3) == "🌂".runeAt(0)`)
21:49:37*ZoomZoomZoom joined #nim
21:55:19*arecaceae quit (Remote host closed the connection)
21:55:54*arecaceae joined #nim
22:01:33FromDiscord<sealmove> Was `import` in C++ picked up after it was added last year?
22:02:47FromDiscord<Hi02Hi> hey what happened to your unicode name?
22:03:16FromDiscord<sealmove> people complaining ^^'
22:07:44*ZoomZoomZoom quit (Quit: Leaving)
22:07:50FromDiscord<haxscramper> In reply to @รєคɭ๓๏שє "Was `import` in C++": You mean whether C++ `import` is supported in interop?
22:08:16FromDiscord<sealmove> Nah, not Nim-related question. Just wandering if it's catching up.
22:08:23FromDiscord<ElegantBeef> C++ 20's modules?
22:08:31FromDiscord<sealmove> In reply to @ElegantBeef "C++ 20's modules?": y
22:18:13FromDiscord<ElegantBeef> Isnt nim's C++ at like 14 still?
23:45:57*ZoomZoomZoom joined #nim
23:47:41*ventures5 joined #nim
23:48:25*ventures5 quit (Remote host closed the connection)