Re: Interactive debugging

2006-06-25 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Hi, is there a way in python to place some sort of keyboard() type > statement which stops the script and puts you back at the console? see the third example on this page: http://effbot.org/librarybook/code.htm -- http://mail.python.org/mailman/listinfo/pytho

Re: list problem 4 newbie

2006-06-25 Thread vaibhav
Hi, if u check the id's of a and b lists and also its elements, you will obeserve that the id's of a and b have changed but id's of their elements have not changed. If you make a deep copy of the list a and then make your changes in that list, it shud work. this can be done using the copy module

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Anton van Straaten
John Thingstad wrote: > On Sun, 25 Jun 2006 20:11:22 +0200, Anton van Straaten > <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: ... >>> \sarcasm One step further, and somebody starts calling C a "latently >>> memory-safe language", because a real programmer "knows" that his code >>> i

Re: Python "sub-interpreter," security

2006-06-25 Thread jvvhie
faulkner wrote: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496746 > Thanks! I was searching everywhere but couldn't find the right terms, I guess. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Anton van Straaten
Chris Smith wrote: > What makes static type systems interesting is not the fact that these > logical processes of reasoning exist; it is the fact that they are > formalized with definite axioms and rules of inference, performed > entirely on the program before execution, and designed to be entir

Re: Python "sub-interpreter," security

2006-06-25 Thread faulkner
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496746 [EMAIL PROTECTED] wrote: > Hello, I am writing a pure-Python game engine that interprets the code > of game objects within the same process with the exec statement. My > main goal is to make as much power available as possible and exec

list problem 4 newbie

2006-06-25 Thread manstey
I can't figure out why my code is not working. I thought I had the list copied correctly: Here is my code: a=[[u'HF', []], [u')F', [u'75']], [u'RE', []], [u'C', []]] b=a[:] for index in reversed(range(0,len(a)-1)): if '75' in b[index][1]: b[index][1].remove('75') b[i

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread John Thingstad
On Sun, 25 Jun 2006 20:11:22 +0200, Anton van Straaten <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: In this context, the term "latently-typed language" refers to the language that a programmer experiences, not to the subset of that language which is all that we're typical

queue deadlock possibility

2006-06-25 Thread Michael Bayer
Hi - i was just going through this thread: http://mail.python.org/ pipermail/python-list/2006-April/336948.html , where it is suggested that the Lock instance used by Queue.Queue should be publically configurable. I have identified another situation where a Queue can be deadlocked, one whi

Python "sub-interpreter," security

2006-06-25 Thread jvvhie
Hello, I am writing a pure-Python game engine that interprets the code of game objects within the same process with the exec statement. My main goal is to make as much power available as possible and exec seems like the best way to do that. This is my "proof-of-concept" code(only 18 lines and some

Re: Pygame.draw challenge is over!

2006-06-25 Thread Richard Jones
spiffy wrote: > Congrats to Seth Yastrov for 'gravity.py' ... THE ONLY ONE THAT > WORKED! I did test that they all worked on my machine before putting them online... What issues are you having? What OS? What version of Python and PyGame? I've added this to the README.txt that comes with the files

Interactive debugging

2006-06-25 Thread 63q2o4i02
Hi, is there a way in python to place some sort of keyboard() type statement which stops the script and puts you back at the console? I'm looking for something like in matlab, where you place a keyboard() command (I think), then you're in debug mode in the console, and you type continue to re-ente

Re: Python is fun and useful (was: Python is fun (useless social thread) ; -))

2006-06-25 Thread Jane & Carl
> I believe the applicability of Python and related techniques to > process control, engineering programming, and so on, is vastly > under-appreciated. Conventional wisdom in these domains sees > Visual Basic, Visual C++, and Fortran as suitable vehicles. > You've seen how limiting this is. > > Fo

Re: Python database access

2006-06-25 Thread Serge Orlov
On 25 Jun 2006 21:19:18 -0700, arvind <[EMAIL PROTECTED]> wrote: > Hi all, > I am going to work on Python 2.4.3 and MSSQL database server on > Windows platform. > But I don't know how to make the connectivity or rather which module to > import. > I searched for the modules in the Python library, b

Python database access

2006-06-25 Thread arvind
Hi all, I am going to work on Python 2.4.3 and MSSQL database server on Windows platform. But I don't know how to make the connectivity or rather which module to import. I searched for the modules in the Python library, but I couldn't find which module to go for. Please help me out! -- http://ma

Re: languages with full unicode support

2006-06-25 Thread OMouse
> As far as i know, here's few other lang's status: > > C → No. I think C has the wchar type to handle larger values. And C++ has std::wstring. So really, the support is there. http://www.cl.cam.ac.uk/~mgk25/unicode.html#c I think the problem is that most C/C++ coders don't care about unicode su

Re: Pygame.draw challenge is over!

2006-06-25 Thread spiffy
On Mon, 26 Jun 2006 10:53:50 +1000, [EMAIL PROTECTED] wrote: >It was quite successful too! Download the submissions from the pyweek.org >site: > >http://media.pyweek.org/static/pgd-200606.zip > >Congratulations to all who participated! > > >Richard Congrats to Seth Yastrov for 'gravity.py' .

Re: Python in HTML

2006-06-25 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >Does anyone know of a way to embed python scripts into html, much like >you would javascript or php? I do not want to use this to connect to a >database, but rather for a functional script to be called when a user >clicks on a link to open a page. If you are running Win

Re: Absolute noob to Linux programming needs language choice help

2006-06-25 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Tim Roberts <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] (Cameron Laird) wrote: >> >>Tcl's maturity advantage is tiny--*maybe* two years. Both began at >>the end of the '80s. There've been close to two decades since to >>obscure any initial leads. > >The differen

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Matthias Blume
Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] writes: > > | think that it is too relevant for the discussion at hand. Moreover, > | Harper talks about a relative concept of "C-safety". > > Then, I believe you missed the entire point. > >First point: "safety" is a *per-langua

Re: popen2 question

2006-06-25 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, David Bear <[EMAIL PROTECTED]> wrote: >I'm using popen2 and getting an extra 1 at the end of my output. I didn't >see where this was explained in the docs so I clearly don't understand the >behavior. My code is simple. > >(input, output) = os.popen2('whackyperlprog

Re: HTTP server

2006-06-25 Thread Simon Forman
placid wrote: > Simon Forman wrote: ... > > The file was named test.cgi. I changed it too test.py and it worked > Awesome! Glad to hear it. ... > > Thanks for the help. I got it to work now. > You're welcome. I'm glad I could help you. :-D Peace, ~Simon -- http://mail.python.org/mailman

Pygame.draw challenge is over!

2006-06-25 Thread richard
It was quite successful too! Download the submissions from the pyweek.org site: http://media.pyweek.org/static/pgd-200606.zip Congratulations to all who participated! Richard -- Visit the PyWeek website: http://www.pyweek.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: HTTP server

2006-06-25 Thread placid
Simon Forman wrote: > placid wrote: > > Simon Forman wrote: > > > > ... > > > For what you're asking about you'd probably want to use the > > > CGIHTTPRequestHandler from the CGIHTTPServer module instead. Check out > > > http://docs.python.org/lib/module-CGIHTTPServer.html > > > > This is what i

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Chris Smith
Chris F Clark <[EMAIL PROTECTED]> wrote: > These informal systems, which may not prove what they claim to prove > are my concept of a "type system". Okay, that works. I'm not sure where it gets us, though, except for gaining you the right to use "type system" in a completely uninteresting sense

Re: Absolute noob to Linux programming needs language choice help

2006-06-25 Thread Tim Roberts
[EMAIL PROTECTED] (Cameron Laird) wrote: > >Tcl's maturity advantage is tiny--*maybe* two years. Both began at >the end of the '80s. There've been close to two decades since to >obscure any initial leads. The difference is more significant than that. Tcl started in 1987, but Python's history do

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Darren New
Gabriel Dos Reis wrote: > I would suggest you give more thoughts to the claims made in > http://www.seas.upenn.edu/~sweirich/types/archive/1999-2003/msg00298.html I'm not sure I understand this. Looking at "Example 2", where C is claimed to be "C-safe", he makes two points that I disagree with.

Re: String negative indices?

2006-06-25 Thread Filip Wasilewski
Steven D'Aprano wrote: > On Sat, 24 Jun 2006 05:36:17 -0700, Filip Wasilewski wrote: > > > Steven D'Aprano wrote: > >> On Fri, 23 Jun 2006 02:17:39 -0700, Filip Wasilewski wrote: > >> > >> > [EMAIL PROTECTED] wrote: > >> > > >> >> Logically, I should be able to enter x[-2:-0] to get the last and ne

Re: Eclipse IDE question

2006-06-25 Thread Fabio Zadrozny
On 6/25/06, Markus Wankus <[EMAIL PROTECTED]> wrote: On Sun, 25 Jun 2006 13:21:32 -0400, seerhut <[EMAIL PROTECTED]> wrote:> kilnhead wrote:>> I am trying to use eclipse for python development. Is it possible to >> run a python script without having to name/setup a configuration? Can>> eclipse be s

Re: Eclipse IDE question

2006-06-25 Thread Markus Wankus
On Sun, 25 Jun 2006 13:21:32 -0400, seerhut <[EMAIL PROTECTED]> wrote: > kilnhead wrote: >> I am trying to use eclipse for python development. Is it possible to >> run a python script without having to name/setup a configuration? Can >> eclipse be set up so that "run" loads the code into the inter

Re: Looking for Python code to obsfucate mailto links on web site

2006-06-25 Thread Dan Sommers
On Sun, 25 Jun 2006 21:10:31 +0100, Andrew McLean <[EMAIL PROTECTED]> wrote: > I'm looking at putting some e-mail contact addresses on a web site, > and wanted to make it difficult for spammers to harvest them. [ ... ] > Searching the web it looks like the best solution for me might be to > embe

Re: Python question

2006-06-25 Thread Erik Max Francis
Harry wrote: > It is nice to join the python group. Can someone please help me with > a python question? > I have the following object which is like a list of tuples > What command do I use to get the value corresponding to 'min'? > This object seems to be non-indexable > > > row= [('name', 'x

Re: languages with full unicode support

2006-06-25 Thread Oliver Bandel
こんいちわ Xah-Lee san ;-) Xah Lee wrote: > Languages with Full Unicode Support > > As far as i know, Java and JavaScript are languages with full, complete > unicode support. That is, they allow names to be defined using unicode. Can you explain what you mena with the names here? > (the JavaScri

Python question

2006-06-25 Thread Harry
Hi All, It is nice to join the python group. Can someone please help me with a python question? I have the following object which is like a list of tuples What command do I use to get the value corresponding to 'min'? This object seems to be non-indexable row= [('name', 'x1'), ('min', 15.449041

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread David Hopwood
Scott David Daniels wrote: > [EMAIL PROTECTED] wrote: > >> Huh? There is a huge, fundamental difference: namely whether a type >> system is sound or not. A soundness proof is obligatory for any serious >> type theory, and failure to establish it simply is a bug in the theory. > > So you claim Jav

Re: Mix-In Class Methods At Run-Time

2006-06-25 Thread digitalorganics
Okay, while I'd still like to know the answer(s) to my earlier question(s), I've mostly solved my problem thanks to bearophile and my own learning. An example: class Cat(object): def __init__(self): self.love = 0 def meow(self): print "meow" class Dog(object): def bark(

Re: array manipulation without for loops

2006-06-25 Thread Alex Martelli
Sheldon <[EMAIL PROTECTED]> wrote: > The following script (using your function) raised no exception so it > worked! Elegant Alex, thanx. > > res = equalize_arrays(msgtmp,ppstmp,255) # class > (ppstmp,msgtmp) = res.equalize() # class method > for i in range(int(main.xsize))

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Gabriel Dos Reis
[EMAIL PROTECTED] writes: | think that it is too relevant for the discussion at hand. Moreover, | Harper talks about a relative concept of "C-safety". Then, I believe you missed the entire point. First point: "safety" is a *per-language* property. Each language comes with its own notion o

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Gabriel Dos Reis
Joachim Durchholz <[EMAIL PROTECTED]> writes: [...] | (Yes, I'm being silly. But the point is very serious. Even with less | silly examples, whether a language or subset is "safe" entirely | depends on what you define to be "safe", and these definitions tend to | vary vastly across language commu

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Chris F Clark
Chris F Clark <[EMAIL PROTECTED]> (I) wrote: > Do you reject that there could be something more general than what a > type theorist discusses? Or do you reject calling such things a type? Chris Smith <[EMAIL PROTECTED]> wrote: > I think that the correspondence partly in the wrong direction to

Re: Mix-In Class Methods At Run-Time

2006-06-25 Thread digitalorganics
This looks excellent bearophile, but I'm having trouble understanding some things. Perhaps you can help wipe clean my ignorance. Firstly, I thought __classes__ was a read-only attribute? Secondly, what is a "dictproxy object" and why won't the following code work: class Cat: def meow(self):

Re: Program slowing down with greater memory use

2006-06-25 Thread Dieter Maurer
Dan Stromberg <[EMAIL PROTECTED]> writes on Thu, 22 Jun 2006 23:36:00 GMT: > I have two different python programs that are slowing down quite a bit as > their memory use goes up. I have seen this too with Zope. I do not know where it comes from -- maybe from degraded locality. Dieter -- http:/

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Chris Smith
George Neuner wrote: > >Undecidability can always be avoided by adding annotations, but of > >course that would be gross overkill in the case of index type widening. > > Just what sort of type annotation will convince a compiler that a > narrowing conversion which could produce an illegal value

Re: languages with full unicode support

2006-06-25 Thread Darren New
Xah Lee wrote: > If you know a lang that does full unicode support, please let me know. Tcl. You may have to modify the "source" command to get it to default to something other than the system encoding, but this is trivial in Tcl. -- Darren New / San Diego, CA, USA (PST) Native America

Looking for Python code to obsfucate mailto links on web site

2006-06-25 Thread Andrew McLean
I'm looking at putting some e-mail contact addresses on a web site, and wanted to make it difficult for spammers to harvest them. I found some Python code that I can call within my application. http://www.zapyon.de/spam-me-not/ It works exactly as expected. However, I am concerned that the tech

Re: Termination and type systems

2006-06-25 Thread Marshall
David Hopwood wrote: > Marshall wrote: > > David Hopwood wrote: > > > >>A type system that required an annotation on all subprograms that do not > >>provably terminate, OTOH, would not impact expressiveness at all, and would > >>be very useful. > > > > Interesting. I have always imagined doing this

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Darren New
Marshall wrote: > Also: has subtyping polymorphism or not, has parametric polymorphism or > not. And covariant or contravariant. -- Darren New / San Diego, CA, USA (PST) Native Americans used every part of the buffalo, including the wings. -- http://mail.python.org/mailman/listinfo

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread rossberg
Joachim Durchholz wrote: > > > but (Standard) ML surely has none. > > NLFFI? > > > Same with Haskell as defined by its spec. > > Um... I'm not 100% sure, but I dimly (mis?)remember having read that > UnsafePerformIO also offered some ways to circumvent the type system. Neither NLFFI nor unsafePe

Re: Python taught in schools?

2006-06-25 Thread Robert Hicks
BartlebyScrivener wrote: > dan>> but out of curiousity does > dan>> anyone know of a school that teaches Python? > > http://www.python.org/about/quotes/ > > University of Maryland > > "I have the students learn Python in our undergraduate and graduate > Semantic Web courses. Why? Because basically

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread George Neuner
On Sun, 25 Jun 2006 13:42:45 +0200, Joachim Durchholz <[EMAIL PROTECTED]> wrote: >George Neuner schrieb: >> The point is really that the checks that prevent these things must be >> performed at runtime and can't be prevented by any practical type >> analysis performed at compile time. I'm not a t

Re: Life + Python = Golly

2006-06-25 Thread Michel Claveau
Cool ! Thanks ! -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: languages with full unicode support

2006-06-25 Thread Mumia W.
Xah Lee wrote: > Languages with Full Unicode Support > > As far as i know, Java and JavaScript are languages with full, complete > unicode support. That is, they allow names to be defined using unicode. > (the JavaScript engine used by FireFox support this) > > As far as i know, here's few other

Re: PEP thought experiment: Unix style exec for function/method calls

2006-06-25 Thread Carl Banks
Michael wrote: > Suppose we could do the same for a python function - suppose we could > call the python function but either /without/ creating a new stack > frame or /replacing/ the current stack frame with the new one. I'm confused about what you mean. I'm guessing by "not creating a new stack

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Andrew McDonagh
Chris Smith wrote: > Andrew McDonagh <[EMAIL PROTECTED]> wrote: >> I haven't read all of this thread, I wonder, is the problem to do with >> Class being mistaken for Type? (which is usually the issue) > > Hi Andrew! Hi Chris > > Not much of this thread has to do with object oriented languages.

Re: array manipulation without for loops

2006-06-25 Thread Sheldon
The following script (using your function) raised no exception so it worked! Elegant Alex, thanx. res = equalize_arrays(msgtmp,ppstmp,255) # class (ppstmp,msgtmp) = res.equalize() # class method for i in range(int(main.xsize)): for j in range(int(main.ysize)

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Chris Smith
Andrew McDonagh <[EMAIL PROTECTED]> wrote: > I haven't read all of this thread, I wonder, is the problem to do with > Class being mistaken for Type? (which is usually the issue) Hi Andrew! Not much of this thread has to do with object oriented languages... so the word "class" would be a little

What technologies should I use for my application manager?

2006-06-25 Thread MrBlueSky
Hello! I've just finished working on my first Python app (a Tkinter-based program that displays the content of our application log files in graphical format). It was a great experience that's had a very positive response from my colleagues. So I'd like to try something different for my second P

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Marshall
Chris F Clark wrote: > Chris F Clark (I) wrote: > > > I'm particularly interested if something unsound (and perhaps > > ambiguous) could be called a type system. I definitely consider such > > things type systems. > > "Marshall" <[EMAIL PROTECTED]> wrote: > > > I don't understand. You are saying y

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Andrew McDonagh
Joachim Durchholz wrote: > Chris Smith schrieb: >> Joachim Durchholz <[EMAIL PROTECTED]> wrote: >>> Sorry, I have to insist that it's not me who's stretching terms here. >>> >>> All textbook definitions that I have seen define a type as the >>> set/operations/axioms triple I mentioned above. >>> N

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Chris Smith
Joachim Durchholz <[EMAIL PROTECTED]> wrote: > > The immutability comes from the fact (perhaps implicit in these > > textbooks, or perhaps they are not really texts on formal type theory) > > that types are assigned to expressions, > > That doesn't *define* what's a type or what isn't! > I'm s

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Anton van Straaten
[EMAIL PROTECTED] wrote: >>>In this context, the term "latently-typed language" refers to the >>>language that a programmer experiences, not to the subset of that >>>language which is all that we're typically able to formally define. > > > That language is not a subset, if at all, it's the other

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Joachim Durchholz
Pascal Costanza schrieb: >> Another observation: type safeness is more of a spectrum than a >> clearcut distinction. Even ML and Pascal have ways to circumvent the >> type system, and even C is typesafe unless you use unsafe constructs. >> IOW from a type-theoretic point of view, there is no real

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Joachim Durchholz
[EMAIL PROTECTED] schrieb: > Gabriel Dos Reis wrote: >> | >> | (Unfortunately, you can hardly write interesting programs in any safe >> | subset of C.) >> >> Fortunately, some people do, as living job. > > I don't think so. Maybe the question is what a "safe subset" consists > of. In my book, it e

USA UK CANADA AUSTRALIA Jobs With VISA Sponsorship, USA VISA, UK VISA, CANADA VISA, AUSTRALIA VISA , immigration, VISA Sponsorship

2006-06-25 Thread faisjobs
USA UK CANADA AUSTRALIA Jobs With VISA Sponsorship, USA VISA,UK VISA, CANADA VISA, AUSTRALIA VISA , immigration, VISA Sponsorship click here http://visajobs2u.50webs.com/ =

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread rossberg
Scott David Daniels wrote: > [EMAIL PROTECTED] wrote: > > Huh? There is a huge, fundamental difference: namely whether a type > > system is sound or not. A soundness proof is obligatory for any serious > > type theory, and failure to establish it simply is a bug in the theory. > > So you claim Java

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Joachim Durchholz
[EMAIL PROTECTED] schrieb: > Joachim Durchholz write: >> Another observation: type safeness is more of a spectrum than a clearcut >> distinction. Even ML and Pascal have ways to circumvent the type system, > > No. I'm not sure about Pascal, You'd have to use an untagged union type. It's the stand

Re: sum fonction in gadfly

2006-06-25 Thread Scott David Daniels
jean-jeanot wrote: > Thank you for your help. You're welcome. > It could be useful for me to change of DB ? Which one ? Postgresql or > another ? Well, if gadfly is serving you well, you might as well stay with it. Python 2.5 comes with sqlite3, which might well be a nice small step. I find Postg

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread rossberg
Gabriel Dos Reis wrote: > [EMAIL PROTECTED] writes: > > | Gabriel Dos Reis wrote: > | > | > | > | (Unfortunately, you can hardly write interesting programs in any safe > | > | subset of C.) > | > > | > Fortunately, some people do, as living job. > | > | I don't think so. Maybe the question is what

Re: array manipulation without for loops

2006-06-25 Thread Sheldon
Hi Alex, I will code this in a little while and get back to you. Terrific! I saw this function but I skipped over it without realizing what it could do. The Numeric doc is not very good and I am just getting into Python so your book sounds great especially since it covers Numeric. I will look int

USA UK CANADA AUSTRALIA Jobs With VISA Sponsorship, VISA immigration, VISA Sponsorship

2006-06-25 Thread faisjobs
USA UK CANADA AUSTRALIA Jobs click here http://visajobs2u.50webs.com/ IT Jobs, Medical Jobs, Marketing Jobs, Engineering Jobs, Call Center Jobs, HRM Jobs, Administrative Jobs, Customer-related Jobs, Non Customer-related Jobs, and many more. Career Opportunities, Vacancies, Hiring, Job Fairs, Recr

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Joachim Durchholz
Chris Smith schrieb: > Joachim Durchholz <[EMAIL PROTECTED]> wrote: >> Sorry, I have to insist that it's not me who's stretching terms here. >> >> All textbook definitions that I have seen define a type as the >> set/operations/axioms triple I mentioned above. >> No mention of immutability, at lea

Re: Saying "latently-typed language" is making a category mistake

2006-06-25 Thread Chris Smith
Chris Uppal wrote: > It seems to me that most (all ? by definition ??) kinds of reasoning where > we > want to invoke the word "type" tend to have a form where we reduce values (and > other things we want to reason about) to equivalence classes[*] w.r.t the > judgements we wish to make, and (usu

Re: array manipulation without for loops

2006-06-25 Thread Alex Martelli
Tim Chase <[EMAIL PROTECTED]> wrote: ... > >>> all = [(x==255 or y==255) and (255, 255) or (x,y) for (x,y) > in itertools.izip(a1,a2)] > >>> b1 = [x[0] for x in all] > >>> b2 = [x[1] for x in all] > >>> a1, a2 = b1, b2 # if you want them to replace the originals > > Seems to do what I unde

Re: array manipulation without for loops

2006-06-25 Thread Alex Martelli
Sheldon <[EMAIL PROTECTED]> wrote: > Alex, > > I am using Numeric and have created 3 arrays: zero((1215,1215),Float) > Two arrays are compared and one is used to hold the mean difference > between the two compared arrays. Then I compare 290 or 340 pairs of > arrays. I know that memory is a proble

Re: Eclipse IDE question

2006-06-25 Thread seerhut
kilnhead wrote: > I am trying to use eclipse for python development. Is it possible to > run a python script without having to name/setup a configuration? Can > eclipse be set up so that "run" loads the code into the interpreter and > goes? I don't want to create a new run config every time I want

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread J�rgen Exner
Scott David Daniels wrote: > [EMAIL PROTECTED] wrote: >> Huh? There is a huge, fundamental difference: namely whether a type >> system is sound or not. A soundness proof is obligatory for any >> serious type theory, and failure to establish it simply is a bug in >> the theory. > > So you claim Java

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Chris Smith
Anton van Straaten <[EMAIL PROTECTED]> wrote: > The problem is that there are no useful sound definitions for the type > systems (in the static sense) of dynamically-typed languages. Yet, we > work with type-like static properties in those languages all the time, > as I've been describing. I h

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Marshall
Joachim Durchholz wrote: > Anton van Straaten schrieb: > >> It seems we have languages: > >> with or without static analysis > >> with or without runtime type information (RTTI or "tags") > >> with or without (runtime) safety > >> with or without explicit type annotations > >> with or without type

Re: Python taught in schools?

2006-06-25 Thread diffuser78
I replied to a wrong post. My bad.I know for sure that there is some kinda Python Club at UCF Orlando. There is Prof called Michael Johnson who teaches Physics gives you an intro to Python. http://www.physics.ucf.edu/~mdj/MinimalPython.html Good Luck -- http://mail.python.org/mailman/listin

Re: Python taught in schools?

2006-06-25 Thread diffuser78
I think there is a Python club at UCF, Orlandomight help you indirectly. MilkmanDan wrote: > I'll be a college freshman this fall, attending Florida Institute of > Tech studying electrical engineering. > > I was considering taking some classes in programming and computer > science, and I happe

Re: error with string (beginner)

2006-06-25 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Alex Pavluck <[EMAIL PROTECTED]> wrote: >Hello. I get the following error with the following code. Is there >something wrong with my Python installation? > >code: >import types >something = input("Enter something and I will tell you the type: ") > >if type(something

Re: array manipulation without for loops

2006-06-25 Thread Tim Chase
> I have two arrays that are of the same dimension but having 3 different > values: 255, 1 or 2. > I would like to set all the positions in both arrays having 255 to be > equal, i.e., where one array has 255, I set the same elements in the > other array to 255 and visa versa. Does anyone know how t

Re: array manipulation without for loops

2006-06-25 Thread Sheldon
Alex, I am using Numeric and have created 3 arrays: zero((1215,1215),Float) Two arrays are compared and one is used to hold the mean difference between the two compared arrays. Then I compare 290 or 340 pairs of arrays. I know that memory is a problem and that is why I don't open all of these arra

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > Huh? There is a huge, fundamental difference: namely whether a type > system is sound or not. A soundness proof is obligatory for any serious > type theory, and failure to establish it simply is a bug in the theory. So you claim Java and Objective C are "simply bugs in t

Re: array manipulation without for loops

2006-06-25 Thread Gary Herron
Sheldon wrote: > Hi Gary, > > I am really trying to cut the time down as I have 600+ arrays with > dimensions (1215,1215) to compare and I do a lot more things with the > arrays. If I understand you correctly, there is no way around a for > loop? > Well no. I gave you two alternatives to for loo

Re: array manipulation without for loops

2006-06-25 Thread Alex Martelli
Sheldon <[EMAIL PROTECTED]> wrote: > Hi Gary, > > I am really trying to cut the time down as I have 600+ arrays with > dimensions (1215,1215) to compare and I do a lot more things with the > arrays. If I understand you correctly, there is no way around a for > loop? In pure Python (w/o extension

Re: array manipulation without for loops

2006-06-25 Thread Alex Martelli
Sheldon <[EMAIL PROTECTED]> wrote: > I have two arrays that are of the same dimension but having 3 different > values: 255, 1 or 2. > I would like to set all the positions in both arrays having 255 to be > equal, i.e., where one array has 255, I set the same elements in the > other array to 255 an

Re: HTTP server

2006-06-25 Thread Simon Forman
placid wrote: > Simon Forman wrote: > > ... > > For what you're asking about you'd probably want to use the > > CGIHTTPRequestHandler from the CGIHTTPServer module instead. Check out > > http://docs.python.org/lib/module-CGIHTTPServer.html > > This is what i was after, thanks for the tip. > You'r

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Gabriel Dos Reis
[EMAIL PROTECTED] writes: | Gabriel Dos Reis wrote: | > | | > | (Unfortunately, you can hardly write interesting programs in any safe | > | subset of C.) | > | > Fortunately, some people do, as living job. | | I don't think so. Maybe the question is what a "safe subset" consists | of. In my book,

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Chris Smith
Joachim Durchholz <[EMAIL PROTECTED]> wrote: > Sorry, I have to insist that it's not me who's stretching terms here. > > All textbook definitions that I have seen define a type as the > set/operations/axioms triple I mentioned above. > No mention of immutability, at least not in the definitions.

Re: array manipulation without for loops

2006-06-25 Thread Sheldon
Hi Gary, I am really trying to cut the time down as I have 600+ arrays with dimensions (1215,1215) to compare and I do a lot more things with the arrays. If I understand you correctly, there is no way around a for loop? /Sheldon Gary Herron wrote: > Sheldon wrote: > > Hi, > > > > I have two ar

Re: languages with full unicode support

2006-06-25 Thread Frank Buss
Xah Lee wrote: > Lisps → No. The Common Lisp spec (CLHS) doesn't require that implementations support Unicode characters, but it doesn't forbid it and some implementations support it, e.g. http://clisp.cons.org/impnotes.html -- Frank Buss, [EMAIL PROTECTED] http://www.frank-buss.de, http://www.

Re: Python taught in schools?

2006-06-25 Thread David Reed
> > MilkmanDan wrote: >> I'll be a college freshman this fall, attending Florida Institute of >> Tech studying electrical engineering. >> >> I was considering taking some classes in programming and computer >> science, and I happened to notice that everything taught is using C >> ++. >> After furt

Re: Python taught in schools?

2006-06-25 Thread Alex Martelli
MilkmanDan <[EMAIL PROTECTED]> wrote: > I'll be a college freshman this fall, attending Florida Institute of > Tech studying electrical engineering. > > I was considering taking some classes in programming and computer > science, and I happened to notice that everything taught is using C++. > Aft

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread Chris F Clark
Chris F Clark (I) wrote: > I'm particularly interested if something unsound (and perhaps > ambiguous) could be called a type system. I definitely consider such > things type systems. "Marshall" <[EMAIL PROTECTED]> wrote: > I don't understand. You are saying you prefer to investigate the > unsou

Re: What is Expressiveness in a Computer Language

2006-06-25 Thread rossberg
Gabriel Dos Reis wrote: > | > | (Unfortunately, you can hardly write interesting programs in any safe > | subset of C.) > > Fortunately, some people do, as living job. I don't think so. Maybe the question is what a "safe subset" consists of. In my book, it excludes all features that are potentiall

Re: array manipulation without for loops

2006-06-25 Thread Gary Herron
Sheldon wrote: > Hi, > > I have two arrays that are of the same dimension but having 3 different > values: 255, 1 or 2. > I would like to set all the positions in both arrays having 255 to be > equal, i.e., where one array has 255, I set the same elements in the > other array to 255 and visa versa.

languages with full unicode support

2006-06-25 Thread Xah Lee
Languages with Full Unicode Support As far as i know, Java and JavaScript are languages with full, complete unicode support. That is, they allow names to be defined using unicode. (the JavaScript engine used by FireFox support this) As far as i know, here's few other lang's status: C → No. Pytho

array manipulation without for loops

2006-06-25 Thread Sheldon
Hi, I have two arrays that are of the same dimension but having 3 different values: 255, 1 or 2. I would like to set all the positions in both arrays having 255 to be equal, i.e., where one array has 255, I set the same elements in the other array to 255 and visa versa. Does anyone know how to do

Re: Saying "latently-typed language" is making a category mistake

2006-06-25 Thread David Hopwood
Matthias Blume wrote: > David Hopwood <[EMAIL PROTECTED]> writes: >>Patricia Shanahan wrote: >>>Vesa Karvonen wrote: >>>... >>> An example of a form of informal reasoning that (practically) every programmer does daily is termination analysis. [...] Given a program, it may be possible t

  1   2   >