I see reveal has now supports the slash and the F key for search, but the README is still referring the previous version, which doesn't. https://github.com/vlaaad/reveal/commit/18e197151374ccdb9863b548f41eb0f6793a60c8#diff-0e526e66087bcd1211d489821e83b36dR193-R198
I see that the clojars badge shows the latest version, but since it's not possible to copy from there, I usually pick the version from somewhere else in the README. Since your README do mention it elsewhere, I just copied that command:
clj \
-Sdeps '{:deps {vlaaad/reveal {:mvn/version "0.1.0-ea22"} nrepl {:mvn/version "0.6.0"}}}' \
-m nrepl.cmdline --middleware '[vlaaad.reveal.nrepl/middleware]'
It's awesome that you provided this, because I could very easily try it.
It took a bit more effort to figure out how to make it work from Cursive, by adding the middleware to a .nrepl.edn
file:
{:bind "0.0.0.0"
:port 5555
:middleware
[vlaaad.reveal.nrepl/middleware]}
maybe it would worth mentioning this in the README too, just broaden the pool of ppl who can try reveal with the lowest possible effort.
@vlaaad while you are at it, maybe you can upgrade the nREPL version to 0.7.0
if reveal works with it, since it came out on 2020-03-28 alreadyhi @onetom! I'm planning to release reveal 1.0 soonish and I'll update all the readmes for that occasion. By the way, I use socket repl in cursive (I create run with clojure.main instead of nrepl, it works just as fine, but simpler). Anyway, thanks for example for people that use nrepl with cursive, I'll add it to the readme closer to 1.0 release.
ah, okay then. thx for getting back to me. it's very exciting! π
i think the only reason im using the nrepl with cursive is the test integration support, which doesnt work over a socket repl
why do you think I should update to nrepl 0.7.0? nrepl is a runtime dependency, it's not mentioned at all in published artifacts, and is accessed only when requiring vlaaad.reveal.nrepl
namespace
i just meant to upgrade it here:
clj \
-Sdeps '{:deps {vlaaad/reveal {:mvn/version "0.1.0-ea22"} nrepl {:mvn/version "0.7.0"}}}' \
-m nrepl.cmdline --middleware '[vlaaad.reveal.nrepl/middleware]'
ah, yes, that makes sense!
thanks, I'll do that for initial release
i haven't noticed any other reference to nrepl π
i also filed this issue: https://github.com/vlaaad/reveal/issues/6 i was not sure if it's better to ask here or have an issue for it, though it's not a bug
oh, the latest version number seems odd: 0.0.1-ea23
was it not supposed to be 0.1.0-ea23
?
@vlaaad do you have any plans for limiting the number of elements printed?
cursive has just recently introduced a way to interrupt not just the evaluation of the latest expression but also the printing of it too.
it would be great to have something like that.
alternatively - since reveal runs in the application's process, unlike cursive - you have access to the *print-length*
dynamic var and maybe you can use that to limit the number of printed elements.
then it's not so important to support the interruption of printing
hmm... i can't turn off antialiasing π
im using a 2K display and 16px https://github.com/kika/fixedsys looks absolutely sharp and very readable, because it's also quite a bold typeface,
but i can't seem to convince javafx not to do antialiasing.
i've added the following to style.clj
:
(css/register ::main
{".text" {:-fx-font-smoothing-type "lcd"}
".reveal"
and also specified -Dprism.lcdtext=false
as some stackoverflow articles were recommending.
in font.clj
i changed this too:
(.getStrike BaseTransform/IDENTITY_TRANSFORM FontResource/AA_LCD)
but I guess it doesn't matter, since it's just getting the width of the "a" character.it was a mistake
it should be 0.1.0-ea23
just to give some idea of the kind of blurriness im talking about, here is a little screenshot
I think style.clj applies only for ui like popup, output panel is hand-crafted
i have the fear that this might not be supported at all, based on this recent comment on a related issue after 6 years: https://bugs.openjdk.java.net/browse/JDK-8092207?focusedCommentId=14293616&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14293616
intellij allows turning off antialiasing as it can be seen on my screenshot, but i have the feeling that they are still using swing probably
i remember i was trying the nightcode dude's embeddable vim clone and it suffered from the same blurriness issue. i think he was also using javafx
but in his case the whole scene was also configured to do some smoothing. i read it somewhere that the trick to get sharp is to apply a 0.5px 45degree translation to the whole scene
this reference documentation doesn't seem to have anything about turning antialiasing off either: https://openjfx.io/javadoc/11/javafx.graphics/javafx/scene/doc-files/cssref.html
Just checked the way I draw output (using javafx canvas) β it has option for text anti-aliasing, which is the same FontSmoothingType and also can't be turned off
i found 1 thing which allows disabling some kind of smoothing, but not sure where and how could i hook this in: https://docs.oracle.com/javase/8/javafx/api/javafx/scene/SceneAntialiasing.html
hmm, it says that's about 3d shapes
@vlaaad but tell me, am I unreasonable to expect this to work? based on my screenshot, isn't the difference immediately obvious and annoying?
i have a 5k display at work; maybe on that one i wouldnt care, but the 27" 2K display and the 32" 4K i have at home, the pixels are visible by the naked eye and i would rather have sharp font even at the cost of shape fidelity
It's super annoying!
it strange javafx devs decided to not implement it
have u found any more solid proof of that, other than that bug comment above?
well, the FontSmoothingType enum has only LCD and GRAY values, and Canvas docs say tht setting smoothing to null is ignored
https://bugs.openjdk.java.net/browse/JDK-8220150?jql=project%20%3D%20JDK%20AND%20affectedVersion%20%3D%20"14"%20AND%20text%20~%20"font%20anti-aliasing%20off"
> The component that has the problem is displaying the text using B&W (aliased) font rendering. > No one uses this any more. Swing L&Fs have since 2006 picked up the desktop settings for font smoothing. ... > This does need a fix i can't really make sense of this conversation yet π
it says it's fixed in javafx version 15
you will need java 11 for that... you cna try setting javafx versions explicitly to 15
current version (14 for java 11) is picked up from cljfx
aaah, i see! thanks, i will give it a try!
I had that setting mentioned in the bug report:
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
...probably left over from Mojave.
If i remove it with defaults delete -g CGFontRenderingFontSmoothingDisabled
, i get a lot less blurry result.
I've upgraded cljfx to 1.7.4 but that probably doesn't make a difference.it's usable enough now; thanks a lot for the debugging!
np!
btw, u forgot to push your tags probably: https://github.com/cljfx/cljfx/commit/1.7.4
I donβt know why clojars shows that link :thinking_face:
hmm no, it's there on github, but the url is different: https://github.com/cljfx/cljfx/tree/1.7.4
the 1st url is what i got from https://clojars.org/cljfx when i clicked on ":GitHub: cljfx/cljfx"