| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I declare a string variable — is it the same in ling-lang and PowerShell?"}, {"role": "assistant", "content": "No — these are three different mechanisms:\n- In ling-lang: `bind name = \"Ling\"` — `bind` is a language keyword that creates a name binding.\n- In PowerShell: `$name = \"Ling\"` — variables are always prefixed with `$`, no declaration keyword.\n- In Bash: `name=\"Ling\"` — no spaces around `=`, no `$` on assignment (only on use: `$name`).\n`bind` is not a shell variable sigil and ling-lang never uses `$` for variables — don't blend the two."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I declare a number variable in ling-lang, PowerShell, and Bash?"}, {"role": "assistant", "content": "In ling-lang: `bind count = 42` — numbers are a plain literal, no type sigil needed.\nIn PowerShell: `$count = 42` — PowerShell auto-types the variable.\nIn Bash: `count=42` (arithmetic context needed later, e.g. `count=$((count + 1))`) — Bash treats\neverything as a string/integer hybrid unless you use `declare -i`.\nThese are not interchangeable: writing `bind $count = 42` or `$count = 42` inside a `.ling` file is a syntax error."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I declare a boolean variable in each of ling-lang, PowerShell, and Bash?"}, {"role": "assistant", "content": "- ling-lang: `bind ready = true` — `true`/`false` are literals (per the language glossary).\n- PowerShell: `$ready = $true` — booleans are `$true`/`$false`, WITH the dollar sign.\n- Bash: has no real boolean type; convention is `ready=1` / `ready=0`, or use exit codes (`true`/`false` as commands).\nNote ling-lang's `true`/`false` have no `$` prefix at all — that's a PowerShell-only convention."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "I want to update a loop counter — do I write `change i = i + 1` or something else in ling-lang, and how does that compare to PowerShell/Bash?"}, {"role": "assistant", "content": "ling-lang has a dedicated `change` keyword for mutating an existing binding (per the keyword glossary: \"Mutate a binding\"), so `change i = i + 1` is valid. In practice, real ling-lang source in this ecosystem (e.g. `fu.ling-lang.org/controllers/packages.ling`) just re-binds the counter inside the loop: `bind i = i + 1`.\nCompare:\n- PowerShell: `$i = $i + 1` or `$i++`.\n- Bash: `i=$((i + 1))` or `((i++))`.\nNone of these spellings are interchangeable — `$i++` is meaningless in a `.ling` file."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I print a value — is it the same in ling-lang and PowerShell?"}, {"role": "assistant", "content": "No. In ling-lang: `print(\"hello\")` — confirmed in the canonical English demo in `ling/examples/basics/advanced.ling` (`bind greeting = \"Hello from Ling!\"` / `print(greeting)`), and in the README's Hello World: `fn main() { bind x = 42 print(\"Hello!\") }`.\nIn PowerShell: `Write-Host \"hello\"` (or `Write-Output \"hello\"`).\nIn Bash: `echo \"hello\"`.\nThese are NOT interchangeable: ling-lang's `print` is a builtin function call (parentheses, comma-separated arguments), not a shell cmdlet or command — `Write-Host` and `echo` do not exist as ling-lang builtins."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I print several values on one line in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `print(\"fib(\", i, \") = \", result)` — comma-separated arguments to the `print(...)` builtin (this exact pattern appears in `ling/examples/basics/fib.ling`: `출력(\"피보나치(\", i, \") = \", 피보나치(i))`, English builtin name `print`).\n- PowerShell: `Write-Host \"fib($i) =\" $result` or string interpolation `\"fib($i) = $result\"`.\n- Bash: `echo \"fib($i) = $result\"`.\nling-lang has no string interpolation like `\"$var\"` — values are passed as separate arguments or joined with `+`."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Is there a print-with-newline builtin in ling-lang, and how does it differ from PowerShell/Bash?"}, {"role": "assistant", "content": "Yes: `println(v)` (alias of `print` with a trailing newline, per `ling/docs/src/multilingual/builtins.md`'s Output table). It's a builtin function call: `println(\"done\")`.\nPowerShell's `Write-Host` already appends a newline by default, and Bash's `echo` does too (`echo -n` suppresses it).\nDon't write `println \"done\"` (no parens) — that's shell command syntax, not a ling-lang function call."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Write a simple if statement in ling-lang, PowerShell, and Bash for checking if n <= 1."}, {"role": "assistant", "content": "- ling-lang: `if n <= 1 { return n }` — braces, no `then`/`elseif` keywords, condition is bare (no parens required). Real example from `ling/examples/basics/fib.ling`: `만약 n <= 1 { n }` (`만약` = `if`).\n- PowerShell: `if ($n -le 1) { return $n }` — condition MUST be parenthesized, and comparison is `-le`, not `<=`.\n- Bash: `if [ \"$n\" -le 1 ]; then return $n; fi` — needs `[ ]` test brackets, `-le`, `then`/`fi`.\nling-lang's `<=` operator (from the literals/operators glossary) is the C-style symbol — PowerShell's `-le` text operator will NOT parse inside a `.ling` file."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Show an if/else in ling-lang vs PowerShell vs Bash."}, {"role": "assistant", "content": "- ling-lang: `if n <= 1 { n } else { fib(n - 1) + fib(n - 2) }` (from `ling/examples/basics/fib.ling`) — `if` is an expression, so the branches' final values can be the function's return value with no explicit `return`.\n- PowerShell: `if ($n -le 1) { $n } else { fib ($n-1) + fib ($n-2) }` — braces required, condition in parens.\n- Bash: `if [ \"$n\" -le 1 ]; then echo \"$n\"; else echo $(( $(fib $((n-1))) + $(fib $((n-2))) )); fi`.\nling-lang's `else` never takes a condition of its own — for else-if chains you write `else { if ... }`, unlike Bash's dedicated `elif` keyword."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I write an if / else-if / else chain in ling-lang, compared to PowerShell and Bash?"}, {"role": "assistant", "content": "ling-lang has no `elif`/`elseif` keyword — you nest: `if hour < 12 { \"morning\" } else { if hour < 18 { \"afternoon\" } else { \"evening\" } }`.\nPowerShell: `if ($hour -lt 12) { \"morning\" } elseif ($hour -lt 18) { \"afternoon\" } else { \"evening\" }` — has a real `elseif` keyword.\nBash: `if [ \"$hour\" -lt 12 ]; then echo morning; elif [ \"$hour\" -lt 18 ]; then echo afternoon; else echo evening; fi` — has a real `elif` keyword.\nDon't reach for `elif`/`elseif` in ling-lang source — it isn't a keyword there (see `ling/docs/src/glossary/keywords.md`)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I test equality in a condition in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `if lang == \"en\" { ... }` — C-style `==`, confirmed throughout `ling-lin.me/controllers/home.ling` (e.g. `if lang == \"th\" { return th }`).\n- PowerShell: `if ($lang -eq \"en\") { ... }` — uses the `-eq` text operator, NOT `==`.\n- Bash: `if [ \"$lang\" = \"en\" ]; then ... fi` — single `=` (or `==` only inside `[[ ]]`).\nUsing PowerShell's `-eq` or Bash's single-`=`-in-`[ ]` inside ling-lang code will not compile — ling-lang always uses `==`/`!=`/`<`/`<=`/`>`/`>=` per its operator glossary."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I combine two conditions with AND/OR in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `&&` and `||` (per `ling/docs/src/glossary/literals.md`'s operator table), e.g. `if a > 0 && b > 0 { ... }`.\n- PowerShell: `-and` / `-or`, e.g. `if ($a -gt 0 -and $b -gt 0) { ... }`.\n- Bash: `&&`/`||` between `[ ]` tests, or `-a`/`-o` inside a single `[ ]` (discouraged), e.g. `if [ \"$a\" -gt 0 ] && [ \"$b\" -gt 0 ]; then ...; fi`.\nling-lang and Bash happen to share the `&&`/`||` symbols here, but PowerShell's `-and`/`-or` text operators do not exist in ling-lang."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Write a for loop counting 0 to 9 in ling-lang, PowerShell, and Bash."}, {"role": "assistant", "content": "- ling-lang: `for i in 0..10 { print(i) }` — `0..10` is a range literal (per the literals glossary), and `for`/`in` are the loop keywords. Confirmed real usage: `ling/examples/basics/fib.ling` has `위해 i 안에 0..10 { ... }` (`위해`=`for`, `안에`=`in`).\n- PowerShell: `for ($i = 0; $i -lt 10; $i++) { Write-Host $i }` — C-style three-part for, OR `0..9 | ForEach-Object { $_ }`.\n- Bash: `for i in {0..9}; do echo $i; done` (brace expansion) or `for ((i=0; i<10; i++)); do echo $i; done`.\nling-lang's `0..10` range and `for x in range { }` shape looks closest to Bash's `for i in {0..9}`, but the syntax (no braces around the range, real `{ }` block instead of `do...done`) is distinct — don't mix them."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I iterate over a list/array in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `for word in words { print(word) }` — same `for`/`in` keywords as range iteration, just swap the range for a list value (per `ling/docs/src/glossary/keywords.md`: `in` = \"Iteration source\").\n- PowerShell: `foreach ($word in $words) { Write-Host $word }` or `$words | ForEach-Object { $_ }`.\n- Bash: `for word in \"${words[@]}\"; do echo \"$word\"; done`.\nling-lang uses the single keyword `for`, never `foreach`, and list elements are not accessed with `$_` or `${arr[@]}` expansion syntax."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Write a while loop in ling-lang, PowerShell, and Bash that runs while i is less than n."}, {"role": "assistant", "content": "- ling-lang: `while i < n { bind i = i + 1 }` — confirmed pattern in `chat.ling-lang.org/controllers/chat.ling`: `while i < n { bind m = list_get(messages, i) ... bind i = i + 1 }`.\n- PowerShell: `while ($i -lt $n) { $i++ }`.\n- Bash: `while [ $i -lt $n ]; do i=$((i+1)); done`.\nling-lang's `while` condition is bare (no parens, no `[ ]` test brackets) and uses `<` directly, unlike both shells."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I break out of a loop early in ling-lang, versus PowerShell and Bash?"}, {"role": "assistant", "content": "- ling-lang: `stop` (per the keyword glossary: \"Break out of the loop\"), e.g. `while true { if done { stop } }`.\n- PowerShell: `break`.\n- Bash: `break`.\nling-lang deliberately does NOT use the word `break` — it's `stop`. Writing `break` in a `.ling` file is not a recognized keyword there."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I skip to the next loop iteration in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `again` (per the keyword glossary: \"Continue the loop\") — NOT `continue`.\n- PowerShell: `continue`.\n- Bash: `continue`.\nThis is a real trap for a model fluent in shell scripting: ling-lang's continue-equivalent keyword is spelled `again`, while both shells use `continue`."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I define a basic function in ling-lang vs a PowerShell function vs a Bash function?"}, {"role": "assistant", "content": "- ling-lang: `fn greet() { print(\"hi\") }` — keyword `fn`, parens even with no params, braces for the body. Confirmed in the README Hello World: `fn main() { bind x = 42 print(\"Hello!\") }`.\n- PowerShell: `function Greet { Write-Host \"hi\" }` — keyword `function`, PascalCase-Verb-Noun convention, parens usually omitted.\n- Bash: `greet() { echo \"hi\"; }` — no keyword at all, just `name() { ... }`.\nling-lang always requires the `fn` keyword; Bash never uses one."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I define a function with typed parameters and a return type in ling-lang, and how does that compare to PowerShell/Bash?"}, {"role": "assistant", "content": "ling-lang: `fn fib(n: number) -> number { if n <= 1 { n } else { fib(n - 1) + fib(n - 2) } }` — param types after `:`, return type after `->` (confirmed by `ling/examples/basics/fib.ling`'s English-glossary equivalent and the `->` operator entry in `ling/docs/src/glossary/literals.md`: \"Function return type\").\nPowerShell: has optional type annotations but no arrow-return syntax: `function Fib([int]$n) { if ($n -le 1) { return $n }; return (Fib ($n-1)) + (Fib ($n-2)) }`.\nBash: has no real typed parameters or return values at all — functions only return exit codes (0-255) via `return`, and \"return a value\" means echoing to stdout and capturing it with `$(...)`.\nling-lang's `->` return-type arrow has no equivalent in either shell language."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I define a function that takes multiple parameters in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `fn t(lang, en, th, ko, ja, zh) { if lang == \"th\" { return th } ... return en }` — comma-separated parameter names in parens, confirmed in `ling-lin.me/controllers/home.ling`.\n- PowerShell: `function T($lang, $en, $th) { ... }` or the `param()` block form.\n- Bash: functions don't declare named parameters at all — you read `$1`, `$2`, `$3`, ... positionally inside the body.\nling-lang parameters are named and referenced directly by name inside the function, unlike Bash's positional `$1`/`$2`."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Write a recursive function in ling-lang and show how it's unlike calling a function recursively in PowerShell/Bash."}, {"role": "assistant", "content": "ling-lang: `fn fib(n: number) -> number { if n <= 1 { n } else { fib(n - 1) + fib(n - 2) } }` — the function just calls itself by name, same as any other call (from `ling/examples/basics/fib.ling`).\nPowerShell: `function Fib($n) { if ($n -le 1) { return $n }; return (Fib ($n-1)) + (Fib ($n-2)) }` — same idea, but note calling a PowerShell function does NOT use parens around all-args like a normal language call.\nBash: recursion works but returning a computed number requires `echo` + `$(...)` capture, e.g. `fib() { if [ \"$1\" -le 1 ]; then echo \"$1\"; return; fi; echo $(( $(fib $(($1-1))) + $(fib $(($1-2))) )); }` — substantially clumsier than ling-lang's direct arithmetic expression."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I return a value from a function in ling-lang, and are there other keywords for it?"}, {"role": "assistant", "content": "The primary keyword is `return` (e.g. `return lang` in `ling-lin.me/controllers/home.ling`). The glossary (`ling/docs/src/glossary/keywords.md`) also lists `post` (\"Return a value (idiomatic return)\") and `give` (\"Yield / return a value\") as alternate spellings, and the last bare expression in a block is itself the return value (no keyword needed) — that's how `fib.ling`'s `if n <= 1 { n } else { ... }` works.\nPowerShell's `return` is similar in spirit but PowerShell also implicitly outputs anything not captured/assigned. Bash's `return` only sets a numeric exit status (0-255) — it cannot return a string or computed value directly."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I concatenate strings in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: the `+` operator, e.g. `\"<a href='/?lang=\" + code + \"' class='\" + cls + \"'>\"` (real pattern from `ling-lin.me/controllers/home.ling`'s `lang_option` function).\n- PowerShell: also `+` (`\"Hello \" + $name`), OR string interpolation `\"Hello $name\"`.\n- Bash: no operator at all — strings concatenate just by being adjacent: `greeting=\"Hello \"$name` or `greeting=\"Hello $name\"`.\nling-lang, unlike Bash, has NO `\"text $var\"` interpolation — you must use `+` (or `format(...)`) to splice a variable into a string."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Does ling-lang support string interpolation like Bash's \"$var\" or PowerShell's \"$($var)\"?"}, {"role": "assistant", "content": "No. ling-lang builds strings with the `+` operator (`\"fib(\" + i + \") = \" + result`) or the `format(...)` builtin (per `ling/docs/src/multilingual/builtins.md`'s Output table: `format(fmt, ...)`). Writing `\"value: $x\"` inside a `.ling` string literal does NOT substitute `x` — it stays a literal dollar sign and letter x. This differs from both Bash (`\"$x\"` interpolates) and PowerShell (`\"$x\"` also interpolates) — ling-lang is the odd one out here."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I build up a string across a loop in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: repeatedly re-bind and concatenate with `+`, e.g. (from `fu.ling-lang.org/controllers/packages.ling`): `bind result = \"\" ... while i < letters.len { ... bind result = result + \"<a>...\" ... }`.\n- PowerShell: `$result = \"\"; foreach ($x in $items) { $result += \"<a>$x</a>\" }` (`+=` works on strings).\n- Bash: `result=\"\"; for x in \"${items[@]}\"; do result+=\"<a>$x</a>\"; done` (`+=` also works, Bash 4+).\nling-lang has no `+=` compound-assignment operator confirmed in its operator glossary — use `bind result = result + ...` instead."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I write a comment in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `// this is a comment` — double-slash, used pervasively across the real codebase (every `.ling` controller file in `ling-lin.me` and `fu.ling-lang.org` opens with `//` header comments).\n- PowerShell: `# this is a comment` — hash/pound sign.\n- Bash: `# this is a comment` — also hash/pound sign.\nling-lang uses C-style `//`, not the `#` used by both shells — don't write `# comment` expecting it to be ignored in a `.ling` file (it isn't a recognized comment marker there)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I comment out several lines of ling-lang code at once, compared to PowerShell/Bash?"}, {"role": "assistant", "content": "ling-lang's confirmed comment syntax is the line comment `//` (no block-comment form has been observed in the source read for this project) — so commenting out multiple lines means prefixing each line with `//` individually, as seen throughout `ling/examples/basics/advanced.ling`.\nPowerShell supports a real block comment: `<# ... #>` in addition to `#` line comments.\nBash has no native block comment either — the common trick is a `: <<'EOF' ... EOF` here-doc, or prefixing each line with `#`.\nDon't assume ling-lang has a `<# #>`-style block comment just because PowerShell does."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I read a file's contents in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `bind contents = read_file(\"path/to/file.txt\")` — builtin function, returns the file as a string (per `ling/docs/src/multilingual/builtins.md`'s File I/O table: `read_file(path)` — \"Read file to string\").\n- PowerShell: `$contents = Get-Content -Path \"path\\to\\file.txt\" -Raw`.\n- Bash: `contents=$(cat path/to/file.txt)`.\nling-lang's `read_file` is a single builtin call returning a string, not a cmdlet (`Get-Content`) or external program invocation (`cat`)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I write a string to a file in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `write_file(\"out.txt\", \"hello\")` — builtin (per the File I/O table in `ling/docs/src/multilingual/builtins.md`: `write_file(path, content)` — \"Write string to file\").\n- PowerShell: `Set-Content -Path \"out.txt\" -Value \"hello\"` (or `\"hello\" | Out-File out.txt`).\n- Bash: `echo \"hello\" > out.txt`.\nThere is no shell-style redirection operator (`>`) in ling-lang for writing files — you must call the `write_file(path, content)` builtin explicitly."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I create a list/array literal in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `bind letters = [\"0\", \"a\", \"b\", \"c\"]` — square-bracket list literal (per `ling/docs/src/glossary/literals.md`: `[1, 2, 3]` = \"List\"), confirmed real usage in `fu.ling-lang.org/controllers/packages.ling`: `ผูก อักษรๆ = [\"0\", \"a\", \"b\", ...]`.\n- PowerShell: `$letters = @(\"0\", \"a\", \"b\", \"c\")` or the shorthand `$letters = \"0\", \"a\", \"b\", \"c\"`.\n- Bash: `letters=(\"0\" \"a\" \"b\" \"c\")` — parens, no commas, space-separated.\nling-lang's `[ ]` list literal looks like PowerShell/Bash's array indexing syntax on first glance, but it's actually the literal itself, not an index operation — don't confuse `[\"a\",\"b\"]` (a list) with `$arr[0]` (an index)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "What builtins does ling-lang have for building/growing a list, and how does that compare to PowerShell/Bash arrays?"}, {"role": "assistant", "content": "ling-lang: `list_new()` (empty list), `list_push(lst, v)` (append and return new list), `list_pop(lst)`, `list_set(lst, i, v)`, all confirmed in `ling/docs/src/multilingual/builtins.md`'s Lists table — these are function calls, e.g. `bind items = list_new()` then `bind items = list_push(items, \"x\")`.\nPowerShell: `$items = @(); $items += \"x\"` (or `.Add(\"x\")` on an `[System.Collections.ArrayList]`).\nBash: `items=(); items+=(\"x\")`.\nling-lang's list builtins are ordinary function calls returning values (functional style, note `list_push` \"returns new list\") rather than mutating operators like `+=`."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I get an element out of a list by index in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "- ling-lang: `bind first = list_get(letters, 0)` — builtin call (per the Lists table in `ling/docs/src/multilingual/builtins.md`), confirmed real usage `packages.ling`: `รับรายการ(อักษรๆ, ก)` (`รับรายการ` = `list_get`).\n- PowerShell: `$first = $letters[0]` — bracket indexing.\n- Bash: `first=\"${letters[0]}\"` — bracket indexing inside `${ }`.\nling-lang does NOT use `letters[0]` bracket-indexing syntax for this — it's the explicit `list_get(letters, 0)` function call. (Field/property access like `.len`, seen below, does use `.`, but element access is a function call.)"}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I get the length of a list in ling-lang vs PowerShell vs Bash?"}, {"role": "assistant", "content": "ling-lang has both a builtin function `list_len(lst)` (per `ling/docs/src/multilingual/builtins.md`) AND a `.len` property confirmed in real code, e.g. `fu.ling-lang.org/controllers/packages.ling`: `รายการ.len > 0` and `ขณะที่ ก < อักษรๆ.len` (while i < letters.len).\nPowerShell: `$letters.Count` (or `$letters.Length`).\nBash: `${#letters[@]}`.\nling-lang's `.len` reads like a property access (dot syntax), distinct from both PowerShell's `.Count`/`.Length` naming and Bash's `${#arr[@]}` special expansion syntax."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I mark a program's entry point in ling-lang, and how is that different from a PowerShell or Bash script's entry point?"}, {"role": "assistant", "content": "ling-lang uses a `do { ... }` block bound to a name — confirmed two real conventions in this ecosystem: `bind start = do { ... }` (per `ling/docs/src/glossary/keywords.md`'s `start` entry, and used in `ling/examples/basics/fib.ling`'s `바인드 시작 = 실행 { ... }`), and `bind main = do { app.start(cli_args(list())) }` (the actual `main.ling` in this `ai.ling-lang.org` project). The README's Hello World instead shows a plain `fn main() { ... }` function.\nPowerShell and Bash scripts have no declared entry point at all — the interpreter just runs top-level statements in file order, top to bottom.\nling-lang programs are structured around named bindings/functions even at the top level, unlike shell scripts' unstructured top-to-bottom execution."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I import another file/module in ling-lang, and is there an equivalent in PowerShell/Bash?"}, {"role": "assistant", "content": "ling-lang: `use \"app\"` or `use \"controllers/auth\"` — a `use` statement naming the module path without a file extension (confirmed in `ai.ling-lang.org/main.ling`: `use \"app\"`, and `ai.ling-lang.org/controllers/chat.ling`: `use \"controllers/auth\"`).\nPowerShell's closest equivalent is dot-sourcing: `. .\\lib.ps1` or `Import-Module .\\Module.psm1`.\nBash's closest equivalent is sourcing: `source ./lib.sh` or `. ./lib.sh`.\nling-lang's `use \"path\"` is a language-level import statement resolved by the compiler/interpreter, not a runtime file-sourcing operation like PowerShell/Bash's."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I run a ling-lang web app locally for development, the way it's done across this ecosystem?"}, {"role": "assistant", "content": "Use the vendored interpreter binary with `run --interp`, pointing at the app's entry file and a port, e.g. (from `ling-lin.me/README.md`'s \"Run it\" section):\n`bin\\ling.exe run --interp app.ling --port 8420`\nThen open `http://127.0.0.1:8420/`. `--interp` runs the tree-walking interpreter deliberately — the same pattern is used by `countries.ling-gov.org` and `fu.ling-lang.org`."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Why do production ling-lang sites in this ecosystem run with --interp instead of the faster JIT/AOT backend?"}, {"role": "assistant", "content": "Per `ling-lin.me/README.md`: the AOT/JIT backend has a known struct-member-access bug in this Ling build, so production sites in this ecosystem (ling-lin.me, countries.ling-gov.org, fu.ling-lang.org) all run interpreted via `--interp` deliberately, trading some raw speed for correctness until that bug is fixed."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "By default, what interface does `ling.exe run` listen on, and how do I restrict it to localhost only?"}, {"role": "assistant", "content": "By default it listens on `0.0.0.0` (all interfaces). To restrict it to loopback only, pass `--listen \"127.0.0.1\"`, e.g.:\n`bin\\ling.exe run --interp app.ling --port 8420 --listen \"127.0.0.1\"`\n(per `ling-lin.me/README.md`'s \"Run it\" section)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How is fu.ling-lang.org (the package registry) started, and on what port?"}, {"role": "assistant", "content": "Per `fu.ling-lang.org/README.md`'s \"รันเซิร์ฟเวอร์\" (Run server) section:\n`ling run app.ling --listen \"0.0.0.0\" --port 6688`\nIt can alternatively be installed as a Windows service via `install-service.ps1`, run as administrator."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "The `ling.exe` on my PATH seems out of date compared to what a project expects — why, and what should I do?"}, {"role": "assistant", "content": "Per `ling-lin.me/README.md`: the `ling.exe` installed via `cargo install ling-lang` on `PATH` may lag behind the locally built one. This project (and others in the ecosystem) vendors a known-working copy directly in `bin/ling.exe`, so run the project with that vendored binary (`bin\\ling.exe run ...`) rather than relying on PATH."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I scaffold a brand-new ling-lang project from scratch?"}, {"role": "assistant", "content": "Use `lingfu new <name>`, e.g.:\n`lingfu new my-room`\n`lingfu` (also spelled `灵符` / `霊符` / `영부` / `ลิงฟู` in other languages) is the Ling project manager — think Cargo for Ling (per `ling/README.md`'s \"ling-fu · Package Manager\" section)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "What's the lingfu command to build and run a project in one step, versus just compiling it?"}, {"role": "assistant", "content": "`lingfu run` builds and runs the project; `lingfu build` compiles only, without running it (per `ling/README.md`):\n```\nlingfu run # build & run\nlingfu build # compile only\n```"}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I run a ling-lang project's test suite with lingfu?"}, {"role": "assistant", "content": "`lingfu test` (per `ling/README.md`'s ling-fu package-manager section, listed alongside `lingfu new`/`run`/`build`)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Can I translate an entire ling-lang project's keywords/builtins to another human language from the command line?"}, {"role": "assistant", "content": "Yes — `lingfu normalize <language>` rewrites all `.ling` keywords, builtin names, and file/folder names to a single target language project-wide, e.g.:\n`lingfu normalize thai`\nAdd `--dry-run` to preview the change first without touching files: `lingfu normalize zh --dry-run` (per `ling/README.md`). This is useful for keeping a large codebase consistent in one language."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Do lingfu's own commands have non-English spellings, consistent with ling-lang's polyglot keywords?"}, {"role": "assistant", "content": "Yes. Per `ling/README.md`, the same operation can be invoked in different languages, e.g. `lingfu run` is also `灵符 运行` (Chinese) or `ลิงฟู รัน` (Thai) — the package manager itself follows the same multilingual-alias philosophy as the language's keywords and builtins."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I compile a ling-lang project into a native Windows executable, and can I target other platforms?"}, {"role": "assistant", "content": "`ling build <file.ling|dir> --platform win` compiles to a native executable
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I choose a custom output directory for a ling build?"}, {"role": "assistant", "content": "Pass `--out <dir>` to `ling build`, e.g.:\n`ling build my-game --platform win --out dist/custom`\n(per the `ling build` synopsis in `ling/docs/BUILD_PACKAGING.md`)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I set a custom app icon on a compiled ling-lang Windows executable?"}, {"role": "assistant", "content": "Three ways, in priority order (per `ling/docs/BUILD_PACKAGING.md`'s \"App icon\" section):\n1. `--icon <file>` on the command line (highest priority): `ling build my-game --icon branding/app.png`\n2. the `icon` field in the project manifest:\n```toml\n# Ling.toml\n[project]\nname = \"my-game\"\nentry = \"main.ling\"\nicon = \"images/logo.svg\"\n```\n3. the bundled Ling logo (default) if neither is given.\nSources may be `.svg` (rendered via resvg), `.png`/`.jpg`/`.bmp` (resized), or a ready-made `.ico` (used as-is); all are packed into a multi-resolution `.ico` (16-256px)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "What happens if I reference an icon file in Ling.toml that doesn't exist?"}, {"role": "assistant", "content": "Per `ling/docs/BUILD_PACKAGING.md`: a missing explicit icon warns and falls back to the default bundled Ling logo — the build still succeeds, it just doesn't use your custom icon."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I bundle extra asset files (music, fonts, level data) with a ling-lang build?"}, {"role": "assistant", "content": "Declare them under `[includes]` in `Ling.toml`, relative to the project root, with glob support (`*` within a segment, `**` across segments, `?` for one char):\n```toml\n# Ling.toml\n[includes]\n\"/music*.json\",\n\"somefile.bin\"\n```\nThe leading `/` (\"from the project root\") is optional; an inline array form or the Chinese header `[包含]` also work (per `ling/docs/BUILD_PACKAGING.md`)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "By default, where do a ling build's included asset files end up, relative to the exe?"}, {"role": "assistant", "content": "By default matched `[includes]` files are copied into `dist/<platform>/`, preserving their folder structure, e.g.:\n```\ndist/windows/\n├── my-game.exe\n├── music/song.wav\n├── font/title.otf\n└── somefile.bin\n```\nThe app loads them by their normal relative paths (per `ling/docs/BUILD_PACKAGING.md`)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I produce a single self-contained .exe with all my assets embedded, instead of an exe plus a folder of files?"}, {"role": "assistant", "content": "Add `--pack` to `ling build`, e.g.:\n`ling build my-game --platform win --pack`\nThe included files are embedded inside the executable (`include_bytes!`); at startup the app transparently extracts them to a per-app temp directory and switches its working directory there, so existing asset loaders (`read_file`, `font_load`, `music_load`, `audio_sample_load`, ...) work unchanged — no code changes required (per `ling/docs/BUILD_PACKAGING.md`). Use this when you want to ship just one file."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "When should I use the default ling build output versus --pack?"}, {"role": "assistant", "content": "Per the mode table in `ling/docs/BUILD_PACKAGING.md`:\n- default (exe + resource folders in `dist/<platform>/`) — use when assets may be patched or modded separately.\n- `--pack` (one self-contained exe) — use for simplest distribution, a single file."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I log in to the Ling package registry so I can publish a package with lingfu?"}, {"role": "assistant", "content": "`lingfu login <api-key>` — the API key is created in the registry's web dev portal at `/me/keys`. If you omit the argument, it reads the key from stdin instead (per `ling/crates/ling-fu/src/registry.rs`).\nExample: `lingfu login lfk_xxxxxxxxxxxxxxxx`"}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I publish my ling-lang project to the registry, and can I override its version at publish time?"}, {"role": "assistant", "content": "Run `lingfu publish` from inside the project (it walks up to find `Ling.toml`/`灵符.toml`). It builds a tarball of the current project and uploads it, authenticated with the API key saved by `lingfu login`. To publish under a different version than the manifest declares, pass `--version`:\n`lingfu publish --version 1.2.3`\n(per `ling/crates/ling-fu/src/registry.rs`). You must be logged in first, or you'll get \"not logged in — run `lingfu login <api-key>` first\"."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "What is a ling.ignore file, and how is its glob syntax structured?"}, {"role": "assistant", "content": "`ling.ignore` lists files kept OUT of published packages (and out of anything `lingfu` walks across the whole project) — one glob per line, `#` starts a comment. Per the header comment repeated in both `fu.ling-lang.org/ling.ignore` and `ai.ling-lang.org/ling.ignore`:\n`*.db` matches at any depth, `storage/` matches a whole directory, and `**` spans path segments. It's gitignore-style but consumed by `lingfu`, not by git."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "My ling-lang project uses a SQLite database file — how do I make sure it never gets published as part of my package?"}, {"role": "assistant", "content": "Add its patterns to `ling.ignore`. Both `fu.ling-lang.org/ling.ignore` and `ai.ling-lang.org/ling.ignore` exclude the runtime database the same way:\n```\n*.db\n*.db-wal\n*.db-shm\n```\nThis covers the main SQLite file plus its write-ahead-log and shared-memory sidecar files."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I keep secrets and credentials out of a published ling-lang package?"}, {"role": "assistant", "content": "List them in `ling.ignore`. Real examples from this ecosystem:\n`fu.ling-lang.org/ling.ignore`: `*.key`, `*.pem`, `.env`, `credentials.toml`, `*.totp`\n`ai.ling-lang.org/ling.ignore`: `.env`, `secrets.toml`, `*.key`, `*.pem`\nBoth are commented \"Secrets / credentials that must never end up in a package\" — treat any key/cert/env/credentials file the same way in your own project."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "How do I exclude a whole directory of large model weights from a ling-lang package?"}, {"role": "assistant", "content": "Give the directory name with a trailing slash in `ling.ignore` — per `ai.ling-lang.org/ling.ignore`:\n`weights/`\ncommented \"Model weights — huge binary artifacts, fetched separately\". This matches the whole directory, same pattern used for `fu.ling-lang.org/ling.ignore`'s `storage/` (server-side package storage: uploaded artifacts, checksums, and backups)."}]}
|
| {"messages": [{"role": "system", "content": "You are a coding assistant for the Ling programming language and its development workflow."}, {"role": "user", "content": "Does ling.ignore support matching files nested arbitrarily deep, like compiled Python bytecode leftovers?"}, {"role": "assistant", "content": "Yes, with `**`. `fu.ling-lang.org/ling.ignore` uses exactly this to catch any-depth `.pyc` files:\n`** |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |