Phoshell
Phoshell: a Forth inspired, extremely lightweight, stack machine shell, implementable in _ALL_ known programming languages.
Install / Use
/learn @udexon/PhoshellREADME
Phoshell: Simplifying Programming with Forth inspired Stack Machine Shell
-
Phoshell: A Universal, Extremely Lightweight "Embedded IDE" with Run-time Editing and Debugging Functionalities
-
Phoshell: a Forth inspired, extremely lightweight stack machine shell, implementable in ALL known programming languages.
:: Need to separate contents for senior vs. junior programmers.
:: Highlight SIMPLIFYING PROGRAMMING.
- Problem A: TELK — Time to Acquire Entry Level Knowledge
One of the biggest obstacles in working on a large scale open source repository such as Jitsi Meet is the lack of documentations for a new comer to familiarize with the respective modules and begin modifying the code.
Consider the following plan:
- Phoom links. We wish to create an Augmented Reality Conferencing App, based on Jitsi Meet Video Conferencing App.
- We have successfully copied TFJS Mask function into JitsiMeetBlurEffect.js
- We have used ChatMessage.js as entry point to Phoshell.
:: Phoom links are already examples of solutions to TELK.
https://github.com/udexon/Phoom/blob/master/Jitsi_Meet_BodyPix.md
https://github.com/udexon/jitsi-phoshell/blob/master/README.md
https://github.com/udexon/Phoom/blob/master/R3ML_Jitsi_Phoom.md
:: describe A to Z of plan
:: mark notes with :: continuously refine notes between finished paragraphs. :: number notes, easier to organize. remove numbers when finished.
- What are the hierarchy and relationships of the above and how does Phoshell relates them?
:: this is part of blindspots
Familiarizing with a new framework and the structure of a new project have become one of the most time consuming tasks when a programmer takes up a new project. The amount of time spent is especially significant for programmers wishing to get involved in a new open source project. This can make or break the decision for someone to join an open source project, as the time for familiarization could be a significant ratio to the total amount of time a programmer is able to engage in an open source project, usually on a part time basis, typically starting from single digit hours per week.
By encapsulating framework and programming language specific details with RPN, programmers who are unfamiliar with them may jump start and see results immediately.
Assuming exponential decay for number of interested programmers vs. time spent, then hopefully we may improve recruitments in open source projects exponentially by cutting down time needed to familiarize and see results.
- AR conferencing app needs developers and users to move avatars. Use RPN, works for web, iOS and Android platforms.
Sample code: place avatar at 30 deg around table ...
Use ChatMessage text input to create new UI elements, debugging facilities, build Embedded IDE etc.
- 1.3 TELK
How long does it take for you to start modifying an app whose source code is available on GitHub or equivalent open source websites?
Need to compile, test run, find documentation and location and code to start modifying.
- 1.4 Solution to TELK
What if we can do it as and when app is run?
Why, who need this?
Need to write in such a way that readers who know nothing about Phoshell can understand.
Nearest experience is Python shell?
Use Python turtle graphics with and without Phoshell as example, to illustrate interactive input output with graphics.
New title: the Last Mile in Computer Programming
Use this, can be understood by all:
- What if modifying any app can be done interactively via a textbook or equivalent element in the app itself?
Compare to nodejs ecosystem, third party contributing to building libraries.
Phoshell does not compete with existing Programming Languages and packaging frameworks, but compliments them in the "last mile" (explain telephone line analogy).
Highlight what nodejs npm have not achieved, what Phos UPS can do:
- variable level of encapsulation, find examples not possible using JavaScript? - What practical consequences does this have?
Phoshell Universal Packaging System -- Phups: the Last Mile in Computer Programming
Phos Package Manager PhosPM. Easier to remember like NPM.
- 1.5 Explain RPML on its own. Generalize from Laravel Blade PHP to other Programming Languages.
:: - Use - for new section, idea. Easier to read. Easy to turn into numbered list or section.
- Sections
-
TELK
-
Simplify HOW? Phoshell: just list examples to show HOW.
- 2.4 Simplifying React Redux Augmented Reality Programming (Jitsi Meet)
- Simplify / other consequences? Additional discussions and analysis, with or without code.
- Blindspots
- 3.3 What are the problems we are trying to solve? Consequences
- Why R3ML?
-
7: 3 problems have been copied to 3.3 / can be ignored
-
TELK / Bllindspots
-
3.3 Consequences / 4 Simplifing
- 4 Simplifying is short term consequences
- 3.3 contains long term consequences
- focus on 4. 4 is related to 2. Once 4 is finished, issues related to 3 will be clarified.
- swap 3 and 4
2. Theoretical Foundations of Phoshell
- 2.1 Phoshell definition
Phoshell is derived from the Forth programming language, as we took critical features from Forth and simplify them, to create a highly portable stack machine shell that can be implemented in around 50 lines of JavaScript code or equivalent, that essentially does the following:
- pushes non-function words (tokens) on to the stack;
- executes function words and pushes the results on to the stack.
Phoshell was initially implemented in PHP as an experiment to see how easy it is to implement a simplified stack machine. Eventually, we realized that this simplified stack machine can in fact be implemented in any known programming language with the equivalent of around 50 lines of JavaScript or PHP code, thus making the Forth like script (hence "Phos") a likely candidate to be a universal scripting language.
A stack machine shell maps function tokens in the input, expressed in reverse Polish notation, to native functions of the host programming language. RPN is used to call functions in all the scenarios listed above. As such, ....
Explain with examples of issues in TFJS and ChatMessage etc. Time spent.
The uniqueness of RPN is proven in its ability to encapsulate anything from Python turtle graphics to Jitsi Meet TFJS. The mechanisms behind this are some of the most fundamental principles in programming and mathematics.
- What do these mean for mortal programmers practically vs. LISPers and computer scientists theoretically?
This is perhaps one of the rare few topics in computer programming that concern the whole spectrum of practical programmers to theoretical computer sientists.
:: convert - bulleted headings to # headings when finished
- Deployable in anything from Python Turtle Graphics, Laravel front-end and back-end to Jitsi Meet Augmented Reality Conferencing, Phoshell is the ultimate programmer's swiss army knife.
Inspired by the Forth programming language, Phoshell — a stack machine shell — extracts the essential features of Forth, simplifies them, and can be implemented in around 50 lines of JavaScript code or equivalent in any known programming language.
2.2 History of Stack Machine Systems
- Perhaps the biggest mystery in the short history of computer programming?
- Have
dcand Forth programmers ever corssed path?
- Have
https://en.wikipedia.org/wiki/Reverse_Polish_notation
Other RP camps? Algol Unilever Burroughs?
HP calculators?
Other RP engineers?
First Unix shell is reverse polish.
https://en.wikipedia.org/wiki/Dc_(computer_program)
Unix claimed the high ground for shell and programming language tools. Forth lost out. Making a comeback.
http://phos.epizy.com/smashlet/?i=1
2.3 Phoshell Background
Phoshell is derived from the Forth programming language, as we took critical features from Forth and simplify them, to create a highly portable stack machine shell that can be implemented in around 50 lines of JavaScript code or equivalent, that essentially does the following:
- pushes non-function words (tokens) on to the stack;
- executes function words and pushes the results on to the stack.
Phoshell was initially implemented in PHP as an experiment to see how easy it is to implement a simplified stack machine. Eventually, we realized that this simplified stack machine can in fact be implemented in any known programming language with the equivalent of around 50 lines of JavaScript or PHP code, thus making the Forth like script (hence "Phos") a likely candidate to be a universal scripting language.
Besides Forth implementations in other programming languages (from C/C++ to Lisp, JavaScript, Java, Rust, Haskell etc.) developed by other programmers, which we too classify as "stack machine shells" (smashlet), we ourselves have implemented Phoshell in:
- C, C++, PHP, Python, Java, JavaScript — on desktop Linux and Android (Java and NDK)
- Using Laravel Blade PHP, we succeeded in creating a Reverse Polish form of HTML!! — a breakthrough perhaps as significant as the invention of HTML itself??
- An attempt to implement raw Forth within Firefox JavaScript engine as a compatible alternative to WebAssembly
2.4 Phoshell Examples
In the least Phoshell improve documentation and reduce TELK.
- Phoshell is source compatible with the host Programming Language and framework.
Give examples and explain. Examples show:
- Python turtle graphics
- ChatMessage addition
- TFJS
2.5 Simplifying React Redux Augmented Reality Programming (Jitsi Meet)
Simplifying React Redux Augmented Reality Programming (Jitsi Meet) using Forth derived Stack Machine Shell Functionalities of code become more complex.
- Can code be mad
