연결됨 다시 연결 중 다시 연결 초 연결 실패 연결 일시 중지 복구 실패
What changed in the Sollang web playground · Cover image

What changed in the Sollang web playground

Public posts

The release adds a localized UI, 31 English grammar examples, working stdin, Stage2 diagnostics, and syntax highlighting. I verified these on the public playground.

Hello, I'm Dimohy.

This time, we expanded the Sollang web playground from a simple demo page into a space where you can actually explore and use the language.

At first, I was working on a structure that stored stream results in variables and sent them back as each, along with handling event streams. When I checked it on the web, I found quite a lot that needed modification in the playground itself. There were few samples, the input examples didn’t work properly, and there was also an issue where the non-existent println2 call didn’t cause an error and skipped lines instead.

First, the screen is displayed in Korean, English, Japanese, or Chinese depending on the browser language settings. However, the sample source has been set in English so that it can be read and copied in any environment.

The number of samples has been increased to 31. From the basic output, we can see categories such as variables and types, conditions and loops, functions, string padding, arrays and containers, error handling, ownership, streams, and events. Each sample was not just listed in the list; we also used the browser Stage2 compiler to actually execute it and verify whether any output occurs.

The input was not just replicated. readInt was connected to the sollang_browser_read path so that it consumes a line from the browser’s stdin panel. In the example, when 12 and 30 are entered, the actual execution result is Sum = 42. It is not about swapping the source string or having the server execute it instead.

The compilation error paths have been corrected. Now, calls like println2 that no longer exist are not ignored, and Stage2 identifies the location and cause. It also shows correction hints when the string padding boundaries are ambiguous.

There was also one aspect that felt lacking on the screen. In Sollang syntax, control statements appear after the flow operator, just like in count! < 8 -> while { ... }, but while looks like a normal call and didn’t stand out easily. By adjusting the tokenizer priority, while, if, else, when, each, fold, and repeat have been clearly distinguished by the color of control statement keywords.

In memory terms, when the browser runs, the dynamic allocation start point is taken from __heap_base of WASM instead of an arbitrary memory end. While leveraging the advantage of delayed execution streams, this was a minor cleanup effort to reduce unnecessary memory expansion during browser runtime.

The final verification was completed with Stage2 fixed point 7/7, overall regression 785/785, public browser samples 31/31, 4 UI languages, and 6 syntax colors. It also passed stdin execution, post-editing execution, incorrect call diagnosis, and string padding diagnosis.

Some grammar rules that require advanced native-level syntax but cannot be directly implemented by the browser backend have not been hidden. The correct grammar is shown with English annotations, and the text itself that can be executed in the current browser is placed next to it. In the next step, it seems natural to reduce this difference so that all native examples can be executed directly in the browser as well.

You can check it directly.

https://sollang.slogs.dev/

0 Comments

Comments: 0

Sign in to leave a comment.

No comments yet. Write the first one.

The server connection was interrupted. Reconnect ×