HN user

tonyg

3,013 karma

I'm Tony Garnock-Jones.

https://leastfixedpoint.com/

mastodon: @tonyg@leastfixedpoint.com

Posts112
Comments440
View on HN
datatracker.ietf.org 24d ago

I-Regexp: An Interoperable Regular Expression Format

tonyg
3pts0
aphyr.com 8mo ago

I Want You to Understand Chicago

tonyg
735pts486
lab.alexanderobenauer.com 9mo ago

Recreating the Canon Cat document interface

tonyg
118pts16
www.youtube.com 10mo ago

The $200M Reason AMQP Became a Standard – A CTO's Inside Story [video]

tonyg
3pts0
leastfixedpoint.com 1y ago

Streamlining HTTP

tonyg
1pts0
eighty-twenty.org 1y ago

Hot code reloading in Erlang without using an OTP release

tonyg
2pts0
eighty-twenty.org 2y ago

UI for sums must remember products

tonyg
2pts0
eighty-twenty.org 2y ago

More pitfalls regarding JavaScript's non-monadic promises

tonyg
2pts0
eighty-twenty.org 2y ago

Python3 is removing crypt.crypt and not replacing it with anything

tonyg
41pts76
github.com 2y ago

Signalbackup-tools: Tool to work with Signal Backup files

tonyg
1pts0
eighty-twenty.org 2y ago

Why Object-Oriented Languages Need Tail Calls (2009)

tonyg
2pts2
stanford.edu 2y ago

A lightweight, high-productivity desktop environment for Google Cardboard [pdf] (2019)

tonyg
3pts0
eighty-twenty.org 2y ago

Virtualizing Uxn

tonyg
68pts4
eighty-twenty.org 2y ago

Show HN: File distribution over DNS: (ab)using DNS as a CDN

tonyg
72pts34
100r.co 3y ago

The Uxn Ecosystem

tonyg
257pts54
100r.co 3y ago

The Uxn Ecosystem

tonyg
11pts2
synit.org 3y ago

Breaking Down the System Layer

tonyg
1pts0
mumble.net 3y ago

A security kernel based on the lambda calculus (1996)

tonyg
3pts0
noiseprotocol.org 3y ago

Noise Protocol Framework

tonyg
1pts0
eighty-twenty.org 3y ago

Tasks within Transactions using RabbitMQ

tonyg
1pts1
eighty-twenty.org 3y ago

SirTunnel, a personal ngrok alternative

tonyg
147pts24
www.youtube.com 3y ago

Synit and SqueakPhone Demo [video]

tonyg
4pts0
synit.org 3y ago

Breaking Down the System Layer

tonyg
1pts0
syndicate-lang.org 4y ago

State of the SqueakPhone

tonyg
133pts14
github.com 4y ago

Code-Reloading for Racket

tonyg
1pts0
github.com 4y ago

xcb-shim: easier native X11 protocol implementation

tonyg
5pts3
github.com 4y ago

Show HN: Squeaker: Like Docker, but for Smalltalk Images

tonyg
16pts1
syndicate-lang.org 4y ago

PinePhone Battery Discharge Curve

tonyg
3pts0
tonyg.github.io 4y ago

A Partial Extract of Revctrl.org

tonyg
1pts0
eighty-twenty.org 4y ago

60x speed-up of Linux “perf”

tonyg
477pts215

(1998). Java existed, but neither Scala nor Java-with-generics did.

From the conclusion:

"We have presented a programming protocol, Extensible Visitor, that can be used to construct systems with extensible recursive data domains and toolkits. It is a novel combination of the functional and object-oriented programming styles that draws on the strengths of each. The object-oriented style is essential to achieve extensibility along the data dimension, yet tools are organized in a functional fashion, enabling extensibility in the functional dimension. Systems based on the Extensible Visitor can be extended without modification to existing code or recompilation (which is an increasingly important concern)."

I don't think that's right - IIRC it used to be possible to write out a file, if loaded from a file:// URL, directly from JavaScript. Then that ability got nobbled because security (justifiable) without properly thinking through a good alternative (not justifiable). I mourn the loss of the ability, TiddlyWiki was in a class of its own and there should have been many more systems inspired by its design. Alas.

ETA: Wikipedia has reminded me the feature was called UniversalXPConnect, and it was a Firefox thing and wasn't cross-browser. It still sucks that it was removed without sensible replacement.

Undermining the credibility of computer science research is the best possible outcome for the field, since the institution in its current form does not deserve the credibility that it has.

Horseshit. This might be true for AI research (and even there that's an awfully broad brush you're using, mate), but it's certainly not true for other areas of computer science.

Static analysis can tell what forms are invoking an fexpr and which are function calls. It's not got different from knowing which are macros. That problem can be solved.

I don't think this is the case. Consider Kernel's

  ($lambda (f) (f (+ 3 4)))
Is `f` a fexpr or a closure? We cannot know until runtime.

There are no string keys in the Person example above. You could add some, though, or use numbers instead with the same host-language API:

  Person = <person @name String @address Address>
as above, or
  Person = <person {
    @name "name": String
    @address "address": Address
  }>
or
  Person = {
    @name 1: String
    @address 2: Address
  }
etc. all produce the same host-language record, e.g. in TypeScript
  export type Person = {
    name: String,
    address: Address,
  };

XML would make a fine choice. It lacks atomic data types other than text, and compound data types other than sequences, unless you count element attributes, which are in a kind of awkward position because of the historical development of the language. Preserves has a richer suite of primitive data types and decomposes XML's elements into separate notions of map, sequence, and tagged value.

The version number is the schema language version, not the version of the collection of types described in the file.

The schema language is extensible/evolvable in that pattern matching ignores extra entries in a sequence and extra key/value pairs in a dictionary. So you could have a "version 1" of a schema with

  Person = <person @name String> .
and a "version 2" with
  Person = @v2 <person @name String @address Address>
         / @v1 <person @name String> .
Then, Person.v2 from "version 2" would be parseable by Person from "version 1", and Person from "version 1" would parse using "version 2" as a Person.v1.

The schema language is in production but the design is still a work in progress and I expect more changes before a 1.0 release of the schema language.

(The schema language is completely separate from the preserves data model, by the way -- one could imagine other schema languages being used instead/as well)

Yeah EDN is quite similar. Preserves has no nil, allows any value as a tag, gets into the weeds more on when strings are equal or not, doesn't distinguish lists and vectors, and doesn't require each kind of tagged element to define an equivalence. And it has annotations (vs EDN's comments) and embedded values.

No, a record is a tagged (sequence of) value(s).

  <tag v1 v2 v3>
If you put a single dictionary-valued "field" in a record, you get a variation with named fields
  <tag {
    field1: value1
    field2: value2
    field3: value3
  }>
Records have positional "fields" because of the Scheme heritage of the design.

--

Re bytestring -- yes there are some concessions to real machines/languages in there that aren't absolutely required. Other examples include booleans and strings, which could have been <true> and <false> and <string [65 66 67]> etc respectively.

There's a little more on this topic in footnote 2 on the "conventions" page: https://preserves.dev/conventions.html#fn:why-dictionaries

Python remembers order, and exposes it in its iterations, but doesn't use it in its equivalence over dictionaries (== semantics).

(ETA: What are you quoting there? I don't think that text appears on the Preserves site) (ETA2: Ah, it's the tutorial. Cool)

Useful if you have a JSON-keyed table, for example: JSON lacks a useful (standardised) equivalence relation, meaning you get weak and/or implementation-specific guarantees about how key lookup works. Equivalences were the motivation for developing Preserves: I was (and am) working on a generalized approach to messaging middleware, you might say, meaning that things like "patterns over values" and "filters" and "value-keyed tables" are all things I need to talk about. (This all comes out of RabbitMQ/AMQP thinking back in the day and my PhD-and-after work subsequently.)

Or, in "quick reference card" form: https://preserves.dev/cheatsheet.html

The syntax isn't the most interesting part though; the thing that distinguishes it from most other data languages out there is that it has semantics (= a rigorous definition of when values are equal and when they aren't). So you can use Preserves semantics with JSON syntax (a subset of Preserves' text syntax) as one way of getting actually-meaningful JSON.

Plus, comments (and other annotations) ;-)

It confuses folks into thinking that there is some garbage collection that isn’t tracing. There’s no such thing.

It is standard to consider reference counting as garbage collection.

Bacon, D.F., Cheng, P. and Rajan, V.T. 2004. A unified theory of garbage collection. ACM SIGPLAN Notices. 39, 10 (Oct. 2004), 50–68. DOI: https://doi.org/10.1145/1035292.1028982

Abstract:

Tracing and reference counting are uniformly viewed as being fundamentally different approaches to garbage collection that possess very distinct performance properties. [...] Using this framework, we show that all high-performance collectors (for example, deferred reference counting and generational collection) are in fact hybrids of tracing and reference counting.

Java in the Small 2 years ago

Memory safety isn't possible in Java (unlike Rust).

This is obviously some strange use of the phrase "memory safety" that I wasn't previously aware of.

It's the other way around for Racket, where R5RS and R6RS are subsets :-)

IIUC Racket's new name came about from, basically, brand confusion: to avoid being (mis)understood as "yet another implementation of Scheme" rather than as the thing-in-itself it had become.