Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: Chainedfunctional notation examples?
Posted:
May 9, 2014 2:07 AM


Daniel:
Now What's the catch with Today?
Today will only work in Wolfram Language (Mathematica v 10), which may be officially released Tomorrow?
One can go on with a Who's on First theme. (Goes along with WA baseball data)
But currently the DateObject "Today" would have to be changed to something that would work in Mathematica 9 or below.
Hans Original Message From: Daniel Lichtblau [mailto:danl@wolfram.com] Sent: Thursday, May 08, 2014 3:08 AM Subject: Re: Chainedfunctional notation examples?
A query such as this might do what you have in mind. Here directoryname should be changed to whatever directory you want searched.
Select[FileNames[("*uid*"  "*UID*"), directoryname, Infinity], ((StringMatchQ[DirectoryName[#] , "*egal*"] && Today < DayPlus[FileDate[#], 3]) &]
Also there is a case sensitive switch if you want to allow strings with e.g. "uID". If you want to allow that uid only in the name and not full string
Daniel Lichtblau Wolfram Research

On Tue, 06 May 2014 06:26:46 +0000, Unknown wrote:
> I came to 'Mathematica' via Xahlee's criticism of the adhoc nature of > unixpiping [functional notation]. He claims [& I believe him] that > Mathematica has a better, more consistent notation. But the facility of > PRE, IN & POSTfix alternatives, seems bad. You want ONE way of > acieving the goal. More rules just increases mental load. > > A major benefit of functional [unixpiping] programming style, is that > you don't need to remember thefulljourney: you just need to remember > the previous stage's output. Nor do you need to remember several names: > the previous output is just "it". A superficial read through a recent > article[s] here, about <collecting data from several servers, and > agregating it, and sending the result to a master> seemed very > interesting, and matches my ideas of using functional programming. But > I can't afford to invest in ANOTHER notation/syntax, without good > prospect of productivety increase. > > Just as a test, how would Mathematica handle the following [or part of] > little task: > > search all files in Dir=tree D  > which are less than N daysold  > and which contain string S1  > and which contain string S2 . > > Actually, this seems not a good example, since it's biased towards the > *nix file system's format/syntax. > > Try: > Search in table of ListOfOpenFiles for lineS with pathP [field]  > which have same ttyfield as line with pathP2 & programM [field] > > This sounds like a database problem? > > Or is there a nice list of 'such' Mathematica examples? > > Thanks, > > == John Grant.
Here's a related reallive problem: list all files in Dirtree:D  which are lessthan daysOld:N  and contain "egal" in the FullPathName  and contain String:"uid" OR "UID"



