dmsnell
Joined 10 years ago
Joined 10 years ago
In this link we can see the expectation that the HTML comment surrounds a call to document.write() which inserts a new SCRIPT element. The tags are balanced.
https://stackoverflow.com/questions/236073/why-split-the-scr...
In this HTML 4.01 spec, it’s noted to use HTML comments to hide the script contents from render, which is where we start to get the notion of using these to hide markup from display.
https://www.w3.org/TR/html401/interact/scripts.html
Some drafts of the HTML standard attempted to escape differently and didn’t have the double escape state.
https://www.w3.org/TR/2016/WD-html52-20161206/semantics-scri...
My guess is that at some point the parsers looked for balanced tags, as evidenced in the note in the last link above, but then practical issues with improperly-generated scripts led to the idea that a single SCRIPT closing tag ends the escaping. Maybe people were attempting to concatenate script contents wrong and getting stacks of opening tags that were never closed. I don’t know, but I suppose it’s recorded somewhere.
Many things in today’s HTML arose because of widespread issues with how people generated the content. The same is true of XML and XHTML by the way. Early XML mailing lists were full of people parsing XML with naive PERL regular expressions and suggesting that when someone wants to “fix” broken markup, that they do it with string-based find-and-replace.
The main difference is that the HTML spec went in the direction of saying, _if we can agree how to handle these errors then in the face of some errors we can display some content_ and we can all do it in the same way. XML is worse in some regards: certain kinds of errors are still ambiguous and up to the parser to determine how to handle, whether they are non-recoverable or recoverable. For those non-recoverable, the presence of a single error destroys the entire document, like being refused a withdrawal at the bank because you didn’t cross a 7.
At least with HTML5, it’s agreed upon what to do when errors are present and all parsers can produce the same output document; XML parsers routinely handle malformed content and do so in different ways (though most at least provide or default to a strict mode). It’s better than the early web, but not that much better.
But a supervisor also sets limits, like “10 restarts in a timespan of 1 second.” Once the limits are reached, the supervisor crashes. Supervisors have supervisors.
In this scenario the fault cascades upward through the system, triggering more broad restarts and state-reinitializations until the top-level supervisor crashes and takes the entire system down with it.
An example might bee losing a connection to the database. It’s not an expected fault to fail while querying it, so you let it crash. That kills the web request, but then the web server ends up crashing too because too many requests failed, then a task runner fails for similar reasons. The logger is still reporting all this because it’s a separate process tree, and the top-level app supervisor ends up restarting the entire thing. It shuts everything off, tries to restart the database connection, and if that works everything will continue, but if not, the system crashes completely.
Expected faults are not part of “let it crash.” E.g. if a user supplies a bad file path or network resource. The distinction is subjective and based around the expectations of the given app. Failure to read some asset included in the distribution is both unlikely and unrecoverable, so “let it crash” allows the code to be simpler in the happy path without giving up fault handling or burying errors deeper into the app or data.
It’s helpful to recognize that the inner script tags are not actual script tags. Yes, once entering a script element, the browser switches parsers and wants to skip everything until a closing script tag appears. The STYLE element, TITLE, TEXTAREA, and a few others do this. Once they chop up the HTML like this they send the contents to the separate inner parser (in this case, the JS engine). SCRIPT is unique due to the legacy behavior^1.
HTML5 specifies these “inner” tags as transitions into escape modes. The entire goal is to allow JavaScript to contain the string “</script>” without it leaking to the outer parser. The early pattern of hiding inside an HTML comment is what determined the escaping mechanism rather than making some special syntax (which today does exist as noted in the post).
The opening script tag inside the comment is actually what triggers the escaping mode, and so it’s less an HTML tag and more some kind of pseudo JS syntax. The inner closing tag is therefore the escaped string value and simultaneously closes the escaped mode.
Consider the use of double quotes inside a string. We have to close the outer quote, but if the inner quote is escaped like `\”` then we don’t have to close it — it’s merely data and not syntax.
There is only one level of nesting, and eight opening tags would still be “closed” by the single closing tag.
^1: (edit) This is one reason HTML and XML (XHTML) are incompatible. The content of SCRIPT and STYLE elements are essentially just bytes. In XML they must be well-formed markup. XML parsers cannot parse HTML.
I guess people just generally don’t add those?
Still, to help me out, could someone clarify why this was down-voted? I don’t want to mess up again if I did, but I don't understand what that was.
That’s where I made the comment about not actually running fixup. Instead of claiming to fix a SHA, I leave myself a note like “fix tests” so I can move it appropriately even if I get distracted for a few days
git rebase -i --rebase-merges --keep-base trunk
This lets me reorganize commits, edit commit messages, split work into new branches, etc… When I add --update-refs into the mix it lets me do what I read are the biggest workflow improvements from jj, except it’s just git.This article from Andrew Lock on stacked branches in git was a great inspiration for me, and where I learned about --update-refs:
https://andrewlock.net/working-with-stacked-branches-in-git-...
They can be designed to move a specific amount of heat or to cool at some delta-T below the hot side (and due to inefficiencies the hot side can climb above ambient temperatures too, raising the “cold side” above ambient!)
I ran through a design exercise with a high quality TEC and at 8°C delta-T for a wine cooler you could expect a COP of around 3.5–4 (theoretically). This is pretty good! But below the 2.5V max to do that you’re only able to exhaust up to around 40W. For a wine cooler this is not so bad. For a refrigerator it’s a harder challenge because the temperature drops when the door opens, and if someone sticks in a pot of hot soup, it’s important to eject that heat before it raises the temperature inside to levels where food safety becomes a problem. For a CPU it’s basically untenable under load because it’s too much heat entering the cold side thus temperatures will rise.
https://fluffyandflakey.blog/2019/08/29/cooling-a-cpu-with-t...
Things often overlooked:
- Most TECs are cheap and small and come without data sheets, so people tend to become disillusioned after running them too hot.
- You have to keep the hot side cool or else the delta-T doesn’t help you. For a wine cooler this is probably no big deal: you can add a sizable fan and heat sink. For CPU cooling it becomes a tighter problem. You basically can’t win by mounting on the CPU; they are best at mediating two independent water-cooling loops.
- Q ratings are useless without performance graphs. It’s meaningless to talk about a “100W” TEC other than to estimate that it has a higher capacity than a “20W” TEC.
- Ratings and data sheets are hypothetical best cases. Reality constrains the efficiency through a thousand cuts.
When I think about TECs I think more about heat transfer than temperature drops. If you open a well-insulated wine cooler once a week then once it cools it will only need to maintain its temperature, and that requires very little heat movement. Since nothing inside is generating heat you basically have zero watts as a first-order approximation. For the same device mentioned above, it stops working below 1V, and at 8° delta-T that’s a drop in COP to around zero but it’s also nearly zero waste. If you were to maintain a constant 2.5V, however, it would continue to try and pull 40W to the hot side. This would cause the internal temperature to drop and your COP would decrease even though the TEC is using constant power. The delta-T would in fact increase until the inefficiencies match the heat transfer and everything stabilizes. In this case that’s around a 20° drop from the hot side, assuming perfect insulation.
Unlike compressors, TECs have this convenient ability to scale up and down and maintain consistent temperatures; they just can’t respond quickly and dump a ton of heat in the same way.
edit: formatting of list
The results were impressive, and I think it’s a bit veiled how paste degradation over time impacts perceived laptop speeds. I’ve been tempted to replace the paste on new devices but haven’t taken that plunge.
https://fluffyandflakey.blog/2019/04/13/increasing-thermal-h...
Finding cryptographic-strength measures to identify LLM-generated content is a few orders of magnitude harder than optimistically marking them. Besides, it also relies on the content producer adding those indicators so that can’t be ignored as a major source of missing metadata.
But sometimes lossy mechanisms are still helpful because people who aren’t out with malicious purposes might copy and paste without being aware that the content is generated, while an auditor (be it anyone who inspects one level deeper) can discover in some (most?) cases the source of the content.
They are special because they are invisible and sequences of them behave as a single character for cursor movement.
They mirror ASCII so you can encode arbitrary JSON or other data inside them. Quite suitable for marking LLM-generated spans, as long as you don’t mind annoying people with hidden data or deprecated usage.
https://drmacros-xml-rants.blogspot.com/2010/08/worse-is-bet...
I’ll have to spend more time in the SGML Handbook. It’s available for borrowing at https://archive.org/details/sgmlhandbook0000gold. So far, I’ve been focused on the spec and trying to understand the intent behind the rules.
> a couple of auxiliary conventions introduced to make attribute capture and mapping in link rules more useful
Do you have any pointers on how to find these in the spec or in the handbook? Some keywords? What I’ve gathered is that notations point to some external non-SGML processor to handle the rendering and interpretation of content, such as images and image-viewing programs.
Cheers!
This is because the heat dumps into a liquid which is concentrated at the heat source, but as soon as it evaporates it fills the volume in which it’s contained. Also it’s because the evaporation process itself sucks out heat at a rate that’s orders of magnitude faster than via conduction, convection, or radiation alone.
They do not cool though. They rely on the fact that the heat source is relatively small and that something else can pull heat out of them fast enough to re-condense the liquid (and since they distribute the heat that cooling can attach anywhere or everywhere — this is like an embarrassingly parallel problem in software).
In a battery pack there is a lot of surface area that gets relatively and evenly hot, and little room to extract it between the cells. This would likely result in even heating around the heat pipe, which would tend to evaporate all of the liquid inside and do nothing but raise its overall temperature after an initial delay.
What it potentially could be used for is to draw heat out of the battery pack and up to some place where better airflow were possible, or for some active cooling system to extract the heat, but there are problems with scaling up like that (in typical heat pipes they manufacture wicking inner layers to draw the water back even against gravity).
At the points they could be used it’s likely significantly cheaper and easier to control some air or liquid cooling loop through the batteries.
Phones are ideal because a tiny little chip is producing almost all of the heat. It’s not even a lot, it’s just in a small area. Temperature goes up when heat can’t escape, so in this case, spreading the heat around even a few square inches can be a major factor in keeping down the temperature of the CPU/GPU.
Contrast this to EV batteries which are huge and produce evenly distributed heat already; there just isn’t the same value when things are big enough to add cooling systems, when cooling systems are necessary anyway, and when the heat pipe or vapor chamber just adds another piece too the system.