squint

Takis_ 2025-01-31T10:17:15.398249Z

I found a Lisp in python called Hylang, that has 2 important things 1. its interop with python is great, we can use all python libraries/frameworks directly(similar to squint) 2. with hy2py we can get readable python code if we avoid some hylang things like use setv instead of let etc we don't even see auto-generated variable names, code is exactly as written in python (if we use macros, its even simpler we can make wrappers that no-one see them, in the generated code) Clojure is nicer than writing JS in LISP syntax, but if JS generated code is readable we can get JS job, even if we write Squint, like having both options, when we need readable JS code to write JS like lisp, else we can write Clojure like code. Don't know if this is good idea or easy to make i say it mainly for jobs.

Chris McCormick 2025-02-06T00:30:20.112689Z

One problem is once you have py/js code if somebody else edits it then you have to transpile it back. I have a couple of old codebases written in Hy and I regret it because the language was not very stable in the past and those functions are not easily portable to cljs which is what I'd use today.

pez 2025-01-31T10:37:12.323839Z

Maybe instead of squint for this, an extremely targeted LLM. They are good at transpiling, to my experience.

Takis_ 2025-01-31T13:15:01.994839Z

maybe but its hard to trust it, i don't really know, hylang does it somehow, so maybe it can be done in JS also, the main for me is the jobs, to not have to ask, can i use clojure...

pez 2025-01-31T13:17:47.984719Z

I love the use case.

2025-01-31T18:59:08.449289Z

Isn't squint already that?

Takis_ 2025-01-31T19:13:51.739539Z

as far as i tested generated JS code is closer to handwritten JS code, but sitll far from it, i think to make this possible we need to have Clojure like functions and JS way also to do the same things. I guess it needs alot of work i just said it, because i saw it in Hy and seems useful.

2025-01-31T19:39:27.063749Z

Ah, you mean like, just all operators and functions, excatly JS, but represented in s-expr syntax?

2025-01-31T19:40:10.557259Z

Is that really beneficial? Why not just write JS then? Or it's more to be able to embed it inside a Clojure source file without having to use strings?

Takis_ 2025-01-31T19:43:13.294069Z

its beneficial to write JS in Lisp syntax at least even if its not nice as Clojure