Re: How to "wow" someone new to Python

2015-01-22 Thread Grant Edwards
On 2015-01-22, Steven D'Aprano wrote: > Mario Figueiredo wrote: > >> But speaking about impressing more experient programmers, I personally >> don't think Python has a wow factor in any of its features and syntax. At >> least in the way I understand the word "wow". > > Quote: > > I've seen Pyt

Re: How to "wow" someone new to Python

2015-01-21 Thread Steven D'Aprano
Alan Bawden wrote: > Alan Bawden writes: >> ... Score one for untyped languages. > > Drat. I should have writted "dynamically typed languages". > > The language has changed. When I was a novice Lisp hacker, we were > comfortable saying that Lisp was "untyped". But nowadays we always say > t

Re: How to "wow" someone new to Python

2015-01-21 Thread Steven D'Aprano
Mario Figueiredo wrote: > But speaking about impressing more experient programmers, I personally > don't think Python has a wow factor in any of its features and syntax. At > least in the way I understand the word "wow". Quote: I've seen Python criticized as "ugly" precisely because it doesn

Re: How to "wow" someone new to Python

2015-01-21 Thread Irmen de Jong
On 21-1-2015 20:06, Chris Angelico wrote: > On Thu, Jan 22, 2015 at 5:20 AM, Irmen de Jong wrote: >> On 21-1-2015 18:59, Steve Hayes wrote: >> >>> 3. When I started to look at it, I found that strings could be any length >>> and >>> were not limited to swomething arbitrary, like 256 characters. >

Re: How to "wow" someone new to Python

2015-01-21 Thread Paul Rubin
Alan Bawden writes: > The language has changed. When I was a novice Lisp hacker, we were > comfortable saying that Lisp was "untyped". But nowadays we always say > that Lisp is "dynamically typed". I could write an essay about why... I'd be interested in seeing that. Lisp of course descends f

Re: How to "wow" someone new to Python

2015-01-21 Thread Chris Angelico
On Thu, Jan 22, 2015 at 8:46 AM, Matthew Ruffalo wrote: > No, Java's String.length returns an int and Strings are limited to ~2 ** > 31 characters even in 64-bit Java. Huh, annoying. In Python, the length of a string (in characters) is stored in a Py_ssize_t (if I recall correctly), which is, I b

Re: How to "wow" someone new to Python

2015-01-21 Thread Mario Figueiredo
In article , alan@scooby- doo.csail.mit.edu says... > Even in a 64-bit Java, the _type_ returned by String.length() is > 'int', and is thus at most (2**31 - 1). This isn't a problem for > strings, which never get that long in practice, but for some other > Java datatypes (e.g., Buffer) it is a rea

Re: How to "wow" someone new to Python

2015-01-21 Thread Alan Bawden
Alan Bawden writes: > ... Score one for untyped languages. Drat. I should have writted "dynamically typed languages". The language has changed. When I was a novice Lisp hacker, we were comfortable saying that Lisp was "untyped". But nowadays we always say that Lisp is "dynamically typed". I

Re: How to "wow" someone new to Python

2015-01-21 Thread Matthew Ruffalo
On 01/21/2015 04:26 PM, Chris Angelico wrote: > On Thu, Jan 22, 2015 at 8:20 AM, Matthew Ruffalo wrote: >> Yes, length-unlimited strings are *extremely* useful in some >> applications. I remember bitterly cursing Java's string length limit of >> 2 ** 31 (maybe - 1) on multiple occasions. Python's

Re: How to "wow" someone new to Python

2015-01-21 Thread Alan Bawden
Chris Angelico writes: > ..., and I would guess a 64-bit Java would > also raise the limit. Even in a 64-bit Java, the _type_ returned by String.length() is 'int', and is thus at most (2**31 - 1). This isn't a problem for strings, which never get that long in practice, but for some other Java da

Re: How to "wow" someone new to Python

2015-01-21 Thread Chris Angelico
On Thu, Jan 22, 2015 at 8:20 AM, Matthew Ruffalo wrote: > Yes, length-unlimited strings are *extremely* useful in some > applications. I remember bitterly cursing Java's string length limit of > 2 ** 31 (maybe - 1) on multiple occasions. Python's strings seem to > behave like integers in that thei

Re: How to "wow" someone new to Python

2015-01-21 Thread Matthew Ruffalo
On 01/21/2015 02:06 PM, Chris Angelico wrote: > On Thu, Jan 22, 2015 at 5:20 AM, Irmen de Jong wrote: >> On 21-1-2015 18:59, Steve Hayes wrote: >> >>> 3. When I started to look at it, I found that strings could be any length >>> and >>> were not limited to swomething arbitrary, like 256 character

Re: How to "wow" someone new to Python

2015-01-21 Thread André Roberge
On Wednesday, 21 January 2015 15:06:33 UTC-4, Chris Angelico wrote: > On Thu, Jan 22, 2015 at 5:20 AM, Irmen de Jong wrote: > > On 21-1-2015 18:59, Steve Hayes wrote: > > > >> 3. When I started to look at it, I found that strings could be any length > >> and > >> were not limited to swomething a

Re: How to "wow" someone new to Python

2015-01-21 Thread Mario Figueiredo
Chris, Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What do you do? Some ideas where give

Re: How to "wow" someone new to Python

2015-01-21 Thread Chris Angelico
On Thu, Jan 22, 2015 at 5:20 AM, Irmen de Jong wrote: > On 21-1-2015 18:59, Steve Hayes wrote: > >> 3. When I started to look at it, I found that strings could be any length and >> were not limited to swomething arbitrary, like 256 characters. > > Even more fun is that Python's primitive integer t

Re: How to "wow" someone new to Python

2015-01-21 Thread André Roberge
On Friday, 16 January 2015 11:04:20 UTC-4, Chris Angelico wrote: > Scenario: You're introducing someone to Python for the first time. > S/he may have some previous programming experience, or may be new to > the whole idea of giving a computer instructions. You have a couple of > minutes to show of

Re: How to "wow" someone new to Python

2015-01-21 Thread Irmen de Jong
On 21-1-2015 18:59, Steve Hayes wrote: > 3. When I started to look at it, I found that strings could be any length and > were not limited to swomething arbitrary, like 256 characters. Even more fun is that Python's primitive integer type (longs for older Python versions) has no arbitrary limita

Re: How to "wow" someone new to Python

2015-01-21 Thread Steve Hayes
On Sat, 17 Jan 2015 02:03:57 +1100, Chris Angelico wrote: >Scenario: You're introducing someone to Python for the first time. >S/he may have some previous programming experience, or may be new to >the whole idea of giving a computer instructions. You have a couple of >minutes to show off how awes

Re: How to "wow" someone new to Python

2015-01-19 Thread Ned Batchelder
On 1/16/15 10:03 AM, Chris Angelico wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What

Re: How to "wow" someone new to Python

2015-01-18 Thread alex23
On 17/01/2015 1:03 AM, Chris Angelico wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. Wh

Re: How to "wow" someone new to Python

2015-01-16 Thread Emile van Sebille
On 1/16/2015 9:44 AM, Chris Angelico wrote: > exact line of code that would show off Python's awesomeness. a,b = b,a Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: How to "wow" someone new to Python

2015-01-16 Thread Tim Chase
On 2015-01-17 02:03, Chris Angelico wrote: > Ideally, this should be something that can be demo'd quickly and > easily, and it should be impressive without going into great details > of "and see, this is how it works on the inside". So, how would you > brag about this language? First, I agree with

Re: How to "wow" someone new to Python

2015-01-16 Thread Chris Angelico
On Sat, Jan 17, 2015 at 4:31 AM, Rustom Mody wrote: > Nice point! > First class concrete data structures is a blessing especially for > a C programmer. Definitely! Worth noting. There've been some nice concepts mentioned; concrete suggestions would be good too. Some specific feature or exact lin

Re: How to "wow" someone new to Python

2015-01-16 Thread Rustom Mody
On Friday, January 16, 2015 at 10:51:52 PM UTC+5:30, Mirage Web Studio wrote: > On 01/16/2015 08:33 PM, Chris Angelico wrote: > > Scenario: You're introducing someone to Python for the first time. > > S/he may have some previous programming experience, or may be new to > > the whole idea of giving

Re: How to "wow" someone new to Python

2015-01-16 Thread Albert-Jan Roskam
On Fri, Jan 16, 2015 4:24 PM CET Andrew Berg wrote: >On 2015.01.16 09:03, Chris Angelico wrote: >> Scenario: You're introducing someone to Python for the first time. >> S/he may have some previous programming experience, or may be new to >> the whole idea of giving a

Re: How to "wow" someone new to Python

2015-01-16 Thread Mirage Web Studio
On 01/16/2015 08:33 PM, Chris Angelico wrote: > Scenario: You're introducing someone to Python for the first time. > S/he may have some previous programming experience, or may be new to > the whole idea of giving a computer instructions. You have a couple of > minutes to show off how awesome Pytho

Re: How to "wow" someone new to Python

2015-01-16 Thread Rustom Mody
On Friday, January 16, 2015 at 8:34:20 PM UTC+5:30, Chris Angelico wrote: > Scenario: You're introducing someone to Python for the first time. > S/he may have some previous programming experience, or may be new to > the whole idea of giving a computer instructions. You have a couple of > minutes to

Re: How to "wow" someone new to Python

2015-01-16 Thread Marco Buttu
On 16/01/2015 16:03, Chris Angelico wrote: Scenario: You're introducing someone to Python for the first time. S/he may have some previous programming experience, or may be new to the whole idea of giving a computer instructions. You have a couple of minutes to show off how awesome Python is. What

Re: How to "wow" someone new to Python

2015-01-16 Thread Marko Rauhamaa
Chris Angelico : > Scenario: You're introducing someone to Python for the first time. > S/he may have some previous programming experience, or may be new to > the whole idea of giving a computer instructions. You have a couple of > minutes to show off how awesome Python is. What do you do? My exp

Re: How to "wow" someone new to Python

2015-01-16 Thread Andrew Berg
On 2015.01.16 09:03, Chris Angelico wrote: > Scenario: You're introducing someone to Python for the first time. > S/he may have some previous programming experience, or may be new to > the whole idea of giving a computer instructions. You have a couple of > minutes to show off how awesome Python is

Re: How to "wow" someone new to Python

2015-01-16 Thread Skip Montanaro
If you want to show off the REPL, I'd got for iPython and show them some simple matplotlib examples (plotting sin waves, maybe dig up a CSV file on the net with some data your friend is familiar with, etc) Skip On Fri, Jan 16, 2015 at 9:03 AM, Chris Angelico wrote: > Scenario: You're introduci