« Return to Thread: TODO - COPY_PIPMAK_TERMINAL_TO_STDOUT

Re: TODO - COPY_PIPMAK_TERMINAL_TO_STDOUT

by Aidan Gauland :: Rate this Message:

Reply to Author | View in Thread

Christian Walther wrote:
> Aidan Gauland wrote:
  > Some nitpicky comments about the rest:

>
> - Checking the argument with lua_isboolean() is not necessary, as  
> every Lua value has a boolean value (nil and false are false,  
> everything else is true). By that check, you're unnecessarily  
> forbidding use of anything but strictly true and false. I don't think  
> it hurts much in this case though, as this function probably isn't  
> ever called with a more complex expression than "true" or "false".
>
> - For argument checking (assuming that you want to stop Lua execution  
> and not just proceed with a warning), it's better to use the auxiliary  
> functions that call lua_error() than just printing a message to the  
> terminal, such as luaL_error(), luaL_typerror(), luaL_checknumber()  
> etc. (they're not documented, but their source in lauxlib.c is simple  
> enough), so that the user gets an indication of where in their code  
> the error happens.

I agree with you on both points.  I didn't know Lua had those error reporting
functions.

> - I personally would have used something more human-readable than  
> "PmkTerm" to mark the output. (What the heck is a "Pmk"? :) )
>
>>  And does anyone else want Pipmak's error messages to go to stderr  
>> as well?
>> I'm still thinking of an easy to make Pipmak do this.
>
> What exactly do you mean by error messages? Those that go through  
> errorMessage()? They generally mean that Pipmak doesn't run at all,  
> and since Pipmak runs for me, I never see them anyway. Those on the  
> terminal? We already have them on stdout, thanks to your addition. And  
> since Pipmak isn't a noninteractive tool that I call in a shell script  
> or something, I see no need to differentiate between stdout and  
> stderr. So, no, I personally don't.

Hmmm, good point.  I didn't think about Pipmak not being a non-interactive
program.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Pipmak-Devel mailing list
Pipmak-Devel@...
news://news.gmane.org/gmane.games.devel.pipmak.devel
https://lists.sourceforge.net/lists/listinfo/pipmak-devel

 « Return to Thread: TODO - COPY_PIPMAK_TERMINAL_TO_STDOUT