Posts relating to software development.
Tweaking Synology’s DNS Server For Great Justice

Posted by cwright on 2016.06.23 @ 22:05

Filed under:

Years ago I purchased a Synology NAS (a DS1812+, if you must know). I also purchased some hard drives for it, and a 2GB stick of RAM (bringing its total up to 3GB). Under the hood it’s a dual-core Cedarview Atom x86 CPU, and it runs a Linux distro wherein the owner of the device also has root access (i.e., you own what you own, like in the good old days). It’s also got dual GB NICs, some USB ports, etc.

In addition to storing substantial slabs of data, you can install services on these devices, so in effect they’re more like mini servers than the NAS name might imply. It’s busybox-based though, so a lot of the normal Linux commands act weird or don’t have useful aliases (more, not less, only a subset of vi commands work, etc).

One of the services I opted to install was a DNS server, in the hopes that it would allow me to move some per-machine hosts file management stuff to it, and that our previously-rootless devices (read: iPads, iPhones, etc) would also be able to finally take advantage of a local caching name server with internal friendly names for devices that don’t participate in Bonjour. [more...]

Emulating "defer" in C, with Clang or GCC+Blocks Emulating "defer" in C, with Clang or GCC+Blocks

Posted by smokris on 2015.10.08 @ 22:24

Filed under:

In the Go language (and now Apple’s Swift), there’s a new control-flow mechanism: defer.

When you tag a function call with the defer keyword, its execution is deferred until the end of the current scope. This makes it easy to construct an ad-hoc use of the RAII pattern — handy for placing resource initialization and finalization next to each other, to make it less likely that you’ll forget to finalize a resource.

I was curious whether it was possible to do something similar in C. It turns out it’s pretty straightforward. [more...]

LLVM generates code that generates code LLVM generates code that generates code

Posted by jstrecker on 2012.11.16 @ 13:53

Filed under:

Back from last week’s LLVM developer’s meeting, I’d like to talk about one of my favorite features of LLVM .

LLVM is the compiler infrastructure that underlies Clang, Vuo, and many other projects. It’s a set of libraries to help you build compilers (and more). Among other things, LLVM provides a C++ API for generating LLVM Intermediate Representation (LLVM IR) code. LLVM IR is an assembly language for a hypothetical computer. LLVM IR code can be either interpreted or compiled down to native code.

So LLVM provides this C++ API for generating LLVM IR code — but it doesn’t stop there. LLVM can also generate C++ code that generates LLVM IR code. In other words, LLVM can literally write part of your compiler for you! [more...]

Kosada is Developing a Next-Generation Programming and Performance Environment for Multimedia Artists

Posted by jmcc on 2012.11.02 @ 21:48

Filed under:

Kosada is developing Vuo, a next-generation visual programming environment. It will enable multimedia artists to create powerful real-time audiovisual projects, data visualizations, and apps — all without writing code.

With Vuo, non-programmers will be able to create their own multimedia software for interactive art and music performances, animations, visualizations, games, special effects, museum exhibits, kiosks and other artistic projects. Rather than writing code in a traditional computer language, the composer will drag and drop building blocks onto a canvas, connecting those blocks with cables to create the composition. Unlike most programming environments, artists will be able to interact with their Vuo compositions while they are running, allowing for live improvisation. [more...]

Compiling code with the Clang API Compiling code with the Clang API

Posted by jstrecker on 2012.08.15 @ 10:46

Filed under:

Have you tried Clang yet? Clang is an open-source compiler, under active development, that aims to replace GCC for compiling C, C++, and Objective-C. Compared to GCC, Clang is faster, while generating comparably fast code, and prints more useful error messages.

Clang is also better for developers who want to compile code programmatically. Unlike GCC, Clang is designed to be both a tool and an API. That makes Clang’s source code easier to understand and reuse. And, for those of us working on projects incompatible with GCC’s GPL license, it’s good to know that Clang is distributed under the BSD license.

Kosada is working on a cool new project that’s built on top of Clang and its underlying framework, LLVM. While using Clang for this project, I’ve been pleased to see how simple it is to write code that builds other code. Simple in retrospect, anyway! The code I wrote turned out to be simple, but it took lots of digging through the Clang source code to figure out what to write. So here’s my first contribution to the Clang community: two examples of using the Clang API to build code programmatically. [more...]

Announcing: iOS Development on 1 Page Announcing: iOS Development on 1 Page

Posted by jstrecker on 2012.01.03 @ 21:25

Filed under:

When you’re getting started with iOS development, it’s hard to figure out those first steps. What developer tools do you need? What are some good tutorials to start with? Where to begin delving into Apple’s thousands of pages of documentation?

That’s why I created iOS Development on 1 Page — a not-overwhelming guide for iOS newbies.

Is there any essential info about iOS development that should be added to iOS Development on 1 Page? Let me know!

Hacking Open Atrium: adding Features within the Contexts of your Spaces Hacking Open Atrium: adding Features within the Contexts of your Spaces

Posted by smokris on 2011.12.05 @ 18:02

Filed under:

Last Saturday at DrupalCamp Ohio, I presented an introduction to the basic concepts behind the Open Atrium Drupal install profile, and a demonstration of how to create custom Open Atrium Features. [more...]

Are you sure you want to localize? Are you sure you want to localize?

Posted by jstrecker on 2011.06.10 @ 13:36

Filed under:

It’s a wonderful fact about the world that humans have thousands of living languages. And a wonderful fact about many software development environments that they provide ways to create versions of applications localized into the most common of those languages. But before localization (or should I say world-readiness) sweeps you off your feet, let me tell you about some unexpected difficulties with Kineme’s first localized application. [more...]

When did Firebug get so terrible? When did Firebug get so terrible?

Posted by mradcliffe on 2011.04.13 @ 10:33

Filed under:

Firebug is one of those vital extensions for web developers and designers who use Firefox. I have been faithfully updating it whenever it whines at me to update it, which is usually every minor version, and it pretty much just works. Firebug and I have a romance of debugging HTML, CSS, and more recently the Javascript and JQuery that I use in Select Other, Processing, and some more recent custom development for Slight High.

The honeymoon ended recently… [more...]

Example of using a UITableView to create a form Example of using a UITableView to create a form

Posted by jstrecker on 2011.03.31 @ 22:38

Filed under:

There are a lot of iPhone/iPad examples out there, but surprisingly I haven’t seen one for a common task – using a table view to create a form. Here’s the source code. [more...]