HNHacker News
TopNewBestAskShowJobs

gregabbott

13 karma · joined August 13, 2023

submissionscomments
gregabbott··on Intent to Deprecate and Remove XSLT
Thanks! Reworked for Firefox.
gregabbott··on Intent to Deprecate and Remove XSLT
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)

gregabbott··on Working pipe operator today in pure JavaScript
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/

gregabbott··on Working pipe operator today in pure JavaScript
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

gregabbott··on Semantic Line Breaks (2017)
Related HN Thread: https://news.ycombinator.com/item?id=4642395
gregabbott··on Pipelining might be my favorite programming language feature
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
gregabbott··on Manual for PUB (a markup language in 1971) – Larry Tesler
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/