I've been looking at this without identifying the cause of the problem. Any ideas from the folks on the list would be appreciated. This is running Gambit v4.6.7 on a 64-bit Mint Linux machine.
Steve
===
steve@steve-Satellite-L555D ~/Desktop/clojure-scheme/samples/repl $ ./run-clojure-repl
***
ERROR IN "src/clojure-repl.scm"@3.1 -- Can't open file
"/home/steve/Desktop/clojure-scheme/samples/repl/src/../scm/cljscm/source-at.scm"
===
steve@steve-Satellite-L555D ~/Desktop/clojure-scheme/samples/repl $ cat run-clojure-repl
#!/usr/bin/env sh
gsc -e "(include \"src/clojure-repl.scm\")" -
steve@steve-Satellite-L555D ~/Desktop/clojure-scheme/samples/repl $ which gsc
/usr/bin/gsc
steve@steve-Satellite-L555D ~/Desktop/clojure-scheme/samples/repl $ ls
project.clj run-clojure-repl src
steve@steve-Satellite-L555D ~/Desktop/clojure-scheme/samples/repl $ ls -al src
total 20
drwxr-xr-x 2 steve steve 4096 Jun 13 16:37 .
drwxr-xr-x 3 steve steve 4096 Jul 19 10:49 ..
-rw-r--r-- 1 steve steve 1014 Jun 13 16:37 build.clj
-rw-r--r-- 1 steve steve 7235 Jun 13 16:37 clojure-repl.scm
steve@steve-Satellite-L555D ~/Desktop/clojure-scheme/samples/repl $
Hello,
Please, find below the first call for papers for PEPM 2014.
Please forward these to anyone you think may be interested.
Apologies for any duplicates you may receive.
best regards,
Jurriaan Hage
Co-chair of PEPM 2014
-----------------------------
C A L L F O R P A P E R S
-----------------------------
======= PEPM 2014 ===========
ACM SIGPLAN 2014 WORKSHOP ON PARTIAL EVALUATION AND PROGRAM MANIPULATION
Mon-Tue, January 20-21, 2014
San Diego, California, USA
co-located with POPL'14
Sponsored by ACM SIGPLAN
http://www.program-transformation.org/PEPM14
SCOPE
The PEPM Symposium/Workshop series aims at bringing together researchers and
practitioners working in the areas of program manipulation, partial evaluation,
and program generation. PEPM focuses on techniques, theory, tools, and
applications of analysis and manipulation of programs.
The 2014 PEPM workshop will be based on a broad interpretation of semantics-based
program manipulation and continue last years' successful effort to expand the
scope of PEPM significantly beyond the traditionally covered areas of partial
evaluation and specialization and include practical applications of program
transformations such as refactoring tools, and practical implementation techniques
such as rule-based transformation systems. In addition, the scope of PEPM covers
manipulation and transformations of program and system representations such as
structural and semantic models that occur in the context of model-driven
development. In order to reach out to practitioners, a separate category of tool
demonstration papers will be solicited.
Topics of interest for PEPM'14 include, but are not limited to:
Program and model manipulation techniques such as: supercompilation,
partial evaluation, fusion, on-the-fly program adaptation, active libraries,
program inversion, slicing, symbolic execution, refactoring, decompilation,
and obfuscation.
Program analysis techniques that are used to drive program/model manipulation
such as: abstract interpretation, termination checking, binding-time
analysis, constraint solving, type systems, automated testing and
test case generation.
Techniques that treat programs/models as data objects including
metaprogramming, generative programming, embedded domain-specific languages,
program synthesis by sketching and inductive programming, staged computation,
and model-driven program generation and transformation.
Application of the above techniques including case studies of program
manipulation in real-world (industrial, open-source) projects and software
development processes, descriptions of robust tools capable of effectively
handling realistic applications, benchmarking. Examples of application
domains include legacy program understanding and transformation, DSL
implementations, visual languages and end-user programming, scientific
computing, middleware frameworks and infrastructure needed for distributed
and web-based applications, resource-limited computation, and security.
To maintain the dynamic and interactive nature of PEPM, we will continue the
category of `short papers' for tool demonstrations and for presentations of
exciting if not fully polished research, and of interesting academic, industrial
and open-source applications that are new or unfamiliar.
Student attendants with accepted papers can apply for a SIGPLAN PAC grant to
help cover travel expenses and other support. PAC also offers other support,
such as for child-care expenses during the meeting or for travel costs for
companions of SIGPLAN members with physical disabilities, as well as for travel
from locations outside of North America and Europe. For details on the PAC
programme, see its web page.
All accepted papers, short papers included, will appear in formal proceedings
published by ACM Press. In addition to printed proceedings, accepted papers will
be included in the ACM Digital Library. A special issue for Science of Computer
Programming is planned with recommended papers from PEPM'14.
PEPM has also established a Best Paper award. The winner will be announced at
the workshop.
SUBMISSION CATEGORIES AND GUIDELINES
Regular Research Papers must not exceed 12 pages in ACM Proceedings style
(including appendix). Tool demonstration papers and short papers must not
exceed 6 pages in ACM Proceedings style (including appendix). At least one
author of each accepted contribution must attend the workshop and present the
work. In the case of tool demonstration papers, a live demonstration of the
described tool is expected. Suggested topics, evaluation criteria, and writing
guidelines for both research tool demonstration papers will be made available
on the PEPM'14 Web-site. Papers should be submitted electronically via the
workshop web site.
Authors using LaTeX to prepare their submissions should use the new improved
SIGPLAN proceedings style (sigplanconf.cls, 9pt template).
IMPORTANT DATES
Abstract due: Sat, September 28, 2013
Paper submission: Sat, October 5, 2013, 23:59, GMT
Author notification: Mon, November 11, 2013
Camera-ready papers due: * to be announced *
INVITED SPEAKERS
to be announced
PROGRAM CHAIRS
Wei Ngan Chin (National University of Singapore, Singapore)
Jurriaan Hage (Utrecht University, Netherlands)
PROGRAM COMMITTEE
velyne Contejean (LRI, CNRS, Universit Paris-Sud, France)
Cristina David (University of Oxford, UK)
Alain Frisch (LexiFi, France)
Ronald Garcia (University of British Columbia, Canada)
Zhenjiang Hu (National Institute of Informatics, Japan)
Paul H J Kelly (Imperial College, UK)
Oleg Kiselyov (Monterey, USA)
Naoki Kobayashi (University of Tokyo, Japan)
Jens Krinke (University College London, UK)
Ryan Newton (University of Indiana, USA)
Alberto Pardo (Universidad de la Repblica, Uruguay)
Sungwoo Park (Pohang University of Science and Technology, South Korea)
Tiark Rompf (Oracle Labs & EPFL, Switzerland)
Sukyoung Ryu (KAIST, South Korea)
Kostis Sagonas (Uppsala University, Sweden)
Max Schaefer (Nanyang Technological University, Singapore)
Harald S¿ndergaard (The University of Melbourne, Australia)
Eijiro Sumii (Tohoku University, Japan)
Eric Van Wyk (University of Minnesota, USA)
Jeremy Yallop (University of Cambridge, UK)
Hello,
Please, find below the third call for papers for IFL 2013.
Please forward these to anyone you think may be interested.
Apologies for any duplicates you may receive.
best regards,
Jurriaan Hage
Publicity Chair of IFL
CALL FOR PAPERS
25th SYMPOSIUM ON IMPLEMENTATION AND APPLICATION OF FUNCTIONAL LANGUAGES - IFL 2013
RADBOUD UNIVERSITY NIJMEGEN, THE NETHERLANDS
ACM In-Cooperation / ACM SIGPLAN
AUGUST 28 - 30 2013
"Landgoed Holthurnsche Hof"
http://ifl2013.cs.ru.nl
We are proud to announce that the 25th edition of the IFL series returns to its roots at
the Radboud University Nijmegen in the Netherlands. The symposium is held from 28th
to 30th of August 2013.
Scope
-----
The goal of the IFL symposia is to bring together researchers actively engaged in the
implementation and application of functional and function-based programming languages.
IFL 2013 will be a venue for researchers to present and discuss new ideas and concepts,
work in progress, and publication-ripe results related to the implementation and
application of functional languages and function-based programming.
Following the IFL tradition, IFL 2013 will use a post-symposium review process to
produce the formal proceedings which will be published in the ACM Digital Library. All
participants of IFL 2013 are invited to submit either a draft paper or an extended
abstract describing work to be presented at the symposium. At no time may work submitted
to IFL be simultaneously submitted to other venues; submissions must adhere to
ACM SIGPLAN's republication policy:
http://www.sigplan.org/Resources/Policies/Republication
The submissions will be screened by the program committee chair to make sure they are
within the scope of IFL, and will appear in the draft proceedings distributed at the
symposium. Submissions appearing in the draft proceedings are not peer-reviewed
publications. Hence, publications that appear only in the draft proceedings do not
count as publication for the ACM SIGPLAN republication policy. After the symposium,
authors will be given the opportunity to incorporate the feedback from discussions at
the symposium and will be invited to submit a revised full article for the formal
review process. From the revised submissions, the program committee will select papers
for the formal proceedings considering their correctness, novelty, originality,
relevance, significance, and clarity.
Invited Speaker
---------------
Lennart Augustsson, currently employed by the Standard Chartered Bank, well-known for
his work on Haskell, parallel Haskell, Cayenne, and Bluespec, is the invited speaker of
IFL 2013. He will be talking about practical applications of functional programming.
Submission Details
------------------
Submission deadline draft papers: July 31
Notification of acceptance for presentation: August 2
Early registration deadline: August 7
Late registration deadline: August 14
Submission deadline for pre-symposium proceedings: August 21
25th IFL Symposium: August 28-30
Submission deadline for post-symposium proceedings: November 11
Notification of acceptance for post-symposium proceedings: December 18
Camera-ready version for post-symposium proceedings: February 3 2014
Prospective authors are encouraged to submit papers or extended abstracts to be
published in the draft proceedings and to present them at the symposium. All
contributions must be written in English. Papers must adhere to the standard ACM two
columns conference format. For the pre-symposium proceedings we adopt a 'weak' page limit
of 12 pages. For the post-symposium proceedings the page limit of 12 pages is firm. A
suitable document template for LaTeX can be found at:
http://www.acm.org/sigs/sigplan/authorInformation.htm
Papers are to be submitted via the conference's EasyChair submission page:
https://www.easychair.org/conferences/?conf=ifl2013
Topics
------
IFL welcomes submissions describing practical and theoretical work as well as submissions
describing applications and tools in the context of functional programming. If you are
not sure whether your work is appropriate for IFL 2013, please contact the PC chair at
rinus(a)cs.ru.nl. Topics of interest include, but are not limited to:
- language concepts
- type systems, type checking, type inferencing
- compilation techniques
- staged compilation
- run-time function specialization
- run-time code generation
- partial evaluation
- (abstract) interpretation
- metaprogramming
- generic programming
- automatic program generation
- array processing
- concurrent/parallel programming
- concurrent/parallel program execution
- embedded systems
- web applications
- (embedded) domain specific languages
- security
- novel memory management techniques
- run-time profiling performance measurements
- debugging and tracing
- virtual/abstract machine architectures
- validation, verification of functional programs
- tools and programming techniques
- (industrial) applications
Peter Landin Prize
------------------
The Peter Landin Prize is awarded to the best paper presented at the symposium every
year. The honoured article is selected by the program committee based on the submissions
received for the formal review process. The prize carries a cash award equivalent to
150 Euros.
Programme committee
-------------------
- Thomas Arts, Quviq, Gothenburg, Sweden
- Andrew Butterfield, Trinity College, Dublin, Ireland
- Edwin Brady, University of St. Andrews, UK
- Clemens Grelck, University of Amsterdam, Netherlands
- Adam Granicz, IntelliFactory, Budapest, Hungary
- Jeremy Gibbons, University of Oxford, UK
- Fritz Henglein, University of Copenhagen, Denmark
- Stephan Herhut, Intel Labs, Santa Clara, US
- Ralf Hinze (co-chair), University of Oxford, UK
- Zoltan Horvath, Eotvos Lorand University, Budapest, Hungary
- Zhenjiang Hu, University of Tokyo, Japan
- Mauro Jaskelioff, Universidad Nacional de Rosario, Argentina
- Johan Jeuring, University of Utrecht, Netherlands
- Rita Loogen, University of Marburg, Germany
- Marco T. Morazan, Seton Hall University, New Jersey, US
- Dominic Orchard, University of Cambridge, UK
- Rinus Plasmeijer (chair), Radboud University Nijmegen, Netherlands
- Tim Sheard, Portland State University, US
- Sam Tobin-Hochstadt, Northeastern University / Indiana University, US
- Peter Thiemann, University of Freiburg, Germany
- Simon Thompson, University of Kent, UK
Venue
-----
The 25th IFL is organized by the Radboud University Nijmegen, Model Based Software
Development Department at the Nijmegen Institute for Computing and Information Sciences.
The event is held in the Landgoed Holthurnsche Hof, a rural estate in the woodlands
surrounding Nijmegen. It can be reached quickly and easily by public transport.
Hello, everyone. I installed Gambit, version 4.6.9, visual C, 32, in
Windows XP SP3, but when I try to run, Windows tells me it is not a valid
Win32 application. Why is this happening? Thanks in advance!
Hello Gambit People,
I've been hacking away at riaxpander, and now have it at the point where it runs in native gambit. It can compile Alex Shinn's matchable library and run the matchable unit tests - that's the net testing thus far!
Credit here goes to Taylor R. Campbell, for creating such a very nice and powerful expander. My contribution was to:
- extract riaxpander-gambit.scm from the tmp directory on Campbell's website,
- vandalize the source to support case sensitivity (lower case all macrology patterns),
- figure out the problems that prohibit gambit compile-file from working,
- add some dark meat from the chicken to support loading of macros in compiled source, and
- add a cond-expand classifier that works when syntax-case appears in a non-evaluated feature clause.
Line numbers and decent error messages are inoperative at this time. I also haven't examined which scheme flavor the macrologies define. I'm not certain how much gambitism is there. My personal plan is to keep hacking away towards r7rs and/or a module system (r7rs define-library) ... but these are indeed lofty goals. I am already out of my depth, deep in the lambdas.
Source code is in:
https://github.com/matthastie/riaxpander
Kind Regards,
Matt Hastie.
I've noticed that Gambit seems to require all internal definitions to be at the top of a body. It will give "Ill-placed 'define'" otherwise. Other Scheme implementations seem to allow interleaving definitions and expressions as long as the last form of a body is an expression.
The reason I care about this is that sometimes test code in Clojure involves wrapping an entire file in a top-level function which is called to run the tests. If there are assert statements between function definitions, I will cause a "Ill-placed 'define'" error. This isn't really common, but it is done in the ClojureScript tests for example.
In some cases I imagine I could tree-walk the forms and lift any nested definitions to the top-level to manually forward-declare them, and then replace the internal definitions with set!... but I'd like to avoid such non-local code transformations if possible.
Another option would be to unwind all lets and lambdas so each body only can contain one expression, such that
(let () 1 (define two 2) two) => (let () 1 (let () (two 2) two))
Not sure off-hand if this approach would have any downsides w.r.t. the compiled code?
Are there any other avenues I could explore to allow this interleaving to be expressed in Gambit?
I have some thirty-year-old legacy code in what's best described as a
legacy dialect of Scheme. The important differences are:
* A different syntax for lists -- a slash can be used to introduce a
final sublist of a list. This reduces the piling up of lots of close
brackets when a list's last element is a list whose last element is a
list whose ... .
* A different syntax for 'let' that is to the regular 'let' as 'if' is
to 'cond'. This works well with the slash notation.
* Its own nonhygienic macro processor.
* No first-class continuations, though I wished I had them available
thirty years ago.
The existing implementation is bootstrapped from a subset of itself,
and involves an interpreter and translators to VAX assembly language.
I'd like to revive the legacy code that's written in that Scheme, and
it seems that a good approach would be to it translate to Gambit, and
thence to C. Perhaps starting with the bootstrap code and being
opportunistic after that.
Any suggestions as to a programmer-time efficient way to use or
modify existing tools to accomplish that?
-- hendrik
Spent some days hunting memory leaks, completely resolved and now working.
Here's the roundup:
* Found two ways to track this kind of problems:
* Print out current-thread's backtrace at garbage collect. If lots of
objects or stack frames are being allocated unintendedly, you'll learn lots
about that from the backtrace at gc time, for the thread that was running
when the gc trigged.
* Locate objects that don't collect and find their roots
with ##resolve-referencing-objects . Get hold of their references in the
first place using object->serial-number and ##serial-number-to-object-table
.
documented at
http://dynamo.iro.umontreal.ca/wiki/index.php/Debugging#Suggestions_for_tra…
* Don't do this:
* (will-execute! (make-will your-object (lambda (v) (void)))) , that
will will never GC. I guess it's a bug.
https://github.com/feeley/gambit/issues/33
* (output-port-timeout-set! port timeout (lambda () (close-port port)
#f)), if the port had data left to drain that creates an infinite recursion
up to heap overflow.
https://github.com/feeley/gambit/issues/35
* ##thread-continuation-capture, in the currently latest commit
ffd839c64f66278cdb4cce5ef86316ee290a4204 it leaks. Fix below.
https://github.com/feeley/gambit/issues/36
Brgds,
Mikael
That was the first time in many years I was aware of a memory leak scenario
in a Gambit env.
The leak consisted of 1) https://github.com/feeley/gambit/issues/33 that
regards wills not GC:ing if you ran will-execute! on it, for a programmer
that one is easily worked around, and then 2) the following problem.
Apart from these two, Gambit works perfectly to my knowing.
Find dump_threads.scm and dump_threads_bug_demo.scm attached. Just launch
them like this:
$ gsc
Gambit v4.6.9
> *(load "dump_threads.scm") (load "dump_threads_bug_demo.scm") (demo)*
"/home/user/dump_threads.scm"
> "/home/user/dump_threads_bug_demo.scm"
> Creating 10000 threads
Waiting for threads to finish
Numbered objects on the heap prior to GC: 10001 - A (##gc) is made here.
Numbered objects on the heap after GC: 1 - All the 10000 threads
GC:ed, this is what should happen.
Creating 10000 threads, while doing a bunch of dump-threads calls too
Waiting for threads to finish
Numbered objects on the heap prior to GC: 10003 - Now we do the same test
again but while doing a bunch of dump-threads calls
Numbered objects on the heap after GC: 9004 - 9000 of the 1000 threads
created became resistent to ##gc and never collect = Memory leak!
>
What happens here is that we see how (dump-threads) invocations *makes ~90%
of threads running stuck on the heap and never GC*!
|dump-threads| is a really neat debug tool - so neat everybody should have
a copy, that kind of level of neat - how can we make it not trash Gambit
like this, but instead completely reliable?
Ordinary dump-threads use example, just so you know what it is about:
$ gsc
Gambit v4.6.9
> *(load "dump_threads.scm")*
"/home/user/dump_threads.scm"
> *(thread-start! (make-thread (lambda () (define myvar 1234)
(thread-sleep! 5) (void)) 'first-thread))*
#<thread #2 first-thread>
> *(thread-start! (make-thread (lambda () (define myvar 5678)
(thread-sleep! 5) (void)) 'second-thread))*
#<thread #3 second-thread>
> *(thread-yield!)*
> *(dump-threads #t 100 100)*
#<thread #1 primordial>
0 loop "dump_threads.scm"@111:32
(with-exception-catcher (lambda (...
result = ##thread-void-action!
exception? = #f
end-condvar = '#<condition-variable #4 #f>
quantum-pre = .02
loop = (lambda () (letrec ((quantum-pre (thread-quantum
(current-thread)))) (thread-quantum-...
thread = '#<thread #1 primordial>
display-environment = #t
max-head = 100
max-tail = 100
1 dump-thread "dump_threads.scm"@124:5 (out)
out = (lambda () ((letrec ((loop (lambda () (letrec ((quantum-pre
(thread-quantum (current-t...
thread = '#<thread #1 primordial>
display-environment = #t
max-head = 100
max-tail = 100
2 for-each
3 (interaction) (console)@5:1
(dump-threads #t 100 100)
#<thread #2 first-thread>
0 ##thread-sleep!
1 #<procedure #5> (console)@2:60
(thread-sleep! 5)
myvar = 1234
2 ##thread-start-action!
#<thread #3 second-thread>
0 ##thread-sleep!
1 #<procedure #6> (console)@3:60
(thread-sleep! 5)
myvar = 5678
2 ##thread-start-action!
>
What it does is to show all running threads including their environment.
So, at least in my frame of reference, a quite central debug tool.
Would be great if we could fix it.
Brgds,
Mikael