7 ms·
The Origins of the Linguistic Conception of Programming (2014) [pdf]
- anigbrowl 10y agoExtremely interesting. I really dislike writing code because you can't get any sense of the structure by looking at it - it's like reading a description of a painting in book form. It's fascinating tos ee the historical context that led to that becoming a dominant paradigm.
- nikofeyn 10y agoagreed. i primarily program in labview, which despite its cons, is the most general purpose visual programming language out there, in my opinion. i do text-based programming as well, but sometimes i feel it's like trying to drive through a tunnel by first taking apart the car and sending the parts through one at a time.
- _mhr_ 10y agoHow would you prefer to see computers programmed, besides code?
- MikeTheGreat 10y ago(I, personally, am just fine with textual code. I'd be open to new stuff but for now I like typing my code in) There's a bunch of 'block based' programming languages that some educators are using to teach programming. Searching for 'Blockly' turned up https://developers.google.com/blockly/ https://developers.google.com/blockly/, but they're definitely not the only game in town. Way back when Charles Simonyi created this thing he called "Intentional Programming" (https://en.wikipedia.org/wiki/Intentional_programming https://en.wikipedia.org/wiki/Intentional_programming). As near as I can tell the big idea is that instead of encoding the program in textual source code you'd instead store the program in a parse tree/etc (I'm not super-familiar with compiler details - it's some sort of tree that represents the program, semantically). Your IDE would then enable you to interact with it however you wanted (as text, as blocks, etc, etc). So yeah - text is king, but there's a lot of other really interesting options out there, too
- ketralnis 10y agoThere have been a few attempts at visual programming languages. None that have really panned out to the mainstream but I don't think that's a failure of the idea entirely. Some things like complex spreadsheets or MS Access applications have clear analogies to programming but are more visual in nature. And there are things like Mac's Automater that have a lot of theoretical potential. Some things like bash pipelines could be really amenable to a more visual style as well
- nerdponx 10y agoWriting code as text is fine. But I'd love to see the idea of a "call graph" become a first-class citizen as a programming tool. What's the point of building modular abstractions if you still need to glue them together with text?
- _mhr_ 10y agoCan you elaborate on what you mean by that? What would it mean to be able to manipulate the call graph? In which situations would that be useful?
- nerdponx 10y agoBasically, a compiler that translates UML (e.g. in GraphViz DOT format [0], or Mermaid format [1]) to actual code. If I have a bunch of libraries that more or less do what I want and all my program has to do is glue them together (this is common in scripting scenarios), then I could just draw it up in a GUI like Gephi and cross-compile it to a script, instead of writing the script by hand. Complete separation of data flow from the implementation of that flow. I imagine you could do this pretty easily in a language like Haskell (since everything is a function call) or Lisp (where everything is "data") so you don't have to implement special logic to figure out how particular nodes should behave. You could also do this for "explicit" DAG engines like Make, Airflow, and Luigi. [0]: http://www.graphviz.org/content/dot-language http://www.graphviz.org/content/dot-language [1]: https://knsv.github.io/mermaid/ https://knsv.github.io/mermaid/ EDIT: this ([2]) turned up in my Googling. I suppose there's a good reason nobody uses it? [2]: https://en.wikipedia.org/wiki/Executable_UML https://en.wikipedia.org/wiki/Executable_UML
- flor1s 10y agoMany UML modeling tools like Visual Paradigm allow you to generate code based on your models. One big problem in this approach is that it is hard to make changes beyond that. Some people want to customize the generated code, but that means that if you want to make changes to the diagram you somehow have to merge back the changes which were manually made. If you are interested in this you should check out a company called Mendix, which is building a SaaS platform for building applications using graphical tools, and the Eclipse Modelling Framework, which is a huge project aiming to add modelling and code generation capabilities to Eclipse (in my experience it is slightly academic, in the sense that you often encounter bugs or cryptic errors in practical use).
- anigbrowl 10y agoPersonally I like diagrammatic programming, most often seen for signal processing workflows in VFX or audio synthesis. My favorite platform from a design pov is a robotics IDE now called Flowstone. It's based around ruby iirc; in an earlier version you could also write modules in C or assembler. http://www.dsprobotics.com/flowstone.html http://www.dsprobotics.com/flowstone.html There are upsides an downsides to this paradigm of course; one downside is that it's not obvious how to read control flows at first. On the upside, having all your functions available in modular form makes if far easier to explore and program using high-level concepts. What I hate about conventional programming is all the typing and having to remember all the function parameters, calling conventions etc., I want the computer to do that for me. Writing code in an IDE is about as enticing as making my own Lego bricks from scratch.
- _mhr_ 10y agoI agree with you, but to play devil's advocate: isn't the purpose of an IDE to keep you from having to remember parameters and stuff like that? Autocomplete?
- mcbits 10y agoIDEs turn textual languages into quasi graphical languages. E.g. a porthole showing a symbol's references across the project, where you can seamlessly edit the code in some distant file somewhere. Or when a bulky Java object is collapsed down to look like a lambda. Autocomplete, too, is getting graphical with icons and tabs. Unfortunately they're still constrained by the language itself being designed around text. A lot more could be done with a language+IDE developed in tandem, with the IDE's needs always taking precedence in decisions.
- posterboy 10y agoModularity and dynamic typing are not unique to the visual editors like you describe (my limited experience was with labview).
- joe_the_user 10y agoYeah, I would agree that diagrammatic programming is a process that inherently seems like it would solve the opaqueness of programming. But I'd say this paradigm is just as much inherently limited and not useful for "serious" work. This is because the multitude of "parts" that a computer program has exist in too large a space to be visually represented and because the details don't really follow our intuits for two or three dimensional objects.
- true_religion 10y agoTo me, code like many forms of literature, often concerns utterly abstract concepts. What's the structure of the hopelessness and anguish expressed in Moby Dick? What can you look at that would be a reasonable expression of the twists and turns of Dune? Paintings can express abstract concepts as well, but I think they're hard pressed to express multiple convoluted ones with cause-effect mechanics succinctly.
- _mhr_ 10y agoThe difference between code and literature is that, while both can be abstract, code must ultimately be executed unambiguously. Underneath all the abstraction is concrete meaning. This is unlike literature, which concerns ineffable concepts like hopelessness and anguish - qualia. We don't program fuzzy, human ideas. Otherwise, a computer wouldn't be able to do anything.
- naasking 10y ago> This is unlike literature, which concerns ineffable concepts like hopelessness and anguish - qualia. They may be ineffable to computers (at this time), but they are not ineffable to us. We can ascribe meaning to these words, and programming languages do the same thing. They provide a language with common meanings that both a compiler and humans can understand.
- posterboy 10y agoThe whole idea of deep learning is based on fuzzy conception; random stochastic evaluation plays a huge role for any huge or fast amount of data. btw, Qualia is a meaningless concept to me, not ineffable; concepts definitely are. On the other hand, some philosophical ideas might just be plain wrong and thus not possibly translate to code that had to be logical (unambiguously). Why wouldn't there be logic behind?
- pron 10y agoDeep learning (which is just a particular configuration of backpropagation in neural networks, which in turn is just a particular statistical learning algorithm) is an algorithm for statistical classification. Whether or not statistical classification is at the core -- or even plays a significant role -- in any kind of true conception is unknown.
- catnaroek 10y agoThings can hardly get any more structured than with a formal description using an equally formal language. Read the formal semantics of any programming language (that happens to have one, like Standard ML), and you'll see why. --- @pron: Most humans only reason very sloppily, if they reason at all. I don't see any good reason to cater to the lowest common denominator.
- pron 10y agoBut the intrinsic mathematical structure of the code by no means implies a mental structure compatible with the preferences of the human mind. I'm not saying there is no good mental structure, just it is not necessitated by the existence of the mathematical structure. The ML specification contains no reference to studies on human perception of code. I didn't say anything about the lowest common denominator or sloppy thinking, but there is no evidence that suggests that the human mind works equally well with any arbitrary mathematical structure. A mathematical structure caters neither to the lowest common denominator nor to the most disciplined thinkers, but is, as far as we know, arbitrary with respect to human cognition. If it caters to anyone in particular, it is by chance. My point is not that mathematical structure is bad -- far from it -- but there is no scientific basis to suggest a particular structure is particularly good. I read your comment as saying that a good mathematical structure implies a good mental structure, and I don't see what is the scientific justification for that claim.
- catnaroek 10y ago> The ML specification contains no reference to studies on human perception of code. Why would such a thing be necessary? Code isn't meant to be “perceived”, it's meant to be designed to meet a given specification.
- pron 10y agoIn order to be designed it must first be perceived and understood by the designer. Without considering the nature of the designer, how can you create a good interface between the designer and the program? As an extreme example, consider that life on earth displays all the desired qualities of programming -- abstraction, modularity and composition, maintainability, and it even supports complex ideas such as concurrency and meta-programming -- yet the language it is programmed in and evidently provides all these nice programming concepts looks nothing like ML. Why? Because it is optimized for a different kind of programmer. I think that if that programmer were forced to use ML, we wouldn't see any of those nice qualities or even a working system at all. This means that programming qualities are not attributes of the language but of the interaction between language and programmer.
- bcbrown 10y ago> it's like reading a description of a painting in book form. Interestingly, that's exactly how I would describe reading Proust's Remembrance of Things Past. It's very hard to read at first, until you can get into the rhythm of the thing. For example, here's one sentence: And so it was that, for a long time afterwards, when I lay awake at night and revived old memories of Combray, I saw no more of it than this sort of luminous panel, sharply defined against a vague and shadowy background, like the panels which the glow of a Bengal light or a searchlight beam will cut out and illuminate in a building the other parts of which remain plunged in darkness: broad enough at its base, the little parlour, the dining-room, the opening of the dark path from which M. Swann, the unwitting author of my sufferings, would emerge, the hall through which I would journey to the first step of that staircase, so painful to climb, which constituted, all by itself, the slender cone of this irregular pyramid and, at the summit, my bedroom, with the little passage through whose glazed door Mamma would enter; in a word, seen always at the same evening hour, isolated from all its possible surroundings, detached and solitary against the dark background, the bare minimum of scenery necessary (like the decor one sees prescribed on the title-page of an old play, for its performance in the provinces) to the drama of my undressing; as though all Combray had consisted of but two floors joined by a slender staircase, and as though there had been no time there but seven o'clock at night.
- joe_the_user 10y agoThis looks like a marvelous inquiry with a lot of "big picture" implications. "All of these approaches, however, take the linguistic nature of computer programming for granted. Indeed, it is surprising how rarely language appears in the list of relevant programming metaphors, despite periodic attempts to envisage program code as a form of literary expression. It is as if we have become so accustomed to think of programming languages as languages that we forget that this analogy has its own history." And let's not forget that the idea of "a language" also has it's history, with Chomsky shaping the concepts of linguistics using various mathematical tools during the period that the idea of "a computer language" arose. A given computer language can more easily be located on the Chomsky hierarchy than a human-spoken-language, just for example.
- pron 10y agoIn 1947, Alan Turing said the following in a lecture to the London Mathematical Society[1] > I expect that digital computing machines will eventually stimulate a considerable interest in symbolic logic and mathematical philosophy. The language in which one communicates with these machines, i.e. the language of instruction tables, forms a sort of symbolic logic. The machine interprets whatever it is told in a quite definite manner without any sense of humour or sense of proportion. Unless in communicating with it one says exactly what one means, trouble is bound to result. Actually one could communicate with these machines in any language provided it was an exact language, i.e. in principle one should be able to communicate in any symbolic logic, provided that the machine were given instruction tables which would enable it to interpret that logical system. This would mean that there will be much more practical scope for logical systems than there has been in the past. Some attempts will probably be made to get the machine to do actual manipulations of mathematical formulae. To do so will require the development of a special logical system for the purpose. This system should resemble normal mathematical procedure closely, but at the same time should be as unambiguous as possible. As regards mathematical philosophy, since the machines will be doing more and more mathematics themselves, the centre of gravity of the human interest will be driven further and further into philosophical questions of what can in principle be done etc. He added (not related to the topic of language per se, but still amusing): > It will be seen that the possibilities as to what one may do are immense. One of our difficulties will be the maintainence of an appropriate discipline, so that we do not lose track of what we are doing. We shall need a number of efficient librarian types to keep us in order. [1]: http://www.vordenker.de/downloads/turing-vorlesung.pdf http://www.vordenker.de/downloads/turing-vorlesung.pdf