Re: Date query question

2016-12-31 Thread Alexander Burger
Hi Bruno, > A picolisp clone of VI? That sounds awesome! Please do write the article > for the wiki. > Also, where do I find the source code? Both scheduled for January :) - Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Date query question

2016-12-29 Thread Bruno Franco
Hi Alex. A picolisp clone of VI? That sounds awesome! Please do write the article for the wiki. Also, where do I find the source code? On Thu, Dec 29, 2016 at 2:31 AM, Alexander Burger wrote: > On Wed, Dec 28, 2016 at 07:47:13PM -0500, Bruno Franco wrote: > > This is a

Re: Date query question

2016-12-28 Thread Alexander Burger
On Wed, Dec 28, 2016 at 07:47:13PM -0500, Bruno Franco wrote: > This is a tangent on your conversation, but... > Alex, that graph looks so cool. Did you do it by hand or did you use some > juicy picolisp program that I can get my hands on? No, just with VI. In fact you are right, because it was

Re: Date query question

2016-12-28 Thread Bruno Franco
This is a tangent on your conversation, but... Alex, that graph looks so cool. Did you do it by hand or did you use some juicy picolisp program that I can get my hands on? On Wed, Dec 28, 2016 at 5:45 AM, Alexander Burger wrote: > On Wed, Dec 28, 2016 at 10:26:22AM +0100,

Re: Date query question

2016-12-28 Thread Alexander Burger
On Wed, Dec 28, 2016 at 10:26:22AM +0100, Alexander Burger wrote: >(let Today (date) > (collect 'sDate '+Proj (list Today Today) (list NIL T)) ) The 'list' is of course not necessary: (collect 'sDate '+Proj (list Today Today) '(NIL T)) But probably it is better anyway to scan both

Re: Date query question

2016-12-28 Thread Alexander Burger
On Tue, Dec 27, 2016 at 10:52:51PM +0100, Henrik Sarvell wrote: > ## We want all projects that are NOT outside of the range, ie: > ## 1.) End date is lower than the start date of the range. > ## 2.) Start date is higher than the end date of the range. > ## Therefore we generate all projects whose:

Re: Date query question

2016-12-27 Thread Henrik Sarvell
Yes, like I thought, so I doubt that it will be an improvement over the current state which looks like this: ## We want all projects that are NOT outside of the range, ie: ## 1.) End date is lower than the start date of the range. ## 2.) Start date is higher than the end date of the range. ##

Re: Date query question

2016-12-26 Thread Alexander Burger
On Mon, Dec 26, 2016 at 11:19:02PM +0100, Henrik Sarvell wrote: > If I do the relations with the +UB index and put 2016-10-01 as the start > date and 2016-10-20 as the end date for a specific project, do I get that > project in my result set if I do the collect with sdate 2016-10-15 and end > date

Re: Date query question

2016-12-26 Thread Henrik Sarvell
If I do the relations with the +UB index and put 2016-10-01 as the start date and 2016-10-20 as the end date for a specific project, do I get that project in my result set if I do the collect with sdate 2016-10-15 and end date 2016-11-15? On Mon, Dec 12, 2016 at 1:01 PM, Alexander Burger

Re: Date query question

2016-12-12 Thread Alexander Burger
On Mon, Dec 12, 2016 at 11:12:22AM +0100, Henrik Sarvell wrote: > This looks like the one I need, I want all projects whose date range > has any kind of overlap with the given date range. How do you think about the '+UB' tree solution I suggested in my follow-up mail? >(class +Proj

Re: Date query question

2016-12-12 Thread Henrik Sarvell
This looks like the one I need, I want all projects whose date range has any kind of overlap with the given date range. Thanks, will try it! On Thu, Nov 17, 2016 at 4:10 PM, Alexander Burger wrote: > Hi Henrik, > >> (class +Proj +Macropisobj) >> (rel id (+Key +Number)) >>

Re: Date query question

2016-11-17 Thread Alexander Burger
Another possibility (which I mentioned initially when we discussed this in IRC) is to use a 2-dimensional UB-Tree index. This would be the most efficient way, both in speed and in size (only a single index is required). (class +Proj +Macropisobj) ... (rel sDate (+UB +Aux +Ref +Date)

Re: Date query question

2016-11-17 Thread Alexander Burger
On Thu, Nov 17, 2016 at 04:10:32PM +0100, Alexander Burger wrote: >(? > @Sdate (cons Sdate T) # Range with open end > @Edate (cons Edate NIL)# Reversed range with open start > (select (@Proj) > ((sDate +Proj @Sdate) (eDate +Proj @Edate)) # Search two

Re: Date query question

2016-11-17 Thread Alexander Burger
Hi Joe, > For my own curiosity, should Pilog perform much better than a > collect/filter? I would think that collect/filter should be nearly > instant on upwards of a few thousand items (untested). When the data Yes, I would say so too. And for larger results sets, or if multiple indexes are

Re: Date query question

2016-11-17 Thread Alexander Burger
Hi Henrik, > (class +Proj +Macropisobj) > (rel id (+Key +Number)) > (rel nm (+Ref +String)) > (rel sDate (+Ref +String)) > (rel eDate (+Ref +String)) > > (dm getCurrent> (Sdate Edate) >(filter '((P) (or > (< Sdate (; P sDate) Edate) > (< Sdate (; P

Re: Date query question

2016-11-17 Thread Joe Bogner
Henrik, thanks for sharing. Interesting question! > I can fairly trivially do a collect and then a filter on the results of the > collect as shown above. > > But how would the above problem be solved with Pilog and select if we have > more than "a couple of hundred objects" in the database? >

Re: Date query question

2016-11-17 Thread Rafik NACCACHE
All right, but shall you need some auto-scheduling, to YU know where to look! Le 17 nov. 2016 12:54 PM, "Henrik Sarvell" a écrit : > Hi Rafik, > > Nice stuff, but I don't need that magic, the goal here is simply adding > humans to projects and displaying the schedule to see

Re: Date query question

2016-11-17 Thread Henrik Sarvell
Hi Rafik, Nice stuff, but I don't need that magic, the goal here is simply adding humans to projects and displaying the schedule to see who might be available to do new stuff at some point in time. On Thu, Nov 17, 2016 at 12:15 PM, Rafik NACCACHE wrote: > HEy

Re: Date query question

2016-11-17 Thread Rafik NACCACHE
HEy Henrik, Not related by U wrote a project scheduling library and a tasks parser for natural language in Clojure, You might want to take a look on it here: https://github.com/turbopape/milestones There is one online dome here: http://turbopape.github.io/milestones/ I'll be happy if you can

Date query question

2016-11-17 Thread Henrik Sarvell
Hi list, I'm trying to build a project scheduler / planner. This is the E/R for a project: (class +Proj +Macropisobj) (rel id (+Key +Number)) (rel nm (+Ref +String)) (rel sDate (+Ref +String)) (rel eDate (+Ref +String)) (dm getCurrent> (Sdate Edate) (filter '((P) (or (<