HackerTrans
TopNewTrendsCommentsPastAskShowJobs

fooofw

no profile record

comments

fooofw
·3 เดือนที่ผ่านมา·discuss
How is it even possible that we've reached a point where "yes, this is obvious and pretty unsurprising" is the default response to spying on an industrial scale.
fooofw
·6 เดือนที่ผ่านมา·discuss
I believe this might be slightly imprecise also.

The traceback is actually shown based on the last-thrown exception (that thrown from the finally in this example), but includes the previous "chained exceptions" and prints them first. From CPython docs [1]:

> When raising a new exception while another exception is already being handled, the new exception’s __context__ attribute is automatically set to the handled exception. An exception may be handled when an except or finally clause, or a with statement, is used. [...] The default traceback display code shows these chained exceptions in addition to the traceback for the exception itself. [...] In either case, the exception itself is always shown after any chained exceptions so that the final line of the traceback always shows the last exception that was raised.

So, in practice, you will see both tracebacks. However, if you, say, just catch the exception with a generic "except Exception" or whatever and log it without "__context__", you will miss the firstly thrown exception.

[1]: https://docs.python.org/3.14/library/exceptions.html#excepti...
fooofw
·7 เดือนที่ผ่านมา·discuss
My version of Firefox (146.0 on Debian) has exactly this. If I select a sentence and right-click, I get the menu item "Translate selection to <LANGUAGE>". In the resulting box, I can change the language pair - but the defaults that I have seen were also reasonable.

https://support.mozilla.org/en-US/kb/website-translation has the text: "A new Translate selection feature has been added starting in Firefox version 128, that enables you to highlight and translate selected text."

Edit: Sorry, I misread the comment to say that there was no such menu item. Edited to reflect this.
fooofw
·7 เดือนที่ผ่านมา·discuss
I think this project is based on LaTeXML (https://math.nist.gov/~BMiller/LaTeXML/) which is exactly that (except for the SVG part)
fooofw
·7 เดือนที่ผ่านมา·discuss
The tokenization can represent uncommon words with multiple tokens. Inputting your example on https://platform.openai.com/tokenizer (GPT-4o) gives me (tokens separated by "|"):

    lower|case|un|se|parated|name
fooofw
·7 เดือนที่ผ่านมา·discuss
It's kind of fun to compare this formulation with the seemingly contradictory official arXiv argument for submitting the TeX source [1]:

> 1. TeX has many advantages that make it ideal as a format for the archives: It is plain text, it is compact, it is freely available for all platforms, it produces extremely high-quality output, and it retains contextual information.

> 2. It is thus more likely to be a good source from which to generate newer formats, e.g., HTML, MathML, various ePub formats, etc. [...]

Not that I disagree with the effort and it surely is a unique challenge to, at scale, convert the Turing complete macro language TeX to something other than PDF. And, at the same time, the task would be monumentally more difficult if only the generated PDFs were available. So both are right at the same time.

[1] https://info.arxiv.org/help/faq/whytex.html#contextual
fooofw
·7 เดือนที่ผ่านมา·discuss
That would (mostly if not always) work in the sense of reproducing the layout of the pages, but would defeat the purpose of preserving the semantic information present in the TeX file (what is a heading, a reference and to what, a specific math environment, etc.) which is AFAIK already mostly dropped on conversion to PDF by the latex compiler.
fooofw
·8 เดือนที่ผ่านมา·discuss
Why have you failed though? Is the point to try to deceive people to think that XKCD actually published something else? Why not modify the xkcd one without hinding the fact that you modified it?
fooofw
·9 เดือนที่ผ่านมา·discuss
What defines private sites, I wonder – beyond "such as local IP addresses like 192.168.0.1, single-label hostnames, and shortlinks like intranet/"?
fooofw
·9 เดือนที่ผ่านมา·discuss
This made me think of Microsoft's MarkItDown tool/library [1] which seems to have quite the overlap in supported file formats [2,3] and conversion options [4]. I couldn't find any reference to the library on the website, so it may be useful to know about.

[1] https://github.com/microsoft/markitdown

[2] https://tomd.io/#supported-extensions

[3] https://github.com/microsoft/markitdown/tree/main/packages/m...

[4] https://github.com/microsoft/markitdown/blob/8a9d8f15936b206...
fooofw
·11 เดือนที่ผ่านมา·discuss
Then you've just traded that for lock-in to Cursor, no?