<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang/source/primitives, branch master</title>
<subtitle>Experimental Forth-like stack language implemented in D</subtitle>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/'/>
<entry>
<title>Play around with a vector type</title>
<updated>2019-04-15T22:12:37+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2019-04-15T22:12:37+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=908d8f01d5e964971ad76909c0ec31468ee93d2d'/>
<id>908d8f01d5e964971ad76909c0ec31468ee93d2d</id>
<content type='text'>
Using _vectors_ as fundamental datatype could make for a really neat experience.

Imagine e.g.:

* fundamental arithmetic operations that apply to both vectors and scalars
* implicit component-wise or vector-wise operations
* scalar values as 1D vectors
* higher order functions to manipulate those vectors
    * `map` function that applies a (quoted?) word to all vector elements and returns the result
    * efficient parallel operations
* a rich library of vector manipulation functions
* or even: matrices as a fundamental datatype?
    * problem: probably harder to conveniently enter via a 1-D repl
* sound more and more like a RPN version of APL…

Back to reality, here is what this prototype actually adds:

* new `DList!int` based datatype alongside the existing int, string and bool types
* basic support for printing such values in a readable fashion
* new fundamental `:` word that constructs a vector of two elements
    * `1 2 :` yields `[1, 2]`
* adapted `+` and `*` to support component-wise operations
    * `1 2 : 3 +` yields `[4, 5]`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using _vectors_ as fundamental datatype could make for a really neat experience.

Imagine e.g.:

* fundamental arithmetic operations that apply to both vectors and scalars
* implicit component-wise or vector-wise operations
* scalar values as 1D vectors
* higher order functions to manipulate those vectors
    * `map` function that applies a (quoted?) word to all vector elements and returns the result
    * efficient parallel operations
* a rich library of vector manipulation functions
* or even: matrices as a fundamental datatype?
    * problem: probably harder to conveniently enter via a 1-D repl
* sound more and more like a RPN version of APL…

Back to reality, here is what this prototype actually adds:

* new `DList!int` based datatype alongside the existing int, string and bool types
* basic support for printing such values in a readable fashion
* new fundamental `:` word that constructs a vector of two elements
    * `1 2 :` yields `[1, 2]`
* adapted `+` and `*` to support component-wise operations
    * `1 2 : 3 +` yields `[4, 5]`
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename `over` to `ovr` so that all stack operations are three letter words</title>
<updated>2017-04-18T08:54:33+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-18T08:54:33+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=fa1bdcab3f371f1ec79621fbd890f3ddd8b5019c'/>
<id>fa1bdcab3f371f1ec79621fbd890f3ddd8b5019c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename boolean operators</title>
<updated>2017-04-18T08:50:59+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-18T08:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=44a8573c4d4081552320c80bf9a2ed3eaba6c91c'/>
<id>44a8573c4d4081552320c80bf9a2ed3eaba6c91c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add logic negation operation; and, or conditions</title>
<updated>2017-04-17T12:44:26+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-17T12:44:26+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=6e115f5229dc2323804b8250138339a7f62bd852'/>
<id>6e115f5229dc2323804b8250138339a7f62bd852</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add debug instruction for non-destructive printing of the whole stack</title>
<updated>2017-04-17T12:36:45+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-17T12:36:25+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=f321905b1436e888c99b4863e3943f090cbadce1'/>
<id>f321905b1436e888c99b4863e3943f090cbadce1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add some more Forth stack operators</title>
<updated>2017-04-17T12:28:38+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-17T12:28:38+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=dda2af16ce4ea439ee90390526dbd7f2b8971128'/>
<id>dda2af16ce4ea439ee90390526dbd7f2b8971128</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up state, primitives, processing distinction</title>
<updated>2017-04-16T11:29:23+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-16T11:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=fe08adffcf1446dce2a7d366f7f12c90fdce7e58'/>
<id>fe08adffcf1446dce2a7d366f7f12c90fdce7e58</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Extract variable management, move into `state` package</title>
<updated>2017-04-16T11:17:22+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-16T11:17:22+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=44f419264898f84fe5536f3ea159c18b381e6083'/>
<id>44f419264898f84fe5536f3ea159c18b381e6083</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Hide module implementation details</title>
<updated>2017-04-15T20:34:47+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-15T20:33:15+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=b1fa3024fd2fae76e6e0345861f3fa17b4a082ef'/>
<id>b1fa3024fd2fae76e6e0345861f3fa17b4a082ef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Clearly separate handling of core, conditional and definition primitives</title>
<updated>2017-04-15T16:56:35+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-15T16:56:35+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=a654500cd3084cff93e4cf866a15e7977ff0cc94'/>
<id>a654500cd3084cff93e4cf866a15e7977ff0cc94</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle definition, conditional primitive words in respective modules</title>
<updated>2017-04-15T16:16:39+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-15T16:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=568e457d5f879633adc8a33d8c2979d563556868'/>
<id>568e457d5f879633adc8a33d8c2979d563556868</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Perform custom word definition at the same level as conditional primitives</title>
<updated>2017-04-15T12:02:50+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-15T12:02:50+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=47611c4938363346be414b1cf00a63b438e043c4'/>
<id>47611c4938363346be414b1cf00a63b438e043c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add README.md, example</title>
<updated>2017-04-15T11:41:02+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-15T11:40:17+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=5ca4d7acb5545050a731b0adc2e39b3ed65b7fc9'/>
<id>5ca4d7acb5545050a731b0adc2e39b3ed65b7fc9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert structure to _dub_ build system</title>
<updated>2017-04-14T21:21:51+00:00</updated>
<author>
<name>Adrian Kummerlaender</name>
</author>
<published>2017-04-14T21:21:51+00:00</published>
<link rel='alternate' type='text/html' href='https://code.kummerlaender.eu/slang/commit/?id=c6d2b259a4f253403929f6f1104395a6a71b1be6'/>
<id>c6d2b259a4f253403929f6f1104395a6a71b1be6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
