And now, another language

0

Posted by Jaime | Posted in Coding | Posted on 05-06-2014

Tags: , , , , , , ,

swift-hero_2x

You know, I was getting quite comfortable with Obj-C, C++11, and everything else I had learned over the years… now Apple has to go and introduce another language: Swift

I don’t know what to make of it. How much better can it be than Obj-C? I guess I’ll find out over the course of the year.

I do have to say though, that “let” and “var” are pretty cool, in the same way that “auto” is pretty cool in C++11.

Oh, and if you haven’t already read Herb Sutter’s article on why you should use “auto” in your code, check it out here: AAA

Aaaargh! Stop auto substituting my text!

0

Posted by Jaime | Posted in Coding, Not-so-funny | Posted on 20-03-2014

Tags: , , ,

Ugh!

I’ve been running into problems with my Jenkins scripts that would fail when attempting to run my p4 commands, because the three periods I inserted into the p4 command were automatically converted to an ellipsis by MacOSX, which is not a good thing: Three dots are automatically changed to an ellipsis

Windows disk space analyzer

3

Posted by Jaime | Posted in Tools, Utility | Posted on 11-03-2014

Tags:

So, if you need a good program to show you where your disk space is being used, in Windows, check out Space Sniffer

Perforce and Xcode5

3

Posted by Jaime | Posted in Tools | Posted on 06-11-2013

Tags: , , ,

In a previous post, Perforce and Xcode4, I created applescripts to work with Xcode4 and Perforce.

I updated the AppleScripts to work with Xcode5 only and added a couple of new scripts.

One, called p4_file_renamed.scpt, is used to update the renamed file Perforce when you are using Xcodes rename functionality, either directly or through the refactor functionality.

The other two scripts get the filename of the currently selected file or the full path of the file which is useful for when you want to find a file by path in P4V.

You can download the file here: xcode5_p4_applescripts

Preventing clang from examinging file during static analysis

0

Posted by Jaime | Posted in Coding | Posted on 03-10-2013

Tags: , ,

Kick ass compiler!

Ok, so if you want to avoid a file from being analyzed during a static analysis, you can use the following example
#ifndef __clang_analyzer__
// code clang should not analyze
#endif

http://clang-analyzer.llvm.org/faq.html

Perforce and Xcode4

12

Posted by Jaime | Posted in Coding | Posted on 14-08-2013

Tags: , , , , , ,

I created some AppleScripts that allow you to control some basic Perforce functionality in Xcode4, which was lost when Apple released the latest version of their IDE.

Perforce actually published a way of checking out files using the Behaviors functionality in Xcode (Xcode and P4), but I wanted a little more.

Note, these scripts are a work in progress. If you happen to make improvements, let me know so that those changes can be shared with the community.

You can download the AppleScripts here: xcode_p4_applescripts

Update
The AppleScript files are also being hosted on the public Perforce swarm forum, located here: Perforce Public Swarm Server

Update 2013-11-06
I updated the AppleScripts to work with Xcode5 only and added a couple of new scripts.

The new applescript files are referenced in post Perforce and Xcode5

A note about performance

1

Posted by Jaime | Posted in Coding | Posted on 02-08-2013

Tags: , , , ,

On a multi-core Mac, running 10.8, I ran a test to compare the speed differences of incrementing or decrementing a value with no-locks, atomics and finally, a mutex lock.

The no-lock is the baseline, and here is the difference in speed with the later 2 items:
Atomics: 3X slower on the same thread
Mutex: 7X slower on the same thread

Hmmm…

Automating Instruments

0

Posted by Jaime | Posted in Coding | Posted on 08-03-2013

Tags: ,

I actually automate Instruments to get finer grain information of what an application is actually doing.

To automated Instruments, according to Apple’s documentation, all you need is the DTPerformanceSession.framework… but, you actually need more than that, and you have to find where the dependencies are located.

Here are all of the libraries you need:
DTInstrumentsCP.framework
DTMessageQueueing.framework
DTPerformanceSession.framework
DTXConnectionServices.framework
InstrumentsSupport.framework

And here is where they are located:
/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/DTInstrumentsCP.framework
/Applications/Xcode.app/Contents/SharedFrameworks/DTMessageQueueing.framework
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/DTPerformanceSession.framework
/Applications/Xcode.app/Contents/SharedFrameworks/DTXConnectionServices.framework
/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Frameworks/InstrumentsSupport.framework

Bitten by ImageIO and libTIFF

0

Posted by Jaime | Posted in Coding | Posted on 12-12-2012

Tags: , , , , , , , , ,

I had a project I worked on where I couldn’t debug my Application with Xcode 4.5 because there was a conflict between the libTIFF I was using in one of my modules and the copy of libTIFF included with the ImageIO framework.

It turns out that the two libTIFF libraries were actually different, so, for the small test project I created, I decided to statically link in the code I needed from libTIFF so that dlopen wouldn’t supplant the copy of libTIFF ImageIO needed with my copy.

References:
http://lists.apple.com/archives/xcode-users/2008/Jan/msg00019.html
http://lists.apple.com/archives/x11-users/2007/Mar/msg00003.html

Spread the love

0

Posted by Jaime | Posted in Funny, What's New | Posted on 04-12-2012

Tags:

When was the last time you gave the Internet a great big hug? Seriously. Think about it… you love the Internet 🙂