Re: Error: non-constant expression...

2010-11-27 Thread Jérôme M. Berger
bearophile wrote: > Jonathan M Davis: > >> At present, I don't believe that associative arrays are valid CTFE > > You are wrong, the current situation with AAs is not so simple :-) > > > string foo(string k) { > string[string] map = ["bar" : "spam"]; > return map[k]; > } > enum string v

Re: bigint

2010-11-27 Thread bearophile
Ellery Newcomer: > why does the following code fail? Reduced case for bugzilla: import std.bigint; void main() { assert([BigInt(1)] == [BigInt(1)]); } Bye, bearophile

Internal error: e2ir.c 4629

2010-11-27 Thread spir
Hello, I get the above error when compiling. No idea what it means. It happens when I add the following func: enum XHTML_CODES = ["&":"&", "<":"<", ">":">", "\"":""", "'":"'"]; string xhtmlEscape (in string text) { string newText = text; foreach (string ch, string co

Re: Internal error: e2ir.c 4629

2010-11-27 Thread Trass3r
If this isn't in bugzilla, please file a bug report. http://d.puremagic.com/issues/query.cgi

Re: Internal error: e2ir.c 4629

2010-11-27 Thread Simon
On 27/11/2010 16:16, spir wrote: Hello, I get the above error when compiling. No idea what it means. It happens when I add the following func: enum XHTML_CODES = ["&":"&", "<":"<", ">":">", "\"":""", "'":"'"]; string xhtmlEscape (in string text) { string newText = text;

Re: bigint

2010-11-27 Thread bearophile
> Reduced case for bugzilla: http://d.puremagic.com/issues/show_bug.cgi?id=5281

Re: Internal error: e2ir.c 4629

2010-11-27 Thread Don
Trass3r wrote: If this isn't in bugzilla, please file a bug report. http://d.puremagic.com/issues/query.cgi It probably has the same root cause as bug 4066.

Re: Internal error: e2ir.c 4629

2010-11-27 Thread spir
On Sat, 27 Nov 2010 18:40:34 + Simon wrote: > On 27/11/2010 16:16, spir wrote: > > Hello, > > > > I get the above error when compiling. No idea what it means. > > It happens when I add the following func: > > > > enum XHTML_CODES = ["&":"&", "<":"<", ">":">", > > "\"":""", "'":"'"]; > >

DMD and C compatibility on Linux

2010-11-27 Thread Bob Cowdery
I've just started to get organised to port my project from Windows to Ubuntu. I see there is now a DMD for Linux which I have installed. My question is can anyone tell me what I need to build the C libraries in to be compatible. On Windows I had to use DMC or convert the libraries. As there is no D

Re: DMD and C compatibility on Linux

2010-11-27 Thread Jonathan M Davis
On Saturday 27 November 2010 14:04:26 Bob Cowdery wrote: > I've just started to get organised to port my project from Windows to > Ubuntu. I see there is now a DMD for Linux which I have installed. My > question is can anyone tell me what I need to build the C libraries in > to be compatible. On Wi

Base64 - Encoding and decoding

2010-11-27 Thread Nrgyzer
Hey guys, I want encode and decode binary files like images, documents and similar file types to use it in an binary xml. For those I created a simple command line tool which encode or decode an file. The encoding of files will be processed by these lines: ... ubyte[] buffer; buffer.length = so

Re: DMD and C compatibility on Linux

2010-11-27 Thread Bob Cowdery
On 27/11/2010 22:11, Jonathan M Davis wrote: > On Saturday 27 November 2010 14:04:26 Bob Cowdery wrote: >> I've just started to get organised to port my project from Windows to >> Ubuntu. I see there is now a DMD for Linux which I have installed. My >> question is can anyone tell me what I need to

Re: DMD and C compatibility on Linux

2010-11-27 Thread Robert Clipsham
On 27/11/10 22:04, Bob Cowdery wrote: I've just started to get organised to port my project from Windows to Ubuntu. I see there is now a DMD for Linux which I have installed. My question is can anyone tell me what I need to build the C libraries in to be compatible. On Windows I had to use DMC or

Map and arrays

2010-11-27 Thread Tom
Hi, I wonder how to solve this kind of stuff... void foo(string[] sarray) { // do something with sarray } void bar(int[] iarray) { auto sarray = map!(to!string)(iarray); foo(sarray); } And get... foo (string[] sarray) is not callable using argument types (Map!(to,int[])) What sho

Re: Map and arrays

2010-11-27 Thread Jonathan M Davis
On Saturday 27 November 2010 22:48:28 Tom wrote: > Hi, > > I wonder how to solve this kind of stuff... > > void foo(string[] sarray) { > // do something with sarray > } > > void bar(int[] iarray) { > auto sarray = map!(to!string)(iarray); > foo(sarray); > } > > And get... > > fo