Tuesday, September 28, 2004
Recursion just lets you do this algorithm without making the stack explicit; the stack is the call stack and doing the recursive call pushes a new frame on the call stack for you. We can easily do this without recursion by making the stack explicit.
Its written in some language that is called "CoffeeScript" or "Java" or something like that, but if you catch the drift, you should be able to use it in any language. And he continues to show how to change the behaviour from depth-first to breadth-first.
Monday, September 27, 2004
-------- Original Message --------
Subject: CodeWarrior to XCode
Date: Wed, 25 Aug 2004 23:59:53 -0700
From: Brad Oliver
> is not that you have written an internal document - say -
> "How To's with Xcode: quirks explained" that could be distributed?
I haven't written anything more formal than an e-mail to my colleagues about the process. I'll summarize below. A lot of the "quirks" are not so easy to quantify as they involved getting used to the XCode IDE, which behaves very differently (to my eyes) compared to CodeWarrior.
Note that my perspective here is coming from years of work using CodeWarrior and porting code from Visual Studio to CodeWarrior. Also, these notes come specifically from our work moving Knights of the Old Republic (KOTOR) from CodeWarrior 9.2 to XCode 1.5.
1. "legacy" for-loop scoping (a variable defined in the for loop definition has scope outside the for loop) in theory works in gcc, but in practice breaks when the optimizer is enabled. You have use the ISO-standard for-loop scoping rules for this to work, i.e. move the variable declaration outside of the for-loop statement. gcc at least gives you warnings about this, so you can find and fix them in your code fairly easily.
2. Xcode's "CodeWarrior-style" inline assembly only works for the simplest cases, so it's best to avoid it if you can.
3. Passing a non-POD variable (where POD == Plain Old Data, e.g. C-style variables and structures rather than C++ structures that have vtables) to a routine that expects POD variables will generate a warning in gcc, and insert a "trap" instruction into your code, causing the app to abort in the debugger when that code is executed. I have no idea why gcc doesn't just generate an error for this case, since that code will fail to run.
This happens if, for example, you pass a custom string class structure to printf as a %s parameter. Under CW and Visual Studio, they will pass a pointer to the first chunk of non-vtable data (which in KOTOR is the actual char backing store for the string class out of blind luck). Under gcc, you must fix your code.
4. With the optimizer set to -O3 (the max), gcc does a lot of auto-inlining. As such, if you have some crappy code where a class defines a method as "inline" but the method is not actually inlined, gcc will give you a link error when you're done compiling. You have to remove the bogus "inline" statement in the function prototype to get it to work.
5. Single-precision floating-point functions like acosf, cosf, etc are not in the standard math library (libm). They are only available in 10.3+, in libmx. A similar situation exists for wchar support.
6. "bool" types are 32-bit in gcc, whereas they are 8-bit in CodeWarrior and Visual Studio. This causes substantial binary compatibility problems with data structures that are read to/written from disk. A "bool8" class can't be used to globally #define the problem away because it causes compile-time issues with templates. However, if you can identify the "bool" data structures that are being read/written to disk, you can change them to the "bool8" class and work around the problem that way.
7. We have routines that override standard library calls at link time, like fopen, etc. ZeroLink causes problems such that our overrides lose out, so it's best for us to keep ZeroLink off.
8. Dead-code stripping has a bug with C++ apps in XCode 1.5 whereby it tends to strip debugging symbols for used functions at link time. The end result is that you can't see the source code for a number of files in the debugger, nor can you set breakpoints in that code. Turning off dead-code stripping for the debug build fixes this, although you may have to work a bit to implement (or comment out) some routines that CodeWarrior would have otherwise stripped away. It's safe to use dead-code stripping in the release builds, as far as I can tell.
9. I write a lot of code that jumps past local variable initialization in C++, like so:
if (bad) goto bail;
int foo = 1;
do stuff here;
This is not allowed by gcc; you have to change "int foo = 1;" to "int foo; foo = 1;". This is only if you're jumping past a local initialization, so it mainly comes up using the Apple debug macros like "require_noerr" and the like.
10. gcc doesn't recognize "\" as a path delimiter for #include statements, you have to change them to "/"
11. If you're using PPC intrinsics (like rlwinm or lhwbrx) you have to be sure to inlude "ppc_intrinsics.h" since they're not natively part of the compiler.
12. KOTOR casts a lot of class function methods as pointers for callbacks. gcc requires that you use a different syntax:
SetCallback ((CallBackPtr) classMethod);
SetCallback ((CallBackPtr) &Class::classMethod);
You can get away with just "&classMethod", but gcc will spew out a warning.
13. Build styles are fairly useless for our projects, since they don't allow us to easily have different libraries and source files for debug and release builds. It's fairly easy to clone XCode targets, so the best solution for us is to ignore/remove build styles from the projects and rely solely on different targets for debug and release builds.
I did run some performance tests on the game when we finished. On my Dual 2.5GHz G5, performance was almost immeasurably slower in the XCode build, by maybe .5 of a frame per second. It was well within the margin of error, enough so that I'd call it even with CodeWarrior.
I had some notes somewhere about compile times, but I can't locate them right now. Suffice it to say, CodeWarrior beat XCode/gcc pretty handily for the non-optimized build, but they were much closer on the optimized build. Surprisingly (at least to me) gcc's compile time using -O3 was almost identical to it's compile time for the non-optimized build. This also carries a big red asterisk - gcc does compile on both CPUs, so if you have a single-CPU Mac (or if CodeWarrior is ever updated to use 2 CPUs), then it's no contest in favor of CW.
I'd appreciate feedback from other people who have had experiences porting code from either VS/VS.NET or CodeWarrior to XCode. In our KOTOR test, the code had already been ported from VS.NET (VC7) to CodeWarrior, so it's unclear to me if there are any advantages that we'd see if we went directly from VS.NET to XCode.
darwin-development mailing list | email@example.com
Do not post admin requests to the list. They will be ignored.
brickOS is an alternative operating system for the Lego Mindstorms RCX Controller. It also provides a C/C++ development environment for RCX programs using gcc and g++ (the GNU C and C++ cross compilation tool chain) and the necessary tools to download programs to the RCX. If you program in C or C++ and would like to be able to write programs for your RCX in these same languages then brickOS is for you.
Sunday, September 26, 2004
Die Suchergebnisse kommen von:
Friday, September 24, 2004
Just when I thought that MS Blogs are big, I discoverd Planet Sun.
Planet Sun is not a product or publication of Sun Microsystems.
Go an see the list of people blogging. IT IS HUGE.
That is far more freedom that I have at my company. And NOBODY would think about calling them evil (unless they worked here...)
[Zef Hemel about the MS Blogs]
They have many, many employees of the product teams blog. This way we can see who work there, what they’re doing and how they do it.
Don’t underestimate the importance of this kind of “marketing”, if you will. I don’t know how other people feel about this, but for me it works very well. For example, if I got to choose between working at Apple or Microsoft, I’d choose Microsoft right now. Why? Because Apple is nothing more than a building to me. Even though they may be working on very great products, arguably more innovative and possibly more interesting than Microsoft’s. I don’t know the Apple people (except for maybe Steve Jobs), I have no idea what the culture is like, I don’t know anything.
PREfast is a static source code analysis tool that detects certain classes of errors not easily found by the typical compiler.
PREfast analyzes C and C++ source code by stepping through all possible execution paths in each function and simulating execution to evaluate each path for problems. PREfast does not actually execute code and cannot find all possible errors, but it can find errors that the compiler may ignore and that may be difficult to find during debugging.http://www.microsoft.com/whdc/devtools/tools/PREfast.mspx
Thursday, September 23, 2004
Ich hatte bisher sowohl negative als auch positive Erfahrungen mit Zeitarbeit/Personaldienstleistern. Ich werde mich mal bei denen melden und schauen was die so zu bieten haben. Nicht das ich viel erwarte, aber einfach mal schauen kostet nichts.
Wednesday, September 22, 2004
If you like that, you might like Wordcount.
- Blogmatrix Jager
- Headline Viewer
- Omea Reader
- Radio Userland
Tuesday, September 21, 2004
Technical Note: Kernel Core Dumps
Of course, this means, that nobody has the MS Patch for the JPEG vulnerabiltiy...
Maybe somebody will wake up, when their computer was rooted and all company secrets have gotten to the competition. But than again, maybe only the unlucky person whose computer has been rooted will be fired (and not the person responsible).
- Microsoft History
- Windows Audio
- Microsoft Exchange, and email in general
- The Win32 APIs, but not the Win32 GUI APIs
- Software engineering
- Debugging tricks and tips
- COM, DCOM, RPC, etc
- .Net framework
- Localization/Internationalization issues
Thursday, September 16, 2004
Tuesday, September 14, 2004
Saturday, September 11, 2004
Anordnung von überfordernden Tätigkeiten
Zuweisung von objektive zu viel Arbeit
Entscheidungen oder Kompetenzen werden permanent angezweifelt.
Absichtlich schlechte berufliche Beurteilung; Behauptung von Schlechtleistungen
Generalisierung von Fehlern, pauschale Kritik (z.B.: "Sie machen alles falsch!")
Aufbauschen einzelner Vorfälle oder Fehler ("Maus zum Elefanten machen")
Unterdrückung von Meinungsäußerungen des Betroffenen (z.B. "Mund verbieten")
Lächerlich machen (z.B. verbal, mit Mimik, mit Gestik, durch Karikatur)
Dauerkontrolle, übertriebene Kontrolle
Einschüchtern, Bedrohen, Nötigen (z.B. drohen mit dem Arbeitsplatzverlust, körperliche Gewaltandrohung)
Zuweisung schlechter Urlaubstermine
Herbeiführen von gesundheitlichen Beeinträchtigungen (z.B. Zugluft, Kälte, Hitze, Lautstärke, Stinkbomben)
Verharmlosen, Lächerlichmachen von Beschwerden
Wednesday, September 08, 2004
Vielen Dank, dass Sie die iTunes Software laden. Beim nächsten Mal erhalten Sie die neuesten Aktualisierungen automatisch über die Systemeinstellung "Software-Aktualisierung". Weitere Infos zur Verwendung der Funktion "Software-Aktualisierung".
Tuesday, September 07, 2004
Kommt bald das Ende aller Metropolen?
Internet-Unrecht goes Real Life: Konzern will ein Wort komplett verbieten lassen
Monday, September 06, 2004
Saturday, September 04, 2004
Ich habe dann die "Mobbing" Bücher durchstöbert, und auch hier bin ich fündig geworden. So Manches aus diesen Büchern kann man auch bei uns in der Firma finden.
Ich habe mir dann ein Buch zum Thema Mobbing und Buch zum Thema Initiativ-Bewerbungen gekauft. Ich weiß nicht ob die Probleme in der Firma Zielgerichtet herbeigeführt werden, um Leute rauszueckeln oder einfach nur aus der Unfähigkeit zur Mitarbeiterführung herrühren. Ich weiß nur das mich die derzeitige Situation Krank macht. Morgens empfinde ich den Gedanken in die Arbeit zu gehen als unerträglich und fast schmerzhaft. Ich empfinde jede Stunde die ich in der Firma verbringe als vergeudete Zeit. Ich zähle die Stunden bis Feierabend. Einen Tag daheim mit Kopfschmerzen zu verbringen empfinde ich als befreiende Wohltat für mich. So kann es einfach nicht weitergehen.
Während ich vor ein paar Tagen fest entschlossen war, Ende September zu kündigen, habe ich nach einem Gespräch mit einem Kollegen und der Lektüre eines Buches ein differenziertes Bild. Ich werde mir einen neuen Arbeitgeber suchen aber bis dahin werde ich mich gegen die Zustände in der Firma wehren. Der Gedanke nicht mehr wehrlos den Bedingungen in der Firma ausgesetzt zu sein, erhellt bereits meine Stimmung. Letztendlich steht mein Entschluss die Firma zu verlassen fest, und ich kann frei sein von dem Gedanken, meinen Arbeitsplatz zu verlieren. Falls man mir kündigen sollte, kann ich es gelassener nehmen, denn ich wollte sowieso gehen. Um mit Red Zack zu sprechen "So what?". Und aus Bremen stammt bekanntlich die Weisheit, das man etwas besseres als den Tod überall finden kann.
Friday, September 03, 2004
It's open source and supposed to be good.
Obviously, MS had to copy it and created MSBuild. Apparently this fully integrated in .NET 2005 IDE.
Some blogs at MS cover MSBuild:
- Alex Kipmann (rss)
- Chad Royal's Blog (rss)
- Chris Flaat's Blog (rss)
- Jeff Callahan's Blog (rss)
- John Lam's Blog (rss)
- NUnitAddin's Blog (rss)
- Stefan Bodewig's blog
Now the other thing is, that the site names as sponsors IBM, SONY, ATI, NVIDIA, DARPA, and DOE and that the related Merrimac - Stanford Streaming Supercomputer Project has the intention to build a even faster (and cheaper) supercomputer.
Now do I hear anybody hear say "Atombomb design"? And yes a document states that "verifying nuclear weapons, performing signal intelligence" and "the design of nuclear devices" can be done better on such a machine.
Cubase SX3 also sees another first: implementation of the first level of Studio Connections announced this year at Frankfurt Musikmesse. Representing the first fruits of the development alliance between Steinberg and music instruments and audio hardware manufacturer Yamaha, Studio Connections technology has been incorporated into the SX 3 release, with total system Recall functionality. SX3 integrates Yamaha's Studio Manager 2 software which serves as a link between the sequencer and hardware editing components. Each editor component can be opened like a Plug-in from within Cubase SX3. Entire studio setups are saved and recalled with the project. Supported hardware currently includes Yamaha's DM2000, 01x and 02r96 mixers, as well as the Motif ES synthesizer and SPX2000 signal processor.
- Audio Warp: Realtime Time Stretching and Pitch Shifting offer extensive new audio editing and processing capabilities, including ACID File support: loops automatically adopt a project's tempo; audio files can follow tempo changes in realtime.
- External FX Plugins allow for direct integration of external hardware effects processors into the VST audio mixer. Use your favorite outboard gear just like plugins -- including automatic delay compensation
- Extended Freeze function for virtual instruments and audio tracks with added flexibility and improved performance. Freeze virtual instruments with or without insert effects. Then automatically unload the instrument to free up RAM. Freeze audio tracks with insert effects to free up even more CPU performance.
- A Dummy Plugin automatically replaces missing plugins when a project is transferred to a different system. This project can be saved and sent back -- the original plugins will automatically open up again.
Here is their response:
As you may or may not be aware, Sweden is not a state in the United States of America. Sweden is a country in northern Europe. Unless you figured it out by now, US law does not apply here. For your information, no Swedish law is being violated.
Please be assured that any further contact with us, regardless of medium, will result in
a) a suit being filed for harassment
b) a formal complaint lodged with the bar of your legal counsel, for sending frivolous legal threats.
It is the opinion of us and our lawyers that you are fucking morons, and that you should please go sodomize yourself with retractable batons.
Please also note that your e-mail and letter will be published in full on http://www.thepiratebay.org.
Go fuck yourself.
Polite as usual,