Re: D1/D2 co-install?

2009-05-17 Thread Georg Wrede
BCS wrote: Hello Georg, BCS wrote: Does anyone have a good solution to installing both D1 and D2 on the same system? ~$ cd /usr/local/digitalmars/ digitalmars$ ls -l total 25216 drwxr-xr-x 9 root root 4096 2009-04-03 03:19 dmd1042 -rw-r--r-- 1 root root 7240365 2009-04-03 03:18 dmd.1

Re: D1/D2 co-install?

2009-05-17 Thread Georg Wrede
BCS wrote: Does anyone have a good solution to installing both D1 and D2 on the same system? ~$ cd /usr/local/digitalmars/ digitalmars$ ls -l total 25216 drwxr-xr-x 9 root root 4096 2009-04-03 03:19 dmd1042 -rw-r--r-- 1 root root 7240365 2009-04-03 03:18 dmd.1.042.zip drwxr-xr-x 9 root

Re: Threading

2009-05-12 Thread Georg Wrede
Saaa wrote: Steven Schveighoffer wrote: i.e. I want thread 1 to initialize elements 0, 1, and 2, and thread 2 to initialize elements 3, 4, and 5: thread1 = new ProcessingThread(arrayToInit[0..3]); thread2 = new ProcessingThread(arrayToInit[3..6]); thread1.start(); thread2.start(); Should be co

Re: Cryptic DMD error

2009-05-08 Thread Georg Wrede
Don wrote: Georg Wrede wrote: Don wrote: Lars T. Kyllingstad wrote: Don wrote: Lars T. Kyllingstad wrote: Can someone with knowledge of the DMD source code please explain this error message for me? dmd: glue.c:652: virtual void FuncDeclaration::toObjFile(int): Assertion `!v->csym'

Re: Cryptic DMD error

2009-05-08 Thread Georg Wrede
Don wrote: Lars T. Kyllingstad wrote: Don wrote: Lars T. Kyllingstad wrote: Can someone with knowledge of the DMD source code please explain this error message for me? dmd: glue.c:652: virtual void FuncDeclaration::toObjFile(int): Assertion `!v->csym' failed. I had a look at the DMD sourc

Re: "".dup is null

2009-05-04 Thread Georg Wrede
Steven Schveighoffer wrote: On Mon, 04 May 2009 10:22:49 -0400, Qian Xu wrote: Steven Schveighoffer wrote: I think you might have a bug? "".dup is the same as s.dup, not sure why you would expect it to be not-null. -Steve If I have not explained clearly. Here is the full code: char[]

Re: How-to: input/output "Japanese Characters"?

2009-05-03 Thread Georg Wrede
Carlos Smith wrote: "Georg Wrede" a écrit dans le message de news: import std.stdio; void main() { auto lin = readln(); writeln(lin); } Works with your Japanese strings. It just works(tm). I am trying this on a North American WinXP station. I am using DMD V1. Sorry

Re: isatty and Pavel stream.d

2009-05-03 Thread Georg Wrede
Carlos Smith wrote: "Jarrett Billingsley" a écrit dans le message de > extern(C) int isatty(int); And you should be able to use it. You shouldn't get any linking errors, at least I don't think. It worked fine.no link error. isatty is sometimes used like this: isatty(fileno(fp)) So i used

Re: How-to: input/output "Japanese Characters"?

2009-05-02 Thread Georg Wrede
Tyro[a.c.edwards] wrote: I'm on a Japanese system attempting to input/output Japanese Characters and cannot seem to accomplish it. How would I read "憲法記念日 理念と現実、広がる格差" from stdin/file and output the same to stdout/file? import std.stdio; void main() { auto lin = readln(); writeln(lin)

Re: D-styled data file

2009-04-29 Thread Georg Wrede
Saaa wrote: Simply put, I'd like a D styled dataformat alike JSON. Somehow saying that I would like it D styled makes it difficult to understand :) "Georg Wrede" wrote in message news:gta2r9$1vl...@digitalmars.com... Saaa wrote: I'm still dangling between a full parsi

Re: D-styled data file

2009-04-29 Thread Georg Wrede
Saaa wrote: I'm still dangling between a full parsing at load and parse on demand. A parse on demand (get) would do the following steps: Get the type of the variable in which the data must be stored (in string format) Search for this type in every line of the char[][], when found check whether

Re: Get the name of a function and the parameters?

2009-04-29 Thread Georg Wrede
Jarrett Billingsley wrote: On Wed, Apr 29, 2009 at 2:52 AM, Georg Wrede wrote: Jarrett Billingsley wrote: Don't you love it? "Most C++ template features are discovered." So are D's. Well, one could say that this is the very definition of a well working metaprogrammi

Re: D-styled data file

2009-04-29 Thread Georg Wrede
Saaa wrote: Thanks for your reply "Georg Wrede" wrote in message news:gt96lc$di...@digitalmars.com... Saaa wrote: I changed the prototype to: void get(in char[] varName, ...) I'm not totally happy with it because I only need one variadic argument and : How do I get the

Re: Can i delete a post?

2009-04-29 Thread Georg Wrede
zkp0s wrote: torhu Wrote: On 22.04.2009 01:03, zkp0s wrote: |||Ups, wrong newsgroup.||| um.. anyway, is there any rules or whatever about the newsgroups.¿What to do if you post on a wrong newsgroup? Just post again, no the right newsgroup. If possible, delete the post first. Can i delete a

Re: D-styled data file

2009-04-29 Thread Georg Wrede
Saaa wrote: I changed the prototype to: void get(in char[] varName, ...) I'm not totally happy with it because I only need one variadic argument and : How do I get the .stringof of an variadic type? _arguments[0].stringof doesn't work :) How do I mutate the original argument? (ref) Please

Re: Get the name of a function and the parameters?

2009-04-28 Thread Georg Wrede
Jarrett Billingsley wrote: Don't you love it? "Most C++ template features are discovered." So are D's. Well, one could say that this is the very definition of a well working metaprogramming system. After all, the whole idea of templates is to let the programmer invent new ways to use the l

Re: What is the sate of LDC?

2009-03-21 Thread Georg Wrede
bearophile wrote: [...] despite LDC looks like the best bet for the close future of D. Would you care to elaborate?

Re: Displaying type of something

2009-03-09 Thread Georg Wrede
Christopher Wright wrote: Georg Wrede wrote: When creating templates, it is sometimes handy to print the type of something. Is there a trivial way to print it? writeln("Typeof T is: ", typeof(t)); This doesn't work, but you get the idea. For a class or interface: write

Re: Displaying type of something

2009-03-09 Thread Georg Wrede
bearophile wrote: Georg Wrede: When creating templates, it is sometimes handy to print the type of something. Is there a trivial way to print it? writeln("Typeof T is: ", typeid(typeof(t))); (Try alternatives of that with a dynamic type, like a class). Thanks!!! class A { }

Displaying type of something

2009-03-09 Thread Georg Wrede
When creating templates, it is sometimes handy to print the type of something. Is there a trivial way to print it? writeln("Typeof T is: ", typeof(t)); This doesn't work, but you get the idea.

Re: finding dmd.conf

2009-03-01 Thread Georg Wrede
Lutger wrote: Jesse Phillips wrote: On Fri, 27 Feb 2009 15:54:46 +0100, Lutger wrote: I'm having some trouble with dmd.conf. I set up a (soft) symbolic link to the dmd/bin path version I want to use, but dmd can't find dmd.conf: $> which dmd /home/lutger/code/bin/dmd/bin/dmd $> dmd main.