What I HAD TO do to get it to compile:
programResultsQ = heapify!(compareResults,
Array!(Results!(O,I)))(Array!(Results!(O,I))([Results!(O,I)()]),
1);
programResultsQ.popFront();
What running it says:
AssertionFailure at line 381 of std.container.array.d, which
looks like:
/**
Constructor
On Wednesday, 23 September 2015 at 05:56:08 UTC, Enjoys Math
wrote:
What I HAD TO do to get it to compile:
programResultsQ = heapify!(compareResults,
Array!(Results!(O,I)))(Array!(Results!(O,I))([Results!(O,I)()]), 1);
programResultsQ.popFront();
What running it says:
AssertionFailure at lin
On Wednesday, 23 September 2015 at 03:39:02 UTC, Mike Parker
wrote:
I have a situation where I would like to demonstrate violating
the contract of immutable (as an example of what not to do),
but do so without using structs or classes, just basic types
and pointers. The following snippet works
On 23/09/15 8:20 AM, Jacob wrote:
How do I setup mono-D for creating shared libraries and including them
into other projects? When I drag the .d files to create the library
from, which is not my own, I get undefined references. I have the lib
files, which are a bunch of separate libs, that I want
On Wednesday, 23 September 2015 at 03:50:44 UTC, Vladimir
Panteleev wrote:
On Wednesday, 23 September 2015 at 03:39:02 UTC, Mike Parker
wrote:
```
immutable int x = 10;
int* px = cast(int*)&x;
*px = 9;
writeln(x);
```
It prints 10, where I expected 9. This is on Windows. I'm
curious if anyone
On Wednesday, 23 September 2015 at 03:39:02 UTC, Mike Parker
wrote:
```
immutable int x = 10;
int* px = cast(int*)&x;
*px = 9;
writeln(x);
```
It prints 10, where I expected 9. This is on Windows. I'm
curious if anyone knows why it happens.
Essentially, because x is immutable, the compiler op
I have a situation where I would like to demonstrate violating
the contract of immutable (as an example of what not to do), but
do so without using structs or classes, just basic types and
pointers. The following snippet works as I would expect:
```
immutable int i = 10;
immutable(int*) pi = &
On Wednesday, 23 September 2015 at 02:10:22 UTC, Tofu Ninja wrote:
Trying to implement a bi directional range and it is slightly
unclear what the semantics are supposed to be and just wanted
some clarification.
Are bidirectional ranges supposed to be able to support
switching direction mid it
Trying to implement a bi directional range and it is slightly
unclear what the semantics are supposed to be and just wanted
some clarification.
Are bidirectional ranges supposed to be able to support switching
direction mid iteration? Like if I do popFront popFront popBack
should that be equa
How do I setup mono-D for creating shared libraries and including
them into other projects? When I drag the .d files to create the
library from, which is not my own, I get undefined references. I
have the lib files, which are a bunch of separate libs, that I
want to include into one big lib. On
On Tuesday, 22 September 2015 at 16:11:59 UTC, Alexandru Ermicioi
wrote:
Thx. Didn't know that there is such trait available.
On page http://dlang.org/traits.html it's not present.
Yeah, it's undocumented for some reason. Somebody must've forgot
to make a corresponding doc pull request I supp
Am Tue, 22 Sep 2015 14:40:43 +
schrieb John Colvin :
> On Tuesday, 22 September 2015 at 14:37:11 UTC, Russel Winder
> wrote:
> > On Sun, 2015-09-20 at 17:47 +0200, Johannes Pfau via
> > Digitalmars-d -learn wrote:
> >> [...]
> > […]
> >> [...]
> >
> > Debian Jessie is far too out of date to
On Tuesday, 22 September 2015 at 15:37:32 UTC, Meta wrote:
On Sunday, 13 September 2015 at 08:26:55 UTC, Alexandru
Ermicioi wrote:
Hello,
Given:
class SomeClass {
public {
void someSimpleMethod() {}
template setOfTemplatedMethods(Type) {
void templatedMethodOn
On Sunday, 13 September 2015 at 08:26:55 UTC, Alexandru Ermicioi
wrote:
Hello,
Given:
class SomeClass {
public {
void someSimpleMethod() {}
template setOfTemplatedMethods(Type) {
void templatedMethodOne() {}
void templatedMethodTwo() {}
}
On Tuesday, 22 September 2015 at 14:37:11 UTC, Russel Winder
wrote:
On Sun, 2015-09-20 at 17:47 +0200, Johannes Pfau via
Digitalmars-d -learn wrote:
[...]
[…]
[...]
Debian Jessie is far too out of date to be useful. I'm on
Debian Sid
(still quite old), and Fedora Rawhide (not quite so old)
On Sun, 2015-09-20 at 07:49 +, rom via Digitalmars-d-learn wrote:
>
[…]
> > works entirely fine. However the "parallel" code:
> >
> > extern(C)
> > double parallel(const int n, const double delta) {
> > Runtime.initialize();
> > const pi = 4.0 * delta * taskPool.reduce!"a
On Sun, 2015-09-20 at 17:49 +0200, Johannes Pfau via Digitalmars-d
-learn wrote:
> […]
>
> Just realized this thread is titled "Debugging D shared libraries" ;
> -)
> GDC does not yet support shared libraries.
Conversely I thought it did due to the GCC toolchain thingy.
I'm using DMD and LDC jus
On Sun, 2015-09-20 at 17:47 +0200, Johannes Pfau via Digitalmars-d
-learn wrote:
> Am Sat, 19 Sep 2015 17:41:41 +0100
>
[…]
>
> Have you tried using a newer GDC version? The debian jessie version
> probably uses the 2.064.2 frontend.
Debian Jessie is far too out of date to be useful. I'm on Debi
On Tuesday, 22 September 2015 at 12:54:47 UTC, Kagamin wrote:
You can generate a union from allowed types, it will make
copies type safe too, sort of set!(staticIndexOf(T,
AllowedTypes))(rhs)... hmm... can it be an overload?
I believe there is a trait somewhere that figures out the maximum
al
On 9/21/15 6:49 PM, Jonathan M Davis via Digitalmars-d-learn wrote:
In general though, if you want a counter for the
range that you're indexing, then you can use lockstep to wrap the range, and
then when you use it in foreach, you get the count and the element:
http://dlang.org/phobos/std_range.
You can generate a union from allowed types, it will make copies
type safe too, sort of set!(staticIndexOf(T,
AllowedTypes))(rhs)... hmm... can it be an overload?
On Tuesday, 22 September 2015 at 12:47:31 UTC, Per Nordlöw wrote:
How does the GC know if the data block contains a reference
(pointer) or value type? Does it try to follow that pointer
either way!?
If so when does this memory scanning occurr?
On Tuesday, 22 September 2015 at 09:57:58 UTC, Kagamin wrote:
Make sure your struct is always sizeof(void*)-aligned.
Could that be automatically enforced somehow based on the
contents of AllowedTypes?
On Tuesday, 22 September 2015 at 09:57:58 UTC, Kagamin wrote:
- Do I have to call some GC-logic in order to make the GC
aware of the new string-reference in `opAssign`?
Make sure your struct is always sizeof(void*)-aligned.
How does the GC know if the data block contains a reference
(pointer
On Tuesday, 22 September 2015 at 09:38:12 UTC, thedeemon wrote:
I think they don't.
Generated .exe seems to depend only on kernel32.dll and
shell32.dll, i.e. things users already have.
Great then.
On Sunday, 13 September 2015 at 09:29:13 UTC, Enamex wrote:
On Sunday, 13 September 2015 at 08:26:55 UTC, Alexandru
Ermicioi wrote:
Hello,
Given:
class SomeClass {
public {
void someSimpleMethod() {}
template setOfTemplatedMethods(Type) {
void templatedMethodO
The bindings are translated from mingw headers, and mingw doesn't
supply libraries with precompiled GUIDs, only functions. But
bindings for GUIDs are pretty simple:
extern extern(System) CLSID CLSID_SWbemLocator;
Just copy the names you want.
On Tuesday, 22 September 2015 at 10:03:52 UTC, Thomas Mader wrote:
Do I miss something? Does anyone have wrapped this lib?
This was also asked on stackoverflow some time ago. [1]
Wonder if something happend since then.
[1]
http://stackoverflow.com/questions/24051606/can-i-use-routines-from-co
I looked at some of the windows API wrapper projects for D on
github [1][2], but none of them seems to have wrapped
wbemuuid.lib right now.
Do I miss something? Does anyone have wrapped this lib?
Thomas
[1] http://code.dlang.org/packages/windows-headers
[2] https://github.com/smjgordon/binding
On Monday, 21 September 2015 at 13:42:14 UTC, Nordlöw wrote:
Questions:
- Is the logic of opAssign and get ok for string?
- How does the inner workings of the GC harmonize with my calls
to `memcpy` in `opAssign()` here
https://github.com/nordlow/justd/blob/master/cameleon.d#L80
That line wo
On Monday, 21 September 2015 at 15:00:24 UTC, ponce wrote:
All in the title.
DMD 64-bit links with the VS linker.
Do users need to install the VS redistributable libraries?
I think they don't.
Generated .exe seems to depend only on kernel32.dll and
shell32.dll, i.e. things users already have.
On Sunday, 20 September 2015 at 20:17:37 UTC, Dandyvica wrote:
My file is made of 10 lines:
cat numbers.txt
1
2
3
4
5
6
7
8
9
10
╰─$ wc -l numbers.txt
CR/LF can be interpreted as line _dividers_, so if you have CR or
CR/LF at the end of line 10, really here is line 11 which is
empty. Remove
32 matches
Mail list logo