Re: Better docs for D (WIP)

2016-01-30 Thread Adam D. Ruppe via Digitalmars-d-announce

On Saturday, 30 January 2016 at 21:22:02 UTC, Chris Wright wrote:
You probably know about this, but some of the source code 
formatting is a
little off (and allowing javascript / cross-site requests 
doesn't help).


Right, the contract formatter is something I started a while ago 
but not finished yet.


And actually, a lot of the contracts are ugly anyway, even if 
nicely formatted  (that is, the code is more 
implementation-focused than presentable as documentation), so I'm 
not sure trying to print them is actually a good idea.



This is the original source of your picture:

in
{
static if (hasLength!Range)
{
// TODO: core.checkedint supports mixed signedness yet?
import core.checkedint : adds, addu;
import std.conv : ConvException, to;

alias LengthType = typeof(range.length);
bool overflow;
static if(isSigned!Enumerator && isSigned!LengthType)
auto result = adds(start, range.length, overflow);
else static if(isSigned!Enumerator)
{
Largest!(Enumerator, Signed!LengthType) signedLength;
try signedLength = 
to!(typeof(signedLength))(range.length);

catch(ConvException)
overflow = true;
catch(Exception)
assert(false);

auto result = adds(start, signedLength, overflow);
}
else
{
static if(isSigned!LengthType)
assert(range.length >= 0);
auto result = addu(start, range.length, overflow);
}

assert(!overflow && result <= Enumerator.max);
}
}



It is certainly nicer when correctly formatted... but still, what 
is that actually saying?


The initial part is more readable than the original source 
code, but the in contract is  a bit messy.


aye, that's where I spent all the time.

Even with that, this is a lot easier and more approachable than 
the dlang.org docs. Thanks!


awesome


Re: Better docs for D (WIP)

2016-01-30 Thread Chris Wright via Digitalmars-d-announce
On Sat, 30 Jan 2016 20:58:44 +, Adam D. Ruppe wrote:

> Just want to update y'all that my better docs continue to improve with
> each passing week.
> 
> I just did a style facelift on the members section:
> 
> http://dpldocs.info/experimental-docs/std.algorithm.setops.html

Oh god, that's lovely. It works even with outrageously strict security 
policies in the browser.

You probably know about this, but some of the source code formatting is a 
little off (and allowing javascript / cross-site requests doesn't help). 
Example:
http://ikeran.org/images/std.range.enumerate.png

The initial part is more readable than the original source code, but the 
in contract is  a bit messy.

Even with that, this is a lot easier and more approachable than the 
dlang.org docs. Thanks!


Re: New D book available for pre-order: D Web Development

2016-01-30 Thread bachmeier via Digitalmars-d-announce

On Saturday, 30 January 2016 at 12:40:55 UTC, Daniel Kozak wrote:

On Sunday, 24 January 2016 at 14:35:53 UTC, Kai Nacke wrote:

On Sunday, 24 January 2016 at 13:03:42 UTC, notna wrote:

Any news? Just some days left until "January 2016" is over ;)


I am checking the pre-final PDFs of the last chapters right 
now.

Publishing date will be very soon

Regards,
Kai


It is available now :)


I expected them to send an email notification. I can access it, 
but wouldn't have known without your post.


Re: New D book available for pre-order: D Web Development

2016-01-30 Thread bachmeier via Digitalmars-d-announce
On Saturday, 30 January 2016 at 17:58:23 UTC, Jacob Carlborg 
wrote:

On 2016-01-30 18:33, barberian wrote:

Yes, in fact the ebook it's expensive in this case, and where 
I live we
"unfortunately" need to convert the pound multiplying by 6, 
ouch!


How can two things be cheaper than one? It doesn't add up. Is 
there a mistake?


Just noticed that it's the same for Learning D. Combo is 50% off, 
ebook is full price.


Re: New D book available for pre-order: D Web Development

2016-01-30 Thread barberian via Digitalmars-d-announce
On Saturday, 30 January 2016 at 17:58:23 UTC, Jacob Carlborg 
wrote:

On 2016-01-30 18:33, barberian wrote:

Yes, in fact the ebook it's expensive in this case, and where 
I live we
"unfortunately" need to convert the pound multiplying by 6, 
ouch!


How can two things be cheaper than one? It doesn't add up. Is 
there a mistake?


I don't know what you're seeing there, but here:

Ebook = 25,18 (pounds)
Ebook + Physical = 25,99 (pounds)

So for what I understand if you by the Physical copy you win the 
ebook.


Re: New D book available for pre-order: D Web Development

2016-01-30 Thread bachmeier via Digitalmars-d-announce

On Saturday, 30 January 2016 at 18:09:37 UTC, barberian wrote:
On Saturday, 30 January 2016 at 17:58:23 UTC, Jacob Carlborg 
wrote:

On 2016-01-30 18:33, barberian wrote:

Yes, in fact the ebook it's expensive in this case, and where 
I live we
"unfortunately" need to convert the pound multiplying by 6, 
ouch!


How can two things be cheaper than one? It doesn't add up. Is 
there a mistake?


I don't know what you're seeing there, but here:

Ebook = 25,18 (pounds)
Ebook + Physical = 25,99 (pounds)

So for what I understand if you by the Physical copy you win 
the ebook.


Here (US) the ebook is $39.99. The combo is on sale for $20. It 
seems odd, but I've seen it before.


Re: New D book available for pre-order: D Web Development

2016-01-30 Thread Daniel Kozak via Digitalmars-d-announce

On Sunday, 24 January 2016 at 14:35:53 UTC, Kai Nacke wrote:

On Sunday, 24 January 2016 at 13:03:42 UTC, notna wrote:

Any news? Just some days left until "January 2016" is over ;)


I am checking the pre-final PDFs of the last chapters right now.
Publishing date will be very soon

Regards,
Kai


It is available now :)


Re: My LLVM talk @ FOSDEM'16

2016-01-30 Thread Kai Nacke via Digitalmars-d-announce
Live streaming is index here: 
https://fosdem.org/2016/schedule/streaming/


Room is K.3.201.

Regards,
Kai

On Thursday, 7 January 2016 at 23:38:07 UTC, Kai Nacke wrote:

Hi everybody!

Like the last 2 years I am a speaker in the LLVM toolchain 
devroom @ FOSDEM'16.
My talk is not D related but more about LLVM internals. (For 
sure, it is related to my work on LDC!)


Read the announcement at 
https://fosdem.org/2016/schedule/event/llvm_to_new_os/.


FOSDEM is a two-day event organised by volunteers to promote 
the widespread use of open source software.


Taking place in the beautiful city of Brussels (Belgium), 
FOSDEM is widely recognised as "the best open source conference 
in Europe".


FOSDEM 2016 will take place at ULB Campus Solbosch on Saturday 
30 and Sunday 31 January 2016. Read more about the event at 
https://fosdem.org/2016/.


Regards,
Kai





Re: Release D 2.070.0

2016-01-30 Thread Dicebot via Digitalmars-d-announce

On Wednesday, 27 January 2016 at 21:08:54 UTC, Martin Nowak wrote:

Glad to announce D 2.070.0

http://dlang.org/download.html

This release comes with the new std.experimental.ndslice, 
heavily expanded Windows bindings, and native exception 
handling on 64-bit linux. See the changelog for more details.


http://dlang.org/changelog/2.070.0.html

-Martin


NB: tagged commit has 2.069 in VERSION file resulting in built 
compiler reporting wrong version. I have added a workaround in 
packaging script for now but would be nice to fix that in 2.070.1


Re: Better docs for D (WIP)

2016-01-30 Thread Adam D. Ruppe via Digitalmars-d-announce

On Saturday, 30 January 2016 at 22:37:18 UTC, Adam D. Ruppe wrote:
I know quite a few css tricks... but I don't think I can 
actually do this without adding a script or something, so I 
just put an arbitrary fixed width on hover for now.


Meh, I just did it with JavaScript, so if you enable script, you 
should be free of that now (and if not, the fixed width fallback 
is still there.)


(specifically, the script just edits the html of a special 
dynamic 

Re: Better docs for D (WIP)

2016-01-30 Thread Ola Fosheim Grøstad via Digitalmars-d-announce

On Saturday, 30 January 2016 at 22:37:18 UTC, Adam D. Ruppe wrote:
I know quite a few css tricks... but I don't think I can 
actually do this without adding a script or something, so I 
just put an arbitrary fixed width on hover for now.


One trick is to set the width and clipping on "dt > *" instead of 
"dt", and use "calc(...)" for dynamic sizes.