{"id":19489458,"url":"https://github.com/1j01/ooplie","last_synced_at":"2025-08-31T13:36:36.480Z","repository":{"id":67696430,"uuid":"48264291","full_name":"1j01/ooplie","owner":"1j01","description":"📜✍ Program in English","archived":false,"fork":false,"pushed_at":"2018-10-23T04:32:48.000Z","size":1033,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-07T00:02:15.207Z","etag":null,"topics":["code","coding","english","interpreter","natural-language","natural-language-processing","programming","programming-paradigm","programming-system"],"latest_commit_sha":null,"homepage":"https://1j01.github.io/ooplie/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1j01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-19T01:39:47.000Z","updated_at":"2022-10-03T13:32:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"7017c4b9-8473-4739-a7a1-60a0935586ed","html_url":"https://github.com/1j01/ooplie","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1j01/ooplie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1j01%2Fooplie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1j01%2Fooplie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1j01%2Fooplie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1j01%2Fooplie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1j01","download_url":"https://codeload.github.com/1j01/ooplie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1j01%2Fooplie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272988777,"owners_count":25026959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code","coding","english","interpreter","natural-language","natural-language-processing","programming","programming-paradigm","programming-system"],"created_at":"2024-11-10T21:08:38.617Z","updated_at":"2025-08-31T13:36:36.460Z","avatar_url":"https://github.com/1j01.png","language":"JavaScript","readme":"\n# [\u003cimg alt=\"Ooplie\" src=\"images/logo/ooplie-logotype.png\" height=\"200\"\u003e][console]\n\nOoplie is a programming system where you write in English.\nIt runs in [Node.js][] and in the browser.\n\nThere's [a nice little console][console] where you can try it out so far.\nIt has a Parts menu where you can see the available commands and expressions.\nEach command has multiple synonyms, often many.\nEverything is organized into libraries, including things like conditionals.\nTo access libraries for File System manipulation etc. you need to install the console as a desktop app.\nTo do so, [clone the repository][clone a repo], open a terminal/command prompt in `console/` and enter `npm install`.\nThen to run the app, enter `npm start`.\n\n\u003c!-- https://en.wikipedia.org/wiki/Controlled_natural_language --\u003e\n\nSo far Ooplie is completely [imperative][], and you can't do much with it.\nYou can output text, evaluate JS, and evaluate Ooplie code (from Ooplie code),\nwrite mathematical expressions with worded operators (\"2 to the power of 4\"), Unicode operators, or ASCII operators,\nwrite trivial conditionals which are useless because there are no variables yet,\nand read and write text files.\n\n## Inspiration\n\nAt the risk of citing an article where the author calls out a programming system citing the author's work as inspiration as terrible as inspiration,\nBrett Victor's [Learnable Programming][] expresses some great ideas about the future of programming.\n\nIf you're not excited by the prospect of programming in English,\nthen at least check out some of [Brett Victor's work][]\nor maybe [Toward a better programming][],\nand get excited about the future of programming in general.\n\nThere's a project called [EVE][] that looks interesting.\nI'll have to try [it](https://github.com/witheve/Eve) out and see what it's like.\n\nAlso, check out [Apparatus](http://aprt.us/)!\n\n\u003c!-- \nCould gather some quotes here and relate them to the project:\n\n#### Quotes\n\n\u003e I think the next big step in terms of removing incidental complexity in code will come from automatically managing time. The implications of which would be tremendous for our ability to cleanly express intent.\n\n([Toward a better programming][])\n\nOoplie will have an expressive and rather comprehensive time module.\n\n\n\u003e At its deepest, interface design means developing the fundamental primitives human beings think and create with... It is one of the hardest, most important and most fundamental problems humanity grapples with.\n\n\n\u003e \"In summary, I think Parsey McParseface is a very nice milestone on a larger trend. The thing that's really significant is how quickly the speed and accuracy of natural language processing technologies is advancing. I think there are lots of ideas that didn't work yesterday, that are suddenly becoming very viable.\"\n\u003e \"I think there are lots of ideas that didn't work yesterday, that are suddenly becoming very viable.\"\n\n\n\u003e To paraphrase Will Wright, your software doesn't just run on the computer -- it also runs in each of your users' heads. And to paraphrase Clay Shirky, social software also runs on the \"hivemind\" of the group as a whole. All together, that's an extraordinarily powerful hardware platform. Take advantage of it!\n\n\nhttp://blog.wolfram.com/2010/11/16/programming-with-natural-language-is-actually-going-to-work/\n\nhttps://multikulti.wordpress.com/2013/01/09/english-as-a-programming-language/\n\nhttps://repository.cmu.edu/cgi/viewcontent.cgi?article=1165\u0026context=hcii\n\nhttps://stackoverflow.com/questions/3067377/what-programming-language-is-the-most-english-like\n\nhttps://stackoverflow.com/questions/19262597/why-no-programming-in-english-what-is-the-difference-between-natural-languages?rq=1\n\n--\u003e\n\n## Motivation\n\nI want see what it would be like to program in English.\n\nI don't think this is the be-all and end-all of programming paradigms.\nUnless a future of realtime cross-translated collaborative structured document editing is realized, it's probably not going to be better than a more syntactical programming language for international collaboration on software projects.\nHigh expectations of lingual [disambiguation][] and common sense mean it ~~will~~ may never feel smart enough without machine learning and huge amounts of data.\nThat would make it harder to distribute programs, so [a compiler would][Programming with Natural Language Is Actually Going to Work] probably work better.\nAlthough then you miss certain possibilities afforded by a dynamic interpreter / runtime.\n\nBut anyways, I think Ooplie might be a good tool for learning and getting into programming,\nas an alternative to drag-and-drop-based systems,\nand for automating lots of things that might be too trivial to automate considering you'd have to write a program for it.\n\nIt also could be great option for programming if you're blind, as long as it's designed with that in mind.\n\nAlso, I think radical ideas like this need to be explored.\nBecause even if Ooplie fails as a whole / as a project,\nthere still might be ideas in there that,\nif people try programming in this new way,\nmight expand people's minds and end up being applied to other programming languages or systems.\nIt might raise expectations for clarity in code, expressitivity, richness of authoring environments, etc.\n(expressitivity is related to... well, both of those other things.\nit's really in the middle. perfect, I planned that.\u003csup\u003e[sarcasm needed]\u003c/sup\u003e)\n\n\n## Roadmap (somewhat muddled... by newer and older ideas colliding) - is this even a roadmap?\n\nThe first aim will be to get it usable as an imperative interpreter for simple shell scripts.\nScripts will be able to use a shebang comment like `#!/usr/bin/env ooplie`\n\nor... `sh`, `bash`, `ksh`, `zsh`, `fish`, `english`! It fits the pattern!\n\nOoplie will need some better [natural language processing][].  \nBut parsing handwritten English text files is unsustainable.\n\nI think Ooplie programs should be stored in a format that contains concrete and explicit information alongside the plain English.\nThe format can still be text-based, but it should be designed for IDEs\n(with an additional goal of being nicely diffable as text... and possibly editable as plain text to some degree).\n\nIt should understand a superset of what it accepts.\nIn authoring you should be able to use autocomplete and such and express ideas freely and easily,\nand then it should help you form those ideas into clearer, more concrete representations.\u003c!--, and more explicit functionality / algorithmic processes.--\u003e\nFor example, you might type \"x * 5-4\" and it could transform that into \"(x * 5) - 4\" (following order of operations) or \"x * (5 - 4)\" following whitespace, as two suggestions.\n\n\u003c!-- I realize it's an implicit problem with English that there are many ways to express the same thing,\nbut it's also a problem in normal programming languages.\nThere are callbacks, Promises, and async/await for doing async just in vanilla JavaScript, for instance.\nDo you use for loops, for..in loops, forEach, or perhaps a library like underscore? lodash? lowline? lodash/fp? lazy? ramda?\nAnd, maybe \"problem\" is too strong a word, or that's making it out to be simpler than it is,\nbecause having different ways to express things is also a good thing.\nIt can enable different ways of thinking! That's a big part of the reason for this project!\nI don't know, I'm rambling.\n--\u003e\n\n\u003c!--\nYou shouldn't have to deal with escaping the contents of string literals.\n(But would typing `\"` not start a string? It should, right? And in that case, should it not end it?\nYou might have to deal with escaping from (preventing/avoiding) escaping from (ending) the string. Oh but the string would be a node in the IDE, so you could just hit right arrow key to exit when at the end of the text, or some other key [combination] to exit from anywhere (maybe just End + right arrow) - so maybe you should just do that to end a string? i.e. maybe you should just know that a string already has an end once you start it, i.e. it's a complete node, so you don't need to type an end quote?)\n(Maybe it could be handled like the \"did you mean?\" stuff, like for \"a \"b\" c\", \"do you mean quotes within a string, or the end of a string and then b and then the start of the string?\" (presented in terms of the content))\n--\u003e\n\nOoplie should have a good module system.\nYou should be able to easily write wrappers for modules on [npm][] to give them lingual interfaces.\nFile system support and other things should be implemented this way.\nHow the interop should work is not entirely decided.\n\nAfter that, more complex control flow and mathematics can be added,\nand various modules can be developed.\n\nEventually I want to try hooking speech recognition up to Ooplie\nand playing around on a canvas with physics,\nmaybe try making a web app with this...\n\n#### Integrated Development Environment\n\nThere should be an IDE, because an interpreter is not good enough.\n\nIt would feature \"Did you mean?\" style error handling that can update your actual code (especially for disambiguation).\n\nIt should encourage you to write robust, explicit code.\nIt might give you fields to fill out in response to commands:\n\n\"Draw a circle.\"\n* Where? / Center point: [0, 0]\n* How big? / Radius:     [1]\n* What color? / Color:   [#000000]\n\n\u003c!-- Is there an equivalent of currying here? If you leave parameters blank? --\u003e\n\nIt might highlight paths of execution that aren't handled like failure cases and else clauses.\nOf course it's perfectly valid to do else-nothing,\nbut it *could* require or strongly encourage you to be explicit about it,\nbecause sometimes you really should throw/raise/return an error/exception\n(depending on the paradigm we go with),\nand you might just not think of it.\nIt could unhandled paths with questions, like \"What if this fails?\" or \"Else what?\",\nwith easy default answers like\n\"just continue [below?]\" / \"do nothing\" (no-op),\n\"this is an error\" / \"show a failure message\" / whatever,\nand \"let me know if this happens\" (ideally you could resume execution of the program after deciding what to do when the case pops up, optionally updating the program with some general handling of that scenario)\n\nErrors should be considered UI.\nErrors are already UI, just generally shitty, shoddy, untested UI.\nAside from having good, clear error messages:\n* There should be good patterns for propagating error/exception cases up to the user,\nwith good contextual information in the message\n(such as parameters passed to the things that might fail,\nor *maybe* separate messages at each `raise`/`throw` level).\n* Error messages should be able to contain references to objects/values for inspection,\nsimilar to `console.log`.\nThat would include strings,\nso you wouldn't have to either escape strings with `JSON.stringify()`\nwhich makes them hard to read, in order to make it unambiguous,\nor use quote characters around the string\nthat you think/hope are not going to be used in it (as often).\n\nIt could let you dig down into statements and expressions to see the underlying meaning and implementation, through your code, through libraries, and to the underlying JavaScript.\nSimilar features exist [in other IDEs][Peek Definition], but I can imagine it working more like a variant of [code folding][] where you fold layers of meaning and [abstraction][] rather than just blocks of code.\nPerhaps like [this][IP levels of detail]?\n(Except you wouldn't have to write that lower layer of code, `print the numbers 1 to 10` would just work :smile:)\n\nIt should also let you write code that isn't understood\nand subsequently define/explain it, implementing it in detail.\n\n\nIt could automatically search for modules related to phrases it doesn't understand.\nMaybe not *totally* automatically as it could be a privacy issue sending code to some server,\nbut maybe at the click of a button when it gives an \"I don't understand\" type error.\nThat would be good.\n(And if the search DB was mirrored locally that could eliminate the privacy issue,\nbut it might take up a decent chunk of space,\nso there could be three options for this, auto (not private), manual (not private), and local db (private).)\n\nIt should try to show you what's going on with the program as much as possible.\n\nIt could have dynamic underlines on timers like `Every N seconds` / `After N seconds`,\nand maybe underlines to any line of code being executed.\nThat would be optional, though, as it could obviously be distracting.\nAlso I'm not sure how it would work with asynchronous code being run multiple times.\n\n![Execution underlines](./images/execution-underlines.gif)\n\n([Execution underlines CSS animation on jsfiddle](https://jsfiddle.net/1j01/2f2ko6ke/))\n\nWhen you have multiple asynchronous code paths,\nthey may be run either in parallel or in series.\nThe IDE could show the flow of execution with lines in the margin, making it clearer what would happen.\n\n\u003c!-- Insert larger example of control flow indicators here? --\u003e\n\nFor example, here the intent is clear, but will the second action actually run after 10 seconds, or after 15?\n```\nAfter 5 seconds, say \"reached 5 seconds mark\"\nAfter 10 seconds, say \"reached 10 seconds mark\"\n```\n\nHere it's disambiguated:\n```\nAfter 5 seconds, say \"reached 5 seconds mark\"\nThen after 5 seconds, say \"reached 10 seconds mark\"\n```\n\nYou could also write:\n```\nAfter 5 seconds, say \"reached 5 seconds mark\"\nAfter 5 more seconds, say \"reached 10 seconds mark\"\n```\n\nDragging the line could change the control flow, updating the code to reflect the changes.\n\n![Control flow indication mockup](./images/control-flow-indication-mockup.png)\n\n\nThe IDE could support visual mathematical equation/expression editing, and resources like images could be dragged and dropped and used directly in expressions.\n\nIt could blur the line between entering commands and writing a program (if that's a good thing).\n(Like a notebook? I think I was thinking specifically about being able to extract commands entered into a console out and factor them into a program retroactively... but probably this would work like \"notebook IDEs\" - [Jupyter Notebook](https://jupyter.org/) for lots of languages including JS, [RunKit](https://runkit.com) for JS specifically)  \n(...but my experience with notebook systems has been that it parts awkward constraints on your program to try and structure it to get any benefit - not having published anything, so I haven't really made use of the markdown/prose blocks, but - it seems like it needs some [Light Table](http://lighttable.com/) magic or something)\n\nSyntax highlighting could work in other apps to some degree,\nbut the Ooplie file format would likely include lots of markup needed to identify/lock-down semantics.\nYou would probably want your editor to hide the markup, unless it's somehow kept terse like markdown.\nBut I don't know how much use that would be, if there's a tightly integrated development environment that you're meant to use.\n(If the format is designed to encode semantics, is that directly editable too? Otherwise, how would you produce that? Maybe you go thru cycles of editing and having the tool update your code, with did-you-mean style modifications from the command-line?)\n\nHowever, the entire IDE could be made reusable as a component,\nand could be included as a plugin in web-based code editors like [Atom][] and [Code][].\n\n## Develop Ooplie\n\n[Fork the repository on GitHub][fork a repo], and\nwith [Node.js][] installed run `npm install` in the project directory.\n\nRun `npm run dev` (and leave this running) to watch the source files and recompile when changes are made.\n(In the future this could also run the tests after each recompile.)\n\nRun `npm test` to run the tests.\nYou can also open [`test.html`](./test.html) (maybe with a [live-server][]) to test Ooplie in a browser,\nbut note that only a subset of the tests are run.\nThe File System module isn't tested in the browser, for instance.\n(In the future it could use a mock FS.)\n\nTo run a specific test or tests, do e.g.\n`npm test -- --grep \"multiple statements\"`\n\n#### Before committing (unless it's a WIP commit)\n\nIf you've been running tests in a browser,\nbe sure to run the full suite of tests with `npm test` at least once before committing.\n\nRun `npm run prepublish` to make sure `ooplie.js` is compiled.\nIt's included in the repository for [GitHub Pages][] usage.\n(In the future this should be an automated step of the release process,\nnot a manual step before every commit.)\n\n#### Project Structure\n\nThe Ooplie console app lives in [`console/`](./console/)\nand has a separate [`package.json`](./console/package.json).\nIt runs as a desktop app with [NW.js][].\n(Could use either [electron][] or [NW.js][] since it's not doing anything fancy.)\n\nCoffeeScript is included in 2 different ways:\n* `lib/coffeescript.js` is the CoffeeScript browser compiler, used in [`test.html`](./test.html).\n* `coffeescript` is a dev dependency, used for building and for testing with `npm test`.\n\nMocha and Chai are similarly included in 2 different ways:\n* via a CDN in [`test.html`](./test.html)\n* as dev dependencies for `npm test`\n\n\n[multi-paradigm]: https://en.wikipedia.org/wiki/Programming_paradigm \"Programming paradigm - Wikipedia\"\n[imperative]: https://en.wikipedia.org/wiki/Imperative_programming \"Imperative programming - Wikipedia\"\n[abstraction]: https://en.wikipedia.org/wiki/Abstraction_(computer_science) \"Abstraction (computer science) - Wikipedia\"\n[code folding]: https://en.wikipedia.org/wiki/Code_folding \"Code folding - Wikipedia\"\n[IP levels of detail]: https://en.wikipedia.org/wiki/Intentional_programming#Levels_of_detail \"\\\"Levels of detail\\\" in Intentional programming - Wikipedia\"\n[natural language processing]: https://en.wikipedia.org/wiki/Natural_language_processing\n[disambiguation]: https://en.wikipedia.org/wiki/Word-sense_disambiguation \"Word-sense disambiguation - Wikipedia\"\n[Programming with Natural Language Is Actually Going to Work]: http://blog.wolfram.com/2010/11/16/programming-with-natural-language-is-actually-going-to-work/\n[console]: https://1j01.github.io/ooplie/console/\n[npm]: https://www.npmjs.com/\n[live-server]: https://www.npmjs.com/package/live-server\n[Node.js]: https://nodejs.org/\n[NW.js]: https://nwjs.io/\n[electron]: https://electronjs.org/\n[fork a repo]: https://help.github.com/articles/fork-a-repo/\n[clone a repo]: https://help.github.com/articles/cloning-a-repository/\n[Light Table]: http://lighttable.com/\n[Atom]: https://atom.io/\n[Code]: https://code.visualstudio.com/\n[Learnable Programming]: http://worrydream.com/LearnableProgramming/\n[Brett Victor's work]: http://worrydream.com/\n[Toward a better programming]: http://www.chris-granger.com/2014/03/27/toward-a-better-programming/\n[EVE]: http://witheve.com/\n[Peek Definition]: https://msdn.microsoft.com/en-us/library/dn160178.aspx\n[GitHub Pages]: https://pages.github.com/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1j01%2Fooplie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1j01%2Fooplie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1j01%2Fooplie/lists"}