Re: Redesign of

On 4/24/2014 3:40 PM, H. S. Teoh via Digitalmars-d wrote:
> In an ideal world, the webserver simply serves the content, and the
> browser is the one that decides how to present it -- and the user
> decides how the browser should present it. Ultimately, the user should
> be in charge.

That's exactly how HTML used to work, but then the print folk and 
graphic designers came in and demanded total control.

via Digitalmars-d | 24 Apr 17:34 2014

Re: Redesign of

On Thursday, 24 April 2014 at 14:59:36 UTC, H. S. Teoh via 
Digitalmars-d wrote:
> On Thu, Apr 24, 2014 at 04:58:06AM -0400, Nick Sabalausky via 
> Digitalmars-d wrote:
>> On 4/23/2014 6:19 PM, H. S. Teoh via Digitalmars-d wrote:
> [...]
>> >Usually when I run into a site with (1) microscopic fonts, 
>> >(2) giant
>> >(often multicolored) fonts, (3) no whitespace, or (4) has more
>> >ads/filler than content, my fingers have an almost 
>> >instinctual ctrl-W
>> >(close tab) response. Sometimes not even one word registers 
>> >in my
>> >brain before I move on to the next site.
>> >
>> Incidentally, ugly rainbow text is also why I set my mail 
>> client to
>> plaintext-only ages ago.
> [...]
> I've never left terminal-only email clients. :P
> For a short time at work I put up with webmail, because they 
> didn't tell
> me pop3 access was available. Boy, that was painful. Then one 
> day I
> discovered that I can use pop3, and oh the joy! I installed 
> mutt and
> fetchmail, and from that day on never looked back.
(Continue reading)

Re: Static Analysis Tooling / Effective D

Am Thu, 24 Apr 2014 13:11:18 +0200
schrieb Artur Skawina via Digitalmars-d
<digitalmars-d <at>>:

> `size_t x = 1 << shiftAmount` is definitely not something that
> should be recommended, see above. Just use the correct type on
> the lhs of shift operators.

auto x = cast(size_t) 1 << shiftAmount;  // really ?! :(

In that case it is better to define ONE as a constant :)

enum ONE = cast(size_t) 1;
auto x = ONE << shiftAmount;



Re: Redesign of

On 4/23/2014 6:19 PM, H. S. Teoh via Digitalmars-d wrote:
> On Wed, Apr 23, 2014 at 05:32:00PM -0400, Nick Sabalausky via Digitalmars-d wrote:
>> I certainly won't disagree that small fonts can be hard to read, but
>> on the other end, I've seen a lot of newer websites with gigantic
>> fonts, and I find that painful to read as well.
> Any examples?

Ugh, actually I wish I had some. I tend to run away from those sites too 
quickly to either remember them or bookmark for later ridicule. I should 
start bookmarking them though, for fun :)

Another thing I've seen that makes things literally painful to read is 
double-spacing. Double-spacing is needed in school so the instructor can 
mark comments (Assuming schools even do essays in hardcopy anymore?). 
Outside of school it just makes things hard to read.

Though I can't confirm, I always assumed such sites were probably trying 
too hard to be typographically proper. Either that or they assumed 
everyone was running on a 5 bazillion DPI monitor or some such.

> Usually when I run into a site with (1) microscopic fonts, (2) giant
> (often multicolored) fonts, (3) no whitespace, or (4) has more
> ads/filler than content, my fingers have an almost instinctual ctrl-W
> (close tab) response. Sometimes not even one word registers in my brain
> before I move on to the next site.

Incidentally, ugly rainbow text is also why I set my mail client to 
(Continue reading)

Re: Redesign of

(Argh! Accidentally emailed this to digitalmars-d <at> twice! 
Actually posting to NG now...)

On 4/23/2014 6:48 PM, H. S. Teoh via Digitalmars-d wrote:
 > until sometime in the last few
 > years I got so sick of JS eating up CPU, memory, causing needless
 > browser slowdowns, popping up unwanted ads and nag dialogs, that now I'm
 > back to JS being off by default, and only (grudgingly) enabled for a
 > handful of specific sites that actually *need* it. It's amazing how much
 > faster the web suddenly became, overnight.

That's why I do it! That plus the lack of modal CSS pop-in windows. 
(Seriously, no sooner do the browsers finally kill off popups, but then 
overzealous designers go replacing them with *modal* versions! And these 
new ones break basic browser functionality even *more*.)

The *truly* amazing thing is that many of those slow-with-JS sites are 
using JS/AJAX specifically *because* they actually believe it makes 
their site faster (I bet many of them are probably running on Node.js or 
PHP, too). Always, of course, based on the same half-baked, 
never-tested, but oft-repeated theory that reducing a few fractions of a 
kilobyte by doing partial page-reloads actually makes the web noticeably 
faster (yea right).

Shit, even in the days before 14.4 modems, let alone 56k or broadband, 
transferring the actual HTML was practically nothing, it was the 
occasional use of an image or two that slowed things down - *because 
those take a heck of a lot more bytes than HTML*. Even today, one 
gravitar image, one "share on site x" logo, or one stock photo of a 
(Continue reading)

Suliman via Digitalmars-d | 24 Apr 08:38 2014

python vs d

I am following discussions about GC and some other 'critical' 
improves in D language for a long time. I see a lot of arguments 
and heaps of code, that often hard to understand (for example 
Templates) even more complicated to use it.

I like D, but more and more I am playing with Python, and 
understanding it's philosophy. And I like it because it's do not 
have any overhead like C++. It's clean any easy to understanding. 
As result it's harder to write bad code in it.

Does anybody make tests of speed most common algorithm in D and 
Python. I am trying to understand which project better to start 
in Python and which in D.

Jon Giddy via Digitalmars-d | 24 Apr 08:13 2014

Deprecating a module

Is there a good way to deprecate a module?  The deprecated 
attribute only applies to declarations, so doesn't appear to work 
for the module header.

As a particular example, to solve problems with mismatched module 
names and pathnames, I moved some files to new locations.  To 
support anyone who was still using the old module name, I created 
a file in the location of the old module name (see 

The file uses a static module constructor to display a run-time 
warning. Since the file simply imports the new module, there 
isn't anywhere to hang a deprecated attribute, to trigger a 
compile-time warning/error.

Re: Package permission and symbol resolution

Am Tue, 22 Apr 2014 18:07:21 +1000
schrieb Manu via Digitalmars-d <digitalmars-d <at>>:

>   extern (C) void func(const(char)* pString);

By the way: What about adding nothrow there?



Re: [OT] from YourNameHere via Digitalmars-d

Am Tue, 22 Apr 2014 20:47:13 +1000
schrieb Manu via Digitalmars-d <digitalmars-d <at>>:

> On 22 April 2014 19:00, Walter Bright via Digitalmars-d
> <digitalmars-d <at>> wrote:
> > On 4/21/2014 10:49 PM, Manu via Digitalmars-d wrote:
> >>
> >> I like gmail. I've been using it for the better part of 10 years, and
> >> I can access it from anywhere. Installing client software to read
> >> email feels like I'm back on my Amiga in the 90's ;)

I feel quite the opposite. Recently my email provider lured me
into some paid option by cleverly placing a "buy" option right
after the login where you expect some "inbox" button.
With a client software you know what you have. Things don't
unexpectedly change. You can have your messages on your
computer and don't depend on internet and server uptime.
Well, I'd say that about any cloud service I guess.

> > Congrats on fixing it so it doesn't send the html version! This is much
> > better.
> Yeah sorry. I could never tell the difference. Since it's not a full
> client, it doesn't have features like raw-view or anything.

If posts actually contain something that cannot be represented
in plain text I don't mind some HTML. All posts load quickly
in Claws Mail anyways, regardless of mime-type. It's just not
so exciting to view the very same text message with a
non-default font. :p
(Continue reading)

Get-together on Friday


Sean and I are meeting in Menlo Park, CA for breakfast on Friday morning 
at 9:15 AM PST. If you are in the area, are a regular of this group, and 
would like to get together with us please email me.



Re: Redesign of

On 4/23/2014 10:02 AM, H. S. Teoh via Digitalmars-d wrote:
> On the contrary, I find almost all websites have broken layouts because
> I enforce a minimal font size of 16pt (I have a high-resolution screen)
> -- they insist on font sizes that are far too small.

This is why teams need some old codgers like me around. We don't see so good 
anymore, and need larger fonts.

The teeny-tiny fonts all come from people under 25 :-)

Ironically, the most unreadable web pages I've seen were on Haven't 
looked at it recently, but they'd use a tiny font, and make it light gray 
letters on a white background. It was literally painful to try and read it.

The current winnah for unreadable text goes to meld Ubuntu 13.10. For some 
wretched reason, 'meld' under the new Ubuntu uses a font where the letters are 
about one pixel wide meaning it's nearly impossible to even see the colored text.

Some day I'm going to pull a tape measure between my eyes and my monitor, and 
get some glasses optimized for that distance.