Fork me on GitHub

@hlship actually I have been considering EDN (Hiccup) -> HTML conversion for jet (, I think it's a natural fit


In this branch: I've now got:

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

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


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:


what's gostd?


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


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?

👍 4

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.


What would work best for me would be, when loading via /usr/bin/env, it would look at the script, follow it if it's a link, and add that directory to the classpath.


But that's a bit specific to add.


There's probably plenty of room for improvement, in Joker docs if not also code/features, in this area. We'll likely get more input re requirements as more people us it more widely and beyond linting.


Maybe supporting a hook or something in the require/load mechanism would help?