Comments Below. I dont want to co-opt this thread/group into a 'my language vs your language'
especially since its XQuery talk :) But some concepts are really compelling. (below) From: [email protected] [mailto:[email protected]] On Behalf Of Henry Luo Sent: Thursday, November 24, 2011 1:01 AM To: [email protected] Cc: 'Geert Josten'; [email protected]; [email protected] Subject: Re: [xquery-talk] [ANN] Candle 0.10 Beta Release - a new scripting language for XML and more ============= . Converting the input and output of shell commands into structured hierarchical data, instead of just bytes and lines in abstract syntax. I've determined this is in general difficult to do. If by 'shell commands' you mean reusing existing ones. I have found 'shell commands' tend to need to be rewritten to effectively and efficiently do this. I had a goal once of a general purpose abstraction to convert line-oriented commands into XML oriented commands (both in and out), and while early work showed it does 'work' (you can use various general purpose text/xml transformation filters) the results are non-ideal. Many command simply dont provide for (in or out) the richness of the data they are processing in text mode, and/or are hard to parse. And also, unlike the early Unix days ... running a subprocess is expensive. ============= . Converting the semantics of shell commands from text based to node based, as being done in xmlsh; more can be added - like xdiff (diff on XML tree), xgrep2 (search based on RELAX NG kind of node pattern, instead of xpath). The more we have, the more value for people to convert to this new x-shell platform. ================ RelaxNG as a search pattern ? This had not occurred to me . Could you give an example of how RelaxNG could work as a search pattern ? . Extending the XML data model to the file level, so that advanced features like schema, XPath, XQuery and XSLT can be applied to files and dir nodes as well. ======================= I have mixed feelings on this. I did once (and may still do ) have a vision of a lazy-evaluation node based model of the filesystem. The "xls" command provides a snapshot but its not efficient for large trees if your just poking around. A lazy-load node based representation of the filesystem would be useful and I've seen several examples (but can't recall any of them now). Actually "cd" provides a basics of a cursor based node traversal mechanism. But its not what one thinks of much ... But why I have mixed feelings is that File Systems are both evolving and becoming less relevant. Or more heterogeneous. For example "The Web" is becoming a filesystem For example in xmlsh I've tried (without 100% success) at treating any URL as a "file" in places normally files would be expected. E.g "cat < http://www.mysite.com" works 'as expected'. But I have not implemented "cd" on any but file schemes. But have thought about it. What would it look like if you did "cd http://www.mysite.com; ls" . What commands can handle this ? What limits of each kind of scheme (ftp,http etc. ) can actually do this and what features of get/list/put do they support ? Its a mess. Add to that the emergence of XML Databases and NoSQL and distributed files store (like amazon S3) ... Equal access to all those is a goal I have in mind. Why can't XQuery fn:doc() work with an S3 'file' ? Well it can with some heavy lifting. But that heavy lifting is what keeps people from actually doing it. I'd like to see the normalization of 'The space of all resources' not just filesystems. REST is trying to do that but independent work evolves so fast its hard to keep up. And REST doesn't work with the local filesystem ! Arg. ------------------- . Rather than inventing another DSL for shell scripting, Candle extend XQuery to become a general-purpose scripting language. The advantage is that users faces only one language, instead of many DSLs (XPath, XSLT, XQuery, XProc, xmlsh). I personally think this is a red herring. "Extending a DSL" and "Implementing a new DSL" are the same thing, IMHO. Both require the users to learn new things. There is a degree of difference between an 'entirely new DSL' and "A DSL similar to but 'extended' from one you already know' ... But if we are to reuse existing DSL's like XPath, XSLT, XQuery, XProc etc. the end result is going to be a hybrid at best. I'll leave the discussion on pipelining to another day. It takes a whole conference to discuss it, and still there isn't a satisfactory agreement. -David ---------------------------------------- David A. Lee [email protected] http://www.xmlsh.org
_______________________________________________ [email protected] http://x-query.com/mailman/listinfo/talk
