March 21, 2006
Anders F Björklund wrote:
> Georg Wrede wrote:
> 
>> Hmm. Compared with D "Hello World", I'm getting worried.
> 
> 
> D programs are bigger than C and Java, but smaller than C++ ?
> Here are some old Hello test results I had: (on Mac OS X 10.3)
> 
> 31b     hello.sh (script)
> Hello, World!
>         0.01 real         0.00 user         0.00 sys
> 
>  12K    hello_c (executable)
> Hello, World!
>         0.03 real         0.00 user         0.00 sys
> 
> 368K    hello_cpp (including libstdc++)
> Hello, World!
>         0.09 real         0.00 user         0.02 sys
> 
> 104K    hello_d (including Phobos)
> Hello, World!
>         0.04 real         0.01 user         0.01 sys
> 
> 637b    hello.jar (archive)
> Hello, World!
>         0.66 real         0.38 user         0.19 sys

12k would be my dream for D! Seriously.

I think we'll get a lot smaller executables once 1.0 has been out for some time and we get down to the basic, mundane stuff in development. Or Walter does. :-)

> BTW:
> Having a programming language that needs separate compilation
> as a first language is pretty mean I think. But that's just me.

The 5 years I taught CS made me a firm believer in how immensely important the choice of the first language to teach really is. The things in that language stick with you for the rest of your life, no matter how many others you learn after it.

> (better to go with a scripting language, such as Ruby or Python ?
> and it avoids having to unlearn things picked up from Pascal...)

They're both excellent languages, but IMHO D is it. I don't dare to elaborate on this, it would just become an enormous OT-thread here.

> But I learned Pascal in school, and Ada in university. Hated both. :)
> I think you need to learn at least three languages. Preferrably more.

Oh yes! Definitely.
March 21, 2006
On Tue, 21 Mar 2006 22:38:53 +1100, Georg Wrede <georg.wrede@nospam.org> wrote:


> The 5 years I taught CS made me a firm believer in how immensely important the choice of the first language to teach really is. The things in that language stick with you for the rest of your life, no matter how many others you learn after it.

I must be doomed then ... my first was COBOL ;-)

And then I learnt PL/I, Autocoder, IBM-360 Assembler, Pascal, C, BASIC, Forth, dBASEII, ...

-- 
Derek Parnell
Melbourne, Australia
March 21, 2006
Sean Kelly wrote:
> Georg Wrede wrote:
> 
>> Brad Anderson wrote:
>> 
>>> Sean Kelly wrote: It's almost too bad, as I'm still hoping for an
>>>  undeniable
>>> 
>>>> reason to drop Windows for an alternative OS ;-)
>>> 
>>> 
>>> So do it anyway, like I did, and many others.  It's the little
>>> things that hit you daily - cumulatively, they won't let you go
>>> back to Windows.
>> 
>> 
>> Right!
>> 
>> Consider, on the one hand, an OS that's from the beginning made
>> just to get everybody's money. And only that. ("We're writing stuff
>> 'for them'!")
>> 
>> And on the other hand, an OS made _by_ the users, _for_ the users.
>> And on top of that, based on Unix, which _from_the_start_ was an OS
>> for software development. And for the able user and not "for the
>> masses".
> 
> 
> Doesn't matter if the OS that gets money also has the apps I want to
> run.  In an ideal world, I be using OSX.  If I wanted to make a practical choice for idealistic reasons, I'd use a Linux or BSD.  As
> it is, I simply haven't been given enough reason to decide against
> Windows despite its utility.  Though it's worth mentioning that one
> of the motivating factors in my decision is which OS has the best
> games ;-)

Well, I have to admit I still use Windows too. All my Word, Excel, and time management stuff is on Windows, and most of my surfing and e-mail. For such, W2k just feels smoother.

On Linux I do programming, CS research, remote server management, web site construction, and other "serious" or "demanding" stuff.

Even programs that are aimed for Windows, I develop on Linux, and once it's done except for the GUI part, I switch to Windows.

---

As for getting money out of software, Windows is it. The [computer]world is increasingly becoming divided between the haves and have-nots, where the former are computer savvy guys with Linux (and usually Windows) knowledge, and the latter are "Windows users" who are used to paying for stuff.

Windows is increasingly becoming like a DVD player: whatever you put in it you pay for (unless it's ripped or bootleg, of course). And, come to think of it, that's exactly what Windows was originally invented for: just a vehicle to create demand for stuff that you pay for. It never even was a secret.

X-box does it more overtly, but the idea still is the same with Windows.
March 21, 2006
Derek Parnell wrote:
> On Tue, 21 Mar 2006 22:38:53 +1100, Georg Wrede <georg.wrede@nospam.org> wrote:
> 
> 
>> The 5 years I taught CS made me a firm believer in how immensely important the choice of the first language to teach really is. The things in that language stick with you for the rest of your life, no matter how many others you learn after it.
> 
> I must be doomed then ... my first was COBOL ;-)
> 
> And then I learnt PL/I, Autocoder, IBM-360 Assembler, Pascal, C, BASIC, Forth, dBASEII, ...
> 
> --Derek Parnell
> Melbourne, Australia

That really is a litany of woe. I'm impressed.
: OVER  SWAP DUP ROT SWAP ;

Georg is right. For me it was
Z-80 (programmed in hex), BASIC, 6502 asm, Forth, Pascal, x86 asm, C, C++, FORTRAN, LISP, SQL...
and I'm still a Z-80 programmer at heart. I still remember a frightening number of the opcodes. C++ was the only other language I actually liked, until D came along.
March 21, 2006
Walter Bright wrote:
> These are a lot of very interesting observations that never occurred
> to me.
> 
> Are you teaching D as a first language, or just thinking about it?

In 2000 I was _dragged_ out of the university, to do Java development. When I left, I told everyone on the department that I'll be back unless I get rich quick. Now I'm [more than] toying with the idea that I'll go back to teaching, and get my Ph.D. on the side.

Additionally I am collecting material and doing research on "Introduction to Programming, Using D". Vol 1 would be a general introduction to stuff that every first year CS student should know, and Vol 2 would contain advanced stuff for the second and third year.

(I'm still catching my breath after the divorce, but it's downright likely that's where I'll be once I get half a grip.)
March 21, 2006
In article <dvnse4$1pq8$1@digitaldaemon.com>, Lucas Goss says...
>
>Sean Kelly wrote:
>> ...  Though it's worth mentioning that one of the motivating factors in my decision is which OS has the best games ;-)
>> 
>
>Yeah, that was tough for me. I left Windows for Linux about two years ago, but there are a few benefits. One, I spend more time programming now then on games. Which is good because I need to make some demos or games so I can get hired by (or start) a game company. And two, the windows platform is saturated with games, whereas Mac and Linux could use some help (so it might be easier to break into the market there).
>
>My only problem with Linux is that most people expect free software, and there isn't really an easy way to distribute paid software (and packaging software seems like a pain). So hopefully I'll be getting a Mac soon. Only no dmd... doh!

Interesing point. I think the "Free Software" model is flawed. Programmers need to get paid. Apple with OSX have shown that people are willing to pay for a decent integrated experience - at a reasonable price. eg iLife and iWork are $79. A decent biz model would be the os(kernel and desktop) is free with the app suites paid for. With as much as the source code as possible available for viewing to keep the techies happy. Quite franky i find it reassuring that the company that makes things i use has a biz model - and can survive in the longterm.


March 21, 2006
Georg Wrede wrote:

> Walter Bright wrote:
> 
>>
>> The presenter confidently predicted that in 10 years, Java will
>> outperform C in the general case. Color me skeptical.
> 
> 
> The number of languages "faster than C", either "now" or "real soon now" that I've heard at various venues, is more than one hand's fingers.
> 
> Somehow I share your skepticism.

In business, faster is relative believe it or not.

If I have an Application which is 30% too slow I can either pay programmers 2 weeks x 2 programmers(40/hr) =  6400$ to optimize it...

or I can spend $6400 extra on my hardware to run it(A good AMD64 server from SUN is around this range), and put the developers on other tasks.

I think concurrency is really coming into its own in the coming years: we need ways to easily leverage hardware effectively.

A good read on the subject:
http://labs.google.com/papers/mapreduce-osdi04.pdf

-DavidM
March 21, 2006
Georg Wrede wrote:

> 12k would be my dream for D! Seriously.

9-10k is overhead of the Mach-O format, so that's as low as it gets...

It's possible to make C++ and D programs of an equivalent size too, by
making their standard runtime libraries dynamically linked instead of statically linked like in the list I posted. (as those libs are *big*)

Of course, then you also need to make sure that the receiving end of those programs have the correct version of runtime library installed, something that is a Huge Pain for distributing C++ programs on Linux...

But Bjarne doesn't have to worry about those small practical things,
(see http://public.research.att.com/~bs/bs_faq.html#Hello-world)
and having Phobos statically linked might prove to be a Good Thing ?

So until D is much more stable, I think Phobos should be kept static.

> I think we'll get a lot smaller executables once 1.0 has been out for some time and we get down to the basic, mundane stuff in development. Or Walter does. :-)

This was with GDC, you could probably make smaller programs with DMD ?

> The 5 years I taught CS made me a firm believer in how immensely important the choice of the first language to teach really is. The things in that language stick with you for the rest of your life, no matter how many others you learn after it.

My first programming language ever was HyperTalk, believe it or not.

--anders
March 21, 2006
Roberto Mariottini wrote:

> I think there are three categories:
> 
> - Scripting languages, for quick tricks (Python, Ruby)
> - VM-based languages, for maximum portability (Java, C#)
> - CPU-compiled languages, for maximum efficency (D, C++, C)
> 
> And there is enough space for all.

I agree with you, although I would probably group them like:

- Scripting: Shell, Perl, PHP, Python, Ruby
- Extension: Lua, ECMAScript, Tcl, Guile
- Object-oriented: Java, C#, Smalltalk
- Hybrid: D, C++, Objective-C
- Lowlevel: C, Assembler

And that leaves out a whole bunch of other languages, still.

--anders

PS.
http://en.wikipedia.org/wiki/List_of_programming_languages
March 21, 2006
Anders F Björklund wrote:
> Georg Wrede wrote:
> 
> So until D is much more stable, I think Phobos should be kept static.

What I'd love is statically linked D programs where only the used parts of the library are linked in. IIRC, Turbo Pascal used to do that.

> My first programming language ever was HyperTalk, believe it or not.

Not a bad language at all to start with. And an excellent one for somebody learning on their own. With HyperTalk one was up and productive in no time at all. (In 1985 I earned money doing HyperTalk stuff.)