Search found 78 matches

by David Mullen
Tue Jun 27, 2017 1:45 pm
Forum: Common Lisp
Topic: Assesing set-macro-character+deftype vs CLOS...
Replies: 5
Views: 16100

Re: Assesing set-macro-character+deftype vs CLOS...

It's easy to print things differently depending on the context, but then you have to keep track of context. How does a selector know if it's in a list or not? It probably doesn't, so you'd need to leverage the pretty-printing mechanism (as pjstirling suggested). Erik Naggum once posted a throwaway e...
by David Mullen
Sat Apr 15, 2017 11:59 am
Forum: Homework
Topic: Constant terms in macro parameters...
Replies: 2
Views: 21719

Re: Constant terms in macro parameters...

Seems like it might be easiest—if not the right thing in your case—to just look for any keywords to delimit the associated expressions, rather than specific keywords. Sticking them in a property list makes the rule definition a bit more tractable: (defun rule-definition-plist (body) (loop with p...
by David Mullen
Wed Feb 15, 2017 4:24 pm
Forum: The Lounge
Topic: clack examples?
Replies: 3
Views: 49532

Re: clack examples?

The Web site Dark Chestnut has some articles involving Clack, like this one.
by David Mullen
Wed Jan 25, 2017 2:31 pm
Forum: The Lounge
Topic: CCL init file problem
Replies: 6
Views: 31271

Re: CCL init file problem

The mailing list had a question about it: [Openmcl-devel] *trust-paths-from-environment* under Windows? I guess CCL has its reasons for not using the HOME variable on Windows—security reasons, maybe?—so some modification would be involved in making that happen.
by David Mullen
Tue Jan 24, 2017 7:47 pm
Forum: The Lounge
Topic: CCL save-application from command line
Replies: 2
Views: 18873

Re: CCL save-application from command line

You could specify the same operations from the command line:

Code: Select all

ccl -l helloworld.lisp -e "(save-application \"helloworld.exe\" :toplevel-function #'main :prepend-kernel t)"
by David Mullen
Sun Dec 11, 2016 3:54 pm
Forum: Homework
Topic: How to disable libraries' "welcome" messages?
Replies: 2
Views: 19502

Re: How to disable libraries' "welcome" messages?

The welcome-message thing with portable-threads is mentioned here—that author's version of portable-threads has killed the message. Aside from changing the library code, you could just muzzle standard output like this:

Code: Select all

(let ((*standard-output* (make-broadcast-stream)))
  (require :snmp))
by David Mullen
Sat Dec 10, 2016 4:05 pm
Forum: Homework
Topic: The value GETHASH is not of type (UNSIGNED-BYTE 8)
Replies: 2
Views: 18560

Re: The value GETHASH is not of type (UNSIGNED-BYTE 8)

It's a quoted list—you're passing in the literal expression (gethash "PASSWORD" hash) instead of its value.
by David Mullen
Tue Nov 29, 2016 3:13 pm
Forum: Homework
Topic: Help for a tree manipulations.
Replies: 1
Views: 16827

Re: Help for a tree manipulations.

I don't think I'd use append for this—it seems to call for something like this for the right-tree case:

Code: Select all

(list (car arbre) (cadr arbre) (ajoute mot (caddr arbre)))
And something similar for the left-tree case.
by David Mullen
Sat Nov 12, 2016 1:22 pm
Forum: Homework
Topic: Is this code 'lispy'
Replies: 2
Views: 18748

Re: Is this code 'lispy'

An iterative approach isn't any less "Lispy" than recursion. The recursive version is tail-recursive, so replacing it with a non-recursive version is perfectly reasonable.