Re: CUDA with D?

2009-03-03 Thread Chris R Miller
Lutger wrote: Chris R Miller wrote: ... I looked into OpenCL, which appears (at first glance) to be a funky way of stringing together assembler instructions using C function calls. I'm sure it's fast, but it's not the most friendly looking code to me (then again, I don't know ASM, so what do I k

Timer in D.API?

2009-03-03 Thread Sam Hu
First of all,this is about D ,not C#. In C# the program print each letter of a string per 0.3 second one by one using the Timer & delegate: C# code: using System; using System.Text; using System.Timers; namespace OneLetterATime { class Program { static int counter = 0;

Re: Link Problem

2009-03-03 Thread Steven Schveighoffer
"Qian Xu" wrote > Hi All (again), > > > I got the following error message when my program is going to be linked: > > error --- > default/common/configuration/Configuration_1.o:(.data+0x98): undefined > reference to `_D5tango4text3xml9SaxParser12

Re: Access Vialotation

2009-03-03 Thread Qian Xu
BCS wrote: Hello downs, BCS: you can have a posix signal handler throw an exception (I have done it and had it work) but I have no idea if it is supported. In my experience, that works exactly once. That would match with what I needed: poor man's stack tracing int EveryFunction() { scop

Link Problem

2009-03-03 Thread Qian Xu
Hi All (again), I got the following error message when my program is going to be linked: error --- default/common/configuration/Configuration_1.o:(.data+0x98): undefined reference to `_D5tango4text3xml9SaxParser12_ModuleInfoZ' -

Re: Reading and writing Unicode files

2009-03-03 Thread jicman
Daniel Keep Wrote: > > > jicman wrote: > > Ok, the only reason that I say Unicode is that when I open the file in > > Notepad and I do a SaveAs, the Encoding says Unicode. So, when i read this > > file and I write it back to the another file, the Encoding turns to UTF8. > > I want to keep i

Re: Char[] confusing

2009-03-03 Thread bearophile
Qian Xu: > I have to do math in mind in order to keep my code correct ;-) > IMO, it does not make any sense. At the beginning you have to think a bit about it, but you quickly learn it, and you find it's the best way to design it :-) Several languages use this same convention. It allows you to s

Re: Char[] confusing

2009-03-03 Thread Robert Fraser
Qian Xu wrote: Lutger wrote: s[4] means the fifth element of s[] s[0..4] is a slice from the first to the fifth, but not including the fifth element. The last element in a slice is always one past the end of that slice. Thank you both. I have to do math in mind in order to keep my code corre