freenode/#lisp - IRC Chatlog
Search
9:37:23
Xof
in (let ((z 'bar)) (defgeneric foo (x) (:method-combination bar z))), what do you expect the method combination to receive as an argument?
9:47:18
beach
I would help you, but my computer has some hardware problem I think, and it keeps crashing if I do too many things.
9:53:01
beach
Note to self: In WSCL, specify how the :METHOD-COMBINATION option of DEFGENERIC is handled, in particular, whether the method-combination-arguments are evaluated.
10:29:24
akr
hello, anyone knowledgeable about postmodern? I'm trying to put together a simple query: http://lpaste.net/3943544928583286784
10:30:07
akr
when track is nil, the query should require that track is nil, otherwise it should require that it is equal to the id
10:31:29
akr
I guess that the whole (:select …) form is quoted by pomo:query, but I can't use backtick inside it on my own
11:29:52
meh
Is there a word that refers to the property of a system and processes on that system such that any effect on the system can be undone?
11:49:30
ukari
i found that it seems common to add (in-package :cl-user), is thete any benefit to it?
11:56:32
theemacsshibe[m]
meh: if I were selling a product I'd say non-destructive. Users don't really mind how you allocate data in their software. If I were describing processes in Lisp, reversible hopefully will confuse people less.
11:56:49
theemacsshibe[m]
nconc is destructive, append is not destructive. Neither is very reversible.
12:11:48
jdz
There's whole branch of since about "reversible computing", so I'd bet it has quite a specific meaning: https://en.wikipedia.org/wiki/Reversible_computing
16:24:21
Bike
it's not a matter of offense, it's just that we can't offer as good help as the emacs people
16:32:41
cgay
Funny that this timeline of Lisps is on the Lisp Machine Lisp page, not something more general... https://en.wikipedia.org/wiki/Lisp_Machine_Lisp I started with Zetalisp.
17:06:37
ukari
is it possible to pull a macrolet variable to outside? sth like this, (funcall (lambda () (macrolet ((fn (&body body) `(lambda () ,@body))) fn)))
17:09:36
phoe
in the base case, you can define an anonymous function that accepts two arguments, WHOLE and ENV, and funcall this on your forms, then eval that code.
17:09:38
Bike
that doesn't answer my question. you can use an anonymous function. you can funcall or apply it. an anonymous macro does not have a similar use.
17:11:12
Bike
Eval arguments when? how are you using this? What is example code? You can use an anonymous function like (funcall (lambda (x) x) 4) => 4.
17:12:46
Bike
macrolets disappear after compile time. they don't leave behind macros as values or anything.
17:39:20
flip214
the even bigger problem is that the compiler will already have computed all the _inputs_ as _values_, so splicing a macro in and expecting the source forms to be available is even harder.
18:32:22
foojin
What is the purpose of lambda as a symbol? I know that lambda as a macro inserts a (function ...) around an inner lambda, but is the inner one a mere symbol that doesn't "do" anything unless handed to "function"?
18:39:33
cgay
foojin, you seem to have some specific code in mind. Paste it somewhere so we can see?
18:40:36
MichaelRaskin
edgar-rft: I think they mean that CLHS has «Symbol LAMBDA» separately from «Macro LAMBDA»
18:40:45
Petit_Dejeuner
I guess it wouldn't work for ((lambda (a b c) (list a b c)) 1 2 3) code though
18:41:22
foojin
cgay: Actually I don't. I just want to understand if there's something like "function" which handles 'lambda in a special way.
18:42:23
foojin
That is, is 'LAMBDA something more that just a syntax convention for invoking FUNCTION?
18:42:54
Bike
(function (lambda ...)) means a function, yes. That's what the "Symbol LAMBDA" entry in the CLHS is about.
18:43:39
phoe
foojin: there's no function that handles "symbol LAMBDA" differently. It's the evaluator that handles it differently.
18:43:52
phoe
The CAR of each function call may be either a symbol that names a function, or a LAMBDA form.
18:44:16
phoe
If the evaluator wants to evaluate a list that looks like (foo ...) then it calls the function FOO.
18:44:34
phoe
If the evaluator wants to evaluate a list that looks like ((lambda (...) ...) ...) then it calls the anonymous function denoted by the lambda form.
18:46:23
Bike
the CAR of a cons being evaluated is not evaluated normally. That's why it can only be a symbol or a lambda expression.
18:47:28
foojin
Bike: So when it sees a form like this, it skips expansion for the (LAMBDA ...) and handles it directly?
18:52:41
Bike
(<symbol> ...) is valid. ((lambda ...) ...) is valid. everything else is invalid, so there's no need to macroexpand the car
18:54:15
foojin
I see. So, except for that and lambda-as-a-macro case, LAMBDA doesn't have any other special meaning, right?
18:55:15
phoe
it has two special uses: as a standard macro, and as a symbol naming an anonymous function in forms that are evaluated
19:00:10
phoe
edgar-rft: all symbols can be used as variable names, except 1) constants cannot be shadowed, 2) things get weird with symbols naming special variables and symbol macros
19:01:58
specbot
Constraints on the COMMON-LISP Package for Conforming Programs: http://www.lispworks.com/reference/HyperSpec/Body/11_abab.htm
19:07:35
phoe
"Some Exceptions to Constraints to Abridged Collection of Rules about the COMMON-LISP Package for Conforming Portable Programs Adhering to the Definition of the Standard for Safe Code"
19:10:11
p_l
(defun |Some Exceptions to Constraints to Abridged Collection of Rules about the COMMON-LISP Package for Conforming Portable Programs Adhering to the Definition of the Standard for Safe Code| () 'dafuq )
19:10:49
edgar-rft
SOME-EXCEPTIONS-TO-CONSTRAINTS-TO-ABRIDGED-COLLECTION-OF-RULES-ABOUT-THE-COMMON-LISP-PACKAGE-FOR-CONFORMING-PORTABLE-PROGRAMS-ADHERING-TO-THE-DEFINITION-OF-THE-STANDARD-FOR-SAFE-CODE
19:11:22
phoe
edgar-rft: quick, get this on quicklisp before Xach notices that it makes completely no sense
19:19:48
ealfonso
I wonder if it's very hard to get into a running lisp to change a value. or to force execution of a save-lisp-and-die, change something, and restart
19:21:34
ealfonso
phoe I have a long-running service where I would like to change something that isn't configurable except by changing a variable's value
19:22:14
ealfonso
phoe probably a silly question and not too important. but I know using gdb it is possible to attach to a running process and change things around
19:23:03
MichaelRaskin
Or just run the service inside a normal SBCL instance inside screen/tmux, connect and issue the (setf …)
19:24:01
ealfonso
MichaelRaskin can I use SLIME to connect to something that doesn't expose a swank server? how do I 'connect' to issue the (setf ...)?
19:24:26
phoe
you usually want these on long-running services anyway in order to introspect and debug the image
19:25:19
MichaelRaskin
But in any case, it is reasonable to have _some_ way to interact with the servuce
19:25:59
ealfonso
MichaelRaskin yeah. I was curious if it could be done without a swank server, I have root access to the system where the process is running
19:27:08
phoe
ealfonso: theoretically you could open up a tmux session, make it run SBCL, run your service from it, and still have access to stdio
19:27:55
ealfonso
phoe actually the process is compiled to an executable using buildapp, so it's not an interactive repl
19:29:19
phoe
ealfonso: in this case, make it use swank and add a start-server call as a part of its execution hooks.
19:30:10
ealfonso
phoe yeah, I can do this if I'm willing to kill the currently running process. which I am
19:31:21
ealfonso
I guess I could also attach to the process using gdb. but I would probably have no idea what to do