News for hackers. Stuff that matters.
Re:Dogescript by dpcan on Sunday November 03, 2013 @07:56PM (#6666013)
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 :)

Re:Dogescript by dbpatterson on Sunday November 03, 2013 @08:16PM (#6666092)
Probably 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).
Re:Dogescript by curiousdannii on Monday November 04, 2013 @06:02AM (#6667933)
This 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 http://inform7.com/ http://glimmr.wordpress.com/
Re:Dogescript by nightpool on Sunday November 03, 2013 @08:12PM (#6666071)
https://en.wikipedia.org/wiki/Natural_language_programming Plenty of things already work like this. For example, check out Inform 7 http://inform7.com/ or the Robot C natural language module http://www.robotc.net/NaturalLanguage/. Or, more generally, LOGO https://en.wikipedia.org/wiki/Logo_%28programming_language%2...
Re:Dogescript by icelancer on Sunday November 03, 2013 @10:50PM (#6666702)
LOGO 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.
Re:Dogescript by dragonwriter on Sunday November 03, 2013 @11:59PM (#6666925)
Many, 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.

Re:Dogescript by meowface on Monday November 04, 2013 @12:16AM (#6666976)
What about COBOL?
Re:Dogescript by dragonwriter on Monday November 04, 2013 @09:28AM (#6668671)
I 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.

Re:Dogescript by joshribakoff on Sunday November 03, 2013 @08:45PM (#6666231)
Read some Steven Pinker to learn why this is currently impossible. Example - http://en.wikipedia.org/wiki/Time_flies_like_an_arrow#Analys...
Re:Dogescript by draegtun on Monday November 04, 2013 @08:26AM (#6668323)
You 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

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://www.robertmuench.ch/development/projects/excel/dialec...
Re:Dogescript by chrismonsanto on Sunday November 03, 2013 @08:11PM (#6666067)
Seems similar to Processing (http://processing.org/)
Re:Dogescript by neckro23 on Sunday November 03, 2013 @08:27PM (#6666143)
Lingo, 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.
Re:Dogescript by thrillgore on Wednesday November 13, 2013 @04:04PM (#6728500)
Anyone here old enough to remember COBOL? It pretty much was rather plain english for a turing-complete language.

Not as elegant as Dogescript obviously

Re:Dogescript by voltagex_ on Monday November 04, 2013 @12:24AM (#6667005)
Logo? Or the python turtle module.
Re:Dogescript by AsymetricCom on Monday November 04, 2013 @03:17AM (#6667514)
Great, 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.