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

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 view images

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 thumbnails for my

A Lambda Logo Tour

2006-04-05 Thread Xah Lee
A Lambda Logo Tour (and why LISP languages using λ as logo should not be looked upon kindly) Xah Lee, 2002-02 Dear lispers, The lambda character λ, always struck a awe in me, as with other mathematical symbols. In my mind, i imagine that those obscure math symbolism are etched in stone by god

Python has a new Logo

2006-03-23 Thread Xah Lee
Python has a new logo! See http://python.org/ And it is a fantastic logo. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python has a new Logo

2006-03-23 Thread Xah Lee
is there larger versions of the logo? and, any usage restrictions? i also like to find out the the artist name. Any pointer is appreciated. Thanks. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Felipe Almeida Lessa wrote: Em Qui, 2006-03-23 às 07:43 -0800, Xah Lee escreveu: Python has

Re: Xah's Edu Corner: What is Expressiveness in a Computer Language

2006-03-19 Thread Xah Lee
What is Expressiveness in a Computer Language Xah Lee, 200502, 200603. In languages human or computer, there's a notion of expressiveness. English for example, is very expressive in manifestation, witness all the poetry and implications and allusions and connotations and dictions

Re: Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations

2006-03-16 Thread Xah Lee
Xah Lee wrote: « The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations http://xahlee.org/UnixResource_dir/writ/notations.html » A side note: the terminology “Algebraic” Notation is a misnomer. It seems to imply that such notations have something to do

Xah's Edu Corner: The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations

2006-03-15 Thread Xah Lee
The Concepts and Confusions of Pre-fix, In-fix, Post-fix and Fully Functional Notations Xah Lee, 2006-03-15 Let me summarize: The LISP notation, is a functional notation, and is not a so-called pre-fix notation or algebraic notation. Algebraic notations have the concept of operators, meaning

license preamble template

2006-03-04 Thread Xah Lee
I noticed, that in just about all emacs programs on the web (elisp code), it comes with this template text as its preamble: ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software

HTML/DOM parser

2006-02-28 Thread Xah Lee
is there a module that lets me parse validated html files and store it as a tree? for example, i want to be able to easily, say, replace the following hrpReferences/p pre • a href=aa.../a ... /pre to hrpReferences/p ul lia href=aa.../a/li ... /ul Thanks. Xah [EMAIL PROTECTED] ∑

Xah's Edu Corner: accountability lying thru the teeth

2006-02-14 Thread Xah Lee
here's a site: http://www.longbets.org/bets that takes socially important predictions. I might have to enter one or two. i longed for such a accountable predictions for a long time. Usually, some fucking fart will do predictions, but the problem is that it's not accountable. So, lots fuckhead

Xah's Edu Corner: Unix damage: color names

2006-02-07 Thread Xah Lee
http://en.wikipedia.org/wiki/X11_color_names excerpt: « In computing, on the X Window System, X11 color names are represented in a simple text file, which maps certain strings to RGB color values. It is shipped with every X11 installation, hence the name, and is usually located in

Xah's Edu Corner: IT Industry Predicament

2006-01-20 Thread Xah Lee
IT Industry Predicament Xah Lee, 200207 As most of you agree, there are incredible wrongs in software industry. Programs crash, injurious tools, uninformed programers, and decrepit education system. Over the years of my computing industry experience since 1995, i have recently gradually come

Xah's Edu Corner: the bug-reporting attitude

2006-01-02 Thread Xah Lee
The Bug-Reporting Attitude Xah Lee, 2005-02, 2006-01 People, There is a common behavior among people in software geek forums, that whenever a software is crashing or behaving badly, they respond by “go file a bug report” as if it is the duty of software consumers. When a software is ostensibly

Xah's Edu Corner: Tech Geekers and their Style

2005-12-30 Thread Xah Lee
, necessary, functional layout feature as multi-columns is not there yet. This is a indication of the fatuousness of the IT industry's technologies and its people. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- Xah Lee wrote: sometimes in the last few months

Xah's Edu Corner: Tech Geekers and their Style

2005-12-30 Thread Xah Lee
, necessary, functional layout feature as multi-columns is not there yet. This is a indication of the fatuousness of the IT industry's technologies and its people. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- Xah Lee wrote: sometimes in the last few months

Re: PHP = Perl Improved

2005-12-27 Thread Xah Lee
«use bytes; # Larry can take Unicode and shove it up his ass sideways. # Perl 5.8.0 causes us to start getting incomprehensible # errors about UTF-8 all over the place without this.» From: the source code of WebCollage (1998) http://www.jwz.org/webcollage/ by Jamie W.

Re: Microsoft's JavaScript doc's newfangled problem

2005-12-27 Thread Xah Lee
://xahlee.org/ -- Xah Lee wrote: sometimes in the last few months, apparently Microsoft made changes to their JavaScript documentation website: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/scri... so that, one has to goddamn press the expand

Microsoft's JavaScript doc's newfangled problem

2005-12-24 Thread Xah Lee
sometimes in the last few months, apparently Microsoft made changes to their JavaScript documentation website: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/1e9b3876-3d38-4fd8-8596-1bbfe2330aa9.asp so that, one has to goddamn press the expand button to view the

Xah's Edu Corner: Responsible Software Licensing

2005-12-23 Thread Xah Lee
Responsible Software Licensing Free Software Foundation Xah Lee, 2005-07 Dear Programers, I have always respected the Free Software Foundation (FSF) and its community. when i wrote the article a couple years ago on Responsible Software Licensing, i thought it might not be welcomed by the free

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-16 Thread Xah Lee
Responsible Software Licensing Xah Lee, 200307 Software is a interesting invention. Software has this interesting property, that it can be duplicated without cost, as if like copying money. Never in history are goods duplicable without cost. But with the invention of computer, the ephemeral non

PHP = Perl Improved

2005-12-09 Thread Xah Lee
recently i got a project that involves the use of php. In 2 days, i read almost the entirety of the php doc. Finding it a breeze because it is roughly based on Perl, of which i have mastery. i felt a sensation of neatness, as if php = Perl Improved, for a dedicated job of server-side scripting.

Post-modernism, Academia, and the Tech Geeking fuckheads

2005-12-08 Thread Xah Lee
Post-modernism, Academia, and the Tech Geeking fuckheads • the Sokal Affair http://en.wikipedia.org/wiki/Sokal_Affair • SCIGen and World Multi-Conference on Systemics, Cybernetics and Informatics   http://pdos.csail.mit.edu/scigen/ • What are OOP's Jargons and Complexities, Xah Lee http

Xah's Edu Corner: Examples of Quality Technical Writing

2005-12-05 Thread Xah Lee
i had the pleasure to read the PHP's manual today. http://www.php.net/manual/en/ although Pretty Home Page is another criminal hack of the unix lineage, but if we are here to judge the quality of its documentation, it is a impeccability. it has or possesses properties of: • To the point and

Xah's Edu Corner: Sophie's World

2005-11-24 Thread Xah Lee
Recommended: Sophie's World, by Jostein Gaarder, 1995. http://en.wikipedia.org/wiki/Sophie%27s_World http://www.amazon.com/gp/product/0425152251/ Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting Documentation

2005-11-08 Thread Xah Lee
[EMAIL PROTECTED] wrote: «I want to read a little bit about sorting in Python (sorted() and method sort()). But I can't seem to find anything in the documentation at the homepage?» if you want some detailed account on the sort method, see: http://www.xahlee.org/perl-python/sort_list.html Xah

Re: Python doc problem example: gzip module (reprise)

2005-11-08 Thread Xah Lee
Newsgroups: comp.lang.perl.misc From: Veli-Pekka Tätilä Date: Sat, 5 Nov 2005 17:25:35 +0200 Subject: Re: Python doc problem example: gzip module (reprise) Xah Lee wrote: Today i need to use Python to compress/decompress gzip files. snip However, scanning the doc after 20 seconds there's

Python doc problem example: gzip module (reprise)

2005-11-05 Thread Xah Lee
Python Doc Problem Example: gzip Xah Lee, 20050831 Today i need to use Python to compress/decompress gzip files. Since i've read the official Python tutorial 8 months ago, have spent 30 minutes with Python 3 times a week since, have 14 years of computing experience, 8 years in mathematical

Xah's edu corner: the Journey of Foreign Characters thru Internet

2005-11-01 Thread Xah Lee
the Journey of Foreign Characters thru Internet Xah Lee, 20051101 There's a bunch of confusions about the display of non-ascii characters such as the bullet •. These confusions are justifiable, because the underlying stuff is technology, computing technologies, are in a laymen sense, extremely

Re: learning emacs lisp

2005-10-30 Thread Xah Lee
well, in the past couple of days i started my own: http://xahlee.org/emacs/notes.html but i'm sure something like it exists. Btw, the elisp intro by Robert J Chassell. At: http://www.gnu.org/software/emacs/emacs-lisp-intro/ is extremely well written. (and so is the elisp reference) Bravo to GNU

a Haskell a Day

2005-10-26 Thread Xah Lee
A Haskell A Day: Manifesto This is my learning notes on Haskell. I call it a-Haskell-a-day. I've been programing since 1992, and am a top expert at the Mathematica↗ language. I've long wanted to learn Haskell. It is my habit to write down what i'm learning. I will send out a small tip of what i

tool for syntax coloring in html

2005-10-26 Thread Xah Lee
in some online documentations, for examples: http://perldoc.perl.org/perlref.html http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-17.html http://www.haskell.org/hawiki/HaskellDemo the codes are syntax colored. Is there a tool that produce codes in html with syntax coloring? Thanks.

Perl-Python-a-Day: one-liner loop Functional Style

2005-10-20 Thread Xah Lee
One-Liner Loop in Functional Style Xah Lee, 200510 Today we show a example of a loop done as a one-liner of Functional Programing style. Suppose you have a list of file full paths of images: /Users/t/t4/oh/DSCN2059m-s.jpg /Users/t/t4/oh/DSCN2062m-s.jpg /Users/t/t4/oh/DSCN2097m-s.jpg /Users/t

Re: Python Doc Error: os.makedirs

2005-10-20 Thread Xah Lee
Thomas Bellman wrote: try: os.makedirs(/tmp/trh/spam/norwegian/blue/parrot/cheese) except os.error, e: if e.errno != errno.EEXIST: raise This is what i want. Thanks. (the doc needs quite some improvement...) Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ --

Re: write a loopin one line; process file paths

2005-10-19 Thread Xah Lee
[EMAIL PROTECTED] wrote: it will be added in 2.5 I beleve. At the moment, you can: predicate and true expression or false expression Ah, i see. Here's the full code again: # -*- coding: utf-8 -*- # python import re, os.path imgPaths=[u'/Users/t/t4/oh/DSCN2059m-s.jpg',

Re: write a loopin one line; process file paths

2005-10-19 Thread Xah Lee
Thanks a lot for various notes. Bonono? I will have to look at the itertools module. Just went to the doc http://www.python.org/doc/2.4.1/lib/module-itertools.html looks interesting. But I believe Python is designed for easy to code and read and maintain in mind. One has to admit that

write a loopin one line; process file paths

2005-10-18 Thread Xah Lee
is there a way to condense the following loop into one line? # -*- coding: utf-8 -*- # python import re, os.path imgPaths=[u'/Users/t/web/Periodic_dosage_dir/lanci/t4/oh/DSCN2059m-s.jpg', u'/Users/t/web/Periodic_dosage_dir/lanci/t4/oh/DSCN2062m-s.jpg',

Re: write a loopin one line; process file paths

2005-10-18 Thread Xah Lee
Xah Lee wrote: is there a way to condense the following loop into one line? # -*- coding: utf-8 -*- # python import re, os.path imgPaths=[u'/Users/t/web/Periodic_dosage_dir/lanci/t4/oh/DSCN2059m-s.jpg', u'/Users/t/web/Periodic_dosage_dir/lanci/t4/oh/DSCN2062m-s.jpg', u'/Users/t/web

Python Doc Error: os.makedirs

2005-10-18 Thread Xah Lee
Python doc problem: http://python.org/doc/2.4.2/lib/os-file-dir.html makedirs( path[, mode]) Recursive directory creation function. Like mkdir(), but makes all intermediate-level directories needed to contain the leaf directory. Throws an error exception if the leaf directory already

Re: write a loopin one line; process file paths

2005-10-18 Thread Xah Lee
Peter Hansen wrote: Xah Lee wrote: If you think i have a point, ... You have neither that, nor a clue. Dear Peter Hansen, My messages speak themselfs. You and your cohorts's stamping of it does not change its nature. And if this is done with repetitiousness, it gives away your nature

Re: Jargons of Info Tech industry

2005-10-18 Thread Xah Lee
Xah Lee, on Aug 22, 2:43 pm wrote: Unix, RFC, and Line Truncation http://xahlee.org/UnixResource_dir/writ/truncate_line.html Steve wrote: I've seen this argument before. There's at least one VERY good reason to hard-code linebreaks in text: to preserve a covert channel. It's really easy

Re: write a loopin one line; process file paths

2005-10-18 Thread Xah Lee
Thanks. Here's how the inner loop should be: imgPaths2=map(lambda x: (x, re.sub( r^(.+?)-s(\.[^.]+)$,r\1\2, x)), imgPaths) though, now i just need something like map( lambda x: os.path.exists(s)? x[1]:x[0],impPaths2) but Pyhton doesn't support the test ? trueResult : falseResult construct.

Re: bizarro world (was Re: Python Doc Problem Example: sort() (reprise))

2005-10-17 Thread Xah Lee
Bryan wrote: mr. xah... would you be willing to give a lecture at pycon 2006? i'm sure you would draw a huge crowd and a lot of people would like to meet you in person... thanks. I'd be delight to. My requirements are: 1 cup of fat-free milk, free, and free pizza. Xah [EMAIL

Re: Perl-Python-a-Day: split a file full path

2005-10-17 Thread Xah Lee
Xah Lee wrote: In Perl, spliting a full path into parts is done like this: Dr.Ruud wrote: And then follows Perl-code that only works with an optional .html extension, Thanks for the note. I've corrected it here: http://xahlee.org/perl-python/split_fullpath.html namely: Note: the second

tuple versus list

2005-10-16 Thread Xah Lee
suppose i'm going to have a data structure like this: [ [imgFullPath,(width, height)], [imgFullPath,(width, height)], [imgFullPath,(width, height)], [imgFullPath,(width, height)], ... ] should i use (width,height) or [width,height]? what advantage i get to use n-tuple instead of the generic

Perl-Python-a-Day: split a file full path

2005-10-16 Thread Xah Lee
Split File Fullpath Into Parts Xah Lee, 20051016 Often, we are given a file fullpath and we need to split it into the directory name and file name. The file name is often split into a core part and a extension part. For example: '/Users/t/web/perl-python/I_Love_You.html' becomes '/Users/t/web

Microsoft Hatred FAQ

2005-10-14 Thread Xah Lee
Microsoft Hatred, FAQ Xah Lee, 20020518 Question: U.S. Judges are not morons, and quite a few others are not morons. They find MS guilty, so it must be true. Answer: so did the German population thought Jews are morons by heritage, to the point that Jews should be exterminated from earth

Re: Perl-Python-a-Day: Sorting

2005-10-13 Thread Xah Lee
Lasse Vågsæther Karlsen wrote: Like the sorted function in Python ? li2 = sorted(li) you can also specify a key and a cmp function if you need to. Thanks. I didn't know there's also a sort function in Python (2.4), besides the method. (i've mentioned your name as acknowledgement at my

Re: Perl-Python-a-Day: Sorting

2005-10-12 Thread Xah Lee
Sorting in Perl In Perl, to sort a list, do like this: @li=(1,9,2,3); @li2 = sort {$a = $b} @li; print join(' ', @li2); In Perl, sort is a function, not some Object Oriented thing. It returns the sorted result as another list. This is very simple and nice. It works like this: sort takes the

Python Doc Problem Example: sort() (reprise)

2005-10-11 Thread Xah Lee
Python Doc Problem Example: sort() Xah Lee, 200503 Exhibit: Incompletion Imprecision Python doc “3.6.4 Mutable Sequence Types” at http://python.org/doc/2.4/lib/typesseq-mutable.html in which contains the documentation of the “sort” method of a list. Quote: « Operation Result Notes

Re: Python Doc Problem Example: sort() (reprise)

2005-10-11 Thread Xah Lee
Addendum, 200510 Here's further example of Python's extreme low quality of documentation. In particular, what follows focuses on the bad writing skill aspect, and comments on some language design and quality issues of Python. From the Official Python documentation of the sort() method, at:

Pythot doc problem: lambda keyword...

2005-10-10 Thread Xah Lee
i'm trying to lookup on the detail of language Python's “lambda” function feature. I've seen it before, but today i need to read about it again since i'm writing. I quickly went to the index page: http://python.org/doc/2.4.1/lib/genindex.html but all i got is a LambdaType. i'm thinking, maybe

Perl-Python-a-Day: Sorting

2005-10-10 Thread Xah Lee
Sort a List Xah Lee, 200510 In this page, we show how to sort a list in Python Perl and also discuss some math of sort. To sort a list in Python, use the “sort” method. For example: li=[1,9,2,3]; li.sort(); print li; Note that sort is a method, and the list is changed in place. Suppose you

Daisy Daisy, give me your answer do

2005-10-08 Thread Xah Lee
there is a MacPerl program posted in 1998 that uses Mac's speech synth to sing Daisy Bell. See: http://bumppo.net/lists/macperl/1998/11/msg00412.html can anyone modify it so it runs out of the box on today's OS X? PS i'm posting this also in python and lisp group, i hope it'd be some general

Re: Daisy Daisy, give me your answer do

2005-10-08 Thread Xah Lee
Dear Michael Goettsche, why don't you lead the pack to be on-topic for a change, huh? Xah Michael Goettsche wrote: On Saturday 08 October 2005 22:10, Xah Lee wrote: there is a MacPerl program posted in 1998 that uses Mac's speech synth to sing Daisy Bell. See: http://bumppo.net

Re: check html file size

2005-10-07 Thread Xah Lee
Xah Lee wrote: « would anyone like to translate the following perl script to Python or Scheme (scsh)?» Here's the Python version. # -*- coding: utf-8 -*- # Python # Wed Oct 5 15:50:31 PDT 2005 # given a dir, report all html file's size. (counting inline images) # XahLee.org import re

check html file size

2005-10-04 Thread Xah Lee
would anyone like to translate the following perl script to Python or Scheme (scsh)? the file takes a inpath, and report all html files in it above certain size. (counting inline images) also print a sorted report of html files and their size. (a copy of the script is here:

Re: A Moronicity of Guido van Rossum

2005-10-01 Thread Xah Lee
the programers in the industry, including bigwigs such as Guido or that Larry Wall fuckhead, really don't know shit about computer languages. Sometimes i get pissed by Stephen Wolfram's megalomaniac cries, but in many ways, i think his statements about the fucking moronicities of the academicians

A Moronicity of Guido van Rossum

2005-09-29 Thread Xah Lee
A Moronicity of Guido van Rossum Xah Lee, 200509 On Guido van Rossum's website: http://www.artima.com/weblogs/viewpost.jsp?thread=98196 dated 20050826, he muses with the idea that he would like to remove lambda, reduce(), filter() and map() constructs in a future version Python 3000. Guido

Re: A Moronicity of Guido van Rossum

2005-09-29 Thread Xah Lee
addendum: reduce() in fact embodies a form of iteration/recursion on lists, very suitable in a functional language environment. If Python's lambda and other functional facilities are more powerful, reduce() would be a good addition. For instance, in functional programing, it is a paradigm to nest

Perl's documentation come of age

2005-09-21 Thread Xah Lee
Perl's documentation has come of age: http://perldoc.perl.org/ Python morons really need to learn: • ample example codes. • example codes are linked to the appropriate doc location for each code word in the example. • written in a task-oriented style, or manifest-functionality style. That is,

Re: Python Doc Problem Example: os.path.split

2005-09-19 Thread Xah Lee
is archived at: http://xahlee.org/perl-python/python_doc_os_path_split.html Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Xah Lee wrote: Python Doc Problem Example Quote from: http://docs.python.org/lib/module-os.path.html -- split(path) Split the pathname path into a pair

Python Doc Problem Example: os.path.split

2005-09-18 Thread Xah Lee
Python Doc Problem Example Quote from: http://docs.python.org/lib/module-os.path.html -- split( path) Split the pathname path into a pair, (head, tail) where tail is the last pathname component and head is everything leading up to that. The tail part will never contain a

regex re.search and re.match

2005-09-11 Thread Xah Lee
in the regex module re: Note: Match() is not exactly equivalent to Search() with ^. For example: re.search(r'^B', 'A\nB',re.M) # succeeds re.match(r'B', 'A\nB',re.M) # fails if without the re.M, would re.search and re.match be equivalent? i wish to spruce up the rewritten

reading the last line of a file

2005-09-08 Thread Xah Lee
Martin Franklin wrote: import gzip log_file = gzip.open(access_log.4.gz) last_line = log_file.readlines()[-1] log_file.close() does the log_file.readlines()[-1] actually read all the lines first? i switched to system call with tail because originally i was using a pure Python solution

Re: reading the last line of a file

2005-09-08 Thread Xah Lee
isn't there a way to implement tail in python with the same class of performance? how's tail implemented? Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Fredrik Lundh wrote: Fredrik Lundh wrote: zcat|tail is a LOT faster. and here's the right way to use that: from subprocess import

Re: os.system(rls) prints to screen??

2005-09-07 Thread Xah Lee
Xah Lee wrote: does anyone know why the folllowing prints to the screen? # python import os os.system(rls) Steve Holden wrote: It only prints to the screen when standard output of the invoking process is the screen. The sub-process forked by os.system inherits stdin stdout and stderr from

Re: determine if os.system() is done

2005-09-07 Thread Xah Lee
Thanks all. I found the answer, rather easily. To make a system call and wait for it, do: subprocess.Popen([r/sw/bin/gzip,-d,access_log.4.gz]).wait(); -- this post is archived at: http://xahlee.org/perl-python/system_calls.html Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Xah Lee wrote

Re: os.system(rls) prints to screen??

2005-09-04 Thread Xah Lee
Steve Holden wrote: This is all pretty basic stuff. Perhaps you should stop your verbal assault on the computer science community and start to learn the principles of what you are doing. is this a supressed behavior that a human animal can finally instinctively and justifiably release at

Re: os.system(rls) prints to screen??

2005-09-04 Thread Xah Lee
do you know what the Muses do when a mortal challenged them? And, please tell me exactly what capacity you hold under the official Python organization so that i can calculate to what degree i can kiss your ass or feign mum of your ignorance. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Steve

Python Doc Problem Example: os.system

2005-09-04 Thread Xah Lee
Python Doc Problem Example: os.system Xah Lee, 2005-09 today i'm trying to use Python to call shell commands. e.g. in Perl something like output=qx(ls) in Python i quickly located the the function due to its well-named-ness: import os os.system(ls) however, according to the doc http

python logo

2005-09-03 Thread Xah Lee
i noticed that Python uses various logos: http://python.org/pics/pythonHi.gif http://python.org/pics/PyBanner038.gif http://python.org/pics/PyBanner037.gif http://python.org/pics/PythonPoweredSmall.gif http://wiki.python.org/pics/PyBanner057.gif is this some decision that python should use

Re: python logo

2005-09-03 Thread Xah Lee
as advertisement. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Steve Holden wrote: Xah Lee wrote: i noticed that Python uses various logos: http://python.org/pics/pythonHi.gif http://python.org/pics/PyBanner038.gif http://python.org/pics/PyBanner037.gif http://python.org/pics

os.system(rls) prints to screen??

2005-09-03 Thread Xah Lee
does anyone know why the folllowing prints to the screen? # python import os os.system(rls) Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: OpenSource documentation problems

2005-09-01 Thread Xah Lee
By the way, i have sent my criticisms to the proper python doc maintainer or mailing list several months ago. - i'm very sorry to say, that the Python doc is one of the worst possible in the industry. I'm very sick of Perl and its intentional obfuscation and juvenile drivel style of

Re: OpenSource documentation problems

2005-09-01 Thread Xah Lee
On Python's Documentation Xah Lee, 20050831 I'm very sorry to say, that the Python doc is one of the worst possible in the industry. I'm very sick of Perl and its intentional obfuscation and juvenile drivel style of its docs. I always wanted to learn Python as a replacement of Perl

Re: Python doc problems example: gzip module

2005-09-01 Thread Xah Lee
nothing personal my friend. But just in case you are interested about getting it: the question here is about quality of documentation, not about whether you got it. http://xahlee.org/UnixResource_dir/writ/python_doc.html Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Sybren Stuvel wrote: Xah

Python doc problems example: gzip module

2005-08-31 Thread Xah Lee
today i need to use Python to decompress gzip files. since i'm familiar with Python doc and have 10 years of computing experience with 4 years in unix admin and perl, i have quickly located the official doc: http://python.org/doc/2.4.1/lib/module-gzip.html but after a minute of scanning,

Re: Python doc problems example: gzip module

2005-08-31 Thread Xah Lee
Today i need to use Python to compress/decompress gzip files. I quickly found the official doc: http://python.org/doc/2.4.1/lib/module-gzip.html I'd imagine it being a function something like GzipFile(filePath, comprress/decompress, outputPath) however, scanning the doc after 20 seconds there's

change date format

2005-08-31 Thread Xah Lee
Apache by default uses the following format for date: 30/Aug/2005 is there a module that turn this directly into mmdd? Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

OpenSource documentation problems

2005-08-27 Thread Xah Lee
previously i've made serious criticisms on Python's documentations problems. (see http://xahlee.org/perl-python/re-write_notes.html ) I have indicated that a exemplary documentation is Wolfram Research Incorporated's Mathematica language. (available online at

Re: Jargons of Info Tech industry

2005-08-22 Thread Xah Lee
Unix, RFC, and Line Truncation [Note: unix tradition requires that a return be inserted at every 70 characters in email messages or so so that each line are less than 80 characters. Unixers made this as a requirement into an RFC document.] Xah Lee, 20020511 This truncation of lines business

Jargons of Info Tech industry

2005-08-11 Thread Xah Lee
Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like extraneous jargons, such as in the Unix Perl community. Unlike mathematicians, where in mathematics

Xah's edu corner: on Microsoft hatred

2005-07-18 Thread Xah Lee
by Xah Lee. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: What is Expresiveness in a Computer Language?

2005-07-12 Thread Xah Lee
Most participants in the computering industry should benefit in reading this essay: George Orwell's “Politics and the English Language”, 1946. Annotated: http://xahlee.org/p/george_orwell_english.html Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ --

What is Expresiveness in a Computer Language?

2005-07-10 Thread Xah Lee
What is Expresiveness in a Computer Language 20050207, Xah Lee. In languages human or computer, there's a notion of expressiveness. English for example, is very expressive in manifestation, witness all the poetry and implications and allusions and connotations and dictions. There are a myriad

turn text lines into a list

2005-06-27 Thread Xah Lee
i have a large number of lines i want to turn into a list. In perl, i can do @corenames=qw( rb_basic_islamic sq1_pentagonTile sq_arc501Tile sq_arc503Tile ); use Data::Dumper; print Dumper([EMAIL PROTECTED]); -- is there some shortcut to turn lines into list in Python? Xah [EMAIL

Re: references/addrresses in imperative languages

2005-06-21 Thread Xah Lee
Dear Andrea Griffini, Thanks for explaning this tricky underneath stuff. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Andrea Griffini wrote: On Sun, 19 Jun 2005 22:25:13 -0500, Terry Hancock [EMAIL PROTECTED] wrote: PS is there any difference between t=t+[li] t.append(li) No, but

Re: tree functions daily exercise: Table

2005-06-21 Thread Xah Lee
here's the Python spec for the Table function: '''Table(f,[iStart,iEnd,iStep]) returns a list of f applied to the range range(iStart,iEnd,iStep). Example: Table(f,[3,10,2]) returns [f(3),f(5),f(7),f(9)] Table(f,[iStart,iEnd,iStep], [jStart,jEnd,jStep], ...) returns a nested list of f(i,j,...)

eval() in python

2005-06-21 Thread Xah Lee
is it possible to eval a string like the following? m=''' i0=[0,1] i1=[2,3] i2=[4,'a'] h0=[] for j0 in i0: h1=[] for j1 in i1: h2=[] for j2 in i2: h2.append(f(j0,j1,j2)) h1.append( h2[:] ) h0.append( h1[:] ) return h0''' perhaps i'm tired, but why can't i run: t='m=3'

Re: tree functions daily exercise: Table

2005-06-21 Thread Xah Lee
the example in the spec of previous post is wrong. Here's corrected version: here's the Python spec for the Table function: '''Table(f,[iStart,iEnd,iStep]) returns a list of f applied to the range range(iStart,iEnd,iStep). Example: Table(f,[3,10,2]) returns [f(3),f(5),f(7),f(9)]

Re: tree functions daily exercise: Table

2005-06-21 Thread Xah Lee
it in a few days. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ David Van Horn wrote: Xah Lee wrote: here's the Python spec for the Table function: ... References: • for a context of this message, see: http://xahlee.org/tree/tree.htm Here is a Scheme implementation of Table. As noted

Re: functions with unlimited variable arguments...

2005-06-20 Thread Xah Lee
Dear Chinook Lee, Thank you very much. That seems a godsend. I'd like to also thank its author Richard Gruet. Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Chinook wrote: ... I don't get to the reference docs much. Mostly I use the quick reference guide and it's noted there in an easy to

Re: functions with unlimeted variable arguments...

2005-06-19 Thread Xah Lee
oops... it is in the tutorial... sorry. though, where would one find it in the python reference? i.e. the function def with variable/default parameters. This is not a rhetorical question, but where would one start to look for it in the python ref? a language is used by programers. Subroutine

references/addrresses in imperative languages

2005-06-19 Thread Xah Lee
in coding Python yesterday, i was quite stung by the fact that lists appened to another list goes by as some so-called reference. e.g. t=range(5) n=range(3) n[0]='m' t.append(n) n[0]='h' t.append(n) print t in the following code, after some 1 hour, finally i found the solution of h[:]. (and

Re: tree functions daily exercise: Table

2005-06-18 Thread Xah Lee
The Perl version of the Tree function is posted. It's a bit long. Please see the code here: http://xahlee.org/tree/Table.html the choice of having a string as the first argument to Table is a bit awkward in Perl. Possibly i'll have to rewrite it so that the first argument is a function instead,

functions with unlimeted variable arguments...

2005-06-18 Thread Xah Lee
how can i define a function with variable parameters? For example, f(a) would return [a] f(a,b) would return [a,b] f(a,b,...) would return [a,b,...] One solution is of course to make the argument as a list. i.e. f([a,b,...]) but are there other solutions? Xah [EMAIL PROTECTED]

Python documentation problem

2005-06-18 Thread Xah Lee
Python documentation, http://python.org/doc/2.4.1/lib/typesfunctions.html - 2.3.10.3 Functions Function objects are created by function definitions. The only operation on a function object is to call it: func(argument-list). There are really two flavors of function objects:

Re: Python documentation problem

2005-06-18 Thread Xah Lee
i wanted to find out if Python supports eval. e.g. somecode='3+4' print eval(somecode) # prints 7 in the 14 hundred pages of python doc, where am i supposed to find this info? Xah [EMAIL PROTECTED] http://xahlee.org/ -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   >