Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Marco Sulla
On Sat, 8 Aug 2020 at 03:46, Christian Seberino wrote: > >> Readability of programming languages was measured > >> using an objective method, and Python was one of > >> the most readable. > > Do you have a source for this? This question means you have not read at all my suggestions :-D Anyway, th

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
>> Readability of programming languages was measured >> using an objective method, and Python was one of >> the most readable. Do you have a source for this? -- https://mail.python.org/mailman/listinfo/python-list

Re: Symlinks already present

2020-08-07 Thread 2QdxY4RzWzUUiLuE
On 2020-08-08 at 01:58:13 +0200, Termoregolato wrote: > me@debsrv:~/tmp/test$ stat --format=%i /home/me/mydir > 18481153 Try ls -i. :-) -- https://mail.python.org/mailman/listinfo/python-list

Re: Symlinks already present

2020-08-07 Thread Termoregolato
Il 27/07/20 20:37, Chris Angelico ha scritto: Unfortunately there's no real way to shortcut this if you just want to check one target directory. You'd still have to readlink() every symlink to try to find them. Sorry for 10 days of delay (hardware problems at home). Yes, that is. It's a mode

Re: Symlinks already present

2020-08-07 Thread Termoregolato
Il 28/07/20 02:50, Dennis Lee Bieber ha scritto: inode numbers apply for HARD LINKS Thanks -- Pastrano con un altro account -- https://mail.python.org/mailman/listinfo/python-list

Re: Symlinks already present

2020-08-07 Thread Termoregolato
Il 28/07/20 00:19, Grant Edwards ha scritto: You err. I read it, I had to test. In effects, it was simple to test. me@debsrv:~/tmp/test$ ln -s /home/me/mydir aaa me@debsrv:~/tmp/test$ ln -s /home/me/mydir bbb me@debsrv:~/tmp/test$ ls aaa bbb me@debsrv:~/tmp/test$ stat --format=%i /home/me/

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Richard Damon
On 8/7/20 6:55 PM, Marco Sulla wrote: > On Sat, 8 Aug 2020 at 00:28, Richard Damon wrote: >> The really interesting part is that since Lisp programs manipulate lists >> as data, and the program is just a list, Lisp programs have the >> theoretical ability to edit themselves (assuming the implement

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Marco Sulla
On Sat, 8 Aug 2020 at 00:28, Richard Damon wrote: > The really interesting part is that since Lisp programs manipulate lists > as data, and the program is just a list, Lisp programs have the > theoretical ability to edit themselves (assuming the implementation give > access to the list of the prog

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Richard Damon
On 8/7/20 3:54 PM, Marco Sulla wrote: > On Fri, 7 Aug 2020 at 19:48, Richard Damon wrote: >> The difference is that the two languages define 'expression' differently. >> [...] > I don't know if this is interesting or pertinent to the topic. > > Christian Seberino just expressed a doubt about how

Any ideas for a new language inspired to Python?

2020-08-07 Thread Marco Sulla
Let me first say that I don't know if my post is on topic with the mailing list. If so, please inform me. My idea seems to be very simple (so probably it's not simple at all): a language similar to Python, but statically compiled. (Yes, I know Cython, RPython, Julia, Rust...) Since I've not grea

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Terry Reedy
On 8/7/2020 11:55 AM, Marco Sulla wrote: @Chris: note that "real" recursion in Python is not possible, This is backwards. Python only does real recursion when one writes recursive calls. since there's no support for tail recursion. I am pretty sure that what you mean by 'support' is to

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Python
On Sat, Aug 08, 2020 at 01:46:28AM +1000, Chris Angelico wrote: > On Sat, Aug 8, 2020 at 1:38 AM Python wrote: > TBH most people won't get the recursive version right the first time > either. So FWIW, I/my team don't find this to be true. I was originally going to mention this in my previous pos

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Richard Damon
On 8/7/20 4:08 PM, Terry Reedy wrote: > On 8/7/2020 11:46 AM, Chris Angelico wrote: > >> My point is that doing Fibonacci recursively is arguably more elegant >> while being materially worse at performance. > > This is a common misconception.  Linear iteration and tail recursion > are equivalent. 

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Chris Angelico
On Sat, Aug 8, 2020 at 6:34 AM Terry Reedy wrote: > > On 8/7/2020 11:46 AM, Chris Angelico wrote: > > > My point is that doing Fibonacci recursively is arguably more elegant > > while being materially worse at performance. > > This is a common misconception. Linear iteration and tail recursion ar

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Marco Sulla
On Fri, 7 Aug 2020 at 22:35, Terry Reedy wrote: > This is a common misconception. Linear iteration and tail recursion are > equivalent. The issue is calculating values once versus multiple times. > Here is the fast recursion equivalent to the fast iteration. > > def fib(n, pair=(1,0)): > p

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Marco Sulla
On Fri, 7 Aug 2020 at 19:41, Christian Seberino wrote: > I think this is really significant point why more syntax does necessarily > mean less readability. I don't think so. Readability of programming languages was measured using an objective method, and Python was one of the most readable. The

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread 2QdxY4RzWzUUiLuE
On 2020-08-07 at 13:43:06 -0500, Wyatt Biggs wrote: > > It's also probably significantly slower, so you'd likely still want to > > use the iterative version > > Generalizing this to the majority of recursive functions/methods, are > their iterative counterparts more efficient? (I say "majority o

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Terry Reedy
On 8/7/2020 11:46 AM, Chris Angelico wrote: My point is that doing Fibonacci recursively is arguably more elegant while being materially worse at performance. This is a common misconception. Linear iteration and tail recursion are equivalent. The issue is calculating values once versus mult

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread 2QdxY4RzWzUUiLuE
On 2020-08-07 at 21:54:35 +0200, Marco Sulla wrote: > On Fri, 7 Aug 2020 at 19:48, Richard Damon wrote: > Christian Seberino just expressed a doubt about how a clear separation > between a statement and an expression is quite desiderable in the > "real" programming world. And I tried to explain

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread 2QdxY4RzWzUUiLuE
On 2020-08-07 at 11:02:50 -0700, Christian Seberino wrote: > > In Lisp, your hammer is the list. > > > In, say, Java, your tool is classes and inheritance. > > And yet if Lisp or Java programmers were here they would say their > languages //are// multi-paradigm too. For example, Lisp has the >

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Marco Sulla
On Fri, 7 Aug 2020 at 19:48, Richard Damon wrote: > The difference is that the two languages define 'expression' differently. > [...] I don't know if this is interesting or pertinent to the topic. Christian Seberino just expressed a doubt about how a clear separation between a statement and an

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Wyatt Biggs
> It's also probably significantly slower, so you'd likely still want to > use the iterative version Generalizing this to the majority of recursive functions/methods, are their iterative counterparts more efficient? (I say "majority of" because I've personally encountered one or two recursive func

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> In Lisp, your hammer is the list. > In, say, Java, your tool is classes and inheritance. And yet if Lisp or Java programmers were here they would say their languages //are// multi-paradigm too. For example, Lisp has the Common Lisp Object System (CLOS) and Java has the Vector class and so on

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread 2QdxY4RzWzUUiLuE
On 2020-08-07 at 10:00:25 -0600, Akkana Peck wrote: > I wrote: > > > > Trying to maintain that recursive list of unclosed lists in your > > > > brain is fun. It stretches the brain in interesting ways. > > > > [ ... ] But I never found Lisp code very maintainable, [ ... ] > > 2qdxy4rzwzuui...@po

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Richard Damon
On 8/7/20 12:52 PM, Marco Sulla wrote: > About statement vs expression: maybe you, Richard and > 2QdxY4RzWzUUiLuE, are right, maybe not. This is hard to say, since the > official C documentation is not public and you have to pay a small fee > to obtain it. > > Anyway, I said "in C, the assignment i

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> Another point to consider is the ecosystem of your language. If you > install Python, then you get basic math, I/O, a GUI toolkit, network > libraries, ... In more "traditional" languages like C or Lisp, you get > math and I/O, period. For everything else you need to hunt down a > library.

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
Your iterative fib(x) code and comment was quite nice. -- https://mail.python.org/mailman/listinfo/python-list

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Marco Sulla
On Fri, 7 Aug 2020 at 18:48, Chris Angelico wrote: > Tail call optimization (there's no reason to restrict it to recursion > alone) is something a Python implementation could choose to do, but > the trouble is that full optimization tends to destroy traceback > information Indeed this is implemen

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Marco Sulla
About statement vs expression: maybe you, Richard and 2QdxY4RzWzUUiLuE, are right, maybe not. This is hard to say, since the official C documentation is not public and you have to pay a small fee to obtain it. Anyway, I said "in C, the assignment is a statement that can be used in expression". You

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Chris Angelico
On Sat, Aug 8, 2020 at 2:44 AM Richard Damon wrote: > > On 8/7/20 11:46 AM, Chris Angelico wrote: > > My point is that doing Fibonacci recursively is arguably more elegant > > while being materially worse at performance, but there are other > > examples that are fundamentally recursive, are just a

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Chris Angelico
On Sat, Aug 8, 2020 at 2:21 AM <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2020-08-07 at 17:55:45 +0200, > Marco Sulla wrote: > > @Chris: note that "real" recursion in Python is not possible, since > > there's no support for tail recursion. Maybe something similar can be > > done using asyn

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Richard Damon
On 8/7/20 11:46 AM, Chris Angelico wrote: > My point is that doing Fibonacci recursively is arguably more elegant > while being materially worse at performance, but there are other > examples that are fundamentally recursive, are just as elegant (merge > sort: "fracture the array in half, sort each

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Richard Damon
On 8/7/20 11:55 AM, Marco Sulla wrote: > Commonly, in imperative languages like C, you can write > > if (a = b) {...} > > This is allowed in C, even if a = b is not an expression, but an > assignment statement. 99% of times you simply wrong and wanted: But in C (and related languages) it IS an exp

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread 2QdxY4RzWzUUiLuE
On 2020-08-07 at 17:55:45 +0200, Marco Sulla wrote: > On Fri, 7 Aug 2020 at 17:14, Christian Seberino wrote: > Commonly, in imperative languages like C, you can write > > if (a = b) {...} > > This is allowed in C, even if a = b is not an expression ... In C, a = b *is* an expression. An ass

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Akkana Peck
I wrote: > > > Trying to maintain that recursive list of unclosed lists in your > > > brain is fun. It stretches the brain in interesting ways. > > > [ ... ] But I never found Lisp code very maintainable, [ ... ] 2qdxy4rzwzuui...@potatochowder.com writes: > "[R]ecursive list of unclosed lists"? C

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Gollwitzer
Am 06.08.20 um 17:13 schrieb Christian Seberino: Python is my favorite language and the easiest to use in my opinion. Lisp has a far simpler grammar and syntax. A beginner I think could learn Lisp much faster than Python. Therefore, it seems like Lisp *should* be easier to work with and more

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Marco Sulla
On Fri, 7 Aug 2020 at 17:14, Christian Seberino wrote: > This is an interesting observation. I've heard people say the fact that > Python has both expressions and statements is a negative. (Lisp only > has expressions.) Commonly, in imperative languages like C, you can write if (a = b) {...}

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Chris Angelico
On Sat, Aug 8, 2020 at 1:38 AM Python wrote: > > On Fri, Aug 07, 2020 at 04:23:42PM +1000, Chris Angelico wrote: > > On Fri, Aug 7, 2020 at 11:11 AM Python wrote: > > > Pretty straightforward. Now try yourself to write the iterative > > > version. > > > > It might look slightly better to a mathe

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Python
On Fri, Aug 07, 2020 at 04:23:42PM +1000, Chris Angelico wrote: > On Fri, Aug 7, 2020 at 11:11 AM Python wrote: > > Pretty straightforward. Now try yourself to write the iterative > > version. > > It might look slightly better to a mathematician, but it's so > abysmally inefficient (unless you a

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> 1. Python mostly separates computation of values (expressions) from flow > control and name binding (statements). When the latter are mixed with > the former, most people restrict the mixing to a line or two. This is an interesting observation. I've heard people say the fact that Python ha

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Chris Angelico
On Sat, Aug 8, 2020 at 1:06 AM Christian Seberino wrote: > > > > ChrisA > > You're definitely an expert programmer. > Uhh thank you? I think? I'm not sure if you're complimenting me or making some sort of joke relating to the code I posted, or if it's actually nothing to do with me at all. Al

Re: Explicit is better than Implicit

2020-08-07 Thread Python
On Thu, Aug 06, 2020 at 07:46:25PM -0500, Python wrote: > On Thu, Aug 06, 2020 at 07:19:01PM -0500, Skip Montanaro wrote: > Python is *actually* easy to work with... most of the time. "If you > want more things for you buck there's no luck..." =8^) [And yes, I'm aware the line is "beats" not "thi

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> ChrisA You're definitely an expert programmer. -- https://mail.python.org/mailman/listinfo/python-list

Re: Are instances of user-defined classes mutable?

2020-08-07 Thread Richard Damon
On 8/6/20 10:53 PM, ZHAOWANCHENG wrote: > So instances of user-defined classes are immutable by default? > Or the description of "if a tuple contains any mutable object either > directly or indirectly, it cannot be used as a key." in the document > is not completely correct? > The description menti

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Christian Seberino
> If "the Python way" seems simpler to you than "the Lisp way," > or iteration seems simpler to you than recursion, then so be it. Other > languages and other programmers are different. I think this is so true. I've had similar conversations with Lisp fans and it has confused me at times why the

Re: Are instances of user-defined classes mutable?

2020-08-07 Thread Mats Wichmann
On 8/6/20 8:53 PM, ZHAOWANCHENG wrote: > So instances of user-defined classes are immutable by default? No, they're clealry mutable. > Or the description of "if a tuple contains any mutable object either directly > or indirectly, it cannot be used as a key." in the document is not > completel

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Terry Reedy
On 8/6/2020 2:39 PM, Akkana Peck wrote: Christian Seberino writes: Python is my favorite language and the easiest to use in my opinion. Lisp has a far simpler grammar and syntax. A beginner I think could learn Lisp much faster than Python. Therefore, it seems like Lisp *should* be easier to

Re: How explain why Python is easier/nicer than Lisp which has a simpler grammar/syntax?

2020-08-07 Thread Terry Reedy
On 8/6/2020 11:13 AM, Christian Seberino wrote: Python is my favorite language and the easiest to use in my opinion. Lisp has a far simpler grammar and syntax. A beginner I think could learn Lisp much faster than Python. Therefore, it seems like Lisp *should* be easier to work with and more