Hacker News new | past | comments | ask | show | jobs | submit login
Plankalkül (wikipedia.org)
226 points by tevrede on March 8, 2023 | hide | past | favorite | 47 comments



Wow, this is fascinating.

> Plankalkül (German pronunciation: [ˈplaːnkalkyːl]) is a programming language designed for engineering purposes by Konrad Zuse between 1942 and 1945. It was the first high-level programming language to be designed for a computer.

Apparently it influenced ALGOL 58 as well. Implementations were made:

> Plankalkül was more comprehensively published [vague] in 1972. The first compiler was implemented by Joachim Hohmann in his 1975 dissertation. Other independent implementations followed in 1998 and 2000 at the Free University of Berlin.

Here is something about primitive data types:

> The only primitive data type in the Plankalkül is a single bit or boolean (German: Ja-Nein-Werte – yes-no value in Zuses terminology). It is denoted by the identifier S 0 {\displaystyle S0} {\displaystyle S0}. All the further data types are composite, and build up from primitive by means of "arrays" and "records".

Cool.

Also this reminded me - nothing happens in a vacuum:

> In 1945, Zuse described Plankalkül in an unpublished book. The collapse of Nazi Germany, however, prevented him from submitting his manuscript.

I don’t know what the significance of that statement is and I won’t baselessly speculate, but it sure makes me curious. It also reminds me of some messages I remember seeing from Russian founders in the recent past.


i somehow stumbled on a site covering zuse's concept of calculating space when i was a teenager, and i think the idea really struck me a lot harder than it seemed at the time.

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


An English translation of his paper:

http://www.mathrix.org/zenil/ZuseCalculatingSpace-GermanZeni...

Essentially thoughts about physics grounded in the digital based cellular automata.

Haven't finished reading it yet, so can't judge it one way or another.


> physics grounded in the digital based cellular automata.

The really curious thing to me is how Zuse, Von Neumann and Turing all went this direction at about the same time.



Isn’t this what Wolfram’s book is about too? https://en.wikipedia.org/wiki/A_New_Kind_of_Science


> I don’t know what the significance of that statement is and I won’t baselessly speculate, but it sure makes me curious.

Zuse wrote an autobiography, and it has been translated into English -- https://www.amazon.ca/Computer-My-Life-Konrad-Zuse/dp/354056...

Chapter 5 - Origins of the Z4 - News from the United States - Attempt at a Ph. D. dissertation - Computing machine for logic operations - Final months of the war in Berlin - The evacuation - Z4 completed in Göttingen - Final war days in the Allgäu

Early in the war, he got drafted into the army and got a release for his technical work. By the end of the war, he was working on the Z4 to assist calculations for war work at a lab in Berlin. In early 1945, his labs and work were heavily damaged by bombing, some of the machines destroyed. He packaged up what remained physically and shipped it by rail to a town to the southeast. He resumed work there for a few weeks. He then they fled, as many other groups did at this time, to the very south in German-controlled territory that would become part of the American sector. He does write a bit about that period:

> Dr. Funk obtained the necessary papers for me, my wife and all my assistants to get out of Berlin. Only a few chose to stay. It was painful for me to leave my parents behind in Berlin. They had supported me all those years. I was able to take the most important papers with me. But what was important? With hindsight I would have known better. On this occasion, too, much of value was lost.

> In Gottingen, a relative calm filled the weeks that followed. The Z4 was assembled in the Aerodynamischer Versuchanstalt. We were able to get it running so well that it executed the first program-controlled calculations. While we demonstrated for the gentlemen of the Aerodynamischer Versuchanstalt, including the famous Professors Prandtl and Kuessner -- we could aready hear the thunder of the cannons in Kassel. today we know that we could have been overrun in Gottingen, but at the time no one could have known what would happen. Gottingen could have become a theater of the war, for it was not far from the great underground ordinance factories in the Harz region. Later, Gottingen was occupied by the British. They definitely would have been very interested in the Z4. And we could have been sent to England along with our machine. But this was not to be.

> The Z4 was our first priority. Finally we got the "order" to deliver it to one of the underground ordinance factories. The visit there was for us - we were completely accustomed to the Berlin bombings - deeply shocking. For the first time we stood face to face with the inhuman atrocities of the Third Reich. Twenty thousand concentration camp prisoners worked under unimaginable conditions in kilometre-long tunnels. During the retreat from the East, far too many prisoners were assembled together here, and no provisions had been made to assure that there would be enough food for them. After the visit we told ourselves, "Anywhere, but not here!" We asked them for just one Wehrmacht truck and trailer with which to transport the device.

> Around the same time Wernher von Braun's team was moved from the Harz to Bavaria; and through General Dornberger we were able to get our marching orders for Bavaria, along with a thousand liters of diesel fuel. For fourteen days we fled along the front, past burning neighborhoods and over bombed-out streets. We usually drove at night; during the day we found makeshift shelter with the farmers. [...]

> The night drive through Munich was really eerie: the streets were deserted, the city veiled in darkness, air raids were expected. But nothing happened this night. There was a ghostly silence. We drove straight through and did not stop until we reached the Alps. For the first time in my life, I saw the high mountain region. How peaceful the cloister of Ettal seemed. But we had to push on. In Oberjoch bei Hindelang we finally found temporary quarters, which we shared with Wernher von Braun and his assistants.


I found this, https://github.com/peter-shoes/plankalkul, a Java implementation based on the 2000 modernization by Raul Rojas.

And another one, https://github.com/Hovestar/Plankalkul, based on a bachelors thesis, http://www.cs.ru.nl/bachelors-theses/2010/Bram_Bruines___021....

This one in Ruby by a GraalVM member has the best examples I think: https://github.com/timfel/plankalkul2ruby.


somewhat entertaining reading the section about him working on it for months (years?) on his own before entering the formal field and seeing that most of what he was working on had already been developed. Even more impressive that he managed to swallow his pride, draw parallels between his own thoughts on the matter and the research, and then develop novel research.


I don't know too much about Zuse but from what I do know he was far ahead of his time / environment.

From my understanding the way his ideas surrounding computer design developed was dependent on the limitations of German resources during the war. As such Zuse was focused on mechanical designs while others in the rest of the world focused more on electromechanical dominated designs.

The end result is that Zuse spent a lot of time going in different directions after the war, developing things that seemed to be curiosities at the time but may end up being critical in space exploration.

https://www.youtube.com/watch?v=odwgpKRnWM8

https://www.iaarc.org/publications/proceedings_of_the_27th_i...

http://zuse.zib.de/assemblyLineSelfReplicatingSystems


Related:

The “Plankalkül” of Konrad Zuse: The first high level programming language - https://news.ycombinator.com/item?id=26593656 - March 2021 (1 comment)

Plankalkül: The First High-Level Programming Language and Its Implementation - https://news.ycombinator.com/item?id=23364898 - May 2020 (1 comment)

Antedating “datatype” all the way to Plankalkül (2017) - https://news.ycombinator.com/item?id=18975279 - Jan 2019 (2 comments)

https://news.ycombinator.com/item?id=14406853 (May 2017)

Plankalkül - https://news.ycombinator.com/item?id=10909784 - Jan 2016 (14 comments)


Plankalkül (German pronunciation: [ˈplaːnkalkyːl]) is a programming language designed for engineering purposes by Konrad Zuse between 1942 and 1945. It was the first high-level programming language to be designed for a computer.


C is a pretty name for a language. C++ also. But Plankalkühl is awesome.


I saw Zuse's Z1 computer on the Museum of Technology of Berlin and I was astonished. Truly a work of art. He was the real world equivalent of WWII scientist characters that you find in comics.


He appeared also several times in TV in his late years and it was always a delight. He was more a painter as a scientist in his late years but always funny and very nice.


The first computer and high-level programming language were invented in Germany. What took place between this time and the present which made Germany much less of an innovative place computer/software-wise?


I'd question if that's true. Research wise both applied and theoretical Germany's still a really good place to be as far as Computer Science is concerned. We're just not and never have been a consumer driven economy and that's what people focus on these days.

An example of this to me is Dickmann's autonomous cars which were driving around on highways in the 80s (https://youtu.be/_HbVWm7wdmE), yet you'd hardly think they even existed given how the rate of progress is framed in that industry by consumer products.


I think we were busy recovering from a war that we had started for 10-20 years or so. :)

I guess by that time it was hard to catch up. Also, many of our scientists had left for the US during the war.


And "encouraged" to go to Soviet lands, too.



High-tech R&D tends to be driven by domestic military interests, which were obviously on a short leash after 1945.

Even if Germany's brightest were not brain-drained to USA/USSR, they would not have much funding nor opportunity to pursue their advanced research in occupied Germany.


I think basic demographics is a large part of it.

Population of Germany:

  - 1940: 70 million
  - 2020: 83 million (about 20% more)
Population of the USA:

  - 1940: 132 million
  - 2020: 331 million (about 140% more)
Population of the world:

  - 1940: 2300 million
  - 2020: 7795 million (about 240% more)
So, they may have stayed equally innovative per capita, but in 1940 about 1:33 of humans were German, while in 2020, that was 1:94.


Also maybe losing all scientists to America and half of the country to Russia for 30 years might have contributed here.

A cultural aspect may be that Americans are more willing to try and fail, which in software has almost zero cost. In engineering it's an advantage to be risk-averse. In software where "building" is automated, and barely a factor. Theory almost equals practice here. So it's cheaper to practice.


> Unable to continue building computers – which was also forbidden by the Allied Powers...

...this bit of information was actually news to me, but the brain drain that started in 1933 and then intensified after WW2 is probably an important part of the answer. Maybe it also contributed to a general mindset that the grass is greener across the ocean ;)

A lot of innovation still happened in Germany after the war - even in East Germany, but somehow the fruits were always picked elsewhere, for example: https://www.youtube.com/watch?v=1qccejmqbPg - or this 'German SpaceX': https://en.wikipedia.org/wiki/OTRAG)


To give them some credit, they did create SAP, which is currently the largest non-American software company. It's just that Enterprise Resource Planning software is 'not sexy' so your average person probably has not heard of them, or they have and don't know what they do.


Off the top of my head I can think of both Siemens and Telefunken who made computers going back to the 1950s. In the early 1970s, I took a grad course on the design of the ALGOL 68 compiler for the Telefunken TR440 system, taught by one of the compiler's designers at the Technical University of Munich.

I'd say that modern Germany has definitely produced significant contributions.


German society which values security over risk taking and adds a shame component to failure.


that's pretty much every society which doesn't have an immigration history like the US.


Cities laid to waste and the partition of the entire country into two, as well as prosecution and murder of much of its population, and a good chunk of the rest sent to die in the Army, in no particular order.


There is/was still some important innovation coming out of Germany from time to time. For example, the first LCD display and the first chip card were invented in Germany, and the MP3 format was developed in Germany. Not a whole lot overall though.


Optics for lithographic processes and other critical components for ASML's machines are developed and produced by Zeiss in Germany AFAIK (these things project beams into structures measured in terms of a couple Angstroms). Also world-market leader for high-grade SiO and other chemicals for wafers is German last I checked.


you can't be serious, germany is a very innovative country. Like who would label as innovate except the US? For example, it creates a LOT of patents, second behind only the US. It is a leading country for industrial research of various kinds, from the mechanical industry to material science. It is the foreign country with the biggest presence of industrial research for american companies, if you want to make the comparison (a fact I remember, so take it with a grain of salt). As a recent high-tech example one of the two mRNA vaccines for covid was created in germany from BioNTech, and one of the other leading mRNA company besides Moderna is also in germany. Granted, it's not performing well in the number of startups created and the software industry is not as strong, but other indicators are doing very well. Also, basic research in comparison to industrial is very competitive, a lot of papers get produced and cited every year. Germany invests a lot of the GDP back into R&D and is one of the leading countries by this metric.

Germanys economy is just not as consumer driven anymore, as many former industry giants crumbled from the competition form asia, so you don't really interact much with it. But if you look at the metrics instead of personal impressions they have their strengths. You don't really export so much by producing bad, non-innovative products.


So how does that language seem so much more advanced than the ones that came after it?


Because it says:

> Plankalkül was more comprehensively published [vague] in 1972. The first compiler was implemented by Joachim Hohmann in his 1975 dissertation. Other independent implementations followed in 1998 and 2000 at the Free University of Berlin.

So it was never implemented until mid-1970s, which likely made its design process less constrained than languages that came soon after it in 1950s etc.


Because it was more a theoretical exercise.

The later languages were much more constrained by actual implementations.

On the other hand the later implementors realized that some convenience is needed, for example even the earliest languages (like autocode) had variable names instead of variable numbers.


Part of it was that they weren't bound by the limitations of early computers. Those later languages were heavily stripped down because that was all that could fit on a machine made out of vacuum tubes and mercury delay lines.


Very nice to read! Interesting to see how long those ideas took to go from theory to application.

In the "Two-dimensional syntax" section, the first example variable type is "m × 2 × 1 · N" and is described as "list of m pairs of values of type S1 · N", but shouldn't it be "m × 2 × S1 · N" then? Is it a shorthand syntax or just a typo?


"Some features of the Plankalkül:[22]

... functions do not support recursion"

That's not a feature, that's a bug.


I think that's "feature" as in "property", not "feature" as in "good thing to put in an ad for this".

Edit: if it somehow supports passing functions (or function pointers) as parameters, the Y combinator can be used to add recursion even if it's not natively supported otherwise.


Since every recursive program can be implemented without recursion, this isn't really a limitation.

Recursion can actually be a pit fall if you parse user generated data and don't set recursion limits. If feasible I try to avoid recursion.


> Since every recursive program can be implemented without recursion…

Depends on the programming language, obviously. In Erlang, e.g., recursion is your looping construct, and everything is ultimately a loop.


What mechanism does it use to prevent recursion? To even raise the question seems to imply that it supports function calls, and it's easy for recursion to just kind of happen unless there's a specific implementation detail that prevents it. For example, maybe instead of a growable function stack, every function has dedicated stack space allocated up front, and recursive calls would scribble over the local variables of calls higher in the stack?


Not supporting a feature doesn't mean actively preventing you from attempting to use it. It might just have not given the expected result.

> To even raise the question seems to imply that it supports function calls

Yes, but it doesn't imply a stack or support for reentrance. If the language supports only global (pre-allocated) variables like early versions of FORTRAN and BASIC, then there's no allowance for recursion.


I know that at least LabVIEW (which is otherwise Turing complete) will throw a compiler error when you try to call a function anywhere within its own code. Actually, being a graphical language with hardly a difference between “function”, “module” and “user interface”, it’s a bit more involved, but it goes through some length to make sure it’s non-trivial without resorting to something like shell scripting to make a recursive call. It doesn’t really have any dynamic programming capabilities as far as I know so a static analysis is probably enough for the compiler.

Apparently recursion was deemed “too confusing”…

On the other hand, it sounds like Plankakül was more of an intellectual exercise than an implementation, so we don’t know how much extant implementations comply with that spec…


Come on, it is most likely simpler than that. There is no stack, all variables are allocated statically.


MISRA-ready!


MISRA-C likes this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: