Re: SISC Scheme on Android's Dalvik VM

Chad Albers <[email protected]> Mon, 8 Feb 2010 12:00:55 -0500
Newsgroups gmane.comp.java.sisc.user
Message-ID <[email protected]>
--===============6244893852085611459==
Content-Type: multipart/alternative; boundary=00148503ec74960a58047f19be9f

--00148503ec74960a58047f19be9f
Content-Type: text/plain; charset=UTF-8

That's good news.  I see that the code is there...I was just trying to
figure out 1) under what use case would it be invoked and 2) if it would be
needed at all on Dalvik VM.  Android does ship with Dalvik Dex ode loader,
but no dex code class writer.

If I don't have to worry about the bytecode business, the remaining tasks
probably are:

   1. Remove the java bean dependencies - (which would in turn remove the
   awt app context dependencies - as far as I can see).  The java beans stuff
   seems to have something to do with loading the dynamic properties - either
   on the cli, the proprieties file, or using the scheme names.  I could be
   wrong about that.   The code is related to the NativeParameter class.  Does
   anyone know what that does?  How is it native?  And what parameter is it?
   2. Getting fibronnaci recursion to work in the REPL....without such a
   sophisticated recursion, I don't think there's much point to scheme on
   Dalvik.  (Half of me wants to believe this may indicate a dalvik bug)
   3. Getting the SISC context to play nice with a Dalvik app context

I really want to get this thing to work.  I really want to make Scheme a
practical solution on Android.  Trouble is that I'm not really a Java
programmer....just a good troubleshooter.  (I'm actually more of a Ruby
developer!).  By the end of this, I may be a java programmer.  Bigger guns
than mine ar needed.  I was hoping that my post would generate some more
interest around SISC.

Chad



--
Chad Albers
http://www.neomantic.com
(pgp signature available on request)


On Mon, Feb 8, 2010 at 11:30 AM, Scott G. Miller <[email protected]> wrote:

> On Sun, Feb 7, 2010 at 10:32 AM, Chad Albers <[email protected]>wrote:
>
>> Yes, since I surprisingly managed to instantiate an Java class on android,
>> I do really think it would be possible to get at the android.* classes if I
>> managed to embed SISC inside an android app.
>>
>> What I'm very confused about is how that is even possible. SISC's s2j
>> module is depends on the ASM java bytecode libary.  But Davilk using dex
>> bytecode.  I'd have to figure out when SISC is using the ASM libraries, and
>> somehow make it work with dex bytecode instead - a non-trivial task.  I'm
>> not aware of any libraries out there that actually enables the generation of
>> dex bytecode.  If anyone has any information or advice on this issue, I
>> would greatly appreciate it.
>>
>>
> s2j doesn't yet depend much on ASM.  That was in progress code to allow
> extension of classes (something you can't do at runtime in Java without
> compiler support).  So you should be able to avoid ASM for this.
>
> Scott
>
>
>> Chad
>>
>> --
>> Chad Albers
>> http://www.neomantic.com
>> (pgp signature available on request)
>>
>>
>> On Sun, Feb 7, 2010 at 10:38 AM, Friedrich Delgado Friedrichs <
>> [email protected]> wrote:
>>
>>> Hi!
>>>
>>> Chad Albers schrieb:
>>> > If anyone is interested, I managed to get SISC to partially work on
>>> > Android's Dalvik VM.  Here's how:
>>> >
>>> > http://www.neomantic.com/tutorials/sisc-scheme-on-androids-dalvik-vm
>>> ---Zitatende---
>>>
>>> That was an interesting read, thanks!
>>>
>>> It would be nice to have a scheme interpreter with full access to the
>>> android api, and your findings look like that's not impossible :)
>>>
>>> --
>>>        Friedrich Delgado Friedrichs <[email protected]>
>>>                             TauPan on Ircnet and Freenode ;)
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> The Planet: dedicated and managed hosting, cloud storage, colocation
>>> Stay online with enterprise data centers and the best network in the
>>> business
>>> Choose flexible plans and management services without long-term contracts
>>> Personal 24x7 support from experience hosting pros just a phone call
>>> away.
>>> http://p.sf.net/sfu/theplanet-com
>>> _______________________________________________
>>> Sisc-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/sisc-users
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the
>> business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>> _______________________________________________
>> Sisc-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/sisc-users
>>
>>

--00148503ec74960a58047f19be9f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

That&#39;s good news. =C2=A0I see that the code is there...I was just tryin=
g to figure out 1) under what use case would it be invoked and 2) if it wou=
ld be needed at all on Dalvik VM. =C2=A0Android does ship with Dalvik Dex o=
de loader, but no dex code class writer.<div>
<br></div><div>If I don&#39;t have to worry about the bytecode business, th=
e remaining tasks probably are:</div><div><ol><li>Remove the java bean depe=
ndencies - (which would in turn remove the awt app context dependencies - a=
s far as I can see). =C2=A0The java beans stuff seems to have something to =
do with loading the dynamic properties - either on the cli, the proprieties=
 file, or using the scheme names. =C2=A0I could be wrong about that. =C2=A0=
 The code is related to the NativeParameter class. =C2=A0Does anyone know w=
hat that does? =C2=A0How is it native? =C2=A0And what parameter is it?</li>
<li>Getting fibronnaci recursion to work in the REPL....without such a soph=
isticated recursion, I don&#39;t think there&#39;s much point to scheme on =
Dalvik. =C2=A0(Half of me wants to believe this may indicate a dalvik bug)<=
/li>
<li>Getting the SISC context to play nice with a Dalvik app context</li></o=
l></div><div><div><div>I really want to get this thing to work. =C2=A0I rea=
lly want to make Scheme a practical solution on Android. =C2=A0Trouble is t=
hat I&#39;m not really a Java programmer....just a good troubleshooter. =C2=
=A0(I&#39;m actually more of a Ruby developer!). =C2=A0By the end of this, =
I may be a java programmer. =C2=A0Bigger guns than mine ar needed. =C2=A0I =
was hoping that my post would generate some more interest around SISC.</div=
>
<div><br></div><div>Chad</div><div><br></div><div><br></div><div><br clear=
=3D"all">--<br>Chad Albers<br><a href=3D"http://www.neomantic.com">http://w=
ww.neomantic.com</a><br>(pgp signature available on request)<br>
<br><br><div class=3D"gmail_quote">On Mon, Feb 8, 2010 at 11:30 AM, Scott G=
. Miller <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]">sgmill=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">On Sun, Feb 7, 2010 at 10:32 AM, Chad Albers <span dir=3D=
"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">calber=
[email protected]</a>&gt;</span> wrote:<br></div><div class=3D"gmail_quote"><=
div class=3D"im">
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Yes, since I surprisingly managed to instantiate an Java class on android, =
I do really think it would be possible to get at the android.* classes if I=
 managed to embed SISC inside an android app. =C2=A0<div><br></div><div>Wha=
t I&#39;m very confused about is how that is even possible. SISC&#39;s s2j =
module is depends on the ASM java bytecode libary. =C2=A0But Davilk using d=
ex bytecode. =C2=A0I&#39;d have to figure out when SISC is using the ASM li=
braries, and somehow make it work with dex bytecode instead=C2=A0- a non-tr=
ivial task. =C2=A0I&#39;m not aware of any libraries out there that actuall=
y enables the generation of dex bytecode. =C2=A0If anyone has any informati=
on or advice on this issue, I would greatly appreciate it.<div>


<div><div><br></div></div></div></div></blockquote><div><br></div></div><di=
v>s2j doesn&#39;t yet depend much on ASM. =C2=A0That was in progress code t=
o allow extension of classes (something you can&#39;t do at runtime in Java=
 without compiler support). =C2=A0So you should be able to avoid ASM for th=
is.</div>

<div><br></div><font color=3D"#888888"><div>Scott</div></font><div><div></d=
iv><div class=3D"h5"><div>=C2=A0</div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><=
div><div>
<div></div><div>Chad</div><div><br></div><div><div>
--<br>Chad Albers<br><a href=3D"http://www.neomantic.com" target=3D"_blank"=
>http://www.neomantic.com</a><br>(pgp signature available on request)<br>
<br><br></div><div class=3D"gmail_quote"><div><div></div><div>On Sun, Feb 7=
, 2010 at 10:38 AM, Friedrich Delgado Friedrichs <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a=
>&gt;</span> wrote:<br>

</div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>
Hi!<br>
<br>
Chad Albers schrieb:<br>
<div>&gt; If anyone is interested, I managed to get SISC to partially work =
on<br>
&gt; Android&#39;s Dalvik VM. =C2=A0Here&#39;s how:<br>
&gt;<br>
&gt; <a href=3D"http://www.neomantic.com/tutorials/sisc-scheme-on-androids-=
dalvik-vm" target=3D"_blank">http://www.neomantic.com/tutorials/sisc-scheme=
-on-androids-dalvik-vm</a><br>
</div>---Zitatende---<br>
<br>
That was an interesting read, thanks!<br>
<br>
It would be nice to have a scheme interpreter with full access to the<br>
android api, and your findings look like that&#39;s not impossible :)<br>
<font color=3D"#888888"><br>
--<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0Friedrich Delgado Friedrichs &lt;<a href=3D"mai=
lto:[email protected]" target=3D"_blank">[email protected]</a>&gt;<br>
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 TauPan on Ircnet and Freenode ;)<br>
</font><br></div></div>----------------------------------------------------=
--------------------------<br>
The Planet: dedicated and managed hosting, cloud storage, colocation<br>
Stay online with enterprise data centers and the best network in the busine=
ss<br>
Choose flexible plans and management services without long-term contracts<b=
r>
Personal 24x7 support from experience hosting pros just a phone call away.<=
br>
<a href=3D"http://p.sf.net/sfu/theplanet-com" target=3D"_blank">http://p.sf=
.net/sfu/theplanet-com</a><br>_____________________________________________=
__<br>
Sisc-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Sisc-=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/sisc-users" target=
=3D"_blank">https://lists.sourceforge.net/lists/listinfo/sisc-users</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>-----------------------------------------------------------------------=
-------<br>
The Planet: dedicated and managed hosting, cloud storage, colocation<br>
Stay online with enterprise data centers and the best network in the busine=
ss<br>
Choose flexible plans and management services without long-term contracts<b=
r>
Personal 24x7 support from experience hosting pros just a phone call away.<=
br>
<a href=3D"http://p.sf.net/sfu/theplanet-com" target=3D"_blank">http://p.sf=
.net/sfu/theplanet-com</a><br>_____________________________________________=
__<br>
Sisc-users mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Sisc-=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/sisc-users" target=
=3D"_blank">https://lists.sourceforge.net/lists/listinfo/sisc-users</a><br>=
<br></blockquote></div></div></div>
</blockquote></div><br></div></div></div>

--00148503ec74960a58047f19be9f--


--===============6244893852085611459==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--===============6244893852085611459==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Sisc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisc-users

--===============6244893852085611459==--