Bakul Shah wrote a particularly elegant Scheme program for Chudnovskys'
algorithm for pi based on the Common Lisp program here:
https://bitbucket.org/tarballs_are_good/numericl/src/5fe8fe7089f48ab1c8a388…
Nick Craig-Wood wrote a Python program using the GMP multiprecision
library that appears to use exactly the same algorithm here:
http://www.craig-wood.com/nick/articles/pi-chudnovsky/
I modified both programs a bit and include them here.
They time the calculation of $10^n$ digits of pi …
[View More]for $n=1,2,3,4,5,6,7$.
The results are
heine:~/programs/gambiteer/gambit> !py
python pi_chudnovsky_bs_gmpy.py
31415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679
('chudnovsky_gmpy_mpz_bs: digits', 10, 'time', 1.0967254638671875e-05)
('chudnovsky_gmpy_mpz_bs: digits', 100, 'time', 3.0040740966796875e-05)
Last 5 digits 70679 OK
('chudnovsky_gmpy_mpz_bs: digits', 1000, 'time', 0.00025582313537597656)
Last 5 digits 01989 OK
('chudnovsky_gmpy_mpz_bs: digits', 10000, 'time', 0.00386810302734375)
Last 5 digits 75678 OK
('chudnovsky_gmpy_mpz_bs: digits', 100000, 'time', 0.0834801197052002)
Last 5 digits 24646 OK
('chudnovsky_gmpy_mpz_bs: digits', 1000000, 'time', 1.655979871749878)
Last 5 digits 58151 OK
('chudnovsky_gmpy_mpz_bs: digits', 10000000, 'time', 30.67442488670349)
Last 5 digits 55897 OK
heine:~/programs/gambiteer/gambit> gsi chud1.scm
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
10, CPU time: 0..
Last 5 digits 26535.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
100, CPU time: 0..
Last 5 digits 70679.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
1000, CPU time: .004.
Last 5 digits 1989.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
10000, CPU time: .028.
Last 5 digits 75678.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
100000, CPU time: .472.
Last 5 digits 24646.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
1000000, CPU time: 6.448.
Last 5 digits 58151.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits
10000000, CPU time: 98.612.
Last 5 digits 55897.
So it appears that for this algorithm applied to large integers, GMP's
bignum routines are about 3-4 times as fast as Gambit's bignum
routines. Not so bad. For smaller bignums, GMP has a bigger advantage.
The C program gmp-chudnovsky.c includes certain optimizations to this
basic algorithm:
http://gmplib.org/pi-with-gmp.htmlftp://ftp.gmplib.org/pub/misc/gmp-chudnovsky.c
On my machine, compiled with
gcc -O3 -march=native -o gmp-chudnovsky gmp-chudnovsky.c -lgmp -lm
the CPU times for 1,000,000 and 10,000,000 digits are 1.064 and 18.200
seconds, respectively.
This is with a somewhat older machine
model name : Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz
running Ubuntu 13.04 with
heine:~/programs/gambiteer/gambit> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.7.3-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib
--enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --with-system-zlib
--enable-objc-gc --with-cloog --enable-cloog-backend=ppl
--disable-cloog-version-check --disable-ppl-version-check
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
heine:~/programs/gambiteer/gambit> gsi -v
v4.6.9 20130607151908 x86_64-unknown-linux-gnu "./configure
'--enable-single-host' '--enable-multiple-versions' '--enable-shared'"
and the Ubuntu-provided GMP 5.0.5. (I'm sure the GMP folks have a
better way to build GMP on my machine than the "generic" 64-bit version
provided by Ubuntu.)
Brad
[View Less]
ILC 2014 - International Lisp Conference
"Lisp on the Move"
August 14-17 2014, Université de Montréal, Montréal, Canada
Sponsored by the Association of Lisp Users
http://www.international-lisp-conference.org
Scope:
Lisp is one of the greatest ideas from computer science and a major
influence for almost all programming languages and for all
sufficiently complex software applications.
The International Lisp Conference is a forum for the discussion of
Lisp and, in …
[View More]particular, the design, implementation and application of
any of the Lisp dialects. We encourage everyone interested in Lisp to
participate.
We invite high quality submissions in all areas involving Lisp
dialects and any other languages in the Lisp family, including, but
not limited to, ACL2, AutoLisp, Clojure, Common Lisp, ECMAScript,
Dylan, Emacs Lisp, ISLISP, Racket, Scheme, SKILL, HOP etc.
This year's focus will be directed towards integrated solutions,
including mobile computing. We especially invite submissions in the
following areas:
* Pervasive computing
* Interoperability
* Portability
* Implementation challenges/tradeoffs for embedded/mobile platforms
* Language support for mobile toolkits and frameworks
* Language support for distribution
* Language support for reliability, availability, and serviceability
* Mobile IDEs
* Mobile applications
Contributions are also welcome in other areas, including but not
limited to:
* Language design and implementation
* Language integration, inter-operation and deployment
* Applications (especially commercial)
* Reflection, meta-object protocols, meta-programming
* Domain-specific languages
* Programming paradigms and environments
* Efficient parallel and concurrent computation
* Language support for managing both manual and automatic GC
* Theorem proving
* Scientific computing
* Data mining
* Semantic web
Technical Programme:
Original submissions in all areas related to the conference themes are
invited for the following categories:
Papers: Technical papers of up to 10 pages that describe original
results.
Demonstrations: Abstracts of up to 2 pages for demonstrations of
tools, libraries and applications.
Workshops: Abstracts of up to 2 pages for groups of people who intend
to work on a focused topic for half a day.
Tutorials: Abstracts of up to 2 pages for in-depth presentations about
topics of special interest for 1 to 2 hours.
Panel discussions: Abstracts of up to 2 pages for discussions about
current themes. Panel discussion proposals must mention panel member
who are willing to partake in a discussion.
The conference will also provide slots for lightning talks, to be
registered on-site every day.
For inquiries about any other kind of participation (commercial
exhibits, advertising, prizes, book signing etc.), please see the
contacts below.
Important Dates:
- May 18, 2014: Submission deadline
- June 09, 2014: Notification of acceptance
- June 29, 2014: Final Papers due
- August 14, 2014: Conference
All submissions should be formatted following the ACM SIGS guidelines
and include ACM classification categories and terms. For more
information on the submission guidelines and the ACM keywords, see:
http://www.acm.org/sigs/publications/proceedings-templates and
http://www.acm.org/about/class/1998.
Submissions should be uploaded to Easy Chair, at the following
address: https://www.easychair.org/conferences/?conf=ilc14
Organizing Committee:
General Chair: Marc Feeley (Université de Montréal, Montréal, Canada)
Programme Chair: Didier Verna (EPITA Research lab, Paris, France)
Local chair: Marc Feeley (Université de Montréal, Montréal, Canada)
Programme Committee:
to be announced
Contacts:
* General Questions: ilc14-organizing-committee at alu.org
* Programme Committee: ilc14 at easychair.org
For more information, see http://www.international-lisp-conference.org
[View Less]
Either I misunderstood --enable-absolute-shared-libs (quite possible)
or it didn't work. I'd appreciate any help on this, please.
I downloaded gambc-4.6.9.tar.gz (the latest package), compiled and
installed in ~/.local/Gambit-C/ (multiple versions enabled) with
symlinks in ~/.local/{bin,lib/gambc,include/gambc/} on an Ubuntu-based
system.
I expected --enable-absolute-shared-libs to record the location of the
shared libraries in the executables but this didn't happen. I can run
gsi by setting …
[View More]LD_LIBRARY_PATH but not without doing that. I verified
with `readelf -d' that the information is not there.
I didn't see any relevant compiler options in the output of `make'
either, so before I investigate this path further: is this something
that --enable-absolute-share-libs is not even meant to do? If so, is
there (was there for 4.6.9) some other support for this?
I didn't bootstrap. It didn't seem required by INSTALL.txt for this.
[View Less]
Hi,
I'm new to Scheme, and new to Gambit, so I apologize if my question
is silly.
I think that the concept of wrapping a (let …) around a (lambda …) is
really neat, which got me wondering about what happens if you create
a circular reference to a lambda from the scope of the let that surrounds
it… in particular, should such a circular reference get garbage collected?
(And if so, WOW, that's a pretty clever garbage collector!)
In the following program I create 3 objects ("one", "two", and "…
[View More]three"), and
create wills for them. Then I destroy my references to all three objects
and call the garbage collector. The result is that 2 of the 3 objects gets
garbage collected.
My question is, is this the expected behaviour, or have I stumbled across
something more sinister?
Here's the code:
- - - CODE STARTS HERE - - -
(define (circ-obj name)
(let* ((data '(a . b) )
(func (lambda () (println "executing func for object \"" name
"\" proc: " data))))
(set-car! data func)
; (set-cdr! data fund)
; (set! data func)
func))
(define one (circ-obj 'one))
(println "CREATING ONE")
(pp one)
(one)
(println)
(define two (circ-obj 'two))
(println "CREATING TWO")
(pp two)
(two)
(println)
(define three (circ-obj 'three))
(println "CREATING THREE")
(pp three)
(three)
(println)
(println "CREATING WILLS")
(define wone (make-will one (lambda (obj) (println "killing one "
obj))))
(define wtwo (make-will two (lambda (obj) (println "killing two "
obj))))
(define wthree (make-will three (lambda (obj) (println "killing three "
obj))))
(println)
(println "DESTROYING ONE")
(set! one #f)
(##gc)
(println)
(println "DESTROYING TWO")
(set! two #f)
(##gc)
(println)
(println "DESTROYING THREE")
(set! three #f)
(##gc)
(println)
(println "Done!")
- - - CODE ENDS HERE - - -
When I run this I get the following result:
- - - SAMPLE RUN STARTS HERE - - -
CREATING ONE
(lambda () (println "executing func for object \"" name "\" proc: " data))
executing func for object "one" proc: #<procedure #2 one>b
CREATING TWO
(lambda () (println "executing func for object \"" name "\" proc: " data))
executing func for object "two" proc: #<procedure #3 two>b
CREATING THREE
(lambda () (println "executing func for object \"" name "\" proc: " data))
executing func for object "three" proc: #<procedure #4 three>b
CREATING WILLS
DESTROYING ONE
killing one #<procedure #2>
DESTROYING TWO
killing two #<procedure #3>
DESTROYING THREE
Done!
- - - SAMPLE RUN ENDS HERE - - -
Notice that the will for object "three" never gets called, which I think
means that the object hasn't been recollected by the garbage collector.
Anyway, all I'm really hoping for is an indication as to whether such
circularly referenced objects should or should not be garbage collected.
Thanks!
[View Less]
Hi, Marc
It has been quite a long time since the last discussion in Silicon Valley
and I finally got some spare time to complete it during the Lunar new year
Holiday.
http://mzh.im/gambit-in-nacl/
* HTML5 local storage is mount at /mnt/html5
* http://mzh.im/gambit-in-nacl/scm/ is mounted at /mnt/http, the pi example
is loaded with it.
Enjoy!
Meng
Marc:
I found a bug in fllog1p (I think you meant to use (macro-inexact--1)
instead of (macro-inexact-+1)) that caused me to look at a lot of the
fl<whatever> functions.
I think you lost the trail here. The fl<whatever> functions are
supposed to just give you whatever the associated floating-point library
functions give you, without checking for range conditions, etc. For
example, (fllog -1.0) is +nan.0, not "raise an exception".
So I went through _num.scm and tried to …
[View More]clean up those functions; the
attached _num.diff is what I tentatively ended up with.
What do you think?
Brad
[View Less]
All,
Please find below the call for papers for the 3rd International Workshop
on Trends In Functional Programming in Education, TFPIE 2014.
Apologies in advance for multiple copies you may receive.
Best regards,
James Caldwell
Call for Papers
___________________________________________________________________________________
*3rd International Workshop on Trends in Functional Programming in
Education (TFPIE 2014)*
May 25, 2014
Utrecht University
Soesterberg, The Netherlands
(http://…
[View More]www.cs.uwyo.edu/~jlc/tfpie14/
<http://www.cs.uwyo.edu/%7Ejlc/tfpie14/>)
The 3rd International Workshop on Trends in Functional Programming in
Education, TFPIE 2014, will be co-located with the Symposium on Trends
in Functional Programming (TFP 2014) <http://www.cs.uu.nl/wiki/TFP2014/>
at Soesterberg, at the "Kontakt der Kontinenten"
<http://www.kontaktderkontinenten.nl/conferentiehotel/home.aspx?lang=en-US>
hotel in the Netherlands on Sunday, May 25th. TFP will follow from May
26-28.
The goal of TFPIE is to gather researchers, teachers and professionals
that use, or are interested in the use of, functional programming in
education. TFPIE aims to be a venue where novel ideas, classroom-tested
ideas and work-in-progress on the use of functional programming in
education are discussed. The one-day workshop will foster a spirit of
open discussion by having a review process for publication after the
workshop. The program chair of TFPIE 2014 will screen submissions to
ensure that all presentations are within scope and are of interest to
participants. Potential presenters are invited to submit an extended
abstract (4-6 pages) or a draft paper (up to 16 pages) in EPTCS style.
The authors of accepted presentations will have their preprints and
their slides made available on the workshop's website/wiki. Visitors to
the TFPIE 2014 website/wiki will be able to add comments. This includes
presenters who may respond to comments and questions as well as provide
pointers to improvements and follow-up work. After the workshop,
presenters will be invited to submit (a revised version of) their
article for review. The PC will select the best articles for publication
in the journalElectronic Proceedings in Theoretical Computer Science
(EPTCS) <http://published.eptcs.org/>. Articles not selected for
presentation and extended abstracts will not be formally reviewed by the PC.
TFPIE workshops have previously been held in St Andrews, Scotland (2012)
and in Provo Utah, USA (2013).
*Program Committee*
James Caldwell, (Program Chair) University of Wyoming
Peter Achten, Radboud University, Nijmgen
Edwin Brady, University of St Andrews, St Andrews
Jurriaan Hage, Universiteit Utrecht
Philip Holzenspies, University of Twente
Daniel R. Licata, Wesleyan University
Marco T Morazan, Seton Hall University
Christian Skalka, University of Vermont
David Van Horn, Northeastern University
*Submission Guidelines*
There will be two types of presentations at TFPIE 2014. Regular papers
and "best lecture" presentations. The best lecture talks are intended
to allow for presentations or short lectures of purely pedagogical
material. Papers and abstracts can be submitted via easychair at the
following link: https://www.easychair.org/conferences/?conf=tfpie2014
*Papers*
TFPIE 2014 welcomes submissions describing techniques used in the
classroom, tools used in and/or developed for the classroom and any
creative use of functional programming (FP) to aid education in or
outside Computer Science. Topics of interest include, but are not
limited to:
* FP and beginning CS students
* FP and Computational Thinking
* FP and Artificial Intelligence
* FP in Robotics
* FP and Music
* Advanced FP for undergraduates
* FP in graduate education
* Engaging students in research using FP
* FP in Programming Languages
* FP in the high school curriculum
* FP as a stepping stone to other CS topics
* FP and Philosophy
*
*
*Best Lectures*
In addition to papers, this year we are requesting "best lecture"
presentations. What's your best lecture topic in an FP related course?
Do you have a fun way to present FP concepts to novices or perhaps an
especially interesting presentation of a difficult topic? In either
case, please consider sharing it. Best lecture topics will be selected
for presentation based on a short abstract describing the lecture and
its interest to TFPIE attendees.
*Important Dates*
* 1 February 2014: TFPIE submissions open on easychair.
* 7 April 2014: TFP and TFPIE registration opens
* 21 April 2014: Submission deadline for draft TFPIE papers and abstracts
* 27 April 2014: Notification of acceptance for presentation
* 25 May 2014: Presentations in Soesterberg, Netherlands
* 29 June 2014: Full papers for EPTCS proceedings due.
* 16 August 2014: Notification of acceptance for proceedings
* 8 September 2014: Camera ready copy due for EPTCS
Submission of an abstract implies no obligation to submit a full paper;
abstracts with no corresponding full versions by the full paper deadline
will be considered as withdrawn. At least one author from each accepted
presentation must attend the workshop.
[View Less]
------------------------------------------------------------------------
CALL FOR PAPERS
13th International Conference on
Generative Programming: Concepts & Experiences
(GPCE 2014)
September 15-16, 2014
Västerås, Sweden
(collocated with ASE 2014 and SLE 2014)
http://www.gpce.orghttp://www.facebook.com/GPCEConferencehttp://twitter.com/GPCECONF
------------------------------------------------------------------------
IMPORTANT DATES
* Submission of papers: May 30, 2014
* Paper …
[View More]notification: July 7, 2014
SCOPE
Generative and component approaches and domain-specific abstractions are
revolutionizing software development just as automation and componentization
revolutionized manufacturing. Raising the level of abstraction in software
specification has been a fundamental goal of the computing community for
several decades. Key technologies for automating program development and
lifting the abstraction level closer to the problem domain are
*Generative Programming* for program synthesis, *Domain-Specific Languages*
(DSLs) for compact problem-oriented programming notations, and corresponding
*Implementation Technologies* aiming at modularity, correctness, reuse, and
evolution. As the field matures *Applications* and *Empirical Results* are
of increasing importance.
The International Conference on Generative Programming: Concepts & Experiences
(GPCE) is a venue for researchers and practitioners interested in techniques
that use program generation, domain-specific languages, and component
deployment to increase programmer productivity, improve software quality,
and shorten the time-to-market of software products. In addition to exploring
cutting-edge techniques of generative software, our goal is to foster further
cross-fertilization between the software engineering and the programming
languages research communities.
SUBMISSIONS
We seek research papers of up to 10 pages in SIGPLAN proceedings style
(sigplanconf.cls, see
http://www.sigplan.org/authorInformation.htm) reporting original and
unpublished results of theoretical, empirical, conceptual, or
experimental research that contribute to scientific knowledge in the
areas listed below (the PC chair can advise on appropriateness).
4-page short papers and tool demonstrations are also accepted (see website).
TOPICS
GPCE seeks contributions on all topics related to generative software and
its properties. As technology is maturing, this year, we are particularly
looking for empirical evaluations in this context. Key topics include
(but are certainly not limited too):
* Generative software
Domain-specific languages
Product lines
Metaprogramming
Program synthesis
Implementation techniques and tool support
* Properties of generative software
Correctness of generators and generated code
Reuse and evolution
Modularity, separation of concerns, understandability, and maintainability
Performance engineering, nonfunctional properties
Application areas and engineering practice
* Empirical evaluations of all topics above
A more detailed list of topics can be found on the website.
Examples of key challenges in the field are
* Synthesizing code from declarative specifications
* Supporting extensible languages and language embedding
* Ensuring correctness and other nonfunctional properties of generated code;
proving generators correct
* Improving error reporting with domain-specific error messages
* Reasoning about generators; handling variability-induced complexity in
product lines
* Providing efficient interpreters and execution languages
* Human factors in developing and maintaining generators
Note on empirical evaluations: GPCE is committed to the empirical
evaluation of generative software. Publishing empirical papers at
programming-language venues can be challenging. We understand the
frustration of authors when, for example, reviews simply recommend
repeating entire experiments with human subjects with slight
deviations in execution. To alleviate such problems, we have recruited
forto program committee experts who routinely work with empirical
methods, and we will actively seek external reviews where
appropriate. During submissions, authors can optionally indicate that
a paper contains substantial empirical work, and we will endeavor have
to the paper reviewed by experts familiar with the empirical research
methods that are used in the paper. The program-committee discussions
will reflect on both technical contributions and research methods.
Policy: Incremental improvements over previously published work should
have been evaluated through systematic, comparative, empirical, or
experimental evaluation. Submissions must adhere to SIGPLAN's
republication policy (http://www.sigplan.org/republicationpolicy.htm).
Please contact the program chair if you have any questions about how
this policy applies to your paper (chairs(a)gpce.org).
ORGANIZATION
Chairs (chairs(a)gpce.org)
General Chair: Ulrik Pagh Schultz (University of Southern Denmark, DK)
Program Chair: Matthew Flatt (University of Utah, US)
Publicity Chair: Sebastian Erdweg (Technical University of Darmstadt, DE)
Local Organizer: Ivica Crnkovic (Mälardalen University, SE)
Program Committee
Kenichi Asai (Ochanomizu University, JP)
Emilie Balland (INRIA, FR)
Edwin Brady (University of St Andrews, UK)
Dave Clarke (Uppsala University, SE and KU Leuven, BE)
Ewen Denney (SGT / NASA, US)
Sebastian Erdweg (Technical University of Darmstadt, DE)
Martin Erwig (Oregon State University, US)
Alessandro Garcia (Pontifícia Universidade Católica do Rio de Janeiro, BR)
Anirüddhā Gokhālé (Vanderbilt University, US)
Jeff Gray (University of Alabama, US)
Stefan Hanenberg (Universität Duisburg-Essen, DE)
Jaakko Järvi (Texas A&M University, US)
Jean-Marc Jézéquel (IRISA-University of Rennes, FR)
Emerson Murphy-Hill (North Carolina State University, US)
Nathaniel Nystrom (University of Lugano, CH)
Bruno C. d. S. Oliveira (Hong Kong University, HK)
Hridesh Rajan (Iowa State University, US)
Márcio Ribeiro (Universidade Federal de Alagoas, BR)
Tiark Rompf (Oracle Labs and EPFL, CH)
Grigore Rosu (University of Illinois at Urbana-Champaign, US)
Norbert Siegmund (Universität Passau, DE)
Christian Skalka (University of Vermont, US)
Scott Smith (Johns Hopkins University, US)
Éric Tanter (Universidad de Chile, CL)
Emina Torlak (University of California Berkeley, US)
Laurence Tratt (King's College, UK)
[View Less]