Comments (10)
How should this be compartmentalised?
Should this be a core part of “modules”? I’m somewhat in favour of keeping it as a separate project. If so, would it be an independent package? Or a module? The latter has property of some kind of bootstrapping, which is both an advantage and a disadvantage:
It’s a disadvantage because installing it would require some manual work (since it cannot install itself the first time). On the flip side, it could take care of updating itself, by harnessing its own mechanism for module distribution.
from box.
I think the module manager can be a module. For easier installation you can also build native installers for it e.g. a DEB package for ubuntu, a DMG for OSX, etc. At least this is how it is done on other platforms, and that works well, imho.
Btw. it would be great if modules could handle command line execution (from the shell I mean) somehow, and then the module manager could be also run like that:
$ mod install module1
Or is this already solved?
from box.
It’s not solved already (none of this code is written yet) but I intended to implement this, yes.
from box.
No, I mean, is "running" modules from the shell already solved? Did you have something similar to Python's if __name__ == "__main__":
idiom, or am I misremembering?
from box.
Ah, yes, that’s implemented. In fact, I’m working on a convenience wrapper (already using it internally), which allows the following code:
sys = modules::import('sys')
sys$run({
sys$print('Hello, world!')
})
from box.
For reference, relevant comment discussion about post-install hooks (to install the module manager script) here: http://stackoverflow.com/a/32035219/1968
from box.
Name clashes in public modules will be a concern.
For reference, here’s a Google search on the subject: https://www.google.com/search?q=avoiding+package+name+clashes — showing that this is an active concern across languages and libraries. Java/Swift/Go/… have all solved this, while NPM has fallen on its face, despite their best efforts. This needs to be a central concern of any distribution system for modules.
from box.
Could just have a Github organisation as a "reference list"? That way they would be indexed, connected, and have unique names.
from box.
- Con: Github is a third party private corporation. Worst-case scenario, they go out of business tomorrow. Or they are made irrelevant by an emergent competitor.
- Pro: Cons are unlikely; apps have already done the same with Twitter handles, and it worked well (until Twitter decided to make handles modifiable).
So yes, at least informally that’ll probably be the case.
from box.
Github doesn't own the content, would be easily transferable. Combined with the unlikelyness of that happening, this is a very minor risk.
from box.
Related Issues (20)
- Add contribution instructions
- Rename ‘dev’ branch to ‘build’
- `box::use` with relative paths does not seem to work with Plumber APIs with `entrypoint.R` deployed to RStudio / Posit Connect HOT 3
- Documentation not found for reexports HOT 3
- Unable to install `box` with `renv=1.0.0` HOT 2
- Check `...` arguments in`box::file()` and `box::export()`
- recent versions do not install with R 3.6.3 (object '.S3method' not found) HOT 5
- Document limitation of replacement functions in modules HOT 1
- installation fails under R version 3.6.0: object '.S3method' not found HOT 2
- Consider making ‘box’ namespace environments actual namespaces HOT 5
- Read environment variables only at startup
- Move backports definitions to on_load()
- Nested imports don't work when set as `R6` class method HOT 4
- `purge_cache` function missing HOT 1
- Ability to re-export functions that have been loaded programmatically HOT 2
- FR: Allow `box()` to access distant modules through a URL
- module shows up multiple times on the search path
- Add explicit binding
- function not exported by "app/logic/file" HOT 3
- using function alias and module alias together leads to creation of a binding in the global namespace HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from box.