It's not difficult to see how software can be simultaneously a patentable process and free expression. Videogames are the most obvious example.
And most purely-software developments in video gaming shouldn't be patentable.
An important distinction between patents and copyright is that independent invention is not a defense to patent infringement and the patent covers the concept rather than the specific implementation. Which means that unlike copyright, software patents create concepts that you aren't allowed to express, even if they're your own ideas.