OmniGlot

From ZCubes Wiki
Jump to navigation Jump to search

ZCubes - Omniglot Platform

in ZCubes, code can be written in z^3 language (and hence Javascript). With release 4.0, ZCubes attains Omniglot capability. This means, a user can write in practically any programming language, and the intermixed code can be written on the server and the client.

What this means is that the user is not tied to a paradigm, architecture, etc. that resulted in a specific choice to achieve an objective. Generally, problems require multifaceted solutions, and this means an optimal solution will include multiple paradigms, languages, modes, etc. However, a solution dependent on a single language becomes tricky when it has the solve the entire problem, however the language is best suitable to solve only a part of the problem.


Z Bridge to Client and Server Languages

Omniglot is a natural evolution of Omnifunctionality.

OmniGlot Examples

ZCubes, enabled by z^3 Language, is a powerhouse, providing Array Programming, Spreadsheet Paradigm, Unit Conversions, etc., in a fully Omni-Functional Medium.

Z can work with any AI source such as OpenAI, Grok, Perplexity, Wolfram, Anthropic, Deepseek, etc. This along with seamless integration with hundreds of server and client languages makes ZCubes the most powerful Omni-Functional computational medium.

For users to fully experience the entire computational universe, Z provides full interaction with both client-based and server-based languages. Another powerful paradigm is to allow data transfer in prepile stage and postpile stage of preparing these other languages to interact with Z space and platform. That is the code in other languages can transfer data and logic seamlessly to achieve powerful computations scenarios.

Transfer Operators

Operators such as [= =] and {= =} are used to do prepile and postpile transfer between languages.

Execution of Code

Client Based Languages

Transpiled languages that translate to Javascript such as Typescript, Coffeescript, etc. are fully and seamlessly supported by Z. In these languages, all of the Z functions and functionalities are available seamlessly. For example, z^3 version of SIN function can be directly called from Typescript. This allows the powerful z^3 paradigms such as Array Computation, Unit Sensitivity, etc. to be assumed even when working in these languages.

Typescript in Z

Coffeescript in Z

Server Based Languages

Server languages Python, APL, etc are fully and seamlessly supported by Z.

Languages and Platforms such as R can also work seamlessly with Z documents, and programs.

Python Bridge Examples

R Bridge Examples

APL Bridge Examples

Language Kernals

ZCubes utilizes Language Kernels to interact with specific language intereactions.

Installing Conda/Jupyter

ZCubes recommends installing Anaconda (Installation Instructions) or Jupyter Notebook to have configurations to Julia, Python, R, and many other kernals.

Installing Language Kernels

Please visit [List of Kernels] to download or install the kernel for the languages you prefer to work with. Once done, ZCubes will connect via Jupyter API to the installed Kernels to interact seamlessly with Server languages of your choice from ZCubes.

Adding New Languages to Z

Server side languages can be added to the platform by:

ZADDSERVERLANGUAGE("java","ijava")

The second parameter is the name of the Kernal, associated to the language. Syntax Highlighting is automatically made based on the name of the language to known languages.

Client side languages can be added like below:

Typescript and CoffeScript are already incorporated into the Z Base System.

ZADDTRANSPILEDLANGUAGE(
		"TYPESCRIPT",		
		function(SomeCode,opts)
		{
			try
			{
				var dobj=
					ts
						.transpile(
							SomeCode,
							{
								inlineSourceMap:true
							}
						);
				return(dobj);
			}
			catch(err)
			{
				return(SomeCode)
			}		
		}
	);

Python Language

Python comes default with Anaconda and Jupyter, and hence no additional install is needed.

Python Bridge Examples

R Language

To work with R, it is recommended to install R Studio.

IR Kernal installation instructions needs to be followed to connect Anaconda/Jupyter with R Platform.

Basically, it consists of giving these two commands in the R Studio, so IRkernal is connected to Jupyter.

install.packages('IRkernel')
IRkernel::installspec()  # to register the kernel in the current R installation

R Bridge Examples

APL/Dyalog Language

APL Dyalog Kernal (Configuration Instructions) can be used to interact with Z using the APL Language.

While installing, use the following commands at the command line:

pip install dyalog-jupyter-kernel
python -m dyalog_kernel install

Please note python -m dyalog_kernel install where dyalog_kernel is indicated without the quotes.

In the event of issues, it is recommended to run and rerun commands above:
conda install --force-reinstall jupyter_client


APL Bridge Examples

See Also

zblack Example of Omniglot