www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DMD 0.160 release

reply Walter Bright <newshound digitalmars.com> writes:
The web site has changed; it now uses style sheets for layout rather 
than tables and embedded formatting. I essentially learned how to do 
this from the many examples posted here of possible new layouts for the 
documentation pages. Thanks to all!

I don't think the style sheet currently used is as good as the ones you 
came up with - at this point I was just interested in getting the layout 
into the style sheet. Now, we can just work on improving the style sheet.

http://www.digitalmars.com/d/changelog.html
Jun 04 2006
next sibling parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Walter Bright wrote:

 The web site has changed; it now uses style sheets for layout rather
 than tables and embedded formatting. I essentially learned how to do
 this from the many examples posted here of possible new layouts for the
 documentation pages. Thanks to all!
 
 I don't think the style sheet currently used is as good as the ones you
 came up with - at this point I was just interested in getting the layout
 into the style sheet. Now, we can just work on improving the style sheet.
 
 http://www.digitalmars.com/d/changelog.html

First reports say that the left border menu is totally broken in Firefox, Opera and Konqueror. -- Lars Ivar Igesund blog at http://larsivi.net DSource & #D: larsivi
Jun 04 2006
next sibling parent Kirk McDonald <kirklin.mcdonald gmail.com> writes:
Lars Ivar Igesund wrote:
 Walter Bright wrote:
 
 
The web site has changed; it now uses style sheets for layout rather
than tables and embedded formatting. I essentially learned how to do
this from the many examples posted here of possible new layouts for the
documentation pages. Thanks to all!

I don't think the style sheet currently used is as good as the ones you
came up with - at this point I was just interested in getting the layout
into the style sheet. Now, we can just work on improving the style sheet.

http://www.digitalmars.com/d/changelog.html

First reports say that the left border menu is totally broken in Firefox, Opera and Konqueror.

It is indeed broken in Firefox. Messing with the CSS (with the wonderful Edit CSS plugin for Firefox), dropping "height : 0;" anywhere it appears seems to fix it, at least for Firefox. -Kirk McDonald
Jun 04 2006
prev sibling parent mclysenk mtu.edu writes:
In article <e5vbqo$284t$1 digitaldaemon.com>, Lars Ivar Igesund says...
First reports say that the left border menu is totally broken in Firefox,
Opera and Konqueror.

I second this. The main website is unusable for the moment. -Mik
Jun 04 2006
prev sibling next sibling parent Gregor Richards <Richards codu.org> writes:
Walter Bright wrote:
 The web site has changed; it now uses style sheets for layout rather 
 than tables and embedded formatting. I essentially learned how to do 
 this from the many examples posted here of possible new layouts for the 
 documentation pages. Thanks to all!
 
 I don't think the style sheet currently used is as good as the ones you 
 came up with - at this point I was just interested in getting the layout 
 into the style sheet. Now, we can just work on improving the style sheet.
 
 http://www.digitalmars.com/d/changelog.html

It's horrifically broken in at least Firefox, Konqueror (and therefore probably Safari), and Opera. Basically every browser with any shred of standards compliance. Don't webdev on IE. It is not a browser. - Gregor Richards
Jun 04 2006
prev sibling next sibling parent Kirk McDonald <kirklin.mcdonald gmail.com> writes:
Walter Bright wrote:
 The web site has changed; it now uses style sheets for layout rather 
 than tables and embedded formatting. I essentially learned how to do 
 this from the many examples posted here of possible new layouts for the 
 documentation pages. Thanks to all!
 
 I don't think the style sheet currently used is as good as the ones you 
 came up with - at this point I was just interested in getting the layout 
 into the style sheet. Now, we can just work on improving the style sheet.
 
 http://www.digitalmars.com/d/changelog.html

From the changelog: Added operator overloading of InExpression. How does this work? Is it backwards from the other operators? In other words, does a in b get translated to b.opIn(a) ? Because that is certainly more useful than the usual behavior, but the documentation doesn't say. (At the least, it should mention this.) -Kirk McDonald
Jun 04 2006
prev sibling next sibling parent Tom S <h3r3tic remove.mat.uni.torun.pl> writes:
Walter Bright wrote:
 The web site has changed; it now uses style sheets for layout rather 
 than tables and embedded formatting. I essentially learned how to do 
 this from the many examples posted here of possible new layouts for the 
 documentation pages. Thanks to all!
 
 I don't think the style sheet currently used is as good as the ones you 
 came up with - at this point I was just interested in getting the layout 
 into the style sheet. Now, we can just work on improving the style sheet.
 
 http://www.digitalmars.com/d/changelog.html

Thanks a lot, Walter ! I can finally switch from DMD.157 :) Yet the site is FUBARed in my firefox... -- Tomasz Stachowiak /+ a.k.a. h3r3tic +/
Jun 04 2006
prev sibling next sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Walter Bright" <newshound digitalmars.com> wrote in message 
news:e5vard$26un$1 digitaldaemon.com...
 The web site has changed; it now uses style sheets for layout rather than 
 tables and embedded formatting. I essentially learned how to do this from 
 the many examples posted here of possible new layouts for the 
 documentation pages. Thanks to all!

 I don't think the style sheet currently used is as good as the ones you 
 came up with - at this point I was just interested in getting the layout 
 into the style sheet. Now, we can just work on improving the style sheet.

 http://www.digitalmars.com/d/changelog.html

Thank you for the [static] assert messages. o.new Inner? Very cool. Operator overloading of "in"? Cool, but I can't seem to get it to work; I don't know what argument and return types are allowed, as it's listed in the Operator Overloading specs but has no documentation. I tried: class A { int* opIn(char[] name) { return null; } } void main() { A a = new A(); int* i = ("hi" in a); } And all it said was that the rvalue of an InExpression must be an AA. I tried a few different return types to no avail; I thought maybe it wanted a pointer type (as that's what in returns for AAs) but it obviously doesn't work. Oh yeah, I really like the new "all links written in the exact same location" look for the left sidebar in Firefox ;) Never seen so much text in one spot.
Jun 04 2006
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
news:e5ved4$2bod$1 digitaldaemon.com...

 Operator overloading of "in"?  Cool, but I can't seem to get it to work; I 
 don't know what argument and return types are allowed, as it's listed in 
 the Operator Overloading specs but has no documentation.  I tried:

 class A
 {
 int* opIn(char[] name)
 {
  return null;
 }
 }

 void main()
 {
 A a = new A();
 int* i = ("hi" in a);
 }

 And all it said was that the rvalue of an InExpression must be an AA.  I 
 tried a few different return types to no avail; I thought maybe it wanted 
 a pointer type (as that's what in returns for AAs) but it obviously 
 doesn't work.

Oh dear. I saw Kirk's post, and thought "oh no." Sure enough, this works: class A { bool opIn(char[] name) { if(name == "hi") return true; else return false; } } void main() { A a = new A(); writefln(a in "hi"); writefln(a in "bye"); } Notice that the expressions for 'in' are reversed. It looks like I'm checking to see if the object 'a' exists in the strings "hi" and "bye". Bug #1... ;)
Jun 04 2006
parent Kirk McDonald <kirklin.mcdonald gmail.com> writes:
Jarrett Billingsley wrote:
 "Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
 news:e5ved4$2bod$1 digitaldaemon.com...
 
 
Operator overloading of "in"?  Cool, but I can't seem to get it to work; I 
don't know what argument and return types are allowed, as it's listed in 
the Operator Overloading specs but has no documentation.  I tried:

class A
{
int* opIn(char[] name)
{
 return null;
}
}

void main()
{
A a = new A();
int* i = ("hi" in a);
}

And all it said was that the rvalue of an InExpression must be an AA.  I 
tried a few different return types to no avail; I thought maybe it wanted 
a pointer type (as that's what in returns for AAs) but it obviously 
doesn't work.

Oh dear. I saw Kirk's post, and thought "oh no." Sure enough, this works: class A { bool opIn(char[] name) { if(name == "hi") return true; else return false; } } void main() { A a = new A(); writefln(a in "hi"); writefln(a in "bye"); } Notice that the expressions for 'in' are reversed. It looks like I'm checking to see if the object 'a' exists in the strings "hi" and "bye". Bug #1... ;)

The fix is simple: opIn is actually an opfunc_r without a corresponding opfunc (or a trailing "_r" in the name). -Kirk McDonald
Jun 04 2006
prev sibling next sibling parent kris <foo bar.com> writes:
Walter Bright wrote:
 The web site has changed; it now uses style sheets for layout rather 
 than tables and embedded formatting. I essentially learned how to do 
 this from the many examples posted here of possible new layouts for the 
 documentation pages. Thanks to all!
 
 I don't think the style sheet currently used is as good as the ones you 
 came up with - at this point I was just interested in getting the layout 
 into the style sheet. Now, we can just work on improving the style sheet.
 
 http://www.digitalmars.com/d/changelog.html

That's great to see the sc.ini location is now configurable. How about fixing one other little problem that causes similar issues? The location of intrinsic.d is apparently "fixed" by the compiler as std.intrinsic ~ it's the only module (other than object.d) that cannot be relocated. The above causes notable grief for alternate library implementations. It would really be of considerable help if you were to lift this restriction from the compiler. Thanks;
Jun 04 2006
prev sibling next sibling parent Daniel Keep <daniel.keep.lists gmail.com> writes:
# AssertExpression's can now take an optional informational string as
the second parameter. Static assert's can, too.

Hooray!

# Added Expression.NewExpression so inner classes can be initialized
more conveniently.

I've never used inner classes, but looks cool.

# Added operator overloading of InExpression.

:O  You rock.  ^_^

Once again, many thanks for the hard work!

	-- Daniel

-- 
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.

v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP  http://hackerkey.com/
Jun 04 2006
prev sibling next sibling parent Hasan Aljudy <hasan.aljudy gmail.com> writes:
Walter Bright wrote:
 The web site has changed; it now uses style sheets for layout rather 
 than tables and embedded formatting. I essentially learned how to do 
 this from the many examples posted here of possible new layouts for the 
 documentation pages. Thanks to all!
 
 I don't think the style sheet currently used is as good as the ones you 
 came up with - at this point I was just interested in getting the layout 
 into the style sheet. Now, we can just work on improving the style sheet.
 
 http://www.digitalmars.com/d/changelog.html

Nice!
 AssertExpression's can now take an optional informational string as
 the second parameter. Static assert's can, too.

Finally!!! <g>
Jun 04 2006
prev sibling next sibling parent =?ISO-8859-1?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid> writes:
Walter Bright wrote:
 I don't think the style sheet currently used is as good as the ones you
 came up with - at this point I was just interested in getting the layout
 into the style sheet. Now, we can just work on improving the style sheet.

Yay, it's much better now :) Works fine, tested with opera 9, firefox 1.5 and konqueror 3.5.
Jun 05 2006
prev sibling next sibling parent clayasaurus <clayasaurus gmail.com> writes:
Walter Bright wrote:
 The web site has changed; it now uses style sheets for layout rather 
 than tables and embedded formatting. I essentially learned how to do 
 this from the many examples posted here of possible new layouts for the 
 documentation pages. Thanks to all!
 
 I don't think the style sheet currently used is as good as the ones you 
 came up with - at this point I was just interested in getting the layout 
 into the style sheet. Now, we can just work on improving the style sheet.
 
 http://www.digitalmars.com/d/changelog.html

Here's a suggestion for the website in general, make a 'download' button next to the 'home', 'search', 'd', and 'comments' buttons at the top right corner of the page. The casual reader is not going to want to spend more than a few seconds trying to find the download link. Also, at the top of the D compiler page where it says D for Win32 and D for linux, you should add a 'D for GCC' link and have that link to the GDC sourceforge page. Otherwise, thanks for the bug fixes! :) ~ Clay
Jun 05 2006
prev sibling parent reply Brad Roberts <braddr puremagic.com> writes:
On Sun, 4 Jun 2006, Walter Bright wrote:

 The web site has changed; it now uses style sheets for layout rather than
 tables and embedded formatting. I essentially learned how to do this from the
 many examples posted here of possible new layouts for the documentation pages.
 Thanks to all!
 
 I don't think the style sheet currently used is as good as the ones you came
 up with - at this point I was just interested in getting the layout into the
 style sheet. Now, we can just work on improving the style sheet.
 
 http://www.digitalmars.com/d/changelog.html

 AssertExpression's can now take an optional informational string as the 
 second parameter. Static assert's can, too.

Thanks for incorporating this. Your implementation, not suprisingly, fixes a number of the open gaps in my first attempt. There's one area that you didn't incorporate from what I'd one that I'd like you to consider folding in: --- asserterror.d.orig 2006-06-09 01:18:27.000000000 -0700 +++ asserterror.d 2006-06-09 01:18:52.000000000 -0700 -6,10 +6,13 class AssertError : Error { - private: + public: uint linnum; char[] filename; + char[] msg; + + private: this(char[] filename, uint linnum) { -20,6 +21,7 { this.linnum = linnum; this.filename = filename; + this.msg = msg; char* buffer; size_t len; -------------------- I'm not sure why the linnum and filename fields were private to begin with. If they're going to be member variables they should be public so others can see them. As they are, nothing can use them so they might as well not be member variables at all. So, if they become public, the msg field ought to be exposed as well. My unit tests for the feature try to compare msg to make sure it was passed through correctly. For the moment, I've disabled those tests and the rest pass. Thanks, Brad
Jun 09 2006
next sibling parent reply Walter Bright <newshound digitalmars.com> writes:
I'll take the private off, but a msg field would be redundant with the 
one in the base class.
Jun 09 2006
parent Sean Kelly <sean f4.ca> writes:
Brad Roberts wrote:
 On Fri, 9 Jun 2006, Walter Bright wrote:
 
 I'll take the private off, but a msg field would be redundant with the one in
 the base class.

Ok.. good point. One interesting difference, though. The base class' msg field will end up holding the entire message. ie: assert(false, "hi") --> AssertError Failure assert-test.d(40) hi My intent was to capture just the "hi" part. My choice of 'msg' in the diff I pasted was unfortunate. I'd originally called it 'message'.

For what it's worth, I typically assign the msg field to the string passed on object construction, and if a more expressive message is required I'll override toString in the derived exception object. This avoid the need for any allocations at the throw point (beyond the object itself, potentially), but still provides a means for more structured error messages to be displayed. The actual error reporting structure I use in dmain2 is this: catch (Exception e) { while (e) { if (e.file) fprintf(stderr, "%.*s(%u): %.*s\n", e.file, e.line, e.msg); else fprintf(stderr, "%.*s\n", e.toString()); e = e.next; } exit(EXIT_FAILURE); } Typically, I think the full message is useful only if context information is not provided explicitly in the file and line members. Sean
Jun 09 2006
prev sibling parent Brad Roberts <braddr puremagic.com> writes:
On Fri, 9 Jun 2006, Walter Bright wrote:

 I'll take the private off, but a msg field would be redundant with the one in
 the base class.

Ok.. good point. One interesting difference, though. The base class' msg field will end up holding the entire message. ie: assert(false, "hi") --> AssertError Failure assert-test.d(40) hi My intent was to capture just the "hi" part. My choice of 'msg' in the diff I pasted was unfortunate. I'd originally called it 'message'.
Jun 09 2006