Slashdot Log In
Intel Software Development Products for OSX
Posted by
Hemos
on Mon Jan 16, 2006 08:37 AM
from the seeding-the-landscape dept.
from the seeding-the-landscape dept.
rgraham writes "Intel has released a number of development tools for OSX, including a C++ and Fortran compiler. I for one would be interested to see some benchmarks of code compiled using these tools and Apple's own Xcode."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.
Benchmarks already exist (Score:5, Interesting)
Re:Benchmarks already exist (Score:3, Informative)
apple uses objective c / uses of fortan (Score:4, Insightful)
The C++ is nice but since most osx programs are written on objective c, probably of little use.
Those math libraries look like the ticket though. Everone likes highly optimized math libraries.
Re:apple uses objective c / uses of fortan (Score:2)
Re:apple uses objective c / uses of fortan (Score:2)
IBM XL Fortran (PowerPC) [ibm.com]
Re:apple uses objective c / uses of fortan (Score:2)
Incidentally, IBM's XL Fortran simply screams on G5s. I've compiled ab-initio codes (Quantum Chemistry) with it, and get speeds identical to Opterons running Linux, compiled with Pathscale or IFC (in em64T mode). IBM's fort
Re:apple uses objective c / uses of fortan (Score:2)
Why can't the program have both C++ and Fortran modules in it? We do this all the time where I work.
Re:apple uses objective c / uses of fortan (Score:2)
You'll have to confirm this with the Folding@Home people, but the versions I saw previously were spitting out Gromacs http://www.gromacs.org/ [gromacs.org] messages, which is written in C++.
Nope. Gromacs is written in plain C, with alternative implementations for some inner loops in fortran and asm.
Re:apple uses objective c / uses of fortan (Score:5, Informative)
Parent
Re:apple uses objective c / uses of fortan (Score:2)
Re:apple uses objective c / uses of fortan (Score:4, Informative)
Parent
Re:apple uses objective c / uses of fortan (Score:2)
The following does indeed compile on GCC 4 (on Tiger and FC4):
typedef int zz __attribute__ ((vector_size(64)));
but what you say may have been true in GCC 3...
PLEASE: A vector-based switch statement?!?!?!? (Score:2)
FORTRAN has a vector data type, which makes it a lot easier to optimise certain types of code for AltiVec, SSE, etc. If you write the code in C, you have to translate it into scalar intrinsics, and the compiler has to work backwards to attempt to determine the vector operations you meant.
Has ANYONE produced a language with vector-based switch statements?
A pseudo-example might look like
Re:PLEASE: A vector-based switch statement?!?!?!? (Score:2)
Obviously... (Score:2)
Not to be snide, but if you have a bit-vector of truth values, can't you just use ints?
Obviously, but now you're embedding "machine code" in an abstract software language.
The purpose of a language is to abstract the "machine code" to the point that a maintainer of the code can glance at the code, and, without too much thought, realize more or less what it is that is transpiring within the code.
PS: A priori apologies if "abstract" is forbidden to function as a transitive verb.
Re:Obviously... (Score:2)
However, representing bit-vectors as integers is an extremely common practice in C and other languages, and any competent programmer will recognize this idiom. (See for example the "flags" argument for the UNIX open(2) call.) With a little bit of (tasteful) preprocessor use, you can basically get the same sort of code as the example in your initial post. Finally, while you must put in some extra effort if data ar
Re:PLEASE: A vector-based switch statement?!?!?!? (Score:3, Informative)
Re:PLEASE: A vector-based switch statement?!?!?!? (Score:2)
elemental integer function myconditional(a,b)
integer, intent(in)
select case (a+b)
case(1, 2, 3, 5, 7, 11, 13)
return (a+b)^2
case(4,9)
return a+b
case(16:)
Re:PLEASE: A vector-based switch statement?!?!?!? (Score:2)
Pretty much any functional language has this sort of thing. In Ocaml [inria.fr], for examples, you have "match" statements that can use tuples, lists, or whatever as arguments:
this defines a boolean "and" that takes a pair of bool's and returns "true" only if both are true. Not sure if this is what you meant... And by the way, ocaml compiles to pretty fast native code (com
Re:apple uses objective c / uses of fortan (Score:2)
It is trivial to write a translating compiler- in fact Apple has (had?) one for Objective-C and Objective-C++ at one point. Objective-C is a strict superset of C, so if XCode does directly target Intel's new offering I suspect that we'll simply see the translator again, and yes, it will be of considerable use.
Re:apple uses objective c / uses of fortan (Score:2)
Re:apple uses objective c / uses of fortan (Score:2)
The reason why new Macs are so much faster? (Score:4, Interesting)
Re:The reason why new Macs are so much faster? (Score:2, Insightful)
Re:The reason why new Macs are so much faster? (Score:4, Insightful)
Parent
Re:The reason why new Macs are so much faster? (Score:3, Interesting)
That being said.. it would be interesting to see good benchmarks between the dual core G5 and the Core Duo. I realize that currently
Re:The reason why new Macs are so much faster? (Score:2)
Only a beta, and not free (Score:2)
Re:Only a beta, and not free (Score:2)
You can use Intel's compiler with Xcode (Score:2)
And you can always compile from the command-line, either directly or with a makef
Re:Notice its C++ and not Objective-C (Score:3, Insightful)
why is this a shame? They're using a language that actually makes sense, rather than one that's just a bunch of ideas cobbled together on top of C, and you think this is a shame? or is it just that you didn't have an Objective C class when you went to devry*, so you don't know anything about it?
Yes, Intel's compiler is faster on intel hardware than gcc. this is true in every os that runs on intel hardware... but makes
Re:Notice its C++ and not Objective-C (Score:2)
Because most development for Windows and for Linux is not done with Objective-C.
It is done with C++ on Windows and with c and C++ under Linux.
If you want to port your program from OS/X to a different program you ar
Re:Notice its C++ and not Objective-C (Score:5, Informative)
GNUstep [gnustep.org] may not be anywhere nearly as mature as Qt or Gtk, but it's hardly a non-starter.
Parent
Re:Notice its C++ and not Objective-C (Score:2)
For an individual GNUStep +objectiveC could be a great solution but if you are planing on building software for the masses C++ still is the compiled OO development of choice for Windows and Linux
Re:Notice its C++ and not Objective-C (Score:2)
> rather than one that's just a bunch of ideas cobbled together on top of C
"One man's theology is another man's belly laugh." [brainyquote.com]
Perhaps we should extend this to language wars: "One man's sensibly designed language is another man's mutant freak."
You may really dig Obj-C, but personally, I look at it and get the heebie-jeebies. It has its moments, but I hate the syntax, and for me, I'll take C++'s rigid type system over it any day.
Re:Notice its C++ and not Objective-C (Score:2)
Re:Notice its C++ and not Objective-C (Score:2)
you responded
Instead of relying on ad-hominem [reference.com] attacks, please try to actually address the
Re:Notice its C++ and not Objective-C (Score:2, Informative)
C++ is better here:
vector va, vb, vc;
vector vd;
vd = va * vb + vc;
vs Objective-C:
FloatVector * va, vb, vc;
IntVector * vd;
[vd autorelease];
vd = [IntVector vectorWithFloatVector:[[va multiplyFloatVec:vb] addFloatVec:vc]];
Objective-C (err Cocoa) is better here:
id someObj, someString =
if([someObj respondsToSelector:@selector(stringValue)])
someString = [someObj stringValue];
vs C++:
B
Re:Notice its C++ and not Objective-C (Score:5, Interesting)
I don't know that it would be a shame.
Certainly, if C++ were the language of choice for Cocoa, it might make C++ users feel more encouraged to target Cocoa, but it wouldn't actually help them write code for Cocoa.
The C++ interfaces for different display and widget systems are as different as the systems themselves- QT uses a "moc" C++ compiler that isn't even really C++ for signals and slots support- but encourages programmers to avoid tampering with the event loop, while Win32 encourages direct access with it.
So maybe if "Cocoa++" were around, it might help QT programmers (as the "moc C++" was designed to add features that Objective-C has, but that C++ didn't (and still doesn't well...)), but it certainly wouldn't help Win32 programmers in the slightest- except in "feeling" like all they've got to learn is a new API instead of a new language.
However, it may be better to point out that unlike the vast gap between C and C++ that makes them so distinctly different languages, Objective-C is a strict superset of C, in the sense that all C code is also Objective-C code. Apple also provides Objective-C++ which is a strict superset of C++, in the sense that all C++ code is also Objective-C++ code.
Now, most proficient programmers have no problem picking up a new language in a matter of hours; and Objective-C is so completely straightforward that just diving in is bound to validate that [paullynch.org].
However, there are less-proficient programmers, and they tend to produce, sub-standard quality software. Given how much Cocoa software is of such high quality, it does beg the question: Is it the lack of poor programmers working in Objective-C, or is it that Objective-C is just that wonderful to use?
Having a "Cocoa++" might answer that question definitively, but I simply cannot see how that would be a Good Thing.
Parent
Re:Notice its C++ and not Objective-C (Score:2)
Yes, but what version of C?
It's been a while since I coded in Objective-C, but last time I did, it didn't appear to implement C99 standards... e.g.,
for (int i = 0; i 99; ++i) {
would not compile because it didn't recognize the inside-the-for-loop variable declaration.
Re:Notice its C++ and not Objective-C (Score:3, Informative)
Probably since before 1999, or at least before C99 support was added.
int main() {
for (int i = 0; i < 99; ++i);
return 0;
}
Compiled just fine with: gcc -std=c99 -o moo moo.m
C99 Test. (Score:2, Insightful)
BTW: The place where most so called C99 compiler fail are variant arrays - A feature even ALGOL 60 had (40 years ago) - and it's decendants like Ada and ISO-Pascal still have today. But C vendors can't get it right or worse don't even try.
Martin
Re:Notice its C++ and not Objective-C (Score:2)
Qt programs are 100% pure C++. "signal", "slot", and "emit" are macros. Plain ordinary C macros. But far far prettier macros than those monstrosities Microsoft has for MFC. What moc does is to use those macros to generate signal/slot code. As such, it's not much different from Qt Designer, which generates GUI code from XML.
You don't need stuff like this with Objective-C, to be sure, but beware getting stuck in that FUD pit of thinking that Qt isn't true
Re:Notice its C++ and not Objective-C (Score:2)
Re:Notice its C++ and not Objective-C (Score:2)
It's just not very interesting because it's trivial to resolve such incompatibilities -- unless your compiler is really, really good at reporting deceptive error messages, I guess.
Re:Notice its C++ and not Objective-C (Score:3, Interesting)
That's the point. C++ is not compatible with C, whereas Objective-C IS compatible with C.
It's not like trying to get a C programmer to write C++ (something that's very difficult), because Objective-C isn't anywhere near as complicated as C++ and yet does it so much better.
It's just not very interesting because it's trivial to resolve such incompatibilities -- unless your compiler is really, really good at reporting deceptive error m
Re:Notice its C++ and not Objective-C (Score:2)
The barrier is high because only Apple uses Objective-C. You're going to face all sorts of hurdles using ObjC with Windows, Unix or Linux. I really wish ObjC caught on outside of NeXT and Apple, because it is such a nice language, but the reality is that it didn't.
Using Objective-C to write GUI code outside of Mac OSX is difficult, to list one particularly high barrier, simply because there are no suitable(*) Objective-C GUI lib
Re:Notice its C++ and not Objective-C (Score:2)
An other problem, which is a bit more work to fix, is that you have to cast (void *) so
int *data=malloc(sizeof(int)*100) is not valid c++
Re:Notice its C++ and not Objective-C (Score:2)
Re:Notice its C++ and not Objective-C (Score:2)
Subjective. This construct:
typedef void* class;
is valid C and Objective-C, but not C++.
You might say "most C code", or "a lot of C code", or even "my C code" and get less argument, but by saying "good C code" you're saying that anyone who wants to use an obvious type name (like class) in C (like Bjarne did with C-with-classes) isn't producing good code.
Now, I may tend to agree: I think the author of C++ has no idea what he's doing and couldn't good code (let alone "