7 ms·
I'm an experienced Clojure user with work done on the job and in open source. If you're a Clojure user, it's very likely you've used a library I've worked on or
by coolsunglasses 13y ago
I'm an experienced Clojure user with work done on the job and in open source. If you're a Clojure user, it's very likely you've used a library I've worked on or made.
Don't bother. Go straight to Haskell and just Haskell.
No excuses, no compromises, no mental backflips to justify not learning something new. Learn Haskell properly and then see for yourself why "hybrids" are a waste of time.
Hybridized approaches are like asking for a hole in your bathroom floor when you're being offered indoor plumbing with a porcelain toilet instead of an outhouse.
- nextos 13y agoWhile I agree hybrids are in general a bad idea, some good hybrids exist. But they are extremely hard to get right. For example, Oz/Mozart: http://www.sm.luth.se/csee/courses/timber/reading/VanRoy.pdf http://www.sm.luth.se/csee/courses/timber/reading/VanRoy.pdf http://www.epsa.org/forms/uploadFiles/3B6300000000.filename.booksingle.pdf http://www.epsa.org/forms/uploadFiles/3B6300000000.filename....
- MrBuddyCasino 13y agoI would be much more inclined to read those papers if you gave a short reason as to why you think it got some things right, where others have failed.
- nextos 13y agoJust have a look at the comments about the CTM book in c2, and the links to LtU: http://c2.com/cgi/wiki?ConceptsTechniquesAndModelsOfComputerProgramming http://c2.com/cgi/wiki?ConceptsTechniquesAndModelsOfComputer...
- dorfsmay 13y agoHave you completely switched to haskell now?
- coolsunglasses 13y agoI've written an Elasticsearch client in Haskell just so I can port a project from Clojure. I'm moving everything over that I can. Some legacy Clojure at work I'll have to leave alone for now, but going forward it's Haskell wherever I can.
- dorfsmay 13y agoHave you found any drawback so far? What is your take on the "you have to write clever, complicated code to make haskell work" (1). I've read that a lot of the code use for the language shootout is far from idiomatic haskell, but just plain clever, in order to get decent performance... (1): http://jxyzabc.blogspot.ca/2009/03/haskell-vs-ocaml-or-ravings-of.html http://jxyzabc.blogspot.ca/2009/03/haskell-vs-ocaml-or-ravin...
- coolsunglasses 13y ago>"you have to write clever, complicated code to make haskell work" Haha, no. I write pretty dumb Haskell myself. The author might've tripped into a library beyond their faculties. Also possible, they might've tried to make something "practical" before they really knew what they were doing. I made this mistake in the past myself. The library I've been working on makes my boring Haskell obvious: https://github.com/bitemyapp/bloodhound/ https://github.com/bitemyapp/bloodhound/ I even tweeted a sample of my code making fun of how "stupid-simple" my Haskell is :) I might refine the code later, but for now I'd rather KISS until I'm prepared to firm up the design. You can get down a rabbit-hole with Haskell if you want, but the same is equally true of Clojure/Scala/C++/Ruby/Python/Perl. Even then, the rabbit-hole at least has typed hand-rails. Negatives? Uhhh, missing libraries (which I am working to help remedy) You develop a "nose" for libraries for which you aren't the audience. It's not a big or unavoidable negative, but there are definitely libraries on Hackage made to prove a point rather than for use in production. These libraries are easy to identify. Some of them are prefixed acme-* The primary negative that matters is simply that Haskell is deeply unfamiliar to most working programmers, so while it's 100% worth it, the road to Haskell isn't as well-trodden or smooth as it would be going between Python <---> Ruby. I'm working to remedy this as well. I've been teaching Haskell for the last ~6 months.
- metasim 13y agoIs your argument that deep experience in Clojure is sufficient in determining FP/OO hybridization isn't a good idea or can't be done well? I didn't think that was in the sphere of Clojure's goals.
- coolsunglasses 13y agoI've used a lot of languages, including Clojure and Scala. I'm saying any time spent learning Clojure when Haskell exists is a waste of time and a half-step. Everybody who hasn't should be learning Haskell, regardless of background. Teaching somebody Haskell is faster than explaining why the 1,001 dumb things mainstream languages do are dumb. I don't want to waste my time explaining why null values are dropdead stupid when I can just show them "Maybe". We can talk about where we're headed after that.
- _halgari 13y agoI find it funny to hear such grandiose claims about a language that can has yet to create a major killer project. That's why I can never bring myself to write Haskell. Show me the Storm, OTP, Datomic, Netflix, Whatsapp, etc. written in Haskell and perhaps I'll have a reason to change my mind. But until then all I see is C#, Scala, Erlang and Clojure shipping awesome products and the Haskell guys sitting in the corner saying "You're not doing it right!!!"
- coolsunglasses 13y agoHaskell's community is a bit more thoughtful and less prone to self-promotion. That combined with the fact that you're not a Haskeller, you're not familiar with what they've built. Another issue is that Haskell is somewhat weighted towards finance and they're a bunch that tends to be somewhat proprietary about their IP. Some exceptions (Ermine) exist. Some notable projects that come to mind include git-annex and Parsec. Parsec has been preeminent parser-combinator library since forever. Also: pugs, pandoc, gitit, Darcs, xmonad, Idris (same person that did whitespace, haha) Recently? Cryptol. That's pretty major. I'm building stuff in Haskell, right now. Specifically, the easiest to use Elasticsearch client in the world. One was needed. Badly. The ES API's data structures were never specced out properly, just documented on an ad-hoc basis. The Haskell library I'm working on will, if nothing else, mean that there's a reference for how the JSON is structured. Anyway, empower thyself, learn some Haskell: https://gist.github.com/bitemyapp/8739525 https://gist.github.com/bitemyapp/8739525 Edit: Ah, I thought I knew that username from somewhere. The negative-nancy is Timothy Baldridge, an employee of Rich Hickey's company Cognitect. Cognitect is "the" Clojure company and represents the inner-clique.
- caughtexception 13y ago> Learn Haskell properly and then see for yourself why "hybrids" are a waste of time. /rant Getting tired of puritans. You people are selling functional programming on the basis of "ideology", not merits. Can the following be done in Haskell ? * A Real Operating System. * GPU programming. * Embedded programming. * If you can do all the above, can you replace Verilog ? * Financial Programming. Ocaml is one of the "hybrids". Genetically impure, since it has "refs". But they have Jane Street. * Games worth playing. assertion : If all the haskell programmers are put in a gulag, they can't come up with a half-decent game. Nintendo Gameboy Games were written in assembly with goto's. Why don't you guys take a moment and pat yourselves on the back ? Hypocrisy-2.0 is probably in the hackage. Let's say you do all the above, GUI apps, distributed computing, <cool-buzz-word> ... without complains and ending up as a half-decent C++ or 1/10th lisp. Haskell syntax is garbage. (Common Lisp has a goto, gee what were they thinking ?) Mathematicians pride themselves in their rich history of syntax. Haskellers actually type "Arrow". "I do consider assignment statements and pointer variables to be among computer science's most valuable treasures." -- Only an Idiot could say that.
- dllthomas 13y agoThere are a number of toy operating systems written in Haskell. There are not very many "real operating systems" being written in any language, because it is a tremendous undertaking for uncertain value in a space that already has significant players with platform-effect lock in. I don't see why building a "real OS" in Haskell would be much harder than building a "real OS" in other languages, though. I don't know anything about the state of GPU programming in Haskell, so I'm not going to speak to that. Regarding embedded, GHC can target some quasi-embedded platforms these days, but it's also possible to write embedded programs in (pardon the overloading) an embedded DSL that can compile to C. Check out the Atom library. I've heard about some people doing hardware synthesis involving (again) embedded DSLs in Haskell - I don't really know the state of it, but IIRC Conal Elliot gave a talk on some related stuff at one of the Bay Area Haskell meetups. Jane Street is doing a lot of O'Caml stuff, and that's awesome, but there's definitely a lot of Haskell in finance these days as well (I've seen several job postings, and heard some chatter generally). I don't know which is better represented, or how it compares to other stuff - most big finance places don't talk about what they're doing inside. Oh, and Haskellers actually type "Arrow" when they're working with a particular generalization of functions. When they're actually working with functions, they type ->.
- weavejester 13y agoI spent a couple of years using Haskell, but a few months after I started using Clojure I've switched over to using it pretty much exclusively. I certainly didn't find Clojure to be a waste of time; to my mind it's a far more practically-minded language. It's philosophy of decoupling components is also interesting. For example, in Haskell, the static type system is coupled to the language; in Clojure, the static type system is an optional library.
- rdmckenzie 13y agoresponding to bitemyapp? brave...
- cynicalkane 13y agoI find your rant slightly insulting, off-topic, and lacks substantial information. "Learn Haskell because I say so." Why? No. But let me do something you didn't do, which is to actually explain my position. Hybrid languages afford a flexibility and power not available to language puritans. It's very nice to have things first-class DSLs that don't rely on slow monad stacks, heterogeneous lists that don't rely on existential qualification, stateful programming that isn't a type system hack (do I really need to understand existential uninstantiated types to twiddle a bit in a vector?), first-class side-effects without monad stack weirdness (unsafe escapes don't count), Turing-complete macros at load time, inheritance and class qualification that isn't crippling and/or dependent on weird compiler extensions... In the course of learning Haskell I find myself banging my head against a type-system wall to do something that would be trivial in Clojure or Scala. Now I like Haskell, but Clojure and even Scala offer very flexible and powerful defaults together with programming escape hatches anywhere you want them. This is very powerful. It's not clear how to have a similar in a strongly typed strict language. Monads and weird compiler extensions don't cut it.
- caughtexception 13y agoI am fed up with these "pure" people. They have hijacked every sane discussion about programming into a condescending -- "Do you have monads and typeclasses ?". It's absolutely unhealthy. State is not Evil. Languages like clojure, scheme take imperative features and give it more beautiful abstractions. In what profession, do you find people complaining about the very foundations and thinking it's cool ? It's like Musicians saying Rhythm is stupid. If you haven't written a State Machine with goto's and never marvelled at it's beauty ... please just try it.
- coolsunglasses 13y ago>State is not Evil. I agree! You're mistaken if you think Haskell users don't take advantage of state or side effects. They do, you just don't understand the difference. Try this course: http://www.seas.upenn.edu/~cis194/lectures.html http://www.seas.upenn.edu/~cis194/lectures.html Then see LYAH's section on the State monad: http://learnyouahaskell.com/for-a-few-monads-more http://learnyouahaskell.com/for-a-few-monads-more Then reflect on ST: http://www.haskell.org/haskellwiki/Monad/ST http://www.haskell.org/haskellwiki/Monad/ST Then this example using mutable variables and closures: http://bitemyapp.com/posts/2014-03-25-when-nested-io-actions-are-wanted.html http://bitemyapp.com/posts/2014-03-25-when-nested-io-actions... Side-effecting closures mutating variables! It's not "no state or side effects". It's about making state and side effects typed and explicit so they can be properly composed and manipulated.