Re: Python (was Re: I did not inhale)

Liste des GroupesRevenir à cl misc 
Sujet : Re: Python (was Re: I did not inhale)
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.misc
Date : 21. Aug 2024, 16:27:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va5108$3tmmd$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0
On 21/08/2024 12:26, Muttley@dastardlyhq.com wrote:
On Wed, 21 Aug 2024 11:10:53 +0200
David Brown <david.brown@hesbynett.no> boringly babbled:
If you are writing network software for Linux, how is it relevant to
learn about the sound API, or the more advanced filesystem API's ?  If
 You don't, but the subsystems don't exist in isolation, there's a lot of
overlap. Eg network sockets use a lot of the same API functions as files
(eg: read, write, fcntl, ioctl) so understanding may well help to understand
the other.
Sure.
Of course understanding /some/ of this is essential for a lot of tasks. And understanding a bit more can be /useful/.  My argument is against this idea that you need to learn it all.
Let's take an example.  In my line of work, I use UARTs a lot - I've probably used UART's on 20-30 different microcontroller families, as well as external UART chips, bit-banging in software, with polling, DMA, interrupts, RTOS abstractions, SDK routines.  I've used them a /lot/.
Trying to understand the Linux documentation for UARTs is a nightmare. They are horrendous - the APIs, structs, flag sets, etc., are a vast jumble of crap for handling terminals that haven't been seen outside a museum for 50 years, long before Linux was conceived.  Trying to get the right selection of API calls, struct setups, etc., simple raw UART access to send and receive characters can take many days of studying documentation of questionable standard, trial and error, and guesswork. A good "Programming Linux" book /might/ help - but it might be out of date.  Snippets from googling, however, /does/ get the job done - you can find examples, try them out and see what works, and in a few hours I had everything running.
Even better, of course, is to ditch C and use Python - "pyserial" does it all, simply and cleanly.  (And the same code works on Windows, if that happens to be useful - though Windows picks pseudo-random names for serial ports and has nothing like udev rules.)  But for this particular customer, it had to be in C (well, C++, but that's a minor detail).
Would that task have been easier if I'd studied the details of fcntl, ioctl, and other calls that were needed for the task?  No, not at all. Would "knowing POSIX" have helped?  Would reading some old book on Linux programming have helped?  No.  (I /have/ read books on Linux programming.)
But a rough idea of some of the concepts of Linux development was useful.  Knowing /something/ about the OS is helpful.

 
you are writing a gui program with QT, why should you be interested in X
APIs or POSIX threading and file handling - you'll be using the QT
libraries and APIs for graphics, threading and file handling.
 Not necessarily.
 
I have not suggested, or even hinted, that all you need is "core C" -
what you need is the knowledge that is relevant to the task at hand,
regardless of the OS, language, or whatever.
 Its certainly the impression you gave.
 
I can't imagine how you got that from my posts.

Date Sujet#  Auteur
15 Aug 24 * Re: I did not inhale256Kalevi Kolttonen
16 Aug 24 `* Re: Python (was Re: I did not inhale)255Lawrence D'Oliveiro
16 Aug 24  +* Re: Python (was Re: I did not inhale)250Kaz Kylheku
16 Aug 24  i`* Re: Python (was Re: I did not inhale)249Kalevi Kolttonen
16 Aug 24  i +* Re: Python (was Re: I did not inhale)2John Ames
17 Aug 24  i i`- Re: Python (was Re: I did not inhale)1D
17 Aug 24  i +* Re: Python (was Re: I did not inhale)64Muttley
17 Aug 24  i i+* Re: Python (was Re: I did not inhale)61Dmitry A. Kazakov
17 Aug 24  i ii+* Re: Python (was Re: I did not inhale)58Lawrence D'Oliveiro
18 Aug 24  i iii`* Re: Python (was Re: I did not inhale)57Dmitry A. Kazakov
18 Aug 24  i iii +* Re: Python (was Re: I did not inhale)14Muttley
18 Aug 24  i iii i`* Re: Python (was Re: I did not inhale)13Dmitry A. Kazakov
18 Aug 24  i iii i `* Re: Python (was Re: I did not inhale)12Muttley
18 Aug 24  i iii i  +* Re: Python (was Re: I did not inhale)10Dmitry A. Kazakov
18 Aug 24  i iii i  i+* Re: Python (was Re: I did not inhale)2Kaz Kylheku
18 Aug 24  i iii i  ii`- Re: Python (was Re: I did not inhale)1Dmitry A. Kazakov
19 Aug 24  i iii i  i+- Re: Python (was Re: I did not inhale)1Lawrence D'Oliveiro
19 Aug 24  i iii i  i+- Re: Python (was Re: I did not inhale)1Muttley
25 Aug 24  i iii i  i`* Re: Python (was Re: I did not inhale)5Sebastian
25 Aug 24  i iii i  i `* Re: Python (was Re: I did not inhale)4Dmitry A. Kazakov
25 Aug 24  i iii i  i  +* Re: Python (was Re: I did not inhale)2vallor
25 Aug 24  i iii i  i  i`- Re: Python (was Re: I did not inhale)1Lawrence D'Oliveiro
25 Aug 24  i iii i  i  `- Re: Python (was Re: I did not inhale)1Lawrence D'Oliveiro
18 Aug 24  i iii i  `- Re: Python (was Re: I did not inhale)1Richard Kettlewell
18 Aug 24  i iii +* Re: Python (was Re: I did not inhale)2Kenny McCormack
18 Aug 24  i iii i`- Re: Python (was Re: I did not inhale)1Muttley
18 Aug 24  i iii +* Re: Python (was Re: I did not inhale)5Kaz Kylheku
18 Aug 24  i iii i`* Re: Python (was Re: I did not inhale)4Dmitry A. Kazakov
19 Aug 24  i iii i `* Re: Python (was Re: I did not inhale)3Kaz Kylheku
19 Aug 24  i iii i  `* Re: Python (was Re: I did not inhale)2Dmitry A. Kazakov
19 Aug 24  i iii i   `- Re: Python (was Re: I did not inhale)1Kaz Kylheku
19 Aug 24  i iii `* Re: Python (was Re: I did not inhale)35Lawrence D'Oliveiro
19 Aug 24  i iii  `* Re: Python (was Re: I did not inhale)34Dmitry A. Kazakov
19 Aug 24  i iii   +* Re: Python (was Re: I did not inhale)23David Brown
19 Aug 24  i iii   i+* Re: Python (was Re: I did not inhale)21Dmitry A. Kazakov
19 Aug 24  i iii   ii+* Re: Python (was Re: I did not inhale)4Muttley
19 Aug 24  i iii   iii`* Re: Python (was Re: I did not inhale)3Dmitry A. Kazakov
19 Aug 24  i iii   iii +- Re: Python (was Re: I did not inhale)1Muttley
30 Sep 24  i iii   iii `- Re: Python (was Re: I did not inhale)1Bozo User
19 Aug 24  i iii   ii+* Re: Python (was Re: I did not inhale)12David Brown
20 Aug 24  i iii   iii`* Re: Python (was Re: I did not inhale)11Dmitry A. Kazakov
20 Aug 24  i iii   iii +* Re: Python (was Re: I did not inhale)3Lawrence D'Oliveiro
20 Aug 24  i iii   iii i`* Re: Python (was Re: I did not inhale)2Dmitry A. Kazakov
21 Aug 24  i iii   iii i `- Re: Python (was Re: I did not inhale)1Lawrence D'Oliveiro
20 Aug 24  i iii   iii `* Re: Python (was Re: I did not inhale)7David Brown
20 Aug 24  i iii   iii  `* Re: Python (was Re: I did not inhale)6Dmitry A. Kazakov
20 Aug 24  i iii   iii   +* Re: Python (was Re: I did not inhale)2David Brown
20 Aug 24  i iii   iii   i`- Re: Python (was Re: I did not inhale)1Dmitry A. Kazakov
21 Aug 24  i iii   iii   `* Re: Python (was Re: I did not inhale)3Lawrence D'Oliveiro
21 Aug 24  i iii   iii    `* Re: Python (was Re: I did not inhale)2Dmitry A. Kazakov
22 Aug 24  i iii   iii     `- Re: Python (was Re: I did not inhale)1Lawrence D'Oliveiro
19 Aug 24  i iii   ii`* Re: Python (was Re: I did not inhale)4Keith Thompson
19 Aug 24  i iii   ii `* Re: Python (was Re: I did not inhale)3John Ames
20 Aug 24  i iii   ii  +- Re: Python (was Re: I did not inhale)1Muttley
20 Aug 24  i iii   ii  `- Re: Python (was Re: I did not inhale)1Stefan Ram
19 Aug 24  i iii   i`- Re: Python (was Re: I did not inhale)1Bart
19 Aug 24  i iii   +* Re: Python (was Re: I did not inhale)8Lawrence D'Oliveiro
19 Aug 24  i iii   i`* Re: Python (was Re: I did not inhale)7Dmitry A. Kazakov
19 Aug 24  i iii   i +* Re: Python (was Re: I did not inhale)2Keith Thompson
19 Aug 24  i iii   i i`- Re: Python (was Re: I did not inhale)1Dmitry A. Kazakov
20 Aug 24  i iii   i `* Re: Python (was Re: I did not inhale)4Lawrence D'Oliveiro
20 Aug 24  i iii   i  `* Re: Python (was Re: I did not inhale)3Dmitry A. Kazakov
20 Aug 24  i iii   i   +- Re: Python (was Re: I did not inhale)1Lawrence D'Oliveiro
20 Aug 24  i iii   i   `- Re: Python (was Re: I did not inhale)1D
21 Aug 24  i iii   `* Re: Python (was Re: I did not inhale)2vallor
21 Aug 24  i iii    `- Re: Python (was Re: I did not inhale)1Lawrence D'Oliveiro
18 Aug 24  i ii+- Re: Python (was Re: I did not inhale)1Muttley
18 Aug 24  i ii`- Re: Python (was Re: I did not inhale)1Eric Pozharski
18 Aug 24  i i`* Re: Python (was Re: I did not inhale)2David Brown
18 Aug 24  i i `- Re: Python (was Re: I did not inhale)1Muttley
18 Aug 24  i `* Re: Python (was Re: I did not inhale)182David Brown
18 Aug 24  i  +* C function prototype was Python (was Re: I did not inhale)2James Harris
18 Aug 24  i  i`- Re: C function prototype was Python (was Re: I did not inhale)1David Brown
18 Aug 24  i  +* Re: Python (was Re: I did not inhale)2Keith Thompson
19 Aug 24  i  i`- Re: Python (was Re: I did not inhale)1David Brown
20 Aug 24  i  `* Re: Python (was Re: I did not inhale)177Kalevi Kolttonen
20 Aug 24  i   +* Re: Python (was Re: I did not inhale)3Muttley
20 Aug 24  i   i+- Re: Python (was Re: I did not inhale)1Lew Pitcher
20 Aug 24  i   i`- Re: Python (was Re: I did not inhale)1Kalevi Kolttonen
20 Aug 24  i   +* Re: Python (was Re: I did not inhale)170David Brown
20 Aug 24  i   i`* Re: Python (was Re: I did not inhale)169Kalevi Kolttonen
21 Aug 24  i   i +* Re: Python (was Re: I did not inhale)161David Brown
21 Aug 24  i   i i+* Re: Python (was Re: I did not inhale)142Muttley
21 Aug 24  i   i ii`* Re: Python (was Re: I did not inhale)141David Brown
21 Aug 24  i   i ii `* Re: Python (was Re: I did not inhale)140Muttley
21 Aug 24  i   i ii  `* Re: Python (was Re: I did not inhale)139David Brown
21 Aug 24  i   i ii   `* Re: Python (was Re: I did not inhale)138Muttley
21 Aug 24  i   i ii    `* Re: Python (was Re: I did not inhale)137David Brown
22 Aug 24  i   i ii     `* Re: Python (was Re: I did not inhale)136Muttley
22 Aug 24  i   i ii      +* Re: Python (was Re: I did not inhale)6D
22 Aug 24  i   i ii      i+* Re: Python (was Re: I did not inhale)4Muttley
22 Aug 24  i   i ii      ii`* Re: Python (was Re: I did not inhale)3D
22 Aug 24  i   i ii      ii `* Re: Python (was Re: I did not inhale)2Lew Pitcher
22 Aug 24  i   i ii      ii  `- Re: Python (was Re: I did not inhale)1Muttley
22 Aug 24  i   i ii      i`- Re: Python (was Re: I did not inhale)1David Brown
22 Aug 24  i   i ii      `* Re: Python (was Re: I did not inhale)129David Brown
22 Aug 24  i   i ii       +* Re: Python (was Re: I did not inhale)120Muttley
26 Aug 24  i   i ii       i`* Re: Python (was Re: I did not inhale)119John Ames
26 Aug 24  i   i ii       i +- Re: Python (was Re: I did not inhale)1Muttley
26 Aug 24  i   i ii       i `* Re: Python (was Re: I did not inhale)117Lawrence D'Oliveiro
26 Aug 24  i   i ii       i  +* Re: Python (was Re: I did not inhale)113John Ames
26 Aug 24  i   i ii       i  +* Re: Python (was Re: I did not inhale)2Bart
27 Aug 24  i   i ii       i  `- Re: Python (was Re: I did not inhale)1Kaz Kylheku
22 Aug 24  i   i ii       `* Re: Python (was Re: I did not inhale)8Lawrence D'Oliveiro
21 Aug 24  i   i i`* Re: Python (was Re: I did not inhale)18Lawrence D'Oliveiro
21 Aug 24  i   i `* Re: Python (was Re: I did not inhale)7Muttley
21 Aug 24  i   `* Re: Python (was Re: I did not inhale)3Lawrence D'Oliveiro
16 Aug 24  `* Re: Python (was Re: I did not inhale)4Kalevi Kolttonen

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal