1. 1

    A noteworthy Java-based implementation of SymSpell:

    It’s used in KeenWrite to check all the words in a plain text paragraph:

    The spell check algorithm is insanely fast.

    Note that the lexicon for the reference implementation is missing about 18,000 words, at time of writing. The author is aware. For the impatient, grab en.txt from the repo:

    1. 4

      Kroki is a REST service that can render mermaid and many other plain text diagrams. KeenWrite is my plain text editor that can embed text-based diagrams, which are then rendered by Kroki in near real-time. See the screenshots for details.

      1. 7

        Bash can also employ a kind of function pointer, which can greatly simplify command-line argument parsing. Consider the following simplified example:

        ARG_ARCH="amd64"
        
        ARGUMENTS+=(
          "ARG_ARCH,a,arch,Target operating system architecture (${ARG_ARCH})"
          "log=utile_log,V,verbose,Log messages while processing"
        )
        
        utile_log() { echo "$1" }
        
        noop()      { return 1 }
        
        log=noop
        

        By creating a comma-delimited list of command-line arguments, the parsing logic and control flow can be influenced from a single location in the code base. The trick is to eval-uate “log=utile_log” when the “-V” command-line argument is provided (or assign ARG_ARCH to the user-supplied value after “-a”). Using the $log variable invokes the function, such as in:

        preprocess() {
          $log "Preprocess"
        }
        

        If “-V” isn’t supplied, then every invocation of $log simply returns without printing a message. The upshot is a reduction in conditional statements. Function pointers FTW. I wrote about this technique in my Typesetting Markdown series.

        Here’s a rudimentary implementation and example usage to wet your whistle:

        1. 7

          There’s already a no-op builtin: :

          test_var_fnref (){
            log=noop
            noop()      { return 0; }
            for x in {1..100000}; do
              $log "Preprocess"
            done
          }
          
          test_var_builtinref (){
            log=:
            noop()      { return 0; }
            for x in {1..100000}; do
              $log "Preprocess"
            done
          }
          

          It’ll save you the function call overhead when you aren’t printing the messages:

          $ test_var_fnref
          Sun Oct 31 2021 19:07:49 (1.15s)
          
          $ test_var_builtinref
          Sun Oct 31 2021 19:07:55 (553ms)
          

          If it’s a hot loop, it’s also worth knowing that aliases get ~inlined at definition time, so you can do something like:

          shopt -s expand_aliases
          alias log=:
          
          test_alias_ref(){
            for x in {1..100000}; do
              log "Preprocess"
            done
          }
          

          And wring a little more performance out:

          $ declare -f test_alias_ref
          test_alias_ref () 
          { 
              for x in {1..100000};
              do
                  : "Preprocess";
              done
          }
          
          $ test_alias_ref
          Sun Oct 31 2021 19:08:04 (543ms)
          
        1. 9

          This is nice. Though, you could do some of the same things with XPath. For example, the first two examples could be done using xmllint:

          $ curl -s https://www.rust-lang.org/ | xmllint --html --xpath "//*[@id='get-help']" -
          $ curl -s https://www.rust-lang.org/ | xmllint --html --xpath "//@href" -
          

          Unfortunately xmllint doesn’t support html5, and complains about the <header> and <main> tags in the above example.

          1. 5

            XPath is really powerful, but it’s also really hard to grok (because it was designed for a much more powerful use case). I wonder if something that used the JQuery selector format wouldn’t be more appreciated :)

              1. 2

                Hxselect is super handy

                1. 2

                  This tool is great, and already in Debian. Interesting that you need to give it XML syntax, but it comes with tools hxclean and hxnormalize -x that solve that for you.

                  1. 1

                    Wow! Fantastic, thanks!

              1. 1

                My text editor, KeenWrite, provides the ability to reference externally defined variables. Those variables can be added to diagrams. Kroki is called by KeenWrite, meaning numerous text-based diagramming formats can be embedded into Markdown documents, including PlantUML, Graphviz, Mermaid, and many more:

                https://github.com/DaveJarvis/keenwrite/blob/master/docs/screenshots.md

                1. 26

                  These are all valid criticisms of certain patterns in software engineering, but I wouldn’t really say they’re about OOP.

                  This paper goes into some of the distinctions of OOP and ADTs, but the summary is basically this:

                  • ADTs allow complex functions that operate on many data abstractions – so the Player.hits(Monster) example might be rewritten in ADT-style as hit(Player, Monster[, Weapon]).
                  • Objects, on the other hand, allow interface-based polymorphism – so you might have some kind of interface Character { position: Coordinates, hp: int, name: String }, which Player and Monster both implement.

                  Now, interface-based polymorphism is an interesting thing to think about and criticise in its own right. It requires some kind of dynamic dispatch (or monomorphization), and hinders optimization across interface boundaries. But the critique of OOP presented in the OP is nothing to do with interfaces or polymorphism.

                  The author just dislikes using classes to hold data, but a class that doesn’t implement an interface is basically the same as an ADT. And yet one of the first recommendations in the article is to design your data structures well up-front!

                  1. 15

                    The main problem I have with these “X is dead” type article is they are almost always straw man arguments setup in a way to prove a point. The other issue I have is the definition or interpretation of OOP is so varied that I don’t think you can in good faith just say OOP as a whole is bad and be at all clear to the reader. As an industry I actually think we need to get past these self constructed camps of OOP vs Functional because to me they are disingenuous and the truth, as it always does, lies in the middle.

                    Personally, coming mainly from a Ruby/Rails environment, use ActiveRecord/Class to almost exclusively encapsulate data and abstract the interaction with the database transformations and then move logic into a place where it really only cares about data in and data out. Is that OOP or Functional? I would argue a combination of both and I think the power lies in the middle not one versus the other as most articles stipulate. But a middle ground approach doesnt get the clicks i guess so here we are

                    1. 4

                      the definition or interpretation of OOP is so varied that I don’t think you can in good faith just say OOP as a whole is bad and be at all clear to the reader

                      Wholly agreed.

                      The main problem I have with these “X is dead” type article is they are almost always straw man arguments setup in a way to prove a point.

                      For a term that evokes such strong emotions, it really is poorly defined (as you observed). Are these straw man arguments, or is the author responding to a set of pro-OOP arguments which don’t represent the pro-OOP arguments with which you’re familiar?

                      Just like these criticisms of OOP feel like straw men to you, I imagine all of the “but that’s not real OOP!” responses that follow any criticism of OOP must feel a lot like disingenuous No-True-Scotsman arguments to critics of OOP.

                      Personally, I’m a critic, and the only way I know how to navigate the “not true OOP” dodges is to ask what features distinguish OOP from other paradigms in the opinion of the OOP proponent and then debate whether that feature really is unique to OOP or whether it’s pervasive in other paradigms as well and once in a while a feature will actually pass through that filter such that we can debate its merits (e.g., inheritance).

                      1. 4

                        I imagine all of the “but that’s not real OOP!” responses that follow any criticism of OOP must feel a lot like disingenuous No-True-Scotsman arguments to critics of OOP.

                        One thing I have observed about OOP is how protean it is: whenever there’s a good idea around, it absorbs it then pretend it is an inherent part of it. Then it deflects criticism by crying “strawman”, or, if we point out the shapes and animals that are taught for real in school, they’ll point out that “proper” OOP is hard, and provide little to no help in how to design an actual program.

                        Here’s what I think: in its current form, OOP won’t last, same as previous form of OOP didn’t last. Just don’t be surprised if whatever follows ends up being called “OOP” as well.

                    2. 8

                      The model presented for monsters and players can itself be considered an OO design that misses the overarching problem in such domains. Here’s a well-reasoned, in-depth article on why it is folly. Part five has the riveting conclusion:

                      Of course, your point isn’t about OOP-based RPGs, but how the article fails to critique OOP.

                      After Alan Kay coined OOP, he realized, in retrospect, that the term would have been better as message-oriented programming. Too many people fixate on objects, rather than the messages passed betwixt. Recall that the inspiration for OOP was based upon how messages pass between biological cells. Put another way, when you move your finger: messages from the brain pass to the motor neurons, neurons release a chemical (a type of message), muscles receive those chemical impulses, then muscle fibers react, and so forth. At no point does any information about the brain’s state leak into other systems; your fingers know nothing about your brain, although they can pass messages back (e.g., pain signals).

                      (This is the main reason why get and set accessors are often frowned upon: they break encapsulation, they break modularity, they leak data between components.)

                      Many critique OOP, but few seem to study its origins and how—through nature-inspired modularity—it allowed systems to increase in complexity by an order of magnitude over its procedural programming predecessor. There are so many critiques of OOP that don’t pick apart actual message-oriented code that beats at the heart of OOP’s origins.

                      1. 1

                        Many critique OOP, but few seem to study its origins and how—through nature-inspired modularity—it allowed systems to increase in complexity by an order of magnitude over its procedural programming predecessor.

                        Of note, modularity requires neither objects nor message passing!

                        For example, the Modula programming language was procedural. Modula came out around the same time as Smalltalk, and introduced the concept of first-class modules (with the data hiding feature that Smalltalk objects had, except at the module level instead of the object level) that practically every modern programming language has adopted today - including both OO and non-OO languages.

                      2. 5

                        I have to say, after read the first few paragraphs, I skipped to ‘What to do Instead’. I am aware of many limitations of OOP and have no issue with the idea of learning something new so, hit me with it. Then the article is like ’hmm well datastores are nice. The end.”

                        The irony is that I feel like I learned more from your comment than from the whole article so thanks for that. While reading the Player.hits(Monster) example I was hoping for the same example reformulated in a non-OOP way. No luck.

                        If anyone has actual suggestions for how I could move away from OOP in a practical and achievable way within the areas of software I am active in (game prototypes, e.g. Godot or Unity, Windows desktop applications to pay the bills), I am certainly listening.

                        1. 2

                          If you haven’t already, I highly recommend watching Mike Acton’s 2014 talk on Data Oriented Design: https://youtu.be/rX0ItVEVjHc

                          Rather than focusing on debunking OOP, it focuses on developing the ideal model for software development from first principles.

                          1. 1

                            Glad I was helpful! I’d really recommend reading the article I linked and summarised – it took me a few goes to get through it (and I had to skip a few sections), but it changed my thinking a lot.

                          2. 3

                            [interface-based polymorphism] requires some kind of dynamic dispatch (or monomorphization), and hinders optimization across interface boundaries

                            You needed to do dispatch anyway, though; if you wanted to treat players and monsters homogenously in some context and then discriminate, then you need to branch on the discriminant.

                            Objects, on the other hand, allow interface-based polymorphism – so you might have some kind of interface […] which Player and Monster both implement

                            Typeclasses are haskell’s answer to this; notably, while they do enable interface-based polymorphism, they do not natively admit inheritance or other (arguably—I will not touch these aspects of the present discussion) malaise aspects of OOP.

                            1. 1

                              You needed to do dispatch anyway, though; if you wanted to treat players and monsters homogenously in some context and then discriminate, then you need to branch on the discriminant.

                              Yes, this is a good point. So it’s not like you’re saving any performance by doing the dispatch in ADT handling code rather than in a method polymorphism kind of way. I guess that still leaves the stylistic argument against polymorphism though.

                            2. 2

                              Just to emphasize your point on Cook’s paper, here is a juicy bit from the paper.

                              Any time an object is passed as a value, or returned as a value, the object-oriented program is passing functions as values and returning functions as values. The fact that the functions are collected into records and called methods is irrelevant. As a result, the typical object-oriented program makes far more use of higher-order values than many functional programs.

                              1. 2

                                Now, interface-based polymorphism is an interesting thing to think about and criticise in its own right. It requires some kind of dynamic dispatch (or monomorphization), and hinders optimization across interface boundaries.

                                After coming from java/python where essentially dynamic dispatch and methods go hand in hand I found go’s approach, which clearly differentiates between regular methods and interface methods, really opened my eyes to overuse of dynamic dispatch in designing OO apis. Extreme late binding is super cool and all… but so is static analysis and jump to definition.

                              1. 1

                                This might be an odd question, but it looks as if this is written in JavaFX. What’s the status of it these days? I had been under the impression Oracle killed it, but it seems maybe to be limping along?

                                1. 4

                                  it seems maybe to be limping along?

                                  JavaFX is being actively developed. Java’s undergoing some growing pains as it transitions to modular applications. One of those changes was to remove JavaFX from the distributions. Modular Java applications, using tools like jlink and jpackage, have a couple things going for them. First, the ability to create small self-contained executables. Second, a tighter security model to prevent reflective access to functionality that was never meant to be used (e.g., internal Sun classes). A strike against this modular shift is that, with heavy irony, there’s no simple way to cross-compile those binaries into an installer-less application.

                                  Some folks have suggested that JavaFX never should have been bundled with Java in the first place, which makes sense from various perspectives: like why include three different windowing kits (AWT, Swing, and JavaFX)?

                                  JavaFX has a great programming model for modern, null-hostile, OOP/functional-hybrid desktop applications. If starting over, I’d have opted for a different tech stack because it’s so buggy. Some examples: pressing Alt+Tab to switch applications activates the menu’s mnemonics and doesn’t release upon returning to the app; the default platform file chooser dialog doesn’t return focus to the application in all cases; there’s no way to implement highly accurate synchronized scrolling using the WebView component API; and SwingNodes—a bridge between Swing and JavaFX—are blurry, but only on Windows. Except for the last issue, they’ve all been worked around, but it shreds time that I’d’ve rather spent building features.

                                  1. 4

                                    I recently took over a few JavaFX apps at work and am in the process of migrating them from Java 8 (bundled JavaFX) to Java 11 (external dep). I’ve not done GUI stuff in Java in a long time and I’m actually positively surprised how nice it is. Feels a lot better than Swing for sure, but my experience here is now measured in weeks, not months.

                                1. 2

                                  Since last October, a number of new features have been added, including support for typesetting Markdown documents as PDF files; see the screenshots for more details.

                                  Your thoughts and feedback?

                                  1. 1

                                    Working on integrating the ConTeXt typesetting software into my text editor, KeenWrite. TeX output is splendid, but (writing documents in) LaTeX is not my cup of code. I prefer to write in plain text—Markdown—then generate a PDF file. ConTeXt allows its users to completely separate of content and presentation, making it a fine fit for formatting plain text. At present, KeenWrite checks to see if ConTeXt is installed, but doesn’t yet invoke it:

                                    https://i.ibb.co/0j6p5Cr/export-pdf.png

                                    Nearly everything is wired up. This has been about five years in the making, so I’m super-excited to reach this milestone.

                                    1. 3

                                      If stars align, I plan to update KeenWrite to export as PDF using ConTeXt. At present, I use the ecosystem explained in my Typesetting Markdown series to transform Markdown documents into PDFs. This week I added support for Pandoc’s extended fenced div syntax, which I hope will dovetail nicely into generating PDFs from XHTML.

                                      1. 3

                                        Vollkorn (SIL) is an especially nice typeface to my eye, though it appears to have a few issues with ligatures at the moment. I used it in my Typesetting Markdown series to automatically typeset Jekyll & Hyde, Les Mis, Pride & Prejudice, and others using ConTeXt. I’ve also used it in the preview pane of the text editor I’m developing (demo).

                                        1. 5

                                          This is very cool. It’s unfortunate that the very first example is the Lena image, though. :-(

                                          1. 7

                                            I wish people would stop using that image as an example. Not because of its content—though that part isn’t ideal either—but because the source file is so old and mediocre that it isn’t remotely representative of the images we routinely handle today. Worst of all the extreme colour cast makes it useless for judging skin tones.

                                            1. 4

                                              The author doesn’t seem to be from the US, and the last commit appears to be from 2016.

                                              1. 3
                                                1. 3

                                                  I find very unfortunate that there are people who find this unfortunate. You are literally spreading cancer culture.

                                                  1. 5

                                                    I agree, the whole “Losing Lena” movement was a total beat-up of what is really just a small number of people using this image essentially as a in-group meme. The cropped version (the only one I’ve ever seen used in the past 20+ years) is ridiculously tame compared to images that continuously bombard us in contemporary media, especially marketing targeted at women.

                                                    That’s not to say we should continue using the image. We shouldn’t. We should stop using it because it’s grossly unrepresentative of photographic depictions of human skin. We should stop using it because the image is horrifically poor in quality. We should also stop using it because there’s no reason to use something with even a jot of sexual content.

                                                    1. 4

                                                      No one is being cancelled, though?

                                                      1. 3

                                                        I mean… I’m pretty skeptical of a lot of this stuff, but afaik Lena has personally asked people to stop doing it. It’s not some “hypothetically she might be upset”, it’s “the subject of this picture has requested that you find an alternative”.

                                                        1. 3

                                                          Do you have a reference on Lena asking people to stop using it? I couldn’t find anything in that Wikipedia article, and it would change the situation considerably.

                                                          I mean, regardless of whether she actually said anything or not, I think I would be on the side of “maybe we shouldn’t be using that image everywhere”. A lot of my work involves working with raw pixel data, and I find the tool at https://rawpixels.net super useful. However, it uses the Lena image as a default/placeholder image, and looking at very obviously sensual pictures of women, who show no signs of having clothes on, on a 28” display at work, in an open office space, is pretty awkward.

                                                          1. 10

                                                            I’m Lena. I retired from modeling a long time ago. It’s time I retired from tech too.

                                                            https://vimeo.com/372265771

                                                            1. 0

                                                              Do you have a reference on Lena asking people to stop using it? I couldn’t find anything in that Wikipedia article, and it would change the situation considerably.

                                                              Hrm. I recalled it was when she went to the “Conference of the Society for Imaging Science in Technology”. I’ve gone and dug up what she actually said, and it would take a real effort to twist it to the interpretation I’d heard. Sounded to me more like she’s bemused by the popularity of the image than upset.

                                                              Deliberately not reposting what she said here as I’m disinterested in a long thread of people dissecting it.

                                                              1. 4

                                                                She does ask for folks to stop using her photo for this purpose in the video at https://www.losinglena.com/.

                                                                1. 0

                                                                  Ah. I didn’t watch it because I dislike getting info via video and they’ve declined to offer any other format.

                                                                  Can you suggest a timestamp to make checking easy?

                                                      1. 1

                                                        It might be useful to replace "$0" with "$(which "$0")", so that if you’re executing the script from the PATH it will still get the help correctly.

                                                        1. 4

                                                          $0 is the full command path, even if it’s executed from PATH. At least it is on my system under Dash 0.5.10.2 and Bash 5.0.17.

                                                          1. 2

                                                            Also the case on OpenBSD ksh.

                                                          2. 1

                                                            Another possibility is to create some constants:

                                                            readonly SCRIPT_SRC="$(dirname "${BASH_SOURCE[${#BASH_SOURCE[@]} - 1]}")"
                                                            readonly SCRIPT_DIR="$(cd "${SCRIPT_SRC}" >/dev/null 2>&1 && pwd)"
                                                            readonly SCRIPT_NAME=$(basename "$0")
                                                            
                                                          1. 2

                                                            Here’s another variation on shell scripts presenting help information:

                                                            ARGUMENTS+=(
                                                              "a,arch,Target operating system architecture (amd64)"
                                                              "b,build,Suppress building application"
                                                              "o,os,Target operating system (linux, windows, mac)"
                                                              "u,update,Java update version number (${ARG_JRE_UPDATE})"
                                                              "v,version,Full Java version (${ARG_JRE_VERSION})"
                                                            )
                                                            

                                                            The lines are machine-readable and alignment is computed by a bash build script template:

                                                            https://github.com/DaveJarvis/scrivenvar/blob/master/build-template#L186

                                                            When the installer script’s help is requested, the following is produced:

                                                            $ ./installer -h
                                                            Usage: installer [OPTIONS...]
                                                            
                                                              -V, --verbose  Log messages while processing
                                                              -h, --help     Show this help message then exit
                                                              -a, --arch     Target operating system architecture (amd64)
                                                              -b, --build    Suppress building application
                                                              -o, --os       Target operating system (linux, windows, mac)
                                                              -u, --update   Java update version number (8)
                                                              -v, --version  Full Java version (14.0.1)
                                                            

                                                            Using an array reduces some duplication, though more can be eliminated. Scripts typically have two places where the arguments are referenced: help and switch statements. The switch statements resemble:

                                                            https://github.com/DaveJarvis/scrivenvar/blob/master/installer#L191

                                                            Quite often argument parsing entails either assigning a variable or (not) performing an action later. Introducing another convention would allow hoisting the switch statement out of the installer script, up into the template. Off the cuff, this could resemble:

                                                            ARGUMENTS+=(
                                                              "ARG_ARCH,a,arch,Target operating system architecture (amd64)"
                                                              "do_build=noop,b,build,Suppress building application"
                                                              "ARG_JRE_OS,o,os,Target operating system (linux, windows, mac)"
                                                              "ARG_JRE_UPDATE,u,update,Java update version number (${ARG_JRE_UPDATE})"
                                                              "ARG_JRE_VERSION,v,version,Full Java version (${ARG_JRE_VERSION})"
                                                            )
                                                            

                                                            The instructions to execute when arguments are parsed are thus associated with the arguments themselves, in a quasi-FP style. This approach, not including the FP convention, is discussed at length in my Typesetting Markdown series.

                                                            1. 3

                                                              You put so many lovely images in the article from various sample books - yet I don’t seem to see an image with a snapshot of the final pdf you described how to create (the one you link to on lobste.rs)? Or did I miss it?

                                                              1. 1

                                                                The first bullet point in the preamble—“Dr. Jekyll and Mr. Hyde”—links to the final PDF. Generating the full text of Les Misérables can take some time, but shows most of the “features”: typeset tables, postal letters with valedictions, autogenerated table of contents, and more.

                                                                One issue that remains is that the Vollkorn font doesn’t support two-em dash nor three-em dashes glyphs, yet. There’s an issue pulled for it, so when Vollkorn is updated, the XSLT that substitutes two em-dashes and a zero-width space for a two-em dash can be removed.

                                                                1. 2

                                                                  I specifically meant an embedded image, as the other ones you used, not just a link to a pdf, so that I as a reader could get a quick glance.wothout having to download full pdf.

                                                                  1. 1

                                                                    That’s a great idea. Currently, the only image is for the typeset table from Les Mis:

                                                                    https://dave.autonoma.ca/blog/2020/04/28/typesetting-markdown-part-8/images/les-miserables-01.png

                                                                    A couple of images at the top would be useful to give readers a quick glance of the output. Thanks for the suggestion!

                                                              1. 2

                                                                ConTeXt is an absolutely amazing TeX dialect. I love the key-value format for adjusting styles; and I love the fact that you can trivially tweak an individual paragraph/header/list, or trivially adjust the global style, or trivially define e.g. a \startpoem environment. It’s like LaTeX, but with 10 years of modernity added on top. Also, escaping to Lua for advanced work is amazing.

                                                                Sorry, I had to gush for a moment there. <3

                                                                1. 3

                                                                  ConTeXt is an absolutely amazing TeX dialect.

                                                                  SILE and Prince XML may also be worth a peek, depending on your requirements. Much agreement with you: ConTeXt is absolutely amazing.

                                                                1. 7

                                                                  Bret Victor’s website is all sorts of fun.

                                                                  http://worrydream.com/

                                                                    1. 3

                                                                      Absolutely! reStructuredText, MediaWiki, and org-mode are also possibilities. Since pandoc can convert between various lightweight markup, the input source document format is not of huge importance. I’ve found it handy to pass along Markdown documents to people because Markdown is a little less imposing for the uninitiated than AsciiDoc or reStructuredText.

                                                                      1. 1

                                                                        incidentally, there was just a new entry posted on front page

                                                                        https://lobste.rs/s/y1yn8m/from_python_numpy

                                                                        This book looks good, really good, on the web.

                                                                        It is written in reStructuredText (although I do not know how exactly math formulas are done) But the source code for the book and commands to generate html from it are also available (so good to learn from) https://www.labri.fr/perso/nrougier/from-python-to-numpy/#about-this-book

                                                                        1. 1

                                                                          Ive used Markdown for many years and I really think AsciiDoc is better, even for beginners. Markdown, if you look hard at it, I think isnt really good for anything save the most basic of READMEs or comment formatting. With any sort of proper typesetting Markdown fails horribly. AsciiDoc is not a perfect solution but its certainly closer.

                                                                          1. 1

                                                                            To be clear, I use Pandoc-flavoured Markdown, which offers a lot more functionality than what’s specified at https://daringfireball.net/projects/markdown/. I agree that AsciiDoc is superior in many ways to Markdown.

                                                                            Do you have some examples where Pandoc’s Markdown cannot be typeset as nicely as AsciiDoc?

                                                                            1. 2

                                                                              I cant speak to Pandoc. I avoid it as GitHub doesnt use Pandoc, and I prefer a portable solution. GitHub uses CommonMark and AsciiDoc among others. CommonMark is crippled as I think you would agree.

                                                                      1. 2

                                                                        This seems really good! I am as it happens in the process of writing a book using markdown and these examples looked way beyond what I thought possible!

                                                                        1. 2

                                                                          Thank you for the encouragement! Typesetting Markdown into four unevenly split columns took a fair amount of effort, as did finding a way to distinguish between page-spanning illustrations versus inline vector graphics. It is nice being able to share with people the wide variety of possibilities that a little elbow grease can produce.

                                                                          1. 1

                                                                            it’s partly due to me having practical use for things like this, which i guess would be encoruging in a sense. I’m trying to compile a book of sorts. Simultanously as writing the book I will compose algorithms. One piece of code will send data from various datasets and run it through the algorithms. Then it should spit out forms of data.

                                                                            So what I am gunning for here is a make based system. Where I could do a make web, for a online demo or make book for pdf files with graphs run with the latest versions and so forth.

                                                                            I was expecting to get very rudimentary results, but what you have produced looks really slick! Now it’s a quesstion of finnishing all the ideas on schedule.

                                                                            https://github.com/TBF-RnD/alpha (sort of a mess, check out the cleanup branch for a better organized version)

                                                                        1. 2

                                                                          It’s interesting you’re using Context. Here’s is my typesetting script—also based on pandoc—with which I typeset from plain documents, to academic papers with bibliography, to letters. I can also call it from within Vim without leaving it and render a preview. For blogging, I’ve built athena around the same pandoc setup.

                                                                          1. 1

                                                                            Looks like your script gets the job done! There are some minor improvements that could be made (such as changing #!/bin/bash to the more portable #!/usr/bin/env bash and eliminating some of the duplication), but probably not worth the effort. Good to see crossref being used. Athena’s really cool–have you considered adding an RSS feed to it?

                                                                            1. 1

                                                                              Thanks! WRT bin/env bash and the blatant duplication you’re correct; I’ve thought about both but I also don’t think they’re worth the effort. athena does indeed generate an RSS ATOM feed!