[PD] proof-of-concept [hsext] for writing pd externals in Haskell

Claude Heiland-Allen claudiusmaximus at goto10.org
Sun Jan 7 22:45:27 CET 2007

Charles Henry wrote:
> Maybe I'm missing the point here, but isn't Haskell a compiled (not
> interpreted) language? 

There are a variety of compilers and interpreters.

 > We can add any compiled function, wrapped in a
> C-written external, just so long as we have the symbols for the
> function from the binary.

True, and almost trivial, which is why the root of this thread mentioned 
"proof of concept".  The slightly non-trivial part is that Haskell has a 
run-time system, and the rather non-trivial part is dynamically loading 
Haskell source at runtime.

> *OR* we can write an external in some funky language, so long as we
> can reference the functions from m_pd.h correctly in that language.

False.  Pd expects a symbol blah_setup in a file blah.library (where 
.library is .pd_linux in my case).

> I tried to put a Fortran function into an external, once compiled.
> All I had to do was "grep" for the symbols exactly as they appeared in
> the binary, and get the variables of the function declaration right.
> Is this similar?

Not very.

 > Have I missed the point entirely?


The middle window in the top row is the entire source for the object. 
hsext provides the glue to load that source, with a large portion of 
rather non-trivial help from:


> Chuck


More information about the Pd-list mailing list