MurphyA/hacker-news huggingface dataset:
by tialaramex | 2025-07-10 11:25:30+00:00
We're doing a pattern match, so, this variable n has to be something that matches the entire value matched, its type will be identical to the type of the value matched, s a few lines earlier.

That value is an item from the iterator we got from calling split_whitespace() and split_whitespace() returns a SplitWhiteSpace, a custom iterator whose items are themselves sub-strings of the input string with (no surprise) no white space in them. In Rust's terminology these are &str, references to a string slice.

So, the type is &str
by benreesman | 2025-07-10 11:25:31+00:00
I don't have anything terribly insightful to say other than that I really like this project. I loved using Clojure back during it's brief time in the sun, it was a great time, and jank has all the same awesome vibes. I haven't used it on anything serious yet, it seems like it would be great for like a `zig`-flavored approach to C++ builds for example. I'm doing a big C++ project ground up at the moment, I think I'm going to get jank into it and see if I can automate some stuff.

The compilation strategy is very much what Carmack did in Trinity and whether you got your inspiration there or independently had a great idea, that's good company to be keeping.

Keep it up!
by 123yawaworht456 | 2025-07-10 11:26:19+00:00
lease an apartment

spend a lot of time and money moving your things there

live there for a decade

the landlord shows up and informs you that you are forbidden from using the toilet between 6 PM and 8 PM, effective immediately, punishable by a fine equal to your monthly income. why? fuck you, that's why. if you don't like the legal environment you can just pack up and leave
by kzrdude | 2025-07-10 11:27:03+00:00
Python has a longtime connection to C and somehow I think Python is a dynamic language in the C tradition, not of any other community, maybe the same thing your are hinting.

Hard to put a finger on what exactly, but Python has never been so interested in purity, rather in pragmatic functionality and it ends up in a place where it gives access to C style idioms and API, see for example the os module.

Maybe it is that Python doesn't have it's own model of the world, but it provides a dynamic language facade to the C model of the world.
by ulf-77723 | 2025-07-10 11:27:41+00:00
Great article! I think it always depends which kind of code is being used in different industries. Anything related to your life will need to be guarded by humans. Critical infrastructure, medical devices.

If I think about anything which might not directly impact human life, AI Code is ok for me.

The point where the majority will start to trust the generated code like we trust our E-Mail Spam Filter it may be difficult. „The machine will probably do the right thing, no need to interact.“
Show HN: Pit – View PNG/JPG images directly in the terminal (no ASCII art)
by FerkiHN | 2025-07-10 11:28:29+00:00
I often work in the terminal (both Linux and Termux on Android), and I’ve always missed a simple way to view images without launching any GUI. Most tools rely on ASCII-art renderers or require large dependencies.

So I built PIT — a minimal C-based utility that displays real images (PNG/JPG) inside the terminal, using ANSI colors. No ASCII tricks — you actually see the image.

Highlights:

No GUI needed

No dependencies (just raw C + ANSI output)

Works on Linux, Termux (Android), and even Windows

Renders up to 600×600 images, even on older terminals

Demo screenshots: https://github.com/Ferki-git-creator/phono-in-terminal-image...

GitHub: https://github.com/Ferki-git-creator/phono-in-terminal-image...

I’d love to hear your thoughts, ideas for improvements, or feature requests. Thanks!
by Jlagreen | 2025-07-10 11:28:34+00:00
Nvidia would probably not fail because they work already very closely with TSMC and have teams sitting there directly.

Also Nvidia could even afford to burn 100s of billions of dollars since they are becoming the most profitable company in the world with probably passing Apple this year.

BUT then Nvidia would compete with TSMC and that is a problem because Nvidia is building up a cash and supply moat. Why should Nvidia build TSMC competition if they can simply buy 95% of the packaging supply at TSMC so competitors like AMD and others struggle to get supply? By booking everything at TSMC, Nvidia can easily keep their market share even if competitors improve their products.

This is a huge differences to many industries where most companies have their own production. Imagine there would be only 1 car manufacturer and all other car companies would only design. And now 1 car company would book 100% of supply from the manufacturer. What would the other car design companies do? They would get out of business even if they design better cars.

Nvidia has done this before and that was in the 90s. By speeding up design and releasing new products and more products 2-3x faster than any competitor. The result was that from 90 competitors in 1993, there was only 1 left in 2003 for Nvidia in gaming GPUs.

And Nvidia is doing that again by speeding up their roadmap cadence and as well as booking all supply. Nvidia is crashing competition not only with a great product but by removing their competitors' option to place their product in the market.
by pydry | 2025-07-10 11:28:48+00:00
Power2gas+solar/wind produced energy is a lot more expensive than natural gas and requires solar/wind to routinely overproduce.

...hence why there isnt much of it. It either requires subsidies or for natural gas to be taxed more.

Windless night produced electricity from stored solar energy via windgas is still cheaper than nuclear power produced on sunny, windy days though: https://theecologist.org/2016/feb/17/wind-power-windgas-chea...
by hypfer | 2025-07-10 11:29:06+00:00
> I think at least 70% of the Hacker News crowd would hate this world because they would have no idea what to do with their life under these circumstances.

> What is life about except turning a profit? How can you have power over other people? Feel important with all your money?

Man, I feel you. HN as this small window into the soul of the silicon valley is best consumed only in very small doses.

Thank you for your work and stay how and who you are.
by pprotas | 2025-07-10 11:29:30+00:00
This is going to sound mental, but here you go. First enable the path bar in Finder by executing code provided to me by anonymous users on the internet: defaults write com.apple.finder ShowPathbar -bool true (EDIT: Apparently you can do CMD + OPT + P shortcut in Finder to accomplish the same)

Then in the path bar you can right click your current folder and open in Terminal (or use Services menu to open in 3rd-party terminals)
by berkes | 2025-07-10 11:29:32+00:00
> maintain full local backup power capacity.

Not necessarily. If connectivity is broad and the network graph is decentralized, rerouting should cover some of the backup.

For example, if Luxembourg goes to war with Belgium, and Belgium shuts down the lines to Luxembourg, then they can reroute via Germany or France (provided they have lines there, obv). But if Spain gets beef with France, and France cuts the lines, they cannot easily reroute. So Spain would need more backup and more independence (and prolly cables to Italy and Africa?). Point being:
by VGHN7XDuOXPAzol | 2025-07-10 11:30:26+00:00
maybe this isn't the question you meant to ask, but:

`n` has the same type as the input of the `match` block. In other words, it's a fallback case. (In this case, it's `&str`; the same as `"+"`, `"-"`, etc)

If you're wondering how `n.parse().unwrap()` has its type computed, well that part is because type inference is able to look at the definition of `Token::Operand(u32)` and discover that it's `u32`.

From my experience: The compiler can do this, as long as the first usage of the unknown-typed-thing gives it a type. If the first usage of it doesn't, then it won't try any harder to infer the type and it won't compile unless you add your own annotations on.
by mykowebhn | 2025-07-10 11:30:42+00:00
I initially worked in Canada where it wouldn't be uncommon to go out for a work lunch and order a beer.

When I got a new job in the US, my boss took me and several coworkers to a restaurant for lunch as a way to welcome me. When the waitress asked what I wanted to drink I asked for a beer. I then heard one of my coworkers who was sitting next to me ask me incredulously, "What are you doing?" I responded that I was ordering a beer. He said that I could get fired for that. That's when I realized that for a country that seemed so similar to Canada on the surface it was quite different below that surface.
by VGHN7XDuOXPAzol | 2025-07-10 11:31:49+00:00
Might also be useful for me to link to the docs for `parse` [1] and to the trait `FromStr` [2] that it relies on:

[1]: https://doc.rust-lang.org/std/primitive.str.html#method.pars... [2]: https://doc.rust-lang.org/std/str/trait.FromStr.html
by praptak | 2025-07-10 11:31:52+00:00
Yes. My point is that: 1. "No cycles in call graph" is not about memory usage but about having an easily provable limit on call stack and 2. "No cycles in call graph" is not about banning recursion.

I agree that the call stack limit is much more important in environments with tight memory but the rule is about the stack limit, not memory in general.

Edit: for 2. I obviously mean recursion as the class of algorithms, not as the property of the functions used to implement it.
by coldtea | 2025-07-10 11:31:57+00:00
>I bought a thrown out M1 Macbook Air recently and I still haven’t figured out how to do a simple “right click in Finder > open Terminal here”

Right click -> Services -> New Terminal Tab at Folder

(or if you have Iterm: Right click -> Services -> New iTerm Tab/Window here)

Or if you have enabled Finder to show the path bar, right click on a folder in Path Bar (last one is the current open one) -> Open in Terminal

Then again, if you do work in the terminal, why do you navigate to the working directory via the UI Finder?
by myrmidon | 2025-07-10 11:32:48+00:00
> that when we do develop the tech sufficiently to be useful, if it's cheap enough to be profitable, nothing would seem to stop extraction. So CO2 goes down to, what, 300ppm?

This is an extremely improbable scenario, for several reasons:

1) If you actually use the extracted CO2, then it gets re-emitted on use, and the atmospheric concentration is virtually unaffected.

2) Concentration difference alone makes it very unlikely that we'll ever extract CO2 as cheaply as O2 from ambient air (or carbon from a mine), and CO2 is not really an appealing ressource compared to its components, either (so demand would presumable be pretty low for centuries, even if the price comes down a lot).
by coldtea | 2025-07-10 11:33:32+00:00
> First enable the path bar in Finder by executing code provided to me by anonymous users on the internet: defaults write com.apple.finder ShowPathbar -bool true (EDIT: Apparently you can do CMD + OPT + P shortcut in Finder to accomplish the same)

Or you can just enable it in Finder menu View -> Show Path Bar.
by sirwhinesalot | 2025-07-10 11:33:56+00:00
> Not necessarily. That's a result of first past the post, not of voting in general. ranked choice voting solves a lot of this extremism 2 party system. The dominant parties need to at least pretend to appel enough to moderatism that a 3rd party isn't outvoting both of them.

Yup, we really need to fix this problem in many countries. Ranked choice is a great idea that should be pushed for.

> So the right wingers never really cared about inflation, egg prices, and the job market. I wish I could pretend to be shocked at this point.

That was my perception of it at least. I'm not a US citizen. Job market might have been a big one but even that is partially social as a rejection of globalism.
by Juliate | 2025-07-10 11:33:57+00:00
Depends.

Do you _know_ you're wrong in the first place? Does anyone else _know_ you are?

What's the scope/impact of the issue?

Independent from these, staying silent means you resolve to manage on your own your guilt. And this can, no, it will be its own burden. Admitting somehow resets the relation on a shared understanding, and a shared burden: the problem is not so much the wrong done/thought anymore (what is done is done), but how you are going to fix/build back from there (which will involve an effort on everyone).

Not admitting mostly delays admission to happen, or increases the burden of keeping it concealed.
by frenkoes | 2025-07-10 11:34:47+00:00
Well, the company has a bug bounty program and you must abide by their rules. Or they do not have a program (and did not give you permission) and your action could fall under the Computer Misuse Act (CMA) in the UK (criminal offense). Also I am not a lawyer, so if you want to public disclose, make sure to talk to some UK lawyers.
by cycomanic | 2025-07-10 11:34:48+00:00
> It is, unfortunately, also an apples to oranges comparison. A coal plant actually generates 1GW, 24/7, while "a gigawatt's worth" of solar panels is theoretical peak capacity at noon on a cloudless day.

That's incorrect. The capacity factor of a coal plant is between 50% and 60%. That's far away from 100% although better than solar (but not that much better) with capacity factors ranging from 15%-30% [https://en.wikipedia.org/wiki/Capacity_factor].
Show HN: I Built Fluent – macOS AI Writing Assistant
by importnil | 2025-07-10 11:35:04+00:00
Hey HN,

I've poured months of daily effort into something that, in my opinion, works better than native Apple Intelligence. My life & work include two foreign languages besides my native one. I wanted a handy tool that instantly translates or improves text I select, in any app. That's how the idea to build a fluid, fast "smart panel" was born.

What does Fluent offer?

- Most Wanted: Fluent can enable you to instantly fix, improve, and replace formatted content in Chrome-based apps (Chrome itself, Slack, Notion, etc.) with a single shortcut.

- In general, a Spotlight-like Smart Panel that is fast & fluid, as it's a native Swift app.

- Allows you to create actions with customizable shortcuts.

- Supports any OpenAI-compatible provider. Allows you to add custom providers easily.

- Local models: MLX, Ollama, LM Studio.

- BYOK (Bring Your Own Key). No subscriptions. No "1-year updates," etc. Just a lifetime license.

- A freemium version is available to test out the features.

I presented Fluent on Reddit a few weeks ago and used the incredible feedback to improve my tool at least twice from what it was at that time. Now I'm happy to introduce it to you as well. Hope to get some constructive feedback!

Regards, Vadim
by vladms | 2025-07-10 11:35:40+00:00
There are so many actors out there that collect data (ex: GSM companies, utility companies, CCTV, states, etc.) but nowhere near as much discussions as mobile phones.

Regarding Google, I’m consistently disappointed by the ads they suggests to me. I’d prefer relevant recommendations, but what I get is irrelevant. My favorite example: couple of years ago they kept showing me ads for a household appliance like 6-10 months after I already bought one, even if I had lots of emails regarding the buying process in gmail. I can't think "oh, they are evil masterminds" if they fail at their most basic stuff.

So they can record how many times per day I unlock the phone or open an app or the location if the GPS is on, good luck using that for something useful.

I do have limits to what I think they should collect in bulk (ex: video or audio), but I did not see allegations that they do that so far, and I think sometimes it's healthy anyhow to behave "as if they do it", just in case.
by bombcar | 2025-07-10 11:35:58+00:00
I think a key component is that “suburb” has multiple meanings - and which one comes to mind when it’s mentioned depends on where you were raised/lived.

Some suburbs are the stereotypical miles and miles of identical homes with no sidewalks.

Others are actual older rural towns that have been consumed by the nearby metropolis - and these ones feel quite different.

There’s a kind of “suburb” that is usually quite lively - the rural suburb, often a pocket of relatively dense homes in a sea of wheat.

One of my indicators is lemonade stands. If they appear regularly, the area is alive.
by donatj | 2025-07-10 11:36:22+00:00
I am a huge skeptic in general, but when I was 18 some twenty+ years ago I was sitting in my parents living room during a thunderstorm watching out the back window.

This blaringly loud blindingly bright ball of white light just meandered slowly towards the house, before striking the house and destroying most of our electronics and starting a small fire.

The noise was the most impressing part. It's difficult sound to fully explain, it sounded a lot like when a high power line fell near my house a couple years ago. Imagine you were an ant inside a running blender, it's that all-encompassing.

I will never forget it, I've never seen anything like it.
by MSFT_Edging | 2025-07-10 11:36:26+00:00
> ~uncensored

The term "cis" will still get you a warning while my for-you page has been consistently filling up with more and more far right content. I regularly see blue checks espousing actual jewish-conspiracy antisemitism.

Every time something happens to anyone, blue check comments asking if any of the parties were black, sometimes not even asking just assuming and blaming it on black people.

Elon has truly created a cesspit Nazi bar of that site.
by elihu | 2025-07-10 11:37:01+00:00
> There is the MPE specification which allows individual note bending, however it is not supported by any python library as far as I can tell. One could try to hack something with channel pitch bends, but it would be limited to playing 16 notes at the same time.

In practice, that's not usually a problem. That's a lot of polyphony. Technically if you're following the MPE spec, you only get 15 channels because one channel is reserved for sending commands that affect all voices at once. (Like you can send one pitch bend on the reserved channel and have it affect all 15 other channels at once. Likewise for program change and CC messages.)

MPE is kind of a weird way to do things but it actually works pretty well. And one of the nice things about it is that if you go to the trouble to support MPE, it's a pretty easy step to support pre-MPE multitimbral synths -- though each one tends to have its own quirks that have to be worked around.

I've been working on a just intonation MPE controller, and have gotten it to work with a bunch of old 80s-90s-2000's hardware synths. I've considered that it might be worthwhile to eventually split that code out into a separate library so other projects that want to use old Yamahas/Rolands/Korgs/E-mus etc.. in a microtonal way they don't have to reinvent the wheel.
by ninkendo | 2025-07-10 11:38:10+00:00
That function is returning a Vec<Token>, and so it knows the .collect() call needs to return a Vec<Token>, and so therefore the .map() function needs to return a Token. Therefore each match arm needs to return a Token too, so therefore the compiler selects the implementation of .parse() that returns Token.

I admit when I started rust, seeing calls to .parse() was one of the more confusing things I saw in rust code, because of how much it leans on type inference to be readable. In places like these, it's a bit more readable:

let ip: IpAddr = ip_str.parse()?;

But when you see the .parse buried several levels deep and you have no idea what type it's trying to produce, it's a pain in the ass to read. This is why it's nice to use the turbo-fish syntax:

let ip = ip_str.parse::<IpAddr>()?;

Since you can drop .parse::<IpAddr>()? anywhere to make the type explicit, especially when buried in type-inferred blocks like the code in TFA.
by catfacts | 2025-07-10 11:38:56+00:00
I recall someone creating a crypto system and then forgetting to protect the constructor of the initial object so other could change the constructor and do whatever they wanted with that crypto system, but in the end the creators were just web developers with a little training in crypto.

In those circumstances those millions of coins flying in or out are not a tragedy (at least for me) but a very plausible outcome.
by densh | 2025-07-10 11:39:09+00:00
Hey, as someone who spent a few years reimplementing another language trying to decouple it from JVM (Scala JVM -> Scala Native), some pitfalls to avoid:

- Don't try to provide backwards compatible subset of JVM APIs. While this might seem tempting to support very important library X with just a bit of work, I'd rather see new APIs that are only possible with your language / runtime. Otherwise you might end up stuck in never-ending stream of requests to add one more JVM feature to get yet another library from the original JVM language running. Focus on providing your own unique APIs or bindings to native projects that might not be easy to do elsewhere.

- Don't implement your own GC, just use mmtk [1]. It takes a really long time to implement something competitive, and mmtk already has an extensible and pluggable GC design that gets some of the best performance available today [2] without much effort on your end.

- Don't underestimate complexity and importance of multi-threading and concurrency. Try to think of supporting some form of it early or you might get stuck single threaded world forever (see CPython). Maybe you don't do shared memory multi threading and then it could be quite easy to implement (as in erlang). No shared memory also means no shared heap, which makes GCs's life much easier.

- Don't spend too much time benchmarking and optimizing single threaded performance against JVM as performance baseline. If you don't have a compelling use case (usually due to unique libraries), the performance might not matter enough for users to migrate to your language. When you do optimize, I'd rather see fast startup, interactive environment (think V8), over slow startup but eventually efficient after super long warmup (like jvm).

I see that jank is already doing at least some of the things right based on the docs, so this message might be more of a dump of mistakes I've done previously in this space.

[1]: https://github.com/mmtk/mmtk-core

[2]: https://dl.acm.org/doi/pdf/10.1145/3519939.3523440
by ncruces | 2025-07-10 11:39:47+00:00
It's one thing to say that:

- an LLM can help you write a boilerplate `if (err != nil) { return fmt.Errorf(...) }` that actually matches the conventions for code base you're in;

- your IDE can "hide" those additional lines of code to reduce cognitive load while reading code;

- it's actually useful that those "hidden" lines are there when you're debugging and want a place to add a breakpoint, or some additional logging, etc.

This is very different from saying you should have an LLM auto generate half a dozen indentical copies of sync.Map, container.List, my.Set or whatever.Tree based on the types you want to put in your container.

I'm actually fine with an LLM as a more powerful auto complete, that generates half a dozen lines of code at a time (or slightly tweaks code I paste) based on context.

I would have a problem with a LLM generating thousands of lines of code based on a prompt "this, but for ints" and then it's a fork of the original, with god knows how many subtle details lost, and a duplicated maintenance burden going forward.