Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: Lua interpreter with arbitrary precision math lib.  (Read 1619 times)

0 Members and 1 Guest are viewing this topic.

Offline Thorham

Lua interpreter with arbitrary precision math lib.
« on: October 18, 2014, 11:46:45 PM »
Here's a build of the Lua interpreter from Lua 5.2.3: Lua

Works with Kicstart 3.0+ and 68020+ (only tested with 68030). Compiled with SASC6.58, so might work with Kicstart 2+. Does NOT require an FPU, ixemul.library, etc. Only needs standard Workbench libraries. This build of Lua doesn't support loading dynamic libraries.

To use, simply unpack the archive anywhere you want, and start from Workbench. You can also run lua.exe from the CLI directly. When starting from the CLI, use lua.exe -l mapm to start the interpreter with the math library.

Example usage of arbitrary precision floating point commands (type into the interpreter command line directly):

Code: [Select]

mapm.digits(100)
a=mapm.sqrt(12345)
b=mapm.sqrt(54321)
print(a*b)
c=mapm.number(1)
d=mapm.number(3)
e=c/d
print(e*d)
You can also use things like mapm.sin, mapm.cos, etc.

Currently there's no documentation, but you can get some pointers here:

mapm: http://www.tc.umn.edu/~ringx004/mapm-4.9.5a.tar.gz
lmapm: http://webserver2.tecgraf.puc-rio.br/~lhf/ftp/lua/5.2/lmapm.tar.gz

Mapm is the arbitrary precision floating point library. This contains documentation about the functions. Lmapm is the code that links mapm to lua. The file lmapm.c will show you which functions are available in the interpreter. Sorry, but it will have to do for now.
 

Offline Thorham

Re: Lua interpreter with arbitrary precision math lib.
« Reply #1 on: October 19, 2014, 08:01:11 PM »
No views at all? No one is interested in Lua here?
 

Offline F1Lupo

Re: Lua interpreter with arbitrary precision math lib.
« Reply #2 on: October 20, 2014, 05:29:08 AM »
definitely Amiga related as I'm pretty sure Hollywood for our miggies is based on LUA
____________________________________________________________________
c64-dual sids, A1000, A1200-060@50, A4000-CSMKIII
Indivision AGA & Catweasel MK4+= Amazing
! My Master Miggies-Amiga 1000 & AmigaOne X1000 !
--- www.mancave-ramblings.blogspot.ca ---
  -AspireOS.com & Amikit- Amiga for your netbook-
***X1000- I BELIEVE *** :angel:
 

Offline wawrzon

Re: Lua interpreter with arbitrary precision math lib.
« Reply #3 on: October 20, 2014, 05:50:03 AM »
Quote from: klx300r;775294
definitely Amiga related as I'm pretty sure Hollywood for our miggies is based on LUA


seriously, is this a question if this is amiga related if it runs on one?
@thorham
im sorry to see lack of reaction to contributions to programming infrastructure. this is probably because actual contributors actually left here. i suppose on eab there will be more feedback. im not likely to need it but am thankful to have such an option if i once actually did.
 

Offline takemehomegrandma

Re: Lua interpreter with arbitrary precision math lib.
« Reply #4 on: October 20, 2014, 06:17:08 AM »
LUA is a very cool and useful scripting language IMHO that is very common on many other platforms and applications. It has tons of oline documentation and examples for anyone wanting to learn it.

LUA has been an integral part of MorphOS since quite some time, and here you can also use it to replace Arexx since it can use Arexx ports. :) Krashan is developing a native source level debugger (LUA Explorador 0.5 was released recently). Plans are also to make it possible to create MUI interfaces and use LUA to create custom MUI classes, making it possible to Create native applications with it.

:)
MorphOS is Amiga done right! :)
 

Offline psxphill

Re: Lua interpreter with arbitrary precision math lib.
« Reply #5 on: October 20, 2014, 07:57:00 AM »
Quote from: Thorham;775284
No views at all? No one is interested in Lua here?

I viewed it before you posted this. I was intrigued what purpose lua has & I haven't had any answer to that.
 

Offline OlafS3

Re: Lua interpreter with arbitrary precision math lib.
« Reply #6 on: October 20, 2014, 09:12:22 AM »
Quote from: Thorham;775284
No views at all? No one is interested in Lua here?

Sorry for no feedback...

As Wawa said perhaps you would get more feedback on other sites

I have a question... Is it compatible to AmiLua? I have integrated it in Aros Vision and would update it with your version as long as it does not destroy it
 

Offline OlafS3

Re: Lua interpreter with arbitrary precision math lib.
« Reply #7 on: October 20, 2014, 09:13:57 AM »
Quote from: psxphill;775298
I viewed it before you posted this. I was intrigued what purpose lua has & I haven't had any answer to that.

What purpose? It is another scripting language like Arexx, Python, Rebol and others.
 

Offline psxphill

Re: Lua interpreter with arbitrary precision math lib.
« Reply #8 on: October 20, 2014, 02:33:07 PM »
Quote from: OlafS3;775302
What purpose? It is another scripting language like Arexx, Python, Rebol and others.

That is what it is, not it's purpose. Is this just because someone likes lua and wanted to port it, is it because people are already using lua and this is a new version. Are we supposed to be excited by this and if so, why?
 

Offline Thorham

Re: Lua interpreter with arbitrary precision math lib.
« Reply #9 on: October 20, 2014, 04:15:09 PM »
Quote from: wawrzon;775296
i suppose on eab there will be more feedback.
You'd think so too.

Quote from: psxphill;775298
I was intrigued what purpose lua has & I haven't had any answer to that.
The reason for this port is that I wanted a programmable calculator with arbitrary precision floating point math.

Quote from: OlafS3;775301
Is it compatible to AmiLua?
No idea. This is just the interpreter from Lua 5.2.3 with built-in mapm 4.9.5a.

Quote from: OlafS3;775301
I have integrated it in Aros Vision and would update it with your version as long as it does not destroy it
Right now you can't. This is only a quick release of the interpreter. Furthermore, it seems that SASC6.58 didn't compile this version completely right (compiler options). I'll upload an updated version later.

For Aros I would just use the version from the Lua site, and build it. You can build it with just about anything.