Haversine formula now on GitHub

0

Posted by Jaime | Posted in Coding | Posted on 03-06-2016

Tags:

The C implementation of the Haversine formula I ported from Javascript is now hosted on GitHub.

The project from this website is now up on GitHub for anyone to view. I also plan to do some updates to the code since C++14 has been out and has a lot of good features to add.

Using P4Plugin with Jenkins to publish assets

0

Posted by Jaime | Posted in DevOps | Posted on 28-12-2015

Tags:

perforce

I was previously using the Perforce Plugin in Jenkins to handle my tasks with Perforce, including adding files that needed to be released from a build, but in the past year, I’ve experienced some weirdness that lead me to evaluate the P4Plugin by Perforce.

All of the weirdness that I saw in the prior plugin went away, but I couldn’t figure out how to publish only certain files from a build.

There wasn’t anything in the documentation instructing you on how to do this feature and when I would use the Publish Assets feature, all of the extra files created in a build would be potentially added to my project, which was not the intent of the build.

It wasn’t until I found a bug report that said the following:

The shelve publish step should use a different workspace from the populate step. The view for this workspace should be very narrow (a Virtual stream, if using streams). Typically the view should be one or two files, limiting the files it will run the reconcile over.

By the way, I still haven’t figured out how to get Virtual streams to work in the P4Plugin as the plugin won’t recognize them.

So, to be able and isolate what you want published back to your Perforce server, you have to create another workspace to isolate the files, or directories, in question.

Hopefully, Perforce will include this text in their plugin documentation sometime soon.

When you have Jira and Confluence running on the same server …

0

Posted by Jaime | Posted in Uncategorized | Posted on 09-09-2015

Tags:

You have to change the Context path for each app to be in a different directory.

That is one option, which is listed on atlassian.com

If you don’t set this option, you may be logged out of one Atlassian product when you go to log into the other.

Xcode plugin for Perforce

0

Posted by Jaime | Posted in Coding | Posted on 18-03-2015

Tags: , ,

perforce-small-logo
I use Perforce as my version control system and Xcode as my IDE.

Unfortunately, Apple removed Perforce support from Xcode a whiles back for reasons unknown.

So, to work around the problem, I started to use of DTerm… but I wanted more.

I created AppleScripts for both Xcode4 and Xcode5 which was better, but… I wanted more.

So, I took the plung and wrote a plugin for Xcode using Swift.

The plugin is hosted on Perforce’s Swarm website, which you can download and build in Xcode. Once you build the project, the plugin is automatically installed for you.

Pay attention to the README.md file: you will need set up files that contain the settings for your workspace, or workspaces, and those settings file are used by the plugin to do it’s work.

A big thanks to Delisa Mason for writing a Xcode plugin template. This template was a huge help in creating the plugin and the template available in the Alcatraz package manager as well as in GitHub: https://github.com/kattrali/Xcode-Plugin-Template

If you don’t know what Alcatraz is, you should check out at http://alcatraz.io

Xcode dylib constructor destructor

0

Posted by Jaime | Posted in Coding | Posted on 26-02-2015

Tags: ,

I meant to post this link a while ago, but here it is anyway:
TP40002013-SW17

So, in a dylib, you can have code execute when the dylib is loaded and execute code when the dylib is being unloaded:

__attribute__((constructor))
static void initializer1() {
    printf("[%s] [%s]\n", __FILE__, __FUNCTION__);
}
 
__attribute__((constructor))
static void initializer2() {
    printf("[%s] [%s]\n", __FILE__, __FUNCTION__);
} 
__attribute__((destructor))
static void finalizer1() {
    printf("[%s] [%s]\n", __FILE__, __FUNCTION__);
}
 
__attribute__((destructor))
static void finalizer2() {
    printf("[%s] [%s]\n", __FILE__, __FUNCTION__);
}

openframeworks plugin for Xcode

0

Posted by Jaime | Posted in Coding | Posted on 23-12-2014

Tags:

Sweet! Now you can add open frameworks add ons to your project from a Xcode plugin: https://github.com/admsyn/OFPlugin

Of course, if you have Alcatraz, you won’t need to go to the github site to download the plugin, just get it from “Package Manager” within Xcode

You can run Swift code from the command line?

0

Posted by Jaime | Posted in Coding | Posted on 23-12-2014

Tags: , , ,

WAT? Now this is something else! practicalswift.com

A package manager for Xcode named Alcatraz

0

Posted by Jaime | Posted in Coding, Tools | Posted on 25-09-2014

Tags: , ,

I learned about a package manager for Xcode named Alcatraz when I attended CocoaConf in San Jose earlier this year.

Extending the functionality of Xcode through plugins has been something I’ve been looking into for a while and the only plugins I knew about in the wild could only be found through Google searches or on NSHipster.com

alcatraz_xcode_packagemanager

The tool makes it much easier to find plugins for Xcode. Buuuut, it actually also serves up themes, templates and more, all from a menu available within Xcode.

Installation is also simple. Type in a single Terminal command and hooorah, it’s installed: curl -fsSL https://raw.github.com/supermarin/Alcatraz/master/Scripts/install.sh | sh

Oh, and if you are looking to attend an Apple developer conference, you should definitely consider CocoaConf: the attendee group is primarily developers, attendees and speakers are easy to approach and exchange ideas with, and as they had advertised on CocoaConf’s site, the food is good.

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