Hello, guys! Do u know how can I bind out to a file?
Something like this what you are looking for?
(binding [*out* (joker.os/create "TEST.txt")] (println "hi"))
π I think so. Let me try
Unable to resolve symbol: joker.os/create
Did you try that from the REPL or in code?
in code
i'm trying to upgrade joker right now
Oh, might need to (require 'joker.os)
or something first.
'cause even from command line it gives this error:
joker -e "(joker.os/create \"bla.txt\")"
<expr>:1:2: Parse error: Unable to resolve symbol: joker.os/create
What Joker version are you using?
it was 0.12.4
it worked now
with 0.13
Hmm, thatβs fairly recent. joker -e "(joker.os/create \"bla.txt\")"
works for me on v0.13.0.
Oh, interesting.
Good!
thank u very much
Is this PR something that people would use? https://github.com/candid82/joker/pull/294
It might be a use case for me since i really on html->hiccup conversions
I think I'm just not sure about the name
Why not just joker.hiccup
That would imply it's a direct port of hiccup and it's not.
Would it? I feel I've seen many Clojure libs suggesting they support Hiccup syntax, without using Hiccup's implementation. Maybe @weavejester should be involved. But I feel at this point Hiccup stands as much for the DSL, as it does its implementation. At any rate, it's a minute detail. I'll be happy to just have the functionality availaible whatever the name. I just find markup makes me think markdown, mediawiki, org, html, and other. Not neccesarily hiccup.
Another little comment. Are you string escaping by default like in Hiccup 2 or not like in Hiccup 1 ?
As backing up, Rum mentions supporting Hiccup syntax. Same for Reagent. Also, wouldn't you want to eventually update the implementation to support macro compiled Hiccup for better performance? Which means it will slowly tend to something much closer to being a port of Hiccup?
Maybe I'd suggest joker.html-template
That way it's not confusing thinking this is a full direct port of Hiccup, but it's also clear that it's for html templating, and not utilities related to markup languages like markdown, org, etc.
I think we can move this discussion to the PR on GitHub. I'm happy enough to fiddle with the names and such, that's not a big deal.
Cool, I'll make a comment there, see what other think