|
SavageMessiah posted:You still have to know enough to work in Java's ecosystem - jars, classpath, maven, etc. And enough Java to use libraries that haven't already been wrapped. And you generally have to deal with a Java IDE unless you're comfortable with Emacs. This is mostly untrue. My Java is extremely rusty, I never learned how to use maven/ant or most of the surrounding ecosystem, and I don't need to because lein handles it all automatically. There's Clojure support not just for emacs and Eclipse but for IDEA, JEdit, vim, Sublime Text, and Textmate, among others. You're correct that you need to know enough Java to be able to understand the javadocs for any unwrapped Java library you want to call (although at no point do you actually have to write Java code). It's been a while since I actually had to call an unwrapped library, though.
|
# ¿ Nov 30, 2012 00:55 |
|
|
# ¿ May 18, 2024 13:10 |
|
Bongo Bill posted:It sounded to me like he's more worried about having to deal with the Java standard library. I wonder if clojure-clr is usable yet.
|
# ¿ Dec 3, 2012 19:06 |
|
DreadCthulhu posted:Ugh, kind of sad there isn't a Haskell thread around here. I've been really curious recently about the kind of benefits I'd hit by switching to a super-anal statically typed language for the kind of work we do. I wrote all of our backend services in Clojure, which has been a real blast, but at a certain scale you really start to hit issues with refactoring and debugging. Have you looked at core.typed at all? I've only used it for small things but it seems to work pretty well.
|
# ¿ Jan 12, 2014 22:24 |
|
rrrrrrrrrrrt posted:Anyway, after finishing up a very small hobby project in Clojure I'm a little torn on starting a new, bigger project in it vs. CL or something else entirely. I've spent some time in the IRC channel discussing this and yeah, there's just no interest in unfucking error reporting as far as I can tell. If you implement it yourself it might get accepted, once you badger someone into reviewing it. It makes it really hard for me to recommend it, because I have to hedge everything with the caveat that if you ever need to debug something you will want to kill yourself. Getting the full stack trace is almost as sad as not getting, too, because it's 20+ frames of internal garbage for every frame of your actual code. I've never used a language that shat out as much implementation details on error as Clojure. quote:On the other hand, it sure is nice to use a modern language, with access to modern libraries for pretty much everything under the sun and a relatively active community, and a saner build/packaging system and so on. Pretty sure I'll be moving on with Clojure, but it's not without a little bit of sadness. This sums up my position pretty well.
|
# ¿ Feb 14, 2014 02:47 |
|
SavageMessiah posted:There's a function designed for repl use that cleans up the backtrace to remove bits that refer to language internals, but that doesn't really help when you're getting the exception in a log or something at runtime. That's (pst), notable for having documentation that lies constantly about everything (try (pst 10) sometime, then compare the result to what (doc pst) says should happen) and not doing jack poo poo to remove internal frames, at least in 1.5. In the general case this is kind of hard for Clojure to fix, yeah, both because it compiles directly into JVM bytecode rather than running in an interpreter, and because if you're doing Java interop you do want frames from inside Java code in your stack traces. It could probably be better than it is, though. Where the error handling is really completely inexcusably bad is the Clojure compiler, which reacts to any sort of invalid input by crashing and dumping 60+ frames all over your terminal. The actual syntax error in your source code is somewhere near the top...sometimes.
|
# ¿ Feb 14, 2014 19:53 |
|
DreadCthulhu posted:Welp, I'm transitioning to Yesod framework on Haskell with our next web app project instead of continuing with the Clojure/Ring route. Microframeworks are fun for simple things and are great for learning why a framework is important. For serious work it's actually really painful to replicate all of the convenience you get from a well thought-out framework with years of work put into it and dozens of much smarter people than me improving it. Easy switching between JSON-only and server-side HTML/CSS/JS generation, boundary validation / input validation, baked-in auth and authz plugins w/ option to write your own, a solid reloading / rebuilding / retesting flow, hashing of assets etc. It's basically like Rails, except everything from HTML templates, request data, to URL params is statically checked, you have to try pretty hard to gently caress it up. Monad transformers are a bit tricky to reason about, and error messages can be nightmarish because of the monad layering, but I think you get used to it once you grok it. Snoyman is about 1000x smarter than me, so I trust his design choices. Coincidentally, I'm just starting work on a project using Luminus (which I understand is more batteries-included than straight Ring) and core.typed for type checking, specifically to address those two issues. I will report back on how it goes!
|
# ¿ May 19, 2014 17:39 |
|
minidracula posted:I agree with both of these statements wrt Clojure, though perhaps in a more negative sense: I want to like it due to (some of) its conscious engineering choices that both temper and deeply inform the language design, but the debugging story is horrendous from what I expect out of a Lisp environment, and is a significant step backward that I find hard to get over. Yeah, that's what makes it hard for me to recommend Clojure, despite the fact that I really enjoy working on it. Today's syntax error. Root cause: forgot a symbol in :refer [...]. Total length of error message: 119 lines. Amount of that that's useful: 1 line.
|
# ¿ Mar 7, 2015 00:24 |
|
|
# ¿ May 18, 2024 13:10 |
|
pgroce posted:You using CIDER? It doesn't have a debugger (they've made noises about incorporating the Ritz debugger, which was informed by Slime), but when you get errors it lets you automatically filter out the tooling and clojure-infrastructure stack frames that are just hiding the actual error 99% of the time. I use Sublime Text, not Emacs, and I do my compilation in a terminal outside the editor anyways because that's also where I do my version control and whatnot. I should probably see about writing a Lein plugin to make compilation errors less of a skullfuck, but it's still pretty inexcusable that the compiler reacts to trivial syntax errors by crashing.
|
# ¿ Mar 8, 2015 00:41 |