Fork me on GitHub
#clojure
<
2024-06-08
>
mx200005:06:38

I am looking for co-creators for the clojure rpg project I am working on.... If anyone is interested let me know, also willing to give an introduction to the codebase ... Because I'm kinda stuck at the project, so looking for some new input/perspective 😎 Let's create something amazing together! 🧙🪄 https://github.com/damn/Cyber-Dungeon-Quest

Eugen13:06:33

sounds super fun 🙂 , but personal reasons prevent me from taking on a new project. I do enjoy Cataclysm https://github.com/CleverRaven/Cataclysm-DDA . You might be able to take some inspiration and also some game data /graphics from the game - being open and all.

mx200013:06:09

But it's not in clojure

mx200013:06:24

Let's start a clojure open source game project with a group of people

mx200013:06:07

It can also be a new project

mx200013:06:12

Would be cool

Eugen13:06:14

I know CDDA is not in clojure, but the data is JSON and graphics are PNG / jpeg and with an open license

Eugen13:06:32

and also you wanted some inspiration

Eugen13:06:41

CDDA is pretty complex

mx200013:06:01

You're right! I'll check it out

mx200013:06:16

The data is also very interesting to see how it models an rpg

Eugen13:06:44

also world generation is important

m3tti16:06:51

just curious is there something like parenscript in clojure and no i don't mean clojurescript. Just some kind a lib that generates js code on the fly in for example a ring middleware.

m3tti16:06:28

yeah i know squint and all that but its basically just another transpiler 😄 if you take a look into parenscript it does it more or less on the fly. Like imagine having a ring or http-kit application and you could write js in there like you do html in hiccup. Just that the code you have to write for js is clojure in that case.

👍 1
hifumi12320:06:19

I've used parenscript before. Squint is pretty much the Clojure equivalent of it. See https://github.com/squint-cljs/squint/blob/main/examples/babashka/index.clj

❤️ 1
hifumi12320:06:09

This example does exactly what you want -- Ring handler transpiles Clojure to JS and serves to the client. This is virtually identical to how one uses Parenscript in Common Lisp

👍 2
didibus21:06:50

If you don't want to transpile, you can use sci and send Clojure code to be evaluated by sci in the browser. Otherwise there's no way to do what you want without transpiling...

borkdude11:06:33

Yes indeed. Perhaps @U03DKF57E0M has the idea about "transpilation" that this is a file -> file transformation vs "on the fly" -> compile a form to a JS expression, but squint supports both things and works in the JVM and JS

💯 1
❤️ 1
m3tti11:06:40

Once again guys exactly what i was looking for didnt knew that squint works in jvm

m3tti13:06:10

https://github.com/aiba/squint-hiccup-example is it something like that right? But why do he need squint core ?

borkdude14:06:33

I’ll get back to you in 30 minutes

borkdude14:06:47

He needs squint core because he uses something from the core library, like for and doseq

borkdude14:06:57

if you just stick to plain interop you won't need core, probably

borkdude14:06:03

you can avoid core by adding {:elide-imports true} to your options

borkdude14:06:53

user=> (sq/compile-string "(+ 1 2 3)")
"import * as squint_core from 'squint-cljs/core.js';\n(1) + (2) + (3);\n"
user=> (sq/compile-string "(+ 1 2 3)" {:elide-imports true})
"(1) + (2) + (3);\n"

m3tti15:06:27

Interesting BUT its exactly what i was looking for thank you once again very much