Zope-Beans Resurrection (Beyond DSL)

The trick that keeps giving for 20 years. Changed the name on Apr 09 2022. And then again on Apr 10 2022

March 12 2021

My posting from 20 years ago (Sun, 04 Mar 2001)

Paul T
Sun, 04 Mar 2001 13:51:33 -0800

    Previous message: [Zope] BOFs
    Next message: [Zope] ANNOUNCE. Zope Beans v 0.1
    Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]


Experimental version:
http://www.pault.com/zope_beans.html 

Genbean.py v 0.1
Tested with Zope 2.3.0

The big picture is described in the paper "Zope: How To Win Big". 
http://www.pault.com/zope.html

What is Zope Bean? 

Zope Bean is a simplified plug & play product for Zope.
Zope Bean encapsulates a set of properties and methods. 
Zope Bean has one creation screen, one configuration 
screen and one information screen.

Zope Bean is not Zope Component. 

Zope Component is experimental new feature in Zope. 
I have not seen it implemented yet. However, from the paper: 
"Components need not be persistent, nor provide a management 
interface." Zope Beans are persistent and they provide a 
management interface. 

Zope Bean is not exactly Zope Product. 

Zope Products are hard to create and hard to maintain. 
If you're Python/Zope pro who is used to write complex 
Zope Products, the chances are that you may have 
no need in Zope Beans - you're already a magician. 
However, Zope Beans enforce loose coupling design 
(something to think about).

The biggest difference between Zope Bean and Zope Product 
is that Zope Bean is extremely easy to create and to maintain 
even you have no experience with Zope Products at all. If you 
know a bit of Python - you can write and use Zope Beans.

Next version of Zope Beans may provide more functionality 
(like complex types of properties, one-bean-cooperating-with-other-bean, 
Global Bean Distribution Network, e t.c.) The purpose of this
version is to show that writing plug & play Zope Products 
could be significantly easier than it is now.

Comments welcome.

Rgds.Paul.


First a bit history. The one thing that's been neglected last couple decades is M4.
One can do a lot with M4. Basically, M4 is C macroprocessor, as a stand alone component.
Here is a bit more on gods and C.

I do know how to improve on M4 ( Here is some stuff I run in production ), but that's complex topic.
For example, I myself can not decide should the DL be mixed in or left alone (here is a bit more on DL)

But this page is not about M4. It's about a shortcut. There is a shortcut (through YAML). Shortucts are easy so we take them all the time.

The first was Ansible. The guy took the shortcut, but lost the way. Actually, before YAML and Ansible was my XSLScript.
Here is my posting from Y 2000


Subject: ANN. XSLScript v 0.5.
From: Paul Tchistopolskii 
Date: Fri, 28 Jul 2000 00:15:55 -0700
ANN. XSLScript v 0.5.

Hello.

The source code + plug&play .jar distribution of 
XSLScript is available at  http://www.pault.com/ XSLScript/index.html

XSLScript is a terse notation for writing complex XSLT stylesheets.

To execute XSLScript script: 
    xsls some.xml some.xsls

The XSLScript script (some.xsls) will be compiled into appropriate 
XSLT stylesheet and then generated XSLT stylesheet will be 
applied to the file some.xml (no temporary file is created, this 
all happens in the memory). The actual XSLT transformation 
is performed by XT. 

To generate the XSLT stylesheet out of XSLScript script: 
    xslsdump some.xsls

Why XSLScript ? 

   One of the reasons is that I got tired typing 3 (or more) lines 
to invoke foo(bar). I doubt I'll now write too much plain XSLT code - 
I found it much easier to write and read XSLTScript. In the case 
I have to write XSLT code (for example - on client side), I can debug 
it in XSLScript and then I can generate the XSLT stylesheet.

 I see some more improvements. If you like the idea and 
have some other XSL 'meta-constructions' in mind - feel
free to ask me for implementing your requests in next version
of XSLScript. ( There may be at least one more release 
of XSLScript when I'l plug it into Ux  ( http://www.pault.com/Ux/ ).

Rgds.Paul.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

XSLScript was no shortcut, though. It had a grammar (to parse XPath) and it was heavy lifting.
I put it public domain, but can not find it now. Internets does not keep the good stuff for long.

Zope-Beans was a shortcut. XML descriptor - generation.
Same was my Fish is Selenium replacement - YAML based, because YAML exists now. In times of Zope-Beans there was only XML

And now I see a clear way to do Solidity Beans using the same trick. So the trick just keeps giving for 20 years.
That's why this page.

Sep 10 2021
cat t.pl

BEGIN

for( my $i=0; $i<3; $i++ ){
    PRINT("Hello World!\n")
}

perl t.pl

Hello World!
Hello World!
Hello World!
Oct 3 2021

Micro kernel + Macro layer. Unavoidable.
Yet when I implemented it first time many years ago - I just did it, not thinking much about it.
So did the C dude.

Oct 10 2021

Figured out the way to put this on steroids. Clearly anything in this world can be put on steroids. 0 - 1 - 2 - N

Nov 25 2021

The moment you make macro first class citizen, you can slash down the micro kernel. For microkernel bytecode becomes the game. Hence the winning bytecode will be the one that packs as much boolean into single instruction as possible (macro deals with the rest). Also 1 - 2 - N. They tried to do that with XML / XSL actually, but failed somehow. Well, XSL was macros from hell, that's why.

Nov 27 2021

Plastic parts: regexp, %/@/$ , weak types
Iron parts: reverse polish, functions (but parameters are battlefiled)
Missed parts: macros, 1-2-N, pipelines/debugging/coverage

Jan 09 2022

Figured out how to do PL/1 better than it was done.
Took 30+ years.
He was right about bootstrap and he was right about tables.
He was wrong on lack of pointers. He was wrong on one pass compilation. Elegant but wrong.
The bootstrap is : 1. mm (via PerlP2. One line change! XT did the same!) 2. minip. 3. Whatever (after AST | opt | codegen )

I kind of have to do it because of Perl5 Approaching EOL the only question is the ongoing war of course. The idiots. Again.

Apr 09 2022
XML - mixed content (- namespaces of course) = YAML (python ws trap) | JSON (suboptimal because no %) | S-exprs+ (because yes %/@/$)
S-exprs+ + X = what plants crave. Figured out X{}. This merges 2 pages. DL and DSL.

This actually affects the PL/1 pipeline slightly. 1 and 2 are affected.

Apr 10 2022

The problem with new programming languages is interesting. On one hand you want to use it production as soon as possible because that's the only way to test it in real life, (I had that experience with XSLScript). On another hand sometimes you *do* change some core constructions (exactly because of what happens in production) and when that happens you need to change all the places in production that are affected. Paradox again. The workaround looks "obvious" - like "go easy on new features" - only one of the "new" features - I implemented it years ago.

I will keep the updates on this page, because what I do now is *not* DL (and it's not DSL either)

Code - Isolation 1 (macros) - Isolation 2 (DL) (it's a loop, of course. Everything affected by Automation Paradox is a loop, I guess).

Jul 16 2022

Figured out the next step. For that had to improve on C. Before that improved on cron. Before that improved on sh (pipes) and Hadoop. At some point also imporoved on the internet. Ironically, the XML pseudo-technology had a comeback. Improving on C was the hardest. Took 30 years. And collapse of USA of course. People outside USA have no problem with computing resources, the problem is specific to USA last 6 years. Include and define get block. One word disrupts yacc, m4 and pretty much everything. The (only) remaining question is recursion now. Surely, recursion is an elegant way to write inductions (and inductions are praised by Bourbaki, because number theory). Only how many people on this planet actually care? And how many problems (outside academia) actually need one?

Jun 03 2023

It took a (long) year to implement something reasonable, but I actually implemented some parts of this. Having said that, what I implemented is *still* suboptimal, despite the fact that it is better, compared to any existing solution on the planet. This means next generation would need to find a way to crack the DL acorn better, than our civilization was able to. I *really* doubt their abilities. I think they will just be re-shuffling lisp over and over again. Which is of course useless, but nobody will be out there to tell them. Basically, S-expressions is a perfect distraction. Fake simplicity on steroids.