On Thursday, 13 April 2017 at 06:42:30 UTC, Ali Çehreli wrote:
On 04/12/2017 11:33 PM, alex wrote:
> Hello,
>
"The D Programming Language" by Andrei Alexandrescu.
Great book but a lot has changed in D since the book was
written in 2010. Your issue is in the book's errata:
http://erdani.com/
On 04/12/2017 11:33 PM, alex wrote:
> Hello,
>
> I've just started learning D, working my way through "The D Programming
> Language" by Andrei Alexandrescu.
Great book but a lot has changed in D since the book was written in
2010. Your issue is in the book's errata:
http://erdani.com/tdpl/er
Hello,
I've just started learning D, working my way through "The D
Programming Language" by Andrei Alexandrescu. On page 8 there is:
import std.stdio, std.string;
void main(){
uint[string] dictionary;
foreach (line; stdin.byLine()){
foreach (word; splitter(strip(line))){
On 11/1/16 12:24 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Tuesday, November 01, 2016 12:19:11 Steven Schveighoffer via Digitalmars-
d-learn wrote:
On 11/1/16 11:54 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Tuesday, November 01, 2016 10:57:38 Steven Schveighoffer via
On Tuesday, November 01, 2016 12:19:11 Steven Schveighoffer via Digitalmars-
d-learn wrote:
> On 11/1/16 11:54 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
> > On Tuesday, November 01, 2016 10:57:38 Steven Schveighoffer via
> >> Is there not some assumeNoThrow wrapper somewhere?
> >
> > Some
On 11/1/16 11:54 AM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Tuesday, November 01, 2016 10:57:38 Steven Schveighoffer via Digitalmars-
d-learn wrote:
On 10/31/16 6:29 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
assert(0, "format threw when it shouldn't be possible.");
T
On Tuesday, November 01, 2016 10:57:38 Steven Schveighoffer via Digitalmars-
d-learn wrote:
> On 10/31/16 6:29 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
> > On Monday, October 31, 2016 22:20:59 Kapps via Digitalmars-d-learn
wrote:
> >> Assuming you're sure it'll never throw. To enforce t
On 10/31/16 6:29 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
On Monday, October 31, 2016 22:20:59 Kapps via Digitalmars-d-learn wrote:
Assuming you're sure it'll never throw. To enforce this, use try
{ } catch { throw new Error("blah"); }. You can still throw
errors, just not exceptions
On Monday, 31 October 2016 at 22:29:19 UTC, Jonathan M Davis
wrote:
On Monday, October 31, 2016 22:20:59 Kapps via
Digitalmars-d-learn wrote:
Assuming you're sure it'll never throw. To enforce this, use
try
{ } catch { throw new Error("blah"); }. You can still throw
errors, just not exceptions
On Monday, 31 October 2016 at 22:20:59 UTC, Kapps wrote:
Wrap a body of the function to try {} catch {} and it'll work.
Assuming you're sure it'll never throw. To enforce this, use
try { } catch { throw new Error("blah"); }. You can still throw
errors, just not exceptions (as errors are not
On Monday, 31 October 2016 at 16:55:51 UTC, WhatMeWorry wrote:
Is there a way to turn off nothrow or work around it? Because
to me it looks like nothrow prevents me from doing anything
useful.
extern(C) void onKeyEvent(GLFWwindow* window, int key, int
scancode, int action, int modifier) not
On Monday, October 31, 2016 22:20:59 Kapps via Digitalmars-d-learn wrote:
> Assuming you're sure it'll never throw. To enforce this, use try
> { } catch { throw new Error("blah"); }. You can still throw
> errors, just not exceptions (as errors are not meant to be
> caught).
I always use assert(0).
On Monday, 31 October 2016 at 17:04:28 UTC, Temtaime wrote:
On Monday, 31 October 2016 at 16:55:51 UTC, WhatMeWorry wrote:
Is there a way to turn off nothrow or work around it? Because
to me it looks like nothrow prevents me from doing anything
useful.
extern(C) void onKeyEvent(GLFWwindow*
On Monday, 31 October 2016 at 16:55:51 UTC, WhatMeWorry wrote:
Is there a way to turn off nothrow or work around it? Because
to me it looks like nothrow prevents me from doing anything
useful.
extern(C) void onKeyEvent(GLFWwindow* window, int key, int
scancode, int action, int modifier) not
Is there a way to turn off nothrow or work around it? Because to
me it looks like nothrow prevents me from doing anything useful.
extern(C) void onKeyEvent(GLFWwindow* window, int key, int
scancode, int action, int modifier) nothrow
{
if(queue.roomInQueue())
{
auto event = ne
Adam, many thanks for your helpful reply.
On Wednesday, 19 June 2013 at 19:53:08 UTC, Adam D. Ruppe wrote:
On Wednesday, 19 June 2013 at 19:14:58 UTC, Roger Stokes wrote:
and got this compiler diagnostic:
Oh, I thought you were writing to a socket. Yeah, to a
different thread, D will complai
Many thanks, Ali
I put together your suggestions, and it all works correctly !
Thanks again.
On Wednesday, 19 June 2013 at 19:50:55 UTC, Ali Çehreli wrote:
On 06/19/2013 12:14 PM, Roger Stokes wrote:
> and the result compiled and executed with no error signals,
but the
> resulting output of t
On Wednesday, 19 June 2013 at 19:14:58 UTC, Roger Stokes wrote:
and got this compiler diagnostic:
Oh, I thought you were writing to a socket. Yeah, to a different
thread, D will complain if you don't make a sharable copy. So you
do want to idup it...
[47, 47, 32, 101, 120, 97,
On 06/19/2013 12:14 PM, Roger Stokes wrote:
> and the result compiled and executed with no error signals, but the
> resulting output of the file-copy was not the same as the input, it
> looked like this:
>
> std.concurrency.OwnerTerminated@std\concurrency.d(248): Owner terminated
For a clean exi
Many thanks for swift response. I'm still in difficulty, alas.
There were two
possibilities suggested: firstly,
Adam D. Ruppe wrote:
The problem here is that byChunk returns a mutable buffer, type
ubyte[]. If you said "foreach(ubyte[] buffer;
stdin.byChunk(bufferSize)) {...}" you should be
On Wednesday, 19 June 2013 at 15:25:15 UTC, Roger Stokes wrote:
page406x.d(11): Error: cannot implicitly convert expression
(__r24.front()) of type ubyte[] to immutable(ubyte)[]
foreach (immutable(ubyte)[] buffer;
stdin.byChunk(bufferSize)) {
The problem here is that byChunk returns a mu
I'd be grateful for advice. The problem is that I can't get the
example
on page 406-7 of the"The D Programming Language " to compile.
I've cut and pasted the text from the website, and corrected the
typo (undefined tgt, so use stdout instead). I get this
diagnostic:
page406x.d(11): Error: ca
22 matches
Mail list logo