Search found 133 matches

by sylwester
Fri Sep 16, 2016 5:20 pm
Forum: Other Dialects
Topic: agi
Replies: 5
Views: 28543

Re: agi

Sure about that? According to this mailing list entry it seem to be compatible with CL and thus should work with CLISP (as shown in the enrtry) as well as other compatible CL implementations like SBCL.
by sylwester
Wed Sep 07, 2016 5:22 am
Forum: Common Lisp
Topic: UTF-8 in LISP
Replies: 5
Views: 15189

Re: UTF-8 in LISP

by sylwester
Sat Sep 03, 2016 2:33 pm
Forum: The Lounge
Topic: Simple and short Lisp that encompasses all features?
Replies: 6
Views: 31638

Re: Simple and short Lisp that encompasses all features?

It seems strange that I would need all of that to use lisp for all possible calculations, are you sure I don't need just lambda? Lambda calculus and all languages that have closures you can do all calculations and data manipulations and representations with closures (evaluated lambdas). McCharthys ...
by sylwester
Thu Sep 01, 2016 5:51 am
Forum: The Lounge
Topic: Simple and short Lisp that encompasses all features?
Replies: 6
Views: 31638

Re: Simple and short Lisp that encompasses all features?

Lisp code is an AST tree so you making an alternative representation of the same. In Lisp languages lists are used to represent trees. As a suggestion on a minimalistic lisp consider the original McCrathy spec except labels. Thus: special forms: cond, lambda, quote functions: cons, car, cdr, symbolp...
by sylwester
Thu Jul 28, 2016 5:45 am
Forum: Common Lisp
Topic: how to get clisp to use all available cpu cores
Replies: 3
Views: 9679

Re: how to get clisp to use all available cpu cores

Why don't you just download a binary distribution of sbcl for 64 bit linux and use that? It's a lot faster!
by sylwester
Tue May 31, 2016 2:57 pm
Forum: Scheme
Topic: problem with assoc
Replies: 7
Views: 33621

Re: problem with assoc

It doesn't. If you look at the code snipplet I gave I waste an extra cons for each element just because your original question does not use dotted list but lists of proper lists. These are the same and makes a list of two elements (cons '+ (cons + '())) `(+ . (,+ . ())) `(+ ,+) ; ==> (+ #procedure:+...
by sylwester
Thu May 26, 2016 8:05 am
Forum: Scheme
Topic: problem with assoc
Replies: 7
Views: 33621

Re: problem with assoc

val- doesn't make sense.. If it's an atom return the atom if not return a procedure.. In val you have double parentheses in an expression so the 0+ is applied with zero arguments and the result is then stored as f. It's most likely a number so then you are trying to apply it as a procedure. Another ...
by sylwester
Tue May 24, 2016 5:01 pm
Forum: Scheme
Topic: problem with assoc
Replies: 7
Views: 33621

Re: problem with assoc

You are doing a very typical mistake of confusing symbols with bound procedures.Your alist must bedefined so that the value is a procedure and not just a symbol. Thus the symbol needs to be evaluated on the right hand side: (define alist `((0+ ,0+)(0* ,0*)(0- ,0-)(0/ ,0/)(0^ ,0^))) As you probably k...
by sylwester
Fri May 20, 2016 2:18 pm
Forum: The Lounge
Topic: Lisp to C converter.
Replies: 4
Views: 14708

Re: Lisp to C converter.

eratosthenesia wrote:Mostly in the implementation. I just use the extension "cl" as shorthand for "lisp/c". I might change that in the future. Thank you for your input.
Wouldn't it be more logical to use .lc then if it was shorthand for LispC? .cl is a common extension for common lisp files.
by sylwester
Fri May 13, 2016 1:54 am
Forum: Common Lisp
Topic: setq and assoc problem
Replies: 5
Views: 12900

Re: setq and assoc problem

... I consider using SETQ at toplevel to create "global" variables evil (as compared to using DEFVAR or DEFPARAMETER), and I'm not alone, sbcl will complain if you do it. ... Many implementations won't complain before you actually try to compile it. The implementations are free to choose ...