Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Walter Bright Ports D To the Mac 404

jonniee writes "D is a programming language created by Walter Bright of C++ fame. D's focus is on combining the power and high performance of C/C++ with the programmer productivity of modern languages like Ruby and Python. And now he's ported it to the Macintosh. Quoting: '[Building a runtime library] exposed a lot of conditional compilation issues that had no case for OS X. I found that Linux has a bunch of API functions that are missing in OS X, like getline and getdelim, so some of the library functionality had to revert to more generic code for OS X. I had to be careful, because although many system macros had the same functionality and spelling, they had different expansions. Getting these wrong would cause some mysterious behavior, indeed.'"
This discussion has been archived. No new comments can be posted.

Walter Bright Ports D To the Mac

Comments Filter:
  • Re:What? (Score:5, Insightful)

    by avalys ( 221114 ) * on Sunday February 22, 2009 @11:10AM (#26948553)

    A Mac is a genuine Unix workstation that is much easier to administer, and has much better software and hardware support than Linux.

    I can run basically every Linux/Unix application on my Mac, both command-line and GUI, while not having to worry about wireless networking drivers, printer support, power management / sleep support on my laptop, getting accelerated 3D drivers working, or any of the other minor hassles that are involved with setting up and maintaining a Linux install.

    If you walk into the computer science department at MIT, basically all the faculty have a Mac, and fully half the students do. These people are not buying Macs because they saw a cool ad on the bus - they're buying them because a Mac is the best tool available.

    The argument that Macs are just expensive, "designer" PCs that look pretty and sell well because Apple has marketed them well doesn't hold water. Yes, they have nice hardware, and a clean, polished, slick UI, and that does make them more pleasant to work with than some blob of Dell plastic running Vista - but they have the functionality to back up their appearance, as well.

    Yeah, they're more expensive. If you value your time at all, you should realize that spending an extra $100 on a Mac is well worth it if it improves your productivity. Hell, if you ever spend two hours fighting with some weird issue on your Linux box, it's no longer saved you any money. You know how long I've spent fighting with the OS to get my wireless working, or hibernate working, or whatever, in Mac OS X, in the five years I've been using a Mac? Zero. I'm not exaggerating. It lives up to the hype. It "just works". It gets out of my way and lets me get things done.

  • Re:What? (Score:0, Insightful)

    by Anonymous Coward on Sunday February 22, 2009 @11:26AM (#26948639)

    Mmmmm... No. Mac is (Free)BSD on the desktop. Sortof.

  • Re:semi (Score:1, Insightful)

    by Anonymous Coward on Sunday February 22, 2009 @11:32AM (#26948661)

    I think you need to study some more C, C++, Java or C# code and you'll notice not every end of line terminates a command..

  • Re:What? (Score:5, Insightful)

    by rhombic ( 140326 ) on Sunday February 22, 2009 @11:43AM (#26948731)

    Why would Mac people hate somebody for that? I ssh into my macs all the time. I pretty much always have terminal windows open. A lot of the molecular biology software I use (the open EMBOSS set of programs ROCK) are command line only, take files as input & write files as output. It's a BSD box with pretty paint. Sure, it's nice to have the pretty screens & be able to run things like iphoto & etc, but at the end of the day the most useful stuff still runs from the > prompt.

  • D -- wha? (Score:5, Insightful)

    by ansak ( 80421 ) on Sunday February 22, 2009 @11:58AM (#26948811) Homepage Journal

    I think the fact that this post has been up for almost an hour and has only 33 follow-ons shows what the software community thinks of D.

    One has to acknowledge that Back in The Day, Walter Bright did all of us a great service in producing the first PC-based C++ compiler (Zortech) which effectively forced Borland and Microsoft to take the language seriously.

    Unfortunately, for all of us, he seems to be better at invention than collaboration but that doesn't devalue the contribution he made (structurally) to get us to where we are.

    cheers...ank

  • why all the hate? (Score:5, Insightful)

    by Bobtree ( 105901 ) on Sunday February 22, 2009 @12:02PM (#26948841)

    The griping and misinformation here is so atrocious that I'm simply embarrassed to be reading Slashdot today.

    Digital Mars D is a wonderfully designed language and I'm in the process of giving up a lifetime of C++ for it.

    I'm not here to defend D or enumerate it's growing pains or evangelize it, but if you don't take it upon yourselves to be well informed, please don't repeat your biased gibberish to the rest of us.

  • by argent ( 18001 ) <peter@slashdot.2 ... m ['.ta' in gap]> on Sunday February 22, 2009 @12:05PM (#26948873) Homepage Journal

    Linux is also UNIX on the desktop. It's just an oddball version of UNIX, with a whole bunch of extra APIs that people using Linux get used to and come to depend on, so they think writing portable code means "it runs on Red Hat and Suse" (or Debian and Ubuntu, if you're on the Left Hand path), and then when they go to port to a more standard version of UNIX, they write stuff like this:

    '[Building a runtime library] exposed a lot of conditional compilation issues that had no case for OSX. I found that Linux has a bunch of API functions that are missing in OSX, like getline and getdelim, so some of the library functionality had to revert to more generic code for OSX. I had to be careful, because although many system macros had the same functionality and spelling, they had different expansions. Getting these wrong would cause some mysterious behavior, indeed.'

    If you're writing code that depends on the expansion of system macros, or if you're depending on obscure Linux-only functions, you're writing unportable code. What really bothers me is the idea that someone writing a Linux-only program would already have run into situations where they had to conditionally compile code. Has Linux really fragmented that much?

  • by argent ( 18001 ) <peter@slashdot.2 ... m ['.ta' in gap]> on Sunday February 22, 2009 @12:12PM (#26948927) Homepage Journal

    I think I've just given FreeBSD fans nightmares for months.

    You don't understand FreeBSD fans, then. Most of the FreeBSD users I know have Mac desktops. Jordan Hubbard works at Apple now.

    Mac on the desktop, FreeBSD in the back office, it's a sweet environment and everything "just works".

  • by Trepidity ( 597 ) <[gro.hsikcah] [ta] [todhsals-muiriled]> on Sunday February 22, 2009 @12:17PM (#26948953)

    People who have been Mac people for a long time generally don't have that workflow, as the importing of the BSD backend is a fairly recent addition to the Mac world, whereas many of the GUI conventions have been around much longer.

  • Re:What? (Score:3, Insightful)

    by mlwmohawk ( 801821 ) on Sunday February 22, 2009 @12:19PM (#26948971)

    A Mac is a genuine Unix workstation that is much easier to administer, and has much better software and hardware support than Linux.

    It has *better* software support from major ISVs, I will grant you that, but it does not have better software support generally and Linux supports far more hardware than MacOS. Not all Linux software runs on the macOS either.

    My wife and son have macs, and I tell you, I'll take Linux every time.

    I can run basically every Linux/Unix application on my Mac, both command-line and GUI, while not having to worry about wireless networking drivers, printer support, power management / sleep support on my laptop, getting accelerated 3D drivers working, or any of the other minor hassles that are involved with setting up and maintaining a Linux install.

    I have a couple printers that don't work on my wife's, son's or mom's mac.

    I have an AMD noname and a Dell desktop as well as an HP pavilion laptop, and I don't have any real problems. I have to use the unsupported nVidia driver, but that isn't too hard to install. Things like Skype just work.

    If you walk into the computer science department at MIT, basically all the faculty have a Mac, and fully half the students do. These people are not buying Macs because they saw a cool ad on the bus - they're buying them because a Mac is the best tool available.

    That is a fairly subjective statement of a dubious conclusion. Most of the guys that I have worked with use macs at work because the "organization" in which they work requires MSOffice which is not supported on Linux. They would rather use Linux or FreeBSD.

    Yeah, they're more expensive. If you value your time at all, you should realize that spending an extra $100 on a Mac is well worth it if it improves your productivity. Hell, if you ever spend two hours fighting with some weird issue on your Linux box, it's no longer saved you any money.

    I am less productive on Mac, and I've spent my time fixing macs as well. I have a standing free bottle of Wine from an upscale wine shop because I was able to get their printer working on their mac. They had been trying for months.

    When it comes to productivity, lets see a Mac do this:

    ssh -X hostaddr application

    And have the GUI application pop up on a remote screen without the WHOLE screen like VNC.

    in Mac OS X, in the five years I've been using a Mac? Zero. I'm not exaggerating. It lives up to the hype. It "just works". It gets out of my way and lets me get things done.

    Its funny, EVERY SYSTEM has issues. People who claim they do not are lying. Like I said, my wife, mom, and son have macs. I've developed software on macs periodically for about 15 years. OS/X does have its issues. There are hardware issues on macs.

    For average users I recommend mac because it has far fewer problems than Windows. For techies, there is no substitute for Linux or FreeBSD. (I prefer Linux, but I have friends who prefer FreeBSD.)

  • Are you insane? (Score:1, Insightful)

    by gbutler69 ( 910166 ) on Sunday February 22, 2009 @12:24PM (#26949003) Homepage

    You are not going to seriously suggest that Mac OSX supports more hardware than Linux are you?

    I have a System76 Laptop running Ubuntu Linux 8.10. I have ZERO problems with hardware support of ANY KIND!

    • Wi-Fi - CHECK!
    • LAN - CHECK!
    • 3-D Desktop with BEAUTIFUL effects - CHECK!
    • Games - CHECK!
    • Productivity Software - CHECK!
    • Music Software - CHECK!
    • Video Software - CHECK!
    • 3-D Modeling Software - CHECK!
    • Imaging Software - CHECK!
    • Vector Graphics Software - CHECK!
    • Programming Environments and IDE's - CHECK!
    • Wireless 3-G Broadband with Verizon - CHECK!
    • Anything else I can imagine - CHECK!

    Your entire post is a complete puddle of steaming ass-goo for anyone who actually is in the know about GNU/Linux/Ubuntu. It truly is laughable!

  • by Kuciwalker ( 891651 ) on Sunday February 22, 2009 @12:24PM (#26949007)
    Seriously, name me a piece of commercial or open-source software with significant market share written in D. Library support is about 10000% more important than actual language design.
  • Re:What? (Score:3, Insightful)

    by jonaskoelker ( 922170 ) <jonaskoelkerNO@SPAMyahoo.com> on Sunday February 22, 2009 @12:26PM (#26949017)

    you should realize that spending an extra $100

    I think you forgot a zero. Prices may be different in my-vs-your neck of the worlds, though.

    and has much better software and hardware support than Linux.

    I think Linux has much wider hardware support (it works on non-apple hardware too), whereas OS X has full support for a much smaller set of hardware. What's better depends on personal preferences.

    I can run basically every Linux/Unix application on my Mac

    Really? Didn't the summary just say that some of the system calls are missing on OS X and some macros are different? Or did you mean running the binaries (in which case, there's still the system calls)? Or do you cheat by running Linux on your Mac? ;-)

    You love your Mac, and that's great for you (really, I mean that). But I think you might be overselling it just a little. Bullshit detector went from green to yellowish green ;-)

  • by pohl ( 872 ) on Sunday February 22, 2009 @12:26PM (#26949023) Homepage

    "fairly recent!?" Dude, that was a decade ago. I became a Mac user when Rhapsody first came out (it was the NeXT lineage that brought be onboard) and a lot of time has passed since. This reminds me of growing up in Podunk, Nebraska, in that after living their for 10 years the old ladies at the Methodist church were still referring to my mother as "the new girl in town".

  • by Anonymous Coward on Sunday February 22, 2009 @01:05PM (#26949341)

    What really bothers me is the idea that someone writing a Linux-only program would already have run into situations where they had to conditionally compile code. Has Linux really fragmented that much?

    It's not Linux-only: it's Linux and Win32. Hence the conditional compilation.

    The author was hoping that his Linux-specific code would work on OSX, but it doesn't.

  • by argent ( 18001 ) <peter@slashdot.2 ... m ['.ta' in gap]> on Sunday February 22, 2009 @01:10PM (#26949399) Homepage Journal

    Oh yeh, this is slashdot alright. "When someone suggests you might be wrong, tell them they're a troll. Everyone hates trolls and accusing someone else of being a troll is the best possible way to divert attention from your own trolling".

    No, I'm not playing, sorry.

  • Bunch of kids with a trademark in their pocket.

    UNIX is a family of operating systems with a native API and system call interface based on the UNIX programmer's manual, published by Bell Labs (usually the 7th edition).

    That's a *useful* definition for UNIX.

  • by argent ( 18001 ) <peter@slashdot.2 ... m ['.ta' in gap]> on Sunday February 22, 2009 @02:23PM (#26950027) Homepage Journal

    I am well aware that your initial post was a strawman attack.

    Let's see. Someone claimed that OS X supports the hardware it runs on better than Linux does. You responded by talking about the variety of platforms that Linux runs on. That's a perfect example of a straw man. The guy you were responding to doesn't care if OS X runs on an Alpha or Integrity server, or that old Indy you have in the back room to show how cool you are.

    My response was that it doesn't matter, if you want to run on oddball hardware, you could run pretty much the same OS on all the same oddball hardware. For someone who actually uses BSD variants on a regular basis, it doesn't matter whether whether one is running FreeBSD, OS X, OpenBSD, Tru64, NetBSD, and so on... they are largely fungible, just as Ubuntu, YDL, and Gentoo are. Which is why I run FreeBSD servers and Mac desktops, and develop software on both.

    I didn't complain that you can't boot a Ubuntu install CD on a Powermac, and need to get a Yellow Dog image instead. Now that WOULD be a straw man.

    OSX is BSD, just as much as OpenBSD is. Yes, you have to use Apple's hardware to run OS X. That's the cost you pay to get the best UNIX desktop. I wish I could run OS X on a Thinkpad instead of my Macbook, but OS X is enough better than any Linux desktop that I've found that I'm willing to put up with it.

    But that doesn't make OSX "not BSD" any more than the fact that YDL won't boot on your Thinkpad makes YDL "Not Linux".

  • Re:D -- wha? (Score:2, Insightful)

    by Anonymous Coward on Sunday February 22, 2009 @03:29PM (#26950543)

    I think the fact that this post has been up for almost an hour and has only 33 follow-ons shows what the software community thinks of D.

    Or what they think of Macs.

    Or what they think of hanging out on Slashdot on Sunday mornings.

  • by argent ( 18001 ) <peter@slashdot.2 ... m ['.ta' in gap]> on Sunday February 22, 2009 @03:30PM (#26950563) Homepage Journal

    Indeed, he said "a Mac", not "OS X".

    OS X has better support for Mac hardware than Linux does for any hardware I've tried it on.

  • Re:What? (Score:3, Insightful)

    by Guy Harris ( 3803 ) <guy@alum.mit.edu> on Sunday February 22, 2009 @04:18PM (#26950935)

    Abandoning X11 was a mistake.

    "Abandoning" implies that they used to use it and stopped. NeXTStEP never used X11 as its underlying window system (its window system was Display Postscript-based), and Mac OS X never did, either.

    Whether it was a mistake or not depends on your goals. It was a mistake if being able to run individual GUI applications "over the wire" is important. It wasn't a mistake if it allowed them to get a given level of graphics performance and capabilities faster.

  • by tres ( 151637 ) on Sunday February 22, 2009 @04:20PM (#26950959) Homepage

    This is a ridiculous assertion based upon an interpretation of an overly abstract -- if not inaccurate sentence -- out of context; however the context for the statement does clarify the original meaning of the sentence.

    Let's look at the sentence being argued:

    A Mac is a genuine Unix workstation that is much easier to administer, and has much better software and hardware support than Linux.

    And it doesn't take much to find one sentence later this clarification:

    I can run basically every Linux/Unix application on my Mac, both command-line and GUI, while not having to worry about wireless networking drivers, printer support, power management / sleep support on my laptop, getting accelerated 3D drivers working, or any of the other minor hassles that are involved with setting up and maintaining a Linux install.

    So having some silly pseudo philosophical argument about the meaning of "hardware support" in the original post and calling people liars if their argument doesn't conform to your viewpoint is not productive, nor does it take into account the original post.

  • Re:What? (Score:3, Insightful)

    by RedK ( 112790 ) on Sunday February 22, 2009 @05:28PM (#26951429)

    It is certain your iTunes application will not run in this way.

    Have you tried tunneling Amarok in the way you suggest ? Unfortunatly for you, sound isn't part of the X11 specification, so unless you're using something like a sound daemon (a la esound) and have forwarded that also, the result might not be what you're expecting. I don't see why not being able to remotely display iTunes' GUI would be a problem.

  • by Anonymous Coward on Sunday February 22, 2009 @06:49PM (#26952111)

    Eliminating message passing overhead != eliminating message passing...

  • Re:What? (Score:3, Insightful)

    by jeremyp ( 130771 ) on Sunday February 22, 2009 @08:30PM (#26952903) Homepage Journal

    Let's be clear. The limited capability here is the fact that you have to use a kludge like VNC or Apple Remote Desktop to access your computer remotely. Apple (and Microsoft) have ditched this "important feature" in favour of improving the UI experience for the user when they are sitting in front of the computer. And guess what, only a few people ever complain about the lack of this "important feature", the reason being that most of us do not lock our computers in server rooms and access them with X terminals.

    It's clear that Apple (and Microsoft) have made the right decision because more than 99% of personal computers run one or other of those operating systems. Your "important feature" seems to be totally irrelevant to 99 and a bit percent of all computer users.

  • by x2A ( 858210 ) on Sunday February 22, 2009 @09:30PM (#26953359)

    Depends what you like... Perl's a favourite of mine, probably because of the things you hate about it. It has a very natural feel to it, as the way which it's evolved, like natural spoken languages, there's all kinds of often hidden subtleties, and there's nearly always more than one way to do anything, different ways efficient in different ways and so good for different purposes. Downside of course is it's multithreading support (or rather, lack of it).

    I like it for server stuff, as it's real easy to get it to detect when the code on disk has changed, load 'n compile it into memory, and splice it into what's already running... without losing any data structures or anything, and if there's any errors in the code, throw an error, and go back to the previous working version of that module. Without need for any close/restarts.

  • by Dog-Cow ( 21281 ) on Monday February 23, 2009 @11:09AM (#26957511)

    OS X 10.5 is certified.

"Engineering without management is art." -- Jeff Johnson

Working...