6 ms·
What's so hard about Day 12? It's just +/'{x:".",x;H:(-1+;1+i-)@'+|\m*i:!#m:x=\:"#." R:(x=x)({[h;d;x;y;z](z#0),+\(((-z)_~"#"=x)&z_d>z)*(*y),(-z+1)_y-0
by rak1507 2y ago
What's so hard about Day 12?
It's just
+/'{x:".",x;H:(-1+;1+i-)@'+|\m*i:!#m:x=\:"#."
R:(x=x)({[h;d;x;y;z](z#0),+\(((-z)_~"#"=x)&z_d>z)*(*y),(-z+1)_y-0^y h}. H)[x]/y
(*|R)-R@*|0,&1_*+m}.''1({("?"/:5#,x;,/5#,y)}.')\@[;1;.:]'" "\:'0:`:i/12.txt
- Jorge1o1 2y agoIs this Q? or k?
- icen 2y agoLooks like K to me!
- rak1507 2y agoIt's k4, the underlying language behind Q. With slight modifications it also runs in ngn/k which is FOSS. https://ngn.codeberg.page/k/#eJxVjsFugzAMhu95iiyWik1CIGPtIVGXHnvm2lA2qdLKgcsOU6C0z77QcZkt65c//7ZcMu+9BgBulFE106l7lvYAeoUe/mWideK7ZTXtJu9S/C0xs7Jn6D9druzUNl0B8GvwWr0mc2Cst9x0uAkPVCIEQY/SElT24/P764cbJsvsFq3QQkV3tFgY6YzsCzpkcg5D3tsXGGzcBytAC8Ybi3EfCW+nq7u46EY3tThBRUoGRCwm6h4CRLJspu7yPlGO+UgqDaShbiyq88ivd82PdIptOTKO+dxQ0RzyuVIb0+VyuOssM3hD4UW5hfSWWmSkxCkcTs44bdtMcBGy/hdgfU9G https://ngn.codeberg.page/k/#eJxVjsFugzAMhu95iiyWik1CIGPtIVG...
- meisel 2y agoThis is what programming languages looked like to me before I learned programming
- gcanyon 2y agoAny idea how close that is to valid J code?
- 7thaccount 2y agoMy limited understanding is that K and J are very different, despite both being in the same language family. I found K a lot easier to grasp when I was playing with both languages years ago.
- jnordwick 2y agoI'm doing this year in K2 (after a long hiatus from K). Is there a K4/5 binary? ATW gave me a K2 binary, but I miss some of the K4 and later functionality): https://github.com/jnordwick/aok2024 https://github.com/jnordwick/aok2024
- rak1507 2y agoI don't know if there's a specific k4 binary but you can run k4 through the q binary.