February 21, 2013 Re: Crystal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jesse Phillips | Jesse Phillips: > Ok, that sounds really stupid. I thought it had a compiled component, but I don't see that, just looks to be interpreted. Magpie designer (Bob Nystrom) is a quite smart person :-) Here he explains two main kinds of iterations: http://journal.stuffwithstuff.com/2013/01/13/iteration-inside-and-out/ I think Magpie is not meant to become a widespread language, but it contains interesting ideas. I think the core of Magpie is interpreted, but you can run the type system statically, if you want. Bye, bearophile |
February 25, 2013 Re: Crystal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 2/19/13 6:08 PM, Walter Bright wrote: > On 2/16/2013 10:28 PM, Ary Borenszweig wrote: >> https://github.com/manastech/crystal/wiki/Introduction > > Just a thought - the Introduction needs an introductory (!) paragraph at > the beginning explaining what Crystal is, what its point is, and where > it fits into the universe of programming languages. Maybe what's said in the homepage in enough? https://github.com/manastech/crystal |
February 27, 2013 Re: Crystal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | On Sunday, 17 February 2013 at 06:28:09 UTC, Ary Borenszweig wrote:
> Hello everyone :-)
>
> I follow this newsgroup from time to time. I like D templates. I like the auto keyword. I like auto in templates. I love efficiency and expressiveness.
>
> I believe in smart compilers.
>
> (you might remember me: I'm the author of Descent)
>
> I *really* like D, because it cares about one thing I care about: *performance*. Let's save this world's energy. Let's make a better world. Let's make users' life more enjoyable. Let's be happy :-)
>
> But... do we really have to specify const pure safe nothrow and whatnot? Can't the compiler be smarter? I'm sure there must be a better way. Most new programming languages look like older ones. Newness comes slowly...
>
> One time I asked in this newsgroup if it was possible to have an "auto" keyword for function/method arguments. And... why not make all functions/methods be templates on the type of its arguments?
>
> I think nobody liked this idea. I said "Ruby is like this: you never specify types in method definitions".
>
> "But Ruby is not efficient". "Ruby is a dynamic language". "D is compiled, so it's faster". "Don't make the mistake of comparing a dynamic language with a static/systems programming language". This were some of the answers I got.
>
> I started thinking about this idea: a compiled language that looked like a dynamic language. Is it possible?
>
> Today, I'd like you to take a look at what me and my friend Juan have been working on for the last half month or so. It's a new programming language which aims to be efficient, have similar syntax to Ruby, and where you never have to specify types of variables and arguments.
>
> https://github.com/manastech/crystal/wiki/Introduction
>
> I'd also like to ask you:
>
> 1. Do you know whether a similar language exists?
> 2. Do you think it's feasible? Right now we are getting rather high compilation times (say, a minute) if we use lots of generic classes on medium-large programs. We are still trying to think of the best way to improve compilation times while at the same time taking off programmer's burden.
>
> (The compiler is written in Ruby, which is a bit slow, so that might be one reason it is a bit slow on medium-large programs... imagine Ruby might be 10 to 100 times slower than C, so that minute might be reduced to less than a second... we are currently working on bootstrapping the compiler... but if compilation is on an exponential order, well, you know... ... and the compiler is written in Ruby because it'll later (now?) be easier to port to Crystal, which has a very similar syntax)
>
> I ask about feasibility, but right now you can use this language for small to medium programs (except the standard library is still incomplete).
>
> The goal of this programming language it so be as efficient as possible, but probably it won't be as efficient as C in the general case. But... who knows?
>
> We are also thinking about incorporating concurrency features, like the ones present in Erlang and Go.
>
> In short: utopy =o)
>
> I hope at least someone likes this project...
>
> (I hope at least you, Jacob Carlborg, Ruby lover, find it interesting... or maybe you, bearophile?)
>
> Thanks for your comments,
> Ary
>
> P.S.: bin/crystal -e 'a = 0; 10.times { |i| a += i }; puts a' -O3 -ll
I think this project is really interesting. I really like Ruby, but I don't use it much because it is very slow. Another problem I have with Ruby is that if you, say, rename a method but miss a place it is called, you won't get an error until you try executing that code at runtime (although I suppose tests should catch that). Crystal fixes both of these. Also, I like how you can call C functions. And it has macros.
It does make me wish that LLVM supported exceptions on Windows...
|
February 27, 2013 Re: Crystal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | On 2/25/2013 6:50 AM, Ary Borenszweig wrote:
> On 2/19/13 6:08 PM, Walter Bright wrote:
>> On 2/16/2013 10:28 PM, Ary Borenszweig wrote:
>>> https://github.com/manastech/crystal/wiki/Introduction
>>
>> Just a thought - the Introduction needs an introductory (!) paragraph at
>> the beginning explaining what Crystal is, what its point is, and where
>> it fits into the universe of programming languages.
>
> Maybe what's said in the homepage in enough?
>
> https://github.com/manastech/crystal
Probably. But it should be in the "Introduction" page!
|
February 27, 2013 Re: Crystal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jordan Miner | On Wednesday, 27 February 2013 at 03:48:53 UTC, Jordan Miner wrote:
> It does make me wish that LLVM supported exceptions on Windows...
It does support DW2-style exceptions on 32 bit MinGW now and there are preliminary patches for 64 bit SEH, even if 32 bit SEH is still unsupported.
Actually, the biggest problem I encountered when I recently focussed on the LDC/MinGW port was TLS support in LLVM/MinGW. The mingw-w64 CRT from trunk already has my fix, and the LLVM patches are only waiting for somebody to actually commit them.
Reminds me to note that all that would be left to make Windows/MinGW a first-class target for LDC is another week or two of work on the remaining few test suite/unit test failures and a Windows CI slaveā¦
David
|
February 28, 2013 Re: Crystal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | On Sunday, 17 February 2013 at 06:28:09 UTC, Ary Borenszweig wrote:
> One time I asked in this newsgroup if it was possible to have an "auto" keyword for function/method arguments. And... why not make all functions/methods be templates on the type of its arguments?
>
> I think nobody liked this idea. I said "Ruby is like this: you never specify types in method definitions".
>
> I started thinking about this idea: a compiled language that looked like a dynamic language. Is it possible?
I think everyone who wants to create languages should first familiarize himself with ML family of languages and especially OCaml. It's got global type inference done right, you can write big programs never specifying types of arguments of functions, they all got inferred, and not just to first occurrence but to most general (polymorphic) form. The compiler is incredibly fast and generated code is pretty fast too (approximately as fast as Java).
Things to learn: Damas-Hindley-Milner, structural typing, row polymorphism.
So your questions are already answered ages ago: yes, it is possible to have static typing with conciseness of dynamic languages, speed of static languages and a fast compiler which inferences types.
Also, knowing OCaml will make your life much easier as a compiler developer. Writing compilers is much much easier and more convenient in ML than in Ruby, I know it from first-hand experience, I did both in the past.
|
February 28, 2013 Re: Crystal | ||||
---|---|---|---|---|
| ||||
Posted in reply to thedeemon | On Thursday, 28 February 2013 at 08:22:45 UTC, thedeemon wrote:
> On Sunday, 17 February 2013 at 06:28:09 UTC, Ary Borenszweig wrote:
>> One time I asked in this newsgroup if it was possible to have an "auto" keyword for function/method arguments. And... why not make all functions/methods be templates on the type of its arguments?
>>
>> I think nobody liked this idea. I said "Ruby is like this: you never specify types in method definitions".
>>
>> I started thinking about this idea: a compiled language that looked like a dynamic language. Is it possible?
>
> I think everyone who wants to create languages should first familiarize himself with ML family of languages and especially OCaml. It's got global type inference done right, you can write big programs never specifying types of arguments of functions, they all got inferred, and not just to first occurrence but to most general (polymorphic) form. The compiler is incredibly fast and generated code is pretty fast too (approximately as fast as Java).
>
> Things to learn: Damas-Hindley-Milner, structural typing, row polymorphism.
>
> So your questions are already answered ages ago: yes, it is possible to have static typing with conciseness of dynamic languages, speed of static languages and a fast compiler which inferences types.
>
> Also, knowing OCaml will make your life much easier as a compiler developer. Writing compilers is much much easier and more convenient in ML than in Ruby, I know it from first-hand experience, I did both in the past.
My university degree had a strong focus in programming languages. We were not allowed to use ML, Lisp or Prolog for compiler design classes because it would make the project too easy. :)
--
Paulo
|
March 20, 2013 Re: Crystal | ||||
---|---|---|---|---|
| ||||
On 2013-02-17, 10:52, Russel Winder wrote: > Why is this thread on the announce mailing list instead of the > discussion list? Because it's more an announcement, and less a discussion about D? -- Simen |
March 20, 2013 Re: Crystal | ||||
---|---|---|---|---|
| ||||
Attachments:
| On Wed, 2013-03-20 at 17:31 +0100, Simen Kjaeraas wrote: > On 2013-02-17, 10:52, Russel Winder wrote: > > > Why is this thread on the announce mailing list instead of the discussion list? > > Because it's more an announcement, and less a discussion about D? The original posting was clearly an announcement. No problem. However as the thread lengthened, it got more and more into discussion of content rather than being announcement, i.e. the thread should have shifted to a non-announcement list almost immediately. This undermines the separation of the list from the DMD one. No big deal though. PS http://www.digitalmars.com/d/archives/digitalmars/D/announce/ appears to stop in 2012-12 -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder |
March 20, 2013 Re: Crystal | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | On Sunday, 17 February 2013 at 06:28:09 UTC, Ary Borenszweig wrote: > Hello everyone :-) > > I follow this newsgroup from time to time. I like D templates. I like the auto keyword. I like auto in templates. I love efficiency and expressiveness. > > I believe in smart compilers. > > (you might remember me: I'm the author of Descent) > > I *really* like D, because it cares about one thing I care about: *performance*. Let's save this world's energy. Let's make a better world. Let's make users' life more enjoyable. Let's be happy :-) > > But... do we really have to specify const pure safe nothrow and whatnot? Can't the compiler be smarter? I'm sure there must be a better way. Most new programming languages look like older ones. Newness comes slowly... > > One time I asked in this newsgroup if it was possible to have an "auto" keyword for function/method arguments. And... why not make all functions/methods be templates on the type of its arguments? > > I think nobody liked this idea. I said "Ruby is like this: you never specify types in method definitions". > > "But Ruby is not efficient". "Ruby is a dynamic language". "D is compiled, so it's faster". "Don't make the mistake of comparing a dynamic language with a static/systems programming language". This were some of the answers I got. > > I started thinking about this idea: a compiled language that looked like a dynamic language. Is it possible? > > Today, I'd like you to take a look at what me and my friend Juan have been working on for the last half month or so. It's a new programming language which aims to be efficient, have similar syntax to Ruby, and where you never have to specify types of variables and arguments. > > https://github.com/manastech/crystal/wiki/Introduction > > I'd also like to ask you: > > 1. Do you know whether a similar language exists? It's not Ruby-like, but Julia has some similarities: http://julialang.org/ Best, Graham |
Copyright © 1999-2021 by the D Language Foundation