Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Dotted values

#15

The CSPM compiler doesn't currently support dotted channels.

Reported by Douglas Creager · January 12th, 2009 @ 10:55 PM

State: resolved
Milestone: 1.0-α4
Assigned to: Douglas Creager Douglas Creager

Activity

  1. Douglas Creager
    Douglas Creager
    • Assigned user set to Douglas Creager

    January 13th, 2009 @ 12:08 AM

  2. Douglas Creager
    Douglas Creager
    • Title changed from Dotted channels to Dotted values

    It's actually dotted values that aren't supported. For instance, the following is a perfectly valid CSPM expression:

    1.2
    
    

    It's the dot of two numbers. That doesn't involve channels or events in any way. Dotted values will also come into play with datatype statements (part of ticket #17 nametype definitions) and channels that carry data (what this ticket originally called “dotted channels”).

    March 2nd, 2009 @ 06:04 PM

  3. Douglas Creager
    Douglas Creager
    • State changed from new to open

    March 2nd, 2009 @ 06:21 PM

  4. Douglas Creager
    Douglas Creager
    • Milestone set to 1.0-α4

    March 2nd, 2009 @ 06:22 PM

  5. Douglas Creager
    Douglas Creager

    (from [a086a735566dd10bebe7f0d85ccb209242c06317]) Dotted values

    This patch introduces basic support for dotted values. A dotted value is similar to a tuple:

    1.2 (1,2)

    However, dots support concatenation:

    x = 1.2 y = 3.4 x.y == 1.2.3.4

    The CSPM parser now allows you to construct dotted values using the “.” operator. We still need to add support for dotted values in patterns and type expressions.

    Lighthouse: [#15 Dotted values] http://github.com/hst/hst/commit...

    March 2nd, 2009 @ 07:34 PM

  6. Douglas Creager
    Douglas Creager

    (from [a086a735566dd10bebe7f0d85ccb209242c06317]) Dotted values

    This patch introduces basic support for dotted values. A dotted value is similar to a tuple:

    1.2 (1,2)

    However, dots support concatenation:

    x = 1.2 y = 3.4 x.y == 1.2.3.4

    The CSPM parser now allows you to construct dotted values using the “.” operator. We still need to add support for dotted values in patterns and type expressions.

    Lighthouse: [#15 Dotted values] http://github.com/hst/hst/commit...

    March 2nd, 2009 @ 07:34 PM

  7. Douglas Creager
    Douglas Creager

    (from [624f65caa7bc15a6281e6df7ece2d90bca9ed279]) Dotted values in “nametype” statements

    Dotted values in a type expression create product types, just like tuple values:

    nametype A = {0,1}.{2,3} A == {0.2, 0.3, 1.2, 1.3}

    Lighthouse: [#15 Dotted values] http://github.com/hst/hst/commit...

    March 2nd, 2009 @ 07:34 PM

  8. Douglas Creager
    Douglas Creager

    (from [624f65caa7bc15a6281e6df7ece2d90bca9ed279]) Dotted values in “nametype” statements

    Dotted values in a type expression create product types, just like tuple values:

    nametype A = {0,1}.{2,3} A == {0.2, 0.3, 1.2, 1.3}

    Lighthouse: [#15 Dotted values] http://github.com/hst/hst/commit...

    March 2nd, 2009 @ 07:34 PM

  9. Douglas Creager
    Douglas Creager
    • State changed from open to resolved

    (from [0dcc09f518d1117c73122ed5b0466a3d4fc159bb]) Dotted values in patterns

    Dotted values can occur in a pattern, such as in the parameters to a named function:

    f(a.b) = a + b

    Based on some experimentation, it turns out that the left-hand side of a dotted pattern must match the first element of a dotted value. The right-hand side must match the “rest” of the dotted value. If the dotted value only contains two elements, then that means it must match the second element. If it contains more than two elements, then that means it must match a slightly smaller dotted value:

    a.b matches 1.2 (a == 1, b == 2) a.b matches 1.2.3 (a == 1, b == 2.3) a.b.c matches 1.2.3 (a == 1, b == 2, c = 3) 1.b matches 1.2.3 (b == 2.3) a.3 DOES NOT MATCH 1.2.3 (a == 1, but 3 doesn't match 2.3)

    Lighthouse: [#15 Dotted values state:resolved] http://github.com/hst/hst/commit...

    March 2nd, 2009 @ 07:34 PM

  10. Douglas Creager
    Douglas Creager

    (from [0dcc09f518d1117c73122ed5b0466a3d4fc159bb]) Dotted values in patterns

    Dotted values can occur in a pattern, such as in the parameters to a named function:

    f(a.b) = a + b

    Based on some experimentation, it turns out that the left-hand side of a dotted pattern must match the first element of a dotted value. The right-hand side must match the “rest” of the dotted value. If the dotted value only contains two elements, then that means it must match the second element. If it contains more than two elements, then that means it must match a slightly smaller dotted value:

    a.b matches 1.2 (a == 1, b == 2) a.b matches 1.2.3 (a == 1, b == 2.3) a.b.c matches 1.2.3 (a == 1, b == 2, c = 3) 1.b matches 1.2.3 (b == 2.3) a.3 DOES NOT MATCH 1.2.3 (a == 1, but 3 doesn't match 2.3)

    Lighthouse: [#15 Dotted values state:resolved] http://github.com/hst/hst/commit...

    March 2nd, 2009 @ 07:34 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.