Re: OT: Why is C so popular?

2003-08-28 Thread Anders Arnholm
On Thu, Aug 28, 2003 at 06:46:09AM -0500, Ron Johnson wrote:
> Lets take my MUA, Evolution, for example.  It's not processor 
> intensive.  Why couldn't it be written in Python?  

One of the main reasons is that Python leaves a loot of the resolving to
runtime, that means that the code actually has to be run before you can
see tha actuall typo found at compile time in languanges as C. 

> So many potential bugs related to pointers and null-terminated 
> strings would be eliminated.  The SLOC count would be lowered, and

Yes that kind of problem would be removed, but Python code has other
parts that may as well fail. Many being simples problems of types that
simply isn't resolved untill runtime and as all code isn't run all the
time it may burry it self long down and hidden. I think that is bad for
large projects.

> For the necessary GUI stuff, use the existing wrappers python-gtk2
> and python-gnome2.

wxPython would be a better choise in my mind. Python is good for a loot
many project but it does however don't solve problem with bad coding. If
you have potestion null pointer probelsm in C then you are coding in  a
bad style for that language. That will give you problems in any
language.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-08-28 Thread Anders Arnholm
On Wed, Aug 27, 2003 at 11:55:23PM -0700, Steve Lamb wrote:
> On Wed, 27 Aug 2003 23:52:35 -0600
> Jacob Anawalt <[EMAIL PROTECTED]> wrote:
> > It _seems_ to work for me to convert someone elses sytle (or lack of it) 
> > in coding C into a format that I like (K&R).
> 
> It boils down to this.  In Python if I want something to be in a block, I
> smack tab and don't even need to worry about my editor doing the right thing. 
> I tell it to set tab stops to 4, save all spaces and how the code is written

The biggest problem working with python ident sysntax is when one comes
over someones elses code and it;s intended like shit. If this happen in
C, :0=G and it's possible to read, if we have the same situation in
Pyhton I have to think. Also my editor doesn't support % for python, it
can't autofold python and so on a loot of good things that i have in
most languanges are just not there in Python. 

> it is a matter of block delimiter placement.  Some people prefer to have the
> block delimiters separate of the line that starts the block.  Some prefer the

There is a nice program to fix this it's called indent...

> 3 different styles.  But remove the damnedable braces and what are you
> left with?
> 
> if cond
> block
> else
> block
> 
> Hence it is not other people's style I dislike, it is the freakin' braces.

So:

if test: do first
else: do other

isn't good any more, there is still differences and different ideas...
It's just not the same ones. 

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-08-29 Thread Anders Arnholm
On Thu, Aug 28, 2003 at 01:32:07PM -0500, Ron Johnson wrote:
> On Thu, 2003-08-28 at 11:06, Alan Shutko wrote:
> > Anders Arnholm <[EMAIL PROTECTED]> writes:
> > So, basically, you don't like Python because your text editor is
> > junk.  Fix it or go find a real editor!
> Heck, vim in default mode (no syntax coloring) is Good Enough.

Thats about what I'm using, but vim i cmode is aloot more powerful tool
to C programing than vim in Python mode.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-08-29 Thread Anders Arnholm
On Thu, Aug 28, 2003 at 02:26:11PM -0700, Steve Lamb wrote:
> On Thu, 28 Aug 2003 13:20:07 -0700
> Erik Steffl <[EMAIL PROTECTED]> wrote:
> Indention isn't magically lost and you're speaking of copies.  The problem
> in all those cases lays in the transport or in the person who doesn't know
> what he is doing, not the code.  2+ years of working with Python and your
> scenerio has come up exactly 0 times in my experience.

So you don't copy from example web-pages and so on when trying to learn
about a new feature, area and so on. I do that aloot and thats is the
biggest problem with Python. The other parts of the languange however
sometimes for some works make this a minor problem that I can live with.
As I can live with a some of the problems in Perl, C, C++, Java, bla.
and so on. No languange are perfect, not even Python, many have problems
with the witespace in languanges that use them, thats is a fact.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-08-29 Thread Anders Arnholm
On Thu, Aug 28, 2003 at 12:55:56PM -0400, Mark Roach wrote:
> On Thu, 2003-08-28 at 09:10, Anders Arnholm wrote:
> > On Thu, Aug 28, 2003 at 06:46:09AM -0500, Ron Johnson wrote:
> > > Lets take my MUA, Evolution, for example.  It's not processor 
> > > intensive.  Why couldn't it be written in Python?  
> > One of the main reasons is that Python leaves a loot of the resolving to
> > runtime, that means that the code actually has to be run before you can
> > see tha actuall typo found at compile time in languanges as C. 
> 
> This is such a fallacy. It's very easy to make code that compiles but
> crashes. Compilers just compile code, they do not give it a magic "This
> program is well written" certificate. Use pychecker, be happy. or better
> yet, test your code.

PyChecker, I'll have a look at that. But that still doesn't change than
main think if you say test you code that applies to any other langunage
too, and we ahve lint for C. In the real world testing to often gets
pushed to far away in the developemnt, I know what I'm talking about I
have been working almost all the time since 1998. Mostly developing test
enviroment for different products. There is no such magic that makes it
possible to test everything.

PyUnits is a good test engine but I leaves some parts that stilla are
hard to test, that could contain runtime errors. Testing also is a hard
bussinis to figure out whar the heck is going to happen in runtime. The
tools at the meoment for C is far more advances that the availible tools
for Python.

> > Yes that kind of problem would be removed, but Python code has other
> > parts that may as well fail. Many being simples problems of types that
> > simply isn't resolved untill runtime and as all code isn't run all the
> > time it may burry it self long down and hidden. I think that is bad for
> > large projects.
> 
> how is that different from some C code casting inappropriately deep in
> the bowels of your app? In python, you at least get a useful exception,
> in C you just get a nasty segfault and fun with the debugger.

Well the usefullness of this messange (or the more commonly seen
exception in Java or C++) could be discussed. The bottom line is that in
all languages good disipline and good rutines for testing is the most
importand. You will always have a loot of trobles, you will always leave
someting that you didn't expect to happen. All probrams in all
languanges have the problems, changing langunage will not with any magic
make this go away.

So making a office/mail suit using Python insteda of C wount make it any
better or less likely to crash for the user becaues the problems are not
in the language it in something else. There bu not saying that Python
might not be a good languange for the work or that C might not be a
langes for this kind of work.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-08-29 Thread Anders Arnholm
On Thu, Aug 28, 2003 at 12:46:43PM -0700, Steve Lamb wrote:
> On Thu, 28 Aug 2003 15:10:33 +0200
> Anders Arnholm <[EMAIL PROTECTED]> wrote:
> > One of the main reasons is that Python leaves a loot of the resolving to
> > runtime, that means that the code actually has to be run before you can
> > see tha actuall typo found at compile time in languanges as C. 
> 
> This is offset by the fact that the code-compile-run cycle is reduced to
> code-run.  Furthermore a lot of prototyping of code can be done interactively.
> When I run into a situation where I'm not sure exactly how I want to do
> something I open another window, fire up Python, import the appropriate
> libraries and twiddle with the code until I get a form that works.  Then I
> take that and put it back into the main code.

The difference in work cycle isn't that big, in Python I usally do
"./verifyProgram" and in c mostly "make test". If I need to test
something in C usally just fire up a new file and type in the needed
code and run, or use my nice c alias that takes c code from stdin and
runs the resulting binary. (And no I have never liked typing in code
interactivly, I store everything in a file. But thats is an area of
personaly liking.)


/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-08-29 Thread Anders Arnholm
On Fri, Aug 29, 2003 at 02:36:26AM -0700, Steve Lamb wrote:
> On Fri, 29 Aug 2003 10:41:45 +0200
> Anders Arnholm <[EMAIL PROTECTED]> wrote:
> > So you don't copy from example web-pages and so on when trying to learn
> > about a new feature, area and so on. I do that aloot and thats is the
> > biggest problem with Python. 
> 
> I do and it hasn't caused me any problems.  Might I suggest you learn how

Then tell me how you do it, if it's that easy that I shuld have know
aboutis, but I still use vim as vi almost only using the vi compatible
functions with some small additions that happens to make it more
usefull. There might be a simple concept not documented of described in
a obvius way that I have missed, but for me it gets into a painfull
reindening line by line (or sometimes marking the block and using the
shift operators to get it right, sometimes it's hard to know how many
steps you should shift the code so I still think it's a loot harder than
just =%, and using = is realy bad on python code, then you have changed
the syntax of the file). 

> to use vim before citing problems based on your own ignorance[1].  Furthermore
> until you figure out how not to send mail both to me and the list when I am
> clearly reading and replying here correspondence between you and I is at an
> end.

I got a message in my inbox, and as it looked more personal I replyed to
it. This message is only going to the list, 

> [1] Prime example being vim not able to fold Python code when I've seen it
> done.

I don't yet (or at least inte version of vim that I are useing had the
autofold function for Python code). Checking the currect documentation
show that now I can do it. At least on this computer. SO I stand
corrected that has been added and is working.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-08-29 Thread Anders Arnholm
On Fri, Aug 29, 2003 at 08:35:25AM -0500, Ron Johnson wrote:
> On Fri, 2003-08-29 at 03:35, Anders Arnholm wrote:
> > On Thu, Aug 28, 2003 at 01:32:07PM -0500, Ron Johnson wrote:
> > > On Thu, 2003-08-28 at 11:06, Alan Shutko wrote:
> > Thats about what I'm using, but vim i cmode is aloot more powerful tool
> > to C programing than vim in Python mode.
> Yeah, for things like braces-matching.  But the need for that is
> eliminated in Python...

So if not using braces matching, how does one quickly jump to the
end/begining of a block. 

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-08-29 Thread Anders Arnholm
On Fri, Aug 29, 2003 at 08:33:40AM -0500, Ron Johnson wrote:
> On Thu, 2003-08-28 at 14:07, Pigeon wrote:
> set tabstop=4

So thats why all code form other Python programers look like shit and
dont line up, not that a tab is 8 spaces wide and will stay that way for
ever everything else is PLAIN fucking evil!!! Or as the vim help file
puts it.

  Note: Setting 'tabstop' to any other value than 8 can make your file
  appear wrong in many places (e.g., when printing it).


/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-01 Thread Anders Arnholm
On Fri, Aug 29, 2003 at 02:06:53PM -0500, Ron Johnson wrote:
> On Fri, 2003-08-29 at 11:27, Anders Arnholm wrote:
> > On Fri, Aug 29, 2003 at 08:35:25AM -0500, Ron Johnson wrote:
> > > On Fri, 2003-08-29 at 03:35, Anders Arnholm wrote:
> > So if not using braces matching, how does one quickly jump to the
> > end/begining of a block. 
> Well, "PageDown" and the down-arrow usually work for me...

It doesn't work for me, it only jumps to the end of the page and or a
line down. When programing in C I'm used to when being at the beginin of
a class/function/block being able to get to the end of this block by
pressing % (e.g. matching brace) and continue from there. That makes
navigation in the file fast and I need to keep track of a loot less
bookmarks. I what a such functionality when editing Python code too.


/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-01 Thread Anders Arnholm
On Fri, Aug 29, 2003 at 01:46:37PM -0500, Ron Johnson wrote:
> On Fri, 2003-08-29 at 11:32, Anders Arnholm wrote:
> > On Fri, Aug 29, 2003 at 08:33:40AM -0500, Ron Johnson wrote:
> > > On Thu, 2003-08-28 at 14:07, Pigeon wrote:
> > > set tabstop=4
> > 
> > So thats why all code form other Python programers look like shit and
> > dont line up, not that a tab is 8 spaces wide and will stay that way for
> > ever everything else is PLAIN fucking evil!!! Or as the vim help file
> > puts it.
> > 
> >   Note: Setting 'tabstop' to any other value than 8 can make your file
> >   appear wrong in many places (e.g., when printing it).
> You conveniently ignored the fact that I also mentioned 
> set expandtab
> There are no ^I characters when that is used.

So why change tabstop? Is there any reason for that what so ever and I
know that the file you send out didn't have any tabs, but the only
reason what so ever for setting tabstop to 4 I could fingure out what
that other programers working with the same files as you, did do this
wrong! And as I interpited this as a reconedation, something in the
enviroment whas wrong.


/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-01 Thread Anders Arnholm
On Fri, Aug 29, 2003 at 12:30:24PM -0700, Steve Lamb wrote:
> On Fri, 29 Aug 2003 18:32:08 +0200
> Anders Arnholm <[EMAIL PROTECTED]> wrote:
> > On Fri, Aug 29, 2003 at 08:33:40AM -0500, Ron Johnson wrote:
> > > On Thu, 2003-08-28 at 14:07, Pigeon wrote:
> > > set tabstop=4
> > So thats why all code form other Python programers look like shit and
> > dont line up, not that a tab is 8 spaces wide and will stay that way for
> Nice try.  You trimmed "expandtab" from the quote.

Yes but why does you need it if you don't get bad files from other
programers using tabs for spaces wides as indention? I saw and knew what
expandtabs does, I don't have it my self most of the time, but in some
projects it's nice however in most enviroment all progamers know NOT to
change tabstop and then tabstop is always 8 wide in all files.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-01 Thread Anders Arnholm
On Mon, Sep 01, 2003 at 01:49:23AM -0700, Steve Lamb wrote:
> On Mon, 1 Sep 2003 10:23:38 +0200
> Anders Arnholm <[EMAIL PROTECTED]> wrote:
> > So why change tabstop? 
> So that when we hit tab it goes to the next multiple of... 4?

Then why not learn the editor :^) Whan hitting tab MY vim with tabstop
of eight jumps to the next indention level, e.g. what I have in the
shiftwidth variable that you also changed to four. If you have indent on
that is what controls the behaviure of the editor when pressing tab. I
can see no reason setting sw if not usint cindent an then the value of
sw is used when you press tab.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-01 Thread Anders Arnholm
On Mon, Sep 01, 2003 at 01:56:39AM -0700, Steve Lamb wrote:
> On Mon, 1 Sep 2003 10:26:56 +0200
> Anders Arnholm <[EMAIL PROTECTED]> wrote:
> > Yes but why does you need it if you don't get bad files from other
> > programers using tabs for spaces wides as indention?
> 
> Because new people to Python haven't yet learned about no tabs?

And most of the use 4 spaces wide tabs? Or just use one tab as indention
level? In every case that still explans why python code found on the net
other looks realy bad indented. Don't take it personal, it just explans
for me why it look so bad.

> > I saw and knew what expandtabs does, I don't have it my self most of the
> > time, but in some projects it's nice however in most enviroment all
> > progamers know NOT to change tabstop and then tabstop is always 8 wide in
> > all files.
> Since we're talking Python here and since vim does autodetect quite nicely
> between Python and C (and Perl and.. and... and...) and one can set the
> tabstop, expandtabs and the like based on the file edited.  What exactly is
> your point?

If you feel that it's necessary to changes tabstop to four to get the
code readable, then only reason to have tabstop set to four, then that
explans why code found on the ner look bad. It's also stated in
the Python language definition that tabstop is at 8 spaces, and changing
this might actually changes the syntax of a program, given that the
actually is a mix of spaces and tab in the source file. (And there is a
recomendation not to have tabs for crossplatform compability.)

/ Anders

-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-01 Thread Anders Arnholm
On Mon, Sep 01, 2003 at 02:51:20AM -0700, Steve Lamb wrote:
> On Mon, 1 Sep 2003 11:02:09 +0200
> Anders Arnholm <[EMAIL PROTECTED]> wrote:
> > Then why not learn the editor :^) Whan hitting tab MY vim with tabstop
> > of eight jumps to the next indention level,
> 
> I suggest you try that again VERRRY carefully.  I just tried it.  Entered
> the editor in Python mode
> :set shiftwidth=4
> if foo:

Just tried,

:set sw=4
class test:
Four spaces no tab, ofcource I use cindent as default...

> Since we're not in cindent that doesn't count and since it is easier to

And why don't you use cindent? Becouse you have something religus
against the c in the name?

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-01 Thread Anders Arnholm
On Mon, Sep 01, 2003 at 03:04:28AM -0700, Steve Lamb wrote:
> On Mon, 1 Sep 2003 11:18:14 +0200
> Anders Arnholm <[EMAIL PROTECTED]> wrote:
> Yes, but vim uses tabstop to determine how many spaces to put in.  Hence
> tabstop to 4, expandtabs on, shiftwidth to 4.  Tabstops to know what to do
> when we hit tab, expandtabs on so we don't send it out to other people,
> shiftwidth to know what to do when we want to reindent.

SO the reason is to inport bad fomrated code, and make that code better
formated. For me thats dosn't make med have to change my editor. As this
still needs a manual step, whan it happens I can change my tabstop to
fix it in that buffer only.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-01 Thread Anders Arnholm
On Mon, Sep 01, 2003 at 03:50:08AM -0700, Steve Lamb wrote:
> On Mon, 1 Sep 2003 12:15:11 +0200
> Anders Arnholm <[EMAIL PROTECTED]> wrote:
> > And why don't you use cindent? Becouse you have something religus
> > against the c in the name?
> 
> Because we're not programming in C and I'd rather not take the chance of
> it doing something stupid based on the presumption we are coding in C.

Then you should look into what itäs doing and learn your editor, even
tough it's called cindent i more of context indent the c language
indent. Some parts of it works with python but autoindening the whole
file doesn't of understandable reasons. Peronaly I have gorwn so used to
cindent (or the simularity in emacs) that I can't program without. Well
actually I didn't do any serius programing in vi untill vim came around
with just that feature. Since then I haven't used Emacs more on some
minor ocations par programing with other programmers.

/ Balp


-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-01 Thread Anders Arnholm
On Mon, Sep 01, 2003 at 11:24:41AM -0400, Mark Roach wrote:
> On Mon, 2003-09-01 at 06:20, Anders Arnholm wrote:
> > On Mon, Sep 01, 2003 at 03:04:28AM -0700, Steve Lamb wrote:
> > > On Mon, 1 Sep 2003 11:18:14 +0200
> > > Anders Arnholm <[EMAIL PROTECTED]> wrote:
> Here is a very easy way to achieve that which does exactly what I want
> every time: :set ts=4 et
> 
> It works. period. There is no "better way". There is only "accomplishes
> that goal", or "doesn't accomplish that goal". This has nothing to do

This one does one big problem IF you get a file from someone else that
has mixed tabs and spaces. And is using a tabsize of the standard 8
spaces. Then in combination with Python you by editing the code you
actually does changes the sysntax of the file. Then I don't see the huge
difference to change into :set sts=4 et if thats what you actually
whan't.

> with other people's code. This is what I do for *my* code. Please
> understand that just because the word "tab" is used in the options that
> doesn't mean this actually has to do with the \t character

The difference between ts and sts is just that ts works on \t
charachters imported in the files to, and sts doesn't. Setting ts
without et is definitly wrong. Setting it with et just look wrong, but
doesn't hurt so many else. (Or hopefully don't...)

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-02 Thread Anders Arnholm
On Tue, Sep 02, 2003 at 09:37:27AM +0100, Colin Watson wrote:
> On Mon, Sep 01, 2003 at 10:19:18PM -0400, Mark Roach wrote:
> > On Mon, 2003-09-01 at 13:26, Colin Watson wrote:
> Nowadays, on average I tend to use expandtab for new code, but
> converting tabs to spaces is still an operation that needs to be handled
> carefully with respect to revision control, so I don't apply it across
> the board.

Almost all decent revision control programs tend to let you ignore
whitespace when doing diffs of a program. (Works fine in most languages
as whitespace don't containing any information.) So for that reason it
should still work to update the code to have better indention and get
the full usage of the revision control. (As you don't use python.)

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`



pgp0.pgp
Description: PGP signature


Re: OT: Why is C so popular?

2003-09-02 Thread Anders Arnholm
On Tue, Sep 02, 2003 at 11:12:46AM +0100, Colin Watson wrote:
> On Tue, Sep 02, 2003 at 11:43:19AM +0200, Anders Arnholm wrote:
> > On Tue, Sep 02, 2003 at 09:37:27AM +0100, Colin Watson wrote:
> > > Nowadays, on average I tend to use expandtab for new code, but
> > > converting tabs to spaces is still an operation that needs to be handled
> > > carefully with respect to revision control, so I don't apply it across
> > > the board.
> > 
> > Almost all decent revision control programs tend to let you ignore
> > whitespace when doing diffs of a program.
> 
> Other people working on the project still need to use that option, and
> it still makes annotate less convenient. Unnecessary cosmetic changes
> are always a pain, and if done at all they should always happen in
> separate commits to functional changes. (Wearing my code reviewer hat, I
> will jump up and down on your head if you mix cosmetic changes with
> functional changes. :))

Yes, it's good idea to keep it separate check ins. But that doesn't
changed the main thing i they are needed, e.g. the code is in bad
indention according to coding standard or something else like this. Make
the change, run the test suit, checking the changes (with comment
"update to follow coding standard." or something like that) and then
proceed with the other functional standards. Coding standard, tab/spaces
and some on is usually something you like to do before you start a
complex work. So that the the complex work gets a little easier. If
you like to compare versions operated by a syntax changes that the
ignore whitespace comes in handy.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`



pgp0.pgp
Description: PGP signature


Re: Presort my email messages when exmh is the MUA.

1998-12-15 Thread Anders Arnholm
>>>shaul wrote:
 > I am using exmh to handle my email (MUA ?). The MTA is smail (is it also the
  
 > MDA ? What are the differences between MDA and MTA ?).
 > I want to presort my email messages.
 > Can you recommend a way to do it (procmail ? exmh capabilities for this 
task,
 > if it got any ? other ?).

I use, Exmh, sendmail, and procmail and I think that is a great combination, 
someday (soon?) I will probably change sendmail to Postfix. But for now I have 
been using sendmail, I have also a short while used smail, but it's hard to 
configure the way I like it to work. I have read everything some ware in the 
exmh or the nmh documentation.

My entries in the procmailrs files is something like this:

:0 w: debian/announce/$LOCKEXT
* [EMAIL PROTECTED]
| /usr/lib/mh/rcvstore +debian/announce -create

:0 w: inbox/$LOCKEXT
| /usr/lib/mh/rcvstore +inbox -create


Anv most important I have in the beginning of my procmailrc file:

SHELL=/bin/sh
PATH=/usr/local/lib:/usr/local/bin:/usr/bin:/bin
MAILDIR=$HOME/Mail/
LOGFILE=$HOME/Mail/procmail-log
LOCKEXT=.lock


# This is to make sure I only get mail one.
:0 Wh : msgid.lock
| formail -D 8192 .msgid.cache

# And rewrite to fit in mh folders.
:0 Whf
| formail -z -R 'From ' X-Envelope-From:


/ Anders



Re: 2.2 ready ?

1999-01-08 Thread Anders Arnholm
>>>Shaleh wrote:
 > On 08-Jan-99 Bert Barbe wrote:
 > > Is there a distribution that is kernel v. (pre-)2.2 ready (= having
 > > the right versions of neccessary tools to run linux (pre-)2.2)
 > potato definately, slink possibly

Slink works, over here (I think I have mostly slink installed now, SANE is the 
only packet I know is potato, and a loot of other package are still hamm. 
Apt-tells me that it is holding back a bit over 100 packets.)

/ Anders


Re: Secure Mailer

1999-01-12 Thread Anders Arnholm
On Tue, 12 Jan 1999, Nathan E Norman wrote:

> A quick glance at the web site doesn't indicate that Secure Mailer
> (Wietse Venema's software) has been packaged yet.  Anyone know if it has

There are a unstable package for postfix-19981230-1, I have briefly watchd
a test installation of the MTA, and the installer scripts are broken. I
have been activly using (my own compiled postfix) for some days now at my
site and I think it works very well. My mail server is a 386sx-16, 4Mb
memory and the enormus disk of 200Mb (just upgraded from my old 50Mb disk,
and Debian 1.3), the installation on my domain is mainly for tesing and
eveluation the software. I have found things that I like to look closer
at.

1) Postfix reports
  EXPN balp
  502 Error: command not implemented
   I don't know if this is configuration or time, but I like to EXPN mail
   adresses.

2) Is it possible to get postfix to do ident lookup on incomming smtp
   sessions.

And then there has to be some serious perforamce testing :)

/ Anders

-- 
  o_   Anders Arnholm, Work   : http://www.opensoftware.se/
 o/  /\* MOVING *  Phone  : +46-31-*SOON*
/|_, \\* MOVING *  Celluar: +46-703-160969
/  Sweden http://www.acc.umu.se/~balp
`


Re: Partition Type A0 ??

1999-05-12 Thread Anders Arnholm
>>>Will Lowe wrote:
 > partition,  and that's how it did that crazy install-with-no-disk thing.
 > Does anybody know if that's possible?  Or know what partition type A0
 > really is?

I don't know about how AST makes it, but I have seen several Laptop's from 
Toshiba that uses an extra partition in the end that is used for power saving 
only. I don't have access to that machine anymore so I can't check the 
partition type. But I'm sure that you can place the Win95 cab-files, on the 
"primary" fat partionan and make it bootable from there. (As it was on my Dell 
mashine.)

/ Anders


Re: remote execution

1999-05-14 Thread Anders Arnholm
>>>Robert Vollmert wrote:
 > Currently, I'm using ssh with a /root/.shosts file on B, but this
 > seems a little dangerous. Any better suggestions?


ssh using RSA authentication to a "dummy" user on the remote host, use sudo to 
run that script as root. This will only make that command possible from 
outside.

/ Anders


Re: [DEBIAN] Dell Latitude CPi A366XT

1999-05-18 Thread Anders Arnholm
>>>[EMAIL PROTECTED] wrote:
Sorry for repying on the answer, missed (probably deleted) the original 
question.

 > > is there anybody who has experience with the
 > > Dell Latitude CPi A366XT portable.
 > > Is the Neomagic 2200 graphics board supported?

The Label in front of me, well actually Fn-Setup, tells me that this machine 
is a Dell Latitude CPi A366XT, X works very nice with XFree 3.3.3.1 from 
potato, NeoMagic chips are supported straight of (as XF86_SVGA). I have two 
problems left with the machine, the sound (NeoMagic 256 Audio Chip, NeoMagic 
says that it's up to Redhat, and Redhat only to write the drivers.) And 
Suspend Resume when the pcmcia drivers for my 3com card are loaded (I usually 
work around this by issuing ifconfig eth0 down ; /etc/init.d/pcmcia stop 
before closing the lid.)

/ Balp


Re: gui progs as root in x under normal user?

1999-05-18 Thread Anders Arnholm
>>>Robert Vollmert wrote:
 > A safer solution would be to do (as root):
 > 
 > # export DISPLAY=:0.0
 > # export XAUTHORITY=/home/yourname/.Xauthority

That worked until I started to work in a networked environment. Then I don't 
like all clients to have root access to the users home directory so the row 
sound be something like this.

/usr/bin/X11/xauth -f /home/balp/.Xauthority extract - $DISPLAY 
/usr/bin/X11/xauth merge -

/ Balp


Re: Help with a Dell Latitude CPia

1999-11-25 Thread Anders Arnholm
On Wed, Nov 24, 1999 at 12:03:57AM -0600, Chris Larson wrote:
> I have installed corel linux onto my laptop. Everything looks great and runs
> fine except for three things.
> 
> 1. My ethernet card is not working. I can ping myself but I cannont ping
> anything else.

I have a Dell Latitude CPi A366XT, that I use to write this message from

I use pcmcia pacage 3.1.3 that i have compiled my self, it identifies my
network card as:
Socket 0:
  product info: "3Com Corporation", "3CCFE575BT", "LAN Cardbus Card", "001"
  manfid: 0x0101, 0x5157
  function: 6 (network)


> 2. I have no sound. sndconfig cannot detect a sound card. I think these
> laptops use some Neomagic sound chip.

Thats correct you willl need Linux kernel 2.2.13 or newer :^) To get support
for that sound card. (At least some basic support that lets med listen to
mp3's while writing this...)

> 3. My Gold card 56K modem will dial out but will not connect to my ISP. I
> get the error that the pppd died unexpectedly.

Here I can provide no help at all.

-- 
Anders Arnholm.-.
 Sisjö Kullegata 8, 421 32 V. Frölunda|  open software  |
 Tel. 031-28 21 84 | Fax 031-28 51 66 `-´
 Mobil 0703-16 09 69 | [EMAIL PROTECTED] | www.opensoftware.se


Re: Experience with IBM Thinkpad 300CSE

1998-10-27 Thread Anders Arnholm
> Does anyone have experience installing Debian (Hamm/Slink) on an IBM
> Thinkpad 300CSE?  My father got me an early xmas present.  486-50(?), 20Mb
> RAM, 350Mb HD.  It has Win95 on it now.  I don't really need X, just curious
> as to how well Linux will like such a beast.  

I have installed it on my brothers 360C and it worked. I almost configured X, 
XFREE86Config did run but got something "abd" in the modlines that I din't had 
timer to check out. And I don't know if he everfixed that.

The 3690 is some kind of 486, with color display. There are several good sites 
about IBM thinkpads linked from www.linux.org.

/ Anders



Re: Installation problem from floppies, RAMDISK error, please help me!!!

1998-12-08 Thread Anders Arnholm
>>>[EMAIL PROTECTED] wrote:
 > I am trying to install debian from a 386SX 16mhz with 5 megs of ram from a
 > floppy disk drive.  It has a 106 meg hard drive.  15 megs of the hard drive
 > are used as an MSDOS partition.  The installation goes through detecting ite
 ms
 > on the system and then says the following and freezes:
 > 
 > RAMDISK: Compressed image found at block 0

I have installed Debian 1.3 on a simular maskine  Just that i "only" had 50 mB 
harddrive and 4 Mb memory, I guess that you have to use the lowmemory 
installation procedure (as described in the install.txt file).




Re: Kernel for AMD Thunderbird

2001-08-24 Thread Anders Arnholm
On Thu, Aug 23, 2001 at 07:59:01PM +0300, George Karaolides wrote:
> On Thu, 23 Aug 2001, Jason Majors wrote:
> I read that, but I haven't gone over to 2.4 yet.  I'll cross that bridge
> when I get to it...

I'm running two machines on 2.4.[59] with Athlon kernel no problems. One is a
Duron 600 the other a Thunderbird 1200. The duron as run kenels 2.4.1 throu
2.4.5 and the thunderbird only as 2.4.9.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgp2MTnACK5uA.pgp
Description: PGP signature


Re: Making /home not accessible by outsiders

2002-05-30 Thread Anders Arnholm
On Thu, May 30, 2002 at 05:38:29AM -0400, ThanhVu Nguyen wrote:
> default).  Now I changed my mind, because even /root is readable by
> others ... 

I just wonder what kind of infromatiosn does you have in /root that is
secret and has any value in hiding. I only have som standard .profile,
.ssh/known_hosts, but they raily gets touched. (All root work is done
with su.) The secret stuff is in /home/balp/private/.

/ Balp
-- 
  o_   Anders Arnholm,   HiQ - Consultant
 o/  /\[EMAIL PROTECTED] Phone  : +46-703-160969
/|_, \\http://anders.arnholm.nu/ http://www.hiq.se
/
`


pgpd84LglrhmP.pgp
Description: PGP signature