Sybase to Open Souce Watcom C/C++ & Fortran Compiler
Kendall Bennett writes "Rumours have been running around for some time, but now it is official. Sybase has announced that it will be releasing the full source code to the Watcom C/C++ and Fortran compilers under an Open Source license. For more information see the new Open Watcom website." The press release states as well that the license will comply with an OSI approved license.
Watcom VI source code will be included as far as I know.
- Kendall
I *was* going to comment that obfuscated c tends to obfuscate function, while obfuscated fortran tends to hide transfer of control. However, I think I"d blanked out nightmares like that one.
I never truly understood the horror of spaghettic code until I needed to use a program of my boss's. I was using Fortran 90 at the time (Absoft on x86 Linux and dec/compaq on alpha [and Steve was the one who answered some of my problems, come to think of it {and while I'm abusing subparentheses, my boss probably would have had an alpha if compaq fortran had been available for linux/alpha at the time}[), and the program was allegedly in F77. It was closer to FIV, but hadn't even used parts of *that* that would make it clearer (I suspect it descended from the Numerical Recipes book), so the thing ended up as a mix of II, IV, 77, and 90 . . . but that we could have dealt with. It was all of the gratuitious gotos that meant it took three days to figure out what the program was doing . . .
hawk
It's FORTRAN-77. I know some people whu use it and they seem to be happy with it.
In theory, we should be able to take some of the smarts from the Watcom compiler and put them in GCC. I bet this won't be very possible in practice simply because of architectural differences in the compilers.
"It may be remarked in passing that success is an ugly thing. Men are deceived by its false resemblences to merit."
I really hope the code is released as GPL (or a GPL-compatible license). That way, the egcs (now gcc) team could incorporate some code (mostly optimizations I guess) in gcc. Also, I *think* the fortran frontend (g77) is missing a lot of features (like pointers). Maybe they'd be able to use Watcom fortran for these features... or even take the code to build a new frontend.
What's clear to me is that few people would be willing to continue developping watcom. I see more future in incorporating watcom stuff into gcc.
Opus: the Swiss army knife of audio codec
Direct from the OpenWatcom FAQ:
Q: What compilers will I need to compile the source code?
A: Initially the Open Watcom 1.0 compiler will require an official copy of the Watcom C/C++ 11.0b compiler, with the 11.0c binary patch release applied in order to successfully compile it. This is due to the need to rely upon proprietry SDK's for platforms such as Windows, and OS/2 that cannot be distributed along with the Open Source 1.0 compiler release. It is planned to eliminate this dependency in the Open Source 2.0 release, by allowing the compiler to work with freely downloadable SDK's for the supported platforms.
So in other words, to compile the 1.0 Open-Source version, you need the commercial 11.0c version. So everyone run out and buy the 11.0c version for ~$200 so you can compile your free Open-Source version. Or you could wait god knows how long for version 2.0 to come available without the 11.0c dependency.
Huh? What planet are you from? MSVC is probably the second best compiler available next to Intel's own C++ 4.5. From an eweek article (which you can find at here )
"Even in pre-release form, Visual C++ 6.0 yielded the fastest time we've ever measured for any development tool running the language-neutral, CPU-intensive Tak benchmark. The Microsoft 6.0 beta compiler yielded code that ran an astonishing 20 percent faster than Version 5.0, when using all of the 6.0 version's aggressive new optimizations for Pentium-class processors. Visual C++ 6.0 even achieved a surprising 10 percent edge in Tak speed over Watcom C++ 10.5, our previous record holder among acceptably stable C++ implementations. We reserve judgment on Microsoft's success in implementing
new C++ features in this release while also maintaining reliability; in our tests, however, we encountered no problems with generated code. Visual C++ offers several different approaches to pleasing the performance-
sensitive user. In situations where some of an application's features are rarely used, and where a delay on first invocation is acceptable to most users, Visual C ++ 6.0 applications will be able to defer their loading of dynamic link libraries to accelerate application startup. Alternatively, libraries can be loaded on startup in the usual manner to speed subsequent invocations"
A deep unwavering belief is a sure sign you're missing something...
You're the one to correct me if I'm wrong :), but isn't the Compaq compiler for Linux still alpha (the processor, folks, not the status) only?
When we checked it out (but this was 3 or 4 years ago), the only choices for F90/95 on linux/x86 were NAG and absoft (and see above for NAG).
Hmm, I guess I need another good look at the market . . .
Thad
Thad
I remember that one of the production versions of Quake (the one burned onto a CD) was compiled in Watcom because it was fastest? :) *shrugs* I believe that is true anyone remember??
Jeremy
Right now the only real compiler on Linux is GNU C
Actually that isn't true. There are already a couple of (albiet lesser known) commercial compilers for Linux:
KAI C++ -- Commercial C++ compiler for Linux.
Portland Group -- Commercial C, C++ and Fortran compilers for Linux.
The Open Watcom compiler products are the first and only mass-market commercial compilers to be open sourced...
This, of course, ignores the fact that there is a mass-market compiler which was never commercial, and is the very definition of open-source / free software...
"My opinions are my own, and I've got *lots* of them!"
We tried the demo version of nag back before we bought absoft, back in summer/fall 1997. Hmm, now that I think of it, it was probably spring/summer 98 by the timie we bought it, but anyway . . .
We had problems getting the demo to work. And while it was F95 to Absoft's F90, it generates C rather than an executable (which is where the performance issue comes from)--and performance is a *major* issue for what I do
Absoft sales was a series problem, though--it took several days for them to call me back. With sales that slow, I didn't want to even *think* about what tech support would be like--absoft tech support had called me back, pre-purchase, well before we eger heard from the sales folks at Nag. In all fairness, I heard later that the tech folks at Nag are much better than their sales counterparts about getting back to people, but the combination of no return calls and the lack of actual executables made absoft an easy choice.
We never regretted it. Tech support usually got back to me that afternoon if I sent a message in the morning, or the next morning if I sent it in the afternoon. They also sent responses by email to questions I asked in the Fortran Newsgroup (Steve Lionel also answers an impressive volume there).
hawk
Does anyone still use Watcom? Why?
However, if you do (for whatever bizarre reason) at least you can now be assured of support.
OSing dead products is better than burying them, but not as good as OSing live products.
At the time of writing, this is a first post.
--
--
E_NOSIG
Yet another compiler with crappy inline ASM. Is it just me, or is MSVC inline ASM the prettiest thing around?
A deep unwavering belief is a sure sign you're missing something...
Half-life was written in Visual C++ (as was Quake, I think), what's your point? As for Borland, they won't even open up their compiler, what makes you think they'd open up the IDE? (Though they should, god knows they're not getting any more market share in the commercial market)
A deep unwavering belief is a sure sign you're missing something...
However, in graduate school, I was developing a biology simulation in Matlab. The development went well, but the execution was painfully slow. Since Fortran 90/95 was syntactically similar to Matlab I was able to port his huge simulation in a few days and keep working in Fortran without much of a learning curve. Say what you want, for high performance numerical computing with lots of vector operations, Fortran is one of the best languages out there.
Bringing this back to the open source world, numerically intense vector computations can be developed in Octave, and easily ported to Fortran 90/95. It's a one-two punch that I would definitely find useful. Unfortunately, the only free Fortran compilers I've found are for Fortran 77.
Just my two bits.
Sounds to me like, "We've got this product and our sales are really slipping and it's costing us more to maintain it than we're bringing on sales and upgrades. Hmm, let's just throw it away....No, wait! Let's release the source code, let the customers maintain it, call it 'Open Source' and get a temporary boost in our stock price to offset our losses. Yeah, that's the ticket."
Just be sure to wear the gold uniform when you beam down -- you know what happens when you wear the red one.
Have you tried Free Pascal? It supports Object Pascal and Delphi code. And it's already free, so there's no waiting.
And it compiles 10x slower than Borland's compiler.
It seems to me that we got pretty strong warnings from a few locations that the Portland compiler just plain wasn't ready for prime time, and we stayed away from it. Now that I think o it, one of our concernes was multiprocessing, as he'd had the budget for a dual PII (III? 333mhz), and there were libraries available for absoft that would spit out multi-processor code for much of the math (we bought them, but I never got as far as working with them).
This time around, performance is important, but I'll be developing on my machine and usinc scp/ssh to send the real work to the heavy-duty machines at main campus.
hawk
I never used Watcom, but I respected them mightily. Back in 1992/1993, the compiler that I used was Borland C++ 2.0 and 3.1. That was the state of the art for inexpensive compilers. I had read for years about Watcom's compiler. It was more expensive than Borland's, but it supported the Weitek coprocessor chip that you could install instead of a 387. That made Watcom's compiler favored for scientific and engineering work.
But, what made me drool was the support for DOS Extenders! Back then I was using Borland C++ and those ghastly overlays to shoehorn a 1 meg+ sized executable into the roughly 580K left over after DOS 5.0 was loaded into memory, along with all the network and CD-ROM device drivers. The idea that I could write a program with a DOS extender that would occupy up to 16 megabytes was an incredible idea. I hoped that Borland would include a DOS extender in their upcoming compiler release.
Alas, it was not to be. Borland abandoned their hard-core DOS users and threw in some half-assed Windows 3.0 support instead. Sure, I could write a program that occupied up to 16 megabytes, but I was still stuck with a silly resource limitation and a flaky operating environment. What good was it to write a program that would only run for 5 minutes between OS crashes? I abandoned Borland, picked up Linux, and haven't looked back. From the looks of it, just about everybody else using BC++ back then also abandoned them.
If Watcom had made their C++ compiler just a little bit cheaper, college students everywhere could have afforded it, and perhaps DOS would have held the mainstream a bit longer.
If tits were wings it'd be flying around.
Bzzzt! Wrong! See "The Design and Evolution of C++" by Stroustrup for a full explanation.
--
It's a
-- Danny Vermin
Don't knock Fortran, there's life in teh old girl yet.
:)
For whatever reason (partly historical, partly due to language sturcture), all the supercomputer optimising compilers that I've got access to use Fortran [0].
When I say optimising, I mean using vector registars, and al the other funcky gubbins of those babys.
Fortran also has the complex data type, something sorely lacking in C, from the point of view of mathematical work.
In fact, I am now in the situation of learning Fortran, after having learned programming in C, purelt because numerical and scientific computing is easier in Fortran.
And for the supercomputers too
[0] Maybe I just don't get acess to good C compilers for the Cray. I dunno.
g77 and f2c cut it or some legacy applications. They don't have the extensions that many of us took for granted in the 80's, let alone anything resembling F90/95.
For that matter, is there any F90 support in Watcom? Not that it will make much difference; we need to order a Linux Fortran compiler in the next month or so, so it looks like Absoft again (which is a fine compiler with the best tech support I've ever found for *any* product).
hawk
for (int ii = 0; ii should compile without errors.
--
It's a
-- Danny Vermin
. . . but Fortran *is* still changing, sometimes rapidly. No, it doesn't have everything that C does--nor should it. For many types of heavy computation, it is still the language of choice (Including my own research).
The strengths aren't just from what is *in* fortran, but from what is left *out*. Because certain classes of pointers/objects/whatever aren't there, stronger assumptions can be made while optimizing. You can quickly write fast code faster in Fortran than C.
Don't get me wrong--it's not that C *can't* produce numerical code as fast as the corresponding Fortran; it can. However, this happens after hand-tuning and optimizing the C, and it generally reaches roughly parity with the initial Fortran program.
hawk, still using Fortran
for (int ii = 0; ii < 4; ii++)
...
...
{
}
for (int ii = 0; ii < 8; ii++)
{
}
Should compile without errors.
--
It's a
-- Danny Vermin
I got that. I was just hoping :) I've been a fan if Digital Fortran for a *very* long time. I've only hit one bug in it, ever--and that was nearly 20 years ago on a PDP-10 . . .
There was an "unofficial tradition" that some of the internal folk had created a 68K code generator, but it never got released publicly.
It is not at all obvious that the compilers are of vast continuing use; they have been strongly tied to the IA-32 platform for so long that it may well be that the onset of IA-64, combined with, as you say, the "latest COM stuff," meant that a big-time redesign would be necessary for Watcom C to be useful for Windows deployment next year.
The availability of source code may nonetheless be useful to glean useful optimization techniques that may be redeployed with GCC. I'd heard at CSC talks in the late '80s that there was a lot of "slick" static analysis that would be generally applicable to any architecture; as you observe, architectural differences between Watcom C and GCC might make it difficult to make them applicable. Hopefully some of the peephole optimization techniques would be useful for the IA-32 architecture, and by the time the "analogies" would be made to make them applicable, it might become possible to apply "analagous" optimizations to other architectures.
If you're not part of the solution, you're part of the precipitate.
This means that if the compiler is to be of any continuing interest as other than a "bare husk" from which GCC might "mine" some useful techniques, there will need to be a project to create a set of tools basically corresponding to Binutils and perhaps some portion of CygWin so that there is some "base" set of tools and libraries that can be used to recreate themselves.
The fact that there are existing GNU tools to that purpose ought to ease the task somewhat...
If you're not part of the solution, you're part of the precipitate.
This is a very good thing. I see a lot of people either putting down the Watcom compiler or making fun of Watcom for no longer being a major player in compilers. I'm surprised to see such sentiments from what is supposedly the open source community.
Watcom's open sourcing of their C++ compiler is a good thing all around. It has generally been accepted that open source is of the most value for system software, because it serves as a foundation for the work of many other people. It is difficult to bet on a lesser known vendor, when they could go out of business without warning. This has happened to be me several times. Open sourcing compilers, or even just releasing them free of charge, as Borland has done, is The Right Thing. It removes unneeded pressure from choosing development tools.
It is also excellent that gcc is getting more competition. gcc is a good compiler, and it has many boosters in the UNIX world, but it is crusty in manys ways, especially in the Windows environment. gcc has also been peculiarly slow in evolving for the x86 architecture, presumably because of initial personal grievances from FSF members. Watcom throws in a little competition. Maybe it is a better compiler. Maybe it generates better code. Maybe it has better error reporting. I don't know if it has any of these things, but it certainly has a good reputation.
I would love to see other vendors follow suit. If Borland opened it's Object Pascal compiler (independent of Delphi), I'd switch to it for many development projects.
Visual C++ is useless if you need to target anything other than Win32.
WATCOM C includes MFC, at least with the commercial version they used to sell. My copy has MFC 2.5 and MFC 4.1. I don't write software that uses MFC so I can't say how good WATCOM's support is for MFC.
Just dont use it
GCC and Watcom are pretty useless if u need to target anything other than computers
Watcom was excellent for working multiple platforms (last two employers had OS/2 on the enterprise with a little DOS stuck in; say what you want but to date OS/2 has been far more stable than anything Microsoft has offered). I think it would be majorly cool if the multiplatform support was extended to Linux. I have used a couple of IDEs for Linux as well as GCC on the command line and frankly there is no good reason for a compiler to be as beastly to use as that. Watcom sports a basic IDE with basic project support as well as making fast and small executables. The Linux world could do far worse that porting Watcom to Linux.
No one knows what the language will look like in the year 2300 that scientists and engineers use, but they'll call it FORTRAN.
But seriously, I'm glad that Watcom's doing this. It won't affect me for several years (and then only if they integrate their optimization techniques into gcc). But I think that it is a good idea nonetheless.
I mainly use Alphas, so Compaq's compiler set (which does include F95) is good for me. I wish that they would open its source, but I don't really care since it works. They typically generate code that's 3.5 times faster than gcc, so maybe better optimization is possible for Intel boxes, too.
Hal Duston
hald@sound.net
If Al Gore invented the internet, why is it named after George W. Bush?
That's irrelevant, I was talking about speed. Still, VisualC++ isn't as standard complient as one would like. Of course moving a large-code base from one compiler to another is something I'd only wish upon those I really hated.
A deep unwavering belief is a sure sign you're missing something...
I too enterred graduate school a fortran programmer, and I too did my thesis relying on Matlab. But the Matlab/C integratgion was really tight - so I learned C and didn't get stranded in a dying language. Since I learned C, I have never seen *any* non-legacy situation where Fortran was to be preferred over C.
Why did you choose Fortran over C?
"one treats others with courtesy not because they are gentlemen or gentlewomen, but because you are" --G. Henrichs
If you want to talk to Kendall Bennett about Open Watcom, then come to Warpstock 2000 on September 9-10 in Philadelphia. He will be giving a presentation on it.
--
And the men who hold high places must be the ones who start
To mold a new reality... closer to the heart
Watcom was an excellent C compiler; I hope some of their floating-point optimizations will eventually be folded into egcs, because I remember the default DOS-compiled BYTEMarks had a bit of an edge there.
:)
(Also, someone told me that when IBM recompiled the Windows source with it, it was about 30% faster at the time. I think that was for OS/2, but it was funny at the time.
---
pb Reply or e-mail; don't vaguely moderate.
pb Reply or e-mail; don't vaguely moderate.
The Watcom compilers are the compilers of choice by the people at QNX.
"I have no special gift, I am only passionately curious." - Albert Einstein
I hope we see lots of great new additions to Fortran as a result of this :)
DrLunch.com The site that tells you what's for lunch!
When I was working there, Sybase tried to "open-source" the protocol specification for TDS (the protocol for Sybase SQL on-the-wire). This was hoped to benefit groups like freetds.org.
They ended up putting it out... but with a license that would have prevented anyone from producing a free workalike. The freetds guys couldn't even look at spec thing without possibly binding themselves to the license, and no longer being able to work on the project.
I know it says they will have a "open" license.. I hope it actually works out that way. The old Watcom guys are a pretty clever bunch. I think it will be nice for them to have their work available to the general public for free.
Watcoms Cross compiling abilities could add new Uses to FreeDOS. For Embedded developers FreeDOS/Watcom is the perfect combination. The ability to create 16 bit code means you can port applications to run on an 8088, and many older palmtops that use dos are powered by that venerable chip.
--- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
MSDEV pros:
MSDEV cons:
The other argument in its favour: have you ever tried using Visual C++ from the command line? Ugh!
Did you know
I'm starting to notice a new strategy (well, its not THAT new) in the software industry. If you have a product which really isn't bringing any revenue in, just open source it and claim it as PR.
This isn't a bad thing, its just kind of funny to note. Now on an interesting note, how easy is it for someone to look into the code of the compiler and get helpful ideas and hints to incorporate into their own compiler? What I mean is, will this move help out gcc in any way?
Ms. Macbeth, why has Sybase decided to do this?
Well Dan, the last release version of Watcom C++ was in February of 1996. We just really don't have the energy to do another one, and don't see any reason to since we the last money we made off this was when we accidently put "Watcom Linux" on the box and sold 6 copies to roblimo, who though it was a cool new Linux distribution.
I see. Why have you chosen SciTech Software as the official maintainer of the Watcom complier products?
As far we can tell, they are the only ones who have ever used them. Of course, it was to compile Vigor.
Any parting words Ms. Macbeth?
Could John Gugeheiman please stop calling us for support? For the last time, we don't know what a "long long int" is...
-- A hundred thousand lemmings can't be wrong!
sorry, you're wrong. From the c++ standard, page 97: // j = 42
If the for-init-statement is a declaration, the scope of the name(s) declared extends to the end of the for-statement.
[Example:
int i = 42;
int a[10];
for (int i = 0; i 10; i++)
a[i] = i;
int j = i;
--end example]
Okay, MSVC's problems could be fixed, it could not be fixed. (Actually, the linux kernel seems to have some not-standard dependencies so you can't totally blame them.) Either way, I meant fastest. The person I was responding to was talking about speed, the quote that I included was talking about speed. I thought I made myself sufficiantly clear.
A deep unwavering belief is a sure sign you're missing something...
Indeed it was. Doom and Duke 3D were the two most high-profile games written using Watcom but there were some other good ones as well - Epic Pinball, One Must Fall and Toxic Bunny also spring to mind.
The game and demo programmer's paradise at x2ftp was - and still is - chock full of Watcom goodies. Some of those have been further developed to be successful commercial cross-platform rendering libraries in their own right.
But it was Doom that brought Watcom its popular fame - without a doubt. Game programmers and players everywhere were suddenly asking "DOS/4G? What the hell is this?" And when they found out that it was Watcom that could compile extended DOS programs (with none of the 16-bit memory model restrictions), there was a huge surge in games compiled using Watcom. Instead of all sorts of tricks with segments, EMS and/or XMS, you had a flat memory model. I remember drooling at the time because I'd just about had enough of huge pointers...
--- Hot Shot City is particularly good.
Watcom is a great C compiler, that has a great deal of good optimization tricks that other compilers could benefit from. While GCC has been gaining ground rapidly, certainly you can always benefit from looking at someone else's code.
Watcom is what you use on microsoft when you need something better than ms visual studio products. (note, not a flame, those compilers are good for things, they just arent very optimizing). I've heard of people writing code in the MS suites and then compiling on watcom. Never underestimate the advantages of seeing someone else's ideas, we can always gain something
hoorah for sybase
Q:Doctor, how many autopsies have you performed on dead people?
A:All my autopsies have been performed on dead peop
It was the great game-developer compiler.
Not only was it a good optimizing compiler, but it had some really handy stuff for integrating with assembly routines.
For example, you could specify which arguments go in which registers, which registers would be modified by the operation, and where to expect the return result. The inline assembly stuff was also very handy.
As an added bonus, it came with WASM, so you didn't have to go out and buy TASM.
---
Despite rumors to the contrary, I am not a turnip.