June 19th, 2024

Trealla Prolog: Compact and efficient Prolog interpreter

Trealla Prolog is a compact interpreter written in C, compliant with ISO Prolog. It supports unbounded integers, UTF-8 atoms, efficient strings, and runs on Linux, Android, and WebAssembly. It offers C integration, SQLite access, concurrency features, and experimental functionalities. The project is open source under the MIT license.

Read original articleLink Icon
Trealla Prolog: Compact and efficient Prolog interpreter

Trealla Prolog is a compact and efficient Prolog interpreter written in C, aiming for ISO Prolog compliance. It supports unbounded integers and rationals, UTF-8 atoms of unlimited length, and efficient strings and slices. The interpreter includes a REPL with history and runs on various platforms like Linux, Android, and WebAssembly. It offers an API for C integration, a foreign function interface for calling C code, and supports SQLite database access. Additionally, it provides concurrency features like tasks, linda, and engines, along with pre-emptive multi-threading and blackboarding primitives. Trealla also supports experimental features like delimited continuations and rational trees. The project is open source under the MIT license and can be accessed from trealla-prolog.org. The interpreter uses UTF-8 internally and seamlessly handles code-point specific requirements. Building Trealla involves cloning the repository, installing necessary dependencies, and compiling the source code. Contributions to the project are welcome, and the project acknowledges the contributions of various individuals.

Related

F (2006)

F (2006)

F is a functional concatenative language with K3 list operations and Joy's dip combinator. It enforces one-time assignment, supports floating-point and symbolic datatypes, and emphasizes function-valence and -charge theories. The language is purely functional, prohibiting side-effects and reassignment, with various primitives for arithmetic, logic, and list operations. F also provides interactive commands for debugging and manipulation, focusing on simplicity, efficiency, and functional programming paradigms.

Tao of Programming

Tao of Programming

The Tao of Programming, translated by Geoffrey James and transcribed by Alex North-Keys, explores programming through Taoist principles in nine books, covering topics from design to corporate wisdom. This structured approach offers insights for programmers.

Flambda2 Ep. 2: Loopifying Tail-Recursive Functions

Flambda2 Ep. 2: Loopifying Tail-Recursive Functions

Flambda2's Episode 2 explores Loopify, an optimization algorithm for tail-recursive functions in OCaml. It transforms recursion into loops, enhancing memory efficiency without compromising functional programming principles.

Polytype: A Rosetta Stone for typesetting engines

Polytype: A Rosetta Stone for typesetting engines

Polytype is a project like Rosetta Code but for typesetting engines. It compares how different engines handle layout and orthographic features. Contributions are welcome via GitHub for new samples and improvements. Users can build examples locally and test the website.

Gren 0.4: New Foundations

Gren 0.4: New Foundations

Gren 0.4 updates its functional language with enhanced core packages, a new compiler, revamped FileSystem API, improved functions, and a community shift to Discord. These updates aim to boost usability and community engagement.

Link Icon 1 comments
By @xlii - 4 months
Lately Prolog became my no. 1 language for stuff and I’ll blindly upvote anything Prolog related.

However for those interested in Prolog I’d recommend SWI-Prolog first.

Its standard distribution has everything and w kitchen sink included and I also found it the most stable. Performance is great unless code us stupid (e.g. yesterday I tried to reduce chain to MVP by naively iterating 1000 letters - it took couple second to get to completion as you can imagine).

Prolog is fun, check it out :)