Closed bobbicodes closed 11 months ago
I also tried to address #15 but I might have actually made it worse. It's confusing keeping track of evaluations and cursor positions between the 2 editors.
The idea is to create a stronger separation between the code editor and the test editor. But it's still not quite right.
Uses the printer from the MAL project. Started porting things from clojure.pprint to learn how to make it better.
This led me to implement a print buffer, which is prepended to the eval output, so now we can do stuff like this:
The print buffer is used by
pr
,prn
,print
andprintln
, so their arguments are rendered along with the evaluation output without affecting the return value.The biggest drawback of this pretty printer is that it always prints 1 item per line for seqs, and 2 for maps. But this is an improvement over the previous behavior which had the opposite problem, where the output was all on one line which pretty much always required horizontally scrolling the editor to see the result.