pocket newLISP?

Started by HPW, January 13, 2004, 11:05:15 PM

Previous topic - Next topic

HPW

I have asked this once, but now I ran across it another time.
Quote
You know, there are several other programming/scripting languages ported/created for the Windows CE platform -- PocketC, Perl, Python, nScript, and so on.

from this interview:

http://www.windowsfordevices.com/articles/AT3563056498.html">http://www.windowsfordevices.com/articl ... 56498.html">http://www.windowsfordevices.com/articles/AT3563056498.html



Home of Pocket GCC:

http://mifki.ru/pocketgcc/">http://mifki.ru/pocketgcc/



TCL port for Pocket PC:

http://mini.net/tcl/2946">http://mini.net/tcl/2946

ftp://ftp.tcl.tk/pub/incoming/tcltk844ce-arm.zip">ftp://ftp.tcl.tk/pub/incoming/tcltk844ce-arm.zip



So when I see all this interesting information, I come to the question if it is possible to get newLISP running on pocket PC.



I think newLISP would fit in there very good, because of it's size and performance.



Is it only a dream or possible future?
Hans-Peter

Lutz

#1
The only CE device I have, is from the late nineties with WinCE 1.0. At that time I tried to port newLISP to it, but ran in too much problems: how the memory was segmented in WinCE and a lot of functions (mainly I/O stuff) would not work on CE but would have to be recoded. The CE OS (at least at that time) did not have the usual filesystem but some other data and app storage facility.



The following questions:



(1) I would guess/hope that all these issues are different today?



(2) Are there free compile, debug and emulator tools available? I see a link to gcc, how about emulators? don't want to buy a CE.



(3) Is there other software on the CE, like GUI building stuff (i.e. Visual Basic), which could take advantage of a newLSIP DLL?



I also thought some (time ago) of porting to PALM-OS, there are free tools available (somewhat clumsy once back in 1999), and I reserved a 4-letter Id 'NLSP' with PALM at that time, which was required to host apps on the PALM. The PALM OS had similar issues with Memory and app/data storage as the CE has (but easier to use than CE's), and I abondoned it. Else I like the PALM-OS and use PALM as my PDA since it came out.



There is also a variety of LINUX PDA's, but I am not current, whats avalable now. On these PDA devices ia port should be the easiest.



Lutz

HPW

#2
>(1) I would guess/hope that all these issues are different today?



I hope the same! But I have not more knowledge than you on this.



>(2) Are there free compile, debug and emulator tools available? I see a link to gcc, how about emulators? don't want to buy a CE.



The only emulator I know of is the Visual Studio 2003 emulator. But as I said my knowledge is limited. I thought the GCC would be the basis which is needed to port to this device.



>(3) Is there other software on the CE, like GUI building stuff (i.e. Visual Basic), which could take advantage of a newLSIP DLL?



I posted the TCL/TK link to the port of TK. When it run on pockket PC you have the GUI like you use it under windows.
Hans-Peter

Lutz

#3
thanks for the info



Lutz

HPW

#4
On my question on the pocket GCC forum I get this:
Quote
I suggest that you just compile newlisp with the embedded Visual C++

development system from Microsoft which can be downloaded here:



http://msdn.microsoft.com/vstudio/device/embedded/download.aspx">http://msdn.microsoft.com/vstudio/devic ... nload.aspx">http://msdn.microsoft.com/vstudio/device/embedded/download.aspx



This fully complete (and totally free) development system is designed for

Pocket PC PDA software development.



There is also a Visual Basic compiler add-in



I have found this IDE to be as complete as the regular Development Studio.



Rgds,

Scott

from here:

http://groups.yahoo.com/group/pocketgcc/">http://groups.yahoo.com/group/pocketgcc/



Back to MS? Don't shure if it is worth to check.
Hans-Peter

Lutz

#5
thanks, I will look into it,



Lutz

HPW

#6
This seems even newer:



http://msdn.microsoft.com/library/default.asp?url=/downloads/list/pocket2003.asp">http://msdn.microsoft.com/library/defau ... et2003.asp">http://msdn.microsoft.com/library/default.asp?url=/downloads/list/pocket2003.asp
Hans-Peter

Lutz

#7
I looked through some of the CE stuff and decided not to do anything for now. There is just too much work involved, which is better invested for newLISP on the existing platforms or other platforms than Windows CE, i.e. Apple Mac.



Any programming language one would offer on the CE device would also have to support a lot of CE specific things, like supporting the various APIs to interact with other applications and specific parts of the CE system, comunications APIs like OBEX and Bluetooth etc.. If you don't do this, you just created another cute little toy, but with not much real potential to do useful applications for the CE with it.



At the moment newLISP has just not enough users justify putting so much work into a CE port. I rather concentrate on improving newLISP on the exisiting platforms. By the end of the year I want to buy an Apple Mac System and perhaps revisit the whole area of building GUIs with newLISP.



At the moment I want to concentrate on newLISP as a scripting language in a platform independent web environment, and perhaps build some more packages to import other libraries, inteface to other applications etc.





Lutz

HPW

#8
Lutz,



Thanks for the clear answer.

I can understand all your points and agree with them.

I had asked this, because I thought on the first look that it would

be an easier task. But as more as I read about it, the more problems

become visible.



So get back to newLISP. (As I will do with my alisp project)
Hans-Peter

HPW

#9
After the move to MinGW I ask again.



From http://groups.yahoo.com/group/pocketgcc/message/716">http://groups.yahoo.com/group/pocketgcc/message/716


Quote
> Since newLISP 8.1 it is now compiled with GCC under windows using

> MinGW.

> http://www.mingw.org/">http://www.mingw.org/

> It only uses MSYS.

> May be now the chance get higher to compile it under PocketGCC?

> True?



The FAQ at newLISP's site states:

"(...) newLISP has a minimum of dependencies and uses only the most

standard libraries to compile. If your system has GNU tools with the GCC

compiler and make utility, then it will probably compile and link right

away with one of the makefiles in the source distribution.



newLISP is built using hand crafted makefiles for a specific platform.

There are no complex make scripts. The makefiles are short and easy to

change and adapt if your configuration is not included already."



So, technically, yes, you should be able to compile it with PocketGCC. I

played with the sources a little bit -- adding some compilation flags --

and was able to compile an executable without a single warning through

the process. However, unfortunately, newlisp.exe crashes on my PPC,

raising an exception.



I don't have enough time to go over this, but if you have any interest,

I can send you the tweaked sources for you to play with and debug. Some

minor modifications are also necessary in sys/wcetypes.h to avoid type

redefinitions (as Mamaich has already pointed out in this list before).



Cheers,

K.



--

Life is the childhood of our immortality.

-- Goethe



--

Luis Carvalho (Kozure)

kozure at cox dot net

PGP key: A616822D


Since I have not a pocket PC yet, I can not jump on it.

But I would definatly buy one, when I would get LISP running on it.
Hans-Peter

pjot

#10
The link to PocketGCC does not work anymore, but I could download the package from



http://www.pocketgear.com/download.asp?product_id=11502">http://www.pocketgear.com/download.asp?product_id=11502



I own a HP Jornada 548 with WinCE 3.0, but this PDA uses a SH-3 processor. The PocketGCC package however is created for the ARM processor line. So if newLisp is going to be compiled using PocketGCC, it will be for the ARM only.

Lutz

#11
The experiment Luis Carvalho did sounds encouraging, it may just be some trivial thing during startup, i.e. the WSAStartup(), which crashes the system or some of the exception initialization routines, or the wrong specifications when linking.



But the fact that he could compile and link without warnings is very encouraging . A couple of 'printf' in the right place of the code should reveal the source of the problem.



Lutz

HPW

#12
I think Luis Carvalho use the compiler from here:



http://mamaich.kasone.com/fr_pocket.htm">http://mamaich.kasone.com/fr_pocket.htm
Hans-Peter

HPW

#13
Finaly it had happend: Pocket-newLISP



:-)


Quote
Hallo,



>>The experiment Luis Carvalho did sounds encouraging, it may just be

>>some trivial thing during startup, i.e. the WSAStartup(), which

>>crashes the system or some of the exception initialization routines,

>>or the wrong specifications when linking.

>

>>But the fact that he could compile and link without warnings is very

>>encouraging . A couple of 'printf' in the right place of the code

>>should reveal the source of the problem.



I went over the code again, nailing a few printf's as Lutz suggested.

There are some very weird things going on: argc and argv point to

garbage, and IOchannel (a FILE pointer setted to stdin) raises the

exception when called. I don't know why is that so, and worse, how to

solve or even work around it.



Cheers,

K, sorry for the bad news.



--

Life is the childhood of our immortality.

-- Goethe



--

Luis Carvalho (Kozure)

kozure at cox dot net

PGP key: A616822D


Quote
From:  "Alexander M." <mamaich@u...>

Date:  Fri Aug 20, 2004  1:07 am

Subject:  Re: newLISP compile possible?



 

> I went over the code again, nailing a few printf's as Lutz suggested.

> There are some very weird things going on: argc and argv point to

> garbage, and IOchannel (a FILE pointer setted to stdin) raises the

> exception when called. I don't know why is that so, and worse, how to

> solve or even work around it.



I know this bug. Try to add a "-staticlibs" compiler option. There is

a problem in linker, that when using libc.dll (dynamic C runtime, it

is used by default) and linking with some Microsoft LIB files all data

imports from LIBC are invalid. I.e. argc, argv, stdin, environ and

alike cause GPF when accessed. The other workaround is to recreate

these import libraries with GNU tools. The known libraries that cause

this problem are AYGSHELL.LIB, TOOLHELP.LIB, probably other LIBs that

use import by ordinal.

I'm trying to fix this.


Quote
From:  "Luis Carvalho (Kozure)" <kozure@c...>

Date:  Fri Aug 20, 2004  2:02 am

Subject:  Re: [pocketgcc] Re: newLISP compile possible?



 

ADVERTISEMENT

 

 

Hallo,



> I know this bug. Try to add a "-staticlibs" compiler option. There is

> a problem in linker, that when using libc.dll (dynamic C runtime, it

> is used by default) and linking with some Microsoft LIB files all data

> imports from LIBC are invalid. I.e. argc, argv, stdin, environ and

> alike cause GPF when accessed. The other workaround is to recreate

> these import libraries with GNU tools. The known libraries that cause

> this problem are AYGSHELL.LIB, TOOLHELP.LIB, probably other LIBs that

> use import by ordinal.

> I'm trying to fix this.



Mamaich went right on to the spot! So, Hans-Peter, you now have newLISP

on Pocket PC:



ftp://ftp.saci.homeip.net/pub/wince/newlisp.exe">ftp://ftp.saci.homeip.net/pub/wince/newlisp.exe



The sources are a little bit tweaked, but I'm sure they can be made

cleaner (and clearer). As I promised, here are the modified sources:



ftp://ftp.saci.homeip.net/pub/wince/newlisp-8.1.0-wince.tar.gz">ftp://ftp.saci.homeip.net/pub/wince/new ... nce.tar.gz">ftp://ftp.saci.homeip.net/pub/wince/newlisp-8.1.0-wince.tar.gz



A simple diff on the main dir should reveal the changes. I also added a

makefile_wince.



Cheers,

K, now you can have a PPC.



--

Life is the childhood of our immortality.

-- Goethe



--

Luis Carvalho (Kozure)

kozure at cox dot net

PGP key: A616822D
Hans-Peter

HPW

#14
Even more stuff for pocket: TCL/TK



http://sourceforge.net/project/showfiles.php?group_id=91719">http://sourceforge.net/project/showfile ... p_id=91719">http://sourceforge.net/project/showfiles.php?group_id=91719



The question will be: Is their a IP-socket on WINCE to use the same interface as on WIN.
Hans-Peter