Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jznsis
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
jznsis
2y ago
I seem to be missing something, thus thank you for taking your time > Wouldn't that be like if in C, you had to write the arguments in reverse order of the format string, like this? Exactly and that's not what we want Let'
2.
▲
by
jznsis
2y ago
No
3.
▲
by
jznsis
2y ago
Yes, but the final result is out_str, not a forward to console, isn't it? Either way, the format string discussion for the printf familiy of functions is very similar between them
4.
▲
by
jznsis
2y ago
I'm not that familiar with syntax of functional programming languages. Isn't Int -> String -> String a shorthand for Int -> (String -> String)? Thus I would have assumed the first argument to the result of sprintf &quo
5.
▲
by
jznsis
2y ago
Nice writeup! It would be helpful to seen an actual invocation of the new sprintf function I know it's supposed to be pseudo code and most likely it's something like sprintf "% world %d" "hello" 42 but I got a
6.
▲
by
jznsis
2y ago
This is just a choice of having to provide an output buffer to the function instead of returning a new buffer since it's easier to inject custom allocator behaviour that way