Re: Making safe file names

2013-05-28 Thread Albert van der Horst
device name hole. There may be trouble with >artists named 'COM4', 'CLOCK$', 'Con', or similar. > >http://support.microsoft.com/kb/74496 That applies to MS-DOS names. God forbid that this still holds on more modern Microsoft operating systems? >http://e

Re: Homework help requested (not what you think!)

2013-07-18 Thread Albert van der Horst
re certified intelligent and skilled and disciplined in learning.] The lesson that is in there for you is to not hold your students back. They may surprise you! Groetjes Albert > >ChrisA -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimat

Re: Understanding other people's code

2013-07-27 Thread Albert van der Horst
top of that in terms of that usage. That is how good programmers build there programs. Once there is a certain level they don't think about what's underneath, but concentrate on how to use it. If it is done really well, each source module can be understood on its own. All this is of course

Re: Prime number generator

2013-07-30 Thread Albert van der Horst
prime[i]=i+i > i+=1 > if i==smallest: i+=1 > >gen=primes() >for i in range(30): > print(next(gen),end="\t") # Star Trek? >print() ># -- end -- -- 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: Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-22 Thread Albert van der Horst
aterfall side and an airport where the personell is on strike. (Oh the noise, the noise is unbearable!). I have not, nor intend to write gui things in Python, I just give an impression. [ I want my gui's to be functional, not beautiful. ] > >http://www.codebykevin.com/quickwho-main

Re: code review

2012-07-13 Thread Albert van der Horst
89284/why-does-0-5-3-return-true/ > >And surprising: > >http://answers.yahoo.com/question/index?qid=20090923172909AA4O9Hx > >C-like semantics are a clear case of purity of implementation overruling >functional usefulness. The worst of is, of course, = for assignment instead of :=

Re: Using a CMS for small site?

2012-07-13 Thread Albert van der Horst
dged CMS even needed for something like that? Good old rcs would be fine. It is oldfashioned, so you need only 4 commands, compared to a bewildering display of icons. mkdir RCS ci * rcs -NSTABLE1: RCS/* Backup by tar cf /media/MYSTICK/project.tar RCS > >Thank you. -- -- Albert van de

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Albert van der Horst
in the proper context. cost= 3.75 print( cost ) > >Same with converting objects to bools. I think "if" is sufficient context to convert something to a boolean. It now is a matter of good taste and what fits best in Python as a whole. Nothing to be dogmatic about. Groetjes Albert --

Re: Implicit conversion to boolean in if and while statements

2012-07-16 Thread Albert van der Horst
_which_are_all_integers_but_might_later_have_more_or_fewer_values_or_other_types > = list([1, 2, integer_value_three]) > >because you can never have too much explicitness. Who wouldn't want >to read code like that? Java programmers? (Couldn't resist ;-) ) >-- >Steven

Re: code review

2012-07-17 Thread Albert van der Horst
In article , Duncan Booth wrote: >Steven D'Aprano wrote: > >> On Fri, 13 Jul 2012 12:30:47 +0000, Albert van der Horst wrote: >>> The worst of is, of course, = for assignment instead of := . This is >>> a convention that Python follows, to my dismay. >

Re: Encapsulation, inheritance and polymorphism

2012-07-23 Thread Albert van der Horst
ve one exit? Example from recipee's: Stirr until the egg white is stiff. Alternative: Stirr egg white for half an hour, but if the egg white is stiff keep your spoon still. (Cooking is not my field of expertise, so the wording may not be quite appropriate. ) >-- >Steven Gr

Re: Encapsulation, inheritance and polymorphism

2012-07-23 Thread Albert van der Horst
aedter: Goedel, Escher, Bach. > >-- >Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/ Groetjes Albert 1] The likes of Brouwer found these silly exercises.) -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimat

Re: how to detect the character encoding in a web page ?

2013-01-14 Thread Albert van der Horst
pt. This one he got from Stalin. >the only way to survive in the unicode world. Write defensive code. >Wrap try blocks around calls that might raise exceptions if the external >data is borked w/r/t what the metadata claims it should be. The way to go, of course. Groetjes Albert -- Alber

Re: generate Windows exe on Linux

2012-02-26 Thread Albert van der Horst
ood is it? Actually it is good enough to run the above emulator! (We run a third emulator, of the GA144, on top at a decent speed.) 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: OT: Entitlements [was Re: Python usage numbers]

2012-02-26 Thread Albert van der Horst
to-genius into Harvard. Otherwise they will become the master-minds of crime. And you will be too stupid to beat 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 -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Entitlements [was Re: Python usage numbers]

2012-02-26 Thread Albert van der Horst
ho deny freedom to others deserve it not for themselves." >"Man is free at the moment he wishes to be." >"Those who desire to give up freedom in order to gain security, will >not have, nor do they deserve, either one." Black Panther comes to mind. The USA just kille

Re: Numerical Linear Algebra in arbitrary precision

2012-02-27 Thread Albert van der Horst
t all. If you mean that you want to be able to select something with larger precision than single or double floats, numpy is the starting point. > >Appreciate any comments. > >Ken Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponent

Re: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-03-12 Thread Albert van der Horst
icate that it *does* matter is a bit perverse, but the Perl people are not to blame if they use a term in their usual sense. 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: New Science Discovery: Perl Idiots Remain Idiots After A Decade!New Science Discovery: Perl Idiots Remain Idiots After A Decade!

2012-03-12 Thread Albert van der Horst
In article <4f5df4b3$0$1375$4fafb...@reader1.news.tin.it>, Kiuhnm wrote: >On 3/12/2012 12:27, Albert van der Horst wrote: >> Interestingly in mathematics associative means that it doesn't matter >> whether you use (a.b).c or a.(b.c). >> Using xxx-associativity t

Re: are int, float, long, double, side-effects of computer engineering?

2012-03-13 Thread Albert van der Horst
on't understand what a condition number is, you can't use Mathematica. And yes condition numbers are fully in the realm of concepts of machine precisions and accuracy. Infinite precision takes infinite time. Approaching infinite precious may take exponentional time. > > Xah Groet

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-18 Thread Albert van der Horst
program of the Turing is e.g. F, to be thought of as hard wiring. A Turing machine is *not* a stored program computer! The universal Turing machine is, it contains a hardwired program to execute a stored program on the tape. > >-- >Steven Groetjes Albert -- -- Albert van der Horst, UTR

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-18 Thread Albert van der Horst
e harder algorithms like T (Toom Cook) that must be translated to recursive functions that pass data down. That took me quite a wile. The correct answer is, it is just labour. Deal with it. Note that if you want to translate it to assembler, it is relatively easy. > >kind regards, Antti J

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
be not zero. Any hints appreciated. 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 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
ks again for your input. > >---Andrew > 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: 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
400 600970 0500 0600 0700 0800 Contents of section .comment: 4743433a 20284465 6269616e 20342e34 GCC: (Debian 4.4 0010 2e352d38 2920342e 342e3500 .5-8) 4.4.5. > > >> >> -- >> Steven >>

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
MP You will see the bytes, represented in base 16, but PAD just contains 11 PAD ? 11 OK In forth you can change the number base. That doesn't affect PAD but the output is different HEX PAD ? B OK DECIMAL 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: 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
t it never looses it special meaning. Same for [ . * means zero more of the preceeding char. This makes + superfluous (a mere convenience) as [1-3]+ can be expressed as [1-3][1-3]* Note that [1-3]* matches the empty string. This happens a lot. Groetjes Albert >-- >Steven -- 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: 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: 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" &

  1   2   3   >