MurphyA/hacker-news huggingface dataset:
Show HN: Dipstick – A new way to DI in TS
by xxiem | 2025-06-27 21:41:10+00:00
For whatever reason, every attempt at DI in this language that I've found over the last few years is more-or-less a port of an existing DI framework for languages like C# or Java/Kotlin, but they leave a lot to be desired. JS doesn't have TS types at runtime, so these frameworks tend to hack around that idea by muddying up source code with `@Decorators` or creating unique tokens to represent types. I personally find these hacks to be pretty ugly. What's worse, they violate the principle of least surprise (especially for devs who aren't familiar with DI), and they often result in code that's not type-safe!

Dipstick takes a totally different approach, which leverages the type system and code generation.

- Simple. There are only two concepts to learn about: Modules and Bindings. - Obvious. Want to see where a class is instantiated? Let your IDEs tools do the work. No tricky reflection or abstraction here -- just readable, generated code. - Modular. Define multiple modules and compose them together to keep code organized.

The framework is still really young, and currently only supports classes (boo), but if it gets some traction, I will update it to support injecting functions or other literal values.

I'd really love some feedback to make this thing better!
by iamdamian | 2025-06-27 21:41:29+00:00
This looks pretty compelling to me. I've been itching for a math-friendly language that makes it easy to work with arrays, vectors, vector spaces, manifolds, etc., but takes advantage of static typing. (Haskell is amazing but doesn't quite make linear algebra constructs feel native.)

On first read, it looks like this is designed with a healthy balance between mathematical insight (relationship of product types and tuples, basis in lambda calculus) and real developer needs (e.g., static typic is nice; dependently typed systems can be too much; types are great, but "nameless shapes" are useful, too).

I'd love to see an implementation of this to play around with.
by timr | 2025-06-27 21:42:12+00:00
Well, if we're predicting the future, here's mine: since they're already basically telegraphing it (and also because it's pretty clear-cut), I predict that they'll overturn the whole thing in a future case, and then the left will be crowing about how mean-ol Mr. Trump was taught a lesson in capital-D Democracy by our powerful system of government.
by troupo | 2025-06-27 21:42:29+00:00
> It’s similar enough to html that

"Similar enough" is a far cry from "It’s just html, in strings, in JavaScript"

> anybody familiar with html and JS can pick it up

Just like JSX. But no one calls JSX "just HTML" (and in React, with rules of hooks, it's no longer "just JS"). In Solid JSX returns actual DOM nodes btw.

> it mostly just feels like building a huge html string.

Because that's what you essentially do. lit runtime parses your custom string, converts it to proper HTML, concatenates that into a string, and then dumps into the document with innerHTML (it does set up data bindings etc. , so it's more than just thay of course)
by trod1234 | 2025-06-27 21:42:31+00:00
These things don't actually think. They are a product of the training imposed.

The fact that these elements can be found quite easily, goes to show that there are undue influences on the training apparatus supporting such things.

Anthropomorphism is a cognitive bias that unduly muddies the water.

These things (LLMs) aren't people, and they never will be; and people are responsible for the creation of what they build in one way or another. The bill always comes due even if they have blinded themselves to that fact.
Show HN: CNPJ Info
by iccananea | 2025-06-27 21:43:49+00:00
This is a simple web app that I made to search for public information on Brazilian companies. The site is in Portuguese and in order to see most of the info you have to create an account.

I built this to test the limits of what a server in my house is capable of handling, compared to hosting on AWS/GCP/Azure.

The service runs using 2 VMs on proxmox, one for caddy, one for the service itself, built using Go + Echo + SQLite
by dredmorbius | 2025-06-27 21:44:01+00:00
"EFF Sues DOGE and the Office of Personnel Management to Halt Ransacking of Federal Data" (February 11, 2025)

EFF and a coalition of privacy defenders have filed a lawsuit today asking a federal court to block Elon Musk’s Department of Government Efficiency (DOGE) from accessing the private information of millions of Americans that is stored by the Office of Personnel Management (OPM), and to delete any data that has been collected or removed from databases thus far....

<https://www.eff.org/deeplinks/2025/02/eff-sues-doge-and-offi...>

"EFF Sues OPM, DOGE and Musk for Endangering the Privacy of Millions" (February 11, 2025)

(Concerns same action.)

"The Dangers of Consolidating All Government Information" (June 5, 2025)

The Trump administration has been heavily invested in consolidating all of the government’s information into a single searchable, or perhaps AI-queryable, super database. The compiling of all of this information is being done with the dubious justification of efficiency and modernization–however, in many cases, this information was originally siloed for important reasons: to protect your privacy, to prevent different branches of government from using sensitive data to punish or harass you, and to perserve the trust in and legitimacy of important civic institutions.

Just three of several DDG results at eff.org for 'doge "government efficiency"': <https://duckduckgo.com/?t=ftsa&q=site%3Aeff.org+doge+%22gove...> (there are numerous dupes, mostly of these three items best I can tell).

I hope this somewhat restores your faith in EFF, and if not, I'd appreciate hearing why, if you care to say.
by arp242 | 2025-06-27 21:44:13+00:00
One has to wonder how often things went wrong in the past and just didn't get reported on. Or were just shrugged off.

I don't think people of the 19th century were fundamentally better than they are today. Things like (sexual) abuse happened. There was probably a lot more of it than today: big taboo on anything related to sex, women couldn't even vote, fewer investigative tools (fingerprints, cameras, DNA). Well, it probably wasn't great.

Today if a child would see a friend blow up in front of him people would be talking about PTSD, (life-long) trauma, etc. During the war my grandfather had a friend blow up in front of him. "Well, you didn't get any help in those days, you just had to deal with it, haha!"

In the past lots of things like this were under-represented. Today they're probably over-represented.
by everforward | 2025-06-27 21:45:17+00:00
From my reading and understanding, they still can, it just involves an _immense_ amount more paperwork. The ruling is basically that judges can only provide injunctions for the named party in a case, not universal injunctions. So instead of one injunction, each person impacted by the EO will have to file for their own injunction. Which will likely be granted due to similar injunctions already granted.

So it reads to me like we've ended up in a similar spot, but with the requirement that an insane amount of paperwork happens.
by Anechoic | 2025-06-27 21:45:37+00:00
I wish there were an expert or researcher interested in these areas: residential buildings, shops, parks, churches, and schools.

You mean an expert in acoustics related to those areas? There are lots of experts and researchers. Take a look at the Acoustical Society of America, the Institute of Noise Control Engineering, and Council for Accreditation in Occupational Hearing Conservation for starters.

Penn State, University of Hartford, Purdue University, Michigan Technological University, University of Nebraska, Morgan State Univeristy, and Brigham Young University (among others) all have strong acoustics programs with research in a bunch of areas.
by fasthands9 | 2025-06-27 21:45:50+00:00
If anything I imagine law and cases to get more complex. Less lawyers may be needed for any one case, but that should just make it more possible for lawsuits for smaller amounts of damages to be brought.

The blog post brings up the Daniel Penny trial. That trial took six weeks, even though it was on video. I imagine criminal cases have gotten longer and more complex now, because each case has more potential information than it ever did.
by acoustics | 2025-06-27 21:46:35+00:00
The OP said that the courts were preventing the president from exercising his power under the constitution, I replied that he does not have this power under the constitution. That's all.

There's a right way and a wrong way to go about addressing problems. If the president wants to exclude natural-born children of illegal immigrants from citizenship, he can lead an effort to amend the constitution.
by vjvjvjvjghv | 2025-06-27 21:46:52+00:00
XML has its own set of idiosyncrasies like everything being a string. Or no explicit markup of arrays. The whole confusion around attributes vs values. And many others.

JSON has its own set of problems like lack of comments and for some reason no date type.

But in the end they are just data file formats. We have bigger things to worry about.
by mgraczyk | 2025-06-27 21:47:08+00:00
Google explored doing this with devices that connect to each other, specifically Chromecast and their early Google Home devices. I don't think it ever launched but Google did some interesting experiments to test the ultrasonic transfer functions on millions of consumer devices. (I worked in audio research at Google at the time but not on this).

I believe the main problem is that it makes dogs go crazy
by phillipcarter | 2025-06-27 21:47:12+00:00
I beg to differ. All commercial SOTA models emit roughly the same quality of code and have roughly the same limitations and ability to remain coherent in the size of context passed to them.

As has always been the case, it's the mechanisms used to feed relevant contextual information and process results that sets one tool apart from another. Everyone can code up a small agent that calls in LLM in a loop and passes in file contents. As I'm sure you've noticed, this alone does not make for a good coding agent.
by cryptoz | 2025-06-27 21:47:24+00:00
That will be done with a solar gravitational lens - there's a recent-ish NASA paper about it. Basically you send your probe to > 550 AU in the opposite direction of your target exoplanet, point it at the Sun and you will get a warped high-res photo of the planet around the Sun. You can then algorithmically decode it into a regular photo.

I think the transit time is likely decades and the build time is also a long time as well. But in maybe 40-100 years we could have plentiful HD images of 'nearby' exoplanets. If I'm still around when it happens I will be beyond hyped.
by xienze | 2025-06-27 21:49:17+00:00
The second amendment is “very clearly” spelled out in the Constitution yet many roadblocks to gun ownership are thrown up in various states and people STILL make tired arguments about how the amendment “should” be interpreted. For example, the old argument that the founding fathers could have never conceived of AR-15s and thus their legality under the second amendment is debatable.

Likewise, in 1868 the writers of the fourteenth amendment probably couldn’t conceive of rapid international travel and the possibility that pregnant women could just show up weeks before their due date and their newborn child should “obviously” be an American citizen.

The amendment was quite obviously targeted at Native Americans and slaves, not any and all pregnant women the world over who manage to reach the US before giving birth. But as you’re noticing, there’s multiple ways people can interpret laws. It’s rarely as cut and dry as “this is obviously against the law!!!”
by joemi | 2025-06-27 21:49:53+00:00
It's a shortened form of hex colors from CSS, but it does correspond to RGB since the first character of the hex value is the R, the second character is the G, and the third is the B. So for instance, a hex value from this game of #F18 means the red is F (out of F), the green is 1 (out of F), and the blue is 8 (out of F).
by Calzifer | 2025-06-27 21:50:22+00:00
Bash is slower than other POSIX compatible shells but once you start running external commands for any substring or replace operation you loose much of this performance edge since forking is comparable slow.

One reason why I personally prefer to use Bashisms like ${x//str/replace} or [[ $value =~ $pattern ]] instead of doing the common x=$(echo $x | sed s/str/replace/) which has to launch two processes just for the sake of avoiding Bashism. (or grep -oP ... which is nice but a BASH_REMATCH is often simpler)
by pyman | 2025-06-27 21:51:02+00:00
How did we end up in this mess?

Back in the early 2000s, innovation in software development was booming. IDEs actually helped you build stuff. You had Visual Component Libraries, drag and drop interfaces, proper GUIs. Visual Basic, Delphi, .NET and the one and only Xcode. When I read about these tools or watch videos, it feels like toolmakers were on fire.

https://marcgg.com/blog/2024/01/05/editor-history/

And then web development came along, and it was like big tech companies hit the reset button.

We went from powerful visual environments to Notepad++. From proper tooling to writing jQuery by hand and praying it didn't break somewhere else.

FrontPage. Dreamweaver. Director. Flash! Say what you want, but at least they tried to give developers a proper workflow. Then Facebook ditched all of it for the purity of the web and pretended that coding everything by hand was somehow noble.

Facebook dropped the bar so low that anything remotely decent, like Sublime Text or Atom felt revolutionary. And Visual Studio? It's called Visual but where are the visual components? Why do devs have to write React components by hand in 2025?

Apple gave us Xcode. Microsoft gave us Visual Basic and .NET. Adobe gave us Director and Flash. Google gave us Chrome and Android Studio. And Facebook gave us a bunch of text files called React... and a massive headache.

What happened to building tools that make developers more productive? Web developers had to wait 20 years for a new wave of toolmakers to show up: OpenAI and Anthropic. It's like these two companies were created just to put devs out of their misery.

Did I mentioned that in React you still have to write CSS by hand?

From a software development point of view, Facebook has been one of the most disappointing companies in the history of web and mobile.
by magicalist | 2025-06-27 21:51:33+00:00
> He added that citizenship "will not, of course, include persons born in the United States who are foreigners, aliens, who belong to the families of ambassadors or foreign ministers accredited to the Government of the United States, but will include every other class of persons"

yes, exactly, if you're born to an ambassador in the US, you aren't subject to the jurisdiction.

Meanwhile:

> The proposition before us, I will say, Mr. President, relates simply in that respect to the children begotten of Chinese parents in California, and it is proposed to declare that they shall be citizens. We have declared that by law; now it is proposed to incorporate the same provision in the fundamental instrument of the nation. I am in favor of doing so. I voted for the proposition to declare that the children of all parentage whatever, born in California, should be regarded and treated as citizens of the United States, entitled to equal civil rights with other citizens of the United States. . . . Here is a simple declaration that a score or a few score of human beings born in the United States shall be regarded as citizens of the United States, entitled to civil rights, to the right of equal defense, to the right of equal punishment for crime with other citizens; and that such a provision should be deprecated by any person having or claiming to have a high humanity passes all my understanding and comprehension.

(the "declared that by law" is referring to the Civil Rights Act of 1866 that Howard used as the basis of the 14th amendment: "all persons born in the United States and not subject to any foreign power, excluding Indians not taxed, are hereby declared to be citizens of the United States")
by int_19h | 2025-06-27 21:52:04+00:00
Not necessarily the entire statement, just some outer expression.

Which might make more sense when you remember that the only statements in Rust are various declarations (`let`, `type`, `fn` etc) and macro invocations. Everything else is an "expression statement", including blocks and loops. Thus you can do stuff like:

// Compute the first Fibbonaci number >10 let n = { let mut x1 = 0; let mut x2 = 1; loop { let x = x1 + x2; if x > 10 { break x } x1 = x2; x2 = x; } };

Note that `break` never leaves the let-statement here - it just terminates the loop expression and forces it to yield a value (`break` without arguments yields (), and ditto for loops without break).

You can also break out of regular blocks if they are labelled and you use the labelled form of break:

let x = 'label: { ... break 'label 42 ... }

This all can very easily lead to convoluted code if not used sparingly, but sometimes a mutating loop with mutable data encapsulated within and a break to yield it once the computation is complete is genuinely the most straightforward way to write something.
by williamdclt | 2025-06-27 21:53:08+00:00
This is hexadecimal notation for rgb. Each character represents 2 bytes, which encode a value from 0 to 255.

This is a bit more confusing because this is a shorthand notation: you’d actually need 2 hexadecimal characters for 2 bytes (eg #0077ff would be rbg(0, 127, 255)). In this shorthand notation, I think there’s an implied 0 (eg #07f is #0070f0).

So you can’t represent all rgb colour with only 3 characters, but for this use-case it’s fine.

In css you can use either of these 3 notations, for example
by ggreer | 2025-06-27 21:53:18+00:00
Hydrogen fuel cell vehicles are a little different because there are safety, economic, and physical constraints that mean they will always be worse than battery electric or gas cars. I and many others correctly predicted this.[1] For hydrogen to succeed, batteries would have to get more expensive and/or have worse energy density than they did in 2015.

Satellite data centers seem unlikely to me, but at least their feasibility doesn't require that existing stuff get more expensive/worse. Starcloud is a bet that three things will happen in the next decade:

- SpaceX Starship will succeed and drastically reduce launch costs.

- Batteries will not get 10x cheaper.

- There will be valuable applications for high latency, high performance compute (eg: AI training).

If any one of these things does not happen, Starcloud is doomed (or will have to pivot). If they all happen, Starcloud has a chance at success.

1. https://news.ycombinator.com/item?id=25875749
by kreco | 2025-06-27 21:53:46+00:00
The backslashes itself make the preprocessor way more complicated for no real advantage (apart when it's unavoidable like in macros).

For every single symbol you need to actually check if there is a splice (backslash + new line) in it. For single pass compiler, this contribute to a very slow lexing phase as this splice can appear anywhere in a C/C++ code.
by EasyMark | 2025-06-27 21:54:05+00:00
The only reason the avoided is to avoid countering Trump, it's dead obvious that Trump is forbidden by law to do what he's doing. It's going to take months to years for a real 14th amendment case to reach them, meanwhile he's shipping people off to "3rd nations" to imprison them there in the worst conditions imaginable and indefinitely with no court process or trial. Why should an illegal immigrant go to prison, potentially for the rest of their life just because they illegally crossed the border?
by bee_rider | 2025-06-27 21:54:47+00:00
It seems weirdly backwards. They don’t do techniques like quantization aware tuning to increase the accuracy of the coprocessor, right? (I mean that’s nonsense). They use those techniques, to allow them to use less accurate coprocessors, I thought.

I think they are just saying the coprocessor is pretty accurate, so they don’t need to use these advanced techniques.
by hansvm | 2025-06-27 21:55:35+00:00
> people who get used to "everything is an expression" languages tend to prefer it, I've found

I.e., if we bias our sample to the data points proving our point then our point is proven. It's like that quip about how every car insurance company can simultaneously claim "people who switched saved hundreds of dollars in average."

I also like "everything is an expression" languages, but I don't think that's a fantastic argument.
Rhythm Is All You Need – Goodbye Transformers Rhythm Is the Final Piece
by RyukuLogos | 2025-06-27 21:56:23+00:00
I believe rhythm is the next paradigm in AI.

Not just for vision — but for perception, memory, and even consciousness.

I've proposed a new theory: "Rhythm is All You Need" — a framework where patterns over time, not static inputs, form the basis of meaning.

From multisensory integration to object recognition, I've found that shared temporal rhythm explains more than embeddings or attention ever could.

No training, no weights — just motion over time.

It works. Demos already show unsupervised object separation, using nothing but rhythm.

This may sound fringe today. But so did attention once.

The rhythm wave is coming.
by josephcsible | 2025-06-27 21:56:37+00:00
Think how much CO2 was emitted because of that curfew law. Anyone who cares about the environment should be advocating for repealing it, or at least changing it to "if the plane would be scheduled to land within curfew at the time it takes off, then it's allowed to land no matter what time it actually gets there". Especially since the go-around there made as much noise as landing would have.
by dylan604 | 2025-06-27 21:56:48+00:00
bitrate isn't really what we're concerned with here, though is it? if you use 96kHz sampling rate, you can reproduce 48kHz frequencies according to Nyquist. the bitrate would then be the sampling rate * bit depth * #channels. your 192kbps would potentially be the 96kHz * 2 channels, but you've left out the bit depth or using a 1-bit sample???
by ejstronge | 2025-06-27 21:57:01+00:00
> tourist parents here for a few weeks (for example) aren't subject to the jurisdiction of America. It's a valid argument to make, even if you come down on a different side

This ‘jurisdiction’ claim essentially only applied to people who had a diplomatic status while in the US. A traveler from Canada has no special right against being prosecuted (just like you would not were you to go to, say Britain).

A governmental figure from Canada would have protections - we would need to interact with another sovereign to hold them accountable.

This really has nothing to do with tourism, outside deceitful assertions on television.

Regarding Britain, here’s an example of someone not being subject to the jurisdiction of a country after committing a serious crime: https://www.cbsnews.com/amp/news/harry-dunn-uk-anne-sacoolas...

I hope this clarifies your misunderstanding about the meaning of jurisdiction.
by msgodel | 2025-06-27 21:57:32+00:00
If you have the rights/if your customers will tolerate it.

EDIT: to clarify as I realize that was pretty vague.

1) Depending on how you use your dependencies you may have a licensing conflict that makes the GPL incompatible.

2) I think your shareholders/VCs/whoever holds the equity (or if you're bankrupt the senior bondholders) probably own the copyright for the code so you would need their permission.