Hi,
I'm new to the clojure and try to learn this language.
Referring to this at
http://clojure.org/java_interop#Java%20Interop-Type%20Hints
when trying this code
(defn testing
(^String [])
(.toUpperCase hello world))
clojure throws java.lang.IllegalArgumentException: Parameter
I get it. Thank :}
On Monday, February 10, 2014 11:19:06 PM UTC+8, Jim foo.bar wrote:
On 10/02/14 15:08, macdevign mac wrote:
(defn testing
(^String [])
(.toUpperCase hello world))
;;syntax for overloading
(defn testing
(^String [] ;;notice the omitted bracket
Hello all.
I have made a small clojure wrapper around the jorbis library from
jcraft (for decoding ogg vorbis compressed audio).
I'm planning to maybe use it as a component in a small game library
but I made it as a stand alone library because it could really be
useful in any app dealing with
On Nov 19, 3:44 pm, Seth wbu...@gmail.com wrote:
unfortunately doesnt work. The library loads succesfully but i still
get the error when calling add. Note that compiling on the top is a
workaround to get it working on the repl.
i added the loadlibrary to an init function which is good and i
System/loadLibrary uses the paths set in the System property
java.library.path to look for dynamic libraries so you need to make
sure it contains the directory where your .so is. I think it also gets
cached at first read or something stupid like that so it's very
important to get java.library.path
me a mail if you have problems, requests or
suggestions.
/Markus
On Wed, Oct 6, 2010 at 07:21, mac markus.gustavs...@gmail.com wrote:
There is always clojure.asm if you don't mind getting your hands dirty
with bytecode generation. That's what I did when I needed exactly what
you describe
There is always clojure.asm if you don't mind getting your hands dirty
with bytecode generation. That's what I did when I needed exactly what
you describe for clj-native. It wasn't that much work, the JVM
bytecode is uncomplicated to begin with and since JNI method stubs
require no code all you
Thank you Mark Downie for recommending OpenCL, I'll start playing
around with it. As for accessing the c libraries directly, I'm afraid
I don't know much about JNI to do it from clojure. Do you or anyone
know of a good way to start with JNI in clojure?
If you are going to use a straight C
Correction: you will need the jdk on windows when using the 32 bit
build because the server jvm does not come with the 32 bit jre.
Perhaps I should just make it prefer the server jvm, not require it.
On Aug 15, 6:12 pm, mac markus.gustavs...@gmail.com wrote:
On Aug 15, 6:02 pm, Wilson MacGyver
.
The readme and code is over here:
http://github.com/bagucode/Carnival
If you don't want to compile C++ or can't get the projects working (I
may have used some machine-specific paths) I have made some prebuilt
binaries for your testing pleasure.
Mac OS X version requires jre 1.6, Windows version should
On Aug 15, 6:02 pm, Wilson MacGyver wmacgy...@gmail.com wrote:
This still requires JDK installed right? On the OSX version, does it
create DMG file?
Since for an end user OSX app, that's what people expect.
It requires JRE installed, not JDK. It comes with the OS on everything
but windows but
On Aug 13, 9:51 am, Mike Anderson mike.r.anderson...@gmail.com
wrote:
2. It would be great to reduce the amount of memory allocations. Yes,
I know memory is plentiful and GC is very cheap, but it's still not as
cheap as stack allocation and any noticeable GC pauses are not good
for the
questions; philosophy questions answers.
On Aug 10, 2010, at 6:29 AM, Sunil S Nandihalli wrote:
Thanks Mac for your clarification .. I am using clojure 1.2 .. so should be
fine. And I was wondering if I can acess c++ stuff via clj-native .. What
are your suggestions?
Sunil
On Tue, Aug 10
On Aug 11, 4:26 pm, Chouser chou...@gmail.com wrote:
On Wed, Aug 11, 2010 at 5:18 AM, mac markus.gustavs...@gmail.com wrote:
It is certainly theoretically possible to call C++ from Clojure/Java
but it requires deep knowledge and lots of code for each C++ compiler
one would like to support
I'm the author of clj-native.
Currently it only works with Clojure 1.2. In retrospect I should have
made a separate branch when dropping 1.1 support.
If you need 1.1 support, just tell me and I could make a branch for it
since the changes required should be small.
/Markus
On Aug 9, 5:31 pm,
I agree with Laurent, this looks very cool.
It's great that you are making it a text/repl interface because that
means it's decoupled from any particular editor and can easily be used
as a base for gui debuggers in different editors and IDEs.
/Markus
On Jul 7, 7:39 am, George Jahad
Yes, this is very interesting and I would love to try it.
Since I do most of my programming on a mac, a .dmg file would work
fine for me.
On 9 Apr, 16:18, Antony Blakey antony.bla...@gmail.com wrote:
I have a private build of Netbeans that adds the following features to the
maven support:
1
lspec...@hampshire.edu wrote:
I'm trying to track down the reason that I sometimes see a lot of
concurrency in my system (up to 1200% CPU utilization on a dual
quadcore mac that also has some kind of hyperthreading, allegedly
allowing a maximum of 1600% CPU) while other times it gets
Like Per says, if you want to compile Clojure to LLVM code that's
probably a huge project, have you looked at VMKit? I think that's a
JVM/CLR implementation based on LLVM, perhaps it could run Clojure?
If you just want to use LLVM from Clojure however, you can use my C
FFI clj-native with the C
also has facilities to create ByteBuffers from pointers which
means you can gain access to large blobs of memory that reside in
native code.
On 24 mar, 08:56, Konrad Hinsen konrad.hin...@fastmail.net wrote:
On 24 Mar 2010, at 07:40, mac wrote:
If you just want to use LLVM from Clojure however
of method calls.
On the native side you should be able to get a direct pointer to the
memory in the buffer so you can just go crazy and do whatever you like
(hello segfault) ;)
On Mar 24, 3:17 pm, Konrad Hinsen konrad.hin...@fastmail.net wrote:
On 24.03.2010, at 11:22, mac wrote:
With regards
, could just be
something that sounds funny, like sasquatch, that's a funny word.
Please help!
/Markus
On 13 mar, 19:14, mac markus.gustavs...@gmail.com wrote:
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
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:
The .m2 folder is a Maven 2 convention. Leiningen uses Maven
internally.
.m2 contains your local repository - the single standard place where
stuff gets downloaded to.
When doing lein deps in a project folder any dependencies are
downloaded to your local repo first (unless you already had the
Is -main special in any way, or is this just a convention that some
environments select? In the past I think I've used a manifest to
specify the main entry point... is that really necessary or does -main
map to the default main entry point regardless of build tool? Just
curious really!
I
On 25 Jan, 12:18, Joonas Pulakka joonas.pula...@gmail.com wrote:
I would be interested in native / C interoperability; perhaps either
(or both) of these libraries:
http://github.com/bagucode/clj-native
http://github.com/Chouser/clojure-jna
And others, if there are similar ones. In general,
?list=devmsgNo=808
(I realize that this would basically be the generate callback classes
OTF solution that I said I'd rather not do, but if the code for this
already exists I could be persuaded otherwise.)
Cheers
..Mark..
On Sun, Jan 24, 2010 at 8:54 AM, mac markus.gustavs...@gmail.com wrote
A little progress update.
I havent had much time to work on this since my initial effort. But
this weekend I have gotten structures to work.
The reason that special support for structures is needed is to support
C api's that pass them by value.
Most of the effort to make this work went into how I
On 25 Jan, 06:50, Mark Engelberg mark.engelb...@gmail.com wrote:
Debugging techniques, including:
* How to make sense of Clojure's stack traces.
* How to use Java debugging and profiling tools with Clojure.
+1 for this. I haven't had the energy to try any debugging or
profiling tools yet.
If you are talking about gui's written in swing you might have more
luck with AWT since that is supposed to be using native gui components
rather than doing it's rendering in java. I suspect that the
sluggishness of swing is due to the fact that it has to copy a lot of
data between the java heap
Using the clojars repo from leiningen works fine for me, just using
[dgraph 1.0.0].
I've done most of my little swing app I needed to get done and dgraph
has been very pleasant.
However I found myself wanting to put a map in the graph because I had
a function for updating the gui that depended on
The issue that is
particularly interesting to me to explore is how alien Clojure is to
Java programmers, what are subjective and objective causes, and how
hard is to overcome each of the identified issues.
This sounds very interesting. I try to explain the point of lisp to
java programmers
I had apparently forgotten to commit and push the last changes.
Sorry for any trouble if anyone is trying to use the library.
The callbacks should work now.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
This is great. I think it'll be very valuable to call out to a bunch
of useful C library functions.
Thank you
Can this approach also provide a bridge
to Objective-C?
I'm very interested in using Cocoa to design GUIs for the Mac. I'd
really like to be able to have all the business logic
I've gotten rid of the automatic loading of the library and
replacement of stub functions upon their first call.
While this seemed convenient I didn't like that the stub versions of
the functions could be passed around as objects without the user
knowing that it was not the real version being
Hello all.
I've started work on a clojure library for interoperating with C. It's
always been a pain to do in Java but recently JNA (java native access)
has taken away most of that pain.
When using clojure however, it's nice to be able to stay in clojure
and not drop to java (or C *shudder*).
It's
On Jan 8, 8:53 pm, Rob Wolfe r...@smsnet.pl wrote:
mac markus.gustavs...@gmail.com writes:
Hello all.
I've started work on a clojure library for interoperating with C. It's
always been a pain to do in Java but recently JNA (java native access)
has taken away most of that pain.
When
On Dec 24, 6:14 pm, atucker agjf.tuc...@googlemail.com wrote:
I am also curious about this. Apologies, possibly naive question
ahead :)
My background is in C++. By choosing to work with immutable values
(i.e. with a lot of consts), I found that I was able to avoid most of
explicit memory
in particular seems interesting because one of their goals is to
make a very efficient GC and the language is somewhat multicore aware.
/mac
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note
I think I have solved the arguments issue but I had a strange bug with
clojure.test which worries me a little bit. If you can try this out
and see if it works for you that would be great:
http://github.com/bagucode/leiningen/tree/setfork
/mac
On Dec 17, 7:02 pm, Steve Purcell st...@sanityinc.com
I've looked into it a little and this is probably a solvable problem.
Since my native code patch needs fork as well I will try an idea I
have later today.
/mac
On Dec 17, 7:02 pm, Steve Purcell st...@sanityinc.com wrote:
I came across this problem too, and David's patch helps, to a certain
, when trying to build penumbra with it, it still fails with an
UnsatisfiedLinkError. It seems like setting the java.library.path
property in the ant task in eval-in-project is ignored..?
/Mac
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post
deployed something broken on your
dev machine.
But if the time difference is not noticeable, then I certainly agree
with you for open source projects.
/Mac
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure
Apologies if this has been answered, did a quick search but found only
pieces of info.
Is it possible to run ClojureCLR on Mono yet?
There was an issue with the BigDecimal dependency from J#?
/Markus
On Dec 3, 5:21 am, dmiller dmiller2...@gmail.com wrote:
1. CLR Interop: Interop is the focus
On Nov 19, 8:50 am, Martin DeMello martindeme...@gmail.com wrote:
On Thu, Nov 19, 2009 at 10:52 AM, Phil Hagelberg p...@hagelb.org wrote:
I must confess I don't understand the avoid the command-line mindset
at all, so I need a little extra explanation.
It's a matter of context switching.
On Mar 17, 4:54 am, Paul Mooser taron...@gmail.com wrote:
I've been using clojure in a similar way at work. I run a swank server
in a separate thread inside of a running application instance, and I
can connect to it remotely using SLIME. It works pretty well!
Me too, I put a swank server in
Arrays also have some overhead though so if your objects are all of
equal size you could use just one array (of ints?) for all of them and
create functions for indexing correctly in your array. A bit brittle
but very space efficient.
Of course this throws all of the benefits of Clojure or even
There is meta data on var's which you need to use (meta (var sym)) to
get at, but I'm under the impression that the var metadata is mostly
for the benefit of the language runtime and a few core functions (like
doc).
The regular use of metadata I think is when you add it yourself to
symbols or
On 4 Dec, 02:14, Mark Volkmann [EMAIL PROTECTED] wrote:
On Wed, Dec 3, 2008 at 4:49 PM, Meikel Brandmeyer [EMAIL PROTECTED] wrote:
Hi,
Am 03.12.2008 um 22:06 schrieb levand:
I am coming to Clojure from the Java side, and am completely ignorant
about lisp indentation newline
On Nov 17, 4:52 am, Luc Prefontaine [EMAIL PROTECTED]
wrote:
I never read anywhere in the documentation or in the user group that
Clojure is a Common LISP implementation.
Since it's existence, LISP has not gained a large acceptance in the
commercial market compared to other conventional
On Nov 17, 4:34 am, Rich Hickey [EMAIL PROTECTED] wrote:
On Nov 16, 9:47 pm, Stuart Sierra [EMAIL PROTECTED]
wrote:
Hi Rich, and all,
I took a stab at writing a static compiler class, i.e. a main() that
just compiles all the .clj files on the command line and saves the
.class files.
On 11 Nov, 06:24, Paul Barry [EMAIL PROTECTED] wrote:
In Common Lisp and Scheme, if you have an expression that evaluates a
symbol, it doesn't evaluate it until you call the function, not when
you define it. So you can do this:
Common Lisp:
[1] (defun b () a)
B
[2] (defvar a 5)
A
[3]
/mac
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit
doto.
/mac
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options
be a very nice change.
/mac
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED
...)
If this was not intended, a way to fix it is to make the update-cell
into a single call, perhaps taking the update function as an argument
rather than reading it from the cell state.
But like I said I've not completely understood the code so please
don't be mean to me if this was a retarded thing to point out :)
/mac
56 matches
Mail list logo