Re: Naive DEFSYSTEM replacement

"Marco Antoniotti (as marco dot antoniotti at unimib dot it)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <CAG0Nw2kS2qaU04Q7_ZAHTWHEFEK4eC3fRHgeKsMDfRgiv5k5jg@mail.gmail.com>
Hello

That's because YOU did not use MY solution :)

On Sun, Jul 27, 2025 at 11:27 AM Adam Weaver <[email protected]> wrote:

> On Sun, 2025-07-27 at 10:20 +0200, Marco Antoniotti wrote:
> >
> > HTML generation?
> >
> > Shameless plug: https://gitlab.common-lisp.net/xhtmlambda/XHTMLambda
> > and https://xhtmlambda.common-lisp.dev/
> >
>
> Isn't that the real curse of common lisp? Everyone invents their own
> solution to a problem rather than work on someone else' codebase?
>
> My solution is --sort-of-- similar to XHTMA but about 1,000 lines
> shorter.
>
> (defun >box (&key title rhs secondary padded id content)
>   (html
>     (:div (:class "box" :class secondary :class padded :id id)
>           (when title (html (>inline :between t :class "box-title")
>                             (:span () title) rhs))
>           content)))
>
> has a few syntactical borrowings from Rich Hickey's SVELTE language.
> A ":class secondary" attribute renders "class='secondary'" into the
> class list iff the free variable SECONDARY in the caller is true. and
> ":id id" renders as attribute id="value of id here" iff ID is non-nil.
>

Of course.  Of course.  Let me see what happens when you do

cl-prompt> *(>box)*

> Having said that, the main answers to your hack are that: (1) works
> > for you (not necessarily me, who is notorious for his very advanced
> > NIH syndrome),
>
> Oh samesies. I honestly try to use TP libraries, but they never work
> the way I quite want them to. So I end up shaving some yaks and writing
> my own.
>

Yask that work on LW only.

> (2) it is LW only,
>
> Well, so much of my codebase is LW only that the {ASDF|LW|MK}:DEFSYSTEM
> part is literally the smallest part.
>

I noted that :)

> and (3) it does not do what all the defsystems do.
>
> Yeah. I'm still not clear on *what*it*is*that*real*defsystems* do.
> There was a weak argument about running test loaders... really? There's
> got to be more to it to warrant multiple thousands of lines of code.
>

Portability, dependency maintenance (YMMV) and incremental
(re)compilation.  Portability and "most people's requirements" being the
crux of the argument.

And your one MK:DEFSYSTEM looked to have some chrome around calling a
> c-compiler and linking. That's nice, and would be really handy next
> time I have to write a little C glue library. But Lispworks' FLI:* is
> so advanced that I haven't actually needed a shim yet :)
>

Because you work *only* on LW.  MK:DEFSYSTEM has a very primitive, and
largely untouched foreign interface.  ASDF has one that is much better
developed.  And to have that, you require... code.

But I've given up on getting a real answer here.
>
> I **miss** usenet. If I'd posted something like this to c.l.l back in
> the day, I would've had Kenny screaming something about cells and PC
> providing an 8,000 line CLOS hack, and PB coming up with something very
> elegant and very French that didn't really solve the problem but was
> oh-so-elegant anyway.
>

Yep.  There is something about the old days.  Now you have 'groups.io',
Slack, Discord and a lot of other "enshittifying" platforms.
Plus libera.chat.

And much, much, less time.

Having said that, the issue is IMHO, not to have the "shortest" code, which
usually falls short here and there, but not to have the "maximally bloated
one" too.

In medium stat virtus.

Something I forget, most of the time.



> A.
>
> PS I wonder what happened to Mr Tilton. About a decade after c.l.l
> died, when Facebook announced their "React" technology, I had a shiver
> down my back - "oh crap so THAT's what Kenny was raving about years and
> years ago. He was right".
>
> I'd really like a reactive CAPI interface; if I ever do need some CAPI
> love I'll probably shave a herd of yaks to implement a reactive front-
> end on it first. Bad, bad use of my time.
>

I'd like to have a CAPI that works on CCL.  And SBCL, and ABCL, and ...

Kenny can be found here: https://www.facebook.com/kenny.tilton

Cheers

MA

-- 
Marco Antoniotti, Professor, Director         tel. +39 - 02 64 48 79 01
DISCo, University of Milan-Bicocca U14 2043   http://dcb.disco.unimib.it
Viale Sarca 336
I-20126 Milan (MI) ITALY

REGAINS: https://regains.disco.unimib.it/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.