|
|
[[!meta title="Speedcubing in Emacs"]]
[[!meta copyright="Copyright © 2023 Vasilij "wasamasa" Schneidermann"]]
[[!inline pages="internal(2023/info/cubing-nav)" raw="yes"]]
<!-- Initially generated with emacsconf-publish-talk-page and then left alone for manual editing -->
<!-- You can manually edit this file to update the abstract, add links, etc. --->
# Speedcubing in Emacs
Vasilij "wasamasa" Schneidermann (he/him) - Pronunciation: [vɐˈsʲilʲɪj] [vazamaza] [ˈʃnaɪ̯dɐman], IRC: wasamasa, Website: <https://emacsninja.com> Fediverse: @wasamasa@lonely.town, <mailto:mail@vasilij.de>
[[!inline pages="internal(2023/info/cubing-before)" raw="yes"]]
Emacs is well-known for its kitchen-sink nature and sheer extensibility.
However, its utility for tasks beyond text manipulation is still
disputed. While it is possible to do most of your computing inside
Emacs, the existing solutions are of varying quality. Sometimes it is
necessary to create a custom solution tailored to one's personal needs
and I believe Emacs to be a worthwhile platform for this.
In this talk I present my journey of building a package to assist me
with speedcubing, a competitive sport with the goal of solving the
Rubik's Cube as fast as possible. Along with a demo, useful Emacs
features and challenges that came up during development will be shown.
# Discussion
## Questions and answers
- Q: I see that there is a way to document the time it took to
complete the puzzle; however, what about other things such as the
date and time, and potentially a note on technique or warm up
routine etc? It seems like an interface that included these things
would also help people who are practicing and trying to improve. It
would help answer the question\... what kinds of things do I need to
do to improve. ;;Thank you for your answer.
- A: Currently, only the timestamp and completion time are
recorded for the puzzle/label. However, I\'ve looked at
twisty-timer and it does record both the used scramble and a
comment field as well, so I plan adding those once the other
features work properly. This would allow keeping track of
particularly good/bad solves for example.
- Q: As a side-note, could you say something about how you use emacs
to help with your cybersecurity or CTF actifivities? Are there some
recommended packages or do you use all of your own templates and
procedures to speed your activity? Maybe just post a link to your
homepage or GH repositories.
- A: It\'s pretty much only Org usage to document my activities in
a way that I know what I did 3 weeks ago and can pick up my
research from then. I do not use Emacs for source code review
specifically (depending on the target environment, there are
better suited tools). The thing with the field is that often,
one has to resort to work with whatever tools are at hand and to
make the most of them, which is kind of at odds with using Emacs
first and foremost as an integrated environment for everything.
Other than Org, I use it as an editor for pretty much any
programming language I encounter.
- Q: What are the biggest challenges to using transient?
- A: The documentation was very high-level compared to what I\'m
used to, so I had to skim it a lot to find out how to use it for
basic tasks. I think it would be useful to have some slightly
more hands-on examples for common tasks. One issue I\'ve run
into a few times was the code using generic functions, so it was
difficult to debug errors (like using a non-interactive lambda
form when a command was expected and getting an unhelpful error
message).
- <https://github.com/positron-solutions/transient-showcase>
might be helpful.
- Definitely, but as I\'ve remarked in the talk, the
examples felt very \"generic\". Slightly more realistic
examples would make it even better.
- Q: Very cool project. Alas I\'m not a cuber, so my question is
merely, what did you learn in the process of making this
presentation?
- A: I\'ve never recorded a demo video happening outside of my
laptop before, so getting the external recording setup right
was\... fun. It involved a ladder, several cardboard boxes and
my phone. After five attempts (one of which ended up with the
cube rolling off the desk loudly), I finally got an okayish
recording to use for the presentation.
- Q: Does svg.el support tap events?
- A: svg.el is only responsible for generating valid SVG documents
and one can put whichever tags/attributes there they wish. From
my understanding, anything interactive usually solved with JS in
the browser would need to be rewritten using Emacs Lisp instead.
Tap events for example could be solved with the \":map\"
property put on the image and would work for other image formats
than SVG as well.
Notes
- There's probably quite a few cubers in here. =) I tend to average 50s on 3x3, the kiddo is usually a bit faster.
- I've recently got a 45s best with LBL
- I have some code in my config to draw last-layer diagrams as SVGs and an Org link thing like #+LINK: pll https://alg.cubing.net/?stage=PLL&type=alg&setup=x_y_z&view=playback&alg=%s to link to algs quickly; https://sachachua.com/blog/2023/02/using-org-babel-to-learn-rubik-s-cube-algorithms/
- speaker: ah yes, I've had the idea to try out roofpig or cubing.js for doing that in org documents, nice to see it has been done before
- FWIW transient just had a v0.5.0 release which adds and fixes things. It continues to improve thanks to tarsius's tireless work.
- i'm glad you're exploring Emacs UI wasamasa , i've also been confounded trying to write a transient, and its nice to see that sqlite is working for ya
- to be fair, I've considered to just stick to my usual approach of writing boring code that does work on as many machines as possible, but there were so many new features that would help making a nice looking and working package that I decided to just depend on emacs 29.1
[[!inline pages="internal(2023/info/cubing-after)" raw="yes"]]
[[!inline pages="internal(2023/info/cubing-nav)" raw="yes"]]
|