All Projects → paul-go → Truth

paul-go / Truth

Licence: other
A Domain Representation Language

Programming Languages

typescript
32286 projects
shell
77523 projects

Projects that are alternatives of or similar to Truth

Unchained
A fully type safe, compile time only units library.
Stars: ✭ 70 (+204.35%)
Mutual labels:  type-safety, meta-programming
kanji
A strongly typed GraphQL API framework
Stars: ✭ 12 (-47.83%)
Mutual labels:  type-safety, type-system
yants
Yet Another Nix Type System | Source has moved to https://git.tazj.in/tree/nix/yants
Stars: ✭ 35 (+52.17%)
Mutual labels:  type-safety, type-system
Printf
Tiny, fast, non-dependent and fully loaded printf implementation for embedded systems. Extensive test suite passing.
Stars: ✭ 1,157 (+4930.43%)
Mutual labels:  format
Edamontology
EDAM is an ontology of bioinformatics types of data including identifiers, data formats, operations and topics.
Stars: ✭ 80 (+247.83%)
Mutual labels:  format
Gostradamus
Gostradamus: Better DateTimes for Go 🕰️
Stars: ✭ 148 (+543.48%)
Mutual labels:  format
jodaTime
Format and Parse date and time with joda layout
Stars: ✭ 67 (+191.3%)
Mutual labels:  format
Atom Auto Prettier
An Atom package that semantically reformats Javascript based on the window size
Stars: ✭ 60 (+160.87%)
Mutual labels:  format
Vuetify Daterange Picker
The missing date range picker for Vuetify JS you have been looking for.
Stars: ✭ 192 (+734.78%)
Mutual labels:  format
Markdown Css
A tool convert css style into markdown inline style
Stars: ✭ 122 (+430.43%)
Mutual labels:  format
Go Plus
An Enhanced Go Experience For The Atom Editor
Stars: ✭ 1,519 (+6504.35%)
Mutual labels:  format
Date And Time
A Minimalist DateTime utility for Node.js and the browser
Stars: ✭ 99 (+330.43%)
Mutual labels:  format
Isobmff
C++ Library for ISO/IEC 14496-12 - ISO Base Media File Format (QuickTime, MPEG-4, HEIF, etc)
Stars: ✭ 157 (+582.61%)
Mutual labels:  format
Json Stat
JSON-stat Toolkit version 0
Stars: ✭ 79 (+243.48%)
Mutual labels:  format
Uncrustify
Code beautifier
Stars: ✭ 2,442 (+10517.39%)
Mutual labels:  format
Plurr
Cross-platform format specification + libraries for handling plurals/genders/conditionals for Go, Java, JS, Obj-C, Perl, PHP, Python
Stars: ✭ 68 (+195.65%)
Mutual labels:  format
Activitystreams
Activity Streams 2.0
Stars: ✭ 185 (+704.35%)
Mutual labels:  format
Indicators
Activity Indicators for Modern C++
Stars: ✭ 1,838 (+7891.3%)
Mutual labels:  format
Psycho.r
An R package for experimental psychologists
Stars: ✭ 113 (+391.3%)
Mutual labels:  format
Hrconvert2
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats.
Stars: ✭ 132 (+473.91%)
Mutual labels:  format

Introduction

Truth is a method for classifying conscious understanding. It does so by providing the human a computationally-aware method of indicating what things are ("is-a" relationships), and what they have ("has-a" relationships). Through these declarations of existence, a body of information is gradually formed that is guaranteed to be devoid of inaccuracies and falsehoods.

Truth was not constructed by fiat. It's characteristics are not a mere convenient recipe designed to address some transient need. Rather, it's a design that was uncovered through ontological and epistemological reasoning, and refined through intense scrutiny. Because of this, many of the rules can be intuited without reading any documentation, and instead by simply walking through the line of reasoning intellectually.

In Truth, there is no inherent distinction between structure and data, nor is there a concept of a binary class/instance relationship. Everything is an abstract Type. Constraints are introduced by establishing is-a relationships between types.

Truth is not a system for expressing computation. Truth is immutable, stateless, unconditional and timeless. Therefore, writing Truth is not to be considered an act of programming.

Language Overview

In the beginning, Truth is formless and empty. There exists absolutely nothing–no strings, numbers, or data types of any kind. There are no keywords or built-in framework. The main construct is the :, called the Joint, which loosely translates to "is a kind of":

Plant
Tree : Plant

Separate lines in Truth are like sentences, each being a separate statement of existence. And so in English, the above Truth translates to "There exists what we call Plant. There also exists what we call Tree, which is a kind of Plant".

Has-a relationships are expressed through indentation. The indentation pattern is infinitely recursive, allowing statements to be nested as many levels as necessary.

Number
Plant
Tree : Plant
	Height : Number
		Minimum : Number
		Maximum : Number

Patterns & Aliases

In Truth, there are Patterns, which are regular expressions that essentially say "when a term to the right of a joint is encountered that conforms to this pattern, make it a ...". As stated above, Truth does not have any built-in data types. They must be established by the user, with patterns being one of the core mechanisms by which this is done. Lines that start with a / are interpreted as Patterns:

Decimal
/\d+\.\d+ : Decimal
Pi : 3.1415926
Phi : 1.6180339

This Truth establishes a rule that any term composed from 1 or more digits, followed by a dot, followed by 1 or more digits is assumed to be a Decimal. And so we have two constants declared, Pi and Phi, which are inferred as Decimals.

Inheritance

Single and multiple inheritance are foundational constructs of cognition, and so they exist in Truth. The Truth compiler accepts any inheritance hierarchy forming an arbitrarily complex directed acyclic graph. Below, we demonstrate a classic diamond-shaped inheritance structure:

String
Number
Language

Employee
	Name : String
	
Engineer : Employee
	Specialization : Language
	
Salesman : Employee
	Commission Rate : Number
	
Sales Engineer : Engineer, Salesman

From this Truth, the compiler would be able to infer that Sales Engineer has a Name, a Specialization and a Commission Rate, all without these being declared explicitly.

Faults

There are many ways by which falsehoods may contaminate Truth. Fortunately, the Truth compiler is able to detect these and call them out. One such falsehood is described below, specifically on the last line:

Language

Systems Language : Language
C++, Rust : Systems Language

Query Language : Language
SQL, GraphQL : Query Language

Engineer
	Specialization : Language

Systems Engineer : Engineer
	Specialization : Systems Language

Robert : Systems Engineer
	Specialization : Rust

Joseph : Systems Engineer
	Specialization : SQL

An Engineer has a Specialization, which is a Language. A Systems Engineer is defined as a kind of engineer whose specialization is more specifically a Systems Language. Joseph purports to be a Systems Engineer, however, his specialization is SQL, which is a Query Language, and hence the falsehood.

Project Status

  • The Truth compiler is being actively developed by a real company with enterprise customers and a sound business model. It's being used to tackle some of the most challenging data complexity problems.

Installing

npm install truth-compiler --save

Longevity

Truth is being actively developed by a real company with enterprise customers and a sound business model. It's being used to tackle some of the most challenging data complexity problems.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].