How I like to code

Category Archives: Coding

Perforce DVCS and iCloud Drive

I use Perforce DVCS for almost all of my projects: it’s a great new feature for p4, and I use it on a daily basis, given, I usually away from my home server. Now, there is one DVCS instance I use, which happens to be on my iCloud Drive folder. That seemed to work well […]

A quick word on modern BASH

Here’s a page that has some useful tips for modern BASH scripting: http://www.davidpashley.com/articles/writing-robust-shell-scripts/

Building OpenCV as a macOS Universal Intel Binary

So, for my project, I needed an Intel Universal build of the OpenCV library. The copy of the OpenCV source I have on my machine is version 3.0.0 and it has worked well for me, so I’ll start with that. My build machine is running macOS 10.12 and has Xcode 8 installed on it. OpenCV […]

Creating a remote from an already existing depo

Today, I created a remote depo, so that I can use the DVCS functionality in P4 with one of my projects. First, I connected to my perforce server and typed: $p4 remotes To see all of the remotes that were on the server. Before doing this command you have to type: $p4 login Which thankfully, […]

How to install Perforce DVCS

Introduction For 9 years now, I’ve used Perforce; before that, it was MKD, Subversion, VisualSourceSafe, CVS and a few others. In the past year, I used Git. One cool thing that Git has that Perforce didn’t have was being able to save your changes while not being connected to a central server. However, Perforce recently […]

Haversine formula now on GitHub

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.

Xcode plugin for Perforce

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 […]

Xcode dylib constructor destructor

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: ?View Code C__attribute__((constructor)) static void initializer1() { printf("[%s] [%s]\n", __FILE__, __FUNCTION__); }   __attribute__((constructor)) static void initializer2() […]

openframeworks plugin for Xcode

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?

WAT? Now this is something else! practicalswift.com