On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote:
Hello, is there way to reduce this condition:
if (c1) {
foo();
} else {
if (c2) {
bar();
} else {
if (c3) {
...
}
}
}
for instance in kotlin it can be replace with this:
when {
c1
23.11.2017 09:33, Tim Hsu пишет:
DCD and DMD says that the symbol is undefined!
However, I look into derelichtGLFW3. It has this symbol defined!
It looks like a bug for me!
DerelictGLFW3 has this symbol, but it does not define it, it should be
defined in shared/dynamic library you use. I guess
On Thursday, 23 November 2017 at 08:27:54 UTC, Andrea Fontana
wrote:
On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote:
Hello, is there way to reduce this condition:
if (c1) {
foo();
} else {
if (c2) {
bar();
} else {
if (c3) {
...
}
}
}
On 2017-11-23 01:35, Jonathan M Davis wrote:
It would make sense with something like the nodes of a linked list if they
needed access to the container for some reason. Pretty much any case where a
an instance of a nested class is going to be associated with a specific
instance of its parent clas
I'm looking at
http://vibed.org/api/vibe.core.concurrency/makeIsolated
which is a great idea for safe inter-thread communication.
Are there any more usage examples for vibe's worker tasks that
show how to send instances of `Isolated` to an existing such
worker task via some low-latency (non-l
On Thursday, 23 November 2017 at 10:15:26 UTC, Nordlöw wrote:
I'm looking at
http://vibed.org/api/vibe.core.concurrency/makeIsolated
Further, what does "weakly isolated" mean here
http://vibed.org/api/vibe.core.core/runWorkerTask
?
On Thursday, 23 November 2017 at 10:15:26 UTC, Nordlöw wrote:
I'm looking at
http://vibed.org/api/vibe.core.concurrency/makeIsolated
which is a great idea for safe inter-thread communication.
Are there any more usage examples for vibe's worker tasks that
show how to send instances of `Isolate
Hi, I am new to D and I want to use it to create some tools that
call certain functions from the process of a game, using an
injected DLL written in D. I have reverse engineered the
addresses and arguments of the function. Typically this kind of
stuff is done with C++ and almost all the availab
On 23/11/2017 11:35 AM, Skuzzi wrote:
Hi, I am new to D and I want to use it to create some tools that call
certain functions from the process of a game, using an injected DLL
written in D. I have reverse engineered the addresses and arguments of
the function. Typically this kind of stuff is do
On Tuesday, 21 November 2017 at 13:45:31 UTC, Dukc wrote:
I am using the DrawRescaled method of DrawBuf[1] of DLangUI To
draw a PNG image to a CanvasWidget[2] subclass. It has a minor
issue of the box bounds showing in area that shoud be
transparent but otherwise works well.
My question is, d
Hi!
I need to send Publish struct from
https://github.com/tchaloupka/vibe-mqtt to another vibe.d task.
And there is the problem. First of all, I can't make it immutable
because send() wants to mutate it. I can't send local copy
because of "Aliases to mutable thread-local data not allowed.".
On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote:
for instance in kotlin it can be replace with this:
when {
c1 -> foo(),
c2 -> bar(),
c3 -> ...
else -> someDefault()
}
The `switch` statement covers some of these cases too.
On Thursday, 23 November 2017 at 11:35:18 UTC, Skuzzi wrote:
typedef void (__stdcall* _function) (const char *text);
I want to do this in D. I understand that D uses "extern (C)"
and does away with specifying calling conventions. However, how
does D know the calling convention required? What i
On Thursday, 23 November 2017 at 13:47:37 UTC, Adam D. Ruppe
wrote:
On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote:
for instance in kotlin it can be replace with this:
when {
c1 -> foo(),
c2 -> bar(),
c3 -> ...
else -> someDefault()
}
The `switch` statement covers
Some suggest working with the lowest currency denomination to
avoid decimal precision handling and only convert to the highest
denominations (decimal) when displaying. I've also seen some use
decimal value handling libraries.
I'm thinking lowest denominations will result in extremely large
va
On Thursday, 23 November 2017 at 14:47:21 UTC, aberba wrote:
Some suggest working with the lowest currency denomination to
avoid decimal precision handling and only convert to the
highest denominations (decimal) when displaying. I've also seen
some use decimal value handling libraries.
I'm th
What am I missing?
import std.stdio;
struct A
{
int value;
A opAssign(A a)
{
writeln(" Assigning");
return this; // I know this makes little
sense, just for illustration
}
}
class B
{
A member;
this(A a)
{
this.member = a; // s
On Thursday, 23 November 2017 at 10:15:26 UTC, Nordlöw wrote:
I'm looking at
http://vibed.org/api/vibe.core.concurrency/makeIsolated
which is a great idea for safe inter-thread communication.
Are there any more usage examples for vibe's worker tasks that
show how to send instances of `Isolate
On Thursday, 23 November 2017 at 15:26:03 UTC, Timoses wrote:
A member;
this(A a)
{
this.member = a; // specifically aiming towards this
assignment...
That's not assignment, that's construction.
opAssign is only called when you assign over a struct object that
already e
On Thursday, 23 November 2017 at 15:26:03 UTC, Timoses wrote:
A aaa = a;
That's initialization, not assignment, which is subtly different.
It will call the postblit on aaa instead of opAssign. A postblit
can be defined this way:
this(this)
{
}
There is no way to access the original a
On Thursday, 23 November 2017 at 15:45:17 UTC, Rene Zwanenburg
wrote:
On Thursday, 23 November 2017 at 15:26:03 UTC, Timoses wrote:
A aaa = a;
That's initialization, not assignment, which is subtly
different. It will call the postblit on aaa instead of
opAssign. A postblit can be defined
I know we have the extern(Objective-C) stuff from
https://wiki.dlang.org/DIP43 now, but do we have existing
bindings anywhere along the lines of the win32 ones we can just
import and start calling the operating system functions?
Moreover, I'm not a Mac dev; I've never actually done so much of
On Thursday, 23 November 2017 at 16:06:28 UTC, Adam D. Ruppe
wrote:
I know we have the extern(Objective-C) stuff from
https://wiki.dlang.org/DIP43 now, but do we have existing
bindings anywhere along the lines of the win32 ones we can just
import and start calling the operating system functions
On Thursday, 23 November 2017 at 13:31:23 UTC, Vadim Lopatin
wrote:
There is no such feature currently, but it can be added easy.
In the meantime I should call OpenGL (I think it's the backend in
my case) directly, correct?
On Thursday, 23 November 2017 at 16:14:50 UTC, Guillaume Piolat
wrote:
Perhaps https://github.com/p0nce/DerelictCocoa
Well, that would be one option, though I was hoping to avoid the
extern(C) runtime stuff and dynamic loading - ideally, I want
something with the extern(Objective-C) stuff for
23.11.2017 17:16, Andrea Fontana пишет:
On Thursday, 23 November 2017 at 13:47:37 UTC, Adam D. Ruppe wrote:
On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote:
for instance in kotlin it can be replace with this:
when {
c1 -> foo(),
c2 -> bar(),
c3 -> ...
else -> someDe
On 2017-11-23 17:06, Adam D. Ruppe wrote:
I know we have the extern(Objective-C) stuff from
https://wiki.dlang.org/DIP43 now, but do we have existing bindings
anywhere along the lines of the win32 ones we can just import and start
calling the operating system functions?
Not as far as I know.
On Thursday, 23 November 2017 at 14:16:25 UTC, Andrea Fontana
wrote:
On Thursday, 23 November 2017 at 13:47:37 UTC, Adam D. Ruppe
wrote:
On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote:
for instance in kotlin it can be replace with this:
when {
c1 -> foo(),
c2 -> bar(),
On Thursday, 23 November 2017 at 14:16:25 UTC, Andrea Fontana
wrote:
On Thursday, 23 November 2017 at 13:47:37 UTC, Adam D. Ruppe
wrote:
On Thursday, 23 November 2017 at 05:19:27 UTC, Andrey wrote:
for instance in kotlin it can be replace with this:
when {
c1 -> foo(),
c2 -> bar(),
On Wednesday, 22 November 2017 at 15:10:40 UTC, Oleg B wrote:
If I add -noboundscheck flag all works fine.
dmd version is 2.076.1
Why -betterC flag not 'include' -noboundscheck flag?
It's bug or in some cases it's useful?
Interestingly, ldc2 will compile this ok, without the
-noboundscheck
On Friday, 24 November 2017 at 00:17:31 UTC, codephantom wrote:
On Wednesday, 22 November 2017 at 15:10:40 UTC, Oleg B wrote:
If I add -noboundscheck flag all works fine.
dmd version is 2.076.1
Why -betterC flag not 'include' -noboundscheck flag?
It's bug or in some cases it's useful?
Inter
On Friday, 24 November 2017 at 05:01:17 UTC, Basile B. wrote:
On Friday, 24 November 2017 at 00:17:31 UTC, codephantom wrote:
On Wednesday, 22 November 2017 at 15:10:40 UTC, Oleg B wrote:
If I add -noboundscheck flag all works fine.
dmd version is 2.076.1
Why -betterC flag not 'include' -nobo
32 matches
Mail list logo