
Show HN: Lua/C for mobile devices – Please tell me what you think - vladpalos
https://github.com/vladpalos/PrimaLuce
======
hwh
It is a nice little hacking project. However, it is not built on top of the
Kernel (which would be possible using e.g. something like ljsyscall).

A look over at LuaJIT and its FFI would probably also be nice in the context
of this project.

However, it is probably deemed to be a little pet project forever. It does
away with about everything that Android provides, including the developer APIs
that are often implemented in a proprietary way the closer you get to the
driver layer.

The "Android without cumbersome Java and NDK" (from another comment) is -
arguably - not an Android at all. It is a Linux kernel and the glibc, with
lots of the hardware not accessible.

I've been going through a remotely similar experience when working on and with
the Koreader project
([http://github.com/koreader/koreader](http://github.com/koreader/koreader), a
document/ebook reader software aimed at e-ink devices, which often come with
not much beside the kernel and glibc, plus a framebuffer to play on) and it
takes some major design effort to create a proper event/GUI framework. Which
we did in the Koreader project using Lua, too - it's just so nice a Language
to prototype with. For Android - a platform we support for devices - we went
via NDK (only a small wrapper, [https://github.com/koreader/android-luajit-
launcher](https://github.com/koreader/android-luajit-launcher)). Though we
have an SDL (1&2) backend, too, in addition to a purely Kernel
framebuffer/input API oriented backend. Maybe worth a look, though also maybe
an overwhelming amount of code to begin with.

~~~
fit2rule
>>The "Android without cumbersome Java and NDK" (from another comment) is -
arguably - not an Android at all. It is a Linux kernel and the glibc, with
lots of the hardware not accessible.

MOAI suits the bill in this regard - all the hardware is available, and in
some ways the MOAI host is more of a host OS than anything else .. giving true
freedom, but of course more responsibility: the GUI frameworks available are
not as polished (yet) as they are in the Android sphere but for some this may
well be a positive argument for involvement in a non-vendor approach in the
first place ..

MOAI: [http://getmoai.com/](http://getmoai.com/) Hanappe GUI for MOAI:
[http://github.com/makotok/Hanappe](http://github.com/makotok/Hanappe)

------
fit2rule
The idea to build a full operating system in Lua/C is a good one .. and in
fact there are others working on a similar effort. I know the luvit guys
(luvit = node in Lua) are interested, and in the MOAI
([http://getmoai.com/](http://getmoai.com/)) community there have been
rumblings as well. An embedded OS with luvit for the backend and MOAI for the
front-end would seriously kick ass .. in fact, I think I'll work on that. :)

~~~
justincormack
Also my project ljsyscall
[https://github.com/justincormack/ljsyscall](https://github.com/justincormack/ljsyscall)
\- you can run this on bare metal on Xen and other platforms too as well as
under Linux/OSX/BSD.

~~~
fit2rule
Wow, nice! I'm going to give this a bit of a spin ..

------
vladpalos
Hey,

First of all thank you for all the comments!

@fit2rule: Yes, that is exactly my intention! I've also been working on a
MOAI-based game and I love MOAI and the guys behind it. It also has a great
enthusiastic community and a great/clean C++ source code. That is my next
move: to use MOAI. And I think Luvit is also great (on my TODO list there is
also a LuaJIT integration so Luvit will fit perfectly).

@hwh: You're right. It's not built on top of the kernel, it uses the Android-
flavor kernel. Also koreader looks like a great project!

@StavrosK: Thank you! That's not forgivable :) I think I was overenthusiastic.

@dimman: Thank you! I was in a hurry but I'll fix that.

It's really nice to see so many people interested in this! I'll keep you
posted!

------
realrocker
Bravo. AOSP hacker of 4 years and I have been meaning to write something like
this for a while but never got around to it. Would love to contribute. Please
add a few guidelines to the README.

------
StavrosK
Great job! By the way, pet peeve: It's Lua, not LUA.

------
lubonay
This looks like a great idea, I'll be tracking its development for sure.
Android without cumbersome Java and NDK sounds like pure bliss.

~~~
pjmlp
That won't be Android by definition.

[http://commons.wikimedia.org/wiki/File:Android-System-
Archit...](http://commons.wikimedia.org/wiki/File:Android-System-
Architecture.svg)

------
dimman
Quick note: Looks like you've checked in your swap files filename.c~ in the
repository. These should probably be deleted and add an entry to ignore *.c~
in the gitignore file.

