On Wednesday, November 14, 2012 07:59:06 Rob T wrote:
That's good news. If I were to use the latest pre-release version
of dmd that was relatively safe, how will I find it, or is it OK
to use the master branch?
The master branch _is_ the pre-release version. dmd, druntime, and Phobos do
not
Am 13.11.2012 17:25, schrieb Benjamin Thaut:
Apperently this is by design:
http://d.puremagic.com/issues/show_bug.cgi?id=8295
To clarify: It is not possible to define a destructor that will be
called on the destruction of a shared struct.
In a different thread Walter commeted this bug with:
If
Hello,
This code snippet:
int[][] A = [[1, 2], [2, 3]];
int[][] B = [[2, 3], [1, 2]];
int[2][2] C;
C = A[][] + B[][];
fails with the message:
Error: cannot implicitly convert expression (A[][] + B[][]) of
type int[][] to int[2LU][]
Is there a succinct work-around (i.e. without
dominic jones:
Is there a succinct work-around (i.e. without using foreach)?
2D built-in array operations are not supported. APL-style
orthogonality isn't at home in D, it seems.
Bye,
bearophile
Hi
I am working with a c library which return a unsigned char *
As suggested on http://digitalmars.com/d/1.0/htomodule.html
I have converted it to (ubyte *).
Now is there an easy way to convert this to a string ?
Knud
On 11/13/2012 06:47 PM, Ali Çehreli wrote:
Still, please create a bug report: :)
Done :-)
http://d.puremagic.com/issues/show_bug.cgi?id=9024
Suppose that I've got a foreach loop in which I write output to a file:
auto f = File(test.txt, w); f.close(); // to start with a blank file
foreach(i; iota(0, 100))
{
f = File(test.txt, a);
f.writeln(i);
f.close();
}
I'm guessing it is at least
This might help.
import std.c.string;
void main() {
// The input data:
ubyte* ustr = cast(ubyte*) bobcat\0.ptr;
// Conversion to 'string'.
char* cstr = cast(char*) ustr;
string str = cast(string) cstr[0..strlen(cstr)];
assert(str == bobcat);
}
- Vijay
On Wednesday, 14 November
On Wednesday, 14 November 2012 at 08:04:55 UTC, Jonathan M Davis
wrote:
but I'm one of
the Phobos
developers. It's fine if you use master (it could help us find
regressions if
nothing else), but I wouldn't really advise using it just to be
able to use
the -di flag.
There have been a few
Is it possible to use taskPool.map with functions that take more than one input?
Consider the following code which uses map to convert a given value to its sum
with another number:
import std.algorithm, std.parallelism, std.range, std.stdio;
real pairsum(real x, real y)
{
On 11/14/2012 06:49 PM, Vijay Nayar wrote:
Could you put the file access in a synchronized block?
http://dlang.org/statement.html#SynchronizedStatement
Oh, good call -- seems to work.
If you try and run the parallel code without it, there's a pretty nasty-looking
error:
I think this is what you want around the file access section:
http://dlang.org/statement.html#SynchronizedStatement
- Vijay
On Wednesday, 14 November 2012 at 16:43:37 UTC, Joseph Rushton
Wakeling wrote:
I take it there's no more native-to-D way of implementing a
file lock? :-(
This fails to compile when accessing as m.pgoo() complaining
about postblit.
What is wrong with this?
Note: If I alias as array instead of map: alias const(X)[] Map;
it compiles fine.
Thanks
Dan
-
struct X { this(this) {} }
alias const(X)[string] Map;
@property int
This fails to compile when accessing as m.pgoo() complaining
about postblit.
What is wrong with this?
Note: If I alias as array instead of map: alias const(X)[] Map;
it compiles fine.
Thanks
Dan
-
struct X { this(this) {} }
alias const(X)[string] Map;
@property int
This fails to compile when accessing as m.pgoo() complaining
about postblit.
What is wrong with this?
Note: If I alias as array instead of map: alias const(X)[] Map;
it compiles fine.
Thanks
Dan
-
struct X { this(this) {} }
alias const(X)[string] Map;
@property int
On Wednesday, November 14, 2012 18:59:29 Joseph Rushton Wakeling wrote:
On 11/14/2012 06:49 PM, Vijay Nayar wrote:
Could you put the file access in a synchronized block?
http://dlang.org/statement.html#SynchronizedStatement
Oh, good call -- seems to work.
I would point out though that
http://www.reddit.com/r/programming/comments/137kqg/static_typing_contracts_and_unit_tests/#
Bye,
bearophile
17 matches
Mail list logo