View mode: basic / threaded / horizontal-split · Log in · Help
August 02, 2010
Mac OSX installer for dmd
Hello,


I got an email from someone who got an interest in D following my talk 
at Google. He tried to install dmd on OSX, but got turned off (and 
rightly so) for the unnecessary difficulties of that process and the 
lack of documentation. Nicely of him he took the time to write me and 
detail his experience. Following that, Walter managed to fix the most 
egregious documentation errors.

Ideally we'd have a one-click OSX installer for dmd - a .dmg file. Is 
someone able and willing to own this project? I think improving the 
out-of-the-box experience is important and urgent.


Andrei

P.S. My talk at Google went, I think, reasonably well. It could've gone 
a whole lot better; I neglected to make a couple of points. The talk was 
recorded and, I was told, the recording will be on YouTube some time 
next week. My mentions of Python and Haskell will probably get me 
mortified in certain circles.
August 02, 2010
Re: Mac OSX installer for dmd
On 8/1/10 5:07 PM, Andrei Alexandrescu wrote:
> Hello,
>
> I got an email from someone who got an interest in D following my talk
> at Google. He tried to install dmd on OSX, but got turned off (and
> rightly so) for the unnecessary difficulties of that process and the
> lack of documentation. Nicely of him he took the time to write me and
> detail his experience. Following that, Walter managed to fix the most
> egregious documentation errors.

Are those fixes reflected anywhere on the site? I found the process to 
be a little clumsy, but not hideous; I would be very interested to see 
what's changed, though.

[Possibly OT?]
The only real trouble I ran into is this:
$ ./rdmd
dyld: unknown required load command 0x80000022
Trace/BPT trap

> Ideally we'd have a one-click OSX installer for dmd - a .dmg file. Is
> someone able and willing to own this project? I think improving the
> out-of-the-box experience is important and urgent.

I don't know that a simple .dmg file is the right way to go, since you 
need to get some binaries onto the user's path. I think it'd have to be 
a .mpkg package IIRC (which are, admittedly, distributed in a .dmg files)

I don't have much experience with packaging for OSX, but if there are 
not more experienced folks willing to take it on, I'm willing to take 
this on: would love to help, but sadly I don't have the compiler chops 
to make a more significant contribution.

> Andrei
>
> P.S. My talk at Google went, I think, reasonably well. It could've gone
> a whole lot better; I neglected to make a couple of points. The talk was
> recorded and, I was told, the recording will be on YouTube some time
> next week. My mentions of Python and Haskell will probably get me
> mortified in certain circles.

[OT]
I thought it went well myself, but I might be something of an easy mark. 
Which points did you miss?
August 02, 2010
Re: Mac OSX installer for dmd
Ryan W Sims wrote:
> On 8/1/10 5:07 PM, Andrei Alexandrescu wrote:
>> I got an email from someone who got an interest in D following my talk
>> at Google. He tried to install dmd on OSX, but got turned off (and
>> rightly so) for the unnecessary difficulties of that process and the
>> lack of documentation. Nicely of him he took the time to write me and
>> detail his experience. Following that, Walter managed to fix the most
>> egregious documentation errors.
> 
> Are those fixes reflected anywhere on the site?

Here's what I sent the guy:

======================================
1. I put up a new download,

   http://ftp.digitalmars.com/dmd.2.047.zip

All that's different is it adds the file:

   dmd2/osx/bin/dmdx.conf

and adds a revised license file:

   dmd2/license.txt

which hopefully will make things clearer.

2. I revised the installation instructions:

   http://www.digitalmars.com/d/2.0/dmd-osx.html

which now also include instructions for building dmd and the runtime library. If 
things still fail for you, please let me know.
========================================

If these changes improve things, I'll fold them into D1 as well.
August 02, 2010
Re: Mac OSX installer for dmd
On 08/01/2010 07:22 PM, Ryan W Sims wrote:
> On 8/1/10 5:07 PM, Andrei Alexandrescu wrote:
>> Ideally we'd have a one-click OSX installer for dmd - a .dmg file. Is
>> someone able and willing to own this project? I think improving the
>> out-of-the-box experience is important and urgent.
>
> I don't know that a simple .dmg file is the right way to go, since you
> need to get some binaries onto the user's path. I think it'd have to be
> a .mpkg package IIRC (which are, admittedly, distributed in a .dmg files)

You're already way ahead of me. When I said .dmg, I'd already expounded 
90% of my knowledge of OSX installers.

> I don't have much experience with packaging for OSX, but if there are
> not more experienced folks willing to take it on, I'm willing to take
> this on: would love to help, but sadly I don't have the compiler chops
> to make a more significant contribution.

Thanks, that would be terrific. To frame the problem more precisely, I 
think a shell script that takes a .zip file containing the installation 
and doing what it takes to build a .mpkg would be perfect.

>> Andrei
>>
>> P.S. My talk at Google went, I think, reasonably well. It could've gone
>> a whole lot better; I neglected to make a couple of points. The talk was
>> recorded and, I was told, the recording will be on YouTube some time
>> next week. My mentions of Python and Haskell will probably get me
>> mortified in certain circles.
>
> [OT]
> I thought it went well myself, but I might be something of an easy mark.
> Which points did you miss?

Thanks for being there! I had this example in my slides (repro from memory):

import std.exception, std.file;
void main(string[] args) {
   enforce(args.length == 3, "Usage: tcopy file1 file2");
   auto tmp = args[2] ~ ".messedup";
   scope(failure) if exists(tmp) remove(tmp);
   copy(args[1], tmp);
   rename(tmp, args[2]);
}

It's a simple transactional copy program that never leaves the fragment 
of its target on the disk (rename is atomic on all Unixen and most 
likely Windows too). It's a very annoying problem with large files 
copied via network connections, I've been using such an idiom for years.

A couple of people got rightly worried that the script uses names such 
as copy, rename, and remove. Such names are highly susceptible to be 
ambiguous when more imports are used. I explained how D works (which I 
think is a very solid design, probably the best I've seen), but the 
nagging issue remained that changes to a library could make a call 
ambiguous to a function in another. I personally think that's all well 
but it's a matter in which reasonable people may disagree.

What I forgot to mention is static import, which would have quenched 
that question perfectly.


Andrei
August 02, 2010
Re: Mac OSX installer for dmd
Andrei Alexandrescu:
> I explained how D works (which I 
> think is a very solid design, probably the best I've seen),

The D module system has some holes, most of them are already reported in Bugzilla (some of them are more than just implementation bugs).
From your words I presume you have never seen the Python module system :-) It lacks the holes present in the D one and its management of packages is almost good.

Bye,
bearophile
August 02, 2010
Re: Mac OSX installer for dmd
On 08/01/2010 08:16 PM, bearophile wrote:
> Andrei Alexandrescu:
>> I explained how D works (which I
>> think is a very solid design, probably the best I've seen),
>
> The D module system has some holes, most of them are already reported in Bugzilla (some of them are more than just implementation bugs).

I'm referring to the design more than the implementation.

>  From your words I presume you have never seen the Python module system :-) It lacks the holes present in the D one and its management of packages is almost good.

I agree that Python's module system is very solid.


Andrei
August 02, 2010
Re: Mac OSX installer for dmd
On 2010-08-01 20:07:10 -0400, Andrei Alexandrescu 
<SeeWebsiteForEmail@erdani.org> said:

> Ideally we'd have a one-click OSX installer for dmd - a .dmg file. Is 
> someone able and willing to own this project? I think improving the 
> out-of-the-box experience is important and urgent.

I agree too. That's why I made sure the D for Xcode installer installs 
DMD too, so the user doesn't have to bother about that whole mess.
<http://michelf.com/projects/d-for-xcode/>

If you download this package from Safari it'll automatically open in 
Mac OS X's standard installer program from where you can proceed with 
the installation. The installer package does not contains DMD: it 
downloads the latest version from the website during the install 
process. It installs DMD 1 and DMD 2 and makes them work both from the 
command line though symlink trickery.

A nice "side effect" of using this installer is that you'll also be 
ready to use D from whithin Xcode. But you can deactivate that part by 
customizing the install and unchecking the relevant subpackages. You 
can install just DMD 2 or just DMD 1 that way too.

Try it, it just works.

-- 
Michel Fortin
michel.fortin@michelf.com
http://michelf.com/
August 02, 2010
Re: Mac OSX installer for dmd
Hello bearophile,

> Andrei Alexandrescu:
> 
>> I explained how D works (which I think is a very solid design,
>> probably the best I've seen),
>> 
> The D module system has some holes, most of them are already reported
> in Bugzilla (some of them are more than just implementation bugs).
> 
> From your words I presume you have never seen the Python module system
> :-) It lacks the holes present in the D one and its management of
> packages is almost good.

With aliases and static/selective imports what can python do that D can't? 
I'll grant it might not be as clean, but everything I know of that python 
can do, I can think how to make D do. OTOH I'm no Python experts so I'd love 
to learn of some new nice features I can use.


-- 
... <IXOYE><
August 02, 2010
Re: Mac OSX installer for dmd
== Quote from bearophile (bearophileHUGS@lycos.com)'s article
> Andrei Alexandrescu:
> > I explained how D works (which I
> > think is a very solid design, probably the best I've seen),
> The D module system has some holes, most of them are already reported in
Bugzilla (some of them are more than just implementation bugs).
> From your words I presume you have never seen the Python module system :-) It
lacks the holes present in the D one and its management of packages is almost good.
> Bye,
> bearophile

Python is my language of second choice for things where D just isn't the right
tool for the job.  This basically means anything where efficiency and static
checkability don't count much but either dynamicness or
mainstreamness/maturity/support counts a lot.  There's a lot that's good about the
language.  That said, I think D's module system is much better.  Python's module
system suffers from one huge wart that makes me hate it no matter how good it is
otherwise:  There's no way to import a module such that you don't have to use
qualified names, **but** when there's a collision the behavior is reasonable and
avoids hijacking.

I absolutely despise using qualified names because they are both syntactic noise
and extra typing.  D lets me just import tons of stuff and skip the qualified
names in most cases.  Most of the time it does what I mean, and it complains if
and only if there's ambiguity about what I mean.  With Python, I have two options:

1.  import module, which sucks because contrary to most of Python's terseness and
expressiveness this forces me to constantly qualify my names, leading to extra
typing and syntactic noise.

2.  from module import *, which sucks because contrary to the Python philosophy it
allows hijacking, or in other words guesses in the face of ambiguity.
August 02, 2010
Re: Mac OSX installer for dmd
On 08/01/2010 10:06 PM, Michel Fortin wrote:
> On 2010-08-01 20:07:10 -0400, Andrei Alexandrescu
> <SeeWebsiteForEmail@erdani.org> said:
>
>> Ideally we'd have a one-click OSX installer for dmd - a .dmg file. Is
>> someone able and willing to own this project? I think improving the
>> out-of-the-box experience is important and urgent.
>
> I agree too. That's why I made sure the D for Xcode installer installs
> DMD too, so the user doesn't have to bother about that whole mess.
> <http://michelf.com/projects/d-for-xcode/>
>
> If you download this package from Safari it'll automatically open in Mac
> OS X's standard installer program from where you can proceed with the
> installation. The installer package does not contains DMD: it downloads
> the latest version from the website during the install process. It
> installs DMD 1 and DMD 2 and makes them work both from the command line
> though symlink trickery.
>
> A nice "side effect" of using this installer is that you'll also be
> ready to use D from whithin Xcode. But you can deactivate that part by
> customizing the install and unchecking the relevant subpackages. You can
> install just DMD 2 or just DMD 1 that way too.
>
> Try it, it just works.

That sounds encouraging. Would you be willing to modify and contribute 
your installer for dmd?

Thanks,

Andrei
« First   ‹ Prev
1 2 3 4 5
Top | Discussion index | About this forum | D home