Re: f python?

2012-04-11 Thread WJ
Xah Lee wrote: > > so recently i switched to a Windows version of python. Now, Windows > version takes path using win backslash, instead of cygwin slash. This > fucking broke my find/replace scripts that takes a dir level as input. > Because i was counting slashes. Slashes can work under windows

Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-03-01 Thread WJ
Xah Lee wrote: > fun example. > > in-place algorithm for reversing a list in Perl, Python, Lisp > http://xahlee.org/comp/in-place_algorithm.html > > plain text follows > > > What's “In-place Algorithm”? > > Xah Lee, 2012-02-29 > > This page tells you w

Re: lang comparison: in-place algorithm for reversing a list in Perl, Python, Lisp

2012-02-29 Thread WJ
Xah Lee wrote: > fun example. > > in-place algorithm for reversing a list in Perl, Python, Lisp > http://xahlee.org/comp/in-place_algorithm.html > > plain text follows > > > What's “In-place Algorithm”? > > Xah Lee, 2012-02-29 > > This page tells you w

Re: Lisp refactoring puzzle

2011-07-12 Thread WJ
Petter Gustad wrote: > Xah Lee writes: > > > it's funny, in all these supposedly modern high-level langs, they > > don't provide even simple list manipulation functions such as union, > > intersection, and the like. Not in perl, not in python, not in lisps. > > In Common Lisp you have: > > CL-

Re: Lisp refactoring puzzle

2011-07-12 Thread WJ
Xah Lee wrote: > it's funny, in all these supposedly modern high-level langs, they > don't provide even simple list manipulation functions such as union, > intersection, and the like. Not in perl, not in python, not in lisps. Ruby has them. Intersection: [2,3,5,8] & [0,2,4,6,8] ==>[2, 8] U

Re: toy list processing problem: collect similar terms

2011-02-16 Thread WJ
Xah Lee wrote: > 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 > 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

Re: toy list processing problem: collect similar terms

2011-02-10 Thread WJ
Pascal J. Bourguignon wrote: > Xah Lee 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 > > the same label. So if I have the list