Re: [OT] code is data

2006-06-21 Thread Anton Vredegoor
Bruno Desthuilliers wrote: > You mean like 'converting' javascript to python or python to ruby (or > converting any home-grown DSL to Python, etc) ? Yes, but also what some other posters mentioned, making Pythons internal parsing tree available to other programs (and to Python itself) by using

Re: [OT] code is data

2006-06-20 Thread Bruno Desthuilliers
Anton Vredegoor wrote: > Diez B. Roggisch wrote: > > <...> > >>> The whole point of a code transformation mechanism like the one Anton is >>> talking about is to be dynamic. Else one just needs a preprocessor... >> >> >> No, it is not the whole point. The point is >> "" >> The idea is that we now

Re: [OT] code is data

2006-06-20 Thread Anton Vredegoor
Diez B. Roggisch wrote: <...> >> The whole point of a code transformation mechanism like the one Anton is >> talking about is to be dynamic. Else one just needs a preprocessor... > > No, it is not the whole point. The point is > > "" > The idea is that we now have a fast parser (ElementTree) w

Re: [OT] code is data

2006-06-20 Thread Boris Borcic
bruno at modulix wrote: > Anton Vredegoor wrote: >> bruno at modulix wrote: >> >>> I still don't get the point. >> >> Well, I've got to be careful here, lest I'd be associated with the >> terr.., eh, the childp..., eh the macro-enablers. >> >> The idea is to have a way to transform a Python (.py) m

Re: [OT] code is data

2006-06-20 Thread Diez B. Roggisch
>> While the _result_ of a transformation might be a less efficient piece of >> code (e.g. introducing a lock around each call to enable concurrent >> access), the transformation itself is very - if not totally - static - > > really ? See below. > Nope, it's runned each time the module is loade

Re: [OT] code is data

2006-06-20 Thread bruno at modulix
Diez B. Roggisch wrote: > bruno at modulix wrote: > > >>Diez B. Roggisch wrote: >> >because lots of people know how to describe XML transformations, and >there are plenty of tools that implement such transformations >efficiently ? Efficiently enough for dynamic (runtime)

Re: [OT] code is data

2006-06-20 Thread Diez B. Roggisch
bruno at modulix wrote: > Diez B. Roggisch wrote: because lots of people know how to describe XML transformations, and there are plenty of tools that implement such transformations efficiently ? >>> >>> >>> Efficiently enough for dynamic (runtime) use ? >> >> >> Using XML-transfor

Re: [OT] code is data

2006-06-20 Thread bruno at modulix
Diez B. Roggisch wrote: >>> because lots of people know how to describe XML transformations, and >>> there are plenty of tools that implement such transformations >>> efficiently ? >> >> >> Efficiently enough for dynamic (runtime) use ? > > > Using XML-transformation for AST manipulation isn't my

Re: [OT] code is data

2006-06-20 Thread Laurent Pointal
Fredrik Lundh a écrit : > Laurent Pointal wrote: > The idea is to have a way to transform a Python (.py) module into XML and then do source code manipulations in XML-space using ElementTree. >>> >>> My my my... I'm not against the idea of dynamic source code >>> transformation, but for h

Re: [OT] code is data

2006-06-19 Thread K.S.Sreeram
Fredrik Lundh wrote: > because lots of people know how to describe XML transformations, and > there are plenty of tools that implement such transformations efficiently ? > > why would XML be inefficient ? XML Transformations (XSLT) would *certainly* be an overkill here. They've invented a whole

Re: [OT] code is data

2006-06-19 Thread Diez B. Roggisch
>> because lots of people know how to describe XML transformations, and >> there are plenty of tools that implement such transformations efficiently ? > > Efficiently enough for dynamic (runtime) use ? Using XML-transformation for AST manipulation isn't my first choice either - yet efficiency co

Re: [OT] code is data

2006-06-19 Thread bruno at modulix
Fredrik Lundh wrote: > Laurent Pointal wrote: >> Bruno Desthuilliers wrote: >>> Anton Vredegoor wrote: The idea is to have a way to transform a Python (.py) module into XML and then do source code manipulations in XML-space using ElementTree. > >>> > >>> My my my... I'm not against th

Re: [OT] code is data

2006-06-19 Thread Fredrik Lundh
Laurent Pointal wrote: >>> The idea is to have a way to transform a Python (.py) module into XML >>> and then do source code manipulations in XML-space using ElementTree. >> >> My my my... I'm not against the idea of dynamic source code >> transformation, but for heaven's sake, *why* would one pu

Re: [OT] code is data

2006-06-19 Thread Laurent Pointal
bruno at modulix a écrit : > Anton Vredegoor wrote: >> bruno at modulix wrote: >> >>> I still don't get the point. >> >> Well, I've got to be careful here, lest I'd be associated with the >> terr.., eh, the childp..., eh the macro-enablers. >> >> The idea is to have a way to transform a Python (.py

Re: [OT] code is data

2006-06-19 Thread bruno at modulix
Anton Vredegoor wrote: > bruno at modulix wrote: > >> I still don't get the point. > > > Well, I've got to be careful here, lest I'd be associated with the > terr.., eh, the childp..., eh the macro-enablers. > > The idea is to have a way to transform a Python (.py) module into XML > and then do

Re: [OT] code is data

2006-06-19 Thread Anton Vredegoor
bruno at modulix wrote: > I still don't get the point. Well, I've got to be careful here, lest I'd be associated with the terr.., eh, the childp..., eh the macro-enablers. The idea is to have a way to transform a Python (.py) module into XML and then do source code manipulations in XML-space u

Re: [OT] code is data

2006-06-19 Thread bruno at modulix
Anton Vredegoor wrote: > With the inclusion of ElementTree (an XML-parser) in Python25 and recent > developments concerning JSON (a very Pythonesque but somewhat limited > XML notation scheme, let's call it statically typed XML) JSON stands for JavaScript Object Notation, and has *nothing* to do w

[OT] code is data

2006-06-17 Thread Anton Vredegoor
With the inclusion of ElementTree (an XML-parser) in Python25 and recent developments concerning JSON (a very Pythonesque but somewhat limited XML notation scheme, let's call it statically typed XML) Python seems to have reached a stage where it now seems to be possible to completely swallow le