Join Today
+ Reply to Thread
Page 5 of 5 FirstFirst 12345
Results 41 to 48 of 48
Like Tree12Likes

Thread: APP: Lua and Perl

  1. Default

    Just post my new version of javascript shell here:

    1. Strip down the file, remove all debug symbol to make file smaller. Now it only 857K and support all 1.7 feathure (include E4X) and NSPR.
    2. Add NSPR support.

    = NSPR test ===================================
    js> var file=new File("cat /proc/version |");
    js> file.open()
    true
    js> Linux version 2.4.20_mvlcee31-mainstone_pxa27x (BJDC@LINUX) (GCC 3.x for XSCALE) #1 Jan 1,2003

    js> file.close()
    true
    js> file=new File("/mmc/mmca1/.system/java/CardRegistry");
    js> file.open();
    true
    js> var text=file.readAll();
    js> print(text);
    .....
    js> file.close();

    =========================================



    ==E4X=====================================

    js> var doc=<document>
    <node name="node1" id="1"/>
    <node name="node2" id="2"/>
    </document>;
    js> print(doc.toXMLString());
    ...
    js> print(doc.node.(@id==1).@name);
    node1
    js>
    ===========================================

    ==PROGRAM==================================

    // -- Save this as list.js -------------------------------
    function listApps()
    {
    var file=new File("/mmc/mmca1/.system/java/CardRegistry");
    file.open();
    var text=file.readAll();

    for (var i=0;i<text.length;i++)
    {
    var str=text[i];
    var m=str.match(/Name\s*=\s*([^\s]+)/);
    if (m!=null){
    print(m[1]);
    }
    }
    }
    listApps();


    //-- END of list.js ------------------------------------

    Use command: js list.js to list all the installed program on the SD card.
    ===========================================

    enjoy it.




    Attached Files Attached Files
    Embedded linux lover

  2. #42

    Default

    This is great, thank you, my favorite language ever
    I hope it supports all nice techniques, such as JSON style. Great that it support basic IO, even for files, this gives a lot of options. I'll test it tomorrow.

    Btw, I moved the MOHATO project (that is, the actual MOHATO I described + everything-i-will-port) to other topic: http://www.motorolafans.com/forums/d...-tools-e6.html
    And in here let's stay with interpreters/compilers/whatever for our godly mobile devices!

    If only I could find a way to use bluetooth from native program... [evil plans arise...]

  3. #43

    Default

    wow...

    @puppetshow: How's GCC port going? Is there any chance to include Objective-C libs?

  4. #44
    Join Date
    Jan 2008
    Location
    Romania
    Posts
    785

    Default

    @HiFly
    I don't understand a single word that you're saying...
    .
    @redice
    sorry for not updating yet with that version but my internet f..kin' died for 2 days.
    .
    .
    .
    SCRIBI UPDATE 4:
    + Improved JavaScript
    .
    LINK
    Last edited by BruceLee; 07-29-2008 at 05:50 AM.

  5. #45

    Default

    Sorry for no updates for long time, was a bit busy

    http://dl.getdropbox.com/u/28596/Motorola/python.7z - python. No libs included, so it will yell at you while starting, but it should work. At least, "hello world" worked

    http://dl.getdropbox.com/u/28596/Motorola/bash.7z - improved bash. I included nice patch for it, that is "command_not_found_handle" (common in debian-based systems).
    Code:
    function command_not_found_handle {
    /bin/busybox $1;
    return $?;
    }
    Poof! All commands not known to system will be first redirected to busybox. If it won't find one as well, it'll drop error. Obviously, you can set it to something else than busybox, it can be anything. Sadly, it should be typed into console every time (or $(cat a), where 'a' is a file containing it), because bugged kernel reports all files in memory card as 64 Terabytes (!) and this, real bash, can't source files. It can execute them, so well..

  6. #46
    Join Date
    Jan 2008
    Location
    Romania
    Posts
    785

    Default

    now my turn to be sorry for not updating yet... i had problems with my internet connection again. updating

  7. #47

    Default

    One more thing. If you want all standard libs for python, and you're using MOHATO to run python, download normal python package, extract it and copy all *.py files from it to
    Code:
    /mmc/mmca1/.mohato/usr/local/lib/python2.5
    Same goes for ruby:
    Code:
    /mmc/mmca1/.mohato/usr/local/lib/ruby/site_ruby
    But you'll need recompiled version from here: http://dl.getdropbox.com/u/28596/Motorola/ruby.7z (re-download it)

    For guys who need cgi version of php (standard is cli) there is also http://dl.getdropbox.com/u/28596/Motorola/php-cgi.7z
    But don't include it into scribi, as it's output is html, so is no use for console or starting scripts, cli version is better. Cgi could be used with busybox httpd, to serve php-based pages from your phone xD

  8. #48
    Join Date
    Jan 2008
    Location
    Romania
    Posts
    785

    Default

    SCRIBI UPDATE 5
    + Improved Bash
    + Added Python support


    Currently supported extensions:



    LINK
    Last edited by BruceLee; 08-02-2008 at 09:32 PM.
    Dark Avenger likes this.


 
+ Reply to Thread
Page 5 of 5 FirstFirst 12345

Similar Threads

  1. How I Can Install Python or Perl in A1200
    By KASRA in forum A1200 General Chat
    Replies: 23
    Last Post: 01-04-2009, 10:35 AM
  2. need perl compiler on a1200
    By m41d3n in forum Development
    Replies: 2
    Last Post: 03-17-2008, 09:11 AM
  3. Can Perl b used for dev E6 application...?
    By sridi in forum E6 General Chat
    Replies: 4
    Last Post: 02-01-2008, 07:36 AM
  4. Q: Need something for perl and c++ scripts??
    By m41d3n in forum A1200 General Chat
    Replies: 1
    Last Post: 01-23-2008, 09:32 PM
  5. Perl on E680 ?
    By tt930 in forum E680 General Chat
    Replies: 1
    Last Post: 05-04-2005, 07:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Optimization by vBSEO 3.6.0 RC 1