Re: Signatures and matching (was Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-27 Thread TSa
HaloO, David Green wrote: On 2008-Oct-22, at 10:03 am, TSa wrote: Note that types have a fundamentally different task in a signature than name and position have. The latter are for binding arguments to parameters. The types however are for selection of dispatch target. Names do that too; I

Re: Signatures and matching (was Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-25 Thread David Green
On 2008-Oct-22, at 10:03 am, TSa wrote: David Green wrote: One thing I would like signatures to be able to do, though, is assign parameters by type. Much like a rule can look for identifiable objects like a block or ident, it would be very useful to look for parameters by their type or

Re: Signatures and matching (was Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-22 Thread Brad Bowman
The scrap your boilerplate scheme for generics in Haskell addresses traversals, queries, transformations, parallel zipping and the like. I've only briefly felt like I understood it, so I was going to revise before trying to adapt it to Perl 6. (Any lambdacamels out there that do understand

Re: Signatures and matching (was Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-22 Thread Timothy S. Nelson
On Wed, 22 Oct 2008, Brad Bowman wrote: The scrap your boilerplate scheme for generics in Haskell addresses traversals, queries, transformations, parallel zipping and the like. I've only briefly felt like I understood it, so I was going to revise before trying to adapt it to Perl 6. (Any

Re: Signatures and matching (was Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-22 Thread TSa
HaloO, David Green wrote: One thing I would like signatures to be able to do, though, is assign parameters by type. Much like a rule can look for identifiable objects like a block or ident, it would be very useful to look for parameters by their type or class rather than by name (or

Re: Signatures and matching (was Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-22 Thread Timothy S. Nelson
On Tue, 21 Oct 2008, Timothy S. Nelson wrote: On Tue, 21 Oct 2008, David Green wrote: On 2008-Oct-2, at 6:15 pm, Timothy S. Nelson wrote: The guys on IRC convinced me that the way to go might be something like a grammar, but that does trees and tree transformations instead of a text input

Signatures and matching (was Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-21 Thread David Green
On 2008-Oct-2, at 6:15 pm, Timothy S. Nelson wrote: The guys on IRC convinced me that the way to go might be something like a grammar, but that does trees and tree transformations instead of a text input stream. See the IRC log for details :). [...] TimToady note to treematching folks: it

Re: Signatures and matching (was Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-21 Thread Timothy S. Nelson
On Tue, 21 Oct 2008, David Green wrote: On 2008-Oct-2, at 6:15 pm, Timothy S. Nelson wrote: The guys on IRC convinced me that the way to go might be something like a grammar, but that does trees and tree transformations instead of a text input stream. See the IRC log for details :). [...]

Re: globs and trees in Perl6

2008-10-09 Thread Brad Bowman
Tim Bunce wrote: Thinking in terms of grammars, I'd ask the question: could grammars be used to match tree-like data structures? I think the current answer is no. Grammars are too tightly bound to the concept of a position in a linear string. But I have a nagging suspicion that this is a very

Re: globs and rules and trees, oh my! (was: Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-03 Thread Jon Lang
Timothy S. Nelson wrote: TimToady note to treematching folks: it is envisaged that signatures in a rule will match nodes in a tree My question is, how is this expected to work? Can someone give an example? I'm assuming that this relates to Jon Lang's comment about using

Re: globs and trees in Perl6

2008-10-02 Thread Timothy S. Nelson
On Thu, 2 Oct 2008, Tim Bunce wrote: On Wed, Oct 01, 2008 at 11:24:04PM -0400, Brandon S. Allbery KF8NH wrote: On 2008 Oct 1, at 22:23, Timothy S. Nelson wrote: On Wed, 1 Oct 2008, Brandon S. Allbery KF8NH wrote: On 2008 Oct 1, at 22:14, Timothy S. Nelson wrote: Hi all. I've

Re: globs and trees in Perl6

2008-10-02 Thread Tim Bunce
On Wed, Oct 01, 2008 at 11:24:04PM -0400, Brandon S. Allbery KF8NH wrote: On 2008 Oct 1, at 22:23, Timothy S. Nelson wrote: On Wed, 1 Oct 2008, Brandon S. Allbery KF8NH wrote: On 2008 Oct 1, at 22:14, Timothy S. Nelson wrote: Hi all. I've enjoyed(?) reading over the February/March thread

Re: globs and trees in Perl6

2008-10-02 Thread Tim Bunce
On Thu, Oct 02, 2008 at 07:01:39PM +1000, Timothy S. Nelson wrote: On Thu, 2 Oct 2008, Tim Bunce wrote: On Wed, Oct 01, 2008 at 11:24:04PM -0400, Brandon S. Allbery KF8NH wrote: On 2008 Oct 1, at 22:23, Timothy S. Nelson wrote: On Wed, 1 Oct 2008, Brandon S. Allbery KF8NH wrote: On 2008 Oct

Re: globs and trees in Perl6

2008-10-02 Thread Timothy S. Nelson
On Thu, 2 Oct 2008, Tim Bunce wrote: The key point Brandon is making, that I'm not sure you're answering, You probably mean OtherTim (ie. me) instead of Brandon here :). Yeap, sorry Tim. (I've seen comments like this totally confuse everyone, so I thought I'd better mention it.

Re: XPath grammars (Was: Re: globs and trees in Perl6)

2008-10-02 Thread Timothy S. Nelson
On Thu, 2 Oct 2008, Daniel Ruoso wrote: One thing we realized at that time is that XPath is good enough, even if it seems to be adressing XML specifically, it has the concept of dimension that can be extended to represent arbitrary aspects of objects. Hmm. Back in March, before I discovered

Re: globs and trees in Perl6

2008-10-02 Thread TSa
HaloO, Tim Bunce wrote: But I have a nagging suspicion that this is a very powerful idea. Applying the expressive power of a grammar-like mechanism to search, backtrack, and match within a tree-like data structure. Is this new or has anyone discussed it before? I've mentioned the idea of

Re: globs and trees in Perl6

2008-10-02 Thread Moritz Lenz
Timothy S. Nelson wrote: Hi all. I've enjoyed(?) reading over the February/March thread entitled Musings on operator overloading. I've brought a few thoughts along; if they're old news, please tell me where to do more reading on it :). Over the last year or two, I've

Re: XPath grammars (Was: Re: globs and trees in Perl6)

2008-10-02 Thread Timothy S. Nelson
On Thu, 2 Oct 2008, Timothy S. Nelson wrote: Now that Perl6 is in the mix, though, I think that the best way to do it is to make roles that model eg. Nodes, Plexes (Documents), Elements, and the like, and then have operators on them do all the work (like my idea of using a slash for a

Re: XPath grammars (Was: Re: globs and trees in Perl6)

2008-10-02 Thread Brandon S. Allbery KF8NH
On Oct 2, 2008, at 10:36 , Timothy S. Nelson wrote: On Thu, 2 Oct 2008, Timothy S. Nelson wrote: Now that Perl6 is in the mix, though, I think that the best way to do it is to make roles that model eg. Nodes, Plexes (Documents), Elements, and the like, and then have operators on them do all

Re: XPath grammars (Was: Re: globs and trees in Perl6)

2008-10-02 Thread Jon Lang
For tree-oriented pattern matching syntax, I'd recommend for inspiration the RELAX NG Compact Syntax, rather than XPath. Technically, RELAX NG is an XML schema validation language; but the basic principle that it uses is to describe a tree-oriented pattern, and to consider the document to be valid

XPath grammars (Was: Re: globs and trees in Perl6)

2008-10-02 Thread Daniel Ruoso
Qui, 2008-10-02 às 12:55 +0100, Tim Bunce escreveu: Like applying XPath to an XML DOM, only more general and taken further. By more general and taken further I'm thinking of the same kind of evoltion from simple regular expressions in perl5 to grammars in perl6. An XPath query is like a perl5

Re: XPath grammars (Was: Re: globs and trees in Perl6)

2008-10-02 Thread Timothy S. Nelson
On Fri, 3 Oct 2008, Timothy S. Nelson wrote: On Thu, 2 Oct 2008, Timothy S. Nelson wrote: Now that Perl6 is in the mix, though, I think that the best way to do it is to make roles that model eg. Nodes, Plexes (Documents), Elements, and the like, and then have operators on them do all the

Re: globs and trees in Perl6

2008-10-02 Thread Timothy S. Nelson
On Thu, 2 Oct 2008, Moritz Lenz wrote: [snip] It sounds like a perfect idea for a very general library or rather library framework. Perl 6 has all the hooks to install stuff like this. Agree 100%. But I thought it might be useful toget some feedback from others on this; I'd like to see the

globs and rules and trees, oh my! (was: Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-02 Thread Timothy S. Nelson
On Fri, 3 Oct 2008, Timothy S. Nelson wrote: On Fri, 3 Oct 2008, Timothy S. Nelson wrote: On Thu, 2 Oct 2008, Timothy S. Nelson wrote: Now that Perl6 is in the mix, though, I think that the best way to do it is to make roles that model eg. Nodes, Plexes (Documents), Elements, and the

Re: globs and trees in Perl6

2008-10-01 Thread Brandon S. Allbery KF8NH
On 2008 Oct 1, at 22:14, Timothy S. Nelson wrote: Hi all. I've enjoyed(?) reading over the February/March thread entitled Musings on operator overloading. I've brought a few thoughts along; if they're old news, please tell me here to do more reading on it :). The Perl6 way to do this is

Re: globs and trees in Perl6

2008-10-01 Thread Timothy S. Nelson
On Wed, 1 Oct 2008, Brandon S. Allbery KF8NH wrote: On 2008 Oct 1, at 22:14, Timothy S. Nelson wrote: Hi all. I've enjoyed(?) reading over the February/March thread entitled Musings on operator overloading. I've brought a few thoughts along; if they're old news, please tell me here to do

Re: globs and trees in Perl6

2008-10-01 Thread Brandon S. Allbery KF8NH
On 2008 Oct 1, at 22:23, Timothy S. Nelson wrote: On Wed, 1 Oct 2008, Brandon S. Allbery KF8NH wrote: On 2008 Oct 1, at 22:14, Timothy S. Nelson wrote: Hi all. I've enjoyed(?) reading over the February/March thread entitled Musings on operator overloading. I've brought a few thoughts