Environments like Python #2435
Replies: 4 comments 6 replies
-
From experience I have observed that if this isn't done by the language, it will be done by the users at some point. That's good on the one hand but also it can lead to fragmentation and other issues. |
Beta Was this translation helpful? Give feedback.
-
Currently all libraries are baked into |
Beta Was this translation helpful? Give feedback.
-
From a hacker perspective, one interesting thought with the advent of the shared library -- since Scryer will be expose FFI bindings and be able to consume them -- is "scryer-in-scryer"! The shared library lets you easily spin up and configure WAM instances, and passing data from Scryer to Scryer seems like it should be very natural. This would also put environment management as a pure Prolog concern! That's how I would do it, anyway. 😎 See point above about user fragmentation 🤣 |
Beta Was this translation helpful? Give feedback.
-
I personally really don't like how pip (and most other 352 Python package managers) do package management and environments. I think if we eventually do this we should do something closer to npm (Javascript), cargo (Rust) and poetry (Python). That is, having dependencies local to the project, lockfiles (!!!!!), and maybe not even having a "global environment". I think editable installs are also unnecessary, because Scryer Prolog currently doesn't compile anything (unlike Python wheels) and just runs from source. I think basic support for something like this could be added by having an cli option to add "library paths" and make them available to use as
A limited npm-like package manager could be built based on that. |
Beta Was this translation helpful? Give feedback.
-
I think it would be cool to have environments similar to the way Python virtual environments work. The environment would potentially comprise:
-a path to installed prolog files, installed with a tool like pip. like pip, editable installs would add source directories into this list that the user is working on in their workspace. so something like 'scryer install ." would add the current folder into prolog search path. 'scryer install https://github.com/mthom/scryer-shen.git' would install from github.
Beta Was this translation helpful? Give feedback.
All reactions