A curious proposal

For friendly off topic discussion not covered in a forum above.
Forum rules
No politics, please.
User avatar
commodorejohn
Posts: 654
Joined: Tue Oct 02, 2012 1:22 pm
Contact:

Re: A curious proposal

Unread postby commodorejohn » Wed Aug 02, 2017 1:23 pm

Indeed! C is just assembly language for the impatient.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/SH-09/HS-80/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/M1, Ensoniq SQ-80, E-mu Emax HD/Proteus-2, Casio CZ-5000, Moog Satellite, Sequential Circuits Prophet-600

User avatar
zahal
Posts: 839
Joined: Fri May 27, 2005 11:43 am

Re: A curious proposal

Unread postby zahal » Sat Aug 05, 2017 12:48 pm

Oskar45 wrote:A member of our government proposed to provide free tablets and smartphones to every school-kid.


Hard to imagine people in this day and age still believe in the free-shit fairy. Nothing is ever free. Someone, sometime...will have to pay. With compounded interest. With loss of liberties. With new and/or higher taxes. Any politician that proposes "free" stuff should be flogged on the spot and removed from his post.
Sitting in a room.....thinkin' shit up. :evil:

:O2: 400MHz R12k - :320: Dual 600MHz PIII - HP Alphaserver DS15 - Digital DECstation5000/133 - Dell T3500 - Apple G4 Cube dual 500MHz/GF6200 - Newton Messagepad 2100 - Apple PowerBook 2400c/G3@240 - Apple PowerMacintosh 6100/66 - Apple PowerMacintosh 6500/G3@500MHz - Apple Workgroup Server 9150/120 G3@280 - Apple Macintosh IIfx - Apple Macintosh LC475 (OC Full 040 33MHz) - Apple Macintosh Color Classic (Full 040 40Mhz Mystic upgrade) - Sun Cobalt Cube 3 - EBOX 3300A-JSK - Tadpole RDI UltraBook IIi - Compaq Armada 4120 - Digital HiNote Ultra II - HP OmniBook 425 - HP 200LX - Crossbeam C12

surrealdeal
Posts: 153
Joined: Sat Oct 19, 2013 12:27 pm
Location: chicago

Re: A curious proposal

Unread postby surrealdeal » Sat Aug 05, 2017 5:22 pm

if you're betting real money on an answer: x86 assembler

that way they can learn why both tablets and all other programming languages / datastructures are superfluous

wasn't there a textfile that once said before you can learn programming, you must first learn to read?
like that new-math thing, where they tried teaching graph theory with mathematics to 'enhance' the learning of math, when you first need to learn the pretense? it's backwards.

i've taught schoolchildren before, breifly. they don't need tablets, they need an enriched primary education before anything else. and from what i see of the public school system, teachers that don't harbor subliminal hatred and low-expectations towards the very children they are paid to teach.

User avatar
josehill
Moderator
Moderator
Posts: 3318
Joined: Mon Jun 06, 2005 9:53 pm
Location: New England, USA
Contact:

Re: A curious proposal

Unread postby josehill » Sun Aug 06, 2017 4:55 am

surrealdeal wrote:wasn't there a textfile that once said before you can learn programming, you must first learn to read?
like that new-math thing, where they tried teaching graph theory with mathematics to 'enhance' the learning of math, when you first need to learn the pretense? it's backwards.

i've taught schoolchildren before, breifly. they don't need tablets, they need an enriched primary education before anything else. and from what i see of the public school system, teachers that don't harbor subliminal hatred and low-expectations towards the very children they are paid to teach.


Speaking of tablets in schools, a friend of mine had a blog for awhile about his local school district's efforts at requiring the use of iPads in the curriculum. Some of you might be interested in it - https://ipadsfor6thgrade.wordpress.com

Usually, when I hear a politician or tech exec talking about how "everyone needs to learn how to program in school," I suspect that they have little to no idea of how that actually would work (or not) in the real world, but they're convinced that we have to "do something," which usually leads to lots of money spent, but not a lot of educational benefits.

User avatar
uunix
Donor
Donor
Posts: 1808
Joined: Sun Mar 27, 2011 12:48 pm
Location: Stourbridge / England / UK

Re: A curious proposal

Unread postby uunix » Sun Aug 06, 2017 6:32 am

I was at school during the early 80s, I was taught BBC basic and computer history.
Roll the clock forward some 20 years and my daughter was taught how to use excell, word etc there was no actual programming for her.
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
:Octane2: :O2: :Indigo: :Indy:
-----------------------------------------------------------------------

Y888099
Posts: 523
Joined: Mon Jul 11, 2016 11:00 am

Re: A curious proposal

Unread postby Y888099 » Sun Aug 06, 2017 6:58 am

uunix wrote:my daughter was taught how to use excell, word etc there was no actual programming for her


In my opinion it's not so bad, since one needs to learn some good application, and collect good credits for his/her CV.

The software complexity grows like a tree, just with a difference of 30 years we are already talking about what in 80s was simple impossible: concurrency and parallelism!

Indeed they tried to invent the Transputer with its own Occam language. They failed, but now you can buy an Xcore board with 32 RISC cores for 12 USD, and will end with a system where there are no interrupts (completely removed from the hardware), and a completely different programming paradigm.

From what? From a PC, in first place.

I met a girl on the beach, she is not British but studying computer science in UK, and she talked me she has to program the Parallella/Epiphany board to pass an examination as well as learning Latek (why not Word?) to write the final report.

What. The. Frog? She is not a geek, and Epiphany comes with "only" 16-cores cores, not so many, but enough to make problem to arise in a way that they can be magnified, thus I am afraid that "legacy" code written in non-concurrent languages is actually "solving the wrong problem". Indeed, one of the SDKs provided by her university is written in C, but C and C++ are not good at concurrency, so ...
Head Full of Snow. Lemon Scented You

User avatar
spiroyster
Donor
Donor
Posts: 145
Joined: Thu May 03, 2012 8:24 am
Location: Somerset, UK

Re: A curious proposal

Unread postby spiroyster » Sun Aug 06, 2017 7:58 am

Y888099 wrote:we are already talking about what in 80s was simple impossible: concurrency and parallelism!

The CM-5 (among others) disgrees with this.

Y888099 wrote:Indeed they tried to invent the Transputer with its own Occam language. They failed...

The transputer was invented o.0

Y888099 wrote:as well as learning Latek (why not Word?) to write the final report.

Why Excel for tables? Word would be sufficient no?

Y888099 wrote:thus I am afraid that "legacy" code written in non-concurrent languages is actually "solving the wrong problem". Indeed, one of the SDKs provided by her university is written in C

I swear theres an Amdahlian joke in here somewhere o.0

Y888099 wrote:but C and C++ are not good at concurrency, so ...

Please elaborate?

Y888099
Posts: 523
Joined: Mon Jul 11, 2016 11:00 am

Re: A curious proposal

Unread postby Y888099 » Sun Aug 06, 2017 10:41 am

spiroyster wrote:Why Excel for tables? Word would be sufficient no?


WTF? Her university asked her to use Latek to write the final report. What the is the meaning of Excel in this?
The only good point is: she can now quote a new tool in her CV's abilities!

Y888099 wrote:Please elaborate?


If you will ever program something which involve concurrency, you will find it by yourself, as well as finding that the software has more of an effect on real time performance than the hardware, and bad software can ruin the real time performance of any hardware.

On XCore the tasks are statically allocated, that's required for the XCore-IDE to define execution times without executing code and measuring a subset of the possible times. The interesting point about the XMOS devices is that the combination of hardware+software enables such predictions in a way that is impossible for bog-standard processors, whereas a lot of multicores are just a lot of cores on a scratchpad or shared ram, and each core add its aleatory effect caused by its cache and pipeline, plus all the mess you have to handle to guaranty atomic bus cycles on semaphore.

Here you have a lot of things that can go wrong. Typically on mutex, but you also have priority inversions(it happens. E.g. the Mars PathFinder, NASA human mistake) and deadlock.

Now, the common C compiler (XMOS is programmed in Concurrent C, a specific revision of the C language and libraries) is a software which doesn't have any construct for the concurrency, indeed Threads Cannot be Implemented as a standard C-Library.

Oh, Threads Cannot be Implemented as a standard C-Library!

You can, of course, but since everything stays on your shoulders, and since the complexity grows as a tree, it's like building on sand.

I would say: if someone needs to program something concurrent, he/she'd better go to ErLang.
Head Full of Snow. Lemon Scented You

robespierre
Posts: 1568
Joined: Mon Sep 12, 2011 2:28 pm
Location: Boston

Re: A curious proposal

Unread postby robespierre » Sun Aug 06, 2017 11:43 am

There are other languages that provide static timing guarantees. ChucK and Esterel come to mind.
Threads are a seriously flawed concurrency concept. Actors (you mentioned Erlang) or rendezvous (see Ada) can be proven correct where threads cannot.
:PI: :O2: :Indigo2IMP: :Indigo2IMP:

User avatar
HurricaneJames
Posts: 103
Joined: Thu Jul 06, 2017 10:08 pm
Location: Santa Clara, CA

Re: A curious proposal

Unread postby HurricaneJames » Sun Aug 06, 2017 6:29 pm

Hah, I see nobody here recommends JavaScript. I know C coders tend to hate it, but it is actually a fairly powerful functional programming language.
:320: :1600SW: :O2: :1600SW: :Octane: :Octane: Image

User avatar
commodorejohn
Posts: 654
Joined: Tue Oct 02, 2012 1:22 pm
Contact:

Re: A curious proposal

Unread postby commodorejohn » Sun Aug 06, 2017 8:34 pm

Teaching novice programmers on Javascript is how you initiate the End Times.
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/SH-09/HS-80/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/M1, Ensoniq SQ-80, E-mu Emax HD/Proteus-2, Casio CZ-5000, Moog Satellite, Sequential Circuits Prophet-600

User avatar
ClassicHasClass
Donor
Donor
Posts: 2091
Joined: Wed Jul 25, 2012 7:12 pm
Location: Sunny So Cal
Contact:

Re: A curious proposal

Unread postby ClassicHasClass » Sun Aug 06, 2017 9:43 pm

THAT explains the cats and dogs living together.
smit happens.

:Fuel: bigred, 900MHz R16K, 4GB RAM, V12 DCD, 6.5.30
:Indy: indy, 150MHz R4400SC, 256MB RAM, XL24, 6.5.10
:Indigo2IMP: purplehaze, 175MHz R10000, Solid IMPACT
probably posted from Image bruce, Quad 2.5GHz PowerPC 970MP, 16GB RAM, Mac OS X 10.4.11
plus IBM POWER6 p520 * Apple Network Server 500 * RDI PrecisionBook * BeBox * Solbourne S3000 * Commodore 128 * many more...

User avatar
spiroyster
Donor
Donor
Posts: 145
Joined: Thu May 03, 2012 8:24 am
Location: Somerset, UK

Re: A curious proposal

Unread postby spiroyster » Mon Aug 07, 2017 1:51 am

Y888099 wrote:
spiroyster wrote:Why Excel for tables? Word would be sufficient no?


WTF? Her university asked her to use Latek to write the final report. What the is the meaning of Excel in this?
The only good point is: she can now quote a new tool in her CV's abilities!

What is Latek? Do you mean LaTeX? Since mathematical symbols and pseudo is probably involved when communicating, I can understand using LaTeX and not Word. Markdown and LaTeX have been my staple for all in house documentation for at least the last 5 years. The only times that I have used Word was to open a doc sent to me by a non-programmer (engineer) tbh. My Excel reference was an attempt to point out that many programs can be used to generate the same thing, but that doesn't mean they are the best option for efficiency and ease of use when conveying certain things.

Y888099 wrote:but C and C++ are not good at concurrency, so ...

This is where I'm confused since parallel programming has taken a sizeable amount of my professional career since 2006. I have used OpenMP and/or pthreads in C++ in all cases for both shared and distributed architectures and there has been nothing that I haven't been able to do o.0. So if your struggling to get the concurrency with your C code, you ain't doing it right imo.

It sounds like you are approaching it from an embedded point of view. I can't comment on that since I'm an application developer. And in fact, unless you are working on a cluster (distributed), OpenCL (now Vulkan) which is based on C/C++, is the language of choice ime, but its a very different paradigm, and your C/C++ CPU is still doing the scheduling/balancing.

This is my parrallel life these days:
inlined SSE for SIMD
OpenMP for SMP (shared)
OpenCL/Vulklan for GPU (sort of a half way house since the mem is shared, but needs to be uploaded to the GPU in the first place, and subsequently synced with CPU land o.0)
pthreads for Clusters (proper distributed). Although admittedly not worked on a cluster for a number of years.

Y888099 wrote:as well as finding that the software has more of an effect on real time performance than the hardware, and bad software can ruin the real time performance of any hardware.

Good day to you too ... Mr fscking obvious

Y888099 wrote:the combination of hardware+software enables such predictions in a way that is impossible for bog-standard processors

Please elaborate? Whose software, yours or the runtime?

Y888099 wrote:Here you have a lot of things that can go wrong. Typically on mutex, but you also have priority inversions(it happens. E.g. the Mars PathFinder, NASA human mistake) and deadlock.

Now, the common C compiler (XMOS is programmed in Concurrent C, a specific revision of the C language and libraries) is a software which doesn't have any construct for the concurrency, indeed Threads Cannot be Implemented as a standard C-Library.

Oh, Threads Cannot be Implemented as a standard C-Library!

You can, of course, but since everything stays on your shoulders, and since the complexity grows as a tree.

Yes your right, the language doesn't have any construct of concurrency, however OpenMP is implemented as a series of preprocessor macros, which bassically means in effect you can add concurrent constructs into the language which do not require existing C syntax to be changed (or even supported, although every C compiler/linker worth their salt since an age ago has supported OpenMP). Yes your C code's structuring and architecture need to support the concepts that OpenMP provide the 'acceleration' for however, its a preprocessor directive so a compiler flag turns it off or on, and compilers that do not support OpenMP simply ignore it.

These things you mention are what concurrent programming is all about! Load balancing, scheduling and synchronisation are where the magic is. It's one thing to simply isolate the mutual exclusive regions of your algorithm, implementing this into efficient pipelines which mitigate stalls/race-conditions and keep your cores being fed is another (the fun part!).

Y888099 wrote:I would say: if someone needs to program something concurrent, he/she'd better go to ErLang.

I'm not going to slate erlang, a few years ago I would have done, but I do get the impression it's gaining popularity and I don't know enough about it. Still, currently though, if I was tasked with something new with 'concurrent' requirements, I wouldn't choose erlang unless there was a dependency requiring it. And even then it would require justification that it offers something we cannot reproduce or get elsewhere with that requirement to get off our high horses about it.

Guess what was used to write the erlang VM! For a language that sucks at concurrency, its doing as pretty good job providing the staple backbone runtime of the language you recommend over it o.0. As I said, C is basically a macro providing some slightly higher level concepts for assembly (without having to write platform specific assembly), which means its the first level of platform independence (but still includes inline assembler for those hardware specific things) and does not require another level of run time abstraction since the runtime library is a staple of soooo much these days (probably the main reason I would recommend learning C). Thats why it's fast and tends to be used to implement layers of abstraction for other runtimes. This is also why I say, just learn C and be done with it. So many other fads have come and go, yes it's not perfect for everything (although if coded correctly, it probably is o.0) but it can do pretty much everything with minimal overhead. Just my two cents, two each their own.
Last edited by spiroyster on Mon Aug 07, 2017 4:26 am, edited 1 time in total.

User avatar
uunix
Donor
Donor
Posts: 1808
Joined: Sun Mar 27, 2011 12:48 pm
Location: Stourbridge / England / UK

Re: A curious proposal

Unread postby uunix » Mon Aug 07, 2017 3:25 am

Y888099 wrote:
uunix wrote:my daughter was taught how to use excell, word etc there was no actual programming for her


In my opinion it's not so bad, since one needs to learn some good application, and collect good credits for his/her CV.

Excell, Word etc imho should be a standard lesson in this day and age, like home ec..

If one takes computer studies as a choice, then it should include programming.

iirc She opted for a Computer Studies class... Anyway, she did really well, getting something like 11 A* out of 12, failing on one subject... computers.. :lol:
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
:Octane2: :O2: :Indigo: :Indy:
-----------------------------------------------------------------------

User avatar
Oskar45
Posts: 2257
Joined: Mon Dec 05, 2005 2:35 am
Location: Vienna, Austria

Re: A curious proposal

Unread postby Oskar45 » Sun Oct 01, 2017 9:44 am

spiroyster wrote:
Does APL2 use the same glyphs as the rest of the world? Or is it still that mystical runic symbolism which invokes loki every time you attempt to write a program in it o.0


[Sorry for replying so late - was abroad for some time]

Yes, APL still uses these characters - with good reasons (see Iverson, "A Programming Language", Wiley 1962). But it doesn't seem to be widely known that there were also versions using just keywords, available even on the PC, and at least one dialect utilizing only ASCII characters.*)

Of course, there is no such thing as *the* ideal programming language and there will never be (see Reynolds, "Theories of Programming Languages", Cambridge 1998). Like all others, APL has a lot of problems by itself. 

But, IHMO, the difficulties people have with APL has nothing to do with the characters [most of them are normal mathematical symbols, and the rest can be learned in an hour - compare that to the number of key-combinations you need to master to get fluent in vi or emacs]. No, the problem is that most are not used to think in terms of *arrays* (see More, "Notes on the diagrams, logic and operations of array theory", Tapir 1981). E.g., suppose A is a 23-dimensional numerical structure, and you want to get just the sum of the elements. In APL, I would write +/,A. What would you do?

*) Actually, Mathematica is influenced strongly by APL. In fact, the "Mathematica 2"-book had a table corresponding APL symbols to Mathematica functions. 
Everyone loves a lover. Romeo loves Juliet. Therefore, Trump loves Putin.


Return to “Everything Else”

Who is online

Users browsing this forum: No registered users and 1 guest