Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #545211 > unrolled thread
| Started by | Terry Pinnell <me@somewhere.invalid> |
|---|---|
| First post | 2019-05-31 11:48 +0100 |
| Last post | 2019-06-02 23:40 -0400 |
| Articles | 20 on this page of 116 — 24 participants |
Back to article view | Back to sci.electronics.design
Arduino code sources? Terry Pinnell <me@somewhere.invalid> - 2019-05-31 11:48 +0100
Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-05-31 11:40 +0000
Re: Arduino code sources? Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-05-31 05:32 -0700
Re: Arduino code sources? Winfield Hill <hill@rowland.harvard.edu> - 2019-05-31 06:54 -0700
Re: Arduino code sources? bitrex <user@example.net> - 2019-05-31 10:46 -0400
Re: Arduino code sources? bitrex <user@example.net> - 2019-05-31 10:47 -0400
Re: Arduino code sources? Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-05-31 07:49 -0700
Re: Arduino code sources? Peter Percival <peterxpercival@hotmail.com> - 2019-06-12 13:41 +0100
Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-12 21:48 -0400
Re: Arduino code sources? Peter Percival <peterxpercival@hotmail.com> - 2019-06-13 17:46 +0100
Re: Arduino code sources? George Herold <gherold@teachspin.com> - 2019-05-31 07:45 -0700
Re: Arduino code sources? bitrex <user@example.net> - 2019-05-31 11:37 -0400
Re: Arduino code sources? bitrex <user@example.net> - 2019-05-31 11:39 -0400
Re: Arduino code sources? Terry Pinnell <me@somewhere.invalid> - 2019-05-31 18:13 +0100
Re: Arduino code sources? Ralph Mowery <rmowery28146@earthlink.net> - 2019-05-31 15:07 -0400
Re: Arduino code sources? "John Miles, KE5FX" <jmiles@gmail.com> - 2019-05-31 17:02 -0700
Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-01 04:57 +0000
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-01 01:11 -0400
Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-01 05:56 +0000
Re: Arduino code sources? "John Miles, KE5FX" <jmiles@gmail.com> - 2019-05-31 23:34 -0700
Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-01 07:34 +0000
Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 06:39 -0400
Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-01 07:50 +0100
Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-01 07:17 +0000
Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 06:45 -0400
Re: Arduino code sources? DecadentLinuxUserNumeroUno@decadence.org - 2019-06-01 11:13 +0000
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-01 21:06 +1000
Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-01 12:33 +0100
Re: Arduino code sources? DecadentLinuxUserNumeroUno@decadence.org - 2019-06-01 12:03 +0000
Re: Arduino code sources? Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-06-01 05:15 -0700
Re: Arduino code sources? DecadentLinuxUserNumeroUno@decadence.org - 2019-06-02 01:48 +0000
Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 11:26 -0400
Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-01 19:03 +0100
Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 19:56 -0400
Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-02 01:13 +0100
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 20:09 -0400
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 20:16 -0400
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 11:10 +1000
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 22:26 -0400
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 12:37 +1000
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 23:14 -0400
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 14:30 +1000
Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-03 08:46 +0100
Re: Arduino code sources? DecadentLinuxUserNumeroUno@decadence.org - 2019-06-03 11:58 +0000
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-01 17:18 -0400
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-01 17:24 -0400
Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 20:08 -0400
Re: Arduino code sources? Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-06-01 17:14 -0700
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-01 20:26 -0400
Re: Arduino code sources? "Rodney Pont" <mlist4@infohit.me.uk> - 2019-06-01 15:19 +0100
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-02 17:42 +1000
Re: Arduino code sources? "John Miles, KE5FX" <jmiles@gmail.com> - 2019-06-02 01:53 -0700
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-02 22:46 +1000
Re: Arduino code sources? Dennis <dennis@none.none> - 2019-06-01 09:43 -0500
Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 11:30 -0400
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-03 00:00 -0400
Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-03 05:52 +0000
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-03 11:33 -0400
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-03 11:41 -0400
Re: Arduino code sources? pcdhobbs@gmail.com - 2019-06-03 16:29 -0700
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-04 02:14 -0400
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-04 02:27 -0400
Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-03 08:50 +0100
Re: Arduino code sources? krw@notreal.com - 2019-06-03 19:12 -0400
Spot the app note error was Arduino code sources? Don Kuenz, KB7RPU <g@crcomp.net> - 2019-06-04 16:03 +0000
Re: Spot the app note error was Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-04 13:17 -0400
Re: Spot the app note error Don Kuenz <g@crcomp.net> - 2019-06-04 21:47 +0000
Re: Spot the app note error was Arduino code sources? Don Kuenz <g@crcomp.net> - 2019-06-08 18:34 +0000
Re: Spot the app note error was Arduino code sources? bitrex <user@example.net> - 2019-06-04 15:30 -0400
Re: Spot the app note error Don Kuenz, KB7RPU <g@crcomp.net> - 2019-06-04 21:48 +0000
Re: Spot the app note error Winfield Hill <winfieldhill@yahoo.com> - 2019-06-04 15:51 -0700
Re: Spot the app note error Don Kuenz, KB7RPU <g@crcomp.net> - 2019-06-04 23:28 +0000
Re: Spot the app note error Don Kuenz, KB7RPU <g@crcomp.net> - 2019-06-04 23:40 +0000
Re: Spot the app note error Winfield Hill <winfieldhill@yahoo.com> - 2019-06-04 17:21 -0700
Re: Spot the app note error Don Kuenz, KB7RPU <g@crcomp.net> - 2019-06-05 01:13 +0000
Re: Spot the app note error bitrex <user@example.net> - 2019-06-04 23:02 -0400
Re: Spot the app note error bitrex <user@example.net> - 2019-06-04 23:05 -0400
Re: Spot the app note error Winfield Hill <winfieldhill@yahoo.com> - 2019-06-05 01:08 -0700
Re: Spot the app note error bitrex <user@example.net> - 2019-06-06 00:22 -0400
Re: Spot the app note error bitrex <user@example.net> - 2019-06-06 00:27 -0400
Re: Spot the app note error Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-05 22:48 -0400
Re: Spot the app note error Winfield Hill <winfieldhill@yahoo.com> - 2019-06-07 13:35 -0700
Re: Spot the app note error Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-07 20:44 -0400
Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-06-01 09:57 +0000
Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-06-01 10:06 +0000
Re: Arduino code sources? "John Miles, KE5FX" <jmiles@gmail.com> - 2019-06-01 15:06 -0700
Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-02 03:26 +0000
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-02 17:55 +1000
Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-02 09:39 +0000
Re: Arduino code sources? DecadentLinuxUserNumeroUno@decadence.org - 2019-06-02 11:02 +0000
Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-06-02 11:43 +0000
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-02 22:57 +1000
Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-02 15:05 +0000
Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-06-02 17:00 +0000
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 10:07 +1000
Re: Arduino code sources? Jasen Betts <jasen@xnet.co.nz> - 2019-06-03 00:55 +0000
Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-03 05:22 +0000
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 11:00 +1000
Re: Arduino code sources? Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-06-03 05:21 +0000
Re: Arduino code sources? Clifford Heath <no.spam@please.net> - 2019-06-03 17:15 +1000
Re: Arduino code sources? Cursitor Doom <curd@notformail.com> - 2019-06-02 15:23 +0000
Re: Arduino code sources? Rheilly Phoull <rheilly@bigslong.com> - 2019-06-01 08:13 +0800
Re: Arduino code sources? sdy <sdeyoreo@hotmail.com> - 2019-05-31 18:38 -0700
Re: Arduino code sources? Terry Pinnell <me@somewhere.invalid> - 2019-06-01 11:45 +0100
Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-01 12:36 +0100
Re: Arduino code sources? Terry Pinnell <me@somewhere.invalid> - 2019-06-01 16:04 +0100
Re: Arduino code sources? Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-06-01 04:38 -0700
Re: Arduino code sources? Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> - 2019-06-01 11:32 -0400
Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-01 19:05 +0100
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 23:52 -0400
Re: Arduino code sources? Tom Gardner <spamjunk@blueyonder.co.uk> - 2019-06-03 08:53 +0100
Re: Arduino code sources? Ralph Mowery <rmowery28146@earthlink.net> - 2019-06-01 11:26 -0400
Re: Arduino code sources? "Rodney Pont" <mlist4@infohit.me.uk> - 2019-06-01 15:11 +0100
Re: Arduino code sources? Terry Pinnell <me@somewhere.invalid> - 2019-06-01 16:20 +0100
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 23:08 -0400
Re: Arduino code sources? bitrex <user@example.net> - 2019-06-02 23:40 -0400
Page 5 of 6 — ← Prev page 1 2 3 4 [5] 6 Next page →
| From | Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> |
|---|---|
| Date | 2019-06-05 22:48 -0400 |
| Subject | Re: Spot the app note error |
| Message-ID | <qd9uui$i94$1@dont-email.me> |
| In reply to | #545972 |
On 6/4/19 8:21 PM, Winfield Hill wrote: > Don Kuenz, KB7RPU wrote... >> >> Winfield Hill <winfieldhill@yahoo.com> wrote: >>> Don Kuenz, KB7RPU wrote... >>>> >>>>> why does an audio mixer need 1.5A of available >>>>> output current? >>>> >>>> It morphed into a mixer-amp. All will be revealed >>>> in the upcoming webpage. >>> >>> The AMP portion should be BTL, that way there'd >>> be no rail-splitter mid-supply ground current. >> >> The TEA2025 drives two separate stereo speakers, >> a left and a right. > > Stereo, yes. I'm suggesting you use a more capable > amplifier, one with complementary Bridge-Tied-Load > outputs. BITD BTL meant "bridge transformerless". When did that change? Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com
[toc] | [prev] | [next] | [standalone]
| From | Winfield Hill <winfieldhill@yahoo.com> |
|---|---|
| Date | 2019-06-07 13:35 -0700 |
| Subject | Re: Spot the app note error |
| Message-ID | <qdehr301lf5@drn.newsguy.com> |
| In reply to | #546099 |
Phil Hobbs wrote...
>
> BITD BTL meant "bridge transformerless".
> When did that change?
When everybody stopped using transformers?
--
Thanks,
- Win
[toc] | [prev] | [next] | [standalone]
| From | Phil Hobbs <pcdhSpamMeSenseless@electrooptical.net> |
|---|---|
| Date | 2019-06-07 20:44 -0400 |
| Subject | Re: Spot the app note error |
| Message-ID | <zLqdneIrbqhHmWbBnZ2dnUU7-cWdnZ2d@supernews.com> |
| In reply to | #546338 |
On 6/7/19 4:35 PM, Winfield Hill wrote: > Phil Hobbs wrote... >> >> BITD BTL meant "bridge transformerless". >> When did that change? > > When everybody stopped using transformers? > > Or started running acronyms backwards? Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC / Hobbs ElectroOptics Optics, Electro-optics, Photonics, Analog Electronics Briarcliff Manor NY 10510 http://electrooptical.net http://hobbs-eo.com
[toc] | [prev] | [next] | [standalone]
| From | Cursitor Doom <curd@notformail.com> |
|---|---|
| Date | 2019-06-01 09:57 +0000 |
| Message-ID | <qcti6h$vi5$3@dont-email.me> |
| In reply to | #545351 |
On Sat, 01 Jun 2019 04:57:29 +0000, Jan Panteltje wrote: > The basic flaw with that seeplushplush is that it claims to look at > things from on 'object oriented' POV. IIRC, the OP hasn't said why or even *IF* he needs an Object Orientated language for what he plans to do. > Cpluplush is unreadable crap and should be forbidden by law and those > that still use it banned to a deserted island on an other planet in an > other solar system in an other galaxy in an other universe ruled by > string theory. +1 -- This message may be freely reproduced without limit or charge only via the Usenet protocol. Reproduction in whole or part through other protocols, whether for profit or not, is conditional upon a charge of GBP10.00 per reproduction. Publication in this manner via non-Usenet protocols constitutes acceptance of this condition.
[toc] | [prev] | [next] | [standalone]
| From | Cursitor Doom <curd@notformail.com> |
|---|---|
| Date | 2019-06-01 10:06 +0000 |
| Message-ID | <qctimi$vi5$4@dont-email.me> |
| In reply to | #545315 |
On Fri, 31 May 2019 17:02:54 -0700, John Miles, KE5FX wrote: > The advice to start with K&R C is OK as far as it goes, but it's akin to > telling an electronics novice to start with vacuum tubes. What's wrong with that? Learning how chewbs work provides an extremely valuable intermediate step to learning how transistors and other semis function. Certainly if I hadn't learned valves first (at the age of 9) I'd have had a markedly tougher time of it when it came to grasping tranny theory. -- This message may be freely reproduced without limit or charge only via the Usenet protocol. Reproduction in whole or part through other protocols, whether for profit or not, is conditional upon a charge of GBP10.00 per reproduction. Publication in this manner via non-Usenet protocols constitutes acceptance of this condition.
[toc] | [prev] | [next] | [standalone]
| From | "John Miles, KE5FX" <jmiles@gmail.com> |
|---|---|
| Date | 2019-06-01 15:06 -0700 |
| Message-ID | <ab2c7bed-385d-4dec-b1de-57eecae0e819@googlegroups.com> |
| In reply to | #545385 |
On Saturday, June 1, 2019 at 3:06:15 AM UTC-7, Cursitor Doom wrote: > On Fri, 31 May 2019 17:02:54 -0700, John Miles, KE5FX wrote: > > > The advice to start with K&R C is OK as far as it goes, > > but it's akin to telling an electronics novice to start with > > vacuum tubes. > > What's wrong with that? For one thing, you'll be outcompeted by people who spent the same amount of time learning modern techniques. For another, people who advocate K&R C are looking through rose-colored glasses to some extent. There is some genuinely crappy code in that book, and some of the decisions made in the early history of C and its standard library have probably cost us hundreds of billions of dollars. Remember, this is the generation of programmers who thought scanf() and strcat() were good ideas. K&R deserves a prominent place on the shelf, but in a museum rather than a bookstore. -- john, KE5FX
[toc] | [prev] | [next] | [standalone]
| From | Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> |
|---|---|
| Date | 2019-06-02 03:26 +0000 |
| Message-ID | <qcvfkv$qf8$1@dont-email.me> |
| In reply to | #545462 |
On a sunny day (Sat, 1 Jun 2019 15:06:46 -0700 (PDT)) it happened "John Miles, KE5FX" <jmiles@gmail.com> wrote in <ab2c7bed-385d-4dec-b1de-57eecae0e819@googlegroups.com>: >On Saturday, June 1, 2019 at 3:06:15 AM UTC-7, Cursitor Doom wrote: >> On Fri, 31 May 2019 17:02:54 -0700, John Miles, KE5FX wrote: >> >> > The advice to start with K&R C is OK as far as it goes, >> > but it's akin to telling an electronics novice to start with >> > vacuum tubes. >> >> What's wrong with that? > >For one thing, you'll be outcompeted by people who spent the same amount >of time learning modern techniques. > >For another, people who advocate K&R C are looking through rose-colored >glasses to some extent. There is some genuinely crappy code in that >book, and some of the decisions made in the early history of C and >its standard library have probably cost us hundreds of billions of dollars. >Remember, this is the generation of programmers who thought scanf() and >strcat() were good ideas. K&R deserves a prominent place on the shelf, >but in a museum rather than a bookstore. > >-- john, KE5FX You should read and study libc.info. As to 'objects' if you know how to use structures and linked lists then you never ever need seeplushplush. Basic programming is beyond playing with snakes and an other language each year [1]. C is extremely powerful very efficient. The argument 'I Do Not Want To Know How To Program So I use SeePlushPlush' if for kindergarten tinkers. Somebody having trouble understanding the programming basics then goes and writes a 'new' language, after 3 version iterations it is still worthless crap. This was with plusplus, is with python. I wastes everybody's time having to try to follow the idiots wrong ideas. Long ago there was a magazine 'Dr Dobbs', do not know if it still exists. but I sure picked up a lot of programming methods from that, And that, over time, proved very valuable, no matter what 'language' you scribble in, but C is easiest to apply those techniques.
[toc] | [prev] | [next] | [standalone]
| From | Clifford Heath <no.spam@please.net> |
|---|---|
| Date | 2019-06-02 17:55 +1000 |
| Message-ID | <xhLIE.27461$NT5.464@fx47.iad> |
| In reply to | #545462 |
On 2/6/19 8:06 am, John Miles, KE5FX wrote: > On Saturday, June 1, 2019 at 3:06:15 AM UTC-7, Cursitor Doom wrote: >> On Fri, 31 May 2019 17:02:54 -0700, John Miles, KE5FX wrote: >> >>> The advice to start with K&R C is OK as far as it goes, >>> but it's akin to telling an electronics novice to start with >>> vacuum tubes. >> >> What's wrong with that? > > For one thing, you'll be outcompeted by people who spent the same amount > of time learning modern techniques. > > For another, people who advocate K&R C are looking through rose-colored > glasses to some extent. There is some genuinely crappy code in that > book, and some of the decisions made in the early history of C and > its standard library have probably cost us hundreds of billions of dollars. The most costly mistake in the history of programming has to be "errno", from Unix. DOS and Windows copied it, more or less. Recall "Unknown error 0x80000000"? We Unix folk used to laugh, but it's just what you get when a call returns -1 or NULL without setting errno. EPERM: "Permission denied" - What permission was needed? To access what operation on what object? - The kernel knew these things, but didn't say. ENOENT: "No such file or directory" - Well which is it, a file or a directory? Perchance you'd like to tell me which one? Those are just the first two errors in errno. It doesn't get any better. Windows has literally millions of such error codes, because they break it up as a 16 bit value under a 12-bit "facility code". This is the root of *most* user frustration and time lost with computer systems. We expect things to go wrong, but we also expect to be told what, and why, and how we can fix it. Clifford Heath.
[toc] | [prev] | [next] | [standalone]
| From | Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> |
|---|---|
| Date | 2019-06-02 09:39 +0000 |
| Message-ID | <qd05h7$as3$1@dont-email.me> |
| In reply to | #545515 |
On a sunny day (Sun, 2 Jun 2019 17:55:07 +1000) it happened Clifford Heath
<no.spam@please.net> wrote in <xhLIE.27461$NT5.464@fx47.iad>:
>On 2/6/19 8:06 am, John Miles, KE5FX wrote:
>> On Saturday, June 1, 2019 at 3:06:15 AM UTC-7, Cursitor Doom wrote:
>>> On Fri, 31 May 2019 17:02:54 -0700, John Miles, KE5FX wrote:
>>>
>>>> The advice to start with K&R C is OK as far as it goes,
>>>> but it's akin to telling an electronics novice to start with
>>>> vacuum tubes.
>>>
>>> What's wrong with that?
>>
>> For one thing, you'll be outcompeted by people who spent the same amount
>> of time learning modern techniques.
>>
>> For another, people who advocate K&R C are looking through rose-colored
>> glasses to some extent. There is some genuinely crappy code in that
>> book, and some of the decisions made in the early history of C and
>> its standard library have probably cost us hundreds of billions of dollars.
>
>The most costly mistake in the history of programming has to be "errno",
>from Unix. DOS and Windows copied it, more or less.
>
>Recall "Unknown error 0x80000000"? We Unix folk used to laugh, but it's
>just what you get when a call returns -1 or NULL without setting errno.
Probably the programmer screwed up in that case.
Read the documentation for that function if it is in libc.
Lemme state that if you really do not know what is happeing you should not be programming.
(operator overloading in seeplushplush comes to mind)
Why do I NEVER have those problems?
Well I dunno.
What I usually do in C is have a printf() at the start of each function, that can be activated by running the thing
with a command line flag:
my_program -v 1
for level 1 debugging
That printf then prints the function name and arguments.
Like this for example:
char *my_function_do_something(int a, char *b, int *result)
{
int b;
if(verbose)
{
fprintf(stderr, "my_function_do_something(): arg a=%d b=%p result=%p\n", a, b, result);
}
/* parameter check */
if(a < 10) return 0;
if(a > 20) return 0;
if(! b) return 0;
if(! result) return 0;
// do something
if(! calculation(a, &b) ) // calculation will say what is wrong in verbose mode
{
return 0;
}
*result = a * 1234;
if(*result == NAN) // LOL
{
if(verbose)
{
fprintf(stderr "my_function_do_something(): calculation() returned out of range value %d for *result\n", *result);
}
return 0;
}
i(verbose)
{
fprintf(stderr, "my_function_do_something(): returning *result=%d\n", *result);
}
// OK
return 1;
}
called like
if(! my_function_do_something(x, some_string, &a) )
{
return 0;
// could optionally exit here
}
If you put the error report in every function that way,
then you see any problems in verbose mode in a few seconds.
Also you see any silly number mistakes you made.
For errno again check the library documentation.
I have not used a debugger since 1984 or so when I wrote one...
>EPERM: "Permission denied" - What permission was needed? To access what
>operation on what object? - The kernel knew these things, but didn't say.
>
>ENOENT: "No such file or directory" - Well which is it, a file or a
>directory? Perchance you'd like to tell me which one?
>
>Those are just the first two errors in errno. It doesn't get any better.
>Windows has literally millions of such error codes, because they break
>it up as a 16 bit value under a 12-bit "facility code".
>
>This is the root of *most* user frustration and time lost with computer
>systems. We expect things to go wrong, but we also expect to be told
>what, and why, and how we can fix it.
>
>Clifford Heath.
libc.info is good.
I you have never heard of it (it should be on your Linux system) then try this old version in text form:
http://www.panteltje.com/pub/libc.info.txt
What are you going to do without it?
Networking? memory management? math? threads?
All C library functions are treated there, many with examples.
It is my C programming reference, I just use the text editor search function on it.
Maybe the extra fprintf(stderr is more work.
But it stil saves time.
Especialy when you write code incrementally.
For more complex problems I often start wih text
/* do this */
/* do that */
/* do something different */
and fill in the code later.
Turing
its simple
seeplusplush is a crime against humanity.
There were days not even the seeplushplush compiler writers could agree what the syntax meant.
Did not get better, now NOBODY knows it :-)
[toc] | [prev] | [next] | [standalone]
| From | DecadentLinuxUserNumeroUno@decadence.org |
|---|---|
| Date | 2019-06-02 11:02 +0000 |
| Message-ID | <qd0aco$hlb$1@gioia.aioe.org> |
| In reply to | #545524 |
Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> wrote in news:qd05h7$as3$1@dont-email.me: > seeplusplush is a crime against humanity. A little bit more than just a bit opinionated and narrow vissioned. > There were days not even the seeplushplush compiler writers could > agree what the syntax meant. In YOUR clics. In some here too... But certainly not all. Just because one brain is of a fucked mindset doesn't mean the whole troup has to do push ups. > Did not get better, now NOBODY knows > it :-) > Now, there are TrumpTardesque idiots everywhere whom actually think they are of some vast intelligence, when in fact, they are, just like Trump, in possession of very little substantive content, much less intelligence. And just like TrumpTardesque-ish dopes, there is always someone there to declare the entire cart bad because of the presence of one bad apple. And that is a serious flaw in those particular observers.
[toc] | [prev] | [next] | [standalone]
| From | Cursitor Doom <curd@notformail.com> |
|---|---|
| Date | 2019-06-02 11:43 +0000 |
| Message-ID | <qd0cph$dt6$3@dont-email.me> |
| In reply to | #545524 |
On Sun, 02 Jun 2019 09:39:37 +0000, Jan Panteltje wrote: > seeplusplush is a crime against humanity. +1
[toc] | [prev] | [next] | [standalone]
| From | Clifford Heath <no.spam@please.net> |
|---|---|
| Date | 2019-06-02 22:57 +1000 |
| Message-ID | <RIPIE.36172$xY3.34375@fx01.iad> |
| In reply to | #545524 |
On 2/6/19 7:39 pm, Jan Panteltje wrote:
> On a sunny day (Sun, 2 Jun 2019 17:55:07 +1000) it happened Clifford Heath
> <no.spam@please.net> wrote in <xhLIE.27461$NT5.464@fx47.iad>:
>> On 2/6/19 8:06 am, John Miles, KE5FX wrote:
>>> On Saturday, June 1, 2019 at 3:06:15 AM UTC-7, Cursitor Doom wrote:
>>>> On Fri, 31 May 2019 17:02:54 -0700, John Miles, KE5FX wrote:
>>>>> The advice to start with K&R C is OK as far as it goes,
>>>>> but it's akin to telling an electronics novice to start with
>>>>> vacuum tubes.
>>>> What's wrong with that?
>>> For one thing, you'll be outcompeted by people who spent the same amount
>>> of time learning modern techniques.
>>> For another, people who advocate K&R C are looking through rose-colored
>>> glasses to some extent. There is some genuinely crappy code in that
>>> book, and some of the decisions made in the early history of C and
>>> its standard library have probably cost us hundreds of billions of dollars.
>>
>> The most costly mistake in the history of programming has to be "errno",
>>from Unix. DOS and Windows copied it, more or less.
>>
>> Recall "Unknown error 0x80000000"? We Unix folk used to laugh, but it's
>> just what you get when a call returns -1 or NULL without setting errno.
>
> Probably the programmer screwed up in that case.
Yes. But they followed the paradigm that you can only return one integer
as an error indication. That's the problem. Functions need a way to
efficiently return more error information. Programmers should not follow
that pattern. But fprintf(stderr...) is unacceptable as well (see below).
> Read the documentation for that function if it is in libc.
> Lemme state that if you really do not know what is happeing you should not be programming.
int fd = open("/a/b/c/d", 0)
if (fd < 0)
{
// Even after looking at errno, I have no fucking idea what went wrong.
}
What part of the above is difficult for you to understand?
> What I usually do in C is have a printf() at the start of each function, that can be activated by running the thing
> with a command line flag:
Jan, I've read your code. I've worked in C for 40 years, with many
dozens of good C programmers, and though I think you're a terribly
clever guy, having seen your code, I would never recommend my boss to
hire you. Your code is worse than your pencil-drawn schematics, and
that's really saying something. You get stuff done, but pity the poor
bloke who comes after.
> if(verbose)
> {
> fprintf(stderr, "my_function_do_something(): returning *result=%d\n", *result);
> }
...
> If you put the error report in every function that way,
> then you see any problems in verbose mode in a few seconds.
You can't build library code that way. It may be ok for command-line
prototypes and open source trash, but no software product can do that.
> libc.info is good.
> I you have never heard of it (it should be on your Linux system)
I have worked with Unix since the 1970s. I have no need of such trinkets.
Clifford Heath.
[toc] | [prev] | [next] | [standalone]
| From | Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> |
|---|---|
| Date | 2019-06-02 15:05 +0000 |
| Message-ID | <qd0ol6$v6e$1@dont-email.me> |
| In reply to | #545535 |
On a sunny day (Sun, 2 Jun 2019 22:57:19 +1000) it happened Clifford Heath
<no.spam@please.net> wrote in <RIPIE.36172$xY3.34375@fx01.iad>:
>> Probably the programmer screwed up in that case.
>
>Yes. But they followed the paradigm that you can only return one integer
>as an error indication. That's the problem. Functions need a way to
>efficiently return more error information. Programmers should not follow
>that pattern. But fprintf(stderr...) is unacceptable as well (see below).
>
>> Read the documentation for that function if it is in libc.
>> Lemme state that if you really do not know what is happeing you should not be programming.
>
int fd = open("/a/b/c/d", 0)
>if (fd < 0)
>{
> // Even after looking at errno, I have no fucking idea what went wrong.
>}
What went wrong is that 'open' failed
You the rewite the code like this:
int fd = open("/a/b/c/d", 0)
if (fd < 0)
{
fprintf(stderr, "Could not open file "a/b/c/d for read ");
perror("because");
return ERROR (whatever your logic for error is);
// if you think he user is a moron, then you can do a test for the directory chain.
or if it is some GUI stuff pop up an error message on screen.
in libforms fl_show_alert(),
and also do the stderr,
}
Anyways I would normally use fopen(), quoting libc.info:
The 'open' function is the underlying primitive for the 'fopen'
and 'freopen' functions, that create streams.
>What part of the above is difficult for you to understand?
>
>> What I usually do in C is have a printf() at the start of each function, that can be activated by running the thing
>> with a command line flag:
>
>Jan, I've read your code. I've worked in C for 40 years, with many
>dozens of good C programmers, and though I think you're a terribly
>clever guy,
Thank you, I see it a bit less that way, but OK, I surrender here (brushes up ego).
>having seen your code, I would never recommend my boss to
>hire you.
Well that is kind of you, one worry less.
:-)
Your code is worse than your pencil-drawn schematics, and
>that's really saying something. You get stuff done, but pity the poor
>bloke who comes after.
Well maybe you have accumulated a bit of rust that causes you to not see other solutions as those are.
I still do not see the problems you claim to exist.
>
>> if(verbose)
>> {
>> fprintf(stderr, "my_function_do_something(): returning *result=%d\n", *result);
>> }
>...
>> If you put the error report in every function that way,
>> then you see any problems in verbose mode in a few seconds.
>
>You can't build library code that way. It may be ok for command-line
>prototypes and open source trash, but no software product can do that.
Oh yes it can, and you will be ever so happy if a user has a problem with your code
you can have them execute it from a terminal and send you the text.
>> libc.info is good.
>> I you have never heard of it (it should be on your Linux system)
>
>I have worked with Unix since the 1970s. I have no need of such trinkets.
That is a very very stupid remark.
[toc] | [prev] | [next] | [standalone]
| From | Cursitor Doom <curd@notformail.com> |
|---|---|
| Date | 2019-06-02 17:00 +0000 |
| Message-ID | <qd0vbg$qaj$9@dont-email.me> |
| In reply to | #545563 |
On Sun, 02 Jun 2019 15:05:58 +0000, Jan Panteltje wrote: > Oh yes it can, and you will be ever so happy if a user has a problem > with your code you can have them execute it from a terminal and send you > the text. That's actually an excellent tip. I must try to remember that for future use. -- This message may be freely reproduced without limit or charge only via the Usenet protocol. Reproduction in whole or part through other protocols, whether for profit or not, is conditional upon a charge of GBP10.00 per reproduction. Publication in this manner via non-Usenet protocols constitutes acceptance of this condition.
[toc] | [prev] | [next] | [standalone]
| From | Clifford Heath <no.spam@please.net> |
|---|---|
| Date | 2019-06-03 10:07 +1000 |
| Message-ID | <txZIE.58596$4O5.24452@fx46.iad> |
| In reply to | #545563 |
On 3/6/19 1:05 am, Jan Panteltje wrote: >>> libc.info is good. >>> fI you have never heard of it (it should be on your Linux system) >> I have worked with Unix since the 1970s. I have no need of such trinkets. > > That is a very very stupid remark. I don't like GNU "info" is all. Or anything that forces me to remember my rusty EMACs keystrokes. I just use the man pages. "man 2 open" works pretty well.
[toc] | [prev] | [next] | [standalone]
| From | Jasen Betts <jasen@xnet.co.nz> |
|---|---|
| Date | 2019-06-03 00:55 +0000 |
| Message-ID | <qd1r5j$vtq$3@gonzo.revmaps.no-ip.org> |
| In reply to | #545628 |
On 2019-06-03, Clifford Heath <no.spam@please.net> wrote: > On 3/6/19 1:05 am, Jan Panteltje wrote: >>>> libc.info is good. >>>> fI you have never heard of it (it should be on your Linux system) >>> I have worked with Unix since the 1970s. I have no need of such trinkets. >> >> That is a very very stupid remark. > > I don't like GNU "info" is all. Or anything that forces me to remember > my rusty EMACs keystrokes. I just use the man pages. "man 2 open" works > pretty well. there are other info clients, but I dont read info pages often enough to reccomend one, I seem to recall that at-least one has a GUI. -- When I tried casting out nines I made a hash of it.
[toc] | [prev] | [next] | [standalone]
| From | Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> |
|---|---|
| Date | 2019-06-03 05:22 +0000 |
| Message-ID | <qd2aqq$vcb$1@dont-email.me> |
| In reply to | #545628 |
On a sunny day (Mon, 3 Jun 2019 10:07:49 +1000) it happened Clifford Heath <no.spam@please.net> wrote in <txZIE.58596$4O5.24452@fx46.iad>: >On 3/6/19 1:05 am, Jan Panteltje wrote: >>>> libc.info is good. >>>> fI you have never heard of it (it should be on your Linux system) >>> I have worked with Unix since the 1970s. I have no need of such trinkets. >> >> That is a very very stupid remark. > >I don't like GNU "info" is all. Or anything that forces me to remember >my rusty EMACs keystrokes. I just use the man pages. "man 2 open" works >pretty well. olala too old to learn?
[toc] | [prev] | [next] | [standalone]
| From | Clifford Heath <no.spam@please.net> |
|---|---|
| Date | 2019-06-03 11:00 +1000 |
| Message-ID | <Wi_IE.9351$H55.6004@fx40.iad> |
| In reply to | #545563 |
On 3/6/19 1:05 am, Jan Panteltje wrote:
> On a sunny day (Sun, 2 Jun 2019 22:57:19 +1000) it happened Clifford Heath
> <no.spam@please.net> wrote in <RIPIE.36172$xY3.34375@fx01.iad>:
> int fd = open("/a/b/c/d", 0)
>> if (fd < 0)
>> {
>> // Even after looking at errno, I have no fucking idea what went wrong.
>> }
>
> What went wrong is that 'open' failed
> ... > // if you think he user is a moron, then you can do a test for the
directory chain.
and duplicate the logic of the kernel "namei" method? Have you ever read
that logic? There is a surprisingly large amount of it. Its madness to
either expect the programmer to reconstruct the failure (hint: it's
possible that all the directories and files exist, but "b" is not
searchable, for example), or to simply expect that every user will know
this logic and be able to determine what went wrong.
The kernel alone knows *precisely* what went wrong and why, but did not
show anyone the basic *respect* of telling them.
"I can't open /a/b/c/d because although /a/b exists, it is not marked as
searchable so I cant see /a/b/c" - there, that wasn't so hard now, was it?
It is this basic lack of *respect* (so endemic in the industry) which
creates the kind of user rage and frustration that is sadly all too
common. The simple principle of *showing respect* to your users can
change that. But you prefer just to call them as morons, because it gets
you off the hook. The fish rots from the head. If the kernel doesn't do
it in syscalls, the programmers just say WTF and give up trying.
Clifford Heath.
[toc] | [prev] | [next] | [standalone]
| From | Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> |
|---|---|
| Date | 2019-06-03 05:21 +0000 |
| Message-ID | <qd2aon$v40$1@dont-email.me> |
| In reply to | #545645 |
On a sunny day (Mon, 3 Jun 2019 11:00:35 +1000) it happened Clifford Heath
<no.spam@please.net> wrote in <Wi_IE.9351$H55.6004@fx40.iad>:
>On 3/6/19 1:05 am, Jan Panteltje wrote:
>> On a sunny day (Sun, 2 Jun 2019 22:57:19 +1000) it happened Clifford Heath
>> <no.spam@please.net> wrote in <RIPIE.36172$xY3.34375@fx01.iad>:
>> int fd = open("/a/b/c/d", 0)
>>> if (fd < 0)
>>> {
>>> // Even after looking at errno, I have no fucking idea what went wrong.
>>> }
>>
>> What went wrong is that 'open' failed
>> ... > // if you think he user is a moron, then you can do a test for the
>directory chain.
>
>and duplicate the logic of the kernel "namei" method? Have you ever read
>that logic? There is a surprisingly large amount of it. Its madness to
>either expect the programmer to reconstruct the failure (hint: it's
>possible that all the directories and files exist, but "b" is not
>searchable, for example), or to simply expect that every user will know
>this logic and be able to determine what went wrong.
>
>The kernel alone knows *precisely* what went wrong and why, but did not
>show anyone the basic *respect* of telling them.
>
>"I can't open /a/b/c/d because although /a/b exists, it is not marked as
>searchable so I cant see /a/b/c" - there, that wasn't so hard now, was it?
>
>It is this basic lack of *respect* (so endemic in the industry) which
>creates the kind of user rage and frustration that is sadly all too
>common. The simple principle of *showing respect* to your users can
>change that. But you prefer just to call them as morons, because it gets
>you off the hook. The fish rots from the head. If the kernel doesn't do
>it in syscalls, the programmers just say WTF and give up trying.
>
>Clifford Heath.
You are very very confused.
In coding you always have to create parts to inform a user if YOU think it is necessary.
What model airplane / manufacturer are you coding for?
I am making a blacklist what not to fly ;-)
Really nothing you say makes sense,
try looking at it from a real user perspective,
not one that thinks like you :-)
From the application you know if you have to add extra info for users that
have no clue.
Even a 12 year old kid knows where to look
if /this/that/ortheother could not be opened.
It is is mostly a case of spelling.
It is a bit like driving a car, well OK there ARE clueless cases,
one such a case was somebody following the instructions of one of those GPS thingies,
'Take next left' and drove into a non existing bridge into the water that is.
You would like to say the thing, 'look sir, not that service road just before the bridge'.
Then you argue about the word 'next' and then you call it lack of respect from the system..
Bull
It is an aspect of a system created for trained users, if you want to write for clueless users
YOU have work to do as I stated before (its easy to do a directory check, examples in libc.info.
Go read libc.info and get a clue.
[toc] | [prev] | [next] | [standalone]
| From | Clifford Heath <no.spam@please.net> |
|---|---|
| Date | 2019-06-03 17:15 +1000 |
| Message-ID | <lO3JE.27013$b54.22177@fx19.iad> |
| In reply to | #545681 |
On 3/6/19 3:21 pm, Jan Panteltje wrote:
> On a sunny day (Mon, 3 Jun 2019 11:00:35 +1000) it happened Clifford Heath
> <no.spam@please.net> wrote in <Wi_IE.9351$H55.6004@fx40.iad>:
>
>> On 3/6/19 1:05 am, Jan Panteltje wrote:
>>> On a sunny day (Sun, 2 Jun 2019 22:57:19 +1000) it happened Clifford Heath
>>> <no.spam@please.net> wrote in <RIPIE.36172$xY3.34375@fx01.iad>:
>>> int fd = open("/a/b/c/d", 0)
>>>> if (fd < 0)
>>>> {
>>>> // Even after looking at errno, I have no fucking idea what went wrong.
>>>> }
>>>
>>> What went wrong is that 'open' failed
>>> ... > // if you think he user is a moron, then you can do a test for the
>> directory chain.
>>
>> and duplicate the logic of the kernel "namei" method? Have you ever read
>> that logic? There is a surprisingly large amount of it. Its madness to
>> either expect the programmer to reconstruct the failure (hint: it's
>> possible that all the directories and files exist, but "b" is not
>> searchable, for example), or to simply expect that every user will know
>> this logic and be able to determine what went wrong.
>>
>> The kernel alone knows *precisely* what went wrong and why, but did not
>> show anyone the basic *respect* of telling them.
>>
>> "I can't open /a/b/c/d because although /a/b exists, it is not marked as
>> searchable so I cant see /a/b/c" - there, that wasn't so hard now, was it?
>>
>> It is this basic lack of *respect* (so endemic in the industry) which
>> creates the kind of user rage and frustration that is sadly all too
>> common. The simple principle of *showing respect* to your users can
>> change that. But you prefer just to call them as morons, because it gets
>> you off the hook. The fish rots from the head. If the kernel doesn't do
>> it in syscalls, the programmers just say WTF and give up trying.
>>
>> Clifford Heath.
>
> You are very very confused.
> In coding you always have to create parts to inform a user if YOU think it is necessary.
>
> What model airplane / manufacturer are you coding for?
> I am making a blacklist what not to fly ;-)
>
> Really nothing you say makes sense,
> try looking at it from a real user perspective,
> not one that thinks like you :-)
In the last forty years I have sold hundreds of millions of $ worth of
software of my design (I led the teams who wrote three major software
suites over a decade each), and some is still running banks, oil
companies, governments. If I need a TV fixed I will bring it to you, but
I will not ask your opinions on software.
This file open example is just an example. Every error has a context,
and sometimes the parameters to the system call are not enough context;
you need more than just a number to indicate the missing context.
If you have ever sat and watched (without trying to help or interfere)
someone learning any new piece of software, I guarantee you will see
this problem twice in the first few minutes. But I seriously doubt that
you have ever done that. We've even had professionals do it, using video
cameras with eye-tracking to see what the user is looking at as they
explore, to discover where they understand and where they get confused.
People are complicated. They're not morons, they just don't all have the
same kinds of brains. This is a well-known and common practice amongst
those who care about usability, and the data do not lie.
Clifford Heath.
> From the application you know if you have to add extra info for users that
> have no clue.
>
> Even a 12 year old kid knows where to look
> if /this/that/ortheother could not be opened.
>
> It is is mostly a case of spelling.
>
> It is a bit like driving a car, well OK there ARE clueless cases,
> one such a case was somebody following the instructions of one of those GPS thingies,
> 'Take next left' and drove into a non existing bridge into the water that is.
> You would like to say the thing, 'look sir, not that service road just before the bridge'.
> Then you argue about the word 'next' and then you call it lack of respect from the system..
> Bull
> It is an aspect of a system created for trained users, if you want to write for clueless users
> YOU have work to do as I stated before (its easy to do a directory check, examples in libc.info.
>
> Go read libc.info and get a clue.
>
[toc] | [prev] | [next] | [standalone]
Page 5 of 6 — ← Prev page 1 2 3 4 [5] 6 Next page →
Back to top | Article view | sci.electronics.design
csiph-web