by maxwelljoslyn · 4y ago · 0 comments
I know Python best. But I have reached my breaking point with its syntax, and its lack of binding constructs, and lack of symbol datatype, quote, etc. I am intending to use Clojure ... but I have to ship this thing by May 2023 come hell or high water.
All else being equal, I will proooobably be able to go further with Python. But I'm concerned it will hamstring me from doing the crucial feature of "extending the design [ie code] of a game as it runs" since, AFAIK, it's difficult to get a Lisp-ish experience of total live reloadability in Python... jurigged[2] and reloading[3] not withstanding.
I know some common lisp so I'm not a total lisp noob. I've learned enough CLJ to be dangerous ... but I'm worried I'm backing myself into an endless hole by using a language I'm not yet master of. Yet, I think the features of the ecosystem (total live reloadability of a CLJ/CLJS app! with current state preserved even down to what a user has typed in the HTML UI!) are so tempting...
Just venting out loud. comment/contact if you have suggestios or are curious about the project; i'm soon to begin blogging as I develop it.
[1] I'm reinventing the "virtual tabletop." Current ones are so fucking shallow. [2] https://github.com/breuleux/jurigged [3] https://github.com/julvo/reloading
A big part of the value proposition is access to the entire JVM and JavaScript ecosystems. Bindings will be available for the more popular libraries, and if there aren't, well, Clojure is designed to make that easy.
It might not be pretty, it might not be idiomatic, but you're never going to hit a wall where "oh, if only I was using a popular language, I'd be able to do $obscure-thing". $obscure-thing is available for the JVM.
Also, for anyone interested, Casey Muratori implemented such a system (though very simple) on C for his Handmade Hero game. It works by reloading a dynamically linked module on every frame. It's a model that should be adaptable to any compiled language.
There doesn't seem to be a good GUI framework for Clojure. There was Seesaw but it hasn't been updated since 2019 (no maintainer). There is a guy developing a new framework https://github.com/HumbleUI/HumbleUI/ but it's WIP. I guess you could sidestep this by making it a webapp and using figwheel + web framework of choice.
My project will definitely be a web app -- I'm most familiar with web dev, plus I'd much rather be able to point someone at a URL and say "here's the thing try it out" and have that happen in 5 seconds instead of dancing the installation mambo.
Thanks for the pointer to figwheel -- that looks like hot stuff and just what I need for end to end server/client interactive dev!
>but I have to ship this thing by May 2023 come hell or high water.
Do you feel that you have to start working today in order to meet the deadline, or you can put a couple of weeks aside to develop your skill in whichever other language you'd like would be more adequate.
coupling clojure with python sounds like a drag, even using graal i dont think this will be easy. but janet you could bind as a dll and eat your cake while having it as just recently FFI was added. if you are interested, i can probably help a little as im working on an integrated (game)development repl myself. not sure how to classify what im working on but i think its close to your domain as i want to change my hotloop during runtime from the repl and from inside the running game. i just wrote you an email.
EDIT:
ah, just now read that you want to make this a webapp, in that case being closer to the metal isnt really helping, so nevermind ^^
This makes it one of the languages of choice for auxiliary scripting a big system, like a game or an application. (The other common choice is Python, and nowadays also JavaScript.)
Anything else, it is relatively awkward at.