On Monday, 6 June 2016 at 20:32:23 UTC, Alex Parrill wrote:
They'd be the same type, since you would define the vulkan
functions to take these structures instead of pointer or
integer types.
It relies on a lot of assumptions about the ABI that make a raw
pointer work the same as a structure
On Tuesday, 7 June 2016 at 02:05:00 UTC, Seb wrote:
On Tuesday, 7 June 2016 at 01:40:01 UTC, your_name wrote:
The way I traced the problem, ironically ;), was to catch
Error and print it to screen.
It involved dereferencing a null pointer in a thread and an
'assert null this' silently killed
If I use an enum dmd DOES remove it in release build. But I'm not
sure for the general case yet.
On Tuesday, 7 June 2016 at 02:04:41 UTC, Mithun Hunsur wrote:
On Monday, 6 June 2016 at 21:57:20 UTC, Pie? wrote:
On Monday, 6 June 2016 at 21:31:32 UTC, Alex Parrill wrote:
[...]
This doesn't seem to be the case. In a release build, even
though I never "use" the string, it is embedded. I
On Tuesday, 7 June 2016 at 04:06:01 UTC, Mike Parker wrote:
Fourth, while casting the string directly to void* will work,
it's considered best practice to use the pointer property for
clarity.
Oops!
cast(void*)path.ptr
In both cases. Like I said, without .ptr, it works, but this
makes
On Monday, 6 June 2016 at 19:52:36 UTC, Alexander Patapoff wrote:
import std.stdio;
import std.string;
import core.sys.windows.windows;
void main() {
string filepath =
"C:\\Users\\awpat\\Pictures\\patterns_00387591.jpg";
auto p = toStringz(filepath);
int result;
import std.algorithm.iteration : map;
import std.algorithm : castSwitch;
import std.format : format;
class A { int value; this(int value) { this.value = value; }}
interface I { }
class B : I { }
Object[] arr = [new A(5), new B(), null];
auto results = arr.map!(castSwitch!(
On Tuesday, 7 June 2016 at 01:40:01 UTC, your_name wrote:
On Monday, 6 June 2016 at 00:09:15 UTC, Ali Çehreli wrote:
[...]
Hello Ali,
The behavior you described is what I'd expect, however, it's
not what I get.
The way I traced the problem, ironically ;), was to catch Error
and print it
On Monday, 6 June 2016 at 21:57:20 UTC, Pie? wrote:
On Monday, 6 June 2016 at 21:31:32 UTC, Alex Parrill wrote:
On Monday, 6 June 2016 at 17:31:52 UTC, Pie? wrote:
Is it possible to parse a file at compile time without
embedding it into the binary?
I have a sort of "configuration" file that
On Monday, 6 June 2016 at 00:09:15 UTC, Ali Çehreli wrote:
On 06/05/2016 07:39 AM, your_name wrote:
> The problem I have is whenever an assert in my debug build
fails the
> program or thread is just killed silently.
That's strange. When an assertion fails, the stack trace is
printed and the
On Monday, 6 June 2016 at 21:31:32 UTC, Alex Parrill wrote:
On Monday, 6 June 2016 at 17:31:52 UTC, Pie? wrote:
Is it possible to parse a file at compile time without
embedding it into the binary?
I have a sort of "configuration" file that defines how to
create some objects. I'd like to be
On 06/06/2016 11:25 PM, Alex Parrill wrote:
You might be able to get away with casting the const away, if you are
sure it won't modify the hash or equality check.
Casting away const and then mutating has undefined behavior. The
compiler is free to assume that it doesn't happen.
Be aware
On Monday, 6 June 2016 at 21:25:16 UTC, Alex Parrill wrote:
On Monday, 6 June 2016 at 21:16:18 UTC, Begah wrote:
Does the key of a associative array will be const if the
reference is requested?
That's probably what it is, actually. Modifying the key with
the ref could cause the hash of the
On Monday, 6 June 2016 at 17:31:52 UTC, Pie? wrote:
Is it possible to parse a file at compile time without
embedding it into the binary?
I have a sort of "configuration" file that defines how to
create some objects. I'd like to be able to read how to create
them but not have that config file
On Monday, 6 June 2016 at 20:40:12 UTC, Begah wrote:
I have a pretty weird error : Error: mutable method
isolated.graphics.g3d.model.Model.begin is not callable using a
const object
[...]
It may infer const from the type of `this.instance`, which may be
further modified if the method you
I have a pretty weird error : Error: mutable method
isolated.graphics.g3d.model.Model.begin is not callable using a
const object
The weird part is that i do not use const or immutable objects in
my code ( for the Model ) :
struct Handle {
Model *asset = null;
string
On Monday, 6 June 2016 at 18:43:33 UTC, ParticlePeter wrote:
On Saturday, 21 May 2016 at 06:36:53 UTC, tsbockman wrote:
...
As an example, if VK_NULL_HANDLE only ever needs to be
assigned to opaque types on the D side (that is, types that
serve only as an ID or address for communicating with
On Monday, 6 June 2016 at 18:33:36 UTC, ParticlePeter wrote:
On Monday, 6 June 2016 at 16:19:02 UTC, Alex Parrill wrote:
On Monday, 6 June 2016 at 09:43:23 UTC, ParticlePeter wrote:
In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type
import std.stdio;
import std.string;
import core.sys.windows.windows;
void main() {
string filepath =
"C:\\Users\\awpat\\Pictures\\patterns_00387591.jpg";
auto p = toStringz(filepath);
int result;
result = SystemParametersInfo(cast(uint)SPI_SETDESKWALLPAPER,
On Saturday, 21 May 2016 at 06:36:53 UTC, tsbockman wrote:
...
As an example, if VK_NULL_HANDLE only ever needs to be assigned
to opaque types on the D side (that is, types that serve only
as an ID or address for communicating with the C side), you
could do this:
private struct VkNullHandle
On Monday, 6 June 2016 at 18:33:36 UTC, ParticlePeter wrote:
On Monday, 6 June 2016 at 16:19:02 UTC, Alex Parrill wrote:
On Monday, 6 June 2016 at 09:43:23 UTC, ParticlePeter wrote:
In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type
On Monday, 6 June 2016 at 16:19:02 UTC, Alex Parrill wrote:
On Monday, 6 June 2016 at 09:43:23 UTC, ParticlePeter wrote:
In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously
(0/null).
A
Is it possible to parse a file at compile time without embedding
it into the binary?
I have a sort of "configuration" file that defines how to create
some objects. I'd like to be able to read how to create them but
not have that config file stick around in the binary.
e.g., (simple
On Monday, 6 June 2016 at 16:51:20 UTC, Jonathan Marler wrote:
Hmmm...it seems to be missing quite alot though. Especially
the winsock api. Over the weekend I was writing some code that
uses a windows IOCompletionPort and had to add a fair amount of
code that was missing:
Pull requests
On Monday, 6 June 2016 at 17:11:44 UTC, Vladimir Panteleev wrote:
On Monday, 6 June 2016 at 16:51:20 UTC, Jonathan Marler wrote:
Hmmm...it seems to be missing quite alot though.
You could've mentioned you meant just the winsock modules.
They have not been brought over because they were not
On Monday, 6 June 2016 at 16:51:20 UTC, Jonathan Marler wrote:
Hmmm...it seems to be missing quite alot though.
You could've mentioned you meant just the winsock modules.
They have not been brought over because they were not explicitly
under an open-source license.
On Monday, 6 June 2016 at 16:13:48 UTC, Vladimir Panteleev wrote:
On Monday, 6 June 2016 at 16:04:30 UTC, Jonathan Marler wrote:
I'm writing some platform specific D code and I've found that
what the druntime exposes for the windows platform is pretty
lean. I'm guessing that the purpose of
With the newest dmds, if you use -m32mscoff you just use the
Microsoft libraries and linkers and the core.sys.windows is
pretty full - should be easy to use.
On Monday, 6 June 2016 at 09:43:23 UTC, ParticlePeter wrote:
In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously (0/null).
A extern( C ) function should be able to take it as either one.
On Monday, 6 June 2016 at 16:04:30 UTC, Jonathan Marler wrote:
I'm writing some platform specific D code and I've found that
what the druntime exposes for the windows platform is pretty
lean. I'm guessing that the purpose of the druntime version of
the windows api is to implement the minimum
I'm writing some platform specific D code and I've found that
what the druntime exposes for the windows platform is pretty
lean. I'm guessing that the purpose of the druntime version of
the windows api is to implement the minimum required to support
the windows platform and not meant to be a
On Monday, 6 June 2016 at 15:28:35 UTC, John wrote:
Thank you John and Adam. That was a quick answer !
On Monday, 6 June 2016 at 15:23:50 UTC, chmike wrote:
I would like an implicit conversion of Info to bool that return
false if category_ is null so that I can write
add:
bool opCast(T : bool)() {
return whatever;
}
to the struct and it should work.
On Monday, 6 June 2016 at 15:23:50 UTC, chmike wrote:
Hello,
I have a structure with two fields ad defined as
struct Info {
this(int value, Category category)
{
category_ = category;
value_ = category ? value : 0;
}
// This converts implicitly to bool.
On Monday, 6 June 2016 at 12:09:33 UTC, ParticlePeter wrote:
I don't see the connection here, you introduced two symbols
with two different types. I want one symbol which can pose as
two different (constant) types.
Ah, my apologies, I misunderstood the question.
On Monday, 6 June 2016 at 11:25:00 UTC, Rene Zwanenburg wrote:
Could you elaborate a bit?
Yes.
I have an InputRange and need to pass it throughout a couple of
iteration and manipulation functions such as filter, map and
finishing by grouping with fold. Like:
myrange
.filter!xxx
On Monday, 6 June 2016 at 11:40:11 UTC, Anonymouse wrote:
On Monday, 6 June 2016 at 09:43:23 UTC, ParticlePeter wrote:
In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously
(0/null).
A
On Monday, 6 June 2016 at 09:43:23 UTC, ParticlePeter wrote:
In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously (0/null).
A extern( C ) function should be able to take it as either one.
On Monday, 6 June 2016 at 09:43:23 UTC, ParticlePeter wrote:
A extern( C ) function should be able to take it as either one.
Missed this bit. Not sure about that one.
On Monday, 6 June 2016 at 10:26:11 UTC, moechofe wrote:
The functions passed to map or amap take the type of the
element of the range as argument, but not a range itself.
Right. I don't think I understand what the semantics of your
example would be though.. Could you elaborate a bit?
On Monday, 6 June 2016 at 09:38:32 UTC, Rene Zwanenburg wrote:
http://dlang.org/phobos/std_parallelism.html#.TaskPool
Or, more specifically,
http://dlang.org/phobos/std_parallelism.html#.TaskPool.amap
http://dlang.org/phobos/std_parallelism.html#.TaskPool.map
The functions passed to map or
In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously (0/null).
A extern( C ) function should be able to take it as either one.
Overloaded enum pops into my mind as example:
enum NULL = 0;
enum
On Monday, 6 June 2016 at 09:32:30 UTC, moechofe wrote:
I wonder if it is possible to write something like this:
---
// taskPool.distribute -- take a range and distribute entries
to different threads.
dirEntries().distribute(function(R1,R2)(R1 from,R2 to){
from
.filter!xxx
I wonder if it is possible to write something like this:
---
// taskPool.distribute -- take a range and distribute entries to
different threads.
dirEntries().distribute(function(R1,R2)(R1 from,R2 to){
from
.filter!xxx
.map!yyy
.tee!zzz(to);
})
.each!www;
---
This
On Sunday, 5 June 2016 at 21:20:20 UTC, Andrej Mitrovic wrote:
On Thursday, 2 June 2016 at 13:04:00 UTC, ciechowoj wrote:
and found that an assert from `std/path.d:3168` (`globMatch`)
contributes a major amount to the running time of dub.
```
assert(balancedParens(pattern, '[', ']', 0));
On 06/06/2016 6:45 PM, Pie? wrote:
On Monday, 6 June 2016 at 06:10:35 UTC, rikki cattermole wrote:
On 06/06/2016 6:06 PM, Pie? wrote:
On Monday, 6 June 2016 at 05:30:12 UTC, rikki cattermole wrote:
On 06/06/2016 5:07 PM, Pie? wrote:
[...]
Then I would say go get a new image library as that
On Monday, 6 June 2016 at 06:10:35 UTC, rikki cattermole wrote:
On 06/06/2016 6:06 PM, Pie? wrote:
On Monday, 6 June 2016 at 05:30:12 UTC, rikki cattermole wrote:
On 06/06/2016 5:07 PM, Pie? wrote:
[...]
Then I would say go get a new image library as that one isn't
a very
good one.
On 06/06/2016 6:06 PM, Pie? wrote:
On Monday, 6 June 2016 at 05:30:12 UTC, rikki cattermole wrote:
On 06/06/2016 5:07 PM, Pie? wrote:
[...]
Then I would say go get a new image library as that one isn't a very
good one.
..snip..
Right got rid of all that text.
If you want to make the
On Monday, 6 June 2016 at 05:30:12 UTC, rikki cattermole wrote:
On 06/06/2016 5:07 PM, Pie? wrote:
[...]
Then I would say go get a new image library as that one isn't a
very good one.
..snip..
Right got rid of all that text.
If you want to make the filesystem appear to have files it
49 matches
Mail list logo