Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Le-Brut
@Le-Brut
It could be that I am using the latest version of company which introduced some incompatibility, but I get a feeling that it's rather because my clj files simply aren't getting loaded by Arcadia. I have a file Assets/tryload.clj where I define a namespace https://pastebin.com/6VLkR4tY, then restart unity, start player, do (in-ns :game.test-autoload) in the repl and get this error https://pastebin.com/8w8YgMGr
I then tried adding Assets/configuration.edn with: {:source-paths ["Assets/src"]} and Assets/src directory with some clj files (and a project.clj) defining their own namespaces, adding some (LOG "test") calls, hook+ on a camera, but none of those seem to have any effect. Since plain eval-defun works, I am pretty sure at this point that none of the files are simply getting loaded.
If that makes any difference, I am on Arch Linux, don't have any dashes in the filenames and tried Arcadia -> Clean All.
sogaiu
@sogaiu

not sure how helpful this is, but shouldn't the following:

(ns game.test-autoload (require [arcadia.core :refer :all]))

be something like:

(ns game.test-autoload
  (:require [arcadia.core :refer :all]))

?

i.e. :require instead of require

Le-Brut
@Le-Brut
@sogaiu you are right, let me try that instead : )
sogaiu
@sogaiu
also, i may be wrong but the in-ns form doesn't look quite right to me.

i think you might want:

(in-ns 'game.test-autoload)

or something

Saikyun
@Saikyun
what sogaiu says is correct :)
when it comes to clj files being loaded, you must either have a game object with an init hook, or you have to manually load files (e.g. using load-file). then if you require something from that ns (using :require), it will be loaded as well :)
here's some info on a hook that'll automatically start loading your code when arcadia starts: https://github.com/arcadia-unity/Arcadia/wiki/Using-Arcadia#storing-a-start-hook-in-the-scene
Le-Brut
@Le-Brut
Thanks, guys, my assumptions about loading were getting me really confused here!
Completion is still erroring out on me tho, but at least I know the library is working: https://pastebin.com/z3gef4t1
@Saikyun maybe I could try older emacs and company, which versions do you have?
Saikyun
@Saikyun
@Le-Brut I remembered now that I had some extra stuff in my emacs config... ^^; feel free to try it out: https://gist.github.com/Saikyun/cb8f916751ffb1977790ed594f900d4d
I'm very sorry that the installation is this messy. I haven't used miracle in a while. I'll add that to the readme as well
oh now I see, it was already in the readme, but further down: https://github.com/Saikyun/miracle#for-autocompletion-use-the-following-thanks-sogaiu
I restructured the readme a bit, so hopefully it's easier to see the part about autocomplete configuration now :)
Le-Brut
@Le-Brut
Oh, I had that in my config : ) Except for the miracle-eval-wrapping-sexp part (btw start-of-sexp is not part of emacs, I think) and I had company enabled. After some testing, I can say that the actual completion engine actually seems to function, as emacs receieves the list of completions! Which I think is good news (see https://pastebin.com/MLWw1yQ8 for details.) I have a feeling there was some breaking change in either emacs 27 or company mode, so I am gonna go test that now.
Saikyun
@Saikyun
whoops, miracle-eval-wrapping-sexp shouldn't be there, osrry ^^;
ah, I see. I'm using emacs 26.3 fwiw
it's worth mentioning you might have more luck using cider :) though I think making more extensions is easier with miracle (since the codebase is small)
Le-Brut
@Le-Brut
Yeah, I read some of the discussions here, miracle.save vid looked nice if that's the kind of extensions you are talking about : ) The qualities of a small code base are always appreciated. I haven't figured out if cider got completion yet, I think @Tko1 was working on that though.
Saikyun
@Saikyun
yeah exactly :)
miracle.save is one of the things I've kept developing during most of my time with clojure
Le-Brut
@Le-Brut
oh, man, I didn't have to go through the trouble of testing emacs 26 after all : D It turned out to be the lexical binding declaration. And all well and good, when I saw your gist and moved the code to a seperate file with the added a declaration, I forgot to remove a possible "fix" I applied beforehand along w/ my debug code. I removed all that and now the completion is working!
Saikyun
@Saikyun
Aha, good to know :) nice that you got it working!
Le-Brut
@Le-Brut
Thanks for the help!
Jason Chandler
@jason-chandler_gitlab
@selfsame Ah man, you got the file watcher up. That is so cool! Thanks for your work with Godot. I was struggling with my own ClojureCLR stuff for it. Seemed to crash every time I used proxy or reify. Your Arcadia port already makes it much more pleasant to work with.
Joseph Parker
@selfsame
@jason-chandler_gitlab yep! lots of work on ArcadiaGodot lately, feel free to open an issue if you run into any problems
Jason Chandler
@jason-chandler_gitlab
Will do, so far so good though!
sova
@sova
supercool
Jason Chandler
@jason-chandler_gitlab
Definitely. If you guys aren't entirely committed to Unity, it's worth a look.
Saikyun
@Saikyun
how's the support for clojureclr + godot + mobile/web?
Jason Chandler
@jason-chandler_gitlab
Ah I gave it a try and it fails with an obscure error on web about not being able to instantiate Clojure IFn or something similar.
During the compile it gives a warning that the Microsoft.Scripting and Clojure Assemblies were not able to be included, so I may not be including them correctly
I plan to keep experimenting with it. If I put a demo of a game up that requires a download, it just gets way fewer clicks than if the demo is available right there in the browser on itch.io
Saikyun
@Saikyun
ah right. maybe DLR isn't supported on the web with godot either
Jason Chandler
@jason-chandler_gitlab

Yeah, that's probably the case. But I didn't really want to give up just yet since I don't know how other assemblies go from C# -> C++ -> Emscripten.

Maybe someone with more experience already knows it's not possible though. Tag me if so.

Jason Chandler
@jason-chandler_gitlab

Scratch that last comment, I was mixing up CLR/DLR.

Anyway, I just hope that Unity's IL2CPP is what's messing up ClojureCLR on its way to webassembly and not something else. Then there'd be hope for web on Godot sooner.

sova
@sova
have any of y'all pushed games to Steam? was it pretty painless?
Jason Chandler
@jason-chandler_gitlab
Yeah, my brother and I pushed one Unreal game to Steam. It was pretty easy. They have these boxes for you to check so that it gives the user the right C++ runtime and all that.
It just takes a while for them to respond and since it takes a few steps you end up constantly checking your email to see if you're approved for the next one.
Nothing too bad. I don't think you will mind it.
sova
@sova
Awesome!
Jason Chandler
@jason-chandler_gitlab
Are you posting an Arcadia game? I haven't looked too hard for anyone that's used it just yet.
I'd be interested to see it either way! We don't do a ton of progress sharing around here, but I'm always anxious to see
Saikyun
@Saikyun
re: unity il2cpp -- in that case it's because unity's il2cpp doesn't support DLR :) iiuc one of the main benefits of MAGIC is that it doesn't depend on DLR. perhaps MAGIC will be useful for godot as well :)
Jason Chandler
@jason-chandler_gitlab
Oh I didn't know that. That'd be great! I do really like Unity and the main Arcadia, but my brother has been obsessed with Godot lately.
Jason Chandler
@jason-chandler_gitlab
The interface makes it really easy to combine our code even though his is in GDScript too, so it's looking like we'll probably stick with it a while
Ramsey Nasser
@nasser
working on MAGIC rn to make the whole compiler easier to use, especially the IL2CPP stuff!
also working towards .NET Core support, fingers crossed