?

Log in

LISP & Scheme User Community's Journal
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 14 most recent journal entries recorded in LISP & Scheme User Community's LiveJournal:

[ << Previous 20 ]
Saturday, January 28th, 2012
5:34 pm
[roelof1967]
Question
Does anyone know if and where answers can be found for the book  Structure and Interpretation of Computer Programms

Regards,

Roelof
Thursday, April 29th, 2010
9:58 am
[patrickwonders]
TC Lispers April Presentations online
The Twin Cities Lisp Users Group meeting for April was last Monday. The main topic was Web Frameworks, but there were also two shorter talks.

Weblocks Presentation

Patrick Stein gave this presentation at the TC Lispers meeting in April 2010.

Weblocks on Vimeo.

Allegro Serve and Web Actions Presentation

Robert Goldman gave this presentation at the TC Lispers meeting in April 2010.

Apology: Unfortunately, ScreenFlow bombed out on me when I went to stop recording. It subsequently saw that it had a partial project there but was unable to recover it. As such, there is no video available for this presentation. Feh. — Patrick

Hunchentoot Presentation

Paul Krueger gave this presentation at the TC Lispers meeting in April 2010.

Hunchentoot on Vimeo.

Cocoa Lisp Controller Presentation

Paul Krueger gave this presentation at the TC Lispers meeting in April 2010.

Cocoa Lisp Controller on Vimeo.

CL-Growl Presentation

Patrick Stein gave this presentation at the TC Lispers meeting in April 2010.

CL-Growl on Vimeo.



Current Mood: pleased
Wednesday, November 25th, 2009
11:03 pm
[veeman8]
COND system with Define.
Hey LISPers. I'm using Scheme. Please don't kill me.

I have a question that I can't seem to answer. Here's the code:

(define final '())

(cond (
(< frst scnd)
(define final (cons final frst))
(define final (cons final scnd))

)

This is what it's supposed to mean:
First, final is defined to null.
We have a condition statement. It states....

If first is less than second, define final by concatenating the variable first to the end of final
then, define final by concatenating the variable second to the end of final.

Of course, it gives me the following error:

define: not allowed in an expression context in: (define final (cons final first))

Any idea why, and how to fix it? :\

Thanks.
Thursday, October 8th, 2009
1:32 am
[patrickwonders]
Lisp Troubles: Fabricating a Closure...

The short version of my problem is that I want to do this:

(defun generate-setter (buffer pre post)
  (eval `(lambda (index value)
	   (setf (aref buffer ,@pre index ,@post) value))))

Except that I want the (lambda ...) to be a closure around buffer. Here, pre and post are lists generated at runtime (thus not available as lists at compile time) and hence the (defun ...) and (eval ...) instead of (defmacro ...). Alas, the (eval ...) form uses the null lexical environment, so I cannot capture buffer.

The long form with some of the myriad failed attempts I have made is on this blog post. Please, anyone have half a cup of clue that I could borrow? I promise, I'm going to the store for more clues really soon. I'll pay you back.

Edit: Here is exactly what I was looking for... (courtesy of tfb)

(defun generate-setter (buffer pre post)
  (let ((make-closure
           (compile nil `(lambda (buf)
                           (lambda (index value)
                             (setf (aref buf ,@pre index ,@post) value))))))
    (compile nil (funcall make-closure buffer))))
Sunday, August 30th, 2009
5:02 am
[6ferrets]
Scheme definition fork
I'm surprised that there's been no comment on the double Scheme announcement from the steering committee.

We believe the diversity of constituencies justifies the design of two separate but compatible languages, which we will (for now) call "small" and "large" Scheme.

Small Scheme

* Constituencies: educators, casual implementors, researchers, embedded languages, "50-page" purists
* Think "IEEE/R5RS brought up to the current date."
* ~ 90% supermajority to be required for final ratification

Large Scheme

* Constituencies: programmers, implementors
* Think "R6RS with a happier outcome."
* ~ 75% supermajority to be required for final ratification


I suggest that "small" and "large" Scheme be named after Sussman (who co-wrote SICP) and Steele (who co-authored the Common Lisp standard) respectively. :-)

(Cross-posted to lisp and schemers)
Sunday, July 19th, 2009
11:01 am
[patrickwonders]
TC Lispers, July Presentations Online

TC Lispers, July Presentations Online

The July meeting of the Twin Cities Lisp Users Group was this past Tuesday. There were four presentations on the agenda:

The presentation slides and videos of the talks are available above. Enjoy!

Monday, April 6th, 2009
12:45 am
[vestimo2]
How to do this on Common Lisp ?
Hello. I want to write function using "do" cycle (NO recursion) which can convert any list to (a b c d ...) view, but don't know, how.
For example, (f '((a b) d (c) e (g (h))))->(a b d c e g h). Please help me.
Friday, January 23rd, 2009
8:35 pm
[esgab26]
Can any one help?-About the "cond" operator ----(novice)
Hi everyone,

I've read this in SICP book from MIT-OCW:

"A minor difference between if and cond is that the <e> part of each cond clause may be a sequence of expressions. If the corresponding <p> is found to be true, the expressions <e> are evaluated in sequence and the value of the final expression in the sequence is returned as the value of the cond. In an if expression, however, the <consequent> and <alternative> must be single expressions. "

so i tried this in scheme:

(define (test a b)
    (cond ((> a b) ((- a 1) (- b 1)))
               ((< a b) ((+ a 1) (+ b 1)))
               (else((+ a b) (- a b)))))

(test 3 2)

it returned: procedure application: expected procedure, given: 2; arguments were: 0

What I'm trying to do is: given a single predicate, evaluate multiple expressions (like the ones above, evaluate both (- a 1) and (- b 1)

i thought this is possible: (because of what i've read- or maybe i just don't understand it)

(cond <predicate> (<exp1> <exp2> <exp3>))- but it always result in an error

Can some one help me with this? What is meant by sequence of expressions?

Thank you very much

Eljon



Current Mood: confused
Monday, December 22nd, 2008
5:44 pm
[6ferrets]
(Novice) How to do nothing in Scheme?
I'm teaching myself some Scheme using PLT Scheme and have been using it to write some scripts. Because Scheme isn't purely functional, I ran into a situation where I wanted the option of doing "nothing". In my mind, it looked something like this:
(if (eof-object? x)
  (do-nothing)
  (display message) )

PLT Scheme requires that (if ...) must have an else clause, which seems to be non-standard.

In my working version, (do-nothing) is replaced by (display ""). (begin) is illegal. '() gets displayed on screen, which I don't want.

Am I not thinking Lispily (or Schemingly) enough, or is there some way to tell PLT Scheme to do nothing and to move along?



P.S. Oh no—another learning experience! :-) Thanks, everyone.
Sunday, November 30th, 2008
10:35 am
[jkndrkn]
Lisp in Production Systems
Hello Friends

My road to Lisp started with a personal desire to learn Lisp due to its historical significance and recent renewed interest. The quality and clarity of Practical Common Lisp and the writings of Paul Graham were strongly motivating factors. I learned Lisp and began using it to solve problems in graduate level courses where the choice of implementation language was left to students, and was eventually motivated to use Lisp in its traditional role by taking a number of AI courses.

I have a fairly solid understanding of the language and how to solve problems using it. However, my projects are relatively small and self-contained and do not interact with the outside world. I would like to develop some experience interfacing with the web and producing code that follows conventions frequently seen in modern Lisp production environments.

What is the best way to go about learning the particulars of production-ready Lisp? It seems that the common route is to create some kind of web application and ensure that it follows conventions that make it easy for other experienced Lisp programmers to extend and redeploy. I've also long held a desire to program a super nerdy customization-heavy turn based combat strategy game. Are there any solid and portable free graphics packages that work well with Lisp?

How have you been introduced to Lisp in production systems?
Thursday, November 20th, 2008
10:03 pm
[pete23]
of interest?
(i have to admit that my lisp is largely of the e variety)

anyone have any exposure to these things?

clojure looks like the alternative to JRuby i've been looking for - finally, a decent lisp dialect to lie atop the JVM. otoh, his macro constructions for calling into java are pretty hideous, so i'm not sure.

Qi is Mark Tarver's set of extensions to clisp to add the facilities that modern developers expect wrt to web programming etc... I have no idea if anyone has seen this; I suspect I only have because Mark was my tutor at Leeds Uni in 1995.

I fear I may use the first one in anger shortly. I'll let you know how it works out.
Monday, September 8th, 2008
8:40 pm
[jkndrkn]
Macro Trouble
Hello Friends

Lisp newbie here running into a bit of trouble when using Macros.

(defun fun (args)
  (mapcar #'(lambda (x) (print x)) args))

(defmacro macro (&rest args)
  `(progn ,@(fun args)))

(defun test ()
  (macro 'a 'b '(c d)))


Trouble is, I can't get this code to compile. It seems that the compiler can't recognize that the function FUN is defined on line 1. When it attempts to compile the function TEST, SBCL/Slime throws the following error:

CL-USER> (load (compile-file "macro.lisp"))

; compiling file "/home/jde/CAP5635/proj/numbrix/macro.lisp" (written 08 SEP 2008 08:38:21 PM):
; compiling (DEFUN FUN ...)
; compiling (DEFMACRO MACRO ...)
; compiling (DEFUN TEST ...)

; file: /home/jde/CAP5635/proj/numbrix/macro.lisp
; in: DEFUN TEST
;     (MACRO 'A 'B '(C D))
; 
; caught ERROR:
;   (in macroexpansion of (MACRO # # ...))
;   (hint: For more precise location, try *BREAK-ON-SIGNALS*.)
;   The function FUN is undefined.
; 
; compilation unit finished
;   caught 1 ERROR condition

; /home/jde/CAP5635/proj/numbrix/macro.fasl written
; compilation finished in 0:00:00
T


The same test was causing clisp to abort with a stack overflow error!

Got any ideas? Is there a fallacy in my approach? How do I convince the compiler that FUN really is defined before test is compiled?

Thanks!
Sunday, February 10th, 2008
4:55 pm
[xah_lee]
pop langs website ranking
while doing my website's traffic report, i did some research on major computer lang or tech website ranking. Here's the result ranked by alexa.com (some non-lang tech sites are given just for comparison):


Php.net             550  (largely due to online doc and forum)
sun.com             900  (java doc and forum)
java.com           1122
slashdot.com       1223  (forum)
Mysql.com          1296  (online doc, forum)
gnu.org            7328  (massive docs, mailing list archives)
wolfram.com        9065  (online doc, mathworld etc)
Python.org         9410  (python doc and prob forums)
Perl.org          26067  (perl doc, forum)
paulgraham.com    48153  (lisp bigwig, but huh?)
Perl.com          49104
haskell.org      118703
novig.com        130568  (lisp bigwig)
franz.com        292598
lispworks.com    377906   (common lisp doc)
Gigamonkeys.com  529551   (pop common lisp book)
schemers.org     880284



The list is not that surprising.

Many top ones are due to the popularity of the lang, but also because their site hosts the lang's documentation and discussion forum (or wiki,blogs). Hosting a web forum are likely to increase traffic some 10 or 100 fold.

Questions:

• paulgraham.com is unusually high. What's up with that?

• python.org at 9k seems also unusally high, compare that perl.org with online doc and forum is only 26k. Python.org has mailing list archives... maybe blogs too but am not sure it has forums... still the gab seems surprising. Even perl is not much talked about these days, but i'm guessing its market share is at least still 10 or 100 times of python...

If any one so wishes, add entries to the above list.
Thursday, February 7th, 2008
4:11 am
[xah_lee]
[ << Previous 20 ]
About LiveJournal.com