Page 3 of 4

Re: LöveOS

Posted: Fri Jun 14, 2013 6:06 am
by Jasoco
That works. Thanks, guys.

Re: LöveOS

Posted: Fri Jun 14, 2013 8:47 am
by jjmafiae
FUCKING AWSOME!

Re: LöveOS

Posted: Sun Jun 16, 2013 9:55 am
by Jasoco
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".

Re: LöveOS

Posted: Sun Jun 16, 2013 12:06 pm
by Robin
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.

Re: LöveOS

Posted: Mon Jun 17, 2013 8:07 am
by Jasoco
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.

Re: LöveOS

Posted: Tue Jun 18, 2013 5:20 pm
by jjmafiae
good work comrade!

Re: LöveOS

Posted: Fri Aug 30, 2013 5:04 pm
by JesseH
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.

Re: LöveOS

Posted: Fri Aug 30, 2013 6:09 pm
by baconhawka7x
This is awesome!

Re: LöveOS

Posted: Fri Aug 30, 2013 6:22 pm
by JesseH
I know right?! :P

Re: LöveOS

Posted: Tue Apr 15, 2014 5:41 pm
by JesseH
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!