Thank you Alex!

I was just finding out my own syntax errors, but this is helpful to me. I have 
a young child at home and only get small slices of time to learn PicoLisp. I 
sent that code in a rush this morning.

I will keep experimenting with the language, but I appreciate the help! Being 
able to ask questions is a huge time saver for me. The 'obj comment makes 
sense. I was reading the init code for the family example. I was able to fix 
the errors and I'm getting my lisp legs back under me. It has been quite a 
while since I have done anything but emacs-lisp.

# MODELS
(class +User +Entity)
(rel nr (+Key +Number))
(rel nm (+Idx +String))
(rel mshp (+List +Joint) user (+Mshp))

(class +Group +Entity)
(rel nm (+Idx +String))
(rel mshp (+List +Joint) group (+Mshp))

(class +Mshp +Entity)
(rel role (+Ref +String))
(rel user (+Joint) mshp (+User))
(rel group (+Joint) mshp (+Group))

# INIT
(obj ((+User) nr 1 nm "Grant"))
(obj ((+Group) nm "Go Club"))
(obj ((+Mshp) role "Organizer")
      user `(db 'nr '+User 1)
      group `(db 'nm '+Group "Go Club") )

Thanks again!

Grant Shangreaux


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, May 19, 2019 12:28 PM, Alexander Burger <a...@software-lab.de> wrote:

> Hi Grant,
>
> > If you don't mind, I am still having a bit of trouble figuring out if my E/R
> > models are correct, and also if I'm creating objects in the right way. 
> > Here's
> > what I have so far, I'd appreciate any comments or hints! Thank you!
>
> > (class +User +Entity)
> > (rel nr (+Need +Key +Number))
> > (rel name (+Need +Idx +String))
> > (rel memberships (+List +Joint) user (+Membership))
>
> I would be careful with +Need. My rule is to use it not at all, and if then
> only in cases where the system initializes the value upon object creation

Reply via email to