# The CIRCLED Dialect: Example of the Form

**URL:** <https://revolt.metaeducation.com/forum/t/the-circled-dialect-example-of-the-form/1849>\
**Category:** Show & Tell\
**Created:** [June 26, 2022, 12:06pm UTC](https://revolt.metaeducation.com/forum/t/the-circled-dialect-example-of-the-form/1849 "2022-06-26T12:06:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hostilefork](https://revolt.metaeducation.com/forum/user_avatar/revolt.metaeducation.com/hostilefork/32/421_2.png) [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Post date:** [June 26, 2022, 12:06pm UTC](https://revolt.metaeducation.com/forum/t/the-circled-dialect-example-of-the-form/1849/1 "2022-06-26T12:06:47Z")

</div>

I was looking at this from the emscripten config file:

```
 ; Right now, either #web or #node (someday #wasm-edge ?)
 ;
 javascript-environment: #web

```

And I thought to myself: well that's kind of ugly. The comment is having to list things that would be more obviously shown by just demonstrating the options:

```
javascript-environment: circled [(#web) #node]

```

It could default to NULL if you circled nothing, but you could use NEED to suggest people needed to select something:

```
>> need number: circled [#one #two #three]
** Error: Assignment to number NEEDs argument not to be NULL

```

## It's Almost _Too_ Easy

When it's this easy, who wouldn't whip such things up?

```
circled: lambda [block [block!] <local> result] [
    parse block [
        result: try thru subparse group! [
            one <end> | panic "Circled Items Must Be Singular"
        ]
        try [thru group!, panic "Only One Circle"]
        accept (result)
    ]
]

>> circled [a (b) c]
== b

>> circled [a b c]
; null

>> circled [a (b c)]
** PANIC: Circled Items Must Be Singular

>> circled [(a) b (c)]
** PANIC: Only One Circle

```

Remarkable plasticity, and I want to see these weapons come to the code golfing field [once they are adequately Rebmooshed](https://www.youtube.com/watch?v=iDKaz1iB9wQ). 🙂

* * *

This example tipped the balance to where I decided that matching **`<end>`** should be invisible. Because I wanted a way to synthesize the result while doing the end match. Writing **`elide <end>`** is possible, but there's essentially no cases in practice where you don't want to elide the end.

```
 >> parse [1 2] ['1 <end> | panic "Not a 1 followed by the end"]
 ** PANIC: Not a 1 followed by the end

 >> parse [1] ['1 <end> | panic "Not a 1 followed by the end"]
 == 1

```

The previous result was evaluating the `<end>` to the input position at that moment of being at the end--so effectively a series at its tail:

```
 >> parse [1] ['1 <end>]
 == [] ; old behavior...how often would you want this?

```

If that's what you actually want (which no one ever did) you can can say **`<end> <here>`**.

```
 >> parse [1] ['1 <end> <here>]
 == []

```

---

<div class="post-metadata">

**Author:** ![hostilefork](https://revolt.metaeducation.com/forum/user_avatar/revolt.metaeducation.com/hostilefork/32/421_2.png) [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Post date:** [January 9, 2026, 7:55am UTC](https://revolt.metaeducation.com/forum/t/the-circled-dialect-example-of-the-form/1849/2 "2026-01-09T07:55:24Z")

</div>

> [@hostilefork](#):
>
> ```plaintext
> >> circled [a (b c)]
> ** PANIC: Circled Items Must Be Singular
> 
> >> circled [(a) b (c)]
> ** PANIC: Only One Circle
> 
> ```

Originally I thought "you wouldn't want to return a list of circled things, because how would you know if it was a circled list or a list of circles":

```
>> circled [a ([b c])]
== [b c]

>> circled [a (b) (c)]
== [b c]

```

## But SPLICE! Can Disambiguate That!

```
>> circled [a ([b c])]
== [b c]

>> circled [a (b) (c)]
== \~[b c]~\ ; antiform (splice!)

```

If you need to narrow the types, you can do that by [constraining your variables](https://revolt.metaeducation.com/forum/t/syntax-for-typechecked-values/2260/13), so the constraint "sticks" for future assignments:

```
constrain word! x: circled [a (b) c]

```

Or you can just do a one-off and ENSURE the type is what you expect for this single evaluation.

```
; Select more than one of the following
;
data: [(a) b c d (e)]

x: ensure splice! circled data

```

For that matter, [_dialected function calls_](https://revolt.metaeducation.com/forum/t/dialecting-function-calls-new-weird-powerful/2310) could let you say exactly how many things you want... succinctly!

```
; Select any two of the following
;
data: [(a) b c d (e)]

x: circled/2 data

```

**The creature from the alternate language evolution timeline strikes again!**

🐙
