Re: There is no SCAN (introducing Compan)

2016-09-23 Thread Amirouche Boubekki

On 2016-09-18 09:38, Panicz Maciej Godek wrote:

[...]



Therefore, I wrote Compan, which is meant to be a "Community Package
Manager" for Guile.

In short, it allows to load modules from remote repositories. Once you
(use-modules (compan)), provided that all the prerequisites are 
satisfied,
you can use the "load-modules" macro, that clones the desired 
repository,

adjusts load paths and imports the appropriate modules -- for example:

(load-modules ("https://bitbucket.org/panicz/dogma; (lib)))

The (compan) module is around 100 lines of Guile code (GPL3) that can 
be

found here:
https://github.com/panicz/compan

(but I'd love to see a similar functionality present in the Guile's 
core

module system one day)

Happy hacking,
Panicz


Interesting. Thanks for sharing.

--
Amirouche ~ amz3 ~ http://www.hyperdev.fr



Re: There is no SCAN (introducing Compan)

2016-09-18 Thread Pascal J. Bourguignon
Panicz Maciej Godek  writes:

> Therefore, I wrote Compan, which is meant to be a "Community Package
> Manager" for Guile.

Unfortunately, it's specific to guile.

Wouldn't it be better to have a system that could be used to distribute
scheme libraries, including portable libraries and portability layers?

Granted, we may want to support r5rs, r6rs and r7rs libraries (perhaps
some libraries can run on all those versions; after all, most r4rs
libraries also ran on r5rs), in addition to the various common or main
scheme implementations.

I guess some basis for such a system could be quicklisp (
http://quicklisp.org https://github.com/quicklisp ), which would have to
be ported to scheme from Common Lisp (and yet, some parts such as
infrastructure quicklisp-dist or quicklisp-controller wouldn't have to
be translated, or only much later).


-- 
__Pascal Bourguignon__ http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk




There is no SCAN (introducing Compan)

2016-09-18 Thread Panicz Maciej Godek
Probably everybody's heard about the Comprehensive Perl Archive Network, or
CPAN. From the pragmatic standpoint, it seems to be adding a lot of value
to the programming system, because it allows to avoid reinventing the
wheel, and many popular programming systems manage to develop their
counterparts of CPAN.

However, it seems that while there are similar repositories around some
Scheme implementations (e.g. Chicken), and there have been some attempts to
inceive that idea to Guile (vide guildhall) and to Scheme in general (vide
Scheme NOW, or SNOW), they didn't seem to succeed -- such thing as Scheme
Comprehensive Archive Network doesn't exist.

My guess is that the reason for that is that the Scheme culture and the
Scheme programmers often focus on understanding, and they often prefer to
create their own libraries (or even language implementations) rather than
re-use existing ones. Therefore the idea of a centralized repository
doesn't go well with Scheme, just as the idea of a "single/main
implementation" fails to work.

However, presently there's plenty of decentralized repositories and their
servers available on the Internet, like Github or Bitbucket, and chances
are that many people keep their modules there (I do).

Therefore, I wrote Compan, which is meant to be a "Community Package
Manager" for Guile.

In short, it allows to load modules from remote repositories. Once you
(use-modules (compan)), provided that all the prerequisites are satisfied,
you can use the "load-modules" macro, that clones the desired repository,
adjusts load paths and imports the appropriate modules -- for example:

(load-modules ("https://bitbucket.org/panicz/dogma; (lib)))

The (compan) module is around 100 lines of Guile code (GPL3) that can be
found here:
https://github.com/panicz/compan

(but I'd love to see a similar functionality present in the Guile's core
module system one day)

Happy hacking,
Panicz