news:47c22852-3659-4a10...@30g2000yqi.googlegroups.com...
> On Jun 4, 3:35 pm, "Rod Pemberton" <do_not_h...@notemailntt.cmm>
> wrote:
> > "Rugxulo" <
rugx...@gmail.com> wrote in message
> >
news:38d0a7bf-138e-401d...@i19g2000yqn.googlegroups.com...
> > > On May 30, 3:30 pm, "Rod Pemberton" <do_not_h...@notemailntt.cmm>
> > > wrote:
...
> > > > The point being: there are some languages programmers
> > > > enjoy programming, and others that they don't or won't.
>
> > >[link]
>
> > > Doesn't look like there is much consensus for any language, honestly.
>
> > [link]
>
> > The first five comprise almost 60% ... They all appear to be C based to
> > me.
>
> For three of them, you're mostly right, as they indeed are 99%
> compatible. The others (C#, Java), not so much, IMO.
>
> Though honestly, I can't help but be cynical (?) here, so when I see
> the top five, all I'm really seeing is the efforts of commercial
> vendors: C# = MS, Java = Oracle, Obj-C = Apple, C/C++ =
> FSF/GNU, etc. (among others of course).
You're cynical that commercial software has all the success?
The biggest market is the business market. They've got customers who pay
them money.
Who wants the problems an incompatibilities of open-source software? Even
projects which started out a commercial, with lots of money backing them,
quickly become stale, start suffering bit-rot, and begin breaking other
things when they fix a different problem. You can pick any open or free
project you want and see that happening: Linux, GNU C, OpenOffice,
OpenWatcom, VLC, Opera, Kernelex ... I've not seen any which hasn't broken
one thing while fixing something else.
E.g., let's take VLC. They just release a new, heavily rewritten, and much
improved version: "twoflower" 2.0.0 and 2.0.1. Now, I've got lots of wmv
and mpg files that won't play, or have all sorts of graphics and sound
issues ... video tearing, wrong colors, vertical/horizontal sync playing
instead of video. It's so bad, I'm actually having to use WMP. No joke.
Also, the sound is no longer "flat". By flat, I mean played at the levels
in the recording. I didn't realize it at first when listening to CDs and
MP3s. Certain songs sound exactly the same on CD players, records, cassette
tapes, and FM radio. I did realize it after listening my favorite Internet
radio station and hearing a song I'd listened to previously via that same
station. It's also a song I know well from the cassette era. A big
"WTF"... All the sound levels in VLC were *WRONG*. It seems that this
version of VLC has an internal equalization curve applied to everything it
plays that you can't disable. That's in addition to whatever you choose for
equalization or your speaker settings. From what I can tell, the hidden eq
curve boosts very low and very high frequencies alot, reduces all the other
frequencies slightly - almost flatly, with a slightly sharper reduction at
voice frequencies. It's truly horrid. If you manage to fix the non-high
and non-low frequences via eq, then those high and low frequencies are maxed
out, or they're distorted if you've lowered their settings. Whomever snuck
that in, has seriously defective hearing or was using some really bad
speakers/headphones. Of course, it could be some complication resulting
from them applying various algorithms, e.g., multiple eq curves applied for
some reason.
> My point was that nobody
> [builds systems from a minimal set of operations]
> anymore, for whatever reason. You'd think they would stick to a
> common denominator, but for most people these days, that means
> "top tier" only, which is sad. I feel like a standard has failed if nobody
> sticks to it. Hence things like pure ANSI C (C89) are probably
> effectively dead in lieu of POSIX.
Well, today, most programmers, I would assume, are not engineers,
mathematicians, physicists, etc who got into programming via work, school or
academia, or home use. Today, I'd assume most programmers are chasing the
money. They're going to college and getting a degree in CS (computer
science). They're not interested in EE, ME, math or physics or chemistry,
and maybe not even capable of getting a degree in those fields. What I've
seen of CS programmers is that they usually aren't someone who is interested
in programming computers, but they're very interested programming *games*.
They want to develop some "cool" game. E.g., D&D and Tolkien revisited,
board wargames as 3D FPS, MMORPGs, MUDs, uMoria 3D, virtual LARP, i.e.,
whatever is "next big (gaming) thing". Engineers, mathematicians,
physicists, old school programmers who program aren't usually interested in
games. They like coding computer solutions in much the same way they like
solving tough problems.
> It's just weird. On the one hand, as a developer, you want to
> accomplish a goal in a reasonable way. But who is your audience?
> There's nothing wrong with targeting a tiny niche fragment, but it
> seems weird to limit yourself arbitrarily. It's just a weird idea that
> "if you build it, they will come". That's true, but it feels like
> consumers are being forced more than invited.
Nobody wants MS Windows for windowing or as their GUI. Everybody wants
their hardware, video cards, and software applications to just work without
issues. For that, you need MS Windows. Hardware manufacturers write
drivers and update software for Windows. Like it or not, Linux just isn't
capable of that.
> Even across x86, it seems very hard to be portable.
Software needs to be fast. That means using all those specialize
instructions on x86. When I come across a piece of software that runs
slowly, like C64 1Mhz era slow, on a Ghz class x86. It's gone. I find
another program. To be portable, you have to reduce software to the
smallest set of useable and common functionality. That means slow. In a
perfect world, the hardware would implement an OS and GUI. Graphics cards
are completely capable of having a GUI in hardware or software implemented
on the card itself. PCs are fully capable of having an OS implemente in
hardware or software implemented on the motherboard. The more OS and driver
related software you need, the harder it becomes to implement an effective
OS. Linux runs into this problem. Drivers are not written for it, or are
closed source. So, Linux users use the minimal level of hardware support
for which they can get a generic driver. They're missing out on all the
hardware advances. The Linux developers don't seem to be keeping pace with
all the software and hardware changes, i.e., lack of funds, lack of skilled
programmers, lack of compatibility with Windows drivers, etc.
> > E.g., in the post I list two ANSI/ISO C libraries which only need 18 or
> > 19 system calls to implement. What that means is, once you have a
> > working C compiler, you only need 18 or 19 OS functions to compile
> > an existing or implement a new C library!
>
> Great but (almost) useless as "nobody" cares for pure ANSI C anymore.
> (Or maybe you mean POSIX, but I'd be surprised.)
Well, if skilled, you can code almost every *application* with just the C
language without the C libraries. There are a few, mostly trivial things
you need from the libraries which aren't part of the C language that are
needed. The real exception is file I/O. You need the C library's file I/O.
Coding non-applications, i.e., an OS or drivers etc can require alot of the
more advanced stuff, but even the majority of that is written in standard C
within the library. So, you can write it yourself. In a few cases, you'll
need some inline assembly or external assembly.
> If we knew how to do everything, OS and
> language wouldn't matter at all.
Brute-force ... (trial and error)
Brains ... (intellect)
Bucks ... (money)
Bouts ... (time)
> So I could just manually translate or implement everything,
> I wouldn't even need a specific compiler. But source code isn't
> usually readable enough for that, and specs aren't always
> forthcoming (and synapses aren't always firing ...).
Search for a solution... Sometimes they aren't available, at least for
free.
> [...] difficulties in setjmp/longjmp or signal [...]
You shouldn't need setjmp/longjmp. If you do, it indicates you didn't
follow good structured programming, or you're doing something non-C-ish:
multiple entry points to procedures, . Besides, they are custom to a
specific C implementation, i.e., non-portable. They can be difficult to use
correctly even for a specific C compiler. IIRC, one of the return values is
defined for ANSI C but not POSIX C. They usually work by dumping a bunch of
processor registers into a C array. They don't save procedure parameters or
stack frame etc. I.e., they're something you should avoid. I'd only
consider them if extreme error recovery was required. I've posted a few
posts discussing them. I fairly recently posted a reply to
alt.os.development summarizing what H&S says about them.
http://groups.google.com/group/alt.os.development/msg/cf0da548ff6e33a7
AFAIR, I not used signal much either... It seems I've used it a few times
to trap memory access violations, and disable DOS specific traps like
Ctrl-C. I know POSIX environments have more signals, so it might used more
frequently there.
> g4gqv4$qk9$
1...@aioe.org
>
> Still interesting, though it leaves out a few things. ETA has 8,
> Befunge-93 has 26, 68000 had? 56, 8086 had 100+, etc.
> I'm probably forgetting a few others too (e.g. Oberon isn't
> that bloated either, according to the EBNF).
>
Well, I wasn't doing assembly languages.
I'll add a note to check ETA and Befunge.
I've added others to my list (unpublished):
L4 microkernel (7)
Malbolge (7)
Fromage (10)
Unix v7 (46)
LCC's IR (109)
POSIX 1003.2 (130)
Mach v3 microkernel (~140)
1003.1-90 FIPS 151-2 (199)
POSIX 1003.1-1996 (390)
AES (489)
SVID3 base (582)
XPG4 base (607)
Single UNIX (1168)
Single UNIX v2 (1434)
Single UNIX v3 (1742)
> BTW, how many libc functions are in ANSI C89? 32
> keywords (not counting preprocessor), 15 headers,
> probably 100 (??) functions, blindly guessing.
I guess I should add ANSI C ...
I started gathering stuff for a C library some years ago. I probably have a
list somewhere...
Well, I don't seem to have a clean list of ANSI or ISO C functions!
I do have a few lists from the Internet of POSIX functions that categorize
by specification. From one of the POSIX function lists:
33 keywords in ANSI C
38 keywords in ISO C (+5)
146 ANSI C functions (*)
226 C 94 functions (+80) (*)
555 ISO C functions (+329) (*)(**)
(*) That's after _attempting_ to weed out keywords, constants, structs, C
types, defines, and macro's...
(**) There is overlap of some math functions due to tgmath.h.
I have haphazardly accumulated alot of other C info...
I have a note in a file that K&R C had 23 keywords and 2 pre-processor
directives. As for C "primitives", I've previously posted that C has about
16 "actions", 20 arithmetic operations (not including variations to support
C's many object types). One list has 21 C object types for ISO C.
That includes a few not available to ANSI C. Another list has 50 operators
for C. That includes things like paired brackets, braces, paren's, GCC &&
extension, and pseudo-C operators alignof() and typeof(). So, probably 44
or so for ISO C ... Another list has 12 keywords and procedures which are
C's flow control words. Another list has 22 pre-processor defines supported
by GCC, 13 by OpenWatcom (v1.3), and 7 by other compilers. Another file has
a list which has 55 lines of C operator's and punctuation, 123 lines of
keywords (with many non-ANSI/ISO), 167 compiler extension words. A hash
function I use as part of an in-progress C compiler, has 353 hash values for
C keyword's, operators, pre-processor directives. That included many
compiler specific variations. So, that's gives an idea of the maximum
language "words". That doesn't include C library functions. That also
doesn't include the massive amount of items in the POSIX file I grep'd
above. The other C compiler related programs and grammars I have weren't so
easy to read. Another list indicates ANSI C(89) had 15 headers, three
headers were added(95), six headers were added with ISO C(99) for a total of
24 headers. Those three were probably one of their addendum's or TC's...
1989
assert.h ctype.h errno.h float.h limits.h locale.h math.h setjmp.h signal.h
stdarg.h stddef.h stdio.h stdlib.h string.h time.h
1995
iso646.h wchar.h wctype.h
1999
complex.h fenv.h inttypes.h stdbool.h stdint.h tgmath.h
This is the big list of POSIX functions (ANSI and ISO C too) via Wayback
archive:
Pete Forman's "Portability Guide"
http://web.archive.org/web/20010802210248/http://www.crosswinds.net/~petef/c/portability.txt
Rod Pemberton