May 10, 2003
Walter wrote:


> Since they're 95% identical, I thought it'd be less confusing to combine them.

Yeah, but a plain .zip file doesn't preserve permissions for Linux. I had to manually chmod +x the binaries.


May 10, 2003
On Sat, 10 May 2003 12:43:59 -0700, Garen Parham wrote:


> Yeah, but a plain .zip file doesn't preserve permissions for Linux. I had to manually chmod +x the binaries.

Very true. I had to do the same to make the binaries executable.
May 10, 2003
"Carlos Santander B." <carlos8294@msn.com> escribió en el mensaje
news:b9ji5s$dis$1@digitaldaemon.com...
|
| It's more a gcc question, but maybe someone here can help me. How do I
| create a .a from lots of .o? I was trying to build deimos.a, but I didn't
| have any luck. I must say, however, that using plain .o it works just like
| in win32.
|

Nevermind, I think I found it. It's with "ar", isn't it?

————————————————————————— Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06


May 10, 2003
"Carlos Santander B." <carlos8294@msn.com> escribió en el mensaje
news:b9jrnh$lvf$1@digitaldaemon.com...
| "Carlos Santander B." <carlos8294@msn.com> escribió en el mensaje
| news:b9ji5s$dis$1@digitaldaemon.com...
| |
| | It's more a gcc question, but maybe someone here can help me. How do I
| | create a .a from lots of .o? I was trying to build deimos.a, but I
didn't
| | have any luck. I must say, however, that using plain .o it works just
like
| | in win32.
| |
|
| Nevermind, I think I found it. It's with "ar", isn't it?
|

Apparently it is with "ar". However, I can't get it to work.

I created deimos.a like this:

dmd -c deimos/base deimos/arrays deimos/range deimos/rangeset deimos/utils
deimos/numerics -I/dmd/src/phobos
ar rcs deimos.a deimos/*.o --------> I get the same message if I go to
deimos and then do: ar rcs deimos.a *.o

Now, I have testdeimos.d:

import deimos.base, c.stdio;
void main() {
    instance TComparable(char) cmp;
    printf('%c'\n,cmp.clamp('a','b','e'));
}

If I compile it like this:

dmd -c testdeimos deimos/base -I/dmd/src/phobos
gcc -o testdeimos testdeimos.o base.o /dmd/lib/phobos.a -lm -lpthread

It works perfectly. But if I do this:

dmd -c testdeimos -I/dmd/src/phobos
gcc -o testdeimos testdeimos.o /dmd/lib/deimos.a
/dmd/lib/phobos.a -lm -lpthread

I get:

testdeimos.o: In function `_Dbase__TComparable_a_clamp_Faaaza': testdeimos.o(.gnu.linkonce.t_Dbase__TComparable_a_clamp_Faaaza+0x14): undefined reference to `_assert_base'

And that's what I've been getting since I started this morning.

————————————————————————— Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06


May 11, 2003
Walter wrote:
> Adds linux version.
> 
> http://www.digitalmars.com/d/changelog.html
> 


There seem to be some strange problems with modules having classes sharing the same name.

The following code fails because c.Foo supposedly wants an integer in its constructor.  The second method call also causes an error: "function method () does not match argument types (double)"

a.d(7): constructor this (int i) does not match argument types (wchar[6])



a.d:

import b;
import c;

void main()
{
    b.Foo bfoo = new b.Foo(5);
    c.Foo cfoo = new c.Foo("sup yo");

    bfoo.method();
    cfoo.method(3.14);
}

b.d:

class Foo
{
    int _i;
public:
    this(int i)
    {
        _i = i;
    }

    void method()
    {
        printf("%i\n", _i);
    }
}

c.d:

import string;

class Foo
{
private:
    char[] _msg;

public:
    this(char[] msg)
    {
        _msg = msg;
    }

    void method(double d)
    {
        printf("%s %f\n", toStringz(_msg), d);
    }
}


Additionally:

    new b.Foo("blah").method();   // "found '.' when expecting ';'"

    (new b.Foo("blah")).method(); // works

Even more interesting, I'm also getting an access error:

   c.d(11): class Foo member _msg is not accessible

May 11, 2003
>Since they're 95% identical, I thought it'd be less confusing to combine them.
>
Walter ! I saw all the Mac os threads and the last few of Linux , I 'm just
curious if it would a big
deal to get it working on the Mac, since it is very close to Linux ,so far, that
if want you could
partition the Mac machine and install Unix , and also the Mac osx I think is a
quite a bit more
popular tha Linux.
If you get that then it would be a true cross plattform language. I think you
should consider it and
automaticlly "D" will gain much more and much faster popularity .
Please consider!! Thanks.


May 11, 2003
Hi.

I suspect running on Mac wouldn't be all that hard...  It might be worth doing.

However, I've got some old beefs with Apple.  I'm not going to cry for them if they go under.

Do you remember the Apple II?  I loved those machines.  I wrote tons of code on them.  Back then, I was a huge Apple fan.  Then, the Franklin came out (and others).  Clones.  Apple sued them out of business. Apple, and Steve Jobs in particular, had decided not to give up an inch of the hardware market.

Then, Apple made an enemy of Microsoft.  Come on... if you're determined to sell HARDWARE, then be nice to the SOFTWARE guys!  What morons. Again, Jobs wanted it ALL.

Then, the Mac really took off.  Apple had the largest technology lead in software I can remember ever seeing at any company.  This was the right time to decide to become a real software vendor, but Jobs wouldn't do it.  Instead, Apple made us all buy expensive slow hardware just to have the change to buy their software.

Then came Atari's color computer with a real OS, and better hardware, and a very nice windowing system.  Apple sued them out of the computer business, claiming to have invented basic windowing systems.  They hadn't.  Xerox had.  They broke new ground in suing over look-and-feel, and all that crap.  Only Microsoft had the money and guts to stand up to them.  So... Apple is responsible for squashing inovation in the Windows OS market and handing it to Microsoft!  It took them years, and it still isn't as good, but eventually, Microsoft can do just about anything.

Then, Jobs took a less active roll in the company.  I forget which CEO it was, but the first one that wasn't on a leash decided to make Apple's hardware an open platform.  This was a good idea, and still is, just several years too late.  Big companies, like IBM and Motorolla put hundreds of millions of dollars into the first Apple clones and new CPU.  IBM designed the PowerPC, and added copper interconnect.  Motorola had the sweetest laptops ever built by a long shot.  Then, Jobs came back, and screwed Apple's partners.  He simply refused to let the clone makers run his OS.  It was clear breech of contract, but IBM and Motorolla (and others) couldn't do anything about it.

So... Why are Macs so slow?  Because they pissed off the CPU manufacturers.  That was stupid.  Both IBM and Motorolla have little incentive to do anything nice for Apple now.

So naturally a company this dumb has had some hard times.  The amazing thing to me is that they still exist.  One thing that helps companies like HP get through hard times is being fair with employees.  Apple has had a pretty good reputation, but when Jobs came back into power at Apple, that changed.  The story I hear is he personally went around the company asking random employees "How do you contribute to the bottom line?"  If they stammered, he had security guards take them out of the building.  Fired on the spot.  He was so unpopular at a time that Silicon Valley really needed his tallented work force, that head-hunters had a field day.  One flew an airplane over Apple's main campus, with a sign asking for employees to call him.

All that said, my wife loves her Mac.  I bought her an IPOD for Mother's Day.  I'd even port our company's software to it if Macs weren't so damned slow.

Bill

All The Mac Pepole. wrote:
>>Since they're 95% identical, I thought it'd be less confusing to combine
>>them.
>>
> 
> Walter ! I saw all the Mac os threads and the last few of Linux , I 'm just
> curious if it would a big deal to get it working on the Mac, since it is very close to Linux ,so far, that
> if want you could partition the Mac machine and install Unix , and also the Mac osx I think is a
> quite a bit more popular tha Linux.
> If you get that then it would be a true cross plattform language. I think you
> should consider it and automaticlly "D" will gain much more and much faster popularity .
> Please consider!! Thanks.
> 
> 

May 11, 2003
Bill Cox wrote:
> Hi.
> 
> I suspect running on Mac wouldn't be all that hard...  It might be worth doing.
> 
> However, I've got some old beefs with Apple.  I'm not going to cry for them if they go under.
> 
> Do you remember the Apple II?  I loved those machines.  I wrote tons of code on them.  Back then, I was a huge Apple fan.  Then, the Franklin came out (and others).  Clones.  Apple sued them out of business. Apple, and Steve Jobs in particular, had decided not to give up an inch of the hardware market.
> 
> Then, Apple made an enemy of Microsoft.  Come on... if you're determined to sell HARDWARE, then be nice to the SOFTWARE guys!  What morons. Again, Jobs wanted it ALL.
> 
> Then, the Mac really took off.  Apple had the largest technology lead in software I can remember ever seeing at any company.  This was the right time to decide to become a real software vendor, but Jobs wouldn't do it.  Instead, Apple made us all buy expensive slow hardware just to have the change to buy their software.
> 
> Then came Atari's color computer with a real OS, and better hardware, and a very nice windowing system.  Apple sued them out of the computer business, claiming to have invented basic windowing systems.  They hadn't.  Xerox had.  They broke new ground in suing over look-and-feel, and all that crap.  Only Microsoft had the money and guts to stand up to them.  So... Apple is responsible for squashing inovation in the Windows OS market and handing it to Microsoft!  It took them years, and it still isn't as good, but eventually, Microsoft can do just about anything.
> 
> Then, Jobs took a less active roll in the company.  I forget which CEO it was, but the first one that wasn't on a leash decided to make Apple's hardware an open platform.  This was a good idea, and still is, just several years too late.  Big companies, like IBM and Motorolla put hundreds of millions of dollars into the first Apple clones and new CPU.  IBM designed the PowerPC, and added copper interconnect.  Motorola had the sweetest laptops ever built by a long shot.  Then, Jobs came back, and screwed Apple's partners.  He simply refused to let the clone makers run his OS.  It was clear breech of contract, but IBM and Motorolla (and others) couldn't do anything about it.
> 
> So... Why are Macs so slow?  Because they pissed off the CPU manufacturers.  That was stupid.  Both IBM and Motorolla have little incentive to do anything nice for Apple now.
> 
> So naturally a company this dumb has had some hard times.  The amazing thing to me is that they still exist.  One thing that helps companies like HP get through hard times is being fair with employees.  Apple has had a pretty good reputation, but when Jobs came back into power at Apple, that changed.  The story I hear is he personally went around the company asking random employees "How do you contribute to the bottom line?"  If they stammered, he had security guards take them out of the building.  Fired on the spot.  He was so unpopular at a time that Silicon Valley really needed his tallented work force, that head-hunters had a field day.  One flew an airplane over Apple's main campus, with a sign asking for employees to call him.
> 
> All that said, my wife loves her Mac.  I bought her an IPOD for Mother's Day.  I'd even port our company's software to it if Macs weren't so damned slow.
> 
> Bill
> 

I was about to comment about the difficulty of writing an entire compiler back-end for PPC in comparison to tweaking the existing back-end to output ELF binaries and link with linux libs, but I guess that's a good reason too. :)

In the meantime, Macs are pretty good at emulating x86, so you can always use DMD that way.

May 11, 2003
Well that was actually a fairly accurate rendition of the Apple story.  I
must admit, it always makes for an interesting read.  I heard that Jobs
was indeed a harsh taskmaster.  But I don't necessarily feel Apple is any
more irresponsible or more evil than other companies like...what's that big one...
Microsoft.  They are alive because, to some extent, they were innovative.
And people liked what they had to offer.

Today, though I don't use them, I love Macintoshes and think they are among the most aesthetically appealing systems around (hardware and software).  I really don't think Window's XP has much appeal at all in comparison.  Yet, there is so much software available for it, how could Window's not be useful these days.  Still, I like x86 based systems because they are so easy to customize the hardware and OS. And they're cheap!

Anyway ... I've always loved reading tidbits from computer history. Concerning PARC, a very interesting read is Adele Goldberg's perspective of Steve Jobs little shenanigan.  She was the one that worked with Alan Kay on Smalltalk and was around when these events took place.  I quote:

"Then Jobs came back for a second demo.  He came back with the entire Lisa programming team. (Lisa was the predecessor office workstation to the Macintosh and the competitor to the Xerox Star Workstation of the same period.) Jobs sat with the Apple programmers in a conference room and waited.  He waited three hours while I, as current LRG manager, argued in vain that a demo for the programming team was an inappropriate give-away of Xerox research results.  Worse, Jobs insisted that I give the demo, knowing I was the group's teacher.  My manager at the time was head of PARC Science Center (PARC was split into two while the Corporation sought a new PARC manager who could do a better job of handling the disagreements between CSL and most of the rest of PARC.)  My manager ordered me to give the demo, claiming later that he was ordered to do so from corporate.  It is doubtful that corporate understood enough to be giving any such orders. The plans for Lisa were revised."

(Adele Goldberg, pp 69-70, Chapter 3, The Community of Smalltalk, Object Oriented Programming Languages, Handbook of Programming Languages, Volume I, 1998 Macmillian Technical Publishing)

Now this is getting way off topic.  I apologize.  It's just too interesting :-).

Later,

John



May 11, 2003
"Carlos Santander B." <carlos8294@msn.com> wrote in message news:b9ji5s$dis$1@digitaldaemon.com...
> It's more a gcc question, but maybe someone here can help me. How do I create a .a from lots of .o? I was trying to build deimos.a, but I didn't have any luck. I must say, however, that using plain .o it works just like in win32.

/dmd/src/phobos/linux.mak should be helpful.