Threads for johncliu

  1. 5

    This is a really nice book. I still find myself reaching for OO in Python when I want to organize my code, and it is great to have the design patterns so that I can avoid reinventing the wheel every time.

    By the way, the author’s blog is also really great.

    1. 5

      I’m a big fan of the author’s essay on semantic linefeeds. That essay completely changed the way I write LaTeX. (E.g., https://git.sr.ht/~telemachus/socratic-notes/tree/main/item/crito.tex.)

      In fact, I think I’ll post that again now…

      1. 2

        Since we’re talking TeX tricks: what did you achieve by doubling up the section headers with [[-? I see you have e.g.

        % [[- Socrates initial response (46b1--c6)
        \subsection*{Socrates initial response (46b1--c6)}
        

        … but e.g. vim-latex supports folding sections directly. Of course, there’s lots of editors that are not vim, and many things one could want which are not folding…

        (Always happy to learn a new trick!)

        1. 3

          Sorry: no new trick. I do use vim, and those are (custom) fold markers. I don’t use vim-latex, even though I appreciate a lot of what’s in it.

          But vim-latex does a lot more than I want. Rather than turning off large parts of it and tweaking others, I borrowed or adapted the pieces I liked. I did a similar thing with vim-go and made my own vim-go-mini. Some of the larger vim plugins move too far (for me!) in the direction of treating vim like an IDE. It’s silly, but I like things just so. Also, I’ve learned a lot about vim by writing some of my own plugins.

          1. 2

            I see. Thanks for your response.

            … I must admit that I just use standard LaTeX syntax highlighting in vim, and nothing else. But that’s more due to using a bunch of different environments than due to any particular opinion about vim-latex in particular. I do share your feeling that trying to make vim into an IDE doesn’t necessarily result in a better editing experience.

            1. 2

              Do you have your adapted vim latex files somewhere? I dislike vim-latex for exactly the same reason. It does quite a lot more than what I want, and in many cases, does things I don’t want.

              1. 1

                Annoyingly, I haven’t put everything together neatly like I did with vim-go-mini. I should, and (hopefully?) this will push me to do that.

                In the meantime, there’s a bunch of LaTeX-related stuff in my vim-dotfiles.

                In particular, maybe look at these?

                (I have a LaTeX snippets file and a bib snippets file, but those are probably too trivial to be useful to anyone else.)

                One other thing that may be helpful: I put together a little plugin to get autocompletion from local .bib files.

          2. 2

            Loved the “venerable TROFF” reference in that essay. Brings back fond memories of the typesetting struggles pre-LaTeX.