Clojureclr Repl in c# example projects

278 views
Skip to first unread message

CM

unread,
Aug 8, 2020, 10:14:34 AM8/8/20
to clojure-clr
Is there any full examples of using clojureclr in a c# dll, how you start repl from c# how you pass values from c# and how to return values to c#.
I am thinking basics here as I am not that experienced only tinkering and would like to see what's achievable.
Any feedback appreciated.
Cm

Hyogeol Lee

unread,
Aug 10, 2020, 12:53:36 AM8/10/20
to clojure-clr

Hi, I uploaded basic example in 2019, but not about REPL.

https://github.com/hglee/ClojureClrExample

You can check this at start.


2020년 8월 8일 토요일 오후 11시 14분 34초 UTC+9, CM 님의 말:

Garriet Chandler

unread,
Aug 11, 2020, 3:12:49 PM8/11/20
to Hyogeol Lee, cjjm...@gmail.com, clojure-clr
Nice example! Sorry for the late reply, I just wanted to add on some tips for using a REPL in a C# project.
After adding ClojureCLR via Nuget or manually, I usually put this in the constructor of a class and make an instance:
IFn require = Clojure.var("clojure.core", "require");
require.invoke(Clojure.read("clojure.core.server"));
IFn server = Clojure.var("clojure.core.server", "start-server");
		
server.invoke(Clojure.read("{:name godot-repl :port 5555 :accept clojure.core.server/repl}")); 

Here I was using it for an object in the Godot game engine and it worked out pretty well.
After the game is running I just connect with inf-clojure using inf-clojure-connect on Emacs.

Anyway, good luck!

--
You received this message because you are subscribed to the Google Groups "clojure-clr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-clr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure-clr/f080e4fb-02c7-4bfb-8027-f113e5ba71bao%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages