Re: newbie -- how to build module?

2012-02-13 Thread Mantis
13.02.2012 9:45, Alf P. Steinbach пишет: I first started with a Windows message box program and installing an IDE. I'm now using the VisualD plug-in with the Visual Studio 10 Shell, after battling a bit with installation of service pack 1 for Visual Studio. VisualD works, sort of, except the

Re: newbie -- how to build module?

2012-02-13 Thread Mantis
13.02.2012 10:16, Mantis ?: ...snip... What is unicode_based_api file? I don't see it in core.sys.windows: http://github.com/D-Programming-Language/druntime/tree/master/src/core/sys/windows Oh, I guess I understand what you're trying to do. IIRC, druntime source files get compiled into

I want to give the D project a billion dollars

2012-02-13 Thread Adam
a zillion.. any amount. just bring her back. I am not vacuous, I will get it. Now you bring her back, that is an order

Re: I want to give the D project a billion dollars

2012-02-13 Thread James Miller
On 13 February 2012 21:44, Adam adaprogram...@usenet.net wrote: a zillion.. any amount. just bring her back. I am not vacuous, I will get it. Now you bring her back, that is an order Adam, what is your purpose here? You have done little but post irrelevant nonsense on threads. I understand that

Re: newbie -- how to build module?

2012-02-13 Thread Walter Bright
On 2/12/2012 11:45 PM, Alf P. Steinbach wrote: Anyway, I haven't yet started delving into the language documentation or any tutorials, just used gut-feeling, so I'd appreciate discussion of how to make this my first D console program less non-idiomatic g: code import std.stdio; import

Re: Carmack about static analysis

2012-02-13 Thread James Miller
I find that dynamic typing is useful sometimes and static typing other times. Certainly dynamic (duck) typing is useful for scripts and similar, and static typing is certainly better for writing code that is especially picky about its values. I liken it to the way I write code in PHP, the

Re: newbie -- how to build module?

2012-02-13 Thread James Miller
Somewhat off topic, but Alf, I have noticed you posting a few times, I think newbie questions are better suited to the digitalmars.D.learn mailing list. Thanks James Miller

Re: newbie -- how to build module?

2012-02-13 Thread Alf P. Steinbach
On 13.02.2012 12:48, James Miller wrote: Somewhat off topic, but Alf, I have noticed you posting a few times, Uhm, 2 times. I think newbie questions are better suited to the digitalmars.D.learn mailing list. I am sure that if but the right mindset was brought to bear, the D community and

Re: Changeing return type of struct.toString()

2012-02-13 Thread Stewart Gordon
On 13/02/2012 02:21, Don wrote: snip I don't know why struct toString() still exists. snip What are you talking about? If you define a struct, it doesn't have any methods other than the ones you put into it. Stewart.

Re: newbie -- how to build module?

2012-02-13 Thread Alf P. Steinbach
On 13.02.2012 10:33, Walter Bright wrote: On 2/12/2012 11:45 PM, Alf P. Steinbach wrote: Anyway, I haven't yet started delving into the language documentation or any tutorials, just used gut-feeling, so I'd appreciate discussion of how to make this my first D console program less non-idiomatic

Re: newbie -- how to build module?

2012-02-13 Thread David Nadlinger
On 2/13/12 1:13 PM, Alf P. Steinbach wrote: I am sure that if but the right mindset was brought to bear, the D community and in particular those with some responsibility for the toolset and language, could learn as much from my current 2 postings as I am learning about the tools and language.

The One-Letter Nested Function - a sample article for some kind of D gems website

2012-02-13 Thread Zach the Mystic
I wrote this article because I felt like helping other people coming to D, but I'm not sure where the appropriate place to make such a contribution is. Maybe a Learning Articles or an Idioms section. The One-Letter Nested Function As a programmer new to D I wanted to share an idiom I've been

Disabling copy constructor in shared structs

2012-02-13 Thread Artur Skawina
Using @disable this(this); in structs marked as shared does not appear to be possible; shared alone works, just @disable this(this); works too, but both together result in compile failures with cryptic error messages about 'this', like wrong type. not mutable or not an lvalue, usually without

Re: The One-Letter Nested Function - a sample article for some kind of D gems website

2012-02-13 Thread Andrej Mitrovic
With 2.058 the single-letter function can become: auto u = (int a, int b) = cast(ubyte)uniform(a, b); It's not much of savings in typing. The only problem is I can't seem to make it static: static u = (int a, int b) = cast(ubyte)uniform(a, b); Error: non-constant nested delegate literal

Re: Changeing return type of struct.toString()

2012-02-13 Thread Benjamin Thaut
Am 13.02.2012 13:26, schrieb Stewart Gordon: On 13/02/2012 02:21, Don wrote: snip I don't know why struct toString() still exists. snip What are you talking about? If you define a struct, it doesn't have any methods other than the ones you put into it. Stewart. import std.stdio; struct

Re: The One-Letter Nested Function - a sample article for some kind of D gems website

2012-02-13 Thread David Nadlinger
On 2/13/12 2:43 PM, Andrej Mitrovic wrote: auto u = (a, b) = cast(ubyte)uniform(a, b); Which would make 'u' a template. I'm not sure what the exact syntax was that was requested though. This could never work without major changes to the language, because 'u' cannot be assigned a type.

Re: The One-Letter Nested Function - a sample article for some kind of

2012-02-13 Thread bearophile
Zach the Mystic: void setRandomColorPair( ref ColorPair cp ) { import std.random; ubyte u(int a, int b) { return cast(ubyte) uniform(a,b); } Where possible it's good to add static to nested functions: static ubyte u(in int a, in int b) pure nothrow { return cast(ubyte)

Re: newbie -- how to build module?

2012-02-13 Thread Alf P. Steinbach
On 13.02.2012 13:50, David Nadlinger wrote: On 2/13/12 1:13 PM, Alf P. Steinbach wrote: I am sure that if but the right mindset was brought to bear, the D community and in particular those with some responsibility for the toolset and language, could learn as much from my current 2 postings as I

Re: The One-Letter Nested Function - a sample article for some kind of D gems website

2012-02-13 Thread Andrej Mitrovic
On 2/13/12, David Nadlinger s...@klickverbot.at wrote: This could never work without major changes to the language, because 'u' cannot be assigned a type. Yeah, the syntax is wrong. I found bear's post and the syntax: alias (x = x ^^ 2) sqrTemplate; So it would be: alias ((a, b) =

Re: Changeing return type of struct.toString()

2012-02-13 Thread Steven Schveighoffer
On Mon, 13 Feb 2012 08:40:20 -0500, Benjamin Thaut c...@benjamin-thaut.de wrote: Am 13.02.2012 13:26, schrieb Stewart Gordon: On 13/02/2012 02:21, Don wrote: snip I don't know why struct toString() still exists. snip What are you talking about? If you define a struct, it doesn't have any

Re: Changeing return type of struct.toString()

2012-02-13 Thread Benjamin Thaut
Am 13.02.2012 15:23, schrieb Steven Schveighoffer: On Mon, 13 Feb 2012 08:40:20 -0500, Benjamin Thaut c...@benjamin-thaut.de wrote: Am 13.02.2012 13:26, schrieb Stewart Gordon: On 13/02/2012 02:21, Don wrote: snip I don't know why struct toString() still exists. snip What are you talking

Re: newbie -- how to build module?

2012-02-13 Thread Iain Buclaw
On 13 February 2012 12:13, Alf P. Steinbach alf.p.steinbach+use...@gmail.com wrote: On 13.02.2012 12:48, James Miller wrote: Somewhat off topic, but Alf, I have noticed you posting a few times, Uhm, 2 times. Right, not a few, but a couple. ;-) -- Iain Buclaw *(p e ? p++ : p) = (c

Re: Changeing return type of struct.toString()

2012-02-13 Thread Steven Schveighoffer
On Mon, 13 Feb 2012 09:41:14 -0500, Benjamin Thaut c...@benjamin-thaut.de wrote: Am 13.02.2012 15:23, schrieb Steven Schveighoffer: That is a legacy feature, back when writefln was a D variadic function (not a template), and all you had was the TypeInfo. It's essentially a hack that the

Re: D-

2012-02-13 Thread Iain Buclaw
On 12 February 2012 17:45, Daniel Murphy yebbl...@nospamgmail.com wrote: Turns out I can't help myself: https://github.com/yebblies/dmd/tree/microd (the makefile changes are win32 only, but aren't very compilcated) It compiles the following into cryptic c full of mangled names just fine:

Re: D-

2012-02-13 Thread Daniel Murphy
Iain Buclaw ibuc...@ubuntu.com wrote in message news:mailman.287.1329145247.20196.digitalmar...@puremagic.com... O_O =) Which bit's making you pull that face? Is it the fact I think it might be a good idea or the fact I think it wouldn't be that hard? It currently can translate: import

Re: The One-Letter Nested Function - a sample article for some kind of D gems website

2012-02-13 Thread Nick Treleaven
On 13/02/2012 14:21, Andrej Mitrovic wrote: On 2/13/12, David Nadlingers...@klickverbot.at wrote: This could never work without major changes to the language, because 'u' cannot be assigned a type. Yeah, the syntax is wrong. I found bear's post and the syntax: alias (x = x ^^ 2)

Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread David Nadlinger
There are several modules in the review queue right now, and to get things going, I have volunteered to manage the review of Jose's std.log proposal. Barring any objections, the review period starts now and ends in three weeks, on March 6th, followed by a week of voting. --- Code:

Re: The One-Letter Nested Function - a sample article for some kind of

2012-02-13 Thread Zach the Mystic
On 2/13/12 9:14 AM, bearophile wrote: Where possible it's good to add static to nested functions: static ubyte u(in int a, in int b) pure nothrow { return cast(ubyte) uniform(a,b); } You're right. The only advantage to the way I wrote it is, possibly, it's easier for new people (like

Re: The One-Letter Nested Function - a sample article for some kindof D gems website

2012-02-13 Thread Daniel Murphy
Andrej Mitrovic andrej.mitrov...@gmail.com wrote in message news:mailman.283.1329140648.20196.digitalmar...@puremagic.com... The only problem is I can't seem to make it static: static u = (int a, int b) = cast(ubyte)uniform(a, b); auto u = function (int a, int b) = cast(ubyte)uniform(a, b);

Re: The One-Letter Nested Function - a sample article for some kind

2012-02-13 Thread bearophile
Zach the Mystic: But I'm pretty sure uniform is NOT a pure function. In fact, generating random numbers is about as far opposite a pure function as you can get, right? :-) Right, and sorry, I didn't see the function contents. If I don't run the D code you have to assume it's wrong code.

Re: The One-Letter Nested Function - a sample article for some kindof D gems website

2012-02-13 Thread David Nadlinger
On 2/13/12 5:17 PM, Daniel Murphy wrote: Andrej Mitrovicandrej.mitrov...@gmail.com wrote in message news:mailman.283.1329140648.20196.digitalmar...@puremagic.com... The only problem is I can't seem to make it static: static u = (int a, int b) = cast(ubyte)uniform(a, b); auto u = function

Re: The One-Letter Nested Function - a sample article for some kind of D gems website

2012-02-13 Thread Andrei Alexandrescu
On 2/13/12 7:46 AM, David Nadlinger wrote: On 2/13/12 2:43 PM, Andrej Mitrovic wrote: auto u = (a, b) = cast(ubyte)uniform(a, b); Which would make 'u' a template. I'm not sure what the exact syntax was that was requested though. This could never work without major changes to the language,

Re: D-

2012-02-13 Thread Iain Buclaw
On 13 February 2012 15:31, Daniel Murphy yebbl...@nospamgmail.com wrote: Iain Buclaw ibuc...@ubuntu.com wrote in message news:mailman.287.1329145247.20196.digitalmar...@puremagic.com... O_O =) Which bit's making you pull that face?  Is it the fact I think it might be a good idea or the fact

Re: The One-Letter Nested Function - a sample article for some kindof D gems website

2012-02-13 Thread Daniel Murphy
David Nadlinger s...@klickverbot.at wrote in message news:jhbdnb$21sb$1...@digitalmars.com... auto u = function (int a, int b) = cast(ubyte)uniform(a, b); Should do it. I know it currently isn't, but shouldn't this be inferred as per TDPL anyway? David Yes, it's just a way to force

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread David Nadlinger
On 2/13/12 4:50 PM, David Nadlinger wrote: https://github.com/jsancio/phobos/commit/d114420e0791c704f6899d81a0293cbd3cc8e6f5 Docs: http://jsancio.github.com/phobos/phobos/std_log.html A few small points from a first pass through the docs: Spelling nits: - potion - position - enviroment -

Re: D-

2012-02-13 Thread Zach the Mystic
On 2/10/12 4:04 PM, Andrei Alexandrescu wrote: The last thing we need is balkanization of the community. You are of course free to initiate such a project but if you care about D it would be great to apply your talent in a different direction. I think this might be going a little bit too far.

Re: D-

2012-02-13 Thread Andrei Alexandrescu
On 2/13/12 10:45 AM, Zach the Mystic wrote: On 2/10/12 4:04 PM, Andrei Alexandrescu wrote: The last thing we need is balkanization of the community. You are of course free to initiate such a project but if you care about D it would be great to apply your talent in a different direction. I

Re: The One-Letter Nested Function - a sample article for some kind

2012-02-13 Thread Zach the Mystic
On 2/13/12 11:21 AM, bearophile wrote: Zach the Mystic: Regarding pure random generators, I have asked it too: http://d.puremagic.com/issues/show_bug.cgi?id=5249 Aren't pure and random diametrically opposed in a fundamental way?

Re: The One-Letter Nested Function - a sample article for some kind

2012-02-13 Thread Iain Buclaw
On 13 February 2012 17:01, Zach the Mystic reachzachatgooglesmailserv...@dot.com wrote: On 2/13/12 11:21 AM, bearophile wrote: Zach the Mystic: Regarding pure random generators, I have asked it too: http://d.puremagic.com/issues/show_bug.cgi?id=5249 Aren't pure and random diametrically

Re: The One-Letter Nested Function - a sample article for some kind

2012-02-13 Thread Timon Gehr
On 02/13/2012 06:01 PM, Zach the Mystic wrote: On 2/13/12 11:21 AM, bearophile wrote: Zach the Mystic: Regarding pure random generators, I have asked it too: http://d.puremagic.com/issues/show_bug.cgi?id=5249 Aren't pure and random diametrically opposed in a fundamental way? They are. It is

Re: D-

2012-02-13 Thread Daniel Murphy
Iain Buclaw ibuc...@ubuntu.com wrote in message news:mailman.288.1329151783.20196.digitalmar...@puremagic.com... It's the fact that it does *nothing* to change code generation, as D code compiles down to the same as C equivalent. Isn't that what a C backend is supposed to do? Code

Re: newbie -- how to build module?

2012-02-13 Thread Andrej Mitrovic
On 2/13/12, Alf P. Steinbach alf.p.steinbach+use...@gmail.com wrote: By the way, I see that the list of functions provided by core.sys.windows.windows is rather short, covering a very small fraction of the API: How would one go about extending that?

Re: D-

2012-02-13 Thread Adam D. Ruppe
On Sunday, 12 February 2012 at 17:45:46 UTC, Daniel Murphy wrote: Turns out I can't help myself: https://github.com/yebblies/dmd/tree/microd hmmm Do you see anything wrong with using a similar strategy to output something like C# or Java? It might be a relatively easy way to get (a

Re: D-

2012-02-13 Thread Zach the Mystic
On 2/13/12 11:54 AM, Andrei Alexandrescu wrote: I just find it difficult to imagine things that way. Tiny devices are confined to small programs by definition, and at that magnitude the field is quite leveled; for a 3K-lines program, C is just fine and many of D's (and other languages')

Re: D-

2012-02-13 Thread Andrei Alexandrescu
On 2/13/12 11:46 AM, Zach the Mystic wrote: On 2/13/12 11:54 AM, Andrei Alexandrescu wrote: I just find it difficult to imagine things that way. Tiny devices are confined to small programs by definition, and at that magnitude the field is quite leveled; for a 3K-lines program, C is just fine

Re: D-

2012-02-13 Thread Paulo Pinto
Am 12.02.2012 15:23, schrieb Nick Sabalausky: Paulo Pintopj...@progtools.org wrote in message news:jh7tvk$29sv$1...@digitalmars.com... So in the end you just get an already existing language, but with different syntax. So it is not worth the effort designing such languages. Where are you

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Jonathan M Davis
On Sunday, February 12, 2012 19:32:28 David Nadlinger wrote: On 2/12/12 7:28 PM, Martin Nowak wrote: The shallow distinction of visibility vs. accessibility breaks the module system because one can't safely add a private symbol without possibly affecting every dependent module. Thus

Re: newbie -- how to build module?

2012-02-13 Thread Rainer Schuetze
Hi, On 13.02.2012 08:45, Alf P. Steinbach wrote: I first started with a Windows message box program and installing an IDE. I'm now using the VisualD plug-in with the Visual Studio 10 Shell, after battling a bit with installation of service pack 1 for Visual Studio. VisualD works, sort of,

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jonathan M Davis
On Monday, February 13, 2012 17:49:49 David Nadlinger wrote: You define the Severity enum members starting with fatal as 0. Why not the other way round – so that severityA severityB would do what you (or at least I) would expect? syslog defines 0 (LOG_EMERG) as the strongest and 7 (LOG_DEBUG)

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Andrej Mitrovic
I'd like to see a simple example of how to specify the filename of the log file.

Re: D-

2012-02-13 Thread Iain Buclaw
On 13 February 2012 17:22, Daniel Murphy yebbl...@nospamgmail.com wrote: Iain Buclaw ibuc...@ubuntu.com wrote in message news:mailman.288.1329151783.20196.digitalmar...@puremagic.com... It's the fact that it does *nothing* to change code generation, as D code compiles down to the same as C

Re: newbie - hey walter, improvement potentials for installer

2012-02-13 Thread Walter Bright
Hi Alf! Welcome! On 2/12/2012 4:02 PM, Alf P. Steinbach wrote: Hi I just installed D 2.x. * Improvement potential #1 -- installer description. It was not clear to me that the first download is a full offline installer. In ignorance I used the one that downloads from web. The web page can

Re: newbie -- how to build module?

2012-02-13 Thread Walter Bright
On 2/13/2012 6:15 AM, Alf P. Steinbach wrote: Are there group charters? Not much beyond the descriptions here: http://digitalmars.com/NewsGroup.html We're pretty informal. As a newbie one tries things and asks about things that a person more accustomed to The Usual Ways(TM) just

D reviews (was: Review of std.log)

2012-02-13 Thread John Arrizza
Fyi In our env we use reviewboard. Its a web based code review tool that works very well for keeping track of reviews, comments, statuses, etc. If you have lots of reviews it speeds things up tremendously. (We have a couple thousand reviews so far) Its available here reviewboard.org. its

Re: Mac OS X 10.5 support

2012-02-13 Thread Sönke Ludwig
Am 09.02.2012 17:20, schrieb Walter Bright: On 2/9/2012 1:37 AM, Sönke Ludwig wrote: I have a project that we actually plan to use in production in the company for which I work. They still require 10.5 support for their products so removing that support would make for a very bad situation

Re: newbie -- how to build module?

2012-02-13 Thread Walter Bright
On 2/13/2012 4:32 AM, Alf P. Steinbach wrote: It's the name of the module generated by the program, just more clean aliases for the Unicode based Windows API functions -- e.g., in C++ one would write `MessageBox`, not `MessageBoxW`, so I alias them. The Windows .h files are set up so that

Re: newbie -- how to build module?

2012-02-13 Thread Bernard Helyer
On Monday, 13 February 2012 at 19:27:39 UTC, Walter Bright wrote: On 2/13/2012 6:15 AM, Alf P. Steinbach wrote: Are there group charters? Not much beyond the descriptions here: http://digitalmars.com/NewsGroup.html We're pretty informal. I read that last word as 'normal' and was about to

Re: Mac OS X 10.5 support

2012-02-13 Thread Walter Bright
On 2/13/2012 11:50 AM, Sönke Ludwig wrote: So either the problem is just a build setup issue or it was something I didn't test (I tested writefln() as in bug 4854). Is there a standard way to build the DMD+druntime+phobos package so I can simulate the original build process? Right now I just

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread jdrewsen
A first quick observation: I vote for a debug severity level. Then make that default to the template parameter for log: template log(Severity severity = Severity.debug) That would make it nice for good old print debugging. log(This is a dbg message); /Jonas

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Sean Kelly
On Feb 13, 2012, at 12:44 PM, jdrewsen wrote: A first quick observation: I vote for a debug severity level. Then make that default to the template parameter for log: template log(Severity severity = Severity.debug) That would make it nice for good old print debugging. I think that's

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Sönke Ludwig
Log levels debug and maybe also trace would be useful, but I see that vlog(n)() is meant for that purpose. I would just prefer explicit names instead of just numbers. Is there a compelling reason why formatted logging is not the default? I find that most logging calls in practice use

Re: newbie -- how to build module?

2012-02-13 Thread Alf P. Steinbach
On 13.02.2012 19:52, Rainer Schuetze wrote: Hi, On 13.02.2012 08:45, Alf P. Steinbach wrote: I first started with a Windows message box program and installing an IDE. I'm now using the VisualD plug-in with the Visual Studio 10 Shell, after battling a bit with installation of service pack 1 for

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread James Miller
On 14 February 2012 10:17, Sönke Ludwig lud...@informatik.uni-luebeck.de wrote: Log levels debug and maybe also trace would be useful, but I see that vlog(n)() is meant for that purpose. I would just prefer explicit names instead of just numbers. Is there a compelling reason why formatted

Re: D reviews (was: Review of std.log)

2012-02-13 Thread Jose Armando Garcia
On Mon, Feb 13, 2012 at 5:54 PM, John Arrizza cppge...@gmail.com wrote:  Fyi In our env we use reviewboard. Its a web based code review tool that works very well for keeping track of reviews, comments, statuses, etc. If you have lots of reviews it speeds things up tremendously. (We have a

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Martin Nowak
On Mon, 13 Feb 2012 19:07:20 +0100, Jonathan M Davis jmdavisp...@gmx.com wrote: On Sunday, February 12, 2012 19:32:28 David Nadlinger wrote: On 2/12/12 7:28 PM, Martin Nowak wrote: The shallow distinction of visibility vs. accessibility breaks the module system because one can't safely

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Jonathan M Davis
On Tuesday, February 14, 2012 00:15:40 Martin Nowak wrote: Can you elaborate on what issues you see with NVI. After all it's only the final public method that needs to call the virtual private methods. As I explain in that bug report, NVI can be acheived with protected rather than private.

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Timon Gehr
On 02/14/2012 12:26 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 00:15:40 Martin Nowak wrote: Can you elaborate on what issues you see with NVI. After all it's only the final public method that needs to call the virtual private methods. As I explain in that bug report, NVI can be

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread so
On Monday, 13 February 2012 at 15:50:05 UTC, David Nadlinger wrote: There are several modules in the review queue right now, and to get things going, I have volunteered to manage the review of Jose's std.log proposal. Barring any objections, the review period starts now and ends in three

Re: D reviews

2012-02-13 Thread David Nadlinger
On 2/14/12 12:14 AM, Jose Armando Garcia wrote: On Mon, Feb 13, 2012 at 5:54 PM, John Arrizzacppge...@gmail.com wrote: In our env we use reviewboard. Its a web based code review tool that works very well for keeping track of reviews, comments, statuses, etc. If you have lots of reviews it

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Jonathan M Davis
On Tuesday, February 14, 2012 00:36:31 Timon Gehr wrote: On 02/14/2012 12:26 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 00:15:40 Martin Nowak wrote: Can you elaborate on what issues you see with NVI. After all it's only the final public method that needs to call the virtual

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Martin Nowak
On Tue, 14 Feb 2012 00:26:14 +0100, Jonathan M Davis jmdavisp...@gmx.com wrote: On Tuesday, February 14, 2012 00:15:40 Martin Nowak wrote: Can you elaborate on what issues you see with NVI. After all it's only the final public method that needs to call the virtual private methods. As I

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Timon Gehr
On 02/14/2012 01:28 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 00:36:31 Timon Gehr wrote: On 02/14/2012 12:26 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 00:15:40 Martin Nowak wrote: Can you elaborate on what issues you see with NVI. After all it's only the final

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Jonathan M Davis
On Tuesday, February 14, 2012 01:55:51 Timon Gehr wrote: On 02/14/2012 01:28 AM, Jonathan M Davis wrote: It would break information hiding. A private method declared in a different module is not supposed to be visible (hopefully will get fixed), let alone overrideable. You misunderstand then.

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Timon Gehr
On 02/14/2012 01:55 AM, Timon Gehr wrote: There are no performance implications because the compiler has the whole module ready to analyse. Therefore it can de-virtualise any calls to private members that are never overridden. A trivial addition to the class layout could furthermore allow the

More specific instantiations

2012-02-13 Thread bearophile
In D.learn there is an interesting thread (Instance-specific unittests) about D idioms to use unittests in templated classes/structs: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learnarticle_id=32490 A comment from Jonathan M Davis: And yes, this can be useful.

Re: More specific instantiations

2012-02-13 Thread James Miller
On 14 February 2012 14:25, bearophile bearophileh...@lycos.com wrote: In D.learn there is an interesting thread (Instance-specific unittests) about D idioms to use unittests in templated classes/structs:

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jose Armando Garcia
On Mon, Feb 13, 2012 at 2:49 PM, David Nadlinger s...@klickverbot.at wrote: On 2/13/12 4:50 PM, David Nadlinger wrote: https://github.com/jsancio/phobos/commit/d114420e0791c704f6899d81a0293cbd3cc8e6f5 Docs: http://jsancio.github.com/phobos/phobos/std_log.html A few small points from a

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jose Armando Garcia
On Mon, Feb 13, 2012 at 4:19 PM, Jonathan M Davis jmdavisp...@gmx.com wrote: On Monday, February 13, 2012 17:49:49 David Nadlinger wrote: You define the Severity enum members starting with fatal as 0. Why not the other way round – so that severityA severityB would do what you (or at least I)

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jonathan M Davis
On Monday, February 13, 2012 23:58:38 Jose Armando Garcia wrote: On Mon, Feb 13, 2012 at 4:19 PM, Jonathan M Davis jmdavisp...@gmx.com wrote: On Monday, February 13, 2012 17:49:49 David Nadlinger wrote: You define the Severity enum members starting with fatal as 0. Why not the other way

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Jonathan M Davis
On Tuesday, February 14, 2012 02:43:29 Timon Gehr wrote: On 02/14/2012 02:16 AM, Jonathan M Davis wrote: Well, not being able override what cannot be accesses is a quite basic requirement of security. Private members cannot be overriden in a different module. Have you ever read up on NVI?

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jose Armando Garcia
On Mon, Feb 13, 2012 at 5:06 PM, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: I'd like to see a simple example of how to specify the filename of the log file. Fair enough...

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jose Armando Garcia
On Mon, Feb 13, 2012 at 6:47 PM, Sean Kelly s...@invisibleduck.org wrote: On Feb 13, 2012, at 12:44 PM, jdrewsen wrote: A first quick observation: I vote for a debug severity level. Then make that default to the template parameter for log: template log(Severity severity = Severity.debug)

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jose Armando Garcia
On Mon, Feb 13, 2012 at 6:44 PM, jdrewsen jdrew...@nospam.com wrote: A first quick observation: I vote for a debug severity level. Then make that default to the template parameter for log: template log(Severity severity = Severity.debug) That would make it nice for good old print

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jose Armando Garcia
On Mon, Feb 13, 2012 at 7:17 PM, Sönke Ludwig lud...@informatik.uni-luebeck.de wrote: Log levels debug and maybe also trace would be useful, but I see that vlog(n)() is meant for that purpose. I would just prefer explicit names instead of just numbers. Is there a compelling reason why

Re: D-

2012-02-13 Thread Zach the Mystic
On 2/13/12 1:17 PM, Andrei Alexandrescu wrote: Agreed. There are two issues I see here in my opinion. First, putting some of our manpower in a small subset of D for tiny embedded systems is a misplaced investment because it would make a small impact at best. Second, coming up with another

Re: D-

2012-02-13 Thread Zachary Lund
On 02/11/2012 07:00 PM, Jonathan M Davis wrote: On Sunday, February 12, 2012 01:40:50 Zachary Lund wrote: Btw, I'm not very fluent in the inner workings of a garbage collector implementation but how does one go about concatenating to an array in a garbage collector as compared to manual memory

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Timon Gehr
On 02/14/2012 03:05 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 02:43:29 Timon Gehr wrote: On 02/14/2012 02:16 AM, Jonathan M Davis wrote: Well, not being able override what cannot be accesses is a quite basic requirement of security. Private members cannot be overriden in a

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jose Armando Garcia
On Mon, Feb 13, 2012 at 9:12 PM, James Miller ja...@aatch.net wrote: On 14 February 2012 10:17, Sönke Ludwig lud...@informatik.uni-luebeck.de wrote: Log levels debug and maybe also trace would be useful, but I see that vlog(n)() is meant for that purpose. I would just prefer explicit names

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Jonathan M Davis
On Tuesday, February 14, 2012 03:45:54 Timon Gehr wrote: On 02/14/2012 03:05 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 02:43:29 Timon Gehr wrote: On 02/14/2012 02:16 AM, Jonathan M Davis wrote: Well, not being able override what cannot be accesses is a quite basic

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jose Armando Garcia
On Mon, Feb 13, 2012 at 9:37 PM, so s...@so.so wrote: On Monday, 13 February 2012 at 15:50:05 UTC, David Nadlinger wrote: There are several modules in the review queue right now, and to get things going, I have volunteered to manage the review of Jose's std.log proposal. Barring any

Re: D-

2012-02-13 Thread Jonathan M Davis
On Monday, February 13, 2012 20:41:01 Zachary Lund wrote: On 02/11/2012 07:00 PM, Jonathan M Davis wrote: On Sunday, February 12, 2012 01:40:50 Zachary Lund wrote: Btw, I'm not very fluent in the inner workings of a garbage collector implementation but how does one go about concatenating

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jose Armando Garcia
On Tue, Feb 14, 2012 at 12:02 AM, Jonathan M Davis jmdavisp...@gmx.com wrote: On Monday, February 13, 2012 23:58:38 Jose Armando Garcia wrote: On Mon, Feb 13, 2012 at 4:19 PM, Jonathan M Davis jmdavisp...@gmx.com wrote: On Monday, February 13, 2012 17:49:49 David Nadlinger wrote: You define

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Andrei Alexandrescu
On 2/13/12 8:28 PM, Jose Armando Garcia wrote: On Mon, Feb 13, 2012 at 6:44 PM, jdrewsenjdrew...@nospam.com wrote: A first quick observation: I vote for a debug severity level. Then make that default to the template parameter for log: template log(Severity severity = Severity.debug) That

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Jonathan M Davis
On Tuesday, February 14, 2012 01:16:29 Jose Armando Garcia wrote: On Tue, Feb 14, 2012 at 12:02 AM, Jonathan M Davis jmdavisp...@gmx.com wrote: On Monday, February 13, 2012 23:58:38 Jose Armando Garcia wrote: On Mon, Feb 13, 2012 at 4:19 PM, Jonathan M Davis jmdavisp...@gmx.com wrote:

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Timon Gehr
On 02/14/2012 03:54 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 03:45:54 Timon Gehr wrote: On 02/14/2012 03:05 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 02:43:29 Timon Gehr wrote: On 02/14/2012 02:16 AM, Jonathan M Davis wrote: Well, not being able override what

Re: visibility vs. accessibility of protected symbols

2012-02-13 Thread Jonathan M Davis
On Tuesday, February 14, 2012 04:39:18 Timon Gehr wrote: On 02/14/2012 03:54 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 03:45:54 Timon Gehr wrote: On 02/14/2012 03:05 AM, Jonathan M Davis wrote: On Tuesday, February 14, 2012 02:43:29 Timon Gehr wrote: On 02/14/2012 02:16

Re: More specific instantiations

2012-02-13 Thread Jonathan M Davis
On Monday, February 13, 2012 20:25:46 bearophile wrote: Time ago I have suggested the static static idea, an usage example: [snip] I would point out that two different instantiations of the same template have _nothing_ in common with one another. It's as if you instantiate a template with two

Re: Review of Jose Armando Garcia Sancio's std.log

2012-02-13 Thread Andrei Alexandrescu
On 2/13/12 9:50 AM, David Nadlinger wrote: Please post all feedback in this thread, and remember: Although comprehensive reviews are obviously appreciated, short comments are very welcome as well! Thanks Jose and David. I made a pass, here are a few thoughts: * different verbose level -

Re: D-

2012-02-13 Thread Daniel Murphy
Iain Buclaw ibuc...@ubuntu.com wrote in message I think it starts with a runtime library that is written for the given architecture in mind. The compiler is already there in my opinion, and I have seen little reason for it not to be. Is the compiler really ready? Assuming that it's possible

Re: D-

2012-02-13 Thread Daniel Murphy
Adam D. Ruppe destructiona...@gmail.com wrote in message news:rdluxkzwxsxlxfgca...@dfeed.kimsufi.thecybershadow.net... On Sunday, 12 February 2012 at 17:45:46 UTC, Daniel Murphy wrote: Turns out I can't help myself: https://github.com/yebblies/dmd/tree/microd hmmm Do you see anything

  1   2   >