Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
19 crawler(s) on-line.
 158 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 matthey:  38 mins ago
 DiscreetFX:  1 hr 37 mins ago
 djnick:  1 hr 57 mins ago
 agami:  2 hrs 13 mins ago
 MEGA_RJ_MICAL:  2 hrs 51 mins ago
 kolla:  5 hrs 11 mins ago
 Hammer:  5 hrs 22 mins ago
 amigakit:  6 hrs 3 mins ago
 OneTimer1:  6 hrs 7 mins ago
 pixie:  6 hrs 14 mins ago

/  Forum Index
   /  Alt Amiga OS
      /  Lua for MorphOS dirty preview v0.3
Register To Post

Goto page ( 1 | 2 Next Page )
PosterThread
g_kraszewski 
Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 9:42:33
#1 ]
Regular Member
Joined: 3-Sep-2010
Posts: 343
From: Unknown

The Lua for MorphOS dirty preview v0.3 has been released. It is a port of the Lua scripting language with a high degree of integration with MorphOS as the main goal. Highlight features are:

- The whole interpreter is implemented as a library (lua.library), which is fully reentrant (one copy of interpreter for all apps). The interpreter size is below 150 kB.

- All binary modules are implemented as system libraries, so they are loaded and unloaded dynamically (unloading is handled by Lua garbage collector). They are all external (except package module), which ensures low memory footprint, all modules are reentrant and loaded once only.

- Standard modules are modified to use the system API directly, bypassing unnecessary unix emulation layer. It makes the language faster and less memory hungry.

- LuaX is a lightweight Lua script launcher. May be used from shell or as a default tool in icons of Lua scripts. Features basic error handling.

- Lua Explorador is a simple graphical (MUI based) source-level Lua debugger. Current version supports source view, single step mode, viewing all variables, call history, stack.

- Complete C header files for lua.libary. (Almost) complete autodocs for lua.library and complete autodocs for implemented standard binary modules.

As a beta version, the implementation is still incomplete (not all standard modules have been ported yet). Please read the readme file before running Lua demos.

_________________
RastPort

 Status: Offline
Profile     Report this post  
opi 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 9:59:41
#2 ]
Team Member
Joined: 2-Mar-2005
Posts: 2752
From: Poland

@g_kraszewski

Nice work. This is how ports should be done.

_________________
OpenWindows Initiative. Port PS3 hardware to bananas. For free. Join today and receive expired $50 cupon from AI!

 Status: Offline
Profile     Report this post  
g_kraszewski 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 11:15:48
#3 ]
Regular Member
Joined: 3-Sep-2010
Posts: 343
From: Unknown

@opi

One of goals is to add a module enabling Lua to communicate with ARexx ports of programs (sending commands, receiving results). Then Lua, having sane syntax, supporting modern programming techniques and having a source-level debugger may be "a better ARexx" for MorphOS.

Another possibility is to add modules for accessing MUI from Lua. Then Lua may be a rapid development language for MUI based applications not having high requirements on speed. Tests show that code interpreted by Lua is about 30 times slower than compiled C code. It may sound discouraging, but is sufficient in many applications. Also CPU demanding code can be always delegated into a binary Lua module. There is also LuaJIT project, with its latest PPC e500 core branch, but I'm not holding my breath yet.

_________________
RastPort

 Status: Offline
Profile     Report this post  
Mrodfr 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 11:46:35
#4 ]
Super Member
Joined: 28-Jan-2007
Posts: 1396
From: French

@g_kraszewski

This is verry great. Lots of LUA things are made for the PSP (homebrew).

Also please let others platforms the possibility to use your work for ports like for AROS or AOS4, for example.

_________________
BTW, what you have done for the amiga today ????

-A1200+Mediator+VooDoo3+060/50+96mo+SCSI-KIT
-SAM440EP-667mhz-on MapowerKC3000+AOS4.1

Amiga Docs Disks Preservation Project

 Status: Offline
Profile     Report this post  
g_kraszewski 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 12:45:52
#5 ]
Regular Member
Joined: 3-Sep-2010
Posts: 343
From: Unknown

@Mrodfr

I guess your post is asking for sources of the port. The simple answer is "no".

Before GPL fighters kick in - no, Lua is not GPL and its license allows me to not share the sources.

Then I'm sure you want to know - why?

I'm going to be honest here, I know however, my explanation will irritate some OS4 users and even can trigger another "red vs blue" flamefest. I do not care much, I only hope moderators will do their job. I can only say that trolling on portals is not the way of promoting an operating system. Yes, I've done this mistake. Yes, many times. Not this time however.

In my opinion MorphOS popularity bases on technical superiority, available software and prices of compatible hardware. I believe I can improve the first and the second by my programming activity. My Lua port is a little step in this direction. I simply do not want other systems to gain advantage of my work dedicated to MorphOS. Both AROS and AmigaOS 4 have their Lua ports. They may be improved, things I've done are not a rocket science anyway.






_________________
RastPort

 Status: Offline
Profile     Report this post  
eliyahu 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 13:14:08
#6 ]
Super Member
Joined: 3-Mar-2010
Posts: 1958
From: Waterbury, Connecticut (USA)

@g_kraszewski

Quote:
In my opinion MorphOS popularity bases on technical superiority, available software and prices of compatible hardware. I believe I can improve the first and the second by my programming activity. My Lua port is a little step in this direction. I simply do not want other systems to gain advantage of my work dedicated to MorphOS. Both AROS and AmigaOS 4 have their Lua ports. They may be improved, things I've done are not a rocket science anyway.

as an OS4 user and someone who uses lua, i'm sorry to hear that. but i'm glad the morphOS guys will have a chance to play with this. let us know how your implementation progresses!

edit: well color me surprised. apparently there already is a lua implementation for OS4 (link) developed by the irrepressible steve solie. just downloaded to my SAM to check it out!

-- eliyahu

Last edited by eliyahu on 26-Dec-2010 at 06:18 PM.

_________________
"Physical reality is consistent with universal laws. When the laws do not operate, there is no reality. All of this is unreal."

 Status: Offline
Profile     Report this post  
kas1e 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 13:54:26
#7 ]
Elite Member
Joined: 11-Jan-2004
Posts: 3549
From: Russia

Pretty polished port , cool. The real good thinks which i see there : integration as .library and source-level Lua debugger.

@mrodfr
Sources can't help there much, just because debugger are mui4 based. Related to integration of lua as library, that can be done more or less easy (if someone will in interst to do it). Dunno through, how big differences will be beetwen .library and .so when game use Lua, but i think .library one with auto load/unload should be faster and less memory consuming.

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites

 Status: Offline
Profile     Report this post  
opi 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 14:41:33
#8 ]
Team Member
Joined: 2-Mar-2005
Posts: 2752
From: Poland

@kas1e

Quote:
Dunno through, how big differences will be beetwen .library and .so when game use Lua, but i think .library one with auto load/unload should be faster and less memory consuming.


Also one is lazy while the other is Amiga-way™.

_________________
OpenWindows Initiative. Port PS3 hardware to bananas. For free. Join today and receive expired $50 cupon from AI!

 Status: Offline
Profile     Report this post  
g_kraszewski 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 15:07:07
#9 ]
Regular Member
Joined: 3-Sep-2010
Posts: 343
From: Unknown

@kas1e

how big differences will be beetwen .library and .so when game use Lua

For apps using Lua internally impact of shared objects is neglible. Things change, when Lua is treated as a system-wide scripting language used as an ARexx replacement, or for building complete applications. As I've decided that standard Lua modules are external, loading them as shared objects could have some noticeable impact. Also we cannot ignore the fact, that on AmigaOS 4 a shared object create a copy in memory every time it is loaded. Lua modules are not big, but it can happen than teens of scripts will be running simultaneously.

Anyway *.library turned out to be the only option for MorphOS, considering the system philosophy of naturally extending existing Amiga technologies and considering available solutions.

Last edited by g_kraszewski on 26-Dec-2010 at 03:07 PM.

_________________
RastPort

 Status: Offline
Profile     Report this post  
Mrodfr 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 16:49:40
#10 ]
Super Member
Joined: 28-Jan-2007
Posts: 1396
From: French

@g_kraszewski

Quote:
I guess your post is asking for sources of the port.

The simple answer is "no".Before GPL fighters kick in - no, Lua is not GPL and its license allows me to not share the sources.


No, I'm not asking source, I'm a simple user of no-microsoft computers

I don't know untill now that LUA isn't GPL and I respect your opinion of superiority of MorphOS and you are right for most points (actually but things could change in the futur) )

I'm just a guy who like people working together (when possible), thats all.

_________________
BTW, what you have done for the amiga today ????

-A1200+Mediator+VooDoo3+060/50+96mo+SCSI-KIT
-SAM440EP-667mhz-on MapowerKC3000+AOS4.1

Amiga Docs Disks Preservation Project

 Status: Offline
Profile     Report this post  
g_kraszewski 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 17:05:10
#11 ]
Regular Member
Joined: 3-Sep-2010
Posts: 343
From: Unknown

@Mrodfr

No, I'm not asking source, I'm a simple user of no-microsoft computers

I was just maybe overcautious and wanted to cut possible third party flaming early. I apologize if you feel offended by my words.

I'm just a guy who like people working together (when possible), thats all.

That would be nice, but I'm affraid is not currently possible. There is a strong competition between Amiga[like] systems and it looks like there is no chance to change it. The best I can do is to avoid negative competition (flaming others) and concentrate on positive competition (writing software).

_________________
RastPort

 Status: Offline
Profile     Report this post  
Chain-Q 
Re: Lua for MorphOS dirty preview v0.3
Posted on 26-Dec-2010 22:43:36
#12 ]
Cult Member
Joined: 31-Jan-2005
Posts: 824
From: Budapest, Hungary

@g_kraszewski
I really appreciate your efforts. Normally, I'm not really fond of new-school script languages. But as Opi said, this is how ports should be done! Excellent work. And remember, Rexx also came from other systems then, still it became *THE* script language for Am*gas, because it was slim, easy to use, powerful (at the time) and it had great system integration.

Before your Lua efforts, I saw no possibility to make that happen again for next-gen systems. (Python is simply far too big, far too Un*x-ish and too resource hungry for my taste.) But now I see a chance for Rexx's success to happen again - with Lua. Keep it up!

_________________
MorphOS, classic Amiga, demoscene, and stuff
"When a bridge is not enough, build a Viaduct!"
"Strip the Amiga community of speculation and we can fit every forum on a 720k floppy" (by resle)

 Status: Offline
Profile     Report this post  
Srbin 
Re: Lua for MorphOS dirty preview v0.3
Posted on 27-Dec-2010 18:25:07
#13 ]
Regular Member
Joined: 11-Dec-2004
Posts: 407
From: Serbia

I just made a quick-look to Lua docs and I don't understand the hype about it. What's the big deal about language without OOP? While I appreciate the efforts, I would still like more to see PHP5.3, C++ , java etc...

Just my opinion. I was working procedural before, even with classes (code-junk like WordPress, SugarCRM etc... still are) and would never do that again, no matter the money offered to me.

So what's the story about Lua? In general, not only amiga related.


_________________
May the force be with you...

 Status: Offline
Profile     Report this post  
saimon69 
Re: Lua for MorphOS dirty preview v0.3
Posted on 27-Dec-2010 21:03:15
#14 ]
Regular Member
Joined: 7-Dec-2007
Posts: 307
From: Los Angeles, CA

@g_kraszewski

Before to become an advocate for AROS i have been out of the Amiga scene for several years and so i mostly lost all the red vs blue vs x86 fight - and honestly i think it is a good thing; anyway, whether yu want to share the morphos port with other amiga os flavors is not my personal matter i guess, just that is important to let you know that there is already a binding between MUI and lua under AROS and is called zulu; of course is related onyl tu MUI 3.8 classes and does not support callback hooks yet but is a pretty nice tool or RAD applications; you can either use it as base for your work on expanding the morphos port or - most desired - use it and expand it leaving it open source so that other amiga os flavors can use it without the need to request for your sources; plus, since actually both aos and aros does not support (yet) MUI 4 classes, the inner advantage is implicit.

Saimon69

Last edited by saimon69 on 27-Dec-2010 at 09:04 PM.

_________________
Scarabocchi Binari - Italian AROS Blog
Binary Doodles - English language AROS Blog

 Status: Offline
Profile     Report this post  
CodeSmith 
Re: Lua for MorphOS dirty preview v0.3
Posted on 28-Dec-2010 4:13:07
#15 ]
Elite Member
Joined: 8-Mar-2003
Posts: 3045
From: USA

@Srbin

It's a scripting language, the same sort of thing as ARexx, Perl and Ruby. It's designed mostly for once-off scripts and rapid prototyping, so making it object oriented (which implies at least some level of analysis and design before you start writing the code) kinda defeats the purpose.

 Status: Offline
Profile     Report this post  
g_kraszewski 
Re: Lua for MorphOS dirty preview v0.3
Posted on 28-Dec-2010 7:20:39
#16 ]
Regular Member
Joined: 3-Sep-2010
Posts: 343
From: Unknown

@Srbin

There is no hype. And in fact OOP is no big deal. About C++, MorphOS has it already with GCC 4.4.4 compiler included into the official SDK. Of course having Java (which is highly overrated IMO) and latest PHP (which fails as a general purpose scripting language + is a bloatware similar to Python) would be nice, but it is not a task for me.

What's the story about Lua?

- It is fast. Most of benchmarks show that it is the fastest of popular interpreted languages. I will do some performance tests on MorphOS once the port is completed.
- It is lightweight. On MorphOS it is 150 kB for the core and (estimated) about 100 kB for standard libraries, but they are loaded on demand separately in my port.
- It is easily embeddable. It means you not only can use it externally, but can write some parts of your, let's say, C++ program in Lua. Interfacing Lua to other languages is made as easy as possible.
- It is easily extendable. You can write own modules in Lua as well as in any compiled language (binary modules).
- It supports some fancy programming techniques (like functions being first class values, or easy execution of [self]generated code, internal cooperative multithreading).
- It is extremely portable. POSIX is not needed at all, only some basic standard C library functions.
- It has built-in debug facilities, which is proven with Lua Explorador being written in a week.
- It creates a kind of sandbox for executed code. It is very difficult to crash a Lua program (at least with standard modules, of course when more modules are added it depends on their proper design). It is a valuable feature, especially for systems without full memory protection like MorphOS.
- There is a PowerPC JIT engine in the work (LuaJIT project has now PowerPC branch). While I don't hold my breath now, I will for sure keep an eye on this project, as it is advertised as a drop-in replacement for the standard interpreter. According to tests, JIT-ed Lua executes at 0.5 to 0.75 of speed of compiled native C code (these are x86 results but I do not expect PPC to be substantially worse).

In my opinion it is just the best language to replace ARexx (which is pretty dead now). After adding some interfaces to MorphOS libraries it can also act as a language for writing simple applications.


Last edited by g_kraszewski on 28-Dec-2010 at 08:04 AM.

_________________
RastPort

 Status: Offline
Profile     Report this post  
g_kraszewski 
Re: Lua for MorphOS dirty preview v0.3
Posted on 28-Dec-2010 7:34:39
#17 ]
Regular Member
Joined: 3-Sep-2010
Posts: 343
From: Unknown

@CodeSmith

It's designed mostly for once-off scripts and rapid prototyping

It is mainly designed to be an embeddable scripting engine for different applications. For example well known Hollywood presentation software uses modified Lua as its internal engine. Many games use it for the same purpose. Possibility of using object oriented techniques is an advantage there.

_________________
RastPort

 Status: Offline
Profile     Report this post  
g_kraszewski 
Re: Lua for MorphOS dirty preview v0.3
Posted on 28-Dec-2010 7:36:18
#18 ]
Regular Member
Joined: 3-Sep-2010
Posts: 343
From: Unknown

@saimon69

you can either use it as base for your work on expanding the morphos port or - most desired - use it and expand it leaving it open source so that other amiga os flavors can use it without the need to request for your sources

Where can I find it? A simple Google survey yielded no links to the source code.

_________________
RastPort

 Status: Offline
Profile     Report this post  
_analogkid_ 
Re: Lua for MorphOS dirty preview v0.3
Posted on 28-Dec-2010 8:04:54
#19 ]
Regular Member
Joined: 22-Jun-2005
Posts: 182
From: Here and there

@g_kraszewski

Great! This is, what we've finally waited for, an adequate ARexx replacement for MorphOS. Although it's aged, ARexx still has enormous power and Lua is a great replacement for it. And a proper Lua port underlines the advantages and power of MorphOS and it's great to see having more and more unique features in it, to get away from a "AmigaOS 3.1 clone".

 Status: Offline
Profile     Report this post  
mausle 
Re: Lua for MorphOS dirty preview v0.3
Posted on 28-Dec-2010 10:21:17
#20 ]
Regular Member
Joined: 12-Sep-2003
Posts: 139
From: Unknown

@g_kraszewski

Quote:

g_kraszewski wrote:
Where can I find it? A simple Google survey yielded no links to the source code.


You might find it here:

http://repo.or.cz/w/AROS-Contrib.git/tree/HEAD:/development/compilers/lua-5.1

ciao

 Status: Offline
Profile     Report this post  
Goto page ( 1 | 2 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle