Author Topic: Too many programming languages?  (Read 49225 times)

0 Members and 2 Guests are viewing this topic.

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8178
  • Country: fi
Re: Too many programming languages?
« Reply #150 on: October 01, 2019, 09:13:03 am »
C++ is still very problematic in libraries. (Although I do see why some see it appealing in application code.)

I just went through all the issues reported by people wanting to use my small piece of C++ code, and issues seen by myself in setting up a development environment for a project using two C++ libraries (SFML and TGUI, particularly).

For a C library, it typically goes: include headers and link against a pre-compiled library object file (or copy a shared object file somewhere where it's found by the loader).

But C++ still has no standardized nor stable exception handling, name mangling rules, std::string ABI, etc., and I'm sure the list goes on. It does not only depend on the system, but also on the actual compiler version and which flags were used during compilation. And it's not about two or three options; the combinations are countless.

For SFML, for example, just downloading it pre-compiled is quite iffy: https://www.sfml-dev.org/download/sfml/2.5.1/
As they say, "The compiler versions have to match 100%!" and "It's recommended to use the SFML version from your package manager (if recent enough) or build from source to prevent incompatibilities." Yes, they give precompiled versions, but I can confirm their warnings about the problems are very real.


So it was a 20-hour job for me to be able to get everything "play together" for a combined linux + windows cross-compilation environment. Earlier, it either worked out by luck (some people reported success on installing SFML and compiling our code, some reported they just can't do it with their skills and documentation in existence), or then you need to compile all libraries from scratch ensuring ABI compatibility. I did the latter, but this basically prevents "novices" (however good at understanding programming and writing code) getting into the project; I just need to provide binaries. Which is, of course, what most people want anyway, but if you think about open source community, then the only people who will jump in are some C++ "experts"  who don't mind all the colossal hassle to be able to use C++.

I have never seen such colossal pain in any project using C libraries. The difference is about two orders of magnitude.
« Last Edit: October 01, 2019, 09:16:24 am by Siwastaja »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Too many programming languages?
« Reply #151 on: October 01, 2019, 06:37:59 pm »
There are myriads of ways of using OO as well... and various languages allowing to use the OO paradigm, including, actually, C!
The typical C++ way is certainly not the only one.

Beyond what you mentioned with interfacing libraries, one very common problem with how specific "features" are implemented as classes is the whole logic chosen by the developers, and all the dependencies. A given class may depend on a forrest of other classes that may make the whole thing a complete mess to maintain. Inheritance is also very easy to misuse. You may design your whole architecture around a pile of classes that may need to be broken entirely if at some point you realize it's become way too rigid to be extended in any useful way.

One thing to note, and that Wirth understood a long time ago, is that a very useful construct for distributing software features is the module. C++ (nor C, nor many or even most of the other popular languages) still doesn't have anything for modules. D introduced that, but D is still nothing much more than a curiousity as the moment; I wouldn't even call it a niche language, it's more than niche. If I'm not mistaken, I think modules have been discussed for a future C++ standard. Maybe it'll happen. Someday. In C++100? (2100? ;D )

Libraries in C++ (and in C of course) are just a joke. There's no such thing as a library actually. They are just piles of definitions and functions/methods stacked together. Modules are definitely a needed addition IMO to better standardize and structure all this.

I agree it's still usually easier to deal with C, but C also lacks modules. Handling libraries still just looks like messing around, not like serious work. ::)
 

Offline Berni

  • Super Contributor
  • ***
  • Posts: 4957
  • Country: si
Re: Too many programming languages?
« Reply #152 on: October 02, 2019, 05:27:42 am »
Well on linux the package managers sort of got the role of getting you the C libraries needed to compile something. It either works first go or something goes wrong and you are in for hours of dependency solving 'fun' before finally giving up on it.

One of the languages that has this down nicely is Python. Just go "pip install foo" and it will grab the correct version of foo for your version of python and OS and install any other dependencies that it needs automatically. Then just put an "import foo" at the top and that's it. But on the other hand Python is awful how dependent it is on its installation environment where a collection of installed modules might work for one program but not for another because its old and need this very specific version of "foo 1.3.44" to work. So they just tacked on virtual environments that basically just fudge the paths to point to a different separate installation of python where you install your special library needed for that one program.

C# has its NuGet thing that's basically an automated GitHub downloader under the hood, it worked the few times i used it, no idea how well it works long term.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Too many programming languages?
« Reply #153 on: October 02, 2019, 12:22:54 pm »
Prolog? anyone?
in case, which Prolog compiler/interpreter?
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Too many programming languages?
« Reply #154 on: October 02, 2019, 01:27:55 pm »
Prolog? anyone?
in case, which Prolog compiler/interpreter?

Nope, sorry. I think the last time I heard about Prolog was in the early nineties... (and after that, just in occasional articles about programming languages.)  ;D
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Too many programming languages?
« Reply #155 on: October 02, 2019, 03:19:17 pm »
Turbo Prolog? Yup, it was copyrighted by Borland in 1992-1994.  I have a copy running under a 486 guest card installed in a RiscPC/600 and handled by RiscOS v4.39. I had to install Microsoft DOS v5.0(1) for that, v6.22 has problems with the Gemini BIOS about CON/IO (console IO, BIOS's stuff).

... a lot of troubles, but now it works, and it works better this way than how you can get running in a DoxBox sandbox under Linux, this due to the stupid CON/IO library required for supporting the Borland's IDE.

This sucks, and under DosBox it sucks even more because you are not able to move between menu items  :palm: :palm: :palm:

Anyway, according to what AADL guys say, it seems someone in the QA department does program in Prolog, therefore there must be modern versions of Prolog (but I don't know ... which one?), because even the tool "Stood" is written in Prolog & C++ and largely used in avionics for supporting for HOOD and HRT-HOOD methodology.

Code: [Select]
dev-lang/gnuprologjava
      Homepage:      http://www.gnu.org/software/gnuprologjava
      Description:   GNU Prolog for Java is an implementation of ISO Prolog as a Java library
      License:       LGPL-3+

dev-lang/gprolog
      Homepage:      http://www.gprolog.org/
      Description:   A native Prolog compiler with constraint solving over finite domains (FD)
      License:       GPL-2 LGPL-3

dev-lang/interprolog
      Homepage:      http://www.declarativa.com/interprolog/
      Description:   InterProlog is a Java front-end and enhancement for Prolog
      License:       LGPL-2

dev-lang/qu-prolog
      Homepage:      http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html
      Description:   Extended Prolog supporting quantifiers, object-variables and substitutions
      License:       Apache-2.0 GPL-2+

dev-lang/swi-prolog
      Homepage:      http://www.swi-prolog.org/
      Description:   versatile implementation of the Prolog programming language
      License:       BSD-2

dev-lang/tuprolog
      Homepage:      http://tuprolog.unibo.it/
      Description:   tuProlog is a light-weight Prolog for Internet applications and infrastructures
      License:       LGPL-3

I am going to try each of them  :D


p.s.
for Windows, there is a personal edition (free):
Code: [Select]
Visual Prolog Personal Edition
Version 5.2 Release Candidate 2



(1) cannot find a copy of PC-DOS by IBM
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Too many programming languages?
« Reply #156 on: October 02, 2019, 03:53:16 pm »
Turbo Prolog? Yup, it was copyrighted by Borland in 1992-1994.

Ahah, yep. We had it at uni, and I remember I fiddled with it for a while. I also remember the ads for it back then in computer magazines. That was funny.
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Too many programming languages?
« Reply #157 on: October 02, 2019, 06:57:47 pm »
There is also https://sourceforge.net/projects/yap/

The Yap Prolog System is a ISO-compatible high-performance Prolog compiler. Yap is widely considered one of the fastest available Prolog systems. Yap supports coroutining, CLP(QR), CHR, and depth-bound search. Tabling and parallelism are in development.

Last updated 2 years ago.
 

Online Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1673
  • Country: us
Re: Too many programming languages?
« Reply #158 on: October 02, 2019, 07:57:02 pm »
The Yap Prolog System is a ISO-compatible high-performance Prolog compiler. Yap is widely considered one of the fastest available Prolog systems. Yap supports coroutining, CLP(QR), CHR, and depth-bound search. Tabling and parallelism are in development.

Yet another ancient language on life-support... Fine if you want to relive the 1980s, but no one in their right mind would use this for production work.
Complexity is the number-one enemy of high-quality code.
 

Online Siwastaja

  • Super Contributor
  • ***
  • Posts: 8178
  • Country: fi
Re: Too many programming languages?
« Reply #159 on: October 02, 2019, 08:44:11 pm »
It's called a "hobby". Nothing wrong with that.
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Too many programming languages?
« Reply #160 on: October 02, 2019, 08:46:03 pm »
The Yap Prolog System is a ISO-compatible high-performance Prolog compiler. Yap is widely considered one of the fastest available Prolog systems. Yap supports coroutining, CLP(QR), CHR, and depth-bound search. Tabling and parallelism are in development.

Yet another ancient language on life-support... Fine if you want to relive the 1980s, but no one in their right mind would use this for production work.

Yeah it's a bit modern, I usually only use programming languages from the early 70's myself.

Forth-love? if honk then

One of my favorite languages goes all the way back to the year 1500 but it's still the most widespread language in use today  :)
 

Online Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1673
  • Country: us
Re: Too many programming languages?
« Reply #161 on: October 02, 2019, 08:53:37 pm »
Complexity is the number-one enemy of high-quality code.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Too many programming languages?
« Reply #162 on: October 02, 2019, 08:58:29 pm »
Ahah!

Although, I'm not sure Java fans really have ground to make fun of Ruby users... :P
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Too many programming languages?
« Reply #163 on: October 02, 2019, 09:53:01 pm »
Yeah it's a bit modern

The modern AI has recently splitted into two branches. The first uses Lisp, the second uses TensorFlow.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Too many programming languages?
« Reply #164 on: October 02, 2019, 11:02:11 pm »
Yeah it's a bit modern

The modern AI has recently splitted into two branches. The first uses Lisp, the second uses TensorFlow.

Really?

Time to be afraid, if so. ;D
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Too many programming languages?
« Reply #165 on: October 03, 2019, 12:46:01 am »
Really?
Time to be afraid, if so. ;D

Yup. I sold a couple of X11-terminals and other "weird" equipment to a couple of dudes who work for Google Switzerland, and they told me a bit about the TensorFlow project, released in 2017 as *stable*. Now they also have TensorFlow hardware, made by Google itself. It's an ASIC chip full of matrix accelerators.

You cannot do any serious AI without it and without very large and super-fast storage. Hence, since Google is not interested in AI per se, but rather at classifying objects for their products and services, Skynet is no even near to our future.

We don't have to worry. At least, not for now.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Too many programming languages?
« Reply #166 on: October 03, 2019, 12:51:17 am »
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Too many programming languages?
« Reply #167 on: October 03, 2019, 12:56:30 am »
Code: [Select]
2019-09-29--12-37-59---2019-09-29--12-38-43 - [ dev-lang/lua ] - success - root@dev2.30/8.3.1
2019-09-29--12-40-56---2019-09-29--13-03-20 - [ dev-lang/ruby ] - success - root@dev2.30/8.3.1

These two have been emerged on Linux/HPPA and on Linux/PowerPC!
I have never played with ruby, but I have a couple of applications (not written by me) that I'd like to try.

Just to try, not to study. I am already full of new stuff until the end of 2021, with Erlang and Prolog  ;D
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Too many programming languages?
« Reply #168 on: October 03, 2019, 02:16:00 am »
Code: [Select]
Just to try, not to study. I am already full of new stuff until the end of 2021, with Erlang and Prolog  ;D
[/quote]

I'm in awe, it would take me 2 decades to learn Erlang and Prolog  :wtf:
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19516
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Too many programming languages?
« Reply #169 on: October 03, 2019, 06:05:49 am »
Just to try, not to study. I am already full of new stuff until the end of 2021, with Erlang and Prolog  ;D

Prolog is worth knowing for the concepts. You might use the concepts, but you are unlikely to use Prolog itself. If you try to use it, choose an application where the "closed world assumption" isn't a problem.

Erlang is also worth knowing for the concepts (Actors+Prolog :) ), and it is commercially important. You might well come across some of them in other environments.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Too many programming languages?
« Reply #170 on: October 03, 2019, 08:45:36 am »
Besides being worth knowing for the concepts:

  • Prolog: "Stood" is written in C++ and Prolog, and it's used in avionics and military avionics for Hood and C-hood metodology are also written in Prolog. And, besides avionics, even in automotive FOM (formula one managment), e.g. RedBull uses Prolog-baded software to tune their race strategy
  • Erlang: is used by Facebook and Google

These three examples are my direct experiences, even if indirectly observed on the field  :-//

I am a simple mere C and Ada95 programmer ... even if I am going to spend two or three months around the Arctic pole, during winter when it's cold for the most, to get a "free" course about Erlang on a practical environment.

They call it "learn by doing", and it's supposed to be a "cool" experience (just, I wonder, does "cool" mean "cold"? ... oh well)
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19516
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Too many programming languages?
« Reply #171 on: October 03, 2019, 09:17:11 am »
Besides being worth knowing for the concepts:

  • Prolog: "Stood" is written in C++ and Prolog, and it's used in avionics and military avionics for Hood and C-hood metodology are also written in Prolog. And, besides avionics, even in automotive FOM (formula one managment), e.g. RedBull uses Prolog-baded software to tune their race strategy
  • Erlang: is used by Facebook and Google

... Prolog: interesting. My direct experience of Prolog ended three decades ago, and I only observed (interesting) academic demonstrations of principle. It is fun to see it being used in anger.
... Erlang: unsurprisingly telecoms is a major user. ISTR hearing about Amazon/IMDB using it, but I'm not sure.

I'd always wanted a reason to use Erlang, but never came across one that was sufficiently compelling.

Quote
These three examples are my direct experiences, even if indirectly observed on the field  :-//

I am a simple mere C and Ada95 programmer ... even if I am going to spend two or three months around the Arctic pole, during winter when it's cold for the most, to get a "free" course about Erlang on a practical environment.

They call it "learn by doing", and it's supposed to be a "cool" experience (just, I wonder, does "cool" mean "cold"? ... oh well)

I hope the connectivity is sufficient to allow you to download tutorials etc.

Have fun; the people I've known that have worked in the Antartic have beards and a slightly different view of the world :)
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Too many programming languages?
« Reply #172 on: October 03, 2019, 03:49:40 pm »
You cannot do any serious AI without it and without very large and super-fast storage. Hence, since Google is not interested in AI per se, but rather at classifying objects for their products and services, Skynet is no even near to our future.

We don't have to worry. At least, not for now.

Oh, I think we do. ;D

But are you saying you can't do any serious AI work without Tensorflow, or did I misinterpret it? Because if so, ahem... I think you're going a bit overboard.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Too many programming languages?
« Reply #173 on: October 03, 2019, 03:53:25 pm »
... Prolog: interesting. My direct experience of Prolog ended three decades ago, and I only observed (interesting) academic demonstrations of principle. It is fun to see it being used in anger.
... Erlang: unsurprisingly telecoms is a major user. ISTR hearing about Amazon/IMDB using it, but I'm not sure.

Agree and similar experience (although for Prolog, a little less than 30 decades ago, I guess I'm probably just a little younger.)

Both have interesting concepts and are worth "studying", but I would never use either for any industrial project (unless of course it was a hard requirement). It's not like it's likely to ever happen for Prolog anyway, as to Erlang, it could, but since telecoms are not my area, it's extremely unlikely as well.
 

Offline techman-001

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Re: Too many programming languages?
« Reply #174 on: October 04, 2019, 04:04:25 am »
Besides being worth knowing for the concepts:

  • Prolog: "Stood" is written in C++ and Prolog, and it's used in avionics and military avionics for Hood and C-hood metodology are also written in Prolog. And, besides avionics, even in automotive FOM (formula one managment), e.g. RedBull uses Prolog-baded software to tune their race strategy
  • Erlang: is used by Facebook and Google

These three examples are my direct experiences, even if indirectly observed on the field  :-//

I am a simple mere C and Ada95 programmer ... even if I am going to spend two or three months around the Arctic pole, during winter when it's cold for the most, to get a "free" course about Erlang on a practical environment.

They call it "learn by doing", and it's supposed to be a "cool" experience (just, I wonder, does "cool" mean "cold"? ... oh well)

Here is a Prolog link you may find interesting, apologies if you have seen it already.

https://en.wikipedia.org/wiki/Fifth_generation_computer

" ... Prof. Ehud Shapiro invented Concurrent Prolog, a novel concurrent programming language that integrated logic programming and concurrent programming. Concurrent Prolog is a logic programming language designed for concurrent programming and parallel execution. It is a process oriented language, which embodies dataflow synchronization and guarded-command indeterminacy as its basic control mechanisms. Shapiro described the language in a Report marked as ICOT Technical Report 003,[3] which presented a Concurrent Prolog interpreter written in Prolog. Shapiro's work on Concurrent Prolog inspired a change in the direction of the FGCS from focusing on parallel implementation of Prolog to the focus on concurrent logic programming as the software foundation for the project. It also inspired the concurrent logic programming language Guarded Horn Clauses (GHC) by Ueda, which was the basis of KL1, the programming language that was finally designed and implemented by the FGCS project as its core programming language.
Implementation

So ingrained was the belief that parallel computing was the future of all performance gains that the Fifth-Generation project generated a great deal of apprehension in the computer field. After having seen the Japanese take over the consumer electronics field during the 1970s and apparently doing the same in the automotive world during the 1980s, the Japanese in the 1980s had a reputation for invincibility. Soon parallel projects were set up in the US as the Strategic Computing Initiative and the Microelectronics and Computer Technology Corporation (MCC), in the UK as Alvey, and in Europe as the European Strategic Program on Research in Information Technology (ESPRIT), as well as the European Computer‐Industry Research Centre (ECRC) in Munich, a collaboration between ICL in Britain, Bull in France, and Siemens in Germany.

Five running Parallel Inference Machines (PIM) were eventually produced: PIM/m, PIM/p, PIM/i, PIM/k, PIM/c. The project also produced applications to run on these systems, such as the parallel database management system Kappa, the legal reasoning system HELIC-II, and the automated theorem prover MGTP, as well as applications to bioinformatics. ... "
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf