Heater
Posts: 13921
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Tue Oct 15, 2019 10:13 am

I blame the "computer scientists".

They have created a computing world where the same program will produce different results depending on what machine it is run on.

If mathematicians lived on such shifting ground we would get nowhere.

In this case it was the ordering of file names when asking for a directory listing, who knows what it might be next.
Memory in C++ is a leaky abstraction .

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Tue Oct 15, 2019 3:54 pm

How well languages scale isn't a topic often discussed.

jcyr
Posts: 503
Joined: Sun Apr 23, 2017 1:31 pm
Location: Atlanta

Re: A Second Age of Personal Computing

Tue Oct 15, 2019 4:38 pm

davidcoton wrote:
Sun May 12, 2019 11:32 am
Burngate wrote:
Sun May 12, 2019 9:53 am
So we end up with the country run by the PR guys and the ad agencies.
And in what way is that worse than the current situation? :( :shock: :twisted:
It IS the current situation!
It's um...uh...well it's kinda like...and it's got a bit of...

jcyr
Posts: 503
Joined: Sun Apr 23, 2017 1:31 pm
Location: Atlanta

Re: Liberation through Computer Literacy

Tue Oct 15, 2019 4:45 pm

scruss wrote:
Tue Sep 24, 2019 6:24 pm
ejolson wrote:
Tue Sep 24, 2019 3:34 pm
…. As a result, the slug bootloader is almost finished.
Pfft. Call that sluggish? 'Cos it's a positive racing snail — _@/ — compared to what I'm building: a computer with a clock that can be slowed down to 3 Hz. Yup, I didn't miss a prefix out: that's three clock pulses per second. You can slow it to zero, but that makes the blinkenlights rather boring.

It's an 1802-based Retro Elf. So much slowness.
Ha! That takes me back to the 1st computer I ever hand built, a Cosmac Elf (RCA 1802). It was built on a breadboard using wire wrap. The fastest I could ever get to work was about at 10Hz. I later got a kit PCB for the same design, soldered it together, and lo and behold that worked much better! :-)

Looked a lot like this one:
Attachments
my_elf_20150331_hr.jpeg
my_elf_20150331_hr.jpeg (87.5 KiB) Viewed 1549 times
It's um...uh...well it's kinda like...and it's got a bit of...

Heater
Posts: 13921
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Tue Oct 15, 2019 5:27 pm

jcyr,

Did yours look as neat as that one? Because that is really sweet.

Love to see the other side of the board !
Memory in C++ is a leaky abstraction .

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Tue Oct 15, 2019 5:41 pm

Heater,

You would have a blast building the RPi Tank.

User avatar
bensimmo
Posts: 4187
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Liberation through Computer Literacy

Tue Oct 15, 2019 6:10 pm

Heater wrote:
Tue Oct 15, 2019 10:13 am
I blame the "computer scientists".

They have created a computing world where the same program will produce different results depending on what machine it is run on.

If mathematicians lived on such shifting ground we would get nowhere.

In this case it was the ordering of file names when asking for a directory listing, who knows what it might be next.
Could be anything :-)
A decimal point here, rounding there...

For this, using the languages built in methods over making your own calls to system/os functions is the safer option.

They need to improve their literacy of the code to understand what happens, if using someone elses.
If the Arduino code base going to suffer from similar? It's very much a cut and paste and hope culture.

jcyr
Posts: 503
Joined: Sun Apr 23, 2017 1:31 pm
Location: Atlanta

Re: Liberation through Computer Literacy

Tue Oct 15, 2019 7:42 pm

Heater wrote:
Tue Oct 15, 2019 5:27 pm
jcyr,

Did yours look as neat as that one? Because that is really sweet.

Love to see the other side of the board !
Close, but not quite. No fancy red toggle switches, or panel labeling. Also I seem to recall that there wasn't an analog regulator with heatsink on mine. I must have used a regulated power source. It was a long long time ago!
It's um...uh...well it's kinda like...and it's got a bit of...

gkreidl
Posts: 6139
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Liberation through Computer Literacy

Tue Oct 15, 2019 8:29 pm

bensimmo wrote:
Tue Oct 15, 2019 9:22 am
I thought this article goes quite well with the current topic title

Mainly the last part, "The hope is that this paper gets us to talk a bit more about how we treat and view software that we exchange back and forth," said Williams. "We somehow naively assume this stuff will work, being experimentalists who don't have a lot of background in computer science."

Chemists bitten by Python scripts: How different OSes produced different results during test number-crunching
https://www.theregister.co.uk/AMP/2019/ ... n_scripts/
Simply the result of bad programming. os.listdir calls an OS function, which may work differently on different platforms. From the Python documentation:

os.listdir(path)
Return a list containing the names of the entries in the directory given by path. The list is in arbitrary order.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
bensimmo
Posts: 4187
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Liberation through Computer Literacy

Tue Oct 15, 2019 8:33 pm

gkreidl wrote:
Tue Oct 15, 2019 8:29 pm
bensimmo wrote:
Tue Oct 15, 2019 9:22 am
I thought this article goes quite well with the current topic title

Mainly the last part, "The hope is that this paper gets us to talk a bit more about how we treat and view software that we exchange back and forth," said Williams. "We somehow naively assume this stuff will work, being experimentalists who don't have a lot of background in computer science."

Chemists bitten by Python scripts: How different OSes produced different results during test number-crunching
https://www.theregister.co.uk/AMP/2019/ ... n_scripts/
Simply the result of bad programming. os.listdir calls an OS function, which may work differently on different platforms. From the Python documentation:

os.listdir(path)
Return a list containing the names of the entries in the directory given by path. The list is in arbitrary order.
or is it bad programming, from the creators point of view it worked perfectly fine for their needs. It worked every time.
It's all the other people not literate in computer programming who just use it that may see the problem, but they are not the original intended user.
science principles worked well here, finding and sorting the problem.

jcyr
Posts: 503
Joined: Sun Apr 23, 2017 1:31 pm
Location: Atlanta

Re: Liberation through Computer Literacy

Tue Oct 15, 2019 11:59 pm

bensimmo wrote:
Tue Oct 15, 2019 8:33 pm
gkreidl wrote:
Tue Oct 15, 2019 8:29 pm
bensimmo wrote:
Tue Oct 15, 2019 9:22 am
I thought this article goes quite well with the current topic title

Mainly the last part, "The hope is that this paper gets us to talk a bit more about how we treat and view software that we exchange back and forth," said Williams. "We somehow naively assume this stuff will work, being experimentalists who don't have a lot of background in computer science."

Chemists bitten by Python scripts: How different OSes produced different results during test number-crunching
https://www.theregister.co.uk/AMP/2019/ ... n_scripts/
Simply the result of bad programming. os.listdir calls an OS function, which may work differently on different platforms. From the Python documentation:

os.listdir(path)
Return a list containing the names of the entries in the directory given by path. The list is in arbitrary order.
or is it bad programming, from the creators point of view it worked perfectly fine for their needs. It worked every time.
It's all the other people not literate in computer programming who just use it that may see the problem, but they are not the original intended user.
science principles worked well here, finding and sorting the problem.
It's just another side effect of the modern trend of dumming down everything, including programming languages. "Learn to code" they say, "see how easy it is when everything is done for you"... Not.

There are levels of literacy. Learning Python or Bash scripting in my opinion is a pretty low bar...
It's um...uh...well it's kinda like...and it's got a bit of...

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 3:47 am

I try to stay away from languages that require declaring and framework definitions.

Heater
Posts: 13921
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 4:45 am

gkreidl,

One could take a different point of view.

Fundamentally any given program, when presented with the same data should produce the same result.

If that is not the case then we don't have a program, we have a kind of random number generator. Designers and implementers of programming languages, operating systems, and all other software go to huge lengths at great effort to ensure that this determinism holds true. When it is not we call them bugs.

From a CS is perspective we like to think that all our computers are equivalent to Turing machines. Turing machines are very rigorously defined.

In this case, the same program, with the same data, did not produce the same results. If we brush that off as "OK" then we are being dishonest about our profession.

Yes, there is a get out clause, an exception, a warning, in the small print, buried in reams of documentation. There often is. That is no excuse.

People whose lives are dedicated to something other than CS and the endless details of computing systems should not be expected to suffer this kind of unpredictability from computers.
Memory in C++ is a leaky abstraction .

Heater
Posts: 13921
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 4:51 am

John_Spikowski,
I try to stay away from languages that require declaring and framework definitions.
How does that help in this case?

What does ScriptBasic do when you list the content of directories in different operating systems?
Memory in C++ is a leaky abstraction .

Heater
Posts: 13921
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 4:58 am

jcyr,
There are levels of literacy. Learning Python or Bash scripting in my opinion is a pretty low bar..
Woo, what? I have programmed all kind of things in all kind of languages for decades, from assembler to C++ to Verilog. From micro controllers to GUI applications to cloud services.

Bash scripting is beyond me. Gives me headache. I leave it to the gurus.

All of computer programming is nothing but: Sequence, Selection and Iteration. If one has mastered that in Python what else are you expecting them to have to know to be "literate"?
Memory in C++ is a leaky abstraction .

ejolson
Posts: 3828
Joined: Tue Mar 18, 2014 11:47 am

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 5:57 am

Heater wrote:
Wed Oct 16, 2019 4:45 am
From a CS is perspective we like to think that all our computers are equivalent to Turing machines.
Even with 4GB, the memory in the new Raspberry Pi is far from infinite. Still, given the way people write programs, it would seem we do like to think our computers are equivalent to machines with infinite memory.

One thing clear from the Fibonacci challenge is that the runtime changes each time a program executes. More generally any type of parallelism or time slicing can introduce indeterminacy in the output of a program. For example, a typical way to run the map-reduce algorithm is to return the first 20 solutions found and then cancel the rest of the parallel calculation. Depending on differences in network, storage and processor latencies, which solutions are found first can vary from run to run.

Many years ago the automatic tuning used in the FFTW Fourier transform library led to nondeterminism in some numerical simulations I conducted regarding data assimilation and the synchronisation of nonlinear dynamical systems. Depending on how the operating system allocated the arrays in physical memory, the FFTW library ordered the floating point operations used to compute the transform in a sightly different way. This resulted in a change in the rounding errors from run to run which, due to the sensitivity of the calculation on initial conditions, led to very different solution trajectories by the end of otherwise identical computations.

There are also algorithms such as genetic optimisation, simulated annealing, stochastic parameterisation, the ensemble Kalman filter and Monte Carlo integration, among others, which intentionally introduce randomness for various reasons. The outputs when running programs which implement such algorithms are different each time. Even passwords encrypted with salt result in a different hash each time.

I personally think it would be possible to let the Bayesian inference and back propagation steps in a deep-learning neural network race in parallel when making updates and that the algorithm would still work. Not having to block or synchronise the different threads could result in huge performance gains; however, the topic about robots taking over the world because people can't code in Python was a few months ago.

ejolson
Posts: 3828
Joined: Tue Mar 18, 2014 11:47 am

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 6:27 am

Heater wrote:
Wed Oct 16, 2019 4:51 am
John_Spikowski,
I try to stay away from languages that require declaring and framework definitions.
How does that help in this case?

What does ScriptBasic do when you list the content of directories in different operating systems?
Might it check the environment variable LC_COLLATE and then sort the bit patterns used for the filenames as if they were UTF-8 Unicode characters in a foreign language?

gkreidl
Posts: 6139
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 7:40 am

Heater wrote:
Wed Oct 16, 2019 4:45 am
gkreidl,

One could take a different point of view.

Fundamentally any given program, when presented with the same data should produce the same result.

If that is not the case then we don't have a program, we have a kind of random number generator. Designers and implementers of programming languages, operating systems, and all other software go to huge lengths at great effort to ensure that this determinism holds true. When it is not we call them bugs.

From a CS is perspective we like to think that all our computers are equivalent to Turing machines. Turing machines are very rigorously defined.

In this case, the same program, with the same data, did not produce the same results. If we brush that off as "OK" then we are being dishonest about our profession.

Yes, there is a get out clause, an exception, a warning, in the small print, buried in reams of documentation. There often is. That is no excuse.

People whose lives are dedicated to something other than CS and the endless details of computing systems should not be expected to suffer this kind of unpredictability from computers.
If you use any kind of library (which you will always do) in any kind of language without reading the documentation you are simpy stupid.

In C, using glib, you will find exactly the same:
g_dir_open ()
GDir *
g_dir_open (const gchar *path,
guint flags,
GError **error);
Opens a directory for reading. The names of the files in the directory can then be retrieved using g_dir_read_name(). Note that the ordering is not defined.

g_dir_read_name ()
const gchar *
g_dir_read_name (GDir *dir);
Retrieves the name of another entry in the directory, or NULL. The order of entries returned from this function is not defined, and may vary by file system or other operating-system dependent factors.
NULL may also be returned in case of errors. On Unix, you can check errno to find out if NULL was returned because of an error.
On Unix, the '.' and '..' entries are omitted, and the returned name is in the on-disk encoding.
On Windows, as is true of all GLib functions which operate on filenames, the returned name is in UTF-8.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 12:02 pm

Heater wrote:
Wed Oct 16, 2019 4:51 am
John_Spikowski,
I try to stay away from languages that require declaring and framework definitions.
How does that help in this case?

What does ScriptBasic do when you list the content of directories in different operating systems?
ScriptBasic directory read is very flexable and produces the same results on all OS platforms.

jcyr
Posts: 503
Joined: Sun Apr 23, 2017 1:31 pm
Location: Atlanta

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 1:59 pm

Heater wrote:
Wed Oct 16, 2019 4:58 am
All of computer programming is nothing but: Sequence, Selection and Iteration. If one has mastered that in Python what else are you expecting them to have to know to be "literate"?
Was referring to the specific example of the scientist who wrote something in Python calling canned functionality he failed to understand. Is that 'literate'? not in my book. My point was, you're not really learning much using these "we've got a black box to handle everything" languages.

My reference to bash was misapplied.
It's um...uh...well it's kinda like...and it's got a bit of...

ejolson
Posts: 3828
Joined: Tue Mar 18, 2014 11:47 am

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 4:08 pm

John_Spikowski wrote:
Wed Oct 16, 2019 12:02 pm
Heater wrote:
Wed Oct 16, 2019 4:51 am
John_Spikowski,
I try to stay away from languages that require declaring and framework definitions.
How does that help in this case?

What does ScriptBasic do when you list the content of directories in different operating systems?
ScriptBasic directory read is very flexable and produces the same results on all OS platforms.
I looked at the documentation provided and could not determine whether the sort order depends on the LC_COLLATE environment variable setting or not.

From a literacy point of view using only ASCII encodings with ASCII sort order can be understood in about ten minutes. Moreover, when computers work the same simple way for everyone, standardisation is useful and quickly empowers people all over the world so they can work together and share code.

Unicode, on the other hand, does not unify but instead creates localisations that are different for each community. Rather than liberating people, the product is a complicated collating scheme that separates individuals based on ethnic background. True liberation results from people working together, not from the current style of bugs and political segregation based on collating order.

The standard complaint used to push Unicode is that ASCII is English-language focused and therefore not inclusive. Although it's amusing this argument is often written down using the English language, mushing a bunch of different alphabets into a giant Unicode only compounds the original difficulty of having language-centric alphabets in the first place.

In my opinion, the inclusive solution would be to standardise on one all-purpose phonetic alphabet consisting of visually distinct characters suitable for writing down every human language. This should be possible using 8-bit characters because the number of distinguishable sounds people can make, while far greater than cats and dogs, is likely far less than 256. In fact, according to the lead developer of Fido Basic it would only take five additional characters to include the sounds used in all dog languages and one more for cats.

Aside from that, an example of a universal phonetic alphabet comes from the Indian subcontinent. Devaganari works just as well when writing English as it does for Sanskrit, Hindu or Marathi. Although the language-centric alphabets used for Tamil, Telugu and others are visually different, the phonetic structure is similar. In particular, it would not be difficult to create a single phonetic alphabet to handle all Indian languages. Moreover, given the success demonstrated with writing English using Devaganari, other human languages should be possible to cover without difficulty.

Although a single international phonetic alphabet has already been developed by linguists and used to describe every language ever spoken, why standardise on something simple that would liberate everyone using a computer when Unicode also includes the pile-of-poo character? And don't forget, dogs and even cats are people too.
Last edited by ejolson on Wed Oct 16, 2019 4:50 pm, edited 1 time in total.

User avatar
John_Spikowski
Posts: 1614
Joined: Wed Apr 03, 2019 5:53 pm
Location: Anacortes, WA USA
Contact: Website Twitter

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 4:45 pm

Sorry, I never tried it with unicode based filenames. If someone gives it a try, please let us know how it works out.

Heater
Posts: 13921
Joined: Tue Jul 17, 2012 3:02 pm

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 7:00 pm

Devaganari sounds like a neat idea ej.

I'm mean, how many ways does a cat need to be able to say "feed me", let alone write it?

However I fear that even if all the world was mad keen on Devaganari to start with it would soon diverge into splinter groups and factions and collapse in acrimony.

See the history of Volapük: https://www.omniglot.com/writing/volapuk.htm

Might as well embrace the chaos that is Unicode as fast as possible and get it over with.

Soon the Chinese or whoever will throw out the English from it's prime position in the 8 bit code space and replace it with whatever they like. After all, it's not fair that they have to use a less efficient coding when there is so many of them.
Memory in C++ is a leaky abstraction .

jcyr
Posts: 503
Joined: Sun Apr 23, 2017 1:31 pm
Location: Atlanta

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 7:09 pm

ejolson wrote:
Wed Oct 16, 2019 4:08 pm
I looked at the documentation provided and could not determine whether the sort order depends on the LC_COLLATE environment variable setting or not.

From a literacy point of view using only ASCII encodings with ASCII sort order can be understood in about ten minutes. Moreover, when computers work the same simple way for everyone, standardisation is useful and quickly empowers people all over the world so they can work together and share code.

Unicode, on the other hand, does not unify but instead creates localisations that are different for each community. Rather than liberating people, the product is a complicated collating scheme that separates individuals based on ethnic background. True liberation results from people working together, not from the current style of bugs and political segregation based on collating order.

The standard complaint used to push Unicode is that ASCII is English-language focused and therefore not inclusive. Although it's amusing this argument is often written down using the English language, mushing a bunch of different alphabets into a giant Unicode only compounds the original difficulty of having language-centric alphabets in the first place.

In my opinion, the inclusive solution would be to standardise on one all-purpose phonetic alphabet consisting of visually distinct characters suitable for writing down every human language. This should be possible using 8-bit characters because the number of distinguishable sounds people can make, while far greater than cats and dogs, is likely far less than 256. In fact, according to the lead developer of Fido Basic it would only take five additional characters to include the sounds used in all dog languages and one more for cats.

Aside from that, an example of a universal phonetic alphabet comes from the Indian subcontinent. Devaganari works just as well when writing English as it does for Sanskrit, Hindu or Marathi. Although the language-centric alphabets used for Tamil, Telugu and others are visually different, the phonetic structure is similar. In particular, it would not be difficult to create a single phonetic alphabet to handle all Indian languages. Moreover, given the success demonstrated with writing English using Devaganari, other human languages should be possible to cover without difficulty.

Although a single international phonetic alphabet has already been developed by linguists and used to describe every language ever spoken, why standardise on something simple that would liberate everyone using a computer when Unicode also includes the pile-of-poo character? And don't forget, dogs and even cats are people too.
Hmm.. Do you expect anyone to take this seriously?
It's um...uh...well it's kinda like...and it's got a bit of...

ejolson
Posts: 3828
Joined: Tue Mar 18, 2014 11:47 am

Re: Liberation through Computer Literacy

Wed Oct 16, 2019 7:19 pm

jcyr wrote:
Wed Oct 16, 2019 7:09 pm
Hmm.. Do you expect anyone to take this seriously?
Only the part about adding five more phonemes to the international phonetic alphabet for the dog languages and one more for the cat.

Return to “General programming discussion”