<< 19-12-2025 >>

00:02:29FromDiscord<mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=IVejmVNC
00:08:57FromDiscord<mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=CasGwDuT
00:09:06FromDiscord<mjsdev> Finally free of atlas and nimble
00:09:52FromDiscord<mjsdev> A few more commands to round out, then need to actually make a fully functional dependency solver.
00:15:03FromDiscord<mjsdev> not bad for one week
01:31:00FromDiscord<Robyn [She/Her]> What took me a couple of months from procrastination, you did in a week, christ, I applaud you↵(@mjsdev)
01:31:22FromDiscord<mjsdev> you wrote a package manager?
01:32:32FromDiscord<Robyn [She/Her]> Yeah, specifically for Nimskull tho, it has some features that requires compiler support (and I added compiler support in a fork)
01:32:51FromDiscord<mjsdev> Granted I'm laid off, and although I have other projects, a number of them are in nim and with early stage framework libraries (i.e. not really versioned) which atlas and nimble just kinda suck at.
01:32:56FromDiscord<Robyn [She/Her]> Tis this: https://github.com/Luyten-Orion/FaePkg/↵Linked to it earlier
01:33:20FromDiscord<Robyn [She/Her]> In reply to @mjsdev "Granted I'm laid off,": I'm a Uni student and have been slow on personal projects tbf, yeah
01:33:32FromDiscord<Robyn [She/Her]> I also write some absolute slop of some code
01:34:22FromDiscord<mjsdev> Well, in fairness, you may have a better overall architecture as the README seems to suggest you have adapters. I was contemplating doing an adapter design but ended up hard coding git stuff (will change later if needed)... that said, I"m not sure hg even has a comparison to git worktrees, but presumably it could just do a checkout from a local repo.
01:34:26FromDiscord<mjsdev> Also not sure if it has bare repos.
01:35:27FromDiscord<mjsdev> and technically have a completely non-working solver right now, although top-level exclusions and inclusion tracking during the graph build gets you 90% of the way there I think.
01:35:43FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=FzElfqjE
01:35:56FromDiscord<mjsdev> Yeah, but I don't even have that, lol
01:36:04FromDiscord<Robyn [She/Her]> In reply to @mjsdev "and technically have a": Inclusion tracking? Exclusions?
01:36:10FromDiscord<mjsdev> I literally have an update method on a repository that just execs git fetch
01:36:48FromDiscord<Robyn [She/Her]> That's fair honestly, won't be hard to update it prolly
01:37:02FromDiscord<mjsdev> So when I build the graph -- if a commit is excluded by top-level version constraints its removed from all commits to check for subsequent deeper levels. Then I track which packages the deeper level version constraints cover.
01:37:12FromDiscord<mjsdev> So the final graph is only what's "usable" -- though not solved.
01:37:14FromDiscord<mjsdev> Maybe that's normal
01:37:23FromDiscord<mjsdev> Not sure, never wrote one of these
01:37:53FromDiscord<Robyn [She/Her]> It's also my first time too :D↵> deeper levels↵What does that mean? Do you have an example maybe?
01:40:35FromDiscord<mjsdev> So, at the top level if my project says Nim >= 2.0.0 -- then I exclud everything < 2.0.0... so if a dependency 2 levels down say, I also need A and A needs B and B says Nim > 1.8.0, then 1.8.0 -> <2.0.0 are not even looked at. That's the exclusion bit.
01:42:33FromDiscord<mjsdev> So that's the sort of "input commit pool" (which shrinks from top level constraints), from there, I search all commits in that pool for subsequent non-top level dependencies, and add commits to a separate tracking HashSet only if they pass the version constraints of the given package. As opposed to simply adding that package requirements and solving across the entire reamining commit pool.
01:42:44FromDiscord<mjsdev> Again, this is probably normal and I'm just not explaining it well
01:44:03FromDiscord<mjsdev> top level exclusions just mean less iterations if the top level is clear about what is not welcome, and the tracking inclusions just means less commits to solve as there will never be a commit in the final available commits that matches no possible dependencies constraints.
01:45:03FromDiscord<Robyn [She/Her]> In reply to @mjsdev "So, at the top": I think that makes sense sorta
01:46:03FromDiscord<mjsdev> nimsimd requirement on neo for example resulted in possible package versions that when passed to the solver would have never been solved, as they were outside of any given packages versions's dependency constraints. In fairness, it really only came about because that was causing a bug where those packages had unresolved nimble information.
01:46:21FromDiscord<mjsdev> since I only resolved the nimble files of things that matched SOME package somewhere's constraints.
01:47:12FromDiscord<mjsdev> Hypothetically if you weren't doing that optimization, you could have a much larger graph that would just remove solutions including those packages later, as they'd always give a false result.
01:47:47FromDiscord<mjsdev> so theoretically maybe some package managers work like that
01:48:33FromDiscord<mjsdev> i.e. leave it all up to the solver -- in theory you could also not exclude things not matching top level
01:48:47FromDiscord<mjsdev> e.g. literally jsut come up with an entire dependency graph across all commits for all packages
01:48:52FromDiscord<mjsdev> and then solve it
01:50:24FromDiscord<Robyn [She/Her]> In reply to @mjsdev "nimsimd requirement on neo": Oh huh, really?
01:50:42FromDiscord<Robyn [She/Her]> > unresolved nimble information↵Such as no version declaration in the requires?
01:51:21FromDiscord<Robyn [She/Her]> I've ran into that and decided to just default to `HEAD`, though I should really make it so that the developer depending on a package like that, needs to declare it in their own manifest :/
01:51:38FromDiscord<mjsdev> It was actually that there wasn't an srcDir defined... I wrote some stuff to allow you to add build/test tasks to your config.nims, so I was testing on using percy to install dependencies and build other package managers (atlas and neo)
01:51:46FromDiscord<mjsdev> using percy's build tasks
01:51:57*alexdaguy joined #nim
01:52:17FromDiscord<mjsdev> when I tried to do it on neo, I ran into a situation where nimsimd was being used in the code, but the --path: was set wrong, because it didn't have the right srcDir from the .nimble file
01:52:18FromDiscord<Robyn [She/Her]> In reply to @mjsdev "Hypothetically if you weren't": That's what I did yeah, I prune all the package's dependencies after rereading a manifest, and then adding the new dependencies back
01:53:18FromDiscord<mjsdev> Which I traced down to the fact that I obviously don't bother checking .nimble files for versions of packages which don't match any version constraint.
01:53:21FromDiscord<Robyn [She/Her]> In reply to @mjsdev "It was actually that": Ahhh, yeah when it isn't defined, iirc it defaults to the same dir as the Nimble file
01:53:34FromDiscord<mjsdev> Right, but it was defined
01:54:01FromDiscord<Robyn [She/Her]> In reply to @mjsdev "Which I traced down": Yeah, checking .nimble for versions is dum, idk why that decision was made in Nimble
01:54:07FromDiscord<mjsdev> it was just cause it ended up including a version that didn't actually match any possible constraints (cause again, my solver doesn't actually solve anything right now)
01:54:14FromDiscord<Robyn [She/Her]> Ahh
01:54:46FromDiscord<mjsdev> I had some package tracking before, but removed it cause it wasn't doing what I thought/wanted and was too aggressive.
01:55:47FromDiscord<mjsdev> So then when I realized that, I added it back in to just ensure anything actually resolved is tracked and to only read the tracked packages for the solution (instead of the graph of all possible versions for all included packages).
01:56:15FromDiscord<mjsdev> anyway, it sucessfully installs deps and builds both atlas and neo now
01:56:40FromDiscord<mjsdev> but without a proper solver, it's only a matter of time before the happy path of highest versions doesn't work for something more complicated/complex.
01:57:17FromDiscord<mjsdev> but I want to get the `require` and `remove` commands for managing `.nimble` files in, and possibly actually get my hooks working
01:57:22FromDiscord<Robyn [She/Her]> Yeah that makes sense, still, it works rn so that's all you need ;p;
01:57:30FromDiscord<Robyn [She/Her]> Hooks?
01:58:03FromDiscord<mjsdev> Yeah... you can add nimscript files to something like `/hooks/install/before/dosomething.nims`
01:58:22FromDiscord<mjsdev> So before installing a package percy should run all files in /hooks/install/before/
01:58:32FromDiscord<mjsdev> then after, all those in /hooks/install/after/
01:58:53FromDiscord<mjsdev> Nimble has hooks in the style of:↵↵before install:
01:58:59FromDiscord<mjsdev> (edit) "install:" => "install:↵ ...."
01:59:06FromDiscord<mjsdev> in the .nimble file itself
01:59:07FromDiscord<Robyn [She/Her]> Ahhh
01:59:15FromDiscord<Robyn [She/Her]> I think that's dumb ngl :P
01:59:19FromDiscord<mjsdev> (edit) "Nimble has hooks in the style of:↵↵before install:↵ ...." => "sent a code paste, see https://play.nim-lang.org/#pasty=VjTkHLoA"
01:59:34FromDiscord<mjsdev> I want to move them to a folder.
01:59:46FromDiscord<Robyn [She/Her]> Idk what the purpose of hooks are, unless it's something like building a C library before building a Nimble library?
02:00:04FromDiscord<mjsdev> I would use them pretty extensively actually
02:00:13FromDiscord<Robyn [She/Her]> Oh? Why?
02:00:49FromDiscord<mjsdev> I write much more framework level stuff. So with Mininim if you `percy require mininim_web` and then `percy update` it should do things like create a `public` folder in your project.
02:01:17FromDiscord<mjsdev> Rather than that folder having to be in the base `mininim-app` package and you having to delete it if you're not using the web module
02:01:59FromDiscord<mjsdev> If that makes sense...
02:02:28FromDiscord<mjsdev> and if you remove it it should remove public
02:04:38FromDiscord<mjsdev> so I've had something like /hook/install/after/create-public.nims
02:05:01FromDiscord<mjsdev> (edit) "I've" => "I'd"
02:05:05FromDiscord<mjsdev> (edit) "had" => "have"
02:05:20FromDiscord<Robyn [She/Her]> In reply to @mjsdev "I write much more": Ahh, yeah I definitely do not like that idea
02:05:44FromDiscord<Robyn [She/Her]> I don't like hooks, unless the user explicitly triggers, like tasks
02:06:36FromDiscord<mjsdev> different strokes for different folks I guess... I spin up enough projects that doing the same things I always do or keeping 20 different skeletons for different purpsoes maintained just becomes a nightmare
02:08:33FromDiscord<mjsdev> (edit) "purpsoes" => "purposes"
02:13:06FromDiscord<mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=AxFkeRaR
02:13:42FromDiscord<mjsdev> Like if there's some kind of bug in 2.2.5 that breaks your stuff
02:14:03FromDiscord<mjsdev> maybe I should add a ! to make it more clear
02:17:14FromDiscord<mjsdev> You can also use package names with slashes (although that would also potentially break nimble compatibility as well), e.g.:↵↵requires "coolstuff/package ~1.2"
02:17:22FromDiscord<mjsdev> (edit) "You can also use package names with slashes (although that would also potentially break nimble compatibility as well), e.g.:↵↵requires "coolstuff/package ~1.2"" => "sent a code paste, see https://play.nim-lang.org/#pasty=EYRaVWnC"
02:17:40FromDiscord<mjsdev> which will install to /vendor/coolstuff/package
02:19:50FromDiscord<Robyn [She/Her]> In reply to @mjsdev "different strokes for different": That's fair
02:20:04FromDiscord<Robyn [She/Her]> In reply to @mjsdev "I'm also totally unclear": Oh nimble has a table I used to implement operations, actually
02:20:29FromDiscord<Robyn [She/Her]> In reply to @mjsdev "which will install to": Would `coolstuff` be something defined in your package repo?
02:20:35FromDiscord<Robyn [She/Her]> (edit) "`coolstuff`" => "`coolstuff/package`"
02:21:20FromDiscord<mjsdev> Yeah, you can add custom repos: `percy set source my-repo https://github.com/private/repository`
02:21:33FromDiscord<mjsdev> it just needs a `packages.json` folder
02:21:37FromDiscord<mjsdev> (edit) "folder" => "file"
02:22:19FromDiscord<mjsdev> with content like `[{"name": ..., "url": ...}, ...]`
02:22:29FromDiscord<Robyn [She/Her]> Ahhh
02:23:00FromDiscord<mjsdev> or if you want to add a one off you can:↵↵`percy set package coolstuff/package gh://coolstuff/package`
02:23:15FromDiscord<mjsdev> then use coolstuff/package in your .nimble files
02:23:29FromDiscord<mjsdev> instead of the URL
02:23:34FromDiscord<mjsdev> again, will break nimble compatibility
02:26:37FromDiscord<Robyn [She/Her]> Yeah that's fair
02:26:45FromDiscord<Robyn [She/Her]> In reply to @mjsdev "again, will break nimble": Yeahh
02:26:53FromDiscord<Robyn [She/Her]> I just decided to not use the Nimble format tbh
02:27:20FromDiscord<mjsdev> That's fair, it's tough when there's an existing eco system though
02:27:24FromDiscord<Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=TVfohzgr
02:27:39FromDiscord<Robyn [She/Her]> In reply to @mjsdev "That's fair, it's tough": I have surface-level integration :D
02:27:59FromDiscord<Robyn [She/Her]> Nimskull won't be using Nimble anyway, so making my own PM for it let me have some degree of freedom
02:29:33*rockcavera quit (Remote host closed the connection)
02:58:34*tokyovigilante quit (Ping timeout: 255 seconds)
06:05:17FromDiscord<mjsdev> sent a long message, see https://pasty.ee/nAPOnltc
06:06:03FromDiscord<mjsdev> like sure, nim has no requirements
06:06:09FromDiscord<mjsdev> so why not install?
06:15:55FromDiscord<mjsdev> ok, you can now install `percy` with `nimble`
07:51:15*th3r00t quit (Ping timeout: 240 seconds)
07:54:24*th3r00t joined #nim
08:46:28*beholders_eye joined #nim
09:07:23FromDiscord<bluewhale_unkown_x> hey what license does nim doc use?
09:07:29FromDiscord<bluewhale_unkown_x> MIT?
09:23:19*beholders_eye quit (Ping timeout: 255 seconds)
09:38:56*beholders_eye joined #nim
09:39:51*alexdaguy quit (Quit: w)
10:22:18FromDiscord<janakali> In reply to @bluewhale_unkown_x "MIT?": https://github.com/nim-lang/Nim/blob/548b1c6ef8d3698bcf27d0535d3c418e4323f4cb/readme.md?plain=1#L197-L199↵> ## License↵> The compiler and the standard library are licensed under the MIT license, except↵> for some modules which explicitly state otherwise.
10:41:10*om3ga quit (Ping timeout: 255 seconds)
10:42:26*om3ga joined #nim
11:13:35*om3ga quit (Quit: Bye)
11:25:13FromDiscord<bluewhale_unkown_x> In reply to @mjsdev "anyone know what this": I think this error is from package installation ↵not nim installation↵some nimble packages sets lowest required nim version
13:07:35*th3r00t quit (Ping timeout: 240 seconds)
14:16:59FromDiscord<mjsdev> In reply to @bluewhale_unkown_x "I think this error": But the sequence is empty... and Nim doesn't require anything. It was erroring like a missing requirement, but only listed Nim with a set of empty requirements.
14:21:40*om3ga joined #nim
14:22:22om3gahi! Is it possible to force rebuild the nim installed by choosenim?
14:23:03om3gait keeps downloading the tarball, but here I have armv6 and the tarball is x86
14:24:36FromDiscord<mjsdev> My solution to most problems with fetch and build tools not doing things right is to delete every directory and start over, maybe try `grabnim` after you delete it though.
14:25:24FromDiscord<mjsdev> I suspect if choosenim keeps grabbing the same tarball, it's not about to suddenly start grabbing the right one.
14:26:35om3gamjsdev thnx, I will try to compile manually
14:31:22FromDiscord<pmunch> That sounds like a bug with choosenim, please report it
14:32:10om3gapmunch, sure
14:32:43om3gaalso another question, is there any way to override gcc/clang compiler option?
14:33:14om3gahere I have 218mb of ram, and -pipe option stores all in ram
14:33:22om3gaI want to remove it
14:34:09om3gaor it is integrated in nim compiler, and it's not possible to omit it?
14:37:56FromDiscord<nnsee> if you want, i can compile an armv6 build for you and send you the tarball
14:38:21FromDiscord<nnsee> linux i presume?
14:39:12om3gannsee thhans, no worries!
14:39:24om3gaIn any case I had to do it anyway
14:39:53FromDiscord<nnsee> alright
14:40:09FromDiscord<nnsee> fairly sure it should be possible to omit it
14:40:24FromDiscord<nnsee> but i'm on my phone right now and couldn't say off the top of my head
14:40:48om3gannsee, I will try to find it in manual
15:13:20FromDiscord<nnsee> In reply to @om3ga "<@961485620075720734>, I will try": I'm building from source right now and I don't see anything passing -pipe - are you sure you're not overriding it with a nim.cfg that has -pipe in it?
15:13:56FromDiscord<leorize> with 218mb you will have trouble compiling big projects
15:14:08FromDiscord<leorize> the compiler itself is pretty liberal wrt ram usage
15:14:41FromDiscord<nnsee> also grepping for `-pipe` in the repo doesn't come up with anything
15:16:27FromDiscord<del.nox> I love nim
15:25:13*th3r00t joined #nim
15:30:38FromDiscord<mjsdev> I love Nim and Percy
15:32:07FromDiscord<nnsee> who the hell is percy
15:32:37*_th3r00t joined #nim
15:33:15*th3r00t quit (Ping timeout: 240 seconds)
15:34:42FromDiscord<janakali> In reply to @om3ga "here I have 218mb": it's probably added by your system, see if it appears in `echo $CFLAGS`↵shouldn't affect nim compiler, because it doesn't read C envs↵but csources are compiled with `make`
15:34:58FromDiscord<mjsdev> Percy short for Perseus, the greek hero that turned Atlas into stone.
15:43:48FromDiscord<nasuray> In reply to @nnsee "who the hell is": The package manager he messages about every hour
15:43:54FromDiscord<nnsee> oh
15:44:01FromDiscord<nnsee> nice, always good to have alternatives
16:18:37*beholders_eye quit (Ping timeout: 264 seconds)
16:48:00FromDiscord<Buckwheat> perceez nuts↵(@nnsee)
16:52:46*beholders_eye joined #nim
16:54:36FromDiscord<mjsdev> In reply to @nasuray "The package manager he": If you prefer I not share progress, I can stop. But yes, I'm very proud of how far it's come in such a short period of time, and it's _extremely_ functional already despite not having a real solver yet. I'd argue outside of the solver, already better than all other options.
17:06:23FromDiscord<nnsee> In reply to @mjsdev "If you prefer I": don't let the sarcasm get to you :p i'm interested, continue letting us know please
17:11:19FromDiscord<saint._._.> What’s the main issue it fixes that atlas and nimble don’t do?
17:11:32FromDiscord<mjsdev> In reply to @nnsee "don't let the sarcasm": Oh, I don't let much of anything get to me. I'm building this primarily for me. I'm moreso inquiring that if "the community" really has no interest, then I'll just keep it for me.
17:14:08FromDiscord<mjsdev> sent a long message, see https://pasty.ee/LxcrLPwk
17:15:06FromDiscord<mjsdev> You could also read the README which is fairly extensive (or even try it on a project and report issues): https://github.com/mattsah/percy
17:17:07FromDiscord<mjsdev> I envision a world where every package is namespaced and every `.nimble` file is called `percy.nimble`
17:17:55FromDiscord<Buckwheat> every utterance of the name Percy, take a shot hehe
17:18:07FromDiscord<Buckwheat> let's see if you all survive!
17:19:25FromDiscord<nnsee> that's only 31 shots total as of right now, doesn't seem too bad
17:20:10FromDiscord<Buckwheat> better start slamming em, you've got 31 to go↵(@nnsee)
17:22:40FromDiscord<saint._._.> In reply to @mjsdev "I would recommend reading": Is there a way to generate a percy file from the imports in a project
17:22:45FromDiscord<saint._._.> I am guessing not?
17:23:08FromDiscord<threefour> Hybrid central/local deps being not a pain to deal with would be nice. Building a library is a mess.
17:24:18FromDiscord<mjsdev> In reply to @saint._._. "Is there a way": No, though cool feature idea. That said there's no real "percy file" -- percy.json is for package sources/repositories. Percy uses nimble files to track requirements.
17:24:35FromDiscord<Buckwheat> there is Nimby which seems to give me Go type vibes↵(@threefour)
17:24:57FromDiscord<Buckwheat> but not sure if that'd work for me as a BSD user, would need to test it
17:25:10FromDiscord<Buckwheat> it has a great model though
17:25:17FromDiscord<mjsdev> In reply to @threefour "Hybrid central/local deps being": It uses git worktrees. So far I've found them largely unbreakable (aside from legit bugs in my code).
17:25:22FromDiscord<saint._._.> In reply to @mjsdev "No, though cool feature": Is percy.json global?
17:25:27FromDiscord<mjsdev> no, per repo
17:25:36FromDiscord<mjsdev> (edit) "repo" => "project"
17:25:45FromDiscord<saint._._.> So I need to specify each time where the location of a require is?
17:25:51FromDiscord<mjsdev> default `percy init` only includes the official nim-lang package repository
17:25:55FromDiscord<mjsdev> No
17:26:01FromDiscord<mjsdev> You use package repositories
17:26:06FromDiscord<mjsdev> like nim-lang/packages
17:26:07FromDiscord<nnsee> In reply to @mjsdev "No, though cool feature": does it evaluate them (using nimscript) or simply parse the contents?
17:26:24FromDiscord<mjsdev> It parses contents
17:26:49FromDiscord<mjsdev> installs all requirements (regardless of conditions) -- in the README, but `require` sub-command will retain format/structure
17:26:55FromDiscord<mjsdev> though that command is not done yet
17:26:59FromDiscord<threefour> In reply to @Buckwheat "there is Nimby which": Do you a repo link? Not coming up
17:27:06FromDiscord<threefour> Have
17:27:21FromDiscord<mjsdev> so at present you'd just manually edit that file and re-run `percy install` if you had a new requirement or a change.
17:27:26FromDiscord<Buckwheat> https://github.com/treeform/nimby↵(@threefour)
17:27:38FromDiscord<threefour> Oh, of course it's treeform.
17:27:58FromDiscord<mjsdev> (edit) "that" => "the `.nimble`"
17:28:13FromDiscord<mjsdev> In reply to @threefour "Oh, of course it's": lol
17:28:25FromDiscord<Buckwheat> I can't speak on its quality as I've yet to try it, but it seems like it solves the issue in a way that appeals to me with a Go background, for all I know? could be garbage
17:28:54FromDiscord<Buckwheat> I have yet to have a single problem with Nimble in all honesty
17:29:20FromDiscord<mjsdev> Are you explicitly versionin/tagging out of the gate?
17:29:24FromDiscord<mjsdev> (edit) "versionin/tagging" => "versioning/tagging"
17:29:33FromDiscord<mjsdev> or do you create libs in early deve that just track HEAD or a branch?
17:30:20FromDiscord<threefour> In reply to @Buckwheat "I can't speak on": I meant it in a good way. They're responsible for quite a few widely used projects.
17:30:54FromDiscord<Buckwheat> ahh right, I kind of keep my head down in this space and don't really know who the key players are, if it wasn't apparent↵(@threefour)
17:30:59FromDiscord<mjsdev> The idea of having a `version =` in a file in the repo itself is anathema to my existence. From what I can tell you have to define _something_ there, even if tags take precedence (which I'm not always sure they do)... and forget it if your history is messed up at all on it.
17:31:17FromDiscord<Buckwheat> tbf I only came in here after having patched Futhark wanting to see if other BSD users could test to make sure I wasn't losing my mind with my patches
17:32:22FromDiscord<mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=lFoShgmh
17:33:01FromDiscord<mjsdev> No version, and packages with `/` in thir name.
17:33:09FromDiscord<mjsdev> (edit) "thir" => "their"
17:36:28*beholders_eye quit (Ping timeout: 256 seconds)
17:40:57*om3ga quit (Read error: Connection reset by peer)
17:41:54FromDiscord<nasuray> In reply to @nnsee "don't let the sarcasm": @mjsdev ya just ignore me, glad you are enjoying your work
17:43:23FromDiscord<nasuray> In reply to @mjsdev "Here's a pretty good": I would forgego .nimble files entirely if they aren't compatible
17:44:11FromDiscord<mjsdev> Nah, it should be 100% possible to create a percy.nimble file that's compatible only with percy, and still support existing packages with .nimble files
17:44:19FromDiscord<mjsdev> well.. not "shoudl be" -- it is possible, I'm doing it
17:44:43FromDiscord<mjsdev> (edit) ""shoudl" => ""should"
18:24:46FromDiscord<nasuray> I meant, I wouldn't use a broken nimble file not that you shouldn't support it at all or properly ingest them from downstream dependencies. Just feels confusing to users (but presumably a library would document that it's only compatible with Percy and not nimble)
18:26:50FromDiscord<mjsdev> I would imagine Percy-only libraries would never be submitted (or accepted) to nim-lang/packages
18:27:16FromDiscord<mjsdev> I don't know how strict things look there, but yeah, if someone tried to use the URL in nimble it would break.
18:27:20FromDiscord<mjsdev> so a warning is still good
18:28:09FromDiscord<mjsdev> Right now I have it so the two main packages that percy itself uses for my framework are nim compatible, the example above is from my web package, which is not nim compatible. Which I should go rename to percy.json
18:28:58FromDiscord<mjsdev> but if you look at mininim/core and mininim/cli they have a mininim_core.nimble and mininim_cli.nimble which is nimble compatible, pretty much _only_ to make installing percy through nimble possible
18:30:27FromDiscord<nasuray> In reply to @mjsdev "I would imagine Percy-only": Well Nimble is a decentralized package manager so referencing by url rather than name is valid.
18:32:23FromDiscord<mjsdev> In reply to @nasuray "Well Nimble is a": Yes, that's understood. Which leads to other possible oddities, like URLs being included in packages and those URLs having `.nimble` files with arbitrary package names. Speaking of which, not sure if you saw my question in tooling about package hijacking...
18:32:43FromDiscord<mjsdev> or if you know the answer... but it's something I was thinking about through building this
18:35:06FromDiscord<mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=eoyHcLsz
18:35:16FromDiscord<nasuray> In reply to @mjsdev "Yes, that's understood. ": I don't consider that "hijacking" changing the url changes the package a package is essentially just a git/mercurial repo. There are other hijacking concerns related to caching in the global nimble store though https://github.com/nim-lang/nimble/issues/1329
18:35:59FromDiscord<mjsdev> I'm not saying if you change the URL of a package you own
18:37:08FromDiscord<mjsdev> Let me give a more concrete example... let's say I release a leftpad library and 10,000 projects start using it (whether other libraries or apps doesn't matter), they're using my leftpad repo.
18:38:51FromDiscord<mjsdev> now I clone nim, which has a `nim.nimble` and I add to my `leftpad.nimble` something like `requires "https://github.com/nim-dang/nim >= 99.99.99` and update my forked and modified version of nim's `nim.nimble` file to say `version = 100.0.0` or whatever.
18:39:30FromDiscord<mjsdev> what happens when those other packages, which you my leftpad, upgrade my leftpad, and my leftpad now wants a higher version of nim, and is providing the repo where there's a `nim.nimble` corresponding to the necessary version
18:39:46FromDiscord<mjsdev> does my package get installed and used as nim?
18:40:29FromDiscord<mjsdev> I mean, nim is a silly example, but you get the point
18:40:50FromDiscord<mjsdev> since nim is a binary people already execute and has its own installed shared modules
18:41:02FromDiscord<mjsdev> but let's say it was this nimsimd thing that I see around a lot
18:43:51FromDiscord<nasuray> The compiler is special but regardless. The only thing nimble is doing is downloading repos and appending `--path:path/to/module` to a `nim c` call. I don't know exactly how what you describe plays out. Feel free to make a reproducible example of behavior you consider incorrect and open an issue.
18:43:52FromDiscord<mjsdev> like, I assume this is why atlas has package name conflict detection and `pkgOverrides`
18:44:59FromDiscord<mjsdev> Which for me just causes problems when I move things around and older .nimble files used older URLs with the same name, but at least would prevent someone from including a forked/dangerous repo with a `.nimble` by the same name as something popular
19:14:37FromDiscord<mjsdev> sent a code paste, see https://play.nim-lang.org/#pasty=surCNLOy
19:15:41FromDiscord<mjsdev> Since it's indentation aware, it should be able to parse out requires inside conditionals like `when defined windows` and retain their indentation in the map. If for some reason that requirement is being removed, the plan is to just look for dangling `:` blocks after the requires are removed and remove those too.
19:16:50FromDiscord<nnsee> at that point, wouldn't it be easier to run a nim vm instance to actually evaluate the nimscript file and pull the variables etc out?
19:17:24FromDiscord<mjsdev> I'm not sure that's easier or faster.
19:17:36FromDiscord<mjsdev> (edit) "faster." => "faster (performance wise)."
19:18:29FromDiscord<Elegantbeef> It also makes dev time worse as you have to compile the NimVM in release if you want it to be fast
19:18:58FromDiscord<mjsdev> using this solution I could add new variables pretty easily if I wanted with various types.
19:20:09FromDiscord<mjsdev> add object placeholder, add to the relevant constant type
19:20:38FromDiscord<nnsee> right
19:20:51FromDiscord<mjsdev> I'm sure I'll find weird edge cases and bugs with some ill formed nimble files as time goes on, but right now it's handling everything I throw at it pretty nicely
19:21:21FromDiscord<Elegantbeef> I assume any new features you'll drop inside a `when defined(percy):....`
19:21:59FromDiscord<mjsdev> does that matter? Isn't the file just nimscript? Like you can create custom variables in .nimble file anyway, right?
19:22:03FromDiscord<nnsee> i'm just worried that in order to be compliant to all of the different ways a nimble file could be defined, you'd end up reimplementing the lexer/parser for nimvm, which... already exists in nim. which, mind you, isn't a fault of percy per se (pun not intended), but just a result of a nimble file being valid nimscript
19:22:04FromDiscord<mjsdev> or no
19:22:19FromDiscord<Elegantbeef> You can do `var a = ...` but like say you implement a 'new type'
19:22:54FromDiscord<mjsdev> ahhh, then yeah, then that's probably a good idea, I'll keep that in mind
19:22:55FromDiscord<Elegantbeef> You could do like `metadata = MyMetaData(fieldA: ..., fieldB: ..., fieldC: ....)` and parse that
19:24:01FromDiscord<mjsdev> only thing I might add is a testDir for Percy test task which uses testament, though I was looking at and testing against atlas, and I realize even atlas isn't using testament... so I may rewrite percy test task stuff anyway.
19:24:28FromDiscord<mjsdev> but it'd be nice if you do `percy init -rw` that you can just set a test folder in the `.nimble` and it picks it up from there.
19:56:05FromDiscord<arnetheduck> In reply to @mjsdev "This is the parsing": both nimble and atlas now support a deterministic subset of the full nimble syntax - nimble is doing feature flags as well which eventually will replace arbitrary conditionals
19:56:26FromDiscord<arnetheduck> (edit) "syntax" => "syntax, which is used for dependency discovery only"
20:02:42FromDiscord<arnetheduck> sent a long message, see https://pasty.ee/eWnehRqk
20:02:54FromDiscord<mjsdev> Yeah, feature flags are in the line up for support, but definitely not a priority for me.
20:02:58FromDiscord<arnetheduck> (edit) "https://pasty.ee/drnusktF" => "https://pasty.ee/NnYajBJl"
20:04:22FromDiscord<mjsdev> I don't understand the last bit the version is the version
20:04:42FromDiscord<mjsdev> The point of git worktrees is you don't share state
20:05:08*Guest89 joined #nim
20:05:10FromDiscord<mjsdev> You have a global state but any given worktree has its own state
20:05:37FromDiscord<mjsdev> The only exception is if a worktree actually checks out a branch
20:06:05FromDiscord<mjsdev> But that's easy to solve as you simply always checkout detached head for worktree
20:08:24FromDiscord<arnetheduck> In reply to @mjsdev "You have a global": the global state includes "these versions exist" - it means that if you start working on project A, then install project B separately, the git operations that lead to B being installed also change what versions are seen when you run nimble in A - so when you `nimble build` in A after installing B, you don't get the same result as before - there's a partial solution for that where the git clon
20:09:07FromDiscord<arnetheduck> these kinds of caching bleeds are all over the place in nimble, and they're pretty annoying - but they're also slowly getting solved
20:09:24FromDiscord<mjsdev> That's not true if you isolate your refs from origin
20:10:21FromDiscord<mjsdev> I don't fetch to global refs, I fetch to refs in a percy namespace and Percy always uses those which match origin, so only pushed changes
20:13:34FromDiscord<arnetheduck> well, it's certainly an issue for how nimble looks up versions in its cache, so I guess it's good there's a solution to that too 😉
20:14:44FromDiscord<mjsdev> Last I checked nimbles cache was like 10,000 copies
20:15:51FromDiscord<mjsdev> You can look at the repository module in Percy source to see how update and commit lookups are done. On the move so I don't have link handy
20:17:12FromDiscord<arnetheduck> In reply to @mjsdev "Last I checked nimbles": yeah, sort of - the original nimble _built_ things in the cache, so copying was a way to isolate the install step while maintaining backwards compatibility with all packages out there - it'll be removed soon enough though now that there's a different solution for the build step to be isolated
20:18:51FromDiscord<mjsdev> In either case I don't see nimble working well without abandoning package names being at its center
20:19:01FromDiscord<arnetheduck> and also, to support `when xxx: requires` for the current vm-based nimble files, you actually need a full copy during version enumeration, if you want to support the full nimble feature set (in particular, you need it for `import` which may contain further version stuff)
20:26:03FromDiscord<arnetheduck> In reply to @mjsdev "In either case I": well, it only matters if there's an actual conflict which is exceedingly rare - and I guess then you have some work to do .. the opposite, ie using urls, is also pretty shitty ("I'd like to use my fork of package X") - in both cases, you need a way to ovverride things ("these two urls are _actually_ the same package" vs "these two urls are _not_ the same package"), so it comes down to which on
20:26:56FromDiscord<arnetheduck> but if you want to manage packages _in a particular way_, of course one of the two will seem more appealing
20:27:40FromDiscord<arnetheduck> same as the global namespace in which nim places symbols - it's very convenient locally, and a massive pain when collaborating and someone drops a symbol with the same name into their library
20:27:55FromDiscord<arnetheduck> (edit) "same as the global namespace in which nim places symbols - it's very convenient locally, and a massive pain when collaborating and someone drops a symbol with the same name ... into" added "as you were using"
20:28:22FromDiscord<arnetheduck> and then you have to use the rename options, and then you're back on track and forget about the episode
20:28:33FromDiscord<mjsdev> Two URLs are the same package if they are the same url. If they are not, then they are not. If they include paths at comple with conflicting module names, that seems a separate issue.
20:29:57FromDiscord<mjsdev> Like if I fork X and other things use X and I require my fork plus other things that require original X, then we have conflicting modules.
20:31:14FromDiscord<arnetheduck> In reply to @mjsdev "Two URLs are the": well, you could make the same claim that each _version_ of a package is a different package actually - it's pretty arbitrary how you define it and your definition certainly fails to capture what a lot of us think of as "the same package" at a .. human level
20:31:17FromDiscord<mjsdev> In that case I can just `percy set package <original-name> <my-fork-url>`
20:31:58FromDiscord<arnetheduck> each definition will have its own ups and downs in terms of how you work around things
20:32:15FromDiscord<mjsdev> My Percy sources say what names resolve to
20:38:49FromDiscord<arnetheduck> sent a long message, see https://pasty.ee/KvEgeAzr
20:44:43FromDiscord<arnetheduck> anyway, good luck with percy - as you get further on your journey, if you find a concept that you think could be more generally applicable in the nim package management space, I'm pretty sure there's room for standardising it such that the other pm's can implement it too - ie a lot of the successful atlas features are being backported to nimble after having been tested there (and vice versa)
20:54:49FromDiscord<mjsdev> I'm going for less features, more not breaking in ways that are confusing because a version of code in my repo a week ago years ago had a different nimble file with an old name, or URL, or some commited version. Or because I force pushed a tag to resolve some critical security issue for legacy projects still being installed but no longer maintained.
20:55:18FromDiscord<schelz_> Anyone whos interested in using d3d9 in nim with imgui, i got it working and post it on github, if anyone wants to help me grow this please make pull requests on github `github.com/SchelZ/d9Nim` https://media.discordapp.net/attachments/371759389889003532/1451679304554512475/image.png?ex=69470d35&is=6945bbb5&hm=c2afe86b112b96c491789edf0ffe12b546f3686684695e41038fd5238294564f&
21:47:02*om3ga joined #nim
22:30:14*Guest89 quit (Quit: Client closed)
22:40:43FromDiscord<m4ul3r> In reply to @schelz_ "Anyone whos interested in": sick, I had done something similar but never shared it, Really want to have d11 in nim 😄