Re: Disable NaN and Inf

2010-02-06 Thread Andrei Alexandrescu
Jonathan Crapuchettes wrote: I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem. Some of the numbers is my denominator array are 0, producing NaNs and Infs in the result. My question is: Is th

Re: Disable NaN and Inf

2010-02-06 Thread Pelle Månsson
On 02/06/2010 09:16 AM, Andrei Alexandrescu wrote: Jonathan Crapuchettes wrote: I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem. Some of the numbers is my denominator array are 0, producing Na

Visual Studio plugin

2010-02-06 Thread smartmobili
Hi, From old posts I know that a japanese guy started to developp a Visual Studio plugin for D : http://www.digitalmars.com/d/archives/digitalmars/D/18102.html I wanted to know if by any chance someone reading my post could sent it to me(forumer(A_T)smartmobili(D_O_T)com because I would like t

Re: A thought for template alias parameters?

2010-02-06 Thread Lutger
On 02/06/2010 05:55 AM, Joel Anderson wrote: On 2/4/2010 4:41 PM, Trip Volpe wrote: Joel Anderson Wrote: That's one of the reasons I've wished D had a nicer syntax for the string mixin format. This one kinda scares people away :p What kind of syntax do you have in mind? Making mixins less

Re: Array operation for computing the dot product?

2010-02-06 Thread Jacob Carlborg
On 2/6/10 01:25, retard wrote: Fri, 05 Feb 2010 16:03:22 -0800, Walter Bright wrote: retard wrote: Fri, 05 Feb 2010 13:24:44 -0800, Walter Bright wrote: retard wrote: {protection-attr} == perhaps one of these {public|protected|package| private} - I have no effing clue what this does

Re: Visual Studio plugin

2010-02-06 Thread Moritz Warning
On Fri, 05 Feb 2010 10:42:14 +0100, smartmobili wrote: > Hi, > > From old posts I know that a japanese guy started to developp a Visual > Studio plugin for D : > http://www.digitalmars.com/d/archives/digitalmars/D/18102.html > > I wanted to know if by any chance someone reading my post could se

Re: Proposal: Dedicated-string-mixin templates/functions

2010-02-06 Thread Yigal Chripun
On 05/02/2010 23:24, Trass3r wrote: Proposed: --- mixin template foo1 { const char[] foo1 = "int a;"; } mixin char[] foo2() { return "int b;"; } foo1!(); foo2(); --- Well, it's a little bit indistinctive, hard to tell if it's a normal function call or a

Re: @safe status

2010-02-06 Thread Michel Fortin
On 2010-02-05 18:59:00 -0500, Walter Bright said: Michel Fortin wrote: So what's the plan? Should everything theoretically safe in Phobos be @trusted to avoid complains about unnecessary checks in programs that don't bother about safety? Or should we make things @safe and promote them to @tr

Re: TDPL a bad idea?

2010-02-06 Thread Yigal Chripun
On 06/02/2010 05:11, Walter Bright wrote: BCS wrote: If D were to quit providing a NNTP interface, I'd loose interest in participating in these discussions. Heck, (HINT, HINT, HINT) the fact that Tango has a forum rather than a news group is half or more of the reason I don't use it. I love th

Function with try/catch and no return statement

2010-02-06 Thread Jacob Carlborg
The following code does not cause a compile error: int foo () { try int i; catch (Exception) throw new Exception(""); } Wouldn't it be quite obvious for the compiler to see that there is no return statement in the above function and give

Re: TDPL a bad idea?

2010-02-06 Thread Lutger
On 02/06/2010 01:58 PM, Yigal Chripun wrote: ... Also, I've found a simple NNTP server written in python that has modular back-end support so it can be set-up to provide a bi-directional NNTP interface for various web forums. What is the name / link? Thanks

Re: TDPL a bad idea?

2010-02-06 Thread Yigal Chripun
On 06/02/2010 15:23, Lutger wrote: On 02/06/2010 01:58 PM, Yigal Chripun wrote: ... Also, I've found a simple NNTP server written in python that has modular back-end support so it can be set-up to provide a bi-directional NNTP interface for various web forums. What is the name / link? Thank

Re: Function with try/catch and no return statement

2010-02-06 Thread Michel Fortin
On 2010-02-06 08:20:13 -0500, Jacob Carlborg said: The following code does not cause a compile error: int foo () { try int i; catch (Exception) throw new Exception(""); } Wouldn't it be quite obvious for the compiler to see that there i

Re: Function with try/catch and no return statement

2010-02-06 Thread retard
Sat, 06 Feb 2010 09:42:37 -0500, Michel Fortin wrote: > On 2010-02-06 08:20:13 -0500, Jacob Carlborg said: > >> The following code does not cause a compile error: >> >> int foo () >> { >> try >> int i; >> >> catch (Exception) >> throw new Exception("");

Re: Function with try/catch and no return statement

2010-02-06 Thread Trass3r
I'd say it's as it should. Even though in this particular situation there is no way the catch block will be used, it's needed for generic programming. Consider this: What the hell are you talking about? His post isn't about throwing exceptions. There is no return statement and it compile

Re: Function with try/catch and no return statement

2010-02-06 Thread Trass3r
Yields Error: function main.foo no return exp; or assert(0); at end of function with dmd 2.041svn on WinXP

Re: Function with try/catch and no return statement

2010-02-06 Thread Michel Fortin
On 2010-02-06 10:13:39 -0500, Trass3r said: I'd say it's as it should. Even though in this particular situation there is no way the catch block will be used, it's needed for generic programming. Consider this: What the hell are you talking about? His post isn't about throwing exceptions.

Re: TDPL a bad idea?

2010-02-06 Thread dsimcha
== Quote from Walter Bright (newshou...@digitalmars.com)'s article > dsimcha wrote: > > == Quote from Walter Bright (newshou...@digitalmars.com)'s article > >> I love the news interface, too, and see no reason to give it up. But the > >> web forums have their advantages, too. That's why I'd like to

Re: Function with try/catch and no return statement

2010-02-06 Thread Don
Jacob Carlborg wrote: The following code does not cause a compile error: int foo () { try int i; catch (Exception) throw new Exception(""); } Wouldn't it be quite obvious for the compiler to see that there is no return statement in the above function and give a co

Re: TDPL a bad idea?

2010-02-06 Thread Steven E. Harris
Yigal Chripun writes: > Walter, Please take a look at FUDForum. It's a web forum with NNTP > support built in. This mailing list is also hosted as a newsgroup on Gmane as gmane.comp.lang.d.general¹ which you can read via NNTP and a Web-based interface. Footnotes: ¹ http://dir.gmane.org/gm

Re: Disable NaN and Inf

2010-02-06 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > Jonathan Crapuchettes wrote: > > I would like to divide one array by another using the slice syntax so > > that I can benefit from the vectorized operation, but I am running into > > a problem. Some of the numbers is my d

Re: Proposal: Dedicated-string-mixin templates/functions

2010-02-06 Thread Chad J
Nick Sabalausky wrote: > ... > > But yea, that's is still a good point. Although I think it might be better > considered part of the more general problem of passing code literals (even > though it's as delegates in one case and as strings in the other). For > instance, even without any mixins i

Re: Disable NaN and Inf

2010-02-06 Thread Andrei Alexandrescu
dsimcha wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article Jonathan Crapuchettes wrote: I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem. Some of the numbers is

Re: Array operation for computing the dot product?

2010-02-06 Thread Walter Bright
Jacob Carlborg wrote: Is there any use to make the base class non public in D? I mean you will also make the Object part inaccessible. Another thing to remove in D2? It's possible it's a useless feature. Apparently, nobody has found a use for it yet in D.

Re: Disable NaN and Inf

2010-02-06 Thread Jonathan Crapuchettes
Are NaNs and Infs the result of a CPU operation or is that part of the D language? JC Andrei Alexandrescu wrote: Jonathan Crapuchettes wrote: I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a problem.

Re: Disable NaN and Inf

2010-02-06 Thread Trass3r
Are NaNs and Infs the result of a CPU operation or is that part of the D language? http://en.wikipedia.org/wiki/NaN

Re: Disable NaN and Inf

2010-02-06 Thread Don
Andrei Alexandrescu wrote: dsimcha wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article Jonathan Crapuchettes wrote: I would like to divide one array by another using the slice syntax so that I can benefit from the vectorized operation, but I am running into a pro

Re: TDPL a bad idea?

2010-02-06 Thread Roman Ivanov
On 2/6/2010 10:21 AM, dsimcha wrote: > == Quote from Walter Bright (newshou...@digitalmars.com)'s article >> dsimcha wrote: >>> == Quote from Walter Bright (newshou...@digitalmars.com)'s article I love the news interface, too, and see no reason to give it up. But the web forums have their

Re: TDPL a bad idea?

2010-02-06 Thread Walter Bright
dsimcha wrote: == Quote from Walter Bright (newshou...@digitalmars.com)'s article dsimcha wrote: == Quote from Walter Bright (newshou...@digitalmars.com)'s article I love the news interface, too, and see no reason to give it up. But the web forums have their advantages, too. That's why I'd lik

Re: TDPL a bad idea?

2010-02-06 Thread Walter Bright
Yigal Chripun wrote: Walter, Please take a look at FUDForum. I did, thanks for the reference. I think reddit blows it away for user interface. Fudforum has the usual problem with web forums of using too much vertical space, meaning you have a hard time keeping track of where you are in a thr

Re: TDPL a bad idea?

2010-02-06 Thread BCS
Hello Walter, BCS wrote: If D were to quit providing a NNTP interface, I'd loose interest in participating in these discussions. Heck, (HINT, HINT, HINT) the fact that Tango has a forum rather than a news group is half or more of the reason I don't use it. I love the news interface, too, and

Re: TDPL a bad idea?

2010-02-06 Thread BCS
Hello Walter, And if the throttle got stuck, I just step on the clutch & brake. BFD. I was once chatting with some guys building a race car: in that class you were required to have a gas peddle that had a toe strap and a push/pull cable so, even if the throttle return spring got stuck, you c

Re: Disable NaN and Inf

2010-02-06 Thread BCS
Hello Jonathan, Are NaNs and Infs the result of a CPU operation or is that part of the D language? The Floating point unit does all of that and IIRC it's defined as part of the IEEE standard. -- <

Re: TDPL a bad idea?

2010-02-06 Thread Yigal Chripun
On 06/02/2010 23:42, Walter Bright wrote: Yigal Chripun wrote: Walter, Please take a look at FUDForum. I did, thanks for the reference. I think reddit blows it away for user interface. Fudforum has the usual problem with web forums of using too much vertical space, meaning you have a hard time

Re: TDPL a bad idea?

2010-02-06 Thread BCS
Hello Walter, And if the throttle got stuck, I just step on the clutch & brake. BFD. I was once chatting with some guys building a race car: in that class you were required to have a gas peddle that had a toe strap and a push/pull cable so, even if the throttle return spring got stuck, you c

Re: TDPL a bad idea?

2010-02-06 Thread Roman Ivanov
On 2/5/2010 11:52 AM, retard wrote: > The sad fact is that web forums are more or less a poor copy of the > good old usenet newsgroups. The new format requires more bandwidth and > server capacity That's a questionable statement. Yes, in a forums you re-download the same posts several times. How

Re: TDPL a bad idea?

2010-02-06 Thread Walter Bright
Yigal Chripun wrote: On 06/02/2010 23:42, Walter Bright wrote: Yigal Chripun wrote: Walter, Please take a look at FUDForum. I did, thanks for the reference. I think reddit blows it away for user interface. Fudforum has the usual problem with web forums of using too much vertical space, meanin

Re: TDPL a bad idea?

2010-02-06 Thread Lars T. Kyllingstad
Roman Ivanov wrote: On 2/5/2010 11:52 AM, retard wrote: The sad fact is that web forums are more or less a poor copy of the good old usenet newsgroups. The new format requires more bandwidth and server capacity That's a questionable statement. Yes, in a forums you re-download the same posts s

Re: TDPL a bad idea?

2010-02-06 Thread Andrei Alexandrescu
retard wrote: Fri, 05 Feb 2010 16:20:51 +, BCS wrote: Hello Gareth, I actually like the newsgroup format (more than modern web forums) now that I've gone to the trouble of setting up Thunderbrid but I guess they did put me off initially. Well, that's one data point for you. I've said

Re: TDPL a bad idea?

2010-02-06 Thread retard
Sat, 06 Feb 2010 17:08:16 -0500, Roman Ivanov wrote: > On 2/5/2010 11:52 AM, retard wrote: >> The sad fact is that web forums are more or less a poor copy of the >> good old usenet newsgroups. The new format requires more bandwidth and >> server capacity > > That's a questionable statement. Yes,

Re: TDPL a bad idea?

2010-02-06 Thread Walter Bright
retard wrote: Any hacker can write a bot that posts spam on net. So they invented CAPTCHA. Agreed, there's spam on newsgroups, too. I guess the largest reason why these newsgroups have avoided all that is because Walter has his private nntp server and nntp isn't widely used anymore. We get sp

Re: TDPL a bad idea?

2010-02-06 Thread Roman Ivanov
On 2/6/2010 5:33 PM, Walter Bright wrote: > Yigal Chripun wrote: >> On 06/02/2010 23:42, Walter Bright wrote: >>> Yigal Chripun wrote: Walter, Please take a look at FUDForum. >>> >>> I did, thanks for the reference. I think reddit blows it away for user >>> interface. Fudforum has the usual pr

Re: Proposal: Dedicated-string-mixin templates/functions

2010-02-06 Thread Nick Sabalausky
"Yigal Chripun" wrote in message news:hkjnp8$ms...@digitalmars.com... > On 05/02/2010 23:24, Trass3r wrote: >>> Proposed: >>> --- >>> mixin template foo1 { >>> const char[] foo1 = "int a;"; >>> } >>> mixin char[] foo2() { >>> return "int b;"; >>> } >>> foo1!(); >>> foo2(); >>>

Re: TDPL a bad idea?

2010-02-06 Thread Walter Bright
Roman Ivanov wrote: In a tree-like forum, a discussion can be extended at any point, and the bigger the thread grows, the more points there are. It's more difficult to keep track of, and it's /much/ more difficult to see the "current" state of an entire discussion that you haven't read from the s

Re: TDPL a bad idea?

2010-02-06 Thread BCS
Hello Roman, I disagree: Here is why. A linear thread extends only at one point - messages are added at the end. I see this as a down side. That is because having messages only added at the end means that the only information I get aside from the content is chronological order. I can't see