Tim wrote: > If you mean classical electrodynamics then I think that doing it > without diff.geom is insane (though often done).
Futile and frustrating perhaps, insane I'm not so sure?! You can work out Thompson's correction to 473 significant figures with a bit of hand waving and the correctly applied Lorentz-Fitzgerald contraction
> Sure it's `easier' but this is in the same way that Windows is > easier than Unix: it's faster to learn, ...true... > but eventually you just get so frustrated you have to take an > angle-grinder to the computer, and it really takes ages to get > all the little bits of computer out of the carpet.
Even more true, although I prefer a hammer -- depending either a large woodworking mallet or a 2LB lump-hammer -- as you don't have to plug it in. [1]
> QED on the other hand is fully boggle-enabled with or without > diff.geom.
>>>>> "Tim" == Tim Bradshaw <t...@cley.com> writes:
Tim> * Claire Quilty wrote:
>> I am NOT wrong. I am right, and YOU are wrong.
Tim> I wish to put this article forward for consideration as c.l.l posting Tim> of the year.
I second that.
Would this not be something for the Association of Lisp Users? They could ask for nominations in January, have a committe choose the most deserving entry, and then they could post the result on the website.
---------------------------+----------------------------------------------- --- Christian Lynbech | Ericsson Telebit, Fabrikvej 11, DK-8260 Viby J Fax: +45 8675 6881 | email: c...@ericssontelebit.com Phone: +45 8675 6828 | web: www.ericssontelebit.com ---------------------------+----------------------------------------------- --- Hit the philistines three times over the head with the Elisp reference manual. - peto...@hal.com (Michael A. Petonic)
In article <ofwvexi6yt....@chl.ted.dk.eu.ericsson.se>, Christian Lynbech <c...@ericssontelebit.com> wrote:
> >>>>> "Tim" == Tim Bradshaw <t...@cley.com> writes:
> Tim> * Claire Quilty wrote: > >> I am NOT wrong. I am right, and YOU are wrong.
> Tim> I wish to put this article forward for consideration as c.l.l posting > Tim> of the year.
> I second that.
> Would this not be something for the Association of Lisp Users? They > could ask for nominations in January, have a committe choose the most > deserving entry, and then they could post the result on the website.
Be sure to include the actual quote in dispute so that anyone with any knowledge of the matter can see that I am right. :-)
BTW, my Programming Languages class had to turn in that LISP lab today, but at the end of class the prof walked out with the completed lab assignment of only of the more thatn 20 students. Everyone else was scrambling to grok enough LISP to complete the assignment. Guess which student was able to complete the assignment. That's right, me, Claire Quilty....
So by your logic, LISP is superior because (for whatever reason) there are fewer ads for it than C++ or Java? So therefore, by your logic, if LISP had even FEWER ads, it would be even MORE superior. How about some toy language that I may invent -- call it Quilty++ -- which of course has zero responses in the job search engines. I suppose, by your logic this means Quilty++ is very much superior not only to Java and C++, but also to LISP (never mind that all programs in Quilty++ must consist of one and only one statement: x = y ). That shure is some fancy logic ya got there, fella...
Ever faithfully, Your boon and bosom companion, Claire Quilty
In article <8t7nam$5m...@nnrp1.deja.com>, ThaneOfFife
<cr...@my-deja.com> wrote: > BTW, my Programming Languages class had to turn in that LISP lab today, > but at the end of class the prof walked out with the completed lab > assignment of only of the more thatn 20 students. Everyone else was > scrambling to grok enough LISP to complete the assignment. Guess which > student was able to complete the assignment. That's right, me, Claire > Quilty....
* ThaneOfFife <cr...@my-deja.com> | BTW, my Programming Languages class had to turn in that LISP lab | today, but at the end of class the prof walked out with the | completed lab assignment of only of the more thatn 20 students. | Everyone else was scrambling to grok enough LISP to complete the | assignment. Guess which student was able to complete the | assignment. That's right, me, Claire Quilty....p
Does it really make you feel any better to have to post such obvious self-flattery that nobody can verify? You are truly pathetic the way you have to post something so transparently intended to recover some of your lost credibility in your _own_ mind.
#:Erik -- I agree with everything you say, but I would attack to death your right to say it. -- Tom Stoppard
* ThaneOfFife <cr...@my-deja.com> | That shure is some fancy logic ya got there, fella...
It looks like you produced the insanity you insist on stuffing into somebody else's mouth. Try and grow up so you can accept full responsibility for your own lack of ability to think clearly.
Here's a clue for you: We're not talking about languages you invent. Here's another clue for you: Bad craftsmanship begets higher demand for (bad) craftsmen. And yet another clue: If it is so hard to become good at a language that nobody really does, the people who get hired and fired shortly thereafter will be alarmingly higher than for a language that it is possible to learn really well, because the people who do are not in as high circulation.
Go back to hacking some Perl and C++, now, "fella". Those languages are more suitable to people of your intellectual prowess than you will understand, or admit if you do.
#:Erik -- I agree with everything you say, but I would attack to death your right to say it. -- Tom Stoppard
ThaneOfFife <cr...@my-deja.com> writes: > So by your logic, LISP is superior because (for whatever reason) there > are fewer ads for it than C++ or Java? So therefore, by your logic, if > LISP had even FEWER ads, it would be even MORE superior. How about some
I was being sarcastic, mainly. Thing is, I tend to distrust commercial sponsorship, especially when it leads to hyperactive marketing. Take Java, for example. It has taken hold in a market it was unintended for (and I think mostly unsuited for) first due to "industry analysts" who declared it "dead on the client", the area it _was_ suited for, and then by marketing people who made a big deal about Java on the server, an area for which it is decidedly not optimal.
-- vsync http://quadium.net/ - last updated Sat Oct 7 18:53:10 PDT 2000 (cons (cons (car (cons 'c 'r)) (cdr (cons 'a 'o))) ; Orjner (cons (cons (car (cons 'n 'c)) (cdr (cons nil 's))) nil))
ThaneOfFife <cr...@my-deja.com> writes: > BTW, my Programming Languages class had to turn in that LISP lab today, > but at the end of class the prof walked out with the completed lab > assignment of only of the more thatn 20 students. Everyone else was > scrambling to grok enough LISP to complete the assignment. Guess which > student was able to complete the assignment. That's right, me, Claire > Quilty....
So has your opinion of Lisp changed at all? Or are you planning to give it more of a chance? It's my experience that the thrill of initial success in a challenging subject is incredibly addictive...
-- vsync http://quadium.net/ - last updated Sat Oct 7 18:53:10 PDT 2000 (cons (cons (car (cons 'c 'r)) (cdr (cons 'a 'o))) ; Orjner (cons (cons (car (cons 'n 'c)) (cdr (cons nil 's))) nil))
> So by your logic, LISP is superior because (for whatever reason) there > are fewer ads for it than C++ or Java?
No.
And since I am in a good mood tonight, I'll use this opportunity to exercise my teaspoon-mode:
When you see such statistics, there are _several_ possible explanations for their pattern:
1. It could be that programmers of LISP are so efficient that the market only needs a very small number of them.
2. It could be that programmers of other languages are so retarded as to create a mass demand for new programmers to sort out their messes and salvage whatever useful things there might be left in their projects after the crap has been filtered out.
3. It could be that most companies that are searching for LISP programmers, have discovered that advertising for them doesn't work.
4. It could be that LISP programmers have the ability to find good employers that are then able to keep them on for a _long_ time.
5. It could be that the management of most companies out there are unaware of what the good tools are, and unwilling to listen to advice on this from people who know what they are talking about.
6. It could be a combination of the above factors, and I won't rule out that there could be additional factors deciding this.
So, my remark was simply a tongue-in-cheek remark that there could be several explanations for that kind of slant in ad numbers, and that consequently, the numbers themselves could not be taken to either prove or disprove (or even indicate) any theory on their meaning.
-- Arne Knut Roev <akr...@online.no> Snail: N-6141 ROVDE, Norway = The Gates of Hell shall not prevail: Darkness now; then Light!
Friedrich Dominicus <fr...@q-software-solutions.com> writes: > Gareth.McCaug...@pobox.com (Gareth McCaughan) writes:
> > Oh, and if we're playing the intuitive-appeal-to-novices > > game, consider
> > (loop for n from 1 upto 10 sum n) ==> 55
> Haskell: > sum [1 .. 10]
> ;-)
> > and try to find another language in which that could be > > expressed as neatly. :-)
> Now I guess I found it ;-)
Gimme a break! :)
(defun sum (&optional (lower 0) (upper lower)) (loop for n from lower upto upper sum n)) * (sum) 0 * (sum 0 1) 1 * (sum 1 0) 0 * (sum 1 4) 10 *
Cheers
-- Marco Antoniotti ============================================================= NYU Bioinformatics Group tel. +1 - 212 - 998 3488 719 Broadway 12th Floor fax +1 - 212 - 995 4122 New York, NY 10003, USA http://galt.mrl.nyu.edu/valis Like DNA, such a language [Lisp] does not go out of style. Paul Graham, ANSI Common Lisp
Ian Wild <i...@cfmu.eurocontrol.be> writes: > Tim Olson wrote:
> > In article <39EE472C.F02FC...@fisec.com>, Robert Monfera > > <monf...@fisec.com> wrote:
> > | Gareth McCaughan wrote: > > | > > | > Oh, and if we're playing the intuitive-appeal-to-novices > > | > game, consider > > | > > > | > (loop for n from 1 upto 10 sum n) ==> 55 > > | > > > | > and try to find another language in which that could be > > | > expressed as neatly. :-)
> > In Smalltalk, this would be:
> > (1 to: 10) sum
> Still, APL's
> +/i10
> remains the most intuitive. Or would, if this > keyboard had a lower case iota.
(reduce #'+ (iota 10))
Cheers
-- Marco Antoniotti ============================================================= NYU Bioinformatics Group tel. +1 - 212 - 998 3488 719 Broadway 12th Floor fax +1 - 212 - 995 4122 New York, NY 10003, USA http://galt.mrl.nyu.edu/valis Like DNA, such a language [Lisp] does not go out of style. Paul Graham, ANSI Common Lisp
> (defun sum (&optional (lower 0) (upper lower)) > (loop for n from lower upto upper sum n))
Not entirely fair, I think. More like
(defun sum (list) (reduce #'+ list)) (defun range (lower upper) (loop for n from lower upto upper collect n))
except that Haskell is lazy so it's really more like using SERIES.
(The point is that the snippet of Haskell above is displaying two useful and concisely-expressed abstractions, not a single, rather useless, sum-of-arithmetic-progression function.)
-- Gareth McCaughan Gareth.McCaug...@pobox.com sig under construc
> (defun sum (&optional (lower 0) (upper lower)) > (loop for n from lower upto upper sum n))
Do you guys really need a loop for summing a series of integers?!?
I can tell you without switching to my lisp listener that sum[1..100] = (1 + 100) + (2 + 99) + ... + ( 50 + 51) = = (1 + 100) * 50 = 5050
Homework #1: name the matemathician who was asked by a teacher to sum all integers between 1 and 100 in the hope that he is going to sit tight for a good while (no HP calculators that time).
Homework #2: generalize the above algorithm and write a CL function that sums [n .. m] in O(1) time.
Gareth McCaughan wrote: > > > Haskell: > > > sum [1 .. 10] > (defun sum (list) (reduce #'+ list)) > (defun range (lower upper) > (loop for n from lower upto upper collect n))
> except that Haskell is lazy so it's really more like > using SERIES.
> (The point is that the snippet of Haskell above is > displaying two useful and concisely-expressed abstractions, > not a single, rather useless, sum-of-arithmetic-progression > function.)
Series will translate the two functions into one loop (two loops and lots of consing if you use generic functions or use optional arguments). Would not haskell be smarter? Is there a pure, lazy functional language environment which has a decent disassemble?
> Do you guys really need a loop for summing a series of integers?!?
Yes, yes, yes. Because the third most important programm (you know the two other, don't you, the factorial is as important. With my limited mental capacity I can write
sum [1 .. 10] -> whatever ;-) AND product [1..10] -> factorial ;-)
So I just have to remember switching from sum to product. That suits me ;-)))
Regards Friedrich -- for e-mail reply remove all after .com
Robert Monfera <monf...@fisec.com> writes: > Marco Antoniotti wrote:
> > Gimme a break! :)
> > (defun sum (&optional (lower 0) (upper lower)) > > (loop for n from lower upto upper sum n))
> Do you guys really need a loop for summing a series of integers?!?
> I can tell you without switching to my lisp listener that > sum[1..100] = (1 + 100) + (2 + 99) + ... + ( 50 + 51) = > = (1 + 100) * 50 > = 5050
> Homework #1: name the matemathician who was asked by a teacher to sum > all integers between 1 and 100 in the hope that he is going to sit > tight for a good while (no HP calculators that time).
> Homework #2: generalize the above algorithm and write a CL function that > sums [n .. m] in O(1) time.
> And nobody dare to help Marco!
You know I HATE these problems. My mind is already spinning. <:{
Cheers
-- Marco Antoniotti ============================================================= NYU Bioinformatics Group tel. +1 - 212 - 998 3488 719 Broadway 12th Floor fax +1 - 212 - 995 4122 New York, NY 10003, USA http://galt.mrl.nyu.edu/valis Like DNA, such a language [Lisp] does not go out of style. Paul Graham, ANSI Common Lisp
> > (defun sum (&optional (lower 0) (upper lower)) > > (loop for n from lower upto upper sum n))
> Do you guys really need a loop for summing a series of integers?!?
> I can tell you without switching to my lisp listener that > sum[1..100] = (1 + 100) + (2 + 99) + ... + ( 50 + 51) = > = (1 + 100) * 50 > = 5050
> Homework #1: name the matemathician who was asked by a teacher to sum > all integers between 1 and 100 in the hope that he is going to sit > tight for a good while (no HP calculators that time).
Gauss
> Homework #2: generalize the above algorithm and write a CL function that > sums [n .. m] in O(1) time.
= m(m+1)/2 - n(n-1)/2
/Jon
-- Jon Anthony Synquiry Technologies, Ltd. Belmont, MA 02478, 617.484.3383 "Nightmares - Ha! The way my life's been going lately, Who'd notice?" -- Londo Mollari
Robert Monfera <monf...@fisec.com> writes: > Marco Antoniotti wrote:
[...]
> Do you guys really need a loop for summing a series of integers?!?
[...]
> Homework #1: name the matemathician who was asked by a teacher to sum > all integers between 1 and 100 in the hope that he is going to sit > tight for a good while (no HP calculators that time).
[...]
Perhaps you mean the mathematician Gauss (as a child), of whom this story is sometimes told.
Sadly there seems to be little historical basis for the story.
D
-- David A Vincent <mailto:dav...@hsa.com.au> Analyst/Programmer HSA net <http://1.0.0.246/> Hydrographic Sciences Australia HSA Sydney phone extension #28 Strunk and White: "Omit needless words"
Robert Monfera wrote: > Do you guys really need a loop for summing a series of integers?!?
I assure you that I don't, which is why I called it "rather useless" and said there was more to the Haskell example than a function for the specific task of summing sequences of consecutive integers.
> Homework #1: name the matemathician who was asked by a teacher to sum > all integers between 1 and 100 in the hope that he is going to sit > tight for a good while (no HP calculators that time).
For extra credit, name the teacher. (No, the teacher wasn't anyone famous.)
> Homework #2: generalize the above algorithm and write a CL function that > sums [n .. m] in O(1) time.
O(log n log log n) or something of the sort, surely? :-)
-- Gareth McCaughan Gareth.McCaug...@pobox.com sig under construc
> > > (defun sum (&optional (lower 0) (upper lower)) > > > (loop for n from lower upto upper sum n))
> > Do you guys really need a loop for summing a series of integers?!?
> > I can tell you without switching to my lisp listener that > > sum[1..100] = (1 + 100) + (2 + 99) + ... + ( 50 + 51) = > > = (1 + 100) * 50 > > = 5050
> > Homework #1: name the matemathician who was asked by a teacher to sum > > all integers between 1 and 100 in the hope that he is going to sit > > tight for a good while (no HP calculators that time).
> Gauss
> > Homework #2: generalize the above algorithm and write a CL function that > > sums [n .. m] in O(1) time.
> = m(m+1)/2 - n(n-1)/2
Well this brings us to another nice feature of Common Lisp: Compiler Macros.
; Well, let's optimize atleast a bit for speed and less debugging (proclaim '(optimize (speed 2) (safety 1) (debug 1)))
; our iota (defun iota (n) (loop for i upto n collect i))
; our naive sum (defun sum (list) (reduce #'+ list))
; let's try it. conses the intermediate list (sum (iota 100))
; let's define the shortcut from Mr. Gauss (defun sum-iota (n) (/ (* n (1+ n)) 2))
; see it work. No list involved. (sum-iota 100)
; Now a compiler macro. If we see a form (sum (iota something)) we replace it ; by (sum-iota something). (define-compiler-macro sum (&whole form arg) (cond ((and (listp arg) (eq (first arg) 'iota)) `(sum-iota ,(second arg))) (t form)))
; trace sum-iota (trace sum-iota)
; a test, should do the usual reduce (defun test0 () (sum '(1 2 3))) (test0)
; another test. should be optimized. no intermediate list. (defun test () (sum (iota 100))) (test)
; we change the implementation. ; let's define an assoc-list of ( test-function transformer-function) ; this let's us add new optimizers at any time, by adding to this assoc-list. (defparameter *sum-transformers* `((,(lambda (form) (and (listp form) (eq (first form) 'iota))) ,(lambda (form) `(sum-iota ,(second form)))) (,(lambda (form) (and (listp form) (eq (first form) 'quote))) ,(lambda (form) (sum (first (rest form)))))))
; Okay, the simplified compiler macro (define-compiler-macro sum (&whole form arg) (let ((transformer (second (assoc arg *sum-transformers* :test (lambda (form test-fn) (funcall test-fn form)))))) (if transformer (funcall transformer arg) form)))
; trace everything (trace iota reduce sum)
; a few tests. See when the functions are being called, ; by the compiler or at runtime
> On Thu, 02 Nov 2000 19:08:49 -0500, Jon S Anthony <j...@synquiry.com> wrote: > >Robert Monfera wrote: > >> Homework #2: generalize the above algorithm and write a CL function that > >> sums [n .. m] in O(1) time.
> >= m(m+1)/2 - n(n-1)/2
> you're not generalizing, you're just using the above algorithm. > a generalisation would be:
> = (m-n+1)(m+n)/2
I'd call this a reduction, not a generalization.
> which has the same form as 'm(m+1)/2'
Change this to k(k+1)/2 so we don't mix up our m's and n's :-). Given this, I am unsure why you think your reduced version is of the same form. k can't be m or n here, nor does it work for either of (m-n) or (m+n). What am I missing?
/Jon
-- Jon Anthony Synquiry Technologies, Ltd. Belmont, MA 02478, 617.484.3383 "Nightmares - Ha! The way my life's been going lately, Who'd notice?" -- Londo Mollari