Re: string need to be robust

2011-03-14 Thread Jesse Phillips
ZY Zhou Wrote: it doesn't make sense to add try/catch every time you use tolower/toupper/foreach on string. No one will do that. You either throw exception when convert invalid utf8 bytes to string, or never throw exception and use invalid UTF32 code in dchar to represent invalid utf8

Re: If invalid string should crash(was:string need to be robust)

2011-03-14 Thread Jussi Jumppanen
%u Wrote: I agree with a), but not b), Can't find anything in unicode standard says you can use the low surrogate like that According to: http://www.cl.cam.ac.uk/~mgk25/ According to ISO 10646-1:2000, sections D.7 and 2.3c, a device receiving UTF-8 shall interpret a malformed sequence

Re: string need to be robust

2011-03-14 Thread KennyTM~
On Mar 14, 11 13:53, Jesse Phillips wrote: KennyTM~ Wrote: It is already throwing an exception called core.exception.UnicodeException. This even provides you the index where decoding failed. (However Phobos is not using it, AFAIK.) --- import core.exception, std.stdio, std.conv;

Re: string need to be robust

2011-03-14 Thread Jonathan M Davis
On Sunday 13 March 2011 22:45:38 ZY Zhou wrote: it doesn't make sense to add try/catch every time you use tolower/toupper/foreach on string. No one will do that. You either throw exception when convert invalid utf8 bytes to string, or never throw exception and use invalid UTF32 code in dchar

Re: If invalid string should crash(was:string need to be robust)

2011-03-14 Thread ZY Zhou
Thank you Jussi, But still this is not part of the standard, U+FFFD is a commonly used approach, while the U+DC80..U+DCFF is also a common solution for that(http://en.wikipedia.org/wiki/Utf8#Invalid_byte_sequences), different approach solve different problems. I think the current problem in D

Re: How do you debug DMD?

2011-03-14 Thread Walter Bright
On 3/13/2011 10:53 PM, %u wrote: I tried using Visual Studio to set breakpoints in DMD and everything (after compiling with -g), but it said that the source file is a different version (it isn't), and so it doesn't really let me set breakpoints. What tools (aka debuggers) do you guys use to

Re: How do you debug DMD?

2011-03-14 Thread %u
You can use windbg.exe, which is in \dmd\windows\bin. Of course, you'll also need to download the Digital Mars C++ compiler from http://www.digitalmars.com/download/freecompiler.html Hm... I already have WinDbg (and DMC), but I never thought it's any more efficient to debug with WinDbg than with

Re: If invalid string should crash(was:string need to be robust)

2011-03-14 Thread spir
On 03/14/2011 07:55 AM, ZY Zhou wrote: Thank you Jussi, But still this is not part of the standard, U+FFFD is a commonly used approach, while the U+DC80..U+DCFF is also a common solution for that(http://en.wikipedia.org/wiki/Utf8#Invalid_byte_sequences), different approach solve different

Re: Curl support RFC

2011-03-14 Thread Jonas Drewsen
On 13/03/11 23.44, Andrei Alexandrescu wrote: On 3/11/11 9:20 AM, Jonas Drewsen wrote: Hi, So I've spent some time trying to wrap libcurl for D. There is a lot of things that you can do with libcurl which I did not know so I'm starting out small. For now I've created all the declarations for

Re: How do you debug DMD?

2011-03-14 Thread Trass3r
%u Wrote: What tools (aka debuggers) do you guys use to debug DMD? Debugging dmd with Visual Studio works flawlessly for me. I just cv2pdb -C it, open devenv bla\dmd.exe, set the working directory to the D code I want to compile and then open the dmd source code to set breakpoints.

Re: SQLite Bindings

2011-03-14 Thread Jonas Drewsen
On 14/03/11 00.07, Jonathan M Davis wrote: On Sunday 13 March 2011 14:56:34 Jonas Drewsen wrote: On 13/03/11 18.29, dsimcha wrote: One of the features I miss most in Phobos is support for SQLite. Several people have written bindings and wrappers and haven't gotten much attention. (For example:

Re: SQLite Bindings

2011-03-14 Thread Jonas Drewsen
On 14/03/11 04.33, dsimcha wrote: On 3/13/2011 5:56 PM, Jonas Drewsen wrote: It's a great idea. But I think there need to be some kind of janitor for the 'etc' modules so that it does not end up as a new dsource collection of many unmaintained, some dead and a few live projects. I don't see

Re: Curl support RFC

2011-03-14 Thread Jonathan M Davis
On Monday 14 March 2011 02:16:12 Jonas Drewsen wrote: On 13/03/11 23.44, Andrei Alexandrescu wrote: On 3/11/11 9:20 AM, Jonas Drewsen wrote: Hi, So I've spent some time trying to wrap libcurl for D. There is a lot of things that you can do with libcurl which I did not know so I'm

Re: SQLite Bindings

2011-03-14 Thread Jonathan M Davis
On Monday 14 March 2011 02:24:45 Jonas Drewsen wrote: On 14/03/11 00.07, Jonathan M Davis wrote: On Sunday 13 March 2011 14:56:34 Jonas Drewsen wrote: On 13/03/11 18.29, dsimcha wrote: One of the features I miss most in Phobos is support for SQLite. Several people have written bindings

Re: How do you debug DMD?

2011-03-14 Thread Denis Koroskin
On Mon, 14 Mar 2011 12:27:45 +0300, Trass3r u...@known.com wrote: %u Wrote: What tools (aka debuggers) do you guys use to debug DMD? Debugging dmd with Visual Studio works flawlessly for me. I just cv2pdb -C it, open devenv bla\dmd.exe, set the working directory to the D code I want to

Re: If invalid string should crash(was:string need to be robust)

2011-03-14 Thread Kagamin
Jussi Jumppanen Wrote: %u Wrote: I agree with a), but not b), Can't find anything in unicode standard says you can use the low surrogate like that According to: http://www.cl.cam.ac.uk/~mgk25/ According to ISO 10646-1:2000, sections D.7 and 2.3c, a device receiving UTF-8

Re: How do you debug DMD?

2011-03-14 Thread Regan Heath
On Mon, 14 Mar 2011 05:53:42 -, %u wfunct...@hotmail.com wrote: I tried using Visual Studio to set breakpoints in DMD and everything (after compiling with -g), but it said that the source file is a different version (it isn't), and so it doesn't really let me set breakpoints. What tools

Re: Curl support RFC

2011-03-14 Thread Johannes Pfau
Jonas Drewsen wrote: Hi, So I've been working a bit on the etc.curl module. Currently most of the HTTP functionality is done and some very simple Ftp. I would very much like to know if this has a chance of getting in phobos if I finish it with the current design. If not then it will be for

Re: Curl support RFC

2011-03-14 Thread Lars T. Kyllingstad
On Mon, 14 Mar 2011 02:36:07 -0700, Jonathan M Davis wrote: On Monday 14 March 2011 02:16:12 Jonas Drewsen wrote: On 13/03/11 23.44, Andrei Alexandrescu wrote: On 3/11/11 9:20 AM, Jonas Drewsen wrote: Hi, So I've spent some time trying to wrap libcurl for D. There is a lot of things

Re: Curl support RFC

2011-03-14 Thread Kagamin
Lars T. Kyllingstad Wrote: 2. There are no assumptions about the type of data contained in the array. (char[] arrays are assumed to be UTF-8 encoded.) http has content-type, so it's known, what is contained in the array.

Re: GZip File Reading

2011-03-14 Thread Steven Schveighoffer
On Fri, 11 Mar 2011 19:27:21 -0500, dsimcha dsim...@yahoo.com wrote: 3. Streams in D should be based on input ranges, not whatever crufty old stuff std.stream is based on. No. I/O Ranges should be based on streams. A stream is a low level construct that can read and/or write data. In

Re: Curl support RFC

2011-03-14 Thread Steven Schveighoffer
On Mon, 14 Mar 2011 07:20:26 -0400, Lars T. Kyllingstad public@kyllingen.nospamnet wrote: On Mon, 14 Mar 2011 02:36:07 -0700, Jonathan M Davis wrote: On Monday 14 March 2011 02:16:12 Jonas Drewsen wrote: On 13/03/11 23.44, Andrei Alexandrescu wrote: On 3/11/11 9:20 AM, Jonas Drewsen

Re: Stream Proposal

2011-03-14 Thread Steven Schveighoffer
On Fri, 11 Mar 2011 21:29:42 -0500, dsimcha dsim...@yahoo.com wrote: The discussion we've had here lately about reading gzipped files has proved rather enlightening. I therefore propose the following high-level design for streams, with the details to be filled in later: 1. Streams should

Re: GZip File Reading

2011-03-14 Thread dsimcha
On 3/14/2011 8:22 AM, Steven Schveighoffer wrote: BTW, that crufty old stuff probably way outperforms anything you could ever do with ranges as the base. I don't get the concern about performance, for file I/O at least. Isn't the main bottleneck reading it off the disk platter?

Re: string need to be robust

2011-03-14 Thread Jacob Carlborg
On 2011-03-13 23:36, KennyTM~ wrote: On Mar 14, 11 02:55, Jacob Carlborg wrote: I would say that the functions should NOT crash but instead throw an exception. Then the developer can choose what to do when there's an invalid unicode character. It is already throwing an exception called

Re: string need to be robust

2011-03-14 Thread Jacob Carlborg
On 2011-03-14 06:45, ZY Zhou wrote: it doesn't make sense to add try/catch every time you use tolower/toupper/foreach on string. No one will do that. You either throw exception when convert invalid utf8 bytes to string, or never throw exception and use invalid UTF32 code in dchar to represent

Re: Google Summer of Code 2011 application

2011-03-14 Thread troll king
Daniel Gibson Wrote: Am 14.03.2011 02:21, schrieb Nebster: On 12/03/2011 17:23, Daniel Gibson wrote: No reason to hate Tango. Ok, I don't really hate Tango, I just prefer Phobos because I got used to it first :) This is perfectly fine :) Just don't feed the trolls and don't let

Re: GZip File Reading

2011-03-14 Thread Daniel Gibson
Am 14.03.2011 14:17, schrieb dsimcha: On 3/14/2011 8:22 AM, Steven Schveighoffer wrote: BTW, that crufty old stuff probably way outperforms anything you could ever do with ranges as the base. I don't get the concern about performance, for file I/O at least. Isn't the main bottleneck reading

Re: Curl support RFC

2011-03-14 Thread Jonas Drewsen
On 14/03/11 12.10, Johannes Pfau wrote: Jonas Drewsen wrote: Hi, So I've been working a bit on the etc.curl module. Currently most of the HTTP functionality is done and some very simple Ftp. I would very much like to know if this has a chance of getting in phobos if I finish it with the

Re: Curl support RFC

2011-03-14 Thread Jacob Carlborg
On 2011-03-13 22:39, Jonas Drewsen wrote: Hi, So I've been working a bit on the etc.curl module. Currently most of the HTTP functionality is done and some very simple Ftp. I would very much like to know if this has a chance of getting in phobos if I finish it with the current design. If not

Re: Curl support RFC

2011-03-14 Thread Jonas Drewsen
On 14/03/11 13.28, Steven Schveighoffer wrote: On Mon, 14 Mar 2011 07:20:26 -0400, Lars T. Kyllingstad public@kyllingen.nospamnet wrote: On Mon, 14 Mar 2011 02:36:07 -0700, Jonathan M Davis wrote: On Monday 14 March 2011 02:16:12 Jonas Drewsen wrote: On 13/03/11 23.44, Andrei Alexandrescu

Re: Stream Proposal

2011-03-14 Thread Kagamin
Andrei Alexandrescu Wrote: A simple input buffered stream of T would be a range of T[] that has two extra primitives: T[] lookAhead(size_t n); void leaveBehind(size_t n); T front(); T[] front(size_t n); // bulk front void popFront(size_t n=1); // bulk popFront I'm not sure there's a

Re: Curl support RFC

2011-03-14 Thread Jonas Drewsen
On 13/03/11 23.44, Andrei Alexandrescu wrote: You'll probably need to justify the existence of a class hierarchy and what overridable methods there are. In particular, since you seem to offer hooks via delegates, probably classes wouldn't be needed at all. (FWIW I would've done the same; I

Re: Curl support RFC

2011-03-14 Thread Johannes Pfau
Jonas Drewsen wrote: Do you plan to add some kind of support for header parsing? I think something like what the .net webclient uses ( http://msdn.microsoft.com/en-us/library/system.net.webclient(v=VS.100).aspx ) would be great. Especially the HeaderCollection supporting headers as strings

Re: SQLite Bindings

2011-03-14 Thread Andrei Alexandrescu
On 3/13/11 11:54 PM, Jesse Phillips wrote: libcurl, SQLite, libpng, libbzip2, and the WindowsAPI stuff all sound like Excellent items to include for standard distribution. It is really nice to just have these items available like zlib and zip. Personally I think Lua would make a nice standard

Re: Curl support RFC

2011-03-14 Thread Andrei Alexandrescu
On 3/14/11 4:36 AM, Jonathan M Davis wrote: That's debatable. Some would argue one way, some another. Personally, I'd argue ubyte[]. I don't like void[] one bit. Others would agree with me, and yet others would disagree. I don't think that there's really a general agreement on whether void[] or

Re: Curl support RFC

2011-03-14 Thread Andrei Alexandrescu
On 3/14/11 10:06 AM, Jonas Drewsen wrote: const(ubyte)[] for input void[] for output that sounds reasonable. I guess that if everybody can agree on this then the all of phobos (e.g. std.file) should use the same types? Move the const from the first to the second line :o). I see no reason why

Re: Curl support RFC

2011-03-14 Thread Andrei Alexandrescu
On 3/14/11 10:38 AM, Jonas Drewsen wrote: On 13/03/11 23.44, Andrei Alexandrescu wrote: You'll probably need to justify the existence of a class hierarchy and what overridable methods there are. In particular, since you seem to offer hooks via delegates, probably classes wouldn't be needed at

Re: Stream Proposal

2011-03-14 Thread Andrei Alexandrescu
On 3/14/11 10:32 AM, Kagamin wrote: Andrei Alexandrescu Wrote: A simple input buffered stream of T would be a range of T[] that has two extra primitives: T[] lookAhead(size_t n); void leaveBehind(size_t n); T front(); T[] front(size_t n); // bulk front void popFront(size_t n=1); // bulk

Re: Curl support RFC

2011-03-14 Thread Andrei Alexandrescu
On 3/14/11 4:16 AM, Jonas Drewsen wrote: On 13/03/11 23.44, Andrei Alexandrescu wrote: Sweet. As has been discussed, often the content is not text so you may want to have content return ubyte[] and add a new property such as textContent or text. I've already changed it to void[] as done in

Re: GZip File Reading

2011-03-14 Thread Steven Schveighoffer
On Mon, 14 Mar 2011 09:17:04 -0400, dsimcha dsim...@yahoo.com wrote: On 3/14/2011 8:22 AM, Steven Schveighoffer wrote: BTW, that crufty old stuff probably way outperforms anything you could ever do with ranges as the base. I don't get the concern about performance, for file I/O at least.

Re: GZip File Reading

2011-03-14 Thread dsimcha
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article On Mon, 14 Mar 2011 09:17:04 -0400, dsimcha dsim...@yahoo.com wrote: On 3/14/2011 8:22 AM, Steven Schveighoffer wrote: BTW, that crufty old stuff probably way outperforms anything you could ever do with ranges as the base.

Re: How do you debug DMD?

2011-03-14 Thread %u
I'd like to note that you need to compile with DMC using the makefiles provided, then cv2pdb -C and debug with Visual Studio. Ohh so I need to use cv2pdb, that's why! Thanks a lot! :)

Re: How do you debug DMD?

2011-03-14 Thread Simon
On 14/03/2011 07:20, %u wrote: You can use windbg.exe, which is in \dmd\windows\bin. Of course, you'll also need to download the Digital Mars C++ compiler from http://www.digitalmars.com/download/freecompiler.html Hm... I already have WinDbg (and DMC), but I never thought it's any more

Re: Library Documentation

2011-03-14 Thread Nicholas
== Quote from Nicholas (ma...@later.com)'s article == Quote from novice2 (so...@noem.ail)'s article Nicholas Wrote: As a result of (my) complaining and being a huge fan of XMind, I decided to try to organize the library for my own references as I encounter new sections of it.

Re: std.datetime questions

2011-03-14 Thread Nicholas
== Quote from Jonathan M Davis (jmdavisp...@gmx.com)'s article On Friday 11 March 2011 19:34:26 Jonathan M Davis wrote: On Friday, March 11, 2011 19:18:21 Nicholas wrote: Thanks for the information. I'll play with it when I'm at work again and then report my findings. In the

Re: Curl support RFC

2011-03-14 Thread Jonas Drewsen
On 14/03/11 16.40, Johannes Pfau wrote: Jonas Drewsen wrote: Do you plan to add some kind of support for header parsing? I think something like what the .net webclient uses ( http://msdn.microsoft.com/en-us/library/system.net.webclient(v=VS.100).aspx ) would be great. Especially the

Re: Curl support RFC

2011-03-14 Thread Jonas Drewsen
On 14/03/11 18.46, Andrei Alexandrescu wrote: On 3/14/11 10:06 AM, Jonas Drewsen wrote: const(ubyte)[] for input void[] for output that sounds reasonable. I guess that if everybody can agree on this then the all of phobos (e.g. std.file) should use the same types? Move the const from the

Re: If invalid string should crash(was:string need to be robust)

2011-03-14 Thread Simen kjaeraas
ZY Zhou rin...@gmail.com wrote: But for the following case, it is complete wrong if it crash at line 3: Why? That is the point where you are actually saying 'I care about individual characters in this string'. 1: char[] c = [0xA0]; 2: string s = c.idup; 3: foreach(dchar d; s){}

Re: Curl support RFC

2011-03-14 Thread Jonas Drewsen
On 14/03/11 18.55, Andrei Alexandrescu wrote: On 3/14/11 4:16 AM, Jonas Drewsen wrote: On 13/03/11 23.44, Andrei Alexandrescu wrote: Sweet. As has been discussed, often the content is not text so you may want to have content return ubyte[] and add a new property such as textContent or text.

Re: Curl support RFC

2011-03-14 Thread Andrei Alexandrescu
On 3/14/11 4:11 PM, Jonas Drewsen wrote: On 14/03/11 18.55, Andrei Alexandrescu wrote: Assume the body of the loop does some time-consuming processing - like e.g. writing to another HTTP stream. Then your network reads should not wait for that processing. While the user code does something, you

Re: SQLite Bindings

2011-03-14 Thread nedbrek
Hello all, Jesse Phillips jessekphillip...@gmail.com wrote in message news:ilk728$gk0$1...@digitalmars.com... libcurl, SQLite, libpng, libbzip2, and the WindowsAPI stuff all sound like Excellent items to include for standard distribution. It is really nice to just have these items available

Re: Help passing D strings to C libs

2011-03-14 Thread Daniel Green
On 3/14/2011 1:38 AM, Gene P. Cross wrote: I've amended the source to pass the strings pointer (path.ptr) after adding a null but the problem still persists. I lost for what it could be and I'm certain this is where the problem is, because if I remove the method call, the program runs fine.

Re: Help passing D strings to C libs

2011-03-14 Thread Jonathan M Davis
On Sunday 13 March 2011 22:38:49 Gene P. Cross wrote: I've amended the source to pass the strings pointer (path.ptr) after adding a null but the problem still persists. I lost for what it could be and I'm certain this is where the problem is, because if I remove the method call, the program

Re: Help passing D strings to C libs

2011-03-14 Thread Gene P. Cross
-Daniel I tried what you said: char* ptr = toStringz(path); SDL_LoadBMP(ptr); and made a check to see if the pointer is null, which it isn't, but I'm unable to inspect is value, I haven't a debugger at the moment, could you recommend one ? I also made the string a char[] and tested to see if

Re: Help passing D strings to C libs

2011-03-14 Thread Gene P. Cross
I found the problem. I've set up my 'main' file to act on various game states and because my load state is physically below the running state (where the problems were occuring), even though they were getting called first, the program starts in the loading state, dmd wasn't having it. I tried

Re: Help passing D strings to C libs

2011-03-14 Thread Daniel Green
On 3/14/2011 2:55 AM, Gene P. Cross wrote: I haven't a debugger at the moment, could you recommend one ? Sorry, I use GDB with GDC. I don't know about DMD, it may work with GDB on linux. You could try installing GDC and see if the results are the same. That may help to rule out the compiler

Re: Help passing D strings to C libs

2011-03-14 Thread Daniel Green
On 3/14/2011 3:07 AM, Gene P. Cross wrote: I found the problem. I've set up my 'main' file to act on various game states and because my load state is physically below the running state (where the problems were occuring), even though they were getting called first, the program starts in the

Re: Help passing D strings to C libs

2011-03-14 Thread Jonathan M Davis
On Monday 14 March 2011 00:07:05 Gene P. Cross wrote: I found the problem. I've set up my 'main' file to act on various game states and because my load state is physically below the running state (where the problems were occuring), even though they were getting called first, the program

Re: Help passing D strings to C libs

2011-03-14 Thread Gene P. Cross
Thanks for your help, and from here on in I'll be sure to initialise first thing. I'll look into GDB, thanks again.

Re: Help passing D strings to C libs

2011-03-14 Thread spir
On 03/14/2011 07:55 AM, Gene P. Cross wrote: -Daniel I tried what you said: char* ptr = toStringz(path); SDL_LoadBMP(ptr); and made a check to see if the pointer is null, which it isn't, but I'm unable to inspect is value, I haven't a debugger at the moment, could you recommend one ? I also

Re: Semi-const methods?

2011-03-14 Thread Mafi
Am 13.03.2011 23:27, schrieb Magnus Lie Hetland: I have a data structure that's generally static (const, or even immutable), but it has some utility storage, which caches certain results during use. This caching etc. doesn't really affect the semantics of the main object, and are reset between

Re: Read file/stream

2011-03-14 Thread Regan Heath
On Fri, 11 Mar 2011 22:39:43 -, Stewart Gordon smjg_1...@yahoo.com wrote: On 11/03/2011 21:51, Steven Schveighoffer wrote: snip Presumably there's a reason that it's been provided for uint but not ushort or ulong I think things in std.intrinsic are functions that tie directly to

Re: Semi-const methods?

2011-03-14 Thread Magnus Lie Hetland
On 2011-03-14 00:17:18 +0100, Jonathan M Davis said: So, if you don't actually manage to _really_ be logically const, or if you do this with an immutable object (which would likely result in a segfault), you _are_ going to have incorrect code. On the whole, I'd advise just not using const when

Re: Semi-const methods?

2011-03-14 Thread Magnus Lie Hetland
On 2011-03-14 11:51:09 +0100, Mafi said: I found away which doesn't use casts or bugs. Just use delegates/closures. Nice :D -- Magnus Lie Hetland http://hetland.org

Iterating over an enum associative array

2011-03-14 Thread Nebster
Hey, I'm having some problems iterating over an enumerated associative array. It comes up with this error at compile time: Internal error: e2ir.c 4835 I cut the code down to this: import std.stdio; enum int[string] assoc = [;: 0, =: 1, +: 2, -: 2, *: 3, /: 3]; void main() {

Re: Iterating over an enum associative array

2011-03-14 Thread spir
On 03/14/2011 12:21 PM, Nebster wrote: Hey, I'm having some problems iterating over an enumerated associative array. It comes up with this error at compile time: Internal error: e2ir.c 4835 I cut the code down to this: import std.stdio; enum int[string] assoc = [;: 0, =: 1, +: 2, -: 2,

Re: Read file/stream

2011-03-14 Thread Steven Schveighoffer
On Fri, 11 Mar 2011 17:39:43 -0500, Stewart Gordon smjg_1...@yahoo.com wrote: On 11/03/2011 21:51, Steven Schveighoffer wrote: snip Presumably there's a reason that it's been provided for uint but not ushort or ulong I think things in std.intrinsic are functions that tie directly to

Re: I seem to be able to crash writefln

2011-03-14 Thread Steven Schveighoffer
On Fri, 11 Mar 2011 18:57:32 -0500, Spacen Jasset spacenjas...@yahoo.co.uk wrote: On 10/03/2011 12:18, Steven Schveighoffer wrote: On Wed, 09 Mar 2011 18:19:55 -0500, Joel Christensen joel...@gmail.com wrote: This is on Windows 7. Using a def file to stop the terminal window coming up.

Re: Iterating over an enum associative array

2011-03-14 Thread Peter Lundgren
== Quote from Nebster (evil.nebs...@gmail.com)'s article Hey, I'm having some problems iterating over an enumerated associative array. It comes up with this error at compile time: Internal error: e2ir.c 4835 I cut the code down to this: import std.stdio; enum int[string] assoc =

Re: Iterating over an enum associative array

2011-03-14 Thread zirneklis
On 14/03/2011 14:38, Peter Lundgren wrote: == Quote from Nebster (evil.nebs...@gmail.com)'s article Hey, I'm having some problems iterating over an enumerated associative array. It comes up with this error at compile time: Internal error: e2ir.c 4835 I cut the code down to this: import

Re: Iterating over an enum associative array

2011-03-14 Thread bearophile
I am back. Nebster: I'm having some problems iterating over an enumerated associative array. It comes up with this error at compile time: Internal error: e2ir.c 4835 Added: http://d.puremagic.com/issues/show_bug.cgi?id=5734 Bye, bearophile

Re: Help passing D strings to C libs

2011-03-14 Thread Trass3r
I'm having trouble passing D strings (char[]) to SDL, in particular SDL_LoadBMP(), I keep receiving a segfault. Heres the code: void setImg(string path) { // concat null terminating char to string and cast to c type string when // passing to SDL_LoadBMP() path ~= \0; image =

Re: Help passing D strings to C libs

2011-03-14 Thread Jonathan M Davis
On Monday, March 14, 2011 10:54:57 Trass3r wrote: I'm having trouble passing D strings (char[]) to SDL, in particular SDL_LoadBMP(), I keep receiving a segfault. Heres the code: void setImg(string path) { // concat null terminating char to string and cast to c type string

[Issue 5734] New: foreach on enum associative array

2011-03-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5734 Summary: foreach on enum associative array Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal

[Issue 5731] std.datetime.SysTime prints UTC offsets backwards

2011-03-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5731 --- Comment #2 from Jonathan M Davis jmdavisp...@gmx.com 2011-03-14 10:52:58 PDT --- Pull Request: https://github.com/D-Programming-Language/phobos/pull/18 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ---

[Issue 5735] New: struct implicitly converted to boolean.

2011-03-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5735 Summary: struct implicitly converted to boolean. Product: D Version: D1 D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2

[Issue 5736] New: std.regex matches digits with when \w is used

2011-03-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5736 Summary: std.regex matches digits with when \w is used Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2

[Issue 5734] foreach on enum associative array

2011-03-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5734 kenn...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 5590] ICE when using .values on enum which is associative array

2011-03-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5590 kenn...@gmail.com changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment

[Issue 5736] std.regex matches digits with when \w is used

2011-03-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5736 kenn...@gmail.com changed: What|Removed |Added CC||kenn...@gmail.com --- Comment #1