Kaz Kylheku wrote:
> "Andrew Dalke" <······@mindspring.com> wrote in message
> news:<···················@newsread4.news.pas.earthlink.net>...
>
>>
>> Did you look at my example doing just that? I built
>> an AST for Python and converted it into a normal function.
Andrew,
If you are talking about your stack-based language, you had something
like
"5 3 + b *"
Now, can you replace "3" with a Python expression, like
"5 ( 3 + input() ) + b *" ? I don't think so. You'd have to change your
whole parser at least, and even after that I'm not sure if you could do
this.
IIRC, in Erann's Lisp version, you can. You can just write
`(5 ,(+ 3 read) + b *) instead of '(5 3 + b *) . That's what we mean
by mixing different languages in one.
> I'm looking for a Python example which adds a new kind of statement to
> the language, and then later in the source file uses that statement to
> write a part of the program, such that it's all processed in the same
> pass.
Did they already give an example like this without the "same source
file" requirement? ...
> The statement can be nested in existing ones, and can have
> existing syntax embedded in it. Oh yeah, and it should work on at
> least two Python implementations.
.. in just the official CPython? I'm sorry, I must have missed it.
420
P.S. This is a very silly thread subject (but I'll keep it).
We all know *why* people do not like Lisp. It's the parens!
But don't take my word for it: I like Lisp. Ask almost anyone who doesn't!
·······@ziplip.com wrote in
·············································@ziplip.com:
> Kaz Kylheku wrote:
>
>> "Andrew Dalke" <······@mindspring.com> wrote in message
>> news:<···················@newsread4.news.pas.earthlink.net>...
>>
>>>
>>> Did you look at my example doing just that? I built
>>> an AST for Python and converted it into a normal function.
>
>
> Andrew,
>
> If you are talking about your stack-based language, you had something
> like
>
> "5 3 + b *"
>
> Now, can you replace "3" with a Python expression, like
> "5 ( 3 + input() ) + b *" ? I don't think so. You'd have to change
> your whole parser at least, and even after that I'm not sure if you
> could do this.
Well, changing specs etc., however the above is probably not
understandable to the poor domain engineer -- who finally had gotten a
handle on the domain language and now suddenly he is seeing parenthesis
and infix expressions...? Going through the tutorial and reference
manual that came with the stack based language, he still can't figure it
out, so he calls your tech support, it's escalated, and the next day
it's dropped in your lap (and if you have a sensible manager) with
instructions to rip out your abomination.
> IIRC, in Erann's Lisp version, you can. You can just write
> `(5 ,(+ 3 read) + b *) instead of '(5 3 + b *) . That's what we mean
> by mixing different languages in one.
You could try suggesting only to ship him a copy of the Lisp manuals?
The intertwined html/lisp example was laughable. What company would let
a programmer/engineer deal with trivialitites like changing style
guides, color schemes etc., which quite frankly they know nothing about
since they're not visual desingers? This is why the plethora of
templating systems exist -- and are the right tool for the job.
>> I'm looking for a Python example which adds a new kind of statement
>> to the language, and then later in the source file uses that
>> statement to write a part of the program, such that it's all
>> processed in the same pass.
[..]
>> The statement can be nested in existing ones, and can have
>> existing syntax embedded in it.
[..]
Translation: Whaaa! I want macros <wink>.
> P.S. This is a very silly thread subject (but I'll keep it).
> We all know *why* people do not like Lisp. It's the parens!
> But don't take my word for it: I like Lisp. Ask almost anyone who
> doesn't!
Personally, I don't care about the parens, the 28 different ways of
quoting things _is_ a cognitive burden -- and where are the first class
continuations?
-- bjorn
"Bjorn Pettersen" <···············@comcast.net> wrote
> The intertwined html/lisp example was laughable. What company would let
> a programmer/engineer deal with trivialitites like changing style
> guides, color schemes etc., which quite frankly they know nothing about
> since they're not visual desingers? This is why the plethora of
> templating systems exist -- and are the right tool for the job.
If plethora of templating systems exist, this only proves that it's the best
system on average for average programmers on average cases. Now try to do a
really complex web application (that is not some kind of eCommerce one but
one with hundreds of classes with different views according to the
habilitation levels, and objects status) and then you need an above average
systems or the development time explodes.
The designers' HTML is obviously always automatically converted to the
equivalent Lisp code.
[Hum, sorry for being harsh but these kind of endless threads (a
comp.lang.lisp specialty) get on my nerves. And now I'm even increasing the
noise by posting to one of these. And yes I know, if I don't like them I
don't have to read them. I don't, I just do some random sampling... :(]
Marc
"Marc Battyani" <·············@fractalconcept.com> wrote in
···············@library1.airnews.net:
> "Bjorn Pettersen" <···············@comcast.net> wrote
>
>> The intertwined html/lisp example was laughable. What company would
>> let a programmer/engineer deal with trivialitites like changing style
>> guides, color schemes etc., which quite frankly they know nothing
>> about since they're not visual desingers? This is why the plethora of
>> templating systems exist -- and are the right tool for the job.
>
> If plethora of templating systems exist, this only proves that it's
> the best system on average for average programmers on average cases.
No. Their abundance doesn't prove anything. It does perhaps indicate
that they're useful.
> Now try to do a really complex web application (that is not some kind
> of eCommerce one but one with hundreds of classes with different views
> according to the habilitation levels, and objects status) and then you
> need an above average systems or the development time explodes.
AFAIK, this is true for any 'really complex' problem in any problem
domain (and I can surely redefine 'really complex' to make it so no
matter what you're currently using <wink>). The _overwhelming_ number of
web projects are either trivially simple wrt user-interface, and even
complex projects normally have simple UIs. If 'really complex' projects
account for e.g. less than .5%, at least _I_ wouldn't feel comfortable
saying that the html macros presented earlier will always provide a good
solution -- and if not always, I'll have to write something new, further
reducing the usability range...
> The designers' HTML is obviously always automatically converted to the
> equivalent Lisp code.
Hmm.. does the developer test the conversion + his additions on all
browsers/platforms, or is it converted back to html for the visual
designer to verify? How can you guarantee an exact roundtrip without
implementing a template system? (think: someone added stuff -- let's say
in the domain specific language you created for them -- to your Lisp
program and re-indented to make it look better in their eyes, more like
C... still works the same doesn't it? ;-)
> [Hum, sorry for being harsh but these kind of endless threads (a
> comp.lang.lisp specialty) get on my nerves. And now I'm even
> increasing the noise by posting to one of these. And yes I know, if I
> don't like them I don't have to read them. I don't, I just do some
> random sampling... :(]
I should perhaps have removed c.l.py...
-- bjorn