This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws (1)
- # beginners (65)
- # boot (400)
- # cider (19)
- # clara (2)
- # cljs-dev (29)
- # clojure (127)
- # clojure-chicago (2)
- # clojure-conj (1)
- # clojure-dev (12)
- # clojure-russia (156)
- # clojure-sg (6)
- # clojure-za (1)
- # clojurescript (193)
- # core-async (23)
- # datomic (91)
- # editors (4)
- # editors-rus (1)
- # events (1)
- # hoplon (3)
- # jobs (1)
- # ldnclj (6)
- # leiningen (3)
- # nginx (3)
- # off-topic (5)
- # om (93)
- # onyx (10)
- # re-frame (11)
- # spacemacs (1)
- # testing (2)
- # yada (5)
Hi, not having used lein repl for a few weeks, I’ve forgotten how to include Java classes sourced from lein dependencies. In particular, I have a dependency:
But fail to import or require it like
:dependencies [[org.clojure/clojure "1.7.0"] [org.seleniumhq.selenium/selenium-java "2.45.0"] [org.seleniumhq.selenium/selenium-firefox-driver "2.45.0"]])
I know about clj-webdriver, I’m just doing a bit of work for a demo tonight about Clojure interop.
user=> (require '[org.openqa.selenium.firefox.FirefoxDriver :as ff-driver]) FileNotFoundException Could not locate org/openqa/selenium/firefox/FirefoxDriver__init.class or org/openqa/selenium/firefox/FirefoxDriver.clj on classpath. clojure.lang.RT.load (RT.java:449)
@paulspencerwilliams When I had that last time I simply had forgotten to restart the REPL; did you?
I know my problem is a lack of understanding of loading / requiring and how the differ from within .clj ns files and code in the repl
Does this help you in any case? http://clojure-yap.blogspot.se/2011/10/clojure-and-firefox-zombie.html
looks like it does - your google fu is great - I’d been searching clojure require selenium etc and was struggling!
well… imports work although using the driver is causing
user=> (def driver (FirefoxDriver.)) CompilerException java.lang.reflect.InvocationTargetException, compiling:(form-init8874946729723677435.clj:1:1)
it’s a very old version of selenium. Just trying to get that old version.
I have working code using selenium in another project. Just not running it from the REPL
Em, unsure whether it was a version thing. It now works with 2.45.0 with their code.
@ian i think if you got from pragprog, if you bought the ebook you get a discount on the paper copy
Yeah, but I already bought the ebook. There's no option for getting just the paper copy with the discount of the bundle, as far as I saw.
I would like to buy the book for the full price but I can't justify it since I do already have a (digital) copy.
I got a copy of the beta when it was first released,, when i log into pragprog, go to my accounts, it lists it as a coupon for $15 off ... maybe because I got it so early?
pragprog ebooks are not so bad compared to other publishers. I got the kindle version of Land of Lisp and the code is unreadable. Will have to buy the paper version. Since then, I’ve bought all my programming books as paper, except the pragprog books.
you get the e-book for no cost and a coupon to buy the bundle if you want it
the coupon let's you buy the print book at the reduced price you'd get in the combo, so you can essentially add on the print book later if you want
@alexmiller: cool... i am only and all digital now ... cept I did buy the paper book of Common Lisp when I found it at half price books....
O’Reilly’s and Mannings' ePubs are good as well. I haven’t bought a printed tech book in years.
Most of the tech books I’ve bought this year are printed except for the pragprog books.
O’Reilly books are ok, but I don’t like the topics they cover. Most of them cover a specific technology that in a couple of years is outdated. They are more like manuals.
While the books that cover more fundamentals look terrible in e-format. Case in point, Purely Functional Data Structures, GOOS & Land of Lisp
yeah, I wish I had done the same. I’m stuck with the kindle version that is unreadable.
Sad. That’s a great book. F# got me into FP and Land of Lisp got me into, well, Lisp which got me into Clojure.
@alexmiller: thanks for the suggestion, but hopefully I'll be able to pay the full price soon instead. I'd rather support you and Ben fully.
It's interesting to see so many people move away from physical copies. My problem with digital is always that it feels too difficult to progress through the book compared to a physical copy. I think seeing the pages complete pile up on one side "feels" better.
I normally skim through the chapter first, before I start reading it. This is very hard to do with an ebook.
I prefer physical books because "see code listing on page X" really bothers me on ebooks
you just mentioned one of the most frustrating things in ebooks about coding: “see code listing (or diagram) on page X"
in a physical book, even if the code is in the other page, you can see it because you can see two pages at once.
roberto: hypertext is not only link to a different page, you could also embed the targeted resource in place
I have a gorilla repl version of some of the Cognitect Clojure training materials at https://github.com/cognitect/clojure-lab if anyone wants to try it :)
gorilla does have a way to live serve each page (although the intra-page links won't work)
I guess that doesn't let you actually run the repl examples, it's read-only