Could not locate
I am begin with clojure, when I invoke clojure from java. The "Could not locate cljcore/core__init.class, cljcore/core.clj or cljcore/core.cljc on classpath" is arised. (defproject cljcore "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME"; :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "https://www.eclipse.org/legal/epl-2.0/"} :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/core.logic "1.0.0"] ] :repl-options {:init-ns cljcore.core} :java-source-paths ["java"] :source-paths ["src"] :test-paths ["test"] ) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/3d97cb48-fe5a-4ce0-83f9-705758709a83n%40googlegroups.com.
Re: Could not locate
On 5 Jan 2021, at 10:50, Yang Xu wrote: > I am begin with clojure, when I invoke clojure from java. The "Could not > locate cljcore/core__init.class, cljcore/core.clj or cljcore/core.cljc on > classpath" is arised. > > (defproject cljcore "0.1.0-SNAPSHOT" > :description "FIXME: write description" > :url "http://example.com/FIXME"; > :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" > :url "https://www.eclipse.org/legal/epl-2.0/"} > :dependencies [[org.clojure/clojure "1.10.1"] > [org.clojure/core.logic "1.0.0"] > ] > :repl-options {:init-ns cljcore.core} > :java-source-paths > ["java"] > :source-paths > ["src"] > :test-paths > ["test”] > ) Have you installed leiningen? Alan Forrester -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/864DF118-2E83-41F4-885E-7161708910BB%40googlemail.com.
Re: Socket servers, threads, and redirecting error output.
Thank you, Sean. That is an excellent example. -austin On Sunday, January 3, 2021 at 12:48:55 PM UTC-8 Sean Corfield wrote: > Austin, > > You might find a macro like this helpful -- just use it directly instead > of future. You can replace println with whatever sort of logging you want. > > (defmacro logged-future > "Given a body, execute it in a try/catch and log any errors." > [& body] > (let [line (:line (meta &form)) > file *file*] > `(future > (try > ~@body > (catch Throwable t# > (println t# "Unhandled exception at:" > ~file "line:" ~line > "on thread:" > (.getName (Thread/currentThread > > > On Sat, Jan 2, 2021 at 5:59 PM Austin Haas wrote: > >> Ah, thanks for pointing that out. I must've overlooked your example, >> because I'd already written off futures. >> >> It seems like what you are suggesting, catch and print, might be about as >> good as I could hope for. If I don't want to block the main thread, then I >> don't see what else I could possibly do but print the exception. I guess I >> could store it somewhere, but in any case, I'd use this same pattern. >> >> Thanks, Justin. >> On Saturday, January 2, 2021 at 1:44:55 PM UTC-8 noise...@gmail.com >> wrote: >> >>> to be clear, in my second example you see the error from the future >>> without using deref >>> >>> good luck finding your solution >>> >>> On Sat, Jan 2, 2021 at 12:50 PM Austin Haas >>> wrote: >>> Thank you very much for the explanation, Justin. I don't see how I can use futures, though, without blocking on the main thread (to get the exception when it occurs). I'm spawning a long-running process that never returns a value. On Saturday, January 2, 2021 at 12:43:14 AM UTC-8 noise...@gmail.com wrote: > By the time the exception is caught, you are already outside the > context of the Thread which the repl client is interacting with. The > default exception handler has no information tying the executing thread > to > the repl process (not to mention the dynamic variables clojure is using > to > associate output from code your client runs with that socket connection). > > You probably don't want to rebind the root exception handler to show > *all* exceptions to your client socket. Which means that you need to set > up > some soft of infrastructure connecting the information about the failed > function to the socket you are listening to. > > I find "future" very convenient for this, it uses a pool which will > perform better than creating Threads ad-hoc, and will capture Exceptions > and re-throw when you deref (of course, it's up to you to ensure you > deref, > or use try/catch and otherwise forward the failure information via the > catch block). Also, it conveys dynamic bindings for things like > clojure.core/*out* and clojure.core/*err* that java classes don't know > about. > > (ins)user=> (def fut (future (throw (Exception. "oops" > #'user/fut > (ins)user=> @fut ; waits until deref to raise the error > Execution error at user/fn (REPL:11). > oops > (ins)user=> (def fut2 (future (try (throw (Exception. "oops")) (catch > Exception e (println "wat\n" e) ; prints instead of raising > #'user/fut2 > user=> wat > #error { > :cause oops > :via > [{:type java.lang.Exception >:message oops >:at [user$fn__165 invokeStatic NO_SOURCE_FILE 13]}] > :trace > [[user$fn__165 invokeStatic NO_SOURCE_FILE 13] > [user$fn__165 invoke NO_SOURCE_FILE 13] > [clojure.core$binding_conveyor_fn$fn__5754 invoke core.clj 2030] > [clojure.lang.AFn call AFn.java 18] > [java.util.concurrent.FutureTask run FutureTask.java 264] > [java.util.concurrent.ThreadPoolExecutor runWorker > ThreadPoolExecutor.java 1128] > [java.util.concurrent.ThreadPoolExecutor$Worker run > ThreadPoolExecutor.java 628] > [java.lang.Thread run Thread.java 834]]} > > > > On Thu, Dec 31, 2020 at 1:48 PM Austin Haas > wrote: > >> >> Problem: When I connect to a socket server and create a thread, >> exceptions in the thread are printed in the server's process, not the >> client's. I'd like them to appear in the client's process, where the >> thread >> was created. >> >> (I'm using the term "process" very generally here, because I don't >> understand what is going on.) >> >> From searching, I understand that there are some other things at >> play, like System/err, but I don't understand what is happening or how I >> can work around it. Why does an exception thrown in the client process >> show >> in the client process, but an exception thrown in a thread created by >> the >> client process shows in the server process? Why doesn't binding *err* in >> a >> thread seem to have any e
[Remote Job Opportunity] Senior Software Engineer for Health Tech Company
Hi all, I am working with a client to hire Senior Software Engineers with experience using Clojure or another functional programming language. If you are interested please let me know and I can set up a time to connect directly. Please see some details: *What You'll Be Doing:* - Deliver extraordinary software that solves complex, real-world problems in healthcare. - Build high-quality, maintainable, and well-tested code across our entire application. We value the developer who focuses on “front-end” or “back-end”, as specialization brings deep technical understanding, leading to the ability to solve difficult problems elegantly. We also value the developer who brings their own specialties, and who will enjoy working across our entire application stack. - Strive for technological excellence and accomplishment through the adoption of modern tools, processes and standards. - Work closely with our Design and Product teams as features move through the value stream. - Support your teammates in an environment where collaboration, respect, humility, diversity and empathy are prized. *What You Bring:* - You have a minimum of 5 years of professional software product development in an Agile environment, ideally developing SaaS products. - The applicant we are looking for has experience in functional programming, has a passion for learning and personal growth, and works best when working with a team of diverse but like-minded individuals. - You have real-world experience building software with functional programming languages like with languages like Clojure, Haskell, Lisp, F#, etc... - You have great oral and written communication skills and are comfortable with collaboration in a virtual setting. - You demonstrate an enthusiastic interest to learn new technologies. - You are comfortable with modern infrastructure essentials like AWS, Docker, CI/CD tools, etc. - You are proficient with common development tools (e.g. Git, Jira) and processes (e.g. pairing, testing, code reviews). - Prior experience in the healthcare domain, especially clinical trials and/or HIPAA Compliance is a plus. *Compensation & Benefits:* - *Competitive Salary and Stock Options *Salary and stock options commensurate to your experience and expertise. - *Remote First* Our workforce is geographically distributed so that we are attractive to a broader population of candidates. - *Flexible Hours* Plan your workday as you wish, just give us the majority of your core, creative hours that coincide with that of your team. - *Comprehensive Health / Wellness Coverage *100% premium coverage for you (and >50% for your dependents) for: Top-tier health plan (with option of HSA), Dental, Vision, Disability (short-term and long-term), Life insurance (for your entire tenure), 24/7 access to doctor by phone or online via telemedicine coverage. - *Retirement Plan *401(k) plan with employer matching program. - *Vacation and Holiday Flexibility *Generous paid-time-off policy that accrues with your tenure which includes holiday flexibility and parental leave. We value diversity and believe the unique contributions each of us brings drives our success. We do not discriminate on the basis of race, religion, color, national origin, gender, sexual orientation, age, marital status, veteran status, or disability status. Note: We are currently only considering US citizens or Green Card holders. Thanks! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/3a0e08ce-8484-46d3-81db-d74a484468f7n%40googlegroups.com.