File Functions

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
mallchin
Posts: 36
Joined: Thu Feb 16, 2006 2:03 am

File Functions

Post by mallchin »

I see LuaPlayer has updated to 0.19, but does anyone have an updated list of functions?

I can't see any mention of the requests I've made, anyone managed to move/rename files?
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Re: File Functions

Post by Shine »

mallchin wrote:I see LuaPlayer has updated to 0.19, but does anyone have an updated list of functions?

I can't see any mention of the requests I've made, anyone managed to move/rename files?
I've added a System.rename function for Lua Player 0.20.
mallchin
Posts: 36
Joined: Thu Feb 16, 2006 2:03 am

Post by mallchin »

Great news, thanks Shine.

I know your pushed for time developing LuaPlayer but many of us appreciate it :)
mallchin
Posts: 36
Joined: Thu Feb 16, 2006 2:03 am

Post by mallchin »

Also, if you get a chance, a move function would be neat too (if supported).

I'm mimicking moving files by copying source files then deleting them, but it doesn't work well for large files and limited space.
MikeHaggar
Posts: 116
Joined: Mon Jul 18, 2005 2:20 am

Post by MikeHaggar »

I guess you've already tested moving by renaming?
mallchin
Posts: 36
Joined: Thu Feb 16, 2006 2:03 am

Post by mallchin »

I like your thinking ;)
be2003
Posts: 144
Joined: Thu Apr 20, 2006 2:46 pm

Re: File Functions

Post by be2003 »

Shine wrote:
mallchin wrote:I see LuaPlayer has updated to 0.19, but does anyone have an updated list of functions?

I can't see any mention of the requests I've made, anyone managed to move/rename files?
I've added a System.rename function for Lua Player 0.20.
ya but you totally jacked up the way i write table functions and now none of my lua apps work, good job!

Just change the table sh*t back and everyone would be happier.
I had to go back to 0.19
- be2003
blog
mallchin
Posts: 36
Joined: Thu Feb 16, 2006 2:03 am

Post by mallchin »

What problems are you having?
be2003
Posts: 144
Joined: Thu Apr 20, 2006 2:46 pm

Post by be2003 »

the 0.19 lowser wont work and "for i=1,string.len(somethin) do" doesnt work and its annoying
- be2003
blog
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

be2003 wrote:the 0.19 lowser wont work and "for i=1,string.len(somethin) do" doesnt work and its annoying
You are right, 0.19 lowser doesn't work, but I've fixed it. Lowser in Lua Player 0.20 works. The only changes needed were the pairs/ipairs changes, like described in the release notes.

And I can't reproduce your problem with "for i=1,string.len(somethin) do". The following code works with Lua Player 0.19 and Lua Player 0.20:

Code: Select all

something = "test"
for i=1,string.len(something) do
	c = string.sub(something, i, i)
	-- do something with c
end
But if you have some code which doesn't work, please post it and I'll try to fix it.
be2003
Posts: 144
Joined: Thu Apr 20, 2006 2:46 pm

Post by be2003 »

nvm, it was "for index,value in table do". it took a while to change them to ipairs and pairs, i really needed the jpeg support! so why did you want to make it lua 5.1, wasnt that a hassle?
- be2003
blog
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

be2003 wrote:nvm, it was "for index,value in table do". it took a while to change them to ipairs and pairs, i really needed the jpeg support! so why did you want to make it lua 5.1, wasnt that a hassle?
So how long do you need to replace "in table" with "in ipairs(table)", when searching all for loops with a good editor? :-)

Lua 5.1 provides some advantages: incremental GC, which may be useful for action games to prevent long GC pauses, new string and other functions and better module support for Mac OS X, which may be useful later when porting it to Mac OS X.
be2003
Posts: 144
Joined: Thu Apr 20, 2006 2:46 pm

Post by be2003 »

this may seem crazy, but listen to this. i dont have a computer in this state(ca). i use tipster's unzip, links2, psp-pda, and file assistant all on my psp to do everything. i make all my lua apps on my psp.
- be2003
blog
romero126
Posts: 200
Joined: Sat Dec 24, 2005 2:42 pm

Post by romero126 »

I actually think 5.1 has increased luaplayers speed substancially, I also have noticed that parsing files (reading) takes absolutly no time to do. Its fantastic! However saving it dead weight.
Post Reply