Hello,
I have started my journey to learn D after using C/C++ and Python for
many years. I am studying the book "The D-Programming Language" by
Andrei Alexandrescu and I have tried to search the D-newsgroups for
proper advice without success and I am humbly seeking enlightenment in
the follow
On Sunday, September 29, 2013 09:13:26 Stefan Larsson wrote:
> Hello,
>
> I have started my journey to learn D after using C/C++ and Python for
> many years. I am studying the book "The D-Programming Language" by
> Andrei Alexandrescu and I have tried to search the D-newsgroups for
> proper advice
http://dlang.org/dstyle.html )))
DUB like other tools have a standard directory layout to
accelerate a build process/configuration.
DStyle and other guide lines are general recommendations only. If
you have better style/case, you can describe and use it.
What is the status of adding these annotations to phobos? It's
difficult to use these until phobos gets them. E.g. to! and
format is not pure.
On Sunday, 29 September 2013 at 09:00:56 UTC, simendsjo wrote:
What is the status of adding these annotations to phobos? It's
difficult to use these until phobos gets them. E.g. to! and
format is not pure.
Most of phobos is templated, meaning it relies on inference.
These functions are pure/n
On 2013-09-29 07:49:08 +, Jonathan M Davis said:
On Sunday, September 29, 2013 09:13:26 Stefan Larsson wrote:
Hello,
I have started my journey to learn D after using C/C++ and Python for
many years. I am studying the book "The D-Programming Language" by
Andrei Alexandrescu and I have tried
On 28/09/13 15:38, Damien wrote:
From "The D Programming Language" by Andrei Alexandrescu: "If you forget about
--main, don't worry; the linker will fluently and baroquely remind you of that
in its native language, encrypted Klingon."
If you ever forget why we all love Andrei, a quick read of
https://xkcd.com/979/
Please. You are somebodies hero.
I want to pretty-print the representation of a value of a generic
type T.
In Ruby, I would use 'pp':
value = 'hello'
pp value # prints "hello" - with quotes!
value = 42
pp value # prints 42
Now, value.to!string eliminates the quotes, should value be of
type string.
As a worka
On Sun, 29 Sep 2013 03:47:27 +0200, wagtail wrote:
> When my server and client are on the same machine,these succeed.
> If I try communicating with other machine via global network,it do not
> work.
> IP of my server which you say above should set to server side?
When you instantiate your Interne
I think that I found a bug in the initialization of a struct.
This program throws "a.v.y != 0" but all assert should pass...
(I'm using the latest dmd version available)
Code: http://pastebin.com/VHQP8DaE
On Sunday, 29 September 2013 at 16:36:22 UTC, andrea9940 wrote:
I think that I found a bug in the initialization of a struct.
This program throws "a.v.y != 0" but all assert should pass...
(I'm using the latest dmd version available)
Code: http://pastebin.com/VHQP8DaE
I'm not sure what the rul
Thanks for the answer, I will use the aliases; however I just
tried my code on codepad and surprising it worked without errors
http://codepad.org/hp0YxIi7
On Sunday, 29 September 2013 at 17:35:33 UTC, andrea9940 wrote:
Thanks for the answer, I will use the aliases; however I just
tried my code on codepad and surprising it worked without
errors http://codepad.org/hp0YxIi7
I think there is a bug in there somewhere though:
//
struct V{
un
On Sunday, 29 September 2013 at 14:31:15 UTC, linkrope wrote:
As a workaround, I put the value into an array to make use of
the "undocumented" function formatElement:
"%(%s%)".format([value])
That seems excessive. What happened to format(`"%s"`, s) or
format("\"%s\"", s) or text('"', s,
On Sunday, 29 September 2013 at 18:01:01 UTC, monarch_dodra wrote:
On Sunday, 29 September 2013 at 17:35:33 UTC, andrea9940 wrote:
Thanks for the answer, I will use the aliases; however I just
tried my code on codepad and surprising it worked without
errors http://codepad.org/hp0YxIi7
I thin
Damien wrote:
> is not a D bug
I cannot reproduce your problem.
Giving 10^38 and 10 as parameters the "lol" is output correctly.
-manfred
Hi,
I have upgraded to dmd 2.063.2 and have some troubles making my custom
bidirectional range work (it used to). In fact, even this code fails on
assert and I am not really sure why...
import std.range;
struct MyRange(T)
{
private:
T[] data;
public:
T front() @property { return data[0]
On Sunday, 29 September 2013 at 20:37:13 UTC, Martin Drasar wrote:
static assert(is(typeof(tmp.save) == MyRange!string));
You should call it like this:
static assert(is(typeof(tmp.save()) == MyRange!string));
On Sunday, 29 September 2013 at 20:42:20 UTC, Andrej Mitrovic
wrote:
On Sunday, 29 September 2013 at 20:37:13 UTC, Martin Drasar
wrote:
static assert(is(typeof(tmp.save) == MyRange!string));
You should call it like this:
static assert(is(typeof(tmp.save()) == MyRange!string));
Btw, as for
On 29.9.2013 22:45, Andrej Mitrovic wrote:
> On Sunday, 29 September 2013 at 20:42:20 UTC, Andrej Mitrovic wrote:
>> On Sunday, 29 September 2013 at 20:37:13 UTC, Martin Drasar wrote:
>>> static assert(is(typeof(tmp.save) == MyRange!string));
>>
>> You should call it like this:
>>
>> static assert
On 09/29/2013 10:25 PM, Martin Drasar wrote:
Hi,
I have upgraded to dmd 2.063.2 and have some troubles making my custom
bidirectional range work (it used to). In fact, even this code fails on
assert and I am not really sure why...
...
I get this when trying to compile:
drasar@uriel:/tmp$ dmd t
On Sunday, 29 September 2013 at 18:14:03 UTC, monarch_dodra wrote:
On Sunday, 29 September 2013 at 14:31:15 UTC, linkrope wrote:
As a workaround, I put the value into an array to make use of
the "undocumented" function formatElement:
"%(%s%)".format([value])
That seems excessive. What hap
On 09/29/2013 03:38 PM, linkrope wrote:
On Sunday, 29 September 2013 at 18:14:03 UTC, monarch_dodra wrote:
On Sunday, 29 September 2013 at 14:31:15 UTC, linkrope wrote:
As a workaround, I put the value into an array to make use of the
"undocumented" function formatElement:
"%(%s%)".format([
On Monday, 30 September 2013 at 04:20:32 UTC, Ali Çehreli wrote:
On 09/29/2013 03:38 PM, linkrope wrote:
On Sunday, 29 September 2013 at 18:14:03 UTC, monarch_dodra
wrote:
On Sunday, 29 September 2013 at 14:31:15 UTC, linkrope wrote:
As a workaround, I put the value into an array to make use
o
On 29.9.2013 23:19, Timon Gehr wrote:
> Mark 'save' with @property and it will work.
Well, d'oh! It really works now, thanks Timon. And the documentation
does not call it as a function anywhere. But... having save a property
seems counterintuitive, at least on semantic level.
Martin
On Monday, 30 September 2013 at 06:24:22 UTC, Martin Drasar wrote:
On 29.9.2013 23:19, Timon Gehr wrote:
Mark 'save' with @property and it will work.
Well, d'oh! It really works now, thanks Timon. And the
documentation
does not call it as a function anywhere. But... having save a
property
s
27 matches
Mail list logo