00:19:45 | FromDiscord | <TennisBowling> is there a guide for making nim libs |
00:19:48 | FromDiscord | <TennisBowling> (edit) "libs" => "libs?" |
00:22:14 | * | stkrdknmibalz joined #nim |
00:31:24 | FromDiscord | <Bung> check nimble github repo |
00:32:17 | FromDiscord | <TennisBowling> ok |
01:43:43 | FromDiscord | <Zachary Carter> you don't need nimble to make a library though |
01:44:00 | FromDiscord | <Zachary Carter> probably best thing to do would be to look at how other popular libraries are authored |
02:12:47 | FromDiscord | <ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3rCa |
02:56:14 | * | rockcavera quit (Remote host closed the connection) |
03:05:43 | * | arkurious quit (Quit: Leaving) |
03:05:45 | FromDiscord | <ajusa> A simple parser for a visual novel language in 99 lines of Nim, pretty neat stuff. @haxscramper pattern matching is awesome, thank you so much for working on it↵https://github.com/ajusa/vnds-player/blob/master/src/interpreter.nim |
04:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
04:06:37 | * | supakeen joined #nim |
04:39:58 | FromDiscord | <haxscramper> In reply to @Bung "<@!608382355454951435> https://github.com/haxscramp": I'm still trying to find a place where it can be used, but so far I haven't found any. Some of the implementation ideas was migrated to pattern matching implementation, but overall idea does seem to be pretty pointless |
04:40:50 | FromDiscord | <haxscramper> I wanted it to be a foundation for generic ast-ast transformation tool, but case/makeTree in pattern matching should do the same. |
04:41:04 | FromDiscord | <haxscramper> Also it is overengineered |
04:43:23 | FromDiscord | <haxscramper> In reply to @ajusa "A simple parser for": Thank a lot. First time seeing someone use a lot of sequence pattern matching, looks extremely clean |
04:45:05 | FromDiscord | <haxscramper> (edit) "extremely" => "very" |
04:55:05 | FromDiscord | <haxscramper> In reply to @haxscramper "I'm still trying to": So in short - use fusion matching instead |
05:01:44 | FromDiscord | <Bung> I found it could be a perfect useage in syntax highlight purpose. |
05:03:01 | FromDiscord | <Bung> it does what syntax highlight needs and not extro costs |
05:06:33 | FromDiscord | <haxscramper> Not sure about this particular use case. I mean it is a term matching, how you are going to use it for syntax highlighting? |
05:07:39 | * | daniel333 joined #nim |
05:07:49 | FromDiscord | <matf> Anyone have a good link to testing? Esp w/ tests defined in another file (preferred) ? |
05:07:51 | FromDiscord | <Bung> the std syntaxhighlite has flat token, so it has less kind of tokens |
05:08:20 | FromDiscord | <Bung> well the compiler has a nested node token give much more info |
05:10:00 | FromDiscord | <Bung> use nimtrs could have flat tokens, information more than syntaxhighlite and less than compiler |
05:21:22 | daniel333 | There is no command using nimble to add dependencies, you must enter them manually by editing the package.nimble file. Is this correct? |
05:22:24 | FromDiscord | <Elegantbeef> Yes, though would be cool 😛 |
05:29:13 | daniel333 | OK, thanks. |
05:40:44 | FromDiscord | <matf> Can you use unittest with testament? I'm a bit at a loss of breaking out individual tests with testament and the output is... uhhh rough, just using doAssert. |
05:43:10 | FromDiscord | <timotheecour> check, requires is ok, other things (suite, test) are not recommended in contributing.html; note that check, requires don't work at CT but it's a fixable bug |
06:15:35 | * | daniel333 left #nim (#nim) |
06:28:56 | * | max22- joined #nim |
06:48:20 | FromDiscord | <haxscramper> Number of git commits for all nim repos per day over since the first commit. Days is just `<unix time for commit> div (60 60 24)` so might not be pretty accurate https://media.discordapp.net/attachments/371759389889003532/860049164087853076/res.png |
06:51:52 | FromDiscord | <Rika> What is that massive outlier one |
06:53:12 | * | Vladar joined #nim |
06:54:12 | FromDiscord | <haxscramper> Don't know. I just collected commit times using `git log`, so it not even be in a single repo |
06:56:43 | FromDiscord | <haxscramper> But still, \~150 commits per day and increasing, looks pretty good |
06:59:10 | * | PMunch joined #nim |
07:47:10 | * | TakinOver quit (Ping timeout: 272 seconds) |
07:51:45 | Clonkk[m] | Is there a logging module that works with thread ? Or is using ``std/logging`` and duplicate logging handler the way ? |
07:54:50 | * | TakinOver joined #nim |
08:18:12 | * | Vladar quit (Ping timeout: 272 seconds) |
08:20:07 | * | vicfred quit (Quit: Leaving) |
09:03:52 | FromDiscord | <vindaar> I like the plot 🤭 (hint\: on latest `ggplotnim` the background is white instead of transparent by default) |
09:05:23 | FromDiscord | <vindaar> but what do you count under "nim repos"? those under the `nim-lang` org? |
09:06:23 | FromDiscord | <zetashift> Those in nimble maybe? |
09:06:44 | FromDiscord | <Vindaar> I thought so, but then the number of commits per day seems too low |
09:07:28 | FromDiscord | <vindaar> well, maybe not |
09:08:59 | FromDiscord | <haxscramper> In reply to @vindaar "but what do you": all nimble packages in `packages.json` |
09:09:17 | FromDiscord | <vindaar> Ah nice. And you just cloned all of them to check the git log? |
09:09:26 | FromDiscord | <haxscramper> and large number of `--language:nim` repos from github, though this list is not complete |
09:09:33 | FromDiscord | <haxscramper> In reply to @vindaar "Ah nice. And you": correct |
09:10:03 | FromDiscord | <Rika> mans got the NASA internet speeds yo |
09:10:13 | FromDiscord | <haxscramper> I'm writing an RFC for nimble and I wanted to check certain things wrt. to how people write packages and so on |
09:10:34 | FromDiscord | <vindaar> cool. At first I thought the outlier could make sense if someone pushed a repo with a large number of commits, but since you use the timestamp of the git log that doesn't make sense. Unless someone did a super large rebase? |
09:10:58 | FromDiscord | <haxscramper> In reply to @Rika "mans got the NASA": 8.4GB of code |
09:11:07 | FromDiscord | <vindaar> 😅 |
09:18:02 | PMunch | But doesn't rebases also preserve the timestamps? |
09:21:40 | FromDiscord | <mratsim> Did something happen to "--hint" in devel? When building csources from scratch I get this strange issue https://media.discordapp.net/attachments/371759389889003532/860087750287687710/unknown.png |
09:22:35 | FromDiscord | <Araq> @mratsim you need to switch to csources_v1 |
09:50:02 | FromDiscord | <madman> hi guys, i have a question:↵when i build with `nim c -g --debugger:native -o:bin Sources/main.nim` it's supposed to generate a .pdb file for debugging right? |
09:51:19 | FromDiscord | <Rika> not that i know of? |
09:51:33 | FromDiscord | <Rika> that only adds debug symbols to the binary i believe |
09:51:39 | FromDiscord | <Rika> what's pdb? |
09:51:41 | * | stkrdknmibalz quit (Quit: WeeChat 3.0.1) |
09:52:19 | FromDiscord | <madman> oh i think that's a vcc thing |
09:52:53 | FromDiscord | <leorize> assuming that you use the default gcc compiler, then the debug information is in the binary itself |
09:53:09 | FromDiscord | <madman> yeah that's true |
09:53:33 | FromDiscord | <madman> well is it normal not to be able to the the data in a string type in debug mode in VSCode? https://media.discordapp.net/attachments/371759389889003532/860095771260878848/unknown.png |
09:53:47 | FromDiscord | <madman> `var str = "What is this?"` |
09:54:00 | FromDiscord | <Rika> it is in data: |
09:54:16 | FromDiscord | <madman> yeah but i cant see it in the VSCode debugger |
09:54:23 | FromDiscord | <Rika> then i do not know why |
09:54:58 | FromDiscord | <exelotl> yeah that's weird, it should be there |
09:55:30 | FromDiscord | <madman> ikr? |
10:00:35 | emery | has there been any drama yet with malicous code in .nimble files? |
10:02:57 | FromDiscord | <leorize> thankfully not (yet) |
10:08:21 | emery | I wish that would happen soon so less dumb stuff ends up in these things |
10:09:22 | FromDiscord | <leorize> you can get it started \:p |
10:16:31 | FromDiscord | <dom96> 👀 |
10:18:23 | FromDiscord | <exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3rDs |
10:19:33 | FromDiscord | <dom96> That's too easy, just add `staticExec("rm -rf /")` into your Nim source code 🙂 |
10:19:33 | FromDiscord | <SolitudeSF> okay, im changing all my nimble files to echo navy seal copypasta on install. thanks for the idea, guys. |
10:19:58 | FromDiscord | <dom96> (edit) "easy," => "easy to identify," |
10:21:59 | FromDiscord | <haxscramper> Actually nobody uses advanced features for `version`/`author` etc., only for tasks |
10:22:13 | FromDiscord | <exelotl> cursed idea: using macros to invoke copilot |
10:22:30 | FromDiscord | <haxscramper> So it is kind of safe to install nimble packages |
10:22:38 | FromDiscord | <Rika> In reply to @haxscramper "Actually nobody uses advanced": are you sure about that |
10:22:45 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rDu |
10:23:05 | FromDiscord | <haxscramper> And almost all uses of this pattern are in repos of a single person |
10:23:08 | FromDiscord | <exelotl> In reply to @exelotl "cursed idea: using macros": your project would contain random AI authored code but you won't know what it is and it'll be different every time. xD |
10:23:13 | FromDiscord | <haxscramper> sent a long message, see http://ix.io/3rDv |
10:23:17 | FromDiscord | <dom96> In reply to @exelotl "cursed idea: using macros": surprised nobody has tried to mine bitcoin using Nim's macros yet |
10:23:42 | FromDiscord | <Rika> p hard job imo\ |
10:24:16 | FromDiscord | <dom96> In reply to @haxscramper "The only common hack": yeah, here is the thing about this: nimble defines a handy NimbleVersion constant that you can use in your Nim code. The only catch is you need to compile your code using Nimble (which you should be doing anyway) |
10:24:25 | FromDiscord | <dom96> I think we should eliminate this hack |
10:33:53 | FromDiscord | <dom96> I'll take the silence to mean everyone agrees 😛 |
10:34:53 | FromDiscord | <Rika> uh |
10:34:58 | FromDiscord | <Rika> why |
10:35:36 | PMunch | I use NimbleVersion for NimLSP I believe, pretty neat stuff |
10:36:17 | FromDiscord | <Rika> i dont compile my code with nimble, because i (of course personally) strictly think nimble is only for project dependency management |
10:42:01 | FromDiscord | <hamidb80> In reply to @x19 "well is it normal": are you using windows? |
10:42:31 | FromDiscord | <hamidb80> i have the same problem in debugger with windows |
10:42:42 | FromDiscord | <madman> yes im on win10 |
10:43:11 | * | FromDiscord quit (Remote host closed the connection) |
10:43:24 | * | FromDiscord joined #nim |
10:50:26 | FromDiscord | <madman> @exelotl do you have the same problem? |
10:50:50 | FromDiscord | <madman> In reply to @exelotl "yeah that's weird, it": @exelotl do you have the same problem? |
10:50:54 | FromDiscord | <hamidb80> i think it's better to talk to @saem |
10:50:54 | FromDiscord | <madman> (edit) removed "@exelotl" |
10:51:09 | FromDiscord | <hamidb80> he's behind the debugger |
10:51:35 | FromDiscord | <madman> good call, let's wait and see |
10:57:20 | FromDiscord | <haxscramper> In reply to @dom96 "yeah, here is the": I don't really like the idea of making manifest files proressively more and more complex |
10:57:39 | FromDiscord | <haxscramper> By adding hacks on top of hacks just becase "well it is nimscript anyway, so why not" |
10:57:46 | FromDiscord | <haxscramper> Nobody uses it |
10:58:57 | FromDiscord | <haxscramper> Not specific to this case but in general, there has been only a handful of manifests that really make use of nimscript features to define `version`/`author` and so on. |
10:59:27 | FromDiscord | <haxscramper> `import` hack just means there is no way to use package manifest as a single source of truth about package structure |
10:59:31 | FromDiscord | <haxscramper> which is complete nonsense |
11:00:46 | FromDiscord | <haxscramper> And this way it would be much easier and safer to evaluate nimble files, since there is no actual code evaluation happening |
11:02:06 | FromDiscord | <haxscramper> Right now, even getting version of a package is not safe |
11:02:14 | FromDiscord | <haxscramper> nothing is safe basically |
11:02:15 | emery | the important nimble metadata should be static data so that building stuff can be automated without dumb hacks breaking stuff |
11:02:24 | FromDiscord | <haxscramper> ^ exactly |
11:03:05 | FromDiscord | <haxscramper> I can't stress this enough - if we continue to go with this approach of allowing "everything" and getting sidetracked by comments like https://github.com/nim-lang/nimble/issues/612#issuecomment-661299817 |
11:03:51 | FromDiscord | <haxscramper> That talk about breaking "thousands of packages" just because someone might write `"abc".reqires()` is a dead end |
11:05:24 | FromDiscord | <haxscramper> Also, `when defined()` hack does not allow figuring out required list of dependencies for different platforms |
11:06:15 | FromDiscord | <haxscramper> This might be fixed by something like https://github.com/nim-lang/RFCs/issues/337 but it is another counter-hack that has to be made instead of actually requiring declarative manifest metadata |
11:06:40 | FromDiscord | <leorize> saem ^ but I'm pretty sure he's a linux user↵(@hamidb80) |
11:09:04 | FromDiscord | <leorize> @haxscramper\: the better approach is to switch to a new metadata format that's static and translate .nimble to it |
11:09:24 | FromDiscord | <haxscramper> I don't think it is necessary to switch into anything |
11:09:40 | FromDiscord | <haxscramper> just make `version = "string literal"` mandatory |
11:09:49 | FromDiscord | <haxscramper> as well as `author "stirng literal"` |
11:09:57 | FromDiscord | <leorize> "version = something" is dumb |
11:09:57 | FromDiscord | <haxscramper> almost everyone does this already |
11:10:06 | FromDiscord | <haxscramper> why? |
11:11:02 | FromDiscord | <haxscramper> I don't understand the argument |
11:11:02 | FromDiscord | <leorize> because version is a property of the source code itself |
11:11:22 | emery | well explicitly writing version should also be avoid if there is a git tag |
11:11:28 | FromDiscord | <leorize> ie. for a source in git, you commited 0.1.0, then you commit a fix or two |
11:11:38 | FromDiscord | <leorize> is it still 0.1.0? |
11:11:39 | emery | ^ right |
11:11:55 | FromDiscord | <leorize> definitely not, but nimble says yes because that's what in the file |
11:12:38 | FromDiscord | <haxscramper> alright, so you propose to remove `version` entirely? |
11:12:38 | FromDiscord | <leorize> yea |
11:12:51 | FromDiscord | <haxscramper> and use git/hg tags |
11:12:51 | FromDiscord | <leorize> integrate with the VCS instead since everyone uses that |
11:13:35 | FromDiscord | <haxscramper> well, alright it does not matter to me where version comes from - `.nimble` or `.git`, I don't care either way as long as `nimble install package > 0.122.0` does the right thing |
11:13:55 | FromDiscord | <haxscramper> But there is also a `requires` and `name` |
11:14:46 | FromDiscord | <Araq> +1 for killing 'version' |
11:14:51 | FromDiscord | <haxscramper> You can say `name` is also a property of a code, but this one is too fragile - moving to differnt directory would break things |
11:14:51 | FromDiscord | <haxscramper> Anyway, `requires` cannot be inferred from the code |
11:14:54 | FromDiscord | <leorize> right, but are you gonna move it to a different directory? |
11:14:59 | FromDiscord | <leorize> why not? |
11:15:04 | FromDiscord | <haxscramper> how? |
11:15:15 | FromDiscord | <Araq> can somebody try https://github.com/plasma-umass/coz on the Nim compiler? I am not running Linux atm |
11:15:17 | fn | <R2D299> itHub: 7"Coz: Causal Profiling" |
11:15:19 | FromDiscord | <SolitudeSF> there is no name? |
11:15:42 | FromDiscord | <leorize> [haxscramper](https://matrix.to/#/@haxscramper:matrix.org) integrate with the compiler and you have the import graph |
11:15:45 | FromDiscord | <haxscramper> Got it. Considering tools like https://github.com/disruptek/bump exist it is a clear indication that information duplication is not↵(@Araq) |
11:15:46 | FromDiscord | <haxscramper> really necessary |
11:15:47 | fn | <R2D299> itHub: 7"a tiny tool to bump nimble versions 🍻" |
11:16:13 | FromDiscord | <haxscramper> import graph can correct resolve `when defined(linux): requires "X11"`? |
11:16:17 | FromDiscord | <Araq> I frequently use 'bump' but it's a workaround, not a solution |
11:16:17 | FromDiscord | <leorize> for the versioning of the deps you can keep them in nimble, but there's no reason why you can't infer the deps from the source, is it? |
11:16:45 | FromDiscord | <haxscramper> If i keep things in the nimble why add complexity to the compiler anyway? |
11:17:06 | FromDiscord | <haxscramper> Compler does not have enough information to infer required version ranges, or at least I don't see how it could do so |
11:17:08 | FromDiscord | <leorize> because packages should not be an overhead for the user |
11:17:12 | FromDiscord | <haxscramper> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/860116802868871188): Compiler does not have enough information to infer required version ranges, or at least I don't see how it could do so |
11:17:24 | FromDiscord | <haxscramper> how `requires` is an overhead? |
11:17:40 | FromDiscord | <leorize> you need it, that's why |
11:17:53 | FromDiscord | <leorize> in go you can just put the package in your import |
11:18:07 | FromDiscord | <haxscramper> I don't understand what do you want to replace `requires` with |
11:18:21 | FromDiscord | <leorize> I want to replace it with a version constraint |
11:18:34 | FromDiscord | <haxscramper> Nothing? And just provide some mechanism to spread this data over whole code with imports and import graph? |
11:18:36 | FromDiscord | <leorize> what to import should be resolved from the code itself |
11:18:47 | FromDiscord | <leorize> the .nimble should be a version lock |
11:18:51 | FromDiscord | <Rika> so you dont need `requires "package"` basically? |
11:18:57 | FromDiscord | <haxscramper> You are mixing package management and import system |
11:18:59 | emery | version and name could be set in the environment somehow, probably set by nimble. if I'm applying patches then maybe I want to customize the name anyway |
11:19:03 | FromDiscord | <haxscramper> I think |
11:19:14 | FromDiscord | <Rika> instead it would be `requires "package () constraints`?\ |
11:19:30 | FromDiscord | <leorize> because that's how it should work if we want packages to be transparent |
11:19:32 | FromDiscord | <haxscramper> In the source code itself?↵(@Rika) |
11:19:36 | FromDiscord | <Rika> no |
11:19:41 | FromDiscord | <Rika> in the nimble file still |
11:19:59 | FromDiscord | <Rika> thats what my interpretation of what leorize said is |
11:20:39 | FromDiscord | <Araq> deps need to remain in the .nimble file |
11:20:52 | * | xet7 quit (Ping timeout: 265 seconds) |
11:20:52 | FromDiscord | <haxscramper> Can you describe workflow in more detail please. I still don't quite follow your idea. Suppose I want to say my package `requires hmisc >= 0.11.35`, how I'm going to do this? |
11:21:13 | FromDiscord | <Rika> i dont get it that much either |
11:21:17 | FromDiscord | <haxscramper> And how `nimble install <my package>` would figure out it also needs to download `hmisc` |
11:21:45 | FromDiscord | <Rika> i assume nimble install would scan your source for imports to hmisc (if its not constrained in the nimble file) |
11:21:54 | FromDiscord | <leorize> yep |
11:22:04 | FromDiscord | <haxscramper> go no, please |
11:22:20 | FromDiscord | <leorize> the idea is that the package to use is a part of the code |
11:22:24 | FromDiscord | <leorize> like it's already in there |
11:22:29 | FromDiscord | <leorize> for versioning you can lock it outside |
11:22:38 | FromDiscord | <Rika> i dont know man, imo `requires "package" # no constraint` should be removed but auto-package install resolution shouldnt be in either |
11:23:00 | FromDiscord | <Rika> i think it would be best if a constraint was required for all packages... |
11:23:35 | FromDiscord | <haxscramper> How I'm going to get `>= 0.11.35` constraint fromt he code that simply says `import hmisc/other/oswrap`? |
11:23:36 | FromDiscord | <leorize> just put it in your .nimble? |
11:23:45 | FromDiscord | <leorize> look, the idea is not that we remove `requires` completely |
11:23:46 | emery | yea, you don't want to have to parse a lot of code to build a dependency graph |
11:24:07 | emery | unless you cache it |
11:24:43 | FromDiscord | <haxscramper> so what I'm getting from your solution? Increased complire complexity with no real gain as I would have to write it in `.nimble` anyway |
11:24:44 | FromDiscord | <haxscramper> but now the dependency list is spread across absolutely every single file |
11:24:44 | FromDiscord | <leorize> you can just import it all in your code, type `nim c` and the compiler generates you a nice `.nimble` with all deps locking information |
11:25:38 | FromDiscord | <leorize> get the latest from the developer |
11:25:38 | FromDiscord | <haxscramper> How it would find the correct version in the first place? For example I have 18 `hmisc` versions installed |
11:25:39 | FromDiscord | <haxscramper> Or even two, it does not matter |
11:25:47 | FromDiscord | <Rika> yes but i dont understand the use case for a non-constrained requires (like i know i use it but its not a great idea isnt it?) |
11:25:52 | FromDiscord | <leorize> you gotta stop constraining your ideas on how nimble is implemented currently |
11:26:12 | * | arkurious joined #nim |
11:26:31 | FromDiscord | <leorize> then you specify it in your .nimble |
11:26:31 | FromDiscord | <haxscramper> Alright, what about `requires >= 0.11.35 < 1.0.0` where "latest from the developer" is 2.0.0 |
11:26:38 | FromDiscord | <leorize> I'm not saying you can't write it yourself |
11:26:43 | FromDiscord | <leorize> I'm saying that the compiler can help you |
11:26:46 | FromDiscord | <haxscramper> I dont' understand why it is necessary to take simple `requires` list and spread it over whole code base |
11:27:24 | FromDiscord | <Rika> because it "reduces the things the user has to do"? |
11:27:31 | FromDiscord | <haxscramper> So what you are saying is that complier can help me to write `.nimble` file in some cases |
11:27:35 | FromDiscord | <haxscramper> Yes, that is true |
11:27:43 | FromDiscord | <Rika> but imo it would be better if `nimble install` added `requires` to the nimlbe file |
11:27:57 | FromDiscord | <Rika> and a constraint as well ideally |
11:27:58 | FromDiscord | <leorize> imo it would be better if you don't even need nimble |
11:28:00 | FromDiscord | <haxscramper> It is possible to write a helper tool that collects all the necessary `requires` |
11:28:12 | FromDiscord | <haxscramper> Delegate package management to compiler? |
11:28:14 | FromDiscord | <Rika> why? you're still going to need to invoke nimble to install the packages |
11:28:17 | FromDiscord | <leorize> yes |
11:28:35 | FromDiscord | <leorize> go does this and it solves everything brilliantly |
11:28:45 | FromDiscord | <haxscramper> why does it have to be a built-in compiler feature, standalone tool works just fine |
11:28:57 | FromDiscord | <haxscramper> dart does not do this and solves everything just fine |
11:29:08 | FromDiscord | <haxscramper> cargo |
11:29:10 | FromDiscord | <leorize> have you used go? |
11:29:15 | FromDiscord | <haxscramper> python |
11:29:45 | emery | either way there is the case of platform conditional imports |
11:29:59 | FromDiscord | <haxscramper> No, and I would assume large portion of the nim user haven't used `go` either |
11:30:20 | emery | so you need a metadata format that can do rich constraints or a scanner that understands `when` |
11:30:20 | FromDiscord | <leorize> you should try, really, to experience how package management is like when its a part of the compiler |
11:30:31 | FromDiscord | <haxscramper> But it is a question of `nim install` vs `nimble install`, the implementation would largely stay the same |
11:30:40 | FromDiscord | <SolitudeSF> none of this can work for now because nimble doesnt enforce that top level import name is the same as module name |
11:31:01 | FromDiscord | <dom96> In reply to @haxscramper "That talk about breaking": Agreed. Nimble isn’t at 1.0 yet. We don’t have to be as strict about breakage. |
11:31:17 | FromDiscord | <haxscramper> Alright, looks like I would also have to install a dozen languages before finising my nimble RFC (go/rust/dart/swift, some other thigns recommended elsewhere) |
11:31:46 | FromDiscord | <Rika> well its a good idea to do so, experiencing the package management of other languages |
11:31:59 | FromDiscord | <haxscramper> But at the same time there is no need to really break anything, at least so far I haven't found anything that would really break things, except for deprcating `version` as proposed above↵(@dom96) |
11:32:14 | FromDiscord | <leorize> `go` is pretty novel in that the package management is built-in |
11:32:28 | FromDiscord | <leorize> look, if you don't try a novel system then you can't understand what the current system lacks |
11:32:30 | FromDiscord | <haxscramper> We only need to get stricter about manifest actually matching project data |
11:32:54 | emery | go is special because the language designers use a monorepo |
11:32:58 | emery | forget go |
11:33:07 | FromDiscord | <haxscramper> Or deprecating things like `version` that are already duplicated in `.git` |
11:33:31 | FromDiscord | <Araq> @leorize I don't want the compiler to do downloads, neither do I like `staticExec` particularly |
11:33:50 | * | xet7 joined #nim |
11:33:56 | FromDiscord | <leorize> you can always outsource it to a importHelper which I have discussed with you before |
11:34:22 | FromDiscord | <leorize> I'm concerned with what should be the package story of Nim |
11:34:27 | FromDiscord | <haxscramper> Or outsorse things to `nimble` |
11:34:56 | FromDiscord | <leorize> one of Nim's motto is "copying bad design is not good design" |
11:35:16 | FromDiscord | <Araq> that never was Nimble's motto though 😛 |
11:35:16 | FromDiscord | <leorize> so I think it's a good thing to do to study other design that deviates from the norm |
11:35:30 | FromDiscord | <haxscramper> Yes, when people agree what is a "bad design" for package managements |
11:35:32 | FromDiscord | <leorize> nimble is in your hands now @Araq ;) |
11:35:39 | FromDiscord | <Rika> i think its a good idea to consider and study it but it is not a guarantee it will get in |
11:35:44 | FromDiscord | <Rika> because you sound like you want it in |
11:35:44 | FromDiscord | <haxscramper> And what is a "good design" |
11:35:44 | FromDiscord | <SolitudeSF> holy shit...↵(@Araq) |
11:36:16 | FromDiscord | <Araq> @leorize I have outlined my vision of Nimble in dozens of RFCs, nothing happens and I'm busy with the compiler too |
11:36:18 | FromDiscord | <leorize> I've discussed this at length before but I would really recommend taking a page from go |
11:36:32 | FromDiscord | <leorize> it's not the end game of package management but it's a step in the right direction |
11:36:59 | FromDiscord | <haxscramper> Alright, I will certainly look into this |
11:37:37 | FromDiscord | <haxscramper> If you have anything specific that you would recommend trying out |
11:38:02 | FromDiscord | <leorize> not much, cargo and npm is pretty much the peak that you can get with an external package manager imo |
11:39:33 | FromDiscord | <leorize> I think the nimble RFC is a good opportunity to develop the packages story of Nim |
11:39:49 | FromDiscord | <leorize> that is, a total rethink of what packages should be and can be |
11:39:57 | FromDiscord | <dom96> Go's packaging story is infamously bad, no? |
11:40:03 | FromDiscord | <dom96> There is dozens of package managers trying to make it work |
11:40:13 | FromDiscord | <zetashift> In reply to @dom96 "Go's packaging story is": They fixed it |
11:40:18 | FromDiscord | <leorize> they solved it all quite some time ago |
11:40:24 | FromDiscord | <leorize> we had this conversation before dom |
11:40:44 | FromDiscord | <zetashift> Except for `go get` which people used "wrong" |
11:40:53 | FromDiscord | <Rika> okay i have no idea why go's packman was "bad" and is now "good" |
11:41:00 | FromDiscord | <Rika> the fuck does it mean for it to be bad and good anyway |
11:41:32 | FromDiscord | <leorize> it was a confusing system at first with many of nimble's current resolution problems |
11:42:19 | FromDiscord | <leorize> then a go core dev figured out a much better and more stable system and its what go implements today |
11:42:36 | FromDiscord | <Araq> like this whole "use the minimum version of a package"? |
11:42:52 | FromDiscord | <leorize> yea, in fact rust is considering adopting it |
11:43:28 | FromDiscord | <Araq> still seems like a terrible idea. the best thing about the idea that can be said "btw, semver is broken" (and indeed it is) |
11:43:30 | FromDiscord | <leorize> though it was blocked because turns out no one actually test their packages with their minimum versions \:) |
11:44:28 | FromDiscord | <leorize> I wouldn't disagree, but a step is better than standing still, right↵(@Araq) |
11:45:08 | FromDiscord | <Araq> I don't see how it's better than simply saying "fu semver" |
11:45:17 | FromDiscord | <leorize> [saem](https://matrix.to/#/@saem:matrix.org) actually have a design where there are no versions, but I'll let him elaborate on it when he wakes up |
11:45:26 | FromDiscord | <dom96> btw regarding the `version` duplication, if you rely on git/hg then you'll always rely on it. The reason `version` is in the metadata is to make it possible for packages to be distributed as simple tarballs. |
11:45:54 | FromDiscord | <Araq> and why should I care about tarballs in 2021? |
11:46:00 | FromDiscord | <leorize> nothing prevents us from adding a `.nimble-version` file for that metadata, or a tarball versioning scheme |
11:46:04 | FromDiscord | <leorize> focus on what people actually use |
11:46:05 | FromDiscord | <dom96> We can decide we don't need this, but that was the reasoning |
11:46:18 | FromDiscord | <Rika> we probably dont need this now |
11:46:29 | FromDiscord | <haxscramper> Make version in nimble secondary and optional, problem solved↵(@dom96) |
11:47:00 | emery | with nix/nixos we want to be able to handle arbitrary packages from language pkg repositories by running the language specific metadata through our package generators, so that you wouldn't actually have to use nimble to install stuff, the native package manager would be capable of doing that for you. it works now for a few nimble packages, but very few |
11:47:45 | FromDiscord | <dom96> In reply to @haxscramper "Make version in nimble": how does making it optional solve the problem? |
11:49:28 | FromDiscord | <haxscramper> If you need tarballs for some reason you can add version, but otherwise it is inferred from git |
11:55:21 | FromDiscord | <haxscramper> https://blog.golang.org/versioning-proposal you were talking about this? |
11:55:40 | FromDiscord | <haxscramper> Also, do you have any links on this subject as well? |
11:57:22 | FromDiscord | <leorize> https://github.com/rust-lang/cargo/issues/5657 |
11:59:38 | * | max22- quit (Ping timeout: 268 seconds) |
12:00:04 | FromDiscord | <leorize> https://research.swtch.com/vgo \<- this is the full proposal iirc |
12:00:12 | FromDiscord | <leorize> some food for thought\: https://github.com/ziglang/zig/issues/943 |
12:00:23 | FromDiscord | <leorize> there are a few novel ideas proposed in there, but it's a bit long |
12:00:37 | FromDiscord | <Araq> btw, to make this clear, "copying bad design is not good design" is a catchy phrase but not very actionable as it's hard and subjective what "bad design" is |
12:01:12 | FromDiscord | <haxscramper> Well "a bit long" does not scare me, considering how much stuff I already have in the to-do list for this RFC |
12:01:34 | FromDiscord | <haxscramper> Would take several days to read through all of that |
12:01:35 | FromDiscord | <leorize> you can also think of it as "is there other designs that might be better than what we are familiar with?" \:)↵(@Araq) |
12:01:48 | emery | https://github.com/Ericson2314/nix-rfcs/blob/plan-dynamism/rfcs/0000-plan-dynanism.md |
12:01:53 | FromDiscord | <Rika> how would we know its better? |
12:02:21 | FromDiscord | <leorize> I said "might" in case you didn't catch it |
12:03:11 | FromDiscord | <Rika> and i said how would we know if its better |
12:03:24 | FromDiscord | <haxscramper> People not ranting about it everywhere would be a good indicator |
12:03:28 | FromDiscord | <leorize> actually try it |
12:03:32 | FromDiscord | <Araq> and I've said it elsewhere, I would look into Java's maven, it works for decades now. |
12:03:40 | FromDiscord | <Rika> and then? |
12:03:41 | FromDiscord | <leorize> learn what they solved and what they didn't |
12:03:52 | FromDiscord | <Rika> if i like it its good if i dont its not like that? |
12:04:00 | FromDiscord | <Rika> okay |
12:04:07 | FromDiscord | <leorize> it's not rocket science |
12:04:07 | FromDiscord | <Rika> i get it now |
12:04:25 | FromDiscord | <Rika> well sorry for being stupid, mr 200 iq leorize |
12:04:31 | FromDiscord | <leorize> if you wanna solve a problem you list out your goals |
12:04:42 | FromDiscord | <leorize> no, I don't think you're arguing in good faith |
12:04:47 | FromDiscord | <Araq> "copy what works so well that nobody talks about it anymore" |
12:04:59 | FromDiscord | <Rika> okay |
12:05:57 | FromDiscord | <Rika> just because i dont understand you'd react like that |
12:05:57 | FromDiscord | <Rika> i see |
12:06:02 | * | supakeen quit (Quit: WeeChat 3.2) |
12:06:26 | FromDiscord | <dom96> Next up: lockfiles. If you think we should pursue vendoring or some other solution, speak now or forever hold your peace 🙂 |
12:06:36 | * | supakeen joined #nim |
12:06:46 | FromDiscord | <haxscramper> we have lockfile RFC |
12:07:09 | FromDiscord | <haxscramper> I haven't looked at it yet, though I'm kind of surprised it took 10k SLOC to implement |
12:07:47 | FromDiscord | <haxscramper> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/860129303416406018): we have lockfile PR |
12:08:27 | FromDiscord | <dom96> In reply to @haxscramper "I haven't looked at": Yeah… same. It implements many many things |
12:10:14 | FromDiscord | <dom96> 1k SLOC should be more than enough |
12:10:39 | fn | <ForumUpdaterBot99> New thread by Mildred: Use cstring for C binding, see https://forum.nim-lang.org/t/8179 |
13:00:18 | FromDiscord | <Alexander Ivanov> @dom96\: [haxscramper](https://matrix.to/#/@haxscramper:matrix.org) a huge amount of test loc, also a lot of helpers/utils loc |
13:20:30 | FromDiscord | <kaushalmodi> How is LOC important if the PR does the thing. |
13:20:58 | FromDiscord | <dom96> because we have to maintain it |
13:21:34 | FromDiscord | <kaushalmodi> But having such large contributions stalled for a long time are demotivating. |
13:21:51 | FromDiscord | <haxscramper> we also have to review it |
13:21:58 | FromDiscord | <dom96> that too |
13:22:01 | FromDiscord | <haxscramper> https://github.com/nim-lang/nimble/blob/e2a0c954f0058b22f6935aceb0990cad437255a4/src/nimblepkg/asynctools/asyncproc.nim it also implements things like this |
13:22:11 | FromDiscord | <haxscramper> for async interaction with processes |
13:22:12 | FromDiscord | <dom96> that's a copy of asynctools and shouldn't be there |
13:22:22 | FromDiscord | <dom96> I have a draft comment about it |
13:22:51 | FromDiscord | <haxscramper> alright, so it uses status packages internally? |
13:23:01 | FromDiscord | <dom96> that's not a Status package |
13:23:06 | FromDiscord | <haxscramper> ah |
13:23:37 | FromDiscord | <haxscramper> https://github.com/cheatfate/asynctools this? |
13:23:39 | fn | <R2D299> itHub: 7"Various asynchronous tools for Nim language" |
13:23:47 | FromDiscord | <dom96> I blame GitHub to a certain extent here (stacked PRs aren't a thing), but also large PRs are something we should be discouraging |
13:23:55 | FromDiscord | <dom96> In reply to @haxscramper "https://github.com/cheatfate/asynctools this?": yep |
13:23:56 | fn | <R2D299> itHub: 7"Various asynchronous tools for Nim language" |
13:24:04 | FromDiscord | <dom96> Who owns R2D2? |
13:25:34 | FromDiscord | <exelotl> yeah, a 10k line commit where 1k lines should have done the job, should rightfully be met with caution and criticism |
13:25:58 | fn | <leth99> I have a macro that expects a string, but I want to call it from within another macro but with a statment that should evaluate to a string, what's the best way to deal with the evaluation of that statment? |
13:25:59 | * | max22- joined #nim |
13:26:29 | FromDiscord | <exelotl> usually when you have a macro calling a macro what you really want is a macro calling a proc that returns NimNode |
13:26:47 | FromDiscord | <kaushalmodi> > I blame GitHub to a certain extent here (stacked PRs aren't a thing)↵I have submitted PR's where PR 2 is based off my PR 1 and so on and I ask the dev to merge them in order. |
13:27:05 | FromDiscord | <dom96> In reply to @kaushalmodi "> I blame GitHub": yeah, that is a workaround and I tried to ask the author to do this but they declined |
13:27:18 | fn | <leth99> exelotl: so i should implement a proc that calls the macro and handles the evaluation at compiletime? |
13:27:28 | FromDiscord | <dom96> now we have a PR that implements lock files, parallel downloads of packages and god knows what else |
13:27:41 | FromDiscord | <kaushalmodi> That's unfortunate 😦 |
13:27:45 | fn | <leth99> (both macros needs to be macros and can be called indepently) |
13:29:12 | FromDiscord | <exelotl> ohh I get you |
13:29:35 | FromDiscord | <exelotl> maybe you could make the first macro take a `static[string]` |
13:30:05 | FromDiscord | <exelotl> this will cause the argument to be evaluated at compile time and passed into the macro as a value, rather than as NimNode |
13:30:48 | FromDiscord | <Rika> In reply to @dom96 "yeah, that is a": did they say why they declined? |
13:31:02 | fn | <leth99> oh, yeah that could work, and is very simple nice. |
13:31:05 | fn | <leth99> thanks |
13:31:25 | FromDiscord | <exelotl> np :) |
13:31:52 | FromDiscord | <dom96> In reply to @Rika "did they say why": actually it was zahary that pushed back, nothing from the author regarding this :/ |
13:32:00 | FromDiscord | <Rika> oh i see |
13:32:07 | FromDiscord | <Rika> ill take a look at the thread |
13:33:00 | FromDiscord | <Rika> what the heck, it also requires a custom nim... |
13:33:46 | FromDiscord | <Rika> this is a lot to go through |
13:34:02 | FromDiscord | <Rika> where's the comment regarding zahary? |
13:34:19 | FromDiscord | <dom96> it's in our telegram |
13:35:46 | fn | <leth99> wait what? .. required type ..: static[string] but .. is of type string |
13:36:15 | * | rockcavera joined #nim |
13:36:16 | * | rockcavera quit (Changing host) |
13:36:16 | * | rockcavera joined #nim |
13:36:46 | fn | <Prestige99> is the string value available at compile time? |
13:37:27 | fn | <leth99> oh, no.. I have to rethink this. |
13:43:14 | * | max22- quit (Ping timeout: 268 seconds) |
13:47:29 | FromDiscord | <exelotl> leth: maybe you need a shared helper function? https://play.nim-lang.org/#ix=3rEl |
14:02:23 | * | max22- joined #nim |
14:10:16 | * | rockcavera quit (Remote host closed the connection) |
14:14:44 | * | maxime_ joined #nim |
14:15:49 | * | max22- quit (Ping timeout: 246 seconds) |
14:41:37 | FromDiscord | <saem> This is very ambitious and so I get if folks are reluctant. |
14:42:13 | FromDiscord | <haxscramper> As for API inference/change detection - I want(ed) to implement this for `haxdoc` in for of documentable entry database. So far the idea works really nice |
14:42:36 | FromDiscord | <haxscramper> For implementation I wanted to throw in https://github.com/GumTreeDiff/gumtree and make it operate on semchecked AST |
14:42:39 | fn | <R2D299> itHub: 7"A neat code differencing tool" |
14:42:55 | FromDiscord | <haxscramper> So I can ask questions - for this function, does it behave differently? |
14:43:10 | FromDiscord | <haxscramper> And it would do semantic-aware diff |
14:43:30 | FromDiscord | <haxscramper> But the implementation is simple. Well, tree diff is not particularly simple, but that's just an algorithm |
14:44:03 | FromDiscord | <saem> Nice things are nice, and leveraging the deep work the compiler does rather than inventing fancy programmatic curl/wget orchestration seems better. But I'm weird. |
14:44:16 | FromDiscord | <haxscramper> haxdoc already can infer API for a package and conveniently present it to you in XML/SQLite |
14:45:02 | FromDiscord | <haxscramper> Yes, it looks really nice, though it would rely on different fuzzy methods to determine which actual revision to download, so |
14:45:09 | FromDiscord | <haxscramper> Also tree diff is slow |
14:46:02 | FromDiscord | <haxscramper> IIRC tree edit script has proven quadratic lower bound for tree size, and mapping implementation is also nonlinear |
14:46:11 | FromDiscord | <saem> The compiler doesn't even have to do the solving, that could be cli callbacks for the cave person approach or a default implementation as a plugin (plus some extra stuff). Said plugin could be replaced. |
14:46:50 | FromDiscord | <dom96> hm, is this like Elixir's API change detection? |
14:47:33 | FromDiscord | <saem> But it doesn't have to, it can use very naive initial algorithm and not provide anymore, ever. But the data is there for extension and more fancy solving. |
14:48:26 | FromDiscord | <haxscramper> Correction - tree mapping is cubic for add/delete/edit operations and NP-hard if you include `move` |
14:48:44 | FromDiscord | <haxscramper> The best known algorithm\ |
14:52:53 | PMunch | How can I see this message? https://github.com/PMunch/gtkgenui/blob/master/gtkgenui/gtkgenui.nim#L169 |
14:54:31 | FromDiscord | <saem> I don't know elixir's package management story that well. |
14:55:56 | FromDiscord | <saem> Solutions can be memoized. |
14:57:07 | FromDiscord | <saem> It's effectively what a lock file crudely does. |
14:59:16 | fn | <ForumUpdaterBot99> New thread by Miran: This Month with Nim: June 2021, see https://forum.nim-lang.org/t/8180 |
15:01:35 | FromDiscord | <saem> An order collection of these can be ways to calculate and share chunks of solutions. |
15:01:35 | FromDiscord | <saem> The ordered application forms a new complete answer, a lock file if you will |
15:01:35 | FromDiscord | <haxscramper> Cps article, nice |
15:01:36 | FromDiscord | <leorize> cps 0.1.0 is out and if you're looking to try it out, now is the time \:) |
15:02:57 | FromDiscord | <dom96> oooh |
15:03:51 | FromDiscord | <dom96> In reply to @saem "I don't know elixir's": it can basically detect when an API changes without a major version bump, thus enforcing semver |
15:05:51 | FromDiscord | <saem> For a far less ambitious solution I would start with being able to specify dependencies in a manifest that supports a build matrix. A build matrix is effectively a big ol Cartesian product of a bunch of dimensions the vast majority known ahead of time and results in an occasionally sparse matrix. See\: https://250bpm.com/blog:91/ and the associated js library. |
15:06:33 | FromDiscord | <haxscramper> And then we get awkward semver questions like "does removing a single proc" qualify as a breaking change by semver |
15:06:33 | FromDiscord | <leorize> it does |
15:06:56 | FromDiscord | <leorize> frankly in nim even adding a proc can be a breaking change |
15:07:29 | FromDiscord | <dom96> yeah, that's the more awkward question |
15:07:35 | FromDiscord | <haxscramper> Well, i present you hmisc 9000 then |
15:07:35 | FromDiscord | <saem> You don't, because of you don't use that part of the API does it matter? |
15:07:36 | FromDiscord | <saem> You don't, because if you don't use that part of the API does it matter? |
15:08:24 | FromDiscord | <saem> And to leorize's point, this detects break by introduction. |
15:08:24 | FromDiscord | <haxscramper> Full support for this feature would require nkError |
15:08:32 | FromDiscord | <haxscramper> To check all define branches and absolutely all the code |
15:08:54 | FromDiscord | <saem> The answer is no, because you never observed a behavior change because there is no before to speak of, nor is there an after because it's still not being used. Until it is. |
15:09:03 | FromDiscord | <haxscramper> Also checking for DSL breaking changes is probably too hard |
15:09:12 | FromDiscord | <saem> Why? |
15:09:54 | FromDiscord | <haxscramper> Well, it would require proving that arbitrary code behaves differently |
15:09:59 | FromDiscord | <haxscramper> Not just bugfix that is a patch under semver |
15:10:00 | FromDiscord | <haxscramper> But a real breaking change |
15:10:43 | FromDiscord | <saem> Oh you mean an untyped block to a macro and it having fun? |
15:10:43 | FromDiscord | <haxscramper> Yes |
15:11:14 | FromDiscord | <haxscramper> Well, even typed one. Especially typed one, as it has access to even more data |
15:11:50 | FromDiscord | <haxscramper> Like "this test worked this way, bot it works differently" |
15:11:51 | FromDiscord | <haxscramper> You can store old ast-ast mapping for a macro, and a new one pair and then compare things |
15:11:52 | FromDiscord | <saem> The prices of macros, really wish there was a magic wand for those. |
15:11:54 | FromDiscord | <haxscramper> And leaving end user to decide |
15:13:31 | FromDiscord | <saem> Macros force things into a test (some sort of run) scenario, yes. |
15:13:32 | FromDiscord | <haxscramper> As long as we can ask questions politely I think it is fine to ask the user from time to time |
15:13:37 | FromDiscord | <saem> Totally agree, I mean in all fairness, they made the mess. ;) |
15:13:51 | FromDiscord | <haxscramper> Yes. If packed AST can store original + new pair it would be extremely easy to implement |
15:14:06 | FromDiscord | <saem> Nice things are nice. |
15:15:18 | fn | <ForumUpdaterBot99> New thread by Ranedk: Setting up Nim Dev environment in Visual Studio on M1 Mac (with macOS Big Sur), see https://forum.nim-lang.org/t/8181 |
15:15:35 | FromDiscord | <haxscramper> hard to argue with that |
15:22:49 | FromDiscord | <dom96> So I have tomorrow free, eager to do some Nim dev, what should I work on? |
15:24:13 | FromDiscord | <saem> Not having to invent a bunch of stuff in the side with it's own problems, the biggest of all being an impedance mismatch, sure is nice. |
15:27:23 | FromDiscord | <vindaar> review the big nimble PR? |
15:29:06 | FromDiscord | <dom96> Apart from that, already set up a time with Araq to do that |
15:34:18 | FromDiscord | <kaushalmodi> In reply to @dom96 "So I have tomorrow": Please fix choosenim devel --latest. I need to port all my Travis CI jobs to GitHub Actions, and I like to test on both devel and stable. Having choosenim work once again for devel installs would be awesome. |
15:35:58 | FromDiscord | <dom96> Cool, that's on my radar. That said, I don't think you need it for GitHub Actions. Choosenim can download nightlies and they work just fine AFAIK |
15:36:21 | FromDiscord | <dom96> Also if you use `--latest` you'll end up waiting much longer for your CI to finish |
15:37:00 | FromDiscord | <dom96> (it's also generally a bad idea to tests against devel, any breakage there will make your CI flaky) |
15:37:36 | FromDiscord | <vindaar> @kaushalmodi\: feel free to use https://github.com/alaviss/setup-nim instead of `choosenim` |
15:37:38 | fn | <R2D299> itHub: 7"CI helpers to setup Nim using prebuilt nightlies" |
15:37:55 | FromDiscord | <kaushalmodi> In reply to @dom96 "Cool, that's on my": Last time I checked, choosenim devel installed very old binaries. |
15:38:28 | FromDiscord | <kaushalmodi> In reply to @vindaar "<@851561419848679434>\: feel free to": I did take a look at it but it looked overly complicated.. depends on multiple yml files, a shell script, etc. |
15:38:46 | FromDiscord | <leorize> the issue is that devel doesn't test all packages, so naturally packages test devel instead↵(@dom96) |
15:39:28 | FromDiscord | <kaushalmodi> @Vindaar hmm.. or may be I shouldn't be worrying about that 🙂 |
15:39:55 | FromDiscord | <dom96> I'm using this one: https://github.com/iffy/install-nim. Works well so far. |
15:39:56 | FromDiscord | <saem> Fixing choosenim so it has an actually working nim-gdb setup would also be good. |
15:40:16 | FromDiscord | <kaushalmodi> > (it's also generally a bad idea to tests against devel, any breakage there will make your CI flaky)↵I have found that useful as I have made quite some bug reports based on my stuff breaking on devel |
15:41:35 | FromDiscord | <kaushalmodi> Also, I use nim devel build as my daily driver locally. So devel testing is more for my stuff still working locally. The stable checks is in case anyone is building my libs on stable. |
15:41:35 | FromDiscord | <dom96> Interesting, do you push Nim to the limits? 🙂 |
15:41:36 | FromDiscord | <haxscramper> In reply to @dom96 "Apart from that, already": When do you plan to do this? |
15:41:38 | FromDiscord | <dom96> (edit) "the" => "its" |
15:41:59 | FromDiscord | <dom96> In reply to @haxscramper "When do you plan": tomorrow morning |
15:42:01 | FromDiscord | <kaushalmodi> In reply to @dom96 "Interesting, do you push": I do push Nimscript to the limits |
15:42:13 | FromDiscord | <dom96> In reply to @haxscramper "When do you plan": you wanna join? 🙂 |
15:42:17 | FromDiscord | <kaushalmodi> Also I use C FFI heavily |
15:42:22 | FromDiscord | <dom96> (assuming Araq is cool with it) |
15:43:14 | FromDiscord | <haxscramper> In reply to @dom96 "you wanna join? 🙂": no, I just wanted to know apporximate time |
15:43:14 | FromDiscord | <vindaar> what does that even mean?↵(@dom96) |
15:43:41 | FromDiscord | <kaushalmodi> @dom96 See the issues caught by my Travis CI on devel -> https://github.com/nim-lang/Nim/issues?q=is%3Aissue+author%3Akaushalmodi+travis |
15:43:43 | FromDiscord | <dom96> @kaushalmodi I would suggest setting up a cron to build against devel then. That way you can split the things you're testing which will make your CI more reliable |
15:43:59 | FromDiscord | <kaushalmodi> @dom96 Yes, that's what I was doing on Travis.. cron |
15:44:00 | FromDiscord | <dom96> but yes, you will still need choosenim to work |
15:44:05 | FromDiscord | <dom96> ahh cool |
15:44:06 | FromDiscord | <kaushalmodi> I'll set up the same crons on GHA |
15:44:20 | FromDiscord | <dom96> I see far too many people setting up a CI on every commit in their repo against devel 🙂 |
15:44:26 | FromDiscord | <haxscramper> I planned to look into this PR at some point before publishing RFC, but mostly to be informed about it's current state, what it does exactly and so on. |
15:46:33 | FromDiscord | <dom96> we'll likely comment in the PR with a summary so you can see what our thoughts are |
15:52:36 | FromDiscord | <kaushalmodi> @Vindaar @leorize Thanks! for `alaviss/setup-nim` GHA. It Just Worked (TM) |
15:52:46 | * | maxime_ quit (Ping timeout: 246 seconds) |
15:55:44 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rF2 |
15:55:55 | FromDiscord | <haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rF3 |
15:57:13 | FromDiscord | <dom96> In reply to @saem "Fixing choosenim so it": Where does nim-gdb reside in Nim's release? (Looks like the issue for this is https://github.com/dom96/choosenim/issues/247 for my own future reference) |
15:58:57 | FromDiscord | <dom96> In reply to @haxscramper "What does `Failure: reNimcCrash`": guessing the compiler crashed? |
15:59:42 | FromDiscord | <haxscramper> On `echo "assert 42 == 42"`? |
16:00:11 | FromDiscord | <haxscramper> I can run compilation just fine manually, and running command `/home/test/.nimble/bin/nim c --hints:on -d:testing ...` also works |
16:00:32 | FromDiscord | <haxscramper> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/860187921080647702): On `assert 42 == 42`? |
16:11:41 | fn | <leth99> what does 'Error: typechecked nodes may not be modified' mean? |
16:16:40 | fn | <leth99> hmm.. can generate a new statment list i guess. |
16:20:56 | fn | <leth99> no i couldn't, then it complained when i did copyChildrenTo instead. |
16:21:27 | fn | <leth99> hmm.. why is it even typechecked? when would it be typechecked? |
16:38:21 | fn | <leth99> sorry about that, was a bit confused by the compiler output. |
16:52:50 | * | max22- joined #nim |
17:09:29 | FromDiscord | <Jasmine and Don't Forget!~> Hey! I'm having some issues with nim in vscode, the extension keeps on eating a lot of memory and cpu |
17:10:16 | FromDiscord | <Jasmine and Don't Forget!~> Thank you to anyone who wants to help, also I'm really liking nim otherwise. How's everyone doing today? |
17:10:36 | FromDiscord | <SolitudeSF> thats a feature, unused cpu/memory is wasted |
17:11:40 | FromDiscord | <Jasmine and Don't Forget!~> Ah yes, truly efficient |
17:12:19 | FromDiscord | <Jasmine and Don't Forget!~> I'm using nim with godot and it's very nice |
17:13:14 | FromDiscord | <Bung> what vscode plugin you use? |
17:13:56 | FromDiscord | <Jasmine and Don't Forget!~> Just the nim one |
17:14:52 | FromDiscord | <SolitudeSF> there are 3 nim ones |
17:15:08 | FromDiscord | <Jasmine and Don't Forget!~> https://media.discordapp.net/attachments/371759389889003532/860206903119052860/Screen.png |
17:15:27 | FromDiscord | <Jasmine and Don't Forget!~> I use vscodium and this is the only one I can see |
17:16:07 | FromDiscord | <Rika> saem's is the most maintained one |
17:16:58 | FromDiscord | <Jasmine and Don't Forget!~> Well, it seems to have stopped a little |
17:17:11 | FromDiscord | <Jasmine and Don't Forget!~> it was just a bunch of "nim checker" or something |
17:19:13 | FromDiscord | <Jasmine and Don't Forget!~> in the task manager |
17:19:32 | FromDiscord | <exelotl> this is a known issue, it's a problem with Nimsuggest which is used by all the Nim editor extensions |
17:21:03 | FromDiscord | <Jasmine and Don't Forget!~> Thank you, whenever I was using it my monitors would freak out and stuff |
17:21:11 | FromDiscord | <Jasmine and Don't Forget!~> I had to reset my computer multiple times |
17:21:29 | FromDiscord | <Jasmine and Don't Forget!~> But like, I like nim a lot |
17:21:35 | FromDiscord | <exelotl> I think it's on the roadmap to fix it this year after Nim 1.6 comes out |
17:21:36 | FromDiscord | <Jasmine and Don't Forget!~> so I just powered through it |
17:21:42 | FromDiscord | <Jasmine and Don't Forget!~> Awesome |
17:23:27 | FromDiscord | <Jasmine and Don't Forget!~> I was looking up nim videos on youtube because I do that sometimes when I get obsessed with something, and one of the videos was this old guy saying how nim is only for nerds and if you want money got for python |
17:23:38 | FromDiscord | <Jasmine and Don't Forget!~> (edit) "got" => "go" |
17:23:54 | FromDiscord | <Rika> well thats true, if you want money you do whatever is the biggest thing |
17:24:42 | FromDiscord | <Jasmine and Don't Forget!~> Yeah, but he said it would never take off |
17:24:44 | FromDiscord | <Rika> if you're not a nerd then i assume you're not a good programmer though... |
17:24:51 | FromDiscord | <Rika> well who do you believe |
17:25:02 | FromDiscord | <dom96> Nim has already taken off |
17:25:03 | FromDiscord | <Rika> would you some rando in youtube |
17:25:04 | FromDiscord | <Jasmine and Don't Forget!~> but like, people said python would never take off, I'm sure |
17:25:07 | FromDiscord | <Rika> would you believe some rando |
17:25:12 | FromDiscord | <Jasmine and Don't Forget!~> No, I love nim a lot |
17:25:12 | FromDiscord | <Rika> yes |
17:25:14 | FromDiscord | <dom96> You're here aren't you? |
17:25:14 | FromDiscord | <Rika> they did say that |
17:25:23 | FromDiscord | <Jasmine and Don't Forget!~> it's probably my favorite language |
17:25:23 | FromDiscord | <dom96> that's all Nim needs |
17:25:41 | FromDiscord | <Jasmine and Don't Forget!~> Wooooow, the real programming the friends we made along the way |
17:25:44 | FromDiscord | <Jasmine and Don't Forget!~> Lmao |
17:26:01 | FromDiscord | <Rika> no one can really tell what takes off or not |
17:26:14 | FromDiscord | <Rika> so why even bother listening to some fuck who says which takes off or not |
17:26:30 | * | rockcavera joined #nim |
17:26:30 | * | rockcavera quit (Changing host) |
17:26:30 | * | rockcavera joined #nim |
17:26:32 | FromDiscord | <saem> @Jasmine and Don't Forget!~\: oh there is a project setting you can apply that should fix the issue in many cases or at least mitigate it. |
17:26:38 | FromDiscord | <Jasmine and Don't Forget!~> Oh no! an F word! And yeah, he was a real dick |
17:26:42 | FromDiscord | <Jasmine and Don't Forget!~> Awesome, what is it? |
17:27:00 | FromDiscord | <dom96> just disable auto completion, that's what I do |
17:27:21 | FromDiscord | <saem> Do you only ever build a single main/project nim file for your actual compilation of your game (assuming due to godot)? |
17:27:24 | FromDiscord | <saem> If that's the case, list the file(s) in the config as described in this section under `project`\: https://github.com/saem/vscode-nim#options |
17:27:25 | FromDiscord | <saem> Once you do that it'll only start one nimsuggest process per project file rather than per nim file. |
17:27:27 | fn | <R2D299> itHub: 7"<No Description>" |
17:27:28 | FromDiscord | <dom96> can someone please write a LSP wrapper around nimsuggest that doesn't melt the CPU? or do I need another project I don't have the time to maintain 😛 |
17:28:25 | FromDiscord | <konsumlamm> if nimsuggest is the problem, writing a wrapper around it probably won't solve anything |
17:29:01 | FromDiscord | <leorize> nimsuggest is the problem, and the only fix is to have Araw finishes IC |
17:29:02 | FromDiscord | <Bung> saem yours is one suggest instance per file ? |
17:29:03 | FromDiscord | <dom96> it will solve the CPU melting problem |
17:29:08 | FromDiscord | <leorize> Araq\ |
17:29:11 | FromDiscord | <haxscramper> In reply to @dom96 "Nim has already taken": If I had better data visualization skills I would be spamming the commit chart in all discussions like this |
17:29:23 | FromDiscord | <Jasmine and Don't Forget!~> lmao |
17:29:29 | FromDiscord | <Jasmine and Don't Forget!~> I found my programmer friends, hi |
17:29:45 | fn | <ForumUpdaterBot99> New thread by Argl: Bit of a rough experience registering to the forum, see https://forum.nim-lang.org/t/8182 |
17:30:07 | FromDiscord | <Jasmine and Don't Forget!~> But yeah, I'm using nim in godot, so I have to build a lot |
17:30:24 | FromDiscord | <Bung> I only face this problem when I open `moe` project |
17:30:25 | FromDiscord | <dom96> here is a chart for you: https://media.discordapp.net/attachments/371759389889003532/860210749099081768/unknown.png |
17:30:33 | FromDiscord | <dom96> Active Choosenim users |
17:30:49 | FromDiscord | <dom96> in the last year |
17:30:51 | FromDiscord | <haxscramper> And absolute numbers are? |
17:31:00 | FromDiscord | <dom96> That's a secret 😛 |
17:31:02 | FromDiscord | <konsumlamm> 2020/2021? |
17:31:19 | FromDiscord | <dom96> yep, actually it's Jan 2020 till today |
17:31:28 | FromDiscord | <Jasmine and Don't Forget!~> and I can't turn off linting because it legitimately took me all night to figure out how to even make a guy move. I can do it in 3 minutes in gdscript, my brain is just mush I guess |
17:32:00 | FromDiscord | <Jasmine and Don't Forget!~> But I really like nim because of how fast it is for godot |
17:32:56 | FromDiscord | <matf> 👋 what are my options for testing procs that return void? My oop brain is a little busted atm. Say I'm outputting to a terminal, normally I'd make that an interface and have a test where I capture what was sent to the terminal rather than using the _actual_ terminal implementation. |
17:33:09 | FromDiscord | <Bung> have you tried mine https://github.com/bung87/vscode-nim-lsp |
17:33:10 | fn | <R2D299> itHub: 7"vscode nim extension using LSP server write in nim" |
17:34:16 | FromDiscord | <matf> (edit) "👋 what are my options for testing procs that return void? My oop brain is a little busted atm. Say I'm outputting to a terminal, normally I'd make that an interface and have a test where I capture what was sent to the terminal rather than using the _actual_ terminal implementation. ... " added " But struggling to get something equivalent in Nim. have a terminal that is an anonymouns function of `string -> void` I guess?" |
17:34:27 | FromDiscord | <haxscramper> In reply to @matf "👋 what are my": You can pass a logger object to the procedure instead of `echo` for data. |
17:34:39 | FromDiscord | <haxscramper> So basically add layer of indirection that allows you to inject tests |
17:34:47 | FromDiscord | <haxscramper> Or use `testament`, it can check for stdout |
17:34:51 | FromDiscord | <exelotl> after goodboy I might make a 3D game, in which case Godot with Nim will be a strong contender |
17:35:00 | FromDiscord | <matf> @haxscramper in my actual use case it's not writing to the terminal, it was just for an example. |
17:35:19 | FromDiscord | <matf> (edit) "@haxscramper in my actual use case it's not writing to the terminal, it was just for an example. ... " added " So not looking for an approach that _only_ works for stdout" |
17:35:40 | FromDiscord | <haxscramper> Then you need layer of indirection in the form interface proc/object that gets written into |
17:35:46 | FromDiscord | <haxscramper> that you write data to |
17:35:49 | FromDiscord | <dom96> In reply to @exelotl "after goodboy I might": when's that kickstarter launching? I'm planning to buy a cartridge if I can 🙂 |
17:36:37 | FromDiscord | <exelotl> still don't know the exact date but we're really close |
17:36:49 | FromDiscord | <zetashift> In reply to @exelotl "after goodboy I might": I implemented stickies btw so hopefully that announcement will get stickied on the forum ;P |
17:37:02 | FromDiscord | <exelotl> woah thanks haha |
17:37:19 | FromDiscord | <dom96> guess I should add deploying new forum to my list of todos for this weekend |
17:37:28 | FromDiscord | <zetashift> should probably thank jyapayne and dom96 for all their help |
17:37:40 | FromDiscord | <matf> @haxscramper yeah I'm struggling with the proc/object that gets written to. Looking for an example. I can see how to do this with a uhhhhh what I would call a record of functions in haskell (an interface by another name) but making an object of functions does _not_ feel like the right approach. |
17:37:40 | FromDiscord | <Jasmine and Don't Forget!~> Sorry, my pc crashed https://media.discordapp.net/attachments/371759389889003532/860212573026517022/nimsuggest.png |
17:37:47 | FromDiscord | <Jasmine and Don't Forget!~> got these screenshots, though |
17:37:47 | FromDiscord | <dom96> In reply to @zetashift "should probably thank jyapayne": thank you! I'm really happy we're getting forum contributions |
17:37:54 | FromDiscord | <Jasmine and Don't Forget!~> https://media.discordapp.net/attachments/371759389889003532/860212629808218142/nimSuggest.png |
17:37:55 | FromDiscord | <matf> (edit) "approach." => "approach in Nim." |
17:37:55 | FromDiscord | <dom96> just wish I set it up to make deployments easier |
17:38:00 | FromDiscord | <Jasmine and Don't Forget!~> I have 10 gigs, btw |
17:38:12 | FromDiscord | <dom96> but that was before I learned the tricks I know now 🙂 |
17:38:29 | FromDiscord | <exelotl> wooww you you definitely want to set the `project` setting like saem suggested |
17:38:39 | FromDiscord | <exelotl> (edit) "you" => "yeah" |
17:38:52 | FromDiscord | <Bung> @Jasmine and Don't Forget!~ I suggest try mime extension |
17:38:55 | FromDiscord | <zetashift> In reply to @dom96 "thank you! I'm really": the code is very easy to get into, I don't even know anything about backends and I was able to get some stuff in, I'm really busy now with preparing for a new job, I'm hoping to look at some issues whenever I can |
17:39:03 | FromDiscord | <haxscramper> In reply to @matf "<@!608382355454951435> yeah I'm struggling": You can pass a callback proc, just `cb: proc(a: string)` |
17:39:20 | FromDiscord | <zetashift> In reply to @Bung "<@!460666142017454080> I suggest": I use your nimlsp fork for neovim btw, great stuff! |
17:39:24 | FromDiscord | <haxscramper> And closure can modify environment variables, so |
17:39:39 | * | vsantana joined #nim |
17:40:05 | FromDiscord | <dom96> In reply to @exelotl "wooww yeah you definitely": if these are the recommended settings why aren't they default? |
17:40:37 | FromDiscord | <Bung> @zetashift yeah, that one create two years ago, it was created after I use original nimlsp that extesnion crash again and again |
17:40:47 | FromDiscord | <exelotl> well you need to tell it what your project file is, it can't figure it out by default |
17:41:33 | FromDiscord | <zetashift> In reply to @Bung "<@77574388035100672> yeah, that one": yeah it crashes a lot for me too, but troubleshooting it is hard |
17:41:47 | FromDiscord | <exelotl> (edit) "default" => "itself" |
17:42:43 | FromDiscord | <Bung> yes, it's hard , someing related to compiler some releated to suggest that not easy be fixed. |
17:42:49 | FromDiscord | <Jasmine and Don't Forget!~> Okay, I just turned off nimsuggest all togetehr |
17:42:52 | FromDiscord | <Jasmine and Don't Forget!~> (edit) "togetehr" => "together" |
17:43:12 | FromDiscord | <Jasmine and Don't Forget!~> That was awful, lmao |
17:43:27 | FromDiscord | <Jasmine and Don't Forget!~> after fighting with my computer because opening vs code made it sputter |
17:44:13 | FromDiscord | <dom96> Yeah, I just disable it in whatever extension's settings I am using |
17:44:42 | FromDiscord | <dom96> A simple search-based autocomplete works good enough most of the time |
17:46:21 | FromDiscord | <Bung> that's true, it works that dont need nim file can be successful compiled |
17:46:38 | fn | <leth99> syntax highlighting is pretty nice though. |
17:47:10 | fn | <Prestige99> I need to figure out why messages from discord are bold over the bridge 🤔 |
17:47:16 | FromDiscord | <Bung> all vscode for nim syntax highlight is done by client side |
17:48:25 | FromDiscord | <Bung> well, it will not work if lsp server crash many times, vscode will disable it automatically. |
17:48:52 | FromDiscord | <dom96> FromDiscord bolds them I think |
17:51:04 | FromDiscord | <timotheecour> In reply to @dom96 "So I have tomorrow": can you please review the 4 PRs i sent in (httpbeast, and jesteR) |
17:51:16 | FromDiscord | <timotheecour> (edit) "jesteR)" => "jester)" |
17:51:22 | FromDiscord | <dom96> yep, will do |
17:51:27 | FromDiscord | <timotheecour> thx! |
17:54:34 | FromDiscord | <Jasmine and Don't Forget!~> does nim have anything like rust's --doc generation? |
17:55:11 | FromDiscord | <timotheecour> nim doc |
17:55:13 | FromDiscord | <dom96> @timotheecour out of curiosity, are you using these for any of your own projects? |
17:55:19 | FromDiscord | <timotheecour> ya |
17:56:24 | FromDiscord | <timotheecour> (edit) "ya" => "ya, not a YAGNI" |
17:56:24 | FromDiscord | <dom96> cool, anything open source or that you're willing to share more info about? |
17:56:45 | FromDiscord | <timotheecour> not at this point 🙂 |
17:57:22 | FromDiscord | <matf> @haxscramper digging around the standard library it looks like the record of functions approach is used too https://github.com/nim-lang/Nim/blob/6e0fe965da87821f659d5c064dea8deaba8db85f/lib/pure/streams.nim#L103 |
17:58:18 | FromDiscord | <timotheecour> is there any reason `{.inline.}` is used in sigmatch? seems like sigmatch should ignore it |
18:29:55 | fn | <ForumUpdaterBot99> New thread by Jaybill: Sega Genesis, see https://forum.nim-lang.org/t/8183 |
18:48:54 | FromDiscord | <matf> I think I figured out what I was looking for with interfaces. Any down side to using this approach? Basically what I would call a record of functions in haskell-land (which is equivalent to an interface): https://gist.github.com/matfournier/65247e627b1a7cdf77e74d655b698d09 |
18:50:31 | FromDiscord | <matf> sent a code paste, see https://play.nim-lang.org/#ix=3rGh |
18:51:02 | FromDiscord | <matf> sent a code paste, see https://play.nim-lang.org/#ix=3rGi |
18:52:08 | FromDiscord | <matf> (edit) "https://play.nim-lang.org/#ix=3rGi" => "https://play.nim-lang.org/#ix=3rGj" |
18:52:55 | FromDiscord | <haxscramper> yeah, that would work just fine |
18:54:37 | FromDiscord | <matf> Though it's definitely not compile time safe. I.e. if you forget to implement one of the procs, it compiles but explodes at runtime as far as I can tell |
18:57:20 | FromDiscord | <saem> OMG, a wrapper will do no such thing as solve the melting problem. |
19:00:42 | FromDiscord | <mratsim> In reply to @Jasmine and Don't Forget!~ "Okay, I just turned": welcome to the club |
19:01:26 | FromDiscord | <saem> @Jasmine and Don't Forget!~\: if you're using saem/vscode-nim that's the one I maintain. Usually the issue is that unless you set the project setting there really is no good way to figure out what the main/project file is so it opens one nimsuggest process per nim file. Once you set that setting to whatever file(s) are the ones you actually compile to run your program it doesn't fire up as many nimsuggest processes and things work for the mo |
19:02:22 | FromDiscord | <saem> I used it personally on the compiler code base and things work pretty well -- and the issues are squarely with nimsuggest which improves especially if you use devel, I find. |
19:02:53 | FromDiscord | <Jasmine and Don't Forget!~> Yeah, it was just really spooky trying to build something for godot and my pc says that it's out of memory |
19:03:10 | FromDiscord | <Jasmine and Don't Forget!~> I thought it might have been a godot issue |
19:03:18 | FromDiscord | <Jasmine and Don't Forget!~> but for the most part it's working fine now |
19:03:43 | FromDiscord | <saem> I've never used nim godot, but I imagine there is only one file you ever compile? |
19:04:00 | FromDiscord | <saem> nim c src/main.nim or something like that? |
19:20:37 | * | max22- quit (Quit: Leaving) |
19:21:35 | * | max22- joined #nim |
19:24:00 | * | beshr quit (Read error: Connection reset by peer) |
19:34:14 | FromDiscord | <ElegantBeef> Yea typically it's just a file that imports all your sub modules |
19:41:56 | * | cyraxjoe joined #nim |
20:03:19 | * | maxime_ joined #nim |
20:04:36 | fn | <ForumUpdaterBot99> New Nimble package! resolv - DNS resolution nimble making use of the native glibc resolv library, see https://github.com/mildred/resolv.nim |
20:04:37 | fn | <R2D299> itHub: 7"DNS resolution library using the glibc system resolver" |
20:06:11 | * | max22- quit (Ping timeout: 268 seconds) |
20:08:26 | * | max22- joined #nim |
20:09:09 | * | maxime_ quit (Ping timeout: 265 seconds) |
20:26:30 | fn | <ForumUpdaterBot99> New thread by Niminem: Help for Sending Input Data To REPL, see https://forum.nim-lang.org/t/8184 |
20:40:46 | FromDiscord | <deech> What does it mean to have a construction like `type O = ref object of RootObj; OO = object of O` . Note `O` is a `ref object` and `OO` is a plain object that inherits from it. |
20:50:15 | * | beshr joined #nim |
20:50:15 | * | beshr quit (Changing host) |
20:50:15 | * | beshr joined #nim |
21:01:35 | FromDiscord | <planetis> that OO has the fields of O |
21:02:43 | * | PMunch quit (Quit: leaving) |
21:04:20 | FromDiscord | <dom96> Nim's async really does mirror Nim's threads a lot: https://forum.nim-lang.org/t/8153#52643 |
21:05:09 | FromDiscord | <dom96> I'm tempted to emulate https://nim-lang.org/docs/threads.html#onThreadDestruction%2Cproc%29 too, but have a feeling that wouldn't be the best idea (for the same reasons it's not a good idea for threads either) |
21:07:54 | FromDiscord | <zetashift> In reply to @saem "I've never used nim": sortof: example app game https://github.com/geekrelief/gdnim_hb_arpg |
21:07:56 | fn | <R2D299> itHub: 7"Conversion of HeartBeat's ARPG tutorial to use gdnim" |
21:08:42 | FromDiscord | <zetashift> but I think geekrelief indeed opened up an issue for your plugin about how one has to tell the plugin where the project files life, and it got added to the readme |
21:19:17 | * | max22- quit (Quit: Leaving) |
21:28:40 | FromDiscord | <reilly> sent a code paste, see https://play.nim-lang.org/#ix=3rH6 |
21:29:13 | FromDiscord | <reilly> (edit) "https://play.nim-lang.org/#ix=3rH6" => "https://play.nim-lang.org/#ix=3rH7" |
21:29:58 | FromDiscord | <reilly> (edit) "https://play.nim-lang.org/#ix=3rH7" => "https://paste.rs/9Eu" |
21:37:49 | FromDiscord | <dom96> This isn't a Haxe server |
21:38:50 | FromDiscord | <dom96> Why is O3 considered unstable? Got any links? |
21:57:38 | FromDiscord | <saem> @matf\: I'm on matrix and in this channel, so feel free to ping me here, I'll probably get the notification sooner. \:D |
21:59:25 | FromDiscord | <leorize> it's a literature around gentoo users, not sure which flag in particular but many software is known to crash when built with -O3↵(@dom96) |
22:01:04 | FromDiscord | <dom96> @timotheecour reviewed https://github.com/dom96/httpbeast/pull/47, just needs a few changes |
22:01:04 | FromDiscord | <leorize> s/flag/optimization |
22:01:06 | FromDiscord | <leorize> I think it's mostly because O3 enables more optimizations that depends on a lot of undefined behaviors |
22:05:06 | FromDiscord | <matf> @saem thanks. I've tried a pure record of functions.. I think it's the easiest? |
22:05:56 | FromDiscord | <matf> sent a code paste, see https://play.nim-lang.org/#ix=3rHc |
22:06:17 | FromDiscord | <saem> @matf\: the part I wasn't sure about is do you have multiple terminal instances and they each have custom functions (as in the implementation varies at runtime) or are they all statically known? |
22:07:24 | FromDiscord | <matf> In my case I just have two. I want to code against TerminalFunctions. In my actual program, I'd pass in `echoTerminalFunctions` and in my tests I would pass in `recordingTerminalFunctions`. My actual logic would just know about some instance of `TerminalFunctions`. |
22:08:27 | FromDiscord | <saem> Why not just swap out implementation via a when if you want to test? |
22:08:27 | FromDiscord | <matf> these wouldn't even live in the same file, I'd just define `recordTerminalFunctions` in my test and inject it into what proc I need that expects a `TerminalFunction`. Otherwise... I have so much code that is `proc: void` and impossible to test. |
22:08:56 | FromDiscord | <matf> Hah. Probably because I didn't even know you could do that 🙂 |
22:09:09 | FromDiscord | <matf> (edit) "Hah. Probably because I didn't even know you could do that 🙂 ... " added "so I was falling back on old habits: manual dependency injection" |
22:09:24 | FromDiscord | <saem> Well you could make it pretty nifty with a simple template, me thinks |
22:09:37 | FromDiscord | <matf> (edit) "injection" => "injection. e.g. I have some `proc doStuff(terminal: TerminalFunctions): void`" |
22:12:25 | FromDiscord | <matf> Time to read up on templates. I was assuming if I only defined `recordingTerminalFunction` under `/tests`, it would not be compiled into my main? |
22:31:09 | FromDiscord | <timotheecour> @dom96 just replied |
22:31:37 | FromDiscord | <Jasmine and Don't Forget!~> May i ask for help here? |
22:33:06 | FromDiscord | <timotheecour> ask for forgiveness, not permission |
22:33:26 | FromDiscord | <Jasmine and Don't Forget!~> Lol, okay |
22:33:43 | FromDiscord | <Jasmine and Don't Forget!~> ||func process_movement(delta):↵ # Setting the direction↵ dir = move_input.x $Head.global_transform.basis.z↵ dir += move_input.y $Head.global_transform.basis.x|| |
22:33:58 | FromDiscord | <Jasmine and Don't Forget!~> How do i do terminal font? |
22:34:02 | FromDiscord | <Jasmine and Don't Forget!~> ``func process_movement(delta):↵ # Setting the direction↵ dir = move_input.x $Head.global_transform.basis.z↵ dir += move_input.y $Head.global_transform.basis.x`` |
22:34:04 | FromDiscord | <Jasmine and Don't Forget!~> got it |
22:34:15 | FromDiscord | <Jasmine and Don't Forget!~> okay, this is gdscripts |
22:34:16 | FromDiscord | <Jasmine and Don't Forget!~> (edit) "gdscripts" => "gdscript" |
22:34:24 | FromDiscord | <Jasmine and Don't Forget!~> I have no clue how to do basis in nim |
22:34:42 | FromDiscord | <Jasmine and Don't Forget!~> `` # Process movement↵ dir = head.rotation.z`` |
22:34:52 | FromDiscord | <dom96> In reply to @timotheecour "<@!132595483838251008> just replied": I was just thinking raising an exception in httpbeast when reusePort is true and threads are on |
22:34:57 | FromDiscord | <Jasmine and Don't Forget!~> here's what I have, but I have no clue how to get a similar result |
22:35:10 | FromDiscord | <dom96> I don't think we should make reusePort false by default (httpbeast's purpose is speed and it depends on reusePort to be fast) |
22:35:43 | FromDiscord | <Jasmine and Don't Forget!~> I'm trying to copy over a quake character controller from gdscript to nim |
22:35:47 | FromDiscord | <dom96> as for breakage, I think we can just document it, people will hopefully forgive me (they should be using initSettings anyway :)) |
22:36:16 | FromDiscord | <dom96> sent a code paste, see https://play.nim-lang.org/#ix=3rHj |
22:36:28 | FromDiscord | <timotheecour> so do you want me to change Option to bool? |
22:36:38 | FromDiscord | <dom96> (edit) "https://play.nim-lang.org/#ix=3rHj" => "https://play.nim-lang.org/#ix=3rHk" |
22:36:46 | FromDiscord | <Jasmine and Don't Forget!~> sent a code paste, see https://play.nim-lang.org/#ix= |
22:37:30 | FromDiscord | <dom96> In reply to @timotheecour "so do you want": yeah, I'm nitpicking but I'd rather not have the codebase bend over backwards to be backwards compatible 🙂 |
22:38:41 | FromDiscord | <saem> @matf\: https://play.nim-lang.org/#ix=3rHi |
22:39:26 | FromDiscord | <timotheecour> well i'm all for good design... ok so i'll change Option to bool and set default reusePort to false, then need to fix tests |
22:40:46 | FromDiscord | <timotheecour> maybe a `-d:httpbeastLegacyReusePort`. could be used later if ppl complain to change the default temporarily |
22:40:57 | FromDiscord | <timotheecour> (edit) "temporarily" => "for a transition period" |
22:41:04 | FromDiscord | <timotheecour> (edit) "maybe a `-d:httpbeastLegacyReusePort`. could be used later if ppl complain to change the default for a transition period ... " added "(analog to nimLegacy flags)" |
22:41:28 | FromDiscord | <dom96> well reusePort should still be `true` by default in `initSettings` |
22:43:14 | * | stkrdknmibalz joined #nim |
22:43:40 | FromDiscord | <dom96> or maybe what we should do instead is only have this field take effect when threads are not enabled |
22:43:41 | FromDiscord | <zetashift> In reply to @Jasmine and Don't Forget!~ "``func process_movement(delta): ": I sadly gotta go to sleep but something like this |
22:44:00 | FromDiscord | <dom96> but then a better name would be warranted |
22:44:59 | FromDiscord | <dom96> `nonthreadedReusePort` or similar (is there an antonym for `parallel` we could use?) |
22:45:11 | FromDiscord | <zetashift> sent a code paste, see https://play.nim-lang.org/#ix=3rHm |
22:45:58 | FromDiscord | <Jasmine and Don't Forget!~> Thank you so much |
22:46:01 | FromDiscord | <zetashift> @Jasmine and Don't Forget!~ what type is Head? |
22:46:04 | FromDiscord | <zetashift> or what type of node |
22:46:06 | FromDiscord | <Jasmine and Don't Forget!~> camera |
22:46:52 | FromDiscord | <matf> @saem and gotta learn macros now 🙂 |
22:47:24 | FromDiscord | <saem> @matf\: you can skip all that and type out the when defined manually in the two or three procs you care about. |
22:50:06 | FromDiscord | <timotheecour> @dom96 how about this instead, to get the best of both worlds: for multithread, honor reusePort but only for 1st thread; then sleep X ms and spawn the other threads wiht reusePort disabled |
22:50:18 | FromDiscord | <zetashift> In reply to @Jasmine and Don't Forget!~ "camera": https://pragmagic.github.io/godot-nim/v0.7.8/basis.html here are the basis procs, if you need anything else feel free to ask, but I'll get to answering tomorrow! |
22:50:57 | FromDiscord | <Jasmine and Don't Forget!~> i am... kind of angry I couldn't find it |
22:50:58 | FromDiscord | <Jasmine and Don't Forget!~> ngl |
22:51:08 | FromDiscord | <Jasmine and Don't Forget!~> But that you so much, this should help me be able to do it |
22:51:11 | FromDiscord | <zetashift> there is also https://github.com/geekrelief/gdnim which has some more fancy stuff |
22:51:14 | fn | <R2D299> itHub: 7"godot-nim based bootstrapping framework supporting hot reloading" |
22:51:40 | FromDiscord | <matf> @saem this is blowing my mind a little. I need to think about this. |
22:51:58 | FromDiscord | <zetashift> don't forget it generated the .nim files of the Godot API, so if you are like what are the `basis` procs or `camera` procs you can search for those files e.g. `camera.nim` or `basis.nim` |
22:52:42 | FromDiscord | <Jasmine and Don't Forget!~> Oh yeah, i've already generated it |
22:52:57 | FromDiscord | <Jasmine and Don't Forget!~> i expected it to be a thing I could call, not an entire module |
22:53:00 | FromDiscord | <saem> @matf\: yeah, automated copy and paste is kinda bananas. \:D |
22:53:27 | FromDiscord | <saem> Just wait until you zoom past this and then you take a look at CPS (don't just yet). |
22:55:31 | FromDiscord | <matf> @saem so I would just define my own `{.testLayerMacro.}` and use that to test my `proc layer(i: int): void` function I'm assuming? |
22:57:06 | FromDiscord | <dom96> In reply to @timotheecour "<@!132595483838251008> how about": the other threads will crash though |
22:58:44 | FromDiscord | <saem> @matf\: you can use that to do some effect, whatever really. So for testing you could record call params or some other bits somewhere and then query/inpect all that and decide if it passes or not. |
22:58:46 | FromDiscord | <saem> Basically go hog wild. \:D |
22:58:53 | FromDiscord | <saem> @matf\: you could also use the macro if you wanted to swap some symbols, like if you only call one or two actual effect procs, you could swap them for tests version `echo` -\> `testEcho` for example. |
22:59:14 | FromDiscord | <ElegantBeef> Anything you can write by hand macros can generate |
22:59:19 | FromDiscord | <ElegantBeef> So yea you have unlimited power 😄 |
22:59:54 | FromDiscord | <ElegantBeef> Though typed macros are more difficult to traverse |
23:00:57 | fn | <ForumUpdaterBot99> New question by DuckPuncher: How can I create a lookup table of different procedures in nim?, see https://stackoverflow.com/questions/68217774/how-can-i-create-a-lookup-table-of-different-procedures-in-nim |
23:01:06 | FromDiscord | <dom96> Just remember: with great power comes great responsibility:) |
23:01:32 | FromDiscord | <ElegantBeef> Fuck responsibility, make fancy shit that doesnt help anyone till the cows come home! ;P |
23:01:34 | FromDiscord | <ElegantBeef> (edit) ";P" => "😛" |
23:01:48 | FromDiscord | <timotheecour> right; so how about spawning somthing temporary with reusePort=false, then if succeeds, killing it and spawning the threads with reusePort = true? |
23:02:11 | FromDiscord | <timotheecour> (subject to TOCTOU but should at least catch most bugs) |
23:02:35 | FromDiscord | <ElegantBeef> I can hear varriount foaming at the mouth cause of that comment |
23:04:25 | FromDiscord | <timotheecour> since when is catching no bugs better than catching most bugs? it gives a tiny failure window, instead of current situation where an existing service would intercept calls |
23:04:42 | FromDiscord | <dom96> @timotheecour why though? I don’t see the need for doing this |
23:05:24 | FromDiscord | <ElegantBeef> I was talking about the TOCTOU comment |
23:05:53 | FromDiscord | <timotheecour> if you already have some service A listening to port P (that you may or not be aware of), then start a multithread service listening to same port, i want it to fail if i specify reusePort = false (and that should be the default setting) |
23:06:04 | FromDiscord | <zetashift> In reply to @Jasmine and Don't Forget!~ "i expected it to": Good luck and have fun with discovering all the new stuff 😋 |
23:06:05 | FromDiscord | <ElegantBeef> I'm toying with min and anyone know how to do string concatenation there? 😄 |
23:10:44 | FromDiscord | <dom96> In reply to @timotheecour "if you already have": Okay. I assume you still want httpbeast to set up its threads if there isn’t another service runnning though, right? Or are you fine with just running it single threaded? |
23:14:09 | FromDiscord | <timotheecour> yes, httpbeast will set up its threads if there isn't a conflicting service running; the only thing i want to change is to fail if reusePort = false (regarless of single thread of multi thread); and for multithread, my suggested implementation is to spawn a short lived service to check if address already in use, when reusePort = false; then httpbeast kills that short lived service and start the threads with reusePort = true |
23:14:52 | FromDiscord | <dom96> I’m asking what your use case is |
23:15:02 | FromDiscord | <dom96> So I can suggest the best implementation |
23:15:16 | FromDiscord | <dom96> You’re just telling me the implementation you want |
23:18:01 | FromDiscord | <timotheecour> use case is to start a server and ensure requests are sent to that server instead of some other prior server that you may be unaware of |
23:21:33 | FromDiscord | <dom96> Okay. So I ask again. Can you live with httpbeast running in single threaded mode? |
23:22:53 | FromDiscord | <timotheecour> why should it be either/or; multithread increases availability |
23:23:39 | FromDiscord | <timotheecour> how about this to move fwd with that PR: i ignore reusePort for threads>1, and then in future work, we can revisit this for threads>1 |
23:24:06 | FromDiscord | <timotheecour> (edit) "reusePort" => "`reusePort=false`" |
23:24:37 | FromDiscord | <dom96> Because indeed for threads>1 solving this is a pain |
23:25:39 | FromDiscord | <dom96> But sure. Let’s do that but instead of ignoring it throw an exception when reusePort is false and threads>1 |
23:25:59 | FromDiscord | <dom96> I need to head to bed now. Night 🙂 |
23:29:31 | FromDiscord | <ElegantBeef> Timothee i dont think your suggested refactor for that case statement is the same logic 😄 |
23:29:54 | FromDiscord | <ElegantBeef> Ah nvm i'm dumb |