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:32 | Zoom[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:27 | FromDiscord | <ElegantBeef> I could help but notice that in the talk he was almost wearing the crown |
00:39:55 | Zoom[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:21 | Zoom[m] | https://indiscipline.github.io/post/voice-sound-reference/ |
00:41:18 | Zoom[m] | Hope it can be of use for the next NimConf :P |
00:43:47 | Zoom[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:31 | FromDiscord | <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:37 | leorize | Yardanico: we have to scrap the "bridge via gitter's matrix interface" plan |
04:06:53 | leorize | currently matrix users can't be admin, so I can't setup a bridge |
04:08:07 | FromDiscord | <ElegantBeef> Look at this guy thinks he deserves to be an admin π |
04:08:20 | FromDiscord | <Rika> lol |
04:10:13 | * | pbb joined #nim |
04:10:14 | FromDiscord | <ElegantBeef> Sure you leorize worked on Nim and nvim but what has leorize ever done for us?! |
04:10:44 | FromDiscord | <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:48 | leorize | :P |
04:34:48 | leorize | anyone working on anything cool lately? |
04:35:20 | FromDiscord | <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:46 | leorize | so what's the not cool thing you've been working on? |
04:36:05 | FromDiscord | <ElegantBeef> My puzzle game, though i havent touched it in a few days |
04:36:27 | FromDiscord | <ElegantBeef> <https://jbeetham.itch.io/linerino> This |
04:37:00 | FromDiscord | <ElegantBeef> Ah didnt realize that ircord doesnt strip `<>` off urls |
04:37:50 | FromDiscord | <Rika> <> |
04:38:21 | leorize | your game is too good for my browser |
04:38:30 | FromDiscord | <ElegantBeef> If you put urls in `<>` discord they dont embed |
04:38:41 | FromDiscord | <ElegantBeef> Does that mean it's not working in your browser? |
04:39:31 | leorize | https://ibb.co/txqYkFt |
04:39:46 | * | NimBot joined #nim |
04:47:26 | * | spiderstew_ joined #nim |
04:48:48 | FromDiscord | <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:01 | FromDiscord | <Varriount> O_o |
05:13:39 | FromDiscord | <ElegantBeef> o_O |
05:23:15 | leorize | why 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:31 | FromDiscord | <ElegantBeef> Paths are dumb |
05:37:46 | FromDiscord | <Varriount> @leorize OS paths? |
05:38:33 | leorize | yea |
05:39:07 | FromDiscord | <Varriount> leorize: If you want, I have an unpolished one that's a translation of Go's path library. |
05:39:46 | FromDiscord | <Varriount> I figured, why go through all the (uninteresting) challenges, when somebody has already done that before? |
05:39:56 | leorize | thanks, but I'm more concerned about the design than the impl |
05:40:04 | FromDiscord | <Varriount> Oh, yeah. |
05:40:04 | leorize | https://github.com/alaviss/nim-sys/issues/1 <- you can see here for my research |
05:40:16 | FromDiscord | <Varriount> That's where I got stuck |
05:40:39 | FromDiscord | <Varriount> Do you make a path a distinct type, or a kind of string? Or should it be a struct? |
05:40:55 | leorize | distinct is what I'm planning |
05:41:03 | leorize | but how is the issue |
05:41:37 | FromDiscord | <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:43 | FromDiscord | <Varriount> What do you mean, how? |
05:42:26 | leorize | what would be the semantic for this path type? |
05:43:12 | leorize | you 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:14 | leorize | I'm thinking of the "shortest path that is semantically compatible with the input" |
05:44:30 | leorize | but Windows just makes things much harder, as usual |
05:45:05 | FromDiscord | <Varriount> I still don't quite understand - a path is a path |
05:45:32 | FromDiscord | <Varriount> I mean, I guess you could have different path types for relative, absolute, etc. |
05:46:02 | FromDiscord | <Varriount> But I think the complexity of that would outweigh the return. |
05:47:15 | leorize | not necessarily |
05:47:58 | leorize | for example, go's path has to perform a cleaning routine for every path produced by its functions |
05:48:36 | leorize | if 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:42 | FromDiscord | <Varriount> Yes, because it has to deal with user input, where you get `paths//like/./this/` |
05:49:12 | FromDiscord | <ElegantBeef> Here i am thinking that a path should be a `seq[string]` and `seperator` |
05:49:32 | FromDiscord | <Varriount> The indirection rarely does you any favors. |
05:50:38 | FromDiscord | <ElegantBeef> Yea i just mean if it's not going to be just a string |
05:50:51 | leorize | this 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:23 | FromDiscord | <Varriount> How can you guarantee "saves" is clean? |
05:51:49 | leorize | `join(p: Path, parts: varargs[Path, toPath])` :) |
05:52:10 | leorize | and since compile-time evaluation is a thing, `toPath` can be done ahead of time |
05:52:22 | leorize | oops that should be `p: var Path` |
05:52:30 | FromDiscord | <Varriount> \shrug\ |
05:52:48 | FromDiscord | <ElegantBeef> How dare you leorize i already wrote that proc and it failed to compiled due to lacking `var` π |
05:53:02 | FromDiscord | <Varriount> I would build an API that could theoretically support such things, and worry about optimizing the implementation later. |
05:53:26 | FromDiscord | <Varriount> Path handling is also rarely (never?) a hot-spot in a program. |
05:53:39 | leorize | go's design is fine (though the implementation damages the path's semantics), but go's strings are immutable |
05:53:53 | leorize | Nim strings are mutable, so I'm looking for some clever usage of them |
05:54:00 | FromDiscord | <ElegantBeef> I'm curious what your intention is for paths |
05:54:28 | FromDiscord | <ElegantBeef> Like is it to make them more user friendly to use? |
05:54:37 | FromDiscord | <Rika> does path sanitisation need to be quick |
05:54:49 | FromDiscord | <Rika> it makes it sound like its very slow right now |
05:54:56 | FromDiscord | <Rika> you make it sound like |
05:55:13 | leorize | more reliable and reproducible, and less of a pain in usage |
05:55:31 | leorize | @Rika it doesn't, but I have to consider all options available |
05:56:10 | FromDiscord | <Varriount> leorize: Does Go's implementation handle UNCs and network paths? |
05:56:23 | leorize | it ignores them |
05:56:30 | leorize | if it finds `\\` at the beginning it bails |
05:56:44 | leorize | smart choice, really, since Windows is a mess |
05:59:26 | FromDiscord | <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:39 | leorize | as far as I've looked there are two main designs: paths as strings (most popular), special Path type (Rust, Java, maybe more) |
05:59:54 | FromDiscord | <Varriount> To be fair, Windows inherited paths from CP/M |
05:59:58 | FromDiscord | <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:08 | FromDiscord | <Varriount> But yes, path handling on Windows is a mess. |
06:00:24 | leorize | the Nim compiler has an unique design in it's pathutils, and many love that, so I'm investigating that angle too |
06:01:07 | leorize | there'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:01 | FromDiscord | <Varriount> ^ Completely agree |
06:02:03 | FromDiscord | <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:59 | FromDiscord | <ElegantBeef> There is a lot of value in a new type, regardless if it's a distinct string or not π |
06:03:08 | FromDiscord | <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:33 | FromDiscord | <Varriount> paths are \special\ |
06:03:42 | * | leorize joined #nim |
06:04:13 | leorize | how to design those remains an open question as far as I can tell |
06:04:39 | leorize | python's pathlib is very complicated and involves the file system state |
06:04:50 | FromDiscord | <Varriount> Well, you have no lack of implementations. |
06:05:17 | FromDiscord | <haxscramper> Distinct main disadvantage is that you can't ensure full validation because someone might create invalid instance easily |
06:05:29 | leorize | yea, I just have to find this balance between ergonomics and correctness |
06:06:14 | leorize | @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:33 | leorize | I decided against macros in the end :P |
06:07:11 | * | wasted_youth2 quit (Quit: Leaving) |
06:11:41 | leorize | haxscramper: I consider conversions to distinct without using a checked converter an error |
06:11:52 | leorize | or at least an unsafe operation |
06:12:31 | FromDiscord | <haxscramper> I think it should be possible to disable conversion using `Type(<base-type>)` |
06:13:19 | leorize | you still have to perform those in the implementing library, so it's a disadvantage imo |
06:13:41 | leorize | and `{.borrow.}` doesn't work well for generics... |
06:13:56 | FromDiscord | <haxscramper> Yes, but this solves issue of `AbsPath("../test")` |
06:14:18 | leorize | I don't care, really |
06:14:28 | leorize | if the user has to do that, it's a bug |
06:14:34 | leorize | the api is not flexible enough |
06:15:05 | leorize | which is the case with pathutils, sadly... |
06:15:28 | leorize | the compiler is riddled with conversions like the one you gave as an example |
06:15:48 | FromDiscord | <ElegantBeef> could take a note from `re` and do `path"../test"` |
06:16:21 | leorize | https://alaviss.github.io/nim-sys/strings.html <- see this for my "special" string impl |
06:16:44 | leorize | I use the `.toType` pattern |
06:16:56 | leorize | pretty easy to use and slot right in with varargs |
06:17:26 | haxscramper | Yes, 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:45 | haxscramper | But using `distinct` naturally brings all this cruft |
06:18:18 | haxscramper | Otherwise you get 'inflexible API that basically **requires** `AbsPath("../tmp")` |
06:18:18 | haxscramper | |
06:19:12 | leorize | using distinct correctly is an art |
06:19:34 | haxscramper | `distinct void` |
06:19:48 | leorize | we even have `distinct auto` in the stdlib :P |
06:24:56 | * | krux02 joined #nim |
06:25:25 | FromDiscord | <Anonymous Poet> sent a code paste, see https://play.nim-lang.org/#ix=2OOh |
06:25:31 | FromDiscord | <Anonymous Poet> (note that this is all one string) |
06:25:45 | FromDiscord | <Anonymous Poet> I tried doing the same thing in nim and wrapping in parens, but that didnt work |
06:25:55 | FromDiscord | <ElegantBeef> `"dsadsa" & "Dsadsadsa"` |
06:26:22 | FromDiscord | <Anonymous Poet> does that work if `&` is the last character on the line? |
06:26:25 | * | letto quit (Ping timeout: 240 seconds) |
06:26:35 | FromDiscord | <ElegantBeef> yes operators allow new lining operations |
06:27:09 | FromDiscord | <Anonymous Poet> seems like it; thanks! |
06:38:13 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:39:30 | FromDiscord | <Varriount> @Anonymous Poet You can also have triple-quoted string literals, although keep in mind that those remove the common leading whitespace |
06:39:38 | FromDiscord | <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:45 | FromDiscord | <Varriount> leorize: What would you use `distinct auto` for? It sounds... odd. |
06:41:27 | FromDiscord | <haxscramper> https://nim-lang.org/docs/system.html#any |
06:42:29 | FromDiscord | <haxscramper> don't ask why |
06:42:34 | FromDiscord | <haxscramper> I don't know |
06:42:39 | FromDiscord | <haxscramper> And I don't want to know |
06:43:11 | FromDiscord | <Varriount> and haxscramper look down into the void that is `any` |
06:44:12 | FromDiscord | <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:44 | leorize | luckily Windows automatically converts `\` to `/` |
06:52:24 | leorize | and yea, I'm aware of that rabbit hole, which makes a Path type for Windows much much harder |
06:58:25 | FromDiscord | <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:25 | leorize | they should not? |
07:03:38 | FromDiscord | <ElegantBeef> They insert newlines wherever you hit enter |
07:03:46 | FromDiscord | <ElegantBeef> They dont want that behaviour |
07:04:04 | leorize | no I mean the `&` shouldn't create new line |
07:04:11 | FromDiscord | <ElegantBeef> It doesnt |
07:04:56 | leorize | Poet is saying that it does |
07:05:01 | leorize | https://play.nim-lang.org/#ix=2OOm |
07:05:04 | leorize | ^ it doesn't :P |
07:05:15 | FromDiscord | <ElegantBeef> They said exactly the opposite |
07:05:55 | FromDiscord | <ElegantBeef> Oh right you dont see replies |
07:06:01 | FromDiscord | <ElegantBeef> https://media.discordapp.net/attachments/371759389889003532/808594536619048970/unknown.png |
07:06:05 | FromDiscord | <ElegantBeef> Context π |
07:06:16 | leorize | ah, I see |
07:20:43 | FromDiscord | <Yardanico> @ElegantBeef IRC users see replies now though |
07:21:18 | FromDiscord | <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:34 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/808598448647045120/unknown.png |
07:22:44 | FromDiscord | <ElegantBeef> Ah |
07:22:53 | FromDiscord | <ElegantBeef> Also `<url>` sends the `<>` to irc |
07:23:07 | FromDiscord | <Yardanico> well, I have to handle all that manually, but thanks for letting me know |
07:23:20 | FromDiscord | <Yardanico> discord doesn't magically strip all markdown for me :P |
07:23:26 | FromDiscord | <ElegantBeef> I know |
07:23:38 | FromDiscord | <ElegantBeef> If it did it wouldnt be a problem π |
07:25:58 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/808599553301020702/unknown.png |
07:32:04 | FromDiscord | <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:09 | FromDiscord | <Yardanico> (edit) "to" => "do" |
07:32:23 | FromDiscord | <Yardanico> or for any other attachments |
07:33:35 | FromDiscord | <haxscramper> There are not that many reply-to-attachment situations, so I suppose pasting whole image is fine |
07:34:06 | FromDiscord | <Yardanico> it's just that the link is quite longf |
07:34:07 | FromDiscord | <Yardanico> (edit) "longf" => "long" |
07:34:13 | FromDiscord | <Yardanico> and I don't think it would be good to use URL shorteners |
07:34:24 | FromDiscord | <Yardanico> usual discord image link is https://media.discordapp.net/attachments/371759389889003532/808598448647045120/unknown.png |
07:34:33 | * | priv_drgn joined #nim |
07:38:35 | FromDiscord | <ElegantBeef> Just send the image in base64 π |
07:39:26 | FromDiscord | <Yardanico> IRC message char limit is 512 (including all the service tags) |
07:39:28 | FromDiscord | <Yardanico> so it's like ~500 |
07:39:48 | FromDiscord | <Yardanico> https://media.discordapp.net/attachments/371759389889003532/808603038902255646/unknown.png |
07:40:01 | FromDiscord | <Yardanico> 510 characters (including the command and parameters) |
07:40:06 | FromDiscord | <ElegantBeef> Ah so compress the image to 21x21 π |
07:40:25 | FromDiscord | <Yardanico> I will need to do some more work on replies - https://github.com/Yardanico/ircord/issues/13 |
07:40:48 | FromDiscord | <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:50 | FromDiscord | <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:48 | FromDiscord | <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:19 | FromDiscord | <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:29 | ForumUpdaterBot | New 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:02 | PMunch | Sorry, 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:19 | PMunch | Maybe something like this should be in the official systems module? https://github.com/PMunch/protobuf-nim/commit/2bc68425e2a1fab10d9de358e30b4b035a17244a |
09:01:44 | FromDiscord | <mratsim> https://github.com/nim-lang/RFCs/issues/338, bikeshed away |
09:01:55 | FromDiscord | <mratsim> > Remove runtime access to {.compileTime.} variable |
09:13:06 | * | sixtyten_ joined #nim |
09:13:09 | * | sixtyten_ quit (Client Quit) |
09:20:37 | ForumUpdaterBot | New 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:56 | krux02 | @mratsim: just linked you my patch to fixe `compileTime` again. |
10:25:30 | krux02 | I already did it almost a year ago on my own nim fork |
10:26:35 | FromDiscord | <ElegantBeef> It's weird that it escaped compileTime, not doing what it says on the tin is weird |
10:27:10 | krux02 | tin? |
10:28:03 | FromDiscord | <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:27 | FromDiscord | <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:09 | FromDiscord | <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:09 | FromDiscord | <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:22 | FromDiscord | <arne> WFT this incosistency doesn't need to be. |
10:30:33 | FromDiscord | <arne> But it was artifically constructed. |
10:31:00 | FromDiscord | <ElegantBeef> Yea it is a weird inconsistency, which i wager most developers wont mind since it makes it more sensible |
10:31:24 | FromDiscord | <arne> I do mind this inconsistency. |
10:31:29 | FromDiscord | <arne> That is why I fixed it. |
10:31:32 | FromDiscord | <ElegantBeef> I mean wont mine being remove |
10:31:34 | FromDiscord | <ElegantBeef> (edit) "mine" => "mind" |
10:31:50 | FromDiscord | <arne> I just stopped contributing to mainline |
10:35:27 | FromDiscord | <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:05 | FromDiscord | <arne> I've never seen `import module` did you just come up with that syntax? |
10:38:09 | FromDiscord | <ElegantBeef> Yea |
10:38:24 | PMunch | This looks so weird on IRC :P |
10:38:34 | FromDiscord | <ElegantBeef> It's an asterix |
10:38:37 | PMunch | The Discord bot treats the * as start of italics |
10:38:38 | FromDiscord | <arne> export is rarely used. I think `import module` and `export module` is good enough. |
10:38:42 | Yardanico | PMunch: yes :( |
10:38:51 | * | liquidev is now known as liblq-dev |
10:39:15 | FromDiscord | <ElegantBeef> I know export is rarely used, but consistency! π |
10:39:16 | PMunch | Yeah 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:48 | krux02 | tell the discord bot to keep * as * as long as it can't pair it. |
10:39:52 | Yardanico | i know |
10:40:09 | * | liblq-devel joined #nim |
10:40:23 | FromDiscord | <ElegantBeef> Anyway i'll go to sleep now before i send more irc styling accidently |
10:40:32 | FromDiscord | <arne> good night. |
10:40:35 | * | liblq-devel quit (Client Quit) |
10:40:42 | PMunch | Good night |
10:40:57 | FromDiscord | <arne> it is almost lunch time here |
10:43:23 | haxscramper | Yardanico: You wrote discord -> IRC markup converter yourself or used some library? |
10:44:54 | FromDiscord | <Rika> self i believe |
10:44:56 | PMunch | @arne, ditto it's 11:44AM |
10:45:32 | krux02 | PMunch, yay same time zone |
10:45:39 | krux02 | btw I am arne on discord |
10:45:43 | krux02 | that is my real name |
10:45:47 | PMunch | Haha, yeah I figured |
10:46:05 | PMunch | And guessing from you're last name you're based in Germany |
10:46:09 | FromDiscord | <Yardanico> @haxscramper myself, and yes, it's pretty barebones and ugly :D |
10:46:45 | krux02 | I 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:58 | FromDiscord | <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:20 | PMunch | krux02, yeah that threw me for a spin a while back |
10:47:37 | * | SebastianM joined #nim |
10:47:51 | krux02 | the markdown parser for these comments should be done with a custom parser. |
10:48:15 | PMunch | @Yardanico, might be time to pull out NPEG and get a simple markdown parser running |
10:48:19 | krux02 | I don.t think these falbacks can be implemented very well with classical language parsers. |
10:49:36 | haxscramper | This 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:40 | krux02 | I 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:13 | haxscramper | But yes, you can't really get good results if you separate lexer and scanner |
10:50:32 | krux02 | this can be done with a stack automata |
10:51:01 | FromDiscord | <Yardanico> @PMunch maybe you're right, I'll experiment with it |
10:51:03 | krux02 | I only separet between lexer and parser |
10:51:07 | krux02 | lexer makes tokens |
10:51:12 | krux02 | parser makes tree |
10:51:18 | FromDiscord | <Yardanico> I just need to parse simple stuff like italics, bold, etc |
10:51:20 | FromDiscord | <haxscramper> https://github.com/haxscramper/haxorg/blob/7b43f48f50beef29f1bbce298cac93d49431513d/src/haxorg/parser.nim#L882 |
10:52:09 | krux02 | haxscramper, yea I am not going to dive into that codebase now |
10:52:10 | haxscramper | This is more involved than it needs to be |
10:52:20 | haxscramper | This is for Yardanico |
10:52:26 | krux02 | ok |
11:00:13 | * | stefantalpalaru joined #nim |
11:09:12 | * | Tlangir quit (Remote host closed the connection) |
11:09:31 | * | Tlangir joined #nim |
11:09:44 | PMunch | Hmm, does markdown support nested styles? |
11:10:06 | PMunch | I 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:42 | PMunch | So 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:17 | FromDiscord | <Yardanico> Hello world |
11:12:20 | * | sz0 joined #nim |
11:12:25 | FromDiscord | <Yardanico> Hello world |
11:12:32 | Yardanico | ^yeah that's how it looks in discord as well |
11:12:51 | PMunch | Oh yeah, that's what I meant |
11:13:06 | * | gmaggior joined #nim |
11:13:36 | * | gmaggior left #nim (#nim) |
11:14:26 | PMunch | That makes it a bit trickier.. |
11:15:37 | Yardanico | yep |
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:46 | FromDiscord | <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:42 | FromDiscord | <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:17 | krux02 | @mratsim: Well I did see the consequences and I told him the consequences. |
12:20:31 | krux02 | PMunch, how do you write italic on IRC? |
12:21:01 | krux02 | and I would say that "*Hello **world***" is invalid. |
12:21:35 | Yardanico | krux02: it is valid markdown though |
12:21:51 | Yardanico | krux02: for italics you need to use formatting in your IRC client |
12:22:04 | Yardanico | like this |
12:22:07 | Yardanico | asdasd |
12:22:13 | * | haxscramper joined #nim |
12:22:24 | krux02 | ok, I looked it up, IRC uses ASCII charactors like this https://modern.ircdocs.horse/formatting.html |
12:22:28 | Yardanico | yeah |
12:22:35 | Yardanico | i use them to convert md to irc |
12:23:22 | krux02 | so after all you could scan for matching charactors and just substitute them with those ascii characters |
12:23:32 | Yardanico | that's what I do right now |
12:23:49 | Yardanico | but it wouldn't check if the tag is actually closed |
12:23:51 | Yardanico | like *hello |
12:25:36 | * | gmaggior quit (Quit: Bye) |
12:42:12 | * | stefantalpalaru quit (Changing host) |
12:42:12 | * | stefantalpalaru joined #nim |
12:46:47 | PMunch | Yeah, my IRC client has keyboard shortcuts to put those ascii characters in |
12:46:54 | Yardanico | same |
12:47:01 | Yardanico | ctrl+i for italics for example |
12:51:17 | krux02 | italic test abc |
12:51:30 | krux02 | Yardanico, yea works here as well |
12:51:34 | krux02 | thank you didn't know |
12:53:19 | krux02 | I think I will use it in the future more often now that I know how to use it |
12:56:09 | Yardanico | hehehe |
12:56:16 | Yardanico | (you can combine them of course) |
13:00:39 | krux02 | break discord :P |
13:01:17 | Yardanico | yes I know :( |
13:01:21 | krux02 | hehe |
13:01:53 | FromDiscord | <arne> hehe |
13:02:13 | krux02 | hmm, there is a way to do it correctly though |
13:02:24 | Yardanico | yes |
13:02:57 | krux02 | I like the litte bot faces on discord for irc members |
13:04:47 | FromDiscord | <Recruit_main707> It looks way better |
13:05:58 | Yardanico | krux02: 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:04 | FromGitter | <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:06 | FromDiscord | <hamidb80> is there something like Python "decorators" in Nim? |
13:55:10 | Yardanico | pragmas |
13:55:20 | Yardanico | they're more powerful than python decorators though |
13:55:44 | FromDiscord | <hamidb80> In reply to @Yardanico "they're more powerful than": can i make one? |
13:55:47 | Yardanico | yes |
13:55:57 | FromDiscord | <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:57 | federico3 | https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers#Decorators |
13:58:17 | PMunch | @exelotl, that's essentially the new proposal by mratsim |
13:58:39 | PMunch | Calling `var x = static: myCompileTimeVar` |
13:58:40 | FromDiscord | <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:13 | quantimnot | Can 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:17 | FromDiscord | <Rika> You can use relative import |
14:04:26 | FromDiscord | <Rika> ./prelude I think should be your prelude |
14:04:30 | Clonkk[m] | Honestly, it's not worth the hastle |
14:04:46 | Clonkk[m] | Just rename your module and avoid name in the stdlib |
14:04:47 | Clonkk[m] | It's not that hard |
14:05:06 | Clonkk[m] | * It's not that hard and IMHO, it beats dealing with non productive issues |
14:05:15 | liblq-dev | @Rika well actually |
14:05:19 | liblq-dev | !eval import ./strutils |
14:05:20 | FromDiscord | <Rika> I donβt think Iβve had the prelude issue |
14:05:22 | NimBot | <no output> |
14:05:29 | Yardanico | heh |
14:05:42 | FromDiscord | <Rika> Iβve named modules prelude a good amount of times I believe |
14:06:17 | FromDiscord | <Clyybber> Theres two ways you can transition a value/variable into runtime |
14:06:33 | FromDiscord | <Clyybber> One is taking the value after all compilation is done |
14:06:48 | FromDiscord | <Clyybber> and the other is taking the value when it's encountered during compilation |
14:12:12 | quantimnot | My 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:52 | FromDiscord | <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:18 | narimiran | this *is* nim repo |
14:19:28 | Yardanico | xd |
14:19:41 | Yardanico | @hamidb80 github has the wiki feature for repos |
14:19:41 | FromDiscord | <hamidb80> In reply to @narimiran "this *is* nim repo": you're right π |
14:19:49 | narimiran | i know |
14:20:33 | * | junland quit (Quit: %ZNC Disconnected%) |
14:25:31 | FromDiscord | <dk> π |
14:29:32 | FromDiscord | <Recruit_main707> r/wooosh |
14:36:15 | FromDiscord | <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:06 | FromDiscord | <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:24 | hmmm | muh bois, take a look: https://play.nim-lang.org/#ix=2ORa |
16:34:30 | hmmm | why it doesn't work :| |
16:35:41 | FromDiscord | <Anuke> binary search requires a sorted array |
16:35:46 | hmmm | ohhh |
16:35:51 | hmmm | :O |
16:35:54 | hmmm | that's why |
16:36:05 | hmmm | anuke <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:23 | FromDiscord | <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:35 | Yardanico | i did the same thing some time ago btw :) |
17:06:40 | FromDiscord | <haxscramper> yes |
17:06:52 | Yardanico | did you do it with sourcetrail? |
17:06:55 | Yardanico | or something else |
17:07:25 | FromDiscord | <haxscramper> no, I'm testing viability of don't-eval-nimscript for getting dependencies |
17:07:31 | FromDiscord | <haxscramper> And this is just byproduct |
17:07:35 | Yardanico | oh okay |
17:07:46 | Yardanico | well I just parsed deps from .nimble files with some npeg :D |
17:07:57 | Yardanico | although that is dirty and doesn't account for any control flow |
17:08:02 | * | sunwukong quit (Quit: Leaving) |
17:08:17 | Yardanico | https://github.com/Yardanico/nim-snippets/blob/master/pkgraph/parse.nim#L19 |
17:08:19 | FromDiscord | <haxscramper> Yes, but I'm looking for more robust soltion. So far there are 48 packages that use `when` for requries |
17:08:26 | Yardanico | interesting |
17:08:32 | Yardanico | most of them are from Status I guess? :P |
17:08:34 | FromDiscord | <haxscramper> One package that can't be parsed either with parsecfg or as nimsrcipt |
17:08:47 | FromDiscord | <haxscramper> 51 that is not on github |
17:09:09 | FromDiscord | <haxscramper> In total I managed to correctly process 1363/1565 packages |
17:09:43 | FromDiscord | <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:21 | Yardanico | when I did similar nimble dep graphing I used .dot at first |
17:10:24 | Yardanico | but then switched to neo4j |
17:10:34 | Yardanico | it seems like a more interesting solution with queries and all that |
17:11:01 | FromDiscord | <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:37 | FromDiscord | <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:25 | FromDiscord | <haxscramper> https://play.nim-lang.org/#ix=2ORr |
17:12:34 | Yardanico | interesting |
17:12:49 | Yardanico | @haxscramper btw, from my testing I discovered that a few packages were invalid, like https://github.com/nim-lang/packages/issues/1549 |
17:13:01 | Yardanico | since for my test I cloned all packages from nimble (you did that too I guess) |
17:13:06 | haxscramper | I considered using neo4j but it's web interface just killed about 90% of my interest in using it |
17:13:14 | Yardanico | haxscramper: well I used the "native" desktop client |
17:13:21 | krux02 | @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:30 | Yardanico | idk if there are better alternatives, but really I can use other software too |
17:13:34 | haxscramper | Yardanico: which one specifically |
17:13:37 | Yardanico | there's quite a lot of software that supports Cypher queries |
17:13:55 | Yardanico | haxscramper: https://neo4j.com/download/ |
17:14:02 | Yardanico | https://neo4j.com/developer/neo4j-desktop/ |
17:14:05 | FromDiscord | <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:54 | krux02 | well, nim should give multiple error messages, but the compiler isn't optimized for multiple error messages as much as other compilers. |
17:15:30 | krux02 | It 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:45 | haxscramper | Yardanico: 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:53 | haxscramper | That would be perfect for my use case |
17:16:03 | Yardanico | well, neo4j doesn't need a "server" |
17:16:07 | Yardanico | it can be used offline |
17:16:17 | Yardanico | i mean the desktop app |
17:16:29 | Yardanico | the server is embedded I think |
17:17:02 | Yardanico | not sure if there's anything like neo4j |
17:17:26 | haxscramper | I should look into neo4j again then |
17:17:43 | FromDiscord | <tomck> krux02: alright thanks, do you have the regex you used on hand? |
17:17:57 | Yardanico | haxscramper: with neo4j I did stuff like https://i.imgur.com/ev86AAK.png |
17:18:23 | FromDiscord | <tomck> krux02: Oh wait, the neovim plugin has regexes for it, i juts need to poke around in there. thanks! |
17:18:26 | haxscramper | You 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:49 | haxscramper | Though for some reasone release on `v*` tags didn't work as I expected, so last release artifact is quite outdated |
17:18:53 | Yardanico | yeah I saw it but didn't try yet :P |
17:19:37 | haxscramper | Right now I stumbled upon nimble integration - I need to determine which `--path:` nimble would pass to compiler when building |
17:19:47 | haxscramper | And use it in my code indexer |
17:20:18 | haxscramper | But it looks like this is not possible, so I started this `.nimble` manual parsing, and graph is a byproduct in the end |
17:21:02 | haxscramper | On invalid packages: I specifically didn't *evaluate* any of the `.nimble` files, but there has been only one that has incorrect syntax |
17:21:10 | haxscramper | Which is kind of surprising |
17:21:38 | Yardanico | well there's a package in nimble that has no files |
17:21:49 | Yardanico | because it switched the main branch |
17:21:50 | Yardanico | https://github.com/nim-lang/packages/issues/1549 |
17:22:11 | Yardanico | also I even parsed old ini-style package definitions in .nimble and .babel |
17:22:12 | Yardanico | just for fun |
17:22:24 | Yardanico | although I bet that almost none of these packages work with modern nim versions |
17:22:39 | haxscramper | I just copy-pasted nimble implementation for ini-style parser |
17:23:38 | leorize | there's `nimble dump` btw |
17:24:06 | haxscramper | it is too expensive |
17:24:16 | Yardanico | leorize: we're talking about parsing all nimble packages :) |
17:24:23 | leorize | or you can just use disruptek's nimph :p |
17:24:24 | haxscramper | too slow and might require god-knows-what to work correctly |
17:24:25 | Yardanico | it would take much longer than simple parsing |
17:24:34 | Yardanico | i thought about using something like that at first too |
17:24:37 | leorize | parsing nimble packages? |
17:24:38 | Yardanico | but then just did some manual parsing |
17:24:40 | Yardanico | leorize: .nimble |
17:24:46 | haxscramper | and `.babel` |
17:24:55 | Yardanico | I did some fun with https://github.com/Yardanico/nim-snippets/tree/master/pkgraph |
17:24:59 | Yardanico | although never made a forum/blog post |
17:25:02 | Yardanico | should've done I guess |
17:25:06 | Yardanico | it's never too late |
17:25:51 | haxscramper | I 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:31 | haxscramper | Another interesting thing is that we only have dependency depth of max 6 |
17:26:38 | Yardanico | that's good |
17:26:41 | haxscramper | At least if I read the graph correctly |
17:26:57 | Yardanico | lemme redownload and reparse that packages, then I'll have some fun with neo4j again :P |
17:27:10 | Yardanico | fetching all repos takes some time even with --depth=1 |
17:27:38 | Yardanico | and yes I handle hg (mercurial) repos too |
17:28:13 | haxscramper | Yardanico: you downloaded them fully? |
17:28:21 | Yardanico | --depth=1 git clone |
17:28:25 | Yardanico | for all packages :) |
17:28:27 | haxscramper | I use raw github |
17:28:29 | Yardanico | heh |
17:28:31 | haxscramper | And fall back to API |
17:29:14 | Yardanico | well there are packages that are not on github or even git :P |
17:29:19 | Yardanico | but it's the minority, yeah |
17:29:22 | haxscramper | https://github.com/haxscramper/hax-nim/blob/master/compilerapi/test7.nim |
17:36:08 | Yardanico | cloned 1518 repos successfully |
17:37:03 | Yardanico | or less |
17:37:43 | Yardanico | I mean it's 1518, but some repos aren't nim anymore |
17:37:51 | Yardanico | like https://github.com/abbeymart/mcresponse |
17:37:51 | ForumUpdaterBot | New thread by Arnetheduck: Status Desktop - private messenger and more using Nim + QT, see https://forum.nim-lang.org/t/7492 |
17:37:56 | Yardanico | ooo |
17:38:18 | haxscramper | > 1518 repos |
17:38:30 | haxscramper | It would probably take me half a day with my internet |
17:38:35 | Yardanico | heh |
17:38:56 | Yardanico | at peak it would the cloning process used like 80Mbit/sec but usually ~30Mbit/sec |
17:39:04 | Yardanico | total size is 3.3gb |
17:39:13 | Yardanico | of all of these repos (since depth =1 and no submodules) |
17:39:45 | haxscramper | Talking about internet speed always makes me sad |
17:39:48 | Yardanico | :( |
17:40:17 | Yardanico | My 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:24 | Yardanico | broadband |
17:43:02 | Yardanico | https://github.com/twist-vector/nim-geohash has no .nimble file at all heh |
17:44:39 | Yardanico | https://github.com/nim-lang/packages/issues/1807 |
17:45:48 | haxscramper | There are several packages that don't `require` any vesion of nim |
17:45:56 | Yardanico | isn't that optional? |
17:46:16 | Yardanico | yeah iti s |
17:46:20 | Yardanico | "You may omit the dependencies entirely, but specifying the lowest version of the Nim compiler required is recommended." |
17:46:30 | FromDiscord | <mratsim> 0.11.0 |
17:47:12 | haxscramper | And several that still `require` nimrod |
17:47:14 | FromDiscord | <exelotl> Experimenting with nicer & safer version of `withValue` |
17:47:18 | FromDiscord | <exelotl> https://play.nim-lang.org/#ix=2ORy |
17:49:06 | Yardanico | ok parsed 1513 packages in the end |
17:49:11 | Yardanico | had to remove some with no .nimble |
17:49:52 | Yardanico | https://i.imgur.com/i7DDccZ.png |
17:50:21 | Yardanico | time to install neo4j desktop again |
17:50:45 | FromDiscord | <Rika> graph databases |
17:50:48 | Yardanico | yes |
17:50:48 | FromDiscord | <Rika> are great |
17:50:55 | Yardanico | maybe |
17:50:58 | haxscramper | Maybe we could detect uninstallable packages like proposed in https://github.com/nim-lang/nimble/issues/890#issuecomment-773601734 |
17:51:03 | FromDiscord | <Rika> though unfortunately they take a lot of ram |
17:51:04 | haxscramper | But that is an idea for a later day |
17:51:07 | FromDiscord | <Rika> and can be slow |
17:52:07 | Yardanico | ok time to have some fun with nimble packages in neo4j again |
17:52:39 | Yardanico | if you want to try yourself with some software that supports cypher - https://gist.github.com/Yardanico/5a085aa0613ca239122416c33ee73257 |
17:52:45 | Yardanico | (warning: 4k lines) |
17:55:30 | haxscramper | I also found https://github.com/nogdb/libnogdb/tree/develop while searching for various graph databases |
17:55:56 | haxscramper | But other than this (and LEMON) there are no C/C++ graph databases that can be used as a libary |
17:56:33 | FromDiscord | <mratsim> to we need a DB though? isn't an in-memory graph sufficient |
17:56:37 | FromDiscord | <mratsim> do we |
17:56:49 | haxscramper | No, for nimble we don't need it |
17:57:00 | haxscramper | And honestly `gram` is what is needed at most |
17:59:08 | Yardanico | "Added 2146 labels, created 2146 nodes, set 5172 properties, created 1944 relationships, completed after 2379 ms." |
18:00:07 | FromDiscord | <mratsim> I need a graph data structure that can work in the VM for one of my tensor compiler experiments |
18:00:28 | haxscramper | But graph database would let us perform ecosystem-wide analysis. Or just draw cool graphs |
18:01:38 | FromDiscord | <mratsim> Synthesis draws cool graphs |
18:01:53 | FromDiscord | <mratsim> People always want others to steal their tedious work |
18:02:04 | FromDiscord | <mratsim> Synthesis was made to draw that π |
18:03:05 | haxscramper | I still have hopes for making manageable callgraph, splitting it into clusters (my file?) and somehow animating whole thing as it is executed |
18:03:53 | haxscramper | Highlighting callgraph edges as code is executed (of course this would have to be pre-recorded and compiled to animation) |
18:06:32 | Yardanico | https://i.imgur.com/XD3W5qS.png licenses |
18:06:42 | Yardanico | top 10 |
18:11:17 | haxscramper | Yardanico: I remember you also had a scraper for IRC logs (and forum?) - do you still have it? |
18:12:09 | Yardanico | there's https://github.com/Yardanico/nim-snippets/blob/master/logcheck/main.nim but it uses raw irc logs (not the web version) |
18:12:49 | Yardanico | i posted the sqlite db a few months ago |
18:13:16 | Yardanico | from oct 2020 |
18:13:16 | Yardanico | https://github.com/timotheecour/Nim/issues/126#issuecomment-713076509 |
18:14:10 | haxscramper | To get raw logs do I need to contact someone, or they are freely available? |
18:14:22 | Yardanico | well I have access to the VPS nimbot is hosted on :P |
18:14:29 | Yardanico | that's where the bridge runs |
18:22:25 | FromDiscord | <dom96> the raw IRC logs are publicly accessible https://irclogs.nim-lang.org/08-02-2021.logs |
18:22:38 | Yardanico | ah didn't know they were accessible like that |
18:22:57 | FromDiscord | <dom96> I really need to transition them to json.to |
18:23:00 | Yardanico | yeah :P |
18:34:48 | * | natrys joined #nim |
18:40:46 | * | teasea joined #nim |
18:53:59 | * | sixtyten quit (Quit: Leaving) |
18:54:50 | Oddmonger | is it possible to access the field of an object with a variable ? |
18:55:49 | Oddmonger | like this: https://play.nim-lang.org/#ix=2ORY |
18:56:44 | FromDiscord | <Rika> compile time only |
18:56:50 | FromDiscord | <dk> I'm sure it's possible, but very annoying |
18:56:55 | FromDiscord | <dk> if you box the value |
18:56:58 | Yardanico | or use dicts with object variants |
18:57:07 | Yardanico | yeah as dk says |
18:57:12 | Prestige | is that possible with a template |
18:57:15 | FromDiscord | <dk> Or just use JSON nodes |
18:57:22 | FromDiscord | <Rika> also the thing you sent shows a systemd log? |
18:57:31 | FromDiscord | <Ardek> ix amazing as always |
18:57:42 | FromDiscord | <Ardek> you could probably do it with a template or macro but that would be compile-time only |
18:57:54 | FromDiscord | <Rika> In reply to @Rika "compile time only": as ive said |
18:58:04 | FromDiscord | <Rika> π |
18:58:07 | FromDiscord | <Ardek> a |
18:58:49 | * | tane joined #nim |
18:59:13 | Oddmonger | ok, it's for filling an object with json key/value |
18:59:34 | Oddmonger | so the json key is the object field |
19:00:10 | Oddmonger | so i think it's not possible at compile time. I'm afraid i have to use a switch then |
19:00:20 | FromDiscord | <dk> Then you can either use `fieldPairs` or `json.fromJson` if I recall correctly |
19:00:21 | Yardanico | why not use json module itself then? |
19:00:51 | FromDiscord | <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:53 | Oddmonger | oh |
19:02:00 | Oddmonger | thank you :) |
19:02:19 | FromDiscord | <dk> I'm surprised you didn't think someone already did this before :nim1: |
19:03:03 | Oddmonger | ah, it's in json utils. I didn't knew this one |
19:03:10 | FromDiscord | <dk> For more complex objects you can use `marshal` module |
19:03:13 | Oddmonger | i have read only jsion module doc |
19:03:21 | FromDiscord | <dk> Yeah, I only found the module by searching for `fromJson` in the index |
19:04:15 | FromDiscord | <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:33 | haxscramper | Yardanico: you can put package graph analysis results on next "this month in nim" when it comes out |
19:18:47 | haxscramper | And 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:25 | FromDiscord | <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:01 | FromDiscord | <haxscramper> For macro pragmas you can use block syntax: `myPragma: <proc-declaration>` |
19:41:29 | FromDiscord | <haxscramper> This is ugly, but might look more "explicit" |
19:44:49 | FromDiscord | <Varriount> Which doesn't scale well if you want to use them in the same ways as Python's decorators |
19:45:05 | FromDiscord | <mratsim> @treeform for jsony, I need to load the file in memory? I don't see a file API |
19:45:26 | FromDiscord | <Varriount> Where a procedure might have 3 decorators for things like route registration, caching, and authorization handling. |
19:45:37 | FromDiscord | <mratsim> In reply to @Varriount "federico3: My main beef": There is a RFC for pragma placement iirc |
19:45:41 | FromDiscord | <mratsim> a very old one |
19:47:48 | FromDiscord | <Varriount> I can only find one on normalizing certain bits of the pragma syntax |
19:49:33 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2OSj |
19:49:44 | FromDiscord | <mratsim> because with gcsafe, thread, async you get pragma overrun |
19:53:07 | FromDiscord | <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:42 | federico3 | @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:17 | FromDiscord | <mratsim> yep, not bad as well |
20:01:49 | FromDiscord | <mratsim> have to think how it plays with DrNim annotations though, it can get messy otherwise |
20:02:50 | FromDiscord | <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:11 | FromDiscord | <Varriount> It's declaring local type definitions? |
20:04:22 | FromDiscord | <Varriount> O_o |
20:06:23 | FromDiscord | <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:45 | FromDiscord | <Varriount> That function just makes me feel... uncomfortable |
20:06:54 | federico3 | and the preference for CamelCase :( |
20:09:25 | FromDiscord | <mratsim> I don't like camel case either |
20:10:14 | FromDiscord | <mratsim> Especially with names like SQL or RNG which are supposed to be allcaps |
20:10:33 | haxscramper | uSe DrUnK CaMEl CasE |
20:11:59 | * | leorize quit (Quit: WeeChat 3.0) |
20:14:28 | FromDiscord | <treeform> In reply to @mratsim "<@!107140179025735680> for jsony, I": Yes you need to load the full file in memory for jsony. |
20:16:11 | ForumUpdaterBot | New 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:19 | federico3 | https://en.wikipedia.org/wiki/Camel_case#Readability_studies |
20:50:31 | FromDiscord | <mratsim> In reply to @treeform "Yes you need to": sorry for spamming issue, I'm finished :p |
20:56:44 | FromDiscord | <treeform> In reply to @mratsim "sorry for spamming issue,": I fixed on of your issues, replying now. |
20:57:00 | FromDiscord | <mratsim> well even without fixes, jsony is working |
21:00:55 | * | letto joined #nim |
21:01:27 | FromDiscord | <treeform> https://github.com/treeform/jsony/issues/8 |
21:01:49 | FromDiscord | <treeform> I though status had its own json lib and you where with status? |
21:03:20 | FromDiscord | <treeform> oh I see the dependency thing issue |
21:03:21 | FromDiscord | <treeform> got it |
21:03:51 | FromDiscord | <mratsim> for context: https://github.com/mratsim/constantine/pull/156 |
21:04:06 | FromDiscord | <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:35 | FromDiscord | <Scarecrow> is there some lib to create qt5 or gtk3 gui yet? |
21:09:14 | FromDiscord | <Scarecrow> (I mean - say, for python and qt, there were pyqt5 and pyside2) |
21:09:46 | FromDiscord | <Solitude> nimqml, gintro |
21:09:55 | Yardanico | https://github.com/StefanSalewski/gintro |
21:10:03 | Yardanico | yeah, 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:04 | stefantalpalaru | What 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:40 | FromDiscord | <treeform> I don't think you can do complex file operations during compile time |
22:14:04 | * | natrys quit (Quit: natrys) |
22:14:57 | FromDiscord | <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:41 | FromDiscord | <ElegantBeef> Life will be good if/when we default to libffi enabled compiler π |
22:25:09 | FromDiscord | <ElegantBeef> Any ideas why a program could crash on `os.sleep`? |
22:26:48 | * | Vladar quit (Quit: Leaving) |
22:34:22 | FromDiscord | <dom96> a corruption created somewhere else? |
22:34:36 | FromDiscord | <dom96> it's very unlikely to be related to os.sleep |
22:41:53 | FromDiscord | <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:02 | FromDiscord | <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:06 | FromGitter | <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:48 | FromGitter | <timotheecour> ditto w nimscript: β β ```nim --eval:'import os,sequtils; echo static(toSeq(walkDir("doc")))β``` [https://gitter.im/nim-lang/Nim?at=602314d49238c531ad35f9df] |
23:04:22 | FromDiscord | <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:07 | FromDiscord | <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:10 | FromDiscord | <dom96> for something like that I'd be tempted to just spawn multiple processes, one for each branch |
23:10:29 | FromDiscord | <dom96> but since you don't need that anyway π |
23:10:45 | FromDiscord | <ElegantBeef> Yea that's what i was doing but my friend made the silly suggestion of multiple branch support |
23:10:59 | FromDiscord | <ElegantBeef> So i went along and implemented multiple branch support |
23:11:15 | FromDiscord | <ElegantBeef> Was still using threading though for printing animated text to the terminal |
23:13:21 | stefantalpalaru | timotheecour: 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:59 | FromGitter | <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:46 | FromGitter | <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) |