MurphyA/hacker-news huggingface dataset:
Show HN: Lines of Code – Open-Source Widget for GitHub Stats
by yehiaabdelm | 2025-05-17 17:14:23+00:00
I built Lines of Code, a simple tool that shows how many lines of code you’ve written in each language across your GitHub repos.

It generates a clean, interactive graph you can embed anywhere. You can customize the output with query parameters like theme, metric, limit, and more.

Data updates weekly, and the project is open source: https://github.com/yehiaabdelm/linesofcode
by zahlman | 2025-05-17 17:14:34+00:00
>And this is why stack overflow now has as many questions asked as it did in 2009

So now there is a manageable volume of new questions that allows for enough people to review them properly and apply question standards properly, instead of letting most things seep through and set bad examples for the next batch. And more time to sift through the existing questions to polish up the best.

Existing questions, by the way, that outnumber Wikipedia articles by more than 3:1. Even though they're only supposed to be specifically about programming rather than about literally anything notable.
by bubblyworld | 2025-05-17 17:14:39+00:00
A technicality is that those compressors need to provably predict properties of said geometric objects to be interesting to mathematicans (a statement which itself needs appropriate encoding in mathematical language - what exactly you want probably depends on the problem you hope to solve). Something that superficially looks good but works as a black box wouldn't cut it.

My understanding of ML interpretability research at the moment is that it's very early days - too early, perhaps, to hope for a general purpose compressor algorithm that produces proofs of it's own workings (that seems like the holy grail). But of course I would love to be wrong!
by scoofy | 2025-05-17 17:17:36+00:00
I mean, alternatives already exist to the SWIFT network: CIPS (China), SFMS (India), even the INSTEX (Europe) system is in place if a European system were needed quickly.

Insofar as "where the money goes," the sovereign bond market is huge, and if the milkshake theory is to be believed, finding and alternative is just a coordination problem that could be effectively solved by a few large actors.

If the traditional theory is to be believed, downgrades from ratings agencies should simply facilitate the movement of folks leaving treasuries as a risk-free rate. This does introduce currency risk (though it existed already), but we may simply move to baskets of securities of we don't end up on a single currency to carry bonds in general. There is also the "store of value" vs "transactional" aspects to currencies, and the dollar may become more and more transactional and less useful as a store of value and/or collateral. If that's the case, I wouldn't be surprised if there were not more "asset inflation" if that's even a useful term.

I agree with you that it should be slowly and then all at once, because if the US is going to default or debase, nobody wants to be the greater fool.
by lblume | 2025-05-17 17:18:35+00:00
> printInvoice(invoice, options)

The function printInvoice should print an invoice. What happens if an invoice cannot be printed due to one of the named conditionals being false? You might throw an exception, or return a sentinel or error type. What do to in that case is not immediately clear.

Especially in languages where exceptions are somewhat frowned upon for general purpose code flow, and monadic errors are not common (say Java or C++), it might be a better option to structure the code similar to the second style. (Except for the portrait format of course, which should be handled by the invoice printer unless it represents some error.)

> while code readability is extremely important, encapsulation is much more important

Encapsulation seems to primarily be a tool for long-term code readability, the ability to refactor and change code locally, and to reason about global behavior by only concerning oneself with local objects. To compare the two metrics and consider one more important appears to me as a form of category error.
by atombender | 2025-05-17 17:18:52+00:00
I think this is survivorship bias to a large degree.

Sturgeon's Law applied then as it does now; 90% of everything is crud. Go back 20-30 years, and the shows you remember as great are only a tiny fraction of the total output. Some (like Monty Python or Brass Eye) were extreme outliers.

Some shows seen as notable at the time are now mostly, though not always fairly, forgotten because they haven't aged well. Nobody's really watching, I don't know, The Onedin Line or Against the Wind today.
by mrweasel | 2025-05-17 17:19:13+00:00
Then why do they need to spy on people? I mean, I agree with you. The center parties typically aren't persecuting massive amounts of people for their beliefs and "thought crimes", but they do still seem a little to happy to spy on people.

Probably more relevant in multi-party parliamentary systems, but someone pointed out that: if the left wing parties and the liberales agree on a policy, you should probably just implement it immediately. (Said about the Danish Red–Green Alliance and the Liberal Alliance, an eco-socialist party and a right-wing liberal party respectably).
by ffsm8 | 2025-05-17 17:19:54+00:00
I believe the argument was that jsx doesn't support that either, which should be correct as far as I know.

They're all features in the jsx ecosystem that are provided by other libs, which are often preconfigured with projects utilizing jsx.

I did miss a lot of the tooling I've gotten used to the last time I made a weekend project utilizing lit webcomponents for sure, but I believe the people advocating for it usually rejoice in having less tooling in their development pipeline - it's just a fundamental disconnect between people that have learned and gotten used to current frontend development and people that don't really want to bother with it, looking for simpler solutions with less moving parts.
by fragmede | 2025-05-17 17:20:50+00:00
Maybe better formatting would show it better to you.

github.com/AlDanial/cloc v 2.04 T=0.05 s (666.3 files/s, 187924.3 lines/s) ---- Language files blank comment code ---- Python 24 1505 1968 5001 ---- Markdown 4 37 0 121 ---- Jinja Template 3 17 2 92 ------------- SUM: 31 1559 1970 5214
by behnamoh | 2025-05-17 17:21:03+00:00
> We need critics who devote their lives to browsing through the pile and telling us what is worth our time and what isn't.

No thanks. The last time this happened we ended up with opinionated articles, hidden promotions, and censorship in news, media, newspapers, etc.

A good example:

try searching for "fluoride residue in brain" on Google vs Yandex and see how they tell totally opposite stories.
by Brian_K_White | 2025-05-17 17:21:36+00:00
But the checking and the writing really are 2 different things. The "rule" that you always want to do this check before write is really never absolute. Wrapper is exactly correct. You could have the single function and add a param that says skip the check this time, but that is messier and even more dangerous than the seperate wrapper.

Depends just how many things are checked by the check I guess. A single aspect, checking whether the resource is already claimed or is available, could be combined since it could be part of the very access mechanism itself where anything else is a race condition.
by billfor | 2025-05-17 17:22:05+00:00
> Home Assistant has support for that remote option, and no others.

The openHAB Cloud Connector allows connecting the local openHAB runtime to a remote openHAB Cloud instance, such as myopenHAB.org, which is an instance of the openHAB Cloud service hosted by the openHAB Foundation (https://www.openhab.org/addons/integrations/openhabcloud/)

> There is also a container-based method that can run on another distribution, but this installation does not support the add-ons feature.

You can use the add-ons with the containerized version. This has been discussed elsewhere.
by mdaniel | 2025-05-17 17:22:29+00:00
Type inference is handy, but as an observation source code is 90% written for humans - I believe that CPython knows what types they are, that's how TypeError even exists, but seeing "def doit(erthang):" doesn't help me in the slightest. Often PyCharm can figure it out, because bless their hearts, but then developers whine about "wwwaaa, pycharm too slo grug use ed" and then one gets AttributeError in production because who could have foreseen
by xienze | 2025-05-17 17:22:39+00:00
It’s right there in the article:

>The ministry’s report admits the chief reason why so many women wind up being prosecuted is because they are more likely to open the door to inspectors.

Men literally or figuratively tell the inspectors to fuck off, women don’t. It’s not bias, systemic issues, or whatever. It’s entirely on how women handle the situation that explains the difference.
by socalgal2 | 2025-05-17 17:22:45+00:00
> I travel by train a shitton through all of Europe, and I have _never_ had the issue of boarding a train without knowing if I had a valid ticket for it.

Like I said, I was used to Japan. I couldn't have boarded a train without passing through a gate for which I would have needed a ticket. As pointed out above, that happened in Paris. At no point between the metro and the train was their any barrier preventing me from getting on the train without a ticket. Just a tunnel with labels directly to the train. Being used to Japan, I assumed therefore I could work out out at my destination since there wasn't even a ticket purchasing place that I would notice, between those 2 spots.

You need to remember, people who have not used your system (tourists) will have to make every mistake possible. I prefer a system that allows less mistakes as well as a system that lets me fix my mistake. You seem to prefer systems that require you to make a mistake once and get fined, and then learn how to use the system from the mistake.
by AStonesThrow | 2025-05-17 17:23:24+00:00
> Rome never developed intentional industrial extermination of human lives as a deliberate state policy.

Uh, except perhaps for a few centuries worth of persecuting Christians, subjecting them to tortures and deliberately putting them to death by the thousands, creating a basis for the veneration of martyrs in the years to come? Except for that, Rome really didn't intentionally exterminate human lives, right?
Ask HN: What are the most autonomous AI agents you know of?
by FailMore | 2025-05-17 17:23:44+00:00
Hi all, I'm an engineer and most of my work with AI keeps me fairly closely in the loop - reviewing output or giving permissions. However, it's very clear that with enough permissions / MCPs, the LLM could do its own thing ~indefinitely.

I'm curious if anyone knows of any extremely autonomous AI agents which run in perpetuity or close to that?

Thanks for any answers, thoughts or ideas!
by hetman | 2025-05-17 17:23:45+00:00
I agree with this sentiment. I find attempts to create these kinds of universal rules are often a result of the programmer doing a specific and consistently repeating type of data transformation/processing. In their context it often makes a lot of sense... but try and apply the rules to a different context and you might end up with a mess. It can also often result in a reactionary type of coding where we eliminate a bad coding pattern by taking such an extremely opposite position that the code becomes just as unreadable for totally different reasons.

This is not to say we shouldn't be having conversations about good practices, but it's really important to also understand and talk about the context that makes them good. Those who have read The Innovator's Solution would be familiar with a parallel concept. The author introduces the topic by suggesting that humanity achieved powered flight not by blindly replicating the wing of the bird (and we know how many such attempts failed because it tried to apply a good idea to the wrong context) but by understanding the underlying principle and how it manifests within a given context.

The recommendations in the article smell a bit of premature optimisation if applied universally, though I can think of context in which they can be excellent advice. In other contexts it can add a lot of redundancy and be error prone when refactoring, all for little gain.

Fundamentally, clear programming is often about abstracting code into "human brain sized" pieces. What I mean by that is that it's worth understanding how the brain is optimised, how it sees the world. For example, human short term memory can hold about 7±2 objects at once so write code that takes advantage of that, maintaining a balance without going to extremes. Holy wars, for example, about whether OO or functional style is always better often miss the point that everything can have its placed depending on the constraints.
by 0xWTF | 2025-05-17 17:23:55+00:00
I would welcome folks thoughts on how this applies to medicine and war, two aspects of life where 'the enemy gets a vote' and the consequences are high.

In medicine, I see the LLMs as a pretty good net outcome. For war, I see this as potentially catastrophic. We need more Stanislav Petrovs, fewer Charles Forbins and his Colossus.
by vinceguidry | 2025-05-17 17:24:04+00:00
Wikipedia shares my assessment:

> Reproducible builds, also known as deterministic compilation, is a process of compiling software which ensures the resulting binary code can be reproduced. Source code compiled using deterministic compilation will always output the same binary.[1][2][3]

An operating system isn't a binary executable. You're gonna need to come at me with more than RTFM my bro.
by KronisLV | 2025-05-17 17:24:52+00:00
I really like the JetBrains IDEs, both for Java and .NET, it feels way more pleasant to write code and refactor it than just in something like Visual Studio Code (which still feels better for utility scripts). They have pretty good run profiles that you can put in your repo, pretty good debugger, plenty of suggestions/inspections and customizability.

Java, .NET and languages like that also lend themselves pretty well to tools (and even LLMs) understanding what's going on, their runtimes are pretty good and platform differences don't give you too many issues from what I've seen. Though when it comes to the frameworks or libraries you might use (e.g. how often you will see the likes of Spring Boot in enterprise projects) will definitely leave some performance on the table [1] and have plenty of awkward and confusing situations along the way [2], especially if you're unlucky enough to have to work on codebases that have been around for over a decade. Old Java projects really suck sometimes, though maybe that applies to many of the old projects, regardless of tech.

Overall, I quite like them and am pretty productive, plus I unironically think that using Maven is pleasant enough (even adding custom repos isn't too convoluted [3]) and the modern approach of self contained .jar files that can just be run with a JDK install instead of separately having to manage Tomcat or GlassFish (or TomEE or Payara nowadays, I guess) is a step in the right direction!

Though while I do like packages such as Apache Commons and they're very useful, I also very much enjoy using something like Go more recently, it's easier to get started making simple web apps with it, less ceremony and overhead, more just getting to writing code.

[1] https://www.techempower.com/benchmarks/#section=data-r23&l=z...

[2] https://blog.kronis.dev/blog/it-works-on-my-docker (a short rant of mine, but honestly I very much prefer when you have configuration done explicitly in the code, not some layered abstractions with cryptic failure modes; Dropwizard is way nicer in that regard than Spring Boot)

[3] https://maven.apache.org/guides/mini/guide-multiple-reposito... and https://maven.apache.org/guides/mini/guide-mirror-settings.h...
by dutchCourage | 2025-05-17 17:25:13+00:00
> Their CEO seems to like trump

As far as I know this is a "rumour" that stems from him mentioning his approval over one of Trump's cabinet pick. Saying he likes Trump is a stretch.

Someone dug deeper into this topic: https://medium.com/@ovenplayer/does-proton-really-support-tr...

TL;DR: probably not a Trump supporter
by dghlsakjg | 2025-05-17 17:25:30+00:00
Can you source this at all?

This sounds like it would check out until you realize that the Concorde operated on only two routes, and not on an ad hoc basis.

This is extremely convenient if you happen to need to get some critical medical supply, which happens to not exist in one of these world capitols, from New York to Paris or London and the timing lines up perfectly with a scheduled Concorde flight. How often do organs go transatlantic anyway? Are there tons of snakebite victims in Paris or London that can only be treated by antivenin stored at JFK?

In any other circumstance, you are almost certainly better off sending a medical jet directly from where the item is to where it needs to go. A business jet going straight from where the donor organ is, to where it needs to go is, in almost any circumstance, going to be faster than waiting for the next scheduled flight going supersonic across the Atlantic, then having to transfer to a completely different subsonic plane for the rest of its journey.
by azaslavsky | 2025-05-17 17:25:34+00:00
Couldn't you just take the advice in [0] of parsing into types rather than validating? Then you get the best of both worlds: your inputs are necessarily checked every time the function is called (they would have to be to create the type in the first place), but you don't need to validate them at every nested layer. You also get the benefit of more descriptive function signatures to describe your interfaces.

[0] https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-va...
by oplorpe | 2025-05-17 17:25:44+00:00
I suppose my point is along these lines.

When gpt3 was trained, its parent company refused to release the weights claiming it was a “clear and present danger to civilization”. Now GPT3 is considered a discardable toy.

So either these things are going toward an inflection point of usefulness or this release too will be, in time, mocked as a discardable toy too.

So why every 3 days do we get massive threads with people fawning over the new fashion like this singular technology that is developing is ackshually finally become the fire stolen from the gods.
by marssaxman | 2025-05-17 17:25:53+00:00
If a human wrote it, I can be fairly sure that the human meant it to do what it is advertised as doing. If I run it through its paces and it seems to work, that gives me some confidence that the person who wrote it understood the problem and solved it competently, which allows me to guess that all the parts of it I haven't tested are also likely to work.

If an LLM wrote it, I know that it is a stream of plausible bullshit generated by a statistical model in response to my prompt, whose function may or may not have anything to do with my intent, because the machine which emitted it lacks any capacity to have intentions or to reason through the consequences of its choices. If I run the code through its paces and the basics seem to work, that tells me absolutely nothing about the rest of it. All I can count on is that the code will appear to be plausible, and I have no way of knowing without careful review whether the assumptions baked into it are sane and fit for purpose.
by Wowfunhappy | 2025-05-17 17:26:15+00:00
So let's say your side project improves your life by 5 happiness points. You have two options:

--- OPTION A - Keep your project private.

• You get five happiness points.

--- OPTION B - Make your project public.

• Other individuals may get a small number of happiness points.

• A megacorp might turn your project into a major product without compensating you and get a million happiness points.

• You get five happiness points.

----------

In either scenario, you still end up with five happiness points. If you release your code, other people may get even more happiness points than you, which isn't really fair. But you are no worse off, and you've increased humanity's total wealth of happiness points.
by doctorpangloss | 2025-05-17 17:26:26+00:00
Why did they defend Horizon though? The Wiki article offers a POV from someone who was functionally powerless:

> We have to be careful, that we are not creating a cottage industry that damages the brand and makes clients like the DWP and the DVLA think twice. The DWP would not have re-awarded the Post Office card account contract, which pays out £18 billion a year, in the last month if they thought for a minute that this computer system was not reliable

I know that's something that someone said, but is it true? So what if a lot of people say that? Nobody knows who or what leads to sales or not sales. If sales were all that mattered, they wouldn't do the IT upgrade at all.

People use shitty software all the time.

> The new Horizon project became the largest non-military IT contract in Europe.

Also... really doubt that is true.

The Horizon IT report's first volume "will focus on redress (compensation) and the human impact of the Horizon scandal." Okay. But why did people feel so strongly about the technology in the first place? Who gives a fuck about bugs?
by toast0 | 2025-05-17 17:26:52+00:00
I think there's value in exploring operating systems and environments. And, it's very useful to note that you don't need to do both at the same time. This strikes me as an unneccessary worry though:

> The main reasons is the difficulty in developing robust low-level systems like file systems, the large number of processors you may want to support, and also creating or porting a huge number of device drivers. At this point Linux for example supports a huge number of devices (of course you could use some sort of compatibility layer).

As a start, you simply don't need to support all of this, and you don't even need to aspire to support it all. Support virtio versions of the relevant hardware class and try to run on reasonable hypervisors. Support one or two physical devices of the relevant hardware class to run on a real machine.

If you can plugin to an existing driver abstraction and pull in external drivers, great. NDIS is one option there.

If your OS is interesting, you can figure our the driver situation, and the cpu architecture situation. It would sure be neat to run on a raspberry pi, but only running on x86 isn't a big limitation.
by bigyabai | 2025-05-17 17:27:43+00:00
> it's very clear that with enough permissions / MCPs, the LLM could do its own thing ~indefinitely.

What exactly is your proof?

I'm not opposed to the idea, but in my experience LLM performance falls through the floor once you run out of input tokens. It seems inevitable that AI will continue writing code until it cannot understand what it's doing anymore.
by lblume | 2025-05-17 17:28:08+00:00
Two counterpoints.

Firstly, in many cases the function needs to serve both purposes — called on a single item or called on a sequence of such. A function that always loops would have to be called on some unitary sequence or iterator which is both unergonomic and might have performance implications.

Second, the caller might have more information than the callee on how to optimize the loop. Consider a function that might be computationally expensive for some inputs while negligible for others — the caller, knowing this information, could choose to parallelize the former inputs while vectorizing etc. the latter (via use of inlining, etc.). This would be very hard or at least complicate things when the callee's responsibility.
by johnisgood | 2025-05-17 17:28:43+00:00
Well, I guess it might boil down to how one "thinks"?

Some people prefer:

2 3 + 4 *

Some other people prefer:

(* 4 (+ 2 3))

And some other people prefer:

(2 + 3) * 4

I personally find the last one easier to read or understand, but I have had my fair share of Common Lisp and Factor. :D

Syntax highlighting is useful for many people, including me. I can read much quicker with it, too. I know of some people who write Common Lisp without syntax highlighting though. :)