Re: Python is readable

2012-03-20 Thread Albert van der Horst
gt; >And that's where the nub of the question is. How well is sufficiently >well? Clearly you do not require your code to be comprehensible to a >non-programmer, or you would not write code at all. If you don't >demand that the reader learn basic keywords of the language, t

Re: Python is readable

2012-03-29 Thread Albert van der Horst
anguage, he might >have been kinda, sorta right. Of course, nobody cares enough to >specify every last bit of minutiae in a program, and specifications >change, so it is pretty much impossible to imagine either case ever >actually occurring. I wonder if you're not talking about a differ

Re: Python Gotcha's?

2012-04-19 Thread Albert van der Horst
uot;" > >Blah. You can cut the number of escapes needed to one: > >'"Help me Obiwan," she said, "You\'re my only hope!"' I still think the doubling convention of Algol68 is superior: """Help me Obiwan,"" she said, "&

Re: why () is () and [] is [] work in other way?

2012-05-01 Thread Albert van der Horst
sions is the same, such that only one object needs to be created. What is ill here is the users understanding of when it is appropriate to use "is". Asking about identity of temporary objects fully under control of the compiler is just sick. Groetjes Albert -- -- Albert van der Horst

Re: serial module

2012-05-22 Thread Albert van der Horst
ts the usb device. Certainly this stuff is system dependant, so please start with stating which version kernel etc. of Linux you run, and the output of lsusb --verbose. > >Thank you, >Ron Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being e

Re: which one do you prefer? python with C# or java?

2012-06-14 Thread Albert van der Horst
tering a functional language is a real step, but I don't think this tic-tac-toe exercise will entice me to do that. Maybe the solutions to http://projecteuler.net that are published in Haskell sometimes condensing a few pages of my sequential code in a few lines, will inspire me to take up

Re: usenet reading

2012-06-15 Thread Albert van der Horst
, and it is fast/instantaneous. Set this stuff up in 1994 with Coherent. Upgraded to Linux, and upgraded the hardware a couple of times. Running on a Pentium 120 Mhz now. I take it for granted but last time I heard, UUCP was down to less than a dozen users with this service. Groetjes Albert >

Re: Problems of Symbol Congestion in Computer Languages

2011-03-05 Thread Albert van der Horst
about 30 chars at most. Different uses (defining a function versus using a function) are indicated by color, so don't use up char's. http://www.colorforth.com I was forced to use it (a development environment required it) and it is not as bad as it sounds. >-- >Dotan Cohen Groet

Re: Fun python 3.2 one-liner

2011-04-14 Thread Albert van der Horst
ws) much wider than 80 >characters. I'm using 140 for python these days. Seriously, who would >want to limit him/herself to 80 characters in 2011? I want to limit myself to 72 char's for readability. 80 char's is over the top. > >Cheers, >Daniel > Groetjes Albert

Re: Python IDE/text-editor

2011-04-28 Thread Albert van der Horst
commending > >Thanks, > >Alec Taylor You will never be satisfied, until you've written something yourself. Start writing now. A friend of mine started writing in 1983, and since 1985 I'm a happy user. The only language that is a candidate to write in is C, however. Groet

Re: Equivalent code to the bool() built-in function

2011-04-28 Thread Albert van der Horst
eans is xor. > >-- >Grant Edwards grant.b.edwards Yow! I am having FUN... > at I wonder if it's NET FUN or > gmail.comGROSS FUN? -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalent code to the bool() built-in function

2011-04-28 Thread Albert van der Horst
rators and everything. > >Didn't someone already do that and call it "lisp"? :-) Lisp is betrayed by its brackets. He wants Forth. > >-- >Greg Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- u

Re: What other languages use the same data model as Python?

2011-05-20 Thread Albert van der Horst
r extension would be possible in Python. Allusion to assembler where one adds a number to a register and can't tell whether the register contains an address or data are misleading. [This is not to say that I think it is advisable]. > >Chris Angelico Groetjes Albert. -- -- Albert van der

Re: What other languages use the same data model as Python?

2011-05-20 Thread Albert van der Horst
tent. But it is a rule, very explicitly explained in the language definition. (If you are that clean you can handle "ref ref int q" where q is the name of a place where a "ref int" can be stored.) "real a" is in fact an abbreviation of "ref real a=loc real&quo

Re: Sharing Python installation between architectures

2013-12-06 Thread Albert van der Horst
not as transparent, but they may work very well too. Have the common part set apart and replace everything else by symbolic links. There is always one more way to skin a cat. Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultima

Re: (-1)**1000

2014-11-03 Thread Albert van der Horst
er >way to do integer powers is by squaring based on the binary >representation of the exponent. It's explained here: >http://stackoverflow.com/a/101613/14343 > >So even if Python is actually calculating the value, it's only doing 75 >multiplications or so. I'm p

How is max supposed to work, especially key.

2014-11-27 Thread Albert van der Horst
taken into account only if the key applied to the iterator evaluates to a True value. However that doesn't pan out: " max(xrange(100,200), key=lambda i: i%17==0 ) 102 " I expect the maximum number that is divisible by 17 in the range, not the minimum. Can anyone shed light on this?

Re: I love assert

2014-11-29 Thread Albert van der Horst
er a program to source control it may not be solid. If I give it a tag it is solid... until the company sets a junior on it to add a feature. Then the assert may turn out to be life saver, even literally. >Marko -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

Re: Most gratuitous comments

2014-12-04 Thread Albert van der Horst
that every import is documented is IMO not to blame. In a company's coding convention ... I've seen a lot of things there that make a lot less sense. >-- >Steven -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. alb

Re: How is max supposed to work, especially key.

2014-12-04 Thread Albert van der Horst
In article , Peter Otten <__pete...@web.de> wrote: >Albert van der Horst wrote: > >> In the Rosetta code I come across this part of >> LU-decomposition. >> >> def pivotize(m): >> """Creates the pivoting matrix for m."""

Re: Python docs disappointing

2014-12-04 Thread Albert van der Horst
NTION being STUPID. > >-- >Joel Goldstick >http://joelgoldstick.com Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

Re: How is max supposed to work, especially key.

2014-12-04 Thread Albert van der Horst
In article , Chris Angelico wrote: >On Thu, Dec 4, 2014 at 9:09 PM, Albert van der Horst > wrote: >>>If there is more than one item with the maximum calculated the first is >>>given, so for your attempt >>> >>>max(xrange(100,200), key=lambda i: i%17==0

Re: "**" in python

2014-12-15 Thread Albert van der Horst
ve: text/html] >-=-=-=-=-=- With some perseverance, you can ask the interpreter what `` ** '' does: help(**) maybe so? help('**') Indeed, a whole description. help(var) help(42) also work. Come on, guys and dolls! Your advice to a newbies is soso, if in this kind of answer, t

Re: Hello World

2015-01-08 Thread Albert van der Horst
don't trust sudo because it is too complicated. (To the point that I removed it from my machine.) I do su .. # su nobody Who needs sudo? It's like instead of telling a 4-year old to stay on the side walk, learning him to read and then give him a 8-page brochure about "safety in t

Re: How do I remove/unlink wildcarded files

2015-01-08 Thread Albert van der Horst
his. A comboy on horse back who has ever seen a revolver is a far cry in backwardness from a feodalist peasant who *expects* to be flogged by a knut. Feodalism goes to the brain, like slavery does. (It took generations for the US negroes to shed of their slavery inheritance. ) Groetjes Alber

Re: Hello World

2015-01-08 Thread Albert van der Horst
In article , Chris Angelico wrote: >On Thu, Jan 8, 2015 at 11:43 PM, Albert van der Horst > wrote: >> I don't trust sudo because it is too complicated. >> (To the point that I removed it from my machine.) >> I do >> su >> .. >> # >> su no

Re: Hello World

2015-01-17 Thread Albert van der Horst
stem things as root, and working as a normal user. You just don't need sudo. > >ChrisA -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https

Re: Hello World

2015-01-17 Thread Albert van der Horst
In article , Chris Angelico wrote: >On Fri, Jan 9, 2015 at 4:02 AM, Steve Hayes wrote: >> On 08 Jan 2015 12:43:33 GMT, alb...@spenarnc.xs4all.nl (Albert van der Horst) >> wrote: >> >>>I don't trust sudo because it is too complicated. >>>(To the point

Re: Why do the URLs of posts here change?

2015-01-17 Thread Albert van der Horst
t;http://wiki.list.org/display/DEV/Stable+URLs Knowing that the source is an mbox file, I don't need to follow that link to conclude that one is not very inventive. It suffices to replace the content of the message by a repetition of '\n'. Maybe also the sender and the subject.

Re: recursive function: use a global or pass a parameter?

2015-01-17 Thread Albert van der Horst
routine. E.g. def fib(n): ' return the n-th Fibonacci number ' a,b = 0,1 def fib1(ap,bp): ' for f_n,f_n+1, return f_n+1,f_n+2 ' return bp,ap+b for i in xrange(n): a,b = fib1(a,b) return a > >thanks, >--Tim Groetjes A

Re: Hello World

2015-01-17 Thread Albert van der Horst
In article , wrote: >Michael Torrie wrote: >> On 01/17/2015 07:51 AM, Albert van der Horst wrote: >> > In article , >> > Chris Angelico wrote: >> > >> >> >> >> But sure. If you want to cut out complication, dispense with user >

Re: What killed Smalltalk could kill Python

2015-02-07 Thread Albert van der Horst
puter, without the need for them to install Forth. For the compiler to run you must have the library correctly installed. " Seems like I did it slightly better. (Mind you, this is chapter 4, for beginners there is chapter 2, e.g. if the `` : '' word puzzles you.) Groetjes Albert > >-tkc > > -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

Re: What killed Smalltalk could kill Python

2015-02-07 Thread Albert van der Horst
ment or the illusion of having created something while in fact one used a frame work where all the hard work has been done. > >ChrisA Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

Re: Python is DOOMED! Again!

2015-02-07 Thread Albert van der Horst
some_list, REAL_ISB_MASK ) > >> is probably going to have bigger troubles with Python than just type-hinting. > >Yup, true -- I do find writing meta-classes takes extra work. ;) > >-- >~Ethan~ > > > >-=-=-=-=-=- >[Attachment type=application/pgp-signature, name=

Re: Alternative to multi-line lambdas: Assign-anywhere def statements

2015-02-11 Thread Albert van der Horst
o don't like Algol68 I've heard arguments that with -> the __name__ is not filled in correctly. I can't see why the parser would understand more easily def f(x): return x**2 than f = x-> return x**2 [I'm striving for simplification, doing away with both th

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-03 Thread Albert van der Horst
on implementation from there, without being overly math savvy. I'd love to hear if some one does it. ( in principle a coefficient of a cf can overflow machine precision, that has never been observed in the wild. A considerable percentage of the coefficients for a random number are ones or otherwis

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-04 Thread Albert van der Horst
at would just be a >matter of checking whether the triple (m, d, a) has been seen already. > >Going back to your example of adding generated digits though, I don't >know how to add two continued fractions together without evaluating >them. That is highly non-trivial indeed. S

Re: Working with the set of real numbers (was: Finding size of Variable)

2014-03-04 Thread Albert van der Horst
In article , Chris Angelico wrote: >On Tue, Mar 4, 2014 at 1:45 PM, Albert van der Horst > wrote: >>>No, the Python built-in float type works with a subset of real numbers: >> >> To be more precise: a subset of the rational numbers, those with a >> denominator

Re: Working with the set of real numbers

2014-03-04 Thread Albert van der Horst
e of a Turing machine is an infinite tape. A Turing machine happily calculates Ackerman functions long after a real machine runs out of memory to represent it, with as a result a number of ones on that tape. But it only happens in the mathematicians mind. > > >Marko -- Albert van der Horst

Re: Python programming

2014-03-05 Thread Albert van der Horst
irewrap). > >You know you're working with a Real Computer (tm) when the +5V power >supply can deliver as much current as an arc welder. I've a 64 node Parsytec transputer system in the hall way with dual 5V 100A power supplies. Does that count? Groetjes Albert -- Albert van der

Re: Can global variable be passed into Python function?

2014-03-10 Thread Albert van der Horst
n into convoluted factory (anti)patterns whose sole >purpose is to avoid straightforward switch statements in a decoder. > > >Marko -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

Re: Import order question

2014-03-10 Thread Albert van der Horst
s not about "how to use a search function" > >No, it's about your incredulity that someone would search for a method >in a large file that contains several methods of the same name. However, >the existence of search functions makes this completely trivial. And then there is folding editors, and tagfiles. Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

Re: intersection, union, difference, symmetric difference for dictionaries

2014-03-15 Thread Albert van der Horst
r, Laplace, Fourier had their marbles in a row. It is hard to outsmart them. Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about Source Control

2014-03-22 Thread Albert van der Horst
r bearings. Basically the first ten of so versions (before the tag WINNER) just don't solve the problem. (Of course euler problems are hard, three rewrites are not uncommon.) I compare the in between versions with the nails they put in the mountainside in climbing. It is a point below which yo

Re: Question about Source Control

2014-03-22 Thread Albert van der Horst
the grow of a source archive cannot keep up with LAN and Internet speeds and hard disk sizes. > >-- >Greg Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

How can this assert() ever trigger?

2014-05-10 Thread Albert van der Horst
t = -result det = determinant( mat ) assert(nom<>0.) return result*det/nom /- Now on some matrices the assert triggers, meaning that nom is zero. How can that ever happen? mon start out as 1. and gets multiplied with a number that is asserted to

Re: How can this assert() ever trigger?

2014-05-10 Thread Albert van der Horst
In article <874n0xvd85@dpt-info.u-strasbg.fr>, Alain Ketterlin wrote: >alb...@spenarnc.xs4all.nl (Albert van der Horst) writes: > >[...] >> Now on some matrices the assert triggers, meaning that nom is zero. >> How can that ever happen? mon start out as 1. and

Re: How can this assert() ever trigger?

2014-05-13 Thread Albert van der Horst
In article , Joseph Martinot-Lagarde wrote: >Le 10/05/2014 17:24, Albert van der Horst a écrit : >> I have the following code for calculating the determinant of >> a matrix. It works inasfar that it gives the same result as an >> octave pro

Re: PEP 8 : Maximum line Length :

2014-05-14 Thread Albert van der Horst
acter limit?! > >Sheesh! A relic of the days when terminals were ASCII and 80x24 80 character was the hard limit. The soft limit for readability is 60..65 characters. Think about it. Just that a language accepts #define MASK_SEPIA_INTERNAL_BLEEDING_WASHINGTON_DC_BLACK 0x147800fa means that it

Re: PEP 8 : Maximum line Length :

2014-05-17 Thread Albert van der Horst
a superfix. All in the name of avoiding names longer than one character. When we run out then there are creative ways to combine known characters into Jacobi symbols and choose functions. There are even conventions that allow to leave out characters, like "juxtaposition means multiplication&

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-05-17 Thread Albert van der Horst
ocessor. This will allow you to get a maximum of compactness without compromising the Python language. Implementations of it are available on MS-Windows too. > >I will give the locals approach a try, it seems a little more clumsy >than simply passing the variables to the function. > >Than

Re: Values and objects

2014-05-17 Thread Albert van der Horst
t side *must* be a reference. You can't change an int, you can only change the content of a memory place you can refer to. Now you can define 'ref' 'int' pi; pi := i; van Wijngaarden and crue pretty much nailed it, IMO. >-- >Steven D'Aprano >http://import-t

Re: Fortran (Was: The "does Python have variables?" debate)

2014-05-29 Thread Albert van der Horst
an(1/57) + 4*atan(1/239)(Shanks used this) > > >... and then, you have julia send each piece to a separate >processor|core (it does this at its center) and they converge together, >then julia pieces them together at the end. Then things get incredibly >faster. I know now how to in

Re: Fortran

2014-05-29 Thread Albert van der Horst
ntil runtime. If it can infer that something is an integer, just before entering a loop to be executed millions of times, that should be a big win, not? > > >Marko -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&am

Re: Error Testing

2013-10-30 Thread Albert van der Horst
in ALGOL68 too. It is not likely to be misunderstood because of the use of :=. By the way, it is about the only thing that I think is wrong in Python. > > >ChrisA Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falt

Re: Python Front-end to GCC

2013-11-01 Thread Albert van der Horst
,4,5,6,7,8}; int main() { int i; for (i = 0; i < sizeof(arr)/sizeof(int); i++) { printf("arr[%d] = %d\n", i, arr[i]); } printf("\n"); return 0; } Output: " albert@cherry:/tmp$ a.out arr[0] = 1 arr[1] = 2 arr[2] = 3 arr[3] = 4 arr[4] = 5 arr[5] = 6 arr[6] = 7

Re: Unlimited canvas painting program

2013-11-07 Thread Albert van der Horst
e steps, and is not too disruptive. Even if you do it continuously, it is more intuitive (but functionally equivalent to) keeping the cursor in the middle. A problem that remains is that a mouse is not intended for an infinite canvas. At some point you will have to lift it and place it back on the pa

Re: generator/coroutine terminology

2015-03-31 Thread Albert van der Horst
terious 'void-returning' function was introduced to simulate procedures The mistake this was intended to fix, was the rule that by default a function returns int in C. Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

Re: generator/coroutine terminology

2015-03-31 Thread Albert van der Horst
x < 0.5: >yield x >x = random.random() > > >Generators, as a rule, are significantly easier to write, understand, and >debug. There's nothing they can do that can't be done with an iterator >class, but the fiddly, unexciting bits related

Re: generator/coroutine terminology

2015-03-31 Thread Albert van der Horst
In article , Dave Angel wrote: >On 03/31/2015 09:18 AM, Albert van der Horst wrote: >> In article <55062bda$0$12998$c3e8da3$54964...@news.astraweb.com>, >> Steven D'Aprano wrote: > >>> >>> The biggest difference is syntactic. Here's an i

Re: Sudoku solver

2015-04-10 Thread Albert van der Horst
sonable time for a realistic algorithm. This puzzle takes 255 ms in a program that I wrote in 2008 in Forth. > > >Marko Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

Re: generator/coroutine terminology

2015-04-18 Thread Albert van der Horst
In article <551e2cfd$0$11123$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: >On Wednesday 01 April 2015 00:18, Albert van der Horst wrote: > >> In article <55062bda$0$12998$c3e8da3$54964...@news.astraweb.com>, >> Steven D'Aprano wrote: > >&g

Re: Best search algorithm to find condition within a range

2015-04-18 Thread Albert van der Horst
gt;All operations on integers addition, subtraction, multiplication and >division assume base 10. Fire up a lowlevel interpreter like Forth. (e.g. gforth) 7 CONSTANT A4 CONSTANT B A B + PAD ! PAD now contains the sum of A and B. Now inspect the actual computer memory: PAD 100 DU

Re: Best search algorithm to find condition within a range

2015-04-25 Thread Albert van der Horst
In article <5533a77d$0$12993$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: >On Sun, 19 Apr 2015 04:08 am, Albert van der Horst wrote: > >> Fire up a lowlevel interpreter like Forth. (e.g. gforth) > >Yay! I'm not the only one who uses or likes For

Re: New to Python - block grouping (spaces)

2015-04-25 Thread Albert van der Horst
> > >To paraphrase Pauli's "This is not even wrong" >this is not even a strawman On the contrary it is the last word in this discussion. At least the last word I need or will read. Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponen

Re: Boolean Operator Confusion

2015-05-08 Thread Albert van der Horst
g is a boolean query, or it is not. There is no >third choice. ("It's a boolean query, but only on Wednesdays.") In the context of testcode where the OP is not knowing what is going on it is absolutely useful, and legit. His problem is that it is Wednesday and weird things happen

Re: Bitten by my C/Java experience

2015-05-08 Thread Albert van der Horst
o solve the familiar egg-farm problems: I have 103 eggs. 12 eggs go in a box. How many boxes can I fill? (Similar problems crop up in graphics all the time.) > >ChrisA Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falt

Re: Rule of order for dot operators?

2015-06-08 Thread Albert van der Horst
foo() need not return a string - it might return anything, >and the following .bah() will work on that anything. I interpreted the question as about the associative of the dot operator. title = slug.title().replace('-',' ') Does that mean title = slug.( title().replace(

Re: Regular expressions

2015-11-05 Thread Albert van der Horst
, {, |, (, >>and ) lose their special meaning; instead use the backslashed >>versions \?, \+, \{, \|, \(, and \). >> """ >None of this appears relevant, as the metacharacter * is not listed. So >what's going on? * is so fundamental tha

Re: OT: This Swift thing

2014-06-27 Thread Albert van der Horst
e vain cars need very little fuel, we just must accept that cars move slightly slower than we could walk. > >ChrisA -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- https://mail.python.org/mailman/listinfo/python-list

Re: Global indent

2014-09-13 Thread Albert van der Horst
r screen access, and I could do cursor based full screen editing, quite passably, doing a vt100 emulation on my Osborne CP/M machine. (I've a non transferable license and ee is not for sale.) > >-- >//Wegge Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic gr

Re: Benefit and belief

2011-10-09 Thread Albert van der Horst
declaring it a dogma that Jozef has nothing to do with it. (It being ... well ... you know ...) (I have this book, it is called "the amusing bible" with all flippant and contradictory stuff pointed out by a French 1930 communist. Cartoons too. ) Groetjes Albert -- -- Albert van

Re: Usefulness of the "not in" operator

2011-10-09 Thread Albert van der Horst
== i : > >And one could express "x not in s" as "(x in s) implies False" without >making the "not" explicit if "implies" was in the language. (I know >about <= but I also witnessed an unpleasant thread in another >newsgroup where people insiste

Re: The usage of -m option of python

2013-04-08 Thread Albert van der Horst
ian distribution. Python 2.7) >-- >Terry Jan Reedy > Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- http://mail.python.org/mailman/listinfo/python-list

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

2007-08-20 Thread Albert Y. C. Lai
Twisted wrote: > A link to a copy in a non-toxic format would be nice. http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EWD1298.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Details about pythons set implementation

2008-01-19 Thread Albert van der Horst
ll integers, you >> can implement it using bit flipping. E.g. 5 is an element of the set if >> bit 5 is on. Or if you can live with O(n) implementations are trivial. >> >> > Are you expecting better than O(log n)? >> >> Sure. The same applies to sets of co

Beginners question about debugging (import)

2008-01-22 Thread Albert van der Horst
uestion, rather difficult to get answered from the documentation.) Groetjes Albert ~ -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- like all pyramid schemes -- ultimately falters. [EMAIL PROTECTED]&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Re: Transforming ascii file (pseduo database) into proper database

2008-01-28 Thread Albert van der Horst
a specific identifier from all the individual files >without pulling all of the files into memory and without having to >repeatedly open, search, and close the files over and over again? As long as you don't use Excell, it is not up to it ;-) Groetjes Albert -- -- Albert van der

Changing module variables.

2008-01-29 Thread Albert van der Horst
" "C28 " " 1 7" " 9 " " A3 " "" " E " " 5 B" "08 E" "B C " " 96 " "1A3 " "D 5 " "" "0 A" " E" "6 1" &

Re: subprocess and & (ampersand)

2008-02-01 Thread Albert van der Horst
dows 3.1., I suggest you stay away from .bat files. Better call them .cmd, such that they are executed by cmd.exe (32 bits). It could be part of your problem. > >TJG Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- like all pyramid schemes -- ultim

Re: Sorting Large File (Code/Performance)

2008-02-02 Thread Albert van der Horst
do with it after it's sorted? >I need to isolate all lines that start with two characters (zz to be >particular) Like in? grep '^zz' longfile > aapje You will have a hard time to beat that with python, in every respect. > >Cheers, > >Ira Groetjes Albert -

Re: Sorting Large File (Code/Performance)

2008-02-02 Thread Albert van der Horst
. http://home.hccnet.nl/a.w.m.van.der.horst/ssort.html This is a plain executable, so no hassles and no trial. It is GPL, so you can even hack the source, if you fancy C++. There are a lot of Unix compatible toolkit present for Windows nowadays. Install one, you can spare a dozen Mbytes, ca

Re: too long float

2008-02-02 Thread Albert van der Horst
>> a = 3.9 >>>> print a >3.9 This has nothing to do with python. Apparently you don't know the first thing about floating point numbers. I suggest reading the wikipedia entry. http://en.wikipedia/wiki/floating_point Groetjes Albert > >bart

Re: Linux Journal Survey

2008-02-02 Thread Albert van der Horst
a /.../bin/ directory. A scripting language is a language whose programs are normally distributed in human-readable form. It is appropriate to call such a program a script. If the first two characters is "#!" and the execution bit is set, it is a script in the linux sense. So as far as

Re: translating Python to Assembler

2008-02-03 Thread Albert van der Horst
architectures. So you are disassembling using an Intel disassembler? How can that make sense if you are on a SUN work station with a non-Intel processor? Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- like all pyramid schemes -- ultimately falters. [E

Re: When is min(a, b) != min(b, a)?

2008-02-04 Thread Albert van der Horst
In article <[EMAIL PROTECTED]>, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >On Thu, 24 Jan 2008 13:34:56 +, Antoon Pardon wrote: > >> On 2008-01-21, Steven D'Aprano <[EMAIL PROTECTED]> >> wrote: >>> On Sun, 20 Jan 2008 21:15:02 -0600,

Re: programming by evolution?

2009-02-19 Thread Albert van der Horst
l the way down. It looks impressive especially from where I stand. ( Formal procedures that take 6 months, and bad fixes because approved changes were no good after all.) So not dead by a margin, and less snake oil than most methodologies I know of. > Xah Groetjes Albert -- -- Albert van

Re: Representing a Tree in Python

2009-05-23 Thread Albert van der Horst
ack links if that has to be done with decent efficiency. The back links can be added as part of the algorithm. > >Thanks once again. Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- like all pyramid schemes -- ultimately falters. alb...@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding a Par construct to Python?

2009-05-27 Thread Albert van der Horst
t;And how is reduce() supposed to know whether or not some arbitrary >function is commutative? Why would it or need it? A Python that understands the ``par'' keyword is supposed to know it can play some tricks with optimizing reduce() if the specific function is commutative. >-- >

Re: What text editor is everyone using for Python

2009-06-01 Thread Albert van der Horst
dentally stumble upon the sequence for "save >file". Exactly. An indication of how one can see one is in emacs is also appreciated. [Especially insidious is helpful help that lands you in emacs-ing help file for powerful searching (not!).] Groetjes Albert -- -- Albert van der Horst

Re: What text editor is everyone using for Python

2009-06-01 Thread Albert van der Horst
m. >> >> Which means Notepad on Windows? > >Or you could take a Linux preinstallation on a Live CD/DVD or USB stick. >There's no Windows system so brain-dead it can't be fixed with a simple >ctrl-alt-del. :) > You can carry vim (or Edwin's editor for that matt

Re: hash and __eq__

2009-06-04 Thread Albert van der Horst
element when sorting. choose? A good sort utility with facilities for records with fields (using a modified heap sort, and using disk base merge sort for very large sets) can be find on my site below (called ssort). Because of the heap sort even the worst case is

Re: What text editor is everyone using for Python

2009-06-04 Thread Albert van der Horst
the word "Quit" in what seems to be some sort of >> status bar? > >Ahhh.. memories of discovering that F7 gets you out of WordPerfect... Memories of Atari 260/520/1040 that had a keyboard with a key actually marked ... HELP. (Sometimes hitting it provided you with help...)

Re: semantics of ** (unexpected/inconsistent?)

2009-12-07 Thread Albert van der Horst
to get a somewhat surprising result. Unary operators -- as long as they are always put up front -- need not have a precedence among themselves, so with this rule they don't need a precedence full stop. ) >Ben Finney Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economi

Re: How to create a docstring for a module?

2009-12-18 Thread Albert van der Horst
you summarize. (Kind of what Ubuntu does: hack?, I have no "hack" but such command could be installed from BSD classical games. ) Groetjes Albert. -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. alb...@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- http://mail.python.org/mailman/listinfo/python-list

Re: Dangerous behavior of list(generator)

2009-12-19 Thread Albert van der Horst
situation. >-- >Gabriel Genellina > Groetjes Albert. -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. alb...@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- http://mail.python.org/mailman/listinfo/python-list

Re: switch

2009-12-21 Thread Albert van der Horst
I will not promote this style of programming as the ultimate alternative for everything. (And it breaks down at a point, sure.) Bottom line: "Give to the Caesar what belongs to the Caesar..." Not adding a switch to python is a matter of taste, good taste as far as I'm concerned. Addi

Re: which pi formula is given in the decimal module documentation?

2009-12-21 Thread Albert van der Horst
a 5th order process before we know it. It would be a big win for large precisions. (Especially if we remember a previous value of pi to start up.) The trick with temporarily increasing precision could be superfluous. (I implemented this once in FORTRAN and was much disappointed that double precision

Re: which pi formula is given in the decimal module documentation?

2009-12-21 Thread Albert van der Horst
In article , Albert van der Horst wrote: >In article , >Mark Dickinson wrote: >>On Dec 11, 10:30=A0am, Mark Dickinson wrote: >>> > It looks like an infinite series with term `t`, where`n` =3D (2k-1)^2 >>> > and `d` =3D d =3D 4k(4k+2) for k =3D 1... Does

Re: which pi formula is given in the decimal module documentation?

2009-12-22 Thread Albert van der Horst
In article <00b967e1$0$15623$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: >Nice work! But I have a question... > >On Mon, 21 Dec 2009 20:40:40 +, Albert van der Horst wrote: > >> def pi4(): >> ' Calculate pi by a 5th order proce

<    3   4   5   6   7   8   9   10   >