Re: question about linker

Liste des GroupesRevenir à cl c 
Sujet : Re: question about linker
De : cr88192 (at) *nospam* gmail.com (BGB)
Groupes : comp.lang.c
Date : 03. Dec 2024, 19:57:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vinkbv$8r4i$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla Thunderbird
On 12/2/2024 12:13 PM, Scott Lurndal wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
On 01.12.2024 17:42, Bart wrote:
On 01/12/2024 15:08, Janis Papanagnou wrote:
On 01.12.2024 12:52, Bart wrote:
 
makes typing easier because it is case-insensitive,
>
I don't think that case-insensitivity is a Good Thing. (I also don't
think it's a Bad Thing.)
 I think it's a _real bad thing_ in almost every context related
to programming.
 
Agreed, even in contexts where it is usually standard, such as ASM programming and BASIC.
In my case, I have ended up with dialects where:
   Identifiers and similar are case sensitive;
   mnemonics / keywords are often case insensitive.
For things like file-systems, I much prefer case sensitivity.
If a shell or file-manager wants to allow case-insensitivity, it can do so itself, if purely as a UI feature for user convenience, but the underlying filesystem should ideally remain case-sensitive.
Though, it can lead to wonk with FAT:
   For 8.3 names, only a limited range of options exists, IIRC:
     FIRSTNAM.EXT
     FIRSTNAM.ext
     firstnam.EXT
     firstnam.ext
   Where, internally it is always upper-case codepage-1252;
     And, a few control-bits can be used to encode the case.
   Anything much different than this, it needs to encode it with LFNs.
The LFN's are nominally case-insensitive but case preserving.
But, in my project, are treated as case-sensitive. If LFN's are used, my FAT driver will fill the SFN mostly with a hashed value of the LFN (Base32 or similar IIRC). Since, in this case, if an LFN exists the SFN doesn't matter (but will use an SFN if the SFN can exactly represent the filename). When walking the directory, if an LFN is present, the SFN is effectively ignored.
Though, my Boot ROM's fat driver differs in that it only knows about SFN's (to save ROM footprint), so things like the kernel image need to have a valid 8.3 name.
Contrast, NTFS has built in wonk to support case insensitivity in various locales (effectively, collation-mapping tables need to be provided by the filesystem for dealing with things like metadata). This is kinda absurd IMO. The filesystem should not need to know/care about locale.
In an experimental filesystem design, had gone over to 64-byte directory entries with 48 bytes for the name field.
Where:
48 is "usually sufficient";
Fixed-size directory entries are preferable to variable-length directory entries (eg in EXT2), though one will need multiple directory entries to encode LFNs (though usually less than FAT, since the filenames are usually entirely ASCII and use UTF-8 rather than UTF-16).
Though, it is this, or just assume a 48 byte name limit to simplify the filesystem driver...
Though, possibly controversial was that I had decided to base the directory trees around AVL trees:
   Can walk the directory in code-point sorted order;
   Can allow for efficient lookups (vs linear search);
   Less up-front cost and complexity vs B-Trees.
Linear search is arguably still better for small N:
   If one assumes most directories have fewer than around 16 files,
     linear search is likely the winner.
   But, many will have more than 16 files.
     Threshold where B-Tree wins over AVL is larger.
     Though, a case could have been made for 1K 14-file B-Tree nodes (*).
*: In a denser tree or bigger directory, with fairly random node allocations, AVL is likely to result in more blocks needing to be accessed vs a B-Tree. But, OTOH, if 32K contains 512 files, this is likely to be larger than most directories (and still better than a linear search, as needed in FAT).
Generally, for tree-walk, the names are essentially in "memcmp()" order (simple, effective, no collating table needed).
Though, for for long-names, preferable to be able to resolve the comparison purely within the first 48 byes, so an idea here is, say:
   First 40 bytes of first dirent name contain first 40 bytes of name;
   Remaining 8 bytes contain a hash for the full name (raw binary).
Allowing the full-name to effectively be ignored in the tree walk.
But, this filesystem still hasn't seen much use yet...
...

>
But I want my software maintainable and readable. So my experience
is that I want some lexical "accentuation"; common answers to that
are for identifiers (for example) Camel-Case (that I used in C++),
underscores (that I use in Unix shell, Awk, etc.), or spaces (like
in Algol 68, but which is practically irrelevant for me).
 CamelCase reduced typing speed and adds little benefit when compared
with the alternatives (rational abbreviations, or even underscores).
 
Possibly true...
In my case I have an annoyance that my keyboard isn't super new, and right now the shift key is wobbly and doesn't always trigger reliably.
Checks, shift keycap post is broken, will need to epoxy it (many of the keyboard keys have needed to be repaired in this way; at some point I think I may also need to reflow some of the solder joints on some of the key switches as well, but this is a bigger hassle).
Checks, my specific model of keyboard is apparently dated from around 2012-2016 (with its "successor" released in 2014). And, seemingly a lot more expensive now than when it was new...

>
it's not fussy about semicolons,
>
From the languages I know of in detail and I'm experienced in none
is "fussy" about semicolons. Rather it's a simple and well designed
syntactical token, whether used as separator or terminator. You've
just to put it where it's defined.
 Indeed.  One wonders at Bart's familiarity with formal grammars.
In my case, personally I haven't encountered much that doesn't work well enough with a recursive-descent parser.

Date Sujet#  Auteur
26 Nov 24 * question about linker383Thiago Adams
26 Nov 24 +* Re: question about linker16Thiago Adams
26 Nov 24 i`* Re: question about linker15Bart
26 Nov 24 i `* Re: question about linker14Thiago Adams
27 Nov 24 i  +* Re: question about linker2BGB
27 Nov 24 i  i`- Re: question about linker1Bart
27 Nov 24 i  +* Re: question about linker5David Brown
27 Nov 24 i  i`* Re: question about linker4Thiago Adams
27 Nov 24 i  i +* Re: question about linker2David Brown
27 Nov 24 i  i i`- Re: question about linker1Thiago Adams
2 Dec 24 i  i `- Re: question about linker1BGB
27 Nov 24 i  `* Re: question about linker6Michael S
27 Nov 24 i   `* Re: question about linker5Thiago Adams
27 Nov 24 i    `* Re: question about linker4Michael S
27 Nov 24 i     +- Re: question about linker1David Brown
28 Nov 24 i     +- Re: question about linker1Tim Rentsch
2 Dec 24 i     `- Re: question about linker1BGB
26 Nov 24 +* Re: question about linker20Bart
26 Nov 24 i`* Re: question about linker19Thiago Adams
26 Nov 24 i `* Re: question about linker18Bart
27 Nov 24 i  +* Re: question about linker3BGB
27 Nov 24 i  i`* Re: question about linker2fir
27 Nov 24 i  i `- Re: question about linker1BGB
27 Nov 24 i  `* Re: question about linker14Bart
27 Nov 24 i   +* Re: question about linker12Thiago Adams
27 Nov 24 i   i+- Re: question about linker1Thiago Adams
27 Nov 24 i   i`* Re: question about linker10Bart
27 Nov 24 i   i +* Re: question about linker6Bart
27 Nov 24 i   i i`* Re: question about linker5Thiago Adams
27 Nov 24 i   i i +* Re: question about linker3Thiago Adams
27 Nov 24 i   i i i`* Re: question about linker2Thiago Adams
27 Nov 24 i   i i i `- Re: question about linker1Bart
27 Nov 24 i   i i `- Re: question about linker1Bart
27 Nov 24 i   i `* Re: question about linker3Thiago Adams
27 Nov 24 i   i  `* Re: question about linker2Bart
27 Nov 24 i   i   `- Re: question about linker1Thiago Adams
28 Nov 24 i   `- Re: question about linker1Tim Rentsch
27 Nov 24 `* Re: question about linker346Waldek Hebisch
27 Nov 24  `* Re: question about linker345Thiago Adams
28 Nov 24   `* Re: question about linker344Keith Thompson
28 Nov 24    `* Re: question about linker343Thiago Adams
28 Nov 24     +* Re: question about linker338Bart
28 Nov 24     i`* Re: question about linker337Keith Thompson
28 Nov 24     i `* Re: question about linker336Bart
28 Nov 24     i  `* Re: question about linker335Keith Thompson
29 Nov 24     i   `* Re: question about linker334Bart
29 Nov 24     i    +* Re: question about linker3Keith Thompson
29 Nov 24     i    i`* Re: question about linker2Bart
29 Nov 24     i    i `- Re: question about linker1Keith Thompson
29 Nov 24     i    `* Re: question about linker330David Brown
29 Nov 24     i     `* Re: question about linker329Bart
29 Nov 24     i      +- Re: question about linker1Ike Naar
29 Nov 24     i      +* Re: question about linker326Michael S
29 Nov 24     i      i+* Re: question about linker323Bart
29 Nov 24     i      ii`* Re: question about linker322Michael S
29 Nov 24     i      ii +* Re: question about linker320David Brown
29 Nov 24     i      ii i`* Re: question about linker319Bart
29 Nov 24     i      ii i +* Re: question about linker165Keith Thompson
29 Nov 24     i      ii i i`* Re: question about linker164Bart
30 Nov 24     i      ii i i `* Re: question about linker163Keith Thompson
30 Nov 24     i      ii i i  +* Re: question about linker95Waldek Hebisch
30 Nov 24     i      ii i i  i+- Re: question about linker1Keith Thompson
30 Nov 24     i      ii i i  i+* Re: question about linker3James Kuyper
30 Nov 24     i      ii i i  ii`* Re: question about linker2Michael S
3 Dec 24     i      ii i i  ii `- Re: question about linker1Tim Rentsch
1 Dec 24     i      ii i i  i`* Re: question about linker90David Brown
1 Dec 24     i      ii i i  i +* Re: question about linker88Bart
1 Dec 24     i      ii i i  i i`* Re: question about linker87David Brown
1 Dec 24     i      ii i i  i i `* Re: question about linker86Bart
2 Dec 24     i      ii i i  i i  `* Re: question about linker85David Brown
2 Dec 24     i      ii i i  i i   `* Re: question about linker84Bart
2 Dec 24     i      ii i i  i i    +* Re: question about linker78David Brown
2 Dec 24     i      ii i i  i i    i+* Re: question about linker72Janis Papanagnou
2 Dec 24     i      ii i i  i i    ii+* Re: question about linker70Bart
2 Dec 24     i      ii i i  i i    iii+* Re: question about linker68David Brown
2 Dec 24     i      ii i i  i i    iiii`* Re: question about linker67Bart
3 Dec 24     i      ii i i  i i    iiii `* Re: question about linker66David Brown
3 Dec 24     i      ii i i  i i    iiii  +* Re: question about linker53Bart
3 Dec 24     i      ii i i  i i    iiii  i`* Re: question about linker52David Brown
3 Dec 24     i      ii i i  i i    iiii  i `* Re: question about linker51Bart
4 Dec 24     i      ii i i  i i    iiii  i  `* Re: question about linker50David Brown
4 Dec 24     i      ii i i  i i    iiii  i   `* Re: question about linker49Bart
4 Dec 24     i      ii i i  i i    iiii  i    `* Re: question about linker48David Brown
4 Dec 24     i      ii i i  i i    iiii  i     +* Re: question about linker24Bart
5 Dec 24     i      ii i i  i i    iiii  i     i`* Re: question about linker23David Brown
5 Dec 24     i      ii i i  i i    iiii  i     i +- Re: question about linker1Janis Papanagnou
5 Dec 24     i      ii i i  i i    iiii  i     i `* Re: question about linker21Bart
6 Dec 24     i      ii i i  i i    iiii  i     i  `* Re: question about linker20David Brown
6 Dec 24     i      ii i i  i i    iiii  i     i   `* Re: question about linker19Bart
6 Dec 24     i      ii i i  i i    iiii  i     i    +* Re: question about linker5Ike Naar
6 Dec 24     i      ii i i  i i    iiii  i     i    i+- Re: question about linker1Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i+- Re: question about linker1Keith Thompson
7 Dec 24     i      ii i i  i i    iiii  i     i    i`* Re: question about linker2Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i `- Re: question about linker1Keith Thompson
7 Dec 24     i      ii i i  i i    iiii  i     i    +* Re: question about linker10David Brown
7 Dec 24     i      ii i i  i i    iiii  i     i    i`* Re: question about linker9Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i `* Re: question about linker8David Brown
7 Dec 24     i      ii i i  i i    iiii  i     i    i  `* Re: question about linker7Bart
7 Dec 24     i      ii i i  i i    iiii  i     i    i   `* Re: question about linker6David Brown
7 Dec 24     i      ii i i  i i    iiii  i     i    i    `* Re: question about linker5Bart
8 Dec 24     i      ii i i  i i    iiii  i     i    i     +* Re: question about linker3Ben Bacarisse
8 Dec 24     i      ii i i  i i    iiii  i     i    i     `- Re: question about linker1David Brown
8 Dec 24     i      ii i i  i i    iiii  i     i    `* Re: question about linker3Waldek Hebisch
5 Dec 24     i      ii i i  i i    iiii  i     +* Re: question about linker15Waldek Hebisch
11 Dec 24     i      ii i i  i i    iiii  i     `* Re: question about linker8James Kuyper
3 Dec 24     i      ii i i  i i    iiii  `* Re: question about linker12Bart
3 Dec 24     i      ii i i  i i    iii`- Re: question about linker1Janis Papanagnou
2 Dec 24     i      ii i i  i i    ii`- Re: question about linker1Bart
2 Dec 24     i      ii i i  i i    i`* Re: question about linker5Bart
4 Dec 24     i      ii i i  i i    `* Re: question about linker5Waldek Hebisch
1 Dec 24     i      ii i i  i `- Re: question about linker1Janis Papanagnou
30 Nov 24     i      ii i i  +* Re: question about linker44Bart
30 Nov 24     i      ii i i  +- Re: question about linker1Janis Papanagnou
1 Dec 24     i      ii i i  `* Re: question about linker22David Brown
30 Nov 24     i      ii i `* Re: question about linker153David Brown
5 Dec 24     i      ii `- Re: question about linker1Tim Rentsch
30 Nov 24     i      i`* Re: question about linker2Tim Rentsch
29 Nov 24     i      `- Re: question about linker1David Brown
28 Nov 24     `* Re: question about linker4Keith Thompson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal