An interesting comparison of different approaches from CLOS, Dylan and Python(C3)
A Monotonic Superclass Linearization for Dylan
Showing posts with label scheme. Show all posts
Showing posts with label scheme. Show all posts
2007-01-31
2006-12-18
Links: Lisp without parentheses in book
CONTENTS
1. A Hundred Years of Controversy Regarding the Foundations of Mathematics
2. LISP: A Formalism for Expressing Mathematical Algorithms
3. Gödel's Proof of his Incompleteness Theorem
4. Turing's Proof of the Unsolvability of the Halting Problem
5. My Proof that You Can't Show that a LISP Expression is Elegant
6. Information & Randomness: A Survey of Algorithmic Information Theory
7. Mathematics in the Third Millennium?
8. Bibliography
An excellent example of how a good idea can be spoiled. After removing parentheses an author has to comment every(!) line of a source code... otherwise everything is completely confusing.
Running over it, I started to mess about just on the phrase
[is set empty?]The first thought is... aha it's usual thing - besides parenthesis we add square brackets for easing of understanding. I.e. after translating to human language we get:
(define (is v p)
(p v))
(define empty? null?)
(is set empty?)
Oops... it turned out it was just a comment. Further it's getting worse huge sconses instead of one call of list, strange "'.
For educational purposes Lisp-1 can be used resolutely, and functions and usual variables may not be separated.
2006-11-20
Bigloo Scheme - simple type conversion
For a long time I looked for a function real->integer, it turned out that everything is much more easy.
1:=> (integer? 6.0)
#t
1:=> (real? 6.0)
#t
1:=> (exact? 6.0)
#f
1:=> (inexact? 6.0)
#t
1:=> (vector-ref (make-vector 10 0) 6.0)
*** ERROR:_vector-ref:
Type `int' expected, `real' provided -- 6.0
0.interp
1.engine
2.main
1:=> (vector-ref (make-vector 10 0) 6)
0
1:=> (vector-ref (make-vector 10 0) (inexact->exact 6.0))
0
tags:
scheme
2006-10-31
2006-10-05
Scheme: call-with-current-continuation
I've came across an interesting article Call with Current Continuation Patterns.
A lot of good examples, putting together.
Multi-threading, tail recursion optimization, exit and return to recursion. Great!
P. S. What's a pity that Russian-language literature on continuations is almost absent... I wish if it would be at least one article.
A lot of good examples, putting together.
Multi-threading, tail recursion optimization, exit and return to recursion. Great!
P. S. What's a pity that Russian-language literature on continuations is almost absent... I wish if it would be at least one article.
tags:
scheme
2006-03-15
The programming: Lisp
Gosh, I've passed a study course «The basis of the functional programming».
Though I don't know why. Well, since I started, I had to finish. But now I can boast the diploma numbered Nine Thousand Six Hundred And Sixty Six.
The general impressions are somewhat mixed. IMHO the course tries to include everything but as a result it comes out superficial enough. If only I have not an idea about Lisp before, I doubt whether I could understand some subjects given casually.
But after all it was interesting, the description of the basis of the realization LISP interpreter and compiler in Russian I have not met before in the Internet.
But the test questions of the course are definitely rotten. Still nobody manage to finish the course with the highest mark (5).
Though I don't know why. Well, since I started, I had to finish. But now I can boast the diploma numbered Nine Thousand Six Hundred And Sixty Six.
The general impressions are somewhat mixed. IMHO the course tries to include everything but as a result it comes out superficial enough. If only I have not an idea about Lisp before, I doubt whether I could understand some subjects given casually.
But after all it was interesting, the description of the basis of the realization LISP interpreter and compiler in Russian I have not met before in the Internet.
But the test questions of the course are definitely rotten. Still nobody manage to finish the course with the highest mark (5).
tags:
scheme
2005-11-02
Links: Lisp books
Learning Lisp - Forum thread with links to Lisp books.
Sample SLIME configuration for productive work
Sample SLIME configuration for productive work
2005-08-29
Installing SLIME
With the magic hook, SLIME could be run on lisp file open.
Few more usefull tips can be found there.
;Lisp enviroment installation
(setq inferior-lisp-program "clisp")
(add-to-list 'load-path "path_to_slime")
(require 'slime)
(slime-setup)
;Making slime connect to your lisp automatically when you open a lisp file.
(defun cliki:start-slime ()
(unless (slime-connected-p)
(save-excursion (slime))))
(add-hook 'slime-mode-hook 'cliki:start-slime)
Few more usefull tips can be found there.
Subscribe to:
Posts (Atom)