Replies: 6 comments 5 replies
-
I think what I was doing was best placed in the core lib. It's the most basic stuff after all, the general algebraic structures and lemmas about them. If on the other hand we consider very special stuff like concrete applications (cryptography? number theory? graph theory?) then external packages sound reasonable. But then again, for example .NET framework is way bigger and has even more stuff we would probably have considered good candidates for external modules. So even though I like the idea of packages in F*, I also like the idea of a rich framework that is readily available to users out-of-the-box. We will probably need a mechanism for verifying the package against the latest f* release. Also we should carefully think about the versioning issues, i.e. when different packages A and B reference different versions of the same package X, and my project uses both A and B. This might turn out to be a really big problem. |
Beta Was this translation helpful? Give feedback.
-
F* seems to be not compiler, but rather pre-processor (or interpreter) for the OCaml and F# and other languages. That's raise the question about what kind of system can be done. Let's pretend that we have packaging and versioning system which works. Questions:
We have other backends, but F# and Ocaml has definitely opionated packaging frameworks and if you use that language. JavaScript + NPM is approximately the same. Source code distribution for F* libraries with current compilation times I think is out of question now. Let's say, I want to get rid of F# altogether, and create ulib which will target .NET runtime, but on much lower level. Is this in principle doable with current status? (that's probably separate question) |
Beta Was this translation helpful? Give feedback.
-
For me, even opening/including modules can be better. I am talking about opening/including modules from different folders, which is not possible to my knowledge without using a flag. I would like to open/include modules like this:
My problem is that I have to edit emacs' init file everytime I add/change/remove a subfolder (to change the args of the Also, I am not sure what solutions do you use, but right now we don't have a way of sharing what config is needed for emacs. In theory, a config file should be in the base folder of the project/package and emacs should take the configs from there. In my personal opinion, NodeJS has the best and simple to understand package management system, npm, compared to OCaml, Ruby, Python, PHP and TeX. |
Beta Was this translation helpful? Give feedback.
-
I think there are two topics here; as @kant2002 says, F* is not actually a compiler, more like a type-checker with multiple extraction facilities.
Also, F* being about proof-oriented programming and thus about robust software, I really think reproducibility should be a goal. And as mentioned above, version resolution is hard and I think should be a non-goal; as @TheoWinterhalter suggests, stackage-like package snapshots seem to be a healthier approach. Now that the F* compiler dropped F# support, the compiler could really just be a bunch of F* packages and be extracted without needing makefiles, just leveraging the package manager. That would be quite nice. |
Beta Was this translation helpful? Give feedback.
-
We discussed this at yesterday's F* developers meeting, here is a summary of the discussion. As the F* community grows, we want to make it easier to find contributions and libraries from different people and to use them in different projects. Currently, new contributions are mostly added to ulib/, which provides a centralized place to look for libraries. This has several advantages: all these libraries are ensured to be working The main goal for an F* package manager should thus be to provide a unified framework to provide different libraries as F* files, which can be usable directly in projects. The question of whether extracted files should also be included is left for later. The inspiration is from package managers like opam, or what Coq does with the coq-archive.
There are several interesting technical challenges to solve here. The first one is related to packages requiring different F* versions, or changes upstream requiring to reverify the libraries. The current proposal is to let F*'s checked files system handle this issue. If a library X depends on a file A.fst that changed since checked files were created, F* already invalidates checked files from X, and will require a new verification of library X. In other cases, checked files will be usable as is, and the library can be directly imported in new projects. Several questions related to, for instance, tooling for this package manager, or how to keep track of all existing F* packages were left open and little discussed. Again, a design inspired from other similar ecosystems (i.e., Coq and/or OCaml) might be valuable here. To start making progress in this direction, the current proposal is to start experimenting with splitting ulib/ into the current ulib/ and ulib/experimental. This choice is mostly based on different folders already existing, but will also separate F* ulib/ from Steel. Technical challenges here relate to the handling of fstarlib and fstartaclib: we want to make sure that, when only building ulib/, parts from ulib/experimental are not packaged into fstarlib and fstartaclib, but that they can be added a posteriori. Please do not hesitate to provide feedback and to comment on this proposal. |
Beta Was this translation helpful? Give feedback.
-
Based on the #2544 (comment) there should be at least one more thing to consider in package. Flags to FStar compiler, which may or may not be part of package. I think that affects outcome design of package management quite a lot. |
Beta Was this translation helpful? Give feedback.
-
The topic of structuring the library into several packages, with the possibility of separate user-provided package repositories etc. comes up regularly.
@karthikbhargavan mentions it here: #2474 (comment)
@R1kM has brought it up at recent F* meetings
@W95Psp has also mentioned it
Let's discuss it here, please. Wishes, requirements, problems that we're hoping to solve, etc. most welcome.
Beta Was this translation helpful? Give feedback.
All reactions