Re: code is data

2006-06-29 Thread Ravi Teja
I missed this reply earlier. Fredrik Lundh wrote: > there might be cognitive theories that argue that the length of the > symbols used to describe something is more important than the symbols > you use and how they can be "chunked" by the brain Expert communication is known to work differently. F

Re: code is data

2006-06-23 Thread Paul Boddie
Anton Vredegoor wrote: > Paul Boddie wrote: > > > > I was going to write a long reply to one of your previous messages, but > > the above link references a project which may intersect with some of > > your expectations. Meanwhile, it should be noted that the availability > > Somehow I get the impre

Re: code is data

2006-06-23 Thread Bruno Desthuilliers
Anton Vredegoor wrote: (snip) > However, I knew of the existence of such languages but I am mostly > interested in standardized code interchange, like for example with JSONP > which fetches some external javascriptcode from another server using > JSON and places the translated javascript into a we

Re: code is data

2006-06-23 Thread Kay Schluehr
Anton Vredegoor wrote: > Paul Boddie wrote: > > > Anton Vredegoor wrote: > > >> Yes, but also what some other posters mentioned, making Pythons internal > >> parsing tree available to other programs (and to Python itself) by using > >> a widely used standard like XML as its datatype. > > > > http:

Re: code is data

2006-06-23 Thread Max Erickson
Anton Vredegoor <[EMAIL PROTECTED]> wrote: > > However, I knew of the existence of such languages but I am > mostly interested in standardized code interchange, like for > example with JSONP which fetches some external javascriptcode > from another server using JSON and places the translated

Re: code is data

2006-06-23 Thread Anton Vredegoor
Paul Boddie wrote: > Anton Vredegoor wrote: >> Yes, but also what some other posters mentioned, making Pythons internal >> parsing tree available to other programs (and to Python itself) by using >> a widely used standard like XML as its datatype. > > http://pysch.sourceforge.net/ast.html Very

Re: code is data

2006-06-23 Thread Fredrik Lundh
Ravi Teja wrote: > You blogged on Django. Let's use that. Don't you think model creation > in Django can be represented better, given that it is done often > enough? nope, because 1) it's not done very often, and 2) the existing syntax is already very minimal, and defined in terms of a languag

Re: code is data

2006-06-22 Thread Ravi Teja
> I don't think that distinction is very meaningful. As a programmer I > have to understand both. > I understand the Python compiler well, and it gives me reasonably good > feedback when I > get things wrong, and it has a lot of flexibility along several > orthogonal lines. > We're talking about

Re: code is data

2006-06-22 Thread Paul Boddie
Anton Vredegoor wrote: > 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

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: code is data

2006-06-20 Thread Ian Bicking
Ravi Teja wrote: > > Or... maybe to be more specific, the hard work later on goes into > > *code*. If you are enhancing your model, you do so with methods on the > > model classes, and those methods don't effect the DSL, they are just > > "code". You create some raw XML in the beginning, but quic

Re: code is data

2006-06-20 Thread Ravi Teja
> Or... maybe to be more specific, the hard work later on goes into > *code*. If you are enhancing your model, you do so with methods on the > model classes, and those methods don't effect the DSL, they are just > "code". You create some raw XML in the beginning, but quickly it's > just a matter

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: code is data

2006-06-20 Thread Kay Schluehr
Fredrik Lundh wrote: > Kay Schluehr wrote: > > > If it is just a different kind of representation of common data > > structures > > but how do you know ? > > The semantics is specified by the syntax transformer so it is actually compile-time semantics relative to the base language Python . For a

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: code is data

2006-06-20 Thread Fredrik Lundh
Kay Schluehr wrote: > If it is just a different kind of representation of common data > structures but how do you know ? -- http://mail.python.org/mailman/listinfo/python-list

Re: code is data

2006-06-19 Thread Kay Schluehr
Ian Bicking wrote: > > I don't use Django and I made this up quickly, so please don't pick on > > subtleties. > > > > @Poll: > > question: char length 200 > > pub_date('date published'): date > > > > @Choice: > > poll -> Poll > > choice: char length 200 > > votes: int > > That

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: code is data

2006-06-19 Thread Ian Bicking
Ravi Teja wrote: > Fredrik Lundh wrote: > > Ravi Teja wrote: > > > > > Web frameworks, which seem to be the rage now in Python community could > > > have benefited tremendously from Macro capabilities since they have a > > > lot of boiler plate. > > > > they do? methinks you haven't done much web

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: code is data

2006-06-19 Thread Ravi Teja
Kay Schluehr wrote: > Ravi Teja wrote: > > > People have however written various language interpreters (Scheme, > > Forth and yes, even Basic) in Python, just for kicks. Still does not > > make it a DSL language anymore than it makes C a DSL language. > > > > At present, the closest thing to writin

Re: code is data

2006-06-19 Thread Ravi Teja
BJörn Lindqvist wrote: > > > > community has no interest in it. When I absolutely need macros, I will > > > > go elsewhere. > > I *like* 1..5 (ada, ruby) instead of range(5). If I had macros, I would > > have done it myself for *my* code. > I think this example more is a symptom of a childish nee

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: code is data

2006-06-19 Thread Kay Schluehr
Ravi Teja wrote: > People have however written various language interpreters (Scheme, > Forth and yes, even Basic) in Python, just for kicks. Still does not > make it a DSL language anymore than it makes C a DSL language. > > At present, the closest thing to writing a DSL in Python is Logix > htt

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: code is data

2006-06-19 Thread Michele Simionato
John Roth wrote: > I saw the "make" statement as a breath of fresh air. > Then it got shot down for what were, to me, totally > trivial reasons. Which reasons? I as I recall, Guido cut it out without giving any reason. Of course Guido has the right to do so, but it is not respectful of all the wo

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: code is data

2006-06-19 Thread bruno at modulix
Ravi Teja wrote: (snip) > Annoted variables, symbols and code > layout visually cue more efficiently to the object nature than do > explicit text definitions. Of course, this is only sensible when there > aren't too many of any of those. In that case, the cognitive cost of > notation outweighs the

Re: code is data

2006-06-19 Thread bruno at modulix
Ravi Teja wrote: > BJörn Lindqvist wrote: > >>>Personally, I would like to see macros in Python (actually Logix >>>succeeding is good enough). But I am no language designer and the >>>community has no interest in it. When I absolutely need macros, I will >>>go elsewhere. >> >>One must wonder, when

Re: code is data

2006-06-19 Thread bruno at modulix
BJörn Lindqvist wrote: >> Personally, I would like to see macros in Python (actually Logix >> succeeding is good enough). But I am no language designer and the >> community has no interest in it. When I absolutely need macros, I will >> go elsewhere. > > > One must wonder, when is that? When do y

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

Re: code is data

2006-06-18 Thread BJörn Lindqvist
> > > community has no interest in it. When I absolutely need macros, I will > > > go elsewhere. > I *like* 1..5 (ada, ruby) instead of range(5). If I had macros, I would > have done it myself for *my* code. I think this example more is a symptom of a childish need to get things your way than of a

Re: code is data

2006-06-18 Thread Roberto Bonvallet
Ravi Teja <[EMAIL PROTECTED]> said: > I *like* 1..5 (ada, ruby) instead of range(5). If I had macros, I would > have done it myself for *my* code. You can write your own preprocessor to handle things like that. -- Roberto Bonvallet -- http://mail.python.org/mailman/listinfo/python-list

Re: code is data

2006-06-18 Thread Ravi Teja
Fredrik Lundh wrote: > Ravi Teja wrote: > > > Web frameworks, which seem to be the rage now in Python community could > > have benefited tremendously from Macro capabilities since they have a > > lot of boiler plate. > > they do? methinks you haven't done much web programming lately... > > You

Re: code is data

2006-06-18 Thread Fredrik Lundh
Ravi Teja wrote: > Web frameworks, which seem to be the rage now in Python community could > have benefited tremendously from Macro capabilities since they have a > lot of boiler plate. they do? methinks you haven't done much web programming lately... -- http://mail.python.org/mailman/listi

Re: code is data

2006-06-18 Thread Ravi Teja
Paddy wrote: > Ravi Teja wrote: > > BJörn Lindqvist wrote: > > > > Personally, I would like to see macros in Python (actually Logix > > > > succeeding is good enough). But I am no language designer and the > > > > community has no interest in it. When I absolutely need macros, I will > > > > go els

Re: code is data

2006-06-18 Thread Paddy
Ravi Teja wrote: > BJörn Lindqvist wrote: > > > Personally, I would like to see macros in Python (actually Logix > > > succeeding is good enough). But I am no language designer and the > > > community has no interest in it. When I absolutely need macros, I will > > > go elsewhere. > > > > One must

Re: code is data

2006-06-17 Thread Ravi Teja
BJörn Lindqvist wrote: > > Personally, I would like to see macros in Python (actually Logix > > succeeding is good enough). But I am no language designer and the > > community has no interest in it. When I absolutely need macros, I will > > go elsewhere. > > One must wonder, when is that? When do

Re: code is data

2006-06-17 Thread BJörn Lindqvist
> Personally, I would like to see macros in Python (actually Logix > succeeding is good enough). But I am no language designer and the > community has no interest in it. When I absolutely need macros, I will > go elsewhere. One must wonder, when is that? When do you absolutely need macros? -- mv

Re: code is data

2006-06-17 Thread Ravi Teja
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) Python seems to > have reached a stage where it now seems to be possi

Re: code is data

2006-06-17 Thread Ravi Teja
Paddy wrote: > 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) > > > > Your thoughts please. > > > > Anton > >

Re: code is data

2006-06-17 Thread Paddy
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) > Your thoughts please. > > Anton Hi Anton. If you mean this JSON: h

Re: code is data

2006-06-17 Thread John Roth
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) Python seems to > have reached a stage where it now seems to be possib

[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