On Wednesday, 13 May 2015 at 03:19:17 UTC, thedeemon wrote:
In case of Python's parallel.Pool() separate processes do the
work without any synchronization issues. In case of D's
std.parallelism it's just threads inside one process and they
do fight for some locks, thus this result.
Okay, so
On Wednesday, 13 May 2015 at 03:38:33 UTC, Maxime
Chevalier-Boisvert wrote:
I was wondering if anyone has written D code to access the x86
performance counters, to get information such as the number of
cache misses and cycle count.
Intel made available the source of their performance counter
There was no word about windows, but process explorer shows page
faults and cycles per process from unprivileged account, so I
guess, this information is available through some API. Not sure
is such system-wide statistics is available too.
On Wednesday, 13 May 2015 at 03:38:33 UTC, Maxime
Chevalier-Boisvert wrote:
I was wondering if anyone has written D code to access the x86
performance counters, to get information such as the number of
cache misses and cycle count.
For linux, you could try:
On Wednesday, 13 May 2015 at 08:53:10 UTC, Kagamin wrote:
There was no word about windows, but process explorer shows
page faults and cycles per process from unprivileged account,
so I guess, this information is available through some API. Not
sure is such system-wide statistics is available
There was discussion about broken contract programing. Broken
thing was in contract within inheritance. If you add different
in-contract in overridden parent and derived function only one
will be checked.
I thought that solution is to ban in-contract for derived
function. In-contract says what
On Tuesday, 12 May 2015 at 12:53:59 UTC, ponce wrote:
I already have such a dispose() function.
The problem is that to support Unique! and scoped! and friends,
the destructor must call dispose(). Thus my need for a way to
separate the GC-induced destructors within dispose() or ~this
(same
On Wednesday, 13 May 2015 at 10:18:26 UTC, iackhtak wrote:
There was discussion about broken contract programing. Broken
thing was in contract within inheritance. If you add
different in-contract in overridden parent and derived
function only one will be checked.
I thought that solution is to
On 13/05/2015 2:59 a.m., Gerald Jansen wrote:
I am a data analyst trying to learn enough D to decide whether to use D
for a new project rather than Python + Fortran. I have recoded a
non-trivial Python program to do some simple parallel data processing
(using the map function in Python's
On Wednesday, 13 May 2015 at 03:38:33 UTC, Maxime
Chevalier-Boisvert wrote:
I was wondering if anyone has written D code to access the x86
performance counters, to get information such as the number of
cache misses and cycle count.
It would probably be easiest to write some bindings to PAPI-C
On Tuesday, 12 May 2015 at 18:14:56 UTC, Gerald Jansen wrote:
On Tuesday, 12 May 2015 at 16:35:23 UTC, Rikki Cattermole wrote:
On 13/05/2015 4:20 a.m., Gerald Jansen wrote:
At the risk of great embarassment ... here's my program:
http://dekoppel.eu/tmp/pedupg.d
Would it be possible to give
On Wednesday, 13 May 2015 at 09:01:05 UTC, Gerald Jansen wrote:
On Wednesday, 13 May 2015 at 03:19:17 UTC, thedeemon wrote:
In case of Python's parallel.Pool() separate processes do the
work without any synchronization issues. In case of D's
std.parallelism it's just threads inside one process
On Wednesday, 13 May 2015 at 11:33:55 UTC, John Colvin wrote:
On Tuesday, 12 May 2015 at 18:14:56 UTC, Gerald Jansen wrote:
On Tuesday, 12 May 2015 at 16:35:23 UTC, Rikki Cattermole
wrote:
On 13/05/2015 4:20 a.m., Gerald Jansen wrote:
At the risk of great embarassment ... here's my program:
On Wednesday, 13 May 2015 at 11:33:55 UTC, John Colvin wrote:
On Tuesday, 12 May 2015 at 18:14:56 UTC, Gerald Jansen wrote:
On Tuesday, 12 May 2015 at 16:35:23 UTC, Rikki Cattermole
wrote:
On 13/05/2015 4:20 a.m., Gerald Jansen wrote:
At the risk of great embarassment ... here's my program:
On Wednesday, 13 May 2015 at 14:28:52 UTC, Gerald Jansen wrote:
On Wednesday, 13 May 2015 at 13:40:33 UTC, John Colvin wrote:
On Wednesday, 13 May 2015 at 11:33:55 UTC, John Colvin wrote:
On Tuesday, 12 May 2015 at 18:14:56 UTC, Gerald Jansen wrote:
On Tuesday, 12 May 2015 at 16:35:23 UTC,
On Wednesday, 13 May 2015 at 14:11:25 UTC, Gerald Jansen wrote:
On Wednesday, 13 May 2015 at 11:33:55 UTC, John Colvin wrote:
On Tuesday, 12 May 2015 at 18:14:56 UTC, Gerald Jansen wrote:
On Tuesday, 12 May 2015 at 16:35:23 UTC, Rikki Cattermole
wrote:
On 13/05/2015 4:20 a.m., Gerald Jansen
On Wednesday, 13 May 2015 at 13:40:33 UTC, John Colvin wrote:
On Wednesday, 13 May 2015 at 11:33:55 UTC, John Colvin wrote:
On Tuesday, 12 May 2015 at 18:14:56 UTC, Gerald Jansen wrote:
On Tuesday, 12 May 2015 at 16:35:23 UTC, Rikki Cattermole
wrote:
On 13/05/2015 4:20 a.m., Gerald Jansen
On Wednesday, 13 May 2015 at 12:16:19 UTC, weaselcat wrote:
On Wednesday, 13 May 2015 at 09:01:05 UTC, Gerald Jansen wrote:
On Wednesday, 13 May 2015 at 03:19:17 UTC, thedeemon wrote:
In case of Python's parallel.Pool() separate processes do the
work without any synchronization issues. In case
On Thursday, 14 May 2015 at 00:29:06 UTC, Dennis Ritchie wrote:
Why doesn't the compiler produces an error?
-
import std.stdio;
void main() {
writeln({});
}
-
http://ideone.com/qTZCAd
You told it to output a function literal, so it did.
(That or you told it to output a
Turns out that I can put into the function writeln almost any
design language:
-
import std.stdio;
void main() {
writeln( { int n = 5; } );
}
-
http://ideone.com/Rp7gZ2
On Thursday, 14 May 2015 at 00:33:33 UTC, Brian Schott wrote:
You told it to output a function literal, so it did.
Yes, but it would be logical to deduce something like:
-
writeln({}); // prints literal[{}]
Or the compiler will not be able to distinguish the literal from
the ordinary
I've run into this situation a lot:
I have a function that returns a range (in this case, a slice of
a custom container).
In some cases, the function needs to return an empty range.
It sounded like takeNone was what I wanted:
@nogc auto fun() {
return (some_condition) ? getRange() :
The std.batmanip bigEndianToNative has a regression where the
slice range doesn't work with variables (only literals).
Is the syntax incorrect or is this a regression in dmd?
Using this main.d:
import std.bitmanip;
int main(string args[])
{
auto datain = new ubyte[16];
// this syntax
Actually, this doesn't even seem to work with a custom range:
import std.range;
import std.stdio;
import std.algorithm;
struct MyContainer {
@nogc auto opSlice() {
struct Range {
@property bool empty() { return true; }
@property int front() { return 9; }
Why doesn't the compiler produces an error?
-
import std.stdio;
void main() {
writeln({});
}
-
http://ideone.com/qTZCAd
I reported this as a regression
https://issues.dlang.org/show_bug.cgi?id=14582
On Thursday, May 14, 2015 02:47:22 rcorre via Digitalmars-d-learn wrote:
I've run into this situation a lot:
I have a function that returns a range (in this case, a slice of
a custom container).
In some cases, the function needs to return an empty range.
It sounded like takeNone was what I
On Wednesday, 13 May 2015 at 09:26:40 UTC, Benjamin Thaut wrote:
On Wednesday, 13 May 2015 at 08:53:10 UTC, Kagamin wrote:
There was no word about windows, but process explorer shows
page faults and cycles per process from unprivileged account,
so I guess, this information is available through
On Wednesday, 13 May 2015 at 14:43:50 UTC, John Colvin wrote:
On Wednesday, 13 May 2015 at 14:28:52 UTC, Gerald Jansen wrote:
On Wednesday, 13 May 2015 at 13:40:33 UTC, John Colvin wrote:
On Wednesday, 13 May 2015 at 11:33:55 UTC, John Colvin wrote:
On Tuesday, 12 May 2015 at 18:14:56 UTC,
On 05/12/2015 08:19 PM, thedeemon wrote:
In case of Python's parallel.Pool() separate processes do the
work without any synchronization issues. In case of D's
std.parallelism it's just threads inside one process and they
do fight for some locks, thus this result.
Right. To do the same in D,
On Wednesday, 13 May 2015 at 07:04:39 UTC, tcak wrote:
I am using pthread somewhere in program, and it creates an
object. After a while, I see core.thread.scanAllTypeImpl
error on gdb. Does this mean that pthread and GC are
incompatible? Any solution without making too much code changes?
On Wednesday, 13 May 2015 at 03:38:33 UTC, Maxime
Chevalier-Boisvert wrote:
I was wondering if anyone has written D code to access the x86
performance counters, to get information such as the number of
cache misses and cycle count.
I considered doing that at one point. So I looked for
I am using pthread somewhere in program, and it creates an
object. After a while, I see core.thread.scanAllTypeImpl error
on gdb. Does this mean that pthread and GC are incompatible? Any
solution without making too much code changes?
On Wednesday, 13 May 2015 at 06:59:02 UTC, Ali Çehreli wrote:
In case of Python's parallel.Pool() separate processes do the
work without any synchronization issues. In case of D's
std.parallelism it's just threads inside one process and they
do fight for some locks, thus this result.
Right.
On Wednesday, 13 May 2015 at 07:29:51 UTC, Dicebot wrote:
On Wednesday, 13 May 2015 at 07:04:39 UTC, tcak wrote:
I am using pthread somewhere in program, and it creates an
object. After a while, I see core.thread.scanAllTypeImpl
error on gdb. Does this mean that pthread and GC are
On Tuesday, 12 May 2015 at 13:30:22 UTC, Idan Arye wrote:
A little hacky, but how about casting it to a static array?
http://dpaste.dzfl.pl/d0059e6e6c09
This PR[1] achieves this without making a copy.
[1] https://github.com/D-Programming-Language/phobos/pull/3198
36 matches
Mail list logo