Computer Languages

Go To Last Post
24 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A series on Radio 4 about programming languages...

 

http://www.bbc.co.uk/programmes/...

 

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ah-ha.   I think that I will skip the Cobol episode.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I once did a training course on COBOL. They thought I was "disruptive" and the company chose not to continue my employment at the end of it. (I may have questioned what appeared to be "dinosaur" practices!). Luckily that same week I found and got the job I then spent the next 25 years doing :-)

Last Edited: Wed. Apr 8, 2015 - 10:29 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Never used COBOL outside required classes.

 

Once, exiting a data structures class taught in Pascal, a student said, "Sure wish we could get back to COBOL where you can get something done."

 

Of course, HE probably has a job now...

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:
Once, exiting a data structures class taught in Pascal, a student said, "Sure wish we could get back to COBOL where you can get something done."

Although not in so many words, I'm sure I've heard 'C' programmers express such opinions...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HE probably has a job now...

Yeah but the most boring job in the world! Who wants to write stock control or sales or insurance software? COBOL is probably the computing equivalent of the monkeys+typewriters=shakespeare thing!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My sister used to work in COBOL.

 

Yes,    some years ago,   there was quite a demand for COBOL experience to maintain obsolete systems.

Somehow,   a new job in COBOL in the 21st century would mean supporting 40 year old software.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seems like someone would sell a cobol2c converter. There are basic2c and fortran2c converters.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bob, somehow i'd be thinking a Cobol to Java or to php might be the go at the present time. Having been immersed in php and javascript doing web stuff for the last year, i think C is like the new age assembler - only used by the high priests of coding.

Not only have i been swapping from php to javascript and back on a regular basis, but throw in some lua, objective C and sql. My poor brain has trouble keeping up. Now there's talk of adapting some C++ code using QT that has some funky templating that gcc doesnt like but MS C++ does, my challenges are neverending.

One thing that has been shown is the basic structure of the code is near identical regardless of the actual language its implemented in.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:

Bob, somehow i'd be thinking a Cobol to Java or to php might be the go at the present time. Having been immersed in php and javascript doing web stuff for the last year, i think C is like the new age assembler - only used by the high priests of coding.

Not only have i been swapping from php to javascript and back on a regular basis, but throw in some lua, objective C and sql. My poor brain has trouble keeping up. Now there's talk of adapting some C++ code using QT that has some funky templating that gcc doesnt like but MS C++ does, my challenges are neverending.

One thing that has been shown is the basic structure of the code is near identical regardless of the actual language its implemented in.

 

Yes, for procedural languages.

There are non-procedural languages like

Prolog

SQL

perhaps LISP

 

Last Edited: Thu. Apr 9, 2015 - 07:18 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hehe

 

Imagine those old patched altered and modified COBOL programs maintained for the last 40 years that nobody really knows what they do any more... translated to LISP

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

translated to APL!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

C is basically Assembly, sans carry flag but with structure. It's the only thing keeping me sane on the day job. I *can* and do write PIC assembly if I have to, but I'd far rather let the compiler do it for me.

 

Neil

 

p.s. I currently have a C program occupying most of an 8k chip, a file management system. It is possible/probable that I may have to squeeze that into a 4k chip - so that'll be machine code. Meh.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

barnacle wrote:

C is basically Assembly, sans carry flag but with structure. It's the only thing keeping me sane on the day job. I *can* and do write PIC assembly if I have to, but I'd far rather let the compiler do it for me.

 

Neil

 

p.s. I currently have a C program occupying most of an 8k chip, a file management system. It is possible/probable that I may have to squeeze that into a 4k chip - so that'll be machine code. Meh.

Recode to shrink by 50% in going from C to ASM - unlikely. And very expensive in labor. that much NRE make sense if you're building $M units.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a tidbit of empirical evidence that you can use to goad the boss into believing that cmos atmel chips can take a lickin and keep on tickin. The L3 crash hardened recorder that is used in most flight and data recorders was probably in the plane that dug a hole in the mountain. They make those in Clearwater Florida. I've been on the tour of the facility. They are designed to survive a full speed crash into a mountain, and a 12 hour diesel fuel fire, and unfortunately, I think they demonstrated that they meet that spec. They use atmel dataflash chips. inside a steel bowling ball with the only thing peeking out is a ribbon cable. The flight recorder writes harvard biphase to the crash memory. We made the flight recorder boards... similar to pc104 form factor but the recorder is a stack of avr boards with dual port rams that communicate over a backplane bus. I wrote the harvard biphase part on a mega128. I betcha those boogers would work down in the hole.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DesiSmileys.com

Ross McKenzie, Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

barnacle wrote:
p.s. I currently have a C program occupying most of an 8k chip, a file management system. It is possible/probable that I may have to squeeze that into a 4k chip - so that'll be machine code. Meh.
A former co-worker squeezed a 256 byte bootloader via assembly language onto an 8-bit MPU.

An AVR equivalent is the PJRC HalfKay USB bootloader.

Worthwhile and rewarding efforts.

May you have victory!

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Conversely, when each unit has a price of millions USD (most anything attached to a rocket motor) and a similar cost (pre-launch, launch, operations, risk abatement).

These do appear to be moving away from 8-bit MCUs to 16-bit MCUs or a few 32-bit MPUs.

An example is Intersil moved the CDP1802 8-bit MPU to a secondary position with the 80C86 as primary.

Another example is the CubeSat MCUs are now 16-bit (IIRC two or three architectures); CubeSat plus launch is about 200kUSD.

With the larger address space comes matching storage (external RAM, non-volatile) so very likely a HLL for the computer language.

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you have a working system i C, and you wrote it your self (not just copied ), my guess is that it will take less time to write it in ASM, than it took to make the first version.

My advice is to make a very good plan, of register use, very important is the use of XYZ, how to place shared variables (those that has to be volatile), 16 bit atomic can work without disabling ISR etc etc

And if size really matter, it's important to find where speed matter and get that fast, so the rest can run like and simple interpretor of some kind. (an interpretor can be written in something  like 10 instructions).

 

 

 

Last Edited: Sun. Apr 12, 2015 - 07:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And if size really matter,

I keep getting emails saying it does cheeky

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, I once wrote a bootloader that used one byte. Well, I say one byte, a couple of bits were empty. Nice to have room for future expansion.

 

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A whole byte? Luxury!

 

(with apologies to Monty Python's Four Yorkshiremen)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who wants sense when "because It can be done" is cool.

KolibriOS

http://kolibrios.org/en/

...

... a few megabyte disk space and 8MB of RAM to run.

...

Have you ever dreamed of a system that boots in less than 10 seconds from power-on to working GUI, on $100 PC?

...

This speed is achieved since the core parts of KolibriOS (kernel and drivers) are written entirely in FASM assembly language!

...

On-Disk.com

KolibriOS, The Fastest Desktop Operating System on Earth!

http://on-disk.com/product_info.php/cPath/488/products_id/1625

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AdaCore

Home / Company / Press / SPARK Going to the Moon

Liverpool (UK) – UK Space Conference, New York, and Paris, July 14, 2015

http://www.adacore.com/press/spark-going-to-the-moon

Vermont Technical College writing flight software for Lunar IceCube, will use GNAT Pro and SPARK

...

Lunar IceCube is a 6-Unit CubeSat mission to prospect for water and other lunar volatiles in all forms (solid, liquid, and vapor) ...

"Dare to be naïve." - Buckminster Fuller