Does anyone use include-program*? I am hoping to use Snow for a graphics engine that I am writing, and separate the system into a few loadable libraries, but in the end it'd be interesting to see the speed gain in Gambit when the libraries are compiled together instead of the code constantly crossing module boundaries.
Unfortunately, it's not as easy as using include-program* instead of load-program*. I get this error when I try:
test2.scm --- (package* test2/v1.0.0 (require: pi/v1))
(define (print2) (display (pi-digits 5)))
(print2)
% gsi
(include "/usr/share/snow/current/base/snow.scm") (include-program* "test2.scm")
*** ERROR IN (console)@2.1 -- Filename expected
Does snow handle bundling multiple packages into one shared library? If so, how does it work?
Also, how does Snow handling naming conflicts?
James
Afficher les réponses par date
Also, how does Snow handling naming conflicts?
can't answer your other questions, but as far as i can see there's no namepsace support for snow modules. code seems to use "hopefully unique" prefixes (myproject-function-name ...). i was surprised by this - seems to be the biggest omission given the other things snow fixes - so perhaps i am wrong...
andrew
On Thu, Aug 16, 2007 at 11:31:59AM -0400, andrew cooke wrote:
Also, how does Snow handling naming conflicts?
can't answer your other questions, but as far as i can see there's no namepsace support for snow modules. code seems to use "hopefully unique" prefixes (myproject-function-name ...). i was surprised by this - seems to be the biggest omission given the other things snow fixes - so perhaps i am wrong...
Snow uses a different namespace for each package in gambit and chicken:
(load-program* pi/v1) (pp (lambda () (pi-digits 4)))
(lambda () (pi/v1#pi-digits 4))
Etienne Laurin
excellent - thanks!
On Thu, Aug 16, 2007 at 11:31:59AM -0400, andrew cooke wrote:
Also, how does Snow handling naming conflicts?
can't answer your other questions, but as far as i can see there's no namepsace support for snow modules. code seems to use "hopefully unique" prefixes (myproject-function-name ...). i was surprised by this - seems to be the biggest omission given the other things snow fixes - so perhaps i am wrong...
Snow uses a different namespace for each package in gambit and chicken:
(load-program* pi/v1) (pp (lambda () (pi-digits 4)))
(lambda () (pi/v1#pi-digits 4))
Etienne Laurin
` __ _ __ ___ ___| |_____ home: http://www.acooke.org/andrew / _` / _/ _ / _ \ / / -_) blog: http://www.acooke.org/cute __,______/___/_____| aim: acookeorg; skype: andrew-cooke
` __ _ __ ___ ___| |_____ home: http://www.acooke.org/andrew / _` / _/ _ / _ \ / / -_) blog: http://www.acooke.org/cute __,______/___/_____| aim: acookeorg; skype: andrew-cooke
Sure, it uses the underlying module system of the host. That's to be expected.
What I want is a *portable* fully qualified name. It's pretty much useless to use snow and to use a host-specific fully qualified name to resolve conflicts.
I'm a little dissapointed that Snow focuses so heavily on loadable modules, while it wouldn't be hard to make packages slightly more usable as a namespacing mechanism as well. How this relates to releasing Snow packages publicly, I'm not sure, but I'd love to use Snow for namespaces because much of the code is similar. Maybe a real 'package' could be built with several namespaces and simply provide the interface. Namespaces are just for semantically separating code after all.
So, I would love to see a portable fully qualified name syntax, as well as something like a package-namespace* macro. These are things which I may build as extensions to Snow. What's everyone think about this?
On 8/16/07, Etienne Laurin laurieti@iro.umontreal.ca wrote:
On Thu, Aug 16, 2007 at 11:31:59AM -0400, andrew cooke wrote:
Also, how does Snow handling naming conflicts?
can't answer your other questions, but as far as i can see there's no namepsace support for snow modules. code seems to use "hopefully unique" prefixes (myproject-function-name ...). i was surprised by this - seems to be the biggest omission given the other things snow fixes - so perhaps i am wrong...
Snow uses a different namespace for each package in gambit and chicken:
(load-program* pi/v1) (pp (lambda () (pi-digits 4)))
(lambda () (pi/v1#pi-digits 4))
Etienne Laurin _______________________________________________ Snow-users-list mailing list Snow-users-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/snow-users-list
snow-users-list@iro.umontreal.ca