Roundup of useful things for developers
It’s been a while since I’ve shared some programming and shell tips and there were a few significant changes to the .NET stack this month and the last worth mentioning.
.NET at parity with Windows users on OSX and Linux
On the coattails of Microsoft’s announcement to open sourcing ASP.NET (they already open sourced the “Roswell” compiler). Xamarian adds support for NuGet and BCL which means….
Linux, OSX, and *nix developers can now use the latest client libraries with their .NET projects.
I’m so excited that Microsoft has started becoming more open. This could be significant in getting more C# developers, particularly on the Linux and OSX platforms. There’s also that whole, “you can now cross-develop Android and iOS apps” thing too in Xamarian, but Nuget and BCL is what I care about!
Time to test the Google+ Quickstart sample… on Linux!
- First, you should grab the Xamarian Studio app.
- Next, clone the Google+ C# Quickstart
- Finally, sync the NuGet packages and build!
This is still unsupported, but please let me know if you encounter issues or get the API client going in Xamarian!
Diffing command output using grep and sed on the OS X shell
I was doing this for a git project but I really needed to diff two commands.
sdiff "`ls -R <left> | sed -e 's/<left>//' |\ grep -v ".git"`" "`ls -R <right> |\ sed -e 's/<right>//' |\ grep -v ".git"`"
Speaking of bash and shell scripting, read Defensive Bash Programming, it could change the way you think about *.sh.
Building the Tree utility from OS X
Building Linux software on OS X has it’s own slew of problems because Apple makes secret changes to the BSD sources and compiler that manifest in quirks. I encountered one such quirk while building the tree command for some documentation I was producing. I got it to working using this one weird trick:
# Uncomment for OS X: CC=cc CFLAGS=-O2 -Wall -fomit-frame-pointer -no-cpp-precomp LDFLAGS= MANDIR=/usr/share/man/man1 OBJS+=strverscmp.o
Nothing to see also!