Hi Piotr,
How cool. Very glad you're going native D. I've used Npgsql a lot
and also the more standard data.sqlclient interface from c# so I'm
happy you're modeling after that API. In your general API, will
you support the more advanced features like creating functions,
refcursors, preplanning
I think I found a solution for it. This code changes encoding of string to
ansi which is default string encoding in windows console.
import std.c.windows.windows;
string ansi(string str)
{
wchar[] src = toUTF16(str).dup;
char[] dest;
dest.length = str.length;
So, I thought I sort of understood shared and now I think I don't.
If I have a class:
class foo {
int x;
static int y;
shared static int z;
}
So x is one instance per class and is thread-local?
y is one instance per thread?
z is one instance per application, i.e., global?
If that's true
How cool. Very glad you're going native D. I've used Npgsql a lot
and also the more standard data.sqlclient interface from c# so I'm
happy you're modeling after that API. In your general API, will
you support the more advanced features like creating functions,
refcursors, preplanning queries,
On Thu, 06 Jan 2011 06:25:16 -0500, Sclytrack sclytr...@fake.com wrote:
How does dsource handle the multiple projects?
Is that each projects its own trac environment.
Does it use sqlite?
I know not a D related question.
Each project is its own trac environment. What DB is used, I'm not
On Fri, 07 Jan 2011 09:24:18 -0500, Adam Conner-Sax
adam_conner_...@yahoo.com wrote:
So, I thought I sort of understood shared and now I think I don't.
If I have a class:
class foo {
int x;
static int y;
shared static int z;
}
So x is one instance per class and is thread-local?
y is
Hi,
Is it possible to point a variable to an interface. The below code does not
compile.
module testD;
import std.stream;
import std.stdio;
import std.variant;
interface A {
void func1();
}
class AC: A {
void func1() {
writeln(func1);
}
}
int main() {
== Quote from Adam Conner-Sax (adam_conner_...@yahoo.com)'s article
So, I thought I sort of understood shared and now I think I don't.
If I have a class:
class foo {
int x;
static int y;
shared static int z;
}
So x is one instance per class and is thread-local?
y is one instance per
On Fri, 07 Jan 2011 09:55:33 -0500, Adam Conner-Sax
adam_conner_...@yahoo.com wrote:
== Quote from Adam Conner-Sax (adam_conner_...@yahoo.com)'s article
So, I thought I sort of understood shared and now I think I don't.
If I have a class:
class foo {
int x;
static int y;
shared static
Thanks!
It's not really about correctness as much as trying to understand how these
different storage classes work. I understand that there is only one foo object.
I wanted to see which parts are thread-local and which are shared and how the
constructors work.
I'm working (way over my head) on
david wang Wrote:
Sorry,
surrely that I've posted the attachment (CHM file), but I can not
see it.
Does anyone can kindly help me to point out that how to transfer
chm file to this BBS?
waiting for kindly reply.
David.
http://docs.google.com
or maybe
Mandeep Singh Brar Wrote:
Hi,
Is it possible to point a variable to an interface. The below code does not
compile.
module testD;
import std.stream;
import std.stdio;
import std.variant;
interface A {
void func1();
}
class AC: A {
void func1() {
Vladimir already made an automatic script that does this, see:
http://thecybershadow.net/d/docs/
It assumes everything on the stack is pointers, at the moment, I believe
Uh-oh... not the answer I wanted to hear, but I was half-expecting this.
So doesn't that mean that, at the moment, D will leak memory?
If it's not on the garbage collected heap, it won't scan it unless you
tell it to.
On Fri, 07 Jan 2011 11:30:17 -0500, Adam Conner-Sax
adam_conner_...@yahoo.com wrote:
Thanks!
It's not really about correctness as much as trying to understand how
these
different storage classes work. I understand that there is only one foo
object.
I wanted to see which parts are
Kinda sorta. I haven't had any problems from that. If you allocate very large
blocks in the garbage collector you may face trouble :-)
Haha okay, thanks. :) (This makes me shiver quite a bit...)
You have to add it to the garbage collector's list of roots
But if I need to do that, then what
%u wfunct...@hotmail.com wrote:
You have to add it to the garbage collector's list of roots
But if I need to do that, then what would be the difference between
void[] and
ubyte[]?
None what so ever. If you want to mark some memory with special bits,
use setattr in core.memory.
--
Simen
auto a = 1, b = null;
int a = 1, *b = null;
The first is accepted by dmd, and it should result in typeof(a) == int
and typeof(b) == void*. It is somewhat contradictory to the error
message resulting from the second:
multiple declarations must have the same type, not int and int*
I am
Ellery Newcomer wrote:
auto a = 1, b = null;
int a = 1, *b = null;
The first is accepted by dmd, and it should result in typeof(a) == int
and typeof(b) == void*. It is somewhat contradictory to the error
message resulting from the second:
multiple declarations must have the same type, not
On Fri, 07 Jan 2011 16:39:20 -0500, %u wfunct...@hotmail.com wrote:
None what so ever.
Huh.. then what about what is said in this link?
http://d.puremagic.com/issues/show_bug.cgi?id=5326#c1
I was told that void[] could contain references, but that ubyte[] would
not, and
that the GC would
On Friday, January 07, 2011 13:32:42 Ellery Newcomer wrote:
auto a = 1, b = null;
int a = 1, *b = null;
The first is accepted by dmd, and it should result in typeof(a) == int
and typeof(b) == void*. It is somewhat contradictory to the error
message resulting from the second:
multiple
First, you should understand that the GC does not know what data is in a
memory
block.
That is exactly why I was wondering how it figures things out. :)
Data *allocated* as a void[] (which I highly recommend *not* doing) will be
conservatively marked as containing pointers.
Ah, all right,
Great!
Thank you.
Please view the download link:
https://docs.google.com/leaf?id=0B38se3xzJrbuMjNlMTQ5MzUtYTM1NC00M2UyLWJjODctMDZlM2Y2ZWQwYjlmhl=enauthkey=CPvh1ZoG
(if you can not see the page correctly shown, just refresh the page)
this D_Language.chm was produced yesterday and collected the
Hi,
This code seems to leak memory, as the memory isn't reclaimed:
//Test memory here: low
{
auto b = Array!(bool)();
b.length = 1024 * 1024 * 128 * 8;
//Test memory here: high
}
//Test memory here: high
Am I missing something about how Array(T) (and RefCounted) works,
24 matches
Mail list logo