Re: Hashtable
On Wed, Mar 13, 2019 at 09:40:34AM -0700, C K Kashyap wrote: > Oh ... it just occurred to me that you probably meant this - > https://software-lab.de/doc/tut.html#db ? Yes, exactly!! I just noticed that I pasted "#ext" twice instead of the above one :) ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Hashtable
Oh ... it just occurred to me that you probably meant this - https://software-lab.de/doc/tut.html#db ? On Wed, Mar 13, 2019 at 9:12 AM C K Kashyap wrote: > Hi Alex, > I was looking up hashtable in picolisp and ran into this thread - > https://www.mail-archive.com/picolisp@software-lab.de/msg00140.html > > In it, you've mentioned "build some database structure." Is there a > simple sample for reference for such a structure? > > Regards, > Kashyap >
Re: Hashtable
Thanks Alex, Just to I get the reasoning right - so for small and medium volume, a list and binary tree would suffice and for larger data volume a DB is recommended. And perhaps combined with DB on a ramdrive, it could very well substitute for anything traditionally thought of as hashtable worthy. Did I get that right? Regards, Kashyap On Wed, Mar 13, 2019 at 9:48 AM Alexander Burger wrote: > Hi Kashyap, > > > I was looking up hashtable in picolisp and ran into this thread - > > https://www.mail-archive.com/picolisp@software-lab.de/msg00140.html > > > > In it, you've mentioned "build some database structure." Is there a > simple > > sample for reference for such a structure? > > The best is perhaps to start with the tutorial (a bit outdated) at > >https://software-lab.de/doc/tut.html#ext >https://software-lab.de/doc/tut.html#ext > > or look at the example applications, eg in app/, or some minimal example > like https://picolisp.com/wiki/?mindbgui > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: Hashtable
Got it! Regards, Kashyap On Wed, Mar 13, 2019 at 10:16 AM Alexander Burger wrote: > On Wed, Mar 13, 2019 at 09:56:25AM -0700, C K Kashyap wrote: > > Just to I get the reasoning right - so for small and medium volume, a > list > > and binary tree would suffice and for larger data volume a DB is > > recommended. > > I would go with an 'idx' binary tree, unless it > >- is bigger than available memory, and/or >- needs complicated relations to other data, and/or >- needs persistence and/or >- needs concurrent access from multiple processes. > > > > And perhaps combined with DB on a ramdrive, it could very well > > substitute for anything traditionally thought of as hashtable worthy. > Did I > > get that right? > > Yes, but just for a single (or several indepenent) hash table(s) a DB is > overkill. > > ☺/ A!ex > > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Hashtable
Hi Alex, I was looking up hashtable in picolisp and ran into this thread - https://www.mail-archive.com/picolisp@software-lab.de/msg00140.html In it, you've mentioned "build some database structure." Is there a simple sample for reference for such a structure? Regards, Kashyap
Re: Hashtable
Hi Kashyap, > I was looking up hashtable in picolisp and ran into this thread - > https://www.mail-archive.com/picolisp@software-lab.de/msg00140.html > > In it, you've mentioned "build some database structure." Is there a simple > sample for reference for such a structure? The best is perhaps to start with the tutorial (a bit outdated) at https://software-lab.de/doc/tut.html#ext https://software-lab.de/doc/tut.html#ext or look at the example applications, eg in app/, or some minimal example like https://picolisp.com/wiki/?mindbgui ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Hashtable
On Wed, Mar 13, 2019 at 09:56:25AM -0700, C K Kashyap wrote: > Just to I get the reasoning right - so for small and medium volume, a list > and binary tree would suffice and for larger data volume a DB is > recommended. I would go with an 'idx' binary tree, unless it - is bigger than available memory, and/or - needs complicated relations to other data, and/or - needs persistence and/or - needs concurrent access from multiple processes. > And perhaps combined with DB on a ramdrive, it could very well > substitute for anything traditionally thought of as hashtable worthy. Did I > get that right? Yes, but just for a single (or several indepenent) hash table(s) a DB is overkill. ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Hashtable
Hello Kashyap, While not particularly idiomatic, there is some application code here that uses idx, hash and friends which may be of some help, by way of example. Not recommending this for your use, just “yet another example”. :) https://github.com/cryptorick/pil-KVMap/blob/master/KVMap.l Best, Rick
Re: A good way to write an api server
Hi, I cant seem to get httpGate to run correctly. I tried running it as follows - First run the app on port 8080 - /pil dbapp.l -main -go -wait & Then run httpGate like this - /bin/httpGate 3000 8080 When I try to connect to port 3000 - I get "empty response" root@6b36fb429264:~/picoLisp# telnet localhost 3000 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / HTTP/1.1 Connection closed by foreign host. I tried the "names" approach too but it did not work for me. Regards, Kashyap On Tue, Mar 12, 2019 at 8:21 AM C K Kashyap wrote: > Cool...thanks Alex. > Regards, > Kashyap > > On Tue, Mar 12, 2019 at 7:42 AM Alexander Burger > wrote: > >> Hi Kashyap, >> >> > 1. Is there a way I could restrict the server from navigating to a >> > different port? I run the app on docker and it requires explicit >> mapping of >> > the ports in advance :( >> >> Yes. The full recommended setup uses bin/httpGate as a proxy and >> dispatcher. >> >> Towards the outside world only port 443 (or port 80) remains. You could >> check >> the details in doc/httpGate.html in the distro. >> >> >> > 2. How do I know the "number" of the field to enter? (display) does not >> > seem to enumerate the text fields. >> >> It is simply a sequential number, enumerating the components on the page
Re: Hashtable
Thanks Rick, Regards, Kashyap On Wed, Mar 13, 2019 at 1:04 PM wrote: > Hello Kashyap, > > While not particularly idiomatic, there is some application code here that > uses idx, hash and friends which may be of some help, by way of example. > Not recommending this for your use, just “yet another example”. :) > > https://github.com/cryptorick/pil-KVMap/blob/master/KVMap.l > > Best, Rick > >