It can generate efficient JS and C++ from a simple YAML file.
1,195 karma · joined December 13, 2015
Founder & CTO of reduck.ai
It can generate efficient JS and C++ from a simple YAML file.
The current visualization is by far not perfect but it was hard for me to put more information there. Please give your ideas to improve this visualization or make others!
I mostly aimed at making an aesthetically pleasant image that would represent what cells were controlled and moves were used the most.
As for usage examples, it's very easy to see the difference between European and Indian openings (the former advancing in the center and the latter on the sides) and it's quite easy to guess who won by looking at who controlled the most cells last.
On the tech side, this is a single-file, local first, vanilla JS app querying the (non official) chessgames.com API through corsproxy.io (because CORS). Then I draw using svg elements. Finally, I use canvg [^1] to produce png images. The js code is embedded in the HTML so you can read the code just by viewing the source (or look on github [^2]). I also have a Python version that I also maintain to produce the same outputs as the browser version.
People could complain about abysmal language design or debugging but what I found the most frustration in the coding conventions that they had (or had not), and I think the language and the community play a big role there. But also the company culture: I asked why the code was so poorly documented (no comments, single letter parameters, arcane function names). "We understand it after some time and this way other teams cannot use our ideas."
Overall, their whole stack was outdated and ofc they could not do very interesting things with a tool such as Q. For example, they plotted graphs by copying data from qStudio to Excel...
The only good thing was they did not buy the docker / k8s bs and were deploying directly on servers. It makes sense that quants should be able to fix things in production very quickly but I think it would also make sense for web app developers not to wait 10 minutes (and that's when you have good infra) to see a fix in production.
I have a theory on why quants actually like kdb: it's a good *weapon*. It serves some purpose but I would not call it a *tool* as building with it is tedious. People like that it just works out of the box. But although you can use a sword to drive nails, it is not its purpose.
Continuing on that theory, LISP (especially Racket) would be the best *tool* available as it is not the most powerful language out of the box but allows to build a lot of abstractions with features to modify the language itself. C++ and Python are just great programming languages as you can build good software on them, Python being also a fairly good weapon.
Q might give the illusion of being the best language to explore quant data, but that's just because quants do not invest enough time into building good software and using good tools. When you actually master a Python IDE, you are definitely more productive than any Q programmer.
And don't get me started on performance (the link covers it anyway even though the prose is bad).
Array.from(document.getElementsByTagName("input")).forEach(e => {e.checked = true})It was such a power trip and blissful experience to discover the game on HN, think about a strategy, implement a solution, write a blog post (thanks again to orlp for his comment here that pointed out a mistake), email igpay (the author of the game), fork the repo, implement the algorithm in C# for Unity (it was my first time using those technologies but ChatGPT was quite helpful), get it merged and finally make it to the front page of HN where all of this started.
Thank you guys, this is why the Internet exists!
I'm not sure about the first part
V(s) = max i (min j V(s, i, j))
It looks like you suppose that j "precommits" to some move.
But I'm not fully awake yet so you could be right.There is a reason why LISPers (I'm not one of them though) praise so much REPL-driven development: the REPL is a laboratory.
Also, how much time did you spend testing a library, looking on the internet how to install it, debugging the weird compiler errors? In the end you found the one option that made everything work but it took you hours of research and experimentation.
I have a google docs for each research project and thus I can share them with my collaborators. Each person has their own section within the doc so we can also easily share information with each other!
https://edition.cnn.com/2022/09/16/health/4-7-8-breathing-te...
I don't think I can type or use a mouse while I run, that is not walk – and 10km/h is definitely not a walk. And the sweat!!!