Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offline edition for Android #3

Open
flowma opened this issue Dec 5, 2013 · 5 comments
Open

offline edition for Android #3

flowma opened this issue Dec 5, 2013 · 5 comments

Comments

@flowma
Copy link
Member

flowma commented Dec 5, 2013

On Anroid the easiest way to work offline will probably be to

  • build a java wrapper for the prolog code eg with JPL, tuProlog etc.
  • have it running as a local service
  • use a local browser or browser-like activity

Optionally one could

  • re-do the whole UI
  • just Java-wrap or cross compile the siteswap engine.
@rpaterson
Copy link

I spent some time getting prechacthis running on toProlog but couldn't get it to go. I suspect that this is because I don't know the first thing about Prolog though, rather than any fundamental incompatibility. Will work on it more later.

@rpaterson
Copy link

From what I can tell using SWI-Prolog with JPL on Android requires rooting the device, so if possible would be better to use some other solution. See http://www.swi-prolog.org/build/linuxonandroid.html

@imccoy
Copy link

imccoy commented Dec 16, 2013

It isn't too hard to get swi-pl to build using the android ndk. Making it work may be another story - my current version crashes with a stack trace full of frames that the debugger can't reconcile with functions, so that's fun.

My current plan is to try to get it basically working with android on x86 (at which point a UI could plausibly be developed), then attack arm. Happy to push what I've got up somewhere if anyone wants to poke at it with a stick.

@imccoy
Copy link

imccoy commented Dec 17, 2013

https://github.com/imccoy/prechac-droid has a thing that incorporates both swipl and prechacthis in a way that builds and runs through the NDK.

Right now it just runs a single prechacthis query and logs the results. It seems to work on both x86 and arm. There's some suggestions for directions for future work in the README of that prechac-droid repo. One other possible direction would be to bring it under the prechac project's umbrella.

I spent some time trying to get prechacthis working in pure-java prolog environment a while ago, but ran into a bunch of predicates that the environment didn't define (maybe assert/retract and friends, from memory? http://www.swi-prolog.org/pldoc/man?section=db)

@flowma
Copy link
Member Author

flowma commented Dec 17, 2013

Awesome work!! I need to have a look at this ASAP!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants