It is a pitty that although Variant is the default message type in
concurrency, it still has issues:
https://issues.dlang.org/buglist.cgi?quicksearch=variant%20concurrency&list_id=202195
It looks like passing a pointer to an immutable(Message) works as well:
import std.stdio;
import std.concu
I tested the code from: http://dlang.org/struct.html
Section: Dynamic Initialization of Structs
struct S
{
int a;
static S opCall(int v)
{
S s;
s.a = v;
return s;
}
static S opCall(S v)
{
S s;
s.a = v.a + 1;
return s;
Hello,
I get different results if I either use toHexString or
crcHexString.
I can't explain this behavior because crcHexString is just an
alias of toHexString...
Test code: http://pastebin.com/33Ye7yyJ
http://forum.dlang.org/post/ydaeytbyxdnwlbpwk...@forum.dlang.org
On Sunday, 19 July 2015 at 12:00:23 UTC, Kagamin wrote:
http://forum.dlang.org/post/ydaeytbyxdnwlbpwk...@forum.dlang.org
Argh... must use the search function first...
If I understand correctly in my case toHexString is returning a
static char[len].
But why it gets silently converted to an im
This line is illegal:
return toHexString!(Order.decreasing)(crc.finish());
The std.digest.toHexString and variants return a *static array*
which is static data and has a scope lifetime.
It is horrendous a compiler bug that allows it to implicitly
convert to string - it should not compile b
On Sunday, 19 July 2015 at 12:08:18 UTC, Adam D. Ruppe wrote:
This line is illegal:
return toHexString!(Order.decreasing)(crc.finish());
The std.digest.toHexString and variants return a *static array*
which is static data and has a scope lifetime.
It is horrendous a compiler bug that allow
Pardon me for trivial question, Am new to D.
Why would a statement as below fail to compile. The plan is to do
some computation at compile-time hence considering the static-if
statement which fails to compile. The regular if-statement
compiles but is not useful since it is a runtime construc
On Sunday, 19 July 2015 at 12:17:04 UTC, Clayton wrote:
Pardon me for trivial question, Am new to D.
In D, you can run regular runtime code at compile time in a lot
of cases. Just write an ordinary function that returns the data
you need, then use it in a static variable initialization.
//
On 20/07/2015 12:17 a.m., Clayton wrote:
Pardon me for trivial question, Am new to D.
Why would a statement as below fail to compile. The plan is to do some
computation at compile-time hence considering the static-if statement
which fails to compile. The regular if-statement compiles but is no
When I try co compile next code:
class MyCustomLogger : Logger
{
this(string newName, LogLevel lv) @safe
{
super(newName, lv);
}
override void writeLogMsg(ref LogEntry payload)
{
// log message in my custom way
}
}
auto logger = new MyCustomLogger();
logg
On 07/19/2015 03:26 AM, TC wrote:
I tested the code from: http://dlang.org/struct.html
Section: Dynamic Initialization of Structs
struct S
{
int a;
static S opCall(int v)
{
S s;
s.a = v;
return s;
}
static S opCall(S v)
{
S s;
Am Sun, 19 Jul 2015 12:08:16 +
schrieb "Adam D. Ruppe" :
> This line is illegal:
>
> > return toHexString!(Order.decreasing)(crc.finish());
>
> The std.digest.toHexString and variants return a *static array*
> which is static data and has a scope lifetime.
>
> It is horrendous a compiler b
On Fri, 17 Jul 2015 22:53:55 +, Minas Mina wrote:
> bump
sorry, i was wrong about GC non-calling. yet we still need more info: how
long it works before crashing, how much threads it runs, how many "git
clone" commands were ok before crach, what DMD version are you using, and
*full* source
It looks like passing a pointer to an immutable(Message) works
as well:
Oh, yes, pointer. Ha! I didn't even think of that. Thanks.
I'm not familiar with how garbage collection works in D. If the
initial reference goes out of scope, and you just have a pointer
- in another thread, no less - th
I have DMD64 D Compiler v2.067.1 installed, and in the documentation of
phobos what it says about std.stream is "don't use it on new code". It
doesn't, however, appear to offer any replacement. Certainly std.file,
std.stdio, and std.path aren't replacements.
So what *is* the appropriate repla
On Sunday, 19 July 2015 at 17:04:07 UTC, Frank Pagliughi wrote:
[...]
Oh, yes, pointer. Ha! I didn't even think of that. Thanks.
I'm not familiar with how garbage collection works in D. If the
initial reference goes out of scope, and you just have a
pointer - in another thread, no less - the
On Monday, 29 June 2015 at 12:00:14 UTC, Jonathan M Davis wrote:
On Sunday, June 28, 2015 11:14:57 Baz via Digitalmars-d-learn
wrote:
On Sunday, 28 June 2015 at 05:04:48 UTC, DlangLearner wrote:
> I will convert a Java program into D. The original Java code
> is based on the class RandomeAccess
On 07/19/2015 06:02 AM, Suliman wrote:
> When I try co compile next code:
>
> class MyCustomLogger : Logger
> {
> this(string newName, LogLevel lv) @safe
> {
> super(newName, lv);
According to (and despite :p) its documentation Logger's constructor
takes just a LogLevel:
On Sunday, 19 July 2015 at 19:54:31 UTC, Jarl André Hübenthal
wrote:
Hi
I have created a personal project that aims to learn myself
more about D/vibe.d and to create a simple and easy to grasp
example on Mongo -> Vibe -> Angular.
[...]
Nice. I was thinking about doing one up in React but h
On Sunday, 19 July 2015 at 19:54:31 UTC, Jarl André Hübenthal
wrote:
Hi
I have created a personal project that aims to learn myself
more about D/vibe.d and to create a simple and easy to grasp
example on Mongo -> Vibe -> Angular.
Nice ! I'm also working on a project like this, using some pai
Hi
I have created a personal project that aims to learn myself more
about D/vibe.d and to create a simple and easy to grasp example
on Mongo -> Vibe -> Angular.
I have been thinking about the possibility of embedding D code in
diet templates, as for ex to set api urls. Right now the urls are
https://issues.dlang.org/show_bug.cgi?id=14811
On Wed, Jun 17, 2015 at 3:22 AM, Liran Zvibel via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> On Monday, 8 June 2015 at 04:08:55 UTC, Adam D. Ruppe wrote:
>
>> The easiest way is to not use search paths, and instead pass all the
I've attached a reduced use case showing that the solutions proposed in
this thread do not work, and wrote a local modification to dmd to allow a
flag -exclude_cwd_from_imports that does work. Would that be acceptable to
have this in official dmd?
On Sun, Jul 19, 2015 at 8:07 PM, Timothee Cour
w
On Sunday, July 19, 2015 09:56:11 Charles Hixson via Digitalmars-d-learn wrote:
> I have DMD64 D Compiler v2.067.1 installed, and in the documentation of
> phobos what it says about std.stream is "don't use it on new code". It
> doesn't, however, appear to offer any replacement. Certainly std.file
On Monday, 20 July 2015 at 03:33:08 UTC, Timothee Cour wrote:
I've attached a reduced use case showing that the solutions
proposed in this thread do not work, and wrote a local
modification to dmd to allow a flag -exclude_cwd_from_imports
that does work. Would that be acceptable to have this in
26 matches
Mail list logo