Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-14 Thread Jeff Nowakowski

On 03/13/2012 03:15 PM, Nick Sabalausky wrote:


That's not even an accurate comparison anyway. Disabling CSS never does much
to improve things, and usually it'll just make things *far* worse.


I disable CSS frequently in Mozilla: View - Page Style - No Style. 
This fixes a lot of annoying styles that don't respect my font settings 
or don't display well based on the width of my browser screen.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-14 Thread Steven Schveighoffer
On Mon, 12 Mar 2012 20:50:38 -0400, Era Scarecrow rtcv...@yahoo.com  
wrote:


  Let's assume you make a site for power users, those who want to buy  
computer parts and books and related stuff like that. Now if you require  
JS to have it run, and all the power users refuse to use JS, you've just  
killed all your customers. a 6 Million customers with orders which could  
get hundreds of millions of dollars, lost because a non-JS wasn't  
offered. Don't know about you, but 6 millions people could make or break  
your business (Just my opinion).


All the arguments that say you shouldn't require javascript seem to center  
around some estimated (and frankly, wildly exaggerated) number of people  
who have disabled javascript *and* won't turn it on to use a specific  
site.  It seems you all have ignored or discredited the data I quoted  
which is *actual measured data*.


If we can't agree on facts, it seems we can't really have a rational  
argument, so I'll respectfully step away from this.


-Steve


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 01:37:24AM -0400, Nick Sabalausky wrote:
[...]
 Yea, there's a lot of things that are much better done in CSS that a
 lot of people don't even know about. For example, most rollovers are
 easily doable in pure CSS. But there's a lot stuff out there
 (paricularly things created in Adobe's software) that use JS for
 rollovers, which doesn't even work as well (even with JS on).

Ugh. Don't get me started on Adobe. I don't know what they do to their
programmers, but obviously UI design is not part of their staff
training. Have you seen acrobat reader's UI? It's utterly atrocious.
Completely counterintuitive, and an embarrassment to modern UI design.
And that's their product line. Don't even mention their website.


 OTOH, I don't like CSS drop-down menus. Maybe it's different in CSS3,
 but in CSS2 the only way to make CSS menus work is for them to open
 upon rollover, not click. And dropdown menus opening upon rollover is
 just a usability mess, IMO, *and* inconsistent with pretty much any
 GUI OS I've ever used.
[...]

Hmm. I rather *like* CSS drop-down menus, actually. At least, it's *way*
better than those annoying badly-written bloated JS menus. Though if
it's not done properly, it can be an utter annoyance. E.g., if the menu
is separated from the element that triggers it by a gap of several
pixels... then it's almost impossible to actually use it. (This happens
to me a lot 'cos I fiddle with default font size settings. Which lets me
see the pervasiveness of broken pixel-dependent CSS in all its glory.
OK, I better stop now, 'cos static vs. fluid layouts are another of my
pet peeves... this thread will never end if I keep going.)


T

-- 
Amateurs built the Ark; professionals built the Titanic.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message 
news:mailman.601.1331619011.4860.digitalmar...@puremagic.com...
 On Tue, Mar 13, 2012 at 01:37:24AM -0400, Nick Sabalausky wrote:
 [...]
 Yea, there's a lot of things that are much better done in CSS that a
 lot of people don't even know about. For example, most rollovers are
 easily doable in pure CSS. But there's a lot stuff out there
 (paricularly things created in Adobe's software) that use JS for
 rollovers, which doesn't even work as well (even with JS on).

 Ugh. Don't get me started on Adobe. I don't know what they do to their
 programmers, but obviously UI design is not part of their staff
 training. Have you seen acrobat reader's UI? It's utterly atrocious.
 Completely counterintuitive, and an embarrassment to modern UI design.
 And that's their product line. Don't even mention their website.


Yea, I have a *very* low opinion of Adobe's products in general. They can 
barely get anything right, and that's on top of their sky-high prices. Each 
CS is more absurdly bloated than the last, and uses weirder and weirder 
skins, and Adobe clearly has zero understanding of security. I don't hate 
Adobe like I hate some other companies, but I consider their output to 
mostly be garbage and I hate dealing with their products (and 
documentation).

It's a shame they no longer have *really good* competition, like Paint Shop 
Pro which used to compete toe-to-toe with Photoshop and at a much lower 
price (until Corel bought it and drive it straight into the ground along 
with the rest of Corel's products). I use GIMP, but it's uhh...kind of a 
gimpy program (aptly-named).

Have you heared of the Corona SDK? It's not technically made by Adobe 
but...I'll put it this way: Corona does intially come across as fairly 
slick. But then you compare it to one of their competitors, Marmalade SDK, 
and despite Marmalade's lack of slickness, you quickly realize that 
Marmalade was made by and for grownups, while Corona...is basically just an 
overpriced toy in grown-ups clothing. *After* I came to that conclusion, I 
discovered the company which makes Corona, surprise surprise, was founded by 
former higher-ups from Adobe's Flash dept. Go figure. Flash, which can 
*also* be accurately described as an overpriced toy in grown-ups clothing.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Ary Manzana

On 03/13/2012 02:14 AM, H. S. Teoh wrote:

On Mon, Mar 12, 2012 at 10:35:54PM -0400, Nick Sabalausky wrote:

Jonathan M Davisjmdavisp...@gmx.com  wrote in message
news:mailman.572.1331601463.4860.digitalmar...@puremagic.com...

[...]

All I'm saying is that if it makes sense for the web developer to
use javascript given what they're trying to do, it's completely
reasonable to expect that their users will have javascript enabled
(since virtually everyone does). If there's a better tool for the
job which is reasonably supported, then all the better. And if it's
easy to provide a workaround for the lack of JS at minimal effort,
then great. But given the fact that only a very small percentage of
your user base is going to have JS disabled, it's not unreasonable
to require it and not worry about the people who disable it if
that's what you want to do.



Personally, I disagree with the notion that non-JS versions are a
workaround.

[...]

Me too. To me, non-JS versions are the *baseline*, and JS versions are
enchancements. To treat JS versions as baseline and non-JS versions as
workaround is just so completely backwards.


While I don't agree that non-JS is the baseline (because most if not all 
browsers come with JS enabled by default, so why would you want to 
disable javascript for?), I'm starting to understand that providing both 
non-JS and JS versions is useful.


At least so that:
 - Some users don't go mad when they can't use it, and then realise 
it's because JS is disabled

 - And for the above reason, not to loose reputation to those people :-P

But if people didn't have an option to disable JS, we wouldn't have this 
discussion. I think it as having an option to disable CSS.


(I was going to put as an argument that my cellphone didn't have an 
option to disable JS, but it does... h... :-P)


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Ary Manzana

On 03/13/2012 01:52 AM, Nick Sabalausky wrote:

Ary Manzanaa...@esperanto.org.ar  wrote in message
news:jjmhja$3a$2...@digitalmars.com...

On 03/12/2012 10:58 PM, H. S. Teoh wrote:


The problem today is that JS is the next cool thing, so everyone is
jumping on the bandwagon, and everything from a single-page personal
website to a list of links to the latest toaster oven requires JS to
work, even when it's not necessary at all. That's the silliness of it
all.


T


It's not the next cool thing. It makes thing more understandable for the
user. And it makes the web transfer less content,


That gets constantly echoed throughout the web, but it's a red herring: Even
if you handle it intelligently like Adam does (ie, lightweight), the amount
of data transfer saved is trivial. We're talking *part* of *one* measly HTML
file here. And even that can be gzipped: HTML compresses *very* well. Yes,
techincally it can be less transfer, but only negligably so. And bandwith is
the *only* possible realistic improvement here, not speed, because the speed
of even a few extra K during a transfer that was already going to happen
anyway is easily outweighed by the overhead of things like actually making a
round-trip to the server at all, plus likely querying a server-side DB, plus
interpreting JS, etc.

If, OTOH you handle it like most people do, and not like Adam does, then for
brief visits you can actually be tranferring *more* data just because of all
that excess JS boilerplate people like to use. (And then there's the
start-up cost of actually parsing all that boilerplate and then executing
their initialization portions. And in many cases there's even external JS
getting loaded in, etc.)

The problem with optimization is that it's not a clear-cut thing: If you're
not looking at it holistically, optimizing one thing can either be an
effective no-op or even cause a larger de-optimization somewhere else. So
just because you've achived the popular goal of less data transer upon
your user clicking a certain link, doesn't necessarily mean you've won a net
gain, or even broken even.


True.

I always have to remember this interesting talk about saying This is 
faster than this without a scientific proof:


http://vimeo.com/9270320


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Adam D. Ruppe

On Tuesday, 13 March 2012 at 12:22:00 UTC, Ary Manzana wrote:
But if people didn't have an option to disable JS, we wouldn't 
have this discussion. I think it as having an option to disable 
CSS.


You can disable css :P

Keeping your site working without css is a lot harder IMO
than doing the same without javascript. I often assume
display: none; will work to hide unnecessary things.

Sometimes, doing simple things with css is a bit hard too.

For example, one easy way to make a site still work without
css is to put your content at the top of the HTML page,
with  as few as possible distractions in the process.

Oh yeah, and of course, always use the proper semantic
tags, which you should do anyway. Descriptive tags
help css too!

Anyway, so, you put the navigation menus, etc., at the
bottom of the html file.


Here's the problem though: you want those menus to show
up at the top for people with css. And that is incredibly
hard to get right currently. (I think css3 will make it
easier, but IE10 is the only browser to properly support
the needed features last I checked, and IE10 has 0% market.)


But with css2, you can't float to the top you can't
display: table to the top.

The best you can do is position: absolute, which can get
you trapped in the document tree and is just generally
a pain in the butt - you have to break the natural flow.


I often just say gah to it and either minimize those
things so it isn't too big of a hassle anyway, or put
a display: none #content link at the top.

(The only people who go without css in my experience are
lynx users anyway, so making it easier to scroll past the
crap is the important thing.)




Now, here's one case I never think about: what about if
JS is enabled, and CSS is not? Now that would be weird.

Probably usable but just really weird.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Adam D. Ruppe

On Tuesday, 13 March 2012 at 05:38:44 UTC, Nick Sabalausky wrote:
OTOH, I don't like CSS drop-down menus. Maybe it's different in 
CSS3, but in CSS2 the only way to make CSS menus work is for 
them

to open  upon rollover, not click.


Yeah, the way I do it is with a hybrid approach:

menu.onclick = function() { toggleClass(this, opened); };

.with-js menu  ul {
   display: none;
   /* or if you want it to roll, use the transition */
}

.with-js menu.open  ul {
   display: block;
}


and there you go. If you ask me, most your javascripts
should be changing classes, not actually doing the
work itself. That way, you keep the clean separation -
the class just represents the current state.

(indeed, with-js is another toggled class; put a little
script in the head that adds it to the html element.)



One downside of the css3 animations though is that
doing it without fixed height kinda sucks.

I wanted a quick foldout of something for the work
site. The simple height: 0px then open means
height: auto didn't work - you can't animate
to height: auto. Which sucks and they should
fix that, but apparently Apple's developers are
too incompetent to implement it in Safari, so
it gets left out of the standard. Or something
like that. I hate the standard, the process is
biased bullshit.


Anyway, to make it work, I ended up doing this:

/* overflow: hidden rox btw, use it a lot, you'll
thank me later */
max-height: 0px; overflow: hidden; transition: max-height 0.2s;

.open { max-height: 20em; }



Which gives the effect.. but the animation is from the
numbers given, not the actual height.

So, if you say max-height: 200em for instance, and
your content is only 20em tall, the visible animation
will complete in 0.02 seconds instead of 0.2!


Thus, I decided to pick an approximately right,
and call the animation time good enough.

The problem is now though: what if you add an item
to the drop down? If you don't remember to adjust
max-height too the new thing is just hidden.


Gah, the css is now dependent on the specific
content!



But, you don't always have to do this stuff
(BTW if anyone knows a better technique, let
me know!), and even so, it beats the crap
out of javascript animations.



Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
Ary Manzana a...@esperanto.org.ar wrote in message 
news:jjne58$1ouf$1...@digitalmars.com...
 On 03/13/2012 02:14 AM, H. S. Teoh wrote:
 On Mon, Mar 12, 2012 at 10:35:54PM -0400, Nick Sabalausky wrote:
 Jonathan M Davisjmdavisp...@gmx.com  wrote in message
 news:mailman.572.1331601463.4860.digitalmar...@puremagic.com...
 [...]
 All I'm saying is that if it makes sense for the web developer to
 use javascript given what they're trying to do, it's completely
 reasonable to expect that their users will have javascript enabled
 (since virtually everyone does). If there's a better tool for the
 job which is reasonably supported, then all the better. And if it's
 easy to provide a workaround for the lack of JS at minimal effort,
 then great. But given the fact that only a very small percentage of
 your user base is going to have JS disabled, it's not unreasonable
 to require it and not worry about the people who disable it if
 that's what you want to do.


 Personally, I disagree with the notion that non-JS versions are a
 workaround.
 [...]

 Me too. To me, non-JS versions are the *baseline*, and JS versions are
 enchancements. To treat JS versions as baseline and non-JS versions as
 workaround is just so completely backwards.

 While I don't agree that non-JS is the baseline (because most if not all 
 browsers come with JS enabled by default, so why would you want to disable 
 javascript for?), I'm starting to understand that providing both non-JS 
 and JS versions is useful.

 At least so that:
  - Some users don't go mad when they can't use it, and then realise it's 
 because JS is disabled
  - And for the above reason, not to loose reputation to those people :-P

 But if people didn't have an option to disable JS, we wouldn't have this 
 discussion.[...]


Bullcrap. If people didn't have an option to disable JS, there'd be a lot 
more people using *very* *VERY* old browsers, and that would piss of 
*cough*modern*cough* webdevs even more.

The problem isn't that JS *can* be disabled. Some people *just don't want 
it*:

When they disable JS, yea, ok, on *some* sites they get a *slighty worse* 
user experience with, say, posting a comment. But it *also* gives them a 
*far BETTER* user experience on all those sites that misuse and overuse JS. 
It also increases security. The idea that JS-enabled pages are just simply 
better is patently false: Yes, *some* are *slightly* better, but many are 
*much* worse (no matter how good their respective developers believe 
themselves to be. *Everyone* believes Oh, well, when *I* use it, it works 
very well. I'm sure the Reddit developers have fooled themselves into 
thinking their site is reasonably fast).




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
Ary Manzana a...@esperanto.org.ar wrote in message 
news:jjne58$1ouf$1...@digitalmars.com...

 But if people didn't have an option to disable JS, we wouldn't have this 
 discussion. I think it as having an option to disable CSS.


That's not even an accurate comparison anyway. Disabling CSS never does much 
to improve things, and usually it'll just make things *far* worse. People 
don't fuck up CSS nearly to the extent that they fuck up JS. Hell, CSS 
*can't* be fucked up as badly as JS can be. The no JS == no CSS comparison 
is like saying Disabling JS is like disabling vowels. No, no it isn't like 
that. Not remotely.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message 
news:jjo65v$305$1...@digitalmars.com...
 Ary Manzana a...@esperanto.org.ar wrote in message 
 news:jjne58$1ouf$1...@digitalmars.com...
 On 03/13/2012 02:14 AM, H. S. Teoh wrote:
 On Mon, Mar 12, 2012 at 10:35:54PM -0400, Nick Sabalausky wrote:
 Jonathan M Davisjmdavisp...@gmx.com  wrote in message
 news:mailman.572.1331601463.4860.digitalmar...@puremagic.com...
 [...]
 All I'm saying is that if it makes sense for the web developer to
 use javascript given what they're trying to do, it's completely
 reasonable to expect that their users will have javascript enabled
 (since virtually everyone does). If there's a better tool for the
 job which is reasonably supported, then all the better. And if it's
 easy to provide a workaround for the lack of JS at minimal effort,
 then great. But given the fact that only a very small percentage of
 your user base is going to have JS disabled, it's not unreasonable
 to require it and not worry about the people who disable it if
 that's what you want to do.


 Personally, I disagree with the notion that non-JS versions are a
 workaround.
 [...]

 Me too. To me, non-JS versions are the *baseline*, and JS versions are
 enchancements. To treat JS versions as baseline and non-JS versions as
 workaround is just so completely backwards.

 While I don't agree that non-JS is the baseline (because most if not all 
 browsers come with JS enabled by default, so why would you want to 
 disable javascript for?), I'm starting to understand that providing both 
 non-JS and JS versions is useful.

 At least so that:
  - Some users don't go mad when they can't use it, and then realise it's 
 because JS is disabled
  - And for the above reason, not to loose reputation to those people :-P

 But if people didn't have an option to disable JS, we wouldn't have this 
 discussion.[...]


 Bullcrap. If people didn't have an option to disable JS, there'd be a lot 
 more people using *very* *VERY* old browsers, and that would piss of 
 *cough*modern*cough* webdevs even more.

 The problem isn't that JS *can* be disabled. Some people *just don't want 
 it*:

 When they disable JS, yea, ok, on *some* sites they get a *slighty worse* 
 user experience with, say, posting a comment. But it *also* gives them a 
 *far BETTER* user experience on all those sites that misuse and overuse 
 JS. It also increases security.

Oh, and with JS disabled, it's impossible for sites *cough*GitHub*cough* to 
break the back button.

The idea that JS-enabled pages are just simply better is patently false: 
Yes, *some* are *slightly* better, but many are *much* worse (no matter how 
good their respective developers believe themselves to be. *Everyone* 
believes Oh, well, when *I* use it, it works very well. I'm sure the 
Reddit developers have fooled themselves into thinking their site is 
reasonably fast).

 




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message 
news:jjmmh3$9jb$1...@digitalmars.com...
 Adam D. Ruppe destructiona...@gmail.com wrote in message 
 news:oxkxtvkuybdommyer...@forum.dlang.org...
 On Tuesday, 13 March 2012 at 04:24:45 UTC, Nick Sabalausky wrote:
 2. On the web, animation means JS.

 css3 does animations that are pretty easy to use,
 degrade well, and tend to be fast. Moreover css
 is where it belongs anyway - it is pure presentation.


 Interesting, I had no idea! Thanks for the tip :)

 Far, far superior to the JS crap.


 Yea, there's a lot of things that are much better done in CSS that a lot 
 of people don't even know about. For example, most rollovers are easily 
 doable in pure CSS. But there's a lot stuff out there (paricularly things 
 created in Adobe's software) that use JS for rollovers, which doesn't 
 even work as well (even with JS on).


Another thing is Flash. Almost *everyone* uses JS to embed flash. But *it's 
not needed*! I embed Flash with pure HTML and it works perfectly fine. Don't 
even need any server-side code! (You probably need JS to tell the user when 
they don't have Flash or, in some cases, when they don't have a new enough 
version, and suggest a download link. But including those features with JS 
still does *nothing* to prevent you from making the applet run without JS. 
And...It's not even a fallback! It's just embedding with method A instead of 
method B. And method A is, frankly, dead-simple.)




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread David Gileadi

On 3/13/12 12:28 PM, Nick Sabalausky wrote:

Another thing is Flash. Almost *everyone* uses JS to embed flash. But *it's
not needed*! I embed Flash with pure HTML and it works perfectly fine. Don't
even need any server-side code!


I thought that using JS to load Flash was to avoid Eolas lawsuits. 
http://en.wikipedia.org/wiki/Eolas, Workarounds section.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread Nick Sabalausky
David Gileadi gilea...@nspmgmail.com wrote in message 
news:jjo7vn$648$1...@digitalmars.com...
 On 3/13/12 12:28 PM, Nick Sabalausky wrote:
 Another thing is Flash. Almost *everyone* uses JS to embed flash. But 
 *it's
 not needed*! I embed Flash with pure HTML and it works perfectly fine. 
 Don't
 even need any server-side code!

 I thought that using JS to load Flash was to avoid Eolas lawsuits. 
 http://en.wikipedia.org/wiki/Eolas, Workarounds section.

Ugh, working for the USPTO should be a capital offense. So should submitting 
an application for a software patent.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-13 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 12:42:47PM -0700, David Gileadi wrote:
 On 3/13/12 12:28 PM, Nick Sabalausky wrote:
 Another thing is Flash. Almost *everyone* uses JS to embed flash. But
 *it's not needed*! I embed Flash with pure HTML and it works
 perfectly fine. Don't even need any server-side code!
 
 I thought that using JS to load Flash was to avoid Eolas lawsuits.
 http://en.wikipedia.org/wiki/Eolas, Workarounds section.

Ugh. Yet another reason to hate Flash.

How I long for the day when Flash will die a long overdue horrible
death. I would s celebrate!!


T

-- 
The diminished 7th chord is the most flexible and fear-instilling chord.
Use it often, use it unsparingly, to subdue your listeners into
submission!


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Jacob Carlborg

On 2012-03-11 20:55, Nick Sabalausky wrote:

Mobile sites have traditionally required less-fancy implementations, so it's
not unreasonable to think that some sites would use their mobile version
*as* their low-tech fallback version. That's becoming less and less true
these days, of course. But looking at http://m.drdobbs.com/ I have a strong
feeling that was originally created for things like AvantGo (ie, on PalmOS)
which really were very limited: no JS, no nested tables, very low
resolution, often not even any color, very low memory, etc. Not that
anything about what they're doing really makes a whole lot of sense anyway,
though.


Actually, on some sites I use the mobile version, on the desktop. Just 
because it's so much more clean and not as verbose.


--
/Jacob Carlborg


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Steven Schveighoffer

On Sat, 10 Mar 2012 14:41:53 -0500, Nick Sabalausky a@a.a wrote:

You know what I think it is (without actually looking at the code): I  
think
they tried to do some highly misguided and even more poorly implemented  
hack

(which they no-doubt thought was clever) for dealing with *cough* old
*cough* browsers by inserting a meta redirect to a hardcoded URL, and  
then
used JS to disable the meta redirect. If that's the case, I don't know  
how

the fuck they managed to convince themselves that make one drop of sense.


It could be that they don't care to cater to people who hate JS.  There  
aren't that many of you.


You may want to consider -- if you on principle don't view pages with  
information because the pages contain JS, you are the one missing out on  
the information.


If you worked for my company, and you didn't like JS, you'd have a tough  
(actually impossible) time using the web application we have for tracking  
things.


-Steve


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Steven Schveighoffer
On Sat, 10 Mar 2012 00:06:40 -0500, Andrei Alexandrescu  
seewebsiteforem...@erdani.org wrote:



Insert obligatory link: http://drdobbs.com/184401197

Very insightful article.


Interesting point to make about D, however.  It's really *difficult* to  
make related non-member non-friend functions, since all functions inside  
the same module as a type are friends.  In order to follow the  
recommendations, D non-member non-friend functions must go in another  
*module*.


I don't necessarily agree with the argument, because it's a  
fully-objective view of something that is very subjective.


For instance:

class A
{
   private int a;
}

class B
{
   private int b;
}

void nonMemberBFunction(B b)
{
   b.b = 5;
}

Not only is nonMemberBFunction potentially dependent on B's  
implementation, but it's also potentially dependent (by Scott's rules) on  
A's implementation.  Therefore, A has less encapsulation.


But any sane person can see that nonMemberBFunction does not access A.   
Since everything to be examined/updated when updating A's implementation  
is in the same file (and that implementation is readily available), I  
think you should not count non-member functions that don't *access* the  
class in question against the encapsulation factor.  Yes, this makes  
things more reliant on convention (i.e. denote in documentation somehow  
what functions access private data), but since you can't turn friends off  
without extreme practices, I don't think you have any other sane choices.


In D, interestingly, making things member functions is not any different  
than making them non-members, it seems.  In fact, I'd argue it's *more*  
appropriate in D to make things member functions, since it serves as  
implicit documentation that it likely accesses only the class members.  I  
wonder what Scott would say about that?


-Steve


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Steven Schveighoffer
On Sun, 11 Mar 2012 00:18:31 -0500, Daniel Murphy  
yebbl...@nospamgmail.com wrote:



Nick Sabalausky a@a.a wrote in message
news:jjh9uh$1vto$1...@digitalmars.com...


My understanding is that the *only* thing preventing vitrual template
functions is the possibility of pre-compiled closed-source static libs.
Which is why I've long been in favor of allowing vitrual template
functions *as long as* there's no closed-source static libs preventing  
it.

Why should OSS have to pay costs that only apply to closed source?



That's not really it...

The problem is that vtables contain every virtual function of a class -  
and
if you instantiate a template function with a new type, it would require  
a
new vtable entry.  Therefore you need to know how every template  
function in

every derived class is instantiated before you can build the base class
vtable.  This doesn't work with D's compilation model.


You could do it if the vtable was a hash instead of an array (or at least  
the template portion was).  But that's just asking for horrible  
performance, and I don't think it's worth it.


But I think it is possible...

-Steve


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message 
news:op.wa1432xjeav7ka@localhost.localdomain...
 On Sat, 10 Mar 2012 14:41:53 -0500, Nick Sabalausky a@a.a wrote:

 You know what I think it is (without actually looking at the code): I 
 think
 they tried to do some highly misguided and even more poorly implemented 
 hack
 (which they no-doubt thought was clever) for dealing with *cough* old
 *cough* browsers by inserting a meta redirect to a hardcoded URL, and 
 then
 used JS to disable the meta redirect. If that's the case, I don't know 
 how
 the fuck they managed to convince themselves that make one drop of sense.

 It could be that they don't care to cater to people who hate JS.  There 
 aren't that many of you.


There are enough. And it's beside the point anyway. Things that don't need 
JS sholdn't be using JS anyway, regardless of whether you hate it or have 
enough brain damage to think it's the greatest thing since the transistor.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message 
news:op.wa1432xjeav7ka@localhost.localdomain...

 You may want to consider -- if you on principle don't view pages with 
 information because the pages contain JS, you are the one missing out on 
 the information.


And it's not on principle, I just find it not usually worth bothering. I'd 
rather just move on to something else that's actually well designed. Problem 
though is when content gets *tied* to such moronic things. Even if 99% of 
people don't hate JS, these uses of it *are* still moronic bullshit.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message 
news:op.wa16bibneav7ka@localhost.localdomain...
 On Sat, 10 Mar 2012 00:06:40 -0500, Andrei Alexandrescu 
 seewebsiteforem...@erdani.org wrote:

 Insert obligatory link: http://drdobbs.com/184401197

 Very insightful article.

 Interesting point to make about D, however.  It's really *difficult* to 
 make related non-member non-friend functions, since all functions inside 
 the same module as a type are friends.

Geez, I *still* keep forgetting about that. And I'm not sure I've ever 
really found it particularly useful. I'd be happy to see that go away in D3. 
Acually, I'd argue in favor of changing private to module (much like how 
we have the package access specifier) and then adding a more traditional 
private. I doubt any of this will ever actually happen. But, oh well, one 
can dream.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Steven Schveighoffer

On Mon, 12 Mar 2012 15:27:30 -0400, Nick Sabalausky a@a.a wrote:


Steven Schveighoffer schvei...@yahoo.com wrote in message
news:op.wa1432xjeav7ka@localhost.localdomain...

On Sat, 10 Mar 2012 14:41:53 -0500, Nick Sabalausky a@a.a wrote:


You know what I think it is (without actually looking at the code): I
think
they tried to do some highly misguided and even more poorly implemented
hack
(which they no-doubt thought was clever) for dealing with *cough* old
*cough* browsers by inserting a meta redirect to a hardcoded URL, and
then
used JS to disable the meta redirect. If that's the case, I don't know
how
the fuck they managed to convince themselves that make one drop of  
sense.


It could be that they don't care to cater to people who hate JS.  There
aren't that many of you.



There are enough.


Apparently not.  
http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/


I'm perfectly willing to give up on 1-2% of Internet users who have JS  
disabled.



And it's beside the point anyway. Things that don't need
JS sholdn't be using JS anyway, regardless of whether you hate it or have
enough brain damage to think it's the greatest thing since the  
transistor.


No, it *is* the point.  As a web developer, javascript is used by the vast  
majority of users, so I assume it can be used.  If you don't like that, I  
guess that's too bad for you, you may go find content elsewhere.  It's not  
worth my time to cater to you.


It's like saying you think cell phones are evil, and refuse to get one.   
But then complain that there are no pay phones for you to use, and demand  
businesses install pay phones in case people like you want to use them.


That being said, I found it quite funny that wikipedia last year blacked  
out itself using javascript.  I just so happened to want to quote  
something from wikipedia, and noticed the site came up, then had a black  
page put over it.  I just disabled javascript, and could happily use the  
site, posting the link (of course, I had to mention it would only work  
tomorrow when the blackout ended).


-Steve


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Era Scarecrow
It could be that they don't care to cater to people who hate 
JS.  There

aren't that many of you.



There are enough.


Apparently not. 
http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/


I'm perfectly willing to give up on 1-2% of Internet users who 
have JS disabled.


 I use NoScript, so by default my JS is disabled for 99% of the 
sites I go to. That means you'll give up on me? Hmm :(



And it's beside the point anyway. Things that don't need
JS sholdn't be using JS anyway, regardless of whether you hate 
it or have
enough brain damage to think it's the greatest thing since the 
transistor.


No, it *is* the point.  As a web developer, javascript is used 
by the vast majority of users, so I assume it can be used.  If 
you don't like that, I guess that's too bad for you, you may go 
find content elsewhere.  It's not worth my time to cater to you.


 Unfortunately I need to disagree with you there. JS although is 
nice sometimes, I find more often a pain in the butt rather than 
a help. NoScript shows on quite a few sites that they have some 
10 or 20 sites they reference JS scripts from, which doesn't make 
sense. half of those sites tend to be statistic gathering sites, 
which I don't particularly trust. Actually I don't trust a lot of 
sites.


 Plus I'm a little more anal about what does and does not run on 
my computer; Last think I need when I open a Page is it loads ten 
or twenty extra things I don't care about, takes up resources I 
don't want to give up, uses more memory, and for a tiny 
convenience, or trying to make it more an 'application' 
experience rather than a web Page. In my mind, JS should be used 
to help you where HTML and CSS cannot go. Checking inputs for a 
form post, some menus, etc.


 I have refused to go to some sites that require you to disable 
NoScript or Adblocker Plus; I'm willing to allow access past 
those features it for my one or two visits but I refuse to 
disable/remove it. I just feel safer that way. I wonder if I 
didn't have it, how many gigs I would be waiting and using for 
ads and other useless crap.


It's like saying you think cell phones are evil, and refuse to 
get one.  But then complain that there are no pay phones for 
you to use, and demand businesses install pay phones in case 
people like you want to use them.


 Maybe... I consider myself simple and practical; I use features 
and items that serve their purpose (Usually specific). I enjoy a 
simple cell phone, no bells, no whistles. Give me access to 
dialing a number, hold a small list of names and numbers I dial 
recently or enter in, time and date. That's all I ever want. 
Instead they are pushing cell phones that are actually 
mini-computers (Android and smart phones); Nothing wrong with 
that I guess, but I just want a phone, nothing special.


 In the same regard you can compare that people could refuse to 
use a phone booth unless it has a computer hooked up, internet 
access, use it to check email and browse while you talk, or 
doesn't allow you to send text messages and enter a quarter to 
send it, and doesn't have a camera you can snap a picture of 
yourself to show how good or drunk you are to your friends.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Steven Schveighoffer
On Mon, 12 Mar 2012 17:19:49 -0400, Era Scarecrow rtcv...@yahoo.com  
wrote:


Apparently not.  
http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/


I'm perfectly willing to give up on 1-2% of Internet users who have JS  
disabled.


  I use NoScript, so by default my JS is disabled for 99% of the sites I  
go to. That means you'll give up on me? Hmm :(


Yep.  Sorry to be harsh about it, but if you really don't want to use my  
application the way it's intended, I have no way of helping you.


No, it *is* the point.  As a web developer, javascript is used by the  
vast majority of users, so I assume it can be used.  If you don't like  
that, I guess that's too bad for you, you may go find content  
elsewhere.  It's not worth my time to cater to you.


  Unfortunately I need to disagree with you there. JS although is nice  
sometimes, I find more often a pain in the butt rather than a help.  
NoScript shows on quite a few sites that they have some 10 or 20 sites  
they reference JS scripts from, which doesn't make sense. half of those  
sites tend to be statistic gathering sites, which I don't particularly  
trust. Actually I don't trust a lot of sites.


In the case of my web apps, they do *not* pull JS from other sites.  I  
understand and sympathize with your rationale.  It's just not enough,  
however, to make web developers who want their site to appear a certain  
way care about the market share that your opinion represents.  I'm  
perfectly willing to lose 1-2% of users in order to *not* test browsers in  
all kinds of weird configurations.  It's the same reason most web sites  
test only with the major browsers.


It's like saying you think cell phones are evil, and refuse to get  
one.  But then complain that there are no pay phones for you to use,  
and demand businesses install pay phones in case people like you want  
to use them.


  Maybe... I consider myself simple and practical; I use features and  
items that serve their purpose (Usually specific). I enjoy a simple cell  
phone, no bells, no whistles. Give me access to dialing a number, hold a  
small list of names and numbers I dial recently or enter in, time and  
date. That's all I ever want. Instead they are pushing cell phones that  
are actually mini-computers (Android and smart phones); Nothing wrong  
with that I guess, but I just want a phone, nothing special.


  In the same regard you can compare that people could refuse to use a  
phone booth unless it has a computer hooked up, internet access, use it  
to check email and browse while you talk, or doesn't allow you to send  
text messages and enter a quarter to send it, and doesn't have a camera  
you can snap a picture of yourself to show how good or drunk you are to  
your friends.


This situation (where payphones were obsolete) existed long before the  
smartphone craze.


-Steve


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message 
news:op.wa2pimkxeav7ka@localhost.localdomain...
 On Mon, 12 Mar 2012 15:27:30 -0400, Nick Sabalausky a@a.a wrote:

 Steven Schveighoffer schvei...@yahoo.com wrote in message
 news:op.wa1432xjeav7ka@localhost.localdomain...
 On Sat, 10 Mar 2012 14:41:53 -0500, Nick Sabalausky a@a.a wrote:

 You know what I think it is (without actually looking at the code): I
 think
 they tried to do some highly misguided and even more poorly implemented
 hack
 (which they no-doubt thought was clever) for dealing with *cough* old
 *cough* browsers by inserting a meta redirect to a hardcoded URL, and
 then
 used JS to disable the meta redirect. If that's the case, I don't know
 how
 the fuck they managed to convince themselves that make one drop of 
 sense.

 It could be that they don't care to cater to people who hate JS.  There
 aren't that many of you.


 There are enough.

 Apparently not. 
 http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/

 I'm perfectly willing to give up on 1-2% of Internet users who have JS 
 disabled.


Does nobody understand basic statistics?

First of all, 1-2% is a *hell* of a *LOT* of people. Don't be fooled by the 
seemingly small number: It's a percentage and it's out of a *very* large 
population. So 1-2% is still *huge*.

Secondly, I don't believe for a minute that such figures accurately 
represent *all* non-JS users:

A. Most non-JS users *do* occasionally switch JS on when they need to via 
NoScript, etc. So that right there is *guaranteed* to leave the results 
biased towards the use JS side.

B. Look at audience: That's *Yahoo*. How many of the technical people you 
know use Yahoo? Yahoo is primarily an Average Joe site, but disabling 
JavaScript is a power-user thing. It's not a representative sample, and it 
*certainly* can't be assumed to be applicable to something like Dr. Dobbs.

C. Things such as Google Analytics are based on JS. So right there I have 
questions about whether or not such things accurately record all non-JS 
users in the first place.


 And it's beside the point anyway. Things that don't need
 JS sholdn't be using JS anyway, regardless of whether you hate it or have
 enough brain damage to think it's the greatest thing since the 
 transistor.

 No, it *is* the point.  As a web developer, javascript is used by the vast 
 majority of users, so I assume it can be used.  If you don't like that, I 
 guess that's too bad for you, you may go find content elsewhere.  It's not 
 worth my time to cater to you.


And it's not worth my time to use your piece of shit excuse for a site.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Andrei Alexandrescu

On 3/12/12 6:02 PM, Nick Sabalausky wrote:

Does nobody understand basic statistics?


I don't see evidence they don't.


First of all, 1-2% is a *hell* of a *LOT* of people. Don't be fooled by the
seemingly small number: It's a percentage and it's out of a *very* large
population. So 1-2% is still *huge*.


This is a truism. Yeah, 1% is huge but the rest is 99 times huger. It's 
a reasonable business decision to forgo 1-2% reach (and therefore 
potential profit) if the cost of that reach is larger than the projected 
increase in the profit.



Andrei


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread David Nadlinger

On Monday, 12 March 2012 at 23:04:17 UTC, Nick Sabalausky wrote:

Does nobody understand basic statistics?

First of all, 1-2% is a *hell* of a *LOT* of people. Don't be 
fooled by the
seemingly small number: It's a percentage and it's out of a 
*very* large

population. So 1-2% is still *huge*.


And 1-2% is still 1/100 to 1/50 of all users, no matter how large 
the total number is. Arguing in absolute numbers makes no sense 
if you don't even know in advance how large your target audience 
is. What point are you trying to make here?


B. Look at audience: That's *Yahoo*. How many of the technical 
people you
know use Yahoo? Yahoo is primarily an Average Joe site, but 
disabling
JavaScript is a power-user thing. It's not a representative 
sample, and it
*certainly* can't be assumed to be applicable to something like 
Dr. Dobbs.


C. Things such as Google Analytics are based on JS. So right 
there I have
questions about whether or not such things accurately record 
all non-JS

users in the first place.


Stats are pretty much the same (98.5% among ~1 »unique« 
visitors over the last months) for my programming-centric blog, 
where I added a non-JS tracking pixel precisely because I was 
interested in whether the figures would different for tech-y 
sites.


Besides, I am totally in favor of not needlessly required JS, but 
it does have its legitimate uses.


David



Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message 
news:jjlvdh$1to3$1...@digitalmars.com...
 Steven Schveighoffer schvei...@yahoo.com wrote in message 
 news:op.wa2pimkxeav7ka@localhost.localdomain...
 On Mon, 12 Mar 2012 15:27:30 -0400, Nick Sabalausky a@a.a wrote:

 Steven Schveighoffer schvei...@yahoo.com wrote in message
 news:op.wa1432xjeav7ka@localhost.localdomain...
 On Sat, 10 Mar 2012 14:41:53 -0500, Nick Sabalausky a@a.a wrote:

 You know what I think it is (without actually looking at the code): I
 think
 they tried to do some highly misguided and even more poorly 
 implemented
 hack
 (which they no-doubt thought was clever) for dealing with *cough* 
 old
 *cough* browsers by inserting a meta redirect to a hardcoded URL, and
 then
 used JS to disable the meta redirect. If that's the case, I don't know
 how
 the fuck they managed to convince themselves that make one drop of 
 sense.

 It could be that they don't care to cater to people who hate JS.  There
 aren't that many of you.


 There are enough.

 Apparently not. 
 http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-users-have-javascript-disabled/

 I'm perfectly willing to give up on 1-2% of Internet users who have JS 
 disabled.


 Does nobody understand basic statistics?

 First of all, 1-2% is a *hell* of a *LOT* of people. Don't be fooled by 
 the seemingly small number: It's a percentage and it's out of a *very* 
 large population. So 1-2% is still *huge*.

 Secondly, I don't believe for a minute that such figures accurately 
 represent *all* non-JS users:

 A. Most non-JS users *do* occasionally switch JS on when they need to via 
 NoScript, etc. So that right there is *guaranteed* to leave the results 
 biased towards the use JS side.

 B. Look at audience: That's *Yahoo*. How many of the technical people you 
 know use Yahoo? Yahoo is primarily an Average Joe site, but disabling 
 JavaScript is a power-user thing. It's not a representative sample, and it 
 *certainly* can't be assumed to be applicable to something like Dr. Dobbs.

 C. Things such as Google Analytics are based on JS. So right there I have 
 questions about whether or not such things accurately record all non-JS 
 users in the first place.


 And it's beside the point anyway. Things that don't need
 JS sholdn't be using JS anyway, regardless of whether you hate it or 
 have
 enough brain damage to think it's the greatest thing since the 
 transistor.

 No, it *is* the point.  As a web developer, javascript is used by the 
 vast majority of users, so I assume it can be used.  If you don't like 
 that, I guess that's too bad for you, you may go find content elsewhere. 
 It's not worth my time to cater to you.


 And it's not worth my time to use your piece of shit excuse for a site.


And besides, you're still conventiently ignoring the fact that sites which 
require JS typically provide a *worse* user experience then sites that don't 
use it, *even when JS is enabled*.

So you want to say fuck off to the millions of people in that measly 
1-2% just for the sake of making your site *worse* for the other 98%? Fine, 
be a self-defeating idiot, if you insist.

And before you say No! They like it better with the JS-ness!, I'll point 
out that most people only *think* they know what they like. Don't forget 
what happened when Vladimir's D forums were posted on Reddit: All those 
JS-using redditers (reddit requires JS for most features, so it's safe to 
assume most reddit users are JS users - non-JS users are likely to avoid 
reddit) who *thought* reddit had a reasonable user-experience were absoutely 
*floored* by how fast the D forums were. (Personally, I find the D forms 
to be normal speed and reddit to be absurdly slow.) JS-users *prefer* non-JS 
sites - they're just too brainwashed to realize it.

Notice too how those forums load entire pages faster than AJAXy sites like 
GitHub do their beloved partial reloads.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message 
news:jjm057$1val$1...@digitalmars.com...
 On 3/12/12 6:02 PM, Nick Sabalausky wrote:
 Does nobody understand basic statistics?

 I don't see evidence they don't.

 First of all, 1-2% is a *hell* of a *LOT* of people. Don't be fooled by 
 the
 seemingly small number: It's a percentage and it's out of a *very* large
 population. So 1-2% is still *huge*.

 This is a truism. Yeah, 1% is huge but the rest is 99 times huger. It's a 
 reasonable business decision to forgo 1-2% reach (and therefore potential 
 profit) if the cost of that reach is larger than the projected increase in 
 the profit.


You can rationalize it by hiding behind the it's business! veil all you 
want, but at the end of the day, you're still saying fuck you to millions 
of people.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
David Nadlinger s...@klickverbot.at wrote in message 
news:zlzlrudlbyiwwmgqq...@forum.dlang.org...

 Besides, I am totally in favor of not needlessly required JS, but it does 
 have its legitimate uses.


*Using* it is fine as long as you don't go overboard. The issue is 
*requiring* it when it obviously isn't needed.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
David Nadlinger s...@klickverbot.at wrote in message 
news:zlzlrudlbyiwwmgqq...@forum.dlang.org...

 Stats are pretty much the same (98.5% among ~1 »unique« visitors over 
 the last months) for my programming-centric blog, where I added a non-JS 
 tracking pixel precisely because I was interested in whether the figures 
 would different for tech-y sites.


Maybe a stupid question, but is there anything on those pages that requires 
JS? Because if so, then naturally you'll get fewer non-JS-visiters.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Adam D. Ruppe

On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote:
at the end of the day, you're still saying fuck you to 
millions of people.


...for little to no reason. It's not like making 99% of
sites work without javascript takes *any* effort.

Indeed, going without javascript is often desirable
anyway, since no JS sites are /much/ faster than script
heavy sites.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Adam D. Ruppe destructiona...@gmail.com wrote in message 
news:npkazdoslxiuqxiin...@forum.dlang.org...
 On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote:
 at the end of the day, you're still saying fuck you to millions of 
 people.

 ...for little to no reason. It's not like making 99% of
 sites work without javascript takes *any* effort.


*Exactly*. And nobody can tell me otherwise because *I DO* exactly that sort 
of web development. Plus, it often makes for a *worse* user experience even 
when JS is on - look at Vladimir's D forums vs reddit. Vladimir put reddit 
to shame *on reddit*, for god's sake! And how many man-hours of effort do 
you think went into those D forums vs reddit?

 Indeed, going without javascript is often desirable
 anyway, since no JS sites are /much/ faster than script
 heavy sites.

Yup. Guess I already responded to this in the paragraph above :)




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Jonathan M Davis
On Tuesday, March 13, 2012 00:27:26 Adam D. Ruppe wrote:
 On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote:
  at the end of the day, you're still saying fuck you to
  millions of people.
 
 ...for little to no reason. It's not like making 99% of
 sites work without javascript takes *any* effort.
 
 Indeed, going without javascript is often desirable
 anyway, since no JS sites are /much/ faster than script
 heavy sites.

But that's a decision based on your needs as a website developer. If JS best 
suits whatever the needs of a particular website developer are, then they are 
completely justified in using it, because 99% of the people out there have it 
enabled in their browsers.

The question of whether it's the best tool for the job and whether it's 
reasonable to use it based on your customer base are two separate issues 
(except insomuch as what would be the best tool for the job _isn't_, because 
it doesn't work with the majority of your customer base - which isn't 
javascript's issue at all).

- Jonathan M Davis


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Era Scarecrow
In the case of my web apps, they do *not* pull JS from other 
sites.  I understand and sympathize with your rationale.  It's 
just not enough, however, to make web developers who want their 
site to appear a certain way care about the market share that 
your opinion represents.  I'm perfectly willing to lose 1-2% of 
users in order to *not* test browsers in all kinds of weird 
configurations.  It's the same reason most web sites test only 
with the major browsers.


 I'm reminded of a mathematical answer involving large numbers 
and theory. No I never took college level math, but I've heard 
this from somewhere: 'If you take infinity, Divide it by 
Infinity, you will still have a remainder of infinity'.


 1-2% seems small, yet large at the same time. It's not 'the 
majority' but then again 'the majority' are idiots (Example: IE 
with it's VBScript, and outlook express bypassing almost all 
security measures at the time).


 Let's assume you make a site for power users, those who want to 
buy computer parts and books and related stuff like that. Now if 
you require JS to have it run, and all the power users refuse to 
use JS, you've just killed all your customers. a 6 Million 
customers with orders which could get hundreds of millions of 
dollars, lost because a non-JS wasn't offered. Don't know about 
you, but 6 millions people could make or break your business 
(Just my opinion).


 Although unlikely, what if a number of those millions don't have 
a high speed internet connection, perhaps borrowing a connection 
from a neighbor or allotted a slow amount. Do you really want to 
wait 2-3 minutes for a Page to load when 10-15 seconds in that 
case would do for raw text (and optional pictures)?


 Personally, I've used Lynx in the past. Yes it's outdated, yes 
it is non-graphical, yes on many things. But it's fast, small, 
has a tiny footprint, and is great for quite a bit of stuff. As 
memory serves me, it was one of the best browsers I ever used.


This situation (where payphones were obsolete) existed long 
before the smartphone craze.


 Perhaps... I may be giving up my cell phone and having no phone 
connection. I'd buy a phone card soon, guess what I'd be using if 
I do need to make a phone call? :P Cell phones and TV are being 
pushed too hard, for less benefit unless you need to use them a 
lot.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Adam D. Ruppe

On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote:
But that's a decision based on your needs as a website 
developer. If JS best suits whatever the needs of a particular 
website developer are, then they are completely justified in 
using it,
because 99% of the people out there have it enabled in their 
browsers.


If it takes ten seconds to support 100% of the people out there,
why not?

Though, in the majority of cases I've done, it actually
takes no extra time at all: use things like event delegation
and standard attributes.

For example, I was making a site and the client wanted a side
navigation added. Easy:

div id=left-navigation
  a href=locationName/a
  a href=locationName/a
/div

That's the easiest way to do navigation... and it also happens
to work for everyone!

Then, he asked for a partial ajax load thing. Turns out that's
trivially easy too. On the client:

document.getElementById(left-navigation).addEventListener(
   click, function(ev) {
var element = getParent(ev.target, a);
if(!element) return;
MySite.getPageContent(element.href).
useToReplaceElement(page-content);
ev.preventDefault();
   }, false);


And on the server:

Element getPageContent(string link) {
   auto document = run(link, document);
   return document.requireElementById(page-content);
}



Boom. Now, I have the javascript he asked for, the standard
links for people who don't like that crap... and it takes no
extra work to add new links. It is just another standard link
tag.



So, then I have a comment thing kinda like reddit. I have
a Comment link that is supposed to show the form right
under.

a class=comment-linkComment/a


On the server, I do most the work:

foreach(element; document.querySelectorAll(.comment))
  element.href = comment-form?parentId= ~ 
encodeComponent(parentId);


Element commentForm(string parentId) {
   auto document = getDocument!comment-form;
   auto form = document.requireElementById!Form(comment-form);
   form.setValue(parentId, parentId);
   return form;
}


And, on the client:

function commentSubmitHandler() {
var placement = this.parentNode;
backgroundSubmit(this, function(response) {
placement.innerHTML += response;
});
return false;
}

var ch = document.getElementById(comments-holder);
ch.addEventListener(click, function(ev) {
if(!hasClass(ev, comment-link))
 return;

MySite.getPageContent(ev.href).get(function(html) {
ev.parentNode.innerHTML += html;
var forms = ev.parentNode.getElementsByTagName(form);
for(var a = 0; a  forms; a++) {
 forms[a].onsubmit = commentSubmitHandler;
}
});
}, false);



Boom, a standard link for people without JS, and the inline
comment function for people who want that.

The standard link form won't look /great/, but hey it
cost nothing extra (you have to implement a form and
form handler anyway) to implement and it works.




Now, there *are* cases where you can't do this so easily.
If you're stuck on poor PHP I'm sure this is harder than
in D too... but really, do you have one of those cases?


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Jonathan M Davis
On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote:
 On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote:
  But that's a decision based on your needs as a website
  developer. If JS best suits whatever the needs of a particular
  website developer are, then they are completely justified in
  using it,
  because 99% of the people out there have it enabled in their
  browsers.
 
 If it takes ten seconds to support 100% of the people out there,
 why not?

[snip]

 Now, there *are* cases where you can't do this so easily.
 If you're stuck on poor PHP I'm sure this is harder than
 in D too... but really, do you have one of those cases?

All I'm saying is that if it makes sense for the web developer to use 
javascript given what they're trying to do, it's completely reasonable to 
expect that their users will have javascript enabled (since virtually everyone 
does). If there's a better tool for the job which is reasonably supported, 
then all the better. And if it's easy to provide a workaround for the lack of 
JS at minimal effort, then great. But given the fact that only a very small 
percentage of your user base is going to have JS disabled, it's not 
unreasonable to require it and not worry about the people who disable it if 
that's what you want to do.

- Jonathan M Davis


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 09:17:22PM -0400, Jonathan M Davis wrote:
 On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote:
  On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote:
   But that's a decision based on your needs as a website developer.
   If JS best suits whatever the needs of a particular website
   developer are, then they are completely justified in using it,
   because 99% of the people out there have it enabled in their
   browsers.
  
  If it takes ten seconds to support 100% of the people out there, why
  not?
 
 [snip]
 
  Now, there *are* cases where you can't do this so easily.
  If you're stuck on poor PHP I'm sure this is harder than
  in D too... but really, do you have one of those cases?
 
 All I'm saying is that if it makes sense for the web developer to use
 javascript given what they're trying to do, it's completely reasonable
 to expect that their users will have javascript enabled (since
 virtually everyone does). If there's a better tool for the job which
 is reasonably supported, then all the better. And if it's easy to
 provide a workaround for the lack of JS at minimal effort, then great.
 But given the fact that only a very small percentage of your user base
 is going to have JS disabled, it's not unreasonable to require it and
 not worry about the people who disable it if that's what you want to
 do.
[...]

The complaint is not with using JS when it's *necessary*. It's with
using JS *by default*. It's with using JS just because you can, even
when it's *not needed* at all.

It's like requiring you to have a TV just to make a simple phone call.
Sure, you can do cool stuff like hooking up the remote end's webcam to
the TV and other such fluff like that. But *requiring* all of that for a
*phone call*?  Totally unnecessary, and a totally unreasonable
requirement, even if 95% (or is that 99.9%?) of all households own a TV.
(And for the record, I don't own one, and do not plan to. I know I'm in
the minority.  That doesn't negate the fact that such a requirement is
unreasonable.)

OTOH if you want to *watch a movie*, well, then requiring a TV is
completely reasonable.

The problem today is that JS is the next cool thing, so everyone is
jumping on the bandwagon, and everything from a single-page personal
website to a list of links to the latest toaster oven requires JS to
work, even when it's not necessary at all. That's the silliness of it
all.


T

-- 
Computers shouldn't beep through the keyhole.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Nick Sabalausky a@a.a wrote in message 
news:jjm0c8$1vk8$1...@digitalmars.com...
 Nick Sabalausky a@a.a wrote in message 
 news:jjlvdh$1to3$1...@digitalmars.com...
 Steven Schveighoffer schvei...@yahoo.com wrote in message 
 news:op.wa2pimkxeav7ka@localhost.localdomain...

 No, it *is* the point.  As a web developer, javascript is used by the 
 vast majority of users, so I assume it can be used.  If you don't like 
 that, I guess that's too bad for you, you may go find content elsewhere. 
 It's not worth my time to cater to you.


 And it's not worth my time to use your piece of shit excuse for a site.


 And besides, you're still conventiently ignoring the fact that sites which 
 require JS typically provide a *worse* user experience then sites that 
 don't use it, *even when JS is enabled*.

 So you want to say fuck off to the millions of people in that measly 
 1-2% just for the sake of making your site *worse* for the other 98%? 
 Fine, be a self-defeating idiot, if you insist.


I don't mean to call you personally an idiot, I apologize if it came across 
that way (as it probably did the way I worded it). I just meant it in terms 
of you as in hypothetical person, for the sake of argument. Sometimes I 
word things really badly.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread James Miller
On 13 March 2012 14:58, H. S. Teoh hst...@quickfur.ath.cx wrote:
 On Mon, Mar 12, 2012 at 09:17:22PM -0400, Jonathan M Davis wrote:
 On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote:
  On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote:
   But that's a decision based on your needs as a website developer.
   If JS best suits whatever the needs of a particular website
   developer are, then they are completely justified in using it,
   because 99% of the people out there have it enabled in their
   browsers.
 
  If it takes ten seconds to support 100% of the people out there, why
  not?

 [snip]

  Now, there *are* cases where you can't do this so easily.
  If you're stuck on poor PHP I'm sure this is harder than
  in D too... but really, do you have one of those cases?

 All I'm saying is that if it makes sense for the web developer to use
 javascript given what they're trying to do, it's completely reasonable
 to expect that their users will have javascript enabled (since
 virtually everyone does). If there's a better tool for the job which
 is reasonably supported, then all the better. And if it's easy to
 provide a workaround for the lack of JS at minimal effort, then great.
 But given the fact that only a very small percentage of your user base
 is going to have JS disabled, it's not unreasonable to require it and
 not worry about the people who disable it if that's what you want to
 do.
 [...]

 The complaint is not with using JS when it's *necessary*. It's with
 using JS *by default*. It's with using JS just because you can, even
 when it's *not needed* at all.

 It's like requiring you to have a TV just to make a simple phone call.
 Sure, you can do cool stuff like hooking up the remote end's webcam to
 the TV and other such fluff like that. But *requiring* all of that for a
 *phone call*?  Totally unnecessary, and a totally unreasonable
 requirement, even if 95% (or is that 99.9%?) of all households own a TV.
 (And for the record, I don't own one, and do not plan to. I know I'm in
 the minority.  That doesn't negate the fact that such a requirement is
 unreasonable.)

 OTOH if you want to *watch a movie*, well, then requiring a TV is
 completely reasonable.

 The problem today is that JS is the next cool thing, so everyone is
 jumping on the bandwagon, and everything from a single-page personal
 website to a list of links to the latest toaster oven requires JS to
 work, even when it's not necessary at all. That's the silliness of it
 all.


 T

 --
 Computers shouldn't beep through the keyhole.

The phrase in web development is Progressive enhancement that used
to be all the rage at one point. I miss those days...

--
James Miller


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Era Scarecrow rtcv...@yahoo.com wrote in message 
news:kbvwixcrdcgakjigj...@forum.dlang.org...

 This situation (where payphones were obsolete) existed long before the 
 smartphone craze.

  Perhaps... I may be giving up my cell phone and having no phone 
 connection. I'd buy a phone card soon, guess what I'd be using if I do 
 need to make a phone call? :P Cell phones and TV are being pushed too 
 hard, for less benefit unless you need to use them a lot.

I'm reminded of one of my favorite Futurama scenes where Hermes sees what he 
thinks is an ordinary run-of-the-mill suicide booth, realizes it's actually 
a phone, and exclaims something like Wow! They put phones in booths now? 
That's great! Now I don't have to lug this thing around everywhere! and 
tosses his cell in the trash.

I do actually miss pay phones. But at the same time, maintaining phone 
booths has *FAR* more overhead than not requiring JS, so I don't really 
complain about it. Plus I only have reason to use them maybe 1-4 times per 
*year*, wheras the web I need to use all the time.

I'd really like to get a WiFi phone actually, and use some free or cheap 
VoIP service. Yea, WiFi connections are a lot less prevailent (at least in 
the US) than cell reception, but it'd be good enough for me. You may not 
think it from the way I drone on and on in this NG, but I really don't talk 
on phones much.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Jonathan M Davis jmdavisp...@gmx.com wrote in message 
news:mailman.572.1331601463.4860.digitalmar...@puremagic.com...
 On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote:
 On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote:
  But that's a decision based on your needs as a website
  developer. If JS best suits whatever the needs of a particular
  website developer are, then they are completely justified in
  using it,
  because 99% of the people out there have it enabled in their
  browsers.

 If it takes ten seconds to support 100% of the people out there,
 why not?

 [snip]

 Now, there *are* cases where you can't do this so easily.
 If you're stuck on poor PHP I'm sure this is harder than
 in D too... but really, do you have one of those cases?

 All I'm saying is that if it makes sense for the web developer to use
 javascript given what they're trying to do, it's completely reasonable to
 expect that their users will have javascript enabled (since virtually 
 everyone
 does). If there's a better tool for the job which is reasonably supported,
 then all the better. And if it's easy to provide a workaround for the lack 
 of
 JS at minimal effort, then great. But given the fact that only a very 
 small
 percentage of your user base is going to have JS disabled, it's not
 unreasonable to require it and not worry about the people who disable it 
 if
 that's what you want to do.


Personally, I disagree with the notion that non-JS versions are a 
workaround.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Adam D. Ruppe destructiona...@gmail.com wrote in message 
news:pfaikhejyfjpbpwwq...@forum.dlang.org...

 Then, he asked for a partial ajax load thing. Turns out that's
 trivially easy too. On the client:


That reminds me: Trendy web people seem to be a bit schizophrenic (I can't 
believe I spelled that right!) when it comes to thin vs thick clients. 
They're into cloud this and cloud that, and always web-based naturally, 
so obviously they're into thin clients. But then they cram it so full of JS 
that they're literally turning their beloved thin cloud client into an 
ad-hoc thick client.

Makes me want yell at them: Just cut the crap, admit you want a think 
client, and make a *real* thick client. If you want trivial installation, 
start backing and pushing for something like 0-install. If you want 
cross-platform, use a cross-platform toolkit. You want network connectivity? 
Use curl, or any other networking lib. Ultimately, you'll get the *same* 
effect, but with better system integration, much less incompatibility 
bullshit, never have to deal with IE, don't need to wait for HTML5/canvas 
penetrarion, use whatever language you damn well please, and you get all 
these without all that middleman bloat. (And you can do more to make 
reverse engineering harder if you're into closed-source.)


 Now, there *are* cases where you can't do this so easily.
 If you're stuck on poor PHP I'm sure this is harder than
 in D too... but really, do you have one of those cases?

And even if you are stuck with PHP, you really should just be using 
something like Haxe instead. (IMO)




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message 
news:mailman.575.1331603803.4860.digitalmar...@puremagic.com...

 (And for the record, I don't own [a TV], and do not plan to. I know I'm in
 the minority.


I can somewhat relate: I have a TV, but I rarely watch broadcast programming 
anymore, just library videos.

Although even if I didn't watch videos either, I'd still want a TV just for 
gaming. I spend so much time at a computer desk, that when I unwind I want 
to do away from a desk or computer, like a living room couch. YMMV, of 
course. 




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
James Miller ja...@aatch.net wrote in message 
news:mailman.576.1331604546.4860.digitalmar...@puremagic.com...

The phrase in web development is Progressive enhancement that used
to be all the rage at one point. I miss those days...

Heh. :) So true...

I miss the days when having animations on a page was actually considered 
*bad* style. And when the big thing in web dev was minimizing page load 
(and render) time. Then flash and advanced JS came around and that 
conventional wisdom silently flipped around (like a boiled frog), and has 
stayed that way ever since.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread James Miller
On 13 March 2012 15:48, Nick Sabalausky a@a.a wrote:
 James Miller ja...@aatch.net wrote in message
 news:mailman.576.1331604546.4860.digitalmar...@puremagic.com...

The phrase in web development is Progressive enhancement that used
to be all the rage at one point. I miss those days...

 Heh. :) So true...

 I miss the days when having animations on a page was actually considered
 *bad* style. And when the big thing in web dev was minimizing page load
 (and render) time. Then flash and advanced JS came around and that
 conventional wisdom silently flipped around (like a boiled frog), and has
 stayed that way ever since.



If its any consolation, I still think in terms of page load times and
UX in terms of loading. I don't think animations in and of themselves
are a bad thing, I think the problem was GIF's and tacky animations
for the sake of it. Slide-up and slide-down animations for removal of
items and the similar are more subtle, but make things look much nicer
that sudden popping. Popping is bad UX in general, even high-graphics
games know that now, going more for mosaic fade-ins on the textures
instead.

--
James Miller


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Ary Manzana

On 03/12/2012 08:32 PM, Nick Sabalausky wrote:

Adam D. Ruppedestructiona...@gmail.com  wrote in message
news:npkazdoslxiuqxiin...@forum.dlang.org...

On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote:

at the end of the day, you're still saying fuck you to millions of
people.


...for little to no reason. It's not like making 99% of
sites work without javascript takes *any* effort.



*Exactly*. And nobody can tell me otherwise because *I DO* exactly that sort
of web development. Plus, it often makes for a *worse* user experience even
when JS is on - look at Vladimir's D forums vs reddit. Vladimir put reddit
to shame *on reddit*, for god's sake! And how many man-hours of effort do
you think went into those D forums vs reddit?


Indeed, going without javascript is often desirable
anyway, since no JS sites are /much/ faster than script
heavy sites.


Yup. Guess I already responded to this in the paragraph above :)


It's not about the speed. It's about behaviour.

Imagine I do I blog site and want people to leave comments. I decide the 
best thing for the user is to just enter the comment in a text area, 
press a button, and have the comment turn into a text block, and say 
something like Comment saved!. From a UI perspective, it's the most 
reasonable thing to do: you leave a comment, it becomes a definitive 
comment on the blog, that's it.


The implementation is straightforward (much more if I use something like 
knockoutjs): I post the comment to the server via javascript and on the 
callback, turn that editing comment into a definitive comment. Note 
that only the comment contents were transfered between the client and 
the server.


Now, I have to support people who don't like javascript (and that people 
ONLY includes developers, as most people don't even know the difference 
between google and a web browser).


To implement that I have to check for disabled javascript, and post the 
comment to a different url that will save the comment and redirect to 
the same page. First, it's a strange experience for the user: navigating 
to another page while it's really going to the same page, just with one 
more comment (and how can I make it scroll without javascript to let the 
user see the comment just created? Or should I implement an intermediate 
page saying here's your newly created comment, now go back to the 
post). Second, the whole page is transferred again! I can't see how in 
the world that is faster than not transferring anything at all.


I know, I had to transfer some javascript. But just once, since it'll be 
cached by the server. In fact, if the page has a static html which 
invokes javascript that makes callbacks, that's the most efficient thing 
to do. Because even if your comments change, the whole page remains the 
same: elements will be rendered after *just* the comment's content (in 
JSON) are transferred.


Again, I don't understand how that is slower than transferring whole 
pages the whole time.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Ary Manzana

On 03/12/2012 10:58 PM, H. S. Teoh wrote:

On Mon, Mar 12, 2012 at 09:17:22PM -0400, Jonathan M Davis wrote:

On Tuesday, March 13, 2012 01:50:29 Adam D. Ruppe wrote:

On Tuesday, 13 March 2012 at 00:25:15 UTC, Jonathan M Davis wrote:

But that's a decision based on your needs as a website developer.
If JS best suits whatever the needs of a particular website
developer are, then they are completely justified in using it,
because 99% of the people out there have it enabled in their
browsers.


If it takes ten seconds to support 100% of the people out there, why
not?


[snip]


Now, there *are* cases where you can't do this so easily.
If you're stuck on poor PHP I'm sure this is harder than
in D too... but really, do you have one of those cases?


All I'm saying is that if it makes sense for the web developer to use
javascript given what they're trying to do, it's completely reasonable
to expect that their users will have javascript enabled (since
virtually everyone does). If there's a better tool for the job which
is reasonably supported, then all the better. And if it's easy to
provide a workaround for the lack of JS at minimal effort, then great.
But given the fact that only a very small percentage of your user base
is going to have JS disabled, it's not unreasonable to require it and
not worry about the people who disable it if that's what you want to
do.

[...]

The complaint is not with using JS when it's *necessary*. It's with
using JS *by default*. It's with using JS just because you can, even
when it's *not needed* at all.

It's like requiring you to have a TV just to make a simple phone call.
Sure, you can do cool stuff like hooking up the remote end's webcam to
the TV and other such fluff like that. But *requiring* all of that for a
*phone call*?  Totally unnecessary, and a totally unreasonable
requirement, even if 95% (or is that 99.9%?) of all households own a TV.
(And for the record, I don't own one, and do not plan to. I know I'm in
the minority.  That doesn't negate the fact that such a requirement is
unreasonable.)

OTOH if you want to *watch a movie*, well, then requiring a TV is
completely reasonable.

The problem today is that JS is the next cool thing, so everyone is
jumping on the bandwagon, and everything from a single-page personal
website to a list of links to the latest toaster oven requires JS to
work, even when it's not necessary at all. That's the silliness of it
all.


T


It's not the next cool thing. It makes thing more understandable for the 
user. And it makes the web transfer less content, and leverages server 
processing time. It's the next step. It's not a backwards step. :-P


I figure then Google people are just all a bunch of idiots who just like 
JS a lot...


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
James Miller ja...@aatch.net wrote in message 
news:mailman.581.1331607750.4860.digitalmar...@puremagic.com...
 On 13 March 2012 15:48, Nick Sabalausky a@a.a wrote:
 James Miller ja...@aatch.net wrote in message
 news:mailman.576.1331604546.4860.digitalmar...@puremagic.com...

The phrase in web development is Progressive enhancement that used
to be all the rage at one point. I miss those days...

 Heh. :) So true...

 I miss the days when having animations on a page was actually considered
 *bad* style. And when the big thing in web dev was minimizing page load
 (and render) time. Then flash and advanced JS came around and that
 conventional wisdom silently flipped around (like a boiled frog), and has
 stayed that way ever since.



 If its any consolation, I still think in terms of page load times and
 UX in terms of loading. I don't think animations in and of themselves
 are a bad thing, I think the problem was GIF's and tacky animations
 for the sake of it. Slide-up and slide-down animations for removal of
 items and the similar are more subtle, but make things look much nicer
 that sudden popping. Popping is bad UX in general, even high-graphics
 games know that now, going more for mosaic fade-ins on the textures
 instead.


Yea, I do mostly agree, actually. But there is still a lot of needless 
animation (often in the form of Flash), although that does seem to be on a 
[long slow] decline. Adverts are a *big* probelm with animation (and even 
sound), though. I never actually used to mind the old banner ads, but when 
they started animating I had to install an adblocker literally just so I 
could be *capable* of reading the main content. Maybe that's just me, but 
still, accessiblity is important. Or at least *should* be considered 
important - and not just the subset of accessibility mandated by government.

As far as the typical UI animations, I think that's a much more complicated 
issue: First of all, I do agree that it *can* be good design. However, 
there's a few problems:

1. Such animations need to be *FAST*. We're talking roughly 250ms max 
(probably even less, but I'd have to play around with it to refresh my 
memory). Most UI animations are slower than this (particularly on the web - 
although many DVDs are *FAR* worse), and while it's good for first-time 
users, for everyone else it just gets in the way of getting work done and 
makes the experience feel sluggish.

2. On the web, animation means JS. But not everyone is using a browser with 
that V8 engine or whatever it's called (the one that Chrome uses). And not 
everyone is using a quad-core system with 64-bit software and 16GB or 
whatever RAM, etc. like the well-supplied web developers are likely using. 
So frequently this means very choppy, sluggish animations. And that's a much 
worse UX than popping. This also gets in the way of being able to properly 
handle #1 above, *fast* animations.

3. People have also reported that such UI animations can convey a subtle (or 
even not-so-subtle) sense of being patronized. Especially if it's a slower 
animation. I can definitely relate to this.

(Of course, if people just make real applications instead of web apps, then 
those problems would be trivially solvable.)




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Adam D. Ruppe

On Tuesday, 13 March 2012 at 04:24:45 UTC, Nick Sabalausky wrote:

2. On the web, animation means JS.


css3 does animations that are pretty easy to use,
degrade well, and tend to be fast. Moreover css
is where it belongs anyway - it is pure presentation.

Far, far superior to the JS crap.



Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread James Miller
On 13 March 2012 17:23, Nick Sabalausky a@a.a wrote:
 1. Such animations need to be *FAST*. We're talking roughly 250ms max
 (probably even less, but I'd have to play around with it to refresh my
 memory). Most UI animations are slower than this (particularly on the web -
 although many DVDs are *FAR* worse), and while it's good for first-time
 users, for everyone else it just gets in the way of getting work done and
 makes the experience feel sluggish.

 2. On the web, animation means JS. But not everyone is using a browser with
 that V8 engine or whatever it's called (the one that Chrome uses). And not
 everyone is using a quad-core system with 64-bit software and 16GB or
 whatever RAM, etc. like the well-supplied web developers are likely using.
 So frequently this means very choppy, sluggish animations. And that's a much
 worse UX than popping. This also gets in the way of being able to properly
 handle #1 above, *fast* animations.

 3. People have also reported that such UI animations can convey a subtle (or
 even not-so-subtle) sense of being patronized. Especially if it's a slower
 animation. I can definitely relate to this.

 (Of course, if people just make real applications instead of web apps, then
 those problems would be trivially solvable.)

Slow animations are a problem, but CSS transition are helping make
this less of an issue. And as long as you aren't trying to be too
over-the-top then your normally fine. Sliding tends to be ok for most
things, and fades are fast everywhere. I agree that slow animations
are annoying though, I only do it for things that are loading anyway,
so the slow animation doesn't actually slow down interaction. (I'm
talking 1-2 second-long credit card transaction situations).

--
James Miller


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Ary Manzana

On 03/13/2012 01:29 AM, James Miller wrote:

On 13 March 2012 17:07, Ary Manzanaa...@esperanto.org.ar  wrote:

On 03/12/2012 08:32 PM, Nick Sabalausky wrote:


Adam D. Ruppedestructiona...@gmail.comwrote in message
news:npkazdoslxiuqxiin...@forum.dlang.org...


On Monday, 12 March 2012 at 23:23:13 UTC, Nick Sabalausky wrote:


at the end of the day, you're still saying fuck you to millions of
people.



...for little to no reason. It's not like making 99% of
sites work without javascript takes *any* effort.



*Exactly*. And nobody can tell me otherwise because *I DO* exactly that
sort
of web development. Plus, it often makes for a *worse* user experience
even
when JS is on - look at Vladimir's D forums vs reddit. Vladimir put reddit
to shame *on reddit*, for god's sake! And how many man-hours of effort do
you think went into those D forums vs reddit?


Indeed, going without javascript is often desirable
anyway, since no JS sites are /much/ faster than script
heavy sites.



Yup. Guess I already responded to this in the paragraph above :)



It's not about the speed. It's about behaviour.

Imagine I do I blog site and want people to leave comments. I decide the
best thing for the user is to just enter the comment in a text area, press a
button, and have the comment turn into a text block, and say something like
Comment saved!. From a UI perspective, it's the most reasonable thing to
do: you leave a comment, it becomes a definitive comment on the blog, that's
it.

The implementation is straightforward (much more if I use something like
knockoutjs): I post the comment to the server via javascript and on the
callback, turn that editing comment into a definitive comment. Note that
only the comment contents were transfered between the client and the server.

Now, I have to support people who don't like javascript (and that people
ONLY includes developers, as most people don't even know the difference
between google and a web browser).

To implement that I have to check for disabled javascript, and post the
comment to a different url that will save the comment and redirect to the
same page. First, it's a strange experience for the user: navigating to
another page while it's really going to the same page, just with one more
comment (and how can I make it scroll without javascript to let the user see
the comment just created? Or should I implement an intermediate page saying
here's your newly created comment, now go back to the post). Second, the
whole page is transferred again! I can't see how in the world that is faster
than not transferring anything at all.

I know, I had to transfer some javascript. But just once, since it'll be
cached by the server. In fact, if the page has a static html which invokes
javascript that makes callbacks, that's the most efficient thing to do.
Because even if your comments change, the whole page remains the same:
elements will be rendered after *just* the comment's content (in JSON) are
transferred.

Again, I don't understand how that is slower than transferring whole pages
the whole time.


Ary, the idea is to start with the static HTML version, then
progressively add javascript to improve the functionality. If you have
javascript at your disposal, you can change the behavior of the
existing page.

Your example would be:

1. Start with normal POST-request comment form, make sure it works.
(HTTP redirect back to original page)
2. Add javascript that listens to the submit on the comment form.
2a. Stop the default submit, submit the form to the same endpoint as 1
3. On success, do your in-page comment action.

And thats about it. I'm sure you could break it down more. There's
also more you can do, most of it server-side (check for ajax post,
return JSON, etc.), but the idea is that the extra effort to support
HTML-only isn't really extra effort. Since you have to submit the form
anyway, then why not allow it to submit by regular HTTP first.

Ideally, you don't have to detect for javascript, you just have to
*shock horror* code to web standards.

--
James Miller


But the non-javascript version is a worse user experience, and it's less 
efficient. Why not make it well from scratch?


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Adam D. Ruppe

On Tuesday, 13 March 2012 at 04:07:08 UTC, Ary Manzana wrote:
The implementation is straightforward (much more if I use 
something like knockoutjs): I post the comment to the server 
via javascript and on the callback, turn that editing comment 
into a definitive comment.


It is *equally* straightforward to do this without
javascript, though it will have a page refresh.

Note that only the comment contents were transfered between the 
client and the server.


That's not relevant. Profile a web app's speed, and
you'll see there is no significant difference between
some json and a page on most internet connections.

The majority of the time is spent in javascript, then
latency between server and client. Data transfer time
is often not important.

To implement that I have to check for disabled javascript, and 
post the comment to a different url that will save the comment 
and redirect to the same page.


You're doing this wrong. Your comment form is a form, yes?
Just set the action to the same thing you'd call in
javascript.

Zero extra work.

Now, add your javascript code to the onsubmit handler.

Using my web.d:

Element addComment(int contentId, Text commentText) {
   ensureGoodPost(); // xsrf check
   auto obj = new DataObject(db, comments);
   obj.id = std.random.uniform(1, int.max);
   obj.content_id = contentId;
   obj.message = commentText.content;
   obj.commitChanges();
   // redirect redirects users, not api calls so this just works
   redirect(view-content?contentId= ~ to!string(contentId) ~ 
#c ~ obj.id;
   return renderComment(obj); // you need to be able to render 
comments on the server for full page load anyway... so just reuse 
that

}


And you can render that in javascript or html without
hassle. You can simply let the automatically created
form

To render the form in javascript:

YourSite.getAutomaticForm(addComment).appendTo(this);

to call it:

YourSite.addComment(cid, comment).appendTo(this);



Or, you can link to it:

site/add-comment?contentId=xxx

that gives the form, and POST to it will save the comment.
No JS needed, it uses standard form encoding.

Submit the form, and the redirect() sends the user
to the right place. Do the javascript submit, and the
redirect is not needed - the return value there
gets sent down.

(don't even have to write html btw!)



I make it scroll without javascript to let the user see the 
comment just created?


use an anchor in a http redirect. I don't recall if
that is quite right in IE8... but worst case, it just
ignores the anchor so the user scrolls manually. That's
graceful degredation.


In fact, if the page has a static html which invokes javascript 
that makes callbacks, that's the most efficient thing to do.


No. The more processing you do on the server, the
faster the page will be.

Paying an extra couple milliseconds on the server
is much smaller than paying for double latency
in more server round trips.


It is just like how people combine their css, js,
and images into big single files to cut down on
http requests. Do the same thing with ajax.

Now, you could cache the ajax requests too,
and save that... but there's no need when
you can just do it on the server. (and perhaps
cache the finished product)


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Ary Manzana a...@esperanto.org.ar wrote in message 
news:jjmhja$3a$2...@digitalmars.com...
 On 03/12/2012 10:58 PM, H. S. Teoh wrote:

 The problem today is that JS is the next cool thing, so everyone is
 jumping on the bandwagon, and everything from a single-page personal
 website to a list of links to the latest toaster oven requires JS to
 work, even when it's not necessary at all. That's the silliness of it
 all.


 T

 It's not the next cool thing. It makes thing more understandable for the 
 user. And it makes the web transfer less content,

That gets constantly echoed throughout the web, but it's a red herring: Even 
if you handle it intelligently like Adam does (ie, lightweight), the amount 
of data transfer saved is trivial. We're talking *part* of *one* measly HTML 
file here. And even that can be gzipped: HTML compresses *very* well. Yes, 
techincally it can be less transfer, but only negligably so. And bandwith is 
the *only* possible realistic improvement here, not speed, because the speed 
of even a few extra K during a transfer that was already going to happen 
anyway is easily outweighed by the overhead of things like actually making a 
round-trip to the server at all, plus likely querying a server-side DB, plus 
interpreting JS, etc.

If, OTOH you handle it like most people do, and not like Adam does, then for 
brief visits you can actually be tranferring *more* data just because of all 
that excess JS boilerplate people like to use. (And then there's the 
start-up cost of actually parsing all that boilerplate and then executing 
their initialization portions. And in many cases there's even external JS 
getting loaded in, etc.)

The problem with optimization is that it's not a clear-cut thing: If you're 
not looking at it holistically, optimizing one thing can either be an 
effective no-op or even cause a larger de-optimization somewhere else. So 
just because you've achived the popular goal of less data transer upon 
your user clicking a certain link, doesn't necessarily mean you've won a net 
gain, or even broken even.

 and leverages server processing time. It's the next step. It's not a 
 backwards step. :-P


It's the *newer* step. It may be the future, but that's irrelevent: The 
question here is whether it's *good*, not whether it's popular or 
ubiquitous. Most real-world uses of it *are*, objectively, backwards steps.

 I figure then Google people are just all a bunch of idiots who just like 
 JS a lot...

Probably not all of them, but for the most part I frequently get that 
impression. Plus, keep in mind too, they have a *clear vested interest* in 
treating the web as a platform. Their whole business model relies on the web 
being treating as a platform. That, in turn, creates a (self-serving) need 
for them to push JS *regardless* of JS's merit. Without ubiquitus JS, the 
web has an even harder time competing with real platforms, and that pulls 
the rug out from under Google. They *are* a major corporation, never forget 
that.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 05:27:27AM +0100, Adam D. Ruppe wrote:
 On Tuesday, 13 March 2012 at 04:24:45 UTC, Nick Sabalausky wrote:
 2. On the web, animation means JS.
 
 css3 does animations that are pretty easy to use,
 degrade well, and tend to be fast. Moreover css
 is where it belongs anyway - it is pure presentation.
 
 Far, far superior to the JS crap.

+1.


T

-- 
Real men don't take backups. They put their source on a public
FTP-server and let the world mirror it. -- Linus Torvalds


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread H. S. Teoh
On Mon, Mar 12, 2012 at 10:35:54PM -0400, Nick Sabalausky wrote:
 Jonathan M Davis jmdavisp...@gmx.com wrote in message 
 news:mailman.572.1331601463.4860.digitalmar...@puremagic.com...
[...]
  All I'm saying is that if it makes sense for the web developer to
  use javascript given what they're trying to do, it's completely
  reasonable to expect that their users will have javascript enabled
  (since virtually everyone does). If there's a better tool for the
  job which is reasonably supported, then all the better. And if it's
  easy to provide a workaround for the lack of JS at minimal effort,
  then great. But given the fact that only a very small percentage of
  your user base is going to have JS disabled, it's not unreasonable
  to require it and not worry about the people who disable it if
  that's what you want to do.
 
 
 Personally, I disagree with the notion that non-JS versions are a
 workaround.
[...]

Me too. To me, non-JS versions are the *baseline*, and JS versions are
enchancements. To treat JS versions as baseline and non-JS versions as
workaround is just so completely backwards.


T

-- 
There are three kinds of people in the world: those who can count, and those 
who can't.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread James Miller
On 13 March 2012 17:31, Ary Manzana a...@esperanto.org.ar wrote:

 Ideally, you don't have to detect for javascript, you just have to
 *shock horror* code to web standards.

 --
 James Miller


 But the non-javascript version is a worse user experience, and it's less
 efficient. Why not make it well from scratch?

Because my way works for everybody, and well for people with
javascript. Your way eliminates everybody without javascript. It is
barely any extra work to set it up this way (all the logic you had to
do anyway, just have to think about it better), and 99% of people get
the exact same experience, and 1% still get to use your site.
Everybody wins.

This isn't some JS vs NoJS debate, this is JS-only vs Progressive
Enhancement. And for the record, GMail has a HTML-only version, and
most of the other products work, if with reduced functionality,
without javascript. I just tested search, it worked fine.

--
James Miller


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread H. S. Teoh
On Tue, Mar 13, 2012 at 06:13:53PM +1300, James Miller wrote:
[...]
 This isn't some JS vs NoJS debate, this is JS-only vs Progressive
 Enhancement. And for the record, GMail has a HTML-only version, and
 most of the other products work, if with reduced functionality,
 without javascript. I just tested search, it worked fine.
[...]

Data point. After google started adding JS enhancements to their search
results page and the JS keyboard shortcuts conflicted with my browser
custom key bindings, I turned off JS for www.google.com (shock!
horror!).

And guess what? It went back to the same behaviour it used to have
before the JS enhancements. ON THE SAME HTML PAGE. No loss in
functionality at all. See, now that's an example of web coding done
right. The HTML provides the baseline functionality, and if the user has
JS, then she gets the enhanced functions. Everybody wins. This is how
web standards were designed to work, in the first place.

And this takes no extra effort at all. The HTML is supposed to express
the logical structure of the page anyway, so using form and form
elements *should* be done anyways. You get baseline functionality for
free. Then layer JS on top of that to do whatever fancy effects you
want -- which you wanted to do anyway. So it's the same amount of work
for *much* better graceful degradation.

As opposed to writing the site with JS from the get-go, which has no
graceful degradation, *and* often turns out to be much uglier (you end
up with lots of JS just outputting HTML into the DOM, which should've
just been put into the HTML file in the first place).


T

-- 
Государство делает вид, что платит нам зарплату, а мы делаем вид, что
работаем.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Ary Manzana a...@esperanto.org.ar wrote in message 
news:jjmiip$2c2$1...@digitalmars.com...

 But the non-javascript version is a worse user experience, and it's less 
 efficient. Why not make it well from scratch?

Because it's trivially easy to do, and it *is* a better experience than: a 
user goes to your page, tries to add a comment, finds that This fucking 
thing doesn't even work, WTF? It's just a goddamn form submission! How do 
you screw that up? and then if they still care, enable JS and then reload 
the page, possibly much more slowly this time, reenter the captcha and try 
again. You can argue that everyone should just conform and keep JS on!, 
but that's never going to happen (and for legitimate reasons). Besides, as 
developers, it's *our* responsibility, not the user's, to make things just 
work.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-12 Thread Nick Sabalausky
Adam D. Ruppe destructiona...@gmail.com wrote in message 
news:oxkxtvkuybdommyer...@forum.dlang.org...
 On Tuesday, 13 March 2012 at 04:24:45 UTC, Nick Sabalausky wrote:
 2. On the web, animation means JS.

 css3 does animations that are pretty easy to use,
 degrade well, and tend to be fast. Moreover css
 is where it belongs anyway - it is pure presentation.


Interesting, I had no idea! Thanks for the tip :)

 Far, far superior to the JS crap.


Yea, there's a lot of things that are much better done in CSS that a lot of 
people don't even know about. For example, most rollovers are easily doable 
in pure CSS. But there's a lot stuff out there (paricularly things created 
in Adobe's software) that use JS for rollovers, which doesn't even work as 
well (even with JS on).

OTOH, I don't like CSS drop-down menus. Maybe it's different in CSS3, but in 
CSS2 the only way to make CSS menus work is for them to open upon rollover, 
not click. And dropdown menus opening upon rollover is just a usability 
mess, IMO, *and* inconsistent with pretty much any GUI OS I've ever used.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message 
news:mailman.454.1331448329.4860.digitalmar...@puremagic.com...
 On Sat, Mar 10, 2012 at 09:14:26PM -0500, Nick Sabalausky wrote:
 H. S. Teoh hst...@quickfur.ath.cx wrote in message
 news:mailman.447.1331426602.4860.digitalmar...@puremagic.com...
 [...]
  In the past, I've even used UserJS to *edit* the site's JS on the
  fly to rewrite stupid JS code (like replace sniffBrowser() with a
  function that returns true, bwahahaha) while leaving the rest of the
  site functional.  I do not merely hate Javascript, I fight it, kill
  it, and twist it to my own sinister ends.  :-)
 

 I admire that :) Personally, I don't have the patience. I just bitch
 and moan :)

 Well, that was in the past. Nowadays they've smartened up (or is it
 dumbened down?) with the advent of JS obfuscators. Which, OT1H, is silly
 because anything that the client end can run will eventually be cracked,
 so it actually doesn't offer *real* protection in the first place, and
 OTOH annoying 'cos I really can't be bothered to waste the time and
 effort to crack some encrypted code coming from some shady site that
 already smells of lousy design and poor implementation anyway.

 So I just leave and never come back to the site.


I'd prefer to do that (leave and never come back), but unfortunately, the 
modern regression of tying data/content to the interface often makes that 
impossible:

For example, I can't see what materials my library has available, or manage 
my own library account, without using *their* crappy choice of software. 
It's all just fucking data! Crap, DBs are an age-old thing.

Or, I'd love to be able leave GitHub and never come back. But DMD is on 
GitHub, so I can't create/browse/review pull requests, check what public 
forks are available, etc., without using GitHub's piece of shit site.

I'd love to leave Google Code, Google Docs and YouTube and never come back, 
but people keep posting their content on those shitty sites which, 
naturally, prevent me from accessing said content in any other way.

Etc...

And most of that is all just because some idiots decided to start treating a 
document-transmission medium as an applications platform.

I swear to god, interoperability was better in the 80's.

(And jesus christ, *Google Docs*?!? How the fuck did we ever get a document 
platform *ON TOP* of a fucking *DOCUMENT PLATFORM* and have people actually 
*TAKE IT SERIOUSLY*!?! Where the hell was I when they started handing out 
the free crazy-pills?)


 [...]
 In 1994, games had to come with their own sound/video drivers. In
 1995, MS fixed that and there was much rejoicing.

 But in 2012:

 - Every piece of content is packaged with a pre-chosen viewer.

 Blame flash. And JS.


It's more than that. Even without one line of JS or Flash, a purely 
(X)HTML/CSS web app is *still* likely tying content to interface. The only 
exceptions are things like forum.dlang.org which merely present data from an 
already-publically-accessible external source. Of course, even *then* the 
URLs are still tied to the (inevitably web-based) NG client (What's needed 
is a universal NNTP URL system that's 100% independent of NG client - Just 
like we already have for HTTP, and FTP, and SSH and five billion other damn 
things. Image that!)


 [...]
 - If you want to use GitHub/BitBucket-style DVCS features you have to
 use whichever interface is *provided* by whoever's hosting the repo.
 BitBucket can't access GitHub-hosted repos/projects. GitHub can't
 acces BitBucket-histed repos/projects. Neither can access local or
 self-hosted repos/projects. WTF is this, 1990 all over again?

 Yeah seriously. So much for semantic web. Smells like a pipe dream to
 me.


Yup. Fortunately, HTTP APIs are becoming more and more common though, so at 
least there's that ray of hope that some of those can consolodate into some 
standards.

Speaking of all of this though, I have to *rave* about Linode: I just 
switched to them from my old (and recently bought-out) shared web host a few 
days ago, and already I *LOVE* it. Not only is it a fantastic service all 
around, and they *actually* seem to know what they're doing (unlike *every* 
shared web host I've *ever* encountered), but *everything* about their site 
and control panel is *PERFECT*. Absolutely flawless, from the functionality 
and content, to the security, the speed, the compatibility and graceful 
degredation, all the way down to just simply the *style*: Flawless every 
step of the way. And they offer an HTTP API for the control panel. I can't 
remember the last time I saw a site this *professional* and well built. It's 
one of those exceedingly rare things that's created by grown-ups, for 
grown-ups. I'm genuinely stunned by it.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Nick Sabalausky
Daniel Murphy yebbl...@nospamgmail.com wrote in message 
news:jjhcj8$25sv$1...@digitalmars.com...
 Nick Sabalausky a@a.a wrote in message 
 news:jjh9uh$1vto$1...@digitalmars.com...

 My understanding is that the *only* thing preventing vitrual template 
 functions is the possibility of pre-compiled closed-source static libs. 
 Which is why I've long been in favor of allowing vitrual template 
 functions *as long as* there's no closed-source static libs preventing 
 it. Why should OSS have to pay costs that only apply to closed source?


 That's not really it...

 The problem is that vtables contain every virtual function of a class - 
 and if you instantiate a template function with a new type, it would 
 require a new vtable entry.  Therefore you need to know how every template 
 function in every derived class is instantiated before you can build the 
 base class vtable.  This doesn't work with D's compilation model.


Right, but when I tell something like rdmd to pass all my files into DMD, 
then DMD *does* have all the information needed. I understand that it can't 
be done in *all* build setups, but it would seem to be possible in many 
build setups, so why should *all* projects suffer when really only *some* 
projects have to have that limitation? That's what I've never understood.


 Now, as for whether or not D actually *does* omit the vtable entry for 
 non-override finals, I wouldn't know. Although I seem to vaguely remember 
 doing optimizations once that seemed to imply it did. If that's so, I 
 don't know whether its guaranteed per D spec or just 
 implementation-defined. A UFCS approach would definitely be guaranteed 
 not to affect the vtable, of course.


 D (dmd) does not create a vtable entry for final functions that don't 
 override anything.  It's in the frontend, so it should be the same for all 
 the d compilers.

I see. Thanks.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message 
news:mailman.453.1331446837.4860.digitalmar...@puremagic.com...
 On Sat, Mar 10, 2012 at 11:31:47PM -0500, Nick Sabalausky wrote:
 H. S. Teoh hst...@quickfur.ath.cx wrote in message
 news:mailman.436.1331412193.4860.digitalmar...@puremagic.com...
 [...]
 My understanding is that the *only* thing preventing vitrual template
 functions is the possibility of pre-compiled closed-source static
 libs.  Which is why I've long been in favor of allowing vitrual
 template functions *as long as* there's no closed-source static libs
 preventing it. Why should OSS have to pay costs that only apply to
 closed source?

 I thought the reason was that every instance of the template will need a
 vtable entry, and the compiler may not be able to know beforehand which
 instances will actually exist? You *could* in theory have the compiler
 scan the entire program for all instances, I suppose, but that will
 prevent incremental compilation and loading of dynamic libs, OSS or not.
 Plus it may slow down the compiler significantly.


What I'm suggesting is flipping that around: Instead of saying Virtual 
template functions prevent incremental compilation and dynamic libs: And 
that's an unreasonable limitation, we say Incremental compilation and 
dynamic libs prevent virtual template functions: So *if you need to use 
those*, you can't use virtual template functions.

Keep in mind too, that even incremental compilation and dynamic libs *can* 
still work with virtual template functions *provided that* there's no 
overriding across compilation unit boundaries. I don't think that's a 
totally unreasonable limitation for virtual template functions to be 
worthwhile for _many_ people, even if it doesn't make virtual template 
functions practical for *everyone*.


 [...]
 Another great one, which is very similar to one I've enjoyed
 repeating:

 What are a redneck's last words? Hey y'all, watch this!
 [...]

 And another one in response:

 Famous last words: I *think* this will work...


Yet another one, I just recently came across (not actually for real, but it 
would be funny):

Written on someone's tombstone: I *told* you I was sick!

Along similar lines (this one's a true story), my Dad's Aunt and Uncle 
bought their own tombstone ahead of time, and had their picture taken 
sitting on each side of it, both of them smoking. (The irony was, of course, 
deliberate. My family's a bit weird ;) )




[OT] Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Alix Pexton

On 11/03/2012 09:15, Nick Sabalausky wrote:



Written on someone's tombstone: I *told* you I was sick!



Spike Milligan's epitaph reads Duirt mé leat go raibh mé breoite, 
Irish for I told you I was ill.


A...


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Jacob Carlborg

On 2012-03-10 20:41, Nick Sabalausky wrote:


You know what I think it is (without actually looking at the code): I think
they tried to do some highly misguided and even more poorly implemented hack
(which they no-doubt thought was clever) for dealing with *cough* old
*cough* browsers by inserting a meta redirect to a hardcoded URL, and then
used JS to disable the meta redirect. If that's the case, I don't know how
the fuck they managed to convince themselves that make one drop of sense.


But they're redirecting to http://m.drdobbs.com/, which seems to be 
adapted for mobile devices.



When I used one of my web developer plugins to disable meta redirects, the
screwy behavior stopped. And like you, I have JS off by default (WTF do you
need JS for on a goddamn *ARTICLE*?). So that's probably what the numbnuts
over at Dr Dobbs did.


Yeah, probably.

--
/Jacob Carlborg


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Jacob Carlborg

On 2012-03-10 21:27, H. S. Teoh wrote:

On Sat, Mar 10, 2012 at 02:41:53PM -0500, Nick Sabalausky wrote:
[...]

You know what I think it is (without actually looking at the code): I
think they tried to do some highly misguided and even more poorly
implemented hack (which they no-doubt thought was clever) for dealing
with *cough* old *cough* browsers by inserting a meta redirect to a
hardcoded URL, and then used JS to disable the meta redirect. If
that's the case, I don't know how the fuck they managed to convince
themselves that make one drop of sense.

When I used one of my web developer plugins to disable meta redirects,
the screwy behavior stopped. And like you, I have JS off by default
(WTF do you need JS for on a goddamn *ARTICLE*?). So that's probably
what the numbnuts over at Dr Dobbs did.

[...]

I've always believed that Javascript is the hellspawn of evil incarnate.


I usually agree, but there are useful and cool things you can do with 
JavaScript. Two of the tools I'm using when I'm doing web development 
uses JavaScript:


* LiveReload - A browser plugin that  will automatically reload the a 
web page when a file has changed in a specified folder.


http://livereload.com/

* TextMate Rails stack trace - A greasemonkey script that will make your 
stack trace lines open in TextMate


https://github.com/ryankshaw/rails-stacktrace-textmate-linker-greasemonkey-script


--
/Jacob Carlborg


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread H. S. Teoh
On Sun, Mar 11, 2012 at 01:45:19PM +0100, Jacob Carlborg wrote:
 On 2012-03-10 21:27, H. S. Teoh wrote:
[...]
 I've always believed that Javascript is the hellspawn of evil
 incarnate.
 
 I usually agree, but there are useful and cool things you can do
 with JavaScript. Two of the tools I'm using when I'm doing web
 development uses JavaScript:
[...]

Oh, I know how useful it is. I've written some cool stuff with it too.
That's what makes it so evil. :-) It's so cool and so easy to write,
that everybody and his neighbour's dog writes it and sticks it
everywhere it doesn't belong.


T

-- 
Change is inevitable, except from a vending machine.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Ary Manzana

On 03/11/2012 05:47 AM, Nick Sabalausky wrote:

H. S. Teohhst...@quickfur.ath.cx  wrote in message
news:mailman.454.1331448329.4860.digitalmar...@puremagic.com...

On Sat, Mar 10, 2012 at 09:14:26PM -0500, Nick Sabalausky wrote:

H. S. Teohhst...@quickfur.ath.cx  wrote in message
news:mailman.447.1331426602.4860.digitalmar...@puremagic.com...

[...]

In the past, I've even used UserJS to *edit* the site's JS on the
fly to rewrite stupid JS code (like replace sniffBrowser() with a
function that returns true, bwahahaha) while leaving the rest of the
site functional.  I do not merely hate Javascript, I fight it, kill
it, and twist it to my own sinister ends.:-)



I admire that :) Personally, I don't have the patience. I just bitch
and moan :)


Well, that was in the past. Nowadays they've smartened up (or is it
dumbened down?) with the advent of JS obfuscators. Which, OT1H, is silly
because anything that the client end can run will eventually be cracked,
so it actually doesn't offer *real* protection in the first place, and
OTOH annoying 'cos I really can't be bothered to waste the time and
effort to crack some encrypted code coming from some shady site that
already smells of lousy design and poor implementation anyway.

So I just leave and never come back to the site.



I'd prefer to do that (leave and never come back), but unfortunately, the
modern regression of tying data/content to the interface often makes that
impossible:

For example, I can't see what materials my library has available, or manage
my own library account, without using *their* crappy choice of software.
It's all just fucking data! Crap, DBs are an age-old thing.

Or, I'd love to be able leave GitHub and never come back. But DMD is on
GitHub, so I can't create/browse/review pull requests, check what public
forks are available, etc., without using GitHub's piece of shit site.

I'd love to leave Google Code, Google Docs and YouTube and never come back,
but people keep posting their content on those shitty sites which,
naturally, prevent me from accessing said content in any other way.

Etc...

And most of that is all just because some idiots decided to start treating a
document-transmission medium as an applications platform.

I swear to god, interoperability was better in the 80's.

(And jesus christ, *Google Docs*?!? How the fuck did we ever get a document
platform *ON TOP* of a fucking *DOCUMENT PLATFORM* and have people actually
*TAKE IT SERIOUSLY*!?! Where the hell was I when they started handing out
the free crazy-pills?)


Nick, how would you implement (protocols, architecture, whatever) an 
online document editor?


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Nick Sabalausky
Ary Manzana a...@esperanto.org.ar wrote in message 
news:jjis50$23se$1...@digitalmars.com...
 On 03/11/2012 05:47 AM, Nick Sabalausky wrote:
 H. S. Teohhst...@quickfur.ath.cx  wrote in message
 news:mailman.454.1331448329.4860.digitalmar...@puremagic.com...
 On Sat, Mar 10, 2012 at 09:14:26PM -0500, Nick Sabalausky wrote:
 H. S. Teohhst...@quickfur.ath.cx  wrote in message
 news:mailman.447.1331426602.4860.digitalmar...@puremagic.com...
 [...]
 In the past, I've even used UserJS to *edit* the site's JS on the
 fly to rewrite stupid JS code (like replace sniffBrowser() with a
 function that returns true, bwahahaha) while leaving the rest of the
 site functional.  I do not merely hate Javascript, I fight it, kill
 it, and twist it to my own sinister ends.:-)


 I admire that :) Personally, I don't have the patience. I just bitch
 and moan :)

 Well, that was in the past. Nowadays they've smartened up (or is it
 dumbened down?) with the advent of JS obfuscators. Which, OT1H, is silly
 because anything that the client end can run will eventually be cracked,
 so it actually doesn't offer *real* protection in the first place, and
 OTOH annoying 'cos I really can't be bothered to waste the time and
 effort to crack some encrypted code coming from some shady site that
 already smells of lousy design and poor implementation anyway.

 So I just leave and never come back to the site.


 I'd prefer to do that (leave and never come back), but unfortunately, the
 modern regression of tying data/content to the interface often makes that
 impossible:

 For example, I can't see what materials my library has available, or 
 manage
 my own library account, without using *their* crappy choice of software.
 It's all just fucking data! Crap, DBs are an age-old thing.

 Or, I'd love to be able leave GitHub and never come back. But DMD is on
 GitHub, so I can't create/browse/review pull requests, check what public
 forks are available, etc., without using GitHub's piece of shit site.

 I'd love to leave Google Code, Google Docs and YouTube and never come 
 back,
 but people keep posting their content on those shitty sites which,
 naturally, prevent me from accessing said content in any other way.

 Etc...

 And most of that is all just because some idiots decided to start 
 treating a
 document-transmission medium as an applications platform.

 I swear to god, interoperability was better in the 80's.

 (And jesus christ, *Google Docs*?!? How the fuck did we ever get a 
 document
 platform *ON TOP* of a fucking *DOCUMENT PLATFORM* and have people 
 actually
 *TAKE IT SERIOUSLY*!?! Where the hell was I when they started handing out
 the free crazy-pills?)

 Nick, how would you implement (protocols, architecture, whatever) an 
 online document editor?

I wouldn't make it an online editor. Just let a normal editor access remote 
files. Done. As for specifically html documents on the web, doesn't http 
already have provisions for updating anyway? Hell, the *original* web 
browser was *both* an editor and a viewer. But then Mosaic came along, 
scrapped the editor part, and everything since has followed suit.





Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Nick Sabalausky
Jacob Carlborg d...@me.com wrote in message 
news:jji5fa$qma$1...@digitalmars.com...
 On 2012-03-10 20:41, Nick Sabalausky wrote:

 You know what I think it is (without actually looking at the code): I 
 think
 they tried to do some highly misguided and even more poorly implemented 
 hack
 (which they no-doubt thought was clever) for dealing with *cough* old
 *cough* browsers by inserting a meta redirect to a hardcoded URL, and 
 then
 used JS to disable the meta redirect. If that's the case, I don't know 
 how
 the fuck they managed to convince themselves that make one drop of sense.

 But they're redirecting to http://m.drdobbs.com/, which seems to be 
 adapted for mobile devices.


Mobile sites have traditionally required less-fancy implementations, so it's 
not unreasonable to think that some sites would use their mobile version 
*as* their low-tech fallback version. That's becoming less and less true 
these days, of course. But looking at http://m.drdobbs.com/ I have a strong 
feeling that was originally created for things like AvantGo (ie, on PalmOS) 
which really were very limited: no JS, no nested tables, very low 
resolution, often not even any color, very low memory, etc. Not that 
anything about what they're doing really makes a whole lot of sense anyway, 
though.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Stewart Gordon

On 11/03/2012 19:44, Nick Sabalausky wrote:
snip

I wouldn't make it an online editor.  Just let a normal editor
access remote files.  Done.  As for specifically html documents on
the web, doesn't http already have provisions for updating anyway?


HTTP has a PUT method, but I'm not sure it's widely supported.  Nowadays, practically 
everyone uses FTP to upload web pages.  Either that or a web-based file manager such as 
free hosts tend to provide instead of FTP access.



Hell, the *original* web browser was *both* an editor and a viewer.


What kind of editor - raw HTML, WYSIWYM, WYSINWYG or something else entirely?


But then Mosaic came along, scrapped the editor part, and
everything since has followed suit.


I guess the authors of Mosaic were bothered about enabling people to browse the web, 
rather than to create web pages.


But there were a few other combined browsers and editors to come, like Netscape Navigator 
Gold (the editor part of which later broke away into Netscape Composer, or so I was told)


Stewart.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Nick Sabalausky
Stewart Gordon smjg_1...@yahoo.com wrote in message 
news:jjj6lo$2ojb$1...@digitalmars.com...
 On 11/03/2012 19:44, Nick Sabalausky wrote:
 snip
 I wouldn't make it an online editor.  Just let a normal editor
 access remote files.  Done.  As for specifically html documents on
 the web, doesn't http already have provisions for updating anyway?

 HTTP has a PUT method, but I'm not sure it's widely supported.  Nowadays, 
 practically everyone uses FTP to upload web pages.  Either that or a 
 web-based file manager such as free hosts tend to provide instead of FTP 
 access.


Yea, but it doesn't have to be that way. Browsers have moved away from HTTP 
for such things and don't even support it, so most people don't even know 
that it's always been (supposed to be) possible.

 Hell, the *original* web browser was *both* an editor and a viewer.

 What kind of editor - raw HTML, WYSIWYM, WYSINWYG or something else 
 entirely?


I'm not sure. Probably raw HTML I would guess, but obviously it could have 
been implemented to do it in any mannar. You can probably look it up on 
Wikipedia. IIRC, it was actually *named* either WWW or World Wide Web.

 But then Mosaic came along, scrapped the editor part, and
 everything since has followed suit.

 I guess the authors of Mosaic were bothered about enabling people to 
 browse the web, rather than to create web pages.

 But there were a few other combined browsers and editors to come, like 
 Netscape Navigator Gold (the editor part of which later broke away into 
 Netscape Composer, or so I was told)


Interesting, I'd never even heard of that. I think I've heard the name 
Netscape Composer but just assumed it was an email client.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-11 Thread Stewart Gordon

On 11/03/2012 22:36, Nick Sabalausky wrote:
snip

Hell, the *original* web browser was *both* an editor and a viewer.


What kind of editor - raw HTML, WYSIWYM, WYSINWYG or something else
entirely?


I'm not sure. Probably raw HTML I would guess, but obviously it could have
been implemented to do it in any mannar. You can probably look it up on
Wikipedia. IIRC, it was actually *named* either WWW or World Wide Web.

snip

It was WorldWideWeb actually.  Later renamed to Nexus as the original name was deemed 
confusing.


Stewart.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Andrej Mitrovic
On 3/10/12, Nick Sabalausky a@a.a wrote:
 It sounds like a great article, judging by the first paragraph, but I have
 to read it a couple sentences at a time.

Yikes. Here's a print version:
http://drdobbs.com/article/print?articleId=184401197siteSectionName=


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Andrei Alexandrescu

On 3/9/12 11:18 PM, Nick Sabalausky wrote:

Andrei Alexandrescuseewebsiteforem...@erdani.org  wrote in message
news:jjengv$agm$1...@digitalmars.com...


Insert obligatory link: http://drdobbs.com/184401197

Very insightful article.



Jesus christ what the FUCK is wrong with Dr Dobbs? The article shows up
*just fine* - *at first*, and then once all the excess junk around the edges
finishes loading, the stupid fucking thing redirects me (WITH NO BACK
BUTTON!) to this useless shit: http://m.drdobbs.com/

What the fuck is wrong with web developers? You'd think at a
***PROGRAMMING*** MAGAZINE they could fucking get basic shit straight
without scrwing up things that a NOVICE wouldn't even KNOW how to fuck up!
Goddamn.

It sounds like a great article, judging by the first paragraph, but I have
to read it a couple sentences at a time. How the hell do professions botch
things up *that* badly?


Doesn't happen on my machine. Would the printer-friendly view help?

http://drdobbs.com/article/print?articleId=184401197siteSectionName=


Andrei




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread so
On Saturday, 10 March 2012 at 05:06:40 UTC, Andrei Alexandrescu 
wrote:



Insert obligatory link: http://drdobbs.com/184401197

Very insightful article.


While i tend to code that way it is not as pretty in C++ as it 
looks on paper when you use namespaces.


namespace ns {
  struct S {
void b();
  }

  void b(S s);
}

auto s = ns::S;
s.b() // fine
ns::b(s) // uh..

It gets much worse when S is somewhere deep in many namespaces.
ADL helps but it is also unreliable. I think D doesn't have this 
issue.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread so

On Saturday, 10 March 2012 at 09:25:28 UTC, so wrote:

While i tend to code that way it is not as pretty in C++ as it 
looks on paper when you use namespaces.


namespace ns {
  struct S {
void b();
  }

  void b(S s);
}

auto s = ns::S;
s.b() // fine
ns::b(s) // uh..

It gets much worse when S is somewhere deep in many namespaces.
ADL helps but it is also unreliable. I think D doesn't have 
this issue.


And... at the end of the article he also mentions this.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Nick Sabalausky
Jonathan M Davis jmdavisp...@gmx.com wrote in message 
news:mailman.399.1331365602.4860.digitalmar...@puremagic.com...
 On Saturday, March 10, 2012 02:21:56 Nick Sabalausky wrote:
 Jonathan M Davis jmdavisp...@gmx.com wrote in message
  I'd say that there's a higher chance of the aliases being added than of
  dur
  being changed to duration. Changing dur will _definitely_ break code 
  and
  make
  using it worse for exactly the same reason that it's dur in the first
  place -
  it's too long when combined with the required units string. The aliases
  might
  break code, but it's probably only in cases where someone already has 
  free
  functions with those names, and it's more likely that they'll have
  variables
  with those names, which are less likely to conflict.
 
  So, while I don't really like the idea of adding the aliases, they 
  _might_
  be
  added, because they probably won't break anything, and they enable 
  UFCS.
  But
  there's not a good enough reason to change dur to duration at this 
  point.

 They eliminate the *entire* reason for it ever even being dur in the 
 first
 place.

 No, they don't. You have to keep dur if you want to enable generic code.

Sorry, I meant ...the reason for it being named 'dur' instead of 
'duration'.

...and honestly, I think that it's _worse_ for the very reasons
 that I chose dur in the first place. dur!hours is pretty much just as 
 clear
 as duration!hours, and it's shorter.


Well, I gotta say, I'm with Adam on this one: I think duration is much 
more clear, much easier to learn, and much easier to remember than dur. 
Granted, I'm all for abbreviations when they're common enough, such as 
curr or ident, but dur is just wy out there (And do we really need 
to invite D: The 'Durrr' Language heckling?).

That leaves shorter the only remaining reason, which becomes insignificant 
with the aliases, since the full dur/duration would be only rarely needed 
and the aliases are much shorter than even dur.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Jonathan M Davis
On Saturday, March 10, 2012 05:31:31 Nick Sabalausky wrote:
 Well, I gotta say, I'm with Adam on this one: I think duration is much
 more clear, much easier to learn, and much easier to remember than dur.
 Granted, I'm all for abbreviations when they're common enough, such as
 curr or ident, but dur is just wy out there (And do we really need
 to invite D: The 'Durrr' Language heckling?).
 
 That leaves shorter the only remaining reason, which becomes insignificant
 with the aliases, since the full dur/duration would be only rarely needed
 and the aliases are much shorter than even dur.

Regardless of whether dur or duration is better, it's not worth the code 
breakage to change it.

- Jonathan M davis


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Steven Schveighoffer
On Saturday, 10 March 2012 at 04:56:13 UTC, Andrei Alexandrescu 
wrote:




Yah, I'm a bit ehm about the sudden recommendation to use 
named import, too. However, I've been ehm about similar 
things in the past and came to figure that some things are just 
useful idioms in the forming (e.g. returning locally-defined 
structs).


I find import log = std.log better and using the language 
more naturally than the alternative - a struct/class in 
conjunction with the stuttering convention std.log.log.


There are other solutions, such as naming the functions something 
less common. And there's always selective import with renaming.


Who knows, it's hard to predict what the actual effect will be.

-Steve




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Jacob Carlborg

On 2012-03-09 22:16, Nick Sabalausky wrote:


Note how much *nicer* it makes all the sample and unittest code.




So much better.

--
/Jacob Carlborg


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread H. S. Teoh
On Fri, Mar 09, 2012 at 09:06:40PM -0800, Andrei Alexandrescu wrote:
[...]
 Insert obligatory link: http://drdobbs.com/184401197
 
 Very insightful article.
[...]

Wow. That's quite an interesting read, especially since it goes against
conventional wisdom that non-member non-friend functions are bad.

But I see why this totally makes sense. Recently I looked up David
Parnas' revolutionary paper about information hiding (the paper that
started it all), from which it's very clear that the basic motivation
behind encapsulation is resilience in the face of inevitable change. So
the article linked above totally makes sense. Breaking changes tend to
happen inside a class, so if something doesn't *need* access to private
members, then it doesn't, and shouldn't, need to be a class member.

In retrospect, I do find myself frequently factorizing code *within* a
class such that most member functions don't actually need direct access
to private members, or if they do, they use as few private members as
possible to do what they need to do. So by Dr. Dobbs' standard, most of
these member functions ought to be external to the class proper.

This is where UFCS really shines... now I *can* actually move these
members out of the class, and it doesn't even change the class API!
Plus, *users* can add new pseudo-members and it extensibly enhances the
class API while retaining that resilience to change.

D is getting more awesome by the day. Now I truly can't convince myself
to go back to C++!


T

-- 
There are two ways to write error-free programs; only the third one works.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Jacob Carlborg

On 2012-03-10 08:18, Nick Sabalausky wrote:

Andrei Alexandrescuseewebsiteforem...@erdani.org  wrote in message
news:jjengv$agm$1...@digitalmars.com...


Insert obligatory link: http://drdobbs.com/184401197

Very insightful article.



Jesus christ what the FUCK is wrong with Dr Dobbs? The article shows up
*just fine* - *at first*, and then once all the excess junk around the edges
finishes loading, the stupid fucking thing redirects me (WITH NO BACK
BUTTON!) to this useless shit: http://m.drdobbs.com/

What the fuck is wrong with web developers? You'd think at a
***PROGRAMMING*** MAGAZINE they could fucking get basic shit straight
without scrwing up things that a NOVICE wouldn't even KNOW how to fuck up!
Goddamn.

It sounds like a great article, judging by the first paragraph, but I have
to read it a couple sentences at a time. How the hell do professions botch
things up *that* badly?


Happens to me as well. Mac OS X, Firefox 10.0.2, JavaScript turned off 
by default.


--
/Jacob Carlborg


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Nick Sabalausky
Jacob Carlborg d...@me.com wrote in message 
news:jjg2ts$2roo$2...@digitalmars.com...
 On 2012-03-10 08:18, Nick Sabalausky wrote:
 Andrei Alexandrescuseewebsiteforem...@erdani.org  wrote in message
 news:jjengv$agm$1...@digitalmars.com...

 Insert obligatory link: http://drdobbs.com/184401197

 Very insightful article.


 Jesus christ what the FUCK is wrong with Dr Dobbs? The article shows up
 *just fine* - *at first*, and then once all the excess junk around the 
 edges
 finishes loading, the stupid fucking thing redirects me (WITH NO BACK
 BUTTON!) to this useless shit: http://m.drdobbs.com/

 What the fuck is wrong with web developers? You'd think at a
 ***PROGRAMMING*** MAGAZINE they could fucking get basic shit straight
 without scrwing up things that a NOVICE wouldn't even KNOW how to fuck 
 up!
 Goddamn.

 It sounds like a great article, judging by the first paragraph, but I 
 have
 to read it a couple sentences at a time. How the hell do professions 
 botch
 things up *that* badly?

 Happens to me as well. Mac OS X, Firefox 10.0.2, JavaScript turned off by 
 default.


You know what I think it is (without actually looking at the code): I think 
they tried to do some highly misguided and even more poorly implemented hack 
(which they no-doubt thought was clever) for dealing with *cough* old 
*cough* browsers by inserting a meta redirect to a hardcoded URL, and then 
used JS to disable the meta redirect. If that's the case, I don't know how 
the fuck they managed to convince themselves that make one drop of sense.

When I used one of my web developer plugins to disable meta redirects, the 
screwy behavior stopped. And like you, I have JS off by default (WTF do you 
need JS for on a goddamn *ARTICLE*?). So that's probably what the numbnuts 
over at Dr Dobbs did.




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message 
news:mailman.412.1331398464.4860.digitalmar...@puremagic.com...

 Breaking changes tend to
 happen inside a class, so if something doesn't *need* access to private
 members, then it doesn't, and shouldn't, need to be a class member.


Unless they need polymorphism :(

 In retrospect, I do find myself frequently factorizing code *within* a
 class such that most member functions don't actually need direct access
 to private members, or if they do, they use as few private members as
 possible to do what they need to do. So by Dr. Dobbs' standard, most of
 these member functions ought to be external to the class proper.

 This is where UFCS really shines... now I *can* actually move these
 members out of the class, and it doesn't even change the class API!
 Plus, *users* can add new pseudo-members and it extensibly enhances the
 class API while retaining that resilience to change.


It also has the benefit of shrinking the vtables of each instance. (Although 
I think 'final' might have the same effect if used the same way?)

 D is getting more awesome by the day. Now I truly can't convince myself
 to go back to C++!


Totally. But I had given up on C++ ten years ago. Unfortunately, as I may be 
getting into some iOS/Android game dev soon (likely with Marmalade, since 
Corona looks to be little more than a shiny overpriced toy - just like its 
older brother Flash), I may need to start using C++ again. Ugh. I love game 
dev, but I'm not looking forward to that aspect of it. Mature Arm support 
for D can't come soon enough! If there were a date, I'd be counting the 
days.

 There are two ways to write error-free programs; only the third one works.

Heh, once again, a gem. I also laughed out loud at the That phone number is 
imaginary, rotate your phone 90 degrees and try again.





Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Jonathan M Davis
On Saturday, March 10, 2012 14:41:53 Nick Sabalausky wrote:
 You know what I think it is (without actually looking at the code): I think
 they tried to do some highly misguided and even more poorly implemented hack
 (which they no-doubt thought was clever) for dealing with *cough* old
 *cough* browsers by inserting a meta redirect to a hardcoded URL, and then
 used JS to disable the meta redirect. If that's the case, I don't know how
 the fuck they managed to convince themselves that make one drop of sense.
 
 When I used one of my web developer plugins to disable meta redirects, the
 screwy behavior stopped. And like you, I have JS off by default (WTF do you
 need JS for on a goddamn *ARTICLE*?). So that's probably what the numbnuts
 over at Dr Dobbs did.

Well, much as _you_ hate JS, many people don't turn it off, because regardless 
of how good or bad it is, enough relies on it that many would consider it too 
unpleasant to try and use the web with it off. And if everyone's using it, then 
there's no reason _not_ to use JS if you think that it best solves what you're 
trying to do.

Now, normally I wouldn't think that you'd need JS for article, and their 
particular solution may have been a bad one, but it's not like it's uncommon 
for web developers to just assume that you're going to have JS enabled. I 
would think that you'd be running into problems like that all the time with 
the esoteric web browsing setup that you have.

- Jonathan M Davis


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread H. S. Teoh
On Sat, Mar 10, 2012 at 02:41:53PM -0500, Nick Sabalausky wrote:
[...]
 You know what I think it is (without actually looking at the code): I
 think they tried to do some highly misguided and even more poorly
 implemented hack (which they no-doubt thought was clever) for dealing
 with *cough* old *cough* browsers by inserting a meta redirect to a
 hardcoded URL, and then used JS to disable the meta redirect. If
 that's the case, I don't know how the fuck they managed to convince
 themselves that make one drop of sense.
 
 When I used one of my web developer plugins to disable meta redirects,
 the screwy behavior stopped. And like you, I have JS off by default
 (WTF do you need JS for on a goddamn *ARTICLE*?). So that's probably
 what the numbnuts over at Dr Dobbs did.
[...]

I've always believed that Javascript is the hellspawn of evil incarnate.

Last year when at my day job a large-scale Javascript project was dumped
on my lap, I spent 1/2 a week's time to update myself on the language
(as well as understand that morass of lasagna code I had to work with),
and I discovered that Javascript has some really neat features, like
closures (that's why I find D's delegates so immensely useful), and that
overall, it's a not-bad language for doing neat stuff in. Especially if
you use jQuery, which almost feels like it belongs in the Javascript
spec.

I still believe that Javascript is the hellspawn of evil incarnate.

The web was originally a pull medium: you want to lookup a resource, you
send a request, the server returns a document. Nowhere in this picture
is interactivity. Oh, did they tried to make it more interactive.
Cookies, sessions, and what not, it's all an effort to make a stateless
HTTP protocol feel like it's interactive. The marketroids loved push
media.  They wanted more 'push' on the web. Then somebody came up with
the idea of running script snippets on the browser instead of the
server. So Javascript was born.

I've always believed that Javascript is the hellspawn of evil incarnate.

Having arbitrary Turing-complete code run on your browser just because
you asked the server please send me resource X is, shall we say, a
security concern? So they came up with the whole XSS thing to try to
contain the beast, along with various other kludges to try to patch
various problems that came up, and then patch the problems that the
patches introduced, ad nauseum.

But Javascript is still the hellspawn of evil incarnate.

Git-pull a couple o' years, and here we are today with a web that's
increasingly interactive, and Javascript is an essential part of it.
Whether or not that's a good thing, public opinion is generally
positive. Heck, I myself wrote an application in Javascript, actually
*two*, just because tools have developed to make it so *easy*.

I still believe that Javascript is the hellspawn of evil incarnate.

In fact, it's so easy that everybody and his neighbor's dog writes
Javascript on their website. Even if the website is essentially nothing
but a bunch of articles. Resources that you look up by sending a request
to a server and getting a document in return. Like the good ole days
when the web was a pull medium. Except now almost everything comes with
Javascript, even when it's not needed. And because it's so pervasive,
it's only a matter of time before somebody gets this bright idea that
whoever browses the web *without* Javascript must be certainly be using
an ancient dilapidated browser from before the dinosaurs walked the
earth.

So you see, Javascript is the hellspawn of evil incarnate. :-)


T

-- 
If creativity is stifled by rigid discipline, then it is not true creativity.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread H. S. Teoh
On Sat, Mar 10, 2012 at 02:56:00PM -0500, Nick Sabalausky wrote:
 H. S. Teoh hst...@quickfur.ath.cx wrote in message 
 news:mailman.412.1331398464.4860.digitalmar...@puremagic.com...
 
  Breaking changes tend to happen inside a class, so if something
  doesn't *need* access to private members, then it doesn't, and
  shouldn't, need to be a class member.
 
 
 Unless they need polymorphism :(

True.

Every now and then I still mull over how to reconcile class hierarchies
with generic programming. I mean, inheritance and polymorphism are
definitely very powerful concepts, but once you throw templates into the
mix, the two don't quite get along very well (they try to, but every now
and then they get into a fight). I mean, conceptually speaking,
templated members should be polymorphic too, but then it's impossible to
implement in code.

Really makes me wonder if there's something out there, some brand new
unifying concept, that can marry the two and retain their best
characteristics. Or perhaps a revolutionary new concept that replaces
inheritance and templates with something even more powerful.


  In retrospect, I do find myself frequently factorizing code *within*
  a class such that most member functions don't actually need direct
  access to private members, or if they do, they use as few private
  members as possible to do what they need to do. So by Dr. Dobbs'
  standard, most of these member functions ought to be external to the
  class proper.
 
  This is where UFCS really shines... now I *can* actually move these
  members out of the class, and it doesn't even change the class API!
  Plus, *users* can add new pseudo-members and it extensibly enhances
  the class API while retaining that resilience to change.
 
 
 It also has the benefit of shrinking the vtables of each instance.
 (Although I think 'final' might have the same effect if used the same
 way?)

I don't know about that, what if it's a final override? (Or is that
illegal in D?)


  D is getting more awesome by the day. Now I truly can't convince
  myself to go back to C++!
 
 
 Totally. But I had given up on C++ ten years ago. Unfortunately, as I
 may be getting into some iOS/Android game dev soon (likely with
 Marmalade, since Corona looks to be little more than a shiny
 overpriced toy - just like its older brother Flash), I may need to
 start using C++ again. Ugh. I love game dev, but I'm not looking
 forward to that aspect of it. Mature Arm support for D can't come soon
 enough! If there were a date, I'd be counting the days.

When I picked up D, one of my hopes was to use it for game dev. I had
just started an SDL project in C++, but later decided to abort it in
favor of D. Sadly, the current implementation of D still has some
wrinkles to be straightened out before it's usable for real game dev.
:-(


  There are two ways to write error-free programs; only the third one
  works.
 
 Heh, once again, a gem. I also laughed out loud at the That phone
 number is imaginary, rotate your phone 90 degrees and try again.
[...]

One of the ones that made me LOL when I first heard it was:

I am Ohm of Borg. Resistance is voltage over current.

:-)


T

-- 
Famous last words: I wonder what will happen if I do *this*...


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Nick Sabalausky
 Jonathan M Davis jmdavisp...@gmx.com wrote in message 
news:mailman.433.1331409882.4860.digitalmar...@puremagic.com...
 On Saturday, March 10, 2012 14:41:53 Nick Sabalausky wrote:
 You know what I think it is (without actually looking at the code): I 
 think
 they tried to do some highly misguided and even more poorly implemented 
 hack
 (which they no-doubt thought was clever) for dealing with *cough* old
 *cough* browsers by inserting a meta redirect to a hardcoded URL, and 
 then
 used JS to disable the meta redirect. If that's the case, I don't know 
 how
 the fuck they managed to convince themselves that make one drop of sense.

 When I used one of my web developer plugins to disable meta redirects, 
 the
 screwy behavior stopped. And like you, I have JS off by default (WTF do 
 you
 need JS for on a goddamn *ARTICLE*?). So that's probably what the 
 numbnuts
 over at Dr Dobbs did.

 Well, much as _you_ hate JS, many people don't turn it off, because 
 regardless
 of how good or bad it is, enough relies on it that many would consider it 
 too
 unpleasant to try and use the web with it off. And if everyone's using it, 
 then
 there's no reason _not_ to use JS if you think that it best solves what 
 you're
 trying to do.


Everyone *isn't* using it (even for a non-literal usage of everyone).
And I have it turned off because the web is not *not only* unpleasant with 
it *on*, but, for me, borderline unusable.

 Now, normally I wouldn't think that you'd need JS for article, and their
 particular solution may have been a bad one, but it's not like it's 
 uncommon
 for web developers

Common and not stupid are *very* different things. You're making a 
patently false assumption that the former implies the latter.

 I would think that you'd be running into problems like that all the time 
 with
 the esoteric web browsing setup that you have.


It may seem that way, but it's *much* less trouble then what I had before I 
blocked flash (with NoScript), installed AdBlock Plus, and disabled JS (also 
with NoScript). Seriously. No exaggeration. I literally *cannot* read a page 
when there's shit animating around it. You can? Other people can? Most 
people can? I don't give a fuck. Good for you.

Seriosuly, don't even think of using a *most* people aren't like that 
argument. Every goddamn thing about me is outside of the holy, sacred 
motherfucking bell curve of relevence (Ie: If you're outside the bell 
cure, you're not relevent), and has been for my whole goddamn life.

No more. These days, *anyone* who pulls any sort common case vs exceptional 
case bullshit excuse around me, for anything, can go fuck themselves.

Join us! Be just like us! Submit! Conform! -- fuck the goddamn idiot 
sheep




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Andrej Mitrovic
On 3/10/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
 I've always believed that Javascript is the hellspawn of evil incarnate.

You and Nick just became best friends! :P


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Jonathan M Davis
On Saturday, March 10, 2012 17:45:33 Nick Sabalausky wrote:
  Jonathan M Davis jmdavisp...@gmx.com wrote in message
  Well, much as _you_ hate JS, many people don't turn it off, because
  regardless
  of how good or bad it is, enough relies on it that many would consider
  it
  too
  unpleasant to try and use the web with it off. And if everyone's using
  it, then
  there's no reason _not_ to use JS if you think that it best solves what
  you're
  trying to do.
 
 Everyone *isn't* using it (even for a non-literal usage of everyone).
 And I have it turned off because the web is not *not only* unpleasant
 with it *on*, but, for me, borderline unusable.
 
  Now, normally I wouldn't think that you'd need JS for article, and their
  particular solution may have been a bad one, but it's not like it's
  uncommon
  for web developers
 
 Common and not stupid are *very* different things. You're making a
 patently false assumption that the former implies the latter.
 
  I would think that you'd be running into problems like that all the time
  with
  the esoteric web browsing setup that you have.
 
 It may seem that way, but it's *much* less trouble then what I had before
 I blocked flash (with NoScript), installed AdBlock Plus, and disabled JS
 (also with NoScript). Seriously. No exaggeration. I literally *cannot*
 read a page when there's shit animating around it. You can? Other people
 can? Most people can? I don't give a fuck. Good for you.
 
 Seriosuly, don't even think of using a *most* people aren't like that
 argument. Every goddamn thing about me is outside of the holy, sacred
 motherfucking bell curve of relevence (Ie: If you're outside the bell
 cure, you're not relevent), and has been for my whole goddamn life.

I'm not arguing that JS is great. I'm just arguing that it's so heavily used 
that it's completely unreasonable to expect that web programmers won't be 
using it. Many knowledgeable people leave it on because of this, and the 
vast majority of people have absolutely no clue what JS is and don't tweak 
with that sort of thing in their browser.

It would be great if JS were axed in favor of something better, but that's 
not going to happen anytime soon. Heck, Microsoft made the scary choice of 
making it one of WinRT's languages and seem to want to encourage developers 
to write whole desktop applications in JS (yuck).

You can choose not to use JS, but given its prevalence at this point, as bad 
as JS may be, I don't see how you can possibly expect that web pages aren't 
going to use it.

- Jonathan M Davis


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread H. S. Teoh
On Sat, Mar 10, 2012 at 05:45:33PM -0500, Nick Sabalausky wrote:
  Jonathan M Davis jmdavisp...@gmx.com wrote in message 
 news:mailman.433.1331409882.4860.digitalmar...@puremagic.com...
[...]
  Well, much as _you_ hate JS, many people don't turn it off, because
  regardless of how good or bad it is, enough relies on it that many
  would consider it too unpleasant to try and use the web with it off.
  And if everyone's using it, then there's no reason _not_ to use JS
  if you think that it best solves what you're trying to do.

The problem is not what JS solves, per se, but the fact that many web
developers use it for no good reason at all besides the fact that it's
the cool new thing.


[...]
 Everyone *isn't* using it (even for a non-literal usage of
 everyone).  And I have it turned off because the web is not *not
 only* unpleasant with it *on*, but, for me, borderline unusable.

I used to do that. :-)

These days, I just can't be bothered what someone does or doesn't do
with JS on their site.  Opera lets me configure scripting on a per-site
basis. As soon as I run into a site that uses annoying scripting, it's
bye-bye scripting for that site forever.

In the past, I've even used UserJS to *edit* the site's JS on the fly to
rewrite stupid JS code (like replace sniffBrowser() with a function that
returns true, bwahahaha) while leaving the rest of the site functional.
I do not merely hate Javascript, I fight it, kill it, and twist it to my
own sinister ends.  :-)


[...]
  I would think that you'd be running into problems like that all the
  time with the esoteric web browsing setup that you have.

Esoteric?! Really? Whatever happened to those days of graceful
degradation?  Or are we sliding back into the bad ole days of gratuitous
incompatibilities? And here I was, thinking that the W3C was attempting
to make things interoperate...


 It may seem that way, but it's *much* less trouble then what I had
 before I blocked flash (with NoScript), installed AdBlock Plus, and
 disabled JS (also with NoScript). Seriously. No exaggeration. I
 literally *cannot* read a page when there's shit animating around it.
[...]

Opera has content blocking. :-) It's configurable per-site, even. I
actively use it on sites where things flash around for no good reason.
OTOH, when 50% of a site is just random animated junk, I just leave and
never return, 'cos whoever runs the site obviously doesn't have anything
useful to offer me anyway. It's a pretty reliable indicator of site
quality, actually. And of whether I want to bother giving it another
second of my time.


T

-- 
640K ought to be enough -- Bill G., 1984. The Internet is not a
primary goal for PC usage -- Bill G., 1995. Linux has no impact on
Microsoft's strategy -- Bill G., 1999.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Adam D. Ruppe

On Sunday, 11 March 2012 at 00:43:15 UTC, H. S. Teoh wrote:
The problem is not what JS solves, per se, but the fact that 
many web developers use it for no good reason at all besides

the fact that it's the cool new thing.


hey did you guys hear that you can convert a lot of
D code to Javascript?

It's cool. It's new. And it's a thing.

Use it!


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Ary Manzana

On 03/10/2012 02:06 AM, Andrei Alexandrescu wrote:

On 3/9/12 5:05 PM, Adam D. Ruppe wrote:

On Friday, 9 March 2012 at 23:50:50 UTC, bearophile wrote:

At first I didn't like it a lot because it's cheap syntax sugar that
adds no new power and gives programmers more freedom to write
different-looking versions of the the same code (and this is often bad).


What I like about is the encapsulation benefits. You
don't have to know if the function is a method or an
external function, it just works.

External, non-friend (so separate module in D) functions
are often preferable to methods because they don't have
access to the class' private members, so they cannot rely
on those implementation details.

Extending objects with new functions in this way also
means you don't break binary compatibility with the
existing code, since it isn't modified at all!


Of course, you could always do this with the old
syntax too, but then the syntax preference means
you are biased toward one implementation or the
other - it doesn't mesh as well and you may be
tempted to make things methods for the syntax,
despite the cost in compatibility.

UFCS rox.


Insert obligatory link: http://drdobbs.com/184401197

Very insightful article.


Andrei


How can:

class Wombat {
  void nap() {
this-sleep();
  }
}

increase encapsulation? It's using public API, so client code can't 
break if you keep the sleep method there.


Now, I do agree that it's nice to not have additional methods defined 
because it speeds up parsing and doesn't bloat the interface. I just 
don't agree with implementing it as UFCS.


Take a look a this:

void nap(Wombat wombat) { }
void somethingElse(Wombat wombat, int x) { }
void anotherThing(Wombat wombat, int x) { }

Compared to this:

class Wombat {
  void nap() {}
  void somethingElse(int x);
  void anotherThing(int x);
}

Shorter, grouped, cleaner (in my opinion). No repetition of Wombat all 
over the place.


In fact, it should be much easier to implement. When extending a class, 
associate those methods to the class, then do a normal lookup. With UFCS 
you'd have to look for a global function whose first parameter is the 
Wombat. So you have two searches: first find members, then public 
functions (I wonder why UFCS is not completely implemented so far).


Explaining an extension method is also easy: If you extend a class's 
methods, those can only access public member functions. Now you'd have 
to say Any global function that has this class as a first parameter can 
be invoked as a member function, removing this first parameter.


Well... I'm just looking for consistency.

This is exactly what happens in Ruby:

irb(main):001:0 Time.parse 2012-01-02
NoMethodError: undefined method `parse' for Time:Class
from (irb):1
from :0
irb(main):002:0 require 'time'
= true
irb(main):003:0 Time.parse 2012-01-02
= Mon Jan 02 00:00:00 -0300 2012

Well, in Ruby you can access private members in those extensions... I 
don't want that in D. So I guess one complaint for what I'm saying is 
Oh, people will think that you can access private members in those 
extensions because they have the same syntax blah blah blah.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Ary Manzana

On 03/10/2012 10:03 PM, Ary Manzana wrote:

On 03/10/2012 02:06 AM, Andrei Alexandrescu wrote:

On 3/9/12 5:05 PM, Adam D. Ruppe wrote:

On Friday, 9 March 2012 at 23:50:50 UTC, bearophile wrote:

At first I didn't like it a lot because it's cheap syntax sugar that
adds no new power and gives programmers more freedom to write
different-looking versions of the the same code (and this is often
bad).


What I like about is the encapsulation benefits. You
don't have to know if the function is a method or an
external function, it just works.

External, non-friend (so separate module in D) functions
are often preferable to methods because they don't have
access to the class' private members, so they cannot rely
on those implementation details.

Extending objects with new functions in this way also
means you don't break binary compatibility with the
existing code, since it isn't modified at all!


Of course, you could always do this with the old
syntax too, but then the syntax preference means
you are biased toward one implementation or the
other - it doesn't mesh as well and you may be
tempted to make things methods for the syntax,
despite the cost in compatibility.

UFCS rox.


Insert obligatory link: http://drdobbs.com/184401197

Very insightful article.


Andrei


How can:

class Wombat {
void nap() {
this-sleep();
}
}

increase encapsulation? It's using public API, so client code can't
break if you keep the sleep method there.

Now, I do agree that it's nice to not have additional methods defined
because it speeds up parsing and doesn't bloat the interface. I just
don't agree with implementing it as UFCS.

Take a look a this:

void nap(Wombat wombat) { }
void somethingElse(Wombat wombat, int x) { }
void anotherThing(Wombat wombat, int x) { }

Compared to this:

class Wombat {
void nap() {}
void somethingElse(int x);
void anotherThing(int x);
}

Shorter, grouped, cleaner (in my opinion). No repetition of Wombat all
over the place.

In fact, it should be much easier to implement. When extending a class,
associate those methods to the class, then do a normal lookup. With UFCS
you'd have to look for a global function whose first parameter is the
Wombat. So you have two searches: first find members, then public
functions (I wonder why UFCS is not completely implemented so far).


I forgot to say: if you implement it by associating it to the type, you 
can also use the current method lookup algorithm because it will search 
in super classes. With UFCS you'd have to search for public functions 
whose first parameter are B, then public functions whose first parameter 
are A, etc, assuming A extends B.


So not only it's easier to write and read, but also easier to implement.


Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message 
news:mailman.447.1331426602.4860.digitalmar...@puremagic.com...
 On Sat, Mar 10, 2012 at 05:45:33PM -0500, Nick Sabalausky wrote:
 Everyone *isn't* using it (even for a non-literal usage of
 everyone).  And I have it turned off because the web is not *not
 only* unpleasant with it *on*, but, for me, borderline unusable.

 I used to do that. :-)

 These days, I just can't be bothered what someone does or doesn't do
 with JS on their site.  Opera lets me configure scripting on a per-site
 basis. As soon as I run into a site that uses annoying scripting, it's
 bye-bye scripting for that site forever.


I use the NoScript addon for FireFox, which does the same thing. But I have 
my default set to off because I find that's usually the prefereable 
option. Even on sites that break without JS, viewing them with JS on is 
usually not much better - at least with JS off, they break *quickly* without 
wasting my time spinning their AJAX and jQuery wheels just so they can *sort 
of* work very, very slowly.

 In the past, I've even used UserJS to *edit* the site's JS on the fly to
 rewrite stupid JS code (like replace sniffBrowser() with a function that
 returns true, bwahahaha) while leaving the rest of the site functional.
 I do not merely hate Javascript, I fight it, kill it, and twist it to my
 own sinister ends.  :-)


I admire that :) Personally, I don't have the patience. I just bitch and 
moan :)


 [...]
  I would think that you'd be running into problems like that all the
  time with the esoteric web browsing setup that you have.

 Esoteric?! Really? Whatever happened to those days of graceful
 degradation?


Why would you want graceful degredation? That would defeat the whole point: 
The whole point of our crusade is to *force* what we *know* to be newer and 
better unto all the unwashed masses.

Along the same lines: How long do you think it'll be before a cellular 
connection starts being required for using the internet? Or just certain 
sites?

Some people may think that's silly, but it's already happened for IM: 
Remember when IM was free ans accessible through *any* internet connection? 
Why was anyone ever willing to use that? Didn't they know get could *pay* to 
get the exact same service thanks to SMS? The IM networks still techincally 
exist, but you can't use them because everyone you'd talk to prefers to pay 
a cell company for SMS. Why use something free and open when you can pay for 
restricted access?

 Or are we sliding back into the bad ole days of gratuitous
 incompatibilities?

When has the web *ever* had that?  (Well, in 1996 maybe.)

But yea, I often feel like we've moved back into the old DOS days when 
software packages didn't interoperate, and data was almost inseperable from 
its software.

In 1994, games had to come with their own sound/video drivers. In 1995, MS 
fixed that and there was much rejoicing.

But in 2012:

- Every piece of content is packaged with a pre-chosen viewer.

- Every web site feels it has to include it's own social networking links.

- If you want to use GitHub/BitBucket-style DVCS features you have to use 
whichever interface is *provided* by whoever's hosting the repo. BitBucket 
can't access GitHub-hosted repos/projects. GitHub can't acces 
BitBucket-histed repos/projects. Neither can access local or self-hosted 
repos/projects. WTF is this, 1990 all over again?

And any mention of maybe these aren't the best ways is met with cries of 
Heresy! Conform, you dinosaur!.

 And here I was, thinking that the W3C was attempting
 to make things interoperate...

Hah! I think the only thing the W3C is attempting to do is see how long they 
can do nothing before people start to call them on it.

Well, that's not fair. It's probably not nothing. I'm sure there's also a 
bunch of Google trying to throw their weight around and Everyone, ignore 
all the suggestions from MS - they're wrong by default, especially their box 
model, JS mouse-button API, and other such things that make our standards 
appear to be designed by retarded monkeys - it's just their way to trick 
us!.


 It may seem that way, but it's *much* less trouble then what I had
 before I blocked flash (with NoScript), installed AdBlock Plus, and
 disabled JS (also with NoScript). Seriously. No exaggeration. I
 literally *cannot* read a page when there's shit animating around it.
 [...]

 Opera has content blocking. :-) It's configurable per-site, even. I
 actively use it on sites where things flash around for no good reason.

Yup, same with NoScript. It replaces Flash and Java applets with placeholder 
boxes. In the rare cases where I want to view it, I just click it. Per-site 
configurable, too.

 OTOH, when 50% of a site is just random animated junk, I just leave and
 never return, 'cos whoever runs the site obviously doesn't have anything
 useful to offer me anyway. It's a pretty reliable indicator of site
 quality, actually. And of whether I want to 

Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Nick Sabalausky
Adam D. Ruppe destructiona...@gmail.com wrote in message 
news:uzpluzrtlvsspppww...@forum.dlang.org...
 On Sunday, 11 March 2012 at 00:43:15 UTC, H. S. Teoh wrote:
 The problem is not what JS solves, per se, but the fact that many web 
 developers use it for no good reason at all besides
 the fact that it's the cool new thing.

 hey did you guys hear that you can convert a lot of
 D code to Javascript?

 It's cool. It's new. And it's a thing.

 Use it!

It's a thing? I gotta have it!

:)




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Nick Sabalausky
Andrej Mitrovic andrej.mitrov...@gmail.com wrote in message 
news:mailman.441.1331421065.4860.digitalmar...@puremagic.com...
 On 3/10/12, H. S. Teoh hst...@quickfur.ath.cx wrote:
 I've always believed that Javascript is the hellspawn of evil incarnate.

 You and Nick just became best friends! :P

No no, he's speaking heresy. Javascript *is* evil incarnate. It's also evil 
carnitas and semi-evil carnies. What whacko would think it's the hellspawn 
*of* evil incarnate? That's just silly!




Re: Arbitrary abbreviations in phobos considered ridiculous

2012-03-10 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message 
news:mailman.436.1331412193.4860.digitalmar...@puremagic.com...
 On Sat, Mar 10, 2012 at 02:56:00PM -0500, Nick Sabalausky wrote:
 H. S. Teoh hst...@quickfur.ath.cx wrote in message
 news:mailman.412.1331398464.4860.digitalmar...@puremagic.com...
 
  Breaking changes tend to happen inside a class, so if something
  doesn't *need* access to private members, then it doesn't, and
  shouldn't, need to be a class member.
 

 Unless they need polymorphism :(

 True.

 Every now and then I still mull over how to reconcile class hierarchies
 with generic programming. I mean, inheritance and polymorphism are
 definitely very powerful concepts, but once you throw templates into the
 mix, the two don't quite get along very well (they try to, but every now
 and then they get into a fight). I mean, conceptually speaking,
 templated members should be polymorphic too, but then it's impossible to
 implement in code.

 Really makes me wonder if there's something out there, some brand new
 unifying concept, that can marry the two and retain their best
 characteristics. Or perhaps a revolutionary new concept that replaces
 inheritance and templates with something even more powerful.


My understanding is that the *only* thing preventing vitrual template 
functions is the possibility of pre-compiled closed-source static libs. 
Which is why I've long been in favor of allowing vitrual template functions 
*as long as* there's no closed-source static libs preventing it. Why should 
OSS have to pay costs that only apply to closed source?


 It also has the benefit of shrinking the vtables of each instance.
 (Although I think 'final' might have the same effect if used the same
 way?)

 I don't know about that, what if it's a final override? (Or is that
 illegal in D?)


That's what I was alluding to with if used the same way. Ie, if it's 
statically know to not override or be overridden (I guess I wasn't clear). 
I'm pretty sure D allows final override, and yea, naturally that would 
require a vtable entry. But if it's a non-override final, a vtable entry 
isn't necessary.

Now, as for whether or not D actually *does* omit the vtable entry for 
non-override finals, I wouldn't know. Although I seem to vaguely remember 
doing optimizations once that seemed to imply it did. If that's so, I don't 
know whether its guaranteed per D spec or just implementation-defined. A 
UFCS approach would definitely be guaranteed not to affect the vtable, of 
course.


  There are two ways to write error-free programs; only the third one
  works.

 Heh, once again, a gem. I also laughed out loud at the That phone
 number is imaginary, rotate your phone 90 degrees and try again.
 [...]

 One of the ones that made me LOL when I first heard it was:

 I am Ohm of Borg. Resistance is voltage over current.

 :-)


Heh :)


 -- 
 Famous last words: I wonder what will happen if I do *this*...

Another great one, which is very similar to one I've enjoyed repeating:

What are a redneck's last words? Hey y'all, watch this!

Not sure where that's from, but Jeff Foxworthy would probably be a safe 
guess.




  1   2   3   4   >