HackerTrans
TopNewTrendsCommentsPastAskShowJobs

newcup

no profile record

comments

newcup
·قبل 7 أشهر·discuss
There are three timeouts defined in the SVG / embedded javascript code, on lines 66-68 (https://github.com/jnykopp/svg-embedded-chess/blob/a24249729...)

You can increase COMP_MOVE_TIMEOUT (which is now 1 millisecond) to, say, 100 milliseconds.

RESET TIMEOUT defines how long the game is paused after game is finished to let the viewer to see the result, and NEW_GAME_START_TIMEOUT defines how long to wait before doing the first move when a new game is started.

The static image may be because of some browser security mechanisms; served as raw from GitHub the SVG is not animated for me either on Firefox, but when I download the SVG and view it from local drive in Firefox, it works. (It did work when served from GitHub at some point in history, though.)
newcup
·قبل 7 أشهر·discuss
Sadly, seems there is not. But the artist has still the web page up he used for the installation: https://heikkihumberg.com/chess/

He said he used ipads as renderers. And even one grid may have looked different back in the day than that page now, as the font might be different. The SVG just uses system fonts and the chess pieces are just unicode characters.
newcup
·قبل 7 أشهر·discuss
I embedded a chess engine in SVG image of a chess board (https://github.com/jnykopp/svg-embedded-chess) so that the engine moved the pieces automatically and played against itself, just by viewing the SVG.

This was done for a friend of mine who made an art installation that projected like some 50x20 (can’t remember exactly) of these images in a grid on a wall, for perpetual chess madness.

The number of chess SVGs a laptop’s browser was able to run simultaneously did feel suprisingly low, but luckily it was enough for that particular piece of art.
newcup
·قبل 8 أشهر·discuss
Or an accordion! https://x.com/ykarikos/status/1038145486618861573
newcup
·قبل 3 سنوات·discuss
The page content piping could be done e.g. like this:

  (defun get-buffer-text (&optional buf)
    (nyxt/mode/document:select-all buf)
    (nyxt/mode/document:copy buf)
    (trivial-clipboard:text))

  (define-internal-page cmd-result (&key text) (:title "*Result*")
    (spinneret:with-html-string
      (dolist (line (str:split #\newline text))
        (:p line))))

  (define-command-global buf-text-to-pipe-cmd (&optional buf cmd)
    (let* ((buf (or buf (nyxt:current-buffer)))
           (safe-text (uiop:escape-sh-token (get-buffer-text buf)))
           (cmd (or cmd (prompt1 :prompt "cmd: " :sources 'prompter:raw-source)))
           (cmd-output (uiop:run-program
                        `("bash" "-c" ,(str:concat "echo '" safe-text "' | " cmd))
                        :output :string)))
      (nyxt:buffer-load-internal-page-focus 'cmd-result :text cmd-output)))
And then call the function like C-space buf-text-to-pipe-cmd and specify the commands to pipe to. Output will appear in a new buffer that can be further used as the source for piping.

DOM handling would be a tad more laborous, but you can pick DOM elements from output of nyxt:document-model with CSS selectors using clss:select.
newcup
·قبل 4 سنوات·discuss
If you’re an Emacs user and you lost your keyboard, no worries. Just plug in your midi accordion!

https://twitter.com/ykarikos/status/1038145486618861573
newcup
·قبل 4 سنوات·discuss
The layout on a chromatic button accordion is surprisingly similar to a keyboard.

This was quite straightforward to touch type with: https://twitter.com/ykarikos/status/1038145486618861573
newcup
·قبل 4 سنوات·discuss
True, I only have used it on x86 devices. Thanks for the heads up!

I’ve heard so many stories of SD card failures (against which snapshotting might be of no help) with RaspberryPi that I’ve decided to send any valuable data promptly to safety over a network. (Though, I personally haven’t had any problems with failing SD’s.)
newcup
·قبل 4 سنوات·discuss
I think NILFS is a hidden gem. I’ve been using it exclusively in my Linux laptops, desktops etc. since ca. 2014. Apart from one kernel regression bug related to NILFS2 it’s worked flawlessly (no data corruption even with the bug just no access to the file system; effectively it forced running older kernel while the bug was fixed).

The continuous snapshotting has saved me a couple of times; I’ve just mounted a version of the file system from few hours or weeks ago to access overwritten or deleted data. I use NILFS also on backup disks to provide combined deduplication and snapshots easily (just rsync & NILFS’ mkss, latter to make sure the “checkpoints” aren’t unnoticedly garbage collected in case the backup disk gets full).
newcup
·قبل 4 سنوات·discuss
I agree, VR absolutely provides an experience flat-screen gaming can never deliver.

With the Covid situation being what it is and sports halls are closed, I’ve replaced live table tennis trainings with Valve Index and Eleven Table Tennis VR game. It has stunningly realistic physics and the immersion is so good that I don’t miss the real thing much. This wouldn’t be possible in front of a flat screen.