Hacker Newsnew | past | comments | ask | show | jobs | submit | more morshu9001's commentslogin

An SVG and JS, right? It's not interactive on its own.

The JS is embedded within the SVG file and not exposed outside it

The JS is exposed in the full page's context the same as if you included a <script> under a <div> instead of <svg>. In much the same way, whether the <script> is before or after the <svg> tag doesn't matter - it's just a script working on a single DOM (with different namespaces for certain elements) either way.

I guess the point is you can give a single .svg file with the js inside. But you can also give a single .html with svg and js inside.

Sort of... the SVG is referencing `svgscript.js` which is being fetched from the server (https://jon.recoil.org/blog/2025/12/svgscript.js)

Idk about open source tools, but internal corporate things have codenames for good reasons.

It's funny how they sold that into 2006, with a CRT still

They had to because the RDF was based on CRT technology, originally.

What is RDF in the context of eMacs? I searched but I just get "Resource Description Framework" or "Reality Distortion Field".

You can't really tell though. Maybe the dict is frozen but the values inside aren't. C++ tried to handle this with constness, but that has its own caveats that make some people argue against using it.

Indeed. So I don't really understand what this proposal tries to achieve. It even explicitly says that dict → frozendict will be O(n) shallow-copy, and the contention is only about O(n) part. So… yeah, I'm sure they are useful for some cases, but as Raymond has said — it doesn't seem to be especially useful, and I don't understand what people ITT are getting excited about.

Maybe treating Python like a systems language, so applying the same reasoning for const in C++ and Rust to it

Same. Recently I saw interview feedback where someone complained that the candidate used OrderedDict instead of the built-in dict that is now ordered, but they'll let it slide... As if writing code that will silently do different things depending on minor Python version is a good idea.

Well it's been guaranteed since 3.7 which came out in 2018, and 3.6 reached end-of-life in 2021, so it's been a while. I could see the advantage if you're writing code for the public (libraries, applications), but for example I know at my job my code is never going to be run with Python 3.6 or older.

Yeah, if you have that guarantee then I wouldn't fault anyone for using dict, but also wouldn't complain about OrderedDict.

Honestly, if I was writing some code that depended on dicts being ordered I think I'd still use OrderedDict in modern Python. I gives the reader more information that I'm doing something slightly unusual.

Same. Usually if a language has an ordered map, it's in the name.

I agree, same with frozenset. If you really want to use one of those as a key, convert to a tuple. There might be niche use cases for all this, but it's not something that the language or even the standard lib need to support.

Problem being that sets aren't consistently ordered and conversion to a tuple can result in an exponential (specifically, factorial) explosion in the number of possible keys associated with a single set. Nor can you sort all objects. Safe conversion of sets to tuples for use as keys is possible but the only technique I know requires an auxiliary store of objects (mapping objects to the order in which they were first observed), which doesn't parallelize well.

tuple(sorted(s)) and if you can't even sort the values, they're probably not hashable. I get that this involves a copy, but so does frozenset, and you can cross that bridge in various ways if it's ever a problem.

Here are some types that support hashing:

  str
  bytes
  int, float
  complex
  tuple
  frozenset
Aside from int and float, you cannot perform comparisons between objects of different types. Moreover, you cannot sort complex numbers at all.

I have crossed that bridge, and I'm telling you (again) that a sorted tuple is not a generic solution.


I'm not saying the problem with tuple doesn't exist, but that there doesn't need to be a built-in way to deal with it. If for some unfortunate reason you've got a mixed-type set that you also want to use as a dict key, you can write a helper.

It'd be funny if suddenly a lot of adult Asian women could no longer use social media

Yep, ADL and others publicly supported the US TikTok forced-sale specifically because of Israel, including the bill sponsors.

Legal language isn't very natural

Legal language is natural language with particular domain-specific technical jargon; like other uses of natural language, it targets humans who are quite capable of resolving ambiguity via context and not compilers and interpreters that are utterly incapable of doing so.

Not that official State Department communication is mostly “legal language” as distinct from more general formal use of natural language to start with.


The US Supreme Court uses Century or Century Schoolbook.

When there's an HN link to some philosophy website that intentionally only uses lower-case letters, an obscure font, and yellow on green color scheme, with a page explaining those choices

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: