<< 09-02-2021 >>

00:00:16*vicfred joined #nim
00:04:17*krux02 quit (Remote host closed the connection)
00:13:36*Vladar quit (Quit: Leaving)
00:26:59*leorize quit (Remote host closed the connection)
00:27:25*leorize joined #nim
00:36:22*Tanger joined #nim
00:38:32Zoom[m]PMunch: hey, great talk! And I really liked the presentation. It's good to see more than just a talking head once in a while.
00:39:27FromDiscord<ElegantBeef> I could help but notice that in the talk he was almost wearing the crown
00:39:55Zoom[m]By the way, I delivered on a promise on writing a guide for voice recording and processing. Finished just before FOSDEM but didn't find a way to promote it well enough
00:40:21Zoom[m]https://indiscipline.github.io/post/voice-sound-reference/
00:41:18Zoom[m]Hope it can be of use for the next NimConf :P
00:43:47Zoom[m]<FromDiscord "<ElegantBeef> I could help but n"> He should have animated it to wiggle a bit as if levitating
00:55:05*Tlangir joined #nim
00:58:13*Tanger quit (Ping timeout: 272 seconds)
01:00:00*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:01:07*njoseph joined #nim
01:10:31FromDiscord<ElegantBeef> Slowly decending
02:03:32*abm quit (Read error: Connection reset by peer)
02:18:19*tiorock joined #nim
02:18:19*rockcavera quit (Killed (card.freenode.net (Nickname regained by services)))
02:18:19*tiorock is now known as rockcavera
02:20:24*rockcavera quit (Killed (verne.freenode.net (Nickname regained by services)))
02:20:25*rockcavera joined #nim
03:08:37*sixtyten_ joined #nim
03:11:58*rockcavera quit (Read error: Connection reset by peer)
03:12:28*rockcavera joined #nim
03:26:49*euantorano quit (Read error: Connection reset by peer)
03:27:22*waleee-cl quit (Read error: Connection reset by peer)
03:29:35*euantorano joined #nim
03:33:26*waleee-cl joined #nim
03:50:23*muffindrake quit (Ping timeout: 272 seconds)
03:51:43*muffindrake joined #nim
03:58:42*rockcavera quit (Remote host closed the connection)
04:03:08*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
04:06:37leorizeYardanico: we have to scrap the "bridge via gitter's matrix interface" plan
04:06:53leorizecurrently matrix users can't be admin, so I can't setup a bridge
04:08:07FromDiscord<ElegantBeef> Look at this guy thinks he deserves to be an admin πŸ˜›
04:08:20FromDiscord<Rika> lol
04:10:13*pbb joined #nim
04:10:14FromDiscord<ElegantBeef> Sure you leorize worked on Nim and nvim but what has leorize ever done for us?!
04:10:44FromDiscord<ElegantBeef> It's only a good joke if leorize doesnt catch the reference
04:18:31*leorize quit (Ping timeout: 268 seconds)
04:23:41*leorize joined #nim
04:33:48leorize:P
04:34:48leorizeanyone working on anything cool lately?
04:35:20FromDiscord<ElegantBeef> I'm legally prohibited to working on cool things, or atleast that's my given reason for my stuff not being cool
04:35:46leorizeso what's the not cool thing you've been working on?
04:36:05FromDiscord<ElegantBeef> My puzzle game, though i havent touched it in a few days
04:36:27FromDiscord<ElegantBeef> <https://jbeetham.itch.io/linerino> This
04:37:00FromDiscord<ElegantBeef> Ah didnt realize that ircord doesnt strip `<>` off urls
04:37:50FromDiscord<Rika> <>
04:38:21leorizeyour game is too good for my browser
04:38:30FromDiscord<ElegantBeef> If you put urls in `<>` discord they dont embed
04:38:41FromDiscord<ElegantBeef> Does that mean it's not working in your browser?
04:39:31leorizehttps://ibb.co/txqYkFt
04:39:46*NimBot joined #nim
04:47:26*spiderstew_ joined #nim
04:48:48FromDiscord<ElegantBeef> Dont feel pressured to run my ~~Bitcoin miner~~ game
04:49:42*sixtyten_ quit (Ping timeout: 246 seconds)
04:50:32*spiderstew quit (Ping timeout: 265 seconds)
05:08:01FromDiscord<Varriount> O_o
05:13:39FromDiscord<ElegantBeef> o_O
05:23:15leorizewhy is designing a path manipulation library so hard? :(
05:24:00*haxscramper joined #nim
05:28:32*letto quit (Read error: Connection reset by peer)
05:29:11*letto joined #nim
05:31:31FromDiscord<ElegantBeef> Paths are dumb
05:37:46FromDiscord<Varriount> @leorize OS paths?
05:38:33leorizeyea
05:39:07FromDiscord<Varriount> leorize: If you want, I have an unpolished one that's a translation of Go's path library.
05:39:46FromDiscord<Varriount> I figured, why go through all the (uninteresting) challenges, when somebody has already done that before?
05:39:56leorizethanks, but I'm more concerned about the design than the impl
05:40:04FromDiscord<Varriount> Oh, yeah.
05:40:04leorizehttps://github.com/alaviss/nim-sys/issues/1 <- you can see here for my research
05:40:16FromDiscord<Varriount> That's where I got stuck
05:40:39FromDiscord<Varriount> Do you make a path a distinct type, or a kind of string? Or should it be a struct?
05:40:55leorizedistinct is what I'm planning
05:41:03leorizebut how is the issue
05:41:37FromDiscord<Varriount> Personally, I want a one-way implicit conversion, where a Path can implicitly convert to a string, but not the other way around.
05:41:43FromDiscord<Varriount> What do you mean, how?
05:42:26leorizewhat would be the semantic for this path type?
05:43:12leorizeyou don't bring in distinct for fun, it should serve a purpose, like: the path is already normalized, or, it's an absolute/relative path
05:44:14leorizeI'm thinking of the "shortest path that is semantically compatible with the input"
05:44:30leorizebut Windows just makes things much harder, as usual
05:45:05FromDiscord<Varriount> I still don't quite understand - a path is a path
05:45:32FromDiscord<Varriount> I mean, I guess you could have different path types for relative, absolute, etc.
05:46:02FromDiscord<Varriount> But I think the complexity of that would outweigh the return.
05:47:15leorizenot necessarily
05:47:58leorizefor example, go's path has to perform a cleaning routine for every path produced by its functions
05:48:36leorizeif I produce a path type that is guaranteed to be in this "clean" state, it means that you can build paths without paying the cost of multiple scans per `join()`
05:48:42FromDiscord<Varriount> Yes, because it has to deal with user input, where you get `paths//like/./this/`
05:49:12FromDiscord<ElegantBeef> Here i am thinking that a path should be a `seq[string]` and `seperator`
05:49:32FromDiscord<Varriount> The indirection rarely does you any favors.
05:50:38FromDiscord<ElegantBeef> Yea i just mean if it's not going to be just a string
05:50:51leorizethis means: `var p = "some//user/./inputed////path".toPath() #[ normalized here ]#; p.join "saves"; p.join "auto" #[ just basic appends because the path is guaranteed to be cleaned ]#`
05:51:23FromDiscord<Varriount> How can you guarantee "saves" is clean?
05:51:49leorize`join(p: Path, parts: varargs[Path, toPath])` :)
05:52:10leorizeand since compile-time evaluation is a thing, `toPath` can be done ahead of time
05:52:22leorizeoops that should be `p: var Path`
05:52:30FromDiscord<Varriount> \shrug\
05:52:48FromDiscord<ElegantBeef> How dare you leorize i already wrote that proc and it failed to compiled due to lacking `var` πŸ˜„
05:53:02FromDiscord<Varriount> I would build an API that could theoretically support such things, and worry about optimizing the implementation later.
05:53:26FromDiscord<Varriount> Path handling is also rarely (never?) a hot-spot in a program.
05:53:39leorizego's design is fine (though the implementation damages the path's semantics), but go's strings are immutable
05:53:53leorizeNim strings are mutable, so I'm looking for some clever usage of them
05:54:00FromDiscord<ElegantBeef> I'm curious what your intention is for paths
05:54:28FromDiscord<ElegantBeef> Like is it to make them more user friendly to use?
05:54:37FromDiscord<Rika> does path sanitisation need to be quick
05:54:49FromDiscord<Rika> it makes it sound like its very slow right now
05:54:56FromDiscord<Rika> you make it sound like
05:55:13leorizemore reliable and reproducible, and less of a pain in usage
05:55:31leorize@Rika it doesn't, but I have to consider all options available
05:56:10FromDiscord<Varriount> leorize: Does Go's implementation handle UNCs and network paths?
05:56:23leorizeit ignores them
05:56:30leorizeif it finds `\\` at the beginning it bails
05:56:44leorizesmart choice, really, since Windows is a mess
05:59:26FromDiscord<haxscramper> In reply to @Varriount "But I think the": Main advantage for distinct (`distinct`, or a separate struct) types for paths is reduction in bugs caused by missing normalization, and improvement in API clarity
05:59:39leorizeas far as I've looked there are two main designs: paths as strings (most popular), special Path type (Rust, Java, maybe more)
05:59:54FromDiscord<Varriount> To be fair, Windows inherited paths from CP/M
05:59:58FromDiscord<haxscramper> E.g. I want absolute path - I use `AbsPath` and don't worry about someone breaking my code by passing relative path
06:00:08FromDiscord<Varriount> But yes, path handling on Windows is a mess.
06:00:24leorizethe Nim compiler has an unique design in it's pathutils, and many love that, so I'm investigating that angle too
06:01:07leorizethere's also the very complicated semantic of comparing paths that I'll omit completely since it's a minefield
06:01:10*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
06:01:17*njoseph joined #nim
06:02:01FromDiscord<Varriount> ^ Completely agree
06:02:03FromDiscord<haxscramper> In reply to @haxscramper "Main advantage for distinct": Also, because of separate types for paths you can create overloads like `.ext()`, and `.name()` that were too ambiguous for regular `string` arguments
06:02:59FromDiscord<ElegantBeef> There is a lot of value in a new type, regardless if it's a distinct string or not πŸ˜„
06:03:08FromDiscord<Varriount> leorize: I think the path-as-separate-type wins out. Python added pathlib to the standard library in ~3.4
06:03:16*leorize quit (Remote host closed the connection)
06:03:33FromDiscord<Varriount> paths are \special\
06:03:42*leorize joined #nim
06:04:13leorizehow to design those remains an open question as far as I can tell
06:04:39leorizepython's pathlib is very complicated and involves the file system state
06:04:50FromDiscord<Varriount> Well, you have no lack of implementations.
06:05:17FromDiscord<haxscramper> Distinct main disadvantage is that you can't ensure full validation because someone might create invalid instance easily
06:05:29leorizeyea, I just have to find this balance between ergonomics and correctness
06:06:14leorize@Varriount: I think you were interested in the API I was making to replace osproc, so here it is if you have any comments: https://forum.nim-lang.org/t/7453
06:06:33leorizeI decided against macros in the end :P
06:07:11*wasted_youth2 quit (Quit: Leaving)
06:11:41leorizehaxscramper: I consider conversions to distinct without using a checked converter an error
06:11:52leorizeor at least an unsafe operation
06:12:31FromDiscord<haxscramper> I think it should be possible to disable conversion using `Type(<base-type>)`
06:13:19leorizeyou still have to perform those in the implementing library, so it's a disadvantage imo
06:13:41leorizeand `{.borrow.}` doesn't work well for generics...
06:13:56FromDiscord<haxscramper> Yes, but this solves issue of `AbsPath("../test")`
06:14:18leorizeI don't care, really
06:14:28leorizeif the user has to do that, it's a bug
06:14:34leorizethe api is not flexible enough
06:15:05leorizewhich is the case with pathutils, sadly...
06:15:28leorizethe compiler is riddled with conversions like the one you gave as an example
06:15:48FromDiscord<ElegantBeef> could take a note from `re` and do `path"../test"`
06:16:21leorizehttps://alaviss.github.io/nim-sys/strings.html <- see this for my "special" string impl
06:16:44leorizeI use the `.toType` pattern
06:16:56leorizepretty easy to use and slot right in with varargs
06:17:26haxscramperYes, but I think the main reason why there are so many conversions [like the one I used] in compiler, is because nobody bothered to fully implement all necessary helper types (compile-time absolute/relative, runtime relative/absolute (https://haxscramper.github.io/hmisc/src/hmisc/other/oswrap.html#FsFile))
06:17:45haxscramperBut using `distinct` naturally brings all this cruft
06:18:18haxscramperOtherwise you get 'inflexible API that basically **requires** `AbsPath("../tmp")`
06:18:18haxscramper
06:19:12leorizeusing distinct correctly is an art
06:19:34haxscramper`distinct void`
06:19:48leorizewe even have `distinct auto` in the stdlib :P
06:24:56*krux02 joined #nim
06:25:25FromDiscord<Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2OOh
06:25:31FromDiscord<Anonymous Poet> (note that this is all one string)
06:25:45FromDiscord<Anonymous Poet> I tried doing the same thing in nim and wrapping in parens, but that didnt work
06:25:55FromDiscord<ElegantBeef> `"dsadsa" & "Dsadsadsa"`
06:26:22FromDiscord<Anonymous Poet> does that work if `&` is the last character on the line?
06:26:25*letto quit (Ping timeout: 240 seconds)
06:26:35FromDiscord<ElegantBeef> yes operators allow new lining operations
06:27:09FromDiscord<Anonymous Poet> seems like it; thanks!
06:38:13*waleee-cl quit (Quit: Connection closed for inactivity)
06:39:30FromDiscord<Varriount> @Anonymous Poet You can also have triple-quoted string literals, although keep in mind that those remove the common leading whitespace
06:39:38FromDiscord<Varriount> (edit) "@Anonymous Poet You can also have triple-quoted string literals, although keep in mind that those remove the common leading whitespace ... " added "from each line"
06:40:45FromDiscord<Varriount> leorize: What would you use `distinct auto` for? It sounds... odd.
06:41:27FromDiscord<haxscramper> https://nim-lang.org/docs/system.html#any
06:42:29FromDiscord<haxscramper> don't ask why
06:42:34FromDiscord<haxscramper> I don't know
06:42:39FromDiscord<haxscramper> And I don't want to know
06:43:11FromDiscord<Varriount> and haxscramper look down into the void that is `any`
06:44:12FromDiscord<Varriount> leorize: Also keep in mind that the filepath calculations a program needs may be for paths that aren't native to the OS the program was written for. You would be surprised how often that comes up.
06:47:17*narimiran joined #nim
06:49:44leorizeluckily Windows automatically converts `\` to `/`
06:52:24leorizeand yea, I'm aware of that rabbit hole, which makes a Path type for Windows much much harder
06:58:25FromDiscord<Anonymous Poet> In reply to @Varriount "<@!747239904181747854> You can also": thanks, they still insert the newlines though, and I needed to not have them
07:03:25leorizethey should not?
07:03:38FromDiscord<ElegantBeef> They insert newlines wherever you hit enter
07:03:46FromDiscord<ElegantBeef> They dont want that behaviour
07:04:04leorizeno I mean the `&` shouldn't create new line
07:04:11FromDiscord<ElegantBeef> It doesnt
07:04:56leorizePoet is saying that it does
07:05:01leorizehttps://play.nim-lang.org/#ix=2OOm
07:05:04leorize^ it doesn't :P
07:05:15FromDiscord<ElegantBeef> They said exactly the opposite
07:05:55FromDiscord<ElegantBeef> Oh right you dont see replies
07:06:01FromDiscord<ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/808594536619048970/unknown.png
07:06:05FromDiscord<ElegantBeef> Context πŸ˜„
07:06:16leorizeah, I see
07:20:43FromDiscord<Yardanico> @ElegantBeef IRC users see replies now though
07:21:18FromDiscord<Yardanico> but yeah, there's a bit of a bug with discord pings and the fact that they appear as raw IDs inside the reply context
07:21:34FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/808598448647045120/unknown.png
07:22:44FromDiscord<ElegantBeef> Ah
07:22:53FromDiscord<ElegantBeef> Also `<url>` sends the `<>` to irc
07:23:07FromDiscord<Yardanico> well, I have to handle all that manually, but thanks for letting me know
07:23:20FromDiscord<Yardanico> discord doesn't magically strip all markdown for me :P
07:23:26FromDiscord<ElegantBeef> I know
07:23:38FromDiscord<ElegantBeef> If it did it wouldnt be a problem πŸ˜›
07:25:58FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/808599553301020702/unknown.png
07:32:04FromDiscord<Yardanico> the replies are a bit tricky - how to I show if someone is replying to an image? do I paste the full image link or just say `In reply to @Someone "Image": nice` πŸ€”
07:32:09FromDiscord<Yardanico> (edit) "to" => "do"
07:32:23FromDiscord<Yardanico> or for any other attachments
07:33:35FromDiscord<haxscramper> There are not that many reply-to-attachment situations, so I suppose pasting whole image is fine
07:34:06FromDiscord<Yardanico> it's just that the link is quite longf
07:34:07FromDiscord<Yardanico> (edit) "longf" => "long"
07:34:13FromDiscord<Yardanico> and I don't think it would be good to use URL shorteners
07:34:24FromDiscord<Yardanico> usual discord image link is https://media.discordapp.net/attachments/371759389889003532/808598448647045120/unknown.png
07:34:33*priv_drgn joined #nim
07:38:35FromDiscord<ElegantBeef> Just send the image in base64 πŸ˜›
07:39:26FromDiscord<Yardanico> IRC message char limit is 512 (including all the service tags)
07:39:28FromDiscord<Yardanico> so it's like ~500
07:39:48FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/808603038902255646/unknown.png
07:40:01FromDiscord<Yardanico> 510 characters (including the command and parameters)
07:40:06FromDiscord<ElegantBeef> Ah so compress the image to 21x21 πŸ˜›
07:40:25FromDiscord<Yardanico> I will need to do some more work on replies - https://github.com/Yardanico/ircord/issues/13
07:40:48FromDiscord<Yardanico> so if the reply message is very long, IRC users will see "In reply to @SomeHuman: link to reply" instead of "link to message"
07:40:50FromDiscord<Yardanico> (edit) "so if the reply message is very long, IRC users will see "In reply to @SomeHuman: link to reply" instead of ... "link" added "just"
07:44:21*sunwukong joined #nim
07:45:18*priv_drgn quit (Ping timeout: 258 seconds)
07:45:48FromDiscord<slymilano> Hi guys, I don't know if you remember this async bug where I had to use -d:usesStdlib or my async procs wouldn't run. https://github.com/nim-lang/Nim/issues/15019↡↡It seems like it's back but I'm not sure if it's related to Prologue halting the asyncChecks I executed earlier or a bug with nim's stdlib. https://github.com/sergiotapia/torrentinim/blob/master/src/torrentinim.nim#L23
07:48:19FromDiscord<slymilano> If I comment out all the Prologue code the asyncChecks all run fine and as expected. it seems prologue's app.run() somehow is choking those asynchecks
07:48:29ForumUpdaterBotNew thread by Stefan_Salewski: No ideas for the 32 bit enum issue?, see https://forum.nim-lang.org/t/7490
07:57:45*letto joined #nim
07:59:10*fredrikhr joined #nim
08:12:03*fredrikhr quit (Quit: Client Disconnecting)
08:45:13*Q-Master joined #nim
08:45:58*sixtyten_ joined #nim
08:50:26*sixtyten_ quit (Ping timeout: 264 seconds)
08:54:02PMunchSorry, I left my IRC client open again.. narimiran, PR looks good, I'll merge it. Zoom[m], thanks :) I wanted to try out a green-screen and figured this was a good chance to do it, really happy with the result.
08:56:19PMunchMaybe something like this should be in the official systems module? https://github.com/PMunch/protobuf-nim/commit/2bc68425e2a1fab10d9de358e30b4b035a17244a
09:01:44FromDiscord<mratsim> https://github.com/nim-lang/RFCs/issues/338, bikeshed away
09:01:55FromDiscord<mratsim> > Remove runtime access to {.compileTime.} variable
09:13:06*sixtyten_ joined #nim
09:13:09*sixtyten_ quit (Client Quit)
09:20:37ForumUpdaterBotNew thread by Kobi: Groups for types? interface in Nim?, see https://forum.nim-lang.org/t/7491
09:23:35*antranigv quit (Ping timeout: 246 seconds)
09:24:12*antranigv joined #nim
09:29:34*wasted_youth2 joined #nim
09:38:21*Vladar joined #nim
09:39:37*SebastianM joined #nim
09:50:02*SebastianM quit (Quit: -a- IRC for Android 2.1.59)
09:58:45*WilhelmVonWeiner quit (Ping timeout: 246 seconds)
10:16:34*lqdev[m]4 joined #nim
10:20:39*WilhelmVonWeiner joined #nim
10:21:02*stefantalpalaru quit (Ping timeout: 264 seconds)
10:21:03*WilhelmVonWeiner is now known as Guest91629
10:24:56krux02@mratsim: just linked you my patch to fixe `compileTime` again.
10:25:30krux02I already did it almost a year ago on my own nim fork
10:26:35FromDiscord<ElegantBeef> It's weird that it escaped compileTime, not doing what it says on the tin is weird
10:27:10krux02tin?
10:28:03FromDiscord<ElegantBeef> compileTime would indicate it only exists at compile time, and accessing it without any thing that happens at compile time isnt sensible as it's not as what was advertised
10:28:27FromDiscord<ElegantBeef> "what it says on the tin" is a english idiom to say "it does what it says it does"
10:29:04*liblq-dev joined #nim
10:29:09FromDiscord<arne> Well I told @Araq from the beginning that this behavior is bad. It should not be implemented like this. He decided to ignore my advice and did anyway.
10:30:09FromDiscord<arne> `compileTime` on functions mean, compile time only. Compile tiem on variables means, also at compile time, but also at runtime.
10:30:16*liblq-dev quit (Client Quit)
10:30:22FromDiscord<arne> WFT this incosistency doesn't need to be.
10:30:33FromDiscord<arne> But it was artifically constructed.
10:31:00FromDiscord<ElegantBeef> Yea it is a weird inconsistency, which i wager most developers wont mind since it makes it more sensible
10:31:24FromDiscord<arne> I do mind this inconsistency.
10:31:29FromDiscord<arne> That is why I fixed it.
10:31:32FromDiscord<ElegantBeef> I mean wont mine being remove
10:31:34FromDiscord<ElegantBeef> (edit) "mine" => "mind"
10:31:50FromDiscord<arne> I just stopped contributing to mainline
10:35:27FromDiscord<ElegantBeef> Did you fix the inconsistency of import and export `import module`? In my view should import and export the module considering the use of the export marker in any other declarative statement πŸ˜„
10:36:21*lqdev[m]4 is now known as liquidev
10:38:05FromDiscord<arne> I've never seen `import module` did you just come up with that syntax?
10:38:09FromDiscord<ElegantBeef> Yea
10:38:24PMunchThis looks so weird on IRC :P
10:38:34FromDiscord<ElegantBeef> It's an asterix
10:38:37PMunchThe Discord bot treats the * as start of italics
10:38:38FromDiscord<arne> export is rarely used. I think `import module` and `export module` is good enough.
10:38:42YardanicoPMunch: yes :(
10:38:51*liquidev is now known as liblq-dev
10:39:15FromDiscord<ElegantBeef> I know export is rarely used, but consistency! πŸ˜›
10:39:16PMunchYeah I know, but for us it just looks like arne just said he'd never seen `import module` and then decided to italicise the rest of his sentence :P
10:39:48krux02tell the discord bot to keep * as * as long as it can't pair it.
10:39:52Yardanicoi know
10:40:09*liblq-devel joined #nim
10:40:23FromDiscord<ElegantBeef> Anyway i'll go to sleep now before i send more irc styling accidently
10:40:32FromDiscord<arne> good night.
10:40:35*liblq-devel quit (Client Quit)
10:40:42PMunchGood night
10:40:57FromDiscord<arne> it is almost lunch time here
10:43:23haxscramperYardanico: You wrote discord -> IRC markup converter yourself or used some library?
10:44:54FromDiscord<Rika> self i believe
10:44:56PMunch@arne, ditto it's 11:44AM
10:45:32krux02PMunch, yay same time zone
10:45:39krux02btw I am arne on discord
10:45:43krux02that is my real name
10:45:47PMunchHaha, yeah I figured
10:46:05PMunchAnd guessing from you're last name you're based in Germany
10:46:09FromDiscord<Yardanico> @haxscramper myself, and yes, it's pretty barebones and ugly :D
10:46:45krux02I am not the guy called arnetheduck, that is a drunken donald compic book series and a used who isn't even called arne in real life
10:46:58FromDiscord<Yardanico> There's a Nim markdown parser lib, but it's main usage is to parse markdown into HTML. I can operate on its AST myself to convert to IRC formatting but I guess that's a bit too much
10:47:20PMunchkrux02, yeah that threw me for a spin a while back
10:47:37*SebastianM joined #nim
10:47:51krux02the markdown parser for these comments should be done with a custom parser.
10:48:15PMunch@Yardanico, might be time to pull out NPEG and get a simple markdown parser running
10:48:19krux02I don.t think these falbacks can be implemented very well with classical language parsers.
10:49:36haxscramperThis can mostly be done with some weird mix of recursive descent, but with explicit stack, so you can forcefully fold things like `*not-really-italic`.
10:49:40krux02I think you need a custom lexer that scans through the document and looks for starting and ending tokens such as * and only when they are matched they get replaced by real start/end tokens
10:50:13haxscramperBut yes, you can't really get good results if you separate lexer and scanner
10:50:32krux02this can be done with a stack automata
10:51:01FromDiscord<Yardanico> @PMunch maybe you're right, I'll experiment with it
10:51:03krux02I only separet between lexer and parser
10:51:07krux02lexer makes tokens
10:51:12krux02parser makes tree
10:51:18FromDiscord<Yardanico> I just need to parse simple stuff like italics, bold, etc
10:51:20FromDiscord<haxscramper> https://github.com/haxscramper/haxorg/blob/7b43f48f50beef29f1bbce298cac93d49431513d/src/haxorg/parser.nim#L882
10:52:09krux02haxscramper, yea I am not going to dive into that codebase now
10:52:10haxscramperThis is more involved than it needs to be
10:52:20haxscramperThis is for Yardanico
10:52:26krux02ok
11:00:13*stefantalpalaru joined #nim
11:09:12*Tlangir quit (Remote host closed the connection)
11:09:31*Tlangir joined #nim
11:09:44PMunchHmm, does markdown support nested styles?
11:10:06PMunchI see that bold and italics are the same symbols but in different quantities..
11:10:25*sirn quit (Ping timeout: 240 seconds)
11:10:33*abm joined #nim
11:11:05*kwilczynski quit (Ping timeout: 240 seconds)
11:11:05*sz0 quit (Ping timeout: 240 seconds)
11:11:34*sirn joined #nim
11:11:42PMunchSo would "*Hello **world***" be Hello world or something else?
11:11:45*narimiran quit (Ping timeout: 240 seconds)
11:11:54*kwilczynski joined #nim
11:12:17FromDiscord<Yardanico> Hello world
11:12:20*sz0 joined #nim
11:12:25FromDiscord<Yardanico> Hello world
11:12:32Yardanico^yeah that's how it looks in discord as well
11:12:51PMunchOh yeah, that's what I meant
11:13:06*gmaggior joined #nim
11:13:36*gmaggior left #nim (#nim)
11:14:26PMunchThat makes it a bit trickier..
11:15:37Yardanicoyep
11:22:51*SebastianM left #nim (#nim)
11:23:58*narimiran joined #nim
11:25:21*haxscramper quit (Remote host closed the connection)
11:28:07*priv_drgn joined #nim
11:31:24*AndChat|21441 joined #nim
11:46:03*gmaggior joined #nim
11:47:45*AndChat|21441 quit (Ping timeout: 240 seconds)
11:59:01*Vladar quit (Quit: Leaving)
12:00:46FromDiscord<Clyybber> @Araq https://github.com/nim-lang/Nim/pull/16849 is ready (uses mgetOrPut now)
12:03:04*Vladar joined #nim
12:05:03*rockcavera joined #nim
12:07:45*priv_drgn left #nim ("Konversation terminated!")
12:09:07*sirn quit (Read error: Connection reset by peer)
12:09:09*sz0 quit (Read error: Connection reset by peer)
12:09:13*kwilczynski quit (Read error: Connection reset by peer)
12:10:44*sirn joined #nim
12:11:14*kwilczynski joined #nim
12:12:42FromDiscord<mratsim> In reply to @krux02 "I already did it": @krux02, seen the patch, thanks. Even Araq upvoted my RFC so I assume he didn't see the far consequences of enabling {.compileTime.} variable to be accessed at runtime.
12:12:44*sz0 joined #nim
12:13:37*vicfred quit (Quit: Leaving)
12:19:17krux02@mratsim: Well I did see the consequences and I told him the consequences.
12:20:31krux02PMunch, how do you write italic on IRC?
12:21:01krux02and I would say that "*Hello **world***" is invalid.
12:21:35Yardanicokrux02: it is valid markdown though
12:21:51Yardanicokrux02: for italics you need to use formatting in your IRC client
12:22:04Yardanicolike this
12:22:07Yardanicoasdasd
12:22:13*haxscramper joined #nim
12:22:24krux02ok, I looked it up, IRC uses ASCII charactors like this https://modern.ircdocs.horse/formatting.html
12:22:28Yardanicoyeah
12:22:35Yardanicoi use them to convert md to irc
12:23:22krux02so after all you could scan for matching charactors and just substitute them with those ascii characters
12:23:32Yardanicothat's what I do right now
12:23:49Yardanicobut it wouldn't check if the tag is actually closed
12:23:51Yardanicolike *hello
12:25:36*gmaggior quit (Quit: Bye)
12:42:12*stefantalpalaru quit (Changing host)
12:42:12*stefantalpalaru joined #nim
12:46:47PMunchYeah, my IRC client has keyboard shortcuts to put those ascii characters in
12:46:54Yardanicosame
12:47:01Yardanicoctrl+i for italics for example
12:51:17krux02italic test abc
12:51:30krux02Yardanico, yea works here as well
12:51:34krux02thank you didn't know
12:53:19krux02I think I will use it in the future more often now that I know how to use it
12:56:09Yardanicohehehe
12:56:16Yardanico(you can combine them of course)
13:00:39krux02break discord :P
13:01:17Yardanicoyes I know :(
13:01:21krux02hehe
13:01:53FromDiscord<arne> hehe
13:02:13krux02hmm, there is a way to do it correctly though
13:02:24Yardanicoyes
13:02:57krux02I like the litte bot faces on discord for irc members
13:04:47FromDiscord<Recruit_main707> It looks way better
13:05:58Yardanicokrux02: that's gravatar's robohash (I use nicknames as hashes so a single IRC user always has the same avatar)
13:10:35*SebastianM joined #nim
13:34:04FromGitter<Araq> > Well I did see the consequences and I told him the consequences. ⏎ ⏎ you never came up with a solution though. but then you never understood the problem either
13:47:34*SebastianM quit (Quit: -a- IRC for Android 2.1.59)
13:50:40*Tlangir quit (Ping timeout: 256 seconds)
13:55:06FromDiscord<hamidb80> is there something like Python "decorators" in Nim?
13:55:10Yardanicopragmas
13:55:20Yardanicothey're more powerful than python decorators though
13:55:44FromDiscord<hamidb80> In reply to @Yardanico "they're more powerful than": can i make one?
13:55:47Yardanicoyes
13:55:57FromDiscord<exelotl> I don't understand accessing compileTime variables at runtime. Writing a macro that calls newLit() on the variable makes way more sense to me
13:56:57federico3https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers#Decorators
13:58:17PMunch@exelotl, that's essentially the new proposal by mratsim
13:58:39PMunchCalling `var x = static: myCompileTimeVar`
13:58:40FromDiscord<hamidb80> In reply to @federico3 "https://github.com/nim-lang/Nim/wiki/Nim-for-Python": wow
14:00:16*vicfred joined #nim
14:01:49*quantimnot joined #nim
14:03:13quantimnotCan I use a module named the same as a stdlib module? I made my own `prelude` module but I can't figure out how to resolve to it instead of std/prelude. I can rename mine to something less meaningful, but that stinks.
14:04:17FromDiscord<Rika> You can use relative import
14:04:26FromDiscord<Rika> ./prelude I think should be your prelude
14:04:30Clonkk[m]Honestly, it's not worth the hastle
14:04:46Clonkk[m]Just rename your module and avoid name in the stdlib
14:04:47Clonkk[m]It's not that hard
14:05:06Clonkk[m] * It's not that hard and IMHO, it beats dealing with non productive issues
14:05:15liblq-dev@Rika well actually
14:05:19liblq-dev!eval import ./strutils
14:05:20FromDiscord<Rika> I don’t think I’ve had the prelude issue
14:05:22NimBot<no output>
14:05:29Yardanicoheh
14:05:42FromDiscord<Rika> I’ve named modules prelude a good amount of times I believe
14:06:17FromDiscord<Clyybber> Theres two ways you can transition a value/variable into runtime
14:06:33FromDiscord<Clyybber> One is taking the value after all compilation is done
14:06:48FromDiscord<Clyybber> and the other is taking the value when it's encountered during compilation
14:12:12quantimnotMy prelude.nim is a standalone module to be imported by my other packages and I don't want to give a relative path to a separate package. I guess I'll have to just rename it. Thanks
14:18:52FromDiscord<hamidb80> In reply to @federico3 "https://github.com/nim-lang/Nim/wiki/Nim-for-Python": this repo has stars as high as Nim repo! πŸ˜…
14:19:18narimiranthis *is* nim repo
14:19:28Yardanicoxd
14:19:41Yardanico@hamidb80 github has the wiki feature for repos
14:19:41FromDiscord<hamidb80> In reply to @narimiran "this *is* nim repo": you're right 😐
14:19:49narimirani know
14:20:33*junland quit (Quit: %ZNC Disconnected%)
14:25:31FromDiscord<dk> πŸ™ƒ
14:29:32FromDiscord<Recruit_main707> r/wooosh
14:36:15FromDiscord<Rika> lol
15:02:42*junland joined #nim
15:35:41*waleee-cl joined #nim
15:36:04*sunwukong quit (Ping timeout: 256 seconds)
15:49:42*quantimnot quit (Quit: Ping timeout (120 seconds))
15:50:06FromDiscord<arne> @exelotl: That call to newLit is what I've been proposing since before this leaking of compileTime variables to runtime was a thing.
16:05:29*sunwukong joined #nim
16:15:43*vsantana joined #nim
16:28:22*quantimnot joined #nim
16:33:57*hmmm joined #nim
16:34:24hmmmmuh bois, take a look: https://play.nim-lang.org/#ix=2ORa
16:34:30hmmmwhy it doesn't work :|
16:35:41FromDiscord<Anuke> binary search requires a sorted array
16:35:46hmmmohhh
16:35:51hmmm:O
16:35:54hmmmthat's why
16:36:05hmmmanuke <3
16:51:36*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
16:52:41*njoseph joined #nim
16:58:14*a_chou joined #nim
17:05:23FromDiscord<haxscramper> Full (almost graph) for all packages on nimble directory right now. Image is 3x32k on each dimension, but looks like discord just lets "open original" so quality should not suffer https://media.discordapp.net/attachments/371759389889003532/808745371995078697/deps.png
17:06:35Yardanicoi did the same thing some time ago btw :)
17:06:40FromDiscord<haxscramper> yes
17:06:52Yardanicodid you do it with sourcetrail?
17:06:55Yardanicoor something else
17:07:25FromDiscord<haxscramper> no, I'm testing viability of don't-eval-nimscript for getting dependencies
17:07:31FromDiscord<haxscramper> And this is just byproduct
17:07:35Yardanicooh okay
17:07:46Yardanicowell I just parsed deps from .nimble files with some npeg :D
17:07:57Yardanicoalthough that is dirty and doesn't account for any control flow
17:08:02*sunwukong quit (Quit: Leaving)
17:08:17Yardanicohttps://github.com/Yardanico/nim-snippets/blob/master/pkgraph/parse.nim#L19
17:08:19FromDiscord<haxscramper> Yes, but I'm looking for more robust soltion. So far there are 48 packages that use `when` for requries
17:08:26Yardanicointeresting
17:08:32Yardanicomost of them are from Status I guess? :P
17:08:34FromDiscord<haxscramper> One package that can't be parsed either with parsecfg or as nimsrcipt
17:08:47FromDiscord<haxscramper> 51 that is not on github
17:09:09FromDiscord<haxscramper> In total I managed to correctly process 1363/1565 packages
17:09:43FromDiscord<haxscramper> In reply to @Yardanico "most of them are": About origins of packages with `when` - give me a second, I will filter them out
17:10:21Yardanicowhen I did similar nimble dep graphing I used .dot at first
17:10:24Yardanicobut then switched to neo4j
17:10:34Yardanicoit seems like a more interesting solution with queries and all that
17:11:01FromDiscord<tomck> Anyone here use vim? I'm using the neovim plugin, is there any way to get nim errors to show up in a little quickfix window, like with typescript?
17:11:37FromDiscord<tomck> if not: is there a tool which will give me multiple compiler errors that i can wrap in a vim plugin? or does nim only do 1 error at once?
17:12:25FromDiscord<haxscramper> https://play.nim-lang.org/#ix=2ORr
17:12:34Yardanicointeresting
17:12:49Yardanico@haxscramper btw, from my testing I discovered that a few packages were invalid, like https://github.com/nim-lang/packages/issues/1549
17:13:01Yardanicosince for my test I cloned all packages from nimble (you did that too I guess)
17:13:06haxscramperI considered using neo4j but it's web interface just killed about 90% of my interest in using it
17:13:14Yardanicohaxscramper: well I used the "native" desktop client
17:13:21krux02@tomck: I use emacs not vim, and I use `compile` that uses the normal nim compilation command and then parses the output with regular expressions. That way you can cycle through error messages as well.
17:13:30Yardanicoidk if there are better alternatives, but really I can use other software too
17:13:34haxscramperYardanico: which one specifically
17:13:37Yardanicothere's quite a lot of software that supports Cypher queries
17:13:55Yardanicohaxscramper: https://neo4j.com/download/
17:14:02Yardanicohttps://neo4j.com/developer/neo4j-desktop/
17:14:05FromDiscord<tomck> krux02: nim only seems to give 1 error at once though, so i don't get a list of errors i can jump between - is there any option for this?
17:14:54krux02well, nim should give multiple error messages, but the compiler isn't optimized for multiple error messages as much as other compilers.
17:15:30krux02It was never a high priority to display as many error messages at once as possible, as for most of the time only the very first are useful anyway.
17:15:45haxscramperYardanico: yes, I used this one, I but ideally I hoped for something like sqlitebrowser - no client/server setup, just simple application with graph database in file.
17:15:53haxscramperThat would be perfect for my use case
17:16:03Yardanicowell, neo4j doesn't need a "server"
17:16:07Yardanicoit can be used offline
17:16:17Yardanicoi mean the desktop app
17:16:29Yardanicothe server is embedded I think
17:17:02Yardaniconot sure if there's anything like neo4j
17:17:26haxscramperI should look into neo4j again then
17:17:43FromDiscord<tomck> krux02: alright thanks, do you have the regex you used on hand?
17:17:57Yardanicohaxscramper: with neo4j I did stuff like https://i.imgur.com/ev86AAK.png
17:18:23FromDiscord<tomck> krux02: Oh wait, the neovim plugin has regexes for it, i juts need to poke around in there. thanks!
17:18:26haxscramperYou also mentioned sourcetrail earlier - I don't know if you saw my message earlier (couple days I guess), but it is now CI-buildable, so if you want yo can test it out
17:18:49haxscramperThough for some reasone release on `v*` tags didn't work as I expected, so last release artifact is quite outdated
17:18:53Yardanicoyeah I saw it but didn't try yet :P
17:19:37haxscramperRight now I stumbled upon nimble integration - I need to determine which `--path:` nimble would pass to compiler when building
17:19:47haxscramperAnd use it in my code indexer
17:20:18haxscramperBut it looks like this is not possible, so I started this `.nimble` manual parsing, and graph is a byproduct in the end
17:21:02haxscramperOn invalid packages: I specifically didn't *evaluate* any of the `.nimble` files, but there has been only one that has incorrect syntax
17:21:10haxscramperWhich is kind of surprising
17:21:38Yardanicowell there's a package in nimble that has no files
17:21:49Yardanicobecause it switched the main branch
17:21:50Yardanicohttps://github.com/nim-lang/packages/issues/1549
17:22:11Yardanicoalso I even parsed old ini-style package definitions in .nimble and .babel
17:22:12Yardanicojust for fun
17:22:24Yardanicoalthough I bet that almost none of these packages work with modern nim versions
17:22:39haxscramperI just copy-pasted nimble implementation for ini-style parser
17:23:38leorizethere's `nimble dump` btw
17:24:06haxscramperit is too expensive
17:24:16Yardanicoleorize: we're talking about parsing all nimble packages :)
17:24:23leorizeor you can just use disruptek's nimph :p
17:24:24haxscrampertoo slow and might require god-knows-what to work correctly
17:24:25Yardanicoit would take much longer than simple parsing
17:24:34Yardanicoi thought about using something like that at first too
17:24:37leorizeparsing nimble packages?
17:24:38Yardanicobut then just did some manual parsing
17:24:40Yardanicoleorize: .nimble
17:24:46haxscramperand `.babel`
17:24:55YardanicoI did some fun with https://github.com/Yardanico/nim-snippets/tree/master/pkgraph
17:24:59Yardanicoalthough never made a forum/blog post
17:25:02Yardanicoshould've done I guess
17:25:06Yardanicoit's never too late
17:25:51haxscramperI also want to reuse it for dependency resolution (when it would be clear that solving NP-hard problem with ad-hoc heuristics is not possible)
17:26:31haxscramperAnother interesting thing is that we only have dependency depth of max 6
17:26:38Yardanicothat's good
17:26:41haxscramperAt least if I read the graph correctly
17:26:57Yardanicolemme redownload and reparse that packages, then I'll have some fun with neo4j again :P
17:27:10Yardanicofetching all repos takes some time even with --depth=1
17:27:38Yardanicoand yes I handle hg (mercurial) repos too
17:28:13haxscramperYardanico: you downloaded them fully?
17:28:21Yardanico--depth=1 git clone
17:28:25Yardanicofor all packages :)
17:28:27haxscramperI use raw github
17:28:29Yardanicoheh
17:28:31haxscramperAnd fall back to API
17:29:14Yardanicowell there are packages that are not on github or even git :P
17:29:19Yardanicobut it's the minority, yeah
17:29:22haxscramper https://github.com/haxscramper/hax-nim/blob/master/compilerapi/test7.nim
17:36:08Yardanicocloned 1518 repos successfully
17:37:03Yardanicoor less
17:37:43YardanicoI mean it's 1518, but some repos aren't nim anymore
17:37:51Yardanicolike https://github.com/abbeymart/mcresponse
17:37:51ForumUpdaterBotNew thread by Arnetheduck: Status Desktop - private messenger and more using Nim + QT, see https://forum.nim-lang.org/t/7492
17:37:56Yardanicoooo
17:38:18haxscramper> 1518 repos
17:38:30haxscramperIt would probably take me half a day with my internet
17:38:35Yardanicoheh
17:38:56Yardanicoat peak it would the cloning process used like 80Mbit/sec but usually ~30Mbit/sec
17:39:04Yardanicototal size is 3.3gb
17:39:13Yardanicoof all of these repos (since depth =1 and no submodules)
17:39:45haxscramperTalking about internet speed always makes me sad
17:39:48Yardanico:(
17:40:17YardanicoMy first internet was a 3G USB modem, then 4G, then another 4G one, then 100Mbit/sec, and since November I have 500Mbit/sec
17:40:24Yardanicobroadband
17:43:02Yardanicohttps://github.com/twist-vector/nim-geohash has no .nimble file at all heh
17:44:39Yardanicohttps://github.com/nim-lang/packages/issues/1807
17:45:48haxscramperThere are several packages that don't `require` any vesion of nim
17:45:56Yardanicoisn't that optional?
17:46:16Yardanicoyeah iti s
17:46:20Yardanico"You may omit the dependencies entirely, but specifying the lowest version of the Nim compiler required is recommended."
17:46:30FromDiscord<mratsim> 0.11.0
17:47:12haxscramperAnd several that still `require` nimrod
17:47:14FromDiscord<exelotl> Experimenting with nicer & safer version of `withValue`
17:47:18FromDiscord<exelotl> https://play.nim-lang.org/#ix=2ORy
17:49:06Yardanicook parsed 1513 packages in the end
17:49:11Yardanicohad to remove some with no .nimble
17:49:52Yardanicohttps://i.imgur.com/i7DDccZ.png
17:50:21Yardanicotime to install neo4j desktop again
17:50:45FromDiscord<Rika> graph databases
17:50:48Yardanicoyes
17:50:48FromDiscord<Rika> are great
17:50:55Yardanicomaybe
17:50:58haxscramperMaybe we could detect uninstallable packages like proposed in https://github.com/nim-lang/nimble/issues/890#issuecomment-773601734
17:51:03FromDiscord<Rika> though unfortunately they take a lot of ram
17:51:04haxscramperBut that is an idea for a later day
17:51:07FromDiscord<Rika> and can be slow
17:52:07Yardanicook time to have some fun with nimble packages in neo4j again
17:52:39Yardanicoif you want to try yourself with some software that supports cypher - https://gist.github.com/Yardanico/5a085aa0613ca239122416c33ee73257
17:52:45Yardanico(warning: 4k lines)
17:55:30haxscramperI also found https://github.com/nogdb/libnogdb/tree/develop while searching for various graph databases
17:55:56haxscramperBut other than this (and LEMON) there are no C/C++ graph databases that can be used as a libary
17:56:33FromDiscord<mratsim> to we need a DB though? isn't an in-memory graph sufficient
17:56:37FromDiscord<mratsim> do we
17:56:49haxscramperNo, for nimble we don't need it
17:57:00haxscramperAnd honestly `gram` is what is needed at most
17:59:08Yardanico"Added 2146 labels, created 2146 nodes, set 5172 properties, created 1944 relationships, completed after 2379 ms."
18:00:07FromDiscord<mratsim> I need a graph data structure that can work in the VM for one of my tensor compiler experiments
18:00:28haxscramperBut graph database would let us perform ecosystem-wide analysis. Or just draw cool graphs
18:01:38FromDiscord<mratsim> Synthesis draws cool graphs
18:01:53FromDiscord<mratsim> People always want others to steal their tedious work
18:02:04FromDiscord<mratsim> Synthesis was made to draw that πŸ˜‰
18:03:05haxscramperI still have hopes for making manageable callgraph, splitting it into clusters (my file?) and somehow animating whole thing as it is executed
18:03:53haxscramperHighlighting callgraph edges as code is executed (of course this would have to be pre-recorded and compiled to animation)
18:06:32Yardanicohttps://i.imgur.com/XD3W5qS.png licenses
18:06:42Yardanicotop 10
18:11:17haxscramperYardanico: I remember you also had a scraper for IRC logs (and forum?) - do you still have it?
18:12:09Yardanicothere's https://github.com/Yardanico/nim-snippets/blob/master/logcheck/main.nim but it uses raw irc logs (not the web version)
18:12:49Yardanicoi posted the sqlite db a few months ago
18:13:16Yardanicofrom oct 2020
18:13:16Yardanicohttps://github.com/timotheecour/Nim/issues/126#issuecomment-713076509
18:14:10haxscramperTo get raw logs do I need to contact someone, or they are freely available?
18:14:22Yardanicowell I have access to the VPS nimbot is hosted on :P
18:14:29Yardanicothat's where the bridge runs
18:22:25FromDiscord<dom96> the raw IRC logs are publicly accessible https://irclogs.nim-lang.org/08-02-2021.logs
18:22:38Yardanicoah didn't know they were accessible like that
18:22:57FromDiscord<dom96> I really need to transition them to json.to
18:23:00Yardanicoyeah :P
18:34:48*natrys joined #nim
18:40:46*teasea joined #nim
18:53:59*sixtyten quit (Quit: Leaving)
18:54:50Oddmongeris it possible to access the field of an object with a variable ?
18:55:49Oddmongerlike this: https://play.nim-lang.org/#ix=2ORY
18:56:44FromDiscord<Rika> compile time only
18:56:50FromDiscord<dk> I'm sure it's possible, but very annoying
18:56:55FromDiscord<dk> if you box the value
18:56:58Yardanicoor use dicts with object variants
18:57:07Yardanicoyeah as dk says
18:57:12Prestigeis that possible with a template
18:57:15FromDiscord<dk> Or just use JSON nodes
18:57:22FromDiscord<Rika> also the thing you sent shows a systemd log?
18:57:31FromDiscord<Ardek> ix amazing as always
18:57:42FromDiscord<Ardek> you could probably do it with a template or macro but that would be compile-time only
18:57:54FromDiscord<Rika> In reply to @Rika "compile time only": as ive said
18:58:04FromDiscord<Rika> πŸ˜›
18:58:07FromDiscord<Ardek> a
18:58:49*tane joined #nim
18:59:13Oddmongerok, it's for filling an object with json key/value
18:59:34Oddmongerso the json key is the object field
19:00:10Oddmongerso i think it's not possible at compile time. I'm afraid i have to use a switch then
19:00:20FromDiscord<dk> Then you can either use `fieldPairs` or `json.fromJson` if I recall correctly
19:00:21Yardanicowhy not use json module itself then?
19:00:51FromDiscord<dk> https://nim-lang.org/docs/jsonutils.html#fromJson%2CT%2CJsonNode
19:00:52*xet7 quit (Quit: Leaving)
19:01:51*xet7 joined #nim
19:01:53Oddmongeroh
19:02:00Oddmongerthank you :)
19:02:19FromDiscord<dk> I'm surprised you didn't think someone already did this before :nim1:
19:03:03Oddmongerah, it's in json utils. I didn't knew this one
19:03:10FromDiscord<dk> For more complex objects you can use `marshal` module
19:03:13Oddmongeri have read only jsion module doc
19:03:21FromDiscord<dk> Yeah, I only found the module by searching for `fromJson` in the index
19:04:15FromDiscord<Rika> why is it separated anyway
19:10:56*hmmm quit (Quit: WeeChat 2.8)
19:17:38*waleee-cl quit (Ping timeout: 256 seconds)
19:17:58*waleee-cl joined #nim
19:18:33haxscramperYardanico: you can put package graph analysis results on next "this month in nim" when it comes out
19:18:47haxscramperAnd compare it with previous month
19:21:40*quantimnot quit (Quit: Ping timeout (120 seconds))
19:23:41*letto quit (Quit: Konversation terminated!)
19:25:32*letto joined #nim
19:39:25FromDiscord<Varriount> federico3: My main beef with using pragmas as a replacement for Python's decorators is that:↡ - They aren't as frictionless as Python's decorators↡ - They are placed after a procedure's parameter section, despite the fact that they can modify the entire procedure
19:40:06*xet7 quit (Remote host closed the connection)
19:40:56*xet7 joined #nim
19:41:01FromDiscord<haxscramper> For macro pragmas you can use block syntax: `myPragma: <proc-declaration>`
19:41:29FromDiscord<haxscramper> This is ugly, but might look more "explicit"
19:44:49FromDiscord<Varriount> Which doesn't scale well if you want to use them in the same ways as Python's decorators
19:45:05FromDiscord<mratsim> @treeform for jsony, I need to load the file in memory? I don't see a file API
19:45:26FromDiscord<Varriount> Where a procedure might have 3 decorators for things like route registration, caching, and authorization handling.
19:45:37FromDiscord<mratsim> In reply to @Varriount "federico3: My main beef": There is a RFC for pragma placement iirc
19:45:41FromDiscord<mratsim> a very old one
19:47:48FromDiscord<Varriount> I can only find one on normalizing certain bits of the pragma syntax
19:49:33FromDiscord<mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2OSj
19:49:44FromDiscord<mratsim> because with gcsafe, thread, async you get pragma overrun
19:53:07FromDiscord<mratsim> ah it must have been this: https://github.com/nim-lang/rfcs/issues/15#issuecomment-558160311
19:59:53*xet7 quit (Remote host closed the connection)
20:00:39*xet7 joined #nim
20:00:42federico3@mratsim @Varriount like this? :) https://github.com/nim-lang/RFCs/issues/15#issuecomment-568890071
20:00:47*rockcavera quit (Killed (verne.freenode.net (Nickname regained by services)))
20:00:48*rockcavera joined #nim
20:01:17FromDiscord<mratsim> yep, not bad as well
20:01:49FromDiscord<mratsim> have to think how it plays with DrNim annotations though, it can get messy otherwise
20:02:50FromDiscord<mratsim> When i started Rust I had issues with float not being Ordinal and had to copy paste their min/max, and I was stumped by this: https://github.com/mratsim/rustygo/blob/master/src/main.rs#L39-L44
20:04:11FromDiscord<Varriount> It's declaring local type definitions?
20:04:22FromDiscord<Varriount> O_o
20:06:23FromDiscord<Varriount> mratsim: Pragmas are the only complaint I have about Nim's syntax. ↡Also, the whole "lets use short variable and function names" thing works when your language is relatively simple, like Go, but I feel that it turns into a mess once you have a language with more complex features, like Rust.
20:06:45FromDiscord<Varriount> That function just makes me feel... uncomfortable
20:06:54federico3and the preference for CamelCase :(
20:09:25FromDiscord<mratsim> I don't like camel case either
20:10:14FromDiscord<mratsim> Especially with names like SQL or RNG which are supposed to be allcaps
20:10:33haxscramperuSe DrUnK CaMEl CasE
20:11:59*leorize quit (Quit: WeeChat 3.0)
20:14:28FromDiscord<treeform> In reply to @mratsim "<@!107140179025735680> for jsony, I": Yes you need to load the full file in memory for jsony.
20:16:11ForumUpdaterBotNew thread by B3liever: Do you structure Nim code this way?, see https://forum.nim-lang.org/t/7493
20:21:45*letto quit (Ping timeout: 246 seconds)
20:39:47*vsantana quit (Read error: Connection reset by peer)
20:40:15*vsantana joined #nim
20:40:19federico3https://en.wikipedia.org/wiki/Camel_case#Readability_studies
20:50:31FromDiscord<mratsim> In reply to @treeform "Yes you need to": sorry for spamming issue, I'm finished :p
20:56:44FromDiscord<treeform> In reply to @mratsim "sorry for spamming issue,": I fixed on of your issues, replying now.
20:57:00FromDiscord<mratsim> well even without fixes, jsony is working
21:00:55*letto joined #nim
21:01:27FromDiscord<treeform> https://github.com/treeform/jsony/issues/8
21:01:49FromDiscord<treeform> I though status had its own json lib and you where with status?
21:03:20FromDiscord<treeform> oh I see the dependency thing issue
21:03:21FromDiscord<treeform> got it
21:03:51FromDiscord<mratsim> for context: https://github.com/mratsim/constantine/pull/156
21:04:06FromDiscord<mratsim> it's for a personal lib and for testing.
21:05:40*xet7 quit (Read error: Connection reset by peer)
21:05:55*xet7 joined #nim
21:08:35FromDiscord<Scarecrow> is there some lib to create qt5 or gtk3 gui yet?
21:09:14FromDiscord<Scarecrow> (I mean - say, for python and qt, there were pyqt5 and pyside2)
21:09:46FromDiscord<Solitude> nimqml, gintro
21:09:55Yardanicohttps://github.com/StefanSalewski/gintro
21:10:03Yardanicoyeah, qml != qt5 though
21:11:41*leorize joined #nim
21:15:22*leorize quit (Remote host closed the connection)
21:21:45*narimiran quit (Ping timeout: 240 seconds)
21:23:07*haxscramper quit (Remote host closed the connection)
21:33:17*leorize joined #nim
21:40:28*PMunch quit (Quit: leaving)
21:48:28*xet7 quit (Read error: Connection reset by peer)
21:48:37*xet7_ joined #nim
21:51:04*vsantana quit (Quit: vsantana)
21:51:04stefantalpalaruWhat can I use at compile time instead of "walkDir()"? Nimscript's "listDirs()" doesn't work.
21:51:10*leorize quit (Ping timeout: 268 seconds)
21:58:06*leorize joined #nim
22:04:40FromDiscord<treeform> I don't think you can do complex file operations during compile time
22:14:04*natrys quit (Quit: natrys)
22:14:57FromDiscord<Recruit_main707> what i do is compile a normal program that does it and then use it with execShellCmd at compile time, its very ugly
22:24:41FromDiscord<ElegantBeef> Life will be good if/when we default to libffi enabled compiler πŸ˜„
22:25:09FromDiscord<ElegantBeef> Any ideas why a program could crash on `os.sleep`?
22:26:48*Vladar quit (Quit: Leaving)
22:34:22FromDiscord<dom96> a corruption created somewhere else?
22:34:36FromDiscord<dom96> it's very unlikely to be related to os.sleep
22:41:53FromDiscord<ElegantBeef> Yea that's what i figured i am using threads and async so almost certainly something else is the cause, though the stacktrace is no help there
22:43:15*tane quit (Quit: Leaving)
22:58:24*krux02 quit (Quit: Leaving)
23:03:02FromDiscord<dom96> are the threads absolutely necessary? If not I'd look into trying to remove them, could fix the problem or make debugging less confusing at least, now and for the future
23:03:06FromGitter<timotheecour> > *<stefantalpalaru>* What can I use at compile time instead of "walkDir()"? Nimscript's "listDirs()" doesn't work. ⏎ ⏎ this works: ⏎ ⏎ ```nim r --eval:'import os,sequtils; echo static(toSeq(walkDir("doc")))’``` [https://gitter.im/nim-lang/Nim?at=602314aa9238c531ad35f994]
23:03:48FromGitter<timotheecour> ditto w nimscript: ⏎ ⏎ ```nim --eval:'import os,sequtils; echo static(toSeq(walkDir("doc")))’``` [https://gitter.im/nim-lang/Nim?at=602314d49238c531ad35f9df]
23:04:22FromDiscord<ElegantBeef> In reply to @dom96 "are the threads absolutely": Each thread is for watching a git branch and initialising Unity Engine builds, i should be able to remove branches and have a single instance for a single branch
23:05:07FromDiscord<ElegantBeef> Only reason for the threads was specifically to support multiple branches in a single instance, but clearly that's just added unneeded and unwarranted complexity
23:10:10FromDiscord<dom96> for something like that I'd be tempted to just spawn multiple processes, one for each branch
23:10:29FromDiscord<dom96> but since you don't need that anyway πŸ™‚
23:10:45FromDiscord<ElegantBeef> Yea that's what i was doing but my friend made the silly suggestion of multiple branch support
23:10:59FromDiscord<ElegantBeef> So i went along and implemented multiple branch support
23:11:15FromDiscord<ElegantBeef> Was still using threading though for printing animated text to the terminal
23:13:21stefantalpalarutimotheecour: that looks like Nimscript. My use case is compile-time inside a macro and walkDir silently fails there, but I used an ugly workaround of calling "ls".
23:15:09*gangstacat quit (Ping timeout: 265 seconds)
23:21:08*gangstacat joined #nim
23:42:27*xet7_ quit (Read error: Connection reset by peer)
23:42:28*xet7 joined #nim
23:42:49*xet7 quit (Remote host closed the connection)
23:43:48*xet7 joined #nim
23:51:26*Jesin quit (Quit: Leaving)
23:54:59FromGitter<timotheecour> `nim r --eval:'import os,sequtils; echo static(toSeq(walkDir("doc")))’` is not nimscript (`nim β€”eval` would be nimscriipt); you can try it out in a nim file with `nim r main`, it also works
23:55:46FromGitter<timotheecour> > My use case is compile-time inside a macro and walkDir silently fails there ⏎ ⏎ if you still have an issue, post your code (after simplifying it)