4 ms·
> How is this related? That is sort of my point, if you think of a PL as a language, visual programming is not related. You are drawing a line somewhere betwee
by danybittel 2y ago
> How is this related?
That is sort of my point, if you think of a PL as a language, visual programming is not related. You are drawing a line somewhere between PL and visual programming. If you think of a PL as a specification, it is the same thing just presented differently.
- jraph 2y agoYou can see the vocabulary and the rules of a language as a specification (for the set of productions of the language) if you wish. A language is a specification (although the reverse might not be true). Visual programming certainly deals with a (visual) programming language, which is still a language. A language doesn't need to be textual. It only needs grammar rules and vocabulary. For instance, taking the example from [1]: - the "set" block and the "for" block are elements ("words") of the vocabulary of "Snap!" - 'an identifier i needs to appear in a "set" block before appearing in a "for" block' is a grammar rule of "Snap!" (I would guess) - 'a "set" block can appear in the body of a "for" block' is also a grammar rule of "Snap!" You can even build a 1:1 mapping between VL and TL, where VL is the visual language and TL is an equivalent textual language, so the notions are essentially the same. For me, where the notion of language can be criticized is that for natural languages, the grammar rules and the vocabulary set are ever changing and not always well defined. The rules + vocabulary thing is a model at best. [1] https://en.wikipedia.org/wiki/Visual_programming_language https://en.wikipedia.org/wiki/Visual_programming_language
- danybittel 2y agoInteresting! You seem take "language" really far / different. How about something like editing an image in Photoshop? There's a vocabulary (the commands) they get applied to the image. There are also rules (constraints). One could argue using photoshop is communicating with a computer, what to do with an image. So while I say language is a misnomer for PL, you say it's a misnomer for natural languages. ;-)
- jraph 2y agoI guess you could argue for it. Command resize can only be applied after something is selected, and not deselected in the meantime. You might be able to describe the Picture Manipulation Commands language using a finite automaton, and if not, using a grammar. My views on this are highly shaped by my university lessons on formal languages [1], which I also taught a bit teeny bit. You would have text in mind, but the mathematical concepts are actually more generic than this. One of the exercises was modeling a PIN electronic door lock with a finite state machine (how to unlock without unlocking too early?). These formalisms look like computer science stuff but are actually directly taken from Chomsky's work [2], a (bio)linguist who was/is actually concerned with human languages (which another commenter implicitly mentioned [3]) I guess this stuff is probably valuable to study natural languages, given the correct scope, since it was made for it (xD). It sure is useful in computer science in any case. One direct result of his work is the (in)famous stack overflow "You can't parse HTML with a regex" post [4] (since regexes can only define regular languages, and HTML is not a regular language - although I believe the answer is a bit wrong, you can find a regex to parse the regular subset asked in the question, though you need to watch for cdata sections (in XHTML) and script and style tags (in HTML), at which point maybe just use a proper HTML parser unless you are dealing with well known content with no such exceptions) [1] https://en.wikipedia.org/wiki/Formal_language https://en.wikipedia.org/wiki/Formal_language [2] https://en.wikipedia.org/wiki/Linguistics_of_Noam_Chomsky https://en.wikipedia.org/wiki/Linguistics_of_Noam_Chomsky [3] https://news.ycombinator.com/item?id=40480913#40483454 https://news.ycombinator.com/item?id=40480913#40483454 [4] https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags https://stackoverflow.com/questions/1732348/regex-match-open...