Search found 226 matches

by edgar-rft
Fri Aug 07, 2015 6:23 am
Forum: Common Lisp
Topic: what is a special form?
Replies: 6
Views: 9507

Re: what is a special form?

What still bugs me, is that I can redefine the + operator with the GNU Common Lisp Compiler. All I get is a warning. This is definitely a bug in GNU Common Lisp. There are tricks to make it possible to redefine built-in Common Lisp functions, but this should not be enabled by default. I will try to...
by edgar-rft
Thu Aug 06, 2015 3:20 pm
Forum: Common Lisp
Topic: what is a special form?
Replies: 6
Views: 9507

Re: what is a special form?

Before a function is called, all its arguments ar evaluated. Yes. A special form doesn't follow this rule. Some arguments may get evaluated, some not. Yes. A macro generates code wich gets evaluated after applying some transformations. A macro can be used to block evaluation of some of its argument...
by edgar-rft
Thu Aug 06, 2015 12:16 pm
Forum: Common Lisp
Topic: what is a special form?
Replies: 6
Views: 9507

Re: what is a special form?

A "normal" Lisp function call looks like this: (<function-name> <argument-1> <argument-2> ... ) The standard evaluation rule for Lisp functions is: First evaluate all arguments from left to right Then apply the function to the evaluated arguments Evaluating the arguments first makes it possible to w...
by edgar-rft
Wed Aug 05, 2015 7:37 pm
Forum: Other Tools
Topic: A very hard start (How to compile and execute CCL)
Replies: 6
Views: 10710

Re: A very hard start (How to compile and execute CCL)

When I started to write my own Lisp programs I just wrote the entire code into *one* single file that I then loaded from the REPL with: (load "/full/path/to/my-file.lisp") The default directory where LOAD looks for files is stored in a variable named *DEFAULT-PATHNAME-DEFAULTS* . But the Common Lisp...
by edgar-rft
Sun Aug 02, 2015 9:21 pm
Forum: Other Tools
Topic: A very hard start (How to compile and execute CCL)
Replies: 6
Views: 10710

Re: A very hard start (How to compile and execute CCL)

Hi J.Owlsteam , welcome to the wonderful world of Lisp! :D See COMPILE-FILE and LOAD how to compile and load Lisp files from the REPL, but this is a very tedious way. The most-often-used combination of Lisp tools are: Emacs + SLIME for editing, compiling, and testing code. There is also Vim + slimv ...
by edgar-rft
Sat Jul 25, 2015 10:21 am
Forum: Common Lisp
Topic: correct behaviour of nconc
Replies: 2
Views: 4076

Re: correct behaviour of nconc

While Goheecha's explanation is correct, an easier-to-understand explanation is that NCONC is the destructive version of APPEND , which is defined as: ... The last argument is not copied; it becomes the CDR of the final dotted pair of the concatenation of the preceding lists, or is returned directly...
by edgar-rft
Sat Jul 04, 2015 8:01 am
Forum: Common Lisp
Topic: Creating a hash of hashes
Replies: 6
Views: 9520

Re: Creating a hash of hashes

...all of the code examples given in this topic, none of them worked at all... This was an additional question to another thread about converting a set of text files into a SQL database (that I currently can't find anymore), and if I remember right then CREATE-HASH was a function defined by mcc (th...
by edgar-rft
Sat Jun 27, 2015 3:17 am
Forum: Common Lisp
Topic: Storing a Sequence of Number Pairs
Replies: 2
Views: 4278

Re: Storing a Sequence of Number Pairs

How Common Lisp data types are stored in memory and how sequences are iterated over is entirely implementation dependent. To find out the fastest way either read the source code of your Common Lisp implementation or write all possible combinations in Lisp code and use TIME to check the execution spe...
by edgar-rft
Wed Jun 24, 2015 4:04 am
Forum: Common Lisp
Topic: 2015's CLisp implementations: Where can I find them?
Replies: 4
Views: 6331

Re: 2015's CLisp implementations: Where can I find them?

The ANSI Common Lisp Standard hasn't changed since 1994, so there are not much "new" things to miss. AFAIK Christian Schafmeister's Clasp is the only new Common Lisp implementation since Dan Weinreb's Lisp Survey in 2010. Here a list of things I remember from the last few years that are not covered ...
by edgar-rft
Mon May 25, 2015 1:13 am
Forum: Common Lisp
Topic: How do common lisp frameworks deal with packages?
Replies: 3
Views: 5647

Re: How do common lisp frameworks deal with packages?

How can one write a "deftest" that will take an additional argument specifying what package to use? I wouldn't recommend to pass package names as arguments at all. Usually you define a test-package that uses the respective other package(s), and then you write and run your deftests inside that test-...