Fork me on GitHub
#liquid2021-10-07
>
mogenslund20:10:35

Hi everyone For some time, I have considered, if I should factor all non-JVM code out of Liquid. My original idea was to make the editor work in as many flavours as possible. But in reality only the JVM part works satisfactory. I will keep files as cljc in cases where the namespace is pure host-independent Clojure. With the non-JVM parts removed, I hope it will be easier refactor the code and keep it clean. If, for some reason, we would like some other flavour of Liquid, I think a better approach would be to create a sister-project and reuse some of thecode. I post here before doing the change, in case I have missed something or some of you think, it is a bad idea. Please speek up and discuss.

phronmophobic20:10:28

For context, I use liquid to implement the code-editor for my UI library, membrane (code https://github.com/phronmophobic/membrane/blob/master/src/membrane/components/code_editor/code_editor.clj). Membrane is platform agnostic, so having the platform agnostic parts of liquid seems appealing even though my primary target is currently desktop. In the future, I'd like to better support mobile and web. I'm mostly just using the "model" part of liquid. Not sure if that would be affected by this. What are the JVM specific parts currently? Would that impact the model part (eg. liq.buffer, `liq.util`, liq.modes.clojure-mode, liq.highlighter )?

phronmophobic20:10:56

Also, seems like a good time to say thanks! This library is awesome!

1
mogenslund21:10:05

Thank you. And interesting project. I will have a closer look at it 🙂 I find it escpecially interesting that you use only parts of Liquid. I primarily want to get rid of the reader conditionals. Another way to do that would be to split files into clj and cljs instead of cljc, in cases where the differences are too many. That approach would keep Liquid platform agnostic. Clojure-mode has a single function which uses io and has to be handled differently between clj and cljs. Util I have actually used as some kind of container of functions that differ between the hosts.

phronmophobic21:10:56

I've been using liquid as an idiomatic clojure replacement for something like code mirror.

phronmophobic21:10:31

Just looked at all my usages and I don't think I rely on any of the parts that differentiate between the JVM or other clojure targets.

phronmophobic21:10:07

Just took a closer look. I don't actually use liq.util and the only part of clojure-mode that I use is the syntax data so that I can pass it to liq.highlighter

phronmophobic21:10:56

I've basically been using liquid as a data model for a code buffer and writing my own "view" code.