On Tuesday, 3 May 2016 at 10:48:51 UTC, Nordlöw wrote:
This is a big problem for me because, in my application, I've
realized unittests as functions called from within static
shared module constructors to elide the problem of unittests
being enabled recursively, which slows down iterative
comp
On Saturday, 7 May 2016 at 01:37:30 UTC, Jonathan M Davis wrote:
In general, it's better to use representation than to cast,
because representation gets the constness right, whereas if you
cast, there's always the risk that you won't.
Yeah, if it is a general thing, but here it is a simple fu
On Fri, 06 May 2016 21:57:22 +
"Adam D. Ruppe via Digitalmars-d-learn"
wrote:
> On Friday, 6 May 2016 at 21:39:35 UTC, Anonymouse wrote:
> > Is this different from what std.string.representation does?
>
> No, it does the same thing, but with your own function the
> intention may be clearer (o
On Friday, 6 May 2016 at 21:39:35 UTC, Anonymouse wrote:
Is this different from what std.string.representation does?
No, it does the same thing, but with your own function the
intention may be clearer (or you could do a template to avoid any
function or custom types too)
On Friday, 6 May 2016 at 20:29:35 UTC, Adam D. Ruppe wrote:
On Friday, 6 May 2016 at 20:01:27 UTC, Alexandru Ermicioi wrote:
Is it possible somehow to convert implicitly a string literal
Not implicitly (well, unless you just use string, ascii is a
strict subset of utf-8 anyway), but you could
On Friday, 6 May 2016 at 20:01:27 UTC, Alexandru Ermicioi wrote:
Is it possible somehow to convert implicitly a string literal
Not implicitly (well, unless you just use string, ascii is a
strict subset of utf-8 anyway), but you could do it explicitly
easily.
immutable(ubyte)[] ascii(string
Good day,
Is it possible somehow to convert implicitly a string literal
into an ubyte array?
For example:
void do(immutable(ubyte)[] asciiString) {
// Do something with ascii string.
}
And from another section of code, calling it like:
do("Some ascii string");
---
If no, is there an
The tnfox cross-platform toolkit had some solution for per-thread
event loops. I believe this was the demo:
https://github.com/ned14/tnfox/blob/master/TestSuite/TestEventLoops/main.cpp
On Wednesday, 4 May 2016 at 15:23:20 UTC, Rene Zwanenburg wrote:
On Wednesday, 4 May 2016 at 14:54:39 UTC, chmike wrote:
Two constructors, one accepting a function and the other one
accepting a delegate would do the job for the API. Is there a
simple method to convert a function pointer into a
On Friday, 6 May 2016 at 03:24:23 UTC, tsbockman wrote:
On Friday, 6 May 2016 at 02:57:59 UTC, Jeremy DeHaan wrote:
[...]
From the spec
(https://dlang.org/spec/function.html#nothrow-functions):
"Nothrow functions can only throw exceptions derived from
class Error."
Throwing an Error is
On 07/05/2016 12:08 AM, chmike wrote:
Excuse the naive question rikki, why does the window event loop have to
be single threaded ? The question is just to expose the rationale.
Is it to avoid the synchronization overhead to access the window data ?
In this case there is indeed a lot of data. Is
On Friday, 6 May 2016 at 05:00:48 UTC, Erik Smith wrote:
Is there an existing way to adapt a parameter pack to an input
range? I would like to construct an array with it. Example:
void run(A...) (A args) {
Array!int a(toInputRange(args));
}
Use std.range.only: http://dlang.org/phobos/st
On Friday, 6 May 2016 at 12:08:29 UTC, chmike wrote:
In some applications and event types the synchronization
overhead is small compared to the benefit of executing tasks in
parallel on different cores.
GUI generates too many messages that are handled too fast -
synchronization overhead would
Excuse the naive question rikki, why does the window event loop
have to be single threaded ? The question is just to expose the
rationale.
Is it to avoid the synchronization overhead to access the window
data ? In this case there is indeed a lot of data. Is there
another reason ?
In some ap
Me and Dicebot have just had a quick conversion on IRC about this.
To recap, I'm talking about event loops for windowing.
For an event loop for e.g. socket based systems like Vibe.d it is a
different story.
For windowing you have the limitation of having to be on the same thread
as the one tha
On 06/05/2016 11:21 PM, Dicebot wrote:
On Thursday, 5 May 2016 at 09:21:04 UTC, rikki cattermole wrote:
Event loops needs to be thread local not per process.
So many API's such as WinAPI for e.g. GUI's have this requirement in
it that its just not worth fighting over.
It is implementation deta
On Thursday, 5 May 2016 at 09:21:04 UTC, rikki cattermole wrote:
Event loops needs to be thread local not per process.
So many API's such as WinAPI for e.g. GUI's have this
requirement in it that its just not worth fighting over.
It is implementation detail. You can have global event loop and
On Thursday, 5 May 2016 at 08:19:26 UTC, chmike wrote:
At the bottom of the wiki page there is an innocent question
regarding TLS which is quite devastating. A worker thread pool
system would not support affinity between threads and callback
context. Unfortunately, D relies on Thread Local Stor
On Thursday, 5 May 2016 at 08:19:26 UTC, chmike wrote:
At the bottom of the wiki page there is an innocent question
regarding TLS which is quite devastating. A worker thread pool
system would not support affinity between threads and callback
context. Unfortunately, D relies on Thread Local Stor
On 06/05/2016 9:40 PM, chmike wrote:
On Thursday, 5 May 2016 at 09:21:04 UTC, rikki cattermole wrote:
Event loops needs to be thread local not per process.
So many API's such as WinAPI for e.g. GUI's have this requirement in
it that its just not worth fighting over.
I don't understand. Do you
On Thursday, 5 May 2016 at 09:21:04 UTC, rikki cattermole wrote:
Event loops needs to be thread local not per process.
So many API's such as WinAPI for e.g. GUI's have this
requirement in it that its just not worth fighting over.
I don't understand. Do you mean that these event loops are singl
Hey guys!
I have project with 3.5k strings of code. Now I'm writing
documentation for this.
I'm using scod, ddox based generator, but after generation I get
pages where all my modules is not grouped by packages. What i'm
doing wrong? Thanks.
22 matches
Mail list logo