1. Another idea - MD generator

So I was reading up on FORTH implementations. I came across Konilo. That led me to RetroForth and that led me to Unu, a simple format allowing mixing of code, commentary, and tests within a source file.

That got me thinking about another way of writing Euphoria. A file extension of .exd (if that already exists, choose something else). A file in markdown format with Euphoria code marked with

```eui 
? "Hello World" 
``` 
and possibly tests with
```eutest 
``` 
When the file is evaluated, an MD file is generated with the Euphoria codeblocks evaluated and the results embedded.

It occurs to me this would make report-writing a bit easier for those referring to changeable web resources like stocks.

-Bruce

new topic     » topic index » view message » categorize

2. Re: Another idea - MD generator

axtens_bruce said...

So I was reading up on FORTH implementations. I came across Konilo. That led me to RetroForth and that led me to Unu, a simple format allowing mixing of code, commentary, and tests within a source file.

That got me thinking about another way of writing Euphoria. A file extension of .exd (if that already exists, choose something else). A file in markdown format with Euphoria code marked with

```eui 
? "Hello World" 
``` 
and possibly tests with
```eutest 
``` 
When the file is evaluated, an MD file is generated with the Euphoria codeblocks evaluated and the results embedded.

It occurs to me this would make report-writing a bit easier for those referring to changeable web resources like stocks.

Eudoc already does this via its --test-eucode option, but it has many shortcomings. Eudoc, like Euweb (this forum), still uses Creole, which effectively lost the format war with Markdown soon after both hit the internet. And nobody's really touched the Eudoc code in ages. First thing I'd like to see towards improving this is a good Markdown parsing library for Euphoria, preferably in native code and not just a wrapper for any of the numerous C libraries floating around.

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: Another idea - MD generator

ghaberek said...

And nobody's really touched the Eudoc code in ages. First thing I'd like to see towards improving this is a good Markdown parsing library for Euphoria

Is there a particular flavour of Markdown that you have in mind? viz, https://coda.io/@toto-chan/markdown-for-media/markdown-flavors-2

-Bruce

new topic     » goto parent     » topic index » view message » categorize

4. Re: Another idea - MD generator

axtens_bruce said...

Is there a particular flavour of Markdown that you have in mind? viz, https://coda.io/@toto-chan/markdown-for-media/markdown-flavors-2

CommonMark with (optional?) support for GitHub Flavored Markdown.

-Greg

new topic     » goto parent     » topic index » view message » categorize

5. Re: Another idea - MD generator

ghaberek said...

CommonMark with (optional?) support for GitHub Flavored Markdown.

Probably worth porting this C language version of Common Mark with GFM extensions then.

-Bruce

new topic     » goto parent     » topic index » view message » categorize

6. Re: Another idea - MD generator

axtens_bruce said...
ghaberek said...

CommonMark with (optional?) support for GitHub Flavored Markdown.

Probably worth porting this C language version of Common Mark with GFM extensions then.

-Bruce

Now that's a daunting challenge. Here's what I'd do:

Get 32/64 dll/so of libcmark built, and write a trivial wrapper for that, at least

string html = cmark_markdown_to_html(string src, integer options) 

but possibly also some AST with text fragments dump, for development and testing purposes.

Grab a copy of mdtest, organise that into /mustwork, /maybelater, and perhaps /letsnotbotherwiththese, and add any eu[forum]-specifics.

Set to work on a brand new libcmark.e (largely ignoring the C sources) and a trivial test runner.

I'll happily get involved, and would certainly like to see a <phixcode></phixcode> that I can keep up to date.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu