scittle

borkdude 2024-04-22T12:28:01.078979Z

New scittle release: https://github.com/babashka/scittle/releases/tag/v0.6.16

5
πŸ™ 1
jurjanpaul 2025-03-30T14:38:13.042279Z

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).

πŸ’― 2
mkvlr 2025-03-30T14:45:24.378739Z

very cool!

πŸ™ 1
borkdude 2025-03-30T15:23:36.193139Z

I guess it's worth a post in #announcements @jurjanpaul502?

jurjanpaul 2025-03-30T18:12:21.462889Z

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.

mkvlr 2025-03-30T18:55:28.242679Z

I’d imagine quite a few people are interested in parinfer for codemirror 6

borkdude 2025-03-30T18:56:50.912269Z

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

borkdude 2025-03-30T18:59:28.715789Z

oh maybe it was just this discussion I remembered :)

jurjanpaul 2025-03-30T19:42:47.673479Z

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.

jurjanpaul 2025-03-30T20:38:44.951969Z

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.

jurjanpaul 2024-04-23T09:21:01.946229Z

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... πŸ™‚

borkdude 2024-04-23T09:22:39.292379Z

that's a pity :) I guess you could fork medley to make it ape-compatible again ;)

jurjanpaul 2024-04-23T09:29:23.345129Z

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.

borkdude 2024-04-23T09:31:30.314469Z

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

jurjanpaul 2024-04-23T09:32:03.130689Z

No Parinfer...

borkdude 2024-04-23T09:32:29.228879Z

and parinfer worked in codemirror 5?

borkdude 2024-04-23T09:40:31.302069Z

due to what, was it explicitly implemented? perhaps it's also worth filing an issue about that with clojure-mode then

jurjanpaul 2024-04-23T09:40:41.479869Z

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.)

jurjanpaul 2024-04-23T09:42:12.935719Z

Shaun Lebron himself made https://github.com/shaunlebron/parinfer-codemirror available for CodeMirror 5.

borkdude 2024-04-23T09:43:10.177509Z

ok

borkdude 2024-04-23T09:43:24.678759Z

(cc @andrea712, @mkvlr)

jurjanpaul 2024-04-23T09:44:11.351299Z

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.

mkvlr 2024-04-23T10:06:52.149009Z

contributions welcome. None of us use parinfer so it’s not likely we’ll build it for ourselves anytime soon.

jurjanpaul 2024-04-23T10:08:11.331119Z

Thank you, I thought so. πŸ™‚

borkdude 2024-04-23T10:08:28.073239Z

(FWIW, I also don't use parinfer)

borkdude 2024-04-23T10:08:45.214149Z

but I can see how it would be easier on mobile. although optimizing a clojure editor for mobile is also a niche probably

borkdude 2024-04-23T10:09:10.933149Z

Alternative solution: buy a proper keyboard for your mobile :)

jurjanpaul 2024-04-23T10:11:38.562589Z

(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.)

borkdude 2024-04-23T10:12:04.889289Z

which Clojure environment/editor are you using?

jurjanpaul 2024-04-23T10:13:09.023639Z

Sublime Text / Pulsar / Calva 2.0.227 (ancient version with working Parinfer)

jurjanpaul 2024-04-23T10:17:46.765899Z

(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.)

πŸ‘ 1