DaveJarvis's recent activity

  1. Comment on A quick method for saving an SVG as a PNG in ~comp

    DaveJarvis
    Link Parent
    I believe ImageMagick uses librsvg under the hood to rasterize SVG images. The rsvg-convert command is basically a command-line interface for librsvg.

    I believe ImageMagick uses librsvg under the hood to rasterize SVG images. The rsvg-convert command is basically a command-line interface for librsvg.

    2 votes
  2. Comment on The entirety of Twitch has reportedly been leaked in ~tech

  3. Comment on GM announces Ultra Cruise, enabling true hands-free driving across 95% of driving scenarios in ~tech

    DaveJarvis
    (edited )
    Link
    WHEN NOT TO USE SUPER CRUISE These are some of the situations when Super Cruise should not be activated: When you’re not on a compatible road separated from opposing traffic During difficult or...

    WHEN NOT TO USE SUPER CRUISE

    These are some of the situations when Super Cruise should not be activated:

    • When you’re not on a compatible road separated from opposing traffic
    • During difficult or uncertain driving conditions
    • When lane markings are poor or visibility is limited
    • In a tunnel or construction zones
    • In slippery or in other adverse conditions, including rain, sleet, fog, ice or snow
    • On a road shoulder or service drive
    • When towing a trailer
    • On a freeway or highway exit lane

    Colour me jaded, but I'm sure some of those scenarios will be lost in translation or people will simply forget some. That's the trouble with hands-free driving: it's synonymous with autopilot and autopilot needs to handle at least 99.9% of scenarios before putting it into the hands of the masses (to avoid fatalities and injuries in those circumstances where hands-free must not be used).

    Also, note they used the word should in the description, which is weaker than must.

    13 votes
  4. Comment on We must radically reduce carbon emissions by 2030 in order to avoid the most catastrophic damage of climate change. How can you help? in ~enviro

    DaveJarvis
    Link
    Here's a summary: Earth warming by 3°C would be very, very bad: mass suffering and death zone. We must reduce global emissions to below 35 gigatonnes of annual CO₂. The Intergovernmental Panel on...

    Here's a summary:

    Earth warming by 3°C would be very, very bad: mass suffering and death zone. We must reduce global emissions to below 35 gigatonnes of annual CO₂. The Intergovernmental Panel on Climate Change (IPCC) released a report clarifying that our goal must be 1.5°C to avoid disaster, not 2°C. Achieving that means global carbon emissions must decrease significantly before 2030. Today’s emissions are between 40–45 gigatonnes per year. Following the Paris Agreement’s stipulations, global greenhouse gas emissions would still increase, peaking around 52–58 gigatonnes per year by 2030. That would coincide with 3°C warming by 2100.

    As individuals, actions having the most impact include:

    1. Vote for parties aiming to exceed the Paris Agreement.
    2. Never travel by airplane again (until electric planes take off).
    3. Eat less meat and dairy (ideally, a soy-free vegan diet).

    Other actions include:

    • Choose eco-friendly appliances.
    • Plant a vegetable garden to eat super locally.
    • Convert your home to solar power.
    • Invest responsibly by divesting of fossil fuel funds.
    3 votes
  5. Comment on When is comedy NOT at the consequence of something else's tragedy? in ~talk

    DaveJarvis
    (edited )
    Link
    Abbott & Costello's Who's On First is a classic word play delight, ripe with miscommunication. https://www.youtube.com/watch?v=kTcRRaXV-fg Jack Paar's Water Closet/Wayside Chapel is a brilliant...

    Abbott & Costello's Who's On First is a classic word play delight, ripe with miscommunication.

    https://www.youtube.com/watch?v=kTcRRaXV-fg

    Jack Paar's Water Closet/Wayside Chapel is a brilliant piece stemming from misunderstanding.

    https://wordinfo.info/unit/3956

    Groucho Marx has many funny one-liners:

    One morning I shot an elephant in my pajamas. How he got in my pajamas, I don't know.

    Punctuation twists can be funny:

    Car for sale. A classic! Lemon yellow coupe. Exterior is rust-proof. Can be delivered upon request. No engine runs better. If the sun is out, you can remove the roof for the feel of wind in your hair. Go ahead and kick the tires. As soon as they see it your neighbors will hassle you for a ride. Call xxx-xxxx.

    Change the meaning using the same word order:

    Car for sale. A classic lemon. Yellow coupe exterior is rust. Proof can be delivered upon request. No engine. Runs better if the sun is out. You can remove the roof. For the feel of wind in your hair, go ahead and kick the tires. As soon as they see it your neighbors will hassle you. For a ride, call xxx-xxxx.

    Animal jokes abound:

    A vacationing penguin is driving his car through Arizona when he notices that the oil pressure light is on. He gets out to look and sees oil dripping out of the motor. He drives to the nearest town and stops at the first gas station.

    After dropping the car off, the penguin goes for a walk around town. He sees an ice-cream shop and, being a penguin in Arizona, decides that something cold would really hit the spot. He gets a big dish of ice cream and sits down to eat. Having no hands he makes a real mess trying to eat with his flippers. After finishing his ice cream, he goes back to the gas station and asks the mechanic if he's found the problem. The mechanic looks up and says, "It looks like you blew a seal."

    "No, no," the penguin replies, "it's just ice cream."

    Longer forms of word play:

    https://www.math.ttu.edu/~pearce/jokes1/joke-168.html

    Here's a joke that's not at another person's expense, per se, but is a meta-joke because the punch-line has nothing to do with the lead-up (i.e., it's funnier for the person telling the joke than the audience):

    http://greenlist.weebly.com/the-pink-pink-joke.html

    10 votes
  6. Comment on What did you do this week? in ~talk

    DaveJarvis
    (edited )
    Link
    Received feedback from beta readers of my near-future, hard sci-fi novel: Hurry up and finish writing this book please! I would be happy to continue read it as soon as you have it even halfway...

    Received feedback from beta readers of my near-future, hard sci-fi novel:

    • Hurry up and finish writing this book please! I would be happy to continue read it as soon as you have it even halfway ready!
    • Altogether, I really enjoy your prose, and I'm looking forward to seeing how the plot develops! Your imagery is very rich, from scenery to character's thoughts and personal analogies. This is one of your strongest traits!
    • You've got a great hook. As it is, the first part packs a mean punch.

    I'm looking for beta readers. The book bridges agriculture, artificial general intelligence, capitalism, Fermi's Paradox, surveillance states, and more.

    6 votes
  7. 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
  8. 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
  9. 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
  10. 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.)

  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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