Re: Flag proposal [OT]

2011-06-13 Thread Alix Pexton
On 13/06/2011 02:31, Paul D. Anderson wrote: Alix Pexton Wrote: On 12/06/2011 16:11, Steven Schveighoffer wrote: On Sun, 12 Jun 2011 04:36:55 -0400, Alix Pexton wrote: On 12/06/2011 02:40, Steven Schveighoffer wrote: On Sat, 11 Jun 2011 13:04:47 -0400, Andrej Mitrovic wrote: On 6/11/1

Re: Flag proposal

2011-06-13 Thread Lars T. Kyllingstad
On Sun, 12 Jun 2011 14:59:57 -0400, Nick Sabalausky wrote: > "Andrei Alexandrescu" wrote in message > news:it1cvf$21d4$1...@digitalmars.com... >> >> It's the namespace pollution and the non-self-containedness of the >> function that's most troublesome. Also see Steve's point about methods. >> It'

Does anyone actually use std.string.capwords or std.string.capitalize?

2011-06-13 Thread Jonathan M Davis
I have a hard time believing that std.string.capwords or std.string.captitalize are actually used much. It just doesn't seem to me like they would be generally useful functions. They're far too specific in what they do and aren't flexible enough. And if they're not pulling their own weight, the

Re: Dynamic loading of shared libraries.

2011-06-13 Thread Jens Mueller
Steve Teale wrote: > Can DMD D2/Linux do this yet? dmd can't do it yet. But if all you want is to link a against a shared library you can try the following: 1. Create a shared library $ gcc -m64 -fPIC -shared shared.c -o libshared.so 2. Building (without linking using dmd) $ dmd -m64 -c dynamic.

Re: Fixing the imaginary/complex mess

2011-06-13 Thread Robert Clipsham
On 12/06/2011 23:37, bearophile wrote: Andrei: Don, instead of this fix, could be at best phase everything built-in about complex out? Two usages of complex numbers in the RosettaCode site. Acommon place where you find complex numbers is to plot Mandelbrot/Julia sets: http://rosettacode.org/

Re: imports in functions

2011-06-13 Thread Robert Clipsham
On 12/06/2011 22:15, Walter Bright wrote: Nobody seems to have noticed yet, but yesterday I removed the restriction preventing import declarations from being used in functions. These now work: void test1() { import std.c.stdio; printf("hello world\n"); } void test2() { static import std.c.stdio

Re: Daniel Murphy (yebblies)

2011-06-13 Thread Robert Clipsham
On 13/06/2011 03:22, Steven Schveighoffer wrote: I just want to say, I'm thoroughly impressed by the speed and effort Daniel Murphy is putting into fixing bugs with the compiler. Not to mention, he is closing already fixed bugs (an important, but tedious task). Bravo, Daniel! -Steve Indeed -

Re: Fixing the imaginary/complex mess

2011-06-13 Thread Lars T. Kyllingstad
On Mon, 13 Jun 2011 12:36:27 +0100, Robert Clipsham wrote: > On 12/06/2011 23:37, bearophile wrote: >> Andrei: >> >>> Don, instead of this fix, could be at best phase everything built-in >>> about complex out? >> >> Two usages of complex numbers in the RosettaCode site. >> >> Acommon place where y

Re: Tokenized Strings -- Are Arbitrary Characters Valid?

2011-06-13 Thread Bernard Helyer
All they are is passed through the tokeniser to ensure they lex as valid D (not parse). http://d-programming-language.org/lex.html A naked slash is not a valid token on its own, AFAIK, so it shouldn't work. But the other two are fine.

Re: Tokenized Strings -- Are Arbitrary Characters Valid?

2011-06-13 Thread Bernard Helyer
On Mon, 13 Jun 2011 12:13:13 +, Bernard Helyer wrote: > All they are is passed through the tokeniser to ensure they lex as valid > D (not parse). > > http://d-programming-language.org/lex.html > > A naked slash is not a valid token on its own, AFAIK, so it shouldn't > work. But the other two

Re: Tokenized Strings -- Are Arbitrary Characters Valid?

2011-06-13 Thread Bernard Helyer
Actually, the \u stuff indicates a literal and not an actual token, so the only actually valid one is '"'. Third time's the charm!

Re: Does anyone actually use std.string.capwords or std.string.capitalize?

2011-06-13 Thread Andrei Alexandrescu
On 6/13/11 4:23 AM, Jonathan M Davis wrote: I have a hard time believing that std.string.capwords or std.string.captitalize are actually used much. It just doesn't seem to me like they would be generally useful functions. They're far too specific in what they do and aren't flexible enough. And if

Re: Dynamic loading of shared libraries.

2011-06-13 Thread Andrei Alexandrescu
On 6/13/11 4:27 AM, Jens Mueller wrote: Steve Teale wrote: Can DMD D2/Linux do this yet? dmd can't do it yet. But if all you want is to link a against a shared library you can try the following: 1. Create a shared library $ gcc -m64 -fPIC -shared shared.c -o libshared.so 2. Building (without

Re: Fixing the imaginary/complex mess

2011-06-13 Thread Andrei Alexandrescu
On 6/13/11 6:36 AM, Robert Clipsham wrote: I seemed to think the plan for complex numbers was to do what happened with associative arrays, that is, keep the language syntax, but have the feature implemented in the library. Is this not the case? No, the current vision is to completely replace co

Re: Daniel Murphy (yebblies)

2011-06-13 Thread Andrei Alexandrescu
On 6/13/11 6:43 AM, Robert Clipsham wrote: On 13/06/2011 03:22, Steven Schveighoffer wrote: I just want to say, I'm thoroughly impressed by the speed and effort Daniel Murphy is putting into fixing bugs with the compiler. Not to mention, he is closing already fixed bugs (an important, but tediou

Re: Does anyone actually use std.string.capwords or std.string.capitalize?

2011-06-13 Thread Adam D. Ruppe
Jonathan M Davis wrote: > Is there anyone on the newsgroup here who actually uses > std.string.capwords or std.string.capitalize? > And if you do, do you use them often? I use capitalize from time to time. It seems to work well enough. Is there really a need to break people's code every other da

Re: Daniel Murphy (yebblies)

2011-06-13 Thread Robert Clipsham
On 13/06/2011 14:39, Andrei Alexandrescu wrote: Walter is continuously working on improving speed of pull request integration. The bottleneck right now is the compiler test suite, which takes hours to run. Andrei Is there some way we could speed this up? Obviously it can't be run for multiple

Re: Dynamic loading of shared libraries.

2011-06-13 Thread Robert Clipsham
On 13/06/2011 14:32, Andrei Alexandrescu wrote: Two questions - first, what steps do we need to take to convince the linker call from within dmd to work as above? Second, how about the converse - loading a shared library from a program written in either C or D? I was under the impression that

Re: Daniel Murphy (yebblies)

2011-06-13 Thread Timon Gehr
Robert Clipsham wrote: > On 13/06/2011 14:39, Andrei Alexandrescu wrote: >> Walter is continuously working on improving speed of pull request >> integration. The bottleneck right now is the compiler test suite, which >> takes hours to run. >> >> Andrei > > Is there some way we could speed this up?

Re: Improvements to std.string

2011-06-13 Thread Michael Chen
I vote for the changes. They are better name for newbies like me. On Mon, Jun 13, 2011 at 9:29 AM, Adam D. Ruppe wrote: > Jonathan M Davis wrote: >> Would it be better to rename toStringz to toCString when fixing it > > I think it should stay just how it is: toStringz, with a lowercase > z. > > T

Re: Does anyone actually use std.string.capwords or std.string.capitalize?

2011-06-13 Thread Andrej Mitrovic
On 6/13/11, Adam D. Ruppe wrote: > Jonathan M Davis wrote: >> Is there anyone on the newsgroup here who actually uses >> std.string.capwords or std.string.capitalize? >> And if you do, do you use them often? > > I use capitalize from time to time. It seems to work well enough. > > > Is there reall

Re: Fixing the imaginary/complex mess

2011-06-13 Thread Lars T. Kyllingstad
On Mon, 13 Jun 2011 08:36:32 -0500, Andrei Alexandrescu wrote: > On 6/13/11 6:36 AM, Robert Clipsham wrote: >> I seemed to think the plan for complex numbers was to do what happened >> with associative arrays, that is, keep the language syntax, but have >> the feature implemented in the library. I

safe

2011-06-13 Thread sclytrack
How safe is "safe D" to run on your computer as if it is a client application. Let's say you want something like this. 1) The source is compared to the local one on the current disk. If the remote version is newer the new version is downloaded. 2) The source gets compiled and then executed in s

Broken link

2011-06-13 Thread Kai Meyer
On the main page: http://www.d-programming-language.org/index.html Click on "Howtos" in the left menu. That takes you to the first howto: http://www.d-programming-language.org/windows.html Then the Howto link called "Port­ing to 64 Bits" is broken: http://www.d-programming-language.org/32-64-por

Re: Dynamic loading of shared libraries.

2011-06-13 Thread Jens Mueller
Andrei Alexandrescu wrote: > On 6/13/11 4:27 AM, Jens Mueller wrote: > >Steve Teale wrote: > >>Can DMD D2/Linux do this yet? > > > >dmd can't do it yet. But if all you want is to link a against a shared > >library you can try the following: > > > >1. Create a shared library > >$ gcc -m64 -fPIC -sha

Re: safe

2011-06-13 Thread Jesse Phillips
sclytrack Wrote: > > How safe is "safe D" to run on your computer as if it is a client application. > > Let's say you want something like this. > > 1) The source is compared to the local one on the current disk. If the remote > version > is newer the new version is downloaded. > > 2) The sourc

Re: Does anyone actually use std.string.capwords or std.string.capitalize?

2011-06-13 Thread Jonathan M Davis
On 2011-06-13 07:07, Adam D. Ruppe wrote: > Jonathan M Davis wrote: > > Is there anyone on the newsgroup here who actually uses > > std.string.capwords or std.string.capitalize? > > And if you do, do you use them often? > > I use capitalize from time to time. It seems to work well enough. > > >

Re: Fixing the imaginary/complex mess

2011-06-13 Thread Lars T. Kyllingstad
On Mon, 13 Jun 2011 14:51:52 +, Lars T. Kyllingstad wrote: > On Mon, 13 Jun 2011 08:36:32 -0500, Andrei Alexandrescu wrote: > >> A complex() convenience function should be useful. If anyone has the >> time, please create a pull request. [...] > > Sure, I'll add complex(). As promised: https

Re: safe

2011-06-13 Thread Jonathan M Davis
On 2011-06-13 08:02, sclytrack wrote: > How safe is "safe D" to run on your computer as if it is a client > application. > > Let's say you want something like this. > > 1) The source is compared to the local one on the current disk. If the > remote version > is newer the new version is downloaded

Re: Does anyone actually use std.string.capwords or std.string.capitalize?

2011-06-13 Thread Andrej Mitrovic
It looks like people have reimplemented capitalize in some libs: D:\dev\lib\D\boxen\src\xf\utils\CT.d:25:pragma(ctfe) char[] capitalize(char[] name) { D:\dev\lib\D\boxen\src\xf\xpose2\MiniD.d:51:pragma(ctfe) private char[] capitalizeFirst(char[] str) { D:\dev\lib\D\boxen\src\xf\xpose2\MiniD.d:62:

Re: Does anyone actually use std.string.capwords or std.string.capitalize?

2011-06-13 Thread Jonathan M Davis
On 2011-06-13 08:50, Andrej Mitrovic wrote: > It looks like people have reimplemented capitalize in some libs: > > D:\dev\lib\D\boxen\src\xf\utils\CT.d:25:pragma(ctfe) char[] > capitalize(char[] name) { > D:\dev\lib\D\boxen\src\xf\xpose2\MiniD.d:51:pragma(ctfe) private > char[] capitalizeFirst(cha

Re: Does anyone actually use std.string.capwords or std.string.capitalize?

2011-06-13 Thread Jonathan M Davis
On 2011-06-13 08:56, Jonathan M Davis wrote: > On 2011-06-13 08:50, Andrej Mitrovic wrote: > > It looks like people have reimplemented capitalize in some libs: > > > > D:\dev\lib\D\boxen\src\xf\utils\CT.d:25:pragma(ctfe) char[] > > capitalize(char[] name) { > > D:\dev\lib\D\boxen\src\xf\xpose2\Min

Re: Dynamic loading of shared libraries.

2011-06-13 Thread Andrei Alexandrescu
On 6/13/11 10:33 AM, Jens Mueller wrote: Andrei Alexandrescu wrote: On 6/13/11 4:27 AM, Jens Mueller wrote: Steve Teale wrote: Can DMD D2/Linux do this yet? dmd can't do it yet. But if all you want is to link a against a shared library you can try the following: 1. Create a shared library $

Re: Daniel Murphy (yebblies)

2011-06-13 Thread Andrei Alexandrescu
On 6/13/11 9:12 AM, Robert Clipsham wrote: On 13/06/2011 14:39, Andrei Alexandrescu wrote: Walter is continuously working on improving speed of pull request integration. The bottleneck right now is the compiler test suite, which takes hours to run. Andrei Is there some way we could speed this

Re: Does anyone actually use std.string.capwords or std.string.capitalize?

2011-06-13 Thread Andrej Mitrovic
On 6/13/11, Jonathan M Davis wrote: > Well, capwords is not something you're likely to find implementations of by > grepping, since the name has a good chance of being different. But > regardless, > I find it much easier to believe that someone is using capitalize than > capwords, particularly sin

Re: Daniel Murphy (yebblies)

2011-06-13 Thread Andrej Mitrovic
How do you run the DMD unittests, is it just "make -fwin32.mak debdmd" ? I'd like to test it on my hardware.

Re: safe

2011-06-13 Thread bearophile
sclytrack: > How safe is "safe D" to run on your computer as if it is a client application. Walter (I think) has decided to call it "Safe D", but a better name is "memory safe D" because it describes better that it gives only a specialized kind of safety. Bye, bearophile

Re: Does anyone actually use std.string.capwords or

2011-06-13 Thread bearophile
Jonathan M Davis: > But there are a number of functions in > std.string which at least _look_ like their of limited usefulness, and if > they're really not used, then they shouldn't be there. What functions? (I think in Python I have used capitalize only once so far.) Bye, bearophile

Re: Fixing the imaginary/complex mess

2011-06-13 Thread bearophile
Andrei: > Walter wants to keep the "i" postfix as a hack, but I think > that's completely unnecessary. Before deciding I'd like to know the rationale to keep it. In principle I like handy complex number literals. In practice I don't use them often enough... Another note: I'd like std.math.abs

Re: No fall-through for switch (WAS: Re: [Submission] D Slices)

2011-06-13 Thread bearophile
Andrej Mitrovic: > Hey I've just realized something (well, it was in the docs, doh!), we > can use already use "switch case;" to fallthrough to the next label > without explicitly using goto: > > void main() > { > int x = 2; > switch (x) > { > case 2: > goto case;

Re: safe

2011-06-13 Thread Adam D. Ruppe
sclytrack wrote: > Like a replacement for HTML5 and javascript. You *could* make this work, but the language itself won't help you. There's two approaches: a) Run the code on your server and only output the display on the client's computer. Like an X11 application. http://en.wikipedia.org/wik

Re: Flag proposal

2011-06-13 Thread bearophile
Andrei: > If we all get convinced that named parameters are worth it, I think this is not going to happen because some people (two?) don't want this feature. I am for it, if it's well implemented. The reordering is one important part of this feature. An optional sub-feature is a way to depreca

Re: No fall-through for switch (WAS: Re: [Submission] D Slices)

2011-06-13 Thread Andrej Mitrovic
Yeah I'd rather have it be something like "goto next", but then this steals another keyword. Anyway you can always be explicit with your gotos if you want readability.

Re: TempAlloc Overhaul

2011-06-13 Thread bearophile
Walter: > bearophile, some way in which you are replying causes Thunderbird to lose > track > of the thread you are replying to, and starts a new thread. I know... and I am sorry (The cause is me that I want to the web interface, and because it is buggy, it breaks the threads very easily). By

Re: Dynamic loading of shared libraries.

2011-06-13 Thread Jens Mueller
Andrei Alexandrescu wrote: > On 6/13/11 10:33 AM, Jens Mueller wrote: > >Andrei Alexandrescu wrote: > >>On 6/13/11 4:27 AM, Jens Mueller wrote: > >>>Steve Teale wrote: > Can DMD D2/Linux do this yet? > >>> > >>>dmd can't do it yet. But if all you want is to link a against a shared > >>>library

Re: Struct Interface Implementation?

2011-06-13 Thread Max Klyga
On 2011-06-13 06:21:47 +0300, Mehrdad said: Yeah I was referring to something similar to what C# has (aside from the lack of boxing). On 6/12/2011 6:46 PM, Andrei Alexandrescu wrote: On 6/12/11 8:28 PM, Jonathan M Davis wrote: They aren't virtual. For an interface to work, it has to be virtu

Re: Does anyone actually use std.string.capwords or

2011-06-13 Thread Jonathan M Davis
On 2011-06-13 09:55, bearophile wrote: > Jonathan M Davis: > > But there are a number of functions in > > std.string which at least _look_ like their of limited usefulness, and if > > they're really not used, then they shouldn't be there. > > What functions? > > (I think in Python I have used cap

Re: safe

2011-06-13 Thread Jonathan M Davis
On 2011-06-13 09:57, bearophile wrote: > sclytrack: > > How safe is "safe D" to run on your computer as if it is a client > > application. > > Walter (I think) has decided to call it "Safe D", but a better name is > "memory safe D" because it describes better that it gives only a > specialized kin

Re: Daniel Murphy (yebblies)

2011-06-13 Thread Russel Winder
On Mon, 2011-06-13 at 14:41 +, Timon Gehr wrote: > Robert Clipsham wrote: > > On 13/06/2011 14:39, Andrei Alexandrescu wrote: > >> Walter is continuously working on improving speed of pull request > >> integration. The bottleneck right now is the compiler test suite, which > >> takes hours to r

Re: Daniel Murphy (yebblies)

2011-06-13 Thread Walter Bright
On 6/12/2011 7:22 PM, Steven Schveighoffer wrote: I just want to say, I'm thoroughly impressed by the speed and effort Daniel Murphy is putting into fixing bugs with the compiler. Not to mention, he is closing already fixed bugs (an important, but tedious task). Bravo, Daniel! I agree. Other p

fiber local storage

2011-06-13 Thread SK
Not available yet, but Intel announced support for manipulating FS and GS in user mode. Protection for fiber local storage is one use case. http://software.intel.com/file/36945

Re: Daniel Murphy (yebblies)

2011-06-13 Thread Daniel Murphy
"Steven Schveighoffer" wrote in message news:op.vwzsvfkyeav7ka@localhost.localdomain... >I just want to say, I'm thoroughly impressed by the speed and effort >Daniel Murphy is putting into fixing bugs with the compiler. Not to >mention, he is closing already fixed bugs (an important, but tedio

any way to prevent overriding of .init ?

2011-06-13 Thread Dmitry Olshansky
Right now there are lot of Phobos functionality that fully expects A.init to return just that - a default initialized value of type A. Now consider: struct A { int i; void init(int K) { //blah } } Then: map!"a.i"([A(1), A(2), A(3)]); for me explodes with : std\algorithm

Re: Daniel Murphy (yebblies)

2011-06-13 Thread kenji hara
I am interested in more proper language features to implement. Github is good tool for contributing to D community. Kenji Hara (9rnsr) 2011/6/14 Walter Bright : > On 6/12/2011 7:22 PM, Steven Schveighoffer wrote: >> >> I just want to say, I'm thoroughly impressed by the speed and effort >> Daniel

Re: imports in functions

2011-06-13 Thread Andrej Mitrovic
I'm having some fun with this. import std.array; void main() { with (namespace!("std.stdio std.algorithm std.range")) { auto squares = map!("a * a")([2, 4, 6]); writeln(squares); } } template namespace(string x) { mixin(namespaceImpl(x)); } string namespaceImpl(s

Re: imports in functions

2011-06-13 Thread Andrej Mitrovic
Btw, it's disappointing that I can't call split with a separator at compile-time: enum result = split("bla, bla"); // ok enum result = split("bla, bla", ","); // nope

Re: any way to prevent overriding of .init ?

2011-06-13 Thread Andrej Mitrovic
I'm having the same issue with a COM interface that happens to define an init method. I've used a COM object inside a struct and used the 'alias this' trick to forward all calls, but for init I had to create a special 'initialize' method in the struct that would call the COM object's init method ex

Re: any way to prevent overriding of .init ?

2011-06-13 Thread Jonathan M Davis
On 2011-06-13 12:50, Dmitry Olshansky wrote: > Right now there are lot of Phobos functionality that fully expects > A.init to return just that - a default initialized value of type A. > > Now consider: > struct A > { > int i; > void init(int K) > { > //blah > } > } >

Re: any way to prevent overriding of .init ?

2011-06-13 Thread Dmitry Olshansky
On 14.06.2011 0:03, Jonathan M Davis wrote: On 2011-06-13 12:50, Dmitry Olshansky wrote: Right now there are lot of Phobos functionality that fully expects A.init to return just that - a default initialized value of type A. Now consider: struct A { int i; void init(int K) {

Re: any way to prevent overriding of .init ?

2011-06-13 Thread Jonathan M Davis
On 2011-06-13 13:06, Dmitry Olshansky wrote: > On 14.06.2011 0:03, Jonathan M Davis wrote: > > On 2011-06-13 12:50, Dmitry Olshansky wrote: > >> Right now there are lot of Phobos functionality that fully expects > >> A.init to return just that - a default initialized value of type A. > >> > >> Now

Re: imports in functions

2011-06-13 Thread KennyTM~
On Jun 14, 11 03:55, Andrej Mitrovic wrote: Btw, it's disappointing that I can't call split with a separator at compile-time: enum result = split("bla, bla"); // ok enum result = split("bla, bla", ","); // nope That's due to (at least) http://d.puremagic.com/issues/show_bug.cgi?id=4047.

Re: Flag proposal

2011-06-13 Thread Nick Sabalausky
"bearophile" < bearophileh...@lycos.com> wrote in message news:it5gqj$a1g$1...@digitalmars.com... > Andrei: > >> If we all get convinced that named parameters are worth it, > > I think this is not going to happen because some people (two?) don't want > this feature. > > I am for it, if it's well

Re: Flag proposal

2011-06-13 Thread Nick Sabalausky
"Andrei Alexandrescu" wrote in message news:it3ne2$1g2f$1...@digitalmars.com... > On 6/12/11 2:19 PM, Nick Sabalausky wrote: >> "Andrei Alexandrescu" wrote in message >> news:it32j8$2gfq$1...@digitalmars.com... >>> On 6/12/11 1:45 PM, Nick Sabalausky wrote: "Andrei Alexandrescu" wrote in

Re: Flag proposal

2011-06-13 Thread Andrei Alexandrescu
On 6/13/11 4:02 PM, Nick Sabalausky wrote: "Andrei Alexandrescu" wrote in message news:it3ne2$1g2f$1...@digitalmars.com... That actually does help, but not for enums used by more than one function. The other issues remain too. I would think that an enum used by more than one function *should

Re: Flag proposal

2011-06-13 Thread Timon Gehr
> On 6/13/11 4:02 PM, Nick Sabalausky wrote: >> "Andrei Alexandrescu" wrote in message >> news:it3ne2$1g2f$1...@digitalmars.com... >>> That actually does help, but not for enums used by more than one function. >>> The other issues remain too. >>> >> >> I would think that an enum used by more than

Re: safe

2011-06-13 Thread filgood
Hi Adam, Were you in the past not working on a Gui lib that did an a) type of thing? IFAIR, The app ran on the server, the gui was on the client. Someone could (via a client) connect to the app on the server, but have it displayed locally? ~ filgood On 13/06/2011 18:15, Adam D. Ruppe wrote

Re: safe

2011-06-13 Thread Adam Ruppe
> Were you in the past not working on a Gui lib that did an a) type of > thing? Yes. It's still something I'm very slowly working on, but with my web app based day job taking up so much time it hasn't had any new code for months now... But yeah, it'd run on a server and you display it locally. Yo

turtles features (Was: Flag proposal)

2011-06-13 Thread Timon Gehr
Andrei Alexandrescu wrote: > module my_module; > > void fun() > { > import std.random; > return uniform(0, 100); > } > > int gun() > { > import std.stdio; > writeln(fun()); > } > > This module won't compile in today's D, but not for a matter of > principles; it's just a random l

Re: Dynamic loading of shared libraries.

2011-06-13 Thread Brad Roberts
On Mon, 13 Jun 2011, Jens Mueller wrote: > There have been some posts regarding support for shared libraries. On > top of my head there we're at least 5 things that need to be done to get > it working. > $ dmd -m64 -L-shared shared.d -oflibshared.so > /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4

Re: turtles features (Was: Flag proposal)

2011-06-13 Thread bearophile
Timon Gehr: > Will this be fixed too? Mutually recursive inner functions are not so common, and there is a workaround, making one of them a delegate defined before. But what about this? auto foo()() out(result) { } body { return 0; } void main() { foo(); } test.d(1): Error: function

Rename std.ctype to std.ascii?

2011-06-13 Thread Jonathan M Davis
std.ctype is modeled after C's ctype.h. It has functions for operating on characters - particularly functions which indicate the type of a character (I believe that ctype stands for character type, so that makes sense). For instance, isdigit will tell you whether a particular character is a digi

Re: Flag proposal

2011-06-13 Thread so
On Mon, 13 Jun 2011 20:19:15 +0300, bearophile < wrote: Andrei: If we all get convinced that named parameters are worth it, I think this is not going to happen because some people (two?) don't want this feature. I think they worth it and it is the right time to talk extensively why

Re: Rename std.ctype to std.ascii?

2011-06-13 Thread Jose Armando Garcia
On Mon, Jun 13, 2011 at 10:28 PM, Jonathan M Davis wrote: > std.ctype is modeled after C's ctype.h. It has functions for operating on > characters - particularly functions which indicate the type of a character (I > believe that ctype stands for character type, so that makes sense). For > instance

Re: Flag proposal

2011-06-13 Thread Ary Manzana
On 6/14/11 8:36 AM, so wrote: On Mon, 13 Jun 2011 20:19:15 +0300, bearophile < wrote: Andrei: If we all get convinced that named parameters are worth it, I think this is not going to happen because some people (two?) don't want this feature. I think they worth it and it is the right time

Re: Rename std.ctype to std.ascii?

2011-06-13 Thread Jonathan M Davis
On 2011-06-13 18:43, Jose Armando Garcia wrote: > On Mon, Jun 13, 2011 at 10:28 PM, Jonathan M Davis wrote: > > std.ctype is modeled after C's ctype.h. It has functions for operating on > > characters - particularly functions which indicate the type of a > > character (I believe that ctype stands

Re: Flag proposal

2011-06-13 Thread so
On Tue, 14 Jun 2011 04:46:54 +0300, Ary Manzana wrote: On 6/14/11 8:36 AM, so wrote: On Mon, 13 Jun 2011 20:19:15 +0300, bearophile < wrote: Andrei: If we all get convinced that named parameters are worth it, I think this is not going to happen because some people (two?) don't want th

Re: Rename std.ctype to std.ascii?

2011-06-13 Thread Andrej Mitrovic
I'm all for it. I've never liked ctype, and I got lost trying to find ascii functions since I didn't know where to look. The first time I saw ctype I thought it was a collection of C type aliases.. heh.

Re: Rename std.ctype to std.ascii?

2011-06-13 Thread Andrej Mitrovic
Come to think of it, I think I had a note in a todo somewhere that said "post a feature request to change ctype to ascii". It's a good standard name.

Re: imports in functions

2011-06-13 Thread Andrej Mitrovic
Walter, it looks like this addition inadvertently fixes the issue of DLLs not linkable due to Phobos imports. I've had this DLL (alongside with dllmodule.d which had initialization calls inside DLLMain): module EdrLib; import std.utf; pragma(lib, "gdi32.lib"); pragma(lib, "comdlg32.lib"); import

Re: imports in functions

2011-06-13 Thread Brad Roberts
On 6/13/2011 8:28 PM, Andrej Mitrovic wrote: > Walter, it looks like this addition inadvertently fixes the issue of > DLLs not linkable due to Phobos imports. > > I've had this DLL (alongside with dllmodule.d which had initialization > calls inside DLLMain): > module EdrLib; > > import std.utf; >

Re: imports in functions

2011-06-13 Thread Andrej Mitrovic
When I add module ctors/dtors, I get the ModuleInfoZ shenanigans again.

Re: imports in functions

2011-06-13 Thread Andrej Mitrovic
And they do run, I've tested it in a non-DLL example.

Re: imports in functions

2011-06-13 Thread Andrej Mitrovic
I'm guessing this is what you're after: http://codepad.org/TCtG68Fw http://codepad.org/65GBDjPS rdmd main.d shared ctor! ctor! foo.test dtor! shared dtor!

Re: imports in functions

2011-06-13 Thread Andrej Mitrovic
Should DLLs even have module ctors/dtors? I think this is what DLLMain's DLL_PROCESS_ATTACH, DLL_THREAD_ATTACH and their detach counterparts are for.

Re: imports in functions

2011-06-13 Thread Brad Roberts
On 6/13/2011 8:48 PM, Andrej Mitrovic wrote: > I'm guessing this is what you're after: > > http://codepad.org/TCtG68Fw > http://codepad.org/65GBDjPS > > rdmd main.d > shared ctor! > ctor! > foo.test > dtor! > shared dtor! Actually, not what I was thinking. I was thinking something like this: f

Re: imports in functions

2011-06-13 Thread Andrej Mitrovic
Well it seems to work fine. :)

Re: safe

2011-06-13 Thread sclytrack
== Quote from filgood (filg...@somewhere.net)'s article > Hi Adam, > Were you in the past not working on a Gui lib that did an a) type of thing? > IFAIR, The app ran on the server, the gui was on the client. Someone > could (via a client) connect to the app on the server, but have it > displayed lo

What remains to be done for D2?

2011-06-13 Thread Petr Janda
Hi, Can someone please explain what needs to be done (other than fixing the plethora of bugs) to call D2 final? And if someone can provide an approximate estimate of when? I would like to switch majority of my programming from C++ to D2 but the number of bugs and uncertainty of how exactly will n

Re: What remains to be done for D2?

2011-06-13 Thread Nick Sabalausky
"Petr Janda" wrote in message news:it6npg$6l8$1...@digitalmars.com... > > Also, how much slower is D2 compared to C++? Will D2 final have > comparable performance? > D2 already has comparable performance to C++. And various things like built-in slices and good metaprogramming make it easier to

Re: What remains to be done for D2?

2011-06-13 Thread Nick Sabalausky
"Petr Janda" wrote in message news:it6npg$6l8$1...@digitalmars.com... > Hi, > > Can someone please explain what needs to be done (other than fixing > the plethora of bugs) to call D2 final? And if someone can provide > an approximate estimate of when? > I already find D2, even with occasional bu

Re: Flag proposal

2011-06-13 Thread Nick Sabalausky
"so" wrote in message news:op.vw1msqy0mpw3zg@so-pc... > On Tue, 14 Jun 2011 04:46:54 +0300, Ary Manzana > wrote: > >> On 6/14/11 8:36 AM, so wrote: >>> On Mon, 13 Jun 2011 20:19:15 +0300, bearophile < >>> wrote: >>> Andrei: > If we all get convinced that named parameters are worth

Re: What remains to be done for D2?

2011-06-13 Thread Daniel Gibson
Am 14.06.2011 07:24, schrieb Nick Sabalausky: > "Petr Janda" wrote in message > news:it6npg$6l8$1...@digitalmars.com... >> Hi, >> >> Can someone please explain what needs to be done (other than fixing >> the plethora of bugs) to call D2 final? And if someone can provide >> an approximate estimate

Re: Rename std.ctype to std.ascii?

2011-06-13 Thread Jouko Koski
"Jonathan M Davis" wrote: std.ctype is modeled after C's ctype.h. It has functions for operating on characters - particularly functions which indicate the type of a character (I believe that ctype stands for character type, so that makes sense). For instance, isdigit will tell you whether a p

Re: Flag proposal

2011-06-13 Thread so
On Tue, 14 Jun 2011 08:32:59 +0300, Nick Sabalausky wrote: I think Ary's suggestion is very simple and easy to understand. Hybrid calls are *only* confusing when an unnamed parameter comes after a named one. An example to it. fun(int a, int b, int c, int d) Say we want to name only c: fu

Re: Flag proposal

2011-06-13 Thread KennyTM~
On Jun 14, 11 09:36, so wrote: On Mon, 13 Jun 2011 20:19:15 +0300, bearophile < wrote: Andrei: If we all get convinced that named parameters are worth it, I think this is not going to happen because some people (two?) don't want this feature. I think they worth it and it is the right tim

Re: Rename std.ctype to std.ascii?

2011-06-13 Thread Jonathan M Davis
On 2011-06-13 22:48, Jouko Koski wrote: > "Jonathan M Davis" wrote: > > std.ctype is modeled after C's ctype.h. It has functions for operating on > > characters - particularly functions which indicate the type of a > > character (I > > believe that ctype stands for character type, so that makes se

Re: Flag proposal

2011-06-13 Thread Ary Manzana
On 6/14/11 12:58 PM, so wrote: On Tue, 14 Jun 2011 08:32:59 +0300, Nick Sabalausky wrote: I think Ary's suggestion is very simple and easy to understand. Hybrid calls are *only* confusing when an unnamed parameter comes after a named one. An example to it. fun(int a, int b, int c, int d) S

Re: Dynamic loading of shared libraries.

2011-06-13 Thread Jens Mueller
Brad Roberts wrote: > On Mon, 13 Jun 2011, Jens Mueller wrote: > > > There have been some posts regarding support for shared libraries. On > > top of my head there we're at least 5 things that need to be done to get > > it working. > > $ dmd -m64 -L-shared shared.d -oflibshared.so > > /usr/bin/ld:

Re: Flag proposal

2011-06-13 Thread so
On Tue, 14 Jun 2011 09:33:54 +0300, Ary Manzana wrote: On 6/14/11 12:58 PM, so wrote: On Tue, 14 Jun 2011 08:32:59 +0300, Nick Sabalausky wrote: I think Ary's suggestion is very simple and easy to understand. Hybrid calls are *only* confusing when an unnamed parameter comes after a named

Re: Flag proposal

2011-06-13 Thread so
On Tue, 14 Jun 2011 09:18:42 +0300, KennyTM~ wrote: I'd rather have no reordering and allow hybrid call. Named argument is useful for specifying the nature of an argument. If the type is clear for all but one argument, the rest is just noisy redundant info. fun(bool, bool, bool, bool, bool

  1   2   >