Re: utils.toBulkString is not accesible from utils

2015-12-02 Thread Andre via Digitalmars-d-learn
On Wednesday, 2 December 2015 at 12:37:29 UTC, Marc Schütz wrote: I think so, yes. But according to digger, the current behaviour goes back to at least DMD 2.052. Please file a bug report anyway. Bug report filed https://issues.dlang.org/show_bug.cgi?id=15395

Re: DDOC adds emphasis on symbols, so how to use $(LINK a) properly?

2015-12-02 Thread kraybit via Digitalmars-d-learn
Just wanna follow up. Thanks for the replies everyone. Helped a lot! *** Hmm, this might be out of line, but I can't help myself. I got an idea. I guess a nice feature would be something like a built-in clean representation of macro arguments, so that you could define LINK as LINK

gdc-4.4 on sparc64 debian linux?

2015-12-02 Thread Ish via Digitalmars-d-learn
Where can I find help on this? -ish

demangle()

2015-12-02 Thread Andrew via Digitalmars-d-learn
When I run the DMD profile, the "overview" at the end of the trace.log contains some mangles names (such as: _D3std5stdio4File17LockingTextWriter12__T3putTAyaZ3putMFAyaZ13trustedFwriteFNbNiNexPvmmPOS4core4stdc5stdio7__sFILEZm When I call demangle() on those mangled names it returns the

Re: Struct initializers as expressions

2015-12-02 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 3 December 2015 at 05:26:17 UTC, Chris Wright wrote: I can initialize a struct with named values: --- struct Foo { int i, j, k, l, m, n; } Foo f = {k: 12}; // other fields get default initialization --- I can initialize it with call syntax: --- auto f = Foo(0, 0, 12, 0, 0, 0);

Struct initializers as expressions

2015-12-02 Thread Chris Wright via Digitalmars-d-learn
I can initialize a struct with named values: --- struct Foo { int i, j, k, l, m, n; } Foo f = {k: 12}; // other fields get default initialization --- I can initialize it with call syntax: --- auto f = Foo(0, 0, 12, 0, 0, 0); // works --- I can use the latter as an expression: --- void

Re: Can't understand how to do server response with vibed

2015-12-02 Thread Jack Applegame via Digitalmars-d-learn
On Saturday, 28 November 2015 at 18:03:13 UTC, Suliman wrote: Could anybody help me to understand how to complete HTTP response with vibed. I am sending POST request from AngularJS: $.post("http://127.0.0.1:8080/my;, total_result); where total_result is JSON string: [{"QID":3,"AID":3},

Re: utils.toBulkString is not accesible from utils

2015-12-02 Thread Marc Schütz via Digitalmars-d-learn
On Wednesday, 2 December 2015 at 06:33:36 UTC, Andre wrote: Hi, for following coding there is an error during compilation: module utils; package string toBulkString(string s) { import std.string: format; return "$%s\r\n%s\r\n".format(s.length, s); } unittest {

issue importing std.file or std.stdio on win x64 build.

2015-12-02 Thread Jonathan Villa via Digitalmars-d-learn
Hello, I've been trying to program and app that writes its own log, so, to deal with files I tried using std.file. But with just adding the import std.file; it throws me (AFAIK) a link error: (some texts are in spanish, I tried to translate the important thing) Building Release\ASI.exe...

mutex usage problem?

2015-12-02 Thread Ish via Digitalmars-d-learn
The following code does core dump (compiled with gdc). Pointers will be appreciated. import std.stdio; import std.conv; import std.math; import std.concurrency; import core.thread; import core.sync.mutex; enum count = 5; __gshared double rslt = 0.0; __gshared Mutex mutex; void

Re: mutex usage problem?

2015-12-02 Thread Alex Parrill via Digitalmars-d-learn
On Wednesday, 2 December 2015 at 13:55:02 UTC, Ish wrote: The following code does core dump (compiled with gdc). Pointers will be appreciated. import std.stdio; import std.conv; import std.math; import std.concurrency; import core.thread; import core.sync.mutex; enum count = 5; __gshared