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 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
Marc:
It's not quite clear to me what object->u8vector does with procedures.
I was thinking that if it pulled in all the functions not in system
libraries, then it could be used as a tree-shaker.
This is only a vague thought, but I find its interesting.
Brad
Thanks for your hint.
I'll look at that and see what it looks like.
I am seriously considering the use of "external" documentation system, like
a static HTML generator (e.g. emacs org-mode, Pelican) or even simply
good'ol LaTeX. Formatting maths would be *so* much easier like that and
have a LaTeX to HTML converter in the process, along with PDFs.
Eric
2014-11-21 12:00 GMT-05:00 <gambit-list-request(a)iro.umontreal.ca>:
> Send Gambit-list mailing list submissions to
> gambit-list(a)iro.umontreal.ca
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
> or, via email, send a message with subject or body 'help' to
> gambit-list-request(a)iro.umontreal.ca
>
> You can reach the person managing the list at
> gambit-list-owner(a)iro.umontreal.ca
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Gambit-list digest..."
>
>
> Today's Topics:
>
> 1. Re: Documentation generator for Scheme ? (Hendrik Boom)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 21 Nov 2014 09:36:06 -0500
> From: Hendrik Boom <hendrik(a)topoi.pooq.com>
> Subject: Re: [gambit-list] Documentation generator for Scheme ?
> To: gambit-list(a)iro.umontreal.ca
> Message-ID: <20141121143606.GA21725(a)topoi.pooq.com>
> Content-Type: text/plain; charset=us-ascii
>
> On Wed, Nov 19, 2014 at 04:40:02PM -0500, Hendrik Boom wrote:
> > On Wed, Nov 19, 2014 at 03:20:41PM -0500, Eric Parent wrote:
> > > Hi all,
> > >
> > > I'm trying to get documentation being generated automatically based on
> our
> > > Scheme source code. I'm used to work with Doxygen and Sphinx (
> > > http://sphinx-doc.org/index.html) to generate documentation from C++,
> C,
> > > Python, ... source code files.
> > >
> > > Is there something equivalent for Scheme ?
> >
> > No idea. I'd be surprised if there isn't.
> >
> > But the best documentation I've everseen produced by a documentation
> > generator is the Trestle Reference Manual, accessible as
> > http://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-68.pdf
> >
> > It kind of sets a standard to aim for.
>
> This isn't gambit, but...
>
> Racket (formerly PLT Scheme) has a text formatter called Scribble.
> It appears to be a different concrete syntax for Scheme -- the file is
> basically text to be laid out properly interrupted by @ signs that can
> be followed by arious codes, including complete Scheme expressions.
> In those expressions you can use Schee as an ordinary programming
> language, but you also have access to a slew of text-formatting
> functions.
>
> Their packaging system has, I believe, some conventions about how to
> embed Scribble code amongst the normal Scheme, so that some program
> they have can extract some documentation.
>
> I don't know the details, and I don't know if it will satisfy your
> needs, but it is worth a look. You might be able to use Racket to
> extract documentation from your Gambit code.
>
> It may be worth porting some of this stuff to Gambit.
>
> -- hendrik
>
>
> ------------------------------
>
> _______________________________________________
> Gambit-list mailing list
> Gambit-list(a)iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
>
> End of Gambit-list Digest, Vol 122, Issue 4
> *******************************************
>
--
Eric
Hi all,
I'm trying to get documentation being generated automatically based on our
Scheme source code. I'm used to work with Doxygen and Sphinx (
http://sphinx-doc.org/index.html) to generate documentation from C++, C,
Python, ... source code files.
Is there something equivalent for Scheme ?
Any hint or ideas are welcome.
Regards,
Eric
Sorry guys for spamming, I put the wrong mailing list. Now is updated.
--------->8---------
Dear Lispers,
I'm pleased to announce, for the first time, Lisp Devroom @ FOSDEM,
the biggest FLOSS event in Europe, that will be held in Brussels on
January 31st to February 2nd, 2015.
This is a call to propose your talks for FOSDEM.
The topic of the devroom includes all Lisp-inspired dialects,
like Common Lisp, Scheme, Clojure, Emacs Lisp, newLISP, Racket,
GCC-Melt, LFE, Shen & more. Every talk is welcome: from real-world
examples, research projects, unusual ideas to small pet hacks.
FOSDEM is a hacker conference and we would be happy to see more
practical proposals, crazy ideas and open source projects
demonstrations than dry scientific papers (we will leave them for ILC
and ELS :-P).
Important dates
---------------
* Submission deadlines: 2014-12-14
* Acceptance notifications: 2014-12-28
* Lisp Devroom conference: 2015-01-31 (Saturday)
Submitting proposals
--------------------
Please use https://penta.fosdem.org/submission/FOSDEM15 to submit your
proposals; you will have to create Pentabarf account unless you
already have one.
When submitting your talk in Pentabarf, make sure to select the
'Lisp devroom' as the 'Track'.
Submission details
------------------
Your submission should include the following information:
* The title and subtitle of your talk, descriptive as possible
* A short abstract
* A longer description of the talk, if you would like so
* Links to related online material like pages, blogs, repositories
and etc.
Devroom mailing list
--------------------
Please join Lisp devroom mailing list; this will be official
communication channel for the devroom and all further announcements
will be sent there.
* lisp-devroom(a)lists.fosdem.org - mailing list address
* https://lists.fosdem.org/listinfo/lisp-devroom - mailing list
and subscription form
Planned schedule
----------------
Two types of sessions are considered:
* lighting talk - 30 minues including discussion
* full presentation - 60 minues including discussion
with 5 minutes for the setup between each talk. More details will be
announced on devroom mailing list.
Questions & volunteers
----------------------
Don't hesitate to mail me at 'sanelz [at] gmail [dot] com' in case you
have questions or would like to help with organization (put
'[Lisp-fosdem]' in subject). Also, feel free to use official devroom
mailing list for discussion.
Did I said that there will be video recordings? Yes, video volunteers
are welcome too :)
Please forward this announcement to the relevant lists.
'(Best Regards, Sanel)
Dear Lispers,
I'm pleased to announce, for the first time, Lisp Devroom @ FOSDEM,
the biggest FLOSS event in Europe, that will be held in Brussels on
January 31st to February 2nd, 2015.
This is a call to propose your talks for FOSDEM.
The topic of the devroom includes all Lisp-inspired dialects,
like Common Lisp, Scheme, Clojure, Emacs Lisp, newLISP, Racket,
GCC-Melt, LFE, Shen & more. Every talk is welcome: from real-world
examples, research projects, unusual ideas to small pet hacks.
FOSDEM is a hacker conference and we would be happy to see more
practical proposals, crazy ideas and open source projects
demonstrations than dry scientific papers (we will leave them for ILC
and ELS :-P).
Important dates
---------------
* Submission deadlines: 2014-12-14
* Acceptance notifications: 2014-12-28
* Lisp Devroom conference: 2015-01-31 (Saturday)
Submitting proposals
--------------------
Please use https://penta.fosdem.org/submission/FOSDEM15 to submit your
proposals; you will have to create Pentabarf account unless you
already have one.
When submitting your talk in Pentabarf, make sure to select the
'Lisp devroom' as the 'Track'.
Submission details
------------------
Your submission should include the following information:
* The title and subtitle of your talk, descriptive as possible
* A short abstract of one paragraph
* A longer description of the talk, if you would like so
* Links to related online material, like pages, blogs, repositories
and etc.
Devroom mailing list
--------------------
Please join Lisp devroom mailing list; this will be official
communication channel for the devroom and all further announcements
will be sent there.
* desktops-devroom(a)lists.fosdem.org
* https://lists.fosdem.org/listinfo/desktops-devroom - mailing list
and subscription form
Planned schedule
----------------
Two types of sessions are considered:
* lighting talk - 30 minues
* full presentation - 60 minues
with 5 minutes for the setup between each talk. More details will be
announced on devroom mailing list.
Questions & volunteers
----------------------
Don't hesitate to mail me at 'sanelz [at] gmail [dot] com' in case you
have questions or would like to help with organization (put
'[Lisp-fosdem]' in subject). Also, feel free to use official devroom
mailing list for discussion.
Did I said that there will be video recordings? Yes, video volunteers
are welcome too :)
Please forward this announcement to the relevant lists.
'(Best Regards, Sanel)
Dear list,
What do you see in the sources, does Gambit rebuild its file descriptors
list on *each* select/poll() call?
If you have the references to where they're added and wiped/deleated
respectively would be great,
Thanks. :)
=====================================================================
20th ACM SIGPLAN International Conference on Functional Programming
ICFP 2015
Vancouver, Canada, August 31 - September 2, 2015
http://www.icfpconference.org/icfp2015
=====================================================================
Important Dates
~~~~~~~~~~~~~~~
Submissions due: Friday, February 27 2015, 23:59 UTC-11
Author response: Tuesday, April 21, 2015
through Thursday, 23 April, 2015
Notification: Friday, May 1, 2015
Final copy due: Friday, June 12, 2015
Scope
~~~~~
ICFP 2015 seeks original papers on the art and science of functional
programming. Submissions are invited on all topics from principles to
practice, from foundations to features, and from abstraction to
application. The scope includes all languages that encourage
functional programming, including both purely applicative and
imperative languages, as well as languages with objects, concurrency,
or parallelism. Topics of interest include (but are not limited to):
* Language Design: concurrency, parallelism, and distribution; modules;
components and composition; metaprogramming; type systems;
interoperability; domain-specific languages; and relations to
imperative, object-oriented, or logic programming.
* Implementation: abstract machines; virtual machines; interpretation;
compilation; compile-time and run-time optimization; garbage
collection and memory management; multi-threading; exploiting
parallel hardware; interfaces to foreign functions, services,
components, or low-level machine resources.
* Software-Development Techniques: algorithms and data structures;
design patterns; specification; verification; validation; proof
assistants; debugging; testing; tracing; profiling.
* Foundations: formal semantics; lambda calculus; rewriting; type
theory; monads; continuations; control; state; effects; program
verification; dependent types.
* Analysis and Transformation: control-flow; data-flow; abstract
interpretation; partial evaluation; program calculation.
* Applications: symbolic computing; formal-methods tools; artificial
intelligence; systems programming; distributed-systems and web
programming; hardware design; databases; XML processing;
scientific and numerical computing; graphical user interfaces;
multimedia and 3D graphics programming; scripting; system
administration; security.
* Education: teaching introductory programming; parallel programming;
mathematical proof; algebra.
* Functional Pearls: elegant, instructive, and fun essays on
functional programming.
* Experience Reports: short papers that provide evidence that
functional programming really works or describe obstacles that have
kept it from working.
If you are concerned about the appropriateness of some topic, do not
hesitate to contact the program chair.
Abbreviated instructions for authors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* By Friday, 27 February 2015, 23:59 UTC-11 (anywhere in the world),
submit a full paper of at most 12 pages (6 pages for an Experience
Report) in standard ACM conference format, including bibliography,
figures, and appendices.
The deadlines will be strictly enforced and papers exceeding the page
limits will be summarily rejected.
* Authors have the option to attach supplementary material to a submission,
on the understanding that reviewers may choose not to look at it.
* Each submission must adhere to SIGPLAN's republication policy, as
explained on the web at
http://www.sigplan.org/Resources/Policies/Republication
* Authors of resubmitted (but previously rejected) papers have the
option to attach an annotated copy of the reviews of their previous
submission(s), explaining how they have addressed these previous
reviews in the present submission. If a reviewer identifies
him/herself as a reviewer of this previous submission and wishes to
see how his/her comments have been addressed, the program chair will
communicate to this reviewer the annotated copy of his/her previous
review. Otherwise, no reviewer will read the annotated copies of
the previous reviews.
Overall, a submission will be evaluated according to its relevance,
correctness, significance, originality, and clarity. It should
explain its contributions in both general and technical terms, clearly
identifying what has been accomplished, explaining why it is
significant, and comparing it with previous work. The technical
content should be accessible to a broad audience. Functional Pearls
and Experience Reports are separate categories of papers that need not
report original research results and must be marked as such at the
time of submission. Detailed guidelines on both categories are on the
conference web site.
Proceedings will be published by ACM Press. Authors of accepted
submissions will have a choice of one of three ways to manage their
publication rights. These choices are described at
http://authors.acm.org/main.html
Presentations will be videotaped and released online if the presenter
consents. The proceedings will be freely available for download from
the ACM Digital Library from one week before the start of the
conference until two weeks after the conference.
Formatting: Submissions must be in PDF format printable in black and
white on US Letter sized paper and interpretable by
Ghostscript. Papers must adhere to the standard ACM conference format:
two columns, nine-point font on a ten-point baseline, with columns
20pc (3.33in) wide and 54pc (9in) tall, with a column gutter of 2pc
(0.33in). A suitable document template for LaTeX is available at
http://www.acm.org/sigs/sigplan/authorInformation.htm
Submission: Submissions will be accepted on the web using a link
that will be posted at
http://icfpconference.org/icfp2015/
Improved versions of a paper may be submitted at any point before
the submission deadline using the same web interface.
Author response: Authors will have a 72-hour period, starting at 0:00
UTC on Tuesday, 21 April 2015, to read reviews and respond to them.
ACM Author-Izer is a unique service that enables ACM authors to
generate and post links on either their home page or institutional
repository for visitors to download the definitive version of their
articles from the ACM Digital Library at no charge. Downloads through
Author-Izer links are captured in official ACM statistics, improving
the accuracy of usage and impact measurements. Consistently linking
the definitive version of ACM article should reduce user confusion
over article versioning. After your article has been published and
assigned to your ACM Author Profile page, please visit
http://www.acm.org/publications/acm-author-izer-service
to learn how to create your links for free downloads from the ACM DL.
Publication date: The official publication date of accepted papers
is the date the proceedings are made available in the ACM Digital
Library. This date may be up to two weeks prior to the first day
of the conference. The official publication date affects the deadline
for any patent filings related to published work.
General Chair:
Kathleen Fisher Tufts University (USA)
Program Chair:
John Reppy University of Chicago (USA)
Program Committee:
Amal Ahmed Northeastern University (USA)
Jean-Philippe Bernardy Chalmers University of Technology (Sweden)
Matthias Blume Google (USA)
William Byrd University of Utah (USA)
Andy Gill University of Kansas (USA)
Neal Glew Google (USA)
Fritz Henglein University of Copenhagen (Denmark)
Gabriele Keller University of New South Wales and
NICTA (Australia)
Andrew Kennedy Microsoft Research Cambridge (UK)
Neelakantan Krishnaswami Birmingham University (UK)
Daan Leijen Microsoft Research Redmond (USA)
Keiko Nakata Institute of Cybernetics at Tallinn
University of Technology (Estonia)
Mike Rainey INRIA Rocquencourt (France)
Andreas Rossberg Google (Germany)
Manuel Serrano INRIA Sophia Antipolis (France)
Simon Thompson University of Kent (UK)
David Van Horn University of Maryland (USA)
Stephanie Weirich University of Pennsylvania (USA)