Euphoria at Pandora (as dev tool)? GAZ GM? Pro/contra?


darkborn

Member
Joined
Mar 11, 2009
Messages
455
The Euphoria Programming Language: http://openeuphoria.org/, http://rapideuphoria.com/, http://sourceforge.net/projects/rapideuphoria/ Current Stable Version is 3.1.1, last is Alpha Version 4.0a3 (download links are here)
It is open source, (http://www.rapideuphoria.com/hotnew.htm)
got euWxWidgets (even euGTK) GUI library, (http://www.usingeuphoria.com/?page=wxeuphoria, http://sourceforge.net/projects/eugtk/)
OpenGL and SDL support, CGI (web) programming abilities (http://www.usingeuphoria.com/?page=bestofeu)
and it is cross-platform. (DOS32, WIN32/ReactOS, POSIX: Linux, BSD/FreeBSD, OSX).
It got about 2000 source codes from community (libraries, tools, but also completed apps and games), (http://www.rapideuphoria.com/archive.htm)
it is "easy-to-learn" but still "extremely fast", (http://www.rapideuphoria.com/hotnew.htm)
even without included "Euphoria To C Translator": (http://www.rapideuphoria.com/e2c.htm)
Euphoria seems to be 31x faster than Python, 35x then Perl. Euphoria to C Translator gives you ~3.7x faster benchmark than pure Euphoria ("it comes close to hand-coded, fully-optimized C"), more then 100x faster than Python/Perl. (according to http://www.rapideuphoria.com/bench.txt)

I found "Gaz Game Maker" by Gareth McDaid here & DL here (demo games and source included) as (unfinished but working) interesting project which is IMHO great for kids & beginners.
It is fully written at Euphoria; it could be used as a start point (at least as a concept) for "real" learning & developing tool.
It borrowed concept from (early versions of) Game Maker written by Markus Overmars (which is a proprietary Windows-stucked software).
Youtube video is here, and newer (working?) version called "Game Creator" is here (video).
[youtube]Z2iwfCA64-U&[/youtube] [youtube]oXxpQ9UFM5M[/youtube]
Anybody tried to mess with'? Is it possible to port to / use at Pandora, what are problems?
 
Since it only works on x86-based Macintoshes, I can't help but wonder if it is x86 specific. It might not work on an ARM processor. The documentation doesn't mention anything for or against the processor instruction set though.
 
Well, it will be pitty if it is heavily x86 specific. Whole Euphoria project looks like it is made to be ("easy") multi-portable.
When I saw that it could be run at OSX, OpenSolaris and OpenBSD, I thought that it is not (so) hardware dependent.
"OpenBSD supports binary emulation of most programs from SVR4 (Solaris), FreeBSD, Linux, BSD/OS, SunOS and HP-UX."
Actually, when I saw that Eu sources could be easy compiled by GCC, I didn't doubt about portability.
I will check about portability with Jeremy Cowgar (porter/maintainer of OpenEuphoria).
Btw, if somebody wants to check it out, sources are here: http://jeremy.cowgar.com/eubins/
 
GOOD NEWS!
I contacted Jeremy and he said: "I have zero knowledge of the ARM processor." :twisted: So, as it is for now, Euphoria is x86centric for now. BUT...
Jeremy started a new thread: "Euphoria on the ARM processor?" at http://openeuphoria.org/EUforum/ and soon we found Mic, which brings us some great news. This is email I got from Mic:
Hi,
If the device is running Linux then I don't see any real problems with porting the interpreter or translator for it, except "does it have enough RAM?".
There are a few lines of x86 assembly code in the runtime library that deal with switching tasks/threads. But it's basically just some simple stack manipulations so they should be easy to translate to ARM assembly.
I already made a special version of the runtime library that would compile for devices with no OS at all, and used it to compile a Euphoria program for the Gameboy Advance (also ARM-based).
The thread is here: http://openeuphoria.org/EUforum/index.c ... &id=101238
Yep, Pandora is running Linux. As I know it is Ångström Linux for now (http://www.angstrom-distribution.org/ ; Wiki here). Pandora has 256 MB RAM which should be enough. Because of Linux nature (swap) it is easy expandable through 2 SDHC slots. According to this diagram (Pandora portability flowchart), if software runs on Pentium II with 128MB RAM, it will potentially run on the Pandora. (Euphoria & most E. programs has not problem with it).
OK, so who's Mic?
Here is Mic's place: http://jiggawatt.org/badc0de/index.html ; e-mail: micol972ATgmail.com.
Mic made ForthEC - multiplatform Forth compiler written in Euphoria. He used DevkitPRO: DevkitARM (devkitPro-arm) (http://www.devkit.tk/ ; "About devkitPro"). What would be interesting to Pandora community is that he also made XPMCK - Cross Platform Music Compiler Kit, supporting Capcom Play System, ColecoVision, C64, GB/GBA, SEGA MS/GG/Genesis. In Euphoria, of course! Just browse at his site, and look what he has done (but also what could be done in Euphoria). Look at Shuboy -his GB emu@SEGA32X, or Zombie - multiemulator shell, demos... I want that guy at Pandora! Authorities, please send him one... OK, back to topic.
This is from suggested thread ("OpenEuphoria: Palm OS?" -Palm is ARM based as Pandora btw):
Euphoria@GBA - "proof of concept": http://jiggawatt.org/picsplz/eugba.PNG ; Source is here: http://jiggawatt.org/badc0de/eulib_svn978.zip
Included are prebuilt versions of the ARM targeted library and the GBA "Hello World" program, so you don't have to build them yourself if you don't want to.
There's a file in that ZIP called readme-arm.txt that explains the building process. Basically it's just two makefiles (one to build the ARM version of the library, and one to build the test program) that you can invoke from msys if you've got devkitPro installed.
It should also be easy to build the modified library code for other OS-less targets - just change some of the compiler and linker flags. I managed to get some code running properly on the SEGA Saturn (which is based on the Hitachi SH2), but I didn't spend any further time on that.
Note that a bunch of things are disabled, such as tasks, regexps and file i/o.
It's not really for any specific platform, but my test program is for the Gameboy Advance. Basically I stripped out a lot of platform-specific stuff so that you can compile the library for all kinds of systems - in particular those that don't have an OS.
 
darkborn said:
Because of Linux nature (swap) it is easy expandable through 2 SDHC slots.
Just one point: ideally the swap will be deactivated. Even the fastest SDHC cards can be quite slow for swap, and constantly swapping to the card risks wearing it out. Developers should not rely on swap space.
 
Yep, you're right. I remember Ångström Linux at my palm: when it started to swap, it was slow, and often frozen. Definitely it is not technology for continuous read & write.
But Linux swap is different from e.g. Windows, and Ångström is even more optimized. Usually, linux swap it is 10-200x smaller then Windows "counterpart".
 
darkborn said:
Yep, you're right. I remember Ångström Linux at my palm: when it started to swap, it was slow, and often frozen. Definitely it is not technology for continuous read & write.
But Linux swap is different from e.g. Windows, and Ångström is even more optimized. Usually, linux swap it is 10-200x smaller then Windows "counterpart".
The problem is that that might work alright for when you're running multiple applications: memory from lesser used apps can be swapped out; but if a single app needs more than the RAM available, it is going to be doing a lot of swap for itself. It would have to, it's trying to use more RAM than exists.
 
GBA has 256K RAM, External flash ROM + max 64K SRAM. PALM Zire72 32MB RAM, 24 MB actual storage capacity (I'm running Ångström Linux on it - boot from SD card).
Pandora has 256 MB RAM. So, there should be no RAM problems with Linux nor Euphoria.
Euphoria programs (sources) will work through translator-> compiled to C without a problem. Interpreter *could* be a problem, depending of IDE complexity, size of program etc. Nobody expects that Euphoria Windows specific program will works on Pandora (It will not works at any Linux either). But generic written, through wxWidgets should works. Or written specifically to Pandora platform. Limitations are approximately as it stands at limitation flowchart: Pentium II class desktop computer with 128 MB RAM.
It could be of help:
distrOS: Ångström Linux, wiki; ARM linux, dev section; uClinux (μClinux), wiki; uClinux in the GDB/ARMulator; Linux Port to the GBA and links;
Inferno - distributed OS: can run 'native' on ARM, x86... but also 'hosted' under an e.g. Linux, FreeBSD, MacOS X, Solaris...), again on var. processors. Google Code, Inferno@NintendoDS
This is a little bit OT, but anyway - here are few interesting Linux links:
ACCESS Linux Platform™ - An Open Platform for Advanced Mobile Devices - "next-generation version of the Palm OS"
Hiker: An Application Framework for Linux - "first open source mobile Linux® Application Framework"
I saw that people asked about Maemo; well, those are similar interesting variants. Intended mostly for mobile connection, but Pandora could be (in theory) easily connected via WiFi/Bluetooth or external USB hardware.
UPDATED: well this is exactly what is going to start: the name is Pandaphone, and here is it at old forum, and review at blog.
ARM EMUs: ARMulator, wiki; ARMware, wiki; SkyEye - http://www.skyeye.org (succesor of GDB/ARMulator) - Win & Linux integrated sim. environment; SkyEye simu/emulates ARM architecture based microprocessors. It runs ARM Linux, uClinux, uc/OS-II (ucos-ii) etc. Manual is here & here (http://skyeye.wiki.sourceforge.net/).
 
Last edited by a moderator:
Some links and interesting quotes, mostly from this forum:
"Pandora's official OS will be Angstrom Linux with the PND / PXML extensions."
"Basically all you have to do is use the ARM compiler instead of the x86 compiler, and make sure it links with the right ARM libraries."
"Use this cross-compiler for ARM" http://www.codesourcery.com/sgpp/lite/arm" GCC 4.3.3 Compare Editions (The Lite Edition contains only command-line tools. The Lite Edition is available at no cost as a free download.)[/url]
"basic procedure"
"The Pandora is basically like a portable BeagleBoard, and Angstrom already has a decent software library on the BeagleBoard."
"Porting any Linux distro to the Pandora after Angstrom is working on it shouldn't be that hard. If you or someone else wants to get another Linux distro running on the Pandora I'm sure you or whoever is porting it could go to Angstrom/Pandora team for help."
---
Porting Software to ARM Linux (@ http://www.handhelds.org) . . The ARM Linux FAQ
porting from x86 to omap3 (arm) (@ Beagle Board Google group)
ARM (official) . . ARM® Developer Suite Debug Target Guide (book) PDF version of ARMulator chapter (ref. info for DES; describes ARMulator®, Semihosting SWIs)
DevkitPRO - DevkitARM (devkitPro-arm) toolchains of choice for homebrew game development, currently available for GameBoy Advance, GP32, Playstation Portable and GameCube. More platforms will be added as time permits.
ARM Assembly Language Programming (from the basics) (full book in PDFs)
 
Mic brings Euphoria on Android, (thanks again!) and because of Android multiplatfArm nature, we could roughly say that goal is nearby.
Mic shows us how: http://jiggawatt.org/badc0de/android/eu/ (And here is about native C/C++@Android: http://jiggawatt.org/badc0de/android/index.html)
And now is here Android NDK, which "allows developers to implement parts of their applications using native-code languages such as C and C++", "includes a set of cross-toolchains (compilers, linkers, etc..) that can generate native ARM binaries on Linux, OS X, and Windows (with Cygwin) platforms" (through Dalvik VM).

Now, it is "just" to make Android Runtime (Dalvik VM) to work on (our favorite) Pandora, as it works at BeagleBoard. (http://beagleboard.org/project/android/)
It is done with EMBINUX™ Cross Compiler (ECC), "Toolchain For Android". (http://labs.embinux.org/)
Here is "Android on OMAP" (http://elinux.org/Android_on_OMAP) for interested. Still, It'll be nice to have more "native" Euphoria@ARM interpreter.

EDIT: Mic said: "The interpreter I posted about isn't for Dalvik though - it's for ARM/Linux. So you could presumably use the same code and makefiles for other ARM-based systems running Linux. The reason I chose Android as the test platform was that the Android SDK provides tools for easy testing on a PC."
 
Back
Top