Re: which one do you prefer? python with C# or java?

2012-06-15 Thread Paul Rubin
Alexander Blinne n...@blinne.net writes: def gen_s(): s = [1] m = skipdups(heapq.merge(*[(lambda j: (k*j for k in s))(n) for n in [2,3,5]])) yield s[0] while True: k = m.next() s.append(k) yield k Nice. I wouldn't have been sure that for k in s worked properly

Re: which one do you prefer? python with C# or java?

2012-06-15 Thread Alexander Blinne
On 15.06.2012 09:00, Paul Rubin wrote: Alexander Blinne n...@blinne.net writes: def gen_s(): s = [1] m = skipdups(heapq.merge(*[(lambda j: (k*j for k in s))(n) for n in [2,3,5]])) yield s[0] while True: k = m.next() s.append(k) yield k Nice. I wouldn't have

Re: which one do you prefer? python with C# or java?

2012-06-15 Thread Tomasz Rola
On Fri, 15 Jun 2012, Alexander Blinne wrote: How do Haskell or Scheme determine when elements are not longer needed? Just like Python, they use garbage collection - in one sentence, if it can be proved the object (not a OO-object, just a piece of data) will no longer be needed, it can be

Re: which one do you prefer? python with C# or java?

2012-06-15 Thread Paul Rubin
Alexander Blinne n...@blinne.net writes: An Element of s could be discarded, after every one of the three (k*j for k in s)-generators went over it. I don't think that this is possible with one deque (at least with the built-in merger of heapq, a self-written one could be adapted). Storing

Re: which one do you prefer? python with C# or java?

2012-06-15 Thread Terry Reedy
On 6/15/2012 1:03 PM, Tomasz Rola wrote: Last time I checked, Python didn't have linked lists - arrayed lists are nice, but their elements can't be automatically GC-ed (or, this requires very nontrivial GC algorithm), the easiest way I can think would be replacing them with None manually. I'm

Re: which one do you prefer? python with C# or java?

2012-06-15 Thread Paul Rubin
Terry Reedy tjre...@udel.edu writes: Python iterators can do lazy evaluation. All the builtin classes come with a corresponding iterator. ... I wouldn't say iterators do lazy evaluation in the Scheme or Haskell sense. Lazy evaluation imho means evaluation is deferred until you actually try to

Re: which one do you prefer? python with C# or java?

2012-06-15 Thread Terry Reedy
On 6/15/2012 3:04 PM, Paul Rubin wrote: Terry Reedytjre...@udel.edu writes: Python iterators can do lazy evaluation. All the builtin classes come with a corresponding iterator. ... I wouldn't say iterators do lazy evaluation in the Scheme or Haskell sense. Lazy evaluation imho means

Re: which one do you prefer? python with C# or java?

2012-06-15 Thread Tomasz Rola
On Fri, 15 Jun 2012, Terry Reedy wrote: On 6/15/2012 1:03 PM, Tomasz Rola wrote: Last time I checked, Python didn't have linked lists - arrayed lists are nice, but their elements can't be automatically GC-ed (or, this requires very nontrivial GC algorithm), the easiest way I can think

Re: which one do you prefer? python with C# or java?

2012-06-15 Thread Alec Taylor
On Sun, Jun 10, 2012 at 8:44 AM, Yesterday Paid howmuchisto...@gmail.com wrote: I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) So, I consider C# with ironpython or Java with Jython. It's a hard

Re: which one do you prefer? python with C# or java?

2012-06-14 Thread Albert van der Horst
In article 7xwr3fjff8@ruckus.brouhaha.com, Paul Rubin no.email@nospam.invalid wrote: Matej Cepl mc...@redhat.com writes: The point is that you are never interested in learning *a language*, everybody who has at least some touch with programming can learn most languages in one session in

Re: which one do you prefer? python with C# or java?

2012-06-14 Thread Paul Rubin
http://blog.tmorris.net/understanding-practical-api-design-static-typing-and-functional-programming/ When I'm satisfied with a program, it has this ethereal property that if the problem is slightly altered, the program is only slightly altered. One thing I find with Haskell: the type system

Re: which one do you prefer? python with C# or java?

2012-06-13 Thread Tomasz Rola
On Tue, 12 Jun 2012, Tim Johnson wrote: I concur, I worked in C and C++ for 12 years. I added C++ later in my programming life. I don't recommend C++ for single programmers. - that is to say - 1 coder for 1 codebase. One can do good enough OOP in ansi C believe it or not, I learned

Re: which one do you prefer? python with C# or java?

2012-06-12 Thread Tim Johnson
* Tomasz Rola rto...@ceti.pl [120611 11:18]: On Sat, 9 Jun 2012, Yesterday Paid wrote: I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) So, I consider C# with ironpython or Java with Jython.

Re: which one do you prefer? python with C# or java?

2012-06-12 Thread rusi
On Jun 12, 3:19 am, Matej Cepl mc...@redhat.com wrote: On 11/06/12 06:20, rusi wrote: Hi Matěj! If this question is politically incorrect please forgive me. Do you speak only one (natural) language -- English? And if this set is plural is your power of expression identical in each

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread 88888 Dihedral
Yesterday Paid於 2012年6月10日星期日UTC+8上午6時44分44秒寫道: I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) So, I consider C# with ironpython or Java with Jython. It's a hard choice...I like Visual

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread Alexander Blinne
On 10.06.2012 23:27, Paul Rubin wrote: Here is an exercise from the book that you might like to try in Python: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-24.html#%_idx_3894 It's not easy ;-) I liked this exercize. At first I wrote my own merger. def merge(*iterables):

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread Tomasz Rola
On Sat, 9 Jun 2012, Yesterday Paid wrote: I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) So, I consider C# with ironpython or Java with Jython. It's a hard choice...I like Visual studio(because my

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread Tomasz Rola
On Mon, 11 Jun 2012, Tomasz Rola wrote: If you want to delve into Java world, well, I consider Java an unbearably ugly hog. When I was younger and fearless I programmed a bit in Java, but nowadays, the only way I myself could swallow this would be to use some other language on top of it

Re: which one do you prefer? python with C# or java?

2012-06-11 Thread Matej Cepl
On 11/06/12 06:20, rusi wrote: Hi Matěj! If this question is politically incorrect please forgive me. Do you speak only one (natural) language -- English? And if this set is plural is your power of expression identical in each language? I have written about that later ... no, I am a native

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Harald Hanche-Olsen
[becky_lewis bex.le...@gmail.com] Lisp and Clojure are functional languages. No, they're not. But you can (and often will) do quite a bit of functional programming in Lisp, as it lends itself quite naturally to that way of thinking. But in (Common) Lisp you also have CLOS, which is a rather

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread becky_lewis
My mistake about Lisp being purely functional (I have very little experience with common Lisp itself), though Clojure is. That doesn't change my point, to which you appear to agree, Lisp and Clojure teach folks a different way of approaching problems, which is always useful :) On Jun 10, 12:25 

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Matej Cepl
On 10/06/12 00:44, Yesterday Paid wrote: I'm planning to learn one more language with my python. Just my personal experience, but after passively learning many many languages, I came to the conclusion that I (and I suppose many others) am able to learn only one platform well. The point is

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Chris Angelico
On Sun, Jun 10, 2012 at 11:40 PM, Matej Cepl mc...@redhat.com wrote: Just my personal experience, but after passively learning many many languages, I came to the conclusion that I (and I suppose many others) am able to learn only one platform well. The point is that you are never interested in

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Paul Rubin
Matej Cepl mc...@redhat.com writes: The point is that you are never interested in learning *a language*, everybody who has at least some touch with programming can learn most languages in one session in the afternoon. Really, that's only if the new language is pretty much the same as the old

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Matej Cepl
On 10/06/12 18:32, Paul Rubin wrote: Really, that's only if the new language is pretty much the same as the old ones, in which case you haven't really learned much of anything. Languages that use interesting new concepts are challenges in their own right. Well, I could at least passively read

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Paul Rubin
Matej Cepl mc...@redhat.com writes: Well, I could at least passively read many languages (starting with Pascal, C, and unsuccessful attempt to learn Prolog, so even statically typed languages are not that mysterious to me), I wouldn't count Pascal or C as statically typed in any interesting

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Matej Cepl
On 10/06/12 22:40, Paul Rubin wrote: You might start with Abelson and Sussman's classic book: http://mitpress.mit.edu/sicp I know that, and it lies on my badtable for some time already, but I just never got enough excited about the idea yet. Python is just much more fun. Matěj --

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Paul Rubin
Matej Cepl mc...@redhat.com writes: I know that, and it lies on my badtable for some time already, but I just never got enough excited about the idea yet. Python is just much more fun. Here is an exercise from the book that you might like to try in Python:

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread rusi
On Jun 10, 6:40 pm, Matej Cepl mc...@redhat.com wrote: On 10/06/12 00:44, Yesterday Paid wrote: I'm planning to learn one more language with my python. Just my personal experience, but after passively learning many many languages, I came to the conclusion that I (and I suppose many others)

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Broad Liyn
在 2012年6月10日星期日UTC+8上午6时44分44秒,Yesterday Paid写道: I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) So, I consider C# with ironpython or Java with Jython. It's a hard choice...I like Visual

Re: which one do you prefer? python with C# or java?

2012-06-10 Thread Corey Richardson
On Sun, 10 Jun 2012 21:46:50 -0700 (PDT) Broad Liyn broadl...@gmail.com broadl...@gmail.com wrote: of course java is the best option in my opinion.There is no need to provide many evidences that java is better than c# because its advantages are really obvious. Not as obvious as you'd

which one do you prefer? python with C# or java?

2012-06-09 Thread Yesterday Paid
I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) So, I consider C# with ironpython or Java with Jython. It's a hard choice...I like Visual studio(because my first lang is VB6 so I'm familiar with that)

Re: which one do you prefer? python with C# or java?

2012-06-09 Thread becky_lewis
Lisp and Clojure are functional languages. Learning one of those (or a similar language) will help by providing you with a fairly different perspective on how to approach programming problems. Personally I think learning Lisp or Clojure is good advice. However, if you're really adamant about

Re: which one do you prefer? python with C# or java?

2012-06-09 Thread Devin Jeanpierre
On Sat, Jun 9, 2012 at 7:04 PM, becky_lewis bex.le...@gmail.com wrote: Lisp and Clojure are functional languages. Sorry, pet peeve. Lisps are a class of languages that are only united by their common syntax and their use of syntax transformations (macros). Most lisps are not really functional at

Re: which one do you prefer? python with C# or java?

2012-06-09 Thread Tim Johnson
* Yesterday Paid howmuchisto...@gmail.com [120609 14:52]: I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) So, I consider C# with ironpython or Java with Jython. It's a hard choice...I like Visual

Re: which one do you prefer? python with C# or java?

2012-06-09 Thread Paul Rubin
Yesterday Paid howmuchisto...@gmail.com writes: I'm planning to learn one more language with my python. Someone recommended to do Lisp or Clojure, but I don't think it's a good idea(do you?) Why do you want to do that? First of all, why not stick with learning one language at a time? Get