DaveJarvis's recent activity

  1. Comment on What did you do this weekend? in ~talk

    DaveJarvis
    (edited )
    Link Parent
    Yes, it was intended as a meta joke. In _config.yaml, the variable definition that the README references is a-knocking, but nobody is home. Ideally, every location in the application and its...

    Are you referring to the title? Because I think that's a meta joke about the project.

    Yes, it was intended as a meta joke. In _config.yaml, the variable definition that the README references is a-knocking, but nobody is home. Ideally, every location in the application and its documentation that references the app's title would reuse the same source definition.

    2 votes
  2. Comment on What did you do this weekend? in ~talk

    DaveJarvis
    Link
    Upgraded Scrivenvar to Java 14. I developed the application because I wanted to have a chain-of-command design pattern that would let me preview Markdown documents that include interpolated...

    Upgraded Scrivenvar to Java 14.

    I developed the application because I wanted to have a chain-of-command design pattern that would let me preview Markdown documents that include interpolated strings. See the architecture diagram for an example processing chain and a proposal of what should be possible with text editors (but currently isn't).

    The driving force behind the editor was that I wanted a way to:

    • Define inter-dependent values as expressions inside an externally defined document (e.g., have a starting date and relative date offsets computed from that start date; or define parts of a person's name with their full name being dependent on the first and last name).
    • Provide the ability to compute complex expressions and integrate web queries. (See Typesetting Markdown, Part 6.)
    • Source data from CSV files that gets transformed into Markdown tables, then displayed in a tabular format in the HTML preview panel.
    • Use XML and XSLT to semantically mark up content that is transformed into Markdown documents, which are then also rendered as HTML.
    • Easily insert variable names into documents without having to type the name of the variable each time. The variables are sourced from a structured hierarchical document (YAML), so the namespace can get quite deep. The editor allows you to type in a partial value (case-sensitive substring match) followed by pressing Ctrl+Space to insert the variable name. The preview window updates immediately to show the value that was inserted.
    2 votes
  3. Comment on Scrivenvar: A text editor with built-in R functionality in ~comp

    DaveJarvis
    Link
    Scrivenvar is an open source, Java-based, desktop Markdown editor that can edit R Markdown files courtesy of Renjin. The editor's software architecture is different than most other Markdown...

    Scrivenvar is an open source, Java-based, desktop Markdown editor that can edit R Markdown files courtesy of Renjin. The editor's software architecture is different than most other Markdown editors, allowing users to edit XML, Markdown, R Markdown, and other combinations.

    The documentation provides an overview of how to use the integrated R engine.

    Once Java 14 is installed, download the application then run it using:

    java -jar scrivenvar.jar
    

    Would appreciate your thoughts and feedback on Beta 8, especially with regards to importing interpolated string definitions from YAML files. (If Java is too much a hurdle, I'd be interested in knowing that as well.)

    3 votes
  4. Comment on What programming/technical projects have you been working on? in ~comp

    DaveJarvis
    Link
    Recently finished up a blog post that describes a relatively quick way to orthographically project and manipulate 2D scalable vector graphics upon a spherical surface:...

    Recently finished up a blog post that describes a relatively quick way to orthographically project and manipulate 2D scalable vector graphics upon a spherical surface:

    https://dave.autonoma.ca/blog/2020/05/12/impacts-project-voronoi-diagrams/

    4 votes
  5. Comment on Making of Impacts – Programming ⋂ Art in ~comp

    DaveJarvis
    Link
    For those of you who have been following the Typesetting Markdown series, this topic takes a detour to discuss some technical aspects involved with Making of the Impacts Project. There's a mix of...

    For those of you who have been following the Typesetting Markdown series, this topic takes a detour to discuss some technical aspects involved with Making of the Impacts Project. There's a mix of art, programming, and ways to avoid reinventing some wheels in this post that may prove informative. My plan is to write about technical adventures for the Impacts Project, leading up to a tie-in with the final part of the Typesetting Markdown series.

    Ideas for the Making of Impacts topics include (some more programming-oriented than others):

    • Stripe payment integration with unique link generation
    • Generating a dual Y-axis plot using R (from temperature and CO2 data)
    • Running Celestia to approximate locations of protoplanetary orbital paths
    • Recreating a rasterized drawing as separate logical vector objects, inexpensively
    • Simulations behind the K-Pg Extinction impact event
    • Using MetaFun to draw lines based on values in Markdown document (i.e., Part 9 of Typesetting Markdown)

    What topics would be of most interest?

    1 vote
  6. Comment on Typesetting Markdown - Part 8 in ~comp

    DaveJarvis
    (edited )
    Link
    The second-to-last part is finished: https://dave.autonoma.ca/blog/2020/04/28/typesetting-markdown-part-8/ The journey covers like-for-like typesetting of a 100-year-old poem while maintaining...

    The second-to-last part is finished:

    https://dave.autonoma.ca/blog/2020/04/28/typesetting-markdown-part-8/

    The journey covers like-for-like typesetting of a 100-year-old poem while maintaining strict separation of content from presentation. Additionally, the post explores a way to typeset Markdown documents generated from epubs source files. Both of these adventures revolve around Pandoc's Markdown annotation extension.

    Thoughts?

    4 votes
  7. Comment on Converting Project Gutenberg Projects to Markdown in ~comp

    DaveJarvis
    Link
    This blog post discusses how to convert a treasure trove of Project Gutenberg novels into Markdown in preparation for the thematic typesetting to come in Typesetting Markdown Part 8. This is a...

    This blog post discusses how to convert a treasure trove of Project Gutenberg novels into Markdown in preparation for the thematic typesetting to come in Typesetting Markdown Part 8. This is a yak-shaving post that explores a way to create sufficiently large Markdown documents to be styled. A few takeaways include:

    • Common ways content is intermingled with presentation.
    • Using extensible stylesheets to transform XHTML into Markdown.
    • Bash script to automatically pull down and convert Standard Ebook novels into Markdown.

    Suggestions for improvement are welcome.

    5 votes
  8. Comment on Inexpensive, reusable electrodes for EMG in ~hobbies

    DaveJarvis
    Link Parent
    I've passed this along, thank you. They look very close. We'll see if that material works!

    silver chloride electrodes

    I've passed this along, thank you. They look very close. We'll see if that material works!

    1 vote
  9. Comment on Inexpensive, reusable electrodes for EMG in ~hobbies

    DaveJarvis
    Link
    Several years ago, a friend of mine was given electrodes that can be used to detect tiny EMG signals. Most of the electrodes, after several years, have since corroded or are otherwise unfit for...

    Several years ago, a friend of mine was given electrodes that can be used to detect tiny EMG signals. Most of the electrodes, after several years, have since corroded or are otherwise unfit for further use. My friend was never told anything about them and in the intervening years, the point of contact has all but disappeared.

    Does anyone recognize the electrodes and, if so, know their formal name and where they can be purchased? If not, does anyone know someone who may know?

    Any help hunting them down is greatly appreciated.

    1 vote
  10. Comment on Multi-format text editor with chain-of-command processing in ~comp

    DaveJarvis
    (edited )
    Link Parent
    That workflow would work well for Lisp developers. Scrivenvar is for non-developers, to make using document variables trivial. Similar, yes; so much so that I submitted a feature request a few...

    lisp phrases in my documents

    That workflow would work well for Lisp developers. Scrivenvar is for non-developers, to make using document variables trivial.

    pandoc-moustache

    Similar, yes; so much so that I submitted a feature request a few years ago.

    I'm not aware of any tools which do this perfectly generically.

    I wrote yamlp to perform string interpolation on YAML files. It works, but adds complexity to the pipeline. Ideally, the string interpolation would be a pandoc Lua filter, or even a cross-platform standalone binary.

    Using Lua would greatly streamline the workflow: I could retire yamlp and eliminate piping variable files ("templates") through pandoc twice:

    java -jar yamlp.jar variables.yaml > interpolated.yaml
    cat interpolated.yaml ??.md > body.md
    
    pandoc body.md --template body.md --metadata pagetitle="unused" | \
        pandoc -t context > body.tex
    

    Versus:

    cat ??.md > body.md
    pandoc body.md --lua-filter=variables.lua \
      --metadata-file=variables.yaml -t context > body.tex
    

    If you had any more thoughts on this, I'd be glad to read them.

    3 votes
  11. Comment on Multi-format text editor with chain-of-command processing in ~comp

    DaveJarvis
    Link Parent
    Indeed! You may enjoy my blog series on typesetting Markdown, in particular the bash scripts that cobble pandoc and other tools together. Completely agreed: for simple variable substitution,...

    vim+pandoc

    Indeed! You may enjoy my blog series on typesetting Markdown, in particular the bash scripts that cobble pandoc and other tools together.

    handles transforming text with templates and variables etc very cleanly

    Completely agreed: for simple variable substitution, pandoc templates are bomb. Variable interpolation is where pandoc fails. If you're interested in this topic, I opened a feature request four years ago. In particular, the discussion around namespaces and sigil syntax may spark some ideas.

    Knowing that variables from pandoc templates wouldn't meet my needs in any short amount of time, I wrote a Java program to perform variable interpolation on YAML files. You can read all about its integration in typesetting Markdown part 5. The code for the YAML preprocessor is online.

    4 votes
  12. Comment on Multi-format text editor with chain-of-command processing in ~comp

    DaveJarvis
    Link Parent
    If you do, be sure to read about the hot-keys on the usage page, in particular ctrl+space to auto-insert variables into the source document.

    I'll have to use it at some point.

    If you do, be sure to read about the hot-keys on the usage page, in particular ctrl+space to auto-insert variables into the source document.

    3 votes
  13. Comment on Multi-format text editor with chain-of-command processing in ~comp

    DaveJarvis
    Link Parent
    Thank you. At the moment--to my knowledge--GitHub doesn't provide a way to associate a named YAML file with a Markdown document, much less apply a YAML preprocessor (my utility) to perform string...

    $application.title$

    Thank you. At the moment--to my knowledge--GitHub doesn't provide a way to associate a named YAML file with a Markdown document, much less apply a YAML preprocessor (my utility) to perform string interpolation on the variables within a hierarchical namespace. In the architecture diagram, that's the purpose of the "Variable Processor" shown at the bottom.

    OpenJFX

    Thank you, again. This does introduce complications: the library is GPL (not compatible with Scrivenvar) and will require three separate downloads (Java, OpenJFX, and Scrivenvar). Licensing aside, bundling the components with a stripped-down JDK to avoid separate downloads would then require multiple builds: one for every operating system (at least Linux, Mac, and Windows). The promise of Java, IMO, was "write once, run anywhere," rather than "write once, build multiple binaries, test everywhere." A technical quagmire, either way. If offering multiple binaries (or requiring three software downloads) is the only way JavaFX is usable, then rewriting the application without JavaFX is preferable.

    I do appreciate the help and the OpenJFX will likely work for my own use.

    1 vote
  14. Multi-format text editor with chain-of-command processing

    A while back I developed a desktop-based text editor (Scrivenvar) that uses the Chain-of-Responsibility design pattern to help me author fairly involved text documents. The editor's high-level...

    A while back I developed a desktop-based text editor (Scrivenvar) that uses the Chain-of-Responsibility design pattern to help me author fairly involved text documents. The editor's high-level architecture resembles the following diagram:

    https://i.imgur.com/8IMpAkN.png

    Am I reinventing the wheel here? Are there any modern, cross-platform, liberal open-source (LGPL, MIT, Apache 2), text editor frameworks (such as xi or Visual Studio Code), that would enable (re)development of such a tool?

    Scrivenvar is written in Java, but to my chagrin, Java 9+ no longer bundles JavaFX. The text editor was based on MarkdownWriterFX, itself based on JavaFX. This means there's no easy upgrade path, so I'm looking to rebuild the editor either as a cross-platform desktop application or as a web application.

    8 votes