- Graph database
- Algoritma
- Netflix
- Pure (programming language)
- Functional programming
- List of programming languages by type
- Pure function
- List of programming languages
- Prototype-based programming
- C (programming language)
- Pure Data
- Purely functional programming
- SPARK (programming language)
Pure (programming language) GudangMovies21 Rebahinxxi LK21
Pure, successor to the equational language Q, is a dynamically typed, functional programming language based on term rewriting. It has facilities for user-defined operator syntax, macros, arbitrary-precision arithmetic (multiple-precision numbers), and compiling to native code through the LLVM. Pure is free and open-source software distributed (mostly) under the GNU Lesser General Public License version 3 or later.
Overview
Pure comes with an interpreter and debugger, provides automatic memory management, has powerful functional and symbolic programming abilities, and interfaces to libraries in C (e.g., for numerics, low-level protocols, and other such tasks). At the same time, Pure is a small language designed from scratch; its interpreter is not large, and the library modules are written in Pure. The syntax of Pure resembles that of Miranda and Haskell, but it is a free-format language and thus uses explicit delimiters (rather than off-side rule indents) to denote program structure.
The Pure language is a successor of the equational programming language Q, previously created by the same author, Albert Gräf at the University of Mainz, Germany. Relative to Q, it offers some important new features (such as local functions with lexical scoping, efficient vector and matrix support, and the built-in C interface) and programs run much faster as they are compiled just-in-time to native code on the fly. Pure is mostly aimed at mathematical applications and scientific computing currently, but its interactive interpreter environment, the C interface and the growing set of addon modules make it suitable for a variety of other uses, such as artificial intelligence, symbolic computation, and real-time multimedia processing
Pure plug-ins are available for the Gnumeric spreadsheet and Miller Puckette's Pure Data graphical multimedia software, which make it possible to extend these programs with functions written in the Pure language. Interfaces are also provided as library modules to GNU Octave, OpenCV, OpenGL, the GNU Scientific Library, FAUST, SuperCollider, and liblo (for Open Sound Control (OSC)).
Examples
The Fibonacci numbers (naive version):
Better (tail-recursive and linear-time) version:
Compute the first 20 Fibonacci numbers:
An algorithm for the n queens problem which employs a list comprehension to organize the backtracking search:
While Pure uses eager evaluation by default, it also supports lazy data structures such as streams (lazy lists). For instance, David Turner's algorithm for computing the stream of prime numbers by trial division can be expressed in Pure:
Use of the & operator turns the tail of the sieve into a thunk to delay its computation. The thunk is evaluated implicitly and then memoized (using call by need evaluation) when the corresponding part of the list is accessed, e.g.:
Pure has efficient support for vectors and matrices (similar to that of MATLAB and GNU Octave), including vector and matrix comprehensions.
Namespaces, types and interfaces belong to the standard repertoire:
As a language based on term rewriting, Pure fully supports symbolic computation with expressions. Here is an example showing the use of local rewriting rules to expand and factor simple arithmetic expressions:
Calling C functions from Pure is very easy. E.g., for a "Hello, World!" program, the following imports the puts function from the C library and uses it to print the string "Hello, world!" on the terminal:
Instead of manually compiling source files to LLVM bitcode modules, one can also place the source code into a Pure script, enclosing it in %< ... %> (inline code, e.g. C, Fortran 77/90 and so on).
See also
Functional programming
Functional languages
Clean (programming language)
References
Albert Gräf. "Signal Processing in the Pure Programming Language". Linux Audio Conference 2009.
Michael Riepe. "Pure – eine einfache funktionale Sprache" Archived 2011-03-19 at the Wayback Machine. Heise.
"Interview With Albert Gräf". blueparen.
Mark Boady, Introduction to Term Rewrite Systems and their Applications
Notes
External links
Official website
Pure at Github
The Pure Manual (html)
The Pure Library Manual (html)
Documentation Overview (html)
Computer Algebra with Pure: A Reduce Interface
Pure quick reference
Using the Pure Interpreter
Using Pure with TeXmacs
The Pure TeXmacs Plugin
Kata Kunci Pencarian:

Document

Pure (programming language) - Wikipedia

Pure basic programming language - billcopax

Purebasic programming language - lopezie
GitHub - rineddy/purebasic-language: Purebasic language support for ...
GitHub - Pure-the-Language/Pure: An interpreter for C# based on Roslyn ...

Pure programming - Dashboard - Annie Miller Co.

Pure Functional Programming - Ada Beat
snu2dprogrammingtools · GitHub Topics · GitHub

(PDF) Signal Processing in the Pure Programming Language

Pure Programming Language: history, features, applications, Why learn ...

Pure Platform™