Arc Forumnew | comments | leaders | submitlogin
Semi-Arc on Android
7 points by suzuki 4708 days ago | 24 comments
I have ported my Arc interpreter (Semi-Arc) to Android (API 10). Indeed it just runs as in the normal Java. All I did was to emulate a console I/O.

  Semi-Arc on Android
  http://www.oki-osk.jp/esc/llsp/and1.html
The article is written in Japanese, but I hope you read the program code and/or run the apk file.

  http://www.oki-osk.jp/esc/llsp/and1/SemiArcActivity-release.apk


3 points by akkartik 4708 days ago | link

I'm reading this translation -- and trying to figure out how one installs .apk files on an android phone.

http://translate.google.com/translate?u=http://www.oki-osk.j...

Edit: Holy crap, it was really easy to install! This is blowing my mind, to see an 'arc>' prompt on my phone!!

-----

3 points by akkartik 4708 days ago | link

Screenshot: http://plus.google.com/110440139189906861022/posts/19og96KTV...

The session reinitializes everytime the screen rotates, autocomplete keeps trying to remove the space before commas (pro tip: add two spaces before commas), but who cares. I CAN PROGRAM ON MY PHONE[1]. suzuki, thank you, thank you for semi-arc.

[1] Without submitting to some arbitrary bureaucratic process that makes me not even want to try.

-----

3 points by rocketnia 4707 days ago | link

"The session reinitializes everytime the screen rotates"

@suzuki:

It might help to configure the Android project's manifest as described here: http://stackoverflow.com/questions/1512045/how-to-disable-or...

I don't know if onSaveInstanceState() is really possible to implement well without serializable continuations, but other Android REPLs work pretty well (particularly Ruboto IRB!), so you might find some ideas there.

---

@akkartik:

"autocomplete keeps trying to remove the space before commas"

Autocomplete ruins my day too. ^_^ You might be able to go to "Settings > Language & keyboard" to configure it. If it still happens after that, installing a new keyboard oughta help. At least it'll give you a fresh set of quirks to deal with. :-p

-----

1 point by kinleyd 4707 days ago | link

@rocketnia: "but other Android REPLs work pretty well (particularly Ruboto IRB!)"

Thanks for the info. Now I have both my languages of choice - Ruby and Arc - on my phone. My cup of joy runneth over.

-----

2 points by jsgrahamus 4707 days ago | link

Gambit Scheme is also in the MarketPlace

-----

1 point by kinleyd 4707 days ago | link

Thanks for the tip. It's pretty cool - can save and run scripts as well. I'm sure Semi-Arc will get there as well.

-----

1 point by thaddeus 4707 days ago | link

I admit, it's pretty cool, but I have wonder what it is you're planning to do with it that would make you run around in your underpants scaring your girlfriend... Lol... So can you fill us in on your plans or is it a hush hush world domination kinda thing?

[edit]

I am also asking to get people brainstorming on the possibilities, for when I sat down to think about what I could do with it I came up with nothing... So I think I'm lacking creativity or inspiration this week!

-----

1 point by akkartik 4707 days ago | link

Lol.

I was reminded of http://ycombinator.com/rfs5.html.

At least part of the excitement was in the fact that I didn't have to go through an 'app marketplace'. When everything about modern devices seems to involve jumping through endless hoops, it was a relief to have a nice experience.

Sometimes you have to use it for a while, and wait for ideas to form..

-----

2 points by kinleyd 4708 days ago | link

I second the holy crap sentiment - it is a thrill to see the arc> prompt on the phone. Great job!

-----

1 point by jsgrahamus 4707 days ago | link

Not finding how to install this app.

-----

2 points by kinleyd 4707 days ago | link

Just download the apk, (push to your android phone if you download to your computer), and in your phone file manager, press the apk. It should offer to install, if you've allowed non-market apps on your phone. If not, enable non-market apps and it should then work.

Note: I've also added Semi-Arc to our Arc Lang Wiki.

-----

1 point by jsgrahamus 4707 days ago | link

Thanks. It would not install. Have posted more info above.

-----

1 point by jsgrahamus 4707 days ago | link

I have an older phone (T-Mobile G-1) and in trying to load the apk, I get the message:

org.example.semi_arc could not be installed on this phone.

Could this be changed to accomodate older phones with AndroidOS 1.6?

Thanks, Steve

-----

2 points by kinleyd 4707 days ago | link

I'm not sure what Semi-Arc requires as the minimum Android version, though it looks like 1.6 isn't it. Why don't you root/flash your phone and get a newer AOSP? I've done that on my older Tattoo, which came with v. 1.6 and was never upgraded by HTC. As old as it was, it runs like a champ with Android 2.3.7 (I'm using CyanogenMod) - the latest version of Android before ICS was released.

-----

1 point by jsgrahamus 4706 days ago | link

Is there a URL which describes in detail a "safe" way of doing such? Thanks, Steve

-----

1 point by kinleyd 4706 days ago | link

Unfortunately, there are only "safer" ways, no guaranteed safe ways. Still, it's really worth the small risk and the practically new phone you get at the end of the process.

xda-developers provide good how-tos and documentation.

1) For the main G1 forum: http://forum.xda-developers.com/forumdisplay.php?f=448

2) Koush's how and "Why should you root your Dream/G1?": http://forum.xda-developers.com/showthread.php?t=442480

3) CyanogenMod 7.2.0 - The Official "KANGED" CM7: http://forum.xda-developers.com/showthread.php?t=1185027

Flashing methods vary by phone, so the method you'd need to follow for the G1 will be different from mine. These three links should get you on top of it quite quickly.

In my experience, the Titanium Backup app proved most useful in storing away all my data, and after rooting your phone, Koush's ROM Manager provided a way to back up my original firmware just in case I ever wanted to go back to it.

-----

1 point by jsgrahamus 4705 days ago | link

Oh, with the new phone, did you experience greater battery drain?

-----

1 point by rocketnia 4705 days ago | link

I'm not the person you're asking here, and I don't know the answer, lol, but the number one reason I'd install a custom ROM is to get rid of the bloatware that's taking up my phone's precious internal memory, and no doubt its battery life too. ^_^

Speaking of internal memory, that's an issue you're very likely to have on a G1, which only has 74MB. According to (http://androidandme.com/2009/08/news/t-mobile-g1-owners-dont...), that's the very reason there's no official upgrade to 2.2. Even if CyanogenMod somehow fits Android 2.2 on the G1, how much space does it leave for apps? O.o

-----

1 point by kinleyd 4704 days ago | link

Yes, there was a slight increase in battery consumption after the upgrade. However, this was more than made up by all the other functionality flashing gave me. Though I haven't tried it myself, you can customize the clock speed of your phone to optimize battery life, if that is crucial to you.

Getting rid of bloatware is one great reason to flash a custom ROM, and in this category I include Samsung's Touchwiz, Motorola's Motoblur and HTC's Sense themes. Though they look visually attractive (at first glance) they are the number one reason these companies don't upgrade the firmware - they are just unable to upgrade each version of the customization for each phone they release.

Regarding internal storage space limitations, the custom ROMs allow you to store your apps on your microSD card, thus removing the limits faced by the G1 under v. 1.6. Notwithstanding the link @rocketnia referenced, I'd say Gingerbread 2.3.7 should pose no problem for your G1. Why, because Koush (Koushik Dutta) wrote up the how to of flashing the G1, and Koush knows something about flashing ROMs (he's the author of ClockWorkMod and ROM Manager, both wildly successful Android apps).

The new ROM will also open up your phone to all the latest apps which just won't run on Android 1.5 or 1.6. Besides, CyanogenMod is really well designed and intuitive, far more so than HTC Sense or Samsung Touchwiz (I haven't had much experience with Motoblur).

-----

2 points by rocketnia 4704 days ago | link

"Yes, there was a slight increase in battery consumption after the upgrade."

Oh, drat. I stand corrected.

---

"I haven't had much experience with Motoblur"

Well, then maybe we make up for each other's inexperience a bit. You know way more about flashing ROMs than I do, and I've been getting by with Motoblur, lol.

---

"the custom ROMs allow you to store your apps on your microSD card"

Are you just referring to Android 2.2's "Move to SD card" or something more comprehensive than that?

Even if I could move the executable parts of an app to the SD card (as I can't do with 2.2), I might not want to if it causes the app to terminate when I mount the SD card from another computer over USB. Of course, for certain apps that might be more than okay (e.g. games).

-----

1 point by kinleyd 4704 days ago | link

'Are you just referring to Android 2.2's "Move to SD card"...?'

Yes. And you are right, mounting the SD Card via USB makes it unavailable to the phone, with all the consequences. However, you can avoid the need to mount it by using the Android Debug Bridge (adb) command line tool from the computer to push and pull files, etc. A small price to pay for a taste of the latest Android flavour, what? :)

Regarding the battery consumption, I have to say that I didn't scientifically benchmark the difference. I did tend to use the phone much more after flashing the new ROM so that itself was a contributing factor. My bias was completed by reports of others experiencing a quicker drain, but again, I have to say it has never been a deal breaking drain that ever made me consider reverting to the original firmware.

-----

1 point by jsgrahamus 4705 days ago | link

Thanks so much.

-----

1 point by kinleyd 4704 days ago | link

I just checked the Android API versions. The API 10 that suzuki mentioned corresponds to Android 2.3.3, so that would have some bearing on the minimum version you'd need though I'm not sure if it would be 2.3.3 itself.

I would guess it should be possible to create the repl in an older API, but I couldn't be sure.

-----

2 points by anarcer 4708 days ago | link

Great job ! Can you put Semi-Arc on Android Market, please?

-----