4 ms·
I like it. And I always wondered why a programming language couldn't exist to work as follows: Start Run at 60 frames per second and do Clear the s
by dpcan 13y ago
I like it. And I always wondered why a programming language couldn't exist to work as follows:
Start
Run at 60 frames per second and do
Clear the screen
Draw a rectangle at (10,10) with size (100,50) and rotate it 20 degrees
Repeat
End
Or something along those lines - hopefully you get my point.
This would be fun for prototyping. I could just speak to my computer and have it translate my plain english into a working program :)
- chrismonsanto 13y agoSeems similar to Processing (http://processing.org/ http://processing.org/)
- nightpool 13y agohttps://en.wikipedia.org/wiki/Natural_language_programming https://en.wikipedia.org/wiki/Natural_language_programming Plenty of things already work like this. For example, check out Inform 7 http://inform7.com/ http://inform7.com/ or the Robot C natural language module http://www.robotc.net/NaturalLanguage/ http://www.robotc.net/NaturalLanguage/. Or, more generally, LOGO https://en.wikipedia.org/wiki/Logo_%28programming_language%29 https://en.wikipedia.org/wiki/Logo_%28programming_language%2...
- icelancer 13y agoLOGO was exactly what I thought of when I saw his post. 'pen up' and 'pen down' and so forth jive very well with "natural" language.
- dbpatterson 13y agoProbably because programming languages require a precision that natural languages do not have, so you end up having english words that only mean a certain form of their meaning, and completely broken grammar (and/or near impossible to implement). At which point, you are just confusing people by saying "it is like english" (or X natural language).
- neckro23 13y agoLingo, the scripting language for Macromedia Director, looked almost exactly like that. It was a real pain in the ass as soon as you tried to do anything more advanced than, say, drawing rectangles.
- joshribakoff 13y agoRead some Steven Pinker to learn why this is currently impossible. Example - http://en.wikipedia.org/wiki/Time_flies_like_an_arrow#Analysis_of_the_basic_ambiguities http://en.wikipedia.org/wiki/Time_flies_like_an_arrow#Analys...
- dragonwriter 13y agoMany, many programming languages have been designed to be English-like. Unless they are specific to a very narrow domain, they generally don't end up doing that very well, and even the best don't help very much, because you still need to use them more precisely than you'd use a natural language. The closest thing to an english-like language that is successful is probably SQL.
- meowface 13y agoWhat about COBOL?
- dragonwriter 13y agoI meant successful at being English like in use, rather than successful as a language for interacting with computers: I think COBOL is less succesful than SQL at the former, mostly for the reasons that its harder to do when you have a less-specific domain. Of course, it is subjective, and there is plenty of room for disagreement.
- voltagex_ 13y agoLogo? Or the python turtle module.
- AsymetricCom 13y agoGreat, then all you will need is a human to translate your other contexts you're not sharing with the computer via your voice to an actual programming language.
- curiousdannii 13y agoThis is some actual code from one of my projects (though written by another contributor): To transition to monster card gallery: animate the gallery-transition as a reel animation targeting the transition-container at 8 fps; wait for main menu input until all animations are complete; pause for 1000 milliseconds, accepting input; now the image-ID of the transition-container is the image-ID of the card-container. The language is Inform 7, and it's using the Glimmr library. https://github.com/i7/kerkerkruip https://github.com/i7/kerkerkruip http://inform7.com/ http://inform7.com/ http://glimmr.wordpress.com/ http://glimmr.wordpress.com/
- draegtun 13y agoYou can see these in dialects or domain specific languages (DSL). For eg. a cron scheduler Rebol dialect: at 18:30 do %batch.r at 10-Sep-2009/02:00 do %batch.r every minute do %job.r every month on #15 not [sat sun] do %job.r ref: http://softinnov.org/rebol/scheduler.shtml http://softinnov.org/rebol/scheduler.shtml And here's an example of an Excel Rebol dialect: Excel compose [ start show open file (test-file) ;alerts on alerts off ;remove worksheet ;close workbook ;goto workbook 1 ;go to worksheet #2 ;quit add a new worksheet ;goto cell "B3" ;select rows "1:3" select "B4" set value to x goto cell "B6" change to "Testing" select "B7" set to "=B4 * B5" select "A5:A9" change to "=$B$5 * PI()" set cell 10 2 to 222.22 set 11 2 to 333.33 set cells "C2:C6" to 123 set "D3:E4" "Yeah!" change "A1" "=B10" copy "A1:A9" to "B21" cut "B21:B29" to "A18" select "A5:A9" copy goto cell "C15" paste goto cell "D15" paste values goto cell "E15" paste no borders go to worksheet "Sheet4" autofilter "A5" on open file (test-file-2) copy workbook "pbtest.xls" "A1:C5" to workbook "test-b.xls" "B2" goto workbook "test-b.xls" goto cell "F1" cur-cell: current column repeat i 3 [ repeat j 4 [ goto cell j (cur-cell + i - 1) set to (i * j) ] ] ] ref: http://lambda-the-ultimate.org/node/1240 http://lambda-the-ultimate.org/node/1240 | http://www.robertmuench.ch/development/projects/excel/dialect_documentation/ http://www.robertmuench.ch/development/projects/excel/dialec...
- thrillgore 13y agoAnyone here old enough to remember COBOL? It pretty much was rather plain english for a turing-complete language. Not as elegant as Dogescript obviously