#speedtest output std::cerr

9 messages · Page 1 of 1 (latest)

sleek sun
#

Hi!
Thanks for the great work, I love speedtest in 17.1
MY problem/observation is that in the browser environment the output of speedtest looks really ugly (std::cerr is mapped to console.error)

https://github.com/official-stockfish/Stockfish/blob/master/src/uci.cpp
I studied above source code and I found it is probably because you use stderr for not standard UCI output?

I was using the lichess wasm to see the speed difference between native cpp stockfish and the browser wasm and first I thought there is an error in the wasm but I waited and at the end the test output looked just fine, only in error red 🙂

Should we just accept this because it is a deeper design decision or would it be a problem to change UCIEngine::benchmark function in uci.cpp to use std::cout instead of std::cerr for printing?
Or if we change something the right way is to change the code before converting the code to wasm?

I researched a bit with AI and it says stockfish probably wants to separate different kind of UCI output and there could be even a logic on a UI program, for example, that uses this. But is this true for speedtest too? At present I dont understand what speaks against normal output for speedtest.

Thanks!

GitHub

A free and strong UCI chess engine. Contribute to official-stockfish/Stockfish development by creating an account on GitHub.

versed hound
sleek sun
#

thanks, that was my first guess too but I thought I ask

#

is it not the right one? this has 17.1 already:
https://github.com/lichess-org/lila-stockfish-web
also, what is the difference, I see niklasf, schlawg and disservin (you) work on stockfish->wasm but who is actually affiliated with Stockfish, and who is with Lichess? is this strictly a lichess work and if it is, can I use it free too? thanks!

GitHub

A home for stockfish wasms - because we care. Contribute to lichess-org/lila-stockfish-web development by creating an account on GitHub.

#

also, I dont find the output wasm,js files, is this to encourage us do the cpp->wasm,js with emscripten ourselves?

#

I used the wasm,js files that run on lichess for now but I was planning to try the compilation myself, then I could write some extra patches like we discussed I guess

versed hound
#

Yeah you need to build it but they offer a docker way to build it

#

The license is the same as stockfish. So you can do the same stuff