Ngn/k: Difference between revisions

From The K Language Wiki
< Ngn
Content added Content deleted
No edit summary
(end of support)
 
(5 intermediate revisions by 2 users not shown)
Line 6: Line 6:
| dev = [[ngn]]
| dev = [[ngn]]
| rel = 2017
| rel = 2017
| dialect = K6
| dialect = [[K6]]
| ttype = none
| ttype = none
| table = yes (no prettyprinting)
| table = yes (no prettyprinting)
Line 18: Line 18:
| docs = [https://codeberg.org/ngn/k/src/branch/master/repl.k#L10 in repl]
| docs = [https://codeberg.org/ngn/k/src/branch/master/repl.k#L10 in repl]
| runurl = editor ([https://ngn.bitbucket.io/k/# Bitbucket], [https://ngn.codeberg.page/k/# Codeberg]), repl ([https://ngn.bitbucket.io/k/#r Bitbucket], [https://ngn.codeberg.page/k/#r Codeberg])
| runurl = editor ([https://ngn.bitbucket.io/k/# Bitbucket], [https://ngn.codeberg.page/k/# Codeberg]), repl ([https://ngn.bitbucket.io/k/#r Bitbucket], [https://ngn.codeberg.page/k/#r Codeberg])
| infby = K7, K9
| infby = [[K7]], [[K9]]
}}
}}


'''ngn/k''' is an implementation of K6 created by [[ngn]]. It has been rewritten more than once, and has undergone many changes from its original iteration, borrowing ideas from many [[Arthur Whitney]] Ks, and occasionally deviating from their functionality.
'''ngn/k''' is an implementation of [[K6]] created by [[ngn]].


ngn/k has undergone several rewrites, borrowing ideas from many [[Arthur Whitney]] Ks, and occasionally deviating from their functionality.
ngn/k is written in [[Arthur_Whitney#Programming_Style|Whitney-style C]], and is written to be performant, compact, and with minimal dependencies.

ngn/k is written in [[Whitney C]], and is written to be performant, compact, and with minimal dependencies.


== History ==
== History ==
Line 36: Line 38:


The current version of ngn/k resides in Codeberg, and the move was officially announced on May 21, 2021<ref>https://chat.stackexchange.com/transcript/message/57843141#57843141</ref>. The codeberg repository has its initial commit at 2019, where it had support for x86_64 linux only.
The current version of ngn/k resides in Codeberg, and the move was officially announced on May 21, 2021<ref>https://chat.stackexchange.com/transcript/message/57843141#57843141</ref>. The codeberg repository has its initial commit at 2019, where it had support for x86_64 linux only.

ngn/k was indefinitely frozen<ref>https://codeberg.org/ngn/k/commit/7e7420217f9df95273a8605e05d6335d66dd8f8a</ref> on May 24, 2022.

In January 2024, ngn/k was announced to be no longer supported.


== Running ==
== Running ==
Line 47: Line 53:


=== I/O Verbs ===
=== I/O Verbs ===
ngn/k's I/O verbs are defined as per the K6 standard. They are made up of a single digit, followed by a <code>:</code> symbol: <code>loc u: data</code> for output and <code>u: loc</code> for input.
ngn/k's I/O verbs are defined as per the [[K6]] standard. They are made up of a single digit, followed by a <code>:</code> symbol: <code>loc u: data</code> for output and <code>u: loc</code> for input.


A symbol, string or number can be given as <Code>loc</code>. Any number given must be a valid tie number (see: [[Tie(ngn/k)]]).
A symbol, string or number can be given as <Code>loc</code>. Any number given must be a valid tie number (see: [[Tie(ngn/k)]]).
Line 66: Line 72:
(∇): dyad</pre>
(∇): dyad</pre>
== References ==
== References ==

[[Category:Implementations]]

Latest revision as of 12:47, 28 January 2024


ngn/k
Developer ngn
Released 2017

Dialect K6
Temporal types none
Table support yes (no prettyprinting)
Prototypes partial support

Implemented in C
Platforms x86_64
Operating Systems Linux, BSD, Windows(unofficial)
License AGPL

Website Codeberg
Documentation in repl
Run Online editor (Bitbucket, Codeberg), repl (Bitbucket, Codeberg)

Influenced By K7, K9

ngn/k is an implementation of K6 created by ngn.

ngn/k has undergone several rewrites, borrowing ideas from many Arthur Whitney Ks, and occasionally deviating from their functionality.

ngn/k is written in Whitney C, and is written to be performant, compact, and with minimal dependencies.

History[edit]

Development on ngn/k was started on April 9, 2017[1]. The older Github repository for ngn/k points towards kparc.io[2] for its spec.

The codebase was then moved to Gitlab. The exact date is not known since the repository no longer exists on the site.

The ngn/k repl and editor was created in October 2020 and subsequently moved from ngn.bitbucket.io to ngn.bitbucket.io/k[3]. It has remained in that state ever since.

The codebase was the moved to Sourcehut (sr.ht) on December 21, 2020[4].

The current version of ngn/k resides in Codeberg, and the move was officially announced on May 21, 2021[5]. The codeberg repository has its initial commit at 2019, where it had support for x86_64 linux only.

ngn/k was indefinitely frozen[6] on May 24, 2022.

In January 2024, ngn/k was announced to be no longer supported.

Running[edit]

The main way of running ngn/k is building it. This can be done reliably on Unix-like systems with the help of either clang-12 or gcc-10 C compilers, and the make utility. Build instructions can be found in the ngn/k README file.

ngn/k has a WASM distribution available online. These can be accessed from the "Run Online" links in the sidebar. The Codeberg page is restricted in some countries.

Traws has a fork of ngn/k on Github which is made for compilation under cosmopolitan libc.

Features[edit]

I/O Verbs[edit]

ngn/k's I/O verbs are defined as per the K6 standard. They are made up of a single digit, followed by a : symbol: loc u: data for output and u: loc for input.

A symbol, string or number can be given as loc. Any number given must be a valid tie number (see: Tie(ngn/k)).

Every input verb is classified by data:

  • 0: takes lists of strings. (concatenates them with newlines)
  • 1: takes a single string.

Reserved Symbols[edit]

ngn/k has reserved symbols used for providing access to features that are not important enough to be added as primitives, but still warrant a name for quick use. These symbols can be used like any other nouns.

The ngn/k help topic for adverbs is available at \` in the ngn/k repl.

Defined Verbs[edit]

ngn/k allows creation of new verbs that can be used infix, as part of its syntax. These must be defined as follows (using as an example symbol):

(∇:): monad
(∇): dyad

References[edit]