LöveOS

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Jasoco
Inner party member
Posts: 3650
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: LöveOS

Post by Jasoco » Fri Jun 14, 2013 6:06 am

That works. Thanks, guys.

jjmafiae
Party member
Posts: 1333
Joined: Tue Jul 24, 2012 8:22 am

Re: LöveOS

Post by jjmafiae » Fri Jun 14, 2013 8:47 am

FUCKING AWSOME!

User avatar
Jasoco
Inner party member
Posts: 3650
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: LöveOS

Post by Jasoco » Sun Jun 16, 2013 9:55 am

Okay, so I have this code to export all the globals in my project into a .log file:

Code: Select all

function exportGlobalLog()
	local transferTable = {}
	local i = 1
	for k, v in pairs(_G) do
		transferTable[i] = { name = k, type = type(v) }
		i = i + 1
	end

	table.sort( transferTable, 
		function(a, b)
			return a.type > b.type
		end
	)

	local t = "GLOBAL EXPORT LOG:\n"
	for k, v in pairs(transferTable) do
		t = t .. "  " .. v.type .. "  " .. v.name .. "\n"
	end
	lfs.write("global_export.log", t)
end
Is there any way to get the actual value of the variable as well? So I can have "variable type", "variable name", "variable value".

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: LöveOS

Post by Robin » Sun Jun 16, 2013 12:06 pm

Ehm, put v itself in the transferTable?

Of course, if it is a table you'll get something like table: 0xadc3b0, unless you implement or use some form of serialization.
Help us help you: attach a .love.

User avatar
Jasoco
Inner party member
Posts: 3650
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: LöveOS

Post by Jasoco » Mon Jun 17, 2013 8:07 am

Robin wrote:Ehm, put v itself in the transferTable?

Of course, if it is a table you'll get something like table: 0xadc3b0, unless you implement or use some form of serialization.
That works. Brain fart. Thanks.

jjmafiae
Party member
Posts: 1333
Joined: Tue Jul 24, 2012 8:22 am

Re: LöveOS

Post by jjmafiae » Tue Jun 18, 2013 5:20 pm

good work comrade!

User avatar
JesseH
Prole
Posts: 47
Joined: Mon Nov 19, 2012 6:04 am
Location: Georgia, USA
Contact:

Re: LöveOS

Post by JesseH » Fri Aug 30, 2013 5:04 pm

Bringing you guys a status update. Here is a list of available commands for LoveOS.
https://github.com/jessehorne/loveos

Code: Select all

clear  -- Used for clearing the console
touch  -- Used for creating files with no content
mkdir  -- Used for creating directories
help  -- Help feature, shows available commands
ls   -- Lists the current directory
run  -- Runs a Lua script (all lua scripts much use the libloveos library)
rm  -- Removes a file/directory
cd   -- Used for changing directories
Help is welcome! We can chat about it in ##jesseh on Freenode, or #love on OFTC.
I would also like to see this used in a game or two as a in-game computer or something.

User avatar
baconhawka7x
Party member
Posts: 484
Joined: Mon Nov 21, 2011 7:05 am
Contact:

Re: LöveOS

Post by baconhawka7x » Fri Aug 30, 2013 6:09 pm

This is awesome!

User avatar
JesseH
Prole
Posts: 47
Joined: Mon Nov 19, 2012 6:04 am
Location: Georgia, USA
Contact:

Re: LöveOS

Post by JesseH » Fri Aug 30, 2013 6:22 pm

I know right?! :P

User avatar
JesseH
Prole
Posts: 47
Joined: Mon Nov 19, 2012 6:04 am
Location: Georgia, USA
Contact:

Re: LöveOS

Post by JesseH » Tue Apr 15, 2014 5:41 pm

So it's been a while since I worked on this, but I have some news. I just updated it, so it works with 0.9.*. I also fixed some major bugs with the filesystem library.

Some planned features...
1 - Add "love <dir>" command so that you could run love games "inside" LoveOS
2 - Add "derplang <dir>" command so that you could run Derplang programs "inside" LoveOS

If you have any ideas/suggestions, let me know!

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests