Hacker Newsnew | past | comments | ask | show | jobs | submit | gregabbott's commentslogin

Plain text, markup and Markdown to HTML with XSLT:

REPO: https://github.com/gregabbott/skip

DEMO: https://gregabbott.pages.dev/skip

(^ View Source: 2 lines of XML around a .md file)


Parsing the XSLT file fails in Firefox :)


Thanks! Reworked for Firefox.


In another comment, I mentioned a vanilla JavaScript function I published in 2024 called Chute. https://github.com/gregabbott/chute

In a similar way to the featured project, Chute also uses proxies to work like a pipeline operator. But like in your reply, Chute uses a dot-notation style to chain and send data through a mix of functions and methods.

You might like to see how Chute uses proxies, as it requires no `chainWith` or similar setup step before use. Without setup, Chute can send data through global or local, top-level or nested, native or custom, unary, curried or non-unary functions and methods. It gives non-unary functions the current data at a specific argument position by using a custom-nameable placeholder variable.

The Chute page describes some more of its features: https://gregabbott.pages.dev/chute/


In case it might interest anyone, I wrote a similar vanilla JS function last year called Chute. Chute chains methods and function calls using dot-notation.

https://github.com/gregabbott/chute


That's Point-free style programming.

https://en.wikipedia.org/wiki/Tacit_programming



A while ago, I wondered how close you could get to a pipeline operator using existing JavaScript features. In case anyone might like to have a look, I wrote a proof-of-concept function called "Chute" [1]. It chains function and method calls in a dot-notation style like the basic example below.

  chute(7)        // setup a chute and give it a seed value
  .toString       // call methods of the current data (parens optional)
  .parseInt       // send the current data through global native Fns
  .do(x=>[x])     // through a chain of one or more local / inline Fns
  .JSON.stringify // through nested global functions (native / custom)
  .JSON.parse
  .do(x=>x[0])
  .log            // through built in Chute methods
  .add_one        // global custom Fns (e.g. const add_one=x=>x+1)
  ()              // end a chute with '()' and get the result
[1] https://chute.pages.dev/ | https://github.com/gregabbott/chute


In case anyone has copy they'd like to typeset as monospace plain text, I made a tool to do this recently. If you might find it useful, feel free to play with it at https://monotext.pages.dev/


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: