On 2014-12-12 05:25, Vlad Levenfeld wrote:
I get
Executing dustmite...
None => No
object.Exception@dustmite.d(243): Initial test fails
It seems like a pretty simple case, I'm not sure what's going on.
I get the same error as well every time I use dustmite. At lease via Dub.
--
/Jac
On Friday, 12 December 2014 at 06:17:56 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
Is there a way to allocate GC
memory blocks in D that are guaranteed to fall on OS page
boundaries?
I don't know about guarantees, I think that in practice, if your
OS page size is 4096, any GC allocation
Hi all,
I'm working on a very large associative array implementation that stores
most of the data on disk, and I need to allocate a number of cache areas
for keeping "hot" disk pages in RAM. Is there a way to allocate GC
memory blocks in D that are guaranteed to fall on OS page boundaries? Or
shou
I'm trying to reduce a bug with dub dustmite feature and I must
be doing it wrong somehow, my regular dub output looks like this:
source/experimental.d(2403): Error: struct
experimental.Product!(int[], int[]).Product no size yet for
forward reference
ulong[2]
source/experimental.d(2454):
On Thursday, 11 December 2014 at 20:37:09 UTC, Kapps wrote:
Ranges are one way of allowing foreach. The other is through
the use of opApply, which is what std.stdio.lines does.
http://dlang.org/statement.html#ForeachStatement
Ah, so I just needed to keep reading down a few lines in the
forea
On Thu, Dec 11, 2014 at 08:56:00PM +, Paul via Digitalmars-d-learn wrote:
> Is there any merit (or folly!) in storing a large array, that
> frequently needs to be accessed globally, within a class like so:
>
> public class classMap{
>
> public static int[MAPSIZE][MAPSIZE] map;
>
On Thursday, 11 December 2014 at 20:40:40 UTC, Suliman wrote:
string dbname = config.getKey("dbname1");
scope(failure) writeln("look like dbname is missing");
I am using dini and trying to throw exception if value can't be
extract from config. If I am wrap it's in try-сефср block it's
work or.
On 12/11/14 3:21 PM, Andrew Klaassen wrote:
On Thursday, 11 December 2014 at 20:17:50 UTC, bearophile wrote:
Andrew Klaassen:
The docs for stdio.lines say that it's a struct. stdio.lines works
with foreach.
If you want a range use "myfile".File.byLine or "myfile".File.byLineCopy.
Bye,
bear
Is there any merit (or folly!) in storing a large array, that
frequently needs to be accessed globally, within a class like so:
public class classMap{
public static int[MAPSIZE][MAPSIZE] map;
}
Or is there a proper 'D' way to do this?
TIA
string dbname = config.getKey("dbname1");
scope(failure) writeln("look like dbname is missing");
I am using dini and trying to throw exception if value can't be
extract from config. If I am wrap it's in try-сефср block it's
work or. But in this situation scope block do not execute and I
see on
On Thursday, 11 December 2014 at 20:11:21 UTC, Andrew Klaassen
wrote:
The docs for stdio.lines say that it's a struct. stdio.lines
works with foreach.
The docs for foreach say:
"Iteration over struct and class objects can be done with
ranges. For foreach, this means the following properties
On Thursday, 11 December 2014 at 20:17:50 UTC, bearophile wrote:
Andrew Klaassen:
The docs for stdio.lines say that it's a struct. stdio.lines
works with foreach.
If you want a range use "myfile".File.byLine or
"myfile".File.byLineCopy.
Bye,
bearophile
I know that there are other ways t
Andrew Klaassen:
The docs for stdio.lines say that it's a struct. stdio.lines
works with foreach.
If you want a range use "myfile".File.byLine or
"myfile".File.byLineCopy.
Bye,
bearophile
The docs for stdio.lines say that it's a struct. stdio.lines
works with foreach.
The docs for foreach say:
"Iteration over struct and class objects can be done with ranges.
For foreach, this means the following properties and methods must
be defined: .empty ... .front ... .popFront()"
But
I am trying to start with http://code.dlang.org/packages/dpq2
But I can't understand where I should to get pq.lib and where I
should to place it. In the Program Files I did not find such
file...
On 12/11/14 1:41 PM, H. S. Teoh via Digitalmars-d-learn wrote:
On Thu, Dec 11, 2014 at 10:36:02AM -0800, H. S. Teoh via Digitalmars-d-learn
wrote:
[...]
auto mykey = myarray.byKey().front;
myarray.remove(mykey);
[...]
Ah, I forgot that you need to check .empty on the range ret
Thanks everyone!
H. S. Teoh:
On the other hand, AA.byKey() will return a *lazy* sequence of
keys
(i.e., it won't actually walk the AA unless you want it to), so
doing
this ought to be O(1):
auto mykey = myarray.byKey().front;
myarray.remove(mykey);
In general the associative array table can
On Thu, Dec 11, 2014 at 10:36:02AM -0800, H. S. Teoh via Digitalmars-d-learn
wrote:
[...]
> auto mykey = myarray.byKey().front;
> myarray.remove(mykey);
[...]
Ah, I forgot that you need to check .empty on the range returned by
byKey before accessing .front. Thanks to Ali for pointing
On 12/10/14 7:52 AM, Ruslan Mullakhmetov wrote:
On Wednesday, 10 December 2014 at 08:46:12 UTC, Ruslan Mullakhmetov wrote:
yes. that was the mistake. also after fixing bug in Blk Attributes
printing i got more reasonable attrs
for object blk: FINALIZE
for array of objects blk: NO_SCAN APPENDABL
On Thu, Dec 11, 2014 at 06:27:06PM +, Andrew Klaassen via
Digitalmars-d-learn wrote:
> In theory, it should be possible to do a "popFront" equivalent for a
> hash that has O(1) average complexity, so long as you don't care about
> order. I.e., "give me any key from the hash, I don't care whic
On 12/11/2014 10:27 AM, Andrew Klaassen wrote:
> If it is correct, is there any way to do it in D?
>
> Do I assume correctly that "myarray.keys[0]" would not meet the O(1)
> requirement?
Correct. keys() is eager. For O(1) you want byKey(), which returns a
lazy range but the code is less than pr
In theory, it should be possible to do a "popFront" equivalent
for a hash that has O(1) average complexity, so long as you don't
care about order. I.e., "give me any key from the hash, I don't
care which one, and then delete it from the hash". Is that
correct?
If it is correct, is there any
Here is a way that will work.
"Vlasov Roman" writes:
> I have this code
>
> mixin template Template(void function() func1, void function() func2)
mixin template Template(alias func1, alias func2)
> class SomeClass {
> mixin Template!(&func, &func23);
mixin Template!(func, func23)
On 12/10/14 7:52 AM, Ruslan Mullakhmetov wrote:
On Wednesday, 10 December 2014 at 08:46:12 UTC, Ruslan Mullakhmetov wrote:
yes. that was the mistake. also after fixing bug in Blk Attributes
printing i got more reasonable attrs
for object blk: FINALIZE
for array of objects blk: NO_SCAN APPENDABL
On 12/10/14 1:16 AM, Denis Gladkiy wrote:
On Thursday, 20 January 2011 at 13:49:30 UTC, Justin Johansson wrote:
Not long ago the Java Language people introduced the idea of
annotations together with an annotation processing tool (apt).
Now perhaps the idea of source code annotations is not actu
On Thursday, 11 December 2014 at 00:36:08 UTC, Mike Parker wrote:
More evidence pointing toward the system configuration on the
problem machines. I'm quite far from being a Linux guru, but at
this point I would be looking at removing the binaries I've
compiled myself and installing the binary p
27 matches
Mail list logo