Gmail Kalender Dokument Reader Nätet mer »
Nyligen besökta grupper | Hjälp | Logga in
Startsida för Google-grupper
A Succinctness Challenge
Det är för många ämnen i denna grupp som visas först. För att visa detta ämne först, så måste inställningen tas bort från något annat ämne.
Det uppstod ett fel när din begäran skulle bearbetas. Försök igen.
flagga
  Meddelande 1 - 25 av 43 - Komprimera alla  -  Översätt allt till Översatt (visa alla ursprungstexter)   Nyare >
Gruppen som du skickar meddelanden till är en Usenet-grupp. Meddelanden som skickas till den här gruppen gör ditt mail synligt för alla på Internet.
Ditt svarsmeddelande har inte skickats.
Ditt meddelande har publicerats
 
Från:
Till:
Kopia:
Uppföljning på:
Lägg till kopia | Lägg till uppföljning | Redigera ämne
Ämne:
Validering:
Av verifieringsskäl ber vi dig att skriva in de bokstäver du ser i bilden nedan eller de siffror som du hör om du klickar på tillgänglighetsikonen. Lyssna och skriv talen du hör
 
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 29 Maj 2004, 16:10
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 29 May 2004 14:10:46 GMT
Lokalt: Lör 29 Maj 2004 16:10
Ämne: A Succinctness Challenge
There are endless discussions about the best and most powerful
progrmming environment. The subject is mostly a matter of taste, and can
usually not be measured in absolute terms. But perhaps is it possible in
some certain, well-defined fields?

According to Paul Graham, the power of a programming language is equal
to its succinctness (see "http://www.paulgraham.com/power.html"). I
agree with him, and extend his postulate from languages to application
development environments in general.

I'm spending most of my time writing the database-and-GUI kind of
business applications. So this is the field where I'm personally
interested in, and which is sufficiently large and specialized in its
requirements to be also of general interest. I'm using Pico Lisp for
that, having built an application server framework on top of it with
quite high succinctness and abstractions for this type of applications.

I don't doubt that other people have tried to solve these problems before, so
there should be other environments with equal or higher succinctness (and thus
programming power). To make the systems somehow comparable, I specified a very
simple application with certain typical features, and posted it as a challenge
to the Lisp community:

   http://software-lab.de/succinctness.html

There is a specification, a complete solution (in Pico Lisp), and a link
to a life test setup.

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Christopher C. Stacy  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 29 Maj 2004, 16:49
Nyhetsgrupper: comp.lang.lisp
Från: cst...@news.dtpq.com (Christopher C. Stacy)
Datum: Sat, 29 May 2004 14:49:29 GMT
Lokalt: Lör 29 Maj 2004 16:49
Ämne: Re: A Succinctness Challenge
>>>>> On 29 May 2004 14:10:46 GMT, Alexander Burger ("Alexander") writes:

 Alexander> According to Paul Graham, the power of a programming
 Alexander> language is equal to its succinctness.
 Alexander> I agree with him

I think programming languages are more about "expressiveness",
of which "succinctness" is just one aspect.  This all just sounds
to me like an opportunity to argue over the meaning of words.

>>>>> On 29 May 2004 14:10:46 GMT, Alexander Burger ("Alexander") writes:

 Alexander> There are endless discussions about the best and most
 Alexander> powerful progrmming environment.

I thought this was settled 20 years ago and the answer was "Genera".
(The MIT-cum-Symbolics crowd had plenty of discussions and ideas about
relatively radical new places to move forward from there, but the world
wasn't even ready for Genera, yet, so those were never realized.)

 Alexander> But perhaps is it possible in some certain, well-defined fields?

Generally, people will construct a problem that suits
the answer they wanted.

For example, I think most people would even agree that SQL
is the best language for manipulating SQL databases as such.

APL is a very concise and beautiful language for expressing
many kinds of problems.

If you're talking about programming environments, I think
you'll find that it's fairly religous.   Might as well ask
what the "best" editor is.

And we all know the answer is ZMACS/ZWEI, so don't kid yourself.

:)


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 29 Maj 2004, 17:07
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 29 May 2004 15:07:58 GMT
Lokalt: Lör 29 Maj 2004 17:07
Ämne: Re: A Succinctness Challenge
Christopher C. Stacy <cst...@news.dtpq.com> wrote:

> Generally, people will construct a problem that suits
> the answer they wanted.

No, I have this type of problem permanently, and I'm sure that other
people have it, too.

> For example, I think most people would even agree that SQL
> is the best language for manipulating SQL databases as such.

But how succinct are the resulting programs?

I don't want to start a philosophical debate, but simply see hard facts.
A short and succinct solution. Is that so difficult?

> And we all know the answer is ZMACS/ZWEI, so don't kid yourself.
> :)

Maybe 42 ? ;-)

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 29 Maj 2004, 17:57
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 29 May 2004 15:57:24 GMT
Lokalt: Lör 29 Maj 2004 17:57
Ämne: Re: A Succinctness Challenge

Stefan Ram <r...@zedat.fu-berlin.de> wrote:
>   Pico Lisp was built specifically for such tasks, so a fair

Yes, and what I'm looking for are _other_ systems optimized for such
tasks.

>   comparison with other languages should include other tasks as
>   well.

The spec has to be as simple as possible. You cannot put many diverging
tasks into such a posting.

Also, I don't want to compare languages, but APIs.

>     - a small graphical editor for entity-relationship-diagrams
>       (say, it should be possible to insert, delete, label, move
>       and join boxes and directed arrows between them)

This is completely the opposite direction. Pico Lisp is text based,
so, for example, the following line

   (rel mate   (+List +Joint) mate (+Person))      # Spouse(s)

completely specifies the bi-directional Spouse relation. What does it
help here to draw arrows, except to make it less succinct?

>     - a programm to patch a directory of HTML files
> ...

No meaning in the case of Pico. There is not a single HTML-File involved,
everything is generated dynamically from execution of Lisp sexprs.

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
David Golden  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 29 Maj 2004, 21:06
Nyhetsgrupper: comp.lang.lisp
Från: David Golden <david.gol...@oceanfree.net>
Datum: Sat, 29 May 2004 20:06:18 +0100
Lokalt: Lör 29 Maj 2004 21:06
Ämne: Re: A Succinctness Challenge

Christopher C. Stacy wrote:
> For example, I think most people would even agree that SQL
> is the best language for manipulating SQL databases as such.

Yeah, but it sure sucks for relational database work ;-)

    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Marc Battyani  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 29 Maj 2004, 23:59
Nyhetsgrupper: comp.lang.lisp
Från: "Marc Battyani" <Marc.Batty...@fractalconcept.com>
Datum: Sat, 29 May 2004 23:59:25 +0200
Lokalt: Lör 29 Maj 2004 23:59
Ämne: Re: A Succinctness Challenge

"Alexander Burger" <a...@software-lab.de> wrote

> There are endless discussions about the best and most powerful
> progrmming environment. The subject is mostly a matter of taste, and can
> usually not be measured in absolute terms. But perhaps is it possible in
> some certain, well-defined fields?

The problem is that it depends what you are the most interested in.

> I don't doubt that other people have tried to solve these problems before,
so
> there should be other environments with equal or higher succinctness (and
thus
> programming power). To make the systems somehow comparable, I specified a
very
> simple application with certain typical features, and posted it as a
challenge
> to the Lisp community:

>    http://software-lab.de/succinctness.html

I also do lots of web applications but I view the SQL only as a back-end I
don't leave it influence my design.
In fact my framework is mainly CLOS based and I use HTML instead of Java for
the GUI. (and yes I have controls on each field and no submit button. ;-)
So I can't do exactly the same application but I can solve the same problem
with a different approach and the same succinctness.

Marc


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 09:25
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 30 May 2004 07:25:49 GMT
Lokalt: Sön 30 Maj 2004 09:25
Ämne: Re: A Succinctness Challenge

Marc Battyani <Marc.Batty...@fractalconcept.com> wrote:
> "Alexander Burger" <a...@software-lab.de> wrote
> > There are endless discussions about the best and most powerful
> > progrmming environment. The subject is mostly a matter of taste, and can
> > usually not be measured in absolute terms. But perhaps is it possible in
> > some certain, well-defined fields?
> The problem is that it depends what you are the most interested in.

Or, more precisely, what your customers request you to do.

> In fact my framework is mainly CLOS based and I use HTML instead of Java for
> the GUI. (and yes I have controls on each field and no submit button. ;-)

The problem with plain HTML is that you can't provide for life
interactivity as it is necessary for business-type applications. There
is no clean way to do input-validation and -aid, and also no
satisfactory multi-user synchronization.

But the physical appearance of the GUI doesn't matter. I'm only
interested in the functionality and behavior of the resulting
application.

> So I can't do exactly the same application but I can solve the same problem
> with a different approach and the same succinctness.

The same application is not necessary, or even desired. But it would
be nice if you take some time and post your approach.

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 09:29
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 30 May 2004 07:29:06 GMT
Lokalt: Sön 30 Maj 2004 09:29
Ämne: Re: A Succinctness Challenge

David Golden <david.gol...@oceanfree.net> wrote:
> Christopher C. Stacy wrote:
> > For example, I think most people would even agree that SQL
> > is the best language for manipulating SQL databases as such.

> Yeah, but it sure sucks for relational database work ;-)

And it does not handle the interactions with the user interface.
What I'm asking for are the abstraction layers in between.

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Edi Weitz  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 09:31
Nyhetsgrupper: comp.lang.lisp
Från: Edi Weitz <e...@agharta.de>
Datum: Sun, 30 May 2004 09:31:02 +0200
Lokalt: Sön 30 Maj 2004 09:31
Ämne: Re: A Succinctness Challenge
On 30 May 2004 07:25:49 GMT, Alexander Burger <a...@software-lab.de> wrote:

>> The problem is that it depends what you are the most interested in.

> Or, more precisely, what your customers request you to do.

> [...]

> The problem with plain HTML is that you can't provide for life
> interactivity as it is necessary for business-type
> applications. There is no clean way to do input-validation and -aid,
> and also no satisfactory multi-user synchronization.

There are enough customers out there that only allow plain HTML
because they have security constraints.

Edi.


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 09:43
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 30 May 2004 07:43:43 GMT
Lokalt: Sön 30 Maj 2004 09:43
Ämne: Re: A Succinctness Challenge

Edi Weitz <e...@agharta.de> wrote:
> There are enough customers out there that only allow plain HTML
> because they have security constraints.

Sure, therefore many of our installations are restricted to a LAN.

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Marco Baringer  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 13:11
Nyhetsgrupper: comp.lang.lisp
Från: Marco Baringer <m...@bese.it>
Datum: Sun, 30 May 2004 13:11:41 +0200
Lokalt: Sön 30 Maj 2004 13:11
Ämne: Re: A Succinctness Challenge

Alexander Burger <a...@software-lab.de> writes:
> But how succinct are the resulting programs?

by definiton they can't be as succint as the apps you write with a
framework designed for writing your apps :). of course, your framework
imposes one kind of mindset, ucw imposes another, certain apps are
easier with your framework, certain apps are easier with ucw,the real
question we should be asking is "how much should a framework impose?"
ucw tends to do only the web/frow-contral stuff and leave everytihng
else to the programmer, i honestly don't know where the line should
lie.

anyway, here's a ucw version of your program.

Notes:

0) the db is in RAM. UCW doesn't impose a particular db setup, so i'll
   just use the simplest one i can think of. Redfining the accessors
   for the person class should be easy enough should someone want to
   add a "proper" DBMS in here.

1) I've left out the date manipulation code, it's currently broken.

2) The view tables are written out by hand only because i haven't
   decided which abstraction i want for auto generating data views,
   not because i don't want it. (well, that's my excuse at least :)).

3) i've not implemented the propagation of sex changes from one person
   to their childern's parents, it's fairly trivial, rather boring,
   and adds nothing to this example.

4) there's more or less no explicit validation when creating a new
   user since this app never asks you for textual input but only
   allows you to chose from a list of valid possibilites. this choice
   would have to be revisited if the db becomes large.

5) This a 40 minute hack which may or may not even work, i just hope
   it's enough to give you an idea of what the ucw API is like.

The app initally presents the user with a listing of all the people in
the db (and a "create new user" button), navigating the app is done by
clicking on the names of the current person's spouses, parents or
children. the "search for person by name" button doesn't exist.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(in-package :it.bese.ucw-user)

(defclass people-app (standard-application)
  ((people :accessor people :initform (make-hash-table :test 'equal))))

(defapplication *people-db*
  (:url-prefix "/ucw/people/")
  (:clase people-app))

(defclass person ()
  ((name :accessor person.name :initarg :name :initform (gensym))
   (sex  :accessor person.sex  :initarg :sex  :initform :unknown)
   (mother :accessor person.mother :initarg :mother :initform nil)
   (father :accessor person.father :initarg :father :initform nil)
   (children :accessor person.children :initarg :children :initform nil)
   (spouses :accessor person.spouses :initarg :spouses :initform nil)))

;;; init the db

(let ((adam (make-instance 'person :name "Adam"
                                   :sex :male
                                   :birthdate (cl-icu:make-date 0)))
      (eve (make-instance 'person :name "Eve"
                                  :sex :female
                                  :birthdate (cl-icu:make-date 0))))
  (push adam (person.spouses eve))
  (push eve (person.spouses adam))
  (setf (gethash "Adam" (people *people-db*) adam
        (gethash "Eve" (people *people-db*) eve))))

;;;; viewing, editing and navigating an individual

(defcomponent person-viewer (standard-component)
  ((person :accessor person :initform nil :initarg :person)))

(defaction view ((p person))
  (call (make-instance 'person-viewer :person p)))

(defaction change-name ((p person))
  (let ((new-name (call 'string-choser
                        :message "New name:"
                        :validate (lambda (name)
                                    (not (gethash name (people *people-db*))))
                        :error-message "Sorry, the name ~S is taken.")))
    (remhash (person.name p) (people *people-db*))
    (setf (person.name p) new-name
          (gethash new-name (person.name *people-db*)) p))
  p)

(defaction change-sex ((p person))
  (setf (person.sex p) (call 'option-dialog
                             :message "New sex?"
                             :options '((:male . "Male") (:female . "Female"))
                             :confirm nil))
  (case (call 'option-dialog
              :message "What should we do about ~S's child's fathers?"
              :options '((:leave . "Leave the DB in an invalid state.")
                         (:update . "Change the other parent's sex and swap mother and father.")))
    (:leave
     ;; just return the person
     t)
    (:update ;;update the entire db
     (dolist (c (person.children p))
       (case (person.sex p)
         ;; person has changed from male to female, need to change the
         ;; mother's sex and update all of the mother's children.
         (:female ...)
         ;; person has changed from female to male, need to change the
         ;; father's sex and update all of the father's children.
         (:male ...)))))
  p)

(defaction chose-or-make-person ((subject person) message &key (test #'identity))
  (or (call 'option-dialog
            :message message
            :options (list*
                      (cons nil "Make a new person.")
                      (loop
                         for person being the hash-values of (people *people-db*)
                         when (funcall test person)
                           collect person)))
      (call 'new-person :person (make-instance 'person) :test test)))

(defaction change-mother ((p person))
  (let ((new-mother (chose-or-make-person p "Who should be the new mother?"
                                          :test (lambda (possible-mother)
                                                  (eql :female (person.sex possible-mother))))))
    (setf (person.mother p) new-mother)
    (unless (find p (person.children new-mother))
      (push p (person.children new-mother)))
    p))

(defaction change-father ((p person))
  (let ((new-father (chose-or-make-person p "Who should be the new father?"
                                          :test (lambda (possible-mother)
                                                  (eql :male (person.sex possible-mother))))))
    (setf (person.father p) new-father)
    (unless (find p (person.children new-father))
      (push p (person.children new-father)))
    p))

(defaction add-spouse ((p person))
  (let ((new-spouse (chose-or-make-person p "Who should be the now spouse?"
                                          :test (lambda (possible-spouse)
                                                  ;; assume a conservative country
                                                  (not (eql (person.sex possible-spouse)
                                                            (person.sex p)))))))
    (push new-spouse (person.spouses p))
    (unless (find p (person.spouses p))
      (push p (person.spouses new-spouse))))
  p)

(defaction add-childer ((p person))
  (let ((new-child (chose-or-make-person p "new child?")))
    (push new-child (person.children p))
    (ecase (person.sex p)
      (:male (setf (father new-child) p))
      (:female (setf (mother new-child) p)))
    p))

(defaction delete-child ((p person) (child person))
  (setf (person.children p) (delete child (person.children p)))
  ;; must chose a new mother-father for child
  (if (eql p (person.mother child))
      (setf (person.mother child)
            (chose-or-make-person p (format nil "New mother for ~S?"
                                                (person.name child))))
      (setf (person.father child)
            (chose-or-make-person p (format nil "New father for ~S?"
                                                (person.name child)))))
  p)

(defaction delete-spouse ((p person) (spouse person))
  (setf (person.spouses p) (delete spouse (person.spouses p)))
  (setf (person.spouses spouse) (delete p (person.spouses spouse)))
  p)

(defmethod render-on ((res response) (v person-viewer))
  (with-slots (name sex birthdate mother father children spouses)
      (person v)
    ;; yes, this mess should be class->table macro,
    (<:table
     (<:tr (<:td "Name:") (<:td (<:as-html name)
                                (<ucw:a (lambda () (change-name (person v)))
                                        "Change Name.")))
     (<:tr (<:td "Sex:") (<:td (<:as-html sex)
                               (<ucw:a (lambda () (change-sex (person v)))
                                       "Change Sex.")))
     (<:tr (<:td "Mother:") (<:td (<ucw:a (lambda () (view mother))
                                          (<:as-html (person.name mother)))
                                  (<ucw:a (lambda () (change-mother (person v)))
                                          "Change Mother.")))
     (<:tr (<:td "Father:") (<:td (<ucw:a (lambda () (view father))
                                          (<:as-html (person.name father)))
                                  (<ucw:a (lambda () (change-father (person v)))
                                          "Change Father.")))
     (<:tr (<:td "Children:")
           (<:td
            (<:ul
             (dolist (c children)
               (<:li (<ucw:a (lambda () (view c)) (<:as-html (person.name c)))
                     (<ucw:a (lambda () (delet-child (person v) c)) "Delete.")))
             (<ucw:a (lambda () (add-child (person v))) "Add a child."))))
     (<:tr (<:td "Spouses:")
           (<:td
            (<:ul
             (dolist (s spouses)
               (<:li (<ucw:a (lambda () (view s)) (<:as-html (person.name s)))
                     (<ucw:a (lambda () (delete-spouse (person v) s)) "Delete."))))
            (<ucw:a (lambda () (add-spouse (person v))) "Add a spouse."))))
    (<ucw:a (lambda () (make-new-person (make-instance 'new-person :person (make-instance 'person))))
            "Create a new person.")
    (<ucw:a (lambda () (answer-component v (person v))) "Ok.")))

;;; creating new people

(defcomponent new-person (person-viewer)
  ((test :accessor test
...

läs mer »


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 16:11
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 30 May 2004 14:11:53 GMT
Lokalt: Sön 30 Maj 2004 16:11
Ämne: Re: A Succinctness Challenge
Marco, thank you very much for going through the trouble to write a
solution. If you permit, I'll put your article on my page as the first
member of reader-conctributed solutions.

Marco Baringer <m...@bese.it> wrote:
> framework designed for writing your apps :). of course, your framework
> imposes one kind of mindset, ucw imposes another, certain apps are
> easier with your framework, certain apps are easier with ucw,the real

You are right, concerning the GUI framework.

I didn't know ucw, but it seems to be a web development package. Then
it does not really access the type if (interactive) applications I
need for my projects, but covers mainly the HTTP/HTML part, right? But
this is Ok, as you said, if we settle on certain types of apps.

> ucw tends to do only the web/frow-contral stuff and leave everytihng
> else to the programmer, i honestly don't know where the line should

If I understand your code correctly, you implemented the management of
object-relations on-the-fly.

So now it would be interesting to separate the parts which implement a
general API (the "abstractions") from those which a special for the
demo application (the "elaborations") to see the resulting
succinctness.

Explanation: In my usual work I have to write such applications
permanently, and then there are much more complicated relations than
in the given spec, between tens or hundreds of classes, so we cannot
code these things explicitly each time.

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Marc Battyani  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 18:25
Nyhetsgrupper: comp.lang.lisp
Från: "Marc Battyani" <Marc.Batty...@fractalconcept.com>
Datum: Sun, 30 May 2004 18:25:38 +0200
Lokalt: Sön 30 Maj 2004 18:25
Ämne: Re: A Succinctness Challenge
"Alexander Burger" <a...@software-lab.de> wrote

> Marc Battyani <Marc.Batty...@fractalconcept.com> wrote:
> > The problem is that it depends what you are the most interested in.

> Or, more precisely, what your customers request you to do.

Well I try to choose them so that they are interested in what interest me.
;-)

> > In fact my framework is mainly CLOS based and I use HTML instead of Java
for
> > the GUI. (and yes I have controls on each field and no submit button.
;-)

> The problem with plain HTML is that you can't provide for life
> interactivity as it is necessary for business-type applications. There
> is no clean way to do input-validation and -aid, and also no
> satisfactory multi-user synchronization.

This is quite wrong. I do have real time control of all the values of all
the fields and that validation is server based.
The choice of HTML (+ jscript) was done mainly because, as Edi wrote, most
of my customers only allow plain HTML
because they have security constraints. As it's plain HTML  it works for
banks which have zillions of firewalls and proxies for instance.

> But the physical appearance of the GUI doesn't matter. I'm only
> interested in the functionality and behavior of the resulting
> application.

If you come to the Oslo Lisp workshop, I will show you the framework ;-)
BTW if you are interested I can send you the paper I wrote for the ILC2002.

Marc


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 18:31
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 30 May 2004 16:31:25 GMT
Lokalt: Sön 30 Maj 2004 18:31
Ämne: Re: A Succinctness Challenge

Stefan Ram <r...@zedat.fu-berlin.de> wrote:
>   Input-validation on the client can be faked or circumvented by

I'm not sure if we are talking about the same thing. With
Input-validation I mean that the user can only enter information into
a GUI-field which is correct in the current application context (e.g.
a reference to another database object).

>   the client/user. For security reasons, it needs to be done on
>   the server anyway.

That's the way the Pico Lisp GUI works. It is handled by dynamically
generated Java-Applets which keep a permanent connection to the
server. The application logic executes on the server. AFAIK there is
no other way to do this portably in a browser except with Java
(perhaps Flash?).

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
David Steuber  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 18:41
Nyhetsgrupper: comp.lang.lisp
Från: David Steuber <da...@david-steuber.com>
Datum: 30 May 2004 12:41:38 -0400
Lokalt: Sön 30 Maj 2004 18:41
Ämne: Re: A Succinctness Challenge

Alexander Burger <a...@software-lab.de> writes:
> Christopher C. Stacy <cst...@news.dtpq.com> wrote:
> > Generally, people will construct a problem that suits
> > the answer they wanted.

> No, I have this type of problem permanently, and I'm sure that other
> people have it, too.

Perhaps you should see another doctor.  There has to be a cure!

--
An ideal world is left as an excercise to the reader.
   --- Paul Graham, On Lisp 8.1


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
David Steuber  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 18:55
Nyhetsgrupper: comp.lang.lisp
Från: David Steuber <da...@david-steuber.com>
Datum: 30 May 2004 12:55:27 -0400
Lokalt: Sön 30 Maj 2004 18:55
Ämne: Re: A Succinctness Challenge

Edi Weitz <e...@agharta.de> writes:
> There are enough customers out there that only allow plain HTML
> because they have security constraints.

Indeed.

I think it is ok to use JavaScript in a web page, but its use should
be restricted to form validation to reduce traffic back and forth
between the client and server.  The application should not rely on the
JavaScript being turned on.

I've seen many sites where links call JavaScript functions.  They
don't seem to do it for any particular reason other than that they
can.  I think this should be a crime.

In many ways, going with pure HTML simplifies UI design for web
applications.  You no longer have to worry about the annoying
differences between JavaScript implementations.  You are just
generating text for your output, not code.  It's a practical
application of Occam's razor.

--
An ideal world is left as an excercise to the reader.
   --- Paul Graham, On Lisp 8.1


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 20:08
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 30 May 2004 18:08:11 GMT
Lokalt: Sön 30 Maj 2004 20:08
Ämne: Re: A Succinctness Challenge

Marc Battyani <Marc.Batty...@fractalconcept.com> wrote:
> "Alexander Burger" <a...@software-lab.de> wrote
> > Marc Battyani <Marc.Batty...@fractalconcept.com> wrote:
> > > The problem is that it depends what you are the most interested in.

> > Or, more precisely, what your customers request you to do.
> Well I try to choose them so that they are interested in what interest me.
> ;-)

Oh nice! You are a lucky man :-)

> > The problem with plain HTML is that you can't provide for life
> > interactivity as it is necessary for business-type applications. There
> > is no clean way to do input-validation and -aid, and also no
> > satisfactory multi-user synchronization.
> This is quite wrong. I do have real time control of all the values of all
> the fields and that validation is server based.

Hm, actually I also implemented a plain HTML version. If you replace
"lib/gui.l" on the command line with "lib/htm.l", you get a Java-less
version. I did never complete the implementation, but it basically
works by placing each TextField in its own HTML-form, so that hitting
Return during text input generates the necessary interactivity. The
focus is set with JavaScript (if enabled). I found this method too
limiting, however, and did not research about any further. Perhaps you
have a better solution?

> If you come to the Oslo Lisp workshop, I will show you the framework ;-)

Unfortunately, I had to cancel my trip two weeks ago.

> BTW if you are interested I can send you the paper I wrote for the ILC2002.

Please do so. Many thanks.

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Marc Battyani  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 20:39
Nyhetsgrupper: comp.lang.lisp
Från: "Marc Battyani" <Marc.Batty...@fractalconcept.com>
Datum: Sun, 30 May 2004 20:39:45 +0200
Lokalt: Sön 30 Maj 2004 20:39
Ämne: Re: A Succinctness Challenge

"Alexander Burger" <a...@software-lab.de> wrote

> Marc Battyani <Marc.Batty...@fractalconcept.com> wrote:
> > This is quite wrong. I do have real time control of all the values of
all
> > the fields and that validation is server based.

> Hm, actually I also implemented a plain HTML version. If you replace
> "lib/gui.l" on the command line with "lib/htm.l", you get a Java-less
> version. I did never complete the implementation, but it basically
> works by placing each TextField in its own HTML-form, so that hitting
> Return during text input generates the necessary interactivity. The
> focus is set with JavaScript (if enabled). I found this method too
> limiting, however, and did not research about any further. Perhaps you
> have a better solution?

Sure: Hidden frame or IFRAME.

> > If you come to the Oslo Lisp workshop, I will show you the framework ;-)

> Unfortunately, I had to cancel my trip two weeks ago.

:(

> > BTW if you are interested I can send you the paper I wrote for the
ILC2002.

> Please do so. Many thanks.

Sent.

Marc


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Chris Capel  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 30 Maj 2004, 21:45
Nyhetsgrupper: comp.lang.lisp
Från: Chris Capel <ch...@ibanktech.net>
Datum: Sun, 30 May 2004 14:45:13 -0500
Lokalt: Sön 30 Maj 2004 21:45
Ämne: Re: A Succinctness Challenge

David Steuber wrote:
> I've seen many sites where links call JavaScript functions.  They
> don't seem to do it for any particular reason other than that they
> can.  I think this should be a crime.

This is the default (perhaps only) behavior in ASP.NET applications. So, the
blame falls squarely on Microsoft. There are a number of other
"interesting" things in ASP.NET, like "textarea" fields that render
properly only in MS IE, when the /obvious/ way to code them would render
properly in Mozilla-and-related browsers as well.

It's /almost/ as if Microsoft were /intentionally/ introducing compatibility
problems. Imagine that! :-O

Chris Capel


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 31 Maj 2004, 09:41
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 31 May 2004 07:41:26 GMT
Lokalt: Mån 31 Maj 2004 09:41
Ämne: Re: A Succinctness Challenge

Marc Battyani <Marc.Batty...@fractalconcept.com> wrote:
> Sure: Hidden frame or IFRAME.

Hm, I'm still not convinced of the interactivity of the resulting
application.

Plain HTML (with or without server- or browser-based scripting) does
not allow a life connection between the client and the server, so the
GUI handling of the resulting applications is always limited.

For example, our customers are used to applications
- where keyboard input is expanded automatically from the database
- immediate responses to function keys acting on the database
- pop-up dialogs and menus which handle database contents
- unlimited table scrolling through the database

For a more complete application than the simple person database take a
loot at "http://bws.software-lab.biz", which is a scaled-down version
of a real application. It may not be fully functional because we were
too lazy to generate all necessary test data, but you'll get an idea.
Login with "test" and "test" and play around a little.

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 31 Maj 2004, 10:07
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 31 May 2004 08:07:08 GMT
Lokalt: Mån 31 Maj 2004 10:07
Ämne: Re: A Succinctness Challenge

> For example, our customers are used to applications
> - where keyboard input is expanded automatically from the database
> - immediate responses to function keys acting on the database
> - pop-up dialogs and menus which handle database contents
> - unlimited table scrolling through the database

I forgot one of the more important points:

- enable/disable GUI components depending on the current state of the
  database and the activities of other users

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Marc Battyani  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 31 Maj 2004, 12:21
Nyhetsgrupper: comp.lang.lisp
Från: "Marc Battyani" <Marc.Batty...@fractalconcept.com>
Datum: Mon, 31 May 2004 12:21:18 +0200
Lokalt: Mån 31 Maj 2004 12:21
Ämne: Re: A Succinctness Challenge
"Alexander Burger" <a...@software-lab.de> wrote

> Marc Battyani <Marc.Batty...@fractalconcept.com> wrote:
> > Sure: Hidden frame or IFRAME.

> Hm, I'm still not convinced of the interactivity of the resulting
> application.

You should. It puzzles all the Java/Zope/PHP web application developpers
I've met ;-)

> Plain HTML (with or without server- or browser-based scripting) does
> not allow a life connection between the client and the server, so the
> GUI handling of the resulting applications is always limited.

> For example, our customers are used to applications

Here is what I do in my framework:

> - where keyboard input is expanded automatically from the database

No.

> - immediate responses to function keys acting on the database

Yes.

> - pop-up dialogs and menus which handle database contents

Yes.

> - unlimited table scrolling through the database

Yes.

> I forgot one of the more important points:

> - enable/disable GUI components depending on the current state of the
>   database and the activities of other users

Yes, of course!

And also :
Simultaneous update of all the views for all the users when a value changes.
On the fly pdf generation with cl-pdf and cl-typesetting,
It works trough firewalls and proxies.
(cf the ILC2002 paper for details)

> For a more complete application than the simple person database take a
> loot at "http://bws.software-lab.biz", which is a scaled-down version
> of a real application. It may not be fully functional because we were
> too lazy to generate all necessary test data, but you'll get an idea.
> Login with "test" and "test" and play around a little.

OK I've played a little with it (though I don't speak German)
It's a nice Java database application, not really a web application.
Obviously each framework designer will prefer it's own one, otherwise he
would have done it in another way  ;-)

Marc


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Alexander Burger  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 31 Maj 2004, 12:47
Nyhetsgrupper: comp.lang.lisp
Från: Alexander Burger <a...@software-lab.de>
Datum: 31 May 2004 10:47:24 GMT
Lokalt: Mån 31 Maj 2004 12:47
Ämne: Re: A Succinctness Challenge

Marc Battyani <Marc.Batty...@fractalconcept.com> wrote:
> Here is what I do in my framework:
> > - immediate responses to function keys acting on the database
> > - pop-up dialogs and menus which handle database contents
> > - unlimited table scrolling through the database
> > - enable/disable GUI components depending on the current state of the

Interesting. I still don't see how you do it in a portable way without
Java, because no other technology gives you a permanent connection to
the server in a portable way. Sorry, I could not find that information
in your paper :-(

I was trying many times to get away from Java (that's also the reason
for the experiments in "lib/htm.l" I mentioned before), not because of
security reasons, but because of poor Java support across many
platforms.

> And also :
> Simultaneous update of all the views for all the users when a value changes.
> On the fly pdf generation with cl-pdf and cl-typesetting,

Besides pdf, we also generate plain PS and LaTeX in some cases.

> It works trough firewalls and proxies.

Firewalls and proxies are not so much a problem, because it only
concerns connections in one direction (from client to server, as the
applet connects backwards). And Pico Lisp also supports a tunneling
protocol.

> > For a more complete application than the simple person database take a
> > loot at "http://bws.software-lab.biz", which is a scaled-down version
> > of a real application. It may not be fully functional because we were
> > too lazy to generate all necessary test data, but you'll get an idea.
> > Login with "test" and "test" and play around a little.
> OK I've played a little with it (though I don't speak German)
> It's a nice Java database application, not really a web application.
> Obviously each framework designer will prefer it's own one, otherwise he
> would have done it in another way  ;-)

Yes, we agreed on that before :-)

As you said, it depends very much on the purpose. A web application is
probably easier for an un-initiated user, but for people who have to
work with it 8 hours a day a dedicated application might be preferred.

It would be nice if you could post a solution to the simple person
database of my original posting, using your framework.

- Alex

--

   Software Lab. Alexander Burger
   Bahnhofstr. 24a, D-86462 Langweid
   a...@software-lab.de, http://www.software-lab.de, +49 821 9907090


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Marc Battyani  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 31 Maj 2004, 16:53
Nyhetsgrupper: comp.lang.lisp
Från: "Marc Battyani" <Marc.Batty...@fractalconcept.com>
Datum: Mon, 31 May 2004 16:53:47 +0200
Lokalt: Mån 31 Maj 2004 16:53
Ämne: Re: A Succinctness Challenge
"Alexander Burger" <a...@software-lab.de> wrote

> Marc Battyani <Marc.Batty...@fractalconcept.com> wrote:
> > Here is what I do in my framework:
> > > - immediate responses to function keys acting on the database
> > > - pop-up dialogs and menus which handle database contents
> > > - unlimited table scrolling through the database
> > > - enable/disable GUI components depending on the current state of the

> Interesting. I still don't see how you do it in a portable way without
> Java, because no other technology gives you a permanent connection to
> the server in a portable way. Sorry, I could not find that information
> in your paper :-(

I could tell you, but after that I would have to ask Tim B. to send you his
black helicopters. ;-)
More serioulsy, I just use an hidden frame for behind the scene
communication.
Look at the table of content on the left of
http://msdn.microsoft.com/library/ to see what I mean (and you can look at
the javascript)

> I was trying many times to get away from Java (that's also the reason
> for the experiments in "lib/htm.l" I mentioned before), not because of
> security reasons, but because of poor Java support across many
> platforms.

Yes, one of my first framework version used a Java applet too, but nobody
accepted this.

> > And also :
> > Simultaneous update of all the views for all the users when a value
changes.
> > On the fly pdf generation with cl-pdf and cl-typesetting,

> Besides pdf, we also generate plain PS and LaTeX in some cases.

> > It works trough firewalls and proxies.

> Firewalls and proxies are not so much a problem, because it only
> concerns connections in one direction (from client to server, as the
> applet connects backwards). And Pico Lisp also supports a tunneling
> protocol.

OK.

Hm, I assume you mean a dialog based application as the web applications are
dedicated too.

> It would be nice if you could post a solution to the simple person
> database of my original posting, using your framework.

Here it is: (I made some modifs to show some disable predicates, added a
maried status to show interaction with the spouse value, if you change sex
or your spouse gets maried to somebody else you are automatically un-maried,
etc.)
As you can see I don't rely on any database to make the controls though it
would be possible.

(defclass person nil
  ((name :value-type string :user-name #T(:en "Name" :fr "Nom" :de "" :sp ""
:it "") :disable-predicate 'locked-name)
   (locked-name :value-type boolean :user-name #T(:en "Lock name" :fr
"Verouiller nom" :de "" :sp "" :it ""))
   (sex :value-type symbol :user-name #T(:en "Sex" :fr "Sexe" :de "" :sp ""
:it "") :initform :male)
   (bithdate :value-type :date :user-name #T(:en "Birth date" :fr "Date de
naissance" :de "" :sp "" :it ""))
   (father :value-type person :user-name #T(:en "Father" :fr "Père" :de ""
:sp "" :it "") :get-object-func 'choose-father)
   (mother :value-type person :user-name #T(:en "Mother" :fr "Mère" :de ""
:sp "" :it "") :get-object-func 'choose-mother)
   (maried :value-type boolean :user-name #T(:en "Maried" :fr "Marié" :de ""
:sp "" :it ""))
   (spouse :value-type person :user-name #T(:en "Spouse" :fr "Conjoint" :de
"" :sp "" :it "") :disable-predicate '(not maried) :get-object-func
'choose-spouse))
  (:user-name #T(:en "Person" :fr "Personne" :de "" :sp "" :it "") :guid
39944127642591635827640405902 :short-description 'name))

(defun choose-father (obj)
  (remove obj
     (remove :female (persons *all-persons*) :key 'sex)))

(defun choose-mother (obj)
  (remove obj
     (remove :male (persons *all-persons*) :key 'sex)))

(defun choose-spouse (obj)
  (nset-difference
   (remove (sex obj)(persons *all-persons*) :key 'sex)
   (list obj (father obj)(mother obj))))

(defmethod (setf spouse) :around (spouse (obj person))
  (let ((prev-spouse (spouse obj)))
    (unless (eq prev-spouse spouse)
      (call-next-method)
      (when prev-spouse
 (setf (maried prev-spouse) nil))
      (when spouse
 (setf (maried spouse) t
       (spouse spouse) obj)))))

(defmethod (setf maried) :before (maried (obj person))
  (let ((spouse (spouse obj)))
    (when (not maried)
      (setf (spouse obj) nil))))

(defmethod (setf sex) :before (value (obj person))
  (unless (eq value (sex obj))
    (setf (maried obj) nil)))

 Marc
[Who should really be working on real work!]


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
David Steuber  
Visa profil   Översätt till Översatt (visa ursprungstexten)
 Fler alternativ 31 Maj 2004, 17:12
Nyhetsgrupper: comp.lang.lisp
Från: David Steuber <da...@david-steuber.com>
Datum: 31 May 2004 11:12:22 -0400
Lokalt: Mån 31 Maj 2004 17:12
Ämne: Re: A Succinctness Challenge

"Marc Battyani" <Marc.Batty...@fractalconcept.com> writes:
> If you come to the Oslo Lisp workshop, I will show you the framework ;-)
> BTW if you are interested I can send you the paper I wrote for the ILC2002.

I would appreciate a copy of this paper also if you don't mind.

The ability to make an interactive application with a pure HTML
interface (no JavaScript) that approaches the interactivity of a local
desktop application is something I find very appealing at this time.

There is of course the academic (or perhaps not so academic) curiosity
that I have about the future being server based applications, a place
where I could use Lisp or any other language I want.  There is also a
more practical problem that I am working on where a desktop app looks
like the only way to produce the required interactivity, but I am not
so sure and would love to do it as a pure web based app.

Brian Mastenbrook demoed a web based IRC application.  It's not as
good as a "real" IRC client, but it will run on a web enabled phone
without having to install any special software on the phone.  It was
really cool.

--
An ideal world is left as an excercise to the reader.
   --- Paul Graham, On Lisp 8.1


    Vidarebefordra  
Du måste Logga in innan du kan skicka meddelanden.
Om du vill skicka ett meddelande måste du först delta i den här gruppen.
Uppdatera ditt smeknamn på sidan Prenumerationsinställningar innan du skickar.
Du har inte behörighet att skicka meddelanden.
Meddelande 1 - 25 av 43   Nyare >
« Tillbaka till diskussioner « Nyare ämnen     Äldre ämnen »

Skapa en grupp - Google-grupper - Googles startsida - Användarvillkor - Sekretesspolicy
©2010 Google