
Build Android Apps in PicoLisp Without an Android SDK - homarp
https://picolisp.com/wiki/?pilbox
======
klez
Out of curiosity, OP: did you fall in the same rabbit hole I fell into after
reading the article about the chorded keyboard, finding the link to the
picolisp wiki and seeing the snippets about showing notifications on Android
via picolisp?

~~~
qop
I'd love to see like a browser extension to news aggregators that works like
that. I'm sure there are lots of things a few clicks away from a lot of the
articles that get posted.

------
speps
This is similar to how LÖVE games work on Android [1], you download the app
from the store and then load a .zip file of your game and it runs inside that.
You can then make it into its own app and publish it to the store.

[1] [https://bitbucket.org/MartinFelis/love-android-
sdl2/wiki/FAQ...](https://bitbucket.org/MartinFelis/love-android-
sdl2/wiki/FAQ_-_Frequently_Asked_Questions)

~~~
veli_joza
LÖVE is awesome and Android port works great. The fastest interpreted language
that also happens to be elegant and easy to learn, coupled with dead-simple
input/graphics/audio/physics API you can actually remember. The APK is tiny
when compared to other frameworks, some 4 Mb + assets.

------
zerr
Kind of LambdaNative?
[http://www.lambdanative.org/](http://www.lambdanative.org/)

~~~
nine_k
A bit.

But what fills _me_ with joy is the REPL. It's hugely helpful when trying to
make use of unfamiliar APIs.

~~~
pjmlp
On limited input devices as tablets and phones I haven't yet found anything
better than Lisping.

[https://appadvice.com/app/lisping/512138518](https://appadvice.com/app/lisping/512138518)

Which appears to no longer be available.

------
kristianp
I'm slightly confused by this paragraph, what is being emulated and aren't
most android devices 32 bit these days?

"It comes with PicoLisp binaries for Arm64 pre-installed. If your device has
an Arm32 CPU, you can - after installing the PilBox App but before starting it
- download and install the emulator version [https://software-
lab.de/arm32.zip](https://software-lab.de/arm32.zip). If this was done by
mistake, you can revert to Arm64 binaries with..."

~~~
jacknews
I'm confused too, how do you install the zip file?

Even one of the feedback posts mentions problem solved by "just installing the
emulator version".

So I download arm32.zip in, say, firefox, and then what? Open it with PilBox
just crashes. Clicking it in a file manager shows me the zip contents. Am I
supposed to extract it somewhere? I'm not rooted so can't see the app dirs.

~~~
Regenaxer
The easiest way seems to be to download it with a browser, and then
immediately click on "open" in the little dialog which pops up in the browser
after it downloaded the zip. It is then passed to PilBox.

Clicking on a Zip in the Downloads app works on some devices, but other
systems only offer to extract the files which does not help here.

------
alexis_read
I have a node-red instance that does a similar thing, to allow drag-n-drop
programming (Including UI), and (using dnr) heterogeneous cluster processing
on mobiles (ios and android).

It starts a node-red server on the device, and uses cordova to host the
webview.

I'm in the process of adding an ag-grid node so you can do complex UIs in the
dev environment on the phone/tablet.

[https://github.com/alexisread/noreml](https://github.com/alexisread/noreml)

------
hardwaresofton
tl;dr on how it works:

> The PilBox App itself (called the "PilBox kernel") is written in Java, the
> normal Android way. It displays a WebView GUI, and starts a PicoLisp binary
> compiled for Arm64 CPUs. This binary may now run any PicoLisp program, by
> setting up a local web server where the WebView component connects to,
> possibly opening a database, and doing whatever is desired.

I think this is a really cool project and I'm all for new (to me) lisp
dialects doing their thing, but reading the main page, the tag line and copy
don't seem to match, for my definition of "simple":

> [picolisp is] Programming simplified!

> PicoLisp is a programming language, or really a programming system,
> including a built-in database engine and a GUI system!

These two statements seem to be at odds.

That aside, I do like the idea because I'm a huge fan of the HTML/JS/CSS
display paradigm for it's easy cross-platform support.

I also like reducing the "mobile app" to really just interacting with a single
local "edge" (which is what people are calling client-side programs these days
I think) server. Just me personally but I would love it if all frontend
development was reduced to HTML/CSS/JS -- I have no desire to learn
QT/GDK+/wxWidgets/whatever else (just like I don't like learning Java for
Android, Swift/ObjC for iOS, Java for Blackberry, etc), and firmly believe
that eventually performance will be comparable (or close enough to not matter)
and support for native features will be passable.

~~~
pjmlp
Easy cross platform at the expense of user experience.

~~~
regul8
Not to mention dev experience. JS is a horrible language that doesn’t scale
beyond script kiddie nonsense.

~~~
anaganisk
But but hundreds of top websites and now even unity uses js, definitely not
script kiddie

~~~
regul8
This is all by unfortunate necessity, certainly not by choice. The very raison
d’etre of languages like TypeScript that transpile to JavaScript is because of
the flaws of this hack language that simply found itself in the right place at
the right time in history

~~~
idiocyreigns
And it's all only temporary in light of WebAssembly.

------
zeveb
I wish that Armed Bear Common Lisp supported Android — that'd be awesome.

~~~
kuwze
It doesn’t? To my knowledge it generates .java files, right?

~~~
fiddlerwoaroof
It uses reflection in ways that Dalvik didn’t support last time I checked.

~~~
kazinator
Dalvik is discontinued, replaced by something called the Android Runtime.
Though that might also not support said reflection ways.

------
jacobush
AFAIK PicoLisp is pretty Arc-like so this should be doubly relevant here. :-)

~~~
3rdAccount
Yea...it uses "de" to define a function instead of "defun". People always hate
on it for no macros, but macros don't make since when you only have an
interpreter. I don't fully understand how, but I've heard people in the past
explain how they're irrelevant in Picolisp and how you can still extend the
syntax with standard functions somehow. Maybe a picolisper could give some
examples?

Shout out that there are two free online books on Picolisp.

~~~
rurban
You dont need macros as you have fexpr's which don't evaluate it's arguments.
It fits much better into the language, and they are first class. See
[https://picolisp.com/wiki/?prosandcons](https://picolisp.com/wiki/?prosandcons)

And [https://software-lab.de/doc/refM.html#macro](https://software-
lab.de/doc/refM.html#macro) for the usage of macros.

More importantly it doesn't need lambda, just lists, and quote quotes all
arguments not just the first one. An extremely simple and small lisp-1
interpreter, comparable to the old AutoLISP.

------
bitmapbrother
I don't believe I've seen apps look like that since Android Cupcake. If you
really want to build apps without using Java or the Android SDK you should
look into Dart/Flutter.

~~~
rhodysurf
You still need the Android SDK to use Flutter on Android

------
hk-mars
I donnot like any lisp implemented by Java, very bad taste of developer
already.

~~~
projektfu
The Lisp is native. This is a Java app that coordinates a native binary
running pickup to present a web server that is used by the webview.

~~~
alexis_read
I have a node-red instance that does a similar thing, to allow drag-n-drop
programming (Including UI), and (using dnr) heterogeneous cluster processing
on mobiles (ios and android).

It starts a node-red server on the device, and uses cordova to host the
webview.

I'm in the process of adding an ag-grid node so you can do complex UIs in the
dev environment on the phone/tablet.

[https://github.com/alexisread/noreml](https://github.com/alexisread/noreml)

