D'ni

From Esolang
Jump to navigation Jump to search

Overview

This is an attempt, started by Eric James Parfitt, to slowly turn all of the English language into computer code, working in the direction of predicate logic. It is inspired by the idea that definitions can be broken down into as few as around 60 base words called semantic primes. It loosely follows and has used as inspiration Learn These Words First, a website which builds final link in a non-circular dictionary between all words in the English language and semantic primes at the bottom.

The name is inspired by a fictional language from a game called Myst, in which people called the D'ni write descriptions of worlds in a language called D'ni and can then visit the places they describe. This language was made with the idea in mind that some day one could write something like on(house, hill) and have a house drawn on a hill on the screen for example. It was also made with the idea that one could click on a word and watch it expand out down to something like semantic primes. The author has plans to perhaps implement a language already developed to be a logical language, such as Lojban.

Implementation

This page has all of the definitions so far. The definitions are currently written in Mathematica. They are a work in progress. Open source parsers of Mathematica do exist at this time however they are somewhat limited. The author of the language does have plans to possibly implement the language in a different language than Mathematica in the future. Here is some example code from the linked implementation:

moved[object_, destination_, origin_] := after[inside[object, origin], inside[object, destination]]

capableOf[thing_, action_, condition_] := if[condition, action[thing]]

closer[thingA_, thingB_, thingC_] := distance[thingA, thingC] < distance[thingB, thingC]

happen[verb_, condition_] := stateWhen[condition, verb]

likeWay[thingA_, thingB_, similarity_] := similarity[thingA] && similarity[thingB]

part[part_, whole_] := inside[part, whole]

caused[agent_, action_, method_] := method[agent] && after[agent, action] && implied[not[agent], not[action]]

........

pressChanged[presser_, pressee_, degree_] := becauseOf[pushed, presser, pressee, changed[shape[pressee], degree]]

soft[x_, softness_] := exists[presser, possible[presschanged[presser, x, softness]]]

fibre[x_] := tangle[x, string]

cloth[x_, softness_, underCondition_] := soft[x, softness] && exists[fiberA, madeOf[x, fiberA]] && capableOf[x, drape, underCondition]

bread[x_, seeds_, solidNess_] := exists[waterA, madeOf[x, mixed[seeds, water[waterA]]]] && solid[x, solidNess]

airborne[x_] := not[currently[fell][x]]

flew[x_, speed_, relativeTo_] := airborne[x] && moved[x, speed, relativeTo]

External resources