Common Lisp, Development, LISP

Hacking Lisp in the Cloud, Part 2

This morning I got access to the new Cloud9 IDE beta—and I have to say… WOW. It’s slicker, it’s faster, it’s more stable, auto-complete recognizes Lisp definition forms from your open workspace files such as defun and defmacro, and most importantly, it only takes seconds to get your workspace set up with RLWRAP, SBCL and Quicklisp.

The new Cloud9 IDE is running on an Ubuntu backend workspace. Cloud9 has had terminal access to your project workspace for quite some time now, but I’ve found the terminal experience to be significantly smoother in the new beta. It stays connected now, no longer timing-out on you when switching tabs or stepping away from the computer for a minute. Users can also use sudo for root access, and as a result install any debian package from apt (amongst many other things, of course). Emacs 24 is already installed by default. I suspect that SSH tunneling to a remote SWANK server from the Cloud9 workspace is also now possible.

Continue reading

Advertisements
Common Lisp, Development, LISP

Announcing BIT-SMASHER

BIT-SMASHER is a lean, straightforward and admittedly naive Common Lisp library for handling the oft-overlooked bit-vector type, bit-vector arithmetic, and type conversion between bit-vectors, octet-vectors, hexadecimal strings, and non-negative integers, extending the related functionality in the Common Lisp standard. While of little use to the average Lisp project, it was designed for those cases where working with bit-vectors is either necessary, or would be ideal if it were not for the lack of the functions this library provides.

You can get BIT-SMASHER now at: https://github.com/thephoeron/bit-smasher — or wait for it to come out in the next Quicklisp release.

Continue reading

Common Lisp, Cryptography, Development, LISP

Self-seeding Context Added to CL-ISAAC

As recommended by Bob Jenkins, the original author of the ISAAC cryptographic random number generator algorithms, self-seeding ISAAC is a useful technique for increasing the cryptographic strength of the random numbers generated from a given ISAAC context; i.e., using random values generated by ISAAC to seed a new ISAAC context. This may not seem particularly valuable for one-off random values such as the session tokens generated in CL-ISAAC’s documented Quick Recipes, but when you need to generate millions of cryptographically-strong random numbers from a single context—such as for a One-Time Pad cipher—you notice the extra strength that self-seeding provides.

CL-ISAAC v1.0.4 is now available on GitHub, which includes the self-seeding context. It will be available in the April distribution of Quicklisp.

Continue reading

Common Lisp, Cryptography, Development, LISP

ISAAC-64 Algorithm Added to CL-ISAAC

Over the long weekend, I finished porting the ISAAC-64 algorithm from C to Common Lisp, and it is now included in the CL-ISAAC package on GitHub: https://github.com/thephoeron/cl-isaac. The new version (1.0.2) including ISAAC-64 will be available through Quicklisp in next month’s update; but if you would like to try it right away, you can clone the repo into ~/quicklisp/local-projects/ and give the Quick Recipe a try:

;; generate a 512-bit hex string token using ISAAC-64 context
(defvar my-isaac64-ctx (isaac:init-kernel-seed :is64 t))
(format nil "~64,'0x" (isaac:rand-bits-64 my-isaac64-ctx 512))
    => "6F00D098A342450CD7A2C27D941625ED70E7F7F4DD0BD46D8D1597361F0AA49180728D9BA062A14E6795F579D5B04B01F92310F18921A7397C57CF09012E104F"

Continue reading

Common Lisp, Development, LISP

Hacking Lisp in the Cloud

The other day I stumbled upon a very interesting new online service for developers, Cloud9 IDE. Imagine Sublime Text, a test server with command-line access, version control, live chat, code-sharing and live collaboration, all bundled together in one convenient web app, allowing you and your team to work together seamlessly from anywhere with an internet connection. With Cloud9 IDE, that’s exactly what you get—and that’s just what comes with the free account.

The service seems primarily tailored to Node.js developers, but also includes out-of-the-box support for Python, Ruby, and PHP. Naturally I decided it would be worth the effort to see if I could get a Lisp installation up and running—and in the end it wasn’t particularly difficult. The one set-back is that your Project Workspace is running on a version of Red Hat that includes v2.12 of glibc, which means that unless you want to compile both glibc and sbcl from source yourself for every lisp project you have on Cloud9, the latest version of SBCL you can install from the binary release is 1.0.23. Not ideal, but at least it works.

Continue reading

Development, LISP, Racket, Scheme, Technology, Virtual Reality

New Toys: (fluxus) and Oculus Rift

I got the email on Friday from Oculus VR that my Rift Developer Kit would be shipping soon. Naturally I’m pretty excited, since I haven’t used a VR headset since some tech expo I was at back in the 90s—and the Rift is substantially more advanced. I’m also quite excited for the 4-month Unity Pro trial license that comes with the Rift (not to mention Unity Pro’s new subscription license!).

So this weekend, with the expectation of the impending arrival of said hardware, I’ve been playing around with a bunch of different things. Exploring my options, as it were, to take full advantage of the Rift hardware once it arrives. I plan to write a Common Lisp wrapper to the Oculus SDK, as that will be generally useful for Lisp game developers; but it would benefit me more directly to have a toolkit in Lisp for procedural generation of 3D graphics.

That’s when I came across (FLUXUS), a really cool livecoding environment built on Racket (a relatively new flavour of LISP/Scheme). It doesn’t have support for the Oculus Rift, and I imagine it would be slightly difficult to type with a VR headset on, but at least it’s a step in the right direction. But that’s no matter, because (fluxus) is exactly the tool I was looking for, for my live music performances.

Continue reading

Common Lisp, Development, LISP, Quantum Computing, Quantum Programming, Technology

Hacking D-Wave One in Common Lisp: Introducing SILVER-SWORD

I’m pleased to announce that BURGLED-BATTERIES has not failed me (despite being far from finished), and I have been making steady progress with my Common Lisp interface to D-Wave’s Python Pack and Adiabatic Quantum Computer Simulator: SILVER-SWORD. It is now available in alpha as a Quicklisp-installable ASDF package on GitHub: https://github.com/thephoeron/silver-sword

Features left to implement: reading and writing of qubo files, ising to qubo to ising converter functions, chimera graph indexing, and the BlackBox Solver.

Of course, you still need D-Wave’s Python Pack first, so unless you’re already a registered D-Wave developer, SILVER-SWORD won’t be much use to you. You will also need a few other dependencies, which are all conveniently listed in the repo’s README file.

That being said, I have already included a few tutorials, so you can at least see Common Lisp quantum energy programming in action.

Continue reading