Skip to main content

Questions tagged [lisp]

Lisp is a family of general purpose programming languages, influenced by the lambda calculus, and with the ability to manipulate source code as a data structure.

0 votes
1 answer
53 views

How to use symbolic expressions produced by a function to define another function?

I am trying to make a symbolic derivation function in Chez scheme. It works alright-ish (simplification is not yet being done): (define (derive var expr) ;; var is the direction in which you would ...
nemo nemo's user avatar
0 votes
1 answer
58 views

Why does Scheme use the procedural representation of pairs?

I am reading SICP. It says in 2.1.3: That is, the operations satisfy the condition that, for any objects x and y, if z is (cons x y) then (car z) is x and (cdr z) is y. ... Here are the definitions: ...
An5Drama's user avatar
  • 367
0 votes
0 answers
32 views

Interlisp Medley: LITATOM 'streams' no longer supported

I am trying to print string text to file in interlisp medley. Here is the code: (OUTPUT) > T (SETQ OUT (OPENSTREAM 'output.TEDIT 'OUTPUT)) > <Output stream ...> (OUTPUT OUT) > T (PRIN1 '...
QianruZhou's user avatar
0 votes
0 answers
115 views

Error, the sbcl repl is not recognizing the cl-lsp package even after configuring quicklisp

I'm trying to install cl-lsp to program in common lisp, the installation process is actually quite simple, first I cloned the cl-lsp repository, then I downloaded quicklisp and then I started the sbcl ...
Bruno Ciccarino's user avatar
0 votes
2 answers
87 views

Write text I/O stream to file with Interlisp Medley

I am tring to write text stream to file in Interlisp, Medley. I have searched everywhere (onine and in the books) but could not find a feasible command for I/O stream file operation in Interlisp. ...
QianruZhou's user avatar
0 votes
2 answers
80 views

The reason for strings instead of symbols

I was wondering about passing a string to check the existence of a symbol, so I created the following function, but all the answers were :INTERNAL, so it was useless. I understand the reason, but does ...
user's user avatar
  • 1
1 vote
0 answers
96 views

How can I lazily traverse a directory in lisp?

I've been working on processing a large amount of files with lisp and encountering an issue listing directory contents when there are millions of files in a directory. I found cl-fad and the (list-...
Dave Kasper's user avatar
  • 1,389
1 vote
0 answers
41 views

Error handling mode on saving application is ignored

I'm having a problem with images with prepended kernel on MacOS. Regardless of :error-handler argument value I provide to the save-application function, if an application fails with an error, I/O ...
NeZanyat's user avatar
1 vote
0 answers
67 views

Lex S-Expressions C++

I'm trying to build a high-performance, S-Expression based, C++/LLVM compiled DSL. I've written a small lexer for it, but I'm getting an infinite loop for all test cases I try without errors (which ...
Spencer Rosas-Gunn's user avatar
0 votes
1 answer
78 views

How do I use format in Lisp without it addint newlines/indentation when formatting an array?

Here's my issue: I am using format on an array of long strings, and, apparently by default when using the ~s directive, it adds newlines and two spaces of indentation. This is really great for human ...
Oliver Cox's user avatar
0 votes
0 answers
54 views

LISP - Arrow on 3d polyline to show water flow direction

I will appreciate if someone could help modify this nice LISP written by Stefan and Jonathan that I founded here: https://www.cadtutor.net/forum/topic/57478-arrow-on-3d-polyline-to-show-water-flow-...
YuvalM's user avatar
  • 101
0 votes
0 answers
51 views

How to Validate Phone Numbers in Plait without Using Regex?

I'm working on a project in Plait, a sublanguage of Racket, and I need to validate phone numbers. The phone numbers should be in the format "xxx-xxx-xxxx" where the area code is either "...
Jose Enrique Plaud's user avatar
1 vote
0 answers
68 views

Understanding lisp in the law of demeter paper

The law of Demeter paper contains snippets of some version of Lisp. Since I do not know Lisp I went ahead and tried to get an overview of the syntax. However the Lisp in that paper seems to be an ...
Ced's user avatar
  • 16.9k
0 votes
1 answer
46 views

Handle return results by MassProp command in Python

I'm trying to handle return results by MassProp command in Python code: acad.doc.SendCommand("MassProp") res1 = acad.doc.GetVariable("AREA"); res2 = acad.doc.GetVariable("...
vns955's user avatar
  • 3
-2 votes
2 answers
196 views

How to write a macro for loop in lisp imitating a for loop in C or Java?

In lisp, I would like to write a macro for loop without using the loop function in lisp which imitates a for loop in C or Java. I’d like to achieve this with only the basic lisp syntax.
amb's user avatar
  • 51

15 30 50 per page
1
2 3 4 5
467