HNHacker News
TopNewBestAskShowJobs

refactor_master

1,176 karma · joined August 16, 2020

submissionscomments
refactor_master··on iPhone 18 Pro and iPhone 18 Pro Max
If you think a cryptographically signed image can’t be JPEGed 5 times and shared on Facebook for misinformation then here’s a relevant XKCD for you:

https://imgs.xkcd.com/comics/security.png

refactor_master··on Growing proof that autonomous cars save lives
No no the invisible hand of the market will fix it, you see. Car manufactures will become so big and pay so many taxes that we could pave every road with rail.
refactor_master··on Pre-Release of Polars 2.0
It’s just the lazy/expression part of the API, which is really the bread and butter of polars, rather than just being “replacement syntax” for pandas. This allows you to tap into abstraction that SQL can’t keep up with:

  import polars as pl

  # 1. Base Dataset
  lazy_df = pl.LazyFrame(
    {
      "store_id": ["S01", "S02", "S03", "S04", "S05"],
      "revenue": [5000.0, 2400.0, 15000.0, 900.0, 3200.0],
      "margin": [0.45, 0.30, 0.60, 0.15, 0.50],
      "tx_count": [120, 45, 300, 20, 85],
      "returns": [5, 12, 45, 2, 8],
    }
  )

  # 2. Define Layer Abstractions
  def get_kpi_layer() -> list[pl.Expr]:
    return [
      (pl.col("returns") / pl.col("tx_count")).alias("return_rate"),
      (pl.col("revenue") / pl.col("tx_count")).alias("avg_order_value"),
    ]

  def get_threshold_layer(thresholds: dict[str, list[float]]) -> list[pl.Expr]:
    return [
      (pl.col(col) > limit).alias(f"is_{col}above{int(limit)}")
      for col, limits in thresholds.items()
      for limit in limits
    ]

  def get_interaction_layer(numeric_cols: list[str]) -> list[pl.Expr]:
    return [
      (pl.col(a) / (pl.col(b) + 1e-5)).alias(f"ratio_{a}per{b}")
      for i, a in enumerate(numeric_cols)
      for b in numeric_cols[i + 1 :]
    ]

  def get_segmentation_layer() -> list[pl.Expr]:
    return [
      pl.when(pl.col("margin") > 0.4)
      .then(pl.literal("High"))
      .otherwise(pl.literal("Low"))
      .alias("margin_profile")
    ]

  # 3. Consolidate and Execute Single Graph Pass
  thresholds = {"revenue": [1000.0, 5000.0, 10000.0], "tx_count": [50, 100, 200]}
  numeric_cols = ["revenue", "margin", "tx_count", "returns"]

  expr_pool = [
    *get_kpi_layer(),
    *get_threshold_layer(thresholds),
    *get_interaction_layer(numeric_cols),
    *get_segmentation_layer(),
  ]

  final_df = lazy_df.with_columns(expr_pool).collect()
refactor_master··on Pre-Release of Polars 2.0
The cool thing about polars is that you can conditionally collect expressions over many layers of business logic, and then compute the result at the end. Doing this in SQL ends up in a hodgepodge of strings and trimmed ends to please the syntax. You can also pretty effortlessly write quite complex conditionals directly in polars, and bridge it easily to the surrounding python.

I find that SQL is only easier to read with minimal abstraction, but as soon as the project gets bigger SQL becomes an unwieldy island of different that has served its purpose after we’re done with reading/writing the data.

refactor_master··on Gemini 3.8 Flash and 3.8 Flash Cyber
I don't know if my code is just "complex", but I find that Luna on max ignores the surrounding style and completely ignores logical consequences of a change, like just writing `del arg1, del arg2, ...` instead of dropping it from the surrounding code. All LLMs make questionable decisions at times, but Luna requires so much guidance that it's faster to just type it out yourself. What kind of routine tasks can one accomplish with such a model?
refactor_master··on Reflections on Americans' Net Worth
The US does not lead in broad markers of "social good" like life expectancy, happiness index or social mobility, so what exactly is this KPI useful for?
refactor_master··on Fastpotify
I've discovered so many great artists through Spotify, and been to many of their shows (which Spotify also helps surface with their "Live Events" feature). I regularly get artists with less than 100k listeners in my Discover Weekly, which I then look up, and find that they did a concert on KEXP, and the comments all proclaiming "I knew good music wasn't dead!".

So I can say for sure that I don't share the slop sentiment. Sure, there's some generic filler every now and then, but any non-cohesive mix, as opposed to a carefully curated album is going to have songs that naturally become "fillers".

Just now, I discovered that Spotify snuck in "The Juan Maclean - Running Back To You (2014)", which is a cover of "Brian Bennet - Solstice (1978)". Neither songs are completely unknown, but they're also not exactly Bruno Mars.

I don't know if this is pure luck or algorithmic rhythm analysis, but for me it's working.

refactor_master··on The EU has begun enforcing the AI Act: first RFIs to model providers
If my manager's manager's manager decides, for any number of reasons, to buy a product which is using US-based technology, then I don't reasonably have the option to "vote with my feet", but I do have a fallback called Regulation, which works its way all the way up the chain automatically.
refactor_master··on [dead]
It’s their whole business:

“Stop studying Japanese. Start speaking it.”

> click here to buy our pro AI prompts

Ah, a tale almost as old as the one of the lake itself.

refactor_master··on A curmudgeon tries a language server
Off topic but the way the four “program…” words line up on an iPhone is truly mesmerizing.
refactor_master··on A curmudgeon tries a language server
Sounds genuinely horrible to program this way.

> A Lisp programmer does not need to …

Have you even seen R? Jupyter notebooks? The above sounds like a level of insanity beyond that.

The problem with checking things at runtime is that it’s an ever-moving target. Changed this? Now that other thing is out of sync. Changed that? Now the first thing is gone, and it came from far away so you can’t get it back in this session.

refactor_master··on RAG Is Simpler Than You Think
Humans usually have ways around that in longer documents eg page numbers, paragraphs, links.

If someone gave me a report, in my hands, that said “see ‘it’” I’d also be confused.

refactor_master··on RAG Is Simpler Than You Think
Here’s an even simpler take: just embed everything the first time, then track what was changed. Use a cheap model to summarize and clean up the documents/chats with summary and keywords. Unless you have entire libraries of books to embed it’s going to be a few hundred dollars of API calls.

Then, throw it all in BigQuery. Handles all the vector stuff natively.

Sprinkle an agentic bot UI thing on top to make it appear all-knowing and magical.

I assume other vendors than Google have a similar batteries-included approach you can just plug in.

refactor_master··on Ox Alpha – A mysterious new AI model
Bootstrap HTML?
refactor_master··on Was modern art a CIA psy-op? (2020)
1850? I wager we could go all the way back if we tried.

> (…) the Italian artist and writer Giorgio Vasari,who used it as early as 1530, calling Gothic art a "monstrous and barbarous" "disorder".

https://en.wikipedia.org/wiki/Gothic_art

refactor_master··on One corner of China’s internet is insisting that the Tang Dynasty never existed
Historical revisionism, CCP :sakura: :starry_eyed:

Historical revisionism, random people :angry: :barf:

refactor_master··on Qwen 3.8 27B is excellent, but it defaults to overthinking things
Unlike cloud infra in general which offers things like automatic backups, regional redundancy, and effectively unlimited scalability, it seems like the value proposition of cloud LLM gets ever shakier.

* Many businesses don't need frontier level intelligence anyway.

* It's completely stateless. If your local LLM machine catches fire? Nothing was lost. Buy another.

refactor_master··on Mojo 1.0
Wouldn't that cause an awful lot of confusion in practice? Instead of having one being a superset of the other, you now have two almost identical syntaxes, but probably not quite.

LLMs have enough problems distinguishing between major versions between packages, e.g. where all the imports were moved around and renamed.

refactor_master··on How I use LLMs to learn complex topics
AIME and HMMT are high school math olympiad competitions now used to benchmark AI. Frontier models score 95-99%

https://benchlm.ai/blog/posts/aime-hmmt-competition-math

refactor_master··on Should you stop cracking your knuckles?
I get wrist pain as soon as I use anything taller than Apple’s flat Magic Keyboard and touchpad. I’ve used this combo for like a decade now and never experience fatigue. Once, I bought a fancy mechanical keyboard and I returned it within a few weeks as it immediately caused me wrist pain.

You can scoff at low travel and membranes all you want, but less movement = less fatigue, so I think they’re amazing.

Never thought about the climbing angle, but I’ll chime in and say that after I started climbing I’ve definitely not experienced more fatigue.

refactor_master··on When transit passes were designed by hand (2022)
This reads like a nervous breakdown at the thought of having to buy a ticket from A to B. It’s really not that complicated in most countries with functional public transport.
refactor_master··on How the words we teach English language learners changed
No, memorize many noun most important. Grammar less Important. Can do food, can do travel, can do tax. Because, noun most important.
refactor_master··on Flint: A Visualization Language for the AI Era
When does it get too abstract? What’s wrong with plotly? Or plotly express? How is yet another JSON spec era-anything?
refactor_master··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
But your choice of funny variable names is not a craft, and you’re not a craftsman if you think it matters. What matters is extensibility, maintainability and value delivered.

I care how the food tastes, not that the chef has a really cool Japanese knife and is really fast at cutting onions.

refactor_master··on Human mathematicians are being outcounterexampled
This reminds me of the Go Grandmaster speaking out after losing to AlphaGo, that the model has no sense of "aesthetic play", as long as it would lead to a win within the rules.
refactor_master··on MarketFish – Simulate a market with 128 AI consumers before you launch
What properties does this have that somehow allows one to essentially predict the market or a proxy thereof, when seemingly nothing else can? Or did I get that part wrong?

It might take you from nothing to technically—a-market-fit, but from there to actually-a-market-fit?

My point is, there’s probably 1000s of companies doing the same things, following every playbook for success (do this, measure that, brand this, …), only for a single one of them to become a viral market hit, and the rest fade into obscurity.

refactor_master··on Free the Icons
Is that why their laptops routinely beat the competition year after year in reviews and reliability surveys? Because they “look cool”? I’m going to need some more numbers on that one.
refactor_master··on AI has already killed academia as we know it?
I still remember one course where the lectures were basically just 1:1 summaries of the textbook, so I said "This is a waste of time. See you at the exam", and many of the more traditional showing-up-is-half-the-battle crowd were like "GASP, you can't do that!" because from very little we're taught that attendance is more important than outcome.
refactor_master··on Wolves are reconquering Europe. Can people learn to live with them?
Some years ago people also said “Japanese bears are harmless, shy and fear humans” and now the country is experiencing a slowly approaching bear-pocalypse, with bear attacks occurring in densely populated suburbs. I don’t see how wolves in Europe would be uniquely different if it follows the same trajectory.

https://www.bbc.com/news/articles/cj41vn9q81ko

refactor_master··on Japanese verb conjugation the simple hard way
> why romaji is actually good

It isn't. It falls slightly apart in the `s` column, and completely in the `t` column which contains both "chi" and "tsu". It also breaks for godan words that end in "u" which become "wa" in the negative form.

Mu, bu and nu also all obey the -nda transformation due to phonetics, and not due to how "if we just shuffle the letters around and presto! Nomu becomes nonda".

Japanese already has plenty of its own reading inconsistencies, so adding another layer on top isn't going to help you.

Finally, there's going to be so much kana in your every day life that learning conjugation in romaji is guaranteed to cripple your reading, because instead of recognizing kana (e.g. you see a billboard that says お茶を飲んだ方がいい! as you frantically try to back-translate everything into romaji, but also removing excess w's and converting nda's as you go) you've spent the first n hours on trying to "hack" the language instead of just learning it.

← PreviousPage 2 of 14Next →