Re: Why stay with lisp when there are python and perl?

2007-05-03 Thread Xah Lee
Nameless wrote: « Python has readable syntax, a huge library, and bindings for what seems like every major in linux. Perl has CPAN. It seems with those languages if you want to do something all you have to do is import functionality from a library someone had written and use that. In lisp you'd ha

Re: Erlang style processes for Python

2007-05-09 Thread Jacob Lee
s within a single process, though one can choose to use either tasklets or threads. My next goal is to figure out I/O, at which point I get to tackle the fun question of distribution. So far, I've not run into any cases where I've wanted to change the interpreter, though I'd be interested in hearing ideas in this direction (especially with PyPy as such a tantalizing platform!). -- Jacob Lee <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

ANN: parley 0.2

2007-05-10 Thread Jacob Lee
de samples, documentation, and source code can be found at the PARLEY home page: http://osl.cs.uiuc.edu/parley/ PARLEY is licensed under the LGPL. -- Jacob Lee <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: Erlang style processes for Python

2007-05-10 Thread Jacob Lee
only works with threads and doesn't communicate across processes. I definitely used Candygram as a reference point when determining what features to hoist from Erlang. -- Jacob Lee <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: Erlang style processes for Python

2007-05-10 Thread Jacob Lee
t;> to use either tasklets or threads. My next goal is to figure out I/O, at >> which point I get to tackle the fun question of distribution. >> >> So far, I've not run into any cases where I've wanted to change the >> interpreter, though I'd be intereste

The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-05-23 Thread Xah Lee
The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations Xah Lee, 2006-03-15 [This articles explains away the confusion of common terms for notation systems used in computer languages: prefix, infix, postfix, algebraic, functional. These notation's relation t

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-05-30 Thread Xah Lee
Prefix, Infix, Postfix notations in Mathematica 2000-02-21, 2007-05 [In the following essay, I discuss prefix, infix, postfix notations and Mathematica's syntax for them. The full HTML formatted article is available at: http://xahlee.org/UnixResource_dir/writ/notations.html ] THE HEAD OF EXPRESS

file reading by record separator (not line by line)

2007-05-31 Thread Lee Sander
d up to the next ">" many thanks Lee -- http://mail.python.org/mailman/listinfo/python-list

Re: file reading by record separator (not line by line)

2007-05-31 Thread Lee Sander
I wanted to also say that this file is really huge, so I cannot just do a read() and then split on ">" to get a record thanks lee On May 31, 1:26 pm, Lee Sander <[EMAIL PROTECTED]> wrote: > Dear all, > I would like toreada really hugefilethat looks like this: > > &g

Re: The Modernization of Emacs: keyboard shortcuts pain

2007-07-24 Thread Xah Lee
Why Emacs's Keyboard Shortcuts Are Painful Xah Lee, 2007-07 A important aspect in designing keyboard shortcuts is to have keyboard shortcuts for those most frequently used commands, and, the most frequently used commands should have most easily-pressed keystrokes. For example, they should

Re: curses/urwid simple menu

2007-07-27 Thread Lee Harr
> SGVsbG8uIENvdWxkIHlvdSBoZWxwIG1lLi4uSSBuZWVkIHRvIGNyZWF0ZSBhcHBsaWNhdGlvbiB3 > aXRoIHVyd2lkIG9yIGN1cnNlcwpzdXBwb3J0LiBIYXZlIHlvdSBnb3QgYSBwcmV0dHkgc2ltcGxl > IGV4YW1wbGUgd2l0aCBpdD8KCgotLSAKUG96ZHJhd2lhbSBMZXN6ZWsgTWm2Ck5vdGhpbmcgaXMg > c2VjdXJlLCBwYXJhbm9pYSBpcyB5b3VyIGZyaWVuZC4K >>> s = >>>

Re: The Modernization of Emacs: keyboard shortcuts pain

2007-08-04 Thread Xah Lee
The following article a extended version of previous post. A HTML version can be found at http://xahlee.org/emacs/emacs_kb_shortcuts_pain.html --- WHY EMACS'S KEYBOARD SHORTCUTS ARE PAINFUL Xah Lee, 2007-07 A important aspect in designing a keyboard shortcu

Something in the function tutorial confused me.

2007-08-05 Thread Lee Fleming
Hello, I have a simple question. Say you have the following function: def f(x, y = []): y.append(x) return y print f(23) # prints [23] print f(42) # prints [23, 42] As far as I understand, the default value y, an empty list, is created when the def statement evaluates. With this though

Re: Something in the function tutorial confused me.

2007-08-06 Thread Lee Fleming
On Aug 6, 6:25 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: Because when the function is called, the line > if y is None: y = [] is executed, binding a brand new empty list to y. This "rebinding" happens every time the function is called, unless you provide an argument for y that is not Non

Re: Something in the function tutorial confused me.

2007-08-06 Thread Lee Fleming
On Aug 6, 12:30 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote: > When you call f(23), the variable y within it gets created and points at > None. When f(23) exits, the y that it created gets destroyed. (Well, > goes out of scope, but even if it's not garbage collected it won't ever > come ba

Re: Something in the function tutorial confused me.

2007-08-06 Thread Lee Fleming
Thanks for all the help, everyone. I guess I was confused with default arguments that were mutable and immutable. I will continue to look over these posts until I understand what is happening. I cannot believe the number of helpful responses I got! -- http://mail.python.org/mailman/listinfo/pyth

Re: Something in the function tutorial confused me.

2007-08-06 Thread Lee Fleming
On Aug 6, 1:26 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Lee Fleming wrote: > > On Aug 6, 6:25 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > Because when the function is called, the line > > >> if y is None: y = [] > > > is exe

programmatically define a new variable on the fly

2007-08-09 Thread Lee Sander
to create a new variable called "Xg" whose length is 99. I tried eval("Xg=[0]*99") but that did not work. any help would be greatly appreciated Lee -- http://mail.python.org/mailman/listinfo/python-list

Re: The Modernization of Emacs: keyboard shortcuts pain

2007-08-11 Thread Xah Lee
The following is a FAQ from emacs modernization http://xahlee.org/emacs/modernization.html Q: Emacs's undo is superior, because the prevalent Undo/Redo system actually loss info. A: Emac's undo is very confusing and does not have a Redo command. To redo after a undo, people are told to type somet

Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-19 Thread Xah Lee
Dear computing comrades, Today, i'd like to show you a piece of literature written by a eminent mathematician Edsger W Dijkstra. Here's 2 interesting quote from his letter: “The prevaling attitude was reflected in the creation of two literary figures — admittedly of rather poor literature, but n

Re: Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-24 Thread Xah Lee
2007-08-24 Steve Holden wrote: «It's already well-established that there's no point flamingXahLee, as he's pretty much an output-only source. See any responses from him on this thread?» Hum? so you want to dance? FYI, i have made a second post to this thread. See: http://groups.google.com/group/

general function for sorting a matrix

2007-08-29 Thread Xah Lee
sorting a matrix (i.e. list of lists) is rather common. With this function, i can have a single interface to deal with any list (including list of lists). It is ideal, that a language's function for sort actually are of this generality. (See “What is Expressiveness in a Computer Language”, Xah Lee,

Re: Modul (%) in python not like in C?

2007-09-09 Thread Lee Harr
>> Python will always yield a number x = m%n such that 0 <= x < n, but >> Turbo C will always yield a number such that if x = m%n -x = -m%n. That >> is, since 111 % 10 = 1, -111 % 10 = -1. The two values will always >> differ by n (as used above). Maybe it is an order-of-operations thing...

Re: general function for sorting a matrix

2007-09-10 Thread Xah Lee
hi, just a quick reply. You are right, the python version i have is really terrible. I'll look at your solution and possibly reply later. Thanks for your code. It's great! Xah On Aug 29, 9:40 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Wed, 29 Aug 2007 08:47:27 -0700,XahLeewr

printing list containing unicode string

2007-09-10 Thread Xah Lee
If i have a nested list, where the atoms are unicode strings, e.g. # -*- coding: utf-8 -*- ttt=[[u"→",u"↑"], [u"αβγ"],...] print ttt how can i print it without getting the u'\u1234' notation? i.e. i want it print just like this: [[u"→"], ...] I can of course write a loop then for each string use

Re: printing list containing unicode string

2007-09-10 Thread Xah Lee
On Sep 10, 8:12 am, Carsten Haese <[EMAIL PROTECTED]> wrote: Xah Lee wrote: If i have a nested list, where the atoms are unicode strings, e.g. # -*- coding: utf-8 -*- ttt=[[u"→",u"↑"], [u"αβγ"],...] print ttt how can i print it without getting the u'\u

Re: printing list containing unicode string

2007-09-10 Thread Xah Lee
Google groups seems to be stripping my quotation markslately. Here's a retry to post my previous message. -- Xah Lee wrote: If i have a nested list, where the atoms are unicode strings, e.g. # -*- coding: utf-8 -*- tt

Re: encoding latin1 to utf-8

2007-09-10 Thread Xah Lee
On Sep 10, 5:25 am, Harshad Modi <[EMAIL PROTECTED]> wrote: > hello , > I make one function for encoding latin1 to utf-8. but i think it is > not work proper. > plz guide me. Hi, what you want is here, including complete code: Converting a File's "Character Set" / Encoding http://xahlee.org/perl

Re: printing list containing unicode string

2007-09-10 Thread Xah Lee
This post is about some notes and corrections to a online article regarding unicod and python. -- by happenstance i was reading: Unicode HOWTO http://www.amk.ca/python/howto/unicode Here's some problems i see: ・ No conspicuous authorship. (however, oddly, it has a conspicuous ackno

Re: printing list containing unicode string

2007-09-11 Thread Xah Lee
J. Cliff Dyer wrote: " ...UCS-2, for example, is a fixed width, 2-byte encoding that can handle any unicode code point up to 0x, but cannot handle the 3 and 4 byte extension sets. " I was going to reply to say that this is a good point. But on my way i looked up wikipedia, http://en.wikipedia

Re: need scsh in a wikip article

2007-09-11 Thread Xah Lee
On Sep 11, Xah Lee wrote: i was browsinghttp://en.wikipedia.org/wiki/Comparison_of_computer_shells quite fucking ridiculous that it contains Python shell and Ruby shell, and, there's no mentioning of scsh. Fuck the schemer morons. someone please add scsh there. -- 2007-

Re: Best place for a function?

2007-03-09 Thread Inyeol Lee
On Wed, Mar 07, 2007 at 05:27:04PM -0500, Sergio Correia wrote: > I'm writing a class, where one of the methods is kinda complex. The > method uses a function which I know for certain will not be used > anywhere else. This function does not require anything from self, only > the args passed by the

Re: Best place for a function?

2007-03-13 Thread Inyeol Lee
On Sun, Mar 11, 2007 at 06:36:02PM +0100, Bruno Desthuilliers wrote: > Inyeol Lee a �crit : > > On Wed, Mar 07, 2007 at 05:27:04PM -0500, Sergio Correia wrote: > > > >>I'm writing a class, where one of the methods is kinda complex. The > >>method uses a func

On Java's Interface (the meaning of interface in computer programing)

2007-03-20 Thread Xah Lee
On Java's Interface Xah Lee, 20050223 In Java the language, there's this a keyword “interface”. In a functional language, a function can be specified by its name and parameter specs. For example: f(3) f(3, [9,2]) f("some string") are usage examples of 3 functions all havin

What are OOP's Jargons and Complexities

2007-03-29 Thread Xah Lee
What are OOP's Jargons and Complexities Xah Lee, 20050128 Classes, Methods, Objects In computer languages, often a function definition looks like this: subroutine f (x1, x2, ...) { variables ... do this or that } In advanced languages such as LISP family, it is not uncommon to d

Requirements For A Visualization Software System For 2010

2007-04-03 Thread Xah Lee
REQUIREMENTS FOR A VISUALIZATION SOFTWARE SYSTEM FOR 2010 Xah Lee, 2007-03-16 In this essay, i give a list of requirements that i think is necessary for a software system for creating scientific visualization for the next decade (2007-2017). (for a HTML version with images, please see http

Re: How can I import functions from another python file

2007-04-09 Thread Lee Harr
On 2007-04-09, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > i have 2 python files in *different directory* , how can I import > python functions from 1 python file to another? > > i get this error: > import task > ImportError: No module named task/ > The directory that module is in must b

how to get char ASCII value.

2007-04-10 Thread veblen . lee
for an example: 'a' value 0x61 '1' value 0x31. -- http://mail.python.org/mailman/listinfo/python-list

is laziness a programer's virtue?

2007-04-15 Thread Xah Lee
Laziness, Perl, and Larry Wall Xah Lee, 20021124 In the unix community there's quite a large confusion and wishful thinking about the word laziness. In this post, i'd like to make some clarifications. American Heritage Dictionary third edition defines laziness as: “Resistant to work o

Re: is laziness a programer's virtue?

2007-04-15 Thread Xah Lee
Dear Ken, I want to thank you for your spirit in supporting and leading the lisp community, in spreading lisp the language both in what you have done technically as well as evangelization, as well as the love and knowledge attitude towards newsgroup communities in general, in part thru your numero

is laziness a programer's virtue?

2007-04-16 Thread Xah Lee
2007-03-29 Dear tech geekers, In a couple of posts in the past year i have crossed-posted (e.g. recently “What are OOP's Jargons and Complexities”, “is laziness a programer's virtue?”, “On Java's Interface (the meaning of interface in computer programing)” ), there are a some controversy, and lot

Limits on search length

2007-10-01 Thread Daryl Lee
f: lineNumber += 1 m = cpat.search(line) if m is not None: print fn, "(", lineNumber, ")", line f.close() -- Daryl Lee Open the Present -- it's a Gift! -- http://mail.python.org/mailman/listinfo/python-list

Elisp Tutorial: HTML Syntax Coloring Code Block

2007-10-17 Thread Xah Lee
Elisp Tutorial: HTML Syntax Coloring Code Block Xah Lee, 2007-10 This page shows a example of writing a emacs lisp function that process a block of text to syntax color it by HTML tags. If you don't know elisp, first take a gander at Emacs Lisp Basics. HTML version with color and links

Distributed RVS, Darcs, tech love

2007-10-19 Thread Xah Lee
When i first heard about distributed revision control system about 2 years ago, i heard of Darcs, which is written in Haskell. I was hugely excited, thinking about the functional programing i love, and the no- side effect pure system i idolize, and the technology of human animal i rapture in daily.

TeX pestilence (was Distributed RVS, Darcs, tech love)

2007-10-22 Thread Xah Lee
TeX, in my opinion, has done massive damage to the computing world. i have written on this variously in emails. No coherent argument, but the basic thoughts are here: http://xahlee.org/cmaci/notation/TeX_pestilence.html it's slightly repeatitous there. But i think i might summarize in gist the fe

emacs lisp as text processing language...

2007-10-29 Thread Xah Lee
Text Processing with Emacs Lisp Xah Lee, 2007-10-29 This page gives a outline of how to use emacs lisp to do text processing, using a specific real-world problem as example. If you don't know elisp, first take a gander at Emacs Lisp Basics. HTML version with links and colors is at:

Re: emacs lisp as text processing language...

2007-10-29 Thread Xah Lee
... continued from previous post. PS I'm cross-posting this post to perl and python groups because i find that it being a little know fact that emacs lisp's power in the area of text processing, are far beyond Perl (or Python). ... i worked as a professional perl programer since 1998. I started t

Re: capturing output of command line in an array

2007-10-31 Thread Lee Capps
node lines from gstat into the list? If so, os.popen should work for you. Or do you need to parse the lines and store them in, say dictionaries? Tuples? If you need to parse it, you could use module re, or even just string methods, depending on what you're trying to do . . . .

Re: Syntax coloring in Python interpreter

2007-11-01 Thread Lee Capps
n can do this: http://ipython.scipy.org/moin/ --- Lee Capps Technology Specialist CTE Resource Center [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: Xah's Edu Corner: Introduction to 3D Graphics Programing

2007-01-21 Thread Xah Lee
Xah Lee wrote in 2006-12-22: > Of Interest: > > Introduction to 3D Graphics Programing > http://xahlee.org/3d/index.html Folks, i have expanded my tutorial to several pages in the past nearly two months, and thank you very much for those who have given encouragement. I had plans to

Re: pdf to text

2007-01-25 Thread Lee Harr
> Perhaps I'm just using pdftotext wrong? Here's how I was using it: > > sout = os.popen('pdftotext "%s" - ' %f) If you are having trouble with popen (not unlikely) how about just writing to a temporary file and reading the text from there? I've used pdftotext several times in the past f

regex that is equivalent to perl's syntax

2007-11-12 Thread Lee Sander
\S{1,8}\.\S{0,3}/ which seeks to find all strings with 8 characters followed by a dot and then three more characters as in filename.txt Actually, i need to find a pattern such as ABCDXLMNO with the character X repeated 5 to 8 times. thanks lee -- http://mail.python.org/mailman/listinfo/python-list

Python's doc problems

2007-11-30 Thread Xah Lee
Every few months, i receive a hearty letter about how well people agree with my criticism of Python's docs. (see http://xahlee.org/perl-python/python_doc_index.html ) Here's one received this week: -- Hello, I landed on your website's comments about the Python doc

searching a value of a dict (each value is a list)

2007-12-09 Thread Seongsu Lee
Hi, I have a dictionary with million keys. Each value in the dictionary has a list with up to thousand integers. Follow is a simple example with 5 keys. dict = {1: [1, 2, 3, 4, 5], 2: [10, 11, 12], 90: [100, 101, 102, 103, 104, 105], 91: [20, 21, 22], 99: [15, 16, 17, 18,

Re: searching a value of a dict (each value is a list)

2007-12-09 Thread Seongsu Lee
On 12월10일, 오전1시23분, Seongsu Lee <[EMAIL PROTECTED]> wrote: > Hi, > > I have a dictionary with million keys. Each value in the > dictionary has a list with up to thousand integers. > Follow is a simple example with 5 keys. > > dict = {1: [1, 2, 3, 4, 5], >2: [10, 1

Re: searching a value of a dict (each value is a list)

2007-12-09 Thread Seongsu Lee
On 12월10일, 오전1시53분, Pablo Ziliani <[EMAIL PROTECTED]> wrote: > Seongsu Lee escribió: > > > Hi, > > > I have a dictionary with million keys. Each value in the > > dictionary has a list with up to thousand integers. > > (...) > > > I want to find out t

Re: searching a value of a dict (each value is a list)

2007-12-09 Thread Seongsu Lee
On 12월10일, 오전6시49분, Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote: > Seongsu Lee <[EMAIL PROTECTED]> wrote: > > Hi, > > > I have a dictionary with million keys. Each value in the > > dictionary has a list with up to thousand integers. > > Follow is a simpl

Re: searching a value of a dict (each value is a list)

2007-12-10 Thread Seongsu Lee
On 12월10일, 오후12시18분, Adonis Vargas <[EMAIL PROTECTED]> wrote: > Seongsu Lee wrote: > > Hi, > > > I have a dictionary with million keys. Each value in the > > dictionary has a list with up to thousand integers. > > Follow is a simple example with 5 keys. > &

Re:

2007-12-12 Thread Lee Capps
x in get_numbers(s)] See: http://docs.python.org/lib/module-re.html --- Lee Capps Technology Specialist CTE Resource Center [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Pythonic way to add method alias in subclass

2007-12-15 Thread Lee Harr
I thought of several ways to add another name for a method in a subclass ... #alias.py class Foo(object): def nod(self): print "nodding" class Bar(Foo): def __init__(self): self.agree = self.nod class Bar2(Foo): agree = Foo.nod class Bar3(Foo): def agree(self):

Generating Thumbnail Images of a Photo Gallery

2006-04-19 Thread Xah Lee
welcome. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ # -*- coding: utf-8 -*- # Python # © 2006-04 by Xah Lee, ∑ http://xahlee.org/, 2006-04 # Given a webite gallery of photos with hundreds of photos, i want to generate a thumbnail page so that viewers can get a bird's eye's v

Re: Generating Thumbnail Images of a Photo Gallery

2006-04-19 Thread Xah Lee
The Python code is archived at: http://xahlee.org/perl-python/tn_gen.html Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Xah Lee wrote: > The following is a program to generate thumbnail images for a website. > Useful, if you want to do that. > > It is used to generate the thumb

Xah's Edu Corner: Criticism vs Constructive Criticism

2006-04-25 Thread Xah Lee
Criticism versus Constructive Criticism Xah Lee, 2003-01 A lot intelligent people are rather confused about criticism, especially in our “free-speech” free-for-all internet age. When they say “constructive criticisms are welcome” they mostly mean “bitching and complaints not welcome”. Rarely do

Re: (was Re: Xah's Edu Corner: Criticism vs Constructive Criticism)

2006-04-26 Thread Xah Lee
Dear John Bokma, This is a public notice that what you are trying to do is getting close to harrassment from the law's perspective. Thanks. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ John Bokma wrote: > Eli Gottlieb <[EMAIL PROTECTED]> wrote: > > > Oh, God, not another one. > > Instead

Re: Xah's Edu Corner: What Languages to Hate

2006-04-27 Thread Xah Lee
What Languages to Hate Xah Lee, 20020718 Dear lisp comrades and other concerned parties, First, all languages have equal rights. Do not belittle other languages just because YOUR favorite language is a bit better in this aspect or that. Different people have different ideas and manners of

Re: Xah's Edu Corner: What Languages to Hate

2006-04-27 Thread Xah Lee
Addendum: Recently I ran into this egregious propaganda: http://www.ibiblio.org/pub/multimedia/video/obp/IntroducingPython.mpg folks, take a look. This is a significant part how things move in the computing community. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Xah Lee wrote: > W

A critic of Guido's blog on Python's lambda

2006-05-05 Thread Xah Lee
Python, Lambda, and Guido van Rossum Xah Lee, 2006-05-05 In this post, i'd like to deconstruct one of Guido's recent blog about lambda in Python. In Guido's blog written in 2006-02-10 at http://www.artima.com/weblogs/viewpost.jsp?thread=147358 is first of all, the title “Languag

algorithmic mathematical art

2006-05-07 Thread Xah Lee
i've long time been interested in algorithmic mathematical art. That is, mathematical or algorithmic visual art works that are generated by computer such that the program's source code reflects the algorithmic essence of the visual quality in the art work. (for detail, see Algorithmic Mathematical

Tabs versus Spaces in Source Code

2006-05-14 Thread Xah Lee
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about which is better. It has become what's known as “religious war” — a heated fight over trivi

taking qoutes in arguments

2006-05-15 Thread Lee Caine
hi all, Im new to python and am in need of a little help Im attempting to write a program that finds and replaces text in all files in a given directory. example of running the program with arguments >python far.py /home/lee/Documents/ find replace I have managed to get it all work

Re: taking qoutes in arguments

2006-05-16 Thread Lee Caine
yea thanks alot for your help, gonna read up on 'Konsole' :) -- http://mail.python.org/mailman/listinfo/python-list

Re: taking qoutes in arguments

2006-05-17 Thread Lee Caine
oh, well you learn somthing new everyday, thanks for that :) oh and i typed the command and got '/bin/bash', means nothing at the moment but im sure it will thanks for your help Lee. -- http://mail.python.org/mailman/listinfo/python-list

Software Needs Philosophers

2006-05-21 Thread Xah Lee
Software Needs Philosophers by Steve Yegge, 2006-04-15. Software needs philosophers. This thought has been nagging at me for a year now, and recently it's been growing like a tumor. One that plenty of folks on the 'net would love to see kill me. People don't put much stock in philosophers these

Re: Tabs versus Spaces in Source Code

2006-05-23 Thread Xah Lee
o replace all spaces to tabs. But also, many unix languages contains a so-called construct of “heredoc” as a mean to embed a literal block of text. For example, here's a PHP construct of heredoc: $novelText = <<http://xahlee.org/ Xah Lee wrote: > Tabs versus Spaces in Source Code >

John Bokma harassment

2006-05-24 Thread Xah Lee
I'm sorry to trouble everyone. But as you might know, due to my controversial writings and style, recently John Bokma lobbied people to complaint to my web hosting provider. After exchanging a few emails, my web hosting provider sent me a 30-day account cancellation notice last Friday. I'm not sur

Re: Looking for library to estimate likeness of two strings

2008-02-07 Thread Lee Capps
e same way in both tables >(especially the given names). I would like some function that would >help me make the best guess. > >Many thanks in advance! I used difflib.get_close_matches for something similar: http://docs.python.org/lib/module-difflib.html HTH. -- Lee Capps Tech

removing all instances of a certain value from a list

2008-03-19 Thread Lee Sander
Hi, I have a float array ( eg [-1.3, 1.22, 9.2, None, 2.3] ) but there are many missing vlaues which are represented as None. I would like to remove all such instances in one go. There is a remove function but it removes only the first instance, is there a delete/remove all function? thanks -- htt

slicing a list but in downward fashion

2008-03-19 Thread Lee Sander
hi, i have a list and i can get elements form it via slicing L[start:stop] but sometimes the start is > stop i.e. I want to go in the opposite direction,eg L[10:2], mattab lets you do L(10:-1:2) to achive this, is there a way to do this in python? thanks L -- http://mail.python.org/mailman/listin

Re: Is subprocess.Popen completely broken?

2008-03-27 Thread Lee Capps
tion > OSError: [Errno 2] No such file or directory > > I also tried explicitly referencing /usr/bin/ls. Same result. > What gives? > I see this behavior in both Python 2.4 and 2.5 on Solaris 10 and with > 2.6alpha on Mac OS X. > Try proc = subprocess.Popen(('ls',

Re: reading file to list

2009-01-17 Thread Xah Lee
comp.lang.lisp,comp.lang.scheme,comp.lang.functional,comp.lang.python,comp.lang.ruby Here's a interesting toy problem posted by Drew Krause to comp.lang.lisp: On Jan 16, 2:29 pm, Drew Krause wrote [paraphrased a bit]: OK, I want to create a nested list in Lisp (always of

Re: reading file to list

2009-01-17 Thread Xah Lee
On Jan 17, 9:16 am, Xah Lee wrote: > Here's a interesting toy problem posted by Drew Krause to > comp.lang.lisp: > ... The code in my previous elisp code got a bump. It should be: (defun read-lines (file) "Return a list of lines in FILE." (with-temp-buffer (i

Re: reading file to list

2009-01-17 Thread Xah Lee
On Jan 17, 9:34 am, Xah Lee wrote: > The code in my previous elisp code got a bump. It should be: > ... > • A Ruby Illustration of Lisp Problems > http://xahlee.org/UnixResource_dir/writ/lisp_problems_by_ruby.html Sorry again. More correction: (defun read-lines (file) "Retur

Re: reading file to list

2009-01-17 Thread Xah Lee
Xah Lee wrote: > • A Ruby Illustration of Lisp Problems > http://xahlee.org/UnixResource_dir/writ/lisp_problems_by_ruby.html On Jan 17, 12:30 pm, André Thieme wrote: > In the Lisp style Clojure for example one does exactly the same as > Jillian James (JJ) did in Ruby: > (m

Re: reading file to list

2009-01-17 Thread Xah Lee
a idiot wrote: > Yes, Jillian also has nested maps: the issue here, is not about whether Ruby has nested map or not. It is about illustrating a lisp problem. In particular, nested syntax impedes the functional programing paradigm of function chaining. • A Ruby Illustration of Lisp Problems ht

Re: reading file to list

2009-01-18 Thread Xah Lee
On Jan 17, 10:25 am, Tino Wildenhain wrote: > > [[int(x) for x in line.split()] for line in open("blob.txt")] Nice (python code). Few comments: • the above code is borderline of atypical. e.g. it is not a average python code would produce or one'd seen in corporate python code. • voodoo like t

Re: calling an external program and capturing the output

2009-01-18 Thread Xah Lee
On Jan 18, 8:41 am, Eric wrote: > Coming from a perl background I'm new to the Python world. I need to > read a list of values, send each value to an external program and > capture and act on the output of that program. Reading and parsing the > initial values is not a problem but I can't seem to

Re: reading file to list

2009-01-19 Thread Xah Lee
On Jan 19, 4:49 pm, "Rhodri James" wrote: > On Sun, 18 Jan 2009 08:31:15 -, Xah Lee wrote: > > On Jan 17, 10:25 am, Tino Wildenhain wrote: > >> > [[int(x) for x in line.split()] for line in open("blob.txt")] > > > Nice (python code). > &

Re: reading file to list

2009-01-20 Thread Xah Lee
On Jan 19, 11:17 pm, alex23 wrote: ... Hi Daniel Weinreb, Xah wrote: > • A Ruby Illustration of Lisp Problems > http://xahlee.org/UnixResource_dir/writ/lisp_problems_by_ruby.html Daniel Weinreb wrote: > Xah Lee: Elisp is an interesting choice. But without converting the > strings

Re: reading file to list

2009-01-20 Thread Xah Lee
Xah Lee wrote: > > consider code produced by corporations, as opposed to with respect to > > some academic or philsophical logical analysis. Looked in another way, > > consider if we can compile stat of all existing pyhton code used in > > real world, you'll find t

Re: reading file to list

2009-01-20 Thread Xah Lee
On Jan 20, 7:51 pm, Terry Reedy wrote: > Rhodri James wrote: > > Computer languages are not human languages, but computer language > > constructs do attempt to map onto human language constructs to > > provide some measure of comprehensibility. Where a construct like > > list comprehension maps v

Re: reading file to list

2009-01-21 Thread Xah Lee
Rhodri James wrote: > I recommend spending less time being certain that you are correct > without seeking evidence I don't concur. For instance, when you are talking to a bunch of kids, you have to be sure of yourself, else they run all over you, even if they didn't mean to be rude. Also, one's

Re: reading file to list

2009-01-21 Thread Xah Lee
Rhodri James wrote: > *plonk* Please see: • Killfile Considered Harmful http://xahlee.org/UnixResource_dir/writ/kill_file_harmful.html plain text version follows --- Killfile Considered Harmful Xah Lee, 2000-02-26 In newsgroups, killfile is a playful word mean

OCaml, Language syntax, and Proof Systems

2009-01-23 Thread Xah Lee
recently, as you might have noted by a previous post of mine, that American Mathematical Society published a series of articles on formal proofs in 2008 November. See: http://www.ams.org/notices/200811/ The articles are: • Formal Proof by Thomas Hales • Formal Proof — The Four-Color Theorem by G

Re: OCaml, Language syntax, and Proof Systems

2009-01-23 Thread Xah Lee
ok, i've been reading these Ocaml tutorials in the past few days: intro to ocaml, from official site http://caml.inria.fr/pub/docs/manual-ocaml/manual003.html “Objective CAML Tutorial”, most cited tutorial on the web http://www.ocaml-tutorial.org/ None of them are perfect, but much better than h

syntax color lang source code in blogs or website

2009-01-24 Thread Xah Lee
For those of you using emacs, here's the elisp code that allows you to syntax color computer language source code in your blog or website. http://xahlee.org/emacs/elisp_htmlize.html to comment, here: http://xahlee.blogspot.com/2009/01/dehtmlize-source-code-in-emacs-lisp.html Xah ∑ http://xahle

Re: OCaml, Language syntax, and Proof Systems

2009-01-24 Thread Xah Lee
Language, Purity, Cult, and Deception Xah Lee, 2009-01-24 [this essay is roughly a 10 years personal retrospect of some languages, in particular Scheme and Haskell.] I learned far more Ocaml in the past 2 days than the fucking 2 months i tried to learn Haskell, with 10 years of “I WANT TO

Re: OCaml, Language syntax, and Proof Systems

2009-01-24 Thread Xah Lee
Addendum: The above is not a terrible insight, but i suppose it should be useful for some application. Today, there's huge number of languages, each screaming ME! To name a few that are talked about by geekers, there's Arc, Clojure, Scalar, F#, Erlang, Ruby, Groovy, Python 3, Perl6. (for a big lis

Re: OCaml, Language syntax, and Proof Systems

2009-01-25 Thread Xah Lee
s.caltech.edu/courses/cs134/cs134b/book.pdf Thanks. Am still reading your chapter 1 yet. Will check those out later. Xah ∑ http://xahlee.org/ ☄ On Jan 23, 4:36 pm, Jon Harrop wrote: > Xah Lee wrote: > > ok, i've been reading these Ocaml tutorials in the past few days: > >

Function Application is not Currying

2009-01-28 Thread Xah Lee
Function Application is not Currying Xah Lee, 2009-01-28 In Jon Harrop's book Ocaml for Scientist at http://www.ffconsultancy.com/products/ocaml_for_scientists/chapter1.html It says: Currying A curried function is a function which returns a function as its result. LOL. Th

Re: programming by evolution?

2009-02-05 Thread Xah Lee
oftware used by lots of people? - On Feb 4, 10:36 pm, Xah Lee wrote: yes and no. The problem is that such opinion is not a scientific opinion. It can't be verified or denied. Any dynamic lang, such as Python, PHP, Ruby, Mathematica can be said the same thing. And, prob mor

<    3   4   5   6   7   8   9   10   11   12   >