Re: Ranges

2011-03-18 Thread Peter Alexander
On 13/03/11 12:05 AM, Jonathan M Davis wrote: So, when you're using a range of char[] or wchar[], you're really using a range of dchar. These ranges are bi-directional. They can't be sliced, and they can't be indexed (since doing so would likely be invalid). This generally works very well. It's

Re: Ranges

2011-03-18 Thread Jonathan M Davis
On Friday 18 March 2011 02:29:51 Peter Alexander wrote: On 13/03/11 12:05 AM, Jonathan M Davis wrote: So, when you're using a range of char[] or wchar[], you're really using a range of dchar. These ranges are bi-directional. They can't be sliced, and they can't be indexed (since doing so

Re: Ranges

2011-03-18 Thread spir
On 03/18/2011 10:29 AM, Peter Alexander wrote: On 13/03/11 12:05 AM, Jonathan M Davis wrote: So, when you're using a range of char[] or wchar[], you're really using a range of dchar. These ranges are bi-directional. They can't be sliced, and they can't be indexed (since doing so would likely be

How do I read data with ByChunk?

2011-03-18 Thread Craig Dillabaugh
Hi, I have two binary files containing image data, and I want to go through them pixel by pixel and read the image data into arrays and compare the pixel values (images have the exact same dimensions but one is unsigned 1 byte per pixel, and the other signed 2 bytes per pixel). I am trying to

Re: How do I read data with ByChunk?

2011-03-18 Thread Zirneklis
On 18/03/2011 14:35, Craig Dillabaugh wrote: Hi, I have two binary files containing image data, and I want to go through them pixel by pixel and read the image data into arrays and compare the pixel values (images have the exact same dimensions but one is unsigned 1 byte per pixel, and the

Re: How do I read data with ByChunk?

2011-03-18 Thread Craig Dillabaugh
== Quote from Zirneklis (a...@dingspam.cc)'s article On 18/03/2011 14:35, Craig Dillabaugh wrote: Hi, I have two binary files containing image data, and I want to go through them pixel by pixel and read the image data into arrays and compare the pixel values (images have the exact same

Re: Ranges

2011-03-18 Thread Jonathan M Davis
On Friday, March 18, 2011 03:32:35 spir wrote: On 03/18/2011 10:29 AM, Peter Alexander wrote: On 13/03/11 12:05 AM, Jonathan M Davis wrote: So, when you're using a range of char[] or wchar[], you're really using a range of dchar. These ranges are bi-directional. They can't be sliced, and

In-source way to call any C Library

2011-03-18 Thread Adrian Iliescu
Is there a way to call a C function without having to screw around with the linker on the command line? In C#, for example, this is all you have to do: [DllImport( @..\Debug\CLibTest.dll )]//location internal static extern int MyTestResult(); //name of function void

Re: In-source way to call any C Library

2011-03-18 Thread Jacob Carlborg
On 2011-03-18 19:54, Adrian Iliescu wrote: Is there a way to call a C function without having to screw around with the linker on the command line? In C#, for example, this is all you have to do: [DllImport( @..\Debug\CLibTest.dll )]//location internal static extern int

Re: In-source way to call any C Library

2011-03-18 Thread Andrej Mitrovic
For runtime linking with DLLs, you're looking for LoadLibrary, GetProcAddress and friends. They're in core.sys.windows.windows. The static constructor is useful if you want to have C functions in module scope. Personally, I wrap C libraries in classes and hide all the loading details there.

Re: In-source way to call any C Library

2011-03-18 Thread Jesse Phillips
Adrian Iliescu Wrote: Is there a way to call a C function without having to screw around with the linker on the command line? In C#, for example, this is all you have to do: [DllImport( @..\Debug\CLibTest.dll )]//location internal static extern int MyTestResult();

Re: Ranges

2011-03-18 Thread Peter Alexander
On 18/03/11 5:53 PM, Jonathan M Davis wrote: On Friday, March 18, 2011 03:32:35 spir wrote: On 03/18/2011 10:29 AM, Peter Alexander wrote: On 13/03/11 12:05 AM, Jonathan M Davis wrote: So, when you're using a range of char[] or wchar[], you're really using a range of dchar. These ranges are

Re: Ranges

2011-03-18 Thread Jonathan M Davis
On Friday, March 18, 2011 14:08:48 Peter Alexander wrote: On 18/03/11 5:53 PM, Jonathan M Davis wrote: On Friday, March 18, 2011 03:32:35 spir wrote: On 03/18/2011 10:29 AM, Peter Alexander wrote: On 13/03/11 12:05 AM, Jonathan M Davis wrote: So, when you're using a range of char[] or

Re: Unicode - Windows 1252

2011-03-18 Thread Stewart Gordon
On 16/03/2011 22:17, Tom wrote: I have a D2 code that writes some stuff to the screen (usually runs in cmd.exe pseudo-console). When I print spanish characters they show wrong (gibberish symbols and so, wich corresponds to CP-1252 encoding). Is there a way to convert all outputted streams to

Buliding DSFML2? (64-bit Linux)

2011-03-18 Thread Sean Eskapp
I've been trying for weeks to build the D bindings of SFML2, but with little success. The main issue is that I get a myriad of linker errors (documented at http://www.sfml-dev.org/forum/viewtopic.php?p=28345#28345), but I can't figure out what linking options would solve them. Can anybody shed

Re: Buliding DSFML2? (64-bit Linux)

2011-03-18 Thread Jonathan M Davis
On Friday, March 18, 2011 17:56:44 Sean Eskapp wrote: I've been trying for weeks to build the D bindings of SFML2, but with little success. The main issue is that I get a myriad of linker errors (documented at http://www.sfml-dev.org/forum/viewtopic.php?p=28345#28345), but I can't figure out

Re: Buliding DSFML2? (64-bit Linux) (New info)

2011-03-18 Thread Sean Eskapp
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article On Friday, March 18, 2011 17:56:44 Sean Eskapp wrote: I've been trying for weeks to build the D bindings of SFML2, but with little success. The main issue is that I get a myriad of linker errors (documented at

Re: Buliding DSFML2? (64-bit Linux) (New info)

2011-03-18 Thread Jonathan M Davis
On Friday, March 18, 2011 18:58:49 Sean Eskapp wrote: == Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article On Friday, March 18, 2011 17:56:44 Sean Eskapp wrote: I've been trying for weeks to build the D bindings of SFML2, but with little success. The main issue is that I

Re: GDC with D2?

2011-03-18 Thread Jonathan M Davis
On Friday, March 18, 2011 19:00:40 Sean Eskapp wrote: Does GDC support D2? Yes. It's also fairly up-to-date now too, I believe (though it is still a bit behind dmd as I understand it - at least as farn as Phobos goes). I don't use anything other than dmd though, so I'm not sure of gdc's exact

Re: GDC with D2?

2011-03-18 Thread Sean Eskapp
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article On Friday, March 18, 2011 19:00:40 Sean Eskapp wrote: Does GDC support D2? Yes. It's also fairly up-to-date now too, I believe (though it is still a bit behind dmd as I understand it - at least as farn as Phobos goes). I don't use

Re: Building DSFML2? (64-bit Linux)

2011-03-18 Thread Sean Eskapp
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article On Friday, March 18, 2011 18:58:49 Sean Eskapp wrote: == Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article On Friday, March 18, 2011 17:56:44 Sean Eskapp wrote: I've been trying for weeks to build the D bindings

DMD2 - compiling and linking in separate steps (64-bit)

2011-03-18 Thread Sean Eskapp
I'm trying to use DMD through an IDE, but I'm getting stumped trying to create 64-bit executables under Linux. I can get everything compiled fine, using the -m64 compiler flag, but I can't get it to link. Here's the error list: /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-

Re: DMD2 - compiling and linking in separate steps (64-bit)

2011-03-18 Thread Jonathan M Davis
On Friday 18 March 2011 20:49:58 Sean Eskapp wrote: incompatible /usr/lib/../lib/librt.so when searching for -lrt /usr/bin/ld: skipping incompatible /usr/lib/../lib/librt.a when searching for -lrt /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux- gnu/4.4.5/../../../librt.so when