Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
PilBox – Building Mobile Apps in PicoLisp (mail-archive.com)
77 points by tankfeeder on March 12, 2017 | hide | past | favorite | 15 comments


> An Adroid SDK project is a monster. Here, on my installation, the "PilBox/" folder contains more than ten thousand files!

It's sad when a clean slate project for a platform created when we should have known better decades ago still ends up with this kind of overhead.

It perfectly matches my recollection of doing Android development too: a big uncontrollable mess of different kinds of files whose inter-dependencies and relations are completely opaque.


Another good option if you want to write Android apps in Lisp is lein-droid [1] which allows you to use Clojure on Android. This means you can use any standard Android API, library or SDK in your app without additional bridge components.

The initial build & deploy times for Clojure on Android are annoying, but using a REPL to edit your Android app dynamically is amazing.

[1] https://github.com/clojure-android/lein-droid


Note that in PilBox you can also directly call the standard Android API, and use the REPL of course.

Taking a picture, for example, needs only

   (android~takePicture (tmp "img")
      '((Intent)
         (... do something with the image) ) )

The function 'takePicture' is in "lib/android.l":

   (de takePicture (Dst Fun)
      (startActivityForResult Fun
         "android.media.action.IMAGE_CAPTURE"
         "output" (fileUri Dst) ) )


You can also use ClojureScript on React Native for both iOS and Android. Lets you use things like reagent or re-frame that work well with persistent data structures. It's actually super easy with Expo, which makes it so you don't have to do any Xcode or Android Studio stuff: https://docs.expo.io/versions/v14.0.0/guides/using-clojuresc...


I would highly recommend this! I use re-natal and it lets you target Android and iOS (simultaneously if you really want to) with live code reloading and native UI elements. Reagant + re-frame is a very pleasant setup for UI development and handling data flows.


You mentioned doing an app with re-natal around 3 months ago - did you succeeded with it? Sorry for spamming here, no email on profile ;)


I have been following the dev of PicoLisp for a long time; Alexander is great. He keeps going strong for decades. He keeps the PicoLisp platform going with additions like this. Impressive.


I'm still super shocked that Google doesn't expend more effort to get more languages running on Android.

It feels like a no-brainer for them to want straightforward usage with, say, Python. Is it really a performance thing?


No, it is a political thing.

I guess the Java bias is very strong among the ex-Sun and ex-Danger OS developers that have joined the team since the early days.

You see this on Google IO presentations from the last couple of years, when the audience asks about alternatives, including existing JVM languages.


With the legal issues they have had with Oracle, I'm surprised they didn't move on from the JVM/Java much earlier.


Well, they started them, by not wanting to play ball.

And since I expect someone to post Jonathan Schwartz public comment commending them, here goes what Gosling had to say about it.

"We were all really disturbed, even Jonathan just decided to put on a happy face and tried to turn lemons into lemonade, which annoyed a lot of folks at Sun."

https://www.wired.com/2012/04/gosling-slime/

Companies like IBM, Atego, Aicas, MicroEJ, Excelsior, ARM among many others, never had known issues dealing with either Sun or Oracle licenses, while providing their own Java compilation chains and hardware specific APIs.


They're kind of trying with Dart and https://flutter.io/


Actually that is more the Dart team searching for ways to stay relevant, than the Android team caring about it.


From looking at the the Java files in the linked tarball as well as the documentation[1], it seems that PicoLisp calls Java by sending serialized messages through pipes from a separate processes and then invokes the Java reflection APIs.

So trying to use this to build an Android app with the native (i.e. Java) Android UI libraries probably wouldn't work too well, right?

[1] http://picolisp.com/wiki/?javacode


Always good to see PicoLisp on HN.




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

Search: