[ANNOUNCE] SPARK 0.6

John Aycock aycock at csc.uvic.ca
Fri Apr 14 02:22:12 EDT 2000


This is the latest release of SPARK: the Scanning, Parsing, and Rewriting Kit.  
(It was formerly known as "the little language framework.")                     
                                                                                
SPARK features a collection of classes which can be used to implement           
little languages.  Mixing and matching components is possible; you don't        
have to use the entire collection of classes if you don't want to.              
                                                                                
New in release 0.6 (see CHANGES file for a complete list):

	-  Bug fixes.
	-  Parser speed improvements.  Depends on the grammar and input
		file, but I've seen between 8%-35% improvements on some
		of my standard tests.  (A minor code change is required;
		see the release notes.)

Old in release 0.6:

	-  Generic scanner class.                                               
        -  Generic parser class, which handles any context-free grammar.        
        -  Class to automatically construct parse trees or abstract             
                syntax trees.                                                   
        -  Class for traversing trees, useful for semantic checking and         
                code generation.                                                
        -  Class for tree pattern matching, good for code generation or         
                interpreter implementation.                                     
        -  100% pure Python.                                                    
                                                                                
Available at http://csr.uvic.ca/~aycock/python.                                 
                                                                                
John

From: "T Zimmerman" <tzman at bhmi.com>
Newsgroups: comp.lang.python
Subject: Help
Date: Fri, 7 Apr 2000 08:01:43 -0500
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Lines: 28
Message-ID: <38eddc38$0$17341 at wodc7nh6.news.uu.net>
NNTP-Posting-Host: 208.248.174.66
X-Trace: reader2.news.uu.net 955112504 17341 208.248.174.66
Path: news!uunet!ffx.uu.net!spool0.news.uu.net!reader2.news.uu.net!not-for-mail
Xref: news comp.lang.python:90831
To: python-list at python.org
Sender: python-list-admin at python.org
Errors-To: python-list-admin at python.org
X-BeenThere: python-list at python.org
X-Mailman-Version: 2.0beta3
Precedence: bulk
List-Id: General discussion list for the Python programming language <python-list.python.org>

I have left several posts concerning Tkinter Meta keys, and yet to get a
response from anyone. If this doesnt work for anyone else than it is a bug.
Otherwise there is something wrong on my end. The following script should
allow the use of 'alt-f' to access the 'File' menu. This does not work on
any of the NT boxes in my office. If this does or does not work for someone
please let me know.

Thanks,
T Zimmerman
tzman at bhmi.com


==================================================================
import Tkinter

root = Tkinter.Tk()

button = Tkinter.Menubutton(text = 'File', underline = 0)
button.pack()
menu = Tkinter.Menu(button)
button.configure(menu = menu)
menu.add_command(label = 'Hello World', underline = 0)

root.mainloop()
==================================================================




Return-Path: <cgw at buffalo.fnal.gov>
Delivered-To: python-list at python.org
Received: from buffalo.fnal.gov (buffalo.fnal.gov [131.225.84.156])
	by dinsdale.python.org (Postfix) with ESMTP id DE44E1CDCF
	for <python-list at python.org>; Tue,  4 Apr 2000 20:11:29 -0400 (EDT)
Received: (from cgw at localhost)
	by buffalo.fnal.gov (8.8.7/8.8.7) id TAA00970
	for python-list at python.org; Tue, 4 Apr 2000 19:13:54 -0500
Date: Tue, 4 Apr 2000 19:13:54 -0500
Resent-From: Charles G Waldman <cgw at fnal.gov>
Message-Id: <200004050013.TAA00970 at buffalo.fnal.gov>
Resent-Message-ID: <14570.34114.546452.113478 at buffalo.fnal.gov>
Resent-Date: Tue, 4 Apr 2000 19:13:54 -0500 (CDT)
Resent-To: python-list at python.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Charles G Waldman <cgw at fnal.gov>
To: python-users at python.org
Cc: Dennis E Hamilton <infonuovo at email.com>
Subject: Re: Why should I swich to Python? - Infinity of Primes
X-Mailer: VM 6.72 under 21.1 (patch 9) "Canyonlands" XEmacs Lucid
X-Face: %OO~XPb`a}(s2it:MIMa&Ig&fbz)+h$L,2js]u<DS^QQ0UGR'_Wps8,#>XlS*7R<nj`T(nz
 @}>#!#e{6W^.z~0blXY]guz at qdC;-s>BG`iu,HOP"j\nV_W)'})|,9C>&St4H"\l$&:V;8)"gsPRlH
 S6]sBPDb:f<,&ReiQS59nI;6P{w1kPMSR|`8L6EaC?SBb|ujr$V^C8A+G3Z#'>U.>
Resent-Sender: cgw at buffalo.fnal.gov
Sender: python-list-admin at python.org
Errors-To: python-list-admin at python.org
X-BeenThere: python-list at python.org
X-Mailman-Version: 2.0beta3
Precedence: bulk
List-Id: General discussion list for the Python programming language <python-list.python.org>


In article <NDBBKEGCNONMNKGDINPFGEJDDFAA.infonuovo at email.com>, "Dennis E.
Hamilton" <infonuovo at email.com> wrote:

> 
> It goes something like this (matching the one that was already posted
> for you):
> 
> 1.	Assume P is the largest prime.
> 
> 2.	Let Q be the product of all of the primes up to P: 2*3*5* ... *P
> 
> 3.	The number Q+1 is not divisible by any of the primes that divide Q
> (they
> each leave a remainder of 1).  Therefore Q+1 is a prime or there is some
> other prime, larger than P (i.e., not among 2, 3, 5, ..., P), that
> divides Q+1.  So P is not the largest prime.  QED.
> 
> This all stands on the fundamental theorem of arithmetic: that every
> integer number is a product of primes in exactly one way.  
> That is Exercise 1.2.4-21 in "The Art of Computer Programming, v.1

I'm pretty sure that this last statement is not correct.  You don't
need unique factorization here.  Euclid's proof does not require a
hypothesis of unique factorization into primes, just a well-ordering
of primes, and existence of division-with-remainder.

You appeal to the fact that when you divide A into (A*B)+1, you get a
remainder of 1.  That's enough to show that none of the primes in the
list 2,...,P divide Q=1+(2*3*5*7..*P).  

Since none of these primes divide Q, either Q is prime, or some other
prime not in the list 2,...,P divides Q, either of which options
contradicts the hypothesis that Q is the largest prime.  Where do you
need to make use of the fact that prime factorizations are unique?
Euclid's proof is self-contained and referencing Knuth for a proof of
unique factorization just muddies the waters.

Interestingly, there are some quadratic number fields (discrete
subsets of the complex numbers) which don't have unique factorization,
but still have infinitely many prime elements.




More information about the Python-list mailing list