Search found 166 matches

by pjstirling
Sat Jun 15, 2019 4:46 pm
Forum: Common Lisp
Topic: Catch error message in SBCL
Replies: 2
Views: 67342

Re: Catch error message in SBCL

*DEBUGGER-HOOK* seems to be what you want?

http://www.lispworks.com/documentation/ ... ger-hookST
by pjstirling
Sat Jun 15, 2019 4:44 pm
Forum: Common Lisp
Topic: Function to simplify math expressions
Replies: 1
Views: 26391

Re: Function to simplify math expressions

It seems to me that you want to do this in two steps, first walk the tree to figure out the how deep the tree goes, and then walk the tree again simplifying all nodes at that depth
by pjstirling
Sun Mar 24, 2019 4:33 pm
Forum: Common Lisp
Topic: Using &rest parameters in Common Lisp
Replies: 3
Views: 34600

Re: Using &rest parameters in Common Lisp

... and if we're gonna necro, then it's also worth pointing out that sharp quote will do the right thing in the face of LABELS/FLET
by pjstirling
Sat Feb 09, 2019 6:44 am
Forum: Common Lisp
Topic: Using Funcall and function satisfiability
Replies: 1
Views: 26012

Re: Using Funcall and function satisfiability

Your problem is actually that you are mixing imperative with functional style. There is no special handling of the last form of the body of DO, it is discarded, so your call to CONS is wasted, and SAT remains NIL As an aside, DO should be used only in situations where you can't use one of the more s...
by pjstirling
Fri Feb 01, 2019 3:41 am
Forum: Common Lisp
Topic: stdin input restrictions
Replies: 3
Views: 29132

Re: stdin input restrictions

If you are pasting into the terminal then you may be hitting the maximum size of the clipboard, if your code is run with stdin from a file it works-for-me™️ Peters-MacBook-Pro:local-projects peter$ cat /tmp/data.txt | sbcl --script test.lisp Array: 1000299 1000298 1000297 1000296 1000295 1000294...
by pjstirling
Thu Jan 31, 2019 9:21 pm
Forum: Common Lisp
Topic: stdin input restrictions
Replies: 3
Views: 29132

Re: stdin input restrictions

Which platform, which implementation, and some code to show what you are doing would help me help you.
by pjstirling
Sun Dec 09, 2018 1:33 pm
Forum: Common Lisp
Topic: Find path to package resources?
Replies: 2
Views: 27683

Re: Find path to package resources?

I use ASDF:SYSTEM-RELATIVE-PATHNAME (usually with a per-package wrapper) to directly create PATHNAMES when I need to do this.
by pjstirling
Fri Nov 23, 2018 5:14 pm
Forum: Common Lisp
Topic: CLOS objects with many slots
Replies: 8
Views: 39995

Re: CLOS objects with many slots

In sbcl back-quote READs into an internal structure-type (this is allowed by the standard, even if inconvenient), which means that any symbols that you are trying to grovel in that back-quote would be ignored by your walker. I don't know if other things are also allowed to READ non-portably (I'm una...
by pjstirling
Fri Nov 23, 2018 1:38 pm
Forum: Common Lisp
Topic: CLOS objects with many slots
Replies: 8
Views: 39995

Re: CLOS objects with many slots

Watch out on sbcl because that's a naive walker