• Stars
    star
    164
  • Rank 230,032 (Top 5 %)
  • Language
    Ruby
  • Created over 10 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🖊 English as a programming language

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 (!@#$%^&*[}...) 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 👾🏺

More Repositories

1

tensorflow-speech-recognition

🎙Speech recognition using the tensorflow deep learning framework, sequence-to-sequence neural networks
Python
2,166
star
2

tensorflow-ocr

🖺 OCR using tensorflow with attention
Python
647
star
3

caffe-speech-recognition

Speech Recognition with the Caffe deep learning framework, migrating to
Jupyter Notebook
325
star
4

caffe-ocr

OCR with caffe deep learning framework -> Migrated to tensorflow
Shell
215
star
5

angle

⦠ Angle: new speakable syntax for python 💡
Python
129
star
6

wasp

🐝 Wasp : Wasm programming language
C++
112
star
7

tensorpeers

p2p peer-to-peer training of tensorflow models
Python
64
star
8

xipher

🔒 Simple perfect xor encryption cipher 🔒
C
62
star
9

jini-plugin

Copilot X like features for Jetbrains IDEs using ChatGpt and GPT-4
Java
38
star
10

hieros

Egyptian hieroglyps and Eurasian languages
HTML
23
star
11

Diffie-Hellman

Standalone Java reference implementation of Diffie Hellman
Java
21
star
12

jeannie-webclient

The famous Jeannie assistant now living inside of your browser, including emails, calls etc! #siri
JavaScript
21
star
13

Voice-Actions-API

Public API hook for Voice Actions Plus / Jeannie
Java
10
star
14

swadesh

Collection of swadesh lists in CSV table format with possible connections to Indo European
Roff
8
star
15

netbase

🌐 Netbase : Semantic Graph Database & Wikidata Server
C++
8
star
16

wasm

You are looking for webassembly
8
star
17

tensor-caffe

TensorFlow graph importer from caffe protobuf / prototxt
Protocol Buffer
7
star
18

karpathy_neuralnets_python

Python code accompanying Andrej Karpathy's [great] Hacker's guide to Neural Networks
Python
6
star
19

layer

tensorflow custom comfort wrapper
Python
6
star
20

Voice2Web

JavaScript
4
star
21

node-netbase

node.js module for netbase: a semantic Graph Database with wordnet, wikidata, freebase, csv, xml, ... importer
JavaScript
4
star
22

kast

Canonical AST, the only Abstract Syntax Tree you need, with importers+exporters to all languages
Python
4
star
23

shapenet

Deep Learning network learning geometric shapes
Python
3
star
24

english-script-samples

English script samples for the angle programming language
E
2
star
25

blueprints-netbase

blueprints driver for the netbase graph database
Java
2
star
26

speech-data

2
star
27

angle.js

javascript version of the angle programming language
JavaScript
2
star
28

concentration-camps

Close Korean concentration camps
1
star
29

angle.ts

Angle programming language - Typescript implementation and bindings
TypeScript
1
star
30

lyri

Lyri: a Siri-like assistant for your Terminal command line (Linux and Mac OS/X)
Swift
1
star
31

test-lld-wasm

Minimal example of how to merge/concat/link/combine two wasm files.
Shell
1
star
32

netbase-ruby

ruby adapter for netbase
Ruby
1
star