viralpraxis
Joined 3 years ago
Joined 3 years ago
{
"$id": "https://example.com/test.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Person",
"type": "object",
"properties": {
"hp": {
"type": "integer",
"description": "HP",
"minimum": 1,
"maximum": 15
}
}
}
is converted to this BNF-like representation: hp ::= ([1-9] | "1" [0-5]) space
hp-kv ::= "\"hp\"" space ":" space hp
root ::= "{" space (hp-kv )? "}" space
space ::= | " " | "\n"{1,2} [ \t]{0,20}D = Data.define do E = new end
which is wrong since ’E‘ escapes (it becomes ´Object::E´)
also, I agree that its kinda weird to use Ractor API but for us (service object gem) it was the best way to check if an argument is immutable (via Ractor.shareable?)
Interestingly, whenever I discussed my thesis, the first reaction from others often revolved around moral concerns.
I’ve been playing with mutation-injection framework for my master’s thesis for some time. I had to use LibCST to preserve syntax information which is usually lost during AST serialization/deserialization (like whitespaces, indentation and so on). I thought that the difference between abstract and concrete trees is that it’s guaranteed CST won’t lose any information, so it can be used to specific tasks where ASTs are useless. So, did they actually use CST-based approach?