Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21ea91a5cb34f87

Jump to content

Talk:Hash consing

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 11 months ago by Cjs in topic Explain `bwp-object?`

Explain `bwp-object?`

[edit]

As someone with cursory Scheme experience, I was delighted to be able to understand this whole page top to bottom until I hit the acronym BWP. Looking it up, it stands for broker weak pointer, comes from Chez Scheme (maybe used elsewhere?), and the details can be inferred better from there. It feels to me like a hole in the example's abstraction from the underlying implementation of Scheme. I don't have the background or skill to say wether it's possible to reimplement it in clear terms as an additional function, but believe that would improve the example for a broader audience, and even just a comment expanding the acronym would be a start. 24.113.171.200 (talk) 02:55, 12 August 2022 (UTC)Reply

The whole example would be more accessible in an ALGOL-like pseudocode (e.g. Python or pseudo-Python). 74.73.228.182 (talk) 21:36, 22 August 2024 (UTC)Reply
bwp-object? comes from Chez Scheme v8. I've updated the introductory paragraph of the example to note what it does, because I tripped up on that too. I don't know where make-weak-vector comes from, and I'm not clear on why the example uses that instead of just weak-cons; probably someone more familiar with Chez Scheme than I am should see if that can be cleaned up a bit. But I have the feeling that this example is not just beyond my understanding but wrong: it looks to me as if, if there's no entry in the cache table for those args, it does not apply the proc and enter the result in the table but simply returns #f. ((bwp-object? #f) appears to me to evaluate to #f: the docs say "#t if obj is the broken weak-pair object, #f otherwise"
Cjs (talk) 08:01, 9 August 2025 (UTC)Reply