Page 1 of 2

Bring back readline!

Posted: Wed Sep 03, 2008 9:00 pm
by Green_Hell
GDOL: I really appreciate that love.filesystem allows us to do the directory listing e.g. for saves,
but you raped the IO functions.

Why the hell did you not implement readline?

You may say that I can use love.filesystem.read( file, bytes ) , but it is actually working only for numbers higher than 4. At least for me.
And even if it worked, I might as well fill the registers with addresses to memory and call interrupts. ;)

Now the only possibility is load the whole content of the file to memory.

But I can't see much use in it. :geek:

In short: They knew what they were doing when they were writing file:read(formats)

No offence guys, just pissed off a bit :roll:

Re: Bring back readline!

Posted: Wed Sep 03, 2008 9:02 pm
by Green_Hell
Also I discovered this strange behaviour when using config with comments.

Code: Select all

Configuration (Line 1): Unrecognized command: "# Title / author"
Configuration (Line 4): Unrecognized command: ""
Configuration (Line 5): Unrecognized command: "# Display resolution"
Configuration (Line 9): Unrecognized command: ""
Configuration (Line 10): Unrecognized command: "# Was made for this version of LOVE:"

Re: Bring back readline!

Posted: Wed Sep 03, 2008 9:10 pm
by mike
Wait... we can have comments in the config files????

Re: Bring back readline!

Posted: Thu Sep 04, 2008 7:47 am
by emonk
I had a play with building a C++ app using PhysFS and Lua last week, just to see if I could. Once I got that working (and learned a bit about Lua along the way) I figured I'd have a go at hooking the Lua io library to PhysFS... took about 4 hours of messing around to redirect the platform calls to PhysFS... including some hacks to handle readline, etc.

My code is really crappy, but you're all welcome to play with it and make it better:

http://emonk.is-a-geek.org/LuaToPhysFS.zip
mike wrote:Wait... we can have comments in the config files????
Apparently not :)

Re: Bring back readline!

Posted: Thu Sep 04, 2008 11:07 am
by mike
emonk wrote:
mike wrote:Wait... we can have comments in the config files????
Apparently not :)
Do you want it like this:

Code: Select all

# This is a comment
Also: really sloppy of me to not allow for empty lines. The config files were always really small, but now that things are picking up I guess it's time to make them more epic.

Re: Bring back readline!

Posted: Fri Sep 05, 2008 2:10 pm
by rude
Readline implemented. Coming next version.

+100 EXP! New ability learned: Lua iterators.

Re: Bring back readline!

Posted: Sat Sep 06, 2008 6:33 pm
by Green_Hell
Thanks a Lot. I'm really grateful.

Iterators are great. I'd like to be able to write my own.

Re: Bring back readline!

Posted: Sun Nov 30, 2008 4:29 am
by mike
Just a question (and popping out a suggestion): should people be able to use the game.conf file for their own purposes? I am aware that we can read text files and all that, but it would be cool if people could just throw their own configurations into there too (like love.system.config("chicken") would return whatever you set for chicken or nil if it didn't exist). Should this be possible? Is this possible (man, I've been gone a long time)?
As a developer I am free to just go ahead and make it so*, but is it a good idea at all (here's looking at you, rude).

Note: This may be a bit out of topic, but it's a simple question and kind of follows the thread's progression...

* Bonus points for those who caught the reference.

Re: Bring back readline!

Posted: Sun Nov 30, 2008 10:44 am
by boypink
mike wrote:Also: really sloppy of me to not allow for empty lines. The config files were always really small, but now that things are picking up I guess it's time to make them more epic.
I was under the impression the config file was an lua file. After all its well suited to that purpose.

Re: Bring back readline!

Posted: Sun Nov 30, 2008 1:37 pm
by rude
When the config file was first created (back when dinosaurs still roamed the Earth), it was meant for controlling the behavior of LÖVE even before the VM was created (which is why it isn't a Lua file). The need for a config file in today's LÖVE is questionable.