
Clojure on the Mac App Store - gw
https://nightweb.net/blog/clojure-on-mac-app-store.html
======
elwell
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.

~~~
ihuman
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.

------
wiradikusuma
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)

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

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

~~~
AndreasFrom
Mobile? Wouldn't that be even harder?

~~~
pjmlp
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.

~~~
Flow
Tried compiling Clojure->Scheme->C?

~~~
pjmlp
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.

------
lvh
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.

~~~
acj
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.

------
edwinnathaniel
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...](http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html)

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

~~~
gw
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.

~~~
edwinnathaniel
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 :).

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

------
dopamean
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.

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

~~~
NoodleIncident
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.

~~~
stcredzero
_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.

------
jgalt212
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?

~~~
coolsunglasses
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 :)

~~~
jonnybgood
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.

------
EdSharkey
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.

~~~
coldtea
> _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...

~~~
pjlegato
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.

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

------
visualR
Awesome

