Hi,
Congratulations, and a big thank you. This is great news. I remember looking over scheme implementations some time ago, and not being sure whether gambit is actually still alive or not (besides bugfixing). Whether there's a community around it. Whether somebody is till actively working on it and/or supporting it. In the mean time I have learned the answer, and I've also found out that things are moving towards multi-core and multi-platform (speak: javascript). This is great.
If I am allowed, I would like to criticize the lack of a "community adopted" module system, which I think can have a big (positive) influence on the community. My oppinion is that newcomers want to get started quickly. And they have stuff to do. They want to tackle the big questions later, and get stuff done now. Rick Hickey did put it very nicely: default matters. I can't but agree. If Black Hole is good enough, I can't but suggest to give it a "pseudo standard" status and include it in the distribution (or recommend it as a standard module system). And make sure it's handling libraries at least at convenient as maven (i.e. auto download and dependency resolution).
It is incredibly important to have an easy quickstart, and have libraries at your fingertips, and get stuff quickly done. This is actually the secret recipe of Java (even if they discovered it in the second decade, and the core technology still sucks big time, even now). As much as I hate to wake a sleeping dragon, I must say that gambit has to make more bold moves and decisions and focus on gathering a community around it, if it intends to be practical.
Thanks, and don't kill the critique. Razvan
I'm not sure if and how I can help. If there are ideas out there, I'm open to suggestions.
On 9 December 2013 19:00, gambit-list-request@iro.umontreal.ca wrote:
---------- Forwarded message ---------- From: Marc Feeley feeley@iro.umontreal.ca To: Bradley Lucier lucier@math.purdue.edu Cc: Logiciel Gambit gambit@iro.umontreal.ca, gambit-list@iro.umontreal.ca Date: Mon, 9 Dec 2013 09:10:55 -0500 Subject: Re: [gambit-list] [ANN] Gambit-C v4.7.1 released
On Dec 8, 2013, at 2:44 PM, Bradley Lucier lucier@math.purdue.edu wrote:
So, Marc, spill the beans! There are thousands and thousands of lines
of new code in this release; what's new? What can we play with here?
This release represents the latest month of work where the runtime system has been refactored to support multiple VMs and multiple threaded VMs (with OS threads). Data structures had to be modified to clarify what is shared between VMs, and what is specific to each "processor" in each VM instance. An abstraction layer was added to interface to the operating system's thread system. The linker was also changed to allow a VM to only initialize the modules it requires. Not much of this work translates to user visible features at this point, but it does put in place a new organization of the runtime system that is necessary for a parallel Gambit. Given that the Gambit compiler's code generation changed (to support the new linker), it was necessary to do a "release", otherwise it would not be possible to build Gambit from the sources on the repo. I'm also interested in having feedback from people building this new release of Gambit. Please report any problems building Gambit on your computer.
One feature that is user visible, and possibly interesting for developers of large applications, is the ability to link modules into an executable, but not "load" these modules when the program is started. This can make the startup of the application faster and use less memory. This is achieved with the -nopreload linker option, the special form (##require-module <name>) and the procedure (##load-required-module '<name>), where <name> is a symbol naming a module.
The form (##require-module <name>) can be placed anywhere a definition is allowed. For example it could be at the file's top-level, inside of a function definition, or the head of a let body. This form adds the call (##load-required-module '<name>) at the *top* of the file. The procedure ##load-required-module causes a linked module to be loaded if it has not previously been loaded. By default the linker loads all the linked modules when the program is started (what I call "preloading" of a module). The linker now has the option -nopreload that can be placed anywhere on the command line to prevent the preloading of the following modules. Here's an example:
% cat a.scm (pp 'hello-from-a.scm)
(define (double x) (* 2 x)) % cat b.scm (pp 'hello-from-b.scm)
(define (fun x) (##require-module a) (pp (double x))) % cat c.scm (pp 'hello-from-c.scm)
(thread-sleep! 2)
(##load-required-module 'b)
(fun 100) % gsc -exe a.scm b.scm c.scm % ./c hello-from-a.scm hello-from-b.scm hello-from-c.scm <2 second pause> 200
Note that the invocation of gsc without the -nopreload option gives the same behavior as previous versions of Gambit: all modules are preloaded in a left to right order.
Here's what happens when the preloading is disabled:
% gsc -exe -nopreload a.scm b.scm c.scm % ./c hello-from-c.scm <2 second pause> hello-from-a.scm hello-from-b.scm 200
Here the program only loads module c (the "main" program is always the last module). It is module c that explicitly requests the loading of module b by calling (##load-required-module 'b). However, since module b has a dependency on module a (in function fun), module b will require the loading of module a before its body is executed. So module a's body is executed before module b's body.
These features form the basis for constructing a module system.
Marc
Afficher les réponses par date
Hi Razvan,
2013/12/9 Răzvan Rotaru razvan.rotaru@gmail.com
Hi,
Congratulations, and a big thank you. This is great news. I remember looking over scheme implementations some time ago, and not being sure whether gambit is actually still alive or not (besides bugfixing). Whether there's a community around it. Whether somebody is till actively working on it and/or supporting it. In the mean time I have learned the answer, and I've also found out that things are moving towards multi-core and multi-platform (speak: javascript). This is great.
If I am allowed, I would like to criticize the lack of a "community adopted" module system, which I think can have a big (positive) influence on the community. My oppinion is that newcomers want to get started quickly. And they have stuff to do. They want to tackle the big questions later, and get stuff done now. Rick Hickey did put it very nicely: default matters. I can't but agree. If Black Hole is good enough, I can't but suggest to give it a "pseudo standard" status and include it in the distribution (or recommend it as a standard module system). And make sure it's handling libraries at least at convenient as maven (i.e. auto download and dependency resolution).
Sure Black Hole works as a pseudo standard.
However please note that with benefit, any module system specific stuff can be contained inside a cond-expand file in each module file, and thus one and the same module package (repository etc.) can be made to deliver for Vanilla Gambit and any module system out of the box concurrently, without modification.
(99% of modules use little to no macros in all cases, so module system specific stuff can this way generally really be located to a cond-expand)
Also however re pseudo standard, please note that Black Hole's present implementation does not deliver.
It is incredibly important to have an easy quickstart, and have libraries at your fingertips, and get stuff quickly done. This is actually the secret recipe of Java (even if they discovered it in the second decade, and the core technology still sucks big time, even now). As much as I hate to wake a sleeping dragon, I must say that gambit has to make more bold moves and decisions and focus on gathering a community around it, if it intends to be practical.
Thanks, and don't kill the critique. Razvan
I'm not sure if and how I can help. If there are ideas out there, I'm open to suggestions.
Because you asked, here's one thing:
The public availability of a document per the following is essential in the design and implementation of a module system, and the current lack of it makes a key constraint in the same:
If you have some serious spare time to spend, then, carefully go through the main marco systems out there (define-macro without or with alias macros, syntax-rules, syntactic closures, syntax-case) and write a document that describes their respective
- motivation, function and strengths - forms - examples of use that illustrate any intricacies like how corner case uses play out - exactly deterministically the mechanism of expanding them, with exactly what state and logics are needed for this and at what points (for example, a syntactic tower) - how the respective one plays out - conceptually and implementationally with the other systems and - with typical module system functionality such as identifier handling including namespaces - any particular features or fundamentals that are required from the underlying Scheme implementation
Write it so illustrative and clear that anyone could implement a full featured expander for a given system, and properly understand the prospects or issues about a hybrid expander (i.e. one supporting more than one macro system).
Doing this, you'll help the entire Scheme community a great deal for the short and long term per the above.
as the documents in circulation currently are
- the original papers which are purely academic, - some sample implementations such as Alexpander which don't do the job of documentation and have in themselves little or no educational value, - and some partial specialized documentation that don't provide an overview and also not a complete picture.
Feel free to share any thoughts on this.
Best regards, Mikael
On Dec 9, 2013, at 4:07 PM, Răzvan Rotaru razvan.rotaru@gmail.com wrote:
Hi,
Congratulations, and a big thank you. This is great news. I remember looking over scheme implementations some time ago, and not being sure whether gambit is actually still alive or not (besides bugfixing). Whether there's a community around it. Whether somebody is till actively working on it and/or supporting it. In the mean time I have learned the answer, and I've also found out that things are moving towards multi-core and multi-platform (speak: javascript). This is great.
If I am allowed, I would like to criticize the lack of a "community adopted" module system, which I think can have a big (positive) influence on the community. My oppinion is that newcomers want to get started quickly. And they have stuff to do. They want to tackle the big questions later, and get stuff done now. Rick Hickey did put it very nicely: default matters. I can't but agree. If Black Hole is good enough, I can't but suggest to give it a "pseudo standard" status and include it in the distribution (or recommend it as a standard module system). And make sure it's handling libraries at least at convenient as maven (i.e. auto download and dependency resolution).
It is incredibly important to have an easy quickstart, and have libraries at your fingertips, and get stuff quickly done. This is actually the secret recipe of Java (even if they discovered it in the second decade, and the core technology still sucks big time, even now). As much as I hate to wake a sleeping dragon, I must say that gambit has to make more bold moves and decisions and focus on gathering a community around it, if it intends to be practical.
Thanks, and don't kill the critique. Razvan
I'm not sure if and how I can help. If there are ideas out there, I'm open to suggestions.
Frankly, I think adopting the R7RS module system (subset or compatible superset) is inevitable. It is relatively simple and I expect it to be adopted by other Scheme implementations, allowing Gambit users to more easily share code with users of other Scheme systems. Also, I know that Alex Shinn is working on a new version of the "snow" Scheme code repository that will be based on the R7RS module system.
So a possible way to help is to explore the implementation of the R7RS module system in Gambit. I believe a subset of the R7RS module system can be based on Gambit namespaces, i.e. the form (import <spec>) would be transformed into some (namespace ...). The problematic import forms would be "rename" and "prefix", which can't be built on top of namespaces. A partial implementation of the R7RS module system would still be useful to get the ball rolling (i.e. get Gambit users to use this module system to write their modules and share them). More work can be put in fully supporting the R7RS module system and integrating it with the core Gambit when it is motivated by user need.
Marc
On Tue, Dec 10, 2013 at 10:36:59AM -0500, Marc Feeley wrote:
On Dec 9, 2013, at 4:07 PM, Răzvan Rotaru razvan.rotaru@gmail.com wrote:
Hi,
Congratulations, and a big thank you. This is great news. I remember looking over scheme implementations some time ago, and not being sure whether gambit is actually still alive or not (besides bugfixing). Whether there's a community around it. Whether somebody is till actively working on it and/or supporting it. In the mean time I have learned the answer, and I've also found out that things are moving towards multi-core and multi-platform (speak: javascript). This is great.
If I am allowed, I would like to criticize the lack of a "community adopted" module system, which I think can have a big (positive) influence on the community. My oppinion is that newcomers want to get started quickly. And they have stuff to do. They want to tackle the big questions later, and get stuff done now. Rick Hickey did put it very nicely: default matters. I can't but agree. If Black Hole is good enough, I can't but suggest to give it a "pseudo standard" status and include it in the distribution (or recommend it as a standard module system). And make sure it's handling libraries at least at convenient as maven (i.e. auto download and dependency resolution).
It is incredibly important to have an easy quickstart, and have libraries at your fingertips, and get stuff quickly done. This is actually the secret recipe of Java (even if they discovered it in the second decade, and the core technology still sucks big time, even now). As much as I hate to wake a sleeping dragon, I must say that gambit has to make more bold moves and decisions and focus on gathering a community around it, if it intends to be practical.
Thanks, and don't kill the critique. Razvan
I'm not sure if and how I can help. If there are ideas out there, I'm open to suggestions.
Frankly, I think adopting the R7RS module system (subset or compatible superset) is inevitable. It is relatively simple and I expect it to be adopted by other Scheme implementations, allowing Gambit users to more easily share code with users of other Scheme systems. Also, I know that Alex Shinn is working on a new version of the "snow" Scheme code repository that will be based on the R7RS module system.
Agree.
The first thing I thought when reading the suggestion that Gambit should standardize on Blackhole was, Where's the Scheme standard going with this. Shouldn't we be tending in that direction?
-- hendrik
On Tue, Dec 10, 2013 at 7:25 PM, Hendrik Boom hendrik@topoi.pooq.comwrote:
On Tue, Dec 10, 2013 at 10:36:59AM -0500, Marc Feeley wrote:
On Dec 9, 2013, at 4:07 PM, Răzvan Rotaru razvan.rotaru@gmail.com
wrote:
Hi,
Congratulations, and a big thank you. This is great news. I remember
looking over scheme implementations some time ago, and not being sure whether gambit is actually still alive or not (besides bugfixing). Whether there's a community around it. Whether somebody is till actively working on it and/or supporting it. In the mean time I have learned the answer, and I've also found out that things are moving towards multi-core and multi-platform (speak: javascript). This is great.
If I am allowed, I would like to criticize the lack of a "community
adopted" module system, which I think can have a big (positive) influence on the community. My oppinion is that newcomers want to get started quickly. And they have stuff to do. They want to tackle the big questions later, and get stuff done now. Rick Hickey did put it very nicely: default matters. I can't but agree.
If Black Hole is good enough, I can't but suggest to give it a "pseudo
standard" status and include it in the distribution (or recommend it as a standard module system). And make sure it's handling libraries at least at convenient as maven (i.e. auto download and dependency resolution).
It is incredibly important to have an easy quickstart, and have
libraries at your fingertips, and get stuff quickly done. This is actually the secret recipe of Java (even if they discovered it in the second decade, and the core technology still sucks big time, even now). As much as I hate to wake a sleeping dragon, I must say that gambit has to make more bold moves and decisions and focus on gathering a community around it, if it intends to be practical.
Thanks, and don't kill the critique. Razvan
I'm not sure if and how I can help. If there are ideas out there, I'm
open to suggestions.
Frankly, I think adopting the R7RS module system (subset or compatible superset) is inevitable. It is relatively simple and I expect it to be adopted by other Scheme implementations, allowing Gambit users to more easily share code with users of other Scheme systems. Also, I know that Alex Shinn is working on a new version of the "snow" Scheme code repository that will be based on the R7RS module system.
Agree.
The first thing I thought when reading the suggestion that Gambit should standardize on Blackhole was, Where's the Scheme standard going with this. Shouldn't we be tending in that direction?
I agree. I believe that Gambit will do itself and the community a favour following R7RS. Current Blackhole implementation does not deliver, and I see no real/practical benefit in it vs R7RS. This has been long discussed in this list. That Snow remake by A. Shinn sounds very promising. I hope we can integrate that into Gambit.
About having libaries at your fingertips, I totally agree. I tried to help in this regard, with a minimal set of tools for building, managing dependencies, task running, and packaging. But as happened to many of us through the history of Lisp, a single-man effort can oly get you so far. Eventually "real work" must be done. However, some of the things I achieved: - Reviewing, collecting and improving as many implementations of SRFI as possible for Gambit - Selecting and structuring some of the most important libraries made by the Scheme community, for Gambit or any other implementation that is or can be made compatible - Trying to mimick some of the best "batteries included" libraries out there. - Making app "skeletons" for Android, iOS (pending) and desktop platforms, so the developer could just start working as soon as possible - Do it with a tiny layer, so the Gambit developer could feel in total posession of the control, unlike Blackhole where you can't bend the rules so easily.
The work is unfinished, but my intention is to continue with this: - As soon as there is some good / standard implementation of modules, migrate to it. Currently is working with a custom/hacky-but-working system that simply automatizes building modules and its dependencies, with total flexibility. - Release some apps and tutorials, showing the easiest way to get started with all this infrastructure in any of the platforms, to get a real app up and running, totally customizable. I'm following no framwork approach here, but rather a skeleton-based one, more like Yeoman does with Javascript. So each one could do things in a personal way, but starting from something. - Release my first real app using only this system, as I'm currently using other languages/frameworks.
Cheers!