Hacker News new | past | comments | ask | show | jobs | submit login
Clojure on the Mac App Store (nightweb.net)
135 points by gw on March 14, 2014 | hide | past | favorite | 34 comments



Mostly unrelated, but: I can't believe Apple still uses the misnomer itunes to describe their entire app market. Google was able to rebrand their Android Market to Google Play (which was worse imho) without too much trouble.


Technically, they don't us it for their entire app market. They use it for the iOS app market when using desktop computers. On iOS devices, it is separate from the iTunes app; on Macs, it is only in the Mac App Store app. Also, ebooks are separate from iTunes on both Mac and iOS; iTunes is only used for syncing ebooks to iOS devices.


Does it mean that other Java apps (including Clojure apps we create) cannot use shared .m2 folder? (i.e. will be duplicate .m2, one in $HOME and the other one exclusively for Nightcode)


Yes, if you use Leiningen separately, you'll have two separate .m2 folders.


That's an informative little blog post. I hope it inspires porting more IDEs & language runtimes to mobile.


This is for the Mac App Store, this is not for iOS (so not mobile). Still very cool though.


For mobile we should support the nice work of the RoboVM guys, which are doing a native code compiler for Java based on LLVM.

http://www.robovm.org/


An approach to getting Clojure on Mobile has been the approach that Weathertron used.

https://itunes.apple.com/au/app/weathertron-live-rain-snow/i...

They compiled the Clojure(Script) down to Javascript, combined it with Angular and packaged it up

http://keminglabs.com/blog/angular-cljs-weather-app/


Relevant: Haskell + vim + iPad = Raskell. Basic right now, but the author has big plans for unique ways of interacting with the code. Same author also does a Scheme IDE (Lisping)


Mobile? Wouldn't that be even harder?


On iOS front, there are a few native code compilers available for Java, like RoboVM and Codename One.

On Android, there is the issue Clojure is still a bit fat and uses too much reflection during startup. ART might make it harder as it is a AOT native compiler.

On WP, there are currently no efforts for Java support, other than maybe via ikvm.net. Or Clojure-CLR.


Tried compiling Clojure->Scheme->C?


Not yet, but the Clojure->Scheme and Clojure->native(LLVM) do look appealing.

However I tend not to like having layers between language and final execution target, as it increases debugging headaches.


You should buy it just so you can support with play-clj, a library for making games from the same author consisting bindings to libgdx.


I'm not a game dev, but that makes me extra glad that I bought a copy. There's a lot to like: slogging through a set of thorny problems, documenting them clearly to help others find their way, and taking donations through a system that many of us are already hooked into (despite its issues and extra hurdles, as demonstrated here). Thanks.


The pure Java, on the other hand, doesn't have to deal with any of this mess (hopefully).

Here's how to package your app for Mac App Store:

http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/p...

... combine with Maven shade plugin (something that creates Uber Jar), it should be smooth.


I actually linked to that in the post. I don't think a pure Java app would necessarily be easier; you would still need to use native dialogs and a Java-Cocoa bridge to deal with sandboxing.


Hm, I might've missed that. Carry on!

By the way, thank you very much for writing the article. I've been tempted to try Clojure to build something desktop related :).


They don't make it easy, do they? Thanks for the information...


I have only just now heard of Nightcode. I've been using Light Table and am pretty fond of it but I'll definitely have a look at Nightcode. Thanks man.


Hmm, what if one turned Nightcode into a "batteries included" Cocoa app development/packaging/Mac App Store deployment tool?


I don't know why this got downvoted.

Right now, I see no reason to use Nightcode, Lighttable or any other clojure IDE over raw command line tools. Publishing to the Mac App Store is (as this shows) a difficult but potentially automatable process, and would be a concrete use-case to point to.

...of course, this is from the perspective of someone who doesn't use Clojure IDEs. I just didn't think that the parent deserved to be downvoted.


I just didn't think that the parent deserved to be downvoted.

I have a penchant for asking questions that the shallow knee-jerk HN contingent downvotes, which is then followed by the majority of reasonable thinkers up-voting.


How many man hours would it take to move Clojure from the JVM to native code/C back-end? Folks go on and on about the good things about running on top of the JVM, but I just see it as Clojure's Achille's Heel.

If I ever hit is super big, I'd def look to fund moving/forking Clojure away from JVM.

As an aside, would it have been easier for this fellow to have written and distributed his code in Clojurescript, and have node.js as the back-end?


> I'd def look

I see what you did there.


Clojure only makes sense in the presence of a "host" environment providing the backing libraries. A "native" Clojure is a contradiction.

You probably just want Haskell. Nicer language anyway :)


No, I think he/she wants Racket. Only Racket has the capability of being a "JVM-less Clojure". It's really all about the ecosystems, though, and Clojure is winning in that regard no less due to the JVM.


These app stores are stifling. They're injecting arbitrary non-functional nonsense and technical hurdles that just hold developers back.

I'm not saying HTML/CSS/JS development is a panacea, it's all painful awkwardness with occasional sublime moments. But at least I am my own master when I deploy my apps to the Web.


>They're injecting arbitrary non-functional nonsense and technical hurdles that just hold developers back.

Arbitrary nonsense like a sandbox? Didn't we learn anything from when viruses were rampant in earlier OSs?

>I'm not saying HTML/CSS/JS development is a panacea, it's all painful awkwardness with occasional sublime moments. But at least I am my own master when I deploy my apps to the Web.

So the solution to the "arbitrary non-functional nonsense and technical hurdles" of the native App Stores is web development? As if that doesn't have tons of arbitrary non-functional nonsense and technical hurdles itself compared to native development...


Sandboxes are a good idea.

The bizarre hoops that Apple makes you jump through to actually use your app's sandbox if you're not an Objective C programmer are not.


Well, it's not like they can have a sandbox for any arbitrary language, right? Doesn't it have to correspond to some ABI?


I'm pretty sure the browser sandbox is more restrictive than the MAS one.


Maybe so, but you're missing out on the big win with a proper App--the ability to invade users' privacy (read their address book, emails, SMSs, etc) basically at will.


Awesome




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: