gopher9

u/gopher9


r/auxlangs•

Though one can express themself even in tokipona, an auxlang should be sufficiently expressive, so it does not feel too limited compared to a native language. Here's a short list to check whether your auxlang have expressivity devices commonly found in world languages.

  • Does it have the accusative case or particle? A lot of world languages have flexible word order, so their speakers are not happy to be locked in the prison of the one word order.
  • Does it have a rich morphological derivation system? This includes combining roots, converting any word class into another word class, diminutive and augmentative suffixes, basic directions (like from/to), and so on
  • Is the morphological deriv
10

r/rust•

Long story short: it is impossible to generate reliable and fast code for a DFA recognizer in Rust.

The reason why it's impossible is simple: Rust supports neither goto nor tail call elimination. So it's impossible to represent a code with advanced control flow. And even though Rust has MIR which supports goto, it is unavailable from the procedural macros side.

The state of the art lexer for Rust, Logos uses tail calls to represent transitions between states (example). It quite fragile obviously, since there's no guarantee of tail call elimination in Rust (though LLVM can optimize it).

310

  • Recursive descent ⟷ depth first search (Prolog)
  • Earley parser ⟷ breadth first search (Datalog)
  • PEG ordered choice ⟷ Prolog cut operator
  • Lookahead ⟷ non-linearity

One may extend an earley parser with string unification, so you can parse context dependent languages. For example:

expr :- open(X), expr, closed(X) ; "".
open(X) :- "<", X: word, ">".
closed(X) :- "</", X: word, ">".
word :- ['A'..'Z' 'a'..'z']+.

Does it terminate: yes.

UPDATE: It finds out, somebody already done something cool: https://makotokanazawa.ws.hosei.ac.jp/talks/acl_talk.pdf

3313

r/musictheory•

I felt a little bit fullstack, so I made a playable web music keyboard. It works (unless you use a smartphone or tablet to read this).

Let's use a grid to explore the concept of inversion.

This is a major third from A pointing forwards:

.   .   A   .   C#  .

This is a major third from A pointing backwards:

F   .   A   .   .   .

In music theory, flipping all interval from a given note is called inversion.

How do you inverse an interval that doesn't lie on a row? You flip both axis.

This is the A chord:

.   .   .   E   .   .
  .   .   A   .   C#
.   . 
296

r/musictheory•

Let me draw a grid:

      C   D   E   F#  G#  A#
    F   G   A   B   C#  D#
      C   D   E   F#  G#  A#

This is a whole step:

      C   D

This is a perfect fifth:

      C
        G

The shape of C major is:

      C   D   E
    F   G   A   B
      C

The shape of E major is:

              E   F#  G#
            A   B   C#  D#
              E

The shape of A minor is:

            A   B
      C   D   E
    F   G   A

The shape of E minor is:

              E   F#
        G   A   B
      C   D   E

So how do you spell your intervals and scales? You know your whole steps.

Whole steps on the C row:

58159


r/math•

I'm doing some recreational math with musical scales: https://idyll.pub/post/antiscale-2e02e3a352ed8590a5879773/ (sorry for poor writing). I found some interesting relation between the scale complement and intervals in the scale. Now I want to research relations with chirality, since the video says that self-complement scales tend to be achiral.

The problem is, chirality is... tricky. It is not very clear how to approach it even for musical sets. Googling something on chirality didn't give me much insight either.

There surely must be some kind of concept that makes everything simple. Or maybe some habbits that help to find the solution... But I'm not experienced with this kind of math.

So

14

r/tlaplus•

I want to make a formal specification for a kademlia-based P2P protocol. The purpose of the specification is not ensuring some dynamic properties, but rather having something more tangible than a text description.

Is TLA+ a good choice? What other specification languages should I consider (maybe Alloy)? Also, if TLA+ is fine, I would like to have some advices on how to write the specification.

Note that the protocol includes some rather complicated subprotocols, like onion routing.

23

r/microtonal•
  1. Set A = 432 Hz
  2. Write a piece with the tonic in At (A plus 39 cents in 31edo)
  3. So your piece is technically 432 Hz while in reality being just 7 cents sharp of 440 Hz
  4. ??????
  5. PROFIT

PS: The difference between both A is ~32 cents. The 31edo is not very optimal for the job, but it allows you to write in At Major or in Bbb Minor in the title (so nobody can call you a lier).

PPS: Occasional modulations down a diesis would be nice to have too.

122