[ANN] clj-native 0.8.1

23 views
Skip to first unread message

mac

unread,
Mar 13, 2010, 1:14:32 PM3/13/10
to Clojure
Hello all.
I have had some time lately to work on my C FFI for Clojure and I
think it's pretty much feature complete now.
It has support for functions, callbacks, structures, unions and
globals.
For structures there is support for different alignments.

The library has two main namespaces: clj-native.direct and clj-
native.dynamic.
The direct namespace uses the "direct mapping" feature of JNA in order
to be as efficient and arity and type safe as possible. However, it
does not support varargs functions since they require reflection and
dynamic translation of the parameters. That's what the dynamic
namespace is for: It can map any C function into clojure, even vararg
functions like printf but at a higher cost in call time and less
safety (it's easy to crash the jvm by sending the wrong type or number
of parameters). Access to global variables through the JNA Pointer
class is also available in the dynamic namespace.

The library is available from github: http://github.com/bagucode/clj-native
and clojars: http://clojars.org/clj-native

Example usage of the direct namespace can be found here:
http://github.com/bagucode/clj-native/blob/master/src/examples/c_lib.clj

Please report issues or make requests to my github account or by mail.

Enjoy!

/Markus

mac

unread,
Mar 17, 2010, 3:08:44 AM3/17/10
to Clojure
After just a little more test and polish I plan on calling clj-native
1.0. But clj-native is a *really* boring name so I want to change it
before 1.0 and I don't have very good imagination when it comes to
these things.
So I need your help.
It doesn't have to have anything to do with anything, could just be
something that sounds funny, like sasquatch, that's a funny word.

Please help!

/Markus

Ramakrishnan Muthukrishnan

unread,
Mar 17, 2010, 3:12:10 AM3/17/10
to clo...@googlegroups.com
On Wed, Mar 17, 2010 at 12:38 PM, mac <markus.g...@gmail.com> wrote:
> After just a little more test and polish I plan on calling clj-native
> 1.0. But clj-native is a *really* boring name so I want to change it
> before 1.0 and I don't have very good imagination when it comes to
> these things.
> So I need your help.
> It doesn't have to have anything to do with anything, could just be
> something that sounds funny, like sasquatch, that's a funny word.

clj-baremetal ?

--
Ramakrishnan

Garth Sheldon-Coulson

unread,
Mar 17, 2010, 3:20:27 AM3/17/10
to clo...@googlegroups.com
I suggest prawn.
Garth

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Adrian Cuthbertson

unread,
Mar 17, 2010, 4:20:19 AM3/17/10
to clo...@googlegroups.com
You asked for it! What's the bet there are at least 50 responses to
your post. How about;
natty, nattle, clonat, or just nat.

-Rgds, Adrian.

Meikel Brandmeyer

unread,
Mar 17, 2010, 4:49:21 AM3/17/10
to Clojure
aborigine

Laurent PETIT

unread,
Mar 17, 2010, 4:50:20 AM3/17/10
to clo...@googlegroups.com
pistil

2010/3/17 Meikel Brandmeyer <m...@kotka.de>:
> aborigine

David Nolen

unread,
Mar 17, 2010, 11:00:49 AM3/17/10
to clo...@googlegroups.com
yodel

pthatcher

unread,
Mar 17, 2010, 10:32:28 PM3/17/10
to Clojure
I can't believe no one has suggested:

Najure.

> > clojure+u...@googlegroups.com<clojure%2Bunsu...@googlegroups.com >

pthatcher

unread,
Mar 17, 2010, 10:33:43 PM3/17/10
to Clojure
I can't believe no one has suggested:

Najure.

Wilson MacGyver

unread,
Mar 17, 2010, 11:36:19 PM3/17/10
to clo...@googlegroups.com
hashi, means bridge in japanese

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com

> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

--
Omnem crede diem tibi diluxisse supremum.

LauJensen

unread,
Mar 18, 2010, 3:52:42 AM3/18/10
to Clojure
Hey Markus,

Probably not what you want to hear, but I think great names are both
memorable and descriptive. Leaning on those criterias clj-native is
not bad at all.

Lau

Joop Kiefte

unread,
Mar 18, 2010, 4:50:06 AM3/18/10
to clo...@googlegroups.com
What about Clonure? Wordplay on Clone and leaving out the j ;)

2010/3/17 mac <markus.g...@gmail.com>:

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

--
Communication is essential. So we need decent tools when communication
is lacking, when language capability is hard to acquire...

- http://esperanto.net - http://esperanto-jongeren.nl

Linux-user #496644 (http://counter.li.org) - first touch of linux in 2004

Martin DeMello

unread,
Mar 18, 2010, 10:15:51 AM3/18/10
to clo...@googlegroups.com
C-Foam

martin

On Wed, Mar 17, 2010 at 12:38 PM, mac <markus.g...@gmail.com> wrote:

Alexandre Patry

unread,
Mar 18, 2010, 10:36:35 AM3/18/10
to clo...@googlegroups.com

>> On Wed, Mar 17, 2010 at 3:08 AM, mac <markus.gustavs...@gmail.com> wrote:
>>
>>> After just a little more test and polish I plan on calling clj-native
>>> 1.0. But clj-native is a *really* boring name so I want to change it
>>> before 1.0 and I don't have very good imagination when it comes to
>>> these things.
>>> So I need your help.
>>> It doesn't have to have anything to do with anything, could just be
>>> something that sounds funny, like sasquatch, that's a funny word.
What about cocytus, the deepest level of hell in Dante's inferno. I
guess you cannot go lower level than that :) And it reflect the pain of
leaving clojure to write native code.

There are also the clo-cytus or clocytus variations.

Alexandre

Edmund Jackson

unread,
Mar 18, 2010, 11:02:35 AM3/18/10
to clo...@googlegroups.com
I love the reference, but I dunno dude, the word itself sounds venereal !

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com

> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

Edmund

"Do it with love, l-o-v-e"
MJ


eyeris

unread,
Mar 18, 2010, 2:15:01 PM3/18/10
to Clojure
clj-segfault

j/k :)

Seriously though, thank you for working on this. I'm sure it will
remove a serious barrier to entry for some people.

Zach Tellman

unread,
Mar 18, 2010, 8:33:30 PM3/18/10
to Clojure
how about 'patois' or 'creole'

Frank Hale

unread,
Mar 18, 2010, 10:44:05 AM3/18/10
to clo...@googlegroups.com
clojure + native = clotive

Alexandre Patry

unread,
Mar 19, 2010, 9:17:05 AM3/19/10
to clo...@googlegroups.com
Frank Hale wrote:
> clojure + native = clotive
>
or clo-jive, like clojure dancing with another language.

Alex

caljunior

unread,
Mar 19, 2010, 10:11:56 AM3/19/10
to Clojure
brain dump coming up:

inclojenous

c-jure

cclojure

full-circle

c-no-free

brace-yourself

chickey (my favourite)

David Andrews

unread,
Mar 19, 2010, 11:56:32 AM3/19/10
to Clojure
ffinagle

(Merriam-Webster says: to obtain by indirect or involved means, to
obtain by trickery, to use devious or dishonest methods to achieve
one's ends)

Stuart Sierra

unread,
Mar 19, 2010, 4:38:25 PM3/19/10
to Clojure
On Mar 17, 3:08 am, mac <markus.gustavs...@gmail.com> wrote:
> After just a little more test and polish I plan on calling clj-native
> 1.0. But clj-native is a *really* boring name so I want to change it
> before 1.0 and I don't have very good imagination when it comes to
> these things.

Personally, I much prefer library names that are descriptive rather
than creative. Give your kids cute names, not your libraries.

-SS

Reply all
Reply to author
Forward
0 new messages