Re: Std Phobos 2 and logging library?

2009-04-11 Thread Rioshin an'Harthen
Leandro Lucarella llu...@gmail.com kirjoitti viestissä news:20090411030416.ga22...@homero.springfield.home... BTW, is there any real interest in adding some more power to the GC implementator to allow some kind of moving or generational collector? What I mostly want/need from the GC would be

Re: Std Phobos 2 and logging library?

2009-04-11 Thread Frank Benoit
Andrei Alexandrescu schrieb: Zz wrote: Hi, Are there any plans for a logging library in Std Phobos 2.0? Zz I wanted to add logging support for a while now but am undecided about the API to use. Log4J is quite popular but quite complicated. There are a number of simpler APIs out there

Re: Std Phobos 2 and logging library?

2009-04-11 Thread grauzone
Rioshin an'Harthen wrote: Leandro Lucarella llu...@gmail.com kirjoitti viestissä news:20090411030416.ga22...@homero.springfield.home... BTW, is there any real interest in adding some more power to the GC implementator to allow some kind of moving or generational collector? What I mostly

Re: demangle tool

2009-04-11 Thread Michel Fortin
On 2009-04-11 00:00:08 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Thanks. Arrays aren't a problem, but non-random-access ranges are problematic. (For arrays a slice could also be taken.) That's why I've been reluctant - if I make before and after primitives, then anyone

Re: Std Phobos 2 and logging library?

2009-04-11 Thread dsimcha
== Quote from grauzone (n...@example.net)'s article Rioshin an'Harthen wrote: Leandro Lucarella llu...@gmail.com kirjoitti viestissä news:20090411030416.ga22...@homero.springfield.home... BTW, is there any real interest in adding some more power to the GC implementator to allow some kind

Re: The new, new phobos sneak preview

2009-04-11 Thread Frits van Bommel
Andrei Alexandrescu wrote: alias TypeTuple!(GENERIC_READ, FILE_SHARE_READ, (SECURITY_ATTRIBUTES*).init, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN, HANDLE.init) defaults; How is that a type-tuple? (As far as I can see, none

Linux Shared Library Fun

2009-04-11 Thread jeff
So, I've been messing around with creating shared libraries in D and then dynamically loading them into another D program and calling the functions. Thus far this is very simple: just using a function that prints hello in the library and then the main program loads it. This whole thing works

Re: wchar[] and wchar*

2009-04-11 Thread Kagamin
novice2 Wrote: http://msdn.microsoft.com/en-us/library/bb762181(VS.85).aspx citate: pszPath [out] A pointer to a null-terminated string of length MAX_PATH which will receive the path. How i can determine the length of returned path string? I know only one way - look for 0, because

Scope const

2009-04-11 Thread Kagamin
If in is equivalent to scope const. What scope means? Does it mean that this argument doesn't escape scope of this function? Then const parameters are not quite equivalent to in parameters.

Re: D1 and read-only views?

2009-04-11 Thread Kagamin
You can also create an indexer. As it's done in .net

Re: Scope const

2009-04-11 Thread Jarrett Billingsley
On Sat, Apr 11, 2009 at 5:33 AM, Kagamin s...@here.lot wrote: If in is equivalent to scope const. What scope means? Does it mean that this argument doesn't escape scope of this function? Then const parameters are not quite equivalent to in parameters. Someone else correct me if I'm wrong,

Re: wchar[] and wchar*

2009-04-11 Thread novice2
Kagamin Wrote: this is readonly string. You can make it by simply appending \0. sorry, but i not understand, what you wan to say to me :( if you want - just say. my original post was: thank you Sergey but sometime wchar* is zero-terminated strings (LPWSTR) i feel lack of toStringz(wchar[])

Re: wchar[] and wchar*

2009-04-11 Thread Kagamin
novice2 Wrote: please, just advice me, how to write program in D with many D -- C (include Windows) interaction to keep D code simple. some one in this forum advice me use wchar[] and no problem with Windows API. i just novice. I want to say, you do unneded thing converting output buffers

Re: Indexing an associative array with a list of types

2009-04-11 Thread bearophile
grauzone: int[TypeInfo[]] typemap; This too may work, and avoids one indirection layer, but it leads to some troubles later: int[TypeInfo[2]] typemap; Bye, bearophile

Re: Indexing an associative array with a list of types

2009-04-11 Thread Doctor J
Hmm, not quite. This works at runtime, but not at compile-time; I can't use classes at compile time: http://www.digitalmars.com/d/2.0/function.html#interpretation and TypeInfo is a class: http://www.digitalmars.com/d/2.0/phobos/object.html#TypeInfo Basically, what I want to do is

Re: Indexing an associative array with a list of types

2009-04-11 Thread grauzone
What exactly are you trying to accomplish? It seems that you want to use the AA in CTFE, but it doesn't work, because using AAs with classes as keys don't work in CTFE?

Re: Indexing an associative array with a list of types

2009-04-11 Thread Doctor J
grauzone Wrote: What exactly are you trying to accomplish? It seems that you want to use the AA in CTFE, but it doesn't work, because using AAs with classes as keys don't work in CTFE? Correct. At compile time, I want to build up an associative array mapping type tuples to integers.

[Issue 2830] private attribute doesn't work for structs/unions/classes

2009-04-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2830 --- Comment #4 from g...@nwawudu.com 2009-04-11 04:11 --- tmp.d - import tmp1; void main() { TestStruct s; TestUnion u; auto c = new TestClass; s.var = var; // Fails s.var = a.var; // OK // Typo.

[Issue 2830] private attribute doesn't work for structs/unions/classes

2009-04-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2830 ma...@pochta.ru changed: What|Removed |Added URL||http://www.digitalmars.com/d

[Issue 2828] Typedef'ed template struct incorrectly recognized as an inner struct

2009-04-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2828 --- Comment #1 from unkn...@simplemachines.org 2009-04-11 14:57 --- Created an attachment (id=321) -- (http://d.puremagic.com/issues/attachment.cgi?id=321action=view) Remove incorrect cast, resolve basetype. This patch fixes it, so