Hi Jason,

> I'd still love to hear some explanation about how
> the global '(pico~args)' symbol gets blown out
> by a function parameter named 'args', not within
> that function, but within a function it calls.

OK, right, this is an important question. It is in fact one of the core features
of the PicoLisp runtime.

The symbol does not get "blown out". It is the same symbol all the way.

Symbols are BOUND to values. PicoLisp uses "dynamic shallow binding". Please see
e.g. the FAQ at

   https://software-lab.de/doc/faq.html#dynamic


> not within that function, but within a function it calls

*Where* a symbol is used is a LEXICAL issue. A static view. BINDING is about how
symbols are set to *values* and how they are restored to their previous values.

To understand dynamic binding, perhaps look at the description of 'let':

   https://software-lab.de/doc/refL.html#let

though the exactly same rules apply to parameters bound in function calls, or
to other binding functions like 'for', 'use', 'bind', 'with' etc.

So we must not confuse symbols with their values. The symbol 'args' is always
the same, but its value is changed dynamically.


> Also, how does one define new piLog Predicates ?

With 'be': https://software-lab.de/doc/refB.html#be


>  I'm trying to create a Database of APKs :
> 
> (class +APK +Entity)

OK. First of all, forget about +Need. +Need should be used sparsingly. I use it
at most in one or two relations per class (if at all). It may lock up the GUI if
you start with a new, empty object, because then *every* input field is wrong.

And without GUI, +Need is ignored anyway.


> # APK POC Package Database Class
> (rel   apk (+Need +Idx +String)) # APK Path
> (rel   app (+Need +Idx +String)) # APK Package
> (rel   aid (+Need +Idx +String)) # APK Application ID
> (rel   ino (+Need +Idx +Number)) # FS  Inode of APK on SharePoint
> filesystem (UUID)
> (rel   flv (+Need +Idx +String)) # APK Build Flavor
> (rel   bty (+Need +Idx +String)) # APK Build Type
> (rel   vrn (+Need +Idx +Number)) # APK VersionCode
> (rel   vrs (+Need +Idx +String)) # APK VersionName
> (rel   gin (+Idx +String))       # APK GIT Info String
> (rel   dbg (+Idx +Bool))   # APK has Debug Logging enabled
> (rel   blt (+Need +Idx +Number)) # APK BuildTime
> (rel   bls (+Need +Idx +String)) # APK BuildTimeString
> (rel   ctm (+Need +Idx +Number)) # APK Creation Time
> (rel   mtm (+Need +Idx +String)) # APK Modification Time
> (rel   AB> (*Idx +Number)) # APK MinSdkVersion (Android ABI #)
> (rel   AB< (*Idx +Number)) # APK MaxSdkVersion (Android ABI #)
> (rel   AB@ (*Idx +Number)) # APK TargetSdkVersion (Android ABI #)
> (rel   AB$ (*Idx +Number)) # APK CompileSdkVersion (Android ABI #)

+Idx cannot be used on numbers.


> and define a query :
> ...

oohh, I'm very sorry. I must give up here. This needs 20 pages of fixes and
explanations ;)

Can you start from something simple first?

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to