Bring back readline!

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Green_Hell
Citizen
Posts: 94
Joined: Thu Feb 21, 2008 1:11 am

Bring back readline!

Post 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:
>>I love LÖVE.<<
Green_Hell
Citizen
Posts: 94
Joined: Thu Feb 21, 2008 1:11 am

Re: Bring back readline!

Post 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:"
>>I love LÖVE.<<
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Bring back readline!

Post by mike »

Wait... we can have comments in the config files????
Now posting IN STEREO (where available)
emonk
Prole
Posts: 24
Joined: Tue Aug 12, 2008 11:43 am

Re: Bring back readline!

Post 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 :)
Sarcasm - just one of the services I offer.
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Bring back readline!

Post 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.
Now posting IN STEREO (where available)
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Bring back readline!

Post by rude »

Readline implemented. Coming next version.

+100 EXP! New ability learned: Lua iterators.
Green_Hell
Citizen
Posts: 94
Joined: Thu Feb 21, 2008 1:11 am

Re: Bring back readline!

Post by Green_Hell »

Thanks a Lot. I'm really grateful.

Iterators are great. I'd like to be able to write my own.
>>I love LÖVE.<<
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Bring back readline!

Post 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.
Now posting IN STEREO (where available)
User avatar
boypink
Prole
Posts: 10
Joined: Sat Nov 15, 2008 5:40 am
Location: Canada

Re: Bring back readline!

Post 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.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Bring back readline!

Post 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.
Post Reply

Who is online

Users browsing this forum: Bule and 1 guest