#clos

2025-12-14

github.com/atgreen/icl

improved CL repl

2nd contributors is claude.. ._.

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-12-12

<">
I mean, typecase using type specifiers makes sense, it’s a type-based operation after all. But handler-bind feels like a class- (or whatever the hierarchy of conditions are, they are not standard-objects iirc) based operation. Yet it uses type specifiers, and that’s a fun turn of events.
</">

My intuition is different.
I see this part of what `handler-bind' does merely (or at least essentially) as a kind of type dispatch (except that the primitive types are only condition types).

(Whether condition types are standard-classes is implementation-dependent, so they may or may not be such.
What is important is that the hierarchy of the kinds of conditions is integrated with the hierarchy of classes (and types).)

<">
I wish generics also allowed type specifiers. Imagine the world we’d be living in…
</">

To some degree I think we already do.
I haven't done this, so off the top of my head, I think it's possible to base method dispatch on (much of) what compound type specifiers allow by sufficiently heavy use of the Meta-Object Protocol and suitable metaclasses.
It would likely be also necessary to wrap `defmethod' in macro calls, but that is par for the course.

Whether that would be a good idea is another matter.
The complexity of the implementation would have to be justified.
Then this might reduce the efficiency of method dispatch.
(We usually don't mind when the efficiency of handling exceptional situations is less than the efficiency of "regular" execution.)

#CLOS
#CommonLisp
#CommonLispObjectSystem
#GenericDispatch
#MetaObjectProtocol
#MOP

@aartaka

2025-08-20

Cl-gopher is a Common Lisp library that implements the server and client sides of the Gopher protocol, as well as a sample text client. An easy to understand and well designed example of using CLOS.

github.com/knusbaum/cl-gopher

#gopher #CommonLisp #clos #lisp

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-07

[AMOP]
@dougmerritt @weekend_editor @sigue @abuseofnotation @screwlisp

Right now I'm thinking that the real value of _The Art of the Metaobject Protocol_ is showing one way to do metaprogramming, and object-oriented programming is merely a demonstration domain.

Of course, what begat AMOP was a desire for an approach that can cover a large part of the OOP language design space, not just one point in that space, in order to be attractive to different schools of thought.

#AMOP
#CLOS
#CommonLisp

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-07

@dougmerritt @weekend_editor @sigue @abuseofnotation @screwlisp

> no one else has been mentioning (so far as I've noticed) "The Art of the Metaobject Protocol"

Not in this thread.
Indeed, this book is a tour de force (et de magique).

> uncertain that the topic deserved such a deep analysis

The topic—maybe, maybe not, but the book is really about the metatopic, i.e. about metaprogramming, if I may abuse this prefix.
(I know this ought to be formulated more carefully.)

#AMOP
#CLOS
#CommonLisp

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-07

@weekend_editor @sigue @dougmerritt @abuseofnotation @screwlisp

> (call-next-method) is a procedural way to do this, costing an extra function call at runtime, but obviating the need for weird compilation.

And that is the costs-of-lisp-implementation consideration.

The other one is the program design consideration (including the costs of program modification), which often leads me to prefer a declarative style, but that is my point of view, there are always tradeoffs, etc.

#CLOS
#CommonLisp

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-07

@weekend_editor @sigue @dougmerritt @abuseofnotation @screwlisp

P.S.
If I recall correctly, freezing a set of class and generic function definitions (including the methods) precludes some operations later, like redefining a class at run time, but I don't know if this is related to your question.
Again, don't trust me.

#CLOS
#CommonLisp

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-07

@weekend_editor @sigue @dougmerritt @abuseofnotation @screwlisp

> a CLOS equivalent to (compile-flavor-methods), that compiles all those combined methods so they don't have to be done at load or run time?

Not in the (full¹) CLOS specification.
Speaking from uncertain memory, check it if it's important.
_________
¹ Including the parts not in the ANSI standard.

I have a very vague and insufficient memory of a non-Flavors implementation that provides something like that.

#CLOS
#CommonLisp

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-07

@sigue @dougmerritt @abuseofnotation @screwlisp

<">
I think the core feature is call-next-method, which can effectively be used to simulate around/before/after? (Not 100% sure it's an exact match.)
</">

Rather, the "before/after/around" approach is declarative, the `call-next-method' approach is procedural.
I can't recall a citation; I think this is even stated in the specification.

I'm afraid I'll leave a comparative analysis of the two approaches for another day 🙂.

#CLOS
#CommonLisp

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-07

@dougmerritt @abuseofnotation @screwlisp @sigue

> since it came up, how many CLOS features do you need?

You are right to ask.
Off the top of my head, I've needed
multiple inheritance,
multiple dispatch,
"before" and "after" methods.
Maybe I did something with method combination once or twice, but let's not count this if I can't recall properly.
But I am not a serious ("heavy-duty") #CLOS user.

If this counts, in other languages I have missed capabilities to customize object initialization.

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-07

[Red Daly's Parenscript Object System, simplified-CLOS-like.]

@abuseofnotation @screwlisp @sigue

Thank you, that is impressive.
From Stanford.
Regrettably, I don't have the time to find out the extent of simplification.

#CLOS
#CommonLisp
#JavaScript
#Parenscript

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-06

[Local generic functions.]

@sigue @screwlisp

In fact, `generic-flet' was proposed and not adopted.

<ai.mit.edu/projects/iiip/doc/C>

I am glad you found a bug 🙂.

#CLOS
#CommonLisp

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-06

[CLOS and JavaScript]

@screwlisp @sigue

> parenscript obviously doesn't have its own CLOS implementation

And achieving that doesn't seem like a five-minute job...

I am not the judge of whether that work can be justified, no matter how attractive it is.

#CLOS
#CommonLisp
#JavaScript
#Parenscript

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2025-06-05

@screwlisp

> had to rewrite my hurkle game without using CLOS. I thought a bit about using the 'make-load-form generic

Embarrassingly, my memory fails now about what exactly happened to standardizing anonymous generic functions.

#CLOS
#CommonLisp

2025-05-10

Как в датацентре доставить трафик до сервиса?

Итак, если мы решили создать сайт с котиками и хотим, чтобы он был масштабируемым и надёжным, какие шаги нужно предпринять для обеспечения его отказоустойчивости? На этот философский вопрос я тут и рассуждаю, но сначала - вспомним немножко, что же это такое — сети дата-центров?

habr.com/ru/articles/908180/

#load_balancing #datacenters #ecmp #зоопарк #мыши #слоны #clos #leaf

2025-04-15

interestingly, Chief Legal Officers #CLOs are increasingly involved in cybersecurity, with 50% on cybersecurity teams, 38% in leadership roles, and 93% on incident response teams. Key threats include phishing and #ransomware☝️☠️

helpnetsecurity.com/2025/04/15

2025-04-13

@amoroso there was still a choice between various proposals then...

But the actual CLOS was not far away - the standard proposal was published in September 1988: dl.acm.org/toc/sigplan/1988/23
Available above as a PDF. The final version was then published with the ANSI CL standard.

Hacker Newsh4ckernews
2025-03-01

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst