PDA

View Full Version : Types.conf



Brian R. Swan
2004-03-18, 10:23
Hey guys,

While trying to do my MP4 things, one of the "problems" I ran into was that
the types.conf file was a real formatting mess. I've attached a "cleaned up"
version that I also added some field headers too for convenience. I tested
it with my slimp3, and it doesn't appear to have any problems.

Also -- all the types in here are the "standard" ones from the latest CVS, I
deleted my additions to the file.

If you guys feel it's of value, feel free to check it into CVS. If you're not
interested, just trash it. :)

Thanks,
Brian

dean
2004-03-18, 18:27
Brian,

When you say "formatting mess" do you mean that the tabs don't line up?
We've standardized on four character tabs, and apart from one bad
line, it lines up ok for me...

-dean

On Mar 18, 2004, at 9:23 AM, Brian R. Swan wrote:

> Hey guys,
>
> While trying to do my MP4 things, one of the "problems" I ran into was
> that
> the types.conf file was a real formatting mess. I've attached a
> "cleaned up"
> version that I also added some field headers too for convenience. I
> tested
> it with my slimp3, and it doesn't appear to have any problems.
>
> Also -- all the types in here are the "standard" ones from the latest
> CVS, I
> deleted my additions to the file.
>
> If you guys feel it's of value, feel free to check it into CVS. If
> you're not
> interested, just trash it. :)
>
> Thanks,
> Brian
>
> <types-cleaned.conf>

Brian R. Swan
2004-03-18, 20:07
Well, sorry if I broke the standard. :) But yes, it was mostly because of the
amount of tabs. It just didn't format well for my screen. This one works
fine for me, but it the other one is standard, feel free to ignore it. :)

Thanks,
Brian

On Thursday 18 March 2004 7:27 pm, dean blackketter wrote:
> Brian,
>
> When you say "formatting mess" do you mean that the tabs don't line up?
> We've standardized on four character tabs, and apart from one bad
> line, it lines up ok for me...
>
> -dean
>
> On Mar 18, 2004, at 9:23 AM, Brian R. Swan wrote:
> > Hey guys,
> >
> > While trying to do my MP4 things, one of the "problems" I ran into was
> > that
> > the types.conf file was a real formatting mess. I've attached a
> > "cleaned up"
> > version that I also added some field headers too for convenience. I
> > tested
> > it with my slimp3, and it doesn't appear to have any problems.
> >
> > Also -- all the types in here are the "standard" ones from the latest
> > CVS, I
> > deleted my additions to the file.
> >
> > If you guys feel it's of value, feel free to check it into CVS. If
> > you're not
> > interested, just trash it. :)
> >
> > Thanks,
> > Brian
> >
> > <types-cleaned.conf>

Rob Funk
2004-03-18, 22:06
dean blackketter wrote:
> We've standardized on four character tabs, and apart from one bad
> line, it lines up ok for me...

Er, not to pick a fight or anything, but why "standardize" on four-character
tabs when most software defaults to eight-character tabs?

Personally when programming I like indenting in increments of four spaces
too, but I also prefer not to have to change the defaults everywhere just
to make text files look like they were indended to look. And many
text-handling programs don't allow changing the tab width at all.

--
==============================| "A slice of life isn't the whole cake
Rob Funk <rfunk (AT) funknet (DOT) net> | One tooth will never make a full grin"
http://www.funknet.net/rfunk | -- Chris Mars, "Stuck in Rewind"

Jack Coates
2004-03-18, 22:17
On Thu, 2004-03-18 at 21:06, Rob Funk wrote:
> dean blackketter wrote:
> > We've standardized on four character tabs, and apart from one bad
> > line, it lines up ok for me...
>
> Er, not to pick a fight or anything, but why "standardize" on four-character
> tabs when most software defaults to eight-character tabs?
>

My work does it this way too. eight character tabstops discourage proper
indenting when the nesting gets deep.

> Personally when programming I like indenting in increments of four spaces
> too, but I also prefer not to have to change the defaults everywhere just
> to make text files look like they were indended to look. And many
> text-handling programs don't allow changing the tab width at all.

True, but they are toys for the marketing department and HR to play
with. A programmer's editor such as vim, SlickEdit, emacs, &c. will
handle this configuration change with ease.

[jack@chupacabra jack]$ cat .gvimrc
set
guifontset=-*-fixed-medium-r-normal--14-*-*-*-c-*-*-*,-*-*-medium-r-normal--14-*-*-*-c-*-*-*,-*-*-medium-r-normal--14-*-*-*-m-*-*-*,*
set tabstop=4
set shiftwidth=4

--
Jack at Monkeynoodle Dot Org: It's A Scientific Venture...
************************************************** ********************
* "Religion is excellent stuff for keeping common people quiet." -- *
* Napoleon Bonaparte *
************************************************** ********************

Rob Funk
2004-03-18, 22:50
Jack Coates wrote:
> eight character tabstops discourage proper
> indenting when the nesting gets deep.

I've actually never heard of this particular rationale before, but anyway as
I said I agree with the idea of indenting programs in increments of four
spaces rather than 8. That's a completely separate issue from redefining
the width of a tab.

>> And many
>> text-handling programs don't allow changing the tab width at all.
>
> True, but they are toys for the marketing department and HR to play
> with.

Um, those people won't touch /bin/cat or /bin/more. But I use those
commands for a quick look at a file. (Please don't tell me I should just
use less -x4. I shouldn't have to worry about the issue at all.) Not to
mention grep and other text-processing utilities that write to the terminal
with its standard 8-char-wide tabs.

And on programs that do know about changing tab width, people shouldn't have
to change the definition of a tab for various files they load. In a group
where people might have different defaults for tabs, this argues for using
spaces instead, eliminating tabs entirely.

http://xarg.net/writing/tabs
http://www.jwz.org/doc/tabs-vs-spaces.html
http://paul.oniony.com/sections/information/tabsversusspaces.html

~> grep tab ~/.emacs
(setq indent-tabs-mode nil); indent with spaces, not tabs

I do see a decent argument for using tabs purely for indenting logical lines
in a program (but not for aligning split lines). However, that's not
what's going on in types.conf.
--
==============================| "A slice of life isn't the whole cake
Rob Funk <rfunk (AT) funknet (DOT) net> | One tooth will never make a full grin"
http://www.funknet.net/rfunk | -- Chris Mars, "Stuck in Rewind"

Dan Sully
2004-03-18, 23:25
* Rob Funk <rfunk (AT) funknet (DOT) net> shaped the electrons to say...

>dean blackketter wrote:
>> We've standardized on four character tabs, and apart from one bad
>> line, it lines up ok for me...
>
>Er, not to pick a fight or anything, but why "standardize" on four-character
>tabs when most software defaults to eight-character tabs?

I'm with Rob here - i've been an 8 character tab person for years now. It
gives a nice amount of visually separation. 4 chars just encourages more
stuff to be crammed into a space, and it's likely you should be unrolling
some loops at that point.

-D
--
As of next Thursday, UNIX will be flushed in favor of TOPS-10.
Please update your programs.

Dan Sully
2004-03-18, 23:26
* Jack Coates <jack (AT) monkeynoodle (DOT) org> shaped the electrons to say...

>My work does it this way too. eight character tabstops discourage proper
>indenting when the nesting gets deep.

IMNSHO, if nesting is more than 3-4 levels deep, it's time to unroll, or move
something into a function/method. That also encourages code reuse.

-D
--
As of next Thursday, UNIX will be flushed in favor of TOPS-10.
Please update your programs.

kdf
2004-03-18, 23:42
Quoting Dan Sully <daniel (AT) electricrain (DOT) com>:

> * Rob Funk <rfunk (AT) funknet (DOT) net> shaped the electrons to say...
>
> >dean blackketter wrote:
> >> We've standardized on four character tabs, and apart from one bad
> >> line, it lines up ok for me...
> >
> >Er, not to pick a fight or anything, but why "standardize" on
> four-character
> >tabs when most software defaults to eight-character tabs?
>
> I'm with Rob here - i've been an 8 character tab person for years now. It
> gives a nice amount of visually separation. 4 chars just encourages more
> stuff to be crammed into a space, and it's likely you should be unrolling
> some loops at that point.

as long as they are all tabs, instead of spaces, any tab width larger than 4
should look just fine. its only when you try 3 that you end up with lines that
look odd because text overlaps a tab stop. The big problem is when 8 spaces are
inserted for the tab character. Then its messed up for anyone not using 8. I
personally have hated hate from the day I got my first computer. you run out of
room too fast with only 8, unless you specifically write to avoid deep nesting.

-kdf

Dan Sully
2004-03-18, 23:44
* kdf <slim-mail (AT) deane-freeman (DOT) com> shaped the electrons to say...

>> I'm with Rob here - i've been an 8 character tab person for years now. It
>> gives a nice amount of visually separation. 4 chars just encourages more
>> stuff to be crammed into a space, and it's likely you should be unrolling
>> some loops at that point.
>
>as long as they are all tabs, instead of spaces, any tab width larger than 4
>should look just fine. its only when you try 3 that you end up with lines that
>look odd because text overlaps a tab stop. The big problem is when 8 spaces are
>inserted for the tab character. Then its messed up for anyone not using 8. I
>personally have hated hate from the day I got my first computer. you run out of
>room too fast with only 8, unless you specifically write to avoid deep nesting.

I can live with that. I try and fix 8 spaces -> 1 tab whenever I can. And
yes, deep nesting usually indicates a problem in my experience. Or at least harder to read code.

-D
--
<weezyl> $6.66: The Value Meal of the Beast.

kdf
2004-03-18, 23:50
Quoting Dan Sully <daniel (AT) electricrain (DOT) com>:

> * kdf <slim-mail (AT) deane-freeman (DOT) com> shaped the electrons to say...
>
> >> I'm with Rob here - i've been an 8 character tab person for years now. It
> >> gives a nice amount of visually separation. 4 chars just encourages more
> >> stuff to be crammed into a space, and it's likely you should be unrolling
> >> some loops at that point.
> >
> >as long as they are all tabs, instead of spaces, any tab width larger than
> 4
> >should look just fine. its only when you try 3 that you end up with lines
> that
> >look odd because text overlaps a tab stop. The big problem is when 8 spaces
> are
> >inserted for the tab character. Then its messed up for anyone not using 8.
> I
> >personally have hated hate from the day I got my first computer. you run
> out of
> >room too fast with only 8, unless you specifically write to avoid deep
> nesting.
>
> I can live with that. I try and fix 8 spaces -> 1 tab whenever I can. And
> yes, deep nesting usually indicates a problem in my experience. Or at least
> harder to read code.
>
I've noticed, and try to remove spaces in favour of tabs when I do anything on a
module. I'm sure I caused some of that early on when I stared. It took a while
to find a good editor that wasnt' putting in spaces and messed up line endings
when I didn't want them. Sadly, I still can't stop ultraedit from doing some
autocorrections, even after turning the feature off. pressing tab before a
Slim:: changes the S to s, which is nasty if you don't see it before you commit.

-kdf

dean
2004-03-19, 11:06
I'll detab the file.

-dean

On Mar 18, 2004, at 9:50 PM, Rob Funk wrote:

> Jack Coates wrote:
>> eight character tabstops discourage proper
>> indenting when the nesting gets deep.
>
> I've actually never heard of this particular rationale before, but
> anyway as
> I said I agree with the idea of indenting programs in increments of
> four
> spaces rather than 8. That's a completely separate issue from
> redefining
> the width of a tab.
>
>>> And many
>>> text-handling programs don't allow changing the tab width at all.
>>
>> True, but they are toys for the marketing department and HR to play
>> with.
>
> Um, those people won't touch /bin/cat or /bin/more. But I use those
> commands for a quick look at a file. (Please don't tell me I should
> just
> use less -x4. I shouldn't have to worry about the issue at all.) Not
> to
> mention grep and other text-processing utilities that write to the
> terminal
> with its standard 8-char-wide tabs.
>
> And on programs that do know about changing tab width, people
> shouldn't have
> to change the definition of a tab for various files they load. In a
> group
> where people might have different defaults for tabs, this argues for
> using
> spaces instead, eliminating tabs entirely.
>
> http://xarg.net/writing/tabs
> http://www.jwz.org/doc/tabs-vs-spaces.html
> http://paul.oniony.com/sections/information/tabsversusspaces.html
>
> ~> grep tab ~/.emacs
> (setq indent-tabs-mode nil); indent with spaces, not tabs
>
> I do see a decent argument for using tabs purely for indenting logical
> lines
> in a program (but not for aligning split lines). However, that's not
> what's going on in types.conf.
> --
> ==============================| "A slice of life isn't the whole cake
> Rob Funk <rfunk (AT) funknet (DOT) net> | One tooth will never make a full grin"
> http://www.funknet.net/rfunk | -- Chris Mars, "Stuck in Rewind"
>
>