Re: Defining a custom *constructor* (not initializer!)

2012-05-14 Thread Jacob Carlborg
On 2012-05-12 20:30, Mehrdad wrote: Yes, that's not a WinForms thing -- when you close a window, it's trivial to have DestroyWindow() get called too. The trouble is that you can't rely on this to avoid handle leaks -- for example, message-only windows are invisible, so their handles can get lea

Re: XOMB operating system

2012-05-14 Thread Jacob Carlborg
On 2012-05-12 21:37, tim krimm wrote: Is anyone here familiar with the XOMB operating system? http://wiki.xomb.org/index.php?title=Main_Page It appears to be written in D. http://wiki.xomb.org/index.php?title=History_of_XOmB "XOmB originally came about as a joke. Our group wanted to learn the

Re: using d dll/lib with msvc program

2012-05-14 Thread Manu
On 14 May 2012 09:16, Rainer Schuetze wrote: > Than try to load it: >> HINSTANCE LoadME; >> LoadME = LoadLibrary(L"C:\\Users\\**CrashTUA\\Documents\\visual studio >> 2010\\Projects\\DynamicLib1\\**DynamicLib1\\Release\\**DynamicLib1.dll"); >> func dllprintt; >> dllprintt = (func)GetProcAddress(Lo

Re: D dropped in favour of C# for PSP emulator

2012-05-14 Thread Jacob Carlborg
On 2012-05-11 22:20, Jonathan M Davis wrote: That's definitely an example of something that depends on your background. std.algorithm.any does _exactly_ what it would do in a functional language. How intuitive an API is depends a lot on how much the person writing the API thinks like you. It's d

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Chris Cain
On Monday, 14 May 2012 at 06:27:15 UTC, Walter Bright wrote: On 5/13/2012 11:09 PM, Mehrdad wrote: (1) Compiler helps you write correct multithreaded code (2) You help compiler perform optimizations based on contracts (3) I don't think there exists a #3 that's very different from #1 and #2 #3

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Mehrdad
On Monday, 14 May 2012 at 06:27:15 UTC, Walter Bright wrote: #3 Improves self-documentation of code - it's more understandable and less susceptible to breakage during maintenance. #3 is also valid for C++, so I wasn't exactly considering that. #4 Improves encapsulation o.O How does it impr

Re: Defining a custom *constructor* (not initializer!)

2012-05-14 Thread Mehrdad
On Monday, 14 May 2012 at 07:26:27 UTC, Jacob Carlborg wrote: You always call "display.dispose" at the end of the main function. Since "dispose" will dispose all of the receiver's children and "display" is the top level widget, everything will be disposed when the application exits. *sigh* I

Re: D dropped in favour of C# for PSP emulator

2012-05-14 Thread Jakob Bornecrantz
On Saturday, 12 May 2012 at 23:27:15 UTC, Alex Rønne Petersen wrote: You know, my project consisting of 130-ish source files and 24.000-ish lines of code compiles from scratch in ~20 seconds on my machine, building one file at a time... I honestly have not managed to come up with a build syst

Re: using d dll/lib with msvc program

2012-05-14 Thread crashtua
LoadLibrary returns 10(maybe wrong number of zeros,i dont remember exactly:)). And GetProcAddress returns 0, so dllprintt fails:(

Re: ZeroBUGS debugger for D

2012-05-14 Thread SomeDude
On Sunday, 13 May 2012 at 20:36:47 UTC, sunny_side wrote: On Friday, 11 May 2012 at 21:52:00 UTC, SomeDude wrote: Does anyone have it compiled for Linux 32 bits ? It has been compiled for Debian 6, 32 bit. I didn't remember any significant problems with compilation except several hung up, bu

Re: deprecating std.stream, std.cstream, std.socketstream

2012-05-14 Thread Andrej Mitrovic
On 5/13/12, Kiith-Sa <4...@theanswer.com> wrote: > My D:YAML library (YAML parser) depends on std.stream Also ae.xml depends on it.

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Alex Rønne Petersen
On 14-05-2012 08:37, Walter Bright wrote: On 5/13/2012 10:34 PM, Alex Rønne Petersen wrote: I have yet to see any compiler make sensible use of the information provided by both C++'s const and D's const. D's const is part of purity, which is optimizable. A function can still be weakly pure a

Re: D dropped in favour of C# for PSP emulator

2012-05-14 Thread Peter Alexander
On Sunday, 13 May 2012 at 10:08:47 UTC, bearophile wrote: Andrei Alexandrescu: assumeSorted(range).contains(object) is still one line, safer, and IMHO more self-explanatory. It's self-explanatory if the name there contains something like "binarySearch". Otherwise it is NOT self-explanatory,

Re: ZeroBUGS debugger for D

2012-05-14 Thread SomeDude
On Monday, 14 May 2012 at 09:05:51 UTC, SomeDude wrote: On Sunday, 13 May 2012 at 20:36:47 UTC, sunny_side wrote: On Friday, 11 May 2012 at 21:52:00 UTC, SomeDude wrote: Does anyone have it compiled for Linux 32 bits ? It has been compiled for Debian 6, 32 bit. I didn't remember any signific

arrays: if(null == [ ])

2012-05-14 Thread Gor Gyolchanyan
Hi! I have a small question: Is the test for a null array equivalent to a test for zero-length array? This is particularly interesting for strings. For instance, I could return an empty string from a toString-like function and the empty string would be printed, but If I returned a null string, that

Re: arrays: if(null == [ ])

2012-05-14 Thread simendsjo
On Mon, 14 May 2012 12:08:17 +0200, Gor Gyolchanyan wrote: Hi! I have a small question: Is the test for a null array equivalent to a test for zero-length array? This is particularly interesting for strings. For instance, I could return an empty string from a toString-like function and the

Re: arrays: if(null == [ ])

2012-05-14 Thread Simen Kjaeraas
On Mon, 14 May 2012 12:08:17 +0200, Gor Gyolchanyan wrote: Hi! I have a small question: Is the test for a null array equivalent to a test for zero-length array? This is particularly interesting for strings. For instance, I could return an empty string from a toString-like function and the

Re: D dropped in favour of C# for PSP emulator

2012-05-14 Thread Simen Kjaeraas
On Mon, 14 May 2012 12:01:06 +0200, Peter Alexander wrote: On Sunday, 13 May 2012 at 10:08:47 UTC, bearophile wrote: Andrei Alexandrescu: assumeSorted(range).contains(object) is still one line, safer, and IMHO more self-explanatory. It's self-explanatory if the name there contains somet

The more interesting question

2012-05-14 Thread FeepingCreature
On 05/14/12 12:08, Gor Gyolchanyan wrote: > Hi! I have a small question: > Is the test for a null array equivalent to a test for zero-length array? > This is particularly interesting for strings. > For instance, I could return an empty string from a toString-like function > and the empty string wo

Re: arrays: if(null == [ ])

2012-05-14 Thread Gor Gyolchanyan
So, null arrays and empty arrays are always the same, except for an empty string, which is a valid non-nill array of characters with length 0, right? On Mon, May 14, 2012 at 2:24 PM, simendsjo wrote: > On Mon, 14 May 2012 12:08:17 +0200, Gor Gyolchanyan < > gor.f.gyolchan...@gmail.com> wrote: >

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Stewart Gordon
On 13/05/2012 23:50, Jonathan M Davis wrote: Caching and lazy evaluation _will_ be impossible in those functions without breaking the type system. Unless stuff is added to the type system to accommodate it. For example, a type modifier that adds a "set" flag. When unset, a const method canno

Re: deprecating std.stream, std.cstream, std.socketstream

2012-05-14 Thread Stewart Gordon
From the other thread On 13/05/2012 21:58, Walter Bright wrote: On 5/13/2012 1:48 PM, Stewart Gordon wrote: On 13/05/2012 20:42, Walter Bright wrote: I'd like to see std.stream dumped. I don't see any reason for it to exist that std.stdio doesn't do (or should do). So std.stdio.File is

Re: How to contribute on github?

2012-05-14 Thread Steven Schveighoffer
On Fri, 11 May 2012 18:34:45 -0400, Alex Rønne Petersen wrote: On 12-05-2012 00:22, Mehrdad wrote: I haven't used git or github much. (Pretty much just once or twice, when someone added me.) How do I go about submitting potential changes to Phobos? (All I see on there is "GIT Read-only" wh

Re: arrays: if(null == [ ])

2012-05-14 Thread deadalnix
Le 14/05/2012 12:49, Gor Gyolchanyan a écrit : So, null arrays and empty arrays are always the same, except for an empty string, which is a valid non-nill array of characters with length 0, right? If it is the current behavior, it deserve a WAT !

Re: The more interesting question

2012-05-14 Thread deadalnix
Le 14/05/2012 12:42, FeepingCreature a écrit : On 05/14/12 12:08, Gor Gyolchanyan wrote: Hi! I have a small question: Is the test for a null array equivalent to a test for zero-length array? This is particularly interesting for strings. For instance, I could return an empty string from a toStrin

Re: @noreturn?

2012-05-14 Thread bearophile
Alex Rønne Petersen: In writing unwinding mechanisms for my VM, I find myself actually needing some sort of @noreturn function attribute that would tell the compiler that the function does not return, Maybe Walter will listen you more if you show an example of where/why you would use @noretu

Re: arrays: if(null == [ ])

2012-05-14 Thread simendsjo
On Mon, 14 May 2012 13:51:40 +0200, deadalnix wrote: Le 14/05/2012 12:49, Gor Gyolchanyan a écrit : So, null arrays and empty arrays are always the same, except for an empty string, which is a valid non-nill array of characters with length 0, right? If it is the current behavior, it deserve

Re: Compiler crash I can't pin down

2012-05-14 Thread Steven Schveighoffer
On Fri, 11 May 2012 22:28:40 -0400, Mehrdad wrote: On Saturday, 12 May 2012 at 01:38:56 UTC, Mehrdad wrote: I can't tell which part of my code is causing this (there's quite a few files in my project and I can't really submit every file), but when I run DMD, it crashes in template.c with "Acce

Re: @noreturn?

2012-05-14 Thread Alex Rønne Petersen
On 14-05-2012 14:13, Alex Rønne Petersen wrote: On 14-05-2012 13:53, bearophile wrote: Alex Rønne Petersen: In writing unwinding mechanisms for my VM, I find myself actually needing some sort of @noreturn function attribute that would tell the compiler that the function does not return, Mayb

Re: @noreturn?

2012-05-14 Thread Alex Rønne Petersen
On 14-05-2012 13:53, bearophile wrote: Alex Rønne Petersen: In writing unwinding mechanisms for my VM, I find myself actually needing some sort of @noreturn function attribute that would tell the compiler that the function does not return, Maybe Walter will listen you more if you show an exam

Re: How to contribute on github?

2012-05-14 Thread Alex Rønne Petersen
On 14-05-2012 13:45, Steven Schveighoffer wrote: On Fri, 11 May 2012 18:34:45 -0400, Alex Rønne Petersen wrote: On 12-05-2012 00:22, Mehrdad wrote: I haven't used git or github much. (Pretty much just once or twice, when someone added me.) How do I go about submitting potential changes to Ph

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Steven Schveighoffer
On Mon, 14 May 2012 02:35:16 -0400, Jakob Ovrum wrote: On Sunday, 13 May 2012 at 17:02:46 UTC, Stewart Gordon wrote: On 13/05/2012 17:41, Alex Rønne Petersen wrote: I agree with everything but toString(). I'm afraid that forcing toString() to be const will have harm flexibility severely.

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread bearophile
Alex Rønne Petersen: But how would you memoize the value in the instance of the object if it's const? I opened a thread on such matters: http://forum.dlang.org/thread/gtpdmrfektaygfmec...@forum.dlang.org --- Jonathan M Davis: Caching and lazy evaluation _will_ be impossible

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Steven Schveighoffer
On Sun, 13 May 2012 16:52:15 -0400, Dmitry Olshansky wrote: On 14.05.2012 0:48, Stewart Gordon wrote: On 13/05/2012 20:42, Walter Bright wrote: I'd like to see std.stream dumped. I don't see any reason for it to exist that std.stdio doesn't do (or should do). So std.stdio.File is the rep

stringof giving a surprising output

2012-05-14 Thread Manu
void function(Colour c = Colour.white) f; f.stringof == "void function(Colour c = white)" Error: undefined identifier 'white' This is rather hard to work-around. It'll take a lot of time to write code to magically put 'Colour.' back there... Is there another way?

Re: arrays: if(null == [ ])

2012-05-14 Thread Gor Gyolchanyan
I think any kind of null array should be different from an array of zero length. On Mon, May 14, 2012 at 3:55 PM, simendsjo wrote: > On Mon, 14 May 2012 13:51:40 +0200, deadalnix wrote: > > Le 14/05/2012 12:49, Gor Gyolchanyan a écrit : >> >>> So, null arrays and empty arrays are always the sa

Re: The more interesting question

2012-05-14 Thread Christophe
deadalnix , dans le message (digitalmars.D:167258), a écrit : > A good solution would be to set the pointer to 0 when the length is set > to 0. String literal are zero-terminated. "" cannot point to 0x0, unless we drop this rule. Maybe we should...

Re: Integer overflow and underflow semantics

2012-05-14 Thread Alex Rønne Petersen
On 05-05-2012 06:57, Alex Rønne Petersen wrote: Hi, I don't think the language really makes it clear whether overflows and underflows are well-defined. Do we guarantee that for any integral type T, T.max + 1 == T.min and T.min - 1 == T.max? This is relevant in particular for GDC and LDC since t

Re: The more interesting question

2012-05-14 Thread Gor Gyolchanyan
I thing the zero-terminated literal shtick is pointless. Literals are rarely passed to C functions, so we gotta use the std.utf.toUTFz anyway. On Mon, May 14, 2012 at 5:03 PM, Christophe wrote: > deadalnix , dans le message (digitalmars.D:167258), a écrit : > > A good solution would be to set th

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Dmitry Olshansky
On 14.05.2012 16:37, Steven Schveighoffer wrote: On Sun, 13 May 2012 16:52:15 -0400, Dmitry Olshansky wrote: On 14.05.2012 0:48, Stewart Gordon wrote: On 13/05/2012 20:42, Walter Bright wrote: I'd like to see std.stream dumped. I don't see any reason for it to exist that std.stdio doesn't d

Re: Defining a custom *constructor* (not initializer!)

2012-05-14 Thread Jacob Carlborg
On 2012-05-14 10:10, Mehrdad wrote: On Monday, 14 May 2012 at 07:26:27 UTC, Jacob Carlborg wrote: You always call "display.dispose" at the end of the main function. Since "dispose" will dispose all of the receiver's children and "display" is the top level widget, everything will be disposed when

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread John
On Monday, 14 May 2012 at 06:04:33 UTC, Mehrdad wrote: On Monday, 14 May 2012 at 03:19:57 UTC, Jonathan M Davis wrote: I suspect that the folks who are looking for absolutely every CPU cycle and want caching and lazy-loading in their types It's not a CPU cycle issue. Caching/lazy-loading can

Re: @noreturn?

2012-05-14 Thread Iain Buclaw
On 14 May 2012 13:21, Alex Rønne Petersen wrote: > On 14-05-2012 14:13, Alex Rønne Petersen wrote: >> >> On 14-05-2012 13:53, bearophile wrote: >>> >>> Alex Rønne Petersen: >>> In writing unwinding mechanisms for my VM, I find myself actually needing some sort of @noreturn function attri

Web servers in D

2012-05-14 Thread Gor Gyolchanyan
Hi! I want to write a web server in D and I wonder what is the best library to use for it. -- Bye, Gor Gyolchanyan.

Re: Web servers in D

2012-05-14 Thread simendsjo
On Mon, 14 May 2012 15:39:40 +0200, Gor Gyolchanyan wrote: Hi! I want to write a web server in D and I wonder what is the best library to use for it. https://github.com/rejectedsoftware/vibe.d

Re: Web servers in D

2012-05-14 Thread Gor Gyolchanyan
Thanks for the reply! This isn't a library. This is a weird framework, which needs me to run my sources through some executables. I need a good library with no garbage. Pure D code, that I can merge with my sources. On Mon, May 14, 2012 at 5:56 PM, simendsjo wrote: > On Mon, 14 May 2012 15:39:4

Is dsource .org completely deserted?

2012-05-14 Thread Gor Gyolchanyan
I was browsing dsource.org for some libraries, that I need and every single project, that I looked at was either completely abandoned or stuck with the ancient D1. Is there at least one sane project in there or is dsource.org an ancient fossil for museum display? Sorry for my frustration. -- Bye,

Re: arrays: if(null == [ ])

2012-05-14 Thread H. S. Teoh
On Mon, May 14, 2012 at 05:00:25PM +0400, Gor Gyolchanyan wrote: > I think any kind of null array should be different from an array of > zero length. But that defeats the utility of idioms like: int[] arr; arr ~= 123; ... T -- There are four kinds of lies: lies, damn l

Re: arrays: if(null == [ ])

2012-05-14 Thread Gor Gyolchanyan
No, it doesn't. Appending to a null array is equivalent to allocating a new array. On Mon, May 14, 2012 at 6:29 PM, H. S. Teoh wrote: > On Mon, May 14, 2012 at 05:00:25PM +0400, Gor Gyolchanyan wrote: > > I think any kind of null array should be different from an array of > > zero length. > > Bu

Re: Web servers in D

2012-05-14 Thread Andrea Fontana
web.d by Adam Ruppe? http://arsdnet.net/web.d/ You just need "web.d" file you can find on github. On Monday, 14 May 2012 at 14:04:01 UTC, Gor Gyolchanyan wrote: Thanks for the reply! This isn't a library. This is a weird framework, which needs me to run my sources through some executables. I

Re: arrays: if(null == [ ])

2012-05-14 Thread Steven Schveighoffer
On Mon, 14 May 2012 06:08:17 -0400, Gor Gyolchanyan wrote: Hi! I have a small question: Is the test for a null array equivalent to a test for zero-length array? == tests for length and content equivalence. 'is' tests for both pointer and length equivalence (and therefore, content equalit

Re: How to contribute on github?

2012-05-14 Thread Steven Schveighoffer
On Mon, 14 May 2012 08:09:48 -0400, Alex Rønne Petersen wrote: Yes, I know it can be done much shorter, but to a beginner, the stuff I listed usually seems less 'magical'. It's not magical if you don't wonder about it. For example, setting up origin was a detail I never even thought about

Re: Web servers in D

2012-05-14 Thread Adam D. Ruppe
On Monday, 14 May 2012 at 14:23:47 UTC, Andrea Fontana wrote: You just need "web.d" file you can find on github. cgi.d is the one for a basic server. https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff If you use cgi.d alone, you can use the little -version=em

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Steven Schveighoffer
On Mon, 14 May 2012 09:20:57 -0400, Dmitry Olshansky wrote: On 14.05.2012 16:37, Steven Schveighoffer wrote: The one last puzzle to solve is sharing. File is this half-breed of sharing, because it contains a FILE *, which is a shared type, but File is not. Then it does some casting to get

Re: Is dsource .org completely deserted?

2012-05-14 Thread Steven Schveighoffer
On Mon, 14 May 2012 10:06:12 -0400, Gor Gyolchanyan wrote: I was browsing dsource.org for some libraries, that I need and every single project, that I looked at was either completely abandoned or stuck with the ancient D1. Is there at least one sane project in there or is dsource.org an a

Re: Is dsource .org completely deserted?

2012-05-14 Thread Kagamin
ancient D1. druntime has assembler code, assembler is more ancient than D1, druntime belongs to D2, so D2 is more ancient than D1. Whoops! It's a time paradox!

Re: deprecating std.stream, std.cstream, std.socketstream

2012-05-14 Thread Steven Schveighoffer
On Sun, 13 May 2012 17:38:23 -0400, Walter Bright wrote: This discussion started in the thread "Getting the const-correctness of Object sorted once and for all", but it deserved its own thread. These modules suffer from the following problems: 1. poor documentation, dearth of examples & r

building DMD fails as always

2012-05-14 Thread Gor Gyolchanyan
For a number of times I've tried building DMD from my github clone and failed at the same place over and over again. I say "make -fwin32.mak" and get this: dmc idgen.c -o idgen idgen.c: Msgtable msgtable[] = ^ idgen.c(29) : Error: missing ',' between declaration of 'Msgtable' and '

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Jonathan M Davis
On Monday, May 14, 2012 15:27:41 John wrote: > On Monday, 14 May 2012 at 06:04:33 UTC, Mehrdad wrote: > > On Monday, 14 May 2012 at 03:19:57 UTC, Jonathan M Davis wrote: > >> I suspect that the folks who are looking for absolutely every > >> CPU cycle and want caching and lazy-loading in their type

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Timon Gehr
On 05/14/2012 06:10 AM, Chris Cain wrote: On Monday, 14 May 2012 at 02:57:57 UTC, Mehrdad wrote: The problem is that it's unavoidable. i.e. you can't say "don't mark it as const if it isn't const", because, practically speaking, it's being forced onto the programmers by the language. You're r

Re: arrays: if(null == [ ])

2012-05-14 Thread Jonathan M Davis
On Monday, May 14, 2012 14:08:17 Gor Gyolchanyan wrote: > Hi! I have a small question: > Is the test for a null array equivalent to a test for zero-length array? > This is particularly interesting for strings. > For instance, I could return an empty string from a toString-like function > and the em

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Tove
On Monday, 14 May 2012 at 16:53:24 UTC, Timon Gehr wrote: On 05/14/2012 06:10 AM, Chris Cain wrote: On Monday, 14 May 2012 at 02:57:57 UTC, Mehrdad wrote: The problem is that it's unavoidable. i.e. you can't say "don't mark it as const if it isn't const", because, practically speaking, it's be

Re: arrays: if(null == [ ])

2012-05-14 Thread Gor Gyolchanyan
At least we could make an empty string a null array of characters for consistency. How many times did anyone use the feature of string literals being null-terminated? On Mon, May 14, 2012 at 8:56 PM, Jonathan M Davis wrote: > On Monday, May 14, 2012 14:08:17 Gor Gyolchanyan wrote: > > Hi! I have

Re: Growing pains

2012-05-14 Thread Dmitry Olshansky
On 03.05.2012 18:50, Andrei Alexandrescu wrote: Just letting you all know we're working on the frustrating and increasingly frequent "Load at xx.xx, try again later" errors when reading this forum through NNTP. They are caused by a significant growth spurt in newsgroup readership that occurred in

Re: Growing pains

2012-05-14 Thread David Nadlinger
On Saturday, 12 May 2012 at 10:16:45 UTC, Alex Rønne Petersen wrote: I can barely make contact with the newsgroup server at this point... any news on upping the server capacity? The idea that any reasonably-sized machine shouldn't be able to run a fairly small newsgroup server these days still

Re: WinAPI grossly lacking in core.c.windows.windows

2012-05-14 Thread Paulo Pinto
On Sunday, 13 May 2012 at 09:33:18 UTC, Jonathan M Davis wrote: On Sunday, May 13, 2012 11:19:12 Paulo Pinto wrote: Am 12.05.2012 20:26, schrieb Walter Bright: > On 5/12/2012 4:47 AM, Gor Gyolchanyan wrote: >> What are the plans to finish the WinAPI in druntime? It's >> grossly >> lacking at t

Re: Web servers in D

2012-05-14 Thread David Nadlinger
On Monday, 14 May 2012 at 14:04:01 UTC, Gor Gyolchanyan wrote: Thanks for the reply! This isn't a library. This is a weird framework, which needs me to run my sources through some executables. I need a good library with no garbage. Pure D code, that I can merge with my sources. You might wa

Re: using d dll/lib with msvc program

2012-05-14 Thread crashtua
So, thanks to all. It works after adding 'export' keyword and '_' symbol before function name.

Re: Web servers in D

2012-05-14 Thread Gor Gyolchanyan
If I have an option to legitimately use vibe as a library only, then OK. I just don't like things like Qt, which make a religious ritual out of a library usage. On Mon, May 14, 2012 at 9:22 PM, David Nadlinger wrote: > On Monday, 14 May 2012 at 14:04:01 UTC, Gor Gyolchanyan wrote: > >> Thanks fo

Re: The more interesting question

2012-05-14 Thread Alex Rønne Petersen
On 14-05-2012 15:21, Gor Gyolchanyan wrote: I thing the zero-terminated literal shtick is pointless. Literals are rarely passed to C functions, so we gotta use the std.utf.toUTFz anyway. On Mon, May 14, 2012 at 5:03 PM, Christophe mailto:trav...@phare.normalesup.org>> wrote: deadalnix , da

Re: arrays: if(null == [ ])

2012-05-14 Thread Alex Rønne Petersen
On 14-05-2012 19:16, Gor Gyolchanyan wrote: At least we could make an empty string a null array of characters for consistency. How many times did anyone use the feature of string literals being null-terminated? On Mon, May 14, 2012 at 8:56 PM, Jonathan M Davis mailto:jmdavisp...@gmx.com>> wrote:

DUDA

2012-05-14 Thread Anders Sjögren
Hi! I was wondering, is anyone aware if there been any efforts on using D as the foundation for a GPGPU language? For example: Given that there is are LLVM based D and CUDA compilers, might there be a way to modify D to nVidia GPU-enabled DUDA similar to how C++ is modified to CUDA, without

Re: using d dll/lib with msvc program

2012-05-14 Thread crashtua
But it is something strange, one function need '_' and another dont:( In D dll i have: extern (C) int function() f; alias typeof(f) myfunc; export extern (C) int retten() { return 10; } export extern (C) void setf(myfunc ff) { f=ff; } export extern (C) int ret() { return

Re: Growing pains

2012-05-14 Thread Kagamin
I wonder if something like this will be more painful? http://www.freewebhostingarea.com/

Re: Defining a custom *constructor* (not initializer!)

2012-05-14 Thread Mehrdad
On Monday, 14 May 2012 at 13:25:11 UTC, Jacob Carlborg wrote: No, I'm telling you how SWT/DWT works. How "dispose" works in DWT is _not_ the same as doing managing memory manually. Memory? The entire issue is about a handle leak, not a memory leak...

Re: DUDA

2012-05-14 Thread Gor Gyolchanyan
I think CUDA is a completely pointless waste of time because of OpenCL. On Mon, May 14, 2012 at 9:35 PM, <"Anders Sjögren\" "@puremagic.com> wrote: > Hi! > > I was wondering, is anyone aware if there been any efforts on using D as > the foundation for a GPGPU language? > > For example: Given that

Re: arrays: if(null == [ ])

2012-05-14 Thread Gor Gyolchanyan
This is the original thread and there's no reply from you prior to this one. On Mon, May 14, 2012 at 9:41 PM, Alex Rønne Petersen wrote: > On 14-05-2012 19:16, Gor Gyolchanyan wrote: > >> At least we could make an empty string a null array of characters for >> consistency. How many times did anyo

Re: The more interesting question

2012-05-14 Thread Gor Gyolchanyan
If printf is used instead of writeln, then there's something seriously wrong with druntime in the first place. This is just ridiculous. On Mon, May 14, 2012 at 9:38 PM, Alex Rønne Petersen wrote: > On 14-05-2012 15:21, Gor Gyolchanyan wrote: > >> I thing the zero-terminated literal shtick is poin

Re: Growing pains

2012-05-14 Thread Dmitry Olshansky
On 14.05.2012 22:06, Kagamin wrote: I wonder if something like this will be more painful? http://www.freewebhostingarea.com/ Or rather a cheap dedicated VPS box. http://buyvm.net/ 15$/year ? -- Dmitry Olshansky

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread deadalnix
Le 14/05/2012 00:56, Mehrdad a écrit : On Sunday, 13 May 2012 at 22:51:05 UTC, Jonathan M Davis wrote: Anything that absolutely requires them will probably have to either have to break the type system or use _other_ functions with the same functionality but without those attributes. In some case

Re: ZeroBUGS debugger for D

2012-05-14 Thread sunny_side
On Monday, 14 May 2012 at 09:05:51 UTC, SomeDude wrote: I'm having an issue with the configure part, it can't find my libgtkmm-2.4 even though it's dpkg installed. It would be nice It seems only binaries are installed, no lib's headers. Installation of libgtkmm-2.4-dev can help to solve the is

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Andrej Mitrovic
On 5/14/12, Steven Schveighoffer wrote: > Really, printf is the *only* reason to have this backwards compatibility > "feature", and I strongly wish we could get rid of it. printf is also unique in that it works when called in class destructors, which is sometimes needed for debugging (unlike writ

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Mehrdad
On Monday, 14 May 2012 at 18:52:06 UTC, deadalnix wrote: The only reason I'd see a toSting function as non pure or non const is memoize. It can be tackled with lib support in phobos. What are other uses cases ? Not necessarily 'memoization' -- you could be instead querying another object for t

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Alex Rønne Petersen
On 14-05-2012 21:04, Mehrdad wrote: On Monday, 14 May 2012 at 18:52:06 UTC, deadalnix wrote: The only reason I'd see a toSting function as non pure or non const is memoize. It can be tackled with lib support in phobos. What are other uses cases ? Not necessarily 'memoization' -- you could be i

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread deadalnix
Le 14/05/2012 04:47, Jonathan M Davis a écrit : They can be in almost all cases. The problem is the folks who want to have caching and/or lazy initiailization in their classes/structs. You can't cache the result of any of those functions (toHash being the main target for it) if they're const and

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread deadalnix
Le 14/05/2012 21:04, Mehrdad a écrit : On Monday, 14 May 2012 at 18:52:06 UTC, deadalnix wrote: The only reason I'd see a toSting function as non pure or non const is memoize. It can be tackled with lib support in phobos. What are other uses cases ? Not necessarily 'memoization' -- you could b

Re: Growing pains

2012-05-14 Thread Andrei Alexandrescu
On 5/14/12 1:40 PM, Dmitry Olshansky wrote: On 14.05.2012 22:06, Kagamin wrote: I wonder if something like this will be more painful? http://www.freewebhostingarea.com/ Or rather a cheap dedicated VPS box. http://buyvm.net/ 15$/year ? The issue seems to be different than sheer computing powe

Re: Is dsource .org completely deserted?

2012-05-14 Thread Nick Sabalausky
"Gor Gyolchanyan" wrote in message news:mailman.722.1337004471.24740.digitalmar...@puremagic.com... >I was browsing dsource.org for some libraries, that I need and every single > project, that I looked at was either completely abandoned or stuck with > the > ancient D1. > Is there at least one s

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread H. S. Teoh
On Mon, May 14, 2012 at 09:18:42PM +0200, deadalnix wrote: [...] > Lazy initialization is more a problem than a solution when it comes > to multithreading. And I'm afraid it is the future. > > BTW, nothing prevent to define toString an non const and another as > const. The const one cannot cache t

Re: using d dll/lib with msvc program

2012-05-14 Thread Martin Drašar
Dne 14.5.2012 19:59, crashtua napsal(a): But it is something strange, one function need '_' and another dont:( In D dll i have: extern (C) int function() f; alias typeof(f) myfunc; export extern (C) int retten() { return 10; } export extern (C) void setf(myfunc ff) { f=ff; } export extern (C) i

Re: arrays: if(null == [ ])

2012-05-14 Thread deadalnix
Le 14/05/2012 16:37, Steven Schveighoffer a écrit : Note that [] is a request to the runtime to build an empty array. The runtime detects this, and rather than consuming a heap allocation to build nothing, it simply returns a null-pointed array. This is 100% the right decision, and I don't think

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Steven Schveighoffer
On Mon, 14 May 2012 15:07:30 -0400, Andrej Mitrovic wrote: On 5/14/12, Steven Schveighoffer wrote: Really, printf is the *only* reason to have this backwards compatibility "feature", and I strongly wish we could get rid of it. printf is also unique in that it works when called in class de

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Steven Schveighoffer
On Mon, 14 May 2012 13:08:06 -0400, Tove wrote: On Monday, 14 May 2012 at 16:53:24 UTC, Timon Gehr wrote: On 05/14/2012 06:10 AM, Chris Cain wrote: On Monday, 14 May 2012 at 02:57:57 UTC, Mehrdad wrote: The problem is that it's unavoidable. i.e. you can't say "don't mark it as const if it i

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Mehrdad
On Monday, 14 May 2012 at 19:13:30 UTC, deadalnix wrote: Le 14/05/2012 21:04, Mehrdad a écrit : On Monday, 14 May 2012 at 18:52:06 UTC, deadalnix wrote: The only reason I'd see a toSting function as non pure or non const is memoize. It can be tackled with lib support in phobos. What are other

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Steven Schveighoffer
On Mon, 14 May 2012 15:23:59 -0400, Steven Schveighoffer wrote: On Mon, 14 May 2012 15:07:30 -0400, Andrej Mitrovic wrote: On 5/14/12, Steven Schveighoffer wrote: Really, printf is the *only* reason to have this backwards compatibility "feature", and I strongly wish we could get rid of

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread Steven Schveighoffer
On Mon, 14 May 2012 15:05:01 -0400, Alex Rønne Petersen wrote: On 14-05-2012 21:04, Mehrdad wrote: On Monday, 14 May 2012 at 18:52:06 UTC, deadalnix wrote: The only reason I'd see a toSting function as non pure or non const is memoize. It can be tackled with lib support in phobos. What are ot

Re: Growing pains

2012-05-14 Thread Alex Rønne Petersen
On 14-05-2012 21:16, Andrei Alexandrescu wrote: On 5/14/12 1:40 PM, Dmitry Olshansky wrote: On 14.05.2012 22:06, Kagamin wrote: I wonder if something like this will be more painful? http://www.freewebhostingarea.com/ Or rather a cheap dedicated VPS box. http://buyvm.net/ 15$/year ? The issu

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread deadalnix
Le 14/05/2012 21:24, Steven Schveighoffer a écrit : On Mon, 14 May 2012 13:08:06 -0400, Tove wrote: On Monday, 14 May 2012 at 16:53:24 UTC, Timon Gehr wrote: On 05/14/2012 06:10 AM, Chris Cain wrote: On Monday, 14 May 2012 at 02:57:57 UTC, Mehrdad wrote: The problem is that it's unavoidable

Re: Getting the const-correctness of Object sorted once and for all

2012-05-14 Thread deadalnix
Le 14/05/2012 21:25, Mehrdad a écrit : On Monday, 14 May 2012 at 19:13:30 UTC, deadalnix wrote: Le 14/05/2012 21:04, Mehrdad a écrit : On Monday, 14 May 2012 at 18:52:06 UTC, deadalnix wrote: The only reason I'd see a toSting function as non pure or non const is memoize. It can be tackled with

Re: arrays: if(null == [ ])

2012-05-14 Thread Steven Schveighoffer
On Mon, 14 May 2012 15:30:25 -0400, deadalnix wrote: Le 14/05/2012 16:37, Steven Schveighoffer a écrit : Note that [] is a request to the runtime to build an empty array. The runtime detects this, and rather than consuming a heap allocation to build nothing, it simply returns a null-pointed ar

  1   2   >