Rustom Mody :
> 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 sometimes the
> oute
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
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 l
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 instead of recursion.
> Why should every loop become a named function?
On Tue, Apr 1, 2014 at 7:44 AM, 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 there's no
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, b
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 there's no need: Python 3 has defined precisely that. From
> the docs
> (
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 mayb
On 4/1/14 9:00 AM, Chris Angelico wrote:
On Tue, Apr 1, 2014 at 10:59 PM, Antoon Pardon
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 operat
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. Traditional looping structures are available to
> scheme, but if you felt the need for them, you might as well program in
> Python.
Then I'm h
Chris Angelico :
> 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 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 is some connector that would be aestetically
>> pleasing and not cau
On Tue, Apr 1, 2014 at 10:59 PM, Antoon Pardon
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 can be names; Unicode
On Tue, Apr 1, 2014 at 11:02 PM, Marko Rauhamaa wrote:
>
> #include
>
> int main()
> {
>int n, i = 3, count, c;
>
>printf("Enter the number of prime numbers required\n");
>scanf("%d",&n);
>
>if ( n >= 1 )
>
In article ,
Antoon Pardon 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 can be names; Unicode character clas
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 possibl
Ian Kelly :
> 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 excess or
not is
On Tue, Apr 1, 2014 at 9:37 PM, Antoon Pardon
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 that would make python un
On Tue, Apr 1, 2014 at 8:58 PM, Ian Kelly 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 the le
On 01-04-14 11:18, Ian Kelly wrote:
> On Tue, Apr 1, 2014 at 2:19 AM, Antoon Pardon
> 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. AFAICS identifier
On Tue, Apr 1, 2014 at 3:32 AM, Marko Rauhamaa wrote:
> Ian Kelly :
>
>> 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 mo
Ian Kelly :
> 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 count braces
On Tue, Apr 1, 2014 at 2:19 AM, Antoon Pardon
wrote:
> On 01-04-14 02:47, Ian Kelly wrote:
>> On Mon, Mar 31, 2014 at 1:31 PM, Antoon Pardon
>> wrote:
>>> Second of all I
>>> think a good chosen symbolic name can be more readable than a
>>> name in a character set you are not familiar with. A goo
On 01-04-14 02:47, Ian Kelly wrote:
> On Mon, Mar 31, 2014 at 1:31 PM, Antoon Pardon
> 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 gr
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 philos
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, bec
On Mon, Mar 31, 2014 at 1:31 PM, Antoon Pardon
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 that it damages Python
Terry Reedy :
> @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 sorts, but som
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 functio
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
Op 31-03-14 19:40, Ian Kelly schreef:
> On Mon, Mar 31, 2014 at 3:55 AM, Antoon Pardon
> wrote:
>> On 27-03-14 17:22, Ian Kelly 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 ⌺
>>>
On Mon, Mar 31, 2014 at 12:02 PM, Tim Chase
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
>> куча_фекалий if one prefers; that'
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 tran
On Mon, Mar 31, 2014 at 3:55 AM, Antoon Pardon
wrote:
> On 27-03-14 17:22, Ian Kelly 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
♅⚕⚛ =
On 27-03-14 17:22, Ian Kelly 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 ⌺.⣚]
>>> ⌺.˘˜¨´՛՜(♅⚕⚛)
>>
>>Ste
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
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 description
> would require
Rustom Mody 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 does contain many cha
On Sat, Mar 29, 2014 at 4:00 PM, Rustom Mody 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 whole 17*65536
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 w
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
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 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,
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 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.”
In~con~thev
On Fri, Mar 28, 2014 at 2:28 AM, Mark H Harris 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
--
https://mail.python.org/
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 ⌺.⣚]
>> ⌺.˘˜¨´՛՜(♅⚕⚛)
>
>
>Steven, you're killing me here; argument by analo
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 pro
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
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 write
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.no
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
On 26-03-14 17:37, Ian Kelly wrote:
> On Wed, Mar 26, 2014 at 2:52 AM, Antoon Pardon
> 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. We do have
>> "in" a
On Wed, Mar 26, 2014 at 2:52 AM, Antoon Pardon
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 only used with a const
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 Chine
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.
>>>
>>>
On Wed, Mar 26, 2014 at 1:56 PM, MRAB 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.
ChrisA
--
https:/
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 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
--
Te
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
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 Lo
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 Math
On 25Mar2014 21:48, Marko Rauhamaa wrote:
> Mark H Harris :
> >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.
I think it is a terribl
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_
On Tue, Mar 25, 2014 at 2:48 PM, Marko Rauhamaa 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
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Mar 25, 2014 at 1: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.
Mark H Harris :
>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 scheme.
Marko
--
h
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 no
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
--
https://mail.py
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:
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
71 matches
Mail list logo