Skip to main content


Syntax

WordCount brainfuck description
5 + increment the byte at cell location pointer
6 - decrement the byte at cell location pointer
7 [ if pointer is zero, jump to code after matching 8
8 ] if pointer is nonzero, jump to code after matching 7
9 > increment the data cell location pointer
10 < decrement the data cell location pointer
11 , input of one byte into cell location pointer
12 . output the byte at cell location pointer

Installation

Beta :

git clone https://github.com/Saket-Upadhyay/WriterScript.git
cd WriterScript/WriterScript/

python3 setup.py install

File Extention

WriterScript works with .pen or .txt formats (UTF-8)

Usage

Execute Code (CLI):

wscript -e -s file.pen

Convert BrainFuck to WriterScript:

wscript -g -sbf sourcebrainfuckfile.txt -stxt templateTextFile.txt

How to Create WriterScript code from any text source

Step 1 : Copy the source to a text file

Step 2 : Replace the following elements with null -

, -> null
. -> null
r'\n' ->null

r'\[([a-z])*|([0-9])*\]' -> null

For Data from WikiPedia : Remove all [0-9] index by replacing r'\[[0-9][0-9]\]' with null. and all [a-z] index by replacing r'\[[a-z][a-z]\]' with null.

For Example

A programming language is a notation for writing programs, which are specifications of a computation or algorithm.[3] Some authors restrict the term "programming language" to those languages that can express all possible algorithms.[3][4] Traits often considered important for what constitutes a programming language include:

Function and target
  A computer programming language is a language used to write computer programs, which involves a computer performing some kind of computation[5] or algorithm and possibly control external devices such as printers, disk drives, robots,
[6] and so on. For example, PostScript programs are frequently created by another program to control a computer printer or display.
More generally, a programming language may describe computation on some, possibly abstract, machine. It is generally accepted that a complete specification for a programming language includes a description, possibly idealized, of a machine or processor for that language.
[7] In most practical contexts, a programming language involves a computer;
consequently, programming languages are usually defined and studied this way.
[8] Programming languages differ from natural languages in that natural languages are only used for interaction between people, while programming languages also allow humans to communicate instructions to machines.

Becomes ->

A programming language is a notation for writing programs which are specifications of a computation or algorithm Some authors restrict the term "programming language" to those languages that can express all possible algorithms Traits often considered important for what constitutes a programming language include: Function and target A computer programming language is a language used to write computer programs which involves a computer performing some kind of computation or algorithm and possibly control external devices such as printers disk drives robots and so on For example PostScript programs are frequently created by another program to control a computer printer or display More generally a programming language may describe computation on some possibly abstract machine It is generally accepted that a complete specification for a programming language includes a description possibly idealized of a machine or processor for that language In most practical contexts a programming language involves a computer; consequently programming languages are usually defined and studied this way Programming languages differ from natural languages in that natural languages are only used for interaction between people while programming languages also allow humans to communicate instructions to machines

Step 3 : Save with .txt extention.

Step 4 : Save your BrainFuck oneliner code as .txt

Step 5 : Run wscript -g -sbf brainfuckfile.txt -stxt textfile.txt

Step 6 : out.pen file will be created

Test : To test the code run wscript -e -s out.pen

Note

I created this project to help myself learn Theory of Computation and Compiler Design (5th Semester Course), This project is just for fun and is not associated with any person, organization (academic or non-academic) whatsoever. The project is under MIT license, so it can be used as a teaching resource, other projects, etc. with proper citation to this repository.

Check https://github.com/Saket-Upadhyay/WriterScript for details

Release files for writerscript 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for writerscript 0.4.0
File Size Uploaded
writerscript-0.4.0.tar.gz 9.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for writerscript 0.4.0
File Interpreter ABI Platform
writerscript-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / writerscript-0.4.0.tar.gz

Download URL writerscript-0.4.0.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c365054fc3b4e80c417d68ee18cf449dd7a46c684574f5816934fe81f6157485
BLAKE2b-256 checksum
How to use checksums
94156af759fe5cbf931ec9103e972468fdbf93322e62d47815ff868e1f9df392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / writerscript-0.4.0-py3-none-any.whl

Download URL writerscript-0.4.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83e30f72e2240fc8816ae8d863a7f1cecea1d9c719fc4863e019c95cfa657220
BLAKE2b-256 checksum
How to use checksums
4b5ebc2af1b8b3684effe46e6b7c081e1a7fd94ca79dde91d876ce78d2773a8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page