<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jérémie Astor</title>
    <description>The latest articles on Forem by Jérémie Astor (@fennecdjay).</description>
    <link>https://forem.com/fennecdjay</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F213839%2Fd716c28d-927b-4782-85be-42d3682e5451.gif</url>
      <title>Forem: Jérémie Astor</title>
      <link>https://forem.com/fennecdjay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/fennecdjay"/>
    <language>en</language>
    <item>
      <title>Gwion changes home! (aka growing from hacktoberfest)</title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Sun, 18 Oct 2020 19:53:21 +0000</pubDate>
      <link>https://forem.com/gwion/gwion-changes-home-aka-growing-from-hacktoberfest-36j8</link>
      <guid>https://forem.com/gwion/gwion-changes-home-aka-growing-from-hacktoberfest-36j8</guid>
      <description>&lt;p&gt;A few years ago, I started writing a programming language to help me in various musical tasks: I loved &lt;a href="http://chuck.stanford.edu/"&gt;chuck&lt;/a&gt; so much, but I came to a point where it was not that &lt;em&gt;usable&lt;/em&gt; in terms of performance, so I decided to make my own.&lt;/p&gt;

&lt;p&gt;It was a great opportunity to learn about more programming and to add a few feature if missed (sometimes badly) in chuck: things like function pointers and generics, to start with.&lt;/p&gt;

&lt;p&gt;It all finally came to the point where a &lt;a href="https://github.com/orgs/Gwion/teams/main"&gt;team&lt;/a&gt; built and, Hacktoberfest helping, I had to move all that work on the &lt;a href="https://github.com/Gwion"&gt;organization&lt;/a&gt; account.&lt;/p&gt;

&lt;p&gt;In the end, I think and hope it'll help &lt;a href="https://github.com/Gwion/Gwion"&gt;this project&lt;/a&gt; grow, become more and more usable and build its community.&lt;/p&gt;




&lt;p&gt;Don't forget is still hacktoberfest, and you can contribute this project! A summary on all issues can be found &lt;a href="https://github.com/Gwion/Gwion/issues/195"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you are interrested in participating in Gwion's developement project, please comment &lt;a href="https://github.com/Gwion/Gwion/issues/180"&gt;here&lt;/a&gt;, we will be happy to invite you.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>hacktoberfest</category>
      <category>proglangdesign</category>
      <category>gwion</category>
    </item>
    <item>
      <title>Hello, Gwion!</title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Mon, 28 Sep 2020 16:00:53 +0000</pubDate>
      <link>https://forem.com/fennecdjay/hello-gwion-6hm</link>
      <guid>https://forem.com/fennecdjay/hello-gwion-6hm</guid>
      <description>&lt;h1&gt;
  
  
  Hello, Gwion!
&lt;/h1&gt;

&lt;p&gt;I've been posting about &lt;a href="https://github.com/fennecdjay/Gwion"&gt;Gwion&lt;/a&gt; here for a while, but never explaining quite clearly what the project could do.&lt;br&gt;
I'm hoping this post while help people have an idea of that.&lt;br&gt;
At the end of this tutorial, you should be able to hear sound generated by Gwion in your browser 😄&lt;/p&gt;
&lt;h3&gt;
  
  
  Dependencies
&lt;/h3&gt;

&lt;p&gt;Please make sure all these are installed on your computer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A C compiler.
Gwion is tested with &lt;a href="https://gcc.gnu.org/"&gt;gcc&lt;/a&gt; and &lt;a href="https://clang.llvm.org"&gt;clang&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.gnu.org/software/make/"&gt;make&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;a terminal emulator. (I use &lt;a href="https://sw.kovidgoyal.net/kitty/"&gt;kitty&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://libwebsockets.org/"&gt;libwebsockets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Soundpipe. The original repo has been removed, but you can still find copy on github.
You can try &lt;a href="https://github.com/shybyte/soundpipe"&gt;this one&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now you're all set, let me suggest you first follow instructions in&lt;br&gt;
&lt;a href="https://dev.to/fennecdjay/building-a-project-from-markdown-57gf"&gt;this short post&lt;/a&gt; and get back reading here, it'll save you most of the burden (as in just read 😄)&lt;/p&gt;
&lt;h2&gt;
  
  
  Gwion
&lt;/h2&gt;

&lt;p&gt;First we need to get gwion, we'll follow the basic procedure,&lt;br&gt;
but we will also need some plugins, so we add &lt;code&gt;plug&lt;/code&gt; to the &lt;code&gt;submodule update&lt;/code&gt; command&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;install_gwion.sh&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/fennecdjay/Gwion
&lt;span class="nb"&gt;cd &lt;/span&gt;Gwion
git submodule update &lt;span class="nt"&gt;--init&lt;/span&gt; util ast plug
make
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Building the plugins
&lt;/h3&gt;

&lt;p&gt;For this project we need a few plugins.&lt;br&gt;&lt;br&gt;
Let's build them too.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;plugins.sh&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;Gwion/plug/Soundpipe
make
&lt;span class="nb"&gt;cd&lt;/span&gt; ../Modules
make
&lt;span class="nb"&gt;cd&lt;/span&gt; ../WebSocket
make
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The browser part
&lt;/h2&gt;

&lt;p&gt;Now, since the goal is to hear Gwion's audio output from the browser,&lt;br&gt;
we'll need some javascript and html&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;gwion_ws_test.js&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ws://localhost:1111&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;BUFLEN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;512&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;NCHAN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;scriptNode&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;audioCtx&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;outsamples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Float32Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BUFLEN&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;volume&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;gwionWsSetVolume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;volume&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;gwionWsFillBuffer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;audioProcessingEvent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;next&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;outputBuffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;audioProcessingEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;outputBuffer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;channel&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;channel&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;NCHAN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;outputData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;outputBuffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getChannelData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;sample&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;sample&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;BUFLEN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;sample&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="nx"&gt;outputData&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;outsamples&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;sample&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;channel&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nx"&gt;BUFLEN&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;volume&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;gwionWsOnOpen&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;audioCtx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AudioContext&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;webkitAudioContext&lt;/span&gt;&lt;span class="p"&gt;)();&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;audioCtx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sampleRate&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;scriptNode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;audioCtx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createScriptProcessor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BUFLEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;NCHAN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;NCHAN&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;scriptNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onaudioprocess&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;gwionWsFillBuffer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;scriptNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;audioCtx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;gwionWsOnMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;//  if(e.data instanceof ArrayBuffer)&lt;/span&gt;
  &lt;span class="nx"&gt;outsamples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Float32Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;gwionWsOnClose&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;audioCtx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;scriptNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;disconnect&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;audioCtx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Connection closed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;gwionWsInit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;ws&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;WebSocket&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nx"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Web socket server not found at url: &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onopen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;gwionWsOnOpen&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onmessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;gwionWsOnMessage&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;onclose&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;gwionWsOnClose&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;ws&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;binaryType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;arraybuffer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;gwionWsOnLoad&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;WebSocket&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nx"&gt;gwionWsInit&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;else&lt;/span&gt;
    &lt;span class="nx"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;WebSocket NOT supported by your Browser!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;gwion_ws_test.html&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE HTML&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"gwion_ws_test.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"gwionWsOnLoad();"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Connect&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&amp;lt;p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"volumeSlider"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"range"&lt;/span&gt; &lt;span class="na"&gt;min=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;max=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"0.5"&lt;/span&gt; &lt;span class="na"&gt;step=&lt;/span&gt;&lt;span class="s"&gt;"0.01"&lt;/span&gt; &lt;span class="na"&gt;oninput&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Contributing
&lt;/h3&gt;

&lt;p&gt;You quite probably have a better knowledge of javascript than me.&lt;br&gt;
Feel free to share your improvements and submit a PR.&lt;br&gt;
Using Web assembly and switching from ScriptProcessor to AudioWorklet&lt;br&gt;
would be great additions!&lt;/p&gt;
&lt;h2&gt;
  
  
  Some life-easing script
&lt;/h2&gt;

&lt;p&gt;Now we got all the pieces.&lt;br&gt;&lt;br&gt;
We just need to assemble all this.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ease.sh&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# create a 'libs' directory to store our plugins&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;libs
&lt;span class="c"&gt;# copy all the plugins we built into 'libs'&lt;/span&gt;
&lt;span class="nb"&gt;cp &lt;/span&gt;Gwion/plug/&lt;span class="k"&gt;*&lt;/span&gt;/&lt;span class="k"&gt;*&lt;/span&gt;.so libs
&lt;span class="c"&gt;# '-s 44100' as most browsers will output sound at that samplerate&lt;/span&gt;
&lt;span class="c"&gt;# '-p libs' tell gwion where to look for plugins&lt;/span&gt;
&lt;span class="c"&gt;# '-d ws' use 'ws' (aka WebSocket) driver&lt;/span&gt;
&lt;span class="c"&gt;# '$@' pass all arguments to gwion&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'./Gwion/gwion -s 44100 -p libs -d ws $@'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; run.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  A sound synthesis Hello World
&lt;/h2&gt;

&lt;p&gt;The sound synthesis equivalent of &lt;em&gt;hello world&lt;/em&gt; seems to be 5 seconds of a sine generator, at 440 hertz.&lt;br&gt;&lt;br&gt;
Let's just do that.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;hello_sine.gw&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#! Create a Sine generator and connect it to audio output
&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt; &lt;span class="n"&gt;SinOsc&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;dac&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="cp"&gt;#! let five seconds pass
&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;second&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;test.sh&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# do nothing without a BROWSER variable&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$BROWSER&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;then
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"please set BROWSER environment variable"&lt;/span&gt;
  &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;span class="nv"&gt;$BROWSER&lt;/span&gt; gwion_ws_test.html &amp;amp;!
bash run.sh hello_sine.gw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might now see the test page in your browser.&lt;br&gt;
Click the &lt;code&gt;Connect&lt;/code&gt; button and you might here something! 🍾&lt;/p&gt;

&lt;h2&gt;
  
  
  More to come
&lt;/h2&gt;

&lt;p&gt;Hopefully this post will get some support, and it'll motivate me to continue.&lt;br&gt;
I think the second episode will demonstrate a simple but interesting psycho-acoustic experience,&lt;br&gt;
and the third should show how to build a simple melody.&lt;br&gt;
Since Gwion can obviously do so much more, there might be a ton of follow-up articles 😄&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>proglangdesign</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Building a project from markdown</title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Sun, 27 Sep 2020 18:08:04 +0000</pubDate>
      <link>https://forem.com/fennecdjay/building-a-project-from-markdown-57gf</link>
      <guid>https://forem.com/fennecdjay/building-a-project-from-markdown-57gf</guid>
      <description>&lt;h1&gt;
  
  
  Building a project from markdown
&lt;/h1&gt;

&lt;p&gt;This post is intented as an helper for my next one 😄&lt;/p&gt;

&lt;p&gt;It aims to briefly demonstrate how one can use &lt;a href="https://github.com/fennecdjay/mdr"&gt;mdr&lt;/a&gt;&lt;br&gt;
to build a project from a mdr file, which happens to be a markdown file&lt;br&gt;
with few annotations.&lt;/p&gt;

&lt;p&gt;Since I not yet comfortable with technical nor post writing,&lt;br&gt;
I'm leaving a (hopefully commented) script do the explanation.&lt;br&gt;
Please read before running 😄&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# create a new directory and cd into it&lt;/span&gt;
&lt;span class="nb"&gt;mkdir &lt;/span&gt;GwionTest
&lt;span class="nb"&gt;cd &lt;/span&gt;GwionTest

&lt;span class="c"&gt;# clone, build and install mdr&lt;/span&gt;
git clone https://github.com/fennecdjay/mdr
&lt;span class="nb"&gt;cd &lt;/span&gt;mdr
make
&lt;span class="nb"&gt;sudo &lt;/span&gt;make &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# get back to GwionTest directory&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; ..

&lt;span class="c"&gt;# get the mdr file&lt;/span&gt;
curl https://raw.githubusercontent.com/fennecdjay/devto.sh/master/mdr/HelloGwion.mdr &lt;span class="nt"&gt;-o&lt;/span&gt; HelloGwion.mdr

&lt;span class="c"&gt;# run mdr on the file, thus building the project&lt;/span&gt;
&lt;span class="c"&gt;# set the BROWSER variable to the executable of the browser you use&lt;/span&gt;
&lt;span class="c"&gt;# e.g: BROWSER=dissenter-browser mdr HelloGwion.mdr&lt;/span&gt;
&lt;span class="nv"&gt;BROWSER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;your browser here&amp;gt; mdr HelloGwion.mdr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I you see any issues with the wording or anything in this post or the mdr file,&lt;br&gt;
please let me know.&lt;/p&gt;

</description>
      <category>showdev</category>
    </item>
    <item>
      <title>How do you make banners for your posts? </title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Sun, 27 Sep 2020 17:52:12 +0000</pubDate>
      <link>https://forem.com/fennecdjay/how-do-you-make-banners-for-your-posts-2d00</link>
      <guid>https://forem.com/fennecdjay/how-do-you-make-banners-for-your-posts-2d00</guid>
      <description>&lt;p&gt;For this one and my next post I'm using &lt;a href="https://christopherkade.com/banner-generator/"&gt;this&lt;/a&gt;, thanks to a fellow DEV member, but last time I tried to do &lt;a href="https://dev.to/fennecdjay/github-discussions-in-your-terminal-4cbd"&gt;one&lt;/a&gt; myself, I got bad reviews (which were all pretty sensible).&lt;/p&gt;

&lt;p&gt;I'd like to be able to have &lt;a href="https://github.com/fennecdjay/Gwion"&gt;Gwion&lt;/a&gt;'s &lt;a href="https://gist.githubusercontent.com/fennecdjay/44d29b1c18b043e5a1d56a958e4ee524/raw/f85343677357b690e579f7c9f87f7efd3368d4d8/gwion-logo.svg"&gt;logo&lt;/a&gt; and add text to it programmatically. Any idea how do that?&lt;/p&gt;

&lt;p&gt;More important, what do you use?&lt;/p&gt;




&lt;p&gt;EDIT: Changed the (missing) banner for one I made using canva.com, according to the suggestions.&lt;br&gt;
The site is very usable, but doesn't seem to have an API, so I might change at one point.&lt;/p&gt;

</description>
      <category>help</category>
      <category>watercooler</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How can I make my posts more discoverable? </title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Wed, 16 Sep 2020 16:37:56 +0000</pubDate>
      <link>https://forem.com/fennecdjay/how-can-i-make-my-posts-more-discoverable-59ed</link>
      <guid>https://forem.com/fennecdjay/how-can-i-make-my-posts-more-discoverable-59ed</guid>
      <description>&lt;p&gt;I'm asking this because my &lt;a href="https://dev.to/fennecdjay/github-discussions-in-your-terminal-4cbd"&gt;last post&lt;/a&gt; reached almost nobody. While most of the stuff I've been writing here is obviously low quality, I feel this particular post deserves some interest, and to be honest, I'm eager to get some feedback on this work.&lt;/p&gt;

&lt;p&gt;&lt;span&gt;Photo by &lt;a href="https://unsplash.com/@isaacdavis?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Isaac Davis&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/discovery?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

</description>
      <category>help</category>
      <category>discuss</category>
    </item>
    <item>
      <title>A new syntax for Gwion!</title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Wed, 16 Sep 2020 11:22:39 +0000</pubDate>
      <link>https://forem.com/fennecdjay/github-discussions-in-your-terminal-4cbd</link>
      <guid>https://forem.com/fennecdjay/github-discussions-in-your-terminal-4cbd</guid>
      <description>&lt;h1&gt;
  
  
  Syntax changes for Gwion
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Check it &lt;a href="https://github.com/fennecdjay/Gwion/tree/NewSyntax"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I tried to address the syntax problems in Gwion.&lt;br&gt;
Here's what I changed:&lt;/p&gt;
&lt;h2&gt;
  
  
  Declaration
&lt;/h2&gt;

&lt;p&gt;Declarations needs a prefix&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;var&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ref&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nonnull&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;const&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nonnull ref&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;const ref&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;const nonnull&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;const nonnull ref&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This fixes the ambiguity of placement between &lt;code&gt;const&lt;/code&gt;, &lt;code&gt;nonnull&lt;/code&gt; and &lt;code&gt;ref&lt;/code&gt; and makes it easy both for the reader and the parser to know when a variable is declared.&lt;/p&gt;

&lt;p&gt;Also, there is no longer a need to use &lt;code&gt;-&amp;gt;&lt;/code&gt; when declaring member types.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;old syntax&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;C&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;D&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;D&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;new syntax&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;C&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;D&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="cp"&gt;#! with the new 'var' modifier
&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt; &lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;D&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Acces Specifier
&lt;/h2&gt;

&lt;p&gt;Attained consistency in placement.&lt;br&gt;
Now it is always:&lt;br&gt;
  &lt;code&gt;static&lt;/code&gt; or &lt;code&gt;global&lt;/code&gt; or nothing&lt;br&gt;
  followed by&lt;br&gt;
  &lt;code&gt;private&lt;/code&gt; or &lt;code&gt;protect&lt;/code&gt; or nothing&lt;/p&gt;
&lt;h2&gt;
  
  
  Templates
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;improve template placement consistency: now always on the right.&lt;/li&gt;
&lt;li&gt;change &lt;code&gt;&amp;lt;~xxx~&amp;gt;&lt;/code&gt; to &lt;code&gt;:[xxx]&lt;/code&gt;. shorter and can be &lt;em&gt;packed&lt;/em&gt; &lt;code&gt;Ptr:[:[int]Ptr]&lt;/code&gt; (before: &lt;code&gt;&amp;lt;~&amp;lt;~int~&amp;gt;Ptr ~&amp;gt;Ptr&lt;/code&gt; with he space mandatory)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So now all template can be written &lt;code&gt;xxx:[y,z]&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  new keyword: &lt;em&gt;funcdef&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;to disambiguate with &lt;em&gt;typedef&lt;/em&gt; used for type aliases.&lt;/p&gt;
&lt;h2&gt;
  
  
  Ability to fix functions
&lt;/h2&gt;

&lt;p&gt;Inspired by a similar feature in haskell, you can now write&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#! Automatic conversion to pointer for the first argument
#! default of value 1 for the second argument
&lt;/span&gt;&lt;span class="n"&gt;fun&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Ptr&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;+=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="cp"&gt;#! declare a variable
&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cp"&gt;#! traditionnal
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;     &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cp"&gt;#! chuck style
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;add&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cp"&gt;#! infix
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;     &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cp"&gt;#! prefix
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;     &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cp"&gt;#! postfix
&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;       &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I think that's all (well that and the usual bug fix here and there).&lt;/p&gt;

&lt;p&gt;In my opinion, this is a huge improvement, but it's now up to you to tell me if there is something wrong, if you like it,  whatever...&lt;/p&gt;

&lt;p&gt;If nobody sees a problem with it, I'll merge next week.&lt;/p&gt;

</description>
      <category>proglangdesign</category>
      <category>gwion</category>
      <category>programminglanguagedesign</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Searching collaborators for a programming language</title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Tue, 25 Aug 2020 18:31:48 +0000</pubDate>
      <link>https://forem.com/fennecdjay/searching-collaborators-for-a-programming-language-3io0</link>
      <guid>https://forem.com/fennecdjay/searching-collaborators-for-a-programming-language-3io0</guid>
      <description>&lt;p&gt;I created a github organization to discuss development of &lt;a href="https://github.com/fennecdjay/Gwion"&gt;Gwion&lt;/a&gt;, please contact me (and provide your github nick) if you're interrested.&lt;/p&gt;

</description>
      <category>programminglanguagedesign</category>
      <category>proglangdesign</category>
      <category>help</category>
      <category>gwion</category>
    </item>
    <item>
      <title>What would be the simplest way to output sound to browser from a C program?</title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Tue, 11 Aug 2020 11:07:49 +0000</pubDate>
      <link>https://forem.com/fennecdjay/what-would-be-the-simplest-way-to-output-sound-to-browser-from-a-c-program-4m2n</link>
      <guid>https://forem.com/fennecdjay/what-would-be-the-simplest-way-to-output-sound-to-browser-from-a-c-program-4m2n</guid>
      <description>&lt;h1&gt;
  
  
  Getting gwion to the browser
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Some context
&lt;/h2&gt;

&lt;p&gt;I made this &lt;a href="https://github.com/fennecdjay/Gwion"&gt;progamming language&lt;/a&gt; to help in some of my musical projects. A few days ago I made a &lt;a href="https://repl.it/@GwionLang/Gwion-latest"&gt;Repl&lt;/a&gt;. I think I have a way to provide drivers and libraries to it (leveraging github releases).&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;As of now, I have no driver that could send the sound to the browser. I guess I could easily hack something around libsndfile to provide say, a .wav, but it would really be better if I could have some realtime output to web-browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do you have an idea?
&lt;/h2&gt;

&lt;p&gt;So I'm asking here, as many DEV users have a good knowledge of web techniques and on my side I know, well, music and C.&lt;/p&gt;

</description>
      <category>help</category>
      <category>gwion</category>
    </item>
    <item>
      <title>Is replit tag broken?</title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Sat, 08 Aug 2020 14:29:07 +0000</pubDate>
      <link>https://forem.com/fennecdjay/is-replit-tag-broken-5137</link>
      <guid>https://forem.com/fennecdjay/is-replit-tag-broken-5137</guid>
      <description>&lt;p&gt;I just added &lt;a href="https://github.com/fennecdjay/Gwion"&gt;Gwion&lt;/a&gt; to &lt;a href="//repl.it"&gt;replit&lt;/a&gt;. Well, I had already done so, but now I leverage github releases, so it loads way faster.&lt;br&gt;
I wanted to shared it on &lt;a href="//dev.to"&gt;dev&lt;/a&gt;, as I have some remaining question, but it looks that the liquid tag for embedding replit is broken: on my machine, I can't see what I type ...&lt;br&gt;
Is it just me or did I uncover some issue?&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@GwionLang/Gwion-latest?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;For sure one can check it &lt;a href="https://repl.it/@GwionLang/Gwion-latest"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There's the mandatory &lt;em&gt;hello world&lt;/em&gt;, that you can run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./gwion hello_world.gw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Maybe it is only broken in the preview, in which case I'll delete this post.&lt;/p&gt;

</description>
      <category>question</category>
      <category>replit</category>
    </item>
    <item>
      <title>What is needed for easy onboarding?</title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Sun, 26 Jul 2020 19:44:35 +0000</pubDate>
      <link>https://forem.com/fennecdjay/what-is-needed-for-easy-onboarding-15d8</link>
      <guid>https://forem.com/fennecdjay/what-is-needed-for-easy-onboarding-15d8</guid>
      <description>&lt;p&gt;Pretty much everything in the title...  &lt;/p&gt;

&lt;p&gt;I need teammates for &lt;a href="https://github.com/fennecdjay/Gwion"&gt;Gwion&lt;/a&gt;.&lt;br&gt;&lt;br&gt;
Currently there is also most no user doc, let alone the dev one. I just started adding doxygen comments to the &lt;a href="https://github.com/fennecdjay/gwion-util"&gt;util&lt;/a&gt; directory (not pushed yet), hoping it helps.  &lt;/p&gt;

&lt;p&gt;But maybe there is something I can do before that would be more useful.&lt;br&gt;
What would you do?&lt;/p&gt;

</description>
      <category>help</category>
      <category>proglangdesign</category>
      <category>gwion</category>
      <category>programminglanguagedesign</category>
    </item>
    <item>
      <title>Want to help development of a programming language?</title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Thu, 23 Jul 2020 16:10:22 +0000</pubDate>
      <link>https://forem.com/fennecdjay/want-to-help-development-of-a-programming-language-4p1o</link>
      <guid>https://forem.com/fennecdjay/want-to-help-development-of-a-programming-language-4p1o</guid>
      <description>&lt;p&gt;It's been a few years since I started developing my own programming language, because I loved &lt;a href="https://chuck.cs.princeton.edu/"&gt;chuck&lt;/a&gt;, but I felt it lacked at least generics and function pointers and  performance was quite poor . As of today, &lt;a href="https://github.com/fennecdjay/Gwion"&gt;Gwion&lt;/a&gt; is doing well in terms of features (even more than what I intented to have at first) and &lt;a href="https://fennecdjay.github.io/Gwion/Benchmarks.html"&gt;performance&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This niche project, IMHO, deserves some attention, and probably a community.&lt;/p&gt;

&lt;p&gt;To prevent &lt;a href="https://en.wikipedia.org/wiki/Bus_factor"&gt;bus factor&lt;/a&gt;, I'm now searching people who would like to contribute. There is much left to do in the documentation area, but I'd also greatly appreciate discussion on its evolution.&lt;/p&gt;

&lt;p&gt;Furthermore, there is &lt;a href="https://blog.repl.it/langjam?ref=newletter"&gt;this&lt;/a&gt; event coming, which I'd really like to be a part of, but I need teammates.&lt;/p&gt;

&lt;p&gt;Thank you for reading this far (I know my english can be confusing at times).&lt;/p&gt;

&lt;p&gt;What do you think? Would you join?&lt;/p&gt;

</description>
      <category>proglangdesign</category>
      <category>gwion</category>
      <category>help</category>
      <category>programminglanguagedesign</category>
    </item>
    <item>
      <title>Correct order of programming concepts for a tutorial series</title>
      <dc:creator>Jérémie Astor</dc:creator>
      <pubDate>Sat, 11 Jan 2020 15:22:06 +0000</pubDate>
      <link>https://forem.com/fennecdjay/correct-order-of-programming-concepts-for-a-tutorial-series-5f09</link>
      <guid>https://forem.com/fennecdjay/correct-order-of-programming-concepts-for-a-tutorial-series-5f09</guid>
      <description>&lt;p&gt;I want to start a tutorial series for &lt;a href="https://github.com/fennecdjay/Gwion"&gt;Gwion&lt;/a&gt;, accessible to beginners.&lt;/p&gt;

&lt;p&gt;For those who don't know &lt;strong&gt;Gwion&lt;/strong&gt;, it is an interpreted programming language, strongly typed, running on a &lt;a href="https://en.wikipedia.org/wiki/Stack_machine"&gt;stack VM&lt;/a&gt; and with a &lt;em&gt;very strong relation to time&lt;/em&gt;, as its main use is sound/music generation.&lt;/p&gt;

&lt;p&gt;Right now, I think it should start like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set things up: 
installing the language and libraries needed&lt;/li&gt;
&lt;li&gt;Sequential programming:
Just set up a sequence of instruction&lt;/li&gt;
&lt;li&gt;Use functions:
Put instructions in a function and use it instead.
Leverage this post to demonstrate function overloading&lt;/li&gt;
&lt;li&gt;Use your Own classes:
Use a class instead of a function and demonstrate inheritance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Later on will come templating for functions and classes, lambdas, functions pointers...&lt;/p&gt;

&lt;p&gt;Does it seem correct for you?&lt;br&gt;&lt;br&gt;
If not, how would you order things?  &lt;/p&gt;

&lt;p&gt;Any advice will be greatly appreciated.&lt;/p&gt;

</description>
      <category>help</category>
      <category>gwion</category>
      <category>tutorial</category>
      <category>programminglanguagedesign</category>
    </item>
  </channel>
</rss>
