HNHacker News
TopNewBestAskShowJobs

kirjavascript

40 karma · joined October 12, 2016

submissionscomments
kirjavascript··on How to code Claude Code in 200 lines of code
here's my take, in 70 lines of code: https://github.com/kirjavascript/nanoagent/blob/master/nanoa...
kirjavascript··on Scream cipher
here's a JS one liner that handles scream and unscream in one function

  transform=s=>[...s.toUpperCase()].map(s=>(l="BÁGẲLẬQǞVÀCĂHẴMẦRȦWẢDẮIǍNẨSǠXȂEẶJÂOẪTẠYĀFẰKẤPÄUȀZĄ")[l.indexOf(s)^1]||s).join``
kirjavascript··on CSS Hell
transform is forbidden but -webkit-transform seems to work :^)
kirjavascript··on After 34 years, someone beat Tetris [video]
It can and we have achieved Arbitrary Code Execution in NES Tetris.

The setup is horrifyingly complicated and precise though, involving getting some near-impossible scores and entering specific names in the highscore list, then reaching the crash on the same frame that the internal values for random number generation happen to represent a jump instruction to said highscore list (and we get lucky and various registers also happen to contain values we need).

Then from there, there is some bootstrapping before total control is achieved.

kirjavascript··on 6502 back end for LLVM (2022) [video]
I used this to build a NES game in Rust https://github.com/kirjavascript/rust-nes-tmp
kirjavascript··on 2D Rubik’s Cube solution visualization
here's an image of the keymap: https://cube.garron.us/keyboard_layout/files/heise_simulator...

and an explanation of the notation: https://jperm.net/3x3/moves

kirjavascript··on 2D Rubik’s Cube solution visualization
another 2D visualisation of the rubiks cube that is popularly used for computer simulation speedsolving is qcube[1]

despite not being able to see all sides of the cube, it's surprisingly easy to solve on, as you essentially see the same stickers that you would in real life.

there is even an IRC based version!

[1] https://mzrg.com/js/qcube-v2.html

kirjavascript··on A Ruby program that generates itself through a 128-language quine loop
I wrote a new page describing how to write quines recently[1], but the quine-relay is really above and beyond

1: https://github.com/kirjavascript/quine-howto

kirjavascript··on Firefox to Block All 3rd Party Trackers by Default
sure they can, unrequested crypto miners running in the background are malware
kirjavascript··on Wkhtmltopdf Considered Harmful
Have been using puppeteer [1] at work as a replacement for wkhtmltopdf with great success.

[1] https://github.com/GoogleChrome/puppeteer

kirjavascript··on Show HN: Termtosvg – Record terminal sessions as SVG animations
it's actually possible to reduce duplication in this case with the <g> element, see this example;

https://jsfiddle.net/2kc6tqy1/2/

kirjavascript··on Modern terminal-based text editor
vim has visual find and replace across a whole project

https://github.com/eugen0329/vim-esearch