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
>> 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
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
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
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
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/
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
>
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
> 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
> 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
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
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
> 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.
Your iterative fib(x) code and comment was quite nice.
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
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) {...}
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
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
> 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
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
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
> ChrisA
You're definitely an expert programmer.
--
https://mail.python.org/mailman/listinfo/python-list
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
> 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
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
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
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
48 matches
Mail list logo