You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Neural parallel language

From EverybodyWiki Bios & Wiki



Neural parallel language (abbreviated NPL) is a general-purpose open-source programming language.[1] Its syntax is fully compatible with Lua. NPL provides essential functionality for building 3D/2D/Web/Server applications.[2] NPL provides a C/C++ API and native NPL libraries. NPL is a single language solution for advanced and interactive GUI, complex opengl/DirectX 3D graphics, scalable webserver and distributed software frameworks. It is cross-platform, high performance,[3] extensible and debuggable. It is a language system initially designed to operate like the brain. Nodes and connections are ubiquitous; threading and networking logics are hidden from developers. NPL can mix user-mode preemptive and non-preemptive code. It reflects the concurrency of Erlang and speed of Java/C++ in the same dynamic and weakly typed language.

Facts About NPL[edit]

  • NPL runtime is written in C/C++. It can utilize the luajit compiler, which dynamically compiles script/byte code into native machine code, thus it can approach native C/C++ performance with some caveats.
  • NPL runtime native API is a rich collection of C/C++ functions that is callable from NPL script. It includes networking, graphics, io, audio, assets management, and core NPL/ParaEngine infrastructure.
  • NPL libraries are pure NPL/lua script files, distributed open sourced or in a zip/pkg file. Over 1 million lines of fully documented NPL script code are available for use.
  • NPL libraries are all written in object oriented fashion, code is organized in folders and table namespaces.
  • Because NPL is written in C/C++, it is cross-platform, extensible and easy to integrate with other thirty-party tools. For examples, NPLRuntime is distributed with following built in plugins: bullet(a robust 3d physics engine), mono(C# scripting module with NPL API),mysql/sqlite(database engine), libcurl(a robust http://ssh client).
  • There are two ways to use Lua, one is embedding, the other is extending it. NPL takes the former approach. For example, true preemptive programming would NOT be possible with the second approach. The embedding approach also allows NPL to expose all of its API and language features to other compiler, for example, each NPL runtime states can host Lua/Mono C#/C++ compiler states all together.

Background & History[edit]

NPL prototype was designed by Li Xizhi in 2004, which was then called 'parallel oriented language'. In 2005, it was implemented together with ParaEngine, a distributed 3d computer game engine. In 2016, its open source code base grows to over 1 million and distributed in several NPL packages, and powers dozens of client and server projects.

NPL is initially designed to write flexible algorithms that works in a multi-threaded, and distributed environment with many computers across the network. More specifically, it is designed to be a single language solution for writing high-performance network algorithms, 3d simulation and visualization. Lua and C/C++ affinity was chosen from the beginning.

Communicate Like The Brain[edit]

Although we are still unclear about our brain's exact computational model, however, following fact seems ubiquitous in our brain.

  • The brain consists of neurons and connections.
  • Data flows from one neuron to another: it is asynchronously, single-direction and without callback.

Communication in NPL is the same as above. Each file can become a neuron file to receive messages from other neuron files. They communicate asynchronously without callback. As a result, no lock is required in NPL because there is no shared data; making it both simple and fast to write and test distributed algorithms and deploy software in heterogeneous environment.

Concurrency Model in NPL[edit]

The mental picture of most computer languages is to execute programs in sequential order. Concurrency is a language feature about writing code that runs concurrently. Traditional way of doing it is via threads and locks, which is very troublesome to write. The Actor Model which was first proposed by Carl Hewitt in 1973, takes a different approach to concurrency, which avoids the problems caused by threading and locks.

There are many implementations of concurrency model in different languages, they differ both in performance under different use cases, and in the programmers' mental picture when writing concurrent code.

NPL uses a hybrid approach, which give programmers the ability to run tens of thousands of tasks in a single thread or across multiple threads. More importantly, programmers do not need to write code to spawn a virtual process or write error-prone message loops. In short, NPL is designed to be fast, scalable and giving programmers a mental picture that is close to neurons in the brain.

See also NPL Concurrency Model[4] compared with erlang, GO, scala.

Software Projects Written In NPL Language[edit]

  • Paracraft[5] is a standalone 3d animation software for everyone.
  • Wikicraft[6] is a free personal web site builder on the cloud. The server side is written in NPL.
  • Magic Haqi[7] is a free/paid 3D MMORPG published by TaoMee[8] (nasdaq:TAOM) in November, 2009, allowing kids to play, create and share 3d worlds. It has over 5 million registered users and tens of thousands of user created works in China.
  • Kids Movie Creator[9] is a shareware released in 2006, allowing kids to create 3d world and make movies.
  • Paper Star [10] is a sandbox game developed by TaoMee[8] (nasdaq:TAOM) using NPL.

References[edit]

  1. "Official website for NPL programming language".
  2. ."Projects written in NPL language".
  3. "NPL performance report".
  4. "NPL concurrency model".
  5. "Software: paracraft software".
  6. "Server Software: wikicraft personal wiki builder".
  7. "Software: magic haqi 3d mmorpg".
  8. 8.0 8.1 "TaoMee Company (nasdaq:TAOM)".
  9. "Software: Kids Movie Creator".
  10. "Software: paperstar sandbox game".


This article "Neural parallel language" is from Wikipedia. The list of its authors can be seen in its historical. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.