DaveJarvis's recent activity

  1. Comment on What do you think about voting? in ~talk

    DaveJarvis
    Link
    At the heart of your comment seems to be the issue of transparency. There's eroding transparency on whether the representative you voted for, presuming an election win, will act in accordance with...

    At the heart of your comment seems to be the issue of transparency. There's eroding transparency on whether the representative you voted for, presuming an election win, will act in accordance with the platform that was proposed---and it takes effort to hold each winner accountable. Regardless of what political party wins an election, there's no armchair transparency into the motivations that drive the decisions being made by those who hold office. Various political systems have their own advantages and disadvantages, of course. What I'd like to see is something along the following lines:

    https://bytebucket.org/djarvis/world-politics/raw/master/docs/manual/manual.pdf

    In effect, when a bill, law, or action is proposed, it'd be great to have: a plain language overview of the proposal, economic data showing resources required to accomplish the goals, and a testable hypothesis to confirm whether the proposal had the desired outcome. Additionally, any proposals would have to be supported by reputable sources or other hard evidence.

    3 votes
  2. Comment on KeenWrite 2.2.0: Curl straight quotes upon export in ~comp

    DaveJarvis
    Link
    When exporting to XHTML and PDF files, KeenWrite now curls quotes automatically. See the list of test cases that are handled correctly. The code is basically a collection of rules, which should...

    When exporting to XHTML and PDF files, KeenWrite now curls quotes automatically.

    See the list of test cases that are handled correctly. The code is basically a collection of rules, which should port fairly easily to other programming languages.

    If your prose has a lot of ambiguous ye olde cockney English, the curling feature will make some mistakes, so either disable it or curl the ambiguous quotes yourself. Modern English without complicated interplay between leading and trailing contractions will curl correctly.

    The quote curling rules are for English prose.

    KeenQuotes may be used as a standalone command-line quote curler or as a library. If there's interest, I'll update it to handle XHTML documents---the code is already there, just not exposed from the command-line. The software handles more scenarios than either John Gruber's SmartyPants or Matt Ryall's smartquotes, and is much lighter than Stanford's NLP QuoteAnnotator (65 KB vs 14+ MB).

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

    DaveJarvis
    (edited )
    Link
    Finished implementing a lightweight natural language lexer and parser for English prose, called KeenQuotes. Given some text (see the tests), the software will convert straight quotes into curly...

    Finished implementing a lightweight natural language lexer and parser for English prose, called KeenQuotes. Given some text (see the tests), the software will convert straight quotes into curly quotes and apostrophes. This is a stepping stone towards solving a bigger problem: exporting plain text files as PDF or XHTML documents using KeenWrite while having quotation marks correctly curled.

    Editors at Project Gutenberg typically swap the quotes using clever search and replace. They're interested in using KeenQuotes to speed up the process of fixing quotation marks for old works. Feels good to develop something that's multipurpose and useful! There are other libraries that perform similar tasks, but none of the Java-based libraries could pass all the tests. Stanford's OpenNLP might have been able to, but integrating a massive NLP library seemed overkill just to distinguish apostrophes from straight single quotes; my library is about 70 kb.

    3 votes
  4. Comment on How should we understand the warnings about artificial intelligence? in ~science

    DaveJarvis
    (edited )
    Link Parent
    "What purpose would AGI give itself? What would it want to do over time?" Those posed questions invite exploration. Asking why an AGI would want to expand presupposes a purpose. The question of...

    But why would an AGI share our will to expand and take over everything we can get our hands on?

    "What purpose would AGI give itself? What would it want to do over time?"

    Those posed questions invite exploration. Asking why an AGI would want to expand presupposes a purpose. The question of leaving Earth to explore the galaxy does not require expansion. Both expansion and exile depend on the purpose it gives itself. When imagining its purpose, consider long time-scales. (Earth has ~500 million years left before it begins to become a boiling rock.)

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

    DaveJarvis
    Link
    Creating a library to convert straight single and double quotes to curly quotes and apostrophes in English text. First approach was regex. Second approach was an ANTLR grammar. Third approach was...

    Creating a library to convert straight single and double quotes to curly quotes and apostrophes in English text. First approach was regex. Second approach was an ANTLR grammar. Third approach was Stanford's NLP. Third approach was a PEG parser. Fourth approach was an Earley parser. Although a Probabilistic Earley Parser or the NLP could work, the Java implementations are either lacking or rather bloated for this problem. There is a Java library that implements Gruber's SmartyPants, but SmartyPants is regex-based and doesn't handle a few unambiguous cases that could be solved.

    The latest approach implements a custom lexer and parser to emit curled quotes for a given text block. Algorithmic suggestions welcome! Consider this passage:

    But I must leave the proofs to those who 've seen 'em;
         But this I heard her say, and can't be wrong
         And all may think which way their judgments lean 'em,
         ''T is strange---the Hebrew noun which means "I am,"
         The English always use to govern d--n.'
    

    I'm pretty sure that the single quotes and apostrophes can be resolved unambiguously in such cases, although the rules may take some ironing to get right.

    The ultimate goal is to integrate this with KeenWrite so that generating PDFs will include the correct curl on quotes most of the time (and alert the user when ambiguities cannot be resolved).

    2 votes
  6. Comment on How should we understand the warnings about artificial intelligence? in ~science

    DaveJarvis
    (edited )
    Link
    Let's settle some terminology. AI means "artificial intelligence," which used to mean non-biological, human-fabricated hardware achieving a human-like intellect. The phrase has mutated over time....

    Let's settle some terminology. AI means "artificial intelligence," which used to mean non-biological, human-fabricated hardware achieving a human-like intellect. The phrase has mutated over time. Presently in pop culture AI means, "anything with some form of intelligence." A toothbrush, we're all agreed, is not a general intelligence. AGI means "artificial general intelligence," a term reserved for machinery that can navigate, understand, and interact with its environment at least as well as an average human.

    Humans and AGI don't compete for the same resources: machines needn't air, water, light, organic food, nor even gravity to survive. What does that imply? Really stop to think about this for a minute or two. And what of time scales? The average human seldom plans out beyond two decades. AGI, not bound by biological limitations, would be planning over millennia. In this context, some riveting questions are: What purpose would AGI give itself? What would it want to do over time?

    Why would an AGI risk annihilation over an insignificant pale blue dot while an entire galaxy---and beyond---avails?

    3 votes
  7. Comment on Vaccination appears to protect well, but not perfectly, against variant B.1.617.2 in ~health.coronavirus

    DaveJarvis
    Link Parent
    Tread carefully, for here be dragons.

    Bodily integrity is the inviolability of the physical body and emphasizes the importance of personal autonomy, self-ownership, and self-determination of human beings over their own bodies. In the field of human rights, violation of the bodily integrity of another is regarded as an unethical infringement, intrusive, and possibly criminal.

    Tread carefully, for here be dragons.

    2 votes
  8. Comment on KeenWrite 2.0 in ~comp

    DaveJarvis
    Link Parent
    KeenWrite is based off of Markdown Writer FX; the screenshot shows a few GFM options available. Adding the feature should be fairly straightforward by comparing the two code bases. A PR is welcome!

    We've transitioned to gitlab (hence the GFM request)

    KeenWrite is based off of Markdown Writer FX; the screenshot shows a few GFM options available. Adding the feature should be fairly straightforward by comparing the two code bases. A PR is welcome!

    2 votes
  9. Comment on KeenWrite 2.0 in ~comp

    DaveJarvis
    Link
    You wanted Mermaid diagrams, you got 'em (plus many other diagrams). You asked for dark themes, you got 'em. You suggested a distraction-free and minimal UI, so now it can do that, too. You called...

    You wanted Mermaid diagrams, you got 'em (plus many other diagrams). You asked for dark themes, you got 'em. You suggested a distraction-free and minimal UI, so now it can do that, too. You called for GitLab-flavoured Markdown, you... well, will still have to wait. I wanted to keep plain text content wholly separated from presentation yet still produce beautifully typeset PDF documents and high-quality technical documentation. Four years later, with boatloads of people to thank, I got 'em.

    Take a look: one plain text document produces three distinct PDF files in a few clicks (or keystrokes).

    My text editor, KeenWrite, is now integrated with the ConTeXt typesetting software. After installing the editor, install the typesetter by following the instructions.

    Thoughts?

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

    DaveJarvis
    (edited )
    Link
    Working on themes for my plain text editor, KeenWrite. Here's a screen shot showing two different themes generated from the same source of truth: https://i.ibb.co/GtP9XLZ/keenwrite-preview.png The...

    Working on themes for my plain text editor, KeenWrite. Here's a screen shot showing two different themes generated from the same source of truth:

    https://i.ibb.co/GtP9XLZ/keenwrite-preview.png

    The left-side PDF is typeset in a standard manuscript format. The right-side PDF uses the "Boschet" theme. The text editor itself is in the background, showing the story being written in plain text (Markdown). In the upper-left corner of the editor you can see the "variables" tab. The variables are sourced from a YAML file, editable in a GUI tree. The variables can be referenced throughout the document (see demo video) and in the preferences to provide title page details (e.g., pen name vs. real name).

    The example themes make the ConTeXt typesetting software a little more accessible.

    A new release is in the works, which will make the ConTeXt integration available.

    6 votes
  11. Comment on TeXMe Demo: Self-rendering Markdown + MathJax documents in ~comp

    DaveJarvis
    Link Parent
    Agreed. My article on developing a TeXt editor broaches the subject, albeit briefly: https://bell-sw.com/announcements/2021/03/26/TeXnical-Writing-Part-4-Math/ KeenWrite, which I've been...

    it’s not surprising some may mistake math mode for LaTeX itself.

    Agreed. My article on developing a TeXt editor broaches the subject, albeit briefly:

    https://bell-sw.com/announcements/2021/03/26/TeXnical-Writing-Part-4-Math/

    KeenWrite, which I've been developing in my spare time, has integrated ConTeXt on the main branch to generate PDFs. There's some additional documentation about the rationale behind choosing ConTeXt that may be of interest:

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

    This week(end) I've been working on an EBNF to help convert straight quotes to curly quotes. From the article, notice how the straight quotes haven't been curled:

    Here is an example of "hello, world" program written in the C programming language:

    My goal is for KeenWrite to curl them in 99.9% of cases when exporting to a PDF file. For the other cases (such as ambiguous closing single quotes vs. apostrophes), the author will have to curl the quote by hand.

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

    DaveJarvis
    (edited )
    Link
    KeenWrite, my text editor that separates content and presentation, nearly has a new version: an integration with ConTeXt to typeset plain text documents. Here's a screenshot (work-in-progress)...

    KeenWrite, my text editor that separates content and presentation, nearly has a new version: an integration with ConTeXt to typeset plain text documents. Here's a screenshot (work-in-progress) showing a chapter:

    https://i.ibb.co/qCFs50C/keenwrite-pdf.png

    The far left panel lists YAML variables in a tree (see outdated demo video). The variables may be referenced using R statements or moustache syntax ({{key.ref.name}}). Changing the variable values affects the preview panel in real-time (shown behind the PDF), but the PDF must be generated separately. I'm in the midst of creating a few themes that dictate how ConTeXt typesets the output document. A manuscript theme is on the horizon, which uses double-spaced 12pt Courier.

    JavaFX was not a great decision for building a desktop app. Although it gets off the ground quickly, there are many gotchas that have bite. For example, when exporting as a PDF, if you opt to replace a file, the built-in JavaFX FileChooser will wreck application focus upon returning. To fix this, I've replaced the FileChooser with a third-party picker, which isn't as feature rich at the moment.

    ConTeXt converts SVG files to MetaPost code. Sometime between 2019 and 2020, broad changes were made, freeing the system from its Inkscape/rsvg-convert dependency. There are some show-stoppers in the new SVG/MetaPost conversion routines.

    After the issues with the file chooser and ConTeXt are ironed out, KeenWrite will have export to PDF functionality. Five years in the making!

    4 votes
  13. Comment on Volvo Cars to go fully electric by 2030 – it will phase out all car models with internal combustion engines, including hybrids in ~finance

    DaveJarvis
    Link Parent
    Change'll happen sooner than that. Vancouver went through a pilot project three years ago to install lamp post EV chargers (video), aiming to "have everyone in the city within a 10-minute drive of...

    But I'd imagine that places like apartment complexes and city streets will start slowly adding electric charging stations as the shift to electric cars continues. I just don't see it happening by 2030.

    Change'll happen sooner than that. Vancouver went through a pilot project three years ago to install lamp post EV chargers (video), aiming to "have everyone in the city within a 10-minute drive of a fast-charging station," thereby addressing the orphans problem significantly.

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

    DaveJarvis
    Link
    Adding an Event Bus to my text editor, KeenWrite, to loosely couple UI components---such as the upcoming document outline view. This particular feature was a long-time in the making because I...

    Adding an Event Bus to my text editor, KeenWrite, to loosely couple UI components---such as the upcoming document outline view. This particular feature was a long-time in the making because I wanted the editor to have dockable windows, which required an extensive two-month refactor.

    Themes are a recent addition to the app. Users may edit the application's CSS file within the app itself. Upon saving the CSS file, the UI changes immediately. It's a little surreal.

    Another recent addition is the ability to render diagrams using Kroki. Part of the reason I wrote the app was because I want to use variables (from an external data source) when writing. Users can reference variables in their text-based diagram descriptions now. This has all kinds of possibilities: org charts, family trees in novels, network topology, release branching strategies, and so on.

    If you check out the app, I'd greatly appreciate your feedback.

    3 votes
  15. Comment on Electric car sales increased by 43% in 2020 in ~finance

    DaveJarvis
    Link Parent
    I've had my Kona for about a year. After driving a two-door RAV4 for 20+ years, it was quite the leap forward. The 450+ km range is kicker, the handling is superb, all the modern features took...

    I've had my Kona for about a year. After driving a two-door RAV4 for 20+ years, it was quite the leap forward. The 450+ km range is kicker, the handling is superb, all the modern features took some getting used to, the interior is spacious, and there are many thoughtful conveniences sprinkled throughout. The level 1 charger could have been a smidge more accessible and more control over the on-screen dashboard UI elements would be nice.

    3 votes
  16. Comment on Electric car sales increased by 43% in 2020 in ~finance

    DaveJarvis
    Link Parent
    Another option is to get a Load Miser or similar. These devices allow to you time-share between your laundry power supply and car charger. In practice, it's rare you'll ever want to charge your...

    If you need to get an outlet installed, consider paying a little bit more to wire it for 240V

    Another option is to get a Load Miser or similar. These devices allow to you time-share between your laundry power supply and car charger. In practice, it's rare you'll ever want to charge your car and do laundry at the same time.

    The FLO Home G5 - Level 2 Electric Vehicle (EV) Charging Station pairs very well with a Load Miser. (When the electrician connects this to the exterior wall, that may also a good time to ask about adding another exterior 120V outlet.)

    2 votes
  17. Comment on Electric car sales increased by 43% in 2020 in ~finance

  18. Comment on KeenWrite: Dark themes in ~comp

    DaveJarvis
    (edited )
    Link
    Last time you all gave some great feedback for the text editor: Themes Mermaid diagrams Gitlab-flavoured Markdown The last couple of months have involved a rewrite to make it simpler to add...

    Last time you all gave some great feedback for the text editor:

    • Themes
    • Mermaid diagrams
    • Gitlab-flavoured Markdown

    The last couple of months have involved a rewrite to make it simpler to add themes, diagrams, detachable tabs, persisted user preferences, internationalization, significant performance improvements, cleaner image handling, fix SVG-related issues, and more. Gitlab isn't available yet. Take a peek:

    Diagrams are generated using Kroki, dynamically; variables embedded within the diagram are interpolated in advance. Since the variables are defined in an external YAML file, it means that you can machine-generate or machine-update the variables, then regenerate the updated SVG diagrams for technical documentation. I plan to generate a family tree using names from my novel's YAML-based character sheet. At work, we have technical documents that depict release branches adorned with version numbers; when a new product release is slated, someone updates those version numbers by hand---hopefully not for much longer, though. By using Kroki, the editor can render Mermaid, PlantUML, GraphViz, and many other formats.

    There are still a some wrinkles to iron out. If you try it, let me know what you think!

    4 votes