Re: Oh look, another language (ceylon)

2013-11-20 Thread Bob Martin
in 710625 20131119 091055 wxjmfa...@gmail.com wrote: >Le lundi 18 novembre 2013 14:31:33 UTC+1, Steven D'Aprano a =E9crit=A0: >> >> >> ... choose one of the three bad choices: ... >> >> >> >> * choose UTF-16 or UTF-8, and have O(n) primitive string operations (like= >=20 >> >> Haskell and, appar

Re: Oh look, another language (ceylon)

2013-11-19 Thread Gregory Ewing
Steven D'Aprano wrote: Which sum would that be? Addition of vectors, matrices, quaternions, tensors, something else? Considering vectors, multiplying a vector by a scalar can be thought of as putting n copies of the vector together nose-to-tail. That's not very much different from putting n c

Re: Oh look, another language (ceylon)

2013-11-19 Thread wxjmfauth
Le lundi 18 novembre 2013 14:31:33 UTC+1, Steven D'Aprano a écrit : > > > ... choose one of the three bad choices: ... > > > > * choose UTF-16 or UTF-8, and have O(n) primitive string operations (like > > Haskell and, apparently, Ceylon); > > > > * or UTF-16 without support for the sup

Re: Oh look, another language (ceylon)

2013-11-18 Thread Chris Angelico
On Tue, Nov 19, 2013 at 6:00 PM, Steven D'Aprano wrote: >> py> "a" * "4" >> '' >> >> Okay, that makes sense, but what about: >> >> py> "a" * "" >> >> That will haunt your nightmares! > > You're easily terrified if you have nightmares about that. I can't > imagine what you would

Re: Oh look, another language (ceylon)

2013-11-18 Thread Steven D'Aprano
On Mon, 18 Nov 2013 19:33:01 -0800, Rick Johnson wrote: > I've never *really* been crazy about the plus operator concatenating > strings anyhow, however, the semantics of "+" seem to navigate the > "perilous waters of intuition" far better than "*". > > Addition of numeric types is well defin

Re: Oh look, another language (ceylon)

2013-11-18 Thread Rick Johnson
I've never *really* been crazy about the plus operator concatenating strings anyhow, however, the semantics of "+" seem to navigate the "perilous waters of intuition" far better than "*". Addition of numeric types is well defined in maths: Take N inputs values and *reduce* them into a sing

Re: Oh look, another language (ceylon)

2013-11-18 Thread Chris Angelico
On Tue, Nov 19, 2013 at 1:13 PM, Steven D'Aprano wrote: > Still, given that Pike and Python have already solved this problem, and > have O(1) string indexing operations and length for any Unicode string, > SMP and BMP, it is a major disappointment that Ceylon doesn't. And of course, the part that

Re: Oh look, another language (ceylon)

2013-11-18 Thread Chris Angelico
On Tue, Nov 19, 2013 at 1:13 PM, Steven D'Aprano wrote: > On Tue, 19 Nov 2013 10:25:00 +1100, Chris Angelico wrote: > >> But the problem is also with strings coming back from JS. > > Just because you call it a "string" in Ceylon, doesn't mean you have to > use the native Javascript string type unc

Re: Oh look, another language (ceylon)

2013-11-18 Thread Steven D'Aprano
On Mon, 18 Nov 2013 15:37:12 -0500, Dave Angel wrote: > If you use nearly all of the possible 2 byte values then adding 2 more > bytes won't give you anywhere near 4 bI'll ion characters. You're > perhaps thinking of bringing in four more bytes when the length exceeds > 32k. Yep, I screwed up. Th

Re: Oh look, another language (ceylon)

2013-11-18 Thread Steven D'Aprano
On Tue, 19 Nov 2013 10:25:00 +1100, Chris Angelico wrote: > But the problem is also with strings coming back from JS. Just because you call it a "string" in Ceylon, doesn't mean you have to use the native Javascript string type unchanged. Since the Ceylon compiler controls what Javascript oper

Re: Oh look, another language (ceylon)

2013-11-18 Thread Tim Daneliuk
On 11/18/2013 05:51 PM, Mark Lawrence wrote: can I safely assume that we'll be seeing a PEP fairly shortly? For Immediate Press Release: We at TundraWare are now entering our 10th year of debate in the YAPDL design as to what ought to be a statement and what ought to be a function. The State

Re: Oh look, another language (ceylon)

2013-11-18 Thread Mark Lawrence
On 17/11/2013 22:48, Tim Daneliuk wrote: On 11/17/2013 04:33 PM, Gregory Ewing wrote: Mark Lawrence wrote: As a rule of thumb people don't like change? This obviously assumes that language designers are people :) That's probably true (on both counts). I guess this means we need to encourag

Re: Oh look, another language (ceylon)

2013-11-18 Thread Chris Angelico
On Tue, Nov 19, 2013 at 1:30 AM, Steven D'Aprano wrote: > I suppose that's not terrible, except for the O(n) string operations > which is just dumb. Yes, it's better than buggy, broken strings. But > still dumb, because those aren't the only choices. For example, for the > sake of an extra two byt

Re: Oh look, another language (ceylon)

2013-11-18 Thread Tim Daneliuk
On 11/17/2013 04:33 PM, Gregory Ewing wrote: Mark Lawrence wrote: As a rule of thumb people don't like change? This obviously assumes that language designers are people :) That's probably true (on both counts). I guess this means we need to encourage more Pythoneers to become language desi

Re: Oh look, another language (ceylon)

2013-11-18 Thread Dave Angel
On 18 Nov 2013 14:30:54 GMT, Steven D'Aprano wrote: - 15 bits for a length. 15 bits give you a maximum length of 32767. There are ways around that. E.g. a length of 0 through 32766 means exactly what it says; a length of 32767 means that the next two bytes are part of the length too, givi

Re: Oh look, another language (ceylon)

2013-11-18 Thread Mark Lawrence
On 18/11/2013 14:31, Piet van Oostrum wrote: Chris Angelico writes: On Mon, Nov 18, 2013 at 11:29 PM, Ian Kelly wrote: On Nov 18, 2013 3:06 AM, "Chris Angelico" wrote: I'm trying to figure this out. Reading the docs hasn't answered this. If each character in a string is a 32-bit Unicode

Re: Oh look, another language (ceylon)

2013-11-18 Thread Steven D'Aprano
On Wed, 13 Nov 2013 14:33:27 -0500, Neal Becker wrote: > http://ceylon-lang.org/documentation/1.0/introduction/ I must say there are a few questionable design choices, in my opinion, but I am absolutely in love with the following two features: 1) variables are constant by default; 2) the fat

Re: Oh look, another language (ceylon)

2013-11-18 Thread Steven D'Aprano
On Mon, 18 Nov 2013 13:31:33 +, Steven D'Aprano wrote: > On Mon, 18 Nov 2013 21:04:41 +1100, Chris Angelico wrote: > >> On Mon, Nov 18, 2013 at 8:44 PM, wrote: >>> string >>> Satisfied Interfaces: Category, Cloneable>, >>> Collection, Comparable, >>> Correspondence, Iterable, >>> List, Rang

Re: Oh look, another language (ceylon)

2013-11-18 Thread Piet van Oostrum
Chris Angelico writes: > On Mon, Nov 18, 2013 at 11:29 PM, Ian Kelly wrote: >> >> On Nov 18, 2013 3:06 AM, "Chris Angelico" wrote: >>> >>> I'm trying to figure this out. Reading the docs hasn't answered this. >>> If each character in a string is a 32-bit Unicode character, and (as >>> can be se

Re: Oh look, another language (ceylon)

2013-11-18 Thread Chris Angelico
On Tue, Nov 19, 2013 at 12:31 AM, Steven D'Aprano wrote: > Unless they have done something *really* clever, the language designers > lose a hundred million points for screwing up text strings. There is > *absolutely no excuse* for a new, modern language with no backwards > compatibility concerns t

Re: Oh look, another language (ceylon)

2013-11-18 Thread Steven D'Aprano
On Mon, 18 Nov 2013 21:04:41 +1100, Chris Angelico wrote: > On Mon, Nov 18, 2013 at 8:44 PM, wrote: >> string >> Satisfied Interfaces: Category, Cloneable>, >> Collection, Comparable, >> Correspondence, Iterable, >> List, Ranged, Summable A string of >> characters. Each character in the string i

Re: Oh look, another language (ceylon)

2013-11-18 Thread Chris Angelico
On Mon, Nov 18, 2013 at 11:29 PM, Ian Kelly wrote: > > On Nov 18, 2013 3:06 AM, "Chris Angelico" wrote: >> >> I'm trying to figure this out. Reading the docs hasn't answered this. >> If each character in a string is a 32-bit Unicode character, and (as >> can be seen in the examples) string indexi

Re: Oh look, another language (ceylon)

2013-11-18 Thread Ian Kelly
On Nov 18, 2013 3:06 AM, "Chris Angelico" wrote: > > I'm trying to figure this out. Reading the docs hasn't answered this. > If each character in a string is a 32-bit Unicode character, and (as > can be seen in the examples) string indexing and slicing are > supported, then does string indexing me

Re: Oh look, another language (ceylon)

2013-11-18 Thread Chris Angelico
On Mon, Nov 18, 2013 at 8:44 PM, wrote: > string > Satisfied Interfaces: Category, Cloneable>, Collection, > Comparable, Correspondence, Iterable, > List, Ranged, Summable > A string of characters. Each character in the string is a 32-bit Unicode > character. The internal UTF-16 encoding is hidde

Re: Oh look, another language (ceylon)

2013-11-18 Thread Mark Lawrence
On 18/11/2013 09:44, wxjmfa...@gmail.com wrote: character Satisfied Interfaces: Comparable, Enumerable, Ordinal A 32-bit Unicode character. Satisfied Interfaces: Category, Cloneable>, Collection, Comparable, Correspondence, Iterable, List, Ranged, Summable string Satisfied Interfaces: Category

Re: Oh look, another language (ceylon)

2013-11-18 Thread wxjmfauth
character Satisfied Interfaces: Comparable, Enumerable, Ordinal A 32-bit Unicode character. Satisfied Interfaces: Category, Cloneable>, Collection, Comparable, Correspondence, Iterable, List, Ranged, Summable string Satisfied Interfaces: Category, Cloneable>, Collection, Comparable, Corresponden

Re: Oh look, another language (ceylon)

2013-11-17 Thread Chris Angelico
On Mon, Nov 18, 2013 at 5:45 PM, Gregory Ewing wrote: > Rick Johnson wrote: >> >> The multiplication operator can ONLY be used on >> numerics. > > > I'm not convinced about that part. I notice that > subtraction, multiplication and division are bundled > into a single interface Numeric, bu

Re: Oh look, another language (ceylon)

2013-11-17 Thread Gregory Ewing
Rick Johnson wrote: The multiplication operator can ONLY be used on numerics. I'm not convinced about that part. I notice that subtraction, multiplication and division are bundled into a single interface Numeric, but there is a separate one called Summable for addition -- apparently so

Re: Oh look, another language (ceylon)

2013-11-17 Thread Chris Angelico
On Mon, Nov 18, 2013 at 9:33 AM, Gregory Ewing wrote: > Mark Lawrence wrote: > >> As a rule of thumb people don't like change? This obviously assumes that >> language designers are people :) > > > That's probably true (on both counts). > > I guess this means we need to encourage more > Pythoneers

Re: Oh look, another language (ceylon)

2013-11-17 Thread Rick Johnson
On Saturday, November 16, 2013 9:41:07 PM UTC-6, Gregory Ewing wrote: > The type system looks very interesting! Indeed. I went to the site assuming this would be another language that i would never like, however, after a few minutes reading the tour, i could not stop! I read through the entire t

Re: Oh look, another language (ceylon)

2013-11-17 Thread Gregory Ewing
Mark Lawrence wrote: As a rule of thumb people don't like change? This obviously assumes that language designers are people :) That's probably true (on both counts). I guess this means we need to encourage more Pythoneers to become language designers! -- Greg -- https://mail.python.org/mail

Re: Oh look, another language (ceylon)

2013-11-17 Thread Mark Lawrence
On 17/11/2013 03:41, Gregory Ewing wrote: Neal Becker wrote: http://ceylon-lang.org/documentation/1.0/introduction/ The type system looks very interesting! It's just a pity they based the syntax on C rather than something more enlightened. (Why do people keep doing that when they design langu

Re: Oh look, another language (ceylon)

2013-11-17 Thread jkn
Hi Stephen On Sunday, 17 November 2013 05:48:58 UTC, Steven D'Aprano wrote: > [...] > > > It's just a pity they based the syntax on C rather than something more > > enlightened. (Why do people keep doing that when they design languages?) > > > When the only tool you've used is a hammer, ever

Re: Oh look, another language (ceylon)

2013-11-16 Thread Steven D'Aprano
On Sun, 17 Nov 2013 16:41:07 +1300, Gregory Ewing wrote: > Neal Becker wrote: >> http://ceylon-lang.org/documentation/1.0/introduction/ > > The type system looks very interesting! > > It's just a pity they based the syntax on C rather than something more > enlightened. (Why do people keep doing

Re: Oh look, another language (ceylon)

2013-11-16 Thread Cameron Simpson
On 17Nov2013 15:10, Chris Angelico wrote: > On Sun, Nov 17, 2013 at 2:41 PM, Gregory Ewing > wrote: > > Neal Becker wrote: > >> http://ceylon-lang.org/documentation/1.0/introduction/ > > > > The type system looks very interesting! > > > > It's just a pity they based the syntax on C rather > > tha

Re: Oh look, another language (ceylon)

2013-11-16 Thread Chris Angelico
On Sun, Nov 17, 2013 at 2:41 PM, Gregory Ewing wrote: > Neal Becker wrote: >> >> http://ceylon-lang.org/documentation/1.0/introduction/ > > > The type system looks very interesting! > > It's just a pity they based the syntax on C rather > than something more enlightened. (Why do people > keep doin

Re: Oh look, another language (ceylon)

2013-11-16 Thread Gregory Ewing
Neal Becker wrote: http://ceylon-lang.org/documentation/1.0/introduction/ The type system looks very interesting! It's just a pity they based the syntax on C rather than something more enlightened. (Why do people keep doing that when they design languages?) -- Greg -- https://mail.python.org