Fork me on GitHub

yeah, because almost no-one is adopting Javascript, Python or PHP anymore


and you must be crazy to start a project in Ruby these days


let's not talk about R


Well, you must be crazy to start a project in PHP, that's for sure.


@jaen: I do agree with that one simple_smile


It's slightly better I think, but yeah, there are better choices for sure ; d


I mean, that was about Javascript.


I wonder what Bodil's problem with Clojure is. Read through these tweets from the last year.;src=typd&amp;lang=en


She even prefers JS over Clojure.


I dunno, I don't like that person enough to care about what she has to say ; d


But I imagine - types notwithstanding - Clojure as a language certainly feels less welcoming than, say, Elm does.


And I see some complaints about license, but IANAL so I don't understand that part.


has anyone here switched from a proper statically typed language (haskell/ocaml) to Clojure? If so, why?


I've switched language from Common Lisp to C#, F#, back to Clojure


also others on the side of course: Java, Ruby


Hm, why F# -> Clojure move if you care to elaborate?


@jaen: I like Lisp and a REPL


Well, F# has REPL IIRC


That’s why I choose Clojure whenever I am empowered to choose simple_smile


So is it lacking?


@jaen: it's different. It's not a session like in Lisp, but more like Haskell. If you want to redefine functions, you lose your state.


anyway, I still don't think there is one -best- language that beats them all.


but Clojure is a lot of fun


is F# less fun? guess the community is also a factor


Well, F# is .NET, which has a more commercial slant than JVM community, I think


@dm3: To be fair, my time with F# was fairly limited. I don't know the community well. It seems to have grown in the last few years, with amazing looking tools like Websharper, which I have never used.


Yeah, Websharper looks amazing, I like how they ended up open-sourcing it


F# was definitely more fun than C# though. One factor was the REPL. I could build a UI incrementally, etc.


Still, C# isn't a bad language either. More fun than Java.


C# had the nice thing that is hindsight


So they have things like reified generics or TCO in the VM, the language is actually pleasant to use and so on


I guess it all depends where you're coming from. When Java came out, compared to C++ it was cool I guess.


we're all just spoiled programmers, standing on the shoulders of genius people we often don't know 😉


It's funny how sometimes things languish before being rediscovered and touted as new shiny things


Like Java was awesome because of virtual machines and garbage collections


And it was all in LISP ages ago


@jaen: did LISP also have platform independence?


I wouldn't know, didn't live back then, but it's quite possible it was not as big back then, with no multiple, well-established operating systems.


I'm not saying Java didn't add anything new at all


It's just interesting how some ideas in IT come back in a Ouroborous-like cycle.


@dm3: as for me - I didn't exactly come to Clojure from knowing Haskell like the back of my hand, but my introduction to FP was statically typed languages - Haskell, ML and such. But why I'm writing in Clojure instead of Haskell - even though I prefer static typing - is quite simple. Clojure has much gentler learning curve than Haskell. With Haskell I feel like I have to invest two years of effort to study monadology in order to write a real application and not just implement some algorithm, and with Clojure it feels considerably simpler to be able to write a real application.


@jaen: why didn't you pick Scala?


@borkdude: to me it feels too much like C++ in that it is an accretion of features, that introduces accidental complexity into the language itself. I like to compare it to Wesley's house from Harry Potter, where it basically looks like a tower of houses built atop of houses when the space in the first one ran out. It's just too complex for it's own good, probably more complex than Haskell even.


There's a talk by Simon Peyton Jones on type system


Where towards the end of the first lecture he broaches the topic of how combining Hindley-Milner typing (FP) with subtyping (OO) is a hard task that introduces a lot of complexity, even from theoretical point of view, due to things like for eg. variance.


And Scala is trying to do exactly that, so it will never be able to run away from some of the complexity.


That, and I actively despise Java. So if I had a choice between Haskell and Scala, then non-JVM thing would win. Clojure doesn't have as significant competition (Dylan? Chicken? Racket? SBCL? Racket is maybe the closest, but it's still a niche language and perceived as an educational one) so I kind of started using Clojure in spite of it being JVM-based.


@jaen: I think you’ve just summed up my concerns about Scala!


Heh. I just can't trust language that relies on culture to do the right thing. C++ is a great language for writing high-performance code, iff programmers know what they are doing, read all those Effective C++'s, use unique_ptrs and so on. And Scala is probably also a great language if you know it's ins and outs well, but if you don't then there's probably a disaster waiting to happen.


Haskell it's a bit different here in that if you don't know it enough the disaster won't happen, but that's because you don't know it enough to write something useful. And I'm not sure if that's strictly better than Scala's or C++'s case - yeah you won't blow anything up, but you won't get anything done either.


Yeah, if you already invested the time to learn it, it's probably the best language this side of Idris, but most of people just don't have the time to spare to invest into that.


And I just decided to have dynamic typing pains from time to time in order to start being productive sooner than two years in P ;


I agree although I think it’s not just culture but ‘knowledge’. People can have the right cultural perspective but haven’t got the experience to recognise the right thing to do. For example, I would fail for this reason if I used Scala as I don’t have the experience and knowledge of patterns and anti-patterns


Yeah, you are right, I kind of implicitly conflated those two.


I do worry that dynamic typing leaves that kind of ‘hole’ in Clojure


Hmm, while certainly whether the language has static types or not influences the degree to which you need to rely on culture, I think simplicity of the language is also an important factor. And Clojure strives to be as simple as possible, which somewhat mitigates the fast & loose aspect of dynamicity. I think so far it seems to be working out rather well.


Though I've seen libraries that I couldn't make head or tails of, like friend for example. So I guess we can just wait and see where the balance strikes in the long run.


good discussion simple_smile this confirms my theory of the programmer's toolkit being expanded, from entry level (java/c#/ruby/python/javascript) -> better concurrency story/more sophisticated type system (elixir, erlang, clojure, typescript, java-scala) -> correctness/paradigm shift to focus on types rather than values (f#/ocaml/haskell/haskell-scala)


left outside the "performance" group of c/c++/rust


Well, if you compare C++ and Rust it also seems to want to integrate more correctness into systems programming.


Just to add my two cents. I love clojure for my personal stuff, which is not that much. However, whenever I come back to something, even after just a few hours or days, I struggle with exactly what that blog post described, not knowing exactly how my params look like, what they contain or not. Itried core.typed and also was not able to express everything I wanted, it has a steep learning curve I think. Prismatics schema is something I tried a few times but was some kind of unsatisfying. I think about this often. What I need is not a sophisticated type system (although I like the advantages it brings). But just some description that reminds me of what my arguments are, right now, here, when I need it and which arguments another function expects. From my POV this is the biggest weakness of clj / cljs and something that stops me from coding from time to time.


Something like a tooltip for a function would be nice declaring exactly what kind of map it expects. Similar to core.typed, but less error prone and less intrusive. Reading all that stuff in my code also somehow destroys the simplicity shortness of clojure functions.


Wouldn't schema.core/defn work for that? You can then define function like so (defn function :- ReturnSchema [argument :- ArgumentSchema] ...) and some editor support to display those schemas in tooltips.


Or is that not enough?


@jaen: Thats exactly what I tried in my last coding sessions. I cannot really name what disturbs me there. It sounds like what I want. But 1. there is that big pile of declaration. Either it is in the file where I use it most and clutters my code or it is in a different namespace and I constantly have to switch


2. Giving it a name often is not sufficient enough and I need to lookup the declaration, somehow breaking my flow


Sure, that's why I mentioned some editor support. I imagine if Cursive added some support to display those schemas inline for schema.core/defn it would probably help considerably.


And any nominal type system has this flaw.


jaen: I agree, that would be nice...


actually, schema.core/defn embeds the schema declaration into docstring


I believe cursive/emacs display the docstring now


Hmm, when I try ctrl+Q it doesn't seem to be embedded.


I see the doc string, but did not try it with prismatics schema. I will try that though, thank you.


repl=> (schema.core/defn hi :- Number [x :- String])
repl=> (meta #'hi)
{:arglists ([x]),
 :column 1,
 :doc "Inputs: [x :- String]\n  Returns: Number",
 :line 1,
 :name hi,
 :raw-arglists ([x :- String]),
 :schema #schema.core.FnSchema
 {:input-schemas ([#schema.core.One
                   {:name x,
                    :optional? false,
                    :schema #<Class@610455d6 java.lang.String>}]),
  :output-schema #<Class@7dc0f706 java.lang.Number>},
 :tag #<Class@7dc0f706 java.lang.Number>}
seems to work here


Hmm, so the data is there, just some way to expose it would be needed.


If I declared a schema and gave it a name, would it expand on that in the doc string? From CoolType to {:require-key ....}


For me it doesn't when I do ctrl+Q in Cursive


I get just the nominal type.


don't think it would expand - where would you stop? simple_smile


Good question...when I know what I need to know 😉


Tooltips could then have some + icon to expand when needed, I guess.


Another problem I see is that there is core.typed, being part of clojure core and prismatic schema on the other side. As a library maintainer do I have to support both? Only one? Do we need conversion? Do we need it at all? Being split on that makes things harder for everyone I think.


That's certainly true, though you only have to support core.typed if you want to. As far as I understand that schemas are more for the programmer-producer than for programmer-consumer. You use it to check contracts internally and not expose it. But the question whether or not to support core.typed in your library is certainly a valid one - not everyone uses it, but some will appreciate that.


I think core.typed will not get much adoption unless another couple of man-years are put into it. It really slows down the development compared to schema


It s a bit apple vs orange


One does static type checks the other runtime checks.


In theory core typed could be much nicer, but it has a long way to go. Would be interesting to have some integration between both.


@danielstockton: I've been trying to get someone to take interest in installing the slack <-> IRC bridge but everytime I've mentioned it, it has fallen completely on deaf ears (i.e., gotten zero replies):

doug kirk21:11:56

@borkdude I think you'll need to use a more sophisticated PDF tool that supports font selection and subsetting. The character info is here (, but without proper font support it'll always look wrong.

doug kirk21:11:32

On my Mac, the browser chooses "Apple Color Emoji" font for that, but I see that the DejaVu Sans family supports those in black & white.


@jaen: Issue welcome for the schema thing, it’s something I thought about but haven’t done yet.


the man to ask about PDFs is Chas Emerick simple_smile