off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
indy 2021-06-30T18:00:12.071700Z

Looking for resources for designing a source code editor. Are there any general principles that apply or are the implementations and architecture always platform dependent?

phronmophobic 2021-06-30T18:02:10.072300Z

@kslvsunil, check out https://github.com/mogenslund/liquid

phronmophobic 2021-06-30T18:03:08.074100Z

Not sure what you mean by platform dependent, but I think most source code editors run on multiple platforms

phronmophobic 2021-06-30T18:05:00.077700Z

https://codemirror.net/ is also worth checking out. It's written in javascript, but it's written in a fairly functional style.

indy 2021-06-30T18:05:45.078800Z

Looking for relevant research papers, books, etc. I know there are multiple open source editors but before I start scanning them, I would like to know if there are any general principles that all code editors share? For say syntax highlighting, indexing the code, cursor and selection handling and so on.

indy 2021-06-30T18:12:28.086Z

Thanks @smith.adriane, I’m aware of Codemirror and it’s sibling Prosemirror (I work with prosemirror at work). Prosemirror’s API and design seem fairly generic and platform agnostic, by which I mean, the EditorState and EditorView abstractions can serialise to possibly other formats than HTML. What I’m interested is in knowing if there is a “standard” way to go about designing code editors.

phronmophobic 2021-06-30T18:14:40.086300Z

I needed to make a code-editor component for my UI library and from what I could tell, the "standard" way is to start with codemirror/intelliJ and go from there

indy 2021-06-30T18:18:08.089700Z

Hmm, I want to employ the Apple Pencil, the API for which is only available via Swift/ObjC. So JS/Java runtimes are ruled out :/

phronmophobic 2021-06-30T18:20:58.091600Z

I'm not sure I'd recommend it, but it's at least possible to run JS/JVM code on mobile and interop with ObjC

indy 2021-06-30T18:21:18.092100Z

CotEditor is the only decent starting point in the Swift land

indy 2021-06-30T18:22:50.093600Z

Yeah even if I could patch the runtimes somehow, the performance and user experience will be very much degraded

sova-soars-the-sora 2021-06-30T18:38:27.093900Z

Multiple buffers is smart (Emacs) Syntax highlighting... yeah that's an important one. Emacs also has the "undo tree" which is amazing and you can walk through code changes in a tree-like fashion. Directory/file viewer... Ability to know when a file is changed from the on-disk copy...

sova-soars-the-sora 2021-06-30T18:39:31.094100Z

Darn, using the apple pencil would be pretty awesome. Are you sure there's no way to get it in Java land?

indy 2021-06-30T18:50:55.096300Z

Yeah editing lisp code with Apple Pencil will feel really natural I think. A sneak peak of my pondering.

😮 1
indy 2021-06-30T18:53:10.098400Z

The Apple Pencil experience is really smooth, I’m afraid it demands a native runtime for a highly quality experience.

phronmophobic 2021-06-30T18:53:28.098600Z

fwiw, I was recently able to compile clojure with graalvm native image to run on my iPhone including evaling clojure code with sci.

phronmophobic 2021-06-30T18:55:37.100600Z

for your lisp editor, how would you input code, normal keyboard or did you have something else in mind?

indy 2021-06-30T18:58:22.104400Z

Yeah I did follow those conversations and I’m really excited about it. Embedding a Clojureish runtime in iOS is very exciting. I really hope it becomes a thing since I don’t want to compile Clojure code remotely from my iPad, if this editor ever takes any shape.

indy 2021-06-30T19:00:26.107600Z

The lofty goal is to input everything from the Pencil. Apple has this scribble API for OCR which is good, but doesn’t recognise symbols yet but that could be tackled via the raw pencil input I think.

🤯 2
phronmophobic 2021-06-30T19:02:28.108600Z

very cool!

antonmos 2021-06-30T19:08:13.108900Z

PSA: if you don't enjoy telling someone else what to type during Agile Story Grooming/Refinement, please vote for this jira issue https://jira.atlassian.com/browse/JRACLOUD-73885

antonmos 2021-06-30T19:08:29.109Z

if you are twitter famous pls retweet https://twitter.com/antonmos/status/1409553434487967748

2021-06-30T22:32:02.112400Z

deal breaker: there should never be a way of losing any significant amount of work, even if your power suddenly goes out (so you need some kind of incremental / auotmatic backup scheme). there are great editors that I would use except I refuse to use an editor that doesn't prevent losing my work.

1
2021-06-30T22:33:32.112600Z

we shouldn't have to explicitly save our files for any reason other than trying out new code - everything else should be implicitly managed by the editor between explicit saves