Hi Jean-François,

That question is easy, so I'll answer it. I'll look at your other problem next week, unless other devs find out before.

The solution for you:
$ src/liquidsoap 'print(string.replace(pattern="_",(fun (s) -> " "),"bla_bla"))'
bla bla

The error was that the string.replace function takes as parameter not a string, but a function from string to string. From liquidsoap -h string.replace:
  Type: (~pattern:string, ((string)->string), string)->string
This allows for example, to replace any character by twice the same:
$ src/liquidsoap 'print(string.replace(pattern=".",(fun (s) -> s^s),"bla_bla"))'

Have fun,

PS: Hi Romain :) now I'll go read your answer which just arrived...