Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
sogaiu
@sogaiu
shadow-cljs gives socket as well as nrepl access via jvm-based implementations
arundilipan
@arundilipan
right
sogaiu
@sogaiu
technically it's two implementations because one is nrepl, and the other is the built-into-clojure socket repl, but yes
ah i see you've asked thheller -- he can probably give you a good answer :)
in case it isn't obvious, if you write from scratch, doing a socket repl is going to be way easier
compared to nrepl that is
arundilipan
@arundilipan
i figured as much
right now, despite the ecmascript engine difference in Godot, you can still call CLJS libs
the problem is calling the Godot API from Clojurescript, because that isn’t available to you as a .js file, that stuff gets injected during runtime
sogaiu
@sogaiu
may be @selfsame would be a good person to ask regarding this :)
Vegard Steen
@vegard-st1

Hi! First time Arcadia user here (love the project), I've been playing around a bit but I'm having a hard time figuring out how to call (cmpt (object-named "Canvas") <type>) How can I specify that I want to get the Canvas component type from here: https://docs.unity3d.com/ScriptReference/Canvas.html?

I would like to contribute to the project so I will make some pull requests to extend the documentation based on answers from here, I guess I won't be the only one wondering about these things:)

Vegard Steen
@vegard-st1
Oups, just realized you could send in the generic type Component to cmpts to get back all the components with their types attached.
sogaiu
@sogaiu
nice trick
Paul M. Christian
@meta-meta
Emacs peeps who use Miracle: what are you doing to prevent miracle-mode when working with Clojure? Is it better to use clojurec-mode-hook and stick to .cljc for Arcadia?
Saikyun
@Saikyun
I just change the add-hook call. not the cleanest, but I don't know of a better way
Paul M. Christian
@meta-meta
Ok that's what I've been doing too. I wonder if I can add an arg to runemacs (I'm on Windows) like arcadia=true and only enable the hook when launching for arcadia dev.
Saikyun
@Saikyun
makes sense :) another alternative (albeit a bit more tricky) is if you could somehow find a Arcadia directory when traversing upwards in a tree :)
another semi hacky way might be to leverage custom project types in projectile
if you create a arcadia file in your root directory
and add a custom projectile project type
then you can run eg (projectile-project-info) to get the project type :)
a bit hacky, but I personally like projectile overall, so might work pretty well
Paul M. Christian
@meta-meta
That doesn't sound too hacky. I like it!
Paul M. Christian
@meta-meta
re: Projectile, which dir should Projectile identify as the root for an Arcadia project? Does it change things if I have :source-paths ["Assets/Clojure"] in my configuration.edn?
Saikyun
@Saikyun
personally I'd just put the unity project as the root
you would probably never have jvm clojure code in a unity project either way :)
Vegard Steen
@vegard-st1

Was working for some days on a declarative way of instantiating game objects and components for the unity scene graph and got a basic version working if anyone is interested and find it useful:
https://gist.github.com/vegard-st1/0bc7b04e16438a1e10c3f96b13d88895

Explanation:
The bop! the function takes a hiccup-inspired tree data structure (see examples gos1 and gos2) where the keyword is a version of the UnityEngine names, it optionally takes a map that contains public member names of the classes found in the unity docs, as well as arcadia specific keywords :hooks and :roles taking a collection of the args needed to make either.

bop! returns the list of created game objects to enable easily destroying the objects after.

Next, I'll be working on nested setters for the map syntax and so you could do like :UE.GameObject { :transform/position (v3 etc.) }, for now e.g. the transform component can be re-added at the expense of a unity console warning.

Suggestions for improvements are welcome.
P.S it's very fresh off the press, and I have not done any extensive testing beyond the examples in this file so I would expect bugs to occur if used more extensively:)

Joseph Parker
@selfsame
a fun ArcadiaGodot fix arcadia-unity/ArcadiaGodot#14
Saikyun
@Saikyun
Crisp
Wade Dominic is making blueprints
@groundedSAGE_twitter
Hey! I am currently working on the ClojureScript support for Datahike and am curious as to how much effort would be required to make Datahike accessible to Unity devs. This is a partial question repost from ClojureCLR channel.
Would love to chat with someone about this. Feel free to reach out to me via Twitter.
sogaiu
@sogaiu
@groundedSAGE_twitter off the top of my head, here are some folks who might be good to talk to: @nasser @timsgardner @selfsame @Saikyun (perhaps there are others too, but may be others can chime in about that)
Saikyun
@Saikyun
I don't currently do much in unity, but datahike sounds like a useful project :)
Wade Dominic is making blueprints
@groundedSAGE_twitter
@Saikyun have you done much before with Arcadia? I have questions haha.
Like can you deploy a library that is accessible to people in C# in Unity? Can I use .cljc files? Can I use deps.edn etc?
Depending on the complexity of setting things up and what other nuances there are along the way. We could possibly have full support for Datahike in Unity by end of February/March.
Saikyun
@Saikyun
@groundedSAGE_twitter
you can use clojure clr from C# :)
you can use .cljc files.
there's no (automatic) dependency management afaik. so distribution tends to be through cloning git repos. so possibly git submodules would be your best bet for transitive dependencies.
I have used arcadia actively for ~1 year I think, and have been active in "the community" (this gitter specifically) for two years or so :)
Ramsey Nasser
@nasser
@groundedSAGE_twitter i would not recommend Unity as a development environment unless your goal is to make a Unity game, for ClojureCLR or C#
you can technically do it, but Unity imposes a lot of constraints on your development environment that are only meaningful if youre using Unity directly. like @Saikyun there's no dependency management, among other things.
if you're making a generic C#/ClojureCLR library, you might be better off in a more conventional (non-game specific) development stack? ClojureCLR has its own REPL set up and i use https://github.com/nasser/nostrand, which has differences from ClojureCLR but anything made there should work in Unity
Saikyun
@Saikyun
It seems game engines are getting more popular for alternative used though :) there’s a pixel editor and godot, and I’ve heard anime is made using unreal engine. Though I don’t know which, so I might be off
Pixel editor made in godot*
Ramsey Nasser
@nasser
oh totally, i just mean firing up Unity to do C# work as opposed VS Code and the dotnet CLI tool is much heavier
Saikyun
@Saikyun
Okay, then I get it :) and in that case, clojure jvm would probably make more sense unless there are other .NET libraries one wants to use
Ramsey Nasser
@nasser
and it crates .meta files you have to ignore, and you cant do deps as you said... its fine if you get something in exchange for it (like game dev) but all other things being equal i think its not an ideal place to do pure development.
Saikyun
@Saikyun
At least that’s what I’d do
Right, I can only agree :)
Wade Dominic is making blueprints
@groundedSAGE_twitter
Yes my thinking is two fold. Make Datahike accessible to C# folks, make it accessible to Unity. I understand there is some divergence between the two. If I has to pick I would probably pick Unity variant. So people had Datahike for developing non-game applications in VR/AR etc. Or even games that have lower performance requirements. Which I think casual gaming has also become a huge market.
sogaiu
@sogaiu
one thing to be aware of is that the clojure clr in arcadia currently has features up through clojure 1.9, but not 1.10. so there is no tap> for example. may not be relevant but FWIW