Awesome ... the +Val also has the good sideeffect that the UI is
updated to upper case :)
It's wonderful to gather these PicoLisp nuggets of wisdom!!! Thanks Alex.
Regards,
Kashyap
On Fri, Dec 6, 2019 at 6:41 AM Alexander Burger wrote:
> On Fri, Dec 06, 2019 at 03:24:25PM +0100, Alexander
On Fri, Dec 06, 2019 at 03:24:25PM +0100, Alexander Burger wrote:
>(gui 'tags '(+Var +Val +ListTextField)
> '*Tags
> '((L) (extract '((X) (uppc (pack X))) L))
> '("," " ")
> 20 )
Ah, and of course +ListTextField already returns a list of strings, so the
'pack' should
On Thu, Dec 05, 2019 at 07:11:43PM -0800, C K Kashyap wrote:
> Okay, my choTask looks like this now - as you can see, I assigned a list
> to @Names and then assigned the 'car' of the list to @Key. The way I
> avoided repetition was by assigning to a global symbol '*Names' - is that
> reasonable?
>
Okay, my choTask looks like this now - as you can see, I assigned a list
to @Names and then assigned the 'car' of the list to @Key. The way I
avoided repetition was by assigning to a global symbol '*Names' - is that
reasonable?
"Tags" (gui 'tags '(+Var +ListTextField)
Super! .. thanks Alex,
Regards,
Kashyap
On Thu, Dec 5, 2019 at 9:23 AM Alexander Burger wrote:
> On Thu, Dec 05, 2019 at 08:34:34AM -0800, C K Kashyap wrote:
> > About the "filtering with a no-op" - that was my way of getting rid of
> > NIL's in the list - what's the right way :) ?
>
> Ah, yes,
On Thu, Dec 05, 2019 at 08:34:34AM -0800, C K Kashyap wrote:
> About the "filtering with a no-op" - that was my way of getting rid of
> NIL's in the list - what's the right way :) ?
Ah, yes, sure! A valid solution!
I just did not trigger on that pattern, because I use (filter prog Lst), or
Thanks Alex,
About the "filtering with a no-op" - that was my way of getting rid of
NIL's in the list - what's the right way :) ?
Regards,
Kashyap
On Thu, Dec 5, 2019 at 7:50 AM Alexander Burger wrote:
> Hi Kashyap,
>
> > The question I have now is about cases where we may need a couple of
>
Hi Kashyap,
> The question I have now is about cases where we may need a couple of pilog
> variables of the form -
> @Names XXX
> @Gen (mapcan '((Nm) (list 'nm '+TagNm Nm)) 'XXX)
>
> where XXX needs to be substituted with an expression - (filter
Oh! ... now I see the spacing problem .. sorry about that, I think it must
be the result of copying from the terminal and pasting.
The last proposal was perfect - indeed it works just fine for tags (I've
tried different pasting this time).
(de choTask (Dst)
(diaform '(Dst)
(
On Wed, Dec 04, 2019 at 02:32:57PM -0800, C K Kashyap wrote:
> (patch choTask 'XXX '(filter '((X) X) (mapcar '((X) (uppc (pack X)))
> *Tags)))
> ...
I do not understand your intention. I thougt you wanted an AND of all tags, so
the @Gen generator was obsolete.
My last proposal was:
(de f
Hi Kashyap,
> (de choTask (Dst)
>
>(diaform
>
> '(Dst)
>
> (
>
> "--"
>
> "Name"
>
> (gui
>
> 'ttl
>
> '(+DbHint +Var +TextField)
>
> '(ttl +Task)
Hmm, OK, perhaps not to *that* extreme. 'pretty' was not a
Okay, I have a working version but I think I should be able to do it more
elegantly. I have the complete choTask function below (pretty printed
ofcourse :) ) I have the repeating pattern as XXX which I replace using
patch -
(patch choTask 'XXX '(filter '((X) X) (mapcar '((X) (uppc (pack X)))
Thanks Alex,
Sure, I'll do a pp in future - also start following that conventions.
About @Gen using @Names - the second argument of mapcan in the definition
of @Gen is essentially @Names. I am looking for a way to avoid having to
repeat the expression (filter ...
(gui
'query
Hi Kashyap,
On Tue, Dec 03, 2019 at 07:48:58PM -0800, C K Kashyap wrote:
> I'll need a little bit more help with Pilog in QueryChart - In the code
> below,
Could you in the future provide code which is formatted in a more readable way?
It is very hard to decipher. Better no spaces between lines,
Hi Alex,
I'll need a little bit more help with Pilog in QueryChart - In the code
below, I get the tags as a list of space separated words in the *Tags
variable. I create the @Names and @Gen pilog variables using *Tags. As you
can see @Gen uses @Names inside it but I am not sure how to reuse the
Oh yes! got it.
Regards,
Kashyap
On Thu, Nov 28, 2019 at 11:10 PM Alexander Burger
wrote:
> On Thu, Nov 28, 2019 at 01:30:26PM +0100, Alexander Burger wrote:
> >(de f (Names)
> > (pilog
> > (quote
> > @Names Names
> > @Gen (mapcan '((Nm) (list 'nm
On Thu, Nov 28, 2019 at 01:30:26PM +0100, Alexander Burger wrote:
>(de f (Names)
> (pilog
> (quote
> @Names Names
> @Gen (mapcan '((Nm) (list 'nm '+TagVal Nm)) Names)
> (select (@Item)
>((@Gen (v +Tag) itm))
>
Super!
Regards,
Kashyap
On Thu, Nov 28, 2019 at 8:39 AM Alexander Burger
wrote:
> On Thu, Nov 28, 2019 at 08:26:01AM -0800, C K Kashyap wrote:
> > I think having the filter in lisp still lets us take
> > advantage of +QueryChart's efficiency over large sets right?
>
> Yes, exactly. And it is
On Thu, Nov 28, 2019 at 08:26:01AM -0800, C K Kashyap wrote:
> I think having the filter in lisp still lets us take
> advantage of +QueryChart's efficiency over large sets right?
Yes, exactly. And it is faster than pure Pilog ;)
☺/ A!ex
--
UNSUBSCRIBE:
Thank you so much Alex,
This works for me!
I think having the filter in lisp still lets us take
advantage of +QueryChart's efficiency over large sets right?
Regards,
Kashyap
On Thu, Nov 28, 2019 at 4:37 AM Alexander Burger
wrote:
> On Thu, Nov 28, 2019 at 11:45:23AM +0100, Alexander Burger
On Thu, Nov 28, 2019 at 11:45:23AM +0100, Alexander Burger wrote:
>(de f (Names)
> (pilog
> (quote
> @Names Names
> @Gen (mapcan '((C) (list 'nm '+TagVal C)) Names)
> (select (@Item)
>((@Gen (v +Tag) itm))
>(lst
Oops, wait!
On Thu, Nov 28, 2019 at 10:56:56AM +0100, Alexander Burger wrote:
>(de f (Names)
> (pilog
> (quote
> @Names Names
> @Gen (mapcan '((C) (list 'nm '+TagVal C)) Colors)
> (select (@Item)
>((@Gen (v +Tag) itm))
>
On Thu, Nov 28, 2019 at 10:44:15AM +0100, Alexander Burger wrote:
> I would prepare the generator clauses as a Pilog variable, to build them at
> runtime, and then use the member/2 predicate in the filter clause to check for
> membership in the list of colors.
Could not resist :) This works:
Hi Kashyap,
> Hurray!!!
:)
> Just to confirm if I've understood correctly - this solution is similar
> to (nm +CuSu @Sup (sup +Item) (itm +Pos) ord) from the sample app correct?
> Instead of (nm +CuSu @Sup) we have (nm +TagVal @Col1 nm +TagVal) - right?
Yes, similar. The +CuSu case does:
1.
Hurray!!!
Thank you so much Alex,
Just to confirm if I've understood correctly - this solution is similar
to (nm +CuSu @Sup (sup +Item) (itm +Pos) ord) from the sample app correct?
Instead of (nm +CuSu @Sup) we have (nm +TagVal @Col1 nm +TagVal) - right?
I need one more help - writing a function
On Tue, Nov 26, 2019 at 02:06:25PM -0800, C K Kashyap wrote:
> It seems to work as expected using collects :) Here's the complete program
> - it prints out ITEM1 and ITEM6 as expected.
Ah, right, you select items, not tags, and items have a *list* of tags.
OK. Then to get AND, you can instead of
Hey Alex,
It seems to work as expected using collects :) Here's the complete program
- it prints out ITEM1 and ITEM6 as expected.
(call "rm" "-f" "test.db")
(class +Item +Entity)
(rel ttl (+IdxFold +String))
(rel tgs (+List +Joint) itm (+Tag))
(rel sts (+IdxFold +String))
(class +Tag +Entity)
On Tue, Nov 26, 2019 at 01:13:09PM -0800, C K Kashyap wrote:
> Hey Alex,
> What I need is an "and" - with collects, I do a (sect of L1 L2) ... I tried
> a bunch but cant seem to get "and" working -
> I need the items that are "RED" and "BLUE" :(
Hmm, isn't that impossible? In your model, a tag
Hey Alex,
What I need is an "and" - with collects, I do a (sect of L1 L2) ... I tried
a bunch but cant seem to get "and" working -
I need the items that are "RED" and "BLUE" :(
Perhaps I have to adjust the ER to achieve this?
regards,
Kashyap
On Tue, Nov 26, 2019 at 7:42 AM C K Kashyap wrote:
>
Thanks Alex,
I'll try it out.
Regards,
Kashyap
On Mon, Nov 25, 2019 at 11:24 PM Alexander Burger
wrote:
> Hi Kashyap,
>
> > Here's a new problem - as per the previous conversation, it seems that I
> > could use "collect" to get the items that I am interested in.
> >
> > (let (RED (db 'nm
Hi Kashyap,
> Here's a new problem - as per the previous conversation, it seems that I
> could use "collect" to get the items that I am interested in.
>
> (let (RED (db 'nm '+TagVal "RED")
> BLUE (db 'nm '+TagVal "BLUE"))
> (setq L1 (collect 'v '+Tag RED RED 'itm))
> (setq L2
31 matches
Mail list logo