Re: toy list processing problem: collect similar terms

2010-09-26 Thread Dr.Ruud
On 2010-09-26 06:05, Xah Lee wrote: I have a list of lists, where each sublist is labelled by a number. I need to collect together the contents of all sublists sharing the same label. So if I have the list ((0 a b) (1 c d) (2 e f) (3 g h) (1 i j) (2 k l) (4 m n) (2 o p) (4 q r) (5 s t)) where

Re: regular expression negate a word (not character)

2008-02-01 Thread Dr.Ruud
Greg Bacon schreef: > Dr.Ruud: >> I negated the test, to make the regex simpler: [...] > > Yes, your approach is simpler. I assumed from the "need it all > in one pattern" constraint that the OP is feeding the regular > expression to some other program that is looki

Re: regular expression negate a word (not character)

2008-01-28 Thread Dr.Ruud
Greg Bacon schreef: > #! /usr/bin/perl > > use warnings; > use strict; > > use constant { > MATCH=> 1, > NO_MATCH => 0, > }; > > my @tests = ( > [ "winter tire",=> MATCH ], > [ "tire", => MATCH ], > [ "retire", => MATCH ],

Re: I am giving up perl because of assholes on clpm -- switching to Python

2007-08-11 Thread Dr.Ruud
RedGrittyBrick schreef: > treasure the saints, tolerate the irritable and > ignore the whiners. *You are what you read.* What is "irritating" to some, is "to the point" to others. That should say enough, but some people just can not stand short replies, they can not hold themselves back from rea

Re: I am giving up perl because of assholes on clpm -- switching to Python

2007-08-11 Thread Dr.Ruud
grocery_stocker schreef: > In the beginning there was Mathematics > And all was good > Then one day God said "Let there be the Lambda Calculus" > And hence the Lambda Calculus was born. > However, God felt the the Lambda Calculus needed a mate > So god said "Let there be Lisp" > And thus, Lisp was

Re: I am giving up perl because of assholes on clpm -- switching to Python

2007-08-11 Thread Dr.Ruud
Paul Boddie schreef: > let us > avoid comp.lang.python becoming some kind of linux-kernel ego trip > where anyone who has stuck around has an interest in perpetuating a > hostile atmosphere. "When did you stop beating your wife?" -- Affijn, Ruud "Gewoon is een tijger." -- http://mail.python.

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread Dr.Ruud
Peter J. Holzer schreef: > Since a day with a leap second has 86401 seconds (or 86399, but that > hasn't happened yet) Many systems allow a seconds value of 0..61, so minutes (actually months) with two leap seconds are foreseen. A leap second may be introduced at the end of any month, the prefer

Re: what are the most frequently used functions?

2006-10-28 Thread Dr.Ruud
robert schreef: > read more of the context and answer to the OP That OP is invisible in most relevant contexts. -- Affijn, Ruud "Gewoon is een tijger." -- http://mail.python.org/mailman/listinfo/python-list

Re: A Sort Optimization Technique: decorate-sort-dedecorate

2006-08-28 Thread Dr.Ruud
Jim Gibson schreef: > The problem addressed by what is know in Perl as the 'Schwartzian > Transform' is that the compare operation can be an expensive one, > regardless of the whether the comparison uses multiple keys. Since in > comparison sorts, the compare operation will be executed N(logN) > t

Re: What is a type error?

2006-07-16 Thread Dr.Ruud
Chris F Clark schreef: > If you have a fixed database, and you do two selects which specify the > same sets of fields to be selected and the same keys to select records > with, one expects the two selects to return the same values. When your "fixed" means read-only, or (fully) locked, then yes.

Re: languages with full unicode support

2006-07-01 Thread Dr.Ruud
Chris Uppal schreef: > Since the interpretation of characters which are yet to be added to > Unicode is undefined (will they be digits, "letters", operators, > symbol, punctuation ?), there doesn't seem to be any sane way > that a language could allow an unrestricted choice of Unicode in > ide

Re: What is Expressiveness in a Computer Language

2006-06-27 Thread Dr.Ruud
Chris Smith schreef: > So it seems to me that we have this ideal point at which it is > possible to write all correct or interesting programs, and impossible > to write buggy programs. I think that is a misconception. Even at the idealest point it will be possible (and easy) to write buggy progra

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Dr.Ruud
Marshall schreef: > Rob Thorpe: >> Can I make a type in C that can only have values between 1 and 10? >> How about a variable that can only hold odd numbers, or, to make it >> more difficult, say fibonacci numbers? > > Well, of course you can't in *C*; you can barely zip you pants with C. > But I

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Dr.Ruud
Chris Smith schreef: > Static types are not fuzzy Static types can be fuzzy as well. For example: a language can define that extra accuracy and bits may be used for the implementation of calculations: d = a * b / c Often some minimum is guaranteed. > I see it as quite reasonable when there's an

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Dr.Ruud
Rob Thorpe schreef: > I would suggest that at least assembly should be referred to as > "untyped". There are many different languages under the umbrella of "assembly", so your suggestion is bound to be false. -- Affijn, Ruud "Gewoon is een tijger." -- http://mail.python.org/mailman/listinfo

Re: What is Expressiveness in a Computer Language

2006-06-23 Thread Dr.Ruud
Marshall schreef: > It seems we have languages: > with or without static analysis > with or without runtime type information (RTTI or "tags") > with or without (runtime) safety > with or without explicit type annotations > with or without type inference > > Wow. And I don't think that's a complete

Typing (was: Re: What is Expressiveness in a Computer Language)

2006-06-22 Thread Dr.Ruud
Timo Stamm schreef: > This is actually one of the most interesting threads I have read in a > long time. If you ignore the evangelism, there is a lot if > high-quality information and first-hand experience you couldn't find > in a dozen books. Much of what is talked about, is in these articles (a

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Dr.Ruud
Rob Thorpe schreef: > Dr.Ruud: >> Marshall: >>> "dynamic types." I don't have a firm definition for >>> that term, but my working model is runtime type tags. In which >>> case, I would say that among statically typed languages, >&

Re: What is Expressiveness in a Computer Language

2006-06-21 Thread Dr.Ruud
Marshall schreef: > "dynamic types." I don't have a firm definition for > that term, but my working model is runtime type tags. In which > case, I would say that among statically typed languages, > Java does have dynamic types, but C does not. C++ is > somewhere in the middle. C has union. -- A

Re: What is Expressiveness in a Computer Language

2006-06-16 Thread Dr.Ruud
Torben Ægidius Mogensen schreef: > Bugs that in dynamically typed languages would > require testing to find are found by the compiler in a statically > typed language. So whil[e ]it may take [l]onger to get a program that[ ] > gets past the compiler, it takes less time to get a program that works

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

2006-05-07 Thread Dr.Ruud
Paul Rubin schreef: > a cryptographic PRNG seeded with good entropy is supposed to be > computationally indistinguishable from physical randomness Doesn't your "good entropy" include "physical randomness"? -- Affijn, Ruud "Gewoon is een tijger." -- http://mail.python.org/mailman/listinfo/py

Re:

2006-04-29 Thread Dr.Ruud
Tagore Smith schreef: > [addressing John Bokma] > your objection seems to be less about the > crossposting, and more about the content. Why do you think that? -- Affijn, Ruud "Gewoon is een tijger." -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-23 Thread Dr.Ruud
[EMAIL PROTECTED] schreef: > The solution that would have the most utility would be one where the > elements are generated one-by-one, loop-like, so that they can be used > in the body of a loop, and to avoid the fact that even with exclusion > the cardinality of the target set EX^n could be in th

Re: Programming challenge: wildcard exclusion in cartesian products

2006-03-16 Thread Dr.Ruud
[EMAIL PROTECTED] schreef: > There are many sites > dedicated to reasonably objective comparisons between languages. Here > are two examples: > > http://www.smallscript.org/Language%20Comparison%20Chart.asp > http://www.jvoegele.com/software/langcomp.html http://shootout.alioth.debian.org/ -

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

2005-10-17 Thread Dr.Ruud
Xah Lee: > In Perl, spliting a full path into parts is done like this: And then follows Perl-code that only works with an optional .html "extension", which is similar to the code in the File::Basename description. http://www.perl.com/doc/manual/html/lib/File/Basename.html It is best practice to

Re: Jargons of Info Tech industry

2005-10-09 Thread Dr.Ruud
Roedy Green: > (Note that the most > common spam is the Nigerian con and variants which comes as a > non-formatted message.) Don't think that that is true for everybody. For example not for people that are behind central filters that already cope with common spam. -- Affijn, Ruud

Re: Jargons of Info Tech industry

2005-10-09 Thread Dr.Ruud
Mike Meyer: > Try qmail - it may solve the problem with a lot less work. I checked my .procmailrc, and saw that mail with qmail anywhere in the headers, goes to a spambox here. ;) -- Affijn, Ruud "Gewoon is een tijger." -- http://mail.p

Re: Jargons of Info Tech industry

2005-10-09 Thread Dr.Ruud
Mike Meyer: > Paul Rubin: >> I read mail over an ssh connection to a Unix shell. I have no easy >> way to read html email with a graphics browser. > > You don't need a grahics browser - you just need a browser. I read > mail in emacs, and use emacs-w3m to view html in the mailer. Works for > most