Threads for daniel_kacz

    1. 1

      it’s really cool, but without code that generates them, the maintenance of those seems laborous!

      1. 1

        You can just download the javascript library I guess?

      2. 4

        how do people generally set up their keyboards to input those characters? that’s an interesting story - I’ve never seen a writeup on that

        1. 4

          I use a bunch of hotstrings in AutoHotKey, I can type ∈ by typing ;in

          1. 2

            That’s cool. This approach requires a few keystrokes though - do you find yourself wishing you could chord them?

            1. 1

              I originally set a few symbols to chords but find hotstrings both easier to remember and more extensible. At this point I have over 70 hotstrings; remembering 70 chords would make my head explode, much less fitting them all on the keyboard =)

          2. 2

            The Julia editor plugins and repl let you enter latex commands for the symbols then press tab to convert them. It works pretty well, though I would prefer something that let me fuzzy search based on longer descriptions of the symbols and showed a preview of what they looked like, maybe I should write that.

            1. 2

              If you are using X, then you can put it into .XCompose - e.g.,

              <Multi_key> <e> <u> <r> : "€"
              <Multi_key> <i> <n> : "∈"
              

              (keep in mind that it is eager: that is, you cannot have multiple sequences sharing the same prefix - “in” will mach before “into” or “infty”)

              If you use Emacs, then you have really too many ways to approach this. The one I use the most is abbrev-mode, with e.g. (they are spread over multiple different tables in my init.el):

              (define-abbrev-table 'my-abbrevs-table
                '(
                  ("8exists" "∃" nil)
                  ("8in" "∈" nil)
                  ("8inf" "∞" nil)
                  ("8int" "∫" nil)
                  ("8nexists" "∄" nil)
                  ("8index" "☞" nil)
                  ("8interrobang" "‽" nil)
                  ("9ds" "" (lambda nil (insert (format-time-string "%Y-%m-%d %a %H:%M"))))
                  [...]
              

              Of course, Emacs has something like this already built-in: set-input-method (C-x RET C-\) allows you to choose TeX, which lets you use LaTeX-like syntax for many symbols (e.g, \in, \infty, \exists), and insert-char (C-x 8 RET) gives you access to all of Unicode.

              1. 2

                This question made me want to look into it for my own use:

                For Gnome, IBus is used, which can read a .XCompose file, which can be formatted like

                include "%L"
                <Multi_key> <e> <l> <o> <f> : "∈" U2208
                

                which gives me access to such a symbol using the Compose key

                A chorded approach might be possible, Custom keyboard layout with the relevant symbols as the third option (shift is second, usually right alt is third), or a plugin for ibus might also be appropriate.


                Before now I’ve just used copy paste however.

                1. 3

                  Another useful way is Emacs’ TeX input-method, where you can type \in and it will give you ∈.

                  1. 1

                    For a pre-created .XCompose file with many mathematical symbols etc. already defined, see https://github.com/kragen/xcompose

                  2. 1

                    I use WinCompose (the docs recommend it, but I already had it installed for other reasons). It makes characters very easy to enter - Alt+>> for », Alt+{( for ⊂, etc. I had to put in my own sequence for 「」, which it also makes easy.

                  3. 8

                    Seeing this makes me want to go start documenting things by including mini-diagrams, but then I realize how much work it would be to keep things in-sync.

                    1. 3

                      my problem exactly. could work with glue code that analyzes the relevant parts of the codebase and outputs those diagrams?

                      1. 3

                        If you’re writing code to produce diagrams, it’s probably worth outputting graphviz, mermaid, or maybe even SVG. Stopping in a janky ASCII-art format seems like a lot of frustration along the way.