reading file to list

André Thieme address.good.until.2009.may.11 at justmail.de
Sat Jan 17 20:25:00 EST 2009


Xah Lee schrieb:
> Xah Lee wrote:
>> • A Ruby Illustration of Lisp Problems
>>  http://xahlee.org/UnixResource_dir/writ/lisp_problems_by_ruby.html
> 
> 
> On Jan 17, 12:30 pm, André Thieme <address.good.until.
> 2009.may... at justmail.de> wrote:
> 
> 
>> In the Lisp style Clojure for example one does exactly the same as
>> Jillian James (JJ) did in Ruby:
> 
>> (map #(map (fn [s] (Integer/parseInt s)) (.split % "\\s")) (line-seq
>> (reader "blob.txt")))
> 
> Note that you have nested map. This is a problem of function chaning
> as i detailed.

Yes, Jillian also has nested maps:
IO.readlines("blob.txt").map{|line| line.split.map{|s| s.to_i }}


> The other problem of cons, is commonly seen. Just about every week, we
> see some perhaps beginning lisper asking how to do various trivial
> list
> manipulation problem, which you don't see such question or frequency
> in any of modern high level lang forms.

You see questions about trivial problems every week in all forums about
programming languages.
It has nothing to do with conses. Wrong road.


> The frequently asked list manipulation question we see include how to
> append, prepend, or anything involving nested list such as
> partitioning, reordering sublists, getting leaves, interpretation of
> leaves, etc. This is caused by the cons.

Yes, same with all containers in all programming languages.


> The clojure example you gave above, apparently inherited the irregular
> syntax problem. (you see the #, [], % things, which is breaks the
> lisp's sexp idea)

My code used 8 “mysterious symbols”:
(  )  #  [  ]  .  "  %

The Ruby version had these 7:
(  )  |  {  }  .  "

And of course, neither in Ruby nor Clojure they break any idea.



> Also, all modern lisp basically all get fucked up by
> inheriting the cons (e.g. clojure, NewLisp, Arc lisp, Liskell). Often,
> they change the semantic a bit apparently as a mesaure towards solving
> the cons problem. (and Qi Lisp creates a huge bag of ad hoc, extremely
> ugly, syntax soup)

Funny.
What you write is an english text with words that most people can 
understand.
You trick them into thinking that it actually makes sense what you say.
It is so technical, that a random would believe it.
But what you really say is about as meaningful as saying that it is
impossible to write good programs in Python, because it adds whitespace
to its syntax.


> • Fundamental Problems of Lisp
>   http://xahlee.org/UnixResource_dir/writ/lisp_problems.html

You wasted lots of your time. Or was this maybe generated by a bot?
Maybe http://pdos.csail.mit.edu/scigen/ or something like that?
I also found this paper that you wrote:
http://apps.pdos.lcs.mit.edu/scicache/184/scimakelatex.7076.Xah+Lee.html
Another crap posting of you. But a random person might be impressed.


André
-- 



More information about the Python-list mailing list