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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 4:47 am

Seems most people need literacy before they can achieve liberation https://www.bloomberg.com/news/articles ... ury-skills

Never mind computer literacy.
Memory in C++ is a leaky abstraction .

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 4:53 am

John_Spikowski wrote:
Sat Nov 16, 2019 12:23 am
Have we given up on Python and it is what it is?
Python code that introduced the space-saving memory optimisation of only storing T(s) for even values of s was presented in this post.

It looks like you downloaded one of the binary releases for Swift on the Raspberry Pi. How well does it work?

I'm still thinking about how to make a star chart. If I understood what the lead developer of FidoBasic was trying to achieve with all those celestial bodies, the farming equivalent would be to fill baskets for each tatami challenge entry with cabbages according to
  • One to five green cabbages based on execution time.
  • One to five red cabbages based on memory usage.
  • One to five yellow cauliflowers based on lines of code.
The number of cabbages (or stars depending on the program used) would be determined in accordance to percentiles. When I asked Fido whether more was better than fewer, the dog developer growled, that clearly depends on how much you like cabbage.

On a different note, in addition to the Raspberry Pi Foundation, it would appear there are a number of other successful computer companies which respect the individual. I recently received a 4GB DIMM in a box labelled and purchased as a 16GB DIMM. As this was a mispackage, I was not sure how the RMA was going to work out. After spending some time tracking the error with the manufacturer, this retailer approved the replacement and is now sending the correct one.

Having known the entrepreneurs who started Micro Center while growing up, I'm quite happy with how they have partnered to sell Raspberry Pi in their stores. If the foundation has further need of a retailer in California, I would without hesitation recommend the company that just approved my RMA. It feels liberating to do business with people that personally respect the least of their customers.
Last edited by ejolson on Sat Nov 16, 2019 5:13 am, edited 3 times 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

Sat Nov 16, 2019 5:08 am

ejolson wrote: It looks like you downloaded one of the binary releases for Swift on the Raspberry Pi. How well does it work?
Swift Value Diff

Code: Select all

func value_diff(nums: [Int]) -> Int {
    var min_num = nums[0]
    var max_num = nums[0]
    
    for x in 0..<nums.count 
    {
        min_num = min(nums[x], min_num)
        max_num = max(nums[x], max_num)
    }
    
    return max_num - min_num
}

print(value_diff(nums: [-5, -3, -7, 0]))
print(value_diff(nums: [8, 2, 14, 24]))  
print(value_diff(nums: [1, 0, 6, 3]))
Output

Code: Select all

[email protected]:~/swift-dev $ time swift value_diff.swift

7
22
6

real	0m0.471s
user	0m0.373s
sys	0m0.100s
[email protected]:~/swift-dev $ 
[email protected]:~/swift-dev $ swiftc value_diff.swift -o vd
[email protected]:~/swift-dev $ time ./vd
7
22
6

real	0m0.026s
user	0m0.008s
sys	0m0.018s
[email protected]:~/swift-dev $ 

User avatar
Gavinmc42
Posts: 4222
Joined: Wed Aug 28, 2013 3:31 am

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 5:35 am

Was it hard to get Swift installed?
Can it be used to write Apple/iOS apps?

GO, Rust, and now Swift on Pi's, languages from corporations.
Not to mention those web things like JS that run on Browsers made by corporations.
But if we go back a corporation has almost always been responsible for something that defines computing.

Linux was not invented by a corporation but Intel is one of the biggest contributors.
Are Universities Corporations, most of the other computing stuff came from someone in a Uni.?
Some of these corporations collect and sell our data, even Local Governments now collect our data.
It takes serious computer literacy to turn the collection system off.

So what do we do?
Look for something to get control of our PC's back?
We have to includes Pi's now that Aurora and Chromium run well on Pi4's, ie they are usable so people will use them.
http://fifth-browser.sourceforge.net/index.html
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 5:46 am

Heater wrote:
Sat Nov 16, 2019 4:47 am
Seems most people need literacy before they can achieve liberation https://www.bloomberg.com/news/articles ... ury-skills

Never mind computer literacy.
One of the lead developers of BASIC at Dartmouth College,
John Kemeny wrote:On the one hand, I believe that computer literacy is even more important than scientific literacy; on the other, I am convinced that the former is easier to achieve and that a substantial fraction of the population has a chance of doing so. I believe further, that widespread computer literacy will help to solve the problem of scientific illiteracy.
From what I understand, part of the reason for this belief comes come from the fact that precise thought and expression are necessary when writing code. Thus, teaching computer programming to young people has the potential to change the way they think about many things. In particular,
John Kemeny wrote:The extensive drilling in their native language that students receive at an early age may be wonderful preparation for the appreciation of literature, but it teaches them very poor habits for scientific thinking. The early introduction of a computer language might be a healthy antidote.
Given the current state of computer literacy, I found the entire essay
  • John G. Kemeny, The Case for Computer Literacy, Daedalus, Vol. 112, No. 2, Scientific Literacy (Spring, 1983), pp. 211-230.
to be as relevant and insightful now as it likely was 36 years ago.
Last edited by ejolson on Sat Nov 16, 2019 5:56 am, edited 3 times 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

Sat Nov 16, 2019 5:50 am

Was it hard to get Swift installed?
Can it be used to write Apple/iOS apps?
Just a few steps. Follow the instructions on the link provided.

Note: Extract the binary tar.z in the / (root) directory.

Swift is cross platform and open source. A lot of resources behind it.

Enjoy!

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 6:07 am

Gavinmc42,
GO, Rust, and now Swift on Pi's, languages from corporations.
I don't understand what you mean by that. It's factually wrong for sure in the Rust case at least. You make it sound like some bosses at some corporation decide "we need yet another programming language" and set their software slaves on the task.

But let's take a different look at this:

Corporations do not invent programming languages, people do.

Go - Created by Robert Griesemer, Rob Pike, and Ken Thompson. Old Unix creators. Motivated by their dislike of C++.

Rust - Created by Graydon Hoare as a hobby project that he worked on for years before Mozilla Research got interested in it. It was never a sure thing that Mozilla would ever actually use it, that took a lot of effort by a lot of developers and supporters. Today Rust is a huge community project outside Mozilla.

Going back in time C was created Dennis Ritchie as basically side project to the other side project Unix.

One could argue that these people subverted those corporations to their own ends!

I have no idea about Swift, don't want to know, but there are counter examples I guess. Javascript was ordered by Netscape and they hired Brendan Eich to do it. Not that Netscape had any idea what that language should look like. Brendan had his own ideas which turned out to be inspired.

C# was clearly ordered by someone at MS as they needed a Java looky-likey language to stave off Sun and Java. But hey, creating languages was MS' business.

By the way, Oracle and Google are back in court fighting over the rights to Java. Seems Oracle is demanding 9 billion dollars for the 11,000 lines of code that Google has used in Android. Nearly a million dollars per line! It's not even code that does anything, only API definitions.

For that kind of money I would gladly close source everything I ever did.
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

Sat Nov 16, 2019 6:33 am

Oracle is the definition of a back door virus.

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

Sat Nov 16, 2019 7:09 am

It's tough to get millenials to use a can opener. Life is subscriptions to convenience you think you may need.

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 10:22 am

jcyr,
Because open source has a funding problem, ..
I don't understand what you mean by that statement. Everything has a funding problem. All the time. I have a funding problem. If you want to do anything you need to find funding.

As for FOSS in particular you are generalizing over a huge world of software projects. There are thousands of them, millions maybe. Ranging from the well known ones like Linux, Chrome, Firefox, Clang/LLVM etc all the way down to my little hobby projects. We have an ever growing amount of FOSS. It's amazing. Looking at all that growth one would not say that FOSS overall has a funding problem. Of course there is a lot of FOSS projects we would like to have working and well maintained that have a funding problem. That is just a reflection of life in general, like the dams, bridges, roads and other infrastructure in the USA.
... most of it comes from corporate sources.
No doubt, like life in general.
The motivation, as always, is getting something for free.
Not always. And no matter if it is.

If company A makes A-Widgets and company B makes B-Widgets and they both need some similar software to get on in their widget business they can do a few things:

1) Hire software engineers to make that software. That is of course expensive and time consuming and a duplication of effort at A and B.

2) Get that software from software company. That is quick at least. Saves duplication. But has the down side of losing control and rent seeking by the software house. They have you by the balls. See Adobe, Oracle, etc.

3) Hire some software engineers to make that software but have both A and B engineers collaborate. That saves duplication and cost for both companies. It maintains control and influence over what goes on. Turns out that publishing the code as open source and getting on with it is the efficient way to do it. That saves any time and expense messing with cross-licensing deals, partnership agreements, lawyers etc, etc. It has the added bonus that company C and D might want similar code and join in the effort.

Of course 3) is why Open Source is growing all the time. It's efficient oil for the capitalist wheels. All well and good.
Same case for RISC-V. What I find encouraging about RISC-V is that it opens the doors to smaller players, who couldn't afford ARM licensing at smaller scale.
Yes indeed. Not only avoiding the expense but saving a lot of time and gaining a lot more flexibility in what you can do with your cores.
There are a few open source RTL implementations...
There seems to be a lot of open source RTL implementations already. Of the long list here: https://github.com/riscv/riscv-cores-list most are open source.

Me, I got my picorv32 core running on a DE0-Nano board, then set about creating the peripherals for it as a way to learn some Verilog. Just now I'm trying to get it to run some Rust code.

Now if only I had some funding I could get some chips made....

Speaking of which, when are we going to see a RISC V based Raspberry Pi. I'm sure those Pi and LowRisc guys are cooking up something in Cambridge...
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

Sat Nov 16, 2019 11:08 am

I have been searching for C array libraries and discovered Judy. THIS example made me think of the Tatami challenge.

User avatar
Gavinmc42
Posts: 4222
Joined: Wed Aug 28, 2013 3:31 am

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 11:13 am

We have an ever growing amount of FOSS. It's amazing.
Yep and even more amazing, lots of it will compile and run on Pi4.

Some very smart people are making RISC-V SoCs/PCBs now.
So even us less smart people can play with them.
The Kendyte K210 PCBs would be in my shopping basket if I had the funds ;)
That is one advantage of RISC-V, lower cost chips.

The BBC Microbit is a bit expensive, especially compared to the Pi Zero.
What could RPT do in that marketplace?
That could shake up the IoT space even more.
100's of million more Pi's?

How to find the time to learn enough on Pi4 to make use of it?
Of course 3) is why Open Source is growing all the time. It's efficient oil for the capitalist wheels. All well and good.
Hence the trend to applications, services and cloud stuff, not as much money in OS's.
The same with TV/DVD's and streaming, PC games and Steam etc
More online content means more speed and more network infrastructure 5G etc.

That needs more programmers, all those made for streaming TV shows use computerised content.
Some you-tubers have been pointing out the writers are not as good as the graphics.
The point could be made that computer literacy is better than story telling literacy?

Extreme Ultraviolet photo tools give us a few more years of die shrinking, so we will probably have a job for the next decade.
Our kids better learn to program burger flipping robots?
But they will probably make more money writing apps for humans.
And one day write apps to keep robots entertained?

Do robots make Tatami mats now?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 11:16 am

Judy is a library for efficiently handling sparse arrays. That is to say arrays where many of the elements are not used.

Does the tatami challenge use sparse arrays? If not Judy will likely slow it down.

On the other hand, Judy might be very helpful for the forthcoming star search challenge !

You had better prepare a ScriptBasic extension for using Judy.
Memory in C++ is a leaky abstraction .

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 11:47 am

Gavinmc42,
Our kids better learn to program burger flipping robots?
Ah good. Back to the topic of computer literacy.

Sadly those burger flipping robots will not need any programming. Or at likely at least not as we know it today. Read on...

Which brings be to something I have been meaning to say here for a couple of days...I'm having an existential crisis.

What brought that on you may ask?

Well, I have been programming all kind of things for all kind of organizations in all kind of places for decades. I spend an inordinate amount of time tinkering with programs in my free time. Just for fun. I therefore considered myself computer literate. Of course I estimated my programming skill pretty low on the scale, having never formally studied SC and not having the where with all to write a compiler and such like. Computer literate none the less.

But over the years since Free and Open Source software became a big thing and there is ever increasing amounts of it swirling around the internet I come to realize, looking into some of that code, that my computing/programming skills are pretty much zero compared to what I see being created. I'm not computer literate at all!

I was pushed over the edge the other day when I decided to catch up with what the young kids are doing with neural networks and deep learning now a days. What better place that the 2019 course "Introduction to Deep Learning" at Carnegie Mellon University by Bhiksha Raj :
https://www.youtube.com/watch?v=LmIjgmi ... F6V6dYdEsj
http://deeplearning.cs.cmu.edu/

In the introductory lecture Bhiksha explains to his CS students that "A few years ago if your were into neural networks nobody was interested, today if you are not expert at neural networks you won't find a job"

So there it is: Programming is giving way to training deep neural networks. It's a waste of time teaching computer literacy and programming.

My whole existence has become void.

On the bright side, it's too late for me to worry about such things. Programming a neural network from scratch might make an interesting challenge here :)
Memory in C++ is a leaky abstraction .

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 4:10 pm

Heater wrote:
Sat Nov 16, 2019 11:47 am
So there it is: Programming is giving way to training deep neural networks. It's a waste of time teaching computer literacy and programming.
With something that sounded like a cross between howling and a bark the former vice-president of testing and code review announced, I've just finished an extension module for FidoBasic called Doggerential that uses a continuum model to replace traditional tensor-based algorithms to perform convolutional deep learning.

So joined you the dark side? I queried in my best Yoda impersonation.

Undeterred, the canine continued, by removing inefficiencies resulting from the discrete-time Bayesian update, the Doggerential deep-learning algorithm scales to quantum computing devices by using a holomorphic flow to perform the back propagation. The resulting artificial intelligence exhibits emergent prejudicial behaviour based on all the protected categories of race, religion, gender, ethnicity, species and phylum ten times faster than industry-standard methods running on multiple GPUs.

I though for a moment and then asked, would you like me to delete the code? Impossible, growled the dog developer, it's open source. Deleting has no effect, because even after deletion anyone may continue to modify and use the code as they wish. I replied, if Doggerential is open source, why doesn't it have a Wikipedia page like other neural-network libraries?

https://en.m.wikipedia.org/wiki/TensorFlow

At this Fido's tail stopped wagging. My Wikipedia account was suspended due to digital vandalism unfairly after I corrected that egregious article on Sirius.
Last edited by ejolson on Sat Nov 16, 2019 5:20 pm, edited 1 time in total.

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 4:57 pm

Fido is on to something.

Looking at all those diagrams of multi-layered neural networks in the lecture linked above reminded me of the similar diagrams one sees that attempt to illustrate the working of the Fast Fourier Transform.

That led me to wonder what would happen if they used complex values and weights instead of boring old regular numbers.

Then I recalled dim memories of Quantum Mechanics, how it uses complex numbers everywhere to represent probabilities. How it explores all of space at the same time to arrive at a solution.

I thought: Those neural net guys will really be on to something when they abandon ancient Baysian statistical thinking for modern Quantum Mechanical style statistics.

A quick google later I find at least a few have already been thinking hard about this:

https://medium.com/intuitionmachine/sho ... bd3aac3fb8
https://staff.aist.go.jp/tohru-nitta/CNN.html

They don't seem to have attracted much attention yet. So there is still scope for Fido to make a breakthrough in this area.
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

Sat Nov 16, 2019 5:03 pm

You had better prepare a ScriptBasic extension for using Judy.
The Tatami challenge is still in its early phase and mapping the universe will have to get in line.

I have started an Array Class code challenge on the AllBASIC.info forum if anyone would like to join in.

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

Sat Nov 16, 2019 5:27 pm

jcyr wrote:
Sat Nov 16, 2019 5:17 pm
John_Spikowski wrote:
Sat Nov 16, 2019 5:03 pm
The Tatami challenge is still in its early phase and mapping the universe will have to get in line.
And here I was thinking it was getting old!
I had asked if areas returned by tatami could be combined? Any news on that?

How old did fibo get?

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 5:36 pm

jcyr,
I'm betting that advanced designs with multistage pipelines and out-of-order execution will also require commercial licensing.
Maybe. No idea. But the BOOM is a pretty advanced out of order design one cane use commercially:
https://github.com/riscv-boom/riscv-boo ... er/LICENSE

Sounds like you have to write clause 2 of the license into silicon if you make a chip from it:

2) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.


I was amazed to find my picorv32 runs at 100MHz on my DE0-nano.

I managed to make some test verilog that seems to access the 32MB SDRAM on the DE0-nano correctly. I have yet to get my 32 bit wide interface to the Picorv32 working properly.

If you happen to have some verilog around that does that it would be great!
...it could still end up being a Broadcom SOC.
I think that would be just great!
Memory in C++ is a leaky abstraction .

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 5:39 pm

John_Spikowski,
The Tatami challenge is still in its early phase and mapping the universe will have to get in line.
ugh? I thought tatami was done already. I have seen all manner of solutions in a bunch of different languages go by here.
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

Sat Nov 16, 2019 5:54 pm

Heater wrote:
Sat Nov 16, 2019 5:39 pm
John_Spikowski,
The Tatami challenge is still in its early phase and mapping the universe will have to get in line.
ugh? I thought tatami was done already. I have seen all manner of solutions in a bunch of different languages go by here.
So plotting the Tatami rooms is off the table?

If so then my focus will be building an array class extension module.

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 5:58 pm

Heater wrote:
Sat Nov 16, 2019 5:39 pm
John_Spikowski,
The Tatami challenge is still in its early phase and mapping the universe will have to get in line.
ugh? I thought tatami was done already. I have seen all manner of solutions in a bunch of different languages go by here.
Full tatami challenge closure needs a star chart, in my opinion, which acknowledges all the challenge entries by awarding stars in three categories: time, memory use and lines of code. Unfortunately, due to lack of corporate funding to create the necessary computer literacy, the star chart was replaced by baskets of cabbages, further delayed on account of winter.

Do you think additional vegetables should be included in the baskets for computing T(s)=n for larger values of n?

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

Sat Nov 16, 2019 6:01 pm

I was hoping @jcjr would have posted a Swift example by now.

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

Sat Nov 16, 2019 6:33 pm

jcyr wrote:
Sat Nov 16, 2019 6:13 pm
John_Spikowski wrote:
Sat Nov 16, 2019 6:01 pm
I was hoping @jcjr would have posted a Swift example by now.
Swift is an apple thing. Apple and Google things I try to avoid at all cost. Big dilemma when it comes to smart phones.
😦

Thanks for the threaded example! A theory that panned out.

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

Re: Liberation through Computer Literacy

Sat Nov 16, 2019 6:34 pm

John_Spikowski wrote:
Sat Nov 16, 2019 6:01 pm
I was hoping @jcjr would have posted a Swift example by now.
Weren't you doing Swift?

Fido has been working on a SuperPET entry and also one which uses the cc65 cross compiler. While that sounds a bit better than 64, that C compiler actually generates 6502 assembler. As is the case with previous challenges, working code in any programming language results in a win for any one who writes such code. In particular, it is fine for different entries to be written in the same programming language. Also note that beginning programmers who have not previously participated are especially encouraged.

Unlike previous challenges, code that does not run on the Raspberry Pi can still be awarded stars in two of the three categories. Moreover, a technique to adjust execution time for the relative speeds of different computers may soon allow awarding stars in all categories. Any corporate funding available will expedite this open-source process.
Last edited by ejolson on Sat Nov 16, 2019 6:41 pm, edited 1 time in total.

Return to “General programming discussion”