Skip to content

Commit 9a77c74

Browse files
remove unused dart dependency
1 parent c9d5e3b commit 9a77c74

File tree

12 files changed

+330
-777
lines changed

12 files changed

+330
-777
lines changed

.github/workflows/hugo.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ jobs:
3838
run: |
3939
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
4040
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
41-
- name: Install Dart Sass
42-
run: sudo snap install dart-sass
4341
- name: Install Tree-Sitter cli
4442
run: sudo npm install -g [email protected]
4543
- name: Install GAWK

public/categories/index.html

+1-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1 @@
1-
2-
<!doctype html>
3-
<html>
4-
<head>
5-
<meta charset="UTF-8" />
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<link rel="stylesheet" href="/main.min.css" />
8-
<title>Categories</title>
9-
</head>
10-
<body>
11-
12-
<main>
13-
14-
<h1 id="title">Categories</h1>
15-
<ul>
16-
17-
</ul>
18-
19-
</main>
20-
<br /><br /><br />
21-
</body>
22-
</html>
1+
<!doctype html><html><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=wow/main.min.css><title>Categories</title></head><body><main><h1 id=title>Categories</h1><ul></ul></main><br><br><br></body></html>

public/categories/index.xml

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2-
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3-
<channel>
4-
<title>Categories on Cognate: Readable and concise concatenative programming</title>
5-
<link>https://cognate-lang.github.io/categories/</link>
6-
<description>Recent content in Categories on Cognate: Readable and concise concatenative programming</description>
7-
<generator>Hugo</generator>
8-
<language>en-us</language>
9-
<atom:link href="https://cognate-lang.github.io/categories/index.xml" rel="self" type="application/rss+xml" />
10-
</channel>
11-
</rss>
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Categories on Cognate: Readable and concise concatenative programming</title><link>wow/categories/</link><description>Recent content in Categories on Cognate: Readable and concise concatenative programming</description><generator>Hugo</generator><language>en-us</language><atom:link href="wow/categories/index.xml" rel="self" type="application/rss+xml"/></channel></rss>

public/index.html

+56-86
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,56 @@
1-
2-
<!doctype html>
3-
<html>
4-
<head>
5-
<meta name="generator" content="Hugo 0.130.0">
6-
<meta charset="UTF-8" />
7-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8-
<link rel="stylesheet" href="/main.min.css" />
9-
<title>Cognate: Readable and concise concatenative programming</title>
10-
</head>
11-
<body>
12-
13-
<main>
14-
15-
<h1 id="cognate">Cognate</h1>
16-
<h2 id="readable-and-concise-concatenative-programming">Readable and concise concatenative programming</h2>
17-
<div class="code"><pre><code><span style='font-style: italic;color: #969896'>~~ Fizzbuzz in Cognate</span>
18-
19-
<span style='color: #0086b3'>Def</span> <span style='color: #795da3'>Multiple</span> <span style='color: #333333'>as</span> <span style='color: #4e4e4e'>(</span><span style='color: #183691'>Zero?</span> <span style='color: #183691'>Modulo</span><span style='color: #4e4e4e'>)</span>;
20-
21-
<span style='color: #0086b3'>Def</span> <span style='color: #795da3'>Fizzbuzz</span>
22-
<span style='color: #a71d5d'>Case</span> <span style='color: #4e4e4e'>(</span><span style='color: #795da3'>Multiple</span> <span style='color: #333333'>of</span> <span style='color: #0086b3'>15</span><span style='color: #4e4e4e'>)</span> <span style='color: #333333'>is</span> <span style='color: #183691'>&quot;fizzbuzz&quot;</span>
23-
<span style='color: #a71d5d'>Case</span> <span style='color: #4e4e4e'>(</span><span style='color: #795da3'>Multiple</span> <span style='color: #333333'>of</span> <span style='color: #0086b3'>3</span><span style='color: #4e4e4e'>)</span> <span style='color: #333333'>is</span> <span style='color: #183691'>&quot;fizz&quot;</span>
24-
<span style='color: #a71d5d'>Case</span> <span style='color: #4e4e4e'>(</span><span style='color: #795da3'>Multiple</span> <span style='color: #333333'>of</span> <span style='color: #0086b3'>5</span><span style='color: #4e4e4e'>)</span> <span style='color: #333333'>is</span> <span style='color: #183691'>&quot;buzz&quot;</span>
25-
<span style='color: #333333'>otherwise</span> <span style='color: #4e4e4e'>(</span><span style='color: #4e4e4e'>)</span>;
26-
27-
<span style='color: #a71d5d'>For</span> <span style='color: #333333'>each</span> <span style='color: #333333'>in</span> <span style='color: #183691'>Range</span> <span style='color: #0086b3'>1</span> <span style='color: #333333'>to</span> <span style='color: #0086b3'>100</span> <span style='color: #4e4e4e'>(</span><span style='color: #183691'>Print</span> <span style='color: #795da3'>Fizzbuzz</span><span style='color: #4e4e4e'>)</span>
28-
</code></pre></div><p>Cognate is a project aiming to create a human readable programming language with as little syntax as possible. Where natural language programming usually uses many complex syntax rules, instead Cognate takes them away. What it adds is simple, a way to embed comments into statements.</p>
29-
<div class="code"><pre><code><span style='font-style: italic;color: #969896'>~~ Towers of Hanoi in Cognate</span>
30-
31-
<span style='color: #0086b3'>Def</span> <span style='color: #795da3'>Move</span> <span style='color: #333333'>discs</span> <span style='color: #333333'>as</span> <span style='color: #4e4e4e'>(</span>
32-
33-
<span style='color: #0086b3'>Let</span> <span style='color: #795da3'>N</span> <span style='color: #333333'>be</span> <span style='color: #333333'>number</span> <span style='color: #333333'>of</span> <span style='color: #333333'>discs</span>;
34-
<span style='color: #0086b3'>Let</span> <span style='color: #795da3'>A</span> <span style='color: #333333'>be</span> <span style='color: #333333'>first</span> <span style='color: #333333'>rod</span>;
35-
<span style='color: #0086b3'>Let</span> <span style='color: #795da3'>B</span> <span style='color: #333333'>be</span> <span style='color: #333333'>second</span> <span style='color: #333333'>rod</span>;
36-
<span style='color: #0086b3'>Let</span> <span style='color: #795da3'>C</span> <span style='color: #333333'>be</span> <span style='color: #333333'>third</span> <span style='color: #333333'>rod</span>;
37-
38-
<span style='color: #a71d5d'>Unless</span> <span style='color: #183691'>Zero?</span> <span style='color: #795da3'>N</span> <span style='color: #4e4e4e'>(</span>
39-
<span style='color: #795da3'>Move</span> <span style='font-weight: bold;color: #4e4e4e'>-</span> <span style='color: #0086b3'>1</span> <span style='color: #795da3'>N</span> <span style='color: #333333'>discs</span> <span style='color: #333333'>from</span> <span style='color: #795da3'>A</span> <span style='color: #333333'>via</span> <span style='color: #795da3'>C</span> <span style='color: #333333'>to</span> <span style='color: #795da3'>B</span>;
40-
<span style='color: #183691'>Prints</span> <span style='color: #4e4e4e'>(</span><span style='color: #183691'>&quot;Move disc &quot;</span> <span style='color: #795da3'>N</span> <span style='color: #183691'>&quot; from &quot;</span> <span style='color: #795da3'>A</span> <span style='color: #183691'>&quot; to &quot;</span> <span style='color: #795da3'>C</span><span style='color: #4e4e4e'>)</span>;
41-
<span style='color: #795da3'>Move</span> <span style='font-weight: bold;color: #4e4e4e'>-</span> <span style='color: #0086b3'>1</span> <span style='color: #795da3'>N</span> <span style='color: #333333'>discs</span> <span style='color: #333333'>from</span> <span style='color: #795da3'>B</span> <span style='color: #333333'>via</span> <span style='color: #795da3'>A</span> <span style='color: #333333'>to</span> <span style='color: #795da3'>C</span>;
42-
<span style='color: #4e4e4e'>)</span>
43-
<span style='color: #4e4e4e'>)</span>;
44-
45-
<span style='color: #795da3'>Move</span> <span style='color: #0086b3'>5</span> <span style='color: #333333'>discs</span> <span style='color: #333333'>from</span> <span style='color: #183691'>&quot;a&quot;</span> <span style='color: #333333'>via</span> <span style='color: #183691'>&quot;b&quot;</span> <span style='color: #333333'>to</span> <span style='color: #183691'>&quot;c&quot;</span>
46-
</code></pre></div><p>As you can see, Cognate ignores words starting with lowercase letters, allowing them to be used to describe functionality and enhance readability. This makes Cognate codebases intuitive and maintainable.</p>
47-
<div class="code"><pre><code><span style='font-style: italic;color: #969896'>~~ Square numbers in Cognate</span>
48-
49-
<span style='color: #0086b3'>Def</span> <span style='color: #795da3'>Square</span> <span style='color: #333333'>as</span> <span style='color: #4e4e4e'>(</span><span style='font-weight: bold;color: #4e4e4e'>*</span> <span style='color: #183691'>Twin</span><span style='color: #4e4e4e'>)</span>;
50-
<span style='color: #183691'>Map</span> <span style='color: #4e4e4e'>(</span><span style='color: #795da3'>Square</span><span style='color: #4e4e4e'>)</span> <span style='color: #333333'>over</span> <span style='color: #183691'>Range</span> <span style='color: #0086b3'>1</span> <span style='color: #333333'>to</span> <span style='color: #0086b3'>10</span>;
51-
<span style='color: #183691'>Print</span>
52-
</code></pre></div><p>Cognate is a stack-oriented programming language similar to Forth or Factor, except statements are evaluated right to left. This gives the expressiveness of concatenative programming as well as the readability of prefix notation. Statements can be delimited at arbitrary points, allowing them to read as sentences would in English.</p>
53-
<div class="code"><pre><code><span style='font-style: italic;color: #969896'>~~ Prime numbers in Cognate</span>
54-
55-
<span style='color: #0086b3'>Def</span> <span style='color: #795da3'>Factor</span> <span style='color: #4e4e4e'>(</span><span style='color: #183691'>Zero?</span> <span style='color: #183691'>Modulo</span> <span style='color: #183691'>Swap</span><span style='color: #4e4e4e'>)</span>;
56-
57-
<span style='color: #0086b3'>Def</span> <span style='color: #795da3'>Primes</span> <span style='color: #4e4e4e'>(</span>
58-
<span style='color: #0086b3'>Let</span> <span style='color: #795da3'>U</span> <span style='color: #333333'>is</span> <span style='color: #333333'>upper</span> <span style='color: #333333'>bound</span>;
59-
<span style='color: #333333'>initially</span> <span style='color: #794da3'>List</span> <span style='color: #4e4e4e'>(</span><span style='color: #4e4e4e'>)</span>;
60-
<span style='color: #a71d5d'>For</span> <span style='color: #183691'>Range</span> <span style='color: #0086b3'>2</span> <span style='color: #333333'>to</span> <span style='color: #795da3'>U</span> <span style='color: #4e4e4e'>(</span>
61-
<span style='color: #0086b3'>Let</span> <span style='color: #795da3'>P</span> <span style='color: #333333'>is</span> <span style='color: #333333'>potential</span> <span style='color: #333333'>prime</span>;
62-
<span style='color: #0086b3'>Let</span> <span style='color: #795da3'>Found</span> <span style='color: #333333'>be</span> <span style='color: #333333'>list</span> <span style='color: #333333'>of</span> <span style='color: #333333'>found</span> <span style='color: #333333'>primes</span>;
63-
<span style='color: #0086b3'>Let</span> <span style='color: #795da3'>To-check</span> <span style='color: #333333'>be</span> <span style='color: #a71d5d'>Take-while</span> <span style='color: #4e4e4e'>(</span><span style='font-weight: bold;color: #4e4e4e'>&lt;=</span> <span style='color: #183691'>Sqrt</span> <span style='color: #795da3'>P</span><span style='color: #4e4e4e'>)</span> <span style='color: #795da3'>Found</span>;
64-
<span style='color: #a71d5d'>When</span> <span style='color: #183691'>All</span> <span style='color: #4e4e4e'>(</span><span style='font-weight: bold;color: #4e4e4e'>Not</span> <span style='color: #795da3'>Factor</span> <span style='color: #333333'>of</span> <span style='color: #795da3'>P</span><span style='color: #4e4e4e'>)</span> <span style='color: #795da3'>To-check</span> <span style='color: #4e4e4e'>(</span>
65-
<span style='color: #183691'>Append</span> <span style='color: #795da3'>P</span>
66-
<span style='color: #4e4e4e'>)</span> <span style='color: #333333'>to</span> <span style='color: #795da3'>Found</span>
67-
<span style='color: #4e4e4e'>)</span>
68-
<span style='color: #4e4e4e'>)</span>;
69-
70-
<span style='color: #183691'>Print</span> <span style='color: #795da3'>Primes</span> <span style='color: #333333'>up</span> <span style='color: #333333'>to</span> <span style='color: #0086b3'>1000</span>;
71-
</code></pre></div><p>Cognate borrows from other concatenative languages, but also adds unique features of its own.</p>
72-
<ul>
73-
<li>Point-free functions</li>
74-
<li>Operation chaining</li>
75-
<li>Multiple return values</li>
76-
<li>Combinator oriented programming</li>
77-
<li>Predicate pattern matching</li>
78-
<li>Natural language programming</li>
79-
</ul>
80-
<p>Interested? Read the <a href="/learn/">tutorial</a>, check out the <a href="https://cognate-playground.hedy.dev/">interactive web playground</a>, or visit our <a href="https://github.com/cognate-lang/cognate">GitHub repository</a>.</p>
81-
82-
83-
</main>
84-
<br /><br /><br />
85-
</body>
86-
</html>
1+
<!doctype html><html><head><meta name=generator content="Hugo 0.130.0"><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=wow/main.min.css><title>About</title></head><body><main><h1 id=cognate>Cognate</h1><h2 id=readable-and-concise-concatenative-programming>Readable and concise concatenative programming</h2><div class=code><pre><code>
2+
~~ Fizzbuzz in Cognate
3+
4+
Def Multiple as (Zero? Modulo);
5+
6+
Def Fizzbuzz
7+
Case (Multiple of 15) is "fizzbuzz"
8+
Case (Multiple of 3) is "fizz"
9+
Case (Multiple of 5) is "buzz"
10+
otherwise ();
11+
12+
For each in Range 1 to 100 (Print Fizzbuzz)
13+
</code></pre></div><p>Cognate is a project aiming to create a human readable programming language with as little syntax as possible. Where natural language programming usually uses many complex syntax rules, instead Cognate takes them away. What it adds is simple, a way to embed comments into statements.</p><div class=code><pre><code>
14+
~~ Towers of Hanoi in Cognate
15+
16+
Def Move discs as (
17+
18+
Let N be number of discs;
19+
Let A be first rod;
20+
Let B be second rod;
21+
Let C be third rod;
22+
23+
Unless Zero? N (
24+
Move - 1 N discs from A via C to B;
25+
Prints ("Move disc " N " from " A " to " C);
26+
Move - 1 N discs from B via A to C;
27+
)
28+
);
29+
30+
Move 5 discs from "a" via "b" to "c"
31+
</code></pre></div><p>As you can see, Cognate ignores words starting with lowercase letters, allowing them to be used to describe functionality and enhance readability. This makes Cognate codebases intuitive and maintainable.</p><div class=code><pre><code>
32+
~~ Square numbers in Cognate
33+
34+
Def Square as (* Twin);
35+
Map (Square) over Range 1 to 10;
36+
Print
37+
</code></pre></div><p>Cognate is a stack-oriented programming language similar to Forth or Factor, except statements are evaluated right to left. This gives the expressiveness of concatenative programming as well as the readability of prefix notation. Statements can be delimited at arbitrary points, allowing them to read as sentences would in English.</p><div class=code><pre><code>
38+
~~ Prime numbers in Cognate
39+
40+
Def Factor (Zero? Modulo Swap);
41+
42+
Def Primes (
43+
Let U is upper bound;
44+
initially List ();
45+
For Range 2 to U (
46+
Let P is potential prime;
47+
Let Found be list of found primes;
48+
Let To-check be Take-while (<= Sqrt P) Found;
49+
When All (Not Factor of P) To-check (
50+
Append P
51+
) to Found
52+
)
53+
);
54+
55+
Print Primes up to 1000;
56+
</code></pre></div><p>Cognate borrows from other concatenative languages, but also adds unique features of its own.</p><ul><li>Point-free functions</li><li>Operation chaining</li><li>Multiple return values</li><li>Combinator oriented programming</li><li>Predicate pattern matching</li><li>Natural language programming</li></ul><p>Interested? Read the <a href=/learn/>tutorial</a>, check out the <a href=https://cognate-playground.hedy.dev/>interactive web playground</a>, or visit our <a href=https://github.com/cognate-lang/cognate>GitHub repository</a>.</p></main><br><br><br></body></html>

public/index.xml

+5-25
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2-
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3-
<channel>
4-
<title>About on Cognate: Readable and concise concatenative programming</title>
5-
<link>https://cognate-lang.github.io/</link>
6-
<description>Recent content in About on Cognate: Readable and concise concatenative programming</description>
7-
<generator>Hugo</generator>
8-
<language>en-us</language>
9-
<atom:link href="https://cognate-lang.github.io/index.xml" rel="self" type="application/rss+xml" />
10-
<item>
11-
<title>Learn Cognate</title>
12-
<link>https://cognate-lang.github.io/learn/</link>
13-
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
14-
<guid>https://cognate-lang.github.io/learn/</guid>
15-
<description>Learn Cognate A brief introduction to the language Install First install CognaC the Cognate Compiler from here using the provided instructions. Currently CognaC will run on recent Linux or Mac systems. Windows users can install it onto the Windows Subsystem for Linux &amp;ndash; native Windows support is planned.&#xA;Invoking CognaC is simple. If you have a file named foo.cog containing a Cognate program, it can be compiled into an executable named foo with the following command.</description>
16-
</item>
17-
<item>
18-
<title>Prelude</title>
19-
<link>https://cognate-lang.github.io/reference/prelude/</link>
20-
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
21-
<guid>https://cognate-lang.github.io/reference/prelude/</guid>
22-
<description>Prelude Drop Discard the top stack item.&#xA;Print Drop &#34;foo&#34; &#34;bar&#34;; Source Def Drop as ( Let X ); Swap Swaps the top two stack items.&#xA;Print Swap 1 2; Source Def Swap as ( Let X ; Let Y ; Y X ); Do Execute a block.&#xA;Do ( Print &#34;hello world!&#34; ); Source Def Do as ( Def F ; F ); Any? Takes a parameter of any type and returns True</description>
23-
</item>
24-
</channel>
25-
</rss>
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>About on Cognate: Readable and concise concatenative programming</title><link>wow/</link><description>Recent content in About on Cognate: Readable and concise concatenative programming</description><generator>Hugo</generator><language>en-us</language><atom:link href="wow/index.xml" rel="self" type="application/rss+xml"/><item><title>Learn Cognate</title><link>wow/learn/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>wow/learn/</guid><description>Learn Cognate A brief introduction to the language Install First install CognaC the Cognate Compiler from here using the provided instructions. Currently CognaC will run on recent Linux or Mac systems. Windows users can install it onto the Windows Subsystem for Linux &amp;ndash; native Windows support is planned.
2+
Invoking CognaC is simple. If you have a file named foo.cog containing a Cognate program, it can be compiled into an executable named foo with the following command.</description></item><item><title>Prelude</title><link>wow/reference/prelude/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>wow/reference/prelude/</guid><description>Prelude Drop Discard the top stack item.
3+
Print Drop "foo" "bar"; Source Def Drop as ( Let X ); Swap Swaps the top two stack items.
4+
Print Swap 1 2; Source Def Swap as ( Let X ; Let Y ; Y X ); Do Execute a block.
5+
Do ( Print "hello world!" ); Source Def Do as ( Def F ; F ); Any? Takes a parameter of any type and returns True</description></item></channel></rss>

0 commit comments

Comments
 (0)