All Projects → pannous → English Script

pannous / English Script

🖊 English as a programming language

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to English Script

Mcscript
A programming language for Minecraft Vanilla
Stars: ✭ 124 (-8.82%)
Mutual labels:  compiler
Jphp
JPHP - an implementation of PHP on Java VM
Stars: ✭ 1,665 (+1124.26%)
Mutual labels:  compiler
Lesscpy
Python LESS compiler
Stars: ✭ 133 (-2.21%)
Mutual labels:  compiler
Asterius
A Haskell to WebAssembly compiler
Stars: ✭ 1,799 (+1222.79%)
Mutual labels:  compiler
Pl0 Compiler
Compiler written for PL0 programming Language. Written in C, for COP3402 class from UCF.
Stars: ✭ 128 (-5.88%)
Mutual labels:  compiler
Tinyscript
自制的一个编译器, 用于学习,完整实现了词法分析,语法分析,中间代码(SSA)生成,机器码生成,和基于寄存器的虚拟机
Stars: ✭ 132 (-2.94%)
Mutual labels:  compiler
Reading
A list of computer-science readings I recommend
Stars: ✭ 1,919 (+1311.03%)
Mutual labels:  compiler
Nim
Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
Stars: ✭ 12,270 (+8922.06%)
Mutual labels:  compiler
Ocaml Protoc
A Protobuf Compiler for OCaml
Stars: ✭ 129 (-5.15%)
Mutual labels:  compiler
Hivemind
a multi-syntax language
Stars: ✭ 133 (-2.21%)
Mutual labels:  compiler
Phplrt
PHP Language Recognition Tool
Stars: ✭ 127 (-6.62%)
Mutual labels:  compiler
Md
A markdown parser and compiler. Built for speed.
Stars: ✭ 128 (-5.88%)
Mutual labels:  compiler
Naskah
Bahasa pemrograman dengan sintaks Bahasa Indonesia (Programming language with Indonesian syntax) 🇮🇩
Stars: ✭ 132 (-2.94%)
Mutual labels:  compiler
Cperl
A perl5 with classes, types, compilable, company friendly, security
Stars: ✭ 125 (-8.09%)
Mutual labels:  compiler
Koto
A simple, expressive, embeddable programming language, made with Rust
Stars: ✭ 134 (-1.47%)
Mutual labels:  compiler
Ghc Grin
GRIN backend for GHC
Stars: ✭ 123 (-9.56%)
Mutual labels:  compiler
Instapack
All-in-one TypeScript and Sass compiler for web applications! 📦 🚀
Stars: ✭ 131 (-3.68%)
Mutual labels:  compiler
Prance
Resolving Swagger/OpenAPI 2.0 and 3.0 Parser
Stars: ✭ 133 (-2.21%)
Mutual labels:  compiler
Tendra
The TenDRA Project
Stars: ✭ 134 (-1.47%)
Mutual labels:  compiler
Solang
First fully featured programming language for Stack Overflow Driven Development
Stars: ✭ 133 (-2.21%)
Mutual labels:  compiler

ENGLISH SCRIPT

This is English as a programming language. The main purpose of this language is to make programming accessible to many more people, more fun and to facilitate programming computers via voice.

The guiding philosophy is to have forgiving interfaces yet strict implementations, and to make sigil special chars ([email protected]#$%^&*[}...) completely optional.

UPDATE: There now is a python implementation of English Script called angle, compiling to bytecode.
Soon: Compilation to WebAssembly … and Ruby 2.3 gets bytecode as well!

📓 Examples

Here are some of our favorite examples from the tests, working today:

assert two minus 1½ equals 0.5

beep three times (There will be a generation of programmers who will shake their heads that there ever was a programming language which did not interpret that sentence correctly.)

assert square of [1,2 and 3] equals 1,4,9

assert 3rd word in 'hi my friend' is 'friend'

x is 2; if all 0,2,4 are smaller 5 then increase x; assert x equals 3

beep every three seconds

last item in 'hi','you' is equal to 'you'

While Peter is online on Skype
	make a beep
	sleep for 10 seconds
Done
To check if person is online on Skype:
	Skype.checkStatus(person)
	if result is "online": return yes 
	else return no
End

🖥 INSTALL

git clone --recursive [email protected]:pannous/english-script.git

cd english-script

./install.sh

🐁 EXPERIMENT

Warning: The project is still in alpha, don't expect all tests to pass!

experiment by typing

./bin/angle "6 plus six"

./bin/angle samples/factorial.e or

Start the shell : ./bin/angle or rake shell

⦠ 6 plus six

⦠ beep three times

⦠ x is 2; if all 0,2,4 are smaller 5 then increase x

Check out the samples and tests!

Test

Run the tests : rake test

Run an angle file: rake run[examples/test.e]

⏳ In progress

add one to every odd number in 1,2,3 == 2,2,4

The implicit list filter 'that' applies a selection criterion to all elements. delete all files in my home folder that end with 'bak' translates to ruby: folder(:home).files.select{|that|that.end_with?("bak")}.map{|file| file.delete}

Implicit lambda variable 'it' for all mails by peter: mark it as read if its subject contains 'SPAM' translates to ruby: mails(by: Peter).each{|it| it.mark(:read) if it.subject.match('SPAM')}

The last example also illustrates what we call matching by type name.

To delete an email
  move that email to the trash folder
End

Here 'mail' acts as argument name and argument type at once. No more Java style Mail mail=new Mail().getMail();

📑 Language Specification

Angle is a multi-paradigm programming language with gradual typing.

Read the DOSSIER for a more complete language specification, vision and some background.

The grammar is not meant to be linguistically complete, but functionality complete and easily extendable. It is currently running in the

Having a self-hosted "bootstrapped" compiler is an important mid-term goal.

"Premature optimization is the root of all evil." Many programming languages 'optimize' on the syntax level in order to optimize the resulting applications. Maybe this is a mistake.

To check out the current capabilities of English Script have a look at the tests, keywords and grammar

📰UPDATE: Since we love to compile our language to native or at least bytecode, we focussed on the python implementation of English script. Fortunately finally Ruby now supports bytecode as well, since version 2.3.0!

👷 Todos

  • Use the abstract syntax tree to compile instead of interpret (export via XML and Lisp s-expressions)
  • Better (real) function argument matching: Integrate the sine curve in the interval 1 to 10 with step size .1
  • Implement event system: Beep three times whenever the disc space is over 80%
  • Hook into more existing libraries (java,ifttt,rubyosa?,...)
  • IntelliJ plugin
  • Promote

This language might soon be used in our successful beloved Jeannie assistant, which has over 5 million downloads so far: http://www.voice-actions.com

For a background story/vision/philosophy/future of this project read the DOSSIER 👾🏺

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].