Rustom Mody rustompm...@gmail.com:
On Wednesday, April 2, 2014 8:28:02 AM UTC+5:30, Rustom Mody wrote:
In scheme, in a named-let, the name
chosen was very often 'loop'
Umm... I see from your prime number example that there are nested
loops in which sometimes you restart the inner and
On 01-04-14 02:47, Ian Kelly wrote:
On Mon, Mar 31, 2014 at 1:31 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
Op 31-03-14 19:40, Ian Kelly schreef:
That was an exaggeration on my part. It wouldn't affect my job, as I
wouldn't expect to ever actually have to maintain anything like
On Tue, Apr 1, 2014 at 2:19 AM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
On 01-04-14 02:47, Ian Kelly wrote:
On Mon, Mar 31, 2014 at 1:31 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
Second of all I
think a good chosen symbolic name can be more readable than a
name in a
Ian Kelly ian.g.ke...@gmail.com:
On Tue, Apr 1, 2014 at 2:19 AM, Antoon Pardon
Which will give me the normal result. Maybe I missed it but I haven't
heard scheme being called an unreadable language.
Well, I have, but I think that usually has more to do with an excess
of parentheses.
If you
On Tue, Apr 1, 2014 at 3:32 AM, Marko Rauhamaa ma...@pacujo.net wrote:
Ian Kelly ian.g.ke...@gmail.com:
On Tue, Apr 1, 2014 at 2:19 AM, Antoon Pardon
Which will give me the normal result. Maybe I missed it but I haven't
heard scheme being called an unreadable language.
Well, I have, but I
On 01-04-14 11:18, Ian Kelly wrote:
On Tue, Apr 1, 2014 at 2:19 AM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
On 01-04-14 02:47, Ian Kelly wrote:
Well, this is the path taken by APL. It has its supporters. It's not
known for being readable.
No that is not the path taken by APL.
On Tue, Apr 1, 2014 at 8:58 PM, Ian Kelly ian.g.ke...@gmail.com wrote:
Setting aside the fact that C doesn't have anonymous functions, I'll
approximate it as best I can:
static int n = 3;
int f()
{
return n;
}
int main()
{
n = 7;
return f();
}
C: 10
Scheme: 20
And
On Tue, Apr 1, 2014 at 9:37 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
Python also uses symbols for names of operations, like '+'. And when
someone suggested python might consider increasing the number of
operations and gave some symbols for those extra operations, nobody
suggested
Ian Kelly ian.g.ke...@gmail.com:
Setting aside the fact that C doesn't have anonymous functions, I'll
approximate it as best I can:
[...]
C: 10
Scheme: 20
It is true that scheme needs parentheses for operators and assignments
so the ratio is probably in the order of 2:1. Whether that is
On 01-04-14 12:58, Chris Angelico wrote:
But because, in the future, Python may choose to create new operators,
the simplest and safest way to ensure safety is to put a boundary on
what can be operators and what can be names; Unicode character classes
are perfect for this. It's also possible
In article mailman.8796.1396354601.18130.python-l...@python.org,
Antoon Pardon antoon.par...@rece.vub.ac.be wrote:
On 01-04-14 12:58, Chris Angelico wrote:
But because, in the future, Python may choose to create new operators,
the simplest and safest way to ensure safety is to put a
On Tue, Apr 1, 2014 at 11:02 PM, Marko Rauhamaa ma...@pacujo.net wrote:
#includestdio.h
int main()
{
int n, i = 3, count, c;
printf(Enter the number of prime numbers required\n);
scanf(%d,n);
if ( n = 1
On Tue, Apr 1, 2014 at 10:59 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
On 01-04-14 12:58, Chris Angelico wrote:
But because, in the future, Python may choose to create new operators,
the simplest and safest way to ensure safety is to put a boundary on
what can be operators and what
On Tue, Apr 1, 2014 at 11:29 PM, Roy Smith r...@panix.com wrote:
But I confess that is mostly personal taste, since I find names_like_this
ugly. Names-like-this look better to me but that wouldn't be workable
in python. But maybe there is some connector that would be aestetically
pleasing and
Chris Angelico ros...@gmail.com:
I don't find it more readable to cast something as recursive; compare
these two tight loops:
(let find-divisor ((c 2))
(cond
((= c i)
(format #t ~S\n i)
(display-primes (1+ count) (1+ i)))
On Wed, Apr 2, 2014 at 12:16 AM, Marko Rauhamaa ma...@pacujo.net wrote:
I implemented the loops in the scheme way. Recursion is how iteration is
done by the Believers. Traditional looping structures are available to
scheme, but if you felt the need for them, you might as well program in
On 4/1/14 9:00 AM, Chris Angelico wrote:
On Tue, Apr 1, 2014 at 10:59 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
On 01-04-14 12:58, Chris Angelico wrote:
But because, in the future, Python may choose to create new operators,
the simplest and safest way to ensure safety is to put a
On Tuesday, April 1, 2014 6:38:14 PM UTC+5:30, Chris Angelico wrote:
On Tue, Apr 1, 2014 at 11:29 PM, Roy Smith wrote:
But I confess that is mostly personal taste, since I find names_like_this
ugly. Names-like-this look better to me but that wouldn't be workable
in python. But maybe there
On Wed, Apr 2, 2014 at 12:33 AM, Ned Batchelder n...@nedbatchelder.com wrote:
Maybe I'm misunderstanding the discussion... It seems like we're talking
about a hypothetical definition of identifiers based on Unicode character
categories, but there's no need: Python 3 has defined precisely that.
On Tuesday, April 1, 2014 7:14:15 PM UTC+5:30, Chris Angelico wrote:
On Wed, Apr 2, 2014 at 12:33 AM, Ned Batchelder wrote:
Maybe I'm misunderstanding the discussion... It seems like we're talking
about a hypothetical definition of identifiers based on Unicode character
categories, but
On Tue, Apr 1, 2014 at 7:44 AM, Chris Angelico ros...@gmail.com wrote:
On Wed, Apr 2, 2014 at 12:33 AM, Ned Batchelder n...@nedbatchelder.com
wrote:
Maybe I'm misunderstanding the discussion... It seems like we're talking
about a hypothetical definition of identifiers based on Unicode
Chris Angelico ros...@gmail.com:
On Wed, Apr 2, 2014 at 12:16 AM, Marko Rauhamaa ma...@pacujo.net wrote:
I implemented the loops in the scheme way. Recursion is how iteration
is done by the Believers.
Then I'm happily a pagan who uses while loops instead of recursion.
Why should every loop
On Tuesday, April 1, 2014 9:29:27 PM UTC+5:30, Marko Rauhamaa wrote:
Chris Angelico :
On Wed, Apr 2, 2014 at 12:16 AM, Marko Rauhamaa wrote:
I implemented the loops in the scheme way. Recursion is how iteration
is done by the Believers.
Then I'm happily a pagan who uses while loops
On Wednesday, April 2, 2014 8:28:02 AM UTC+5:30, Rustom Mody wrote:
On Tuesday, April 1, 2014 9:29:27 PM UTC+5:30, Marko Rauhamaa wrote:
Chris Angelico :
On Wed, Apr 2, 2014 at 12:16 AM, Marko Rauhamaa wrote:
I implemented the loops in the scheme way. Recursion is how iteration
is
On 27-03-14 17:22, Ian Kelly wrote:
On Thu, Mar 27, 2014 at 9:28 AM, Mark H Harris harrismh...@gmail.com wrote:
Do you think that the ability to write this would be an improvement?
import ⌺
⌚ = ⌺.╩░
⑥ = 5*⌺.⋨⋩
❹ = ⑥ - 1
♅⚕⚛ = [⌺.✱✳**⌺.❇*❹{⠪|⌚.∣} for ⠪ in ⌺.⣚]
⌺.˘˜¨´՛՜(♅⚕⚛)
Steven,
On Mon, Mar 31, 2014 at 3:55 AM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
On 27-03-14 17:22, Ian Kelly wrote:
On Thu, Mar 27, 2014 at 9:28 AM, Mark H Harris harrismh...@gmail.com wrote:
Do you think that the ability to write this would be an improvement?
import ⌺
⌚ = ⌺.╩░
⑥ =
On 2014-03-31 11:40, Ian Kelly wrote:
There is nothing useful
you can do with a name that is the U+1F4A9 character that you can't
do just as easily with alphanumeric identifiers like pile_of_poo (or
куча_фекалий if one prefers; that's auto-translated, so don't blame
me if it's a poor
On Mon, Mar 31, 2014 at 12:02 PM, Tim Chase
python.l...@tim.thechases.com wrote:
On 2014-03-31 11:40, Ian Kelly wrote:
There is nothing useful
you can do with a name that is the U+1F4A9 character that you can't
do just as easily with alphanumeric identifiers like pile_of_poo (or
куча_фекалий
Op 31-03-14 19:40, Ian Kelly schreef:
On Mon, Mar 31, 2014 at 3:55 AM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
On 27-03-14 17:22, Ian Kelly wrote:
On Thu, Mar 27, 2014 at 9:28 AM, Mark H Harris harrismh...@gmail.com
wrote:
Do you think that the ability to write this would be an
On 3/31/2014 1:40 PM, Ian Kelly wrote:
Second, at least in the case of decorators, while I don't dispute that
they can harm readability, I think that in the majority of cases they
actually help it. That's because the @ syntax placed before a
function or class clearly denotes that the construct
On 3/31/2014 3:31 PM, Antoon Pardon wrote:
Op 31-03-14 19:40, Ian Kelly schreef:
First, because while those may degrade readability, they do
so in a constrained way. A decorator application is just the @ symbol
and an identifier.
And if abused, can totally change the working of your
Terry Reedy tjre...@udel.edu:
@twist_the_function_meaning
def f: return clear_expression
is no worse in this regard than the written out form
def f: return clear_expression
f = twist_the_function_meaning(f)
I don't remember feeling the need for either.
I have written wrappers of all
On Mon, Mar 31, 2014 at 1:31 PM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
Op 31-03-14 19:40, Ian Kelly schreef:
That was an exaggeration on my part. It wouldn't affect my job, as I
wouldn't expect to ever actually have to maintain anything like the
above. My greater point though is
I personally believe that it becomes hard to have even a programming
language overcome cultural learning styles, and programmatic differences,
because of nurture vs nature.
We can all program something which results in a similar return value, but
overcoming the nurturing the internet provides,
This brings us into a juxtaposition between how cultures have tried to
hybridize their mentalities, into more of an empathic means of
communication via a formulatic set of coding, and the philosophy thereof,
and, 3D renderings of what we visualize, and how we come to the
conclusions of these
Chris Angelico wrote:
a 5x8 bitmap has
forty pixels, any of which can be either on or off - that gives
roughly twice as much data space as the 21-bit Unicode spec.
We don't need a font, then -- just map the pixels
straight onto bits in the character code!
Might require some user re-education,
On Sun, Mar 30, 2014 at 5:11 AM, Dennis Lee Bieber
wlfr...@ix.netcom.com wrote:
Considering that a 5x8 bitmap font (which is unlikely to even have
enough pixels to produce even 65536 unique glyphs) would take 5.6MB for
your (17*65536), I wouldn't want to see what an algorithmic
On Thu, Mar 27, 2014, at 11:10, Rustom Mody wrote:
Just out of curiosity how do/did you type that?
When I see an exotic denizen from the unicode-universe I paste it into
emacs and ask Who are you?
But with your 'def' my emacs is going a bit crazy!
Your emacs probably is using UCS-2 or
On Saturday, March 29, 2014 12:25:45 AM UTC+5:30, rand...@fastmail.us wrote:
On Thu, Mar 27, 2014, at 11:10, Rustom Mody wrote:
Just out of curiosity how do/did you type that?
When I see an exotic denizen from the unicode-universe I paste it into
emacs and ask Who are you?
But with your
On Sat, Mar 29, 2014 at 4:00 PM, Rustom Mody rustompm...@gmail.com wrote:
My current diagnosis (with the help of more knowledgeable folks than myself)
is that its a font problem.
There simply doesn't exist a font (or more likely I dont know of) that
- is readable
- is scaleable
- spans the
Rustom Mody rustompm...@gmail.com writes:
At least out here:
- gnu-unifont does not cover things outside BMP
That implies the GNU Unifont contains no characters from outside the
BMP, which is untrue.
Rather, the GNU Unifont's claim to fame is that it covers all characters
in the BMP. But it
On 26-03-14 17:37, Ian Kelly wrote:
On Wed, Mar 26, 2014 at 2:52 AM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
Of course we don't have to follow mathematical convention with python.
However allowing any
unicode symbol as an identifier doesn't prohibit from using √ as an
operator.
On Thursday, March 27, 2014 3:06:02 PM UTC+5:30, Antoon Pardon wrote:
On 26-03-14 17:37, Ian Kelly wrote:
On Wed, Mar 26, 2014 at 2:52 AM, Antoon Pardon
Of course we don't have to follow mathematical convention with python.
However allowing any
unicode symbol as an identifier doesn't
On 2014-03-27 08:10, Rustom Mody wrote:
I know, for such a reason I would love it if keywords would have
been written like this: 헱헲헳 (using mathematical bold) instead of
just like this: def (using plain latin letters). It would mean
among other things we could just write operator.not
On 3/25/14 6:58 PM, Steven D'Aprano wrote:
To quote a great Spaniard:
“You keep using that word, I do not think it means what you
think it means.”
In~con~theveable ! My name is Inigo Montoya, you killed my
father, prepare to die...
Do you think that the ability to
On Thursday, March 27, 2014 8:58:51 PM UTC+5:30, Mark H. Harris wrote:
On 3/25/14 6:58 PM, Steven D'Aprano wrote:
To quote a great Spaniard:
“You keep using that word, I do not think it means what you
think it means.”
In~con~theveable ! My name is Inigo Montoya, you
On 3/27/14 10:51 AM, Rustom Mody wrote:
Observe:
Good ol infix -- x+y..
prefix (with paren) -- foo(x)
prefix without -- ¬ x
In case you thought alphanumerics had parens -- sin x
Then theres postfix -- n!
Inside fix -- nCr (Or if you prefer ⁿCᵣ ??)
And outside fix -- mod -- |x|
And Ive
On Thu, Mar 27, 2014 at 9:28 AM, Mark H Harris harrismh...@gmail.com wrote:
Do you think that the ability to write this would be an improvement?
import ⌺
⌚ = ⌺.╩░
⑥ = 5*⌺.⋨⋩
❹ = ⑥ - 1
♅⚕⚛ = [⌺.✱✳**⌺.❇*❹{⠪|⌚.∣} for ⠪ in ⌺.⣚]
⌺.˘˜¨´՛՜(♅⚕⚛)
Steven, you're killing me here; argument by
On Fri, Mar 28, 2014 at 2:28 AM, Mark H Harris harrismh...@gmail.com wrote:
No, any unicode character (except numerals) should be able to begin a name
identifier. alt-l λ and alt-v √ should be valid first character
name identifier symbols.
What, even whitespace??
ChrisA
--
On 2014-03-27 15:51, Rustom Mody wrote:
On Thursday, March 27, 2014 8:58:51 PM UTC+5:30, Mark H. Harris wrote:
On 3/25/14 6:58 PM, Steven D'Aprano wrote:
To quote a great Spaniard:
“You keep using that word, I do not think it means what you
think it means.”
On Thursday, March 27, 2014 9:52:40 PM UTC+5:30, Ian wrote:
On Thu, Mar 27, 2014 at 9:28 AM, Mark H Harris wrote:
Do you think that the ability to write this would be an improvement?
import ⌺
⌚ = ⌺.╩░
⑥ = 5*⌺.⋨⋩
❹ = ⑥ - 1
♅⚕⚛ = [⌺.✱✳**⌺.❇*❹{⠪|⌚.∣} for ⠪ in ⌺.⣚]
⌺.˘˜¨´՛՜(♅⚕⚛)
On Thursday, March 27, 2014 10:47:04 PM UTC+5:30, MRAB wrote:
On 2014-03-27 15:51, Rustom Mody wrote:
On Thursday, March 27, 2014 8:58:51 PM UTC+5:30, Mark H. Harris wrote:
On 3/25/14 6:58 PM, Steven D'Aprano wrote:
To quote a great Spaniard:
“You keep using that word, I do not
Mark H Harris wrote:
Good ol infix -- x+y..
prefix (with paren) -- foo(x)
prefix without -- ¬ x
In case you thought alphanumerics had parens -- sin x
Then theres postfix -- n!
Inside fix -- nCr (Or if you prefer ⁿCᵣ ??)
And outside fix -- mod -- |x|
And mismatched delimiters:
[5, 7)
On 25-03-14 23:47, Ethan Furman wrote:
On 03/25/2014 12:29 PM, Mark H Harris wrote:
On 3/25/14 2:24 PM, MRAB wrote:
It's explained in PEP 3131.
Basically, a name should to start with a letter (this has been extended
to include Chinese characters, etc) or an underscore.
λ is a classified as
On 26-03-14 03:56, MRAB wrote:
On 2014-03-25 22:47, Ethan Furman wrote:
On 03/25/2014 12:29 PM, Mark H Harris wrote:
On 3/25/14 2:24 PM, MRAB wrote:
It's explained in PEP 3131.
Basically, a name should to start with a letter (this has been
extended
to include Chinese characters, etc) or an
On Wed, Mar 26, 2014 at 2:52 AM, Antoon Pardon
antoon.par...@rece.vub.ac.be wrote:
On 26-03-14 03:56, MRAB wrote:
Or as a root operator, e.g. 3 √ x (the cube root of x).
Personally I would think such an operator is too limited to include in a
programming language.
This kind of notation is
greetings, I would like to create a lamda as follows:
√ = lambda n: sqrt(n)
On my keyboard mapping the problem character is alt-v which produces
the radical symbol. When trying to set the symbol as a name within the
name-space gives a syntax error:
from math import sqrt
√ = lambda n:
Le mardi 25 mars 2014 19:30:34 UTC+1, Mark H. Harris a écrit :
greetings, I would like to create a lamda as follows:
√ = lambda n: sqrt(n)
On my keyboard mapping the problem character is alt-v which produces
the radical symbol. When trying to set the symbol as a name within
On 2014-03-25 18:30, Mark H Harris wrote:
greetings, I would like to create a lamda as follows:
√ = lambda n: sqrt(n)
On my keyboard mapping the problem character is alt-v which produces
the radical symbol. When trying to set the symbol as a name within the
name-space gives a syntax error:
On 3/25/14 1:52 PM, wxjmfa...@gmail.com wrote:
'√'.isidentifier()
False
'λ'.isidentifier()
True
S.isidentifier() - bool
Return True if S is a valid identifier according
to the language definition.
cf unicode.org doc
Excellent, thanks!
marcus
--
On 3/25/14 2:24 PM, MRAB wrote:
It's explained in PEP 3131.
Basically, a name should to start with a letter (this has been extended
to include Chinese characters, etc) or an underscore.
λ is a classified as Lowercase_Letter.
√ is classified as Math_Symbol.
Thanks much! I'll note that
Mark H Harris harrismh...@gmail.com:
Thanks much! I'll note that for improvements. Any unicode symbol
(that is not a number) should be allowed as an identifier.
I don't know if that's a good idea, but that's how it is in lisp/scheme.
Thus, * and 1+ are normal identifiers in lisp and
On Tue, Mar 25, 2014 at 1:29 PM, Mark H Harris harrismh...@gmail.com wrote:
On 3/25/14 2:24 PM, MRAB wrote:
It's explained in PEP 3131.
Basically, a name should to start with a letter (this has been extended
to include Chinese characters, etc) or an underscore.
λ is a classified as
On Tue, Mar 25, 2014 at 2:48 PM, Marko Rauhamaa ma...@pacujo.net wrote:
I don't know if that's a good idea, but that's how it is in lisp/scheme.
Thus, * and 1+ are normal identifiers in lisp and scheme.
But parsing Lisp is pretty trivial.
Skip
--
On 2014-03-25 14:29, Mark H Harris wrote:
It's explained in PEP 3131.
Basically, a name should to start with a letter (this has been
extended to include Chinese characters, etc) or an underscore.
λ is a classified as Lowercase_Letter.
√ is classified as Math_Symbol.
On 25Mar2014 21:48, Marko Rauhamaa ma...@pacujo.net wrote:
Mark H Harris harrismh...@gmail.com:
Thanks much! I'll note that for improvements. Any unicode symbol
(that is not a number) should be allowed as an identifier.
I don't know if that's a good idea, but that's how it is in
On 03/25/2014 12:29 PM, Mark H Harris wrote:
On 3/25/14 2:24 PM, MRAB wrote:
It's explained in PEP 3131.
Basically, a name should to start with a letter (this has been extended
to include Chinese characters, etc) or an underscore.
λ is a classified as Lowercase_Letter.
√ is classified as
On Tue, 25 Mar 2014 14:29:06 -0500, Mark H Harris wrote:
On 3/25/14 2:24 PM, MRAB wrote:
It's explained in PEP 3131.
Basically, a name should to start with a letter (this has been
extended to include Chinese characters, etc) or an underscore.
λ is a classified as
On Wednesday, March 26, 2014 12:22:40 AM UTC+5:30, wxjm...@gmail.com wrote:
Le mardi 25 mars 2014 19:30:34 UTC+1, Mark H. Harris a écrit :
greetings, I would like to create a lamda as follows:
√ = lambda n: sqrt(n)
On my keyboard mapping the problem character is alt-v which produces
the
On 3/25/2014 2:30 PM, Mark H Harris wrote:
greetings, I would like to create a lamda as follows:
A lambda is a function lacking a proper name.
√ = lambda n: sqrt(n)
This is discouraged in PEP8. If the following worked,
def √(n): return sqrt(n)
would have √ as its __name__ attribute
--
On 2014-03-25 22:47, Ethan Furman wrote:
On 03/25/2014 12:29 PM, Mark H Harris wrote:
On 3/25/14 2:24 PM, MRAB wrote:
It's explained in PEP 3131.
Basically, a name should to start with a letter (this has been extended
to include Chinese characters, etc) or an underscore.
λ is a classified as
On Wed, Mar 26, 2014 at 1:56 PM, MRAB pyt...@mrabarnett.plus.com wrote:
No, it shouldn't. Doing so would mean we could not use √ as the square
root operator in the future.
Or as a root operator, e.g. 3 √ x (the cube root of x).
Or both! It could be like unary negation and binary subtraction.
72 matches
Mail list logo