Questions tagged [clojureclr]

An implementation of the Clojure language that runs on the Common Language Runtime (CLR). This could include Microsoft's CLR or Mono.

36 questions
54
votes
3 answers

Clojure on the CLR

I'm interested in investigating Clojure on the CLR. I see that there is a port--but I'm always a bit leery of these second-class citizens (i.e. they don't have the stability or functionality of the original). I'd less inclined to spend much time at…
Kevin Won
  • 7,156
  • 5
  • 36
  • 54
23
votes
2 answers

How mature is clojure-clr? Can I use it with Mono?

How mature is clojure-clr? Does this support all the functions that clojure/jvm provides? Does it run on Mono without any problem? I tried clojure-clr, and it seems to work fine with REPL. However, when I tried to run examples with mono…
prosseek
  • 182,215
  • 215
  • 566
  • 871
21
votes
2 answers

Calling Clojure from .NET

I have been spending some time playing with Clojure-CLR. My REPL is working, I can call .NET classes from Clojure, but I have not been able to figure out calling compiled Clojure dlls from C# classes. I have been trying to adapt the java example…
tltjr
  • 1,286
  • 1
  • 16
  • 14
14
votes
4 answers

Clojure: finding out if a collection is seq-able

So there's list?, seq?, vector?, map? and so on to determine what type of collection the argument is. What's a good way of telling the difference between a map (i.e. something that contains key-value pairs) a collection (i.e. something that…
Kurt Schelfthout
  • 8,880
  • 1
  • 30
  • 48
12
votes
2 answers

Clojure performance on JVM versus CLR

Are there are performance comparisons of Clojure on JVM versus CLR? Or maybe someone who has used both with performance-sensitive code can give some anecdotal comments?
Suraj
  • 35,905
  • 47
  • 139
  • 250
9
votes
2 answers

Is there any decent documentation or tutorials on ClojureCLR?

I've decided to look into Clojure (inspired by this book). After a bit of research I've learned that I may be able to take advantage of my .Net experience by using ClojureCLR rather than needing to learn the various Java libraries. However, I have…
Jason Down
  • 21,731
  • 12
  • 83
  • 117
9
votes
3 answers

Clojure record constructors not first class?

Apparently, you can't call apply with a record constructor: (defrecord Foo. [id field]) (apply Foo. my-list) fails at read time because it is not expecting Foo. in that place. The only obvious workaround I could think of was to add a factory…
Kurt Schelfthout
  • 8,880
  • 1
  • 30
  • 48
6
votes
1 answer

Idiomatic way to write .NET interop function

I'm looking for a more idiomatic way, if possible, to write the following clojure code: (import '(System.Net HttpWebRequest NetworkCredential) '(System.IO StreamReader)) (defn downloadWebPage "Downloads the webpage at the given url and…
Kurt Schelfthout
  • 8,880
  • 1
  • 30
  • 48
6
votes
3 answers

Clojure: alternative to using a mutex/lock and a counter

Scenario: I have a server listening to six active TCP/IP connections. When a "ready" message comes in, an event will be raised on its own thread. When the server has received a "ready" message from each connection, it needs to run the "start"…
Anonymous
  • 739
  • 7
  • 15
6
votes
2 answers

Is it possible to use Clojure CLR with C# in Xamarin?

I love Clojure. It is by far my favorite language. I've just found Xamarin, which allows you to have cross-platform apps, making full use of native libraries. The language used with it is C#. Now I'm wondering if there is any way to program the…
Luke Martin
  • 109
  • 7
5
votes
2 answers

Discovering lisp-family language .NET implementations

So basically I'm not comparing Scheme with Clojure here, I want to compare realizations. There are: Clojure-clr which can be installed even using Visual Studio extension but it's still going a bit buggy for me to use it this way. After you create…
cnd
  • 32,616
  • 62
  • 183
  • 313
5
votes
2 answers

Clojure - map or set with fixed value->key function?

I have quite a few records in my program that I end up putting in a map using one of their fields as key. For example (defrecord Foo. [id afield anotherfield]) And then I'd add that to a map with the id as key. This is all perfectly doable, but a…
Kurt Schelfthout
  • 8,880
  • 1
  • 30
  • 48
4
votes
1 answer

Determine remote device endpoint UDP Clojure CLR

Trying to perform the equivalent c# code in Clojure CLR using System.Net; IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0); EndPoint remote = (EndPoint) sender; recv = sock.ReceiveFrom(data, ref remote); What I've tried in Clojure that does not…
casillic
  • 1,837
  • 1
  • 24
  • 29
4
votes
1 answer

Clojure CLR - Implement interface that contains properties

I'm trying to implement an interface that has properties but can't quite seem to get it to work and I also have not found any relevant examples via Google (yet). I'm sure I'm doing something completely wrong here but have no idea how to fix…
Frank Hale
  • 1,886
  • 1
  • 17
  • 31
3
votes
1 answer

How to associate project filetypes with project type in Visual Studio Extension (VSIX)

I'm trying to fix a bug in VsClojure whereby Visual Studio does not recognize a file with the extension .cljproj as a Clojure project. This only happens when VS is not already open; in other words, if you open VS and then open a solution containing…
Daniel Cotter
  • 1,342
  • 2
  • 15
  • 27
1
2 3