Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57152 > unrolled thread

Python Front-end to GCC

Started byPhilip Herron <herron.philip@googlemail.com>
First post2013-10-20 10:56 -0700
Last post2013-10-25 14:49 -0700
Articles 20 on this page of 123 — 27 participants

Back to article view | Back to comp.lang.python


Contents

  Python Front-end to GCC Philip Herron <herron.philip@googlemail.com> - 2013-10-20 10:56 -0700
    Re: Python Front-end to GCC victorgarcianet@gmail.com - 2013-10-20 15:10 -0700
      Re: Python Front-end to GCC John Nagle <nagle@animats.com> - 2013-10-22 23:48 -0700
        Re: Python Front-end to GCC Philip Herron <herron.philip@googlemail.com> - 2013-10-23 00:25 -0700
          Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-23 09:42 +0100
          Re: Python Front-end to GCC John Nagle <nagle@animats.com> - 2013-10-23 13:51 -0700
    Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-20 20:35 -0700
      Re: Python Front-end to GCC Steven D'Aprano <steve@pearwood.info> - 2013-10-21 07:46 +0000
        Re: Python Front-end to GCC Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-10-21 10:55 +0100
          Re: Python Front-end to GCC Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-21 23:41 +0000
            Re: Python Front-end to GCC Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-10-22 10:14 +0100
              Re: Python Front-end to GCC Philip Herron <herron.philip@googlemail.com> - 2013-10-22 02:32 -0700
              Re: Python Front-end to GCC Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-22 12:00 +0000
                Re: Python Front-end to GCC Chris Angelico <rosuav@gmail.com> - 2013-10-22 23:20 +1100
                  Re: Python Front-end to GCC Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-22 17:27 +0000
                    Re: Python Front-end to GCC Chris Angelico <rosuav@gmail.com> - 2013-10-23 08:43 +1100
                Re: Python Front-end to GCC Dave Angel <davea@davea.name> - 2013-10-22 14:04 +0000
                  Re: Python Front-end to GCC Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-22 15:22 +0000
                    Re: Python Front-end to GCC Grant Edwards <invalid@invalid.invalid> - 2013-10-22 15:39 +0000
                      Re: Python Front-end to GCC Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-22 16:40 +0000
                        Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-22 17:50 +0100
                        Re: Python Front-end to GCC Chris Kaynor <ckaynor@zindagigames.com> - 2013-10-22 09:52 -0700
                        Re: Python Front-end to GCC Frank Miles <fpm@u.washington.edu> - 2013-10-22 16:53 +0000
                          Re: Python Front-end to GCC Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-22 17:23 +0000
                            Re: Python Front-end to GCC Chris Kaynor <ckaynor@zindagigames.com> - 2013-10-22 10:35 -0700
                            Re: Python Front-end to GCC Neil Cerutti <neilc@norwich.edu> - 2013-10-22 17:37 +0000
                            Re: Python Front-end to GCC Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-10-22 18:37 +0100
                            Re: Python Front-end to GCC MRAB <python@mrabarnett.plus.com> - 2013-10-22 18:42 +0100
                            Re: Python Front-end to GCC Grant Edwards <invalid@invalid.invalid> - 2013-10-22 18:49 +0000
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 04:40 +0100
                            Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-25 04:55 -0700
                            Re: Python Front-end to GCC Dan Sommers <dan@tombstonezero.net> - 2013-10-25 12:55 +0000
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 15:18 +0100
                            Re: Python Front-end to GCC Ned Batchelder <ned@nedbatchelder.com> - 2013-10-25 10:35 -0400
                            Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-25 11:26 -0700
                              Re: Python Front-end to GCC Grant Edwards <invalid@invalid.invalid> - 2013-10-25 19:06 +0000
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 19:40 +0100
                            Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-25 11:45 -0700
                              Re: Python Front-end to GCC rusi <rustompmody@gmail.com> - 2013-10-25 11:59 -0700
                                Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-25 12:09 -0700
                                  Re: Python Front-end to GCC rusi <rustompmody@gmail.com> - 2013-10-25 12:15 -0700
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 20:02 +0100
                            Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-25 12:18 -0700
                              Re: Python Front-end to GCC John Nagle <nagle@animats.com> - 2013-10-26 14:31 -0700
                                Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-26 15:10 -0700
                                Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-27 15:14 -0700
                                  Re: Python Front-end to GCC rusi <rustompmody@gmail.com> - 2013-10-27 19:15 -0700
                                    Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-28 08:44 +0000
                                      Re: Python Front-end to GCC rusi <rustompmody@gmail.com> - 2013-10-28 02:31 -0700
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 20:36 +0100
                            Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-25 12:49 -0700
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 21:14 +0100
                            Re: Python Front-end to GCC Tim Delaney <timothy.c.delaney@gmail.com> - 2013-10-26 07:11 +1100
                            Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-25 13:29 -0700
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 21:36 +0100
                              Re: Python Front-end to GCC Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-26 02:42 +0000
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 21:44 +0100
                            Re: Python Front-end to GCC Tim Delaney <timothy.c.delaney@gmail.com> - 2013-10-26 07:48 +1100
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 21:56 +0100
                            Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-25 14:02 -0700
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 22:11 +0100
                            Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-25 14:37 -0700
                            Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-25 22:56 +0100
                            Re: Python Front-end to GCC Chris Angelico <rosuav@gmail.com> - 2013-10-26 13:36 +1100
                    Re: Python Front-end to GCC Neil Cerutti <neilc@norwich.edu> - 2013-10-22 17:15 +0000
                      Re: Python Front-end to GCC Grant Edwards <invalid@invalid.invalid> - 2013-10-22 18:58 +0000
                        Re: Python Front-end to GCC Grant Edwards <invalid@invalid.invalid> - 2013-10-22 20:26 +0000
                  Re: Python Front-end to GCC Grant Edwards <invalid@invalid.invalid> - 2013-10-22 15:36 +0000
                Re: Python Front-end to GCC Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-10-22 15:15 +0100
        Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-21 13:14 -0700
        Re: Python Front-end to GCC Ned Batchelder <ned@nedbatchelder.com> - 2013-10-21 16:29 -0400
          Re: Python Front-end to GCC rusi <rustompmody@gmail.com> - 2013-10-21 20:40 -0700
    Re: Python Front-end to GCC Philip Herron <herron.philip@googlemail.com> - 2013-10-21 04:08 -0700
      Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-21 13:26 -0700
        Re: Python Front-end to GCC Philip Herron <herron.philip@googlemail.com> - 2013-10-21 14:03 -0700
          Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-21 16:04 -0700
            Re: Python Front-end to GCC Piet van Oostrum <piet@vanoostrum.org> - 2013-10-21 23:45 -0400
              Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-21 21:24 -0700
                Re: Python Front-end to GCC Steven D'Aprano <steve@pearwood.info> - 2013-10-22 05:25 +0000
              Re: Python Front-end to GCC Dave Angel <davea@davea.name> - 2013-10-22 04:39 +0000
              Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-22 08:04 -0700
                Re: Python Front-end to GCC Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-22 17:09 +0000
                Re: Python Front-end to GCC Piet van Oostrum <piet@vanoostrum.org> - 2013-10-22 13:20 -0400
              Re: Python Front-end to GCC Ned Batchelder <ned@nedbatchelder.com> - 2013-10-22 11:46 -0400
              Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-22 16:52 +0100
              Re: Python Front-end to GCC Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-10-22 09:03 -0700
              Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-22 10:50 -0700
                Re: Python Front-end to GCC rusi <rustompmody@gmail.com> - 2013-10-22 11:11 -0700
                Re: Python Front-end to GCC Neil Cerutti <neilc@norwich.edu> - 2013-10-22 18:18 +0000
                  Re: Python Front-end to GCC Piet van Oostrum <piet@vanoostrum.org> - 2013-10-22 15:20 -0400
                    Re: Python Front-end to GCC Neil Cerutti <neilc@norwich.edu> - 2013-10-22 19:27 +0000
                      Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-22 20:38 +0100
                        Re: Python Front-end to GCC Neil Cerutti <neilc@norwich.edu> - 2013-10-22 20:00 +0000
                    Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-22 20:32 +0100
              Re: Python Front-end to GCC Skip Montanaro <skip@pobox.com> - 2013-10-22 13:08 -0500
              Re: Python Front-end to GCC MRAB <python@mrabarnett.plus.com> - 2013-10-22 19:16 +0100
              Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-22 11:16 -0700
              Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-22 11:22 -0700
              Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-22 11:28 -0700
                Re: Python Front-end to GCC Piet van Oostrum <piet@vanoostrum.org> - 2013-10-22 18:11 -0400
                  Re: Python Front-end to GCC Chris Angelico <rosuav@gmail.com> - 2013-10-23 17:28 +1100
                Re: Python Front-end to GCC Grant Edwards <invalid@invalid.invalid> - 2013-10-22 22:47 +0000
              Re: Python Front-end to GCC Ned Batchelder <ned@nedbatchelder.com> - 2013-10-22 14:23 -0400
                Re: Python Front-end to GCC rusi <rustompmody@gmail.com> - 2013-10-22 11:40 -0700
                  Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-22 19:58 +0100
              Re: Python Front-end to GCC Ned Batchelder <ned@nedbatchelder.com> - 2013-10-22 14:40 -0400
                Re: Python Front-end to GCC alex23 <wuwei23@gmail.com> - 2013-10-23 11:36 +1000
                  Re: Python Front-end to GCC rusi <rustompmody@gmail.com> - 2013-10-22 21:04 -0700
                  Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-23 07:06 +0100
              Re: Python Front-end to GCC MRAB <python@mrabarnett.plus.com> - 2013-10-22 19:47 +0100
              Re: Python Front-end to GCC Ned Batchelder <ned@nedbatchelder.com> - 2013-10-22 13:56 -0400
              Re: Python Front-end to GCC Michael Torrie <torriem@gmail.com> - 2013-10-22 22:05 -0600
              Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-23 07:13 +0100
              Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-26 14:25 -0700
              Re: Python Front-end to GCC Mark Janssen <dreamingforward@gmail.com> - 2013-10-26 14:33 -0700
              Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-26 22:38 +0100
              Re: Python Front-end to GCC Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-26 22:35 +0100
      Re: Python Front-end to GCC Antoine Pitrou <solipsis@pitrou.net> - 2013-10-22 08:55 +0000
        Re: Python Front-end to GCC Philip Herron <herron.philip@googlemail.com> - 2013-10-22 02:08 -0700
        Re: Python Front-end to GCC Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-22 10:10 +0000
          Re: Python Front-end to GCC Antoine Pitrou <solipsis@pitrou.net> - 2013-10-22 15:51 +0000
      Re: Python Front-end to GCC Stefan Behnel <stefan_ml@behnel.de> - 2013-10-24 08:47 +0200
    Re: Python Front-end to GCC xDog Walker <thudfoo@gmail.com> - 2013-10-25 14:49 -0700

Page 6 of 7 — ← Prev page 1 2 3 4 5 [6] 7  Next page →


#57342

FromChris Angelico <rosuav@gmail.com>
Date2013-10-23 17:28 +1100
Message-ID<mailman.1395.1382509714.18130.python-list@python.org>
In reply to#57322
On Wed, Oct 23, 2013 at 9:11 AM, Piet van Oostrum <piet@vanoostrum.org> wrote:
> Mark Janssen <dreamingforward@gmail.com> writes:
>
>>>> ....Is your language Turing complete?
>>>>
>>>
>>> 1) No, it's not.
>>> 2) So what?  That should make it easier to compile to C, if anything.
>>> 3) Don't change the subject.
>>
>> Well, if your language is not Turing complete, it is not clear that
>> you will be able to compile it at all.  That's the difference between
>> a calculator and a computer.
>
> You think a language that is not Turing-complete cannot be compiled?
> What nonsense is that. Please Mark, spare us your nonsense.

HQ9+ can be compiled. By the simple technique of making the original
source into a literal and appending the interpreter, you can make a
compiler. Any language that has an interpreter can, therefore, be
compiled, regardless of Turing completeness or any other attribute.

ChrisA

[toc] | [prev] | [next] | [standalone]


#57326

FromGrant Edwards <invalid@invalid.invalid>
Date2013-10-22 22:47 +0000
Message-ID<l46va3$2v$1@reader1.panix.com>
In reply to#57293
On 2013-10-22, Mark Janssen <dreamingforward@gmail.com> wrote:
>>> ....Is your language Turing complete?
>>>
>>
>> 1) No, it's not.
>> 2) So what?  That should make it easier to compile to C, if anything.
>> 3) Don't change the subject.
>
> Well, if your language is not Turing complete, it is not clear that
> you will be able to compile it at all.

Whether a language is turing complete or not has _NOTHING_ to do with
whether it can be compiled or not.

> That's the difference between a calculator and a computer.

No, it isn't.

> Thank you.  You may be seated.

Dunno what you're smoking, but you sure are getting your money's
worth...

-- 
Grant

[toc] | [prev] | [next] | [standalone]


#57294

FromNed Batchelder <ned@nedbatchelder.com>
Date2013-10-22 14:23 -0400
Message-ID<mailman.1372.1382466682.18130.python-list@python.org>
In reply to#57230
On 10/22/13 2:16 PM, Mark Janssen wrote:
>>>>> So which of you is confused?  I ask that in the inclusive (not
>>>>> exclusive OR) sense.... ;^)  <-- face says "both".
>>>> Could you please be less snarky?
>>> Okay.  The purpose of BNF (at least as I envision it) is to
>>> produce/specify a *context-free* "grammar".  A lexer parses the tokens
>>> specified in the BNF into an Abstract Syntax Tree.  If one can produce
>>> such a tree for any given source, the language, in theory, can be
>>> compiled by GCC into an executable.
>>>
>>> Boom.
>> Hmm, I don't hear the boom yet.  An Abstract Syntax Tree is a tree
>> representation of a program.  To use my previous example: the program "123
>> *!? 456" would become a tree:
>>
>>      op: "*!?"
>>          num: 123
>>          num: 456
>>
>> There's still not enough information to compile this.
> ....Is your language Turing complete?
>

1) No, it's not.
2) So what?  That should make it easier to compile to C, if anything.
3) Don't change the subject.

A BNF doesn't provide enough information to compile a program to C. 
That's all I'm trying to help you understand.  If you don't agree, then 
we have to talk about the meaning of the words BNF, compile, program, and C.

I applaud your interest in this topic.  I think you need to learn more 
before you try to claim expertise, though.

--Ned.

[toc] | [prev] | [next] | [standalone]


#57295

Fromrusi <rustompmody@gmail.com>
Date2013-10-22 11:40 -0700
Message-ID<1515e005-729d-4f4b-9c44-1eb9d841615b@googlegroups.com>
In reply to#57294
On Tuesday, October 22, 2013 11:53:22 PM UTC+5:30, Ned Batchelder wrote:
> A BNF doesn't provide enough information to compile a program to C. 
> That's all I'm trying to help you understand.  If you don't agree, then 
> we have to talk about the meaning of the words BNF, compile, program, and C.

I believe we need to talk about the Dunning-Kruger effect

[toc] | [prev] | [next] | [standalone]


#57301

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-10-22 19:58 +0100
Message-ID<mailman.1376.1382468301.18130.python-list@python.org>
In reply to#57295
On 22/10/2013 19:40, rusi wrote:
> On Tuesday, October 22, 2013 11:53:22 PM UTC+5:30, Ned Batchelder wrote:
>> A BNF doesn't provide enough information to compile a program to C.
>> That's all I'm trying to help you understand.  If you don't agree, then
>> we have to talk about the meaning of the words BNF, compile, program, and C.
>
> I believe we need to talk about the Dunning-Kruger effect
>

No need for me to discuss that as I used to be big headed but now I'm 
perfect.

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#57296

FromNed Batchelder <ned@nedbatchelder.com>
Date2013-10-22 14:40 -0400
Message-ID<mailman.1373.1382467261.18130.python-list@python.org>
In reply to#57230
On 10/22/13 2:22 PM, Mark Janssen wrote:
>>> Okay.  The purpose of BNF (at least as I envision it) is to
>>> produce/specify a *context-free* "grammar".  A lexer parses the tokens
>>> specified in the BNF into an Abstract Syntax Tree.  If one can produce
>>> such a tree for any given source, the language, in theory, can be
>>> compiled by GCC into an executable.
>>>
>>> Boom.
>>>
>> But you still need to specify the semantics.
> In my world, like writing pseudo-code or flow-charts, the AST *is* the
> semantics.  What world are you guys from?

Mark, you started this by describing a program that compiled to C. Now 
you say you are in the world of pseudo-code and flow-charts. Which is it?

In the world where actual programs get compiled and run, you need to 
have semantics, and they aren't expressed in an AST or a BNF.  I think 
you think that an AST is enough, but it isn't.  I'm also not sure what 
you actually think because we don't stay on a topic long enough to get 
into the details that would shed light.

It's fun to feel like you are right, and it's easy if you change the 
topic when the going gets tough.  You've done this a number of times.

I've tried to be polite, and I've tried to be helpful, but I'm sorry: 
either you don't understand a lot of the terms you are throwing around, 
or you aren't disciplined enough to focus on a topic long enough to 
explain yourself.  Either way, I don't know how else to move the 
discussion forward.

--Ned.

[toc] | [prev] | [next] | [standalone]


#57333

Fromalex23 <wuwei23@gmail.com>
Date2013-10-23 11:36 +1000
Message-ID<l4797c$2oi$1@dont-email.me>
In reply to#57296
On 23/10/2013 4:40 AM, Ned Batchelder wrote:
> I've tried to be polite, and I've tried to be helpful, but I'm sorry:
> either you don't understand a lot of the terms you are throwing around,
> or you aren't disciplined enough to focus on a topic long enough to
> explain yourself.  Either way, I don't know how else to move the
> discussion forward.

You forgot to end with a well-warranted "Boom".

Mark Janssen is rapidly becoming Xah Lee 2.0, identical down to the 
repugnant misogyny he expresses elsewhere. The only difference is one of 
verbosity.

[toc] | [prev] | [next] | [standalone]


#57336

Fromrusi <rustompmody@gmail.com>
Date2013-10-22 21:04 -0700
Message-ID<f70f8f8e-779c-49e6-8da8-2bc6170848f1@googlegroups.com>
In reply to#57333
On Wednesday, October 23, 2013 7:06:40 AM UTC+5:30, alex23 wrote:
> On 23/10/2013 4:40 AM, Ned Batchelder wrote:
> 
> > I've tried to be polite, and I've tried to be helpful, but I'm sorry:
> > either you don't understand a lot of the terms you are throwing around,
> > or you aren't disciplined enough to focus on a topic long enough to
> > explain yourself.  Either way, I don't know how else to move the
> > discussion forward.
> 
> You forgot to end with a well-warranted "Boom".
> 
> Mark Janssen is rapidly becoming Xah Lee 2.0, identical down to the 
> repugnant misogyny he expresses elsewhere. The only difference is one of 
> verbosity.

Hey! Time to stop punching up a guy -- even (because?) he's a nut -- rather a hard one tho

[toc] | [prev] | [next] | [standalone]


#57339

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-10-23 07:06 +0100
Message-ID<mailman.1392.1382508607.18130.python-list@python.org>
In reply to#57333
On 23/10/2013 02:36, alex23 wrote:
> On 23/10/2013 4:40 AM, Ned Batchelder wrote:
>> I've tried to be polite, and I've tried to be helpful, but I'm sorry:
>> either you don't understand a lot of the terms you are throwing around,
>> or you aren't disciplined enough to focus on a topic long enough to
>> explain yourself.  Either way, I don't know how else to move the
>> discussion forward.
>
> You forgot to end with a well-warranted "Boom".
>
> Mark Janssen is rapidly becoming Xah Lee 2.0, identical down to the
> repugnant misogyny he expresses elsewhere. The only difference is one of
> verbosity.

Wow, no punches pulled here.  But IMHO thoroughly deserved.

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#57298

FromMRAB <python@mrabarnett.plus.com>
Date2013-10-22 19:47 +0100
Message-ID<mailman.1375.1382467622.18130.python-list@python.org>
In reply to#57230
On 22/10/2013 19:22, Mark Janssen wrote:
>>> Okay.  The purpose of BNF (at least as I envision it) is to
>>> produce/specify a *context-free* "grammar".  A lexer parses the tokens
>>> specified in the BNF into an Abstract Syntax Tree.  If one can produce
>>> such a tree for any given source, the language, in theory, can be
>>> compiled by GCC into an executable.
>>>
>>> Boom.
>>>
>> But you still need to specify the semantics.
>
> In my world, like writing pseudo-code or flow-charts, the AST *is* the
> semantics.  What world are you guys from?
>
The real world. :-)

So what you're saying is that you generate an AST where there are
certain pre-defined operations (primitives?) available?

[toc] | [prev] | [next] | [standalone]


#57302

FromNed Batchelder <ned@nedbatchelder.com>
Date2013-10-22 13:56 -0400
Message-ID<mailman.1377.1382468581.18130.python-list@python.org>
In reply to#57230
On 10/22/13 1:50 PM, Mark Janssen wrote:
>>> So which of you is confused?  I ask that in the inclusive (not
>>> exclusive OR) sense.... ;^)  <-- face says "both".
>> Could you please be less snarky?  We're trying to communicate here, and it
>> is not at all clear yet who is confused and who is not.  If you are
>> interested in discussing technical topics, then discuss them.
> Okay.  The purpose of BNF (at least as I envision it) is to
> produce/specify a *context-free* "grammar".  A lexer parses the tokens
> specified in the BNF into an Abstract Syntax Tree.  If one can produce
> such a tree for any given source, the language, in theory, can be
> compiled by GCC into an executable.
>
> Boom.

Hmm, I don't hear the boom yet.  An Abstract Syntax Tree is a tree 
representation of a program.  To use my previous example: the program 
"123 *!? 456" would become a tree:

     op: "*!?"
         num: 123
         num: 456

There's still not enough information to compile this.  The operator *!? 
needs to have a meaning assigned to it.  That's the role of the semantic 
specification of a language.  That has to be provided somehow.  A BNF, 
or a grammar, or a syntax, or an AST can't provide the semantics.  That 
was the original point: syntax isn't enough.

--Ned.

[toc] | [prev] | [next] | [standalone]


#57337

FromMichael Torrie <torriem@gmail.com>
Date2013-10-22 22:05 -0600
Message-ID<mailman.1390.1382502631.18130.python-list@python.org>
In reply to#57230
On 10/22/2013 12:28 PM, Mark Janssen wrote:
> Thank you.  You may be seated.

Ranting Rick, is that you?

[toc] | [prev] | [next] | [standalone]


#57340

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-10-23 07:13 +0100
Message-ID<mailman.1393.1382508905.18130.python-list@python.org>
In reply to#57230
On 23/10/2013 05:05, Michael Torrie wrote:
> On 10/22/2013 12:28 PM, Mark Janssen wrote:
>> Thank you.  You may be seated.
>
> Ranting Rick, is that you?
>

I think that's unfair, rr can be very helpful when discussing IDLE type 
issues.  In comparison all that appears to have eminated from Tacoma, 
Washington is inaccurate nonsense.

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#57661

FromMark Janssen <dreamingforward@gmail.com>
Date2013-10-26 14:25 -0700
Message-ID<mailman.1608.1382822737.18130.python-list@python.org>
In reply to#57230
[Getting back to some old comments....]

>>> A language specification in BNF is just syntax. It doesn't say anything
>>> about semantics. So how could this be used to produce executable C code
>>> for a program? BNF is used to produce parsers. But a parser isn't
>>> sufficient.
>>
>> A C program is just syntax also.  How does the compiler generate
>> executable machine code?  Extrapolate into a Python front-end to C.
>
> Did you even read the paragraph you quoted above?  The BNF specification
> does NOT completely describe a language, it only defines its syntax.

Computer Science 301 (a.k.a. "educating the python brogrammers who've
been too long using interpreted languages"):

C source ("blah.c") is broken down into a linear sequence of tokens
fed into a parser.  The BNF definition for C takes those tokens/syntax
and produces a lexical graph of the source -- its grammatical form.
This becomes an abstract syntax *tree* because there is a "main"
function (without which I don't believe you can call a language
formally "Turing Complete" because one doesn't know where to begin to
feed the machine (wait for it.... boom)).  In any case, this *roots*
the abstract lexical graph and forms the basis for compiling into
machine code.

>  So
> if the only thing you knew about C was its BNF, you could certainly not
> write a C compiler.  And neither could anyone else.

Well, now you're confusing everybody, because you're asking, in
essence: "what is the meaning of a symbol to a computer?", and since
there isn't one, then you should wonder: "how are you going to get it
to 'do the right thing?'"  For that, you'll have to take Mark
Janssen's PHIL 444: "Epistemics of Quantity" (not offered from the
internet).

Now, please give credit to all the old-timers who paved the way for
all you to be partying in the easy-land of high-level languages like
Python.  It's them who made the computer SCIENCE.  You guys have been
so spoiled, you're taking it all for granted and confusing people with
all your claptrap about TYPES.  The insane cannot tell that they're
insane.  Remember that.

> Fortunately for the
> C community, the language specification included much more than a BNF
> grammar.  At a minimum, you have to specify both the syntax and the
> semantics.

I will look forward to how you will give a semantic specification for
the C token "{": left bracket.

Apologies will be accepted on the list.

Mark J

[toc] | [prev] | [next] | [standalone]


#57664

FromMark Janssen <dreamingforward@gmail.com>
Date2013-10-26 14:33 -0700
Message-ID<mailman.1610.1382823228.18130.python-list@python.org>
In reply to#57230
> Apologies will be accepted on the list.

BTW, I can't resist pointing out that you guys are like a cup already
full of (black) coffee -- too full to allow the pure water of clarity
to enter.

(cf. Buddhism)  .... .. (boom)

MarkJanssen
Tacoma, Washington

[toc] | [prev] | [next] | [standalone]


#57666

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-10-26 22:38 +0100
Message-ID<mailman.1612.1382823605.18130.python-list@python.org>
In reply to#57230
On 26/10/2013 22:33, Mark Janssen wrote:
>> Apologies will be accepted on the list.
>
> BTW, I can't resist pointing out that you guys are like a cup already
> full of (black) coffee -- too full to allow the pure water of clarity
> to enter.
>
> (cf. Buddhism)  .... .. (boom)
>
> MarkJanssen
> Tacoma, Washington
>

I took a look at your sourceforge page yesterday.  I found it extremely 
sad that you'd clearly taken so many contaminated batches over so many 
years.  Seriously.

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#57670

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2013-10-26 22:35 +0100
Message-ID<mailman.1615.1382823905.18130.python-list@python.org>
In reply to#57230
On 26/10/2013 22:25, Mark Janssen wrote:

Please give it a rest Mark, nobody is falling for your pseudo babel.

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

[toc] | [prev] | [next] | [standalone]


#57246

FromAntoine Pitrou <solipsis@pitrou.net>
Date2013-10-22 08:55 +0000
Message-ID<mailman.1344.1382432137.18130.python-list@python.org>
In reply to#57191
Philip Herron <herron.philip <at> googlemail.com> writes:
> 
> Its interesting a few things come up what about:
> 
> exec and eval. I didn't really have a good answer for this at my talk at
PYCon IE 2013 but i am going to say no. I am
> not going to implement these. Partly because eval and exec at least to me
are mostly from developing
> interpreters as a debugging exercise so the test doesn't have to invoke
the program properly and feed in
> strings to interpret at least thats what i have done in the past with an
virtual machine i wrote before gccpy.

If you don't implement exec() and eval() then people won't be able to use
namedtuples, which are a common datatype factory.

As for the rest: well, good luck writing an AOT compiler producing
interesting results on average *pure* Python code. It's already been tried
a number of times, and has generally failed. Cython mitigates the issue by
exposing a superset of Python (including type hints, etc.).

Regards

Antoine.

[toc] | [prev] | [next] | [standalone]


#57247

FromPhilip Herron <herron.philip@googlemail.com>
Date2013-10-22 02:08 -0700
Message-ID<f6e63d25-4fe1-45f9-a6e8-03278bb323d9@googlegroups.com>
In reply to#57246
On Tuesday, 22 October 2013 09:55:15 UTC+1, Antoine Pitrou  wrote:
> Philip Herron <herron.philip <at> googlemail.com> writes:
> 
> > 
> 
> > Its interesting a few things come up what about:
> 
> > 
> 
> > exec and eval. I didn't really have a good answer for this at my talk at
> 
> PYCon IE 2013 but i am going to say no. I am
> 
> > not going to implement these. Partly because eval and exec at least to me
> 
> are mostly from developing
> 
> > interpreters as a debugging exercise so the test doesn't have to invoke
> 
> the program properly and feed in
> 
> > strings to interpret at least thats what i have done in the past with an
> 
> virtual machine i wrote before gccpy.
> 
> 
> 
> If you don't implement exec() and eval() then people won't be able to use
> 
> namedtuples, which are a common datatype factory.
> 
> 
> 
> As for the rest: well, good luck writing an AOT compiler producing
> 
> interesting results on average *pure* Python code. It's already been tried
> 
> a number of times, and has generally failed. Cython mitigates the issue by
> 
> exposing a superset of Python (including type hints, etc.).
> 
> 
> 
> Regards
> 
> 
> 
> Antoine.
Thanks for that interesting example, i haven't looked into how its implemented but on initially looking at this is am nearly sure i can implement this without using exec or eval. I've found this a lot in implementing my run time. Exec and eval at least to me in the past I've used them as debug hooks into a toy virtual machine i wrote i don't particularly think they are part of a language nor should people really use them.

Thanks

[toc] | [prev] | [next] | [standalone]


#57250

FromSteven D'Aprano <steve+comp.lang.python@pearwood.info>
Date2013-10-22 10:10 +0000
Message-ID<52664f2a$0$29981$c3e8da3$5496439d@news.astraweb.com>
In reply to#57246
On Tue, 22 Oct 2013 08:55:15 +0000, Antoine Pitrou wrote:

> If you don't implement exec() and eval() then people won't be able to
> use namedtuples, which are a common datatype factory.


Philip could always supply his own implementation of namedtuple that 
doesn't use exec.

But either way, if he doesn't implement eval and exec, what he has is not 
Python, but a subset of Python. Perhaps an interesting and useful subset.

-- 
Steven

[toc] | [prev] | [next] | [standalone]


Page 6 of 7 — ← Prev page 1 2 3 4 5 [6] 7  Next page →

Back to top | Article view | comp.lang.python


csiph-web