Skip to main content

Internal Interface Classes in C#

In C#, interfaces can only specify public properties and functions. However, especially when making libraries to be used by other projects, it is often beneficial to have internal interfaces (specifying functions that should also be marked internal, rather than public). Below is an outline of how to get this sort of desired visibility for internal interfaces, as well as convenient syntax for using internal interface methods.

Read more…

WIX Project Dependency Task

The WIX framework is excellent for building installers and deploying software for Windows, however there's some functionality that is left to be desired, especially when it comes to deploying projects and ensuring that everything that project needs is bundled. The WIX heat tool can do some helpful things for your deployment, but if you don't want all your projects to build into a single directory, and then use that directory when invoking heat, you need something a bit smarter.

Read more…

Referring to nested types in XAML

Anyone who has programmed using the WPF framework for a while eventually runs into its limitations. In my opinion, the framework is great overall; it offers many advantages over WinForms, and for little extra overhead. However, the limitation of {x:Type} to only reference classes that are direct descendants of a namespace was bothering me, so I made a markup extension to overcome the issue.

Read more…

IPP libraries in Cygwin

The Intel Integrated Performance Primitives (IPP) libraries are excellent optimized libraries for Intel architectures that can really boost the speed of complex operations. Intel supplies them for Windows, Linux, and Mac OSX, and they also include optimizations specific to each Intel processor architecture. However, you should be cautious when using them in a Cygwin environment; they will work just fine, but the "default" usage won't work as expected.

Read more…

Contributing to NixOS

I needed a VPN client in NixOS (the operating system I've installed and have been using on my work machine) that would work with my company's VPN. Unfortunately, neither openfortivpn nor strongswan worked, but I was told by some coworkers that libreswan was working well. The libreswan package didn't yet exist in the main NixOS nixpkgs repository, so I took it upon myself to add it in! Along the way I also learned about the nix expression language and the community behind both nix and NixOS.

Read more…

Running VirtualBox with an existing Windows 7 partition

At work I received a new laptop, and installed linux on it. However, I needed to continue .NET development some of the time, and Visual Studio doesn't play nicely with Wine. So I decided I would run Windows 7 from a virtual machine. This is all well and good, but I didn't want to get another license for it when I already had it installed on the hard drive! While this might be against the terms of the license (I haven't checked), technically the installed Windows 7 copy could only be run as a single instance at any given time. So with some finagling, I was able to get VirtualBox to point to the existing install of Windows 7. There are also purportedly some significant I/O speedups when using VirtualBox directly with a hard drive rather than from a file on the host system.

Read more…

AMQP using WebSockets

At work, one of our projects needed some real-time communication between clients. Our first preference was that the clients could connect and communicate using just the browser, without any extra applications running on the client device. Having the communication done through the browser would make it easy for even mobile devices to connect and interact with the system, let alone simplifying things for desktop clients. We eventually came to a solution which uses the AMQP protocol and WebSockets.

Read more…

Upgrading a 32-bit Linux system to 64-bit, in-place

For about 5 years now my primary computer has been a Linux system based off of LFS. When I first compiled it, I was hesitant to go 64-bit, because LFS on it's own doesn't provide any directions for making a multilib system, and I knew I would need 32-bit libraries.

So, I made the decision to just go 32-bit. It made sense since I only had 4GB of RAM at the time anyway. I have seen the need for more over the years (running Firefox with multiple pages loaded and running a RAM-heavy game would sometimes bring the computer to a grinding halt), but it was still manageable. But I knew that I would probably eventually upgrade to 64-bit, especially when I could get a multilib setup. I put it off for a while, but two weeks ago I decided to bite the bullet and do it.

Read more…