4 ms·
Generating audio with literate futhark
- rowanG077 4y agoThe quality of life features in Futhark are really great. It's better then a lot of "non-research" languages.
- scaredginger 4y agoFuthark looks very cool. I generally don't buy into programming dogma, but I'm a big fan of data-oriented design these days; on top of efficiency gains, I find thinking in terms of data transforms and flows very intuitive. Plus, it's always great to have another tool to use/toy to play with
- chaosprint 4y agoInteresting language! perhaps you can add some envelop to get rid of the clicks. btw I am also developing a music DSL that can be used in browsers: https://glicol.org/ https://glicol.org/ This example here is quite relevant: https://glicol.org/tour#meta1 https://glicol.org/tour#meta1
- Munksgaard 4y agoThank you! Yeah, at some point it would be nice to do a little library of sound effects, and there we should definitely have some filters like that. To be clear, we're not doing anything in the browser (yet). Futhark literate takes a .fut file and generates a markdown file, optionally with some image, video or sound files. So (unlike your language) this is all "offline". glicol looks cool, thanks for the link!
- juliangoldsmith 4y agoI'm glad to finally see a non-Iversonian array language. I've dabbled in J a bit, and it is pretty nice. For those who haven't used array languages, the easiest comparison would be NumPy. NumPy is like a small array DSL on top of Python. Instead of having to manually iterate over arrays, you can (kinda) treat them like a single item; NumPy handles the details of iterating. I could deal with how terse J (plus APL and BQN) can be, except for the sheer number of operators. I've heard that you can figure out what they do by their shape, but that doesn't help sort through 200+ operators (aka primitives) on NuVoc. There are definitely some interesting thing in the Iversonian languages that aren't really found anywhere else. For instance, you can use a modifier (aka adverb) to swap the order of parameters to an expression. You can also convert an expression to a scan (aka reduce, IIRC) by adding a modifier on the end. Apart from the syntax, GPU acceleration for an array language is an absolute slam dunk. Given how much people pay for K/Q licenses to use for low-latency HFT, I'm baffled GPU acceleration wasn't ubiquitous the second GPGPUs came out.
- p1esk 4y agoNumPy is like a small array DSL on top of Python Numpy is small? Is there anything missing in Numpy that could be found in those esoteric languages you mentioned? I'm baffled GPU acceleration wasn't ubiquitous the second GPGPUs came out. At least in Python ecosystem, GPU acceleration has been available for a decade, provided cupy, numba, and all the ML frameworks.
- juliangoldsmith 4y ago>Numpy is small? Small might not be the right word. I mainly had broadcasting in mind when I wrote that. >Is there anything missing...? Not sure I'd call APL esoteric, given it was originally developed at IBM. My knowledge of both array languages and NumPy is limited, but one thing missing might be partitioning using a mask. An example of that would be the following snippet of J, from a WIP implementation of MTF encoding: mask <@(_1&|.)`<;.1 dict The line noise in the middle partitions dict by mask and uses a cyclic gerund to apply a different function to each partition. The ;.1 is the partition modifier; before it are the two functions separated by a tick. The second function just boxes its argument (due to different sizes). The first function rotates its argument by -1 places and then boxes it
- p1esk 4y agomask <@(_1&|.)`<;.1 dict Honestly, I'd really prefer to unpack that statement into 20 lines of clear code. Not because I'm not familiar with and not used to this syntax: my preference equally applies to similar terse Numpy statements which I can understand (but which are error prone and require mental effort).
- juliangoldsmith 4y agoTacit expressions like that are interesting and very rewarding to write, but I'd agree that it's way too terse. The Iversonian array languages tend to be like that, since they're derived from mathematical notation. (Though I have heard that tacit expressions are pretty much absent from production APL code.) The aspect I find most interesting is the way primitives can be combined to build up functionality. It's closer to a declarative syntax, where the focus is on the end result instead of the steps to get there.