freenode/#lisp - IRC Chatlog
Search
22:43:01
gilberth__
Or to put it otherwise, if you don't mind, Xach, in CL there is no need to RETURN-FROM a function make it yield a value.
22:47:36
gilberth__
ACTION is hacking in Lisp for over 30 years now and almost never uses RETURN-FROM.
22:50:11
Xach
asdf_asdf_asdf: no. but it is essential to understand how it works and how it affects control flow and why it might lead to unreachable code.
22:54:51
gilberth__
asdf_asdf_asdf: The one thing you really must get is, that Lisp does not distinguish between statements and expressions like most other languages do.
23:11:52
gilberth__
Xach: BTW I am not _that_ olde, CLtL1 was published as I was 10yo which was about the time I came into contact with Lisp.
23:15:59
gilberth__
But, yes, I wonder when was BLOCK/RETURN-FROM invented? I bet Zeta Lisp has that, too.
23:18:44
Bike
the other day i looked at the lisp 1.5 manual, and it has return, and prog has a block. no naming or dynamic extent or anything though
23:21:59
gilberth__
Standard Lisp is funny. It allows RETURN and GO in a tail position only. Calls for LABELS.
23:38:24
Bike
if i read it correctly it was even worse, like i don't think you could GO from a nested if
23:43:13
gilberth__
BTW, I often use "[x]" for quoting, since I simply cannot remember what to quote and what not.
23:44:12
gilberth__
And it's different in [POSIX] basic regular expression versus extended regular expressions.
0:06:19
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=487355e5 will be valid until 00:15 UTC.
0:20:19
gilberth__
ralt: BTW your "\" is bogus. And a (FIND-IF (LAMBDA (C) (FIND C ".-_")) "foo-bar") is even faster.
5:18:41
thijso
the issue I thought was with incf yesterday, turns out it's me using (return) instead of (return-from label)
5:31:52
thijso
flip214: maybe. Doesn't feel like it. Especially as I haven't found the real issue yet.
5:48:15
thijso
pjb: yeah, I know. Still frustrating every time it happens. Especially when you end up with something working and you don't really know why...
5:49:02
thijso
So, why would it work if I wrap the call to the main app function in a mp:process-run-function? i.e. in a separate thread.
5:49:58
thijso
Although... maybe I need to clean up all my debugging code before I start rejoycing...
8:30:45
no-defun-allowed
Can I access a class's class-allocated slots without creating an instance of it?
8:35:28
no-defun-allowed
That's probably one of the stupider ways to implement what I have in mind though, in my network thingamabob I would like to define handlers that a server that is an instance of some class can handle, like (define-handler (my-server "/foo") :reader #'read-foo)
8:36:56
Shinmera
I don't think class-allocated slots ever happened to be the right thing in all of my projects.
8:37:24
Shinmera
I don't even know if they ever are at all preferable over either a special variable, a representative instance, or a metaclass.
8:38:00
no-defun-allowed
Fair enough, I couldn't get any inheritance from class-allocated slots now I think about it.
8:40:08
shka__
no-defun-allowed: what really you want to do? Launch some logic without an instance of a class?
8:40:38
no-defun-allowed
Shinmera: I swore to myself I'd try to do my networking with the MOP, then my objects with the MOP. But the chant sounds fun.
8:41:34
Shinmera
I agree with shka__, I don't really know what your problem is to present an adequate solution.
8:44:12
pjb
In OO languages, you need an object to send a message to. In CLOS, you need an object to dispatch a method of a generic function to.
8:44:44
pjb
There's no difference between a "class method" and an "instance method" in CLOS: all methods are methods of generic functions.
8:48:45
shka__
writing application logic based on the classes and not instances is really backward style of programming imho