Pascal J. Bourguignon wrote:
> sthueb...@googlemail.com (Stefan Hübner) writes:
>
> >> Would it be right to say that the only Lisp still in common use is
> the Elisp >> built into Emacs?
> >
> > Clojure (http://clojure.org) is a Lisp on the JVM. It's gaining
> > more and more traction.
>
> Ther
Haines Brown wrote:
> If we have studied a field obsessively for some
> years, it is natural that we end in a position where our knowledge will
> generally be superior. But this does not make us superior.
What does make us superior? Are you so dishonest or insane as
to assert that everyone is eq
André Thieme wrote:
> (map #(map (fn [s] (Integer/parseInt s)) (.split % "\\s")) (line-seq
> (reader "blob.txt")))
An error results:
java.lang.Exception: Unable to resolve symbol: reader in this context
This works:
(map #(map (fn [s] (Integer/parseInt s)) (.split % "\\s"))
(.split (slurp "ju
w_a_x_...@yahoo.com wrote:
> On Dec 25, 5:24 am, Xah Lee wrote:
>
> > The JavaScript example:
> >
> > // Javascript. By William James
> > function normalize( vec ) {
> > var div=Math.sqrt(vec.map(function(x) x*x).reduce(function(a,b)
> >
André Thieme wrote:
> Xah Lee schrieb:
> > comp.lang.lisp,comp.lang.scheme,comp.lang.functional,comp.lang.pytho
> > n,comp.lang.ruby
> >
> > Here's a interesting toy problem posted by Drew Krause to
> > comp.lang.lisp:
> >
> >
> > On Jan 16, 2:29 pm, Drew Krause wrote [p
William James wrote:
> John W Kennedy wrote:
>
> > Xah Lee wrote:
> > > In lisp, python, perl, etc, you'll have 10 or so lines. In C or
> > > Java, you'll have 50 or hundreds lines.
> >
>
> > Java:
> >
> > static float[] norma
William James wrote:
> John W Kennedy wrote:
>
> > Xah Lee wrote:
> > > In lisp, python, perl, etc, you'll have 10 or so lines. In C or
> > > Java, you'll have 50 or hundreds lines.
> >
>
> > Java:
> >
> > static float[] norma
John W Kennedy wrote:
> Xah Lee wrote:
> > In lisp, python, perl, etc, you'll have 10 or so lines. In C or
> > Java, you'll have 50 or hundreds lines.
>
> Java:
>
> static float[] normal(final float[] x) {
>float sum = 0.0f;
>for (int i = 0; i < x.length; ++i) sum += x[i] * x[i];
>f
Jon Harrop wrote:
> Xah Lee wrote:
> > On Dec 10, 12:37 pm, [EMAIL PROTECTED] wrote:
> >> Ruby:
> > >
> >> def norm a
> >> s = Math.sqrt(a.map{|x|x*x}.inject{|x,y|x+y})
> >> a.map{|x| x/s}
> >> end
> >
> > I don't know ruby, but i tried to run it and it does not work.
> >
> > #ruby
> > def
John Machin wrote:
> On Sep 29, 1:43 am, [EMAIL PROTECTED] wrote:
> > If I have a text file that is delimited by spaces, how do I import it
> > and get to comma delimited? Here is a row of data from the text file:
> >
> > 1110:55:14 265 8.5
> > 1.4+1.1 2.5
On Sep 30, 10:39 am, sophie_newbie <[EMAIL PROTECTED]> wrote:
> Hi, I'm wondering how i'd go about extracting a string array of all
> comments in a HTML file, HTML comments obviously taking the format
> "".
>
> I'm fairly stumped on how to do this? Maybe using regular expressions?
>
> Thanks.
E:\R
On Sep 30, 8:53 am, [EMAIL PROTECTED] wrote:
> Hello everyone,
>
> OK, so I want to split a string c into words using several different
> separators from a list (dels).
>
> I can do this the following C-like way:
>
> >>> c=' abcde abc cba fdsa bcd '.split()
> >>> dels='ce '
> >>> for j in dels:
>
>
André Thieme wrote:
> [EMAIL PROTECTED] schrieb:
> William James schrieb:
> >>> How would you solve this in Python?
> >>> You could embed it inside a lambda and must somehow make the
> >>> variable "it" visible in it, because in the context
André Thieme wrote:
> William James schrieb:
> > André Thieme wrote:
> >> William James schrieb:
> >>
> >>> def nif num, pos, zero, neg
> >>> send( num>0 ? pos : (num==0 ? zero : neg) )
> >>> end
> >> btw, your nif body
André Thieme wrote:
> Paul Rubin schrieb:
> > André Thieme <[EMAIL PROTECTED]> writes:
> >> and the Lisp version has only 9:
> >> nth, 1+, truncate, signum, num, list, pos, zero, neg
> >
> > Oh come on, you have to count the parentheses too.
>
> We could define hundreds of way how to count tok
André Thieme wrote:
> William James schrieb:
>
> > def nif num, pos, zero, neg
> > send( num>0 ? pos : (num==0 ? zero : neg) )
> > end
>
> btw, your nif body is built out of 13 tokens, so more
> complicated than the Python version.
>
>
> André
André Thieme wrote:
> greg schrieb:
> > Ken Tilton wrote:
> >
> >> The reason I post macro expansions along with examples of the macro
> >> being applied is so that one can see what code would have to be
> >> written if I did not have the defskill macro to "write" them for me.
> >
> > It seems to m
[EMAIL PROTECTED] wrote:
> I would be interested in comments about how Common Lisp, Scheme, and
> Haskell deal with the decorate-sort-dedecorate technique.
%w(FORTRAN LISP COBOL).sort_by{|s| s.reverse}
==>["COBOL", "FORTRAN", "LISP"]
--
Common Lisp did kill Lisp. Period. ... It is to Lisp
[EMAIL PROTECTED] wrote:
> On AIX and Linux (SuSE 9.3) each color name which contains "gray" is
> also aliased as "grey" for the benefit of both Yanks and Brits. Thus,
Yankee, n. In Europe, an American. In the Northern States of
our Union, a New Englander. In the Southern States the word is
un
19 matches
Mail list logo