News for hackers. Stuff that matters.

gregabbott

Re:Gwtar: A static efficient single-file HTML format on Sunday February 15, 2026 @04:02PM (#47027504)
I made something similar a while ago for locally viewing zipped webpages (a zip which has an index.html file and any related structure of files: images, css, js, folders etc.). It has two parts: a viewer[1] (12KB) and a wrapper[2] (16KB). Both run offline as single file HTML vanilla JS tools. The wrapper bundles a given zipped webpage and the viewer code into a self-extracting HTML file that also runs offline (as in `file:///`). I only needed it to work with simple zips but it shouldn't need much work to deal with more interesting ones.

[1] https://gregabbott.pages.dev/zipped-webpage-view/

[2] https://gregabbott.pages.dev/zipped-webpage-wrap/

Re:Intent to Deprecate and Remove XSLT on Sunday November 02, 2025 @06:33AM (#45789572)
Thanks! Reworked for Firefox.
Re:Intent to Deprecate and Remove XSLT on Saturday November 01, 2025 @01:04PM (#45783293)
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)

Re:Working pipe operator today in pure JavaScript on Thursday October 09, 2025 @04:17AM (#45524950)
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/

Re:Working pipe operator today in pure JavaScript on Wednesday October 08, 2025 @07:49AM (#45515082)
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

Re:Semantic Line Breaks on Wednesday September 10, 2025 @05:24AM (#45195252)
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
Re:Manual for Larry Tesler's PUB markup language. on Saturday November 16, 2024 @05:21AM (#42155653)
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/