Better HN
topnewbestaskshowjobs
Log inSign up

joppy

1,327 karma · joined Dec 13, 2017 (8y ago) · 439 submissions

Submissions

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

“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.

comment 2y ago · link · parent

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

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

Use pipx. It works well.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

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?

comment 3y ago · link · parent

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...

comment 3y ago · link · parent

There a lots of tiny issues: some UI settings like rulers (or whatever PyCharm calls them, vertical guides that tell you when you’re at 100 chars or something) just don’t work, and don’t show up in the main editor (but they show up in the diffs!). Some editor settings, like the main Python settings pane, just doesn’t load its settings page, and requires restarting the editor. Scrolling diffs with the scroll wheel is so janky and laggy to be unusable, but the main editor scrolls fine. Reconnecting after a short disconnect (open and close laptop lid) takes too long. The git client gets itself into a weird state sometimes where it will create the same 5 files no matter which branch I switch to, and the only way I’ve found to reset that is to delete every trace of IntelliJ off the remote and reconnect.

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

I hope they also worked on removing the many UI bugs from PyCharm remote: laggy scrolling while in the diff view, some editor settings like rulers at 100/120 chars not working properly, some settings panes lagging out until the editor is restarted, etc etc. I need to develop on a remote VM and I’m using VSCode at the moment because it’s remote story is less buggy, but would much rather be using PyCharm.

comment 3y ago · link · parent

At LAN parties we used to share our SteamApps folders so that others could copy games across. Interestingly (perhaps due to Windows networking handling copy-many-small-files poorly?) it was often faster to make an uncompressed ZIP of the files, copy that over the network, and unzip it on the other side.

Great to see that the steam client now does all this transparently.

comment 3y ago · link · parent

Unfortunately it doesn’t work so well with some larger games. I tried backing up a 120GB up-to-date game, uninstalling and reinstalling steam (to a newly purchased drive), and reloading the game from backup. It still wanted to download 90GB.

comment 3y ago · link · parent

That’s a preprint - check the published version https://dl.acm.org/doi/10.1145/176584.176586 which has a date on the front page of the article.

comment 4y ago · link · parent

Single-variable letters and suggestive notation make it easier to recognise patterns, and give a good level of abstraction at which thinking about the problem rather than muddling through notation can happen. For example one can rather easily check

a(b + c) + (b - d - a)(b + c) = (b - d)(b + c)

But it will be hard to simplify

add(mul(amins, add(boo, cold)), mul(…

You are not expected to understand what the notation means without further context, in the same way a programmer is not meant to see a function call to main(foo) and understand what will happen.

comment 4y ago · link · parent

Here in sunny Sydney, US$260k would cover the salary of three good developers, or two exceptional developers.

comment 4y ago · link · parent

My point is not that it’s impossible to write fast JavaScript, it is that creating performant abstractions is very hard in JavaScript. So performant code ends up not using many abstractions, and becomes difficult to write and maintain. Or well-abstracted code which is easy to write and maintain is slow.

comment 4y ago · link · parent

The 4x4 represents both a 3x3 matrix A and a translation t, so that the “affine transformation” applied to a vector is v -> Av + t. One could pass around pairs (A, t) instead, and figure out how to compose those pairs, but it turns out there’s a nice way of embedding them in a 4x4 matrix such that composition is just 4x4 matrix multiplication.

You may opt into some other mathematical niceties too, which are handy for applying perspective transformations, but the main takeaway is that you get efficient compositions of affine transformations.

comment 4y ago · link · parent

Mathematicians index the ith row and jth column of their n x m matrix as (i, j), which is nothing to do with row-major or column-major order. Those orderings are how a two-dimensional index is flattened to a one-dimensional index. Row-major makes it so that each row is stored one after the other: (i, j) goes to mi + j. Column-major uses i + nj instead.

comment 4y ago · link · parent

On the flip side, it’s very hard (sometimes impossible) to make highly performant abstractions in JavaScript, which makes it difficult to make fast tools which do complex work. Most JS-based programs choose to either be fast and difficult to program, or easy to program but slow.

The advantage of having an incredibly fast build tool can already be seen with Vite and esbuild, which hot-reload modules at speed. Fast tools can change the way work is done.

22.

New Zealand Uber drivers win landmark case declaring them employees(theguardian.com ↗)

47 points · by joppy · 4y ago · 10 comments

comment 4y ago · link · parent

As I commented elsewhere, the headjoint of a flute significantly affects the sound quality and timbre, and spending $2800 on a headjoint (even a standard one) is expensive, but still well within the reasonable price range of a more standard-shaped good quality headjoint.

comment 4y ago · link · parent

The headjoint of a flute is a key part which significantly affects the sound quality and timbre of the instrument - it is by no means an “adapter” to the rest of the instrument. It is common in fact to buy flutes in separate pieces, with the body by one manufacturer and the headjoint by another. And $2000 for the headjoint and $4000 for the body (Australian dollars) would be a pretty standard price for a good-quality student flute which would see someone through a performance diploma.

comment 4y ago · link · parent

Doesn’t memory layout still matter? Assumedly matrix-vector products like Av are fastest if the rows of A are contiguous in memory, and vector-matrix products vA are fastest when the columns are contiguous in memory. So sometimes one would really want to actually transpose the matrix, rather than reinterpreting the indexing scheme.

comment 4y ago · link · parent

When working over a finite field there are no stability issues though, since arithmetic is exact.

comment 4y ago · link · parent

It's the minimum needed to get something going, and any really sane use of it would be evalling something like

    import worker
    worker.run()
The PEP explicitly mentions this, and that something like subinterpreter.run(func, ...) could be considered in the future: https://peps.python.org/pep-0554/#interpreter-call

comment 4y ago · link · parent

The slow banking system? Don't crypto transactions (on bitcoin or ethereum) take 5-10 minutes to complete, whereas I can tap my credit card to make a transaction more or less instantly?

comment 4y ago · link · parent

WAL works for different processes accessing the same SQLite database. It's meant to improve concurrency, in fact.
12345
15