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

The commenter says pre-rendered/server-side-rendered mathematics (via katex) is great - I’ve found the opposite. It’s probably great if you have an article with one or two equations. On the other hand, if you have an article which uses mathematics pervasively, like many pure mathematics articles, it quickly becomes far more space efficient to render the mathematics on the client side. You can quickly get 200kB+ pages by pre-rendering.


My experience with dynamically rendered math has been the opposite: if you have lots of equations to render, it inevitably takes some milliseconds to render, which makes the whole content move around and shake as rendering takes places.


Indeed. It was hell to navigate pages that rendered MathJax on demand. That also improved a lot though.


> it inevitably takes some milliseconds to render, which makes the whole content move around and shake as rendering takes places.

What a boldly incorrect comment! It's like you didn't even read the first point in TFA!


Did you read the article? That's what the KaTeX project specifically claims to address.


The previous comment was about using KaTeX for pre-rendered equations.


It's not too late to delete this comment.


KaTeX weighs about the same if you do care about those metrics, however.


In case anyone wants to look at actual numbers about how much KaTeX weighs for a simple mathematics page: https://news.ycombinator.com/item?id=44614133

Quoting the relevant part from that link:

  katex.min.css              23.6 kB
  katex.min.js              277.0 kB
  auto-render.min.js          3.7 kB
  KaTeX_Main-Regular.woff2   26.5 kB
  KaTeX_Main-Italic.woff2    16.7 kB
  ----------------------------------
  Total Additional          347.5 kB
Of course, if the page uses more symbols in various sizes, then a few more fonts files (.woff2) need to be pulled in which case the weight of KaTeX would increase a bit too. Each font file weighs between 4 kB and 28 kB.


But how is better space efficiency at this level better than worse rendering efficiency?


Could you please provide an example?


Is 200kB supposed to be a lot?


“Pixi instead of uv” would be a more fair comparison, as Pixi is a more modern tool which still uses the conda package format and ecosystem, much like uv is a modernised pip which still uses the PyPI package format.

One thing an conda package can do which an PyPI package cannot is have binary dependencies: a conda package is linked upon installation, and packages can declare dependencies on shared libraries. As common example is numeric libraries depending on a BLAS implementation: in a conda/pixi environment you will get exactly one BLAS shared library linked into your process, used by numpy, scipy, optimisers, etc. For some foundational libraries like BLAS which have multiple implementations, the user even has the power to consistently switch the implementation within the environment, eg from OpenBLAS to Intel’s MKL.

The PyPI package format does not allow binary dependencies: wheels must be self-contained when it comes to binary code (not when it comes to Python code - which hopefully makes it clear that something here is inconsistent). Take any numerical python environment and enumerate the copies of BLAS you have, it is probably 3-5. All running their own threadpools.

Another very simple example is with inbuilt modules depending on native code, like the sqlite3 module. In a conda/pixi installation you are guaranteed that the python binary links against the same sqlite3 code as the command-line sqlite3 cli tool in the same environment. Stuff like this removes many cross-language or cross-tool hassles.

I prefer uv or poetry if I’m doing anything simple or pure python (or perhaps with a small binary dependency like an event loop). But pixi is the way to go for large environments with lots of extra tools and numerical libraries.


Title: this is about the geometric Langlands, not Langlands. They are related but in separate fields.


Yep; "morally" related but not technically connected. Robert Langlands is... not a fan of the name "geometric Langlands", to say the least.


Squeezed in above. Thanks!


If a country has the capability to "lock down ports", they're probably shipping ports - do you think Australia is just suddenly going to (or has the capability to) block all IP traffic on certain ports? A notable exception is China.


They could do it if they tried. Part of being an island is there's only a few connections to the outside.


Satellite internet would like a word.


Perhaps < 1% traffic is routed by satellites, such congestion means it's almost blocked


They don't operate without licenses.


Thanks for making this! I’ve found that as a pedestrian in Sydney, up to half my walking time is spent waiting for traffic lights, and have always wondered what could be done about it.


"...up to half my walking time is spent waiting for traffic lights,"

Amen. ...And often when no traffic is coming.


Use pipx. It works well.


The compare-how-big-a-lookup-table-is argument is a bit of a red herring for comparing how complex things are. For example, a 3x3 matrix implements a map from 3 floats to another three floats, a huge space of possibilities (if we have 4-byte floats, this function space has (2^96)^(2^96) elements). From this perspective, representing that map as 9 numbers is an amazing compression ratio. But surely one cannot argue that matrices “have more going on” than arbitrary functions.


I would interpret this as showing that matrix multiplication code is carefully engineered to correctly implement... well, matrix multiplication. Stumbling on that specific mapping of 96 input bits to 96 output bits would be hard to pick out of a hat by chance, from the set of all possible mappings. Learning that precise mapping, starting from a uniform prior and only given a finite set of examples, could be seen as an impressive task, although less impressive than sorting. If a model learns the correct mapping -- and better yet, needs only 9 parameters to implement it -- then I think it's fairer to say the model does matrix multiplication, rather than that the model convincingly imitates the statistics of matrix multiplication.


This is kind of like saying a transistor can't make a decision, all it does is pass electrons or not based on inputs.

The decisions happen because of how they're wired.


The Mazda software works ok with the wheel, but using something like CarPlay with it is almost impossible without taking your eyes off the road for a long time. It’s worse than touch-screens in that respect: what will the spinning knob select next on a screen which has three separate panes?


Is CarPlay really that terrible? I don't have issues using Android Auto easily with my Mazda, it all takes a few very learnable clicks.


Yes, it's terrible, CarPlay was designed to with touch in mind. You spend more time looking at the screen to figure out where your "cursor" is. I found the Tesla touch screen to be much safer to use.


I have no issues with it in my Mazda3 on iOS, it’s all muscle memory, and Siri isn’t even that terrible once you learn the most effective commands.


I use carplay in my CX5 and have no issues (my cx5 does not have a touch screen at all, 2022)


SQLite is so modular that someone could write a replacement for the filesystem layer that ended up sending requests across HTTP to query a database on another server [1]. Without touching any other layer of the code. How much more modular do you want a database to be, without making other compromises?

[1]: https://phiresky.github.io/blog/2021/hosting-sqlite-database...


hmmm, running the dom demos causes a segfault in the browser. That probably shouldn't happen...


The IntelliJ git interface makes a lot of sense, and makes many helpful operations easy, like “compare what I have now to this particular commit”. The VSCode git interface, even with plugins like GitLens, seems to make these operations hard to get to, and how VSCode manages diffs with the staging area involved is totally bananas.

Aside from that, PyCharm has a slightly better debugging interface but otherwise it’s quite close to VSCode for Python development. Sane version control is a bit aside though.


Don't forget "compare selection to clipboard"


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

Search: