MurphyA/hacker-news huggingface dataset:
by johnh-hn | 2025-05-15 19:11:40+00:00
Indeed. There is something satisfying about building these and watching them in full flow.

A couple of years ago, I completed a pathfinding assignment designed by David Churchill (https://www.cs.mun.ca/~dchurchill/) for his Algorithmic Techniques for AI course. I'm not a student, and only his students have access to the actual assignment files, so I made a faithful recreation of it by looking at slides he had on a video at the time. The assignment is about pathfinding on a 2D grid. That's fun enough, but I've wanted to put my own spin on it.

Over the past few weeks, I revisited this and applied it to real-world mapping data from OpenStreetMap instead. It uses OverPass API (https://dev.overpass-api.de/) to fetch the data, which is free to use. The data loading times can be a little unpredictable, especially for larger search areas, but I'm happy with it how it turned out. You can find it here if you're interested: https://johnh.co/projects/openstreetmap-pathfinding/
by Jtsummers | 2025-05-15 19:11:41+00:00
I'm not a numpy expert, I just use it on occasion but this works and eliminates the explicit inner loop, but not the outer loop. It collects the list of prime numbers while removing multiples of the prime from the numpy array of numbers:

import numpy as np

def sieve_primes(limit): nums = np.arange(limit + 1) nums[1] = 0 primes = [] for i in range(2, limit): if nums[i] != 0: # could just be `if nums[i]:` since 0 is false-y primes.append(i) nums = nums * (np.mod(nums, i) != 0) print(primes) sieve_primes(1000)

This takes advantage of the fact that True and False are treated as 1 and 0 in Python for the multiplication.

EDIT: The other solutions people have shown are closer to the sieve itself than my solution. I was having trouble with the slicing notation, now that I've seen how that should be done I'd redo the above as:

def sieve_primes(limit): nums = np.arange(limit + 1) nums[1] = 0 for i in range(2, limit): if nums[i] != 0: nums[i+i::i] = 0 print(np.nonzero(nums))

However, the first version is faster by my testing so I'd end up just going back to it if I really cared about performance.
by tunesmith | 2025-05-15 19:11:41+00:00
I think the definitions of complex/complicated get muddled with the question of whether something is truly a closed system. Often times something is defined as "complex" when all they mean is that their model doesn't incorporate the externalities. But I don't know if I've come across a description of a truly closed system that has "emergent behavior". I don't know if LLMs qualify.
by xg15 | 2025-05-15 19:11:42+00:00
> Please tell me how to vectorize this Python code. Go on, I'm waiting.

You can't entirely get rid of the loops, but at least the inner one can be vectorized, I think. That would reduce the "pythonic runtime" from squared to linear.

Maybe something like this?

result = np.full((limit+1,), True, dtype=bool) result[0] = False indices = np.arange(len(result)) for i in range(2, len(result)): result[indices[i:] * i] = False

This is just out of my head, so may contain bugs. Also, the indices array may need to be clamped, not sure right now if numpy accepts out-of-bounds indices.
by modeless | 2025-05-15 19:12:08+00:00
I have been receiving regular spear phishing calls from these guys, or someone who bought the leaked data, with classic tactics like claiming that I need to confirm a potentially fraudulent transaction. They speak perfect English with an American accent, sound very friendly, and have knowledge of your account balance. Thankfully on the first call I realized it was a scam right away, and Google's call screening feature takes good care of the rest. Wish I could forward them to Kitboga[1].

I guess they didn't have as much luck as they wanted scamming Coinbase's customers, and once they had their fun they decided to try extorting Coinbase themselves.

[1] https://www.youtube.com/watch?v=HNziOoXDBeg
Show HN: Smol vsc*de plugin to find in all open files via native search
by fperson | 2025-05-15 19:13:13+00:00
i was programming,- implementing zoom, when i realized! the quickest way to find the piece of code i'm lo_oking for would be to search in the open tabs (of which i usually have many when working on large projects, but i can see them all because i set `workbench.editor.wrapTabs` to `true` in settings), but vscxode didn't have any built-in way to do that, so i created a smol extension that pre-fills the native search field of "find in files" & focuses the text input.

the typescript of the implementation is just 52loc & can be read on https://github.com/f-person/vscode-search-in-open-files/blob... in case of curiosity.

lalala la la
by dr_dshiv | 2025-05-15 19:13:56+00:00
My understanding is that the Harmonium (Smolensky) was the first restricted Boltzmann machine, but maximized “harmony” instead of minimizing “energy.” When Smolensky, Hinton and Rummelhart collaborated, they instead called it “goodness of fit.”

The harmonium paper [1] is a really nice read. Hinton obviously became the superstar and Smolensky wrote long books about linguistics.

Anyone know more about this history?

[1] https://stanford.edu/~jlmcc/papers/PDP/Volume%201/Chap6_PDP8...
by nonameiguess | 2025-05-15 19:14:24+00:00
Ironically enough, I wrote a Sieve in NumPy 12 years ago or so in grad school messing around with Project Euler. I haven't touched it since and have not regularly used either NumPy or even Python in quite some time, but I still have the solutions in a private Github repo. The code is:

def primes(n): """Input: A natural number n. Output: An array of primes, p < n.""" assert n >= 2 sieve = np.ones(n / 2, dtype=np.bool) for i in range(3, int(n ** 0.5) + 1, 2): if sieve[i / 2]: sieve[i * i / 2::i] = False return np.r_[2, 2 * np.nonzero(sieve)[0][1::] + 1]

It still relies on looping and I have no idea if you can fully vectorize everything, but it does at least get quite a bit of speedup thanks to the ability to index one array using another, so I can avoid the inner loop you have to use in pure Python.

I have absolutely no clue what that final line is doing and I'm not sure I understood it 12 years ago, either.
by dralley | 2025-05-15 19:14:27+00:00
It's not an original so much as an official copy. The copies, dated 1300, were created 85 years after the signing of the original Magna Carta in 1215.

Although I suppose the argument is that if you re-affirm the same text several times, that each one is legitimate.

>First issued in 1215, it put into writing a set of concessions won by rebellious barons from a recalcitrant King John of England — or Bad King John, as he became known in folklore.

>He later revoked the charter, but his son, Henry III, issued amended versions, the last one in 1225, and Henry’s son, Edward I, in turn confirmed the 1225 version in 1297 and again in 1300.

But still, it would be weird to say that a copy of the Constitution produced during the Presidency of Abraham Lincoln and re-affirmed by the govt was "an original" even if it otherwise had pedigree.
by gojomo | 2025-05-15 19:14:54+00:00
After I saw third-party "10 year battery enclosure" offerings for AirTags, was wondering when other workaround customizations like this might appear.

Other impactful variants might be:

* senses whether another 'sibling' AirTag is present, if so, stays off. If not, waits X hours & then turns on.

* has its own motion sensor; only after X minutes of being stationary, it waits Y hours to turn on briefly

* has its own clock & (original-user-known) randomization seed; turns on at pseudorandom intervals the original user can predict

* low-power/low-bandwidth receivers so cheap & tiny now: could wait for national or even global unit-specific 'wake' request - perhaps even with parameters for duration/intervals – before powering-on AirTag portion
by bee_rider | 2025-05-15 19:15:09+00:00
Numpy is mostly just an interface to BLAS/Lapack, but for Python, right? BLAS/Lapack aren’t clever libraries for doing a ton of small operations, they are simple libraries for doing the easy thing (operations on big dense matrices) about as well as the hardware can.

Numpy is what it is. Seems more disappointing that he had trouble with the more flexible libraries like Jax.

Anyway there’s a clear split between the sort of functionality that Numpy specializes in and the sort that Jax does, and they don’t benefit much from stepping on each other’s toes, right?
by palmotea | 2025-05-15 19:16:53+00:00
> Aella's popularity is an interesting question, as I've observed her over time my impression of her intelligence and judgement has gone down as she keeps falling into the most obvious traps, but the rationalist movement she's associated with is selected for incredulosity (e.g. making a Harry Potter fanfic a canon work will do that) and there is not a lot of quality information about sex out there.

I'm not super familiar with her, but I think I've stumbled across her a few times. My impression is that she's probably popular amongst that set because she embodies a very specific kind of fantasy of theirs (i.e. porny "liberated" girl that's "rationalist" and obsessed with quantification and "data" like they are).
by lancekey | 2025-05-15 19:17:27+00:00
Scott Adams has an imaginative novella on this called God’s Debris[0]. I read it years ago (when it was free).

I remember enjoying it and liking the takeaway if not the full premise - “we are the universe trying to understand itself”.

[0] - https://web.archive.org/web/20130121195252/http://www.andrew...
by _acco | 2025-05-15 19:17:39+00:00
This is so cool. A key benefit is that it's not embedding the C Lua runtime and compiler, but rather implements Lua in the host language (Elixir/Erlang).

When sandboxing user code in another runtime, you need to serialize the data to and from that runtime. That comes with a performance penalty.

So, for example, if you sandbox code in WASM, you need to pick a transport data format, like JSON. You need to serialize Elixir data structures into JSON, send it to WASM, and then deserialize the result. For a high-performance data pipeline, this adds up!

But if your sandbox is in the host language, no serialization/de-serialization is required. You can execute the sandboxed language in microseconds.

I wrote more about this here: https://blog.sequinstream.com/why-we-built-mini-elixir/

Wish this library existed just a couple months ago!
by ChrisRackauckas | 2025-05-15 19:17:41+00:00
One of the reasons why I started using Julia was because the NumPy syntax was so difficult. Going from MATLAB to NumPy I felt like I suddenly became a mediocre programmer, spending less time on math and more time on "performance engineering" of just trying to figure out how to use NumPy right. Then when I went to Julia it made sense to vectorize when it felt good and write a loop when it felt good. Because both are fast, focus on what makes the code easiest to read an understand. This blog post encapsulates exactly that experience and feeling.

Also treating things like `np.linalg.solve` as a black box that is the fastest thing in the world and you could never any better so please mangle code to call it correctly... that's just wrong. There's many reasons to build problem specific linear algebra kernels, and that's something that is inaccessible without going deeper. But that's a different story.
by _verandaguy | 2025-05-15 19:18:12+00:00
Thanks! That makes a lot of sense, I might dig into this after work some more.

By "big deal," I meant more for people specializing around computer graphics, computer vision, or even narrower subfields of either of those two -- a big deal from an academic interest perspective.

Sure, this might also have implications in society and business, but I'm a nerd, and I appreciate a good nerding out over something cool, niche, and technically impressive.
by soulofmischief | 2025-05-15 19:18:14+00:00
Even with batteries, I deeply investigate the stengths, weaknesses and trustworthiness of each brand. What I would need is for my agent to pour through comments and surface any information of note, then provide one or more recommendations with a clear explanation of why.

Amazon is already experiencing with AI summaries of comments but I currently do not trust the tech, it was hastily rolled out to please shareholders and current LLMs have a tendency to sometimes flip negatives in summaries. Besides, fuck Amazon.
by jerf | 2025-05-15 19:19:12+00:00
You can draw out a sort of performance hierachy, from fastest to slowest:

* Optimized GPU code * CPU vectorized code * Static CPU unvectorized code * Dynamic CPU code

where the last one refers to the fact that a language like Python, in order to add two numbers together in its native, pure-Python mode, does a lot of boxing, unboxing, resolving of class types and checking for overrides, etc.

Each of those is at least an order of magnitude slower than the next one up the hierarchy, and most of them appreciably more than one. You're probably closer to think of them as more like 1.5 orders of magnitude as a sort of back-of-the-envelope understanding.

Using NumPy incorrectly can accidentally take you from the top one, all the way to the bottom one, in one fell swoop. That can be a big deal, real quick. Or real slow, as the case may be.

In more complicated scenarios, it matters how much computation is going how far down that hierarchy. If by "processing a video frame by frame" you mean something like "I wrote a for loop on the frames but all the math is still in NumPy", you've taken "iterating on frames" from the top to the bottom, but who cares, Python can iterate on even a million things plenty quickly, especially with everything else that is going on. If, by constrast, you mean that at some point you're iterating over each pixel in pure Python, you just fell all the way down that hierarchy for each pixel and you're in bigger trouble.

In my opinionated opinion, the trouble isn't so much that it's possible to fall down that stack. That is arguably a feature, after all; surely we should have the capability of doing that sort of thing if we want. The problem is how easy it is to do without realizing it, just by using Python in what looks like perfectly sensible ways. If you aren't a systems engineer it can be hard to tell you've fallen, and even if you are honestly the docs don't make it particularly easy to figure out.
by gnfargbl | 2025-05-15 19:19:12+00:00
I have a medical condition (autoimmune hypothyroid, extreme edition) which I wasn't aware of, but was suffering from severely, during my University years. Waking up was extremely difficult for me and as a result I was often late. At the time I couldn't understand why I seemingly had a problem that nobody else did, and presumed I just lacked self control. Nope, I just needed (a lot) of medication.

Your Prof Ramsey would have penalised me for this unknown condition. This isn't behaviour to be celebrated.
by smusamashah | 2025-05-15 19:19:19+00:00
The demo video does not show constructing 3d from input. Is it possible to do something like that with this? Take a continus feed of a static scene and keep improving the 3D view?

This is what I thought from the title, but the demo video is just a conitnuously changing stream of points/splats with the video.
by techpineapple | 2025-05-15 19:19:31+00:00
Theory --

A VP's job isn't hard because they have to manage 250 developers, A VP's job is hard because they have to manage the cognitive load of a vision for the equivalent of 250 developers worth of work. Same sort of idea with Product Manager's, Manager's, etc. If those developers are more productive, than great, you can do the same thing with more developers, but it's really hard to actually increase the number of products/business units etc. that you then have to market, PM/etc.

As for why not just increase quality? Probably because of diminishing returns.
by pdimitar | 2025-05-15 19:19:40+00:00
A take that I'm not seeing in all the "LLM scrapers are heading to our site, run for your lives!" threads is this:

Why can't people harden their software with guards? Proper DDoS protection? Better caching? Rewrite the hot paths in C, Rust, Zig, Go, Haskell etc.?

It strikes me as very odd, the atmosphere of these threads. So much doom and gloom. If my site was hit by an LLM scraper I'd be like "oh, it's on!", a big smile, and I'll get to work right away. And I'll have that work approved because I'll use the occasion to convince the executives of the need. And I'll have tons of fun.

Can somebody offer a take on why are we, the forefront of the tech sector, just surrendering almost without a single shot?
by dang | 2025-05-15 19:19:55+00:00
Whoa—please don't be a jerk on HN and especially not when discussing other people's work.

You broke the site guidelines badly here (https://news.ycombinator.com/newsguidelines.html), and the Show HN guidelines even more so (https://news.ycombinator.com/showhn.html).

If you wouldn't mind reviewing those links and sticking to the rules when posting to HN, we'd appreciate it.
by munchler | 2025-05-15 19:20:31+00:00
I have to agree with this as someone coming from a strongly-typed background (F#). PyTorch and NumPy are very flexible and powerful, but their API’s are insanely underspecified because every function seems to take multiple combinations of vaguely-typed objects. The library just figures out the right thing to do at runtime using broadcasting or other magic.

This kind of “clever” API seems to be both a benefit and curse of the Python ecosystem in general. It makes getting started very easy, but also makes mastery maddeningly difficult.
Show HN: AsianMOM – WebGPU Vision-LLM app that roasts you like ur mom in-browser
by kuberwastaken | 2025-05-15 19:20:45+00:00
Randomly got inspired yesterday seeing SmolVLM working on WebGPU and had the silly idea for this project.

it's not perfect and super limited because of the current limitations of WebML (and admittedly, because I suck at prompting, but that's why it's Open Source haha) but it is 1.5B WORTH OF AI (SmolVLM 500M and LLama 3.2 1B) working RIGHT IN YOUR BROWSER with you not having to install anything!

In fact, the whole thing is actually just an index.html that you can install and even use directly!

It might be a little bit slow on first try (takes about 3 mins) when it installs models, but it caches it so it's way faster the second time (also, it's available offline after it's cached haha)

Works on any modern web browser

It may be a funny little project, but it's genuinely taught me so much about WebML and Vision models, and the technologies we're getting with WebML will 100% democratize AI access and make it way simpler and easier to be used everywhere :p

GH Repo in case you're interested: https://github.com/Kuberwastaken/AsianMOM
by econ | 2025-05-15 19:20:47+00:00
I would think the person is more interesting and more relevant than the button. One doesn't create hurdles when I'm trying to work. You just don't do it.

I've allowed people to build a whole obstacle course one time. Decades later it stil has me randomly burst out in laughter. It's like hoarding technical debt until nothing in the code base makes sense or even looks familiar. You just don't do that...
by ceejayoz | 2025-05-15 19:21:30+00:00
> Ford-class carriers have high-end radars with similar capabilities as the radars of guided-missile destroyers.

Well, yeah. They have an air wing to keep track of.

> the emissions from these radars make them easier to detect, track, and target…

Is finding a US Navy battlegroup a challenge in the modern era? And won't the nearby escorts still have their radars on?

> The helicopters add significant cost, weight, and crew to the ship.

Sure. And capabilities.
by mrguyorama | 2025-05-15 19:21:57+00:00
My department head made a point once to instruct us that, if you need it, you should schedule time on your calendar as a meeting to just be "heads down" on work.

We have a lot of meetings so he encourages we do basically whatever it takes to keep meetings timeboxed.

I once was in an incident call where one of the execs was brought in and eventually said "We have 20 people in this call who all have good salaries. It will cost $600 to just inform our customer service agents to take care of this. Let's get out of here"

Management has to push that culture downwards, and reinforce it themselves, and continually encourage it as people join and leave and teams change.
by gamescr | 2025-05-15 19:22:05+00:00
Right. But free will is anti-deterministic, instead of undeterministic. That's why the "free" part gets confusing, because we are always limited, and yet free will is an intelligence power. Parrots can't lie, they reproduce sounds, humans can lie and encode lies as sounds. LLM's don't currently lie, since lying is strategic. Free will is about strategically choosing actions. Free will doesn't tell us anything about the (non)deterministic nature of the universe or ourselves.
by Nevermark | 2025-05-15 19:23:08+00:00
I mistook the title for "A Tiny Boltzmann Brain"! [0]

My own natural mind immediately solved the conundrum. Surely this was a case where a very small model was given randomly generated weights and then tested to see if it actually did something useful!

After all, the smaller the model, the more likely simple random generation can produce something interesting, relative to its size.

I stand corrected, but not discouraged!

I propose a new class of model, the "Unbiased-Architecture Instant Boltzmann Model" (UA-IBM).

One day we will have quantum computers large enough to simply set up the whole dataset as a classical constraint on a model defined with N serialized values, representing all the parameters and architecture settings. Then let a quantum system with N qubits take one inference step over all the classical samples, with all possible parameters and architectures in quantum superposition, and then reduce the result to return the best (or near best) model's parametesr and architecture in classical form.

Anyone have a few qubits laying around that want to give this a shot? (The irony that everything is quantum and yet so slippery we can hardly put any of it to work yet.

(Sci-fi story premise: the totally possible case of an alien species that evolved one-off quantum sensor, which evolved into a whole quantum sensory system, then a nervous system, and subsequently full quantum intelligence out of the gate. What kind of society and technological trajectory would they have? Hopefully they are in close orbit around a black hole, so the impact of their explosive progress has not threatened us yet. And then one day, they escape their gravity well, and ...)

[0] https://en.wikipedia.org/wiki/Boltzmann_brain
by ebolyen | 2025-05-15 19:23:33+00:00
Not an expert, but I have a bit of formal training on Bayesian stuff which handles similar problems.

Usually Gibbs is used when there's no directly straight-forward gradient (or when you are interested in reproducing the distribution itself, rather than a point estimate), but you do have some marginal/conditional likelihoods which are simple to sample from.

Since each visible node depends on each hidden node and each hidden node effects all visible nodes, the gradient ends up being very messy, so its much simpler to use Gibbs sampling to adjust based on marginal likelihoods.
by magicalhippo | 2025-05-15 19:24:02+00:00
It's a distinct regime, so useful to give it a distinc name. Super and hyper are roughly synonyms, but super was already taken.

There was also some precedence from wave research back in 1938 which suggested hypersonic and ultrasonic for high frequency waves[1].

At this point it's a well-established term, with 60 years of history[2].

[1]: https://www.ias.ac.in/public/Volumes/seca/007/03/0163-0176.p...

[2]: https://secwww.jhuapl.edu/techdigest/Content/techdigest/pdf/...