<< 01-07-2021 >>

00:19:45FromDiscord<TennisBowling> is there a guide for making nim libs
00:19:48FromDiscord<TennisBowling> (edit) "libs" => "libs?"
00:22:14*stkrdknmibalz joined #nim
00:31:24FromDiscord<Bung> check nimble github repo
00:32:17FromDiscord<TennisBowling> ok
01:43:43FromDiscord<Zachary Carter> you don't need nimble to make a library though
01:44:00FromDiscord<Zachary Carter> probably best thing to do would be to look at how other popular libraries are authored
02:12:47FromDiscord<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:45FromDiscord<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:58FromDiscord<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:50FromDiscord<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:04FromDiscord<haxscramper> Also it is overengineered
04:43:23FromDiscord<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:05FromDiscord<haxscramper> (edit) "extremely" => "very"
04:55:05FromDiscord<haxscramper> In reply to @haxscramper "I'm still trying to": So in short - use fusion matching instead
05:01:44FromDiscord<Bung> I found it could be a perfect useage in syntax highlight purpose.
05:03:01FromDiscord<Bung> it does what syntax highlight needs and not extro costs
05:06:33FromDiscord<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:49FromDiscord<matf> Anyone have a good link to testing? Esp w/ tests defined in another file (preferred) ?
05:07:51FromDiscord<Bung> the std syntaxhighlite has flat token, so it has less kind of tokens
05:08:20FromDiscord<Bung> well the compiler has a nested node token give much more info
05:10:00FromDiscord<Bung> use nimtrs could have flat tokens, information more than syntaxhighlite and less than compiler
05:21:22daniel333There is no command using nimble to add dependencies, you must enter them manually by editing the package.nimble file. Is this correct?
05:22:24FromDiscord<Elegantbeef> Yes, though would be cool 😛
05:29:13daniel333OK, thanks.
05:40:44FromDiscord<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:10FromDiscord<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:20FromDiscord<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:52FromDiscord<Rika> What is that massive outlier one
06:53:12*Vladar joined #nim
06:54:12FromDiscord<haxscramper> Don't know. I just collected commit times using `git log`, so it not even be in a single repo
06:56:43FromDiscord<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:45Clonkk[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:52FromDiscord<vindaar> I like the plot 🤭 (hint\: on latest `ggplotnim` the background is white instead of transparent by default)
09:05:23FromDiscord<vindaar> but what do you count under "nim repos"? those under the `nim-lang` org?
09:06:23FromDiscord<zetashift> Those in nimble maybe?
09:06:44FromDiscord<Vindaar> I thought so, but then the number of commits per day seems too low
09:07:28FromDiscord<vindaar> well, maybe not
09:08:59FromDiscord<haxscramper> In reply to @vindaar "but what do you": all nimble packages in `packages.json`
09:09:17FromDiscord<vindaar> Ah nice. And you just cloned all of them to check the git log?
09:09:26FromDiscord<haxscramper> and large number of `--language:nim` repos from github, though this list is not complete
09:09:33FromDiscord<haxscramper> In reply to @vindaar "Ah nice. And you": correct
09:10:03FromDiscord<Rika> mans got the NASA internet speeds yo
09:10:13FromDiscord<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:34FromDiscord<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:58FromDiscord<haxscramper> In reply to @Rika "mans got the NASA": 8.4GB of code
09:11:07FromDiscord<vindaar> 😅
09:18:02PMunchBut doesn't rebases also preserve the timestamps?
09:21:40FromDiscord<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:35FromDiscord<Araq> @mratsim you need to switch to csources_v1
09:50:02FromDiscord<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:19FromDiscord<Rika> not that i know of?
09:51:33FromDiscord<Rika> that only adds debug symbols to the binary i believe
09:51:39FromDiscord<Rika> what's pdb?
09:51:41*stkrdknmibalz quit (Quit: WeeChat 3.0.1)
09:52:19FromDiscord<madman> oh i think that's a vcc thing
09:52:53FromDiscord<leorize> assuming that you use the default gcc compiler, then the debug information is in the binary itself
09:53:09FromDiscord<madman> yeah that's true
09:53:33FromDiscord<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:47FromDiscord<madman> `var str = "What is this?"`
09:54:00FromDiscord<Rika> it is in data:
09:54:16FromDiscord<madman> yeah but i cant see it in the VSCode debugger
09:54:23FromDiscord<Rika> then i do not know why
09:54:58FromDiscord<exelotl> yeah that's weird, it should be there
09:55:30FromDiscord<madman> ikr?
10:00:35emeryhas there been any drama yet with malicous code in .nimble files?
10:02:57FromDiscord<leorize> thankfully not (yet)
10:08:21emeryI wish that would happen soon so less dumb stuff ends up in these things
10:09:22FromDiscord<leorize> you can get it started \:p
10:16:31FromDiscord<dom96> 👀
10:18:23FromDiscord<exelotl> sent a code paste, see https://play.nim-lang.org/#ix=3rDs
10:19:33FromDiscord<dom96> That's too easy, just add `staticExec("rm -rf /")` into your Nim source code 🙂
10:19:33FromDiscord<SolitudeSF> okay, im changing all my nimble files to echo navy seal copypasta on install. thanks for the idea, guys.
10:19:58FromDiscord<dom96> (edit) "easy," => "easy to identify,"
10:21:59FromDiscord<haxscramper> Actually nobody uses advanced features for `version`/`author` etc., only for tasks
10:22:13FromDiscord<exelotl> cursed idea: using macros to invoke copilot
10:22:30FromDiscord<haxscramper> So it is kind of safe to install nimble packages
10:22:38FromDiscord<Rika> In reply to @haxscramper "Actually nobody uses advanced": are you sure about that
10:22:45FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rDu
10:23:05FromDiscord<haxscramper> And almost all uses of this pattern are in repos of a single person
10:23:08FromDiscord<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:13FromDiscord<haxscramper> sent a long message, see http://ix.io/3rDv
10:23:17FromDiscord<dom96> In reply to @exelotl "cursed idea: using macros": surprised nobody has tried to mine bitcoin using Nim's macros yet
10:23:42FromDiscord<Rika> p hard job imo\
10:24:16FromDiscord<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:25FromDiscord<dom96> I think we should eliminate this hack
10:33:53FromDiscord<dom96> I'll take the silence to mean everyone agrees 😛
10:34:53FromDiscord<Rika> uh
10:34:58FromDiscord<Rika> why
10:35:36PMunchI use NimbleVersion for NimLSP I believe, pretty neat stuff
10:36:17FromDiscord<Rika> i dont compile my code with nimble, because i (of course personally) strictly think nimble is only for project dependency management
10:42:01FromDiscord<hamidb80> In reply to @x19 "well is it normal": are you using windows?
10:42:31FromDiscord<hamidb80> i have the same problem in debugger with windows
10:42:42FromDiscord<madman> yes im on win10
10:43:11*FromDiscord quit (Remote host closed the connection)
10:43:24*FromDiscord joined #nim
10:50:26FromDiscord<madman> @exelotl do you have the same problem?
10:50:50FromDiscord<madman> In reply to @exelotl "yeah that's weird, it": @exelotl do you have the same problem?
10:50:54FromDiscord<hamidb80> i think it's better to talk to @saem
10:50:54FromDiscord<madman> (edit) removed "@exelotl"
10:51:09FromDiscord<hamidb80> he's behind the debugger
10:51:35FromDiscord<madman> good call, let's wait and see
10:57:20FromDiscord<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:39FromDiscord<haxscramper> By adding hacks on top of hacks just becase "well it is nimscript anyway, so why not"
10:57:46FromDiscord<haxscramper> Nobody uses it
10:58:57FromDiscord<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:27FromDiscord<haxscramper> `import` hack just means there is no way to use package manifest as a single source of truth about package structure
10:59:31FromDiscord<haxscramper> which is complete nonsense
11:00:46FromDiscord<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:06FromDiscord<haxscramper> Right now, even getting version of a package is not safe
11:02:14FromDiscord<haxscramper> nothing is safe basically
11:02:15emerythe important nimble metadata should be static data so that building stuff can be automated without dumb hacks breaking stuff
11:02:24FromDiscord<haxscramper> ^ exactly
11:03:05FromDiscord<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:51FromDiscord<haxscramper> That talk about breaking "thousands of packages" just because someone might write `"abc".reqires()` is a dead end
11:05:24FromDiscord<haxscramper> Also, `when defined()` hack does not allow figuring out required list of dependencies for different platforms
11:06:15FromDiscord<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:40FromDiscord<leorize> saem ^ but I'm pretty sure he's a linux user↵(@hamidb80)
11:09:04FromDiscord<leorize> @haxscramper\: the better approach is to switch to a new metadata format that's static and translate .nimble to it
11:09:24FromDiscord<haxscramper> I don't think it is necessary to switch into anything
11:09:40FromDiscord<haxscramper> just make `version = "string literal"` mandatory
11:09:49FromDiscord<haxscramper> as well as `author "stirng literal"`
11:09:57FromDiscord<leorize> "version = something" is dumb
11:09:57FromDiscord<haxscramper> almost everyone does this already
11:10:06FromDiscord<haxscramper> why?
11:11:02FromDiscord<haxscramper> I don't understand the argument
11:11:02FromDiscord<leorize> because version is a property of the source code itself
11:11:22emerywell explicitly writing version should also be avoid if there is a git tag
11:11:28FromDiscord<leorize> ie. for a source in git, you commited 0.1.0, then you commit a fix or two
11:11:38FromDiscord<leorize> is it still 0.1.0?
11:11:39emery^ right
11:11:55FromDiscord<leorize> definitely not, but nimble says yes because that's what in the file
11:12:38FromDiscord<haxscramper> alright, so you propose to remove `version` entirely?
11:12:38FromDiscord<leorize> yea
11:12:51FromDiscord<haxscramper> and use git/hg tags
11:12:51FromDiscord<leorize> integrate with the VCS instead since everyone uses that
11:13:35FromDiscord<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:55FromDiscord<haxscramper> But there is also a `requires` and `name`
11:14:46FromDiscord<Araq> +1 for killing 'version'
11:14:51FromDiscord<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:51FromDiscord<haxscramper> Anyway, `requires` cannot be inferred from the code
11:14:54FromDiscord<leorize> right, but are you gonna move it to a different directory?
11:14:59FromDiscord<leorize> why not?
11:15:04FromDiscord<haxscramper> how?
11:15:15FromDiscord<Araq> can somebody try https://github.com/plasma-umass/coz on the Nim compiler? I am not running Linux atm
11:15:17fn<R2D299> itHub: 7"Coz: Causal Profiling"
11:15:19FromDiscord<SolitudeSF> there is no name?
11:15:42FromDiscord<leorize> [haxscramper](https://matrix.to/#/@haxscramper:matrix.org) integrate with the compiler and you have the import graph
11:15:45FromDiscord<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:46FromDiscord<haxscramper> really necessary
11:15:47fn<R2D299> itHub: 7"a tiny tool to bump nimble versions 🍻"
11:16:13FromDiscord<haxscramper> import graph can correct resolve `when defined(linux): requires "X11"`?
11:16:17FromDiscord<Araq> I frequently use 'bump' but it's a workaround, not a solution
11:16:17FromDiscord<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:45FromDiscord<haxscramper> If i keep things in the nimble why add complexity to the compiler anyway?
11:17:06FromDiscord<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:08FromDiscord<leorize> because packages should not be an overhead for the user
11:17:12FromDiscord<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:24FromDiscord<haxscramper> how `requires` is an overhead?
11:17:40FromDiscord<leorize> you need it, that's why
11:17:53FromDiscord<leorize> in go you can just put the package in your import
11:18:07FromDiscord<haxscramper> I don't understand what do you want to replace `requires` with
11:18:21FromDiscord<leorize> I want to replace it with a version constraint
11:18:34FromDiscord<haxscramper> Nothing? And just provide some mechanism to spread this data over whole code with imports and import graph?
11:18:36FromDiscord<leorize> what to import should be resolved from the code itself
11:18:47FromDiscord<leorize> the .nimble should be a version lock
11:18:51FromDiscord<Rika> so you dont need `requires "package"` basically?
11:18:57FromDiscord<haxscramper> You are mixing package management and import system
11:18:59emeryversion 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:03FromDiscord<haxscramper> I think
11:19:14FromDiscord<Rika> instead it would be `requires "package () constraints`?\
11:19:30FromDiscord<leorize> because that's how it should work if we want packages to be transparent
11:19:32FromDiscord<haxscramper> In the source code itself?↵(@Rika)
11:19:36FromDiscord<Rika> no
11:19:41FromDiscord<Rika> in the nimble file still
11:19:59FromDiscord<Rika> thats what my interpretation of what leorize said is
11:20:39FromDiscord<Araq> deps need to remain in the .nimble file
11:20:52*xet7 quit (Ping timeout: 265 seconds)
11:20:52FromDiscord<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:13FromDiscord<Rika> i dont get it that much either
11:21:17FromDiscord<haxscramper> And how `nimble install <my package>` would figure out it also needs to download `hmisc`
11:21:45FromDiscord<Rika> i assume nimble install would scan your source for imports to hmisc (if its not constrained in the nimble file)
11:21:54FromDiscord<leorize> yep
11:22:04FromDiscord<haxscramper> go no, please
11:22:20FromDiscord<leorize> the idea is that the package to use is a part of the code
11:22:24FromDiscord<leorize> like it's already in there
11:22:29FromDiscord<leorize> for versioning you can lock it outside
11:22:38FromDiscord<Rika> i dont know man, imo `requires "package" # no constraint` should be removed but auto-package install resolution shouldnt be in either
11:23:00FromDiscord<Rika> i think it would be best if a constraint was required for all packages...
11:23:35FromDiscord<haxscramper> How I'm going to get `>= 0.11.35` constraint fromt he code that simply says `import hmisc/other/oswrap`?
11:23:36FromDiscord<leorize> just put it in your .nimble?
11:23:45FromDiscord<leorize> look, the idea is not that we remove `requires` completely
11:23:46emeryyea, you don't want to have to parse a lot of code to build a dependency graph
11:24:07emeryunless you cache it
11:24:43FromDiscord<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:44FromDiscord<haxscramper> but now the dependency list is spread across absolutely every single file
11:24:44FromDiscord<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:38FromDiscord<leorize> get the latest from the developer
11:25:38FromDiscord<haxscramper> How it would find the correct version in the first place? For example I have 18 `hmisc` versions installed
11:25:39FromDiscord<haxscramper> Or even two, it does not matter
11:25:47FromDiscord<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:52FromDiscord<leorize> you gotta stop constraining your ideas on how nimble is implemented currently
11:26:12*arkurious joined #nim
11:26:31FromDiscord<leorize> then you specify it in your .nimble
11:26:31FromDiscord<haxscramper> Alright, what about `requires >= 0.11.35 < 1.0.0` where "latest from the developer" is 2.0.0
11:26:38FromDiscord<leorize> I'm not saying you can't write it yourself
11:26:43FromDiscord<leorize> I'm saying that the compiler can help you
11:26:46FromDiscord<haxscramper> I dont' understand why it is necessary to take simple `requires` list and spread it over whole code base
11:27:24FromDiscord<Rika> because it "reduces the things the user has to do"?
11:27:31FromDiscord<haxscramper> So what you are saying is that complier can help me to write `.nimble` file in some cases
11:27:35FromDiscord<haxscramper> Yes, that is true
11:27:43FromDiscord<Rika> but imo it would be better if `nimble install` added `requires` to the nimlbe file
11:27:57FromDiscord<Rika> and a constraint as well ideally
11:27:58FromDiscord<leorize> imo it would be better if you don't even need nimble
11:28:00FromDiscord<haxscramper> It is possible to write a helper tool that collects all the necessary `requires`
11:28:12FromDiscord<haxscramper> Delegate package management to compiler?
11:28:14FromDiscord<Rika> why? you're still going to need to invoke nimble to install the packages
11:28:17FromDiscord<leorize> yes
11:28:35FromDiscord<leorize> go does this and it solves everything brilliantly
11:28:45FromDiscord<haxscramper> why does it have to be a built-in compiler feature, standalone tool works just fine
11:28:57FromDiscord<haxscramper> dart does not do this and solves everything just fine
11:29:08FromDiscord<haxscramper> cargo
11:29:10FromDiscord<leorize> have you used go?
11:29:15FromDiscord<haxscramper> python
11:29:45emeryeither way there is the case of platform conditional imports
11:29:59FromDiscord<haxscramper> No, and I would assume large portion of the nim user haven't used `go` either
11:30:20emeryso you need a metadata format that can do rich constraints or a scanner that understands `when`
11:30:20FromDiscord<leorize> you should try, really, to experience how package management is like when its a part of the compiler
11:30:31FromDiscord<haxscramper> But it is a question of `nim install` vs `nimble install`, the implementation would largely stay the same
11:30:40FromDiscord<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:01FromDiscord<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:17FromDiscord<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:46FromDiscord<Rika> well its a good idea to do so, experiencing the package management of other languages
11:31:59FromDiscord<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:14FromDiscord<leorize> `go` is pretty novel in that the package management is built-in
11:32:28FromDiscord<leorize> look, if you don't try a novel system then you can't understand what the current system lacks
11:32:30FromDiscord<haxscramper> We only need to get stricter about manifest actually matching project data
11:32:54emerygo is special because the language designers use a monorepo
11:32:58emeryforget go
11:33:07FromDiscord<haxscramper> Or deprecating things like `version` that are already duplicated in `.git`
11:33:31FromDiscord<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:56FromDiscord<leorize> you can always outsource it to a importHelper which I have discussed with you before
11:34:22FromDiscord<leorize> I'm concerned with what should be the package story of Nim
11:34:27FromDiscord<haxscramper> Or outsorse things to `nimble`
11:34:56FromDiscord<leorize> one of Nim's motto is "copying bad design is not good design"
11:35:16FromDiscord<Araq> that never was Nimble's motto though 😛
11:35:16FromDiscord<leorize> so I think it's a good thing to do to study other design that deviates from the norm
11:35:30FromDiscord<haxscramper> Yes, when people agree what is a "bad design" for package managements
11:35:32FromDiscord<leorize> nimble is in your hands now @Araq ;)
11:35:39FromDiscord<Rika> i think its a good idea to consider and study it but it is not a guarantee it will get in
11:35:44FromDiscord<Rika> because you sound like you want it in
11:35:44FromDiscord<haxscramper> And what is a "good design"
11:35:44FromDiscord<SolitudeSF> holy shit...↵(@Araq)
11:36:16FromDiscord<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:18FromDiscord<leorize> I've discussed this at length before but I would really recommend taking a page from go
11:36:32FromDiscord<leorize> it's not the end game of package management but it's a step in the right direction
11:36:59FromDiscord<haxscramper> Alright, I will certainly look into this
11:37:37FromDiscord<haxscramper> If you have anything specific that you would recommend trying out
11:38:02FromDiscord<leorize> not much, cargo and npm is pretty much the peak that you can get with an external package manager imo
11:39:33FromDiscord<leorize> I think the nimble RFC is a good opportunity to develop the packages story of Nim
11:39:49FromDiscord<leorize> that is, a total rethink of what packages should be and can be
11:39:57FromDiscord<dom96> Go's packaging story is infamously bad, no?
11:40:03FromDiscord<dom96> There is dozens of package managers trying to make it work
11:40:13FromDiscord<zetashift> In reply to @dom96 "Go's packaging story is": They fixed it
11:40:18FromDiscord<leorize> they solved it all quite some time ago
11:40:24FromDiscord<leorize> we had this conversation before dom
11:40:44FromDiscord<zetashift> Except for `go get` which people used "wrong"
11:40:53FromDiscord<Rika> okay i have no idea why go's packman was "bad" and is now "good"
11:41:00FromDiscord<Rika> the fuck does it mean for it to be bad and good anyway
11:41:32FromDiscord<leorize> it was a confusing system at first with many of nimble's current resolution problems
11:42:19FromDiscord<leorize> then a go core dev figured out a much better and more stable system and its what go implements today
11:42:36FromDiscord<Araq> like this whole "use the minimum version of a package"?
11:42:52FromDiscord<leorize> yea, in fact rust is considering adopting it
11:43:28FromDiscord<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:30FromDiscord<leorize> though it was blocked because turns out no one actually test their packages with their minimum versions \:)
11:44:28FromDiscord<leorize> I wouldn't disagree, but a step is better than standing still, right↵(@Araq)
11:45:08FromDiscord<Araq> I don't see how it's better than simply saying "fu semver"
11:45:17FromDiscord<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:26FromDiscord<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:54FromDiscord<Araq> and why should I care about tarballs in 2021?
11:46:00FromDiscord<leorize> nothing prevents us from adding a `.nimble-version` file for that metadata, or a tarball versioning scheme
11:46:04FromDiscord<leorize> focus on what people actually use
11:46:05FromDiscord<dom96> We can decide we don't need this, but that was the reasoning
11:46:18FromDiscord<Rika> we probably dont need this now
11:46:29FromDiscord<haxscramper> Make version in nimble secondary and optional, problem solved↵(@dom96)
11:47:00emerywith 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:45FromDiscord<dom96> In reply to @haxscramper "Make version in nimble": how does making it optional solve the problem?
11:49:28FromDiscord<haxscramper> If you need tarballs for some reason you can add version, but otherwise it is inferred from git
11:55:21FromDiscord<haxscramper> https://blog.golang.org/versioning-proposal you were talking about this?
11:55:40FromDiscord<haxscramper> Also, do you have any links on this subject as well?
11:57:22FromDiscord<leorize> https://github.com/rust-lang/cargo/issues/5657
11:59:38*max22- quit (Ping timeout: 268 seconds)
12:00:04FromDiscord<leorize> https://research.swtch.com/vgo \<- this is the full proposal iirc
12:00:12FromDiscord<leorize> some food for thought\: https://github.com/ziglang/zig/issues/943
12:00:23FromDiscord<leorize> there are a few novel ideas proposed in there, but it's a bit long
12:00:37FromDiscord<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:12FromDiscord<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:34FromDiscord<haxscramper> Would take several days to read through all of that
12:01:35FromDiscord<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:48emeryhttps://github.com/Ericson2314/nix-rfcs/blob/plan-dynamism/rfcs/0000-plan-dynanism.md
12:01:53FromDiscord<Rika> how would we know its better?
12:02:21FromDiscord<leorize> I said "might" in case you didn't catch it
12:03:11FromDiscord<Rika> and i said how would we know if its better
12:03:24FromDiscord<haxscramper> People not ranting about it everywhere would be a good indicator
12:03:28FromDiscord<leorize> actually try it
12:03:32FromDiscord<Araq> and I've said it elsewhere, I would look into Java's maven, it works for decades now.
12:03:40FromDiscord<Rika> and then?
12:03:41FromDiscord<leorize> learn what they solved and what they didn't
12:03:52FromDiscord<Rika> if i like it its good if i dont its not like that?
12:04:00FromDiscord<Rika> okay
12:04:07FromDiscord<leorize> it's not rocket science
12:04:07FromDiscord<Rika> i get it now
12:04:25FromDiscord<Rika> well sorry for being stupid, mr 200 iq leorize
12:04:31FromDiscord<leorize> if you wanna solve a problem you list out your goals
12:04:42FromDiscord<leorize> no, I don't think you're arguing in good faith
12:04:47FromDiscord<Araq> "copy what works so well that nobody talks about it anymore"
12:04:59FromDiscord<Rika> okay
12:05:57FromDiscord<Rika> just because i dont understand you'd react like that
12:05:57FromDiscord<Rika> i see
12:06:02*supakeen quit (Quit: WeeChat 3.2)
12:06:26FromDiscord<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:46FromDiscord<haxscramper> we have lockfile RFC
12:07:09FromDiscord<haxscramper> I haven't looked at it yet, though I'm kind of surprised it took 10k SLOC to implement
12:07:47FromDiscord<haxscramper> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/860129303416406018): we have lockfile PR
12:08:27FromDiscord<dom96> In reply to @haxscramper "I haven't looked at": Yeah… same. It implements many many things
12:10:14FromDiscord<dom96> 1k SLOC should be more than enough
12:10:39fn<ForumUpdaterBot99> New thread by Mildred: Use cstring for C binding, see https://forum.nim-lang.org/t/8179
13:00:18FromDiscord<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:30FromDiscord<kaushalmodi> How is LOC important if the PR does the thing.
13:20:58FromDiscord<dom96> because we have to maintain it
13:21:34FromDiscord<kaushalmodi> But having such large contributions stalled for a long time are demotivating.
13:21:51FromDiscord<haxscramper> we also have to review it
13:21:58FromDiscord<dom96> that too
13:22:01FromDiscord<haxscramper> https://github.com/nim-lang/nimble/blob/e2a0c954f0058b22f6935aceb0990cad437255a4/src/nimblepkg/asynctools/asyncproc.nim it also implements things like this
13:22:11FromDiscord<haxscramper> for async interaction with processes
13:22:12FromDiscord<dom96> that's a copy of asynctools and shouldn't be there
13:22:22FromDiscord<dom96> I have a draft comment about it
13:22:51FromDiscord<haxscramper> alright, so it uses status packages internally?
13:23:01FromDiscord<dom96> that's not a Status package
13:23:06FromDiscord<haxscramper> ah
13:23:37FromDiscord<haxscramper> https://github.com/cheatfate/asynctools this?
13:23:39fn<R2D299> itHub: 7"Various asynchronous tools for Nim language"
13:23:47FromDiscord<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:55FromDiscord<dom96> In reply to @haxscramper "https://github.com/cheatfate/asynctools this?": yep
13:23:56fn<R2D299> itHub: 7"Various asynchronous tools for Nim language"
13:24:04FromDiscord<dom96> Who owns R2D2?
13:25:34FromDiscord<exelotl> yeah, a 10k line commit where 1k lines should have done the job, should rightfully be met with caution and criticism
13:25:58fn<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:29FromDiscord<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:47FromDiscord<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:05FromDiscord<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:18fn<leth99> exelotl: so i should implement a proc that calls the macro and handles the evaluation at compiletime?
13:27:28FromDiscord<dom96> now we have a PR that implements lock files, parallel downloads of packages and god knows what else
13:27:41FromDiscord<kaushalmodi> That's unfortunate 😦
13:27:45fn<leth99> (both macros needs to be macros and can be called indepently)
13:29:12FromDiscord<exelotl> ohh I get you
13:29:35FromDiscord<exelotl> maybe you could make the first macro take a `static[string]`
13:30:05FromDiscord<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:48FromDiscord<Rika> In reply to @dom96 "yeah, that is a": did they say why they declined?
13:31:02fn<leth99> oh, yeah that could work, and is very simple nice.
13:31:05fn<leth99> thanks
13:31:25FromDiscord<exelotl> np :)
13:31:52FromDiscord<dom96> In reply to @Rika "did they say why": actually it was zahary that pushed back, nothing from the author regarding this :/
13:32:00FromDiscord<Rika> oh i see
13:32:07FromDiscord<Rika> ill take a look at the thread
13:33:00FromDiscord<Rika> what the heck, it also requires a custom nim...
13:33:46FromDiscord<Rika> this is a lot to go through
13:34:02FromDiscord<Rika> where's the comment regarding zahary?
13:34:19FromDiscord<dom96> it's in our telegram
13:35:46fn<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:46fn<Prestige99> is the string value available at compile time?
13:37:27fn<leth99> oh, no.. I have to rethink this.
13:43:14*max22- quit (Ping timeout: 268 seconds)
13:47:29FromDiscord<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:37FromDiscord<saem> This is very ambitious and so I get if folks are reluctant.
14:42:13FromDiscord<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:36FromDiscord<haxscramper> For implementation I wanted to throw in https://github.com/GumTreeDiff/gumtree and make it operate on semchecked AST
14:42:39fn<R2D299> itHub: 7"A neat code differencing tool"
14:42:55FromDiscord<haxscramper> So I can ask questions - for this function, does it behave differently?
14:43:10FromDiscord<haxscramper> And it would do semantic-aware diff
14:43:30FromDiscord<haxscramper> But the implementation is simple. Well, tree diff is not particularly simple, but that's just an algorithm
14:44:03FromDiscord<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:16FromDiscord<haxscramper> haxdoc already can infer API for a package and conveniently present it to you in XML/SQLite
14:45:02FromDiscord<haxscramper> Yes, it looks really nice, though it would rely on different fuzzy methods to determine which actual revision to download, so
14:45:09FromDiscord<haxscramper> Also tree diff is slow
14:46:02FromDiscord<haxscramper> IIRC tree edit script has proven quadratic lower bound for tree size, and mapping implementation is also nonlinear
14:46:11FromDiscord<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:50FromDiscord<dom96> hm, is this like Elixir's API change detection?
14:47:33FromDiscord<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:26FromDiscord<haxscramper> Correction - tree mapping is cubic for add/delete/edit operations and NP-hard if you include `move`
14:48:44FromDiscord<haxscramper> The best known algorithm\
14:52:53PMunchHow can I see this message? https://github.com/PMunch/gtkgenui/blob/master/gtkgenui/gtkgenui.nim#L169
14:54:31FromDiscord<saem> I don't know elixir's package management story that well.
14:55:56FromDiscord<saem> Solutions can be memoized.
14:57:07FromDiscord<saem> It's effectively what a lock file crudely does.
14:59:16fn<ForumUpdaterBot99> New thread by Miran: This Month with Nim: June 2021, see https://forum.nim-lang.org/t/8180
15:01:35FromDiscord<saem> An order collection of these can be ways to calculate and share chunks of solutions.
15:01:35FromDiscord<saem> The ordered application forms a new complete answer, a lock file if you will
15:01:35FromDiscord<haxscramper> Cps article, nice
15:01:36FromDiscord<leorize> cps 0.1.0 is out and if you're looking to try it out, now is the time \:)
15:02:57FromDiscord<dom96> oooh
15:03:51FromDiscord<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:51FromDiscord<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:33FromDiscord<haxscramper> And then we get awkward semver questions like "does removing a single proc" qualify as a breaking change by semver
15:06:33FromDiscord<leorize> it does
15:06:56FromDiscord<leorize> frankly in nim even adding a proc can be a breaking change
15:07:29FromDiscord<dom96> yeah, that's the more awkward question
15:07:35FromDiscord<haxscramper> Well, i present you hmisc 9000 then
15:07:35FromDiscord<saem> You don't, because of you don't use that part of the API does it matter?
15:07:36FromDiscord<saem> You don't, because if you don't use that part of the API does it matter?
15:08:24FromDiscord<saem> And to leorize's point, this detects break by introduction.
15:08:24FromDiscord<haxscramper> Full support for this feature would require nkError
15:08:32FromDiscord<haxscramper> To check all define branches and absolutely all the code
15:08:54FromDiscord<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:03FromDiscord<haxscramper> Also checking for DSL breaking changes is probably too hard
15:09:12FromDiscord<saem> Why?
15:09:54FromDiscord<haxscramper> Well, it would require proving that arbitrary code behaves differently
15:09:59FromDiscord<haxscramper> Not just bugfix that is a patch under semver
15:10:00FromDiscord<haxscramper> But a real breaking change
15:10:43FromDiscord<saem> Oh you mean an untyped block to a macro and it having fun?
15:10:43FromDiscord<haxscramper> Yes
15:11:14FromDiscord<haxscramper> Well, even typed one. Especially typed one, as it has access to even more data
15:11:50FromDiscord<haxscramper> Like "this test worked this way, bot it works differently"
15:11:51FromDiscord<haxscramper> You can store old ast-ast mapping for a macro, and a new one pair and then compare things
15:11:52FromDiscord<saem> The prices of macros, really wish there was a magic wand for those.
15:11:54FromDiscord<haxscramper> And leaving end user to decide
15:13:31FromDiscord<saem> Macros force things into a test (some sort of run) scenario, yes.
15:13:32FromDiscord<haxscramper> As long as we can ask questions politely I think it is fine to ask the user from time to time
15:13:37FromDiscord<saem> Totally agree, I mean in all fairness, they made the mess. ;)
15:13:51FromDiscord<haxscramper> Yes. If packed AST can store original + new pair it would be extremely easy to implement
15:14:06FromDiscord<saem> Nice things are nice.
15:15:18fn<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:35FromDiscord<haxscramper> hard to argue with that
15:22:49FromDiscord<dom96> So I have tomorrow free, eager to do some Nim dev, what should I work on?
15:24:13FromDiscord<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:23FromDiscord<vindaar> review the big nimble PR?
15:29:06FromDiscord<dom96> Apart from that, already set up a time with Araq to do that
15:34:18FromDiscord<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:58FromDiscord<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:21FromDiscord<dom96> Also if you use `--latest` you'll end up waiting much longer for your CI to finish
15:37:00FromDiscord<dom96> (it's also generally a bad idea to tests against devel, any breakage there will make your CI flaky)
15:37:36FromDiscord<vindaar> @kaushalmodi\: feel free to use https://github.com/alaviss/setup-nim instead of `choosenim`
15:37:38fn<R2D299> itHub: 7"CI helpers to setup Nim using prebuilt nightlies"
15:37:55FromDiscord<kaushalmodi> In reply to @dom96 "Cool, that's on my": Last time I checked, choosenim devel installed very old binaries.
15:38:28FromDiscord<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:46FromDiscord<leorize> the issue is that devel doesn't test all packages, so naturally packages test devel instead↵(@dom96)
15:39:28FromDiscord<kaushalmodi> @Vindaar hmm.. or may be I shouldn't be worrying about that 🙂
15:39:55FromDiscord<dom96> I'm using this one: https://github.com/iffy/install-nim. Works well so far.
15:39:56FromDiscord<saem> Fixing choosenim so it has an actually working nim-gdb setup would also be good.
15:40:16FromDiscord<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:35FromDiscord<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:35FromDiscord<dom96> Interesting, do you push Nim to the limits? 🙂
15:41:36FromDiscord<haxscramper> In reply to @dom96 "Apart from that, already": When do you plan to do this?
15:41:38FromDiscord<dom96> (edit) "the" => "its"
15:41:59FromDiscord<dom96> In reply to @haxscramper "When do you plan": tomorrow morning
15:42:01FromDiscord<kaushalmodi> In reply to @dom96 "Interesting, do you push": I do push Nimscript to the limits
15:42:13FromDiscord<dom96> In reply to @haxscramper "When do you plan": you wanna join? 🙂
15:42:17FromDiscord<kaushalmodi> Also I use C FFI heavily
15:42:22FromDiscord<dom96> (assuming Araq is cool with it)
15:43:14FromDiscord<haxscramper> In reply to @dom96 "you wanna join? 🙂": no, I just wanted to know apporximate time
15:43:14FromDiscord<vindaar> what does that even mean?↵(@dom96)
15:43:41FromDiscord<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:43FromDiscord<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:59FromDiscord<kaushalmodi> @dom96 Yes, that's what I was doing on Travis.. cron
15:44:00FromDiscord<dom96> but yes, you will still need choosenim to work
15:44:05FromDiscord<dom96> ahh cool
15:44:06FromDiscord<kaushalmodi> I'll set up the same crons on GHA
15:44:20FromDiscord<dom96> I see far too many people setting up a CI on every commit in their repo against devel 🙂
15:44:26FromDiscord<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:33FromDiscord<dom96> we'll likely comment in the PR with a summary so you can see what our thoughts are
15:52:36FromDiscord<kaushalmodi> @Vindaar @leorize Thanks! for `alaviss/setup-nim` GHA. It Just Worked (TM)
15:52:46*maxime_ quit (Ping timeout: 246 seconds)
15:55:44FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rF2
15:55:55FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3rF3
15:57:13FromDiscord<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:57FromDiscord<dom96> In reply to @haxscramper "What does `Failure: reNimcCrash`": guessing the compiler crashed?
15:59:42FromDiscord<haxscramper> On `echo "assert 42 == 42"`?
16:00:11FromDiscord<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:32FromDiscord<haxscramper> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/860187921080647702): On `assert 42 == 42`?
16:11:41fn<leth99> what does 'Error: typechecked nodes may not be modified' mean?
16:16:40fn<leth99> hmm.. can generate a new statment list i guess.
16:20:56fn<leth99> no i couldn't, then it complained when i did copyChildrenTo instead.
16:21:27fn<leth99> hmm.. why is it even typechecked? when would it be typechecked?
16:38:21fn<leth99> sorry about that, was a bit confused by the compiler output.
16:52:50*max22- joined #nim
17:09:29FromDiscord<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:16FromDiscord<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:36FromDiscord<SolitudeSF> thats a feature, unused cpu/memory is wasted
17:11:40FromDiscord<Jasmine and Don't Forget!~> Ah yes, truly efficient
17:12:19FromDiscord<Jasmine and Don't Forget!~> I'm using nim with godot and it's very nice
17:13:14FromDiscord<Bung> what vscode plugin you use?
17:13:56FromDiscord<Jasmine and Don't Forget!~> Just the nim one
17:14:52FromDiscord<SolitudeSF> there are 3 nim ones
17:15:08FromDiscord<Jasmine and Don't Forget!~> https://media.discordapp.net/attachments/371759389889003532/860206903119052860/Screen.png
17:15:27FromDiscord<Jasmine and Don't Forget!~> I use vscodium and this is the only one I can see
17:16:07FromDiscord<Rika> saem's is the most maintained one
17:16:58FromDiscord<Jasmine and Don't Forget!~> Well, it seems to have stopped a little
17:17:11FromDiscord<Jasmine and Don't Forget!~> it was just a bunch of "nim checker" or something
17:19:13FromDiscord<Jasmine and Don't Forget!~> in the task manager
17:19:32FromDiscord<exelotl> this is a known issue, it's a problem with Nimsuggest which is used by all the Nim editor extensions
17:21:03FromDiscord<Jasmine and Don't Forget!~> Thank you, whenever I was using it my monitors would freak out and stuff
17:21:11FromDiscord<Jasmine and Don't Forget!~> I had to reset my computer multiple times
17:21:29FromDiscord<Jasmine and Don't Forget!~> But like, I like nim a lot
17:21:35FromDiscord<exelotl> I think it's on the roadmap to fix it this year after Nim 1.6 comes out
17:21:36FromDiscord<Jasmine and Don't Forget!~> so I just powered through it
17:21:42FromDiscord<Jasmine and Don't Forget!~> Awesome
17:23:27FromDiscord<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:38FromDiscord<Jasmine and Don't Forget!~> (edit) "got" => "go"
17:23:54FromDiscord<Rika> well thats true, if you want money you do whatever is the biggest thing
17:24:42FromDiscord<Jasmine and Don't Forget!~> Yeah, but he said it would never take off
17:24:44FromDiscord<Rika> if you're not a nerd then i assume you're not a good programmer though...
17:24:51FromDiscord<Rika> well who do you believe
17:25:02FromDiscord<dom96> Nim has already taken off
17:25:03FromDiscord<Rika> would you some rando in youtube
17:25:04FromDiscord<Jasmine and Don't Forget!~> but like, people said python would never take off, I'm sure
17:25:07FromDiscord<Rika> would you believe some rando
17:25:12FromDiscord<Jasmine and Don't Forget!~> No, I love nim a lot
17:25:12FromDiscord<Rika> yes
17:25:14FromDiscord<dom96> You're here aren't you?
17:25:14FromDiscord<Rika> they did say that
17:25:23FromDiscord<Jasmine and Don't Forget!~> it's probably my favorite language
17:25:23FromDiscord<dom96> that's all Nim needs
17:25:41FromDiscord<Jasmine and Don't Forget!~> Wooooow, the real programming the friends we made along the way
17:25:44FromDiscord<Jasmine and Don't Forget!~> Lmao
17:26:01FromDiscord<Rika> no one can really tell what takes off or not
17:26:14FromDiscord<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:32FromDiscord<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:38FromDiscord<Jasmine and Don't Forget!~> Oh no! an F word! And yeah, he was a real dick
17:26:42FromDiscord<Jasmine and Don't Forget!~> Awesome, what is it?
17:27:00FromDiscord<dom96> just disable auto completion, that's what I do
17:27:21FromDiscord<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:24FromDiscord<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:25FromDiscord<saem> Once you do that it'll only start one nimsuggest process per project file rather than per nim file.
17:27:27fn<R2D299> itHub: 7"<No Description>"
17:27:28FromDiscord<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:25FromDiscord<konsumlamm> if nimsuggest is the problem, writing a wrapper around it probably won't solve anything
17:29:01FromDiscord<leorize> nimsuggest is the problem, and the only fix is to have Araw finishes IC
17:29:02FromDiscord<Bung> saem yours is one suggest instance per file ?
17:29:03FromDiscord<dom96> it will solve the CPU melting problem
17:29:08FromDiscord<leorize> Araq\
17:29:11FromDiscord<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:23FromDiscord<Jasmine and Don't Forget!~> lmao
17:29:29FromDiscord<Jasmine and Don't Forget!~> I found my programmer friends, hi
17:29:45fn<ForumUpdaterBot99> New thread by Argl: Bit of a rough experience registering to the forum, see https://forum.nim-lang.org/t/8182
17:30:07FromDiscord<Jasmine and Don't Forget!~> But yeah, I'm using nim in godot, so I have to build a lot
17:30:24FromDiscord<Bung> I only face this problem when I open `moe` project
17:30:25FromDiscord<dom96> here is a chart for you: https://media.discordapp.net/attachments/371759389889003532/860210749099081768/unknown.png
17:30:33FromDiscord<dom96> Active Choosenim users
17:30:49FromDiscord<dom96> in the last year
17:30:51FromDiscord<haxscramper> And absolute numbers are?
17:31:00FromDiscord<dom96> That's a secret 😛
17:31:02FromDiscord<konsumlamm> 2020/2021?
17:31:19FromDiscord<dom96> yep, actually it's Jan 2020 till today
17:31:28FromDiscord<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:00FromDiscord<Jasmine and Don't Forget!~> But I really like nim because of how fast it is for godot
17:32:56FromDiscord<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:09FromDiscord<Bung> have you tried mine https://github.com/bung87/vscode-nim-lsp
17:33:10fn<R2D299> itHub: 7"vscode nim extension using LSP server write in nim"
17:34:16FromDiscord<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:27FromDiscord<haxscramper> In reply to @matf "👋 what are my": You can pass a logger object to the procedure instead of `echo` for data.
17:34:39FromDiscord<haxscramper> So basically add layer of indirection that allows you to inject tests
17:34:47FromDiscord<haxscramper> Or use `testament`, it can check for stdout
17:34:51FromDiscord<exelotl> after goodboy I might make a 3D game, in which case Godot with Nim will be a strong contender
17:35:00FromDiscord<matf> @haxscramper in my actual use case it's not writing to the terminal, it was just for an example.
17:35:19FromDiscord<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:40FromDiscord<haxscramper> Then you need layer of indirection in the form interface proc/object that gets written into
17:35:46FromDiscord<haxscramper> that you write data to
17:35:49FromDiscord<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:37FromDiscord<exelotl> still don't know the exact date but we're really close
17:36:49FromDiscord<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:02FromDiscord<exelotl> woah thanks haha
17:37:19FromDiscord<dom96> guess I should add deploying new forum to my list of todos for this weekend
17:37:28FromDiscord<zetashift> should probably thank jyapayne and dom96 for all their help
17:37:40FromDiscord<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:40FromDiscord<Jasmine and Don't Forget!~> Sorry, my pc crashed https://media.discordapp.net/attachments/371759389889003532/860212573026517022/nimsuggest.png
17:37:47FromDiscord<Jasmine and Don't Forget!~> got these screenshots, though
17:37:47FromDiscord<dom96> In reply to @zetashift "should probably thank jyapayne": thank you! I'm really happy we're getting forum contributions
17:37:54FromDiscord<Jasmine and Don't Forget!~> https://media.discordapp.net/attachments/371759389889003532/860212629808218142/nimSuggest.png
17:37:55FromDiscord<matf> (edit) "approach." => "approach in Nim."
17:37:55FromDiscord<dom96> just wish I set it up to make deployments easier
17:38:00FromDiscord<Jasmine and Don't Forget!~> I have 10 gigs, btw
17:38:12FromDiscord<dom96> but that was before I learned the tricks I know now 🙂
17:38:29FromDiscord<exelotl> wooww you you definitely want to set the `project` setting like saem suggested
17:38:39FromDiscord<exelotl> (edit) "you" => "yeah"
17:38:52FromDiscord<Bung> @Jasmine and Don't Forget!~ I suggest try mime extension
17:38:55FromDiscord<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:03FromDiscord<haxscramper> In reply to @matf "<@!608382355454951435> yeah I'm struggling": You can pass a callback proc, just `cb: proc(a: string)`
17:39:20FromDiscord<zetashift> In reply to @Bung "<@!460666142017454080> I suggest": I use your nimlsp fork for neovim btw, great stuff!
17:39:24FromDiscord<haxscramper> And closure can modify environment variables, so
17:39:39*vsantana joined #nim
17:40:05FromDiscord<dom96> In reply to @exelotl "wooww yeah you definitely": if these are the recommended settings why aren't they default?
17:40:37FromDiscord<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:47FromDiscord<exelotl> well you need to tell it what your project file is, it can't figure it out by default
17:41:33FromDiscord<zetashift> In reply to @Bung "<@77574388035100672> yeah, that one": yeah it crashes a lot for me too, but troubleshooting it is hard
17:41:47FromDiscord<exelotl> (edit) "default" => "itself"
17:42:43FromDiscord<Bung> yes, it's hard , someing related to compiler some releated to suggest that not easy be fixed.
17:42:49FromDiscord<Jasmine and Don't Forget!~> Okay, I just turned off nimsuggest all togetehr
17:42:52FromDiscord<Jasmine and Don't Forget!~> (edit) "togetehr" => "together"
17:43:12FromDiscord<Jasmine and Don't Forget!~> That was awful, lmao
17:43:27FromDiscord<Jasmine and Don't Forget!~> after fighting with my computer because opening vs code made it sputter
17:44:13FromDiscord<dom96> Yeah, I just disable it in whatever extension's settings I am using
17:44:42FromDiscord<dom96> A simple search-based autocomplete works good enough most of the time
17:46:21FromDiscord<Bung> that's true, it works that dont need nim file can be successful compiled
17:46:38fn<leth99> syntax highlighting is pretty nice though.
17:47:10fn<Prestige99> I need to figure out why messages from discord are bold over the bridge 🤔
17:47:16FromDiscord<Bung> all vscode for nim syntax highlight is done by client side
17:48:25FromDiscord<Bung> well, it will not work if lsp server crash many times, vscode will disable it automatically.
17:48:52FromDiscord<dom96> FromDiscord bolds them I think
17:51:04FromDiscord<timotheecour> In reply to @dom96 "So I have tomorrow": can you please review the 4 PRs i sent in (httpbeast, and jesteR)
17:51:16FromDiscord<timotheecour> (edit) "jesteR)" => "jester)"
17:51:22FromDiscord<dom96> yep, will do
17:51:27FromDiscord<timotheecour> thx!
17:54:34FromDiscord<Jasmine and Don't Forget!~> does nim have anything like rust's --doc generation?
17:55:11FromDiscord<timotheecour> nim doc
17:55:13FromDiscord<dom96> @timotheecour out of curiosity, are you using these for any of your own projects?
17:55:19FromDiscord<timotheecour> ya
17:56:24FromDiscord<timotheecour> (edit) "ya" => "ya, not a YAGNI"
17:56:24FromDiscord<dom96> cool, anything open source or that you're willing to share more info about?
17:56:45FromDiscord<timotheecour> not at this point 🙂
17:57:22FromDiscord<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:18FromDiscord<timotheecour> is there any reason `{.inline.}` is used in sigmatch? seems like sigmatch should ignore it
18:29:55fn<ForumUpdaterBot99> New thread by Jaybill: Sega Genesis, see https://forum.nim-lang.org/t/8183
18:48:54FromDiscord<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:31FromDiscord<matf> sent a code paste, see https://play.nim-lang.org/#ix=3rGh
18:51:02FromDiscord<matf> sent a code paste, see https://play.nim-lang.org/#ix=3rGi
18:52:08FromDiscord<matf> (edit) "https://play.nim-lang.org/#ix=3rGi" => "https://play.nim-lang.org/#ix=3rGj"
18:52:55FromDiscord<haxscramper> yeah, that would work just fine
18:54:37FromDiscord<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:20FromDiscord<saem> OMG, a wrapper will do no such thing as solve the melting problem.
19:00:42FromDiscord<mratsim> In reply to @Jasmine and Don't Forget!~ "Okay, I just turned": welcome to the club
19:01:26FromDiscord<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:22FromDiscord<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:53FromDiscord<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:10FromDiscord<Jasmine and Don't Forget!~> I thought it might have been a godot issue
19:03:18FromDiscord<Jasmine and Don't Forget!~> but for the most part it's working fine now
19:03:43FromDiscord<saem> I've never used nim godot, but I imagine there is only one file you ever compile?
19:04:00FromDiscord<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:14FromDiscord<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:36fn<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:37fn<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:30fn<ForumUpdaterBot99> New thread by Niminem: Help for Sending Input Data To REPL, see https://forum.nim-lang.org/t/8184
20:40:46FromDiscord<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:35FromDiscord<planetis> that OO has the fields of O
21:02:43*PMunch quit (Quit: leaving)
21:04:20FromDiscord<dom96> Nim's async really does mirror Nim's threads a lot: https://forum.nim-lang.org/t/8153#52643
21:05:09FromDiscord<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:54FromDiscord<zetashift> In reply to @saem "I've never used nim": sortof: example app game https://github.com/geekrelief/gdnim_hb_arpg
21:07:56fn<R2D299> itHub: 7"Conversion of HeartBeat's ARPG tutorial to use gdnim"
21:08:42FromDiscord<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:40FromDiscord<reilly> sent a code paste, see https://play.nim-lang.org/#ix=3rH6
21:29:13FromDiscord<reilly> (edit) "https://play.nim-lang.org/#ix=3rH6" => "https://play.nim-lang.org/#ix=3rH7"
21:29:58FromDiscord<reilly> (edit) "https://play.nim-lang.org/#ix=3rH7" => "https://paste.rs/9Eu"
21:37:49FromDiscord<dom96> This isn't a Haxe server
21:38:50FromDiscord<dom96> Why is O3 considered unstable? Got any links?
21:57:38FromDiscord<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:25FromDiscord<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:04FromDiscord<dom96> @timotheecour reviewed https://github.com/dom96/httpbeast/pull/47, just needs a few changes
22:01:04FromDiscord<leorize> s/flag/optimization
22:01:06FromDiscord<leorize> I think it's mostly because O3 enables more optimizations that depends on a lot of undefined behaviors
22:05:06FromDiscord<matf> @saem thanks. I've tried a pure record of functions.. I think it's the easiest?
22:05:56FromDiscord<matf> sent a code paste, see https://play.nim-lang.org/#ix=3rHc
22:06:17FromDiscord<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:24FromDiscord<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:27FromDiscord<saem> Why not just swap out implementation via a when if you want to test?
22:08:27FromDiscord<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:56FromDiscord<matf> Hah. Probably because I didn't even know you could do that 🙂
22:09:09FromDiscord<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:24FromDiscord<saem> Well you could make it pretty nifty with a simple template, me thinks
22:09:37FromDiscord<matf> (edit) "injection" => "injection. e.g. I have some `proc doStuff(terminal: TerminalFunctions): void`"
22:12:25FromDiscord<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:09FromDiscord<timotheecour> @dom96 just replied
22:31:37FromDiscord<Jasmine and Don't Forget!~> May i ask for help here?
22:33:06FromDiscord<timotheecour> ask for forgiveness, not permission
22:33:26FromDiscord<Jasmine and Don't Forget!~> Lol, okay
22:33:43FromDiscord<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:58FromDiscord<Jasmine and Don't Forget!~> How do i do terminal font?
22:34:02FromDiscord<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:04FromDiscord<Jasmine and Don't Forget!~> got it
22:34:15FromDiscord<Jasmine and Don't Forget!~> okay, this is gdscripts
22:34:16FromDiscord<Jasmine and Don't Forget!~> (edit) "gdscripts" => "gdscript"
22:34:24FromDiscord<Jasmine and Don't Forget!~> I have no clue how to do basis in nim
22:34:42FromDiscord<Jasmine and Don't Forget!~> `` # Process movement↵ dir = head.rotation.z``
22:34:52FromDiscord<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:57FromDiscord<Jasmine and Don't Forget!~> here's what I have, but I have no clue how to get a similar result
22:35:10FromDiscord<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:43FromDiscord<Jasmine and Don't Forget!~> I'm trying to copy over a quake character controller from gdscript to nim
22:35:47FromDiscord<dom96> as for breakage, I think we can just document it, people will hopefully forgive me (they should be using initSettings anyway :))
22:36:16FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=3rHj
22:36:28FromDiscord<timotheecour> so do you want me to change Option to bool?
22:36:38FromDiscord<dom96> (edit) "https://play.nim-lang.org/#ix=3rHj" => "https://play.nim-lang.org/#ix=3rHk"
22:36:46FromDiscord<Jasmine and Don't Forget!~> sent a code paste, see https://play.nim-lang.org/#ix=
22:37:30FromDiscord<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:41FromDiscord<saem> @matf\: https://play.nim-lang.org/#ix=3rHi
22:39:26FromDiscord<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:46FromDiscord<timotheecour> maybe a `-d:httpbeastLegacyReusePort`. could be used later if ppl complain to change the default temporarily
22:40:57FromDiscord<timotheecour> (edit) "temporarily" => "for a transition period"
22:41:04FromDiscord<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:28FromDiscord<dom96> well reusePort should still be `true` by default in `initSettings`
22:43:14*stkrdknmibalz joined #nim
22:43:40FromDiscord<dom96> or maybe what we should do instead is only have this field take effect when threads are not enabled
22:43:41FromDiscord<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:00FromDiscord<dom96> but then a better name would be warranted
22:44:59FromDiscord<dom96> `nonthreadedReusePort` or similar (is there an antonym for `parallel` we could use?)
22:45:11FromDiscord<zetashift> sent a code paste, see https://play.nim-lang.org/#ix=3rHm
22:45:58FromDiscord<Jasmine and Don't Forget!~> Thank you so much
22:46:01FromDiscord<zetashift> @Jasmine and Don't Forget!~ what type is Head?
22:46:04FromDiscord<zetashift> or what type of node
22:46:06FromDiscord<Jasmine and Don't Forget!~> camera
22:46:52FromDiscord<matf> @saem and gotta learn macros now 🙂
22:47:24FromDiscord<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:06FromDiscord<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:18FromDiscord<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:57FromDiscord<Jasmine and Don't Forget!~> i am... kind of angry I couldn't find it
22:50:58FromDiscord<Jasmine and Don't Forget!~> ngl
22:51:08FromDiscord<Jasmine and Don't Forget!~> But that you so much, this should help me be able to do it
22:51:11FromDiscord<zetashift> there is also https://github.com/geekrelief/gdnim which has some more fancy stuff
22:51:14fn<R2D299> itHub: 7"godot-nim based bootstrapping framework supporting hot reloading"
22:51:40FromDiscord<matf> @saem this is blowing my mind a little. I need to think about this.
22:51:58FromDiscord<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:42FromDiscord<Jasmine and Don't Forget!~> Oh yeah, i've already generated it
22:52:57FromDiscord<Jasmine and Don't Forget!~> i expected it to be a thing I could call, not an entire module
22:53:00FromDiscord<saem> @matf\: yeah, automated copy and paste is kinda bananas. \:D
22:53:27FromDiscord<saem> Just wait until you zoom past this and then you take a look at CPS (don't just yet).
22:55:31FromDiscord<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:06FromDiscord<dom96> In reply to @timotheecour "<@!132595483838251008> how about": the other threads will crash though
22:58:44FromDiscord<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:46FromDiscord<saem> Basically go hog wild. \:D
22:58:53FromDiscord<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:14FromDiscord<ElegantBeef> Anything you can write by hand macros can generate
22:59:19FromDiscord<ElegantBeef> So yea you have unlimited power 😄
22:59:54FromDiscord<ElegantBeef> Though typed macros are more difficult to traverse
23:00:57fn<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:06FromDiscord<dom96> Just remember: with great power comes great responsibility:)
23:01:32FromDiscord<ElegantBeef> Fuck responsibility, make fancy shit that doesnt help anyone till the cows come home! ;P
23:01:34FromDiscord<ElegantBeef> (edit) ";P" => "😛"
23:01:48FromDiscord<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:11FromDiscord<timotheecour> (subject to TOCTOU but should at least catch most bugs)
23:02:35FromDiscord<ElegantBeef> I can hear varriount foaming at the mouth cause of that comment
23:04:25FromDiscord<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:42FromDiscord<dom96> @timotheecour why though? I don’t see the need for doing this
23:05:24FromDiscord<ElegantBeef> I was talking about the TOCTOU comment
23:05:53FromDiscord<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:04FromDiscord<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:05FromDiscord<ElegantBeef> I'm toying with min and anyone know how to do string concatenation there? 😄
23:10:44FromDiscord<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:09FromDiscord<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:52FromDiscord<dom96> I’m asking what your use case is
23:15:02FromDiscord<dom96> So I can suggest the best implementation
23:15:16FromDiscord<dom96> You’re just telling me the implementation you want
23:18:01FromDiscord<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:33FromDiscord<dom96> Okay. So I ask again. Can you live with httpbeast running in single threaded mode?
23:22:53FromDiscord<timotheecour> why should it be either/or; multithread increases availability
23:23:39FromDiscord<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:06FromDiscord<timotheecour> (edit) "reusePort" => "`reusePort=false`"
23:24:37FromDiscord<dom96> Because indeed for threads>1 solving this is a pain
23:25:39FromDiscord<dom96> But sure. Let’s do that but instead of ignoring it throw an exception when reusePort is false and threads>1
23:25:59FromDiscord<dom96> I need to head to bed now. Night 🙂
23:29:31FromDiscord<ElegantBeef> Timothee i dont think your suggested refactor for that case statement is the same logic 😄
23:29:54FromDiscord<ElegantBeef> Ah nvm i'm dumb