Re: Messy code in console

2014-05-11 Thread IceNature via Digitalmars-d-learn
Thank you for your help. But if I change the default console encoding,will it affect other programs,making other console program show messy code? On 2014年5月11日 格林尼治标准时间+0800下午1时18分42秒, FrankLike via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Sunday, 11 May 2014 at 02:38:44

Re: Messy code in console

2014-05-11 Thread IceNature via Digitalmars-d-learn
Thank you for your help. But if I change the default setting,will it affect other programs,making other console program show messy code? On 2014年5月11日 格林尼治标准时间+0800下午12时30分40秒, Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On 05/10/2014 07:19 PM, IceNature via

Re: Configuring Phobos from the 1-click installer

2014-05-11 Thread Jack via Digitalmars-d-learn
On Sunday, 11 May 2014 at 05:34:38 UTC, Moses wrote: Thanks, I also found that I need to include the flag -I/usr/include/dmd/phobos to get it to compile. I tried doing: export PATH=$PATH:/usr/include/dmd/phobos but apparently I still need the -I flag. Is there another way to get around

Re: why can't I call const methods on shared objects?

2014-05-11 Thread FreeSlave via Digitalmars-d-learn
On Sunday, 11 May 2014 at 07:31:10 UTC, FreeSlave wrote: On Friday, 9 May 2014 at 21:42:14 UTC, Vlad Levenfeld wrote: Is this still the case if the method is const or pure? Const methods still require synchronization, because other threads may change some data, needed by const method while

Re: why can't I call const methods on shared objects?

2014-05-11 Thread FreeSlave via Digitalmars-d-learn
On Friday, 9 May 2014 at 21:42:14 UTC, Vlad Levenfeld wrote: Is this still the case if the method is const or pure? Const methods still require synchronization, because other threads may change some data, needed by const method while method is executed, and then you may get wrong results.

Re: Configuring Phobos from the 1-click installer

2014-05-11 Thread FreeSlave via Digitalmars-d-learn
On Sunday, 11 May 2014 at 05:34:38 UTC, Moses wrote: On Sunday, 11 May 2014 at 04:33:24 UTC, Ali Çehreli wrote: On 05/10/2014 07:12 PM, Moses wrote: After using the 1-click Ubuntu installer, I'm having trouble figuring out how to import standard library functions for Phobos. I get the

Re: Messy code in console

2014-05-11 Thread Kagamin via Digitalmars-d-learn
Known bug https://issues.dlang.org/show_bug.cgi?id=2742

Re: Messy code in console

2014-05-11 Thread FrankLike via Digitalmars-d-learn
On Sunday, 11 May 2014 at 06:35:26 UTC, IceNature via Digitalmars-d-learn wrote: Thank you for your help. But if I change the default console encoding,will it affect other programs,making other console program show messy code? Don't affect,and you must set the font to a unicode font ,such

Re: Temporary silence output (stdout)

2014-05-11 Thread FreeSlave via Digitalmars-d-learn
On Saturday, 10 May 2014 at 20:24:50 UTC, MarisaLovesUsAll wrote: Hi! I sometimes got a useless messages in stdout from SDL_Image library, and I want to temporary silence it. How do I do? You can temporary redirect output to file. Example (on C): #include stdio.h #include unistd.h #include

Re: Messy code in console

2014-05-11 Thread IceNature via Digitalmars-d-learn
The problem has been solved with your help. Thank you very much. On 2014年5月11日 格林尼治标准时间+0800下午3时43分41秒, FrankLike via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Sunday, 11 May 2014 at 06:35:26 UTC, IceNature via Digitalmars-d-learn wrote: Thank you for your help. But if I

Re: Messy code in console

2014-05-11 Thread FreeSlave via Digitalmars-d-learn
On Sunday, 11 May 2014 at 07:43:07 UTC, Kagamin wrote: Known bug https://issues.dlang.org/show_bug.cgi?id=2742 It's not bug. Write-functions are designed to output text to stdout, and it's issue of programmer to make sure that expected acceptor can interpret them properly. Note that stdout

Re: Temporary silence output (stdout)

2014-05-11 Thread via Digitalmars-d-learn
On Saturday, 10 May 2014 at 20:24:50 UTC, MarisaLovesUsAll wrote: Hi! I sometimes got a useless messages in stdout from SDL_Image library, and I want to temporary silence it. How do I do? Are you sure it's stdout, not stderr? For the latter, you would need to redirect FD 2, not FD 1:

Re: Messy code in console

2014-05-11 Thread Kagamin via Digitalmars-d-learn
On Sunday, 11 May 2014 at 08:48:43 UTC, FreeSlave wrote: On Sunday, 11 May 2014 at 07:43:07 UTC, Kagamin wrote: Known bug https://issues.dlang.org/show_bug.cgi?id=2742 It's not bug. Write-functions are designed to output text to stdout, and it's issue of programmer to make sure that expected

Re: why can't I call const methods on shared objects?

2014-05-11 Thread John Colvin via Digitalmars-d-learn
On Friday, 9 May 2014 at 21:37:37 UTC, Vlad Levenfeld wrote: Error: non-shared const method is not callable using a shared mutable object Why not? If the method is const, it can't modify the object anyway. Because thread-safety isn't only a problem when writing to memory, reads must also

Re: why can't I call const methods on shared objects?

2014-05-11 Thread monarch_dodra via Digitalmars-d-learn
On Friday, 9 May 2014 at 21:58:41 UTC, Steven Schveighoffer wrote: On Fri, 09 May 2014 17:45:37 -0400, Vlad Levenfeld vlevenf...@gmail.com wrote: Is there any way to declare a method as safe regardless of shared/mutability/etc (or some other way to avoid cast(Type)object.property every time

question about passing associative array to a function

2014-05-11 Thread rbutler via Digitalmars-d-learn
I have searched and can not understand something about passing AAs to a function. I have reduced the gist of the question to a tiny program below. If I put ref in the function stmt it works, i.e.: ref int[int] aa My confusion is that AAs are supposed to be passed as refs anyway, so I

Re: question about passing associative array to a function

2014-05-11 Thread John Colvin via Digitalmars-d-learn
On Sunday, 11 May 2014 at 14:46:35 UTC, rbutler wrote: I have searched and can not understand something about passing AAs to a function. I have reduced the gist of the question to a tiny program below. If I put ref in the function stmt it works, i.e.: ref int[int] aa My confusion is

Re: question about passing associative array to a function

2014-05-11 Thread rbutler via Digitalmars-d-learn
On Sunday, 11 May 2014 at 15:22:29 UTC, John Colvin wrote: On Sunday, 11 May 2014 at 14:46:35 UTC, rbutler wrote: I have searched and can not understand something about passing AAs to a function. I have reduced the gist of the question to a tiny program below. If I put ref in the function

Re: Curl Exception

2014-05-11 Thread Nick Sabalausky via Digitalmars-d-learn
On 5/10/2014 9:02 AM, Jack wrote: First off a rant: I use the Code::Blocks IDE and at times it has been proven to a double-edged source because of various issueslike this one: http://forum.dlang.org/thread/ndeyzrifseipuebvy...@forum.dlang.org) and am now itching to search for other IDEs to

Re: question about passing associative array to a function

2014-05-11 Thread Ali Çehreli via Digitalmars-d-learn
On 05/11/2014 07:46 AM, rbutler wrote: I have searched and can not understand something about passing AAs to a function. I have reduced the gist of the question to a tiny program below. If I put ref in the function stmt it works, i.e.: ref int[int] aa My confusion is that AAs are

Re: question about passing associative array to a function

2014-05-11 Thread John Colvin via Digitalmars-d-learn
On Sunday, 11 May 2014 at 16:54:18 UTC, Ali Çehreli wrote: On 05/11/2014 07:46 AM, rbutler wrote: I have searched and can not understand something about passing AAs to a function. I have reduced the gist of the question to a tiny program below. If I put ref in the function stmt it works,

Re: question about passing associative array to a function

2014-05-11 Thread Ali Çehreli via Digitalmars-d-learn
On 05/11/2014 10:00 AM, John Colvin wrote: On Sunday, 11 May 2014 at 16:54:18 UTC, Ali Çehreli wrote: On 05/11/2014 07:46 AM, rbutler wrote: I have searched and can not understand something about passing AAs to a function. I have reduced the gist of the question to a tiny program

Re: Configuring Phobos from the 1-click installer

2014-05-11 Thread Moses via Digitalmars-d-learn
Thanks, I also found that I need to include the flag -I/usr/include/dmd/phobos to get it to compile. I tried doing: export PATH=$PATH:/usr/include/dmd/phobos but apparently I still need the -I flag. Is there another way to get around this? Does your /etc directory contain dmd.conf file?

Re: Down the VisualD0.3.38-1.exe ,found virus!

2014-05-11 Thread Rainer Schuetze via Digitalmars-d-learn
On 10.05.2014 10:42, FrankLike wrote: I've been using VisualD for a long time without problems. If it makes you nervous, you can get the source from Github and compile it yourself. Hello,Meta When I compile the Visual D projects: at first,I compile the 'build' project,then get some

Re: Configuring Phobos from the 1-click installer

2014-05-11 Thread Jordi Sayol via Digitalmars-d-learn
El 11/05/14 07:34, Moses via Digitalmars-d-learn ha escrit: On Sunday, 11 May 2014 at 04:33:24 UTC, Ali Çehreli wrote: On 05/10/2014 07:12 PM, Moses wrote: After using the 1-click Ubuntu installer, I'm having trouble figuring out how to import standard library functions for Phobos. I get the

Re: question about passing associative array to a function

2014-05-11 Thread Jonathan M Davis via Digitalmars-d-learn
On Sun, 11 May 2014 17:00:13 + Remind me again why we can't just change this to a sensible initial state? Or at least add a .initialize()? All reference types have a null init value. Arrays and classes have the exact same issue as AAs. Anything else would require not only allocating memory

Re: question about passing associative array to a function

2014-05-11 Thread ed via Digitalmars-d-learn
On Sunday, 11 May 2014 at 14:46:35 UTC, rbutler wrote: I have searched and can not understand something about passing AAs to a function. I have reduced the gist of the question to a tiny program below. If I put ref in the function stmt it works, i.e.: ref int[int] aa My confusion is

Re: Curl Exception

2014-05-11 Thread Jack via Digitalmars-d-learn
On Sunday, 11 May 2014 at 16:17:20 UTC, Nick Sabalausky wrote: Sorry, I haven't really used the curl stuff yet, so I can't be a bigger help, but a couple notes below: It's alright. I'm actually up for any information right now. Access Violation, despite its wording, isn't usually about

Re: Down the VisualD0.3.38-1.exe ,found virus!

2014-05-11 Thread FrankLike via Digitalmars-d-learn
There are some quotes missing when building the Debug configuration. I have committed a fix and also added the missing file reported in your other message (IIRC it is not needed by every VS SDK). Thank you,I'll try it. Frank