I disagree. The task asks for an SVG; which is a vector format associated with line drawings, clipart and cartoons. I think it's good that models are picking up on that context.
In contrast, the only "realistic" SVGs I've seen are created using tools like potrace, and look terrible.
I also think the prompt itself, of a pelican on bicycle, is unrealistic and cartoonish; so making a cartoon is a good way to solve the task.
> You'd naturally gravitate towards parsing/transforming raw data into typed data structures that have guaranteed properties instead to avoid writing defensive code everywhere e.g. a Date object that would throw an exception in the constructor if the string given didn't validate as a date
It's tricky because `class` conflates a lot of semantically-distinct ideas.
Some people might be making `Date` objects to avoid writing defensive code everywhere (since classes are types), but...
Other people might be making `Date` objects so they can keep all their date-related code in one place (since classes are modules/namespaces, and in Java classes even correspond to files).
Other people might be making `Date` objects so they can override the implementation (since classes are jump tables).
Other people might be making `Date` objects so they can overload a method for different sorts of inputs (since classes are tags).
I think the pragmatics of where code lives, and how the execution branches, probably have a larger impact on such decisions than safety concerns. After all, the most popular way to "avoid writing defensive code everywhere" is to.... write unsafe, brittle code :-(
> Funny enough the only time I used rss was when I had that cool outlook integration that made them seem like emails.
I convert feeds to maildir, and read them in email clients (Thunderbird, KMail, Emacs+Gnus, Emacs+mu4e, etc.). That lets me use the same setup for emails and feeds; keeping them on a network mount makes sync trivial; etc.
I think those concerns are straw men. The real concern is that the invariants we rely on should hold when the codebase changes in the future. Having the compiler check that automatically, quickly, and definitively every time is very useful.
This is what TFA is talking about with statements like "the compiler can track all code paths, now and forever."
Indeed, I had a Freerunner back then (the N900 came out after, and I couldn't get its predecessors since they weren't phones, as the parent points out). It served me well for about a decade, and I've now upgraded to a Pinephone.
A bigger mistake was to not give the N770, N800, etc. phone capabilities. I was buying a new phone around that time, and thought those devices looked cool; but I couldn't even consider them, because they couldn't do basic calls or SMS. They fixed that with the N900, but had lost their head-start.
perhaps because phone capabilities require more chips, and SDR that would've made the N800/N900 too pricey. but, honestly, this thing was slow as shit, I loved the design so much, and hated this half-baked Debian equally.
The fact you could run apt on it did not help that much for the regular user.
Legislation often bounces back and forth between the Commons and the Lords a few times. The Lords won't block things which have a strong mandate, e.g. things promised in an election manifesto; but they can at least stall and amend things.
If HN is social media, then so are PHPBB, NNTP, BBS, etc. and the term loses its semantic relevance.
My heuristic is that social media focuses on particular people, regardless of what they're talking about. In contrast, forums (like HN) focus on a particular topic, regardless of who's talking about it.
Doesn't matter what you want it to mean. What matters is what those in power want it to mean. It's very easy to stretch the definition to cover all sites where people can post content for strangers to see, or stretch it even wider to all digital media where people can interact with a social group.
AFAIK nobody here is. The point is that with relevance to the current discussion on potential future age-verification laws, only the widest definition matters, because that's what's at risk.
> Theoretically, could `set` be a subclass of `frozenset` (and `dict` of `frozendict`)?
At one extreme: sure, anything can be made a subclass of anything else, if we wanted to.
At the other extreme: no, since Liskov substitution is an impossibly-high bar to reach; especially in a language that's as dynamic/loose as Python. For example, consider an expression like '"pop" in dir(mySet)'
> Barbara Liskov and Jeannette Wing described the principle succinctly in a 1994 paper as follows:[1]
> > Subtype Requirement: Let ϕ(x) be a property provable about objects x of type T. Then ϕ(y) should be true for objects y of type S where S is a subtype of T.
My expression `"pop" in dir(mySet)` gives an explicit example of how `set` and `frozenset` are not subtypes of each other (regardless of how they're encoded in the language, with "subclasses" or whatever). In this case `ϕ(x)` would be a property like `'"pop" in dir(x)' = 'False'`, which holds for objects x of type frozenset. Yet it does not hold for objects y of type set.
Your example of `hasattr(mySet, 'pop')` gives another property that would be violated.
My point is that avoiding "Liskov violations" is ("theoretically") impossible, especially in Python (which allows programs to introspect/reflect on values, using facilities like 'dir', 'hasattr', etc.).
The root of the issue here is that Liskov substitution principle simply references ϕ(x) to be some property satisfied by objects of a class. It does not distinguish between properties that are designed by the author of the class to be satisfied or properties that happen to be satisfied in this particular implementation. But the Hyrum’s Law also states that properties that are accidentally true can become relied upon and as time passes become an intrinsic property. This to me suggests that the crux of the problem is that people don’t communicate sufficiently about invariants and non-invariants of their code.
> > Subtype Requirement: Let ϕ(x) be a property provable about objects x of type T. Then ϕ(y) should be true for objects y of type S where S is a subtype of T.
This says "if hasattr(parent, 'pop') == True then hasattr(child, 'pop') must be True". This is not violated in this case, since hasattr(parent, 'pop') is False. If you want to extend the above definition so that negative proofs concerning the parent should also hold true for the child, then subtyping becomes impossible since all parent and child types must be identical, by definition.
The property in question is `hasattr(x, "pop") is False`.
> If you want to extend the above definition so that negative proofs concerning the parent should also hold true for the child, then subtyping becomes impossible since all parent and child types must be identical, by definition.
The distinction isn’t “negative proofs”, but yes, that’s their point. In Python, you have to draw a line as to which observable properties are eligible.
Very nice! One thing I've found useful about MathML is that, since it's XML, it's easy to generate (e.g. from scripts) and transform (e.g. with XSLT).
My preferred workflow at the moment is to programatically-generate "Content MathML", which lets me focus on the structure of things (akin to Lisp's prefix-form s-expressions), e.g. here's "applying plus to identifier x and identifier y":
Browsers can't display Content MathML, so I use XSLT (adapted from [1]) to convert it to "Presentation MathML". The "MathML Core" discussed in this article is a subset of Presentation MathML. Presentation MathML focuses on the layout of symbols, e.g. the above becomes "identifier x followed by operator + followed by identifier y":
<mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow>
This separation also lets me choose different notations, without having to alter the underlying data; e.g. on this page which compares two different notations http://www.chriswarbo.net/projects/units/negative_bar_notati... (if you click the "View Source" link at the bottom, you'll see the same data being piped into `math block` and `math block minus`, which just apply a different stylesheet).
In contrast, the only "realistic" SVGs I've seen are created using tools like potrace, and look terrible.
I also think the prompt itself, of a pelican on bicycle, is unrealistic and cartoonish; so making a cartoon is a good way to solve the task.
reply