New scittle release: https://github.com/babashka/scittle/releases/tag/v0.6.16
Update almost a year later: finally upgraded the https://jurjanpaul.github.io/ape-cljs-playground (mobile phone ClojureScript editor) to CodeMirror 6, indeed using https://nextjournal.github.io/clojure-mode together with my new https://github.com/jurjanpaul/codemirror6-parinfer (in TypeScript, but also implemented in Scittle).
very cool!
I guess it's worth a post in #announcements @jurjanpaul502?
Thanks for that nudge @borkdude π π ! I will take that into consideration, even though I donβt consider this such a big deal for the larger community to be honest. Perhaps later this week.
Iβd imagine quite a few people are interested in parinfer for codemirror 6
yeah I think so too. I vaguely remember there was an open issue about this somewhere in the clojure-mode or lang-clojure repo but I can't find it. must have misremembered it
oh maybe it was just this discussion I remembered :)
Agreed that the Parinfer extension is probably interesting to more people than this thrown together application; am planning to share an update in the parinfer channel shortly.
I realise now, although I was aware of the distinction before, that I must first do a much better job of referring to lang-clojure instead of clojure-mode (which I am not actually using). My apologies for mixing them up.
Evaluating cljs reader conditionals is a step forward certainly! But in a twisted way it's also a breaking change... (not to take too seriously!). Loading cljc source code with reader conditionals that were ignored worked in 0.6.15 (iff the remaining code is properly balanced!!), e.g. https://jurjanpaul.github.io/ape-cljs-playground/?code=KGxvYWQtZnJvbS11cmwgImh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS93ZWF2ZWplc3Rlci9tZWRsZXkvMS41LjAvc3JjL21lZGxleS9jb3JlLmNsamMiKQoKKG1lZGxleS5jb3JlL2luZGV4LWJ5IDphIFt7OmEgN30gezphIDN9XSkK&checksum=MTkwODA0MzI4MA%3D%3D but doesn't anymore in 0.6.16 now that the evaluated cljs refers to symbols that are not available in the Scittle context...
Error: Could not resolve symbol: cljs.core/IEditableCollection
medley.core/fn - scittle-tag-2:80:3
medley.core/fn - scittle-tag-2:80:3
clojure.core/fn -
medley.core - :79:1
clojure.core/defn -
medley.core/defn- - scittle-tag-2:79:1
medley.core - :79:1
clojure.core/defn- -
medley.core/load-from-url - scittle-tag-2:79:1
medley.core - :79:1
user/load-from-url - scittle-tag-2:242:1
user - :11:1
Honestly, I don't even know what to ask for... πthat's a pity :) I guess you could fork medley to make it ape-compatible again ;)
Well, Medley (just like all the other libraries) was never meant to be used in this way after all, so having to put in some extra effort to get this to work is totally reasonable. I will have to think about it.
btw, ape is based on codemirror 5 right? it's now pretty easy to get clojure mode working with codemirror 6 directly from JS: https://github.com/nextjournal/clojure-mode?tab=readme-ov-file#use-it-from-npm You can see a bigger example of this in the squint playground: https://squint-cljs.github.io/squint/?src=KG5zIG15ZWxlbWVudAogICg6cmVxdWlyZSBbc3F1aW50LmNvcmUgOnJlZmVyIFtkZWZjbGFzc11dKSkKCihkZWZjbGFzcyBNeUVsZW1lbnQKICAoZXh0ZW5kcyBqcy9IVE1MRWxlbWVudCkKCiAgKGZpZWxkIC1zaGFkb3cpCiAgKGZpZWxkIGNvdW50IDApCgogIChjb25zdHJ1Y3RvciBbdGhpc10KICAgIChzdXBlcikKICAgIChzZXQhIC1zaGFkb3cgKC5hdHRhY2hTaGFkb3cgdGhpcyB7Om1vZGUgOm9wZW59KSkpCgogIE9iamVjdAogIChoYW5kbGVDbGljayBbdGhpcyBlXQogICAgKHNldCEgY291bnQgKGluYyBjb3VudCkpCiAgICAoLnJlbmRlciB0aGlzKSkKCiAgKGNvbm5lY3RlZENhbGxiYWNrIFt0aGlzXQogICAgKC5hZGRFdmVudExpc3RlbmVyIHRoaXMgImNsaWNrIiB0aGlzLmhhbmRsZUNsaWNrKQogICAgKC5yZW5kZXIgdGhpcykpCgogIChkaXNjb25uZWN0ZWRDYWxsYmFjayBbdGhpc10KICAgICgucmVtb3ZlRXZlbnRMaXN0ZW5lciB0aGlzICJjbGljayIgdGhpcy5oYW5kbGVDbGljaykpCgogIChyZW5kZXIgW3RoaXNdCiAgICAoc2V0ISAoLi1pbm5lckhUTUwgLXNoYWRvdykKICAgICAgI2h0bWwgWzpidXR0b24gIkNsaWNrIGNvdW50ICIgY291bnRdKSkpCgooLmRlZmluZSBjdXN0b21FbGVtZW50cyA6bXktZWxlbWVudCBNeUVsZW1lbnQpCgooZGVmIGFwcCAob3IgKGpzL2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IgIiNhcHAiKQogICAgICAgICAgIChkb3RvIChqcy9kb2N1bWVudC5jcmVhdGVFbGVtZW50IDpkaXYpCiAgICAgICAgICAgICAoc2V0ISAtaWQgOmFwcCkKICAgICAgICAgICAgIChqcy9kb2N1bWVudC5ib2R5LnByZXBlbmQpKSkpCgooc2V0ISAoLi1pbm5lckhUTUwgYXBwKSAjaHRtbCBbOm15LWVsZW1lbnRdKQ%3D%3D&repl=true
No Parinfer...
and parinfer worked in codemirror 5?
due to what, was it explicitly implemented? perhaps it's also worth filing an issue about that with clojure-mode then
Yes, definitely, which makes it usable on a phone. Some have started, but so far nobody seems to have succeeded in making Parinfer work in CodeMirror 6. It's definitely my itch to scratch, but haven't prioritized it, also because CodeMirror 6's aim to be extremely flexible also makes it seem rather intimidating. π (And I don't really need it at the moment.)
Shaun Lebron himself made https://github.com/shaunlebron/parinfer-codemirror available for CodeMirror 5.
ok
(cc @andrea712, @mkvlr)
Yes, it would be great if clojure-mode could support it after all (they also started out with parinfer-codemirror: https://nextjournal.com/blog/clojure-mode). Good idea to file an issue.
contributions welcome. None of us use parinfer so itβs not likely weβll build it for ourselves anytime soon.
Thank you, I thought so. π
(FWIW, I also don't use parinfer)
but I can see how it would be easier on mobile. although optimizing a clojure editor for mobile is also a niche probably
Alternative solution: buy a proper keyboard for your mobile :)
(Even when not on mobile, with a keyboard, I still strongly prefer Parinfer over Paredit, but I have learned that I'm in the minority, sadly.)
which Clojure environment/editor are you using?
Sublime Text / Pulsar / Calva 2.0.227 (ancient version with working Parinfer)
(I spent some time trying to get my head around Emacs, and did Vim for a while a few years ago, but I'm just not a key combinations person.)