Re: [Pipmak-Users] Loadlib and co.
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2008-01-11 22:22:02
|
Andrea Viarengo wrote: > It would be nice if next version 0.2.7 will enable at least loadlib, > which doesn't work in Windows Doh! I enabled dynamic loading in Lua for Mac OS X (for Windows it's enabled by default), but then didn't notice that I should have added a "luaopen_loadlib(L);" to Pipmak to make the loadlib function available... I'll correct that. > I would like also have lua "os", but I know your idea about it. Making the unproblematic parts of the os library available is on my to-do list for the release. I won't enable all of it - call me paranoid, but I want Pipmak projects to be sandboxed. (Of course loadlib lets you break out of the sandbox too, but it has a higher barrier of entry.) > You think that it would be a bad idea having os enabled only for the > project folder, so I could write and read text file, check > the esistence of file, and so on, only there? I mainly think it would have very limited use - a user won't look for newly created files inside the project. Also, projects, like applications, shouldn't modify themselves as a matter of principle. Often they won't be able to anyway because they're zipped, on read-only media, or in a place where the user doesn't have write permission. > Another idea: I have implemented in my pipmak build: > > pipmak.writetofile("path/file","text to write",append_flag), > (I use for example to write autocubic map or 3d object descriptions...) Would it be acceptable for your use to inseparably couple file reading/writing to file dialogs? I.e. the project could only access files that the user has explitly selected in an open or save dialog once. That would allow access to files anywhere on the file system, while still being hard to abuse, and as a bonus it would bypass the problem of different path syntax and filesystem layout on different platforms entirely. > I use also to debug purpose, because sometimes write a lot of text on > the screen isn't good, because is difficult to read, overall if the > text go beyond the bottom of the screen... I agree, that has annoyed me a few times too. Perhaps it would be useful to have a way of turning on the COPY_PIPMAK_TERMINAL_TO_STDOUT flag at runtime? -Christian |