joker

Discuss all things joker, the Clojure interpreter/linter on top of Go. https://github.com/candid82/joker
borkdude 2019-10-18T07:46:21.005900Z

@hlship actually I have been considering EDN (Hiccup) -> HTML conversion for jet (https://github.com/borkdude/jet), I think it's a natural fit

borkdude 2019-10-18T08:53:50.007Z

In this branch: https://github.com/borkdude/jet/tree/hiccup I've now got:

$ ./jet --from html <<< '<p><span>hello</span></p>'
[:p {} [:span {} "hello"]]

$ ./jet --to html <<< '[:p [:span "hello"]]'
<p><span>hello</span></p>
Not sure if that's useful or if I should make a distinction between hiccup and hickory 🙂

borkdude 2019-10-18T08:54:34.007600Z

(continuing here: https://github.com/borkdude/jet/issues/49)

jcburley 2019-10-18T19:51:43.010Z

FWIW, today I upgraded my two main development machines (amd64-linux and amd64-darwin) to Go 1.13 (.3 and .1, respectively), and have had no issues so far -- Joker tests all pass, both for master and for my gostd fork. Also, I added Joker and Go version info to the top-level index pages for each architecture (Windows TBD, as I use that machine only weekly usually) for the gostd fork's documentation: https://burleyarch.com/joker/docs/

borkdude 2019-10-18T20:35:33.010200Z

what's gostd?

jcburley 2019-10-18T21:18:09.010400Z

It's my own fork, which adds a component that autowraps much of the Go std for (kludgy) access via Joker code.

hlship 2019-10-18T23:10:51.012100Z

Mostly I've been writing one-off scripts in Joker; but there's a couple of things I'd like to put in a library (i.e., I have two scripts that live in the same folder, it would be nice if I could factor out some code into a common file also in that folder). Not stuff that should be packaged with Joker itself. Without going to the code (I don't really read Go) where does require search for libraries? Is there a way to modify that?

👍 1
jcburley 2019-10-18T23:20:22.012300Z

There's a writeup here: https://github.com/candid82/joker/blob/master/docs/misc/lib-loader.md

jcburley 2019-10-18T23:24:54.012600Z

There's also this little hidden/undocumented "gem", from awhile back, that might still work -- though I haven't looked at how this all interacts since the above stuff was implemented:

user=> (joker.repl/print-doc (meta (var joker.core/*classpath*)))
-------------------------

  A vector of the classpath elements as configured by --classpath or
  the JOKER_CLASSPATH environment variable.

  Use colon-delimited <cp> (semicolon-delimited on Windows) for source
  directories when loading libraries via :require and the like (but
  not load-file). An empty field denotes the directory containing the
  current file being loaded, with zero or more trailing components
  removed as determined by the number of "." separators in the current
  namespace; or, if no file is being loaded, the current
  directory (this is original Joker behavior); a '.' (period) by
  itself denotes solely the current directory. Defaults to the value
  of the JOKER_CLASSPATH environment variable or, if that is
  undefined, the empty string (denoting a single empty field). The
  resulting classpath is stored herein, and this variable is used (in
  lieu of command-line arguments or environment variables) for all
  pertinent subsequent operations.
nil
user=>