{ "args": "", "askedAt": "2026-10-03T14:28:24+00:00", "compiler": "mojo_1_1_0", "firstItem": "probes/string-length", "key": "105ee8b586b56572f6bcf3cfbd1c074adb88f306e0e8b304ece7e31c3db9f155", "mode": "run", "raw": { "buildResult": { "code": 1, "compilationOptions": [ "build", "/app/example.mojo" ], "downloads": [], "execTime": 261, "executableFilename": "/nosym/tmp/compiler-explorer-compilerGTUalw/example", "inputFilename": "example.mojo", "instructionSet": "amd64", "okToCache": true, "processExecutionResultTime": 0.06521400017663836, "stderr": [ { "tag": { "column": 11, "file": "example.mojo", "line": 4, "severity": 3, "text": "error: `len(String/StringSlice)` is not supported because Mojo strings are UTF-8 encoded, so a single length is ambiguous: it could mean the number of UTF-8 bytes, the number of Unicode code points, or the number of user-visible characters (grapheme clusters). Use `s.byte_length()` or `len(s.bytes())` for the number of UTF-8 bytes, `len(s.codepoints())` for Unicode code points, or `len(s.graphemes())` for grapheme clusters." }, "text": ":4:11: error: `len(String/StringSlice)` is not supported because Mojo strings are UTF-8 encoded, so a single length is ambiguous: it could mean the number of UTF-8 bytes, the number of Unicode code points, or the number of user-visible characters (grapheme clusters). Use `s.byte_length()` or `len(s.bytes())` for the number of UTF-8 bytes, `len(s.codepoints())` for Unicode code points, or `len(s.graphemes())` for grapheme clusters." }, { "text": " print(len(s))" }, { "text": " ^~~" }, { "text": ":0: note: 'len' declared here" }, { "text": "/opt/compiler-explorer/mojo-1.1.0/bin/mojo: error: failed to parse the provided Mojo source module" } ], "stdout": [], "timedOut": false, "truncated": false }, "code": -1, "didExecute": false, "execTime": 346, "okToCache": false, "queueTime": 4, "stderr": [ { "text": "Build failed" } ], "stdout": [], "timedOut": false }, "result": { "asm": null, "buildStderr": ":4:11: error: `len(String/StringSlice)` is not supported because Mojo strings are UTF-8 encoded, so a single length is ambiguous: it could mean the number of UTF-8 bytes, the number of Unicode code points, or the number of user-visible characters (grapheme clusters). Use `s.byte_length()` or `len(s.bytes())` for the number of UTF-8 bytes, `len(s.codepoints())` for Unicode code points, or `len(s.graphemes())` for grapheme clusters.\n print(len(s))\n ^~~\n:0: note: 'len' declared here\n/opt/compiler-explorer/mojo-1.1.0/bin/mojo: error: failed to parse the provided Mojo source module", "compiled": false, "executed": false, "exitCode": -1, "stderr": "Build failed", "stdout": "", "timedOut": false }, "seconds": 0.58, "sourceSha256": "5033aab79ff3be2f550c063c967be459df63ad8e33ab2147f1967c2c75830d4e", "stdin": "" }