Binding nanomsg with melange

For those who haven't heard about it, nanomsg is a great library from Martin Sustrik. It provides high performance messaging with a simple API similar to that of BSD sockets. It bears some similarity to what someone might do with ZeroMQ and is licensed under the liberal terms of the MIT license. The nanomsg library is currently in a pre-alpha state.

I have recently written bindings for it for use with Dylan which are available as nanomsg-dylan.

In Dylan, we have a couple of options when writing bindings. We have a low level direct-c-ffi and a higher level C-FFI. Using the lower level interface is fairly tedious and verbose while using C-FFI is fairly convenient. But writing a binding using either involves a lot of work and hand-translation of the C APIs into the right Dylan definitions. (Currently, the direct-c-ffi system is not documented.)

This is where the melange tool is very useful. Melange can parse C headers and automatically generate the C-FFI bindings. While doing this code generation, it also handles details like automatically translations the C names into the correct Dylan names following the Dylan conventions.

Melange now has some preliminary documentation.

Using Melange

Melange generates a ...

read more »

There are comments.

Windows: Current State of Support

Related to the recent post Why is the OpenDylan IDE only on Windows?, another source of common questions are some of the requirements that we have for running on Windows and the state of 64 bit Windows support.

Building Open Dylan Applications on Windows

Building an Open Dylan application on any platform requires at least a linker. On Windows, it also requires a resource compiler for handling .rc files which controls things like an applications icons.

On Windows, we support debugging an application written in Dylan when using the Open Dylan IDE. To do this, we must have the debug data available. Our debug data on Windows is in CodeView 4 (CV4) format rather than the more modern PDBs in use today. This is partially a historical artifact of the fact that this code was written in the 1990s and partially due to the later formats not being publicly specified.

So, to link on Windows and support debugging, we need a linker that supports CV4 debug data. Unfortunately, Microsoft removed support for this in their linkers after Visual C 6. However, the PellesC linker, polink does support CV4 debug data.

PellesC also provides a resource compiler, porc.exe.

PellesC provides ...

read more »

There are comments.

Why is the OpenDylan IDE only on Windows?

We're often asked when the IDE will show up on Linux or Mac OS X.

Unfortunately, the answer to this is rather complex because the IDE consists of multiple pieces, all of which have separate portability issues.


The Existing IDE

DUIM - The GUI Framework

The biggest reason that the IDE is only on Windows is that it uses the DUIM framework which hasn't yet been ported away from Windows in a functioning and well-maintained manner. (An experimental GTK+ port has existed in the past, but it doesn't currently compile.)

Code Browsers and Inspectors

The code browsers and inspectors pull their information from frameworks that are independent of the GUI. It is possible to use this information separately from the IDE itself. The DIME environment for emacs supplies some of this functionality. The Hula project (now defunct) provided some of this functionality as well via a web-based interface.

This is actually an exciting set of features that our compiler provides. While many other languages have to glue IDE functionality on as a separate set of libraries, Open Dylan's compiler supports it internally from the ground up.

Debugging

The debugger depends on a couple of key components:

  • A ...
read more »

There are comments.

Getting Started with OpenDylan 2012.1

There are many exciting changes in the 2012.1 release of OpenDylan, but to me, some of the most exciting changes are the ones that make it easier to get a new project going and building. We'll be writing more about that in the future, but for now, let's look at how to get OpenDylan installed in the first place!

Installation

Linux and Mac OS X

Installing OpenDylan is pretty easy on Linux and Mac OS X.

  1. First, you'll want to make sure that you have the basic developer tools like gcc installed.

  2. On Gentoo, OpenDylan is available via the package system, so go ahead and install it that way. Packages for other operating systems are coming in the future and help is appreciated.

  3. Otherwise, download and install a build of OpenDylan for your operating system. Put OpenDylan in a directory of its own, like /opt/opendylan-2012.1.

  4. Make sure that the bin directory under the installation path is on your PATH. You can do this by placing a line in your .bashrc in your home directory like this:

    export PATH=/opt/opendylan-2012.1/bin:$PATH
    

    You can enter that command in your current shell as well ...

read more »

There are comments.

Hello, World!

define method say-hello () => ()
  format-out("Hello, world!\n");
end;

say-hello();

As part of the work that DataFueled is doing, we are sponsoring work in the Dylan programming language. This work is being done under the umbrella of the Dylan Foundry.

The Dylan Foundry is where we'll be blogging about the work that we're up to, what our future plans might be, and the libraries that we've developed.

The Dylan Foundry will also be assisting with issues surrounding the Dylan development tools as well as deploying Dylan applications into production in a server environment.

read more »

There are comments.