A Programming Language Database
github.com
github.com
Access-Control-Allow-Origin: *
This means you can open it in web apps like my Datasette Lite application, so you can run SQL queries against it in your browser:https://lite.datasette.io/?csv=https://pldb.com/pldb.csv#/da...
Here's a more interesting query: https://lite.datasette.io/?csv=https://pldb.com/pldb.csv#/da...
Here's my quick query to see the number of things that are missing a year and also a count of the total things in each year: https://lite.datasette.io/?csv=https://pldb.com/pldb.csv#/da...
2 pieces of feedback (which I'm sure you're aware of):
1. super slow startup time (30seconds or so, but then things are instant).
2. autocomplete column names (and syntax highlighting) for the editor?
The editor has syntax highlighting in server-side Datasette - I've not got that working in Datasette Lite yet.
Column autocompletion would definitely be cool!
Oh wow! (the lengths people will go to to avoid learning Javascript ;) )
> Server-side Datasette starts a whole lot quicker than that, eg https://scotrail.datasette.io/scotrail/random_apology
Is there anyone I can pay to take care of setting that up for PLDB?
https://pldb.com/posts/does-every-programming-language-suppo...
is about line comments. C gets credit for the // comments, starting in 1972, but that's not really accurate. BCPL -- which begat B which begat C -- had // comments but they were not included in C until C99. C++ (which isn't included in their top 30 languages) brought back // comments from BCPL sometime between 1979 and 1985 (the first public release of cfront). Many C compilers included // comments as an extension prior to C99 but those were inspired by C++.
I've updated that post a bit with some of your info: https://github.com/breck7/pldb/commit/fb3a46baee0fe06218884e...
> A comment is introduced by a double bar and continues up to the end of that line; the whole of this text is ignored.
The double bar was written as `||`.
This information comes from the "CPL Working Papers", July 1966.
I was acquainted with one of the committee members and called him to ask if // comments would be included in the standard.
He told me there was no plan for this, but if it was something I felt strongly about, I would be welcome to visit the committee meeting and lobby for it.
I thought about doing this, but didn't bother since all the C compilers I was using already supported // comments.
I also wasn't sure how I would lobby for it.
In hindsight, it would have been a lot of fun to just show up wearing a "sandwich board" with a big // printed on front and back.
Memory is a funny thing. I don't remember the committee member's name or exactly when I called him, but I could tell you exactly where I was sitting and which direction I was facing when we talked. I also think it was before I got married, so that would put the call perhaps sometime in 1987.
Any old-timers here happen to know when that meeting was?
(For anyone wondering what we're talking about, Lua is written in a very portable subset of C including pre-C99, so no // comments.)
I got curious and downloaded the Lua 5.4.4 source and ran this:
$ cat * | grep -c ' */'
6386
(If there is a better or more correct way to do this, anyone feel free to correct me, as my grep-fu is muy pobre.)So this is 6386 * 3 = 19,158 characters wasted in this version of the Lua source.
And that's just one Lua version.
Let's assume there are ten million copies of various versions of the Lua source on developer machines and repos around the world. That would make this something on the order of 200 gigabytes. We'd better multiply that by 5 to account for backups and datacenter redundancy.
So my selfish and lazy decision to go to the beach instead of the committee meeting that day has cost the world a terabyte of storage, maybe much more.
And that's the least of it. I didn't account for the extra typing that /* comment */ takes, and how it's just not fun to type all that. So I have annoyed every developer who's had to do this for compatibility reasons. Including myself.
I humbly apologize, and hang my head in shame.
$ cat * | grep -c ' */'
6386
Doesn't that * in your regular expression mean "greedily match as many of the preceding SPACE character as possible including zero, followed by the /" ?So, what you've done is counted all the slashes in the code. Let's imagine that there are not many divide /, and there are not that many pathname /, so you're double counting the comments and should at least divide your 6386 in half
you want
$ cat * | grep -c ' \*/'
the backslash is protected by the single quotes, so it will get passed to grep where it will mean "literally *" rather than the regular expression operator * (now I'm thinking my \ is going to get swallowed up by HN so I'd better double them? ed: nope, didn't have to double, but I did have to backslash escape the asterisk after literally)It doesn't match exact description and I also have vague memory of something similar, but not able to find it right now. Drew's post does a reasonably snarky job though :)
I collected a bunch of the data in a spreadsheet in March 2014 before the website went down. It covered 51 programming languages and 15 statements about them such as:
* Easy to tell what code does
* Language is expressive
* Code is very readable
* Code written is elegant
* I enjoy using this language
* I choose to use this language
* I would like to write more
* I can be sure code is correct
* This is a high level language
* Code is easy to maintain
* Encourages reusable code
* It is easy to write efficient code
* Code tends to be efficient
* Code tends to be reliable
* This language is good for teaching children
Some programming languages that have semantic indentation allow to turn off that feature, such as Haskell. Other more complex considerations than only has or not has, also is relevant for other features of other programming languages, too.
Some programming languages are domain-specific and might only be used in specific programs because it is a narrow enough use, e.g. ZZT, MegaZeux, and Free Hero Mesh; do any of those count? (ZZT is rather limited, but the other two aren't so limited.)
Other features of programming languages to be considered:
- Character encodings
- GOSUB
- Byte arrays
- Generalized algebraic data types
- Sigils
There is also consideration of variants of programming languages.
> PostScript is both a general-purpose and domain-specific programming language. Can you make that consideration?
Ah you are right, the current categorization as a textMarkup isn't quite a great fit and the ontology in PLDB can be improved. I'm linking your comment to a related issue that I hope to address this week. https://github.com/breck7/pldb/issues/39
JSON to s-expr's should be convertable with simple search-and-replace, or you could just load the file with a json library with reader macros so it loads the data into the appropriate data structures, I'm fairly sure both common lisp and clojure let you read jsons directly like that.
"... today... 1,700 special programming languages used to 'communicate' in over 700 application areas." -- Computer Software Issues, an American Mathematical Association Prospectus, July 1965.
It says there are only 2 languages with first-class functions, not sure how much stock I would put into this data set.
The features section is a big part of my focus the next few weeks and hope to fill out that part of the dataset.
> JSON is the only popular language in the PLDB without comments.
Some redditers pointed out that (traditional) CSVs also don't have a mechanism for comments.
Some folks actually tried addressing that limitation (and some others) with JSON5: https://json5.org/
Though sadly it never really caught on outside of a few niche projects. At the same time, however, I've seen some projects out there also use JSONC or another non-standard version that adds comments, since clearly people want them: https://komkom.github.io/jsonc/
very cool
but I just cannot find the type for audio programming language
https://en.wikipedia.org/wiki/List_of_audio_programming_lang...
We could add one by simply adding one word to this line here: https://github.com/breck7/pldb/blob/59be1839df9888099537662e...
Or perhaps it might be better to add it via a group/tag/paradigm/industry or something like that (created an issue to track this: https://github.com/breck7/pldb/issues/39)
https://stackoverflow.com/questions/2497146/is-css-turing-co...
You can't have any programming language that is more powerful than that. So technically speaking (HTML + CSS) is a "proper programming language". Just a very awkward one where the user has to "operate the crank on the machine" to execute it.
> The formal definition (simplest) of Turing Machine is simply a tuple of states set, symbol set, initial state, accepting states set and a transition function. There is no crank in it. By computation we mean somebody needs to apply the transition function faithfully on the tape which is exactly like the clicking in this case. More formally, a model of computation can be viewed as a set of rules somebody needs to follow to do the computation. In that sense, I think CSS is Turing-Complete. – Shuhao Tan Jun 11, 2018 at 21:32
[Emphasis mine]
There is no restriction on the "device" executing a program.¹
Steam devices like in the case of power looms are for example just fine. As the human brain is in case of say abstractly but formally expressed algorithms (think Ada Lovelace).
Also programmable machines that were in fact run by spinning a crank by a human are considered some kind of archaic "computers" (think for example antique mechanical music devices which could "load" a peace form a kind of card or tape).
(HTML + CSS) can be used to formulate executable algorithms to compute anything computable. You can't be more of a programming language than that! Only that the executing device is a little bit awkward as you need in fact "spin a crank" manually.
___
¹ For example there was this nice Lego Turing machine:
https://www.youtube.com/watch?v=FTSAiF9AHN4
If I would replace the electrical motors by a hand crank would anything fundamentally change?
No, of course not! The machine would be still a universal computer. Only one that needs to be operated "semi-manually"—exactly like a "computer" build in (HTML + CSS).
As most human things, programming languages don’t have a specific definition, but as a point of reference we should probably have a look at whether that “thing” was ever intended to be used as that. Sure, there is a program that can encode loops into html tags, but it is generally used as a markup language for describing the DOM. Not for programming it.
I’m still not sure I would call it a programming language. But I wouldn’t say it’s not one.
I think your definition is closer to, if not identical to, what Wikipedia calls “Computer Language” (https://en.wikipedia.org/wiki/Computer_language)
For me, and I think for most, the more restricted https://en.wikipedia.org/wiki/Programming_language#Definitio... (“A programming language is a notation for writing programs, which are specifications of a computation or algorithm”) is closer to what makes a formal language a programming language.
A syntax without predefined runtime semantics is not a programming language!
Without the interpretation semantics no (or every, depending on standpoint) computation can be described by any syntax. The definition of runtime semantics for some syntax is what creates a programming language in the first place.
Pure syntax OTOH can be given arbitrary interpretations. So it's therefore not a programming language on its own. The runtime semantic of some code is what allows us to write and execute programs.
One can't write even the most trivial programs in JSON. No "Hello World" as JSON does not offer any I/O facility. No "fizzbuz" as there are no control structures or any loops in JSON. No "Fibonacci numbers" as there are no function abstractions in JSON…
JSON is just not a programming language.
(Still a valid candidate to include in computer language collection, of course, as JSON has its merits regardless the fact there is no canonical way do write in it anything that resembles computer programs).
[1] https://pldb.com/lists/languages.html?filter=pl
[2] https://pldb.com/lists/languages.html?filter=dataNotation
PLDB is a comprehensive database of programming languages and their features. The focus is on programming languages, but the database also includes other languages and entities one degree away--from popular high level plain text formats to binary specifications and beyond.
On the other hand, D has both "mixins" and "traits", but these are completely different features, and these "traits" have nothing to do with traits in Scala or PHP. So if somebody were to make a comprehensive list of features of D in this DB, should these "traits" appear on the same page as PHP and Scala traits (which are mixins)?
Furthermore, unlike PHP, Scala, Ruby or Julia — Python's "mixins" aren't just mixins with a different name. It's not even clear if it has mixins at all. There's something people call a "mixin" in Python, but these are just classes, so you cannot really say "yes". However, Python has multiple inheritance, which makes "mixins" borderline pointless: classes are (or can be used as) mixins, if you have multiple inheritance! Templates in some languages can be used this way as well.
Which brings us to the next issue — it's not clear, if a language should be marked as having a feature if it comes built-in, explicitly, or if a feature can be implemented in it. Does every language have a semaphore? I cannot remember any where it couldn't be implemented (that would be weird), but I cannot remember any where it's an explicit feature construct either (well, arguably, maybe some SQL-extensions?).
All this isn't to say that the current list is bad. All the questions above can be answered in any way, and it's up to a "researcher" which definition to use in order to actually get a useful taxonomy. It's a non-trivial job.
[1] - https://pldb.com/lists/features.html [2] - https://pldb.com/languages/traits-feature.html [3] - https://pldb.com/languages/mixin-feature.html [4] - https://pldb.com/languages/semaphores-feature.html
Top programming languages since 2005:
- Go
- Swift
- Rust
- TypeScript
- Clojure
- Kotlin
- Julia
- PowerShell
- Elixir
- Dark
- F#
- CoffeeScript
- Crystal
- Nim
- Elm
- CUDA
- Reason
- Haxe
- Node.js (!)
- fish
- Zig
- Arduino
- Red
- Idris
- Vala