Re: Anchovy is good,Find a bug: can't get the gui.lib

2014-04-08 Thread FrankLike

On Tuesday, 8 April 2014 at 06:20:36 UTC, FrankLike wrote:

I build the anchovy's guidemo,
but can't get the gui.lib,
the err is :timemanager.d(153) instantiated from 
here:sort!(a.)

 std\range.d(2188) can't be declared be a funtion

you can test  the build ,you will see it.


anchovy:   https://github.com/MrSmith33/anchovy/

https://github.com/MrSmith33/anchovy/issues/2


Anchovy is good,Find a bug: can't get the gui.lib

2014-04-08 Thread FrankLike

I build the anchovy's guidemo,
but can't get the gui.lib,
the err is :timemanager.d(153) instantiated from 
here:sort!(a.)

 std\range.d(2188) can't be declared be a funtion

you can test  the build ,you will see it.


Re: I'm joining Facebook

2014-04-08 Thread FrankLike

On Monday, 7 April 2014 at 13:58:47 UTC, asman wrote:
On Sunday, 6 April 2014 at 06:40:41 UTC, Andrei Alexandrescu 
wrote:

On 4/5/14, 3:13 AM, Peter Alexander wrote:
Well, I didn't considering this D.announce worthy, but Andrei 
suggested

I post the news.

As the title suggests, after over 5 years in the games 
industry I've
decided to shake things up a bit and join Facebook at their 
London office.


Good luck, and ping me when you're around! -- Andrei


Is this an invite to play ping-pong?


Congratulations!


I like to play ping-pong!


Re: Anchovy is good,Find a bug: can't get the gui.lib

2014-04-08 Thread Andrej Mitrovic
On 4/8/14, FrankLike 1150015...@qq.com wrote:
 I build the anchovy's guidemo,
 but can't get the gui.lib,
 the err is :timemanager.d(153) instantiated from
 here:sort!(a.)
   std\range.d(2188) can't be declared be a funtion

 you can test  the build ,you will see it.

In the future please post to D.learn, not D.announce. Thanks!


Re: Interesting rant about Scala's issues

2014-04-08 Thread Leandro Lucarella
Dicebot, el  7 de April a las 12:04 me escribiste:
 On Monday, 7 April 2014 at 10:07:03 UTC, Regan Heath wrote:
 Got a DIP/spec/design to share?
 
 R
 
 I think biggest mistake of D enums is merging constants and actual
 enumerations into single entity which has resulted in weak typing of
 enumerations.

Yeah,

enum E { A = 1, B = 2 }

is the same as:

struct E { immutable A = 1, B = 2; }

(leaving storage aside)

Which for me it doesn't make any sense. Even thinking about the argument
(you should have a big gain to introduce syntax sugar).

enums should be enums, flags should be flags, and manifest constants
should be... well, you got the idea.

enum is to D what const is to C++ :P

-- 
Leandro Lucarella (AKA luca) http://llucax.com.ar/
--
The average person laughs 13 times a day


Re: Interesting rant about Scala's issues

2014-04-08 Thread Paulo Pinto

Using Ada code examples below:

On Monday, 7 April 2014 at 16:25:45 UTC, Regan Heath wrote:
On Mon, 07 Apr 2014 16:15:41 +0100, Paulo Pinto 
pj...@progtools.org wrote:



Am 07.04.2014 12:07, schrieb Regan Heath:

On Mon, 07 Apr 2014 00:17:45 +0100, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:


On 4/6/14, 10:52 AM, Walter Bright wrote:

On 4/6/2014 3:31 AM, Leandro Lucarella wrote:
What I mean is the current semantics of enum are as they 
are for
historical reasons, not because they make (more) sense 
(than other
possibilities). You showed a lot of examples that makes 
sense only
because you are used to the current semantics, not because 
they are the

only option or the option that makes the most sense.


I use enums a lot in D. I find they work very 
satisfactorily. The way
they work was deliberately designed, not a historical 
accident.


Sorry, I think they ought to have been better. -- Andrei


Got a DIP/spec/design to share?

R



How they work in languages like Ada.


Ok, brief look at those shows me enums can be converted to a 
Pos index but otherwise you cannot associate a numberic value 
with them, right?


So if we had that in D, Walters examples would look like..

1)

  enum Index { A, B, C }
  T[Index.C.pos + 1] array; // perhaps?



type Index is (A, B, C);

d_array: array Index'Length of T;



  ...
  array[Index.B.pos] = t;   // yes?


d_array(Index'Pos(B)) := t;



2)

  array[Index.A.pos + 1] = t; // yes?


d_array(Index'Succ(A)) := t;



3)

  enum Mask { A=1,B=4 } // not possible?

  Mask m = A | B;   // Error: incompatible operator | for enum



type Mask is (A, B);
for Mask use (A = 1, B = 4);

m : Mask := Mask'Pos(A) or Mask'Pos(B);




Have I got that right?

For a proposal like this to even be considered I would imagine 
it would have to be backward compatible with existing uses, so 
you would have to be proposing a new keyword or syntax on 
enum to trigger typesafe enums, perhaps typesafe is a good 
keyword, e.g.


typesafe enum Index { A, B, C } // requires use of .pos to 
convert to int 0, 1, or 2.

enum Index { A, B, C }  // existing pragmatic behaviour

R



This is the C++ approach with enum class for strong typed enums.


How I Came To Write D on Hacker News

2014-04-08 Thread Walter Bright

https://news.ycombinator.com/

Doesn't seem to have made it to reddit yet.


How I Came to Write D -- by Walter Bright

2014-04-08 Thread Andrei Alexandrescu

http://www.reddit.com/r/programming/comments/22jwcu/how_i_came_to_write_d/

http://goo.gl/32R36e


Andrei


Re: How I Came To Write D on Hacker News

2014-04-08 Thread Walter Bright

On 4/8/2014 2:36 PM, Walter Bright wrote:

https://news.ycombinator.com/

Doesn't seem to have made it to reddit yet.


Andrei to the rescue:

http://www.reddit.com/r/programming/comments/22jwcu/how_i_came_to_write_d/


Re: How I Came to Write D -- by Walter Bright

2014-04-08 Thread asman
On Tuesday, 8 April 2014 at 21:44:24 UTC, Andrei Alexandrescu 
wrote:

http://www.reddit.com/r/programming/comments/22jwcu/how_i_came_to_write_d/

http://goo.gl/32R36e


Andrei


Wait a second. I think there's something wrong here. I've read 
this article several days ago! I claimed this one wasn't in 
http://www.drdobbs.com/authors/Walter-Bright

The single one sane explanation is I actually came from future.


Re: How I Came to Write D -- by Walter Bright

2014-04-08 Thread Walter Bright

On 4/8/2014 7:28 PM, asman wrote:

The single one sane explanation is I actually came from future.


Got any stock tips?


Bugzilla maintenance tonight

2014-04-08 Thread Brad Roberts
Tonight at 11pm pacific time, about 3 hours from now, the D bugzilla is going to go read-only for 
some much needed maintenance and upgrading.  Assuming all goes well, it will come back an hour or so 
later as issues.dlang.org.  That name isresolvable now with an old copy of the db -- don't use it 
yet as it'll all be wiped out and replaced by a fresh copy of the real db.  Redirects will be in 
place so that old url's send you over to the new site.


If things go badly, I'll abort and make d.puremagic.com/issues/ read-write again and try again after 
resolving whatever issues caused me to give up tonight.


Hopefully things will all go smoothly, and apologies in advance if they don't. 
:)

Later,
Brad


Re: How I Came To Write D on Hacker News

2014-04-08 Thread Joakim

On Tuesday, 8 April 2014 at 21:36:45 UTC, Walter Bright wrote:

https://news.ycombinator.com/

Doesn't seem to have made it to reddit yet.


Wasn't this written and posted on Dr. Dobbs many months ago?  I 
remember reading it a while back.