View Single Post
  #4   (View Single Post)  
Old 19th February 2012
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Quote:
Originally Posted by Carpetsmoker View Post
I'm sorry, but this is just wrong. lTry to use the locale(1) utility if available, and if it isn't try checking the LC_* manually. If all else fails, use a sane default (pl_PL.ISO8859-2 is not what I would consider a sane default).
But that would not tell me the codepage, even if I would 'grab' the encoding from LC_ALL or LANG or whatever, I would have to keep a table of mappings like that:
pl_PL.ISO8859-2 cp852
... and I do not want to write it myself, besides, You set these options ONCE, then use it all the time, I may even put the 'settings' into the *.conf file, good idea I think.

Also these values are there because I did not finished working on this daemon yet, these are just mine settings.

There is also other 'issue', the 'mount' encoding and my user encoding are different

Quote:
Originally Posted by Carpetsmoker View Post
And overriding the user's PATH ... ? Have you been drinking?
The script would be always run by root (triggered by devd), its like You would blame me for the same PATH settings for cron daemon at /etc/crontab.

Quote:
Originally Posted by Carpetsmoker View Post
And what's with the underscoritus It almost looks like Python
It makes code cleaner, let me explain how I see it, commands/built-ins/keywords are lowercase words, all variables, no matter global/local/temporary are UPPERCASE, functions start with two underscores (two instead of one for better readability), like __lower_case_name.

Typing scripts that way the moment when I look at something I already know what it does and what does not, at least it helps me a lot to write/reuse/modify scripts faster and do not waste time on figuring, keeps WTFs/min at rather low value
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote