June 16, 2008
Chris R. Miller wrote:

> If you use D for the browser based stuff, you'll have the great advantage of not needing to sink all the extra money into a server with extra RAM to support J2EE, which can consume a frightful amount of memory!

Actually, when people use the term 'browser-based games' they are usually referring to Flash, Silverlight, Java Applets, or some sort of custom browser plugin (i.e. games that run within the browser). I'm thinking that's what John is referring to. D provides no benefit there.

What you are talking about are generally referred to as 'web-based games' (i.e. games played via HTTP requests and/or browser scripting). And really, with Java you don't need a J2EE stack for that. A low-overhead app server like Jetty coupled with Servlets and JSP pages will do nicely. I'd prefer that to a PHP solution. D would work just as well in that environment, but my gut tells me there'd be little difference in memory overhead.
June 16, 2008
"Mike Parker" <aldacron@gmail.com> wrote in message news:g34k0q$1uns$1@digitalmars.com...
> Chris R. Miller wrote:
>
>> If you use D for the browser based stuff, you'll have the great advantage of not needing to sink all the extra money into a server with extra RAM to support J2EE, which can consume a frightful amount of memory!
>
> Actually, when people use the term 'browser-based games' they are usually referring to Flash, Silverlight, Java Applets, or some sort of custom browser plugin (i.e. games that run within the browser). I'm thinking that's what John is referring to. D provides no benefit there.
>
> What you are talking about are generally referred to as 'web-based games' (i.e. games played via HTTP requests and/or browser scripting). And really, with Java you don't need a J2EE stack for that. A low-overhead app server like Jetty coupled with Servlets and JSP pages will do nicely. I'd prefer that to a PHP solution. D would work just as well in that environment, but my gut tells me there'd be little difference in memory overhead.

If there's anything like leaderboards or multiplayer, then that would require a backend, and that backend could be written in D.

I would *love* for D to be a viable language for the front-end though. I truly despise Flash (including the official IDE), but I'm working on a project right now for which Flash is, unfortunately, the best option. [side rant] And the client (people, not browser) are on shared hosting so it's gotta use PHP for the backend, and I hate that every bit as much. [end side rant]. I truly wish I could just do the whole damn thing in D.

Which does bring me to one of the few things I *do* think VMs are good for: Embedded webpage applets should be in a sandbox. That's why I would actually like to see D support compiling to the JVM (*in addition* to native code, of course). Because that way I could use D as a replacement for Flash.

Come to think of it, doesn't the newest version of Flash support using C++ as an alternative to ECMAScript? I thought I heard that somewhere. If it does, maybe that opens the door for Flash-using-D? Anyone know? But then again anything beyond Flash 7 is poorly supported on embedded systems and as I understand it (which is to say: not very well) Adobe's newer "Flash Lite" strategy seems like more work for embedded browser developers than the old Flash SDK. But I'm probably wrong on that. Actually that reminds me, I have no idea how the Java Applet support is on embedded browsers. Might not be great either. Dang.

And heck, as long as I'm in pipe-dream land, along with "using D for stuff embedded in webpages", some D-to-PHP and D-to-ASP converters would be nice. That'd let me use D for back-end even when I have no control over the server. 'Course, you'd be giving up anything nice about being natively-compiled, but at least I wouldn't have to use ASP/PHP/some-other-dynamically-typed-flavor-of-the-month (all I really mean by that last one is that to a non-fan of such languages like me, it seems like popular dynamically typed languages keep popping up all over the place).

Sorry for rambling and ranting so far offtopic.


June 17, 2008
Yes, that's correct. JavaScript most likely. No database component at all. And for back end work, it's really hard to beat the dynamic languages these days.

D is an excellent fit for systems-level programming, desktop games, and many other areas, but when you don't need the speed, you're paying for something you don't have to pay for -- by giving up the features of a dynamic language.
June 20, 2008
Nick Sabalausky wrote:
> "Mike Parker" <aldacron@gmail.com> wrote in message news:g34k0q$1uns$1@digitalmars.com...
> 
>>Chris R. Miller wrote:
>>
>>
>>>If you use D for the browser based stuff, you'll have the great advantage of not needing to sink all the extra money into a server with extra RAM to support J2EE, which can consume a frightful amount of memory!
>>
>>Actually, when people use the term 'browser-based games' they are usually referring to Flash, Silverlight, Java Applets, or some sort of custom browser plugin (i.e. games that run within the browser). I'm thinking that's what John is referring to. D provides no benefit there.
>>
>>What you are talking about are generally referred to as 'web-based games' (i.e. games played via HTTP requests and/or browser scripting). And really, with Java you don't need a J2EE stack for that. A low-overhead app server like Jetty coupled with Servlets and JSP pages will do nicely. I'd prefer that to a PHP solution. D would work just as well in that environment, but my gut tells me there'd be little difference in memory overhead.
> 
> 
> If there's anything like leaderboards or multiplayer, then that would require a backend, and that backend could be written in D.
> 
> I would *love* for D to be a viable language for the front-end though. I truly despise Flash (including the official IDE), but I'm working on a project right now for which Flash is, unfortunately, the best option. [side rant] And the client (people, not browser) are on shared hosting so it's gotta use PHP for the backend, and I hate that every bit as much. [end side rant]. I truly wish I could just do the whole damn thing in D.
> 
> Which does bring me to one of the few things I *do* think VMs are good for: Embedded webpage applets should be in a sandbox. That's why I would actually like to see D support compiling to the JVM (*in addition* to native code, of course). Because that way I could use D as a replacement for Flash.
> 
> Come to think of it, doesn't the newest version of Flash support using C++ as an alternative to ECMAScript? I thought I heard that somewhere. If it does, maybe that opens the door for Flash-using-D? Anyone know? But then again anything beyond Flash 7 is poorly supported on embedded systems and as I understand it (which is to say: not very well) Adobe's newer "Flash Lite" strategy seems like more work for embedded browser developers than the old Flash SDK. But I'm probably wrong on that. Actually that reminds me, I have no idea how the Java Applet support is on embedded browsers. Might not be great either. Dang.
> 
> And heck, as long as I'm in pipe-dream land, along with "using D for stuff embedded in webpages", some D-to-PHP and D-to-ASP converters would be nice. That'd let me use D for back-end even when I have no control over the server. 'Course, you'd be giving up anything nice about being natively-compiled, but at least I wouldn't have to use ASP/PHP/some-other-dynamically-typed-flavor-of-the-month (all I really mean by that last one is that to a non-fan of such languages like me, it seems like popular dynamically typed languages keep popping up all over the place).
> 
> Sorry for rambling and ranting so far offtopic. 

(More off-topic rambling below.)

The other week I actually bought a new computer (2.4GHz 4-CPU, 4GB, etc.) simply because I got an assignment for a client that my current computers couldn't handle. (For the record, I've moved to this Century!)

Now, running Linux, I had the performance meter running on one of the desktops, and I was reading TV programs in a browser, D documentation on another, and E-mail in another. Then there was the desktop where I'd gathered all the windows I needed to study and try Lua.

All of a sudden I heard the CPU fan revving up. I wondered what could be the reason for it since I hadn't done anything exceptional for half an hour. Turns out there's a banner ad on the TV programming page that flashes pictures as fast as it can, with no pauses. Until that particular commercial got on (because of an automatic background reload of the TV programming page) the CPU load was at 0.1 0.01 0.0 0.02. When it got started the load went to 0.1 0.3 0.0 0.02.

In other words, one of my four CPUs was loaded to 30% simply because of this stupid banner. Since the CPU fan started revving up, I understood that the computer was using more power. Later I put a gadeget I have, that's a meter of Electric currency consuption, and it showed almost a 10% increase in power. On a 1-CPU machine the consumption should go up much more than that.

Think about it. If such a web site is for TV programming in America, and it puts such a banner on its pages, we might have 50 million people having this page visible. A 10% increase in electricity consumption should mean 200W * +10% * 50M = over one megawatt. That's equal to the output of one nuclear power plant.

So, don't believe this. I didn't. But I've done the math several times over, and I can't help getting to this answer.

Greenpeace sure ought to go shoot the guy.
June 20, 2008
Georg Wrede wrote:
> Nick Sabalausky wrote:
> 
>> "Mike Parker" <aldacron@gmail.com> wrote in message news:g34k0q$1uns$1@digitalmars.com...
>>
>>> Chris R. Miller wrote:
>>>
>>>
>>>> If you use D for the browser based stuff, you'll have the great advantage of not needing to sink all the extra money into a server with extra RAM to support J2EE, which can consume a frightful amount of memory!
>>>
>>>
>>> Actually, when people use the term 'browser-based games' they are usually referring to Flash, Silverlight, Java Applets, or some sort of custom browser plugin (i.e. games that run within the browser). I'm thinking that's what John is referring to. D provides no benefit there.
>>>
>>> What you are talking about are generally referred to as 'web-based games' (i.e. games played via HTTP requests and/or browser scripting). And really, with Java you don't need a J2EE stack for that. A low-overhead app server like Jetty coupled with Servlets and JSP pages will do nicely. I'd prefer that to a PHP solution. D would work just as well in that environment, but my gut tells me there'd be little difference in memory overhead.
>>
>>
>>
>> If there's anything like leaderboards or multiplayer, then that would require a backend, and that backend could be written in D.
>>
>> I would *love* for D to be a viable language for the front-end though. I truly despise Flash (including the official IDE), but I'm working on a project right now for which Flash is, unfortunately, the best option. [side rant] And the client (people, not browser) are on shared hosting so it's gotta use PHP for the backend, and I hate that every bit as much. [end side rant]. I truly wish I could just do the whole damn thing in D.
>>
>> Which does bring me to one of the few things I *do* think VMs are good for: Embedded webpage applets should be in a sandbox. That's why I would actually like to see D support compiling to the JVM (*in addition* to native code, of course). Because that way I could use D as a replacement for Flash.
>>
>> Come to think of it, doesn't the newest version of Flash support using C++ as an alternative to ECMAScript? I thought I heard that somewhere. If it does, maybe that opens the door for Flash-using-D? Anyone know? But then again anything beyond Flash 7 is poorly supported on embedded systems and as I understand it (which is to say: not very well) Adobe's newer "Flash Lite" strategy seems like more work for embedded browser developers than the old Flash SDK. But I'm probably wrong on that. Actually that reminds me, I have no idea how the Java Applet support is on embedded browsers. Might not be great either. Dang.
>>
>> And heck, as long as I'm in pipe-dream land, along with "using D for stuff embedded in webpages", some D-to-PHP and D-to-ASP converters would be nice. That'd let me use D for back-end even when I have no control over the server. 'Course, you'd be giving up anything nice about being natively-compiled, but at least I wouldn't have to use ASP/PHP/some-other-dynamically-typed-flavor-of-the-month (all I really mean by that last one is that to a non-fan of such languages like me, it seems like popular dynamically typed languages keep popping up all over the place).
>>
>> Sorry for rambling and ranting so far offtopic. 
> 
> 
> (More off-topic rambling below.)
> 
> The other week I actually bought a new computer (2.4GHz 4-CPU, 4GB, etc.) simply because I got an assignment for a client that my current computers couldn't handle. (For the record, I've moved to this Century!)
> 
> Now, running Linux, I had the performance meter running on one of the desktops, and I was reading TV programs in a browser, D documentation on another, and E-mail in another. Then there was the desktop where I'd gathered all the windows I needed to study and try Lua.
> 
> All of a sudden I heard the CPU fan revving up. I wondered what could be the reason for it since I hadn't done anything exceptional for half an hour. Turns out there's a banner ad on the TV programming page that flashes pictures as fast as it can, with no pauses.

Merely changing the applet to flip the pictures ten times a second would drop the CPU usage to almost undetectable levels. And the banner would still look the same.

> Until that particular commercial got on (because of an automatic background reload of the TV programming page) the CPU load was at 0.1 0.01 0.0 0.02. When it got started the load went to 0.1 0.3 0.0 0.02.

Sloppy writing. The above is actually not the output of /uptime/ or such, I was thinking in percentages as seen from the cpu meter graph. So a 0.3 here means 30%. This does not change anything, it's still valid.

> In other words, one of my four CPUs was loaded to 30% simply because of this stupid banner. Since the CPU fan started revving up, I understood that the computer was using more power. Later I put a gadeget I have, that's a meter of Electric currency consuption, and it showed almost a 10% increase in power. On a 1-CPU machine the consumption should go up much more than that.
> 
> Think about it. If such a web site is for TV programming in America, and it puts such a banner on its pages, we might have 50 million people having this page visible. A 10% increase in electricity consumption should mean 200W * +10% * 50M = over one megawatt. That's equal to the output of one nuclear power plant.

Suppose a banner ad company which has deals with, say, half of the most visited pages, decides to put a particular ad on everybody's screen (which could happen if a major company (Coca-Cola, Apple, etc) decides to bring out a product with a bang), that has such a badly designed Flash banner, the electric company really should see a stunning difference in electricity consumption.

> So, don't believe this. I didn't. But I've done the math several times over, and I can't help getting to this answer.
> 
> Greenpeace sure ought to go shoot the guy.

They should. It's really a frivolous use of other peoples' computing power and energy.

June 20, 2008
== Quote from Georg Wrede (georg@nospam.org)'s article
> Georg Wrede wrote:
> >
> > All of a sudden I heard the CPU fan revving up. I wondered what could be the reason for it since I hadn't done anything exceptional for half an hour. Turns out there's a banner ad on the TV programming page that flashes pictures as fast as it can, with no pauses.
> Merely changing the applet to flip the pictures ten times a second would drop the CPU usage to almost undetectable levels. And the banner would still look the same.

No one ever said that banner ad creators had any degree of sense.  There are some sites I refuse to go to now because of misbehaved banner ads the sites contained.  In the case of unitedmedia.com (one site on my list), they had an ad for a while that acted like a mini browser bomb.  They can't have possibly tested it at all.


Sean
June 20, 2008
"Sean Kelly" <sean@invisibleduck.org> wrote in message news:g3gq00$1kio$1@digitalmars.com...
> == Quote from Georg Wrede (georg@nospam.org)'s article
>> Georg Wrede wrote:
>> >
>> > All of a sudden I heard the CPU fan revving up. I wondered what could
>> > be
>> > the reason for it since I hadn't done anything exceptional for half an
>> > hour. Turns out there's a banner ad on the TV programming page that
>> > flashes pictures as fast as it can, with no pauses.
>> Merely changing the applet to flip the pictures ten times a second would drop the CPU usage to almost undetectable levels. And the banner would still look the same.
>
> No one ever said that banner ad creators had any degree of sense.  There
> are
> some sites I refuse to go to now because of misbehaved banner ads the
> sites
> contained.  In the case of unitedmedia.com (one site on my list), they had
> an
> ad for a while that acted like a mini browser bomb.  They can't have
> possibly
> tested it at all.
>
>
> Sean

I find that any form of animation on a page makes it literally impossible for me to actually read the page. So I disabled GIF animation and favicons, and installed Firefox's "Flashblock" and "QuickJava" plugins.


1 2 3 4 5
Next ›   Last »