Re: D for the Win

2014-08-21 Thread eles via Digitalmars-d-announce

On Wednesday, 20 August 2014 at 21:43:26 UTC, Walter Bright wrote:

On 8/20/2014 2:33 PM, anonymous wrote:

Dlang Dlang Über Alles


as a German, O_O


I'm not surprised that the German programming community has 
taken to D. After all, German cars all have those D stickers 
on them :-)


French must be such great fans of functional programming, on the 
other hand. F# anyone?


Re: D 2.066 is out. Enjoy!

2014-08-21 Thread eles via Digitalmars-d-announce
On Thursday, 21 August 2014 at 01:30:52 UTC, ketmar via 
Digitalmars-d-announce wrote:

On Wed, 20 Aug 2014 10:18:09 -0700
Andrei Alexandrescu via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:


What is it that we could help with? -- Andrei

he's drama queen, he doesn't need any help, only attention.


Just let's try to be less harsher. Even if that's true, being 
harsh would be of no good for that person and for us neither.




Re: D for the Win

2014-08-21 Thread eles via Digitalmars-d-announce

On Wednesday, 20 August 2014 at 22:02:31 UTC, anonymous wrote:
On Wednesday, 20 August 2014 at 21:43:26 UTC, Walter Bright 
wrote:

On 8/20/2014 2:33 PM, anonymous wrote:

Dlang Dlang Über Alles


as a German, O_O


I'm not surprised that the German programming community has 
taken to D. After all, German cars all have those D stickers 
on them :-)


No, no, Dlang Dlang Über Alles is a take on Deutschland
Deutschland über alles (Germany Germany over everything), the
first verse of the national anthem as sung in Nazi times.


While I agree with the historical significance, there are some 
things to be straighten:


1) the song was used even before: it was the national anthem of 
the Weimar republic, the one that Nazi toppled
2) today, it's third stanza (the first one begins with DDuA) is 
still the official anthem of Deutschland
3) there is no official interdiction of the first two stanzas, 
except that they are not really protected by the German law 
punishing offenses to the national symbols of Germany






Re: D 2.066 is out. Enjoy!

2014-08-21 Thread Jacob Carlborg via Digitalmars-d-announce

On 20/08/14 18:57, Brad Anderson wrote:


Anything specific you have problems with? Syntax changes aren't all that
common these days


Support for C++ namespaces where just released and support for C++ 
templates will most likely end up in master soon.


--
/Jacob Carlborg


Re: D for the Win

2014-08-21 Thread Nick Sabalausky via Digitalmars-d-announce

On 8/20/2014 5:39 PM, Peter Alexander wrote:

Ha, that opDollar thing in the HTML generator is the nastiest D hack
I've seen :-P


Yea, this *statement* really made me go o_O

   link[$.rel = foobar, $.type = text/css];

That's a lot of syntax abuse there!

Still, if it works for him, great, who am I to complain? At the end of 
the day, it's just a tool.


Re: D for the Win

2014-08-21 Thread Nick Sabalausky via Digitalmars-d-announce

On 8/20/2014 6:57 PM, Paulo Pinto wrote:

Am 21.08.2014 00:02, schrieb anonymous:


No, no, Dlang Dlang Über Alles is a take on Deutschland
Deutschland über alles (Germany Germany over everything), the
first verse of the national anthem as sung in Nazi times.

I was actually worried if the author is German. He's not,
thankfully. He's from Israel. From a German author that would be
an embracement of fascism. Coming from an Israeli, I don't really
know where to put it, probably completely benign.


As a Portuguese living in Germany, I would say not everyone knows that
outside Germany.

Specially the younger generations, they just use it because it sounds cool.



Über Alles always just makes me think of Hanzel und Gretyl: 
http://en.wikipedia.org/wiki/%C3%9Cber_Alles_%28album%29


Gotta love tongue-in-cheek psuedo-German metal ;)



Re: D for the Win

2014-08-21 Thread ketmar via Digitalmars-d-announce
On Thu, 21 Aug 2014 04:31:31 -0400
Nick Sabalausky via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

 Yea, this *statement* really made me go o_O
 
 link[$.rel = foobar, $.type = text/css];
 
 That's a lot of syntax abuse there!
but it's fun! we all used to think that $ should mean 'length' and he
has no such mind frames. i like it. ;-)


signature.asc
Description: PGP signature


Re: D for the Win

2014-08-21 Thread Ola Fosheim Gr via Digitalmars-d-announce
On Thursday, 21 August 2014 at 08:31:49 UTC, Nick Sabalausky 
wrote:

   link[$.rel = foobar, $.type = text/css];

That's a lot of syntax abuse there!

Still, if it works for him, great, who am I to complain? At the 
end of the day, it's just a tool.


Now the comma-operator has to stay because removing it is a 
severe breaking change.





Re: D for the Win

2014-08-21 Thread ketmar via Digitalmars-d-announce
On Thu, 21 Aug 2014 08:37:30 +
Ola Fosheim Gr via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

 Now the comma-operator has to stay because removing it is a 
 severe breaking change.
but we can abuse opIndex and/or opSlice too! ;-)


signature.asc
Description: PGP signature


Re: D for the Win

2014-08-21 Thread Jacob Carlborg via Digitalmars-d-announce

On 21/08/14 10:37, Ola Fosheim Gr wrote:


Now the comma-operator has to stay because removing it is a severe
breaking change.


Isn't that multiple arguments to opIndex?

--
/Jacob Carlborg


Re: D for the Win

2014-08-21 Thread Rory McGuire via Digitalmars-d-announce
What is really awesome about this is that his code actually worked, the
mixing of operator overloads, opDispatch and rarely used features(e.g.
comma op).

D has come a long way in the last decade.


On Thu, Aug 21, 2014 at 10:40 AM, ketmar via Digitalmars-d-announce 
digitalmars-d-announce@puremagic.com wrote:

 On Thu, 21 Aug 2014 08:37:30 +
 Ola Fosheim Gr via Digitalmars-d-announce
 digitalmars-d-announce@puremagic.com wrote:

  Now the comma-operator has to stay because removing it is a
  severe breaking change.
 but we can abuse opIndex and/or opSlice too! ;-)



Re: D for the Win

2014-08-21 Thread Rory McGuire via Digitalmars-d-announce
On Thu, Aug 21, 2014 at 10:47 AM, Jacob Carlborg via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

 On 21/08/14 10:37, Ola Fosheim Gr wrote:Isn't that multiple arguments to
 opIndex?

 --
 /Jacob Carlborg

mm, yes I believe you are right.
http://dlang.org/operatoroverloading.html#ArrayOps


Re: Dutyl - a Vim plugin for running D tools

2014-08-21 Thread BlackEdder via Digitalmars-d-announce

On Thursday, 14 August 2014 at 22:20:52 UTC, Idan Arye wrote:
I'm open for suggestions for other tools and features to add to 
Dutyl(write them here, or preferably open GitHub issues with 
them)


Any idea if this plugin works in conjunction with YouCompleteMe?


Re: D for the Win

2014-08-21 Thread Ola Fosheim Gr via Digitalmars-d-announce

On Thursday, 21 August 2014 at 08:47:50 UTC, Jacob Carlborg wrote:

Isn't that multiple arguments to opIndex?


Probably, I was just trying to be funny :P

There should be a tutorial D for perl programmers of the 90s...


Re: Dutyl - a Vim plugin for running D tools

2014-08-21 Thread Rory McGuire via Digitalmars-d-announce
When I try to use this it just says that complete is not able to work at
and suggests that DCD might not be running. Ubuntu 14.04. dcd-server and
client are in path, even tried adding explicitly.

How does one debug this plugin?


On Thu, Aug 21, 2014 at 10:50 AM, BlackEdder via Digitalmars-d-announce 
digitalmars-d-announce@puremagic.com wrote:

 On Thursday, 14 August 2014 at 22:20:52 UTC, Idan Arye wrote:

 I'm open for suggestions for other tools and features to add to
 Dutyl(write them here, or preferably open GitHub issues with them)


 Any idea if this plugin works in conjunction with YouCompleteMe?



Re: D 2.066 is out. Enjoy!

2014-08-21 Thread Daniel Murphy via Digitalmars-d-announce

Jacob Carlborg  wrote in message news:lt43pj$ral$1...@digitalmars.com...

Support for C++ namespaces where just released and support for C++ 
templates will most likely end up in master soon.


Support for C++ templates was in the last release, and the new pull request 
is only for special mangling of some stl declarations. 



Re: Dutyl - a Vim plugin for running D tools

2014-08-21 Thread Weaseldog via Digitalmars-d-announce

On Thursday, 21 August 2014 at 08:50:50 UTC, BlackEdder wrote:

On Thursday, 14 August 2014 at 22:20:52 UTC, Idan Arye wrote:
I'm open for suggestions for other tools and features to add 
to Dutyl(write them here, or preferably open GitHub issues 
with them)


Any idea if this plugin works in conjunction with YouCompleteMe?


YouCompleteMe will use the available omnifunc as a fallback if no 
semantic completer for the filetype is provided.

So, yes, it should work.


Re: D for the Win

2014-08-21 Thread anonymous via Digitalmars-d-announce

On Thursday, 21 August 2014 at 01:51:11 UTC, ketmar via
Digitalmars-d-announce wrote:

i always wonder how good people at finding various offences


I'm not offended.


and fascims everywhere.


It's pretty much the Nazi anthem. It doesn't get much more
fascist than that. Of course, someone can play with fascist
phrases without being a fascist or promoting fascism. As I said,
coming from an Israeli, it's probably benign. If the author was
German, I'd feel uneasy about it. And don't tell me that Germans
carelessly throwing around Nazi slogans isn't something to feel
uneasy about. The NPD (Nazi party) is in two Landtagen (state
parliaments).


i bet that such people are glad to censor


I'm not trying to censor anything. Neither am I convinced that
banning Nazi symbols, songs, etc (as we do in Germany) is the
right way to go. I think I'd rather have the Nazis wear
Hakenkreuz armbands than other, obscure symbols that I can't
identify. It's not like they stop existing when we ban their
uniforms.


Re: D for the Win

2014-08-21 Thread anonymous via Digitalmars-d-announce

On Wednesday, 20 August 2014 at 22:57:21 UTC, Paulo Pinto wrote:
As a Portuguese living in Germany, I would say not everyone 
knows that outside Germany.


Certainly. As I said, from an Israeli it's probably benign. I
guess if aynthing, it's meant to be jokingly provoking towards
Germans. I don't mind that at all.


Re: D for the Win

2014-08-21 Thread ketmar via Digitalmars-d-announce
On Thu, 21 Aug 2014 11:48:32 +
anonymous via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

 It's pretty much the Nazi anthem.
oh, really? let's see. current German anthem:

Einigkeit und Recht und Freiheit
für das deutsche Vaterland!
Danach lasst uns alle streben
brüderlich mit Herz und Hand!

and so on. pretty innocent, right? ok, but this is only the 3rd verse
of the song which begins with... oh, Deutschland, Deutschland über
alles. may i assume that all Germans are well-disgiused Nazis then?

here is the full song, for your pleasure:

Deutschland, Deutschland über alles,
über alles in der Welt,
wenn es stets zu Schutz und Trutze
brüderlich zusammenhält.
Von der Maas bis an die Memel,
von der Etsch bis an den Belt,
Deutschland, Deutschland über alles,
über alles in der Welt!

Deutsche Frauen, deutsche Treue,
deutscher Wein und deutscher Sang
sollen in der Welt behalten
ihren alten schönen Klang,
uns zu edler Tat begeistern
unser ganzes Leben lang. —
Deutsche Frauen, deutsche Treue,
deutscher Wein und deutscher Sang!

and now, German anthem! and the 3rd verse:
Einigkeit und Recht und Freiheit
für das deutsche Vaterland!
Danach lasst uns alle streben
brüderlich mit Herz und Hand!
Einigkeit und Recht und Freiheit
sind des Glückes Unterpfand;
blüh im Glanze dieses Glückes,
blühe, deutsches Vaterland.

 And don't tell me that Germans
 carelessly throwing around Nazi slogans isn't something to feel
 uneasy about.
they not only throwing, they still using part of that song as their
anthem. besides, aren't your words racist?


signature.asc
Description: PGP signature


Re: D for the Win

2014-08-21 Thread Dicebot via Digitalmars-d-announce
On Thursday, 21 August 2014 at 12:05:40 UTC, ketmar via 
Digitalmars-d-announce wrote:

...


Please, this is not important enough to argue here.


Re: D for the Win

2014-08-21 Thread ketmar via Digitalmars-d-announce
On Thu, 21 Aug 2014 12:08:05 +
Dicebot via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

 Please, this is not important enough to argue here.
ah, excuse me. it's so easy to drag me into such talks... mea culpa.


signature.asc
Description: PGP signature


Re: D for the Win

2014-08-21 Thread Gary Willoughby via Digitalmars-d-announce

http://en.wikipedia.org/wiki/Godwin's_law


Re: D 2.066 is out. Enjoy!

2014-08-21 Thread Kagamin via Digitalmars-d-announce
On Wednesday, 20 August 2014 at 16:25:04 UTC, disapointed user 
wrote:
too bad that i wasted my time for such a long time. i post a 
link to that thread with your answer to everywhere i can, so 
that others won't waste their time too.


anyway good luck in the future for you linux guys.


Well, people have different perspectives :) see 
http://forum.dlang.org/post/lrsnjovurigezboqx...@forum.dlang.org


Re: D 2.066 is out. Enjoy!

2014-08-21 Thread Jacob Carlborg via Digitalmars-d-announce

On 21/08/14 12:10, Daniel Murphy wrote:


Support for C++ templates was in the last release, and the new pull
request is only for special mangling of some stl declarations.


You see, I get confused of all the syntax changes ;)

--
/Jacob Carlborg


The No Explicit Save UI paradigm

2014-08-21 Thread Bruno Medeiros via Digitalmars-d-announce

On 07/08/2014 15:45, David Gileadi wrote:

On 8/7/14, 4:18 AM, Bruno Medeiros wrote:

This is an interesting behavior I've come across, even before watching
this talk: Recently I tried IntelliJ IDEA, and it also goes away with
any explicit UI notion of saving a file. It just saves files
automatically, as you type. This is interesting, and might well be a
marked improvement in UI behavior...


This is a UI direction that Mac OSX is going in, presumably as part of
their push to bring iOS behavior to the desktop. Apps that use it save
as they go, and they have a standard UI to browse through previous
versions of your document if you want to go back to (or crib from)
something earlier.


Interesting.

Indeed the only potential issue I saw with this approach was, how does 
the application mark each local history version of a document? With 
explicit save it's easy, just create a new version in the local history 
each time the document is saved.
Without explicit save... A smart algorithm/heuristic would have to be 
put in place. Something like saving a new version after a user stops 
typing after a while (5min or so?), or after a significant number of 
changes occurred. (if the local history is smart enough and saves 
changes incrementally, it can actually store every single change actually)


In any case that's workable, and overall it seems like an improvement in 
UI design. It even reminds me of the talk Inventing on Principle talk 
Bret Victor gave ( http://vimeo.com/36579366 ), in particular the aspect 
about reducing (if not removing entirely) the save/compile/run cycle.


--
Bruno Medeiros
https://twitter.com/brunodomedeiros


Re: Dutyl - a Vim plugin for running D tools

2014-08-21 Thread Idan Arye via Digitalmars-d-announce
On Thursday, 21 August 2014 at 08:57:55 UTC, Rory McGuire via 
Digitalmars-d-announce wrote:
When I try to use this it just says that complete is not able 
to work at
and suggests that DCD might not be running. Ubuntu 14.04. 
dcd-server and

client are in path, even tried adding explicitly.

How does one debug this plugin?


On Thu, Aug 21, 2014 at 10:50 AM, BlackEdder via 
Digitalmars-d-announce 

digitalmars-d-announce@puremagic.com wrote:


On Thursday, 14 August 2014 at 22:20:52 UTC, Idan Arye wrote:

I'm open for suggestions for other tools and features to add 
to
Dutyl(write them here, or preferably open GitHub issues with 
them)




Any idea if this plugin works in conjunction with 
YouCompleteMe?


Is the DCD server running? It needs to be running for Dutyl to 
use it. You can either run it manually or use the Dutyl's 
`:DUDCDstartServer` command.


You can check if the server is currently running by opening a 
shell and typing `dcd-client --query`.


Re: Dutyl - a Vim plugin for running D tools

2014-08-21 Thread Rory McGuire via Digitalmars-d-announce
Yip I tried running it manually in another terminal. Is there an error log
or something somewhere?
On 21 Aug 2014 19:00, Idan Arye via Digitalmars-d-announce 
digitalmars-d-announce@puremagic.com wrote:

 On Thursday, 21 August 2014 at 08:57:55 UTC, Rory McGuire via
 Digitalmars-d-announce wrote:

 When I try to use this it just says that complete is not able to work at
 and suggests that DCD might not be running. Ubuntu 14.04. dcd-server and
 client are in path, even tried adding explicitly.

 How does one debug this plugin?


 On Thu, Aug 21, 2014 at 10:50 AM, BlackEdder via Digitalmars-d-announce 
 digitalmars-d-announce@puremagic.com wrote:

  On Thursday, 14 August 2014 at 22:20:52 UTC, Idan Arye wrote:

  I'm open for suggestions for other tools and features to add to
 Dutyl(write them here, or preferably open GitHub issues with them)


 Any idea if this plugin works in conjunction with YouCompleteMe?


 Is the DCD server running? It needs to be running for Dutyl to use it. You
 can either run it manually or use the Dutyl's `:DUDCDstartServer` command.

 You can check if the server is currently running by opening a shell and
 typing `dcd-client --query`.



Re: Dutyl - a Vim plugin for running D tools

2014-08-21 Thread Idan Arye via Digitalmars-d-announce

On Thursday, 21 August 2014 at 10:20:24 UTC, Weaseldog wrote:

On Thursday, 21 August 2014 at 08:50:50 UTC, BlackEdder wrote:

On Thursday, 14 August 2014 at 22:20:52 UTC, Idan Arye wrote:
I'm open for suggestions for other tools and features to add 
to Dutyl(write them here, or preferably open GitHub issues 
with them)


Any idea if this plugin works in conjunction with 
YouCompleteMe?


YouCompleteMe will use the available omnifunc as a fallback if 
no semantic completer for the filetype is provided.

So, yes, it should work.


I looked a bit into YouCompleteMe to see if I can add a proper 
semantic completer. It appears that semantic completers run on 
the YCMD server rather then inside the Vim instance - which makes 
writing a semantic completer infeasible.


The semantic completer will need to be able to read the import 
paths and to invoke DCD. These two functionalities are 
implemented in Dutyl with VimScript - but to access these 
implementations it'll need to some interface to call these 
functions. I don't know if the YCDM-Vim interaction supports the 
server calling the client, or if Vim's own server-client 
mechanism can be used for it(which will require extra 
configuration), but at any rate it doesn't make much sense to use 
the completion server when the work is done in the Vim instance.


Another option is to reimplement that functionality in Python - 
but if the the import paths gathering, the DCD invokation, and 
the glue code that connects them are all reimplemented there is 
no point in making this part of Dutyl...


Also note that Dutyl sends the content of the current buffer to 
DCD, not the file saved on disc. This diffidently requires access 
to the Vim instance, and changing it is not an option unless you 
want to have to save before you autocomplete.


Re: D 2.066 is out. Enjoy!

2014-08-21 Thread Jonathan M Davis via Digitalmars-d-announce

On Thursday, 21 August 2014 at 15:20:49 UTC, Daniel Murphy wrote:
Jacob Carlborg  wrote in message 
news:lt50m0$20f0$1...@digitalmars.com...


 Support for C++ templates was in the last release, and the 
 new pull
 request is only for special mangling of some stl 
 declarations.


You see, I get confused of all the syntax changes ;)


Don't worry, so did Walter.


LOL. Yeah, well, it would be ni going to support C+ce if we could 
get an actual list of the C++ features that D currently supports 
somewhere (and how to use them if it's not obvious). You've been 
doing so much great work on that that I have no clue what the 
current state of things is. For instance, this is the first I've 
heard of anything about template support; I'd thought that we 
were never going to support templates. Is it just for name 
mangling or for actually compiling them?


- Jonathan M Davis


Re: D 2.066 is out. Enjoy!

2014-08-21 Thread Jonathan M Davis via Digitalmars-d-announce

On Tuesday, 19 August 2014 at 08:14:41 UTC, novice2 wrote:

http://dlang.org/changelog.html
Version D 2.066 August 18, 2014
...
Phobos enhancements
1.Bugzilla 3780: getopt improvements by Igor Lesik


Sorry, i can't find this improvements nor in getopt.d nor in 
http://dlang.org/phobos/std_getopt.html.


Is this announce prematurely, and that this changes will be 
seen in 2.067 ?


I suspect that the changelog was done by dates rather than based 
on what was actually merged. Someone else was commenting that 
some stuff was in there that's going to be in 2.067 and not 
2.066, and 2.066 took long enough after it was branched, that it 
would be easy to accidentally list 2.067 stuff for 2.066 if you 
were looking at merge dates rather than what actually went on the 
2.066 branch.


- Jonathan M Davis


Re: D 2.066 is out. Enjoy!

2014-08-21 Thread Walter Bright via Digitalmars-d-announce

On 8/21/2014 11:54 AM, Jonathan M Davis wrote:

LOL. Yeah, well, it would be ni going to support C+ce if we could get an actual
list of the C++ features that D currently supports somewhere (and how to use
them if it's not obvious). You've been doing so much great work on that that I
have no clue what the current state of things is. For instance, this is the
first I've heard of anything about template support; I'd thought that we were
never going to support templates. Is it just for name mangling or for actually
compiling them?


The thing is, while the code was there, there wasn't a single test case for it 
in the test suite. Furthermore, at least for Elf, there was no support for the 
special mangling done for ::std:: stuff.


The thing is, modern C++ practice makes heavy use of std types. Having an 
interface to C++ code is fairly unusable unless D can also interface to 
std::string, std::vector, and a few others.


The first step is to support the mangling of them. Then, try to construct a 
workalike on the D side that follows D rules, and yet is able to seamlessly 
interact with the corresponding C++ code.


We'll see how far we can get with that, and then evaluate what to do next.

There are no plans for actually compiling C++ code with a D compiler. The plan 
is for support like we do for C - have a .d header file for it.




Re: D 2.066 is out. Enjoy!

2014-08-21 Thread Jonathan M Davis via Digitalmars-d-announce

On Thursday, 21 August 2014 at 20:33:56 UTC, Walter Bright wrote:

On 8/21/2014 11:54 AM, Jonathan M Davis wrote:
LOL. Yeah, well, it would be ni going to support C+ce if we 
could get an actual
list of the C++ features that D currently supports somewhere 
(and how to use
them if it's not obvious). You've been doing so much great 
work on that that I
have no clue what the current state of things is. For 
instance, this is the
first I've heard of anything about template support; I'd 
thought that we were
never going to support templates. Is it just for name mangling 
or for actually

compiling them?


The thing is, while the code was there, there wasn't a single 
test case for it in the test suite. Furthermore, at least for 
Elf, there was no support for the special mangling done for 
::std:: stuff.


The thing is, modern C++ practice makes heavy use of std types. 
Having an interface to C++ code is fairly unusable unless D can 
also interface to std::string, std::vector, and a few others.


The first step is to support the mangling of them. Then, try to 
construct a workalike on the D side that follows D rules, and 
yet is able to seamlessly interact with the corresponding C++ 
code.


We'll see how far we can get with that, and then evaluate what 
to do next.


There are no plans for actually compiling C++ code with a D 
compiler. The plan is for support like we do for C - have a .d 
header file for it.


Well, I wouldn't have expected us to be compiling C++ per se, but 
previously, it seemed like the party line was that we wouldn't be 
supporting C++ templates at all because of how hard they were and 
because we don't want a C++ compiler in the D compiler. I'm 
certainly all for anything we can do for C++ compatability 
without going off the deep end. I just don't hear much about what 
we're actually doing right now. So, I really have no idea what 
the current status of that is. With what was said at dconf and 
comments like these, it seems like we're making huge progress in 
comparison to where we were, and as far as I can tell, about the 
only way to hear about it is to either pay a lot of attention to 
dmd pulls or to see an occasonal comment from Daniel talking 
about it or from someone who's paying close attention to what 
he's up to. So, at some point in the near future, it would be 
nice if there were somewhere that actually said what D can 
actually do with C++ now, even if that doesn't include everything 
that's going to be coming or if much of it is marked as 
experimental and relatively untested.


- Jonathan M Davis


Re: D 2.066 is out. Enjoy!

2014-08-21 Thread bachmeier via Digitalmars-d-announce
On Thursday, 21 August 2014 at 20:43:53 UTC, Jonathan M Davis 
wrote:
On Thursday, 21 August 2014 at 20:33:56 UTC, Walter Bright 
wrote:

On 8/21/2014 11:54 AM, Jonathan M Davis wrote:
LOL. Yeah, well, it would be ni going to support C+ce if we 
could get an actual
list of the C++ features that D currently supports somewhere 
(and how to use
them if it's not obvious). You've been doing so much great 
work on that that I
have no clue what the current state of things is. For 
instance, this is the
first I've heard of anything about template support; I'd 
thought that we were
never going to support templates. Is it just for name 
mangling or for actually

compiling them?


The thing is, while the code was there, there wasn't a single 
test case for it in the test suite. Furthermore, at least for 
Elf, there was no support for the special mangling done for 
::std:: stuff.


The thing is, modern C++ practice makes heavy use of std 
types. Having an interface to C++ code is fairly unusable 
unless D can also interface to std::string, std::vector, and a 
few others.


The first step is to support the mangling of them. Then, try 
to construct a workalike on the D side that follows D rules, 
and yet is able to seamlessly interact with the corresponding 
C++ code.


We'll see how far we can get with that, and then evaluate what 
to do next.


There are no plans for actually compiling C++ code with a D 
compiler. The plan is for support like we do for C - have a .d 
header file for it.


Well, I wouldn't have expected us to be compiling C++ per se, 
but previously, it seemed like the party line was that we 
wouldn't be supporting C++ templates at all because of how hard 
they were and because we don't want a C++ compiler in the D 
compiler. I'm certainly all for anything we can do for C++ 
compatability without going off the deep end. I just don't hear 
much about what we're actually doing right now. So, I really 
have no idea what the current status of that is. With what was 
said at dconf and comments like these, it seems like we're 
making huge progress in comparison to where we were, and as far 
as I can tell, about the only way to hear about it is to either 
pay a lot of attention to dmd pulls or to see an occasonal 
comment from Daniel talking about it or from someone who's 
paying close attention to what he's up to. So, at some point in 
the near future, it would be nice if there were somewhere that 
actually said what D can actually do with C++ now, even if that 
doesn't include everything that's going to be coming or if much 
of it is marked as experimental and relatively untested.


- Jonathan M Davis


It would be nice to have a page to link to when questions come up 
on Reddit about compatibility with C++. That page should also 
have information about avoiding the garbage collector and the 
status of GC removal from the standard library.


D 2.066 new behavior

2014-08-21 Thread Paul D Anderson via Digitalmars-d-announce
In all previous versions through 2.066 beta 5, the following code 
compiled and ran correctly:


import std.stdio;

T add(T)(in T x, in T y)
{
T z;
z = x + y;
return z;
}

void main()
{
const double a = 1.0;
const double b = 2.0;
double c;
c = add(a,b);
writefln(c = %s, c);// 3.0
c = 1.0;
writefln(c = %s, c);// 1.0
}

From beta 6 onward it no longer compiles. The problem seems to be 
const qualifiers being carried into the template type. Since a 
and b are const double, the function template parameter T is 
const double. So x and y are const, no problem, but z is now 
const also. The following error message is given.


T add(T)(in T x, in T y)
{
T z;
z = x + y;  // Error: Can't modify const expression z
return z;
}

The same problem shows up elsewhere as 'cannot implicitly convert 
const x to x'
and 'none of the overloads are callable using argument types (x) 
const'.


Is this expected behavior that has never been enforced before, or 
is it something new?


And is anyone else having the same problem?

Paul


Re: D 2.066 new behavior

2014-08-21 Thread safety0ff via Digitalmars-d-announce

On Friday, 22 August 2014 at 01:54:55 UTC, Paul D Anderson wrote:


Is this expected behavior that has never been enforced before, 
or is it something new?


And is anyone else having the same problem?

Paul


Looks like a regression, I've filed it here: 
https://issues.dlang.org/show_bug.cgi?id=13351


Re: D for the Win

2014-08-21 Thread Walter Bright via Digitalmars-d-announce

On 8/20/2014 3:02 PM, anonymous wrote:

[...]


I agree with Dicebot. Let's not go there.