Re: Russian TDPL is available for orders

2012-04-12 Thread Denis Shelomovskij

10.04.2012 15:17, Dmitry Olshansky написал:

On 03.04.2012 4:09, Denis Shelomovskij wrote:

02.04.2012 21:21, Oleg Kuporosov пишет:

There is good news for Russian D Developers, translated Andrey's
TDPL is available for pre-orders at some online stores

http://www.books.ru/books/yazyk-programmirovaniya-d-827252/

Hope it will definetelly increase Russian speaking community, so
far we don't have good localized resources on D.

Andrey, is it first translation?

Thanks,
Oleg.


I was afraid of it and it has finally happened. Sorry, but there is only
*bad* news for us.

I started reading translation of the foreword by Scott Meyers... The
translation is not verbatim (strange, because it's not a poems
translation), but readable... For some reason, a sentence


Update:
I'm not about to crack open a bottle of champagne but I want to point
out that the translation (in the provided preview) was fixed in the mean
time.
You might want to review your comment on the book :)



Very good, thanks.

--
Денис В. Шеломовский
Denis V. Shelomovskij


Video: Andrei Alexandrescu at @ Lang.NEXT 2012

2012-04-12 Thread Jakob Ovrum
This video went up a while ago. I would like to comment on it, 
but I didn't see any thread about it, so here it is.


Three Unlikely Successful Features of D


http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D?format=html5


Thanks to Andrei Alexandrescu for this great presentation! 
Although I'm judging by the video alone, I feel you captivated 
the crowd quite well with this one :)


Re: Video: Andrei Alexandrescu at @ Lang.NEXT 2012

2012-04-12 Thread Jakob Ovrum

On Thursday, 12 April 2012 at 13:46:50 UTC, Jakob Ovrum wrote:
This video went up a while ago. I would like to comment on it, 
but I didn't see any thread about it, so here it is.


Three Unlikely Successful Features of D


http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D?format=html5


Thanks to Andrei Alexandrescu for this great presentation! 
Although I'm judging by the video alone, I feel you captivated 
the crowd quite well with this one :)


Reddit:


http://www.reddit.com/r/programming/comments/s66e8/three_unlikely_successful_features_of_d_langnext/


Re: Video: Andrei Alexandrescu at @ Lang.NEXT 2012

2012-04-12 Thread Jakob Ovrum

On Thursday, 12 April 2012 at 13:46:50 UTC, Jakob Ovrum wrote:
This video went up a while ago. I would like to comment on it, 
but I didn't see any thread about it, so here it is.


Three Unlikely Successful Features of D


http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D?format=html5


Some comments:

Using goto for cleanup is a common trick probably known to most 
modern C users. Maybe the C slide should have used goto, or there 
could have been two C slides; the current setup was perhaps 
slightly unfair to C programmers who would never think of writing 
several indentations of rollback-cleanup.


C# programmers might want a word with you about slide #8, as C# 
does have the `using` statement to help with cleanup in a sort-of 
RAII-style way, except it still needs a level of indentation; 
it's not revolutionary and not nearly as good as D style or even 
C++ style cleanup, but it does improve it over the pure Java 
model.


The editor comment would've made a great segue into mentioning 
VisualD - I don't actually know much about the composition of the 
audience, but it is a Microsoft hosted conference :V


I think it's important to emphasize that string mixins are only 
available at compile-time, I think the host of eval()-like 
functions in other languages have soured quite a few people to 
the idea of mixing in strings as code. It should've been obvious 
to anyone who was paying attention, but it's probably worth 
mentioning nevertheless.


Slide #23: font size too big 8)

Anyway, overall, one of the best presentations about D I've seen 
yet, it's always a joy to watch these videos.




Re: Video: Andrei Alexandrescu at @ Lang.NEXT 2012

2012-04-12 Thread Andrei Alexandrescu

On 4/12/12 9:13 AM, Jakob Ovrum wrote:

On Thursday, 12 April 2012 at 13:46:50 UTC, Jakob Ovrum wrote:

This video went up a while ago. I would like to comment on it, but I
didn't see any thread about it, so here it is.

Three Unlikely Successful Features of D

http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D?format=html5


Thanks to Andrei Alexandrescu for this great presentation! Although
I'm judging by the video alone, I feel you captivated the crowd quite
well with this one :)


Reddit:

http://www.reddit.com/r/programming/comments/s66e8/three_unlikely_successful_features_of_d_langnext/



Rats, there are two posts:

http://www.reddit.com/r/programming/comments/s617m/three_unlikely_successful_features_of_d_andrei/


Andrei


Re: Video: Andrei Alexandrescu at @ Lang.NEXT 2012

2012-04-12 Thread Jakob Ovrum
On Thursday, 12 April 2012 at 14:15:09 UTC, Andrei Alexandrescu 
wrote:

On 4/12/12 9:13 AM, Jakob Ovrum wrote:

On Thursday, 12 April 2012 at 13:46:50 UTC, Jakob Ovrum wrote:
This video went up a while ago. I would like to comment on 
it, but I

didn't see any thread about it, so here it is.

Three Unlikely Successful Features of D

http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D?format=html5


Thanks to Andrei Alexandrescu for this great presentation! 
Although
I'm judging by the video alone, I feel you captivated the 
crowd quite

well with this one :)


Reddit:

http://www.reddit.com/r/programming/comments/s66e8/three_unlikely_successful_features_of_d_langnext/



Rats, there are two posts:

http://www.reddit.com/r/programming/comments/s617m/three_unlikely_successful_features_of_d_andrei/


Andrei


Agh, I missed it, sorry! I deleted mine.

(Hey, mine linked directly to the HTML5 version, I take solace in 
this fact :P)


Re: XSort - Sorting algorithms (including Timsort!)

2012-04-12 Thread Xinok

On Thursday, 12 April 2012 at 05:25:52 UTC, Nathan M. Swan wrote:

On Thursday, 12 April 2012 at 03:04:49 UTC, Xinok wrote:
I just wanted to share this. I started a project a few weeks 
ago on Github to implement several sorting algorithms in D. In 
total, there are 8 modules at the moment, each implementing a 
sorting algorithm or combination thereof.


https://github.com/Xinok/XSort

I just finished Timsort today. It's working, it's stable, but 
I need to spend a little more time better optimizing it.


Cool! To make it a bit more generic, may I suggest making all 
the inputs only have to be "isInputRange", and have it 
converted to an array.


NMS


This incurs different behavior as random-access ranges would be 
sorted in place and input ranges wouldn't be. I could add 
separate functions to make this behavior explicit, but I see 
little point in doing so. It's quite easy to convert an input 
range to an array yourself:


import std.array, std.range;

auto inputRangeToArray(R)(R range)
if(isInputRange!R && !isInfinite!R)
{
auto app = Appender!(ElementType!(R)[])();
static if(hasLength!R) app.reserve(range.length);
app.put(range);
return app.data;
}


Re: XSort - Sorting algorithms (including Timsort!)

2012-04-12 Thread Dmitry Olshansky

On 12.04.2012 18:50, Xinok wrote:

On Thursday, 12 April 2012 at 05:25:52 UTC, Nathan M. Swan wrote:

On Thursday, 12 April 2012 at 03:04:49 UTC, Xinok wrote:

I just wanted to share this. I started a project a few weeks ago on
Github to implement several sorting algorithms in D. In total, there
are 8 modules at the moment, each implementing a sorting algorithm or
combination thereof.

https://github.com/Xinok/XSort

I just finished Timsort today. It's working, it's stable, but I need
to spend a little more time better optimizing it.


Cool! To make it a bit more generic, may I suggest making all the
inputs only have to be "isInputRange", and have it converted to an array.

NMS


This incurs different behavior as random-access ranges would be sorted
in place and input ranges wouldn't be. I could add separate functions to
make this behavior explicit, but I see little point in doing so. It's
quite easy to convert an input range to an array yourself:

import std.array, std.range;

auto inputRangeToArray(R)(R range)
if(isInputRange!R && !isInfinite!R)
{
auto app = Appender!(ElementType!(R)[])();
static if(hasLength!R) app.reserve(range.length);
app.put(range);
return app.data;
}


Indeed and there is a standard function array(...) that does this very 
thing.


--
Dmitry Olshansky


Re: Modern COM Programming in D

2012-04-12 Thread Jay Norwood

On Tuesday, 3 April 2012 at 14:10:32 UTC, Jesse Phillips wrote:

Most of his code isn't available as it was kind of under
Microsoft. However I revived Juno for D2 awhile ago (still need
to play with it myself). Juno provides some nice tools and API.

https://github.com/JesseKPhillips/Juno-Windows-Class-Library

http://dsource.org/projects/juno


There was a discussion about D support for xpcom at this thread a 
few years back, where the conclusion seems to have been that 
xpcom usage was abi compatible.  Have you  tested communicating 
with xpcom objects using the juno library?


http://forum.dlang.org/thread/fqkfsu$25g5$1...@digitalmars.com#post-fqph1i:241kk3:241:40digitalmars.com


Re: Revamp of CandyDOC

2012-04-12 Thread Brad Anderson
On Wed, Apr 11, 2012 at 4:17 PM, Eldar Insafutdinov <
e.insafutdi...@gmail.com> wrote:

> CandyDOC has not been updated for about 6 years, and despite its
> usefulness its current state was rather sad. Overall look was awful;
> colours, font sizes, everything just was not right. D allows some very
> beautiful code, but the look and feel of documentation is not on par.
> Anyway, I gave it a bit of a refresh (which was in fact a major
> refactoring) and here is an example http://eldar.me/candydoc/**
> algorithm.html  . Among new
> features is also instant filtering. You can grab the sources at
> https://github.com/eldar/**candydoc  .
> There is still a scope for improvements: adding links to the subsections
> and ideally producing links to the source code. For that ddoc needs to
> output line numbers of declarations which I am not sure it does, but that
> can be added.
>
> Cheers
>
> Eldar
>

Looks really good.  Nice work.

Regards,
Brad Anderson


Re: Modern COM Programming in D

2012-04-12 Thread Jacob Carlborg

On 2012-04-12 17:59, Jay Norwood wrote:

On Tuesday, 3 April 2012 at 14:10:32 UTC, Jesse Phillips wrote:

Most of his code isn't available as it was kind of under
Microsoft. However I revived Juno for D2 awhile ago (still need
to play with it myself). Juno provides some nice tools and API.

https://github.com/JesseKPhillips/Juno-Windows-Class-Library

http://dsource.org/projects/juno


There was a discussion about D support for xpcom at this thread a few
years back, where the conclusion seems to have been that xpcom usage was
abi compatible. Have you tested communicating with xpcom objects using
the juno library?

http://forum.dlang.org/thread/fqkfsu$25g5$1...@digitalmars.com#post-fqph1i:241kk3:241:40digitalmars.com


DWT uses XPCOM to integrate Firefox if I recall correctly.

--
/Jacob Carlborg


DMD 2.059 ??

2012-04-12 Thread Alvaro
The changelog mentions DMD 2.059 as released on April 1, 2012, but there 
is no link to it. Is it released?


http://dlang.org/changelog.html


Re: DMD 2.059 ??

2012-04-12 Thread Alex Rønne Petersen

On 12-04-2012 20:49, Alvaro wrote:

The changelog mentions DMD 2.059 as released on April 1, 2012, but there
is no link to it. Is it released?

http://dlang.org/changelog.html


It's not released yet.

This is why listing the next release on that page is a bad idea...

--
- Alex


Re: DMD 2.059 ??

2012-04-12 Thread Alvaro

El 12/04/2012 20:50, Alex Rønne Petersen escribió:

On 12-04-2012 20:49, Alvaro wrote:

The changelog mentions DMD 2.059 as released on April 1, 2012, but there
is no link to it. Is it released?

http://dlang.org/changelog.html


It's not released yet.

This is why listing the next release on that page is a bad idea...



OK. Maybe if the page said "Unreleased" or "Expected release date xxx"...



Re: DMD 2.059 ??

2012-04-12 Thread Ali Çehreli

On 04/12/2012 11:49 AM, Alvaro wrote:

The changelog mentions DMD 2.059 as released on April 1, 2012, but there
is no link to it. Is it released?

http://dlang.org/changelog.html


I don't think it was intended but don't trust anything that is dated 
April 1. :p


Ali


Re: DMD 2.059 ??

2012-04-12 Thread Matt Soucy

On 04/12/2012 02:58 PM, Ali Çehreli wrote:

On 04/12/2012 11:49 AM, Alvaro wrote:

The changelog mentions DMD 2.059 as released on April 1, 2012, but there
is no link to it. Is it released?

http://dlang.org/changelog.html


I don't think it was intended but don't trust anything that is dated
April 1. :p

Ali
I noticed that as well last night, got excited, and then was quickly 
confused. :/ Especially since it's clickable.

-Matt


Re: DMD 2.059 ??

2012-04-12 Thread Jonathan M Davis
On Thursday, April 12, 2012 20:50:16 Alex Rønne Petersen wrote:
> On 12-04-2012 20:49, Alvaro wrote:
> > The changelog mentions DMD 2.059 as released on April 1, 2012, but there
> > is no link to it. Is it released?
> > 
> > http://dlang.org/changelog.html
> 
> It's not released yet.
> 
> This is why listing the next release on that page is a bad idea...

I think that it's a side effect of how the beta is dealt with, but I don't know 
(2.059 is in beta right now - head to the beta list if you want to discuss 
it). Certainly, I'd argue that it shouldn't be listed until it's actually 
released and that if it's been done on purpose, it's that much worse.

- Jonathan M Davis


Re: Revamp of CandyDOC

2012-04-12 Thread Jonas Drewsen
On Wednesday, 11 April 2012 at 22:34:40 UTC, Andrej Mitrovic 
wrote:

On 4/12/12, Eldar Insafutdinov  wrote:

There is still a scope for
improvements


Also: Not jumping to the Outline pane every time a different 
package
is selected (OR it should memorize the position of the 
scrollbar).

This is especially annoying in e.g. gtkd:
http://gtkd.mikewey.eu/src/cairo/Surface.html Whenever I click 
on
another package it jumps to the outline view, and if I go back 
I can't

figure out where I was because the scrollbar resets.

Othe than that your improvements look very nice!


The outline and package panes should be combined IMHO. Perhaps 
something like (ascii art):


---
+
  atk
Component
---
MyClass
  getStruct
  contains
  ...
  ...
FooClass
  setBar
  ...
---


Where clicking on atk would show all atk packages. Clicking on + 
show all packages etc.


The lower section is simply showing the currenly selected package.

/Jonas




Re: Revamp of CandyDOC

2012-04-12 Thread a

This looks really nice.


Re: Video: Andrei Alexandrescu at @ Lang.NEXT 2012

2012-04-12 Thread Martin Nowak
On Thu, 12 Apr 2012 15:46:49 +0200, Jakob Ovrum   
wrote:


This video went up a while ago. I would like to comment on it, but I  
didn't see any thread about it, so here it is.


 Three Unlikely Successful Features of D

  
http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D?format=html5


Thanks to Andrei Alexandrescu for this great presentation! Although I'm  
judging by the video alone, I feel you captivated the crowd quite well  
with this one :)


The generalized palindrome doesn't work with odd lengths.
simple fix:

bool palindrome(Range)(Range range) {
for (; !range.empty; range.popFront(), range.empty || range.popBack())  
{

if (range.front != range.back)
return false;
}
return true;
}


Re: Revamp of CandyDOC

2012-04-12 Thread Jordi Sayol
Al 12/04/12 22:53, En/na Jonas Drewsen ha escrit:
> 
> The outline and package panes should be combined IMHO. Perhaps something like 
> (ascii art):
> 
> ---
> +
>   atk
> Component
> ---
> MyClass
>   getStruct
>   contains
>   ...
>   ...
> FooClass
>   setBar
>   ...
> ---
> 
> 
> Where clicking on atk would show all atk packages. Clicking on + show all 
> packages etc.
> 
> The lower section is simply showing the currenly selected package.

I'm agree with you, but this is a deep rebuilding. First step is to separate 
left pane into a single file, and this will also drastically reduce the total 
size. Actually, every html package file contains all the left pane 
(unnecessarily repeated).

BTW, It looks very nice now. Thanks!

Best regards,
-- 
Jordi Sayol


Re: Revamp of CandyDOC

2012-04-12 Thread Jay Norwood
On Wednesday, 11 April 2012 at 22:17:16 UTC, Eldar Insafutdinov 
wrote:

example http://eldar.me/candydoc/algorithm.html . Among new



The outline panel links work fine on Google Chrome, but not on 
IE8.


Re: Video: Andrei Alexandrescu at @ Lang.NEXT 2012

2012-04-12 Thread Andrei Alexandrescu

On 4/12/12 4:57 PM, Martin Nowak wrote:

On Thu, 12 Apr 2012 15:46:49 +0200, Jakob Ovrum 
wrote:


This video went up a while ago. I would like to comment on it, but I
didn't see any thread about it, so here it is.

Three Unlikely Successful Features of D

http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D?format=html5


Thanks to Andrei Alexandrescu for this great presentation! Although
I'm judging by the video alone, I feel you captivated the crowd quite
well with this one :)


The generalized palindrome doesn't work with odd lengths.
simple fix:

bool palindrome(Range)(Range range) {
for (; !range.empty; range.popFront(), range.empty || range.popBack()) {
if (range.front != range.back)
return false;
}
return true;
}


Ouch. Thanks.

Andrei


Re: Video: Andrei Alexandrescu at @ Lang.NEXT 2012

2012-04-12 Thread David Nadlinger
On Thursday, 12 April 2012 at 22:15:42 UTC, Andrei Alexandrescu 
wrote:

On 4/12/12 4:57 PM, Martin Nowak wrote:

The generalized palindrome doesn't work with odd lengths.
simple fix:

bool palindrome(Range)(Range range) {
for (; !range.empty; range.popFront(), range.empty || 
range.popBack()) {

if (range.front != range.back)
return false;
}
return true;
}


Ouch. Thanks.


Call me stupid, but how exactly is the version from Andrei's 
slides broken?


David


Re: Video: Andrei Alexandrescu at @ Lang.NEXT 2012

2012-04-12 Thread David Nadlinger

On Thursday, 12 April 2012 at 22:27:03 UTC, David Nadlinger wrote:
Call me stupid, but how exactly is the version from Andrei's 
slides broken?


Disregard that, I was looking at the array slicing version.

David


Re: Revamp of CandyDOC

2012-04-12 Thread Jordi Sayol
Al 13/04/12 00:14, En/na Jay Norwood ha escrit:
> On Wednesday, 11 April 2012 at 22:17:16 UTC, Eldar Insafutdinov wrote:
>> example http://eldar.me/candydoc/algorithm.html . Among new
> 
> 
> The outline panel links work fine on Google Chrome, but not on IE8.
> 

Also properly works on Firefox 11 (Linux), and is a mess on IE6 on W2K.

-- 
Jordi Sayol


Re: Video: Andrei Alexandrescu at @ Lang.NEXT 2012

2012-04-12 Thread Andrei Alexandrescu

On 4/12/12 4:57 PM, Martin Nowak wrote:

On Thu, 12 Apr 2012 15:46:49 +0200, Jakob Ovrum 
wrote:


This video went up a while ago. I would like to comment on it, but I
didn't see any thread about it, so here it is.

Three Unlikely Successful Features of D

http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D?format=html5


Thanks to Andrei Alexandrescu for this great presentation! Although
I'm judging by the video alone, I feel you captivated the crowd quite
well with this one :)


The generalized palindrome doesn't work with odd lengths.
simple fix:

bool palindrome(Range)(Range range) {
for (; !range.empty; range.popFront(), range.empty || range.popBack()) {
if (range.front != range.back)
return false;
}
return true;
}


Wrote a comment:

http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Three-Unlikely-Successful-Features-of-D

Thanks for the fix!


Andrei


dmd 1.074 and 2.059 release

2012-04-12 Thread Walter Bright

Another big pile of bug fixes. More contributors than ever!

http://www.digitalmars.com/d/1.0/changelog.html
http://ftp.digitalmars.com/dmd.1.074.zip

http://www.digitalmars.com/d/2.0/changelog.html
https://github.com/downloads/D-Programming-Language/dmd/dmd.2.059.zip

Note that the changelogs on dlang.org haven't been updated yet. Hope to get that 
done soon.


Re: Revamp of CandyDOC

2012-04-12 Thread Jacob Carlborg

On 2012-04-12 22:53, Jonas Drewsen wrote:

The outline and package panes should be combined IMHO. Perhaps something
like (ascii art):

---
+
atk
Component
---
MyClass
getStruct
contains
...
...
FooClass
setBar
...
---


Where clicking on atk would show all atk packages. Clicking on + show
all packages etc.

The lower section is simply showing the currenly selected package.

/Jonas




That would list all packages and all symbols in the current module? I 
think the list can be quite long as it currently is. Adding all the 
packages as well will make it even longer.


--
/Jacob Carlborg


Re: dmd 1.074 and 2.059 release

2012-04-12 Thread Jacob Carlborg

On 2012-04-13 07:53, Walter Bright wrote:

Another big pile of bug fixes. More contributors than ever!

http://www.digitalmars.com/d/1.0/changelog.html
http://ftp.digitalmars.com/dmd.1.074.zip

http://www.digitalmars.com/d/2.0/changelog.html
https://github.com/downloads/D-Programming-Language/dmd/dmd.2.059.zip

Note that the changelogs on dlang.org haven't been updated yet. Hope to
get that done soon.


Another awesome release. Keep up the good work everyone :)

--
/Jacob Carlborg


Re: dmd 1.074 and 2.059 release

2012-04-12 Thread Ali Çehreli

On 04/12/2012 10:53 PM, Walter Bright wrote:

Another big pile of bug fixes. More contributors than ever!

http://www.digitalmars.com/d/1.0/changelog.html
http://ftp.digitalmars.com/dmd.1.074.zip

http://www.digitalmars.com/d/2.0/changelog.html
https://github.com/downloads/D-Programming-Language/dmd/dmd.2.059.zip

Note that the changelogs on dlang.org haven't been updated yet. Hope to
get that done soon.


And UFCS really works! :)

FibonacciSerisi().take(5).cycle().take(20).writeln();

I have to update some chapters... ;)

Ali


Re: dmd 1.074 and 2.059 release

2012-04-12 Thread Gour
On Thu, 12 Apr 2012 23:35:40 -0700
Ali Çehreli  wrote:

> I have to update some chapters... ;)

Oh noes...when we'll get new ones. :-)


Sincerely,
Gour


-- 
Those who are on this path are resolute in purpose, 
and their aim is one. O beloved child of the Kurus, 
the intelligence of those who are irresolute is many-branched.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


signature.asc
Description: PGP signature