View mode: basic / threaded / horizontal-split · Log in · Help
October 20, 2006
Re: Lisp vs. C++ (not off-topic)
Unknown W. Brackets wrote:
> I would suggest that it wouldn't be too bad to simply have:
> 
> min-width: 600px;
> 
> Because, this will mean that Internet Explorer 6 and below will simply 
> show the box at whatever width, including smaller than 600px... but 
> every other browser will work as you wish.

I shall apply the fix. Thanks!
October 20, 2006
Re: Lisp vs. C++ (not off-topic)
"Unknown W. Brackets" <unknown@simplemachines.org> wrote in message 
news:ehanlp$22jc$1@digitaldaemon.com...
> Actually, they are portable... but what you're doing is technically 
> incorrect.  I had thought it was intentional.
>
> You set a width for the box, and so the standards-compliant browsers 
> listen to you and do as you say.  You don't set overflow, so it's 
> defaulted to visible.  Thus what you see in the screenshot.
>
> Internet Explorer is completely ignoring the standards (what the CSS 
> property "width" is supposed to do) and treating it as a minimum width.
>
> Normally, you'd set min-width instead to get the effect that Internet 
> Explorer is giving you... but IE does not support min-width.  Hence 
> probably why Internet Explorer behaves this way.
>
> A lot of people use something like this for that:
>
> min-width: 600px;
> width: expression("600px"); /* This line only understood by IE. */
>
> However, Internet Explorer 7 (coming out _very_ soon, final already 
> available for download) will comply with the standards (when the document 
> has a proper DOCTYPE, which yours does) and thus the above will break it.
>
> I would suggest that it wouldn't be too bad to simply have:
>
> min-width: 600px;
>
> Because, this will mean that Internet Explorer 6 and below will simply 
> show the box at whatever width, including smaller than 600px... but every 
> other browser will work as you wish.

Wouldn't the same effect be achieved by setting "margin" instead of 
"(min-)width"?

L.
October 21, 2006
Re: Lisp vs. C++ (not off-topic)
I sent Brandon Corfman a link to your article, and here's his reply 
(posted with his permission):

> Thanks for sharing that article. It's a good discussion, although I'll  certainly need
> more time to study the results in detail.
> 
> Here's another link to results in some other languages:
> http://www.nsl.com/papers/phone.htm
> 
> Since I can't enter the discussion, one thing I wanted to point out is that I posted my
> original C++ code verbatim as soon as I was finished. So although there are better ways
> to use the STL (as has been endlessly pointed out to me by other C++ advocates), the
> point wasn't to tweak the original program to make it more concise, as that would
> simply have eaten up more time. The point was to solve the program as quickly as I could
> and then measure the LOC afterwards.
> 
> I'm really impressed with the way Lionello wrote the code without looking at the other
> versions first. I've had plenty of others tell me that they translated existing programs
> into their pet language or wrote their own after studying the solutions. Most of them also
> won't tell how long it took them either ... especially the C++ guys ... heh.
> 
> Brandon
October 21, 2006
Re: Lisp vs. C++ (not off-topic)
Walter Bright wrote:
> I sent Brandon Corfman a link to your article, and here's his reply
> (posted with his permission):
> 
>> Thanks for sharing that article. It's a good discussion, although
>> I'll  certainly need
>> more time to study the results in detail.
>>
>> Here's another link to results in some other languages:
>> http://www.nsl.com/papers/phone.htm
>>
>> Since I can't enter the discussion, one thing I wanted to point out is
>> that I posted my
>> original C++ code verbatim as soon as I was finished. So although
>> there are better ways
>> to use the STL (as has been endlessly pointed out to me by other C++
>> advocates), the
>> point wasn't to tweak the original program to make it more concise, as
>> that would
>> simply have eaten up more time. The point was to solve the program as
>> quickly as I could
>> and then measure the LOC afterwards.
>>
>> I'm really impressed with the way Lionello wrote the code without
>> looking at the other
>> versions first. I've had plenty of others tell me that they translated
>> existing programs
>> into their pet language or wrote their own after studying the
>> solutions. Most of them also
>> won't tell how long it took them either ... especially the C++ guys
>> ... heh.
>>
>> Brandon 
> 

To rephrase Brandon's response:  D pwnz!!!
October 21, 2006
Re: Lisp vs. C++ (not off-topic)
I'm afraid not.  Margin controls the amount of spacing outside the box, 
against other boxes or the outside edge of the browser.

Thus, if you want the box to be at least 600px wide on a 800px, 1024px, 
or 1600px screen (not even beginning to talk about un-maximized browser 
windows!)... you cannot use a fixed margin to achieve this.  Using a 
percentage wouldn't be too bad, but would cause their to be much 
scrollable space on the right.

Unless you mean something else, and I'm misunderstanding you?

You could, in theory, use some trickery to achieve the affect using 
margins or other properties and nesting many elements (or use a table), 
but it would likely result in brittle, unmaintainable HTML/CSS which 
does no one much good.

-[Unknown]


> "Unknown W. Brackets" <unknown@simplemachines.org> wrote in message 
> news:ehanlp$22jc$1@digitaldaemon.com...
>> Actually, they are portable... but what you're doing is technically 
>> incorrect.  I had thought it was intentional.
>>
>> You set a width for the box, and so the standards-compliant browsers 
>> listen to you and do as you say.  You don't set overflow, so it's 
>> defaulted to visible.  Thus what you see in the screenshot.
>>
>> Internet Explorer is completely ignoring the standards (what the CSS 
>> property "width" is supposed to do) and treating it as a minimum width.
>>
>> Normally, you'd set min-width instead to get the effect that Internet 
>> Explorer is giving you... but IE does not support min-width.  Hence 
>> probably why Internet Explorer behaves this way.
>>
>> A lot of people use something like this for that:
>>
>> min-width: 600px;
>> width: expression("600px"); /* This line only understood by IE. */
>>
>> However, Internet Explorer 7 (coming out _very_ soon, final already 
>> available for download) will comply with the standards (when the document 
>> has a proper DOCTYPE, which yours does) and thus the above will break it.
>>
>> I would suggest that it wouldn't be too bad to simply have:
>>
>> min-width: 600px;
>>
>> Because, this will mean that Internet Explorer 6 and below will simply 
>> show the box at whatever width, including smaller than 600px... but every 
>> other browser will work as you wish.
> 
> Wouldn't the same effect be achieved by setting "margin" instead of 
> "(min-)width"?
> 
> L. 
> 
>
October 21, 2006
Re: Lisp vs. C++ (not off-topic)
"Unknown W. Brackets" <unknown@simplemachines.org> wrote in message 
news:ehcbui$ip8$1@digitaldaemon.com...
> I'm afraid not.  Margin controls the amount of spacing outside the box, 
> against other boxes or the outside edge of the browser.
>
> Thus, if you want the box to be at least 600px wide on a 800px, 1024px, or 
> 1600px screen (not even beginning to talk about un-maximized browser 
> windows!)... you cannot use a fixed margin to achieve this.  Using a 
> percentage wouldn't be too bad, but would cause their to be much 
> scrollable space on the right.
>
> Unless you mean something else, and I'm misunderstanding you?

Well, why would anyone (Walter in this case) want to use "width"? Probably 
to prevent the code-box from touching the edges of the page. The problem 
with "width" was that it can make the box too small for its contents. That's 
why I suggested using "margin" instead. It prevents the box from touching 
the edges but never smaller than the longest line inside the box.. But that 
was of course before I knew "min-width" existed :)

L.
October 21, 2006
Re: Lisp vs. C++ (not off-topic)
Lionello Lunesu wrote:
> Well, why would anyone (Walter in this case) want to use "width"? Probably 
> to prevent the code-box from touching the edges of the page. The problem 
> with "width" was that it can make the box too small for its contents. That's 
> why I suggested using "margin" instead. It prevents the box from touching 
> the edges but never smaller than the longest line inside the box.. But that 
> was of course before I knew "min-width" existed :)

I used the "width" so that multiple code boxes lined up neatly. It just 
looked better.
Next ›   Last »
1 2 3 4 5
Top | Discussion index | About this forum | D home