How do I read HTTP body while using web.l

2019-05-14 Thread C K Kashyap
Hi, I'm trying to write a simple web tool and would like to parse the HTTP post body. I tried to alter the example on the website of web.l to read json payload like this - (de greet (Greeting) (res-html "The hello world page" NIL NIL (

Re: Waiting for a forked child to finish

2019-05-12 Thread C K Kashyap
Hi Alex, Could you please explain the role of (cons) as the first parameter to later? If I understand correctly, that does not seem to have a role in the the final list return values from the child processes. Regards, Kashyap On Sun, May 12, 2019 at 7:17 AM C K Kashyap wrote: > Yup ... tha

Re: Waiting for a forked child to finish

2019-05-12 Thread C K Kashyap
Yup ... that's the first edit I tried :) Regards, Kashyap On Sun, May 12, 2019 at 12:34 AM Alexander Burger wrote: > On Sat, May 11, 2019 at 10:09:27PM +0200, Alexander Burger wrote: > >(let Lst > > (mapcan > > '((File) > > (later (cons) > >(...

Re: Why List?

2019-04-27 Thread C K Kashyap
for LISP? And it doesn't hurt that it is also the simpler of the two :) > > I invite you to program a lisp interpreter in lua with the addressing > scheme above. Lua has only hash tables as data structure. You can see if > you are faster. I guess you are not. Even if you run a LuaJIT wh

Re: Review request for my JSON parsing implementation

2019-05-06 Thread C K Kashyap
My mind is blown - yet again. I love it just looking at it. I'll have to look a little more to see what's going on. How do I capture the output though - I mean this does not capture the output in J (setq J (pipe (in '("curl" "-s" "https://api.iextrading.com/1.0/stock/aapl/chart/3m ")

Re: Review request for my JSON parsing implementation

2019-05-06 Thread C K Kashyap
06, 2019 at 07:22:05AM -0700, C K Kashyap wrote: > > I'm afraid, the generating side is outside my control :( - I am looking > at > > this - https://api.iextrading.com/1.0/stock/aapl/chart/3m > > There is a way, I do this usually by reading from a pipe and modify the > data

Re: Review request for my JSON parsing implementation

2019-05-07 Thread C K Kashyap
> Some also call it "REST" and have written mighty libraries in other > languages. > > In PicoLisp it's a 5 - liner! ;-) > > Alexander Burger schrieb am Di., 7. Mai 2019, 07:04: > >> On Mon, May 06, 2019 at 02:06:56PM -0700, C K Kashyap wrote: >> > My m

Re: Review request for my JSON parsing implementation

2019-05-07 Thread C K Kashyap
; On Tue, May 07, 2019 at 06:30:15AM -0700, C K Kashyap wrote: > > 1. use (echo "\"volume\"") - this way any "volume" inside a string will > not > > be confused > > Yes, or even better include the colon "\"volume\":". > >

Re: Review request for my JSON parsing implementation

2019-05-07 Thread C K Kashyap
Tue, May 07, 2019 at 08:13:32AM -0700, C K Kashyap wrote: > > Actually my point about array was to read the numbers in the array as > fixed > > points decimals :) - 1, 2.0,3 -> with correct scaling. > > Ah, ok, this must be handled separately. > > You would also in

Re: Review request for my JSON parsing implementation

2019-05-07 Thread C K Kashyap
I ended up making the code less pretty. Looks like the suffix ".0" must only be added if the number is not already in floating point format. (setq J (pipe (in '("sh" "-c" "curl -s https://api.iextrading.com/1.0/stock/aapl/chart/3m;) (while (case (echo "close" "volume"

Review request for my JSON parsing implementation

2019-05-03 Thread C K Kashyap
Hi all, I've made an attempt at JSON parsing. I did this since json.l at https://github.com/aw/picolisp-json does not handle floating numbers and that is something I need. I also took it as an opportunity to implement something bigger than a function and get some feedback about it - I used xml.l

Behavior of sort

2019-05-04 Thread C K Kashyap
Hi all, I noticed an odd behavior of sort - (setq L '((2) (1) )) (println (length L)) # 2 as expected (sort L) (println (length L)) # why 1? (println L) # ((2)) (bye) I would expect sort not to change the length. Am I missing something here or is sort broken? Regards, Kashyap

Re: Review request for my JSON parsing implementation

2019-05-06 Thread C K Kashyap
I'm afraid, the generating side is outside my control :( - I am looking at this - https://api.iextrading.com/1.0/stock/aapl/chart/3m In this case, scaling everything does not seem so bad - infact, the solution i was trying was to simply add a ".0" to all the numbers that did not have it. Also,

Re: PicoLisp for 9-11 years' kids

2019-04-27 Thread C K Kashyap
This is very nice! I particularly liked how quickly the kids were catching onto the syntax rules - or rule rather :) I had tried to get my daughters interested - I think I'll try to preset it as a game and try again. Thanks for sharing the videos. Regards, Kashyap On Sat, Apr 27, 2019 at 12:49 AM

Why List?

2019-04-27 Thread C K Kashyap
Hi Alex et al, I've wondered about this question for a bit. Why should list be the fundamental data type? Should it not be a dictionary? Dictionary is essentially a function - mapping a domain to a range. Is it that list could be built more easily with cons cell as the building block? Is it like

Re: Code review request: breaking a list into batches

2019-04-28 Thread C K Kashyap
Thanks Danilo .. I don't quite see how using fifo could make batch simpler - could you elaborate please? Regards, Kashyap On Sat, Apr 27, 2019 at 11:26 AM Danilo Kordic wrote: > I would simply use a Dequeue, like 'fifo'. > > On Sun, Apr 21, 2019, 19:44 C K Kashyap wrote: > &g

Re: Review request for my JSON parsing implementation

2019-05-05 Thread C K Kashyap
Thank you so much Alex ... What would it take to transform this code to handle string as input instead of file stream? On Sat, May 4, 2019 at 11:17 PM Alexander Burger wrote: > On Sun, May 05, 2019 at 07:58:16AM +0200, Alexander Burger wrote: > > Hi Kashyap, > > > > > Gentle reminder :) > > ...

Re: Review request for my JSON parsing implementation

2019-05-04 Thread C K Kashyap
Gentle reminder :) On Fri, May 3, 2019 at 6:24 PM C K Kashyap wrote: > Hi all, > I've made an attempt at JSON parsing. I did this since json.l at > https://github.com/aw/picolisp-json does not handle floating numbers and > that is something I need. I also took it as an opportunity

Re: Review request for my JSON parsing implementation

2019-05-05 Thread C K Kashyap
"{\"a\": 10}") -> (("a" . 10)) : Shouldn't 10 be scaled to 1000? Did I miss something here or is there something I need to do so that all the numbers are normalized? Regards, Kashyap On Sat, May 4, 2019 at 11:49 PM Alexander Burger wrote: > On Sat, May 04,

Re: Review request for my JSON parsing implementation

2019-05-08 Thread C K Kashyap
Perfect - It is pure bliss to see such concise code. Regards, Kashyap On Wed, May 8, 2019 at 6:59 AM Alexander Burger wrote: > On Wed, May 08, 2019 at 09:17:54AM +0200, Alexander Burger wrote: > > Yes, "123.0.0" is not a legal number. > > > I am sure there must a better way to do the

Re: VIP Auto-Load and ASCII Diagrams

2019-07-14 Thread C K Kashyap
Sorry, a little late to the party! but it's really lovely ... i've not looked at the details but I was floored by "arrow" doing the right thing :) I have spent quite some time in the past drawing these in emails by hand!!! Hey Alex - do you have SVG output planned too? Regards, Kashyap On

Re: Code review request: breaking a list into batches

2019-04-21 Thread C K Kashyap
Thanks Alex! - that's the kindest "cut" :) Regards, Kashyap On Sun, Apr 21, 2019 at 10:24 AM Alexander Burger wrote: > Hi Kashyap, > > > (de batch (l s) # l: input list, s = batch size > > (let ts (* -1 s) > > (make > > (while (< 0 (length l)) > > (link (head s l)) > > (setq l (tail ts l))

Code review request: breaking a list into batches

2019-04-21 Thread C K Kashyap
Hi, I am trying to parallelize the download of a list of URLs. For which I need to break the list into list of lists. This is what I came up with. (de batch (l s) # l: input list, s = batch size (let ts (* -1 s) (make (while (< 0 (length l)) (link (head s l)) (setq l (tail ts l)) I'd

Re: Database question

2019-04-17 Thread C K Kashyap
I was going over https://software-lab.de/doc/tut.html#db and looks like I should just go with the Entity/Relation model. Thanks Alex. On Tue, Apr 16, 2019 at 10:15 PM Alexander Burger wrote: > On Tue, Apr 16, 2019 at 03:57:14PM -0700, C K Kashyap wrote: > > Thanks Joh-Tob, &g

Re: Trouble with a sample

2019-08-30 Thread C K Kashyap
for https://picolisp.com/wiki/?taskDB Regards, Kashyap On Fri, Aug 30, 2019 at 7:23 AM Alexander Burger wrote: > On Fri, Aug 30, 2019 at 06:31:27AM -0700, C K Kashyap wrote: > > Could you also comment on the problem with step 8 please - I believe, its > > independent of the setup i

Re: Trouble with a sample

2019-08-30 Thread C K Kashyap
Thanks Alex, Could you also comment on the problem with step 8 please - I believe, its independent of the setup issue. 8. I open another browser tab and hit localhost:3000 and find that the record that I had entered does not show up - I believe it should have showed up. Regards, Kashyap On Fri,

Re: Trouble with a sample

2019-08-30 Thread C K Kashyap
ing docker on Mac and my pil version is 19.8.25 - Am I missing something. Regards, Kashyap On Fri, Aug 30, 2019 at 3:49 AM Alexander Burger wrote: > On Thu, Aug 29, 2019 at 07:33:16AM -0700, C K Kashyap wrote: > > I am still at a loss about the gustbook sample :( - pretty please tak

Re: Trouble with a sample

2019-09-03 Thread C K Kashyap
, Kashyap On Mon, Sep 2, 2019 at 7:10 AM C K Kashyap wrote: > For some reason, I cannot see Grant's messages in the thread in gmail. I > was able to read the message by visiting mail-archive. > > Thanks Grant for your updated sample ... I am in the process of GUIfying > the to

Trouble with a sample

2019-08-28 Thread C K Kashyap
Hi, I was trying out the guestbook example here - https://dev.to/cess11/lets-build-a-picolisp-guestbook-mkl I noticed that the changes to the DB only get affected across sessions only after restart the service. I mean, I add some data in a browser session and it shows up at the bottom as expected,

Re: Trouble with a sample

2019-08-28 Thread C K Kashyap
und wrote: > Hi, > > it's my code so I should know but I haven't run this since I wrote it > > I'm on vacation so I can't easily test it but it sounds like either > 'collect or persistence is failing, have you tried exploring your DB from > REPL? > > Best regards, >

Re: Trouble with a sample

2019-08-29 Thread C K Kashyap
Thanks Alex, I am still at a loss about the gustbook sample :( - pretty please take a look. Regards, Kashyap On Wed, Aug 28, 2019 at 10:24 PM Alexander Burger wrote: > Hi Kashyap, > > > 1. Open pil + from terminal 1 and run (pool "test.db") > > 2. Open pil + from terminal 2 and run (pool

Re: Trouble with a sample

2019-09-02 Thread C K Kashyap
For some reason, I cannot see Grant's messages in the thread in gmail. I was able to read the message by visiting mail-archive. Thanks Grant for your updated sample ... I am in the process of GUIfying the todo sample https://picolisp.com/wiki/?taskDB Regards, Kashyap On Mon, Sep 2, 2019 at 2:14

Re: Trouble with a sample

2019-08-28 Thread C K Kashyap
Kashyap On Wed, Aug 28, 2019 at 4:16 PM C K Kashyap wrote: > Hi Alex, > I double checked and reloading the browser does not seem to help :( > Regards, > Kashyap > > On Wed, Aug 28, 2019 at 10:02 AM Alexander Burger > wrote: > >> Hi Kashyap, >> >> > I

Re: Trouble with a sample

2019-08-28 Thread C K Kashyap
Hi Alex, I double checked and reloading the browser does not seem to help :( Regards, Kashyap On Wed, Aug 28, 2019 at 10:02 AM Alexander Burger wrote: > Hi Kashyap, > > > I was trying out the guestbook example here - > > https://dev.to/cess11/lets-build-a-picolisp-guestbook-mkl I noticed that >

Re: Request for app development feedback/help

2019-09-11 Thread C K Kashyap
Thanks Alex, I'll take a look at app/gui.l Is there some documentation you could point me to for the format of the value in url> ? About updates - I mean, each Task would have "one to many" relation with update entries. I was looking for some sample there. Regards, Kashyap On Wed, Sep 11,

Re: Request for app development feedback/help

2019-09-12 Thread C K Kashyap
Thanks Alex, I'll keep those tips in mind while I go over the app/er.l ... I'll revert if I have more questions (I have a feeling I will :) ) Regards, Kashyap On Wed, Sep 11, 2019 at 10:25 PM Alexander Burger wrote: > Hi Kashyap, > > > I'll take a look at app/gui.l > > Yes, I think it is a

Re: A quick way to write an http endpoint to handle post body

2019-09-13 Thread C K Kashyap
Thanks :) On Thu, Sep 12, 2019 at 8:59 AM Alexander Burger wrote: > Hi Kashyap, > > > Another update - I controlled my home made raspberry pi robot using the > Bot > > Framework bot :) > > Cute! Very nice! :) > ☺/ A!ex > > -- > UNSUBSCRIBE:

Re: Backing up the db

2019-11-04 Thread C K Kashyap
Found it :) https://picolisp.com/wiki/?ssl On Mon, Nov 4, 2019 at 6:05 AM C K Kashyap wrote: > Replica sound like the way to go. Are there instructions on setting up the > replica process? > Regards, > Kashyap > > On Mon, Nov 4, 2019 at 2:00 AM Alexander Burger > w

Re: Backing up the db

2019-11-04 Thread C K Kashyap
Replica sound like the way to go. Are there instructions on setting up the replica process? Regards, Kashyap On Mon, Nov 4, 2019 at 2:00 AM Alexander Burger wrote: > Hi Kashyap, > > > I've used a single file as the database as of now - (pool "tasks.db"). > What > > are my options for backing up

Re: Controlling the column width QueryChart table

2019-11-02 Thread C K Kashyap
Thanks Alex, Looks like "em" sets the minimum width. As I wanted, the column is set to the size even if the content is smaller. However it expands to accommodate the content. I could get the desired effect with TextField with width but I lose out on the alternating row colors :) I added another

Re: Controlling the column width QueryChart table

2019-11-02 Thread C K Kashyap
Got it. Thanks Alex! Regards, Kashyap On Sat, Nov 2, 2019 at 10:19 AM Alexander Burger wrote: > On Sat, Nov 02, 2019 at 09:34:08AM -0700, C K Kashyap wrote: > > I have to admit that I have not read the code in detail but is there a > > "logical circular reference"

Re: Controlling the column width QueryChart table

2019-11-02 Thread C K Kashyap
On Sat, Nov 2, 2019 at 9:18 AM Alexander Burger wrote: > On Sat, Nov 02, 2019 at 08:05:22AM -0700, C K Kashyap wrote: > > I added another class in @lib.css -*.**fixedWidth* *{**display*: > > *inline-block*;*overflow*:*scroll*;*}* - and it does just what I want. > > Great! > >

Backing up the db

2019-11-03 Thread C K Kashyap
Hi, I have the todo app up and running on my local machine (in a docker container on my mac). It's not quite there yet - I have some work left for tags and a better search. But I think I can manage all further work using the todo app. I've used a single file as the database as of now - (pool

Re: Unexpected "data not found" in my todo app

2019-10-30 Thread C K Kashyap
Thank you so much Alex! Regards, Kashyap On Tue, Oct 29, 2019 at 11:08 PM Alexander Burger wrote: > Hi Kashyap, > > > Okay ... I have it working now :) Although, I am not sure if I did the > > right thing - I was able to access the Task using (: home obj) > > Great! :) > > > > (gui '(+Button)

Re: Trouble with file upload

2019-11-12 Thread C K Kashyap
cution, I get put!> -- Bad message. Regards, Kashyap On Tue, Nov 12, 2019 at 11:06 AM Alexander Burger wrote: > On Tue, Nov 12, 2019 at 10:11:02AM -0800, C K Kashyap wrote: > > I am sure I am missing something trivial but the breakpoint does not get > > hit when I sel

Re: Trouble with file upload

2019-11-12 Thread C K Kashyap
I am sure I am missing something trivial but the breakpoint does not get hit when I select a file and click on install :( Regards, Kashyap On Tue, Nov 12, 2019 at 9:42 AM Alexander Burger wrote: > Hi Kashyap, > > > Removing the quote does get rid of the error message but I'm not sure > > how to

Re: Trouble with file upload

2019-11-12 Thread C K Kashyap
Thanks Alex, Removing the quote does get rid of the error message but I'm not sure how to access the uploaded content though. I noticed that even app/item.l has a quote before the cond expression. I run the program like this - pil @lib/http.l @lib/xhtml.l @lib/form.l --server 8080 main.l

Re: Pilog query across multiple classes

2019-11-05 Thread C K Kashyap
Thanks Alex, The concatenation of multiple collects is just what I need :) Regards, Kashyap On Tue, Nov 5, 2019 at 4:59 AM Alexander Burger wrote: > Hi Kashyap, > > > My ER model looks like this - > > (class +Task +Entity) > > (rel ttl (+IdxFold +String)) > > ... > > (rel upds (+List +Joint)

More application development questions

2019-11-09 Thread C K Kashyap
Hi Alex, After getting my todo app to work by editing the sample app I wanted to try out a standalone version just to see if I understood all the moving parts. I have two files - todo.l (the main file) and tsk.l tsk.l displays

Re: More application development questions

2019-11-10 Thread C K Kashyap
Thanks Alex, Here's what my tsk.l looks like now. I am not sure what the search function needs to be because I'd like to handle the incoming Object - The following code does seem to render the form with the right object. However, when I click on "edit" I get a 303. Also, clicking on the scroll

Re: More application development questions

2019-11-10 Thread C K Kashyap
Thanks a ton Alex!!! ... makes my Sunday perfect :) Regards, Kashyap On Sun, Nov 10, 2019 at 8:40 AM Alexander Burger wrote: > On Sun, Nov 10, 2019 at 08:23:07AM -0800, C K Kashyap wrote: > > (html 0 Ttl "@lib.css" NIL > > (action > > (idForm "A

Re: Pilog query across multiple classes

2019-11-22 Thread C K Kashyap
No problem Alex, (collect 'tgs '+Item (db 'nm '+Tag "BLUE")) does not seem to work for me - returns NIL. For that matter, even (collect 'tgs '+Item) returns NIL. I wonder if its because 'tgs does not have +Idx in the relation (class +Item +Entity) (rel ttl (+IdxFold +String)) (rel tgs (+List

Re: Pilog query across multiple classes

2019-11-21 Thread C K Kashyap
question 2 is still open :( Regards, Kashyap On Wed, Nov 20, 2019 at 4:03 PM C K Kashyap wrote: > Hi Alex, > I have a couple of follow up Pilog questions.I've been doing some trial > and error and I don't see it converging :) > > I have written a statndalone script for this so that you

Re: Pilog query across multiple classes

2019-11-23 Thread C K Kashyap
Thanks Alex, How can I add +Idx to tgs? That should be possible right? When I add +Idx to tgs, I get "tgs -- No Link" error. Regards, Kashyap On Fri, Nov 22, 2019 at 11:07 PM Alexander Burger wrote: > Hi Kashyap, > > > (collect 'tgs '+Item (db 'nm '+Tag "BLUE")) does not seem to work for > me

Re: Pilog query across multiple classes

2019-11-21 Thread C K Kashyap
(I) (get I 'itm)) (collect 'nm '+Tag "BLUE"))) (setq L2 (mapcar '( (I) (get I 'itm)) (collect 'nm '+Tag "RED"))) (for I (sect L1 L2) (print-item I)) Regards, Kashyap On Thu, Nov 21, 2019 at 9:49 AM C K Kashyap wrote: > Hi Alex, > I think I have a workar

Re: +QueryChart without pilog

2019-12-04 Thread C K Kashyap
s)) ) Regards, Kashyap On Wed, Dec 4, 2019 at 3:07 AM Alexander Burger wrote: > 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

Re: +QueryChart without pilog

2019-12-04 Thread C K Kashyap
(-> @Names) ) ) ) ) ) 1 '((This) (list This)) ) ( NIL (choTtl "Entries" '+Task) '(("em20 align" "Name")) (do *ROWS ( NIL (gui 1 '(+ObjView +TextField) '(: ttl)) ) ) )

Re: +E/R and +Set

2019-12-08 Thread C K Kashyap
, C K Kashyap wrote: > > Could the problem be the "List" relation between Task and Tag? > > I think in general this relation is fine. I would just not try to handle > it in a > single swoop, i.e. all in a +ListTextField > > > > Also any suggesti

Re: +E/R and +Set

2019-12-08 Thread C K Kashyap
Also any suggestion about getting a "val> bad message" error in the "+Chart" approach? Regards, Kashyap On Sun, Dec 8, 2019 at 10:56 AM Alexander Burger wrote: > On Sun, Dec 08, 2019 at 10:15:54AM -0800, C K Kashyap wrote: > > The unwanted side effect though is

+E/R and +Set

2019-12-06 Thread C K Kashyap
Hi Alex, Can you please confirm if "Title" (gui '(+E/R +TextField) '(ttl : home obj) 40) and "Title" (gui '(+Init +Set +TextField) (get *ID 'ttl) '((X) (put!> *ID 'ttl X)) 40) are equivalent inside an idForm? Regards, Kashyap

Re: +E/R and +Set

2019-12-13 Thread C K Kashyap
ui 1 '(+DbHint +TextField) '(nm +TagNm) 40) (gui 2 '(+DelRowButton)) (gui 3 '(+BubbleButton)) ) ) ) (scroll 6 T) ) ) ) On Mon, Dec 9, 2019 at 10:28 PM C K Kashyap wrote: > Yes ... sounds like a plan ... I am going to pract

Re: +E/R and +Set

2019-12-14 Thread C K Kashyap
it localhost:3000 on a new tab in the browser - the change is gone - it's back to RED Is there something missing in my ER that prevents the change from being "committed" properly? Regards, Kashyap On Sat, Dec 14, 2019 at 10:12 AM Alexander Burger wrote: > On Sat, Dec 14,

Auto scrolling to the end in +Chart

2019-12-17 Thread C K Kashyap
Hi Alex, Is there a way to have the +Chart view to be auto scrolled to the end? I display the list of updates in task.l - in order to add a new update, one would have to go all the

Behavior of Delete confirmation

2019-12-17 Thread C K Kashyap
Hi Alex, Is it intentional that the "Delete Row?" confirmation dialog is presented only once on a page? After I click on "yes", the subsequent deletes do not prompt a dialog. I am prompted again if I click away to another page and come back. Regards, Kashyap

Re: Auto scrolling to the end in +Chart

2019-12-17 Thread C K Kashyap
+InsRowButton works just fine for me :) ... I think I should go over all the available functions/prefix classes once to get an idea of everything that's already available. Thanks Alex, Kashyap On Tue, Dec 17, 2019 at 1:21 PM Alexander Burger wrote: > Hi Kashyap, > > > I think app/ord.l has a

Re: Auto scrolling to the end in +Chart

2019-12-17 Thread C K Kashyap
Thanks Alex, I'll check out the pointers you sent. I think app/ord.l has a similar situation - I mean, if there are already multiple pages of items, then one has to scroll to the end to add a new item - is that not the case? Regards, Kashyap On Tue, Dec 17, 2019 at 12:00 PM Alexander Burger

Re: +QueryChart without pilog

2019-12-05 Thread C K Kashyap
ments to come up with precise questions. In the meantime, the tags logic works for me :) Regards, Kashyap On Wed, Dec 4, 2019 at 10:53 PM Alexander Burger wrote: > On Wed, Dec 04, 2019 at 02:32:57PM -0800, C K Kashyap wrote: > > (patch choTask 'XXX '(filter '((X) X) (mapcar '((X) (up

Re: +QueryChart without pilog

2019-12-05 Thread C K Kashyap
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 >

Re: +QueryChart without pilog

2019-12-05 Thread C K Kashyap
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 r

Re: +QueryChart without pilog

2019-12-05 Thread C K Kashyap
(-> @Names) ) ) ) ) ) 1 '((This) (list This)) ) ( ... Regards, Kashyap On Thu, Dec 5, 2019 at 10:36 AM C K Kashyap wrote: > Super! .. thanks Alex, > Regards, > Kashyap > > On Thu, Dec 5, 2019 at 9:23 AM Alexander Burger > wrote: > >> On Th

Re: +QueryChart without pilog

2019-12-06 Thread C K Kashyap
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

Re: +E/R and +Set

2019-12-07 Thread C K Kashyap
I see!!! ... Is +E/R restricted to making bi-directional connection with the *ID only? My task.l looks like this now and I've +E/R to wire up the 'ttl rel of Task but I was not sure if I could do the same with the 'tgs rel as well - full code is here -

Re: +E/R and +Set

2019-12-07 Thread C K Kashyap
is) (: nm)) # Set function '((Nm) (request! '(+Tag) 'nm Nm)) # Val function '(","," ") 40 ) Regards, Kashyap On Sat, Dec 7, 2019 at 1:02 AM Alexander Burger wrote: > On Fri, Dec 06, 2019 at 11:55:14PM -0800, C K Kashyap wrote: > > I see!!! ... Is +E/R

Re: +E/R and +Set

2019-12-07 Thread C K Kashyap
request! '(+TagNm) 'nm Nm) ) ) Is there a way to get the access to the task object in the Value function? Regards, Kashyap On Sat, Dec 7, 2019 at 11:00 AM Alexander Burger wrote: > On Sat, Dec 07, 2019 at 07:57:53AM -0800, C K Kashyap wrote: > > :[task.l:8] !? (mapcar 'val>

Re: +E/R and +Set

2019-12-08 Thread C K Kashyap
r to my why the code results in duplicate tags - but yes, feeling very optimistic :) Regards, Kashyap On Sun, Dec 8, 2019 at 6:57 AM C K Kashyap wrote: > As we have a list of strings, isn't simply just 'mapcar' fine again? I >> cannot >> test, but something like: >> >>

Re: +E/R and +Set

2019-12-14 Thread C K Kashyap
: > On Sat, Dec 14, 2019 at 12:05:06PM -0800, C K Kashyap wrote: > > About "restricted" - the observation is as follows - > > - I hit localhost:3000 > > - click on a tag - say "RED" > > - edit it and change it's name to "RED1" and click done &

Re: +E/R and +Set

2019-12-14 Thread C K Kashyap
String)) (dm url> (Tab) (and (list "tag.l" '*ID This)) ) What am I missing :( ? Regards, Kashyap On Fri, Dec 13, 2019 at 9:00 PM C K Kashyap wrote: > Reporting back! > Yahoo!!! > It's works perfectly now! - the complete code is here - > https://github.com/ckkashyap/picolisp

Re: Request for app development feedback/help

2019-10-20 Thread C K Kashyap
the pilog queries in the sample app on the REPL. For example, how can I run the pilog query in the choOrd function in app/gui.l. It will help me see what the returned values are and how QueryChart uses them to render. regards, Kashyap On Thu, Sep 12, 2019 at 8:32 AM C K Kashyap wrote: > Tha

Re: Request for app development feedback/help

2019-10-21 Thread C K Kashyap
Thank you Alex, I get the following when I run the (?) - for which I defined a function XX. I do see that I get back 1 record when *CuSuNm is "Oaks" and 3 records when *CuSuNm is "". However, I don't see the actual values - except for @Nm. While at it, could you also explain the @/@@ convention?

Re: Request for app development feedback/help

2019-10-21 Thread C K Kashyap
Regards, Kashyap On Mon, Oct 21, 2019 at 6:42 AM Alexander Burger wrote: > On Mon, Oct 21, 2019 at 06:16:41AM -0700, C K Kashyap wrote: > > Thank you Alex, > > I get the following when I run the (?) - for which I defined a function > XX. > > Good. > > >

Re: Request for app development feedback/help

2019-10-21 Thread C K Kashyap
) (part @Ort @@ ort) (fold @Mob @@ mob) ) ) Regards, Kashyap On Mon, Oct 21, 2019 at 10:00 AM Alexander Burger wrote: > On Mon, Oct 21, 2019 at 07:12:32AM -0700, C K Kashyap wrote: > > Finally - its good to see the values :) ... I used (show @@). > > I see

pilog question about combined indexes

2019-10-24 Thread C K Kashyap
Hi, I tried the following : (? (select (@Tel) ( (mob +CuSu "37 176 86303") ) )) @Tel={C1} -> NIL : (? (select (@Tel) ( (mob +CuSu "37 176 86303" tel +CuSu "37 176 86303") ) )) -> NIL The first query returned as expected. The second one I believe means - look for "37 176 86303" either in

Re: pilog question about combined indexes

2019-10-24 Thread C K Kashyap
Thanks Alex ... I think I am getting there :) - It's pretty neat the more I get into it! If I understand correctly - the filter clause is redundant because it does not subset the records generated by the generator? When I look at the filter used in app/gui.l I wonder if the filter (range @Nr @@

Re: pilog question about combined indexes

2019-10-24 Thread C K Kashyap
Got it! Regards, Kashyap On Thu, Oct 24, 2019 at 7:46 AM Alexander Burger wrote: > On Thu, Oct 24, 2019 at 07:16:31AM -0700, C K Kashyap wrote: > > If I understand correctly - the filter clause is redundant because it > does > > not subset the records generated by the

Re: Unexpected "data not found" in my todo app

2019-10-29 Thread C K Kashyap
Thanks Alex, I added index to +Update and the UI started giving me a drop down with the existing updates. That made me realize that what I really want is for the updates to show up uneditable ( NIL NIL '((NIL "Updates")) (do 8 ( NIL #(gui 1 '(+Obj

Re: Unexpected "data not found" in my todo app

2019-10-29 Thread C K Kashyap
, Oct 29, 2019 at 10:58 AM Alexander Burger wrote: > On Tue, Oct 29, 2019 at 10:06:53AM -0700, C K Kashyap wrote: > > Wouldn't we need to link the update to the 'upds relation of Task? > > Perhaps. I provided just a general solution, not necessarily matching your > data > m

Re: Unexpected "data not found" in my todo app

2019-10-29 Thread C K Kashyap
Wouldn't we need to link the update to the 'upds relation of Task? This does not quite work :( (menu "Tasks" (idForm ,"Tasks" '(choTsk) 'nr '+Tsk T '(may Delete) '((: nr)) (--) ( 2 "Name" (gui '(+E/R +Cue +TextField) '(nm : home obj) "Name" 40) "Desc" (gui

Re: Unexpected "data not found" in my todo app

2019-10-29 Thread C K Kashyap
) '( (L U) (cond (U (put!> U 'dsc (car L)) (and (; U dsc) U) ) (L (new! '(+Update) 'dsc (car L)) ( NIL NIL '((NIL "Updates")) (do 8 ( NIL (gui 1 '(+View +TextField) 1

Re: Request for app development feedback/help

2019-10-22 Thread C K Kashyap
Thank you so much Beneroth for the detailed explanation. It will help a lot

Re: +QueryChart without pilog

2019-11-26 Thread C K Kashyap
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

File offset

2019-11-26 Thread C K Kashyap
Hi all, Is there a way to get the file offset (which I can get using lseek)? I need this for my midi parsing project which contains variable length numbers (like UTF-8) and I think it will be useful to have something that can tell me the current file position. Ofcourse I can maintain it myself by

Re: +QueryChart without pilog

2019-11-26 Thread C K Kashyap
) (new-item "ITEM6" "OPEN" (list BLUE RED)) (new-item "ITEM7" "OPEN" (list RED)) (commit) (let (RED (db 'nm '+TagVal "RED") BLUE (db 'nm '+TagVal "BLUE")) (setq L1 (collect 'v '+Tag RED RED 'itm)) (setq L2 (collect 'v '+

Re: +QueryChart without pilog

2019-11-26 Thread C K Kashyap
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, No

Re: File offset

2019-11-26 Thread C K Kashyap
, 2019 at 1:52 PM Alexander Burger wrote: > On Tue, Nov 26, 2019 at 09:09:08AM -0800, C K Kashyap wrote: > > Is there a way to get the file offset (which I can get using lseek)? I > need > > Unfortunately, the PicoLisp I/O machinery does not handle file positions, > and >

Re: +QueryChart without pilog

2019-11-27 Thread C K Kashyap
ist 'v '+Tag) 'itm)) ) L3 ) ) )) (list 'print-item '@Item) )) ) (run Code) ) ) Regards, Kashyap On Tue, Nov 26, 2019 at 11:01 PM Alexander Burger wrote: > On Tue, Nov 26, 2019 at 02:06:25PM -0800, C K Kashyap wrote: > > It seems to work as expected using collect

+QueryChart without pilog

2019-11-25 Thread C K Kashyap
Hi Alex, Sorry to keep coming back to this :( 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

Re: Pilog query across multiple classes

2019-11-23 Thread C K Kashyap
Cool ... I think I am getting a hang of it! Regards, Kashyap On Sat, Nov 23, 2019 at 10:04 AM Alexander Burger wrote: > On Sat, Nov 23, 2019 at 09:45:56AM -0800, C K Kashyap wrote: > > Quick follow up - I altered the tags like this - > > > > (class +Item +Entity) > >

Re: Pilog query across multiple classes

2019-11-23 Thread C K Kashyap
Thanks Alex/Beneroth, Okay ... just to clarify. (collect 'nm '+Tag "BLUE" NIL T 'itm) is the recommended way to get to all items for a given Tag. I should perhaps use an indirection to +Tag class so that I do not repeat it every time. After some thinking it seems that perhaps I could just go with

Re: Pilog query across multiple classes

2019-11-23 Thread C K Kashyap
) (class +TagVal +Entity) (rel nm (+IdxFold +String)) This would be better for storage right? Especially if +TagVal has additional fields such as description etc. Regards, Kashyap On Sat, Nov 23, 2019 at 9:32 AM Alexander Burger wrote: > On Sat, Nov 23, 2019 at 09:10:26AM -0800, C K Kash

Re: ORM comparison

2019-11-28 Thread C K Kashyap
Thanks Mattias, Yeah, intuitively, I do feel "symbols all the way down" makes Picolisp uniquely at an advantageous position. It would be good to be equipped with a way to articulate this advantage. Regards, Kashyap On Thu, Nov 28, 2019 at 11:28 AM Mattias Sundblad wrote: > Hi Kashyap! > > Thank

<    1   2   3   4   >