This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-08
Channels
- # adventofcode (60)
- # announcements (3)
- # babashka (31)
- # beginners (5)
- # boot (1)
- # calva (13)
- # cider (9)
- # clj-kondo (1)
- # clojure (135)
- # clojure-italy (18)
- # clojure-nl (18)
- # clojure-spec (21)
- # clojure-uk (11)
- # clojuredesign-podcast (1)
- # clojurescript (47)
- # core-async (14)
- # emacs (7)
- # euroclojure (4)
- # fulcro (3)
- # graalvm (19)
- # off-topic (22)
- # reagent (29)
- # shadow-cljs (25)
- # vim (3)
bb 0.0.39: add console REPL https://github.com/borkdude/babashka/releases/tag/v0.0.39
Another cool blog post on CLIs: https://lambdaisland.com/blog/2019-12-08-advent-of-parens-8-everything-is-a-pipe
curious though -- shouldnt': > nREPL connections: jet be: > nREPL connections: rep ? or may be there's something about jet i don't know? 🙂
on a side note, there was recent discussion about examining classpaths -- i mentioned sed and then ghadi mentioned tr (for splitting on the separator)
@borkdude no, it was just a remark related to the article -- don't have an answer for your question in #clojure
This seems to work:
user=> (def cl (.URLClassLoader. (into-array .URL [(.URL. "file:///Users/borkdude/.m2/repository/com/cognitect/transit-java/0.8.337/transit-java-0.8.337.jar")])))
#'user/cl
user=> (.findResource cl "com/cognitect/transit/Reader.class")
#object[.URL 0x3e30646a "jar:file:/Users/borkdude/.m2/repository/com/cognitect/transit-java/0.8.337/transit-java-0.8.337.jar!/com/cognitect/transit/Reader.class"]
I might be able to resolve files by namespace and just load them from the classpath in babashka
interesting -- will it be important to be able to tell clj libs apart from bb libs (at least on clojars)? i like the "etc" part -- using git hashes has been nice in deps.edn
$ cat /tmp/foo/bar.clj
(ns foo.bar)
(defn hello []
(println "hello world"))
$ lein bb --classpath /tmp "(require '[foo.bar :as b]) (b/hello)"
hello world
$ ./bb --classpath /tmp "(require '[foo.bar :as b]) (b/hello)"
Could not require foo.bar. [at line 1, column 1]
repro of this issue in https://graalvm.slack.com/archives/CN9KSFB40/p1575837753346300
made an issue: https://github.com/oracle/graal/issues/1956
@borkdude does this seem relevant? > To make calls such as Class.getResource(), Class.getResourceAsStream() (or the corresponding ClassLoader methods) return specific resources (instead of null), the resources that should be accessible at image runtime need to be explicitly specified. via: https://github.com/oracle/graal/blob/master/substratevm/RESOURCES.md
@sogaiu hmm, if this is only possible with compile time resources then this won't work