Re: std.file.write versus std.stdio.write

2012-11-28 Thread Jonathan M Davis
On Wednesday, November 28, 2012 16:11:01 dsmith wrote:
> import std.stdio;   // no std.file is imported, yet the following
> error:
> 
> Error: std.file.write at /usr/include/dmd/phobos/std/file.d(419)
> conflicts with std.stdio.write!(string,string).write at
> /usr/include/dmd/phobos/std/stdio.d(1544)

If you have questions, post them in D.Learn. If you have a bug report, report 
it at http://d.puremagic.com/issues

Please, do not post to this list. It's only intended for messages from 
bugzilla. Posting from anyone else really shouldn't even be enabled.

- Jonathan M Davis


Re: CTFE Memory Hogging Workaround?

2012-11-22 Thread Jonathan M Davis
On Thursday, November 22, 2012 23:07:54 Maxime Chevalier wrote:
[snip]

Please do not post to this list. Only bugzilla is supposed to send messages to 
it (I don't even know why posting is enabled for anyone else). You subscribe 
to it if you want to receive all of those messages from bugzilla.

If you have a bug, please report it at http://d.puremagic.com/issues

If you have a question, please ask it in the D.Learn newsgroup. I'm sure that 
there will be people ready and willing to help you there.

- Jonathan M Davis


Re: Regarding hex strings

2012-10-17 Thread Jonathan M Davis
On Thursday, October 18, 2012 01:58:25 bearophile wrote:
[snip]

You posted to the wrong list.

- Jonathan M Davis


Re: Header file generation not working correctly

2012-09-12 Thread Jonathan M Davis
On Thursday, September 13, 2012 03:28:15 Pablo Delado wrote:
[snip]

Please do not post to this list (it shouldn't even accept posts from anyone 
other than bugzilla - I don't know why it does). It's not for reporting bugs 
or asking questions. You sign up for it if you want to receive all of the 
messages from bugzilla. If you have a question regarding learning or using D, 
then please ask it in digitalmars-d-learn. If you have a general question 
about D or are looking to discuss D's development, then post in digitalmars-d.

- Jonathan M Davis


Re: Status on Precise GC

2012-09-07 Thread Jonathan M Davis
On Saturday, September 08, 2012 02:44:47 Tyler Jameson Little wrote:
> Thanks!

Please do not post to this list. It's intended for messages posted by bugzilla 
only. You subscribe to it if you want to see the messages from bugzilla.

Please ask questions about learning D in digitalmars-d-learn and general D-
related questions in digitalmals-d.

- Jonathan M Davis


Re: AA rehash link error

2012-08-16 Thread Jonathan M Davis
On Thursday, August 16, 2012 23:57:11 Øivind wrote:
> I got no response in the 'learn' section, so I am reposting here.
> I think this must be a bug..

Please don't post here. This list is really only supposed to be posted to by 
bugzilla. I don't know why it's even enabled for anyone else to post to it. 
You sign up for this list if you want to see all of the messages from 
bugzilla. Report bugs here:

http://d.puremagic.com/issues

And you may yet get a response in D.learn. People don't always respond 
quickly.

- Jonathan M Davis


Re: OPENFILENAME structure

2012-05-30 Thread Jonathan M Davis
On Thursday, May 31, 2012 01:52:49 dnewbie wrote:
> There's information missing in OPENFILENAME structure
> file core.sys.windows.windows.d
> 
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms646839%28v=vs.85%2
> 9.aspx
> 
> #if (_WIN32_WINNT >= 0x0500)
> void *pvReserved;
> DWORD dwReserved;
> DWORD FlagsEx;
> #endif

Please do not post to this list. It is not intended to be posted to directly 
by anyone other than bugzilla. You subscribe to it if you want to see all of 
the reports from bugzilla rather than just those that you've reported or 
commented on. If you have a bug to report, please report it on bugzilla:

http://d.puremagic.com/issues

Thanks.

- Jonathan M Davis


Re: Seg-fault interfacing C library (GSL)

2012-05-26 Thread Jonathan M Davis
On Saturday, May 26, 2012 18:41:34 Stephan wrote:
> Hi,

Please do not post to this list directly. It's intended for those wishing to 
receive updates to all of the bug reports on bugzilla. If you have a question 
about learning d, please post it in digitalsmarsD.Learn. If you have a 
question or something that you want to discuss about D in general, then post 
it in digitalmars.D. And if you have a bug report, please report it on 
bugzilla ( http://d.puremagic.com/issues ).

- Jonathan M Davis


Re: [Issue 8063] Purity of assert's second parameter

2012-05-08 Thread Jonathan M Davis
On Tuesday, May 08, 2012 15:08:42 Nicolas Sicard wrote:
> > --- Comment #1 from bearophile_h...@eml.cc 2012-05-08 04:12:12
> > PDT ---
> > (In reply to comment #0)
> > 
> >> Calling impure functions in the second parameter of an assert
> >> statement within
> >> the body of a pure pure is an error, even in release mode.
> > 
> > This is good.
> 
> Since it is allowed to call impure functions in debug blocks
> inside pure functions, I thought it would be coherent that assert
> could do the same.

Please don't post directly to the bug list. Respond in bugzilla please. The 
buglist if for receiving reports from bugzilla not for posting to directly.

- Jonathan M Davis


Re: setlocale not working as expected

2012-02-24 Thread Jonathan M Davis
On Friday, February 24, 2012 08:10:31 Frank De prins wrote:
> Hello,
> 
> When I use setlocale with LC_ALL it does not seem to work.
> I use nlb_belgium and, when I print (writeln in console) a
> floating point number, I expect the decimal separator to be a
> comma. But it remains a dot.
> When I use 0 instead of LC_ALL, it does work.
> So I inspected the values defined for those locale cateory
> constants and they seem to be completely different from what I
> find in the Visual C++ headers. Is this possible? I mean, are
> they not expected to be the same, or is this vendor specific?
> 
> PS: This is how they are defined in VC:
> 
> #define LC_ALL 0
> #define LC_COLLATE 1
> #define LC_CTYPE 2
> #define LC_MONETARY 3
> #define LC_NUMERIC 4
> #define LC_TIME 5
> 
> Also, in VC++, the return value of setlocale is defined as char*
> whereas, in D, it is int. This makes it impossible to inspect
> the current locale.
> 
> Best regards and thanks for a wondderfull language,

This list is not intended to be posted to directly by anyone but bugzilla 
itself. If you have a bug, please report it at d.puremagic.com/issues (in 
which case, that would be messaged to this list). If you have a question about 
learning D, then post to digitalmars-d-learn, and if you have a general D 
question then, post it to digitalmars-d.

- Jonathan M Davis


Re: bug: Console buffer not flushed at right time

2012-02-07 Thread Jonathan M Davis
Please report bugs to d.puremagic.com/issues. This list is not supposed to be 
posted to directly by users. You sign up for it if you want to see all of the 
updates to bugs on Bugzilla.

- Jonathan M Davis

On Tuesday, February 07, 2012 15:49:19 Kevin Brogan wrote:
> ==
> Bug:
> --
> 
> 1) Console output buffer is not flushed when it should be.
> 
> ==
> Example Code:
> --
> 
> import std.stdio;
> 
> extern (Windows): uint GetConsoleOutputCP();
> extern (Windows): bool SetConsoleOutputCP(uint codePageId);
> 
> void main()
> {
> auto oldCP = [GetConsoleOutputCP(),SetConsoleOutputCP(65001)];
> scope(exit) if(oldCP[1]) SetConsoleOutputCP(oldCP[0]);
> 
> string str = "H\u266a!";
> 
> foreach (wchar c; str)
> {
> write(c,' ');
> }
> }
> 
> 
> ==
> What should happen:
> --
> 
> When main starts, the console codepage is set to UTF 8. Characters are then
> output to the console, and then the console codepage is reset to what it
> was prior to program execution. The reset is neccessary to preserve the
> console environment that exists prior to the program being run.
> 
> ==
> What happens instead:
> --
> 
> Instead of outputting the characters while the console is in the requested
> codepage, output is buffered. When main exits, the buffer is flushed, but
> after the scope(exit) statement has reset the codepage, so the flushed
> output is output while the wrong codepage is selected.
> 
> ==
> Work arounds:
> --
> 
> a) Get console input first - Buffer appears to be flushed before accepting
> input from the console.
> 
> b) Output a carriage return - Buffer appears to be flushed after every
> carriage return
> 
> c) Explicit flush in scope(exit) - import std.cstream, call dout.flush() in
> the scope(exit) statement
> 
> d) Patch the runtime to set the console codepage to unicode after opening a
> console and then set it back to what it was on program exit - Makes sense
> since all strings are output in unicode, and I wouldn't have to use win32
> apis to get logical behavior.
> 
> 
> --= Posted using GrabIt =
> --= Binary Usenet downloading made easy =-
> -= Get GrabIt for free from http://www.shemes.com/ =-


Re: std.conv.emplace

2011-12-21 Thread Jonathan M Davis
On Thursday, December 22, 2011 07:23:14 Froglegs wrote:
> This function
> 
> T emplace(T, Args...)(void[] chunk, Args args) if (is(T == class))
> {
> enforce(chunk.length >= __traits(classInstanceSize, T),
>new ConvException("emplace: chunk size too small
> 
> 
> This >= needs to be changed to a <

Please, do not post to this list (it really should reject all posts sent to it 
by users). You sign up for it if you want to see all of the messages sent by 
bugzilla, _not_ to post bugs. Bugs should be posted to bugzilla:

d.puremagic.com/issues

- Jonathan M Davis


Re: valgrind flags memory leak in _d_monitor_create

2011-10-18 Thread Jonathan M Davis
On Wednesday, October 19, 2011 05:51:51 Sean Silva wrote:
> --nextPart77593048.e8O9o76Zdv
> 
> I'm on Ubuntu x64, with the vanilla DMD .deb installed.
> 
> I have attached the output of valgrind. The program that triggers
> valgrind to report the leak it is practically any that I run, including
> just a bare "void main() { }". It looks like _d_monitor_create is
> calloc'ing 72 bytes of memory that get "definitely lost" according to
> valgrind.

This list is not intended to be posted to. You sign up for it you want to see 
all of the messages from bugzilla. Please report bugs in bugzilla: 
d.puremagic.com/issues

- Jonathan M Davis


Re: Is this a bug in execvp of std.process

2011-09-22 Thread Jonathan M Davis
On Thursday, September 22, 2011 02:40:32 Cheng Wei wrote:
> == Repost the article of Cheng Wei (riverch...@gmail.com)
> == Posted at 2011/09/21 00:30 to digitalmars.D.learn
> 
> #import�std.process
> void�main()�{
> execvp("ip",�"route");
> }
> 
> result:
> Object�"ute"�is�unknown,�try�"ip�help".
> 
> That�is�the�first�two�bytes�are�lost
> 
> Adding�two�spaces�works:
> #import�std.process
> void�main()�{
> execvp("ip",�"��route");
> }
> 
> Version�2.055,�linux,�32bit
> 
> Thanks.

Please do not post to this list. It's not intended for sending messages to. 
You sign up for it if you want to receive all of the messages from bugzilla. 
You're not going to get a useful response here.

- Jonathan M Davis

Re: SegFault when using writeln() and Fibers

2011-08-10 Thread Jonathan M Davis
On Wednesday, August 10, 2011 09:47:42 Danny Arends wrote:
> --nextPart77238143.e8O9o76Zdv
> 
> When I try to print floats and double from a fiber it fails with a
> segfault, while it is possible to do it in the main thread.
> 
> The expected output of the attached code file:
> 15
> 15
> Done
> 
> However I get:
> 15
> segfault
> 
> I am using the DMD64 D Compiler v2.054 on Debian 64
> 
> Kind regards,
> Danny Arends
> 
> --nextPart77238143.e8O9o76Zdv
> 
> LyoqCiAqIEJ1ZyByZXBvcnQgZm9yIERNRDY0IEQgQ29tcGlsZXIgdjIuMDU0IAogKiAyMDExIERh
> bm55IEFyZW5kcwogKiovCmltcG9ydCBjb3JlLnRocmVhZDsKaW1wb3J0IHN0ZC5zdGRpbzsKCmN
> s
> YXNzIFRlc3RDbGFzcyA6IEZpYmVyewpwdWJsaWM6CiAgdGhpcygpeyBzdXBlcigmcnVuKTsgfQo
> g
> IAogIHZvaWQgcnVuKCl7CiAgICBpbnQgeD0gMTA7CiAgICBpbnQgeT0gNTsKICAgIGZsb2F0IG1
> 5
> ZG91YmxlID0geCt5OwogICAgd3JpdGVsbihteWRvdWJsZSk7IC8vVGhpcyBzZWdmYXVsdHMKICA
> g
> IHlpZWxkKCk7CiAgfQp9Cgp2b2lkIG1haW4oc3RyaW5nW10gYXJncyl7CiAgaW50IHg9IDEwOwo
> g
> IGludCB5PSA1OwogIGZsb2F0IG15ZG91YmxlID0geCt5OwogIHdyaXRlbG4obXlkb3VibGUpOyA
> v
> L1RoaXMgd29ya3MKCiAgVGVzdENsYXNzIHRlc3RGaWJlciA9IG5ldyBUZXN0Q2xhc3MoKTsKICB
> 0 ZXN0RmliZXIuY2FsbCgpOwogIHdyaXRlbG4oIkRvbmUiKTsKfQoA
> 
> --nextPart77238143.e8O9o76Zdv--

Please don't post directly to this list. You sign up for this list so that you 
can see all of the messages from bugzilla. It's not intended to be posted to 
directly. Please post in D.Learn instead if you have a question, and if you 
have a bug to report, report it at d.puremagic.com/issues.

- Jonathan M Davis


Re: Stable sort in std.algorithm throws Range violation

2011-04-08 Thread Jonathan M Davis
On 2011-04-08 02:09, Matthias Walter wrote:
> Hi,
> 
> when using the most recent D2/32bit version from github of
> 
> dmd+druntime+phobos I get a Range violation from the following code:
> | import std.algorithm;
> | 
> | void main(char[][] args)
> | {
> | 
> |   sort!("a < b", SwapStrategy.stable)([1,0, 3, 2]);
> | 
> | }
> 
> Can anybody confirm this? Shall I file a bug?
> 
> best regards,

Please do not post to this list. It's intended for receiving messages from 
bugzilla, not for posting to. I don't know why posting to it is even enabled. 
Please post bugs to bugzilla. If you want to discuss the bug, then post on the 
D.learn or D lists.

As for this porticular bug, I believe that it is

http://d.puremagic.com/issues/show_bug.cgi?id=4584

- Jonathan M Davis


Re: build my project error with dmd.2.052

2011-02-22 Thread Jonathan M Davis
On Tuesday 22 February 2011 02:10:28 zsxxsz wrote:
> dmd -oftest adl/*.d main/*.d import/acl/*.d ./lib/lib_acl.a
> /usr/bin/ld: unrecognized option '--no-warn-search-mismatch'
> /usr/bin/ld: use the --help option for usage information
> 
> my ld: GNU ld version 2.17.50.0.6-6.el5 20061020

Please don't post directly to the bug list. You sign up for it so that you get 
all of the updates to bugs on bugzilla. Normally, you'd post to D.learn (for 
questions about D) or D (for discussing the language). In this case, either 
posting to the thread which announced the release od 2.052 in D.announce or 
posting in D would probably be the best choice.

In any case, my guess is that you have an old version of binutils. You're going 
to have to either update your linux insteall or edit your dmd.conf so that it 
doesn't use --no-warn-search-mismatch (though that means that you're likely to 
get warnings about library version mismatches for Phobos; the flag is there 
because both the 32-bit and 64-bit versions of Phobos are ld's search path, and 
it's annoying for it to complain about the one which you aren't using just 
because it's for the wrong architecture).

- Jonathan M Davis


Re: compile dmd 2.052 under XP -- error !

2011-02-20 Thread Jonathan M Davis
On Sunday 20 February 2011 04:13:35 David Wang wrote:
> I've installed dmc and dmd2 by the "dinstaller.exe" from
> http://ftp.digitalmars.com/dinstaller.exe
> 
> After finished, I downloaded the latest dmd, druntime and phobos from
> github.com

Please don't post to the bug list. It's intended for messages from bugzilla, 
not 
for people to post to directly. If you have questions regarded to learning 
about 
D, post at D.learn. If you have questions about the development of D, post on 
D. 
But this list is not intended to be posted to.

- Jonathan M Davis


Re: auto return type inheritance not covariant

2011-02-02 Thread Jonathan M Davis
On Wednesday, February 02, 2011 15:31:02 iLewis wrote:
> Maybe this has been brought up before, but i could find no previous
> submissions.
> 
> the following code compiles with the error "Error: function xxx.B.fn of
> type () overrides but is not covariant with xxx.A.fn of type ()" even
> though they both return an auto of type int... is this a bug or oversight
> by myself? I am unable to find any documentation saying that this is
> illegal.
> 
> I realize its easy to fix by changing the return type to int, however i was
> just curious.
> 
> class A
> {
>   auto fn()
>   {
>   return 10;
>   }
> }
> 
> class B : A
> {
>   auto fn()
>   {
>   return 5;
>   }
> }

I'm not aware of a bug report on the matter. You should create one at 
http://d.puremagic.com/issues . Also, this list is not really intended to be 
posted to. It's for seeing the messages about changes to bug reports which the 
tracker sends. If you want to post questions, they should generally go to 
D.Learn or D.

- Jonathan M Davis


Re: spawn bug?

2011-01-23 Thread Jonathan M Davis
On Sunday 23 January 2011 20:34:16 Adam Conner-Sax wrote:
> The attached code usually hangs (running on OSX, dmd 2.051).
> 
> It uses spawn to create a new thread.  All the thread does is create a
> large array of doubles. In one case it uses the Array!double from
> std.container.  In the other case it uses the built in dynamic double[]. 
> It declares the array, sets the length, then sends a message to main
> saying it is finished and exits.
> 
> The Array!double case always runs fine.  The built-in dynamic array case
> usually hangs, though not always in the same place.
> 
> And the array has to be sufficiently big (in my case 20 or bigger I
> think) or the problem doesn't occur.
> 
> I've no idea why.  It took me a *long* time to find this since it
> manifested as very mysterious hanging in a more complex piece of threaded
> code.  Now I've switched to using Array!double in my code and it all works
> fine.
> 
> 
> Adam
> 
> (An example run)
> 
> Spawned foo 1
> Spawned foo 2
> Spawned foo 3
> Spawned foo 4
> Finished foo 1
> Finished foo 2
> Finished foo 3
> Finished foo 4
> Spawned bar 1
> Spawned bar 2
> Spawned bar 3
> (stays here without finishing)
> 
> begin 644 spawn.d
> M:6UP;W)T('-T9"YC;VYC=7)R96YC>3L*:6UP;W)T('-T9"YS=&1I;SL*:6UP
> M;W)T('-T9"YC;VYT86EN97(["FEM<&]R="!C;W)E+G1H M9F]O*'5I;G0@:RP@=6EN="!L+%1I9"!M5&ED*2`*>PH@($%R M92!A M;VED(&)A M72!A M=F]I9"!M86EN*"D@"GL*("!I;6UU=&%B;&4@=6EN="!M=6QT:7!L:65R(#T@
> M,3`P,#`P.PH@(&EM;75T86)L92!U:6YT(&Y4:')E861S(#T@-#L*("!A=71O
> M(&UA:6Y4:60@/2!T:&ES5&ED*"D["@H@(&9O M96%DPH@("`@875T;R!D=6UM>5]4:60@/2!S<&%W;B@F9F]O+&LL
> M:RIM=6QT:7!L:65R+&UA:6Y4:60I.PH@("`@=W)I=&5F;&XH(E-P87=N960@
> M9F]O("5S(BQK*3L*("!]"@H@(&9O M("!R96-E:79E*"AU:6YT(&HI('L@=W)I=&5F;&XH(D9I;FES:&5D(&9O;R`E
> M M("`@(&%U=&\@9'5M;7E?5&ED(#T@ M M"B`@?0H@(&9O M:6YT(&HI('L@=W)I=&5F;&XH(D9I;FES:&5D(&)A &(`H@(`I]
> `
> end

Please don't post to the bug list. Ask about bugs on D.Learn or D, or just 
report them in the tracker. This list is only meant for receiving messages from 
the bug tracker.

There are several spawn bugs: 
http://d.puremagic.com/issues/buglist.cgi?quicksearch=spawn

This one seems a likely culprit: 
http://d.puremagic.com/issues/show_bug.cgi?id=4307

- Jonathan M Davis


Re: Asian characters are not printed propely in console

2011-01-03 Thread Jonathan M Davis
On Monday 03 January 2011 19:39:00 Jun wrote:
> This is my code.
> 
> 1.///
> import std.stdio;
> import std.process;
> 
> void main(string[] args)
> {
>   writeln("安寧");
>   system("pause");
> }
> 
> 2.
> import std.stdio;
> import std.process;
> 
> void main(string[] args)
> {
>   writeln("안녕");
>   system("pause");
> }
> 
> Results are...
> 1.///
> 若됧?
> 계속하려면 아무 키나
> 누르십시오... 2./
> ?덈뀞
> 계속하려면 아무 키나
> 누르십시오...
> 
> The attached file is screenshot of test 2.
> 
> (string values typed by user did not caused problem)
> 
> Please confirm this problem and let me know whether this is the problem of
> dmd.

Please don't post to the bug list. It's really only meant for messages from 
bugzilla. You sign up for it if you want to see all of the bugzilla messages 
from when bugs are added or commented on or whatnot. Post on D.learn for 
questions about learning D and on D for discussions on the language and its 
development. This question should probably go on D.learn.

I'm not all that well versed in how you put unicode in your strings (rather 
than 
getting strings that have unicode in them from elsewhere - like user input), 
but 
my guess would be that you're not declaring your strings correctly, so they're 
not being treated as unicode. If you repost this on D.learn, odds are that 
someone there will know what you're doing wrong or perhaps even confirm that 
this 
is a dmd bug if that's really what's going on.

- Jonathan M Davis


Re: [Issue 5093] improve error for importing std.c.windows.windows

2010-11-15 Thread Jonathan M Davis
On Monday, November 15, 2010 13:59:10 Don wrote:
> Jonathan M Davis wrote:
> > On Monday 15 November 2010 12:49:05 Don wrote:
> >> d-bugm...@puremagic.com wrote:
> >>> http://d.puremagic.com/issues/show_bug.cgi?id=5093
> >>> 
> >>> 
> >>> 
> >>> --- Comment #3 from simon  2010-11-15
> >>> 11:03:49 PST --- Created an attachment (id=812)
> >>> PATCH against rev 755: implement a module import backtrace for static
> >>> assert
> >>> 
> >>> Implements a module import back-trace for static asserts.
> >>> 
> >>> This ought to be implemented for non-static asserts as well,
> >>> but that probably involves mucking about in the back end
> >>> and I can't be bothered diving into that at the mo.
> >> 
> >> Cool! In cases where it's imported from inside a static if, this is
> >> fantastic.
> >> Ideally, it would only do the module trace starting from the last
> >> instantiated template. (Which would mean that in many cases, it wouldn't
> >> appear at all). I think this should be applied to all template
> >> instantiation back traces.
> > 
> > I expect that you meant to post a comment to the bug rather than post on
> > the bug list...
> > 
> > - Jonathan M Davis
> 
> You expect wrong.

Okay. Sorry. It's just that normally no one posts directly to the list and any 
comments posted directly to the list probably won't get seen in the long run, 
since people will generally look at the bug reports directly.

- Jonathan M Davis


Re: [Issue 5093] improve error for importing std.c.windows.windows

2010-11-15 Thread Jonathan M Davis
On Monday 15 November 2010 12:49:05 Don wrote:
> d-bugm...@puremagic.com wrote:
> > http://d.puremagic.com/issues/show_bug.cgi?id=5093
> > 
> > 
> > 
> > --- Comment #3 from simon  2010-11-15
> > 11:03:49 PST --- Created an attachment (id=812)
> > PATCH against rev 755: implement a module import backtrace for static
> > assert
> > 
> > Implements a module import back-trace for static asserts.
> > 
> > This ought to be implemented for non-static asserts as well,
> > but that probably involves mucking about in the back end
> > and I can't be bothered diving into that at the mo.
> 
> Cool! In cases where it's imported from inside a static if, this is
> fantastic.
> Ideally, it would only do the module trace starting from the last
> instantiated template. (Which would mean that in many cases, it wouldn't
> appear at all). I think this should be applied to all template
> instantiation back traces.

I expect that you meant to post a comment to the bug rather than post on the 
bug 
list...

- Jonathan M Davis


Re: Compiler optimization breaks multi-threaded code

2010-11-14 Thread Jonathan M Davis
On Sunday 14 November 2010 01:04:46 Michal Minich wrote:
> There is one question on SO which seems like a serious problem for atomic
> ops.
> 
> http://stackoverflow.com/questions/4165149/compiler-optimization-breaks-
> multi-threaded-code
> 
> in short:
> 
> shared uint cnt;
> void atomicInc  ( ) { uint o; while ( !cas( &cnt, o, o + 1 ) ) o = cnt; }
> 
> is compile with dmd -O to something like:
> 
> shared uint cnt;
> void atomicInc  ( ) { while ( !cas( &cnt, cnt, cnt + 1 ) ) { } }
> 
> see the web page for details.

Please repost this to the D list and/or create bug report: 
http://d.puremagic.com/issues/enter_bug.cgi?product=D

The Bugs list is not for posting to. It's for the bug tracker to send updates 
to. You sign up for it if you want to receive those updates, not to post 
information on bugs.

- Jonathan M Davis


Re: error importing std.intrinsic on linux Digital Mars D Compiler v2.008

2010-10-30 Thread Jonathan M Davis
On Saturday 30 October 2010 07:33:05 Guillaume Chatelet wrote:
> On Sat, Oct 30, 2010 at 3:33 PM, Don  wrote:
> > Guillaume Chatelet wrote:
> >> Alright my first post is almost unreadable so restarting with the http
> >> version...
> >> Hope it's going to be better.
> > 
> > Why are you using version 2.008??? It was one of the first 'proof of
> > concept' alpha test versions. It wasn't intended for serious use. Any
> > version prior to about 2.040 was useful only for finding the most severe
> > compiler bugs.
> 
> Thx Don for the reply. It actually is the only version available for Gentoo
> right now, so I'm going to see if anyone's interested in bringing a more
> recent version of DMD for this distribution.

Just download the zip file. It's easy to to just put it in your home directory 
somewhere and use it. Sure, it would be great if gentoo got a more up-to-date 
version, but you can just download it yourself and use it quite easily, and 
it's 
self-contained if you don't copy the files to /usr/bin and the like, so 
uninstalling it later is a breeze.

- Jonathan M Davis

P.S. The Bug listed isn't really intended to be posted to. The bug tracker 
sends 
notifications to this list and you sign up for the list if you want those 
notifications. You should be posting to one of the other lists like Learn or D. 
And if you have a bug that you want to report rather than looking for help on 
something, you can just report it to the tracker: http://d.puremagic.com/issues/


Re: Documentation bug.

2010-10-02 Thread Jonathan M Davis
On Saturday 02 October 2010 14:20:12 anonymous wrote:
> On 2010-10-02, Jonathan M Davis  wrote:
> > bug reports. To actually report bugs, go here:
> > http://d.puremagic.com/issues/enter_bug.cgi
> > 
> > - Jonathan M Davis
> 
> Holy shit, not _another_ Bugzilla account.

LOL. There do seem to be a lot of them, don't they. But then again, unless 
you're dealing with some place like sourceforge, odds are that a project's bug 
database (bugzilla or otherwise) will be just for it, and so you'll need an 
account specific to it. Such is the nature of the beast, I suppose. It can sure 
lead to a lot of accounts though if you report many bugs.

- Jonathan M Davis


Re: Documentation bug.

2010-10-01 Thread Jonathan M Davis
On Friday 01 October 2010 22:53:28 anonymous wrote:
> I downloaded DMD 2.049, which is the latest version available. I tried
> to write a program using std.thread (incorrectly documented to exist at
> http://www.digitalmars.com/d/2.0/phobos/std_thread.html), only to find
> that "module thread is in file 'std\thread.d' which cannot be read".
> 
> Further investigation revealed that the distribution of Phobos
> included in DMD 2.049 HAS NO FILE NAMED THREAD.D!
> 
> After more investigation (which revealed that D 1.0 has "std.thread"),
> I noticed that the link to "std.thread" on the Digital Mars web site had
> the heading "core.thread", and fixed my program. It would have saved
> me a lot of trouble if the link was also named "core.thread", instead
> of having the misleading title (and URL) that suggests that the module's
> name is "std.thread".

This list isn't really meant to have people sending messages to it directly. 
It's where the bug tracker sends e-mails. You sign up for the list if you want 
to receive the bug trackers e-mails on new bug reports and changes to existing 
bug reports. To actually report bugs, go here: 
http://d.puremagic.com/issues/enter_bug.cgi

- Jonathan M Davis


Re: access member error

2010-09-03 Thread Jonathan M Davis
On Friday 03 September 2010 00:36:11 existen wrote:
> I've got 2 classes:
> 
> class A {
>   private int _x = 5;
> }
> 
> class B : A {
>   void output() {
>   writeln(_x);
>   }
> }
> 
> When I call
> (new B).output()
> there is no compile-time or run-time errors. Is it correct?

This is the wrong list to send posts to. All of the posts here come from the 
bug 
tracker. Use digitalmars-d-learn for questions about how D works or how to do 
things in D.

As for your code, it looks just fine to me assuming that A and B are in the 
same 
module. private is private to the module, not the class. If A and B are in 
separate modules, then B would not have access to _x, and it wouldn't work. For 
that to work, you'd need to make _x protected. But if they're in the same 
module, then it should work just fine.

- Jonathan M Davis