I want to see a clojure clone embedded as a Go scripting language. The immutability means that the interpreter would be mostly threadsafe, and thus would support goroutines well.
Pixie: A sweet Clojure-ish language
41–50 of 109 posts
Re: Pixie: A sweet Clojure-ish language
#42This seems like bit of a short sighted move not that I disagree with it. Project Jigsaw which will be a big part of Java 9 aims to make the JVM more modular which will reduce the memory footprint substantially. Personally I would like to see a version of Clojure that targets this JVM specifically and abandons backwards compatibility. Leaving the JVM means you abandon the decade of libraries many of which you simply c…
It can call into C libraries so there is a whole other ecosystem available to it.
But for example one of the areas that Clojure has been doing well in is the enterprise big data space which is dominated by the JVM based Hadoop ecosystem. Likewise many companies feel comfortable bringing in Clojure because they can leverage their existing Java libraries.
My point was that getting rid of the JVM loses a lot of what made Clojure actually successful.
Re: Pixie: A sweet Clojure-ish language
#43Earlier quoted context omitted.
Sounds like you needed Schema, which can ensure the shape and contents of a map as :pre and :post assertions in every function you annotate, then be turned off for production use. https://github.com/Prismatic/schema That's why I come back to Clojure every time, if I need anything, it's available as a library. Need better typesafety? Just add in what you need with a macro or two. (Schema is not much more than that). T…
I agree with most of what you said, but > Lastly, types only give you a single dimension of safety. Dependent types can express a huge number of things, and are often limited only by your ability to describe what exactly you want.
Dependent typing is some cool stuff, I'd love to see more of it.
Re: Pixie: A sweet Clojure-ish language
#44Earlier quoted context omitted.
Sounds like you needed Schema, which can ensure the shape and contents of a map as :pre and :post assertions in every function you annotate, then be turned off for production use. https://github.com/Prismatic/schema That's why I come back to Clojure every time, if I need anything, it's available as a library. Need better typesafety? Just add in what you need with a macro or two. (Schema is not much more than that). T…
Oh, god, thanks for reminding me about the whole agent/atom/ref hell - another reason I'd rather erase the whole Clojure experience from my brain altogether...
Re: Pixie: A sweet Clojure-ish language
#45Earlier quoted context omitted.
Sounds like you needed Schema, which can ensure the shape and contents of a map as :pre and :post assertions in every function you annotate, then be turned off for production use. https://github.com/Prismatic/schema That's why I come back to Clojure every time, if I need anything, it's available as a library. Need better typesafety? Just add in what you need with a macro or two. (Schema is not much more than that). T…
Oh, god, thanks for reminding me about the whole agent/atom/ref hell - another reason I'd rather erase the whole Clojure experience from my brain altogether...
Re: Pixie: A sweet Clojure-ish language
#46I want to see a clojure clone embedded as a Go scripting language. The immutability means that the interpreter would be mostly threadsafe, and thus would support goroutines well.
Well the closest I've found is https://github.com/zhemao/glisp which is similar syntactically, but doesn't have immutability.
Re: Pixie: A sweet Clojure-ish language
#47> And the JVM has the slowest startup time of any runtime I've ever encountered. Blame Clojure not the JVM. https://nicholaskariniemi.github.io/2014/02/11/jvm-slow-star... Besides if 0.04s is still too slow, there are quite a few (commercial) AOT compilers to native code available. However, Pixie does look quite cool. What I am missing in Clojure is the ability to take advantage of type metadata to compile it AOT to…
By comparison, on the same machine using an equivalent program
- Lua 5.2.3 takes 20ms
- CPython 2.7.5 takes 40~45ms
- MRI 2.0.0p481 and CPython 3.4.3 clock in at 55~60ms
- Pypy 2.5.0 takes 85~95ms
Re: Pixie: A sweet Clojure-ish language
#48Earlier quoted context omitted.
Lisp's super power (homoiconicity) comes at a trade-off of reduced discriminability. A good syntax highlighter and well-indented code (like you provided) reverses this effect considerably, but imho, it still takes a lot of getting used to for beginners. In any case, the bigger part of the being productive in a codebase is to figure out how it encodes the domain, what idioms and patterns are favoured etc. So sometimes…
I disagree with regard to Clojure. IME, the fact that it's a lisp doesn't seem as hard for noobs to grasp as immutability by default, or pickup up the functional programming mindset. We usually go for folks who use Emacs, so they may already have an indoctrination. When you compare Clojure to other lisps, I think you'd agree it's more discriminable, given the plethora of literals that dont use parenthesis: vectors [1…
I guess I need a clojure mentor for the first non-trivial project. There really isn't that much idiomatic web-related code out there to read, and with clojure there is also quite a lot of variation in how systems get designed (b/c of the power and expressiveness available).
This is not an excuse, just noting the factor that has turned out to slow me down. If i had more leisure time I'd just power through and build stuff until I arrived (through trial and error) at my own sense of best-practices / design tradeoffs. That has yet to happen but will someday.
Re: Pixie: A sweet Clojure-ish language
#49Dynamic typing and parentheses are what keep me away from Clojure or Lisp like languages. How can I get over them?
There aren't many languages that have radically fewer parentheses than Clojure / LISP. Clojure: (defn blub-extra [a b] (blub (inc a) (inc b))) 8 parens + 2 brackets Scala: def blubExtra(a: Int, b: Int): Int { blub(inc(a), inc(b)) } 8 parens + 2 braces Java: Integer blubExtra(Integer a, Integer b) { return blub(inc(a), inc(b)); } 8 parens + 2 braces Ruby: def blubExtra(a, b) blub(inc(a), inc(b)) end 8 parens Python: d…
F#:
let blubExtra a b = blub (inc a) (inc b)
4 parens.
Re: Pixie: A sweet Clojure-ish language
#50> And the JVM has the slowest startup time of any runtime I've ever encountered. Blame Clojure not the JVM. https://nicholaskariniemi.github.io/2014/02/11/jvm-slow-star... Besides if 0.04s is still too slow, there are quite a few (commercial) AOT compilers to native code available. However, Pixie does look quite cool. What I am missing in Clojure is the ability to take advantage of type metadata to compile it AOT to…