Re: toy list processing problem: collect similar terms

2010-09-29 Thread w_a_x_man
On Sep 26, 9:24 am, p...@informatimago.com (Pascal J. Bourguignon) wrote: Xah Lee xah...@gmail.com writes: here's a interesting toy list processing problem. 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

Re: sed/awk/perl: How to replace all spaces each with an underscore that occur before a specific string ?

2009-08-22 Thread w_a_x_man
On Aug 22, 1:11 pm, bolega gnuist...@gmail.com wrote: sed/awk/perl: How to replace all spaces each with an underscore that occur before a specific string ? I really prefer a sed one liner. Example Input :  This is my book. It is too  thick to read. The author gets little royalty but the

Re: Xah's Edu Corner: The importance of syntax notations.

2009-08-16 Thread w_a_x_man
On Aug 16, 11:05 am, Petey Keller psil...@merlin.cs.wisc.edu wrote: Compiler go through *great* pains Compiler work real hard. Compiler have heap big trouble. -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematica 7 compares to other languages

2008-12-25 Thread w_a_x_man
On Dec 25, 5:24 am, Xah Lee xah...@gmail.com 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) a+b))   return vec.map(function(x) x/div) } is also not qualified. (it is syntax error

Re: Mathematica 7 compares to other languages

2008-12-10 Thread w_a_x_man
On Dec 5, 9:51 am, Xah Lee [EMAIL PROTECTED] wrote: For those of you who don't know linear algebra but knows coding, this means, we want a function whose input is a list of 3 elements say {x,y,z}, and output is also a list of 3 elements, say {a,b,c}, with the condition that a =