liquid

bvs 2019-01-03T09:37:21.025600Z

@mogenslund - might be doing something wrong when running a compiled version of the latest liquid (lein uberjar 1.0.1-SNAPSHOT, downloaded just now). Getting the following error.

bvs 2019-01-03T09:37:30.025700Z

bvs 2019-01-03T09:38:53.026300Z

the liq.jar on the website works fine (windows 7).

mogenslund 2019-01-03T10:11:09.027400Z

Thank you @bvs It was a bug. I have fixed it now. Please try again.

2019-01-03T10:28:45.030Z

How do I understand / navigate errors? For example, I called editor/new-buffer with no arguments and this gave me "Syntax error compiling at (1:1)." and a stacktrace. Is there a way to inspect the error, to know what caused it (ok, in this case I already know, but in more complicated cases)?

bvs 2019-01-03T10:38:36.030300Z

thanks @mogenslund. Works now!

👍 1
mogenslund 2019-01-03T10:48:40.033600Z

@tom.weissmann I get your point! I have made a new commit where I also extract "cause" from the exception, so the output will be like Syntax error compiling at (1:1). clojure.lang.ArityException: Wrong number of args (0) passed to: dk.salza.liq.editor/new-buffer I was not aware of this field. Now I am happy 🙂

2019-01-03T10:51:20.034100Z

Thanks @mogenslund, I will try it out.

seancorfield 2019-01-03T17:07:03.037500Z

@mogenslund last night I tried Liquid on Windows Subsystem for Linux (running Ubuntu) and it seemed to generate extra line feeds messing up the display. Is that a known issue? I can dig more later if you want me to do some debugging. I also need to try to reproduce on the latest version.

mogenslund 2019-01-03T17:46:32.038100Z

Hi @seancorfield I did not know that. I just tried on a Windows machine and I can reproduce it. It seems like the "real" cursor is not hidden and messes up the display. If you resize the window and type C-g to force a redraw, it will work, due to larger margin avoiding the extra linebreaks. But the "real" cursor is still showing, making the UX poor. I also tried with an alternative console like cmder running wsl inside and there I still need to resize. The "real" cursor is hidden though, but colors are not well supported. If I could find a way to hide the real cursor that migth be a solution.

seancorfield 2019-01-03T19:44:55.038600Z

Ah, interesting. Thanks for digging into that!

mogenslund 2019-01-03T20:39:35.040100Z

A little update @seancorfield. The escape sequences for hide cursor and disable line wrap actually works. But they are reset when the window is resized. So the actual problem is a miscalculation of rows and columns in the window (for some reason?!?). A temporary workaround would be to start liquid with parameters like --rows=30 --columns=100 to "hardcode" the size. Modify the numbers to be as large as possible without getting the issue. Maybe the scrollbar is causing the miscalculation. I will have to investigate.

seancorfield 2019-01-03T21:07:02.040500Z

Thank you! Will play with that a bit tonight.

seancorfield 2019-01-03T21:07:31.040900Z

Does redraw also emit those escape sequences?

mogenslund 2019-01-03T21:32:59.042100Z

No, but maybe it should. I will try that. It is not an expensive operation to do when the whole screen is redrawn anyway.

✔️ 1