Speakable Programming for Every Language (SPEL)
***********************************************
Note can access an html version of this manual at
<http://spel.sourceforge.net>.
For Table of Contents *Note TOC::.
For copying this document *Note Copyright::.
1 Introduction
**************
MMMMMMMMMO:,:KMMMM 9. spell out,
MMMMMMMWdcl;dckMMM a. to explain something explicitly, so that
MMMMMMWlcl::MMKWMM the meaning is unmistakable: Must I spell it
MMMMMWl:::o;KMMMMM out for you?
MMMMMdclc:lckMMMMM - Dictionary
MMMMk';,,;c:oMMMMM (http://dictionary.reference.com/browse/spell)
Kdlc. .,,;;MMMMM definition of spell.
. ...;:c:l
Nd;.. ...... .cN SPEL merges the exactness of programming, with the
SPEL's Wizard Hat. ease of use of human language. It is a language
that is to be usable, both when communicating to
computers, and when communicating with humans.
Eventually it may enter the language like Google
has. So when someone asks, you can SPEL it out for
them, explaining with enough precision to write a
program.
1.1 Mission
===========
One lang to rule them all, one lang to find them,
one lang to bring them all, and in the darknet bind them.
- J.R.R. Tolkien, conlanger, paraphrased.
For unified programming from assembly through domain specific to
local policy. A speakable programming language based on common elements
of human language. Sentence oriented, context sensitive, interpreted
and compilable.
Plan is to be able to do all things on computer, with a single
language, much like how humans can do all things with their native
language or English. Then to also be able to use that same language for
communicating with humans. SPEL being an intermediary language, capable
of being translated to any other human or computer language it has the
translation files for. Ruling all the languages with one single
language.
Being able to translate human languages into computer programs, can
allow for better search results, and learning from the text by
computers. This should allow for easier development of a Generally
Intelligent Operating System (GI-OS), since the "brain" would be able to
understand all it's components with a single language. Bringing it all
together.
Darknet is an anonymous peer-to-peer network, eventually SPEL will be
used for making the We You Net (WYN) darknet, for humans and generally
intelligent computers. One of the services provided by some darknets is
a DNS or Domain Name Service, which binds domain names, to websites.
SPEL will allow for names to be bound to concepts, making possible a
global brain working on many computers, which you can tap into with your
own WYN client or GI-OS, via the WYN Darknet.
1.2 Features
============
1.2.1 Implemented
-----------------
* Human Speakable Syntax, even punctuation is made into words.
* Turing Complete set of interpreted commands.
1.2.2 Soon
----------
* Compiles to intel assembly.
* Universal Assembly Language
1.3 Requirements
================
* POSIX compliant system, such as Linux, BSD, Minix or Cygwin.
* Processor supporting Intel 32-bit instruction set or above.
Including AMD and 64bit processors.
Eventually will support PPC and ARM, but that may be a while.
1.4 License
===========
SPEL is Open Source Software, released under the Affero GPL-3 license,
with classpath exception to allow using it as a compiler.
2 Download
**********
You can download the version for your system by using this link:
[Download] (https://sourceforge.net/projects/spel/files/latest/download)
2.1 Releases
============
Assuming you clicked on the download link above: by default you will
likely recieve a portable binary, with a .tar.gz extension. If you
didn't but would like to get it, download the latest one from
<https://sourceforge.net/projects/spel/files/epm/>. If you have an
intel based POSIX system then you can use it by following instructions
at *Note Portable Binary::.
If you are using a Debian based distro, and would like it integrated
with apt then please download the latest .deb file from
<https://sourceforge.net/projects/spel/files/deb/> and then follow
instruction at *Note Debian Binary::.
If you are on Windows you'll have to set up Cygwin first *Note
Windows::. If you are on non-intel processor, then you'll need to set
up qemu, which is out of the scope of this manual, unless you'd like to
contribute it.
2.2 Sources
===========
You can download the sources if you'd like to see them, or if you would
like to compile them.
There are the release tar balls.
And also the ongoing git archive, which may be more up to date, and
can be used for testing.
2.2.1 tar balls
---------------
Tar balls are found in SPEL's base file directory.
<https://sourceforge.net/projects/spel/files/spel/>.
To compile follow directions at *Note Compile::.
2.2.2 git
---------
Can get a development git release.
$ git clone git://git.code.sf.net/p/spel/code spel-code
To compile follow directions at *Note Compile::.
3 Installation
**************
3.1 POSIX, POSIX compatible Systems
===================================
POSIX is the Portable Operating System Interface, a group of standards,
made by the IEEE Institute of Electrical and Electronics Engineers.
POSIX compatible OS's include most Unix like OS's, such as Linux,
BSD, Minix, Solaris, BeOS, among many others. Although the main
development for SPEL is occuring on Linux, it should be compatible with
all POSIX systems.
If you have such a system you may either install *Note Binary::, or
*Note Compile::.
3.2 Windows
===========
Windows is not a POSIX standard system. To get it to work you have to
install a posix operating system emulator such as
<http://www.cygwin.com/Cygwin>. and follow the instructions for either
the "executable" *Note Portable Binary::, or for programmers *Note POSIX
Compilation::.
3.3 Binary
==========
We have several binaries included, for installing without the hassle of
compiling. They are compatible with any POSIX compatible operating
systems.
3.3.1 Portable Binary
---------------------
The EPM format, is the Easy Software Products (ESP) Package Manager. It
works on most *nix's though there aren't any that use it in particular.
If there aren't any other compatible binaries for you, then use this
one.
Here is an example of how to use it, after downloading
spel-version-all.tar.gz , in a command prompt:
$ mkdir spel
$ mv spel-*all.tar.gz spel
$ cd spel/
$ tar xvf spel*tar.gz
$ ./spel.install
It's that easy, now to use it you can go to *Note run::.
and to uninstall simply run the spel.remove which is in the spel/
directory.
$ cd spel/
$ ./spel.remove
3.3.2 Debian Binary
-------------------
This is for Debian like distro's such as Ubuntu, Mint etc. To install
after downloading the .deb
$ sudo dpkg -i spel*.deb
It's that easy, now to use it you can go to *Note run::.
To uninstall:
$ sudo apt-get remove spel
3.4 Compile
===========
This is if you are interested in compiling it for your system, for
instance if you would like to help develop it.
3.4.1 Compilation Requirements
------------------------------
Requirements in order to compile.
* POSIX (standard) utils, if you have Linux or BSD these are
standard.
* x86 instruction set (intel/amd processor or emulator such as qemu).
* bash (bourne-again shell)
* nasm assembler, to actually compile it, <http://www.nasm.us/>
* naturaldocs, only needed for api generation,
<http://www.naturaldocs.org/>
3.4.2 POSIX Compilation
-----------------------
This is for compiling on any POSIX compatible operating systems, such as
Linux, BSD, Minix, etc.
First off have to get the sources *Note Sources::.
$ tar xvf spel-*.tar.xz
$ cd spel
$ make
executable is bin/spel. run by
$ bin/spel
To install onto the system run
$ sudo make install
Then can run interpreter from command line with:
$ spel
To uninstall:
$ sudo make uninstall
try out some of the commands listed in the Demo Preview section of
this readme
4 Usage
*******
4.1 run
=======
Running the program. you type in a command, the computer as self
answers.
$ spel
4.2 demo preview
================
---------- Demo Preview ---------
to test basic helo and exit do hello bo say be do bye be do
for english like syntax, prepositions instead of postpositions eng bo
language be do then would have to do all command backwards i.e. do be
say bo hello do be bye
to test basic output hello bo say be do
to test addition note that numbers run from right to left, and have
the word nu following them to designate as numbers. c nu bo 04 nu to
add be do
to test compare love bo love to compare be word by do 11 nu bo 7 nu
to compare be number by do
to write to (emulated 32-bit) register helo nu bo 0 re to write be do
to say from (emulated) register 0 re from say be do
to see bytes in numeric form 0 re bo convert be number to do
to say from memory 00B8408 nu from say be do
to find address of recent word in book test bo what be do
to test writing to file you yo hello world! :-) bo filename.txt file
to write be do
to test saying or reading from file test.txt file from say be do
to test loving or compiling from file test.txt file from love be do
to test factorial label example factorial.txt file from love be do
to test conditional statements. love bo love to compare be do equal
if compare works bo say be do can do switch/case statments by happy bo
compare be do sad if :-( bo say be do happy if :-) bo say be do
to see contents of memory or book catalog catalog book from say be do
to see contents of user history user book from say be do
to make a label name su label be ya to get pointer or po of label
name la bo say be do
to test label jump name su label be ya name la bo say be do end be do
name la to jump be do
to test variables something su 33 nu bo var be do something va bo say
be do something va bo 4 nu to add be do
to convert a number to a string variable 44 nu bo word to convert be
do
resultnum su 44 nu bo var be do resultword su var be do resultnum va
bo word to convert be resultword va so do
to set quiet mode, where only say outputs to screen voice bo quiet to
mode be do to return to verbose or debugging mode voice bo verbose to
mode be do
to see book list catalog book from say be do to see book contents
bookname book from say be do
to start a new book book name su book be do
to forget a book book name book bo forget be do
they are then marked as "free" insead of "book" in the catalog
to extend a book book name book bo 0002 nu till extend be do note
0002 is equivalent to 0x2000 bytes, and can be any number
to write from book to file bookname book from filename file to write
be do to write from file to book filename file from bookname book to
write be do
a note on quotes: The kind of quotes implemented is the lojban
foreign language quotes style. It's interesting as it's actually an
infinite quoting mechanism, since you can literally make new quotes with
it.
an example quo contents quo te is a quote, containing the word
contents, the quote_word is quo in this case, though " contents " te can
work just as easily as any combination.
instead of having escape sequences, can simply have quotes comprised
of glyphs which are not found in the text as solitary words.
5 Language
**********
5.1 Grammar
===========
Note that this is for the base SPEL language, later on we'll be able to
translate to and from other languages, including English, French,
Esperanto and any language with translation files.
5.1.1 Phonology
---------------
5.1.2 Syntax
------------
grammar structure. Since subject-object-verb is more common, and is
easier to make programing code for. sysh currently uses post-positional
syntax. So instead of "from the Earth", it's "Earth the from".
5.1.3 Vocabulary
----------------
grammar vocabulary
Sysh uses an isolating case-grammar, so there is a word for each
grammatical case. where a grammatical case is a word like "to", "of",
"for", "by".
English uses many case-grammar words, but uses place-grammar for
subject and object. In Sysh the word for subject is "su" and for object
is "bo". For example, "we go to the store", is "we su store the bo go
be"
5.2 Functionality
=================
5.2.1 Turing Complete
---------------------
5.2.2 Universal Assembly Language
---------------------------------
6 Roadmap
*********
For a more detailed roadmap see doc/roadmap.txt
7 Contribute
************
7.1 Love
========
7.1.1 Review
------------
Rate or review this project on sourceforge
(https://sourceforge.net/projectsspel/reviews/new).
7.1.2 Connect
-------------
7.2 Program
===========
7.2.1 directory structure
-------------------------
bin/ binaries doc/ documentation info/ detailed manual man/ brief manual
pages locale/ languages src/ source code
7.2.2 search
------------
to find where a command is, can cd to 1/src
if it is a word then grep -rin commandName\" * if it code label then
grep -rin commandName: *
to debug requires gdb can use ./debug.sh in 2/bin to start it up
grammar-structure
because of subject-object-verb, the initial words are helpful
descriptors, the last word in a noun-group is the most important,
typically indicating the underlying process or result. In example
"spaceClear" clears, "spaceFind", finds.
source files are in src/ the main one is sysh.asm then interpret.asm
can compile new version with ./2/bin/run.sh in base directory the
executable or binary shall be ./2/bin/sysh can go into gnu debbugging
mode with ./2/bin/debug.sh in base directory
7.2.3 Porting Guide
-------------------
if to other operating system, the kernel is lin_io.asm and lin_sys.asm,
if to other processing bits, cpu.asm
Grammar Scanner is lower level, getting the word kinda stuff Parser
is mid level, operating with the word
7.3 Donate
==========
You can donate with Anoncoin at: AHQjHf3WetwgAzwbbKZy5igL5bt3NjLcRg
8 Acknowledgements
******************
authored by Logan Streondj jonesforth is the initial code example
supported by #forth and #asm irc channels from irc.freenode.net network.
consulted by father Igor Zvorygin about computer-programming. inspired
by Ben Goertzel AGI academic guru and part-time mentor.
Copyright
*********
Copyright (C) 2014 Logan Streondj
Documentation released under the Creative Commons
Attribution-ShareAlike license.
[cc-by-sa] (http://creativecommons.org/licenses/by-sa/4.0) click to read
license text.
TOC
***
Speakable Programming for Every Language (SPEL)
1 Introduction
1.1 Mission
1.2 Features
1.2.1 Implemented
1.2.2 Soon
1.3 Requirements
1.4 License
2 Download
2.1 Releases
2.2 Sources
2.2.1 tar balls
2.2.2 git
3 Installation
3.1 POSIX, POSIX compatible Systems
3.2 Windows
3.3 Binary
3.3.1 Portable Binary
3.3.2 Debian Binary
3.4 Compile
3.4.1 Compilation Requirements
3.4.2 POSIX Compilation
4 Usage
4.1 run
4.2 demo preview
5 Language
5.1 Grammar
5.1.1 Phonology
5.1.2 Syntax
5.1.3 Vocabulary
5.2 Functionality
5.2.1 Turing Complete
5.2.2 Universal Assembly Language
6 Roadmap
7 Contribute
7.1 Love
7.1.1 Review
7.1.2 Connect
7.2 Program
7.2.1 directory structure
7.2.2 search
7.2.3 Porting Guide
7.3 Donate
8 Acknowledgements
Copyright
TOC
Index
Index
*****
* Menu:
* Acknowledgements: Acknowledgements. (line 480)
* binary, debian: Debian Binary. (line 209)
* Binary, installation: Binary. (line 179)
* binary, portable: Portable Binary. (line 186)
* compile, POSIX: POSIX Compilation. (line 241)
* Contribute: Contribute. (line 419)
* directory structure: directory structure. (line 437)
* Download: Download. (line 99)
* Features: Features. (line 68)
* Functionaltiy: Functionality. (line 405)
* git: Sources. (line 145)
* Grammar: Grammar. (line 374)
* Installation: Installation. (line 153)
* Introduction: Introduction. (line 12)
* Language: Language. (line 371)
* License: License. (line 93)
* Mission: Mission. (line 34)
* Phonology: Phonology. (line 380)
* Porting Guide: Porting Guide. (line 466)
* POSIX: POSIX. (line 156)
* Program: Program. (line 434)
* Requirements, binary: Requirements. (line 84)
* Requirements, compilation: Compilation Requirements.
(line 228)
* Roadmap: Roadmap. (line 414)
* run: run. (line 269)
* search: search. (line 443)
* Sources: Sources. (line 126)
* Syntax: Syntax. (line 384)
* Syntax <1>: Vocabulary. (line 391)
* tar balls: Sources. (line 137)
* Turing Complete: Turing Complete. (line 407)
* Universal Assembly Language: UAL. (line 410)
* Usage: Usage. (line 266)
* Windows: Windows. (line 170)