MurphyA/hacker-news huggingface dataset:
by secure | 2025-06-01 08:51:31+00:00
Welcome to Linux!

I agree that through the lens of “how much time do you save?”, automating a NixOS installation is not worth it. As you describe, it’s just a few interactive commands in the upstream installer.

But from the perspective of “how much effort is it to spin up a new VM for this new project / task?”, spending the extra few minutes on building the fully automated installation path is well worth it. Also consider the perspective of “how many steps does it take to recover this VM in a disaster scenario?”, where reducing the manual steps to a minimum is very helpful.

BTW, the maintenance of the installer is virtually free: The configuration I show is the configuration I use in NixOS as well, so that needs to be updated anyway. Aside from that, to rebase my installer from NixOS 24.11 to NixOS 25.05, I just changed a number. When setting up a new machine, I can either download the upstream installer and write it to a USB stick, or I can change a number, rebuild (< 2 minutes) and write to a USB stick. Really not much difference.
by chgs | 2025-06-01 08:52:16+00:00
Depends on the age of the building and the locations seeer system. Newer sewers and buildings can cope but older ones can’t.

Then there’s cultural expectations - if you have a country where you have gone decades of your life never flushing you will be expecting a bin even if the pipes don’t need one.

If you are staying in western hotels in major cities you will have a different experience than staying in private homes in villages.
by ozgrakkurt | 2025-06-01 08:53:02+00:00
You only ever need backtrace with line numbers and error kind enum for library code and app code that is no supposed to fail.

For app code that is supposed to fail, you need full custom error setup.

For example in a a http server you want to cleanly convert error to http response and a record on server side for viewing later.

imo zig implements errors in language pefectly
by Fluorescence | 2025-06-01 08:53:12+00:00
Maybe the same can be applied to the human patterns too because this bit made me feel a bit sad:

"mechanised winding system, ending the requirement for somebody to climb the narrow, winding staircase each day to the clock room to do the job by hand"

It feels like something has been lost even if I don't know what. It's not that I want the job but we might be modernising and automating away human purpose in the world. There is something about someone visiting the mechanism daily that feels like it gives it life. An act of observation. There may be some practical sense to it e.g. spotting problems and what you "feel" in the mechanism as you manually wind it.
by RadiozRadioz | 2025-06-01 08:53:29+00:00
These are good general tips applicable to other languages too. I strongly dislike when code returns errors as arbitrary strings rather than classes, as it makes errors extremely difficult to handle; one would presumably want to handle a http 502 diffrernetly to a 404, but if a programmer returns that in a string, I have to do some wonky regex instead of checking the type of error class (or pulling a property from an error class). I've commonly found JS and Go code particularly annoying as they tend to use strings, as the author mentioned.

An additional thing that is useful here would be a stack trace. So even when you catch, wrap & rethrow the error, you'll be able to see exactly where the error came from. The alternative is searching in the code for the string.

For the hate they seem to get, checked exceptions with error classes do give you a lot of stuff for free.
by danabramov | 2025-06-01 08:53:31+00:00
It’s definitely not useless. You’re right that it requires the interpreting layer to be able to handle missing info. The use case at the end of the article is streaming UI. UI, unlike arbitrary data, is actually self-describing — and we have meaningful semantics for incomplete UI (show the closest loading state placeholder). That’s what makes it work, as the article explains in the last section.
by noisy_boy | 2025-06-01 08:57:11+00:00
> the way Gemini and other crap are being shoved right now. The growth happened organically and exponentially, because everyone instantly saw value in those products.

Nobody shoved Gemini to me - chatGPT sucked and I was curious if Sonnet was the best around there for coding stuff and found Gemini to be excellent. As a side note, it also generates excellent question papers - chatGPT is dog shit compared to that.
by ajb | 2025-06-01 08:57:57+00:00
I think the tor folks made a fundamental strategic error by pushing that line. Yes, people who face a serious threat need to use tor browser and still pay attention to other ways to leak etc. But if we'd got 'tor everywhere' it would still make mass surveillance a lot harder. For one thing, today mass surveillance can detect who is using tor. If everyone was using it that wouldn't matter.
by dicytea | 2025-06-01 08:58:05+00:00
> Note that the author used disko to partition the disk declaratively. Disko won't work for a machine with very limited ram, because disko run in the installer, and needs to install tools to the ram to do the partition.

This is only true if you use the disko-install tool, which is a horrible footgun[^1]. The safest approach is to just use the default disko command, then nixos-install.

[^1]: https://github.com/nix-community/disko/issues/947
by hoseyor | 2025-06-01 08:59:34+00:00
So you will be relinquishing your citizenship and won’t run back to the USA when things go sideways over there? I’m not sure if you have the historical or political context, but Europe is staring down a hurricane on the horizon, regardless of the pleasant weather right now.

Europe as you know it, the things you like about it is fundamentally doomed because the system is designed to doom it. The EU that was a bait and switch, is now basically being run by a central committee called the EU Commission. Is fundamentally authoritarian and prone to the same failures as all hubristic central committees of know it alls.

It’s the iron triangle and the EU central committee is not only trying to pick all three while lying about it, they’re also trying to pick things outside of the triangle. It cannot and will not work because it is impossible for any amount of time.

You may enjoy it in Europe/Germany, freeloading on all the “social services” that are “free” (even though you will have surely noticed how that is changing quickly) due to the exploitation of what the indigenous people built over decades and centuries, but that’s really what it is, a fraud, even if you don’t realize it.

For example, you very likely make far beyond what the average person in Germany makes. You are living a nice life, based on what those old ethnically German people you see here and there did to rebuild the country after the war, and now get a mere €1000 per month to live on. That’s why you have “free and safe and efficient public transportation” and “free education” because they were exploited all their lives.

It is not a personal thing, it’s an issue with immigration in general as immigration is inherently freeloading when it is into a country that is more advanced or better. At the very least immigration to better countries should come with massive freeloader taxes, and immigration to worse countries should come with low-tax incentives. Just keep it in mind as you benefit from what you enjoy but did not contribute to, and quite likely also support politics of imposition from your island of exclusivity; the same politics that destroyed America.

You may not realize it, but the very same things and people that destroyed the rather nice America of the past are also now destroying Europe. You’re just riding the wave at the moment and get to enjoy the tail end of the oasis. I know this because, as unlikely and weird as it sounds, I know the people whose fathers and grandfathers, their families destroyed America and who are destroying Europe today.
by pydry | 2025-06-01 09:02:10+00:00
It began with a false flag terrorist attack on civilians in Maidan square which was used to usurp a democratically elected president who was extremely popular in the east and south.

Nobody has ever been jailed for this terrorist attack and all the evidence points to Ukrainian fascists being culpable, including:

* The Berkut who were there being tried and the trial falling through because all of them were too obviously very far away from the protestor-controlled hotel where the snipers nest was set up.

* A Ukrainian war hero who had no reason to lie who was there telling people who was responsible (before being thrown in jail).

* A group of the snipers (mercenaries who were there who never got paid) went public.

It was as much a proxy war back then, it was just fought under the surface with NGO agitators instead of weapons deliveries.
by gonzus | 2025-06-01 09:03:18+00:00
Nice work. Some questions / observations:

Can you add methods to any type? There is an example of adding a method to a builtin type (string) -- can you add also add a method to a union type?

Any plans to add some sort of enum type? If yes, will it be possible to add methods to enums?

How do you support (or intend to support) Unicode? It says "Strings use ASCII encoding" -- why not UTF8?

The example with a timeout channel does not show how / when the timeout will be triggered. Is this a special kind of channel?

It says "Packages will be synchronized to the $HOME/.nature/package directory" -- will this respect the XDG standard directory structure, which defaults to $HOME/{.cache,.local,.config}?
by throwaway314155 | 2025-06-01 09:03:28+00:00
I think this misses just one important nuance - cheating is often done out of desperation and it might bee important to try to understand that desperation before deciding on the degree of punishment. For instance, if the student is dealing with a recent diagnosis of e.g. depression or adhd. You really can't know the extent of anguish some might go through before deciding they "have to" cheat in order to hopefully have some semblance of normalcy in their future career.

Obviously cheating is unacceptable, but empathy can really help the student in this situation.
by throwingrocks | 2025-06-01 09:05:01+00:00
> IMO if one has to work this hard to sell/explain a tech there's 2 possibilities 1/ there is no real need of tech 2/ it's a flawed abstraction

There’s of course a third option: the solution justifies the complexity. Some problems are hard to solve, and the solutions require new intuition.

It’s easy to say that, but it’s also easy to say it should be easier to understand.

I’m waiting to see how this plays out.
by zubspace | 2025-06-01 09:05:54+00:00
I know this behavior all to well. I definitely think that this can be used to your advantage: You learn alot in the struggle and get a deep understanding of the problem.

But you really need to step back once in a while and contemplate, if the thing you're doing is really worthwhile.

One of the most precious resources is time. I didn't appreciate this insight a lot while I was young. But as I grew older I needed to be more careful how you I was spending it. In this regard like I like the saying "youth is wasted on the young". But this also enables you to be more focused in your approach. Fail fast is a lot better than spending years on a problem with bo end in sight
by Erazal | 2025-06-01 09:06:38+00:00
also check out Meeting BaaS (meeting bots as a service), we're an open-source competitor.

We thought long and hard of creating an SDK but did not go that route for now. Our main problem is that if you have to support Windows machines you're putting the finger into something really complicated.

And then depend on the end user's specs, etc.

So I'm really curious, in your case are you planning on deploying to Apple machines (m1+)? Or also set it up on Windows machines?
by saagarjha | 2025-06-01 09:08:48+00:00
I don't want to dismiss this outright but I'm skimming this paper and pretty skeptical of something that's from a single guy that doesn't appear peer reviewed, spends most of its time talking about actual biology, comes up with a "RELU6" (RELU but minimum value 6), and then pushes detailed review to a future paper.
by kokada | 2025-06-01 09:12:16+00:00
I am not sure if I consider the VM approach necessary worse than a syscall translation, especially considering that both Android and Linux are moving targets. It is different from creating an emulator for a console, that you can assume that the hardware/software will never change (or at least for modern consoles, it will never change for a specific version of game).

Also VMs can be really fast thanks to virtualization instructions and para virtualization techniques.
by MangoToupe | 2025-06-01 09:13:42+00:00
I definitely don't want my traffic light controller to be written using manual memory management if this is at all possible to avoid. Waiting another millisecond for the light to turn green feels like an acceptable cost. But this seems silly: how on earth did you write such a simple program to have so many allocations that the gc significantly impacts performance? Why would a traffic controller need variable memory in the first place? Surely it's just a mix of a state machine (statically allocatable) and I/O.

"Determinism" feels like a very odd pitch for manual memory management when the latter in no way implies the former, and lack of manual memory management in no way implies non-determinism. Generally, any dynamic allocation is non-deterministic. Furthermore, in the HFT context the non-determinism of the network is going to absolutely dwarf any impacts GC has, especially if you have ever heard of arena allocation. Even your OS's scheduler will have larger impacts if you make any efforts to avoid memory churn.

Now, an interrupt handler should never allocate memory and should generally run with a constant number of cycles. But that's an extremely niche interest, and you'd probably want to hand-code those instructions regardless.

(FYI, I work in a support role to a HFT product, among many others, but it runs on the JVM)
by austin-cheney | 2025-06-01 09:14:00+00:00
People do this because on one hand they want something better but on the other hand are limited to zones of comfort, as in familiar patterns. There is a psychological measure for this called uncertainty avoidance.

As for myself I have learned to avoid certain things that only induce complexity and as result feel confident I can build almost anything in JavaScript/TypeScript. Here are my zones of avoidance.

* DOM abstraction. Working with the DOM is stupid simple, so don’t use unnecessary abstractions to make it something it isn’t. Sometimes I do find the DOM is missing important features so I will extend the DOMs API with original methods, such as getNodesByType.

* No OOP. I avoid classes and inheritance as entirely unnecessary. Functions and objects are all I need for architecture.

* Know your platform. In the browser it’s the DOM and Web APIs. In Node it’s their direct module APIs. Get comfortable working as close to the platform as possible. It’s less to troubleshoot later.

* Avoid unnecessary string parsing. This includes things like querySelectors, innerHTML, and a lot of insanity from framework template systems. This is by far one of the two biggest performance boosts.

* Preference WebSockets over HTTP. This also dramatically boosts performance and significantly reduces application complexity.
by geon | 2025-06-01 09:14:17+00:00
Sad to see ”mens rights” lumped in with misogyny and fascism.

While women in general face much worse hardships, there are several social issues that predominantly affect men. I that feel this lumping-together is part of the problem. It stigmatizes even talking about the problems men face, and contributes to the toxic masculinity that is the foundation of the ”manosphere”.
DevEco Testing: Official Automation Testing Tool for HarmonyOS Applications
by moyantianwang | 2025-06-01 09:14:25+00:00
# DevEco Testing: Official Automation Testing Tool for HarmonyOS Applications

&#x20;

> These notes provide a high-level overview and may contain inaccuracies. For detailed information, please refer to the official documentation.

## 1. Test Framework Architecture

DevEco Testing is built on the JUnit5 extension mechanism and adopts a layered testing strategy:

1. Unit Testing Layer: Covers business logic components (Service/Manager)

2. Component Testing Layer: Validates Ability/Extension functionalities

3. System Testing Layer: Verifies multi-device collaborative scenarios

Core capabilities include:

* ArkTS Test Engine: Supports asynchronous task validation

* Device Shadow Mode: Simulates multi-device collaborative environments

* Data Sandbox: Isolates test data from production environments

## 2. Unit Testing Implementation

### 1. Test Case Specifications

``` typescript ```

``` // Example: Asynchronous Task Validation @Test async function testAsyncTask() { const result = await DataService.fetchData(); assertEquals(result.code, 200); assertTrue(Array.isArray(result.data)); } ```

### 2. Mock Service Configuration

Dependency isolation using @Mock annotations:

``` typescript ```

``` // Mock network service @Mock class NetworkService { @InjectMock async fetchData(): Promise<Data> { return { code: 200, data: mockData }; } } ```

### 3. Test Coverage

Line-level coverage reporting:

``` markdown ```

``` ------------------------- Test Coverage Report ------------------------- Module | Line Coverage | Branch Coverage ----------------------------------------------- CoreService | 82% | 75% UIComponent | 91% | 88% NetworkModule | 67% | 63% ```

## 3. UI Automation Testing

### 1. Component Localization Strategies

| Strategy | Use Case | Example Code | | :---------- | :----------------------- | :-------------------------------------------- | | resource-id | Stable element ID | component.findComponentById('btn_submit') | | text | Dynamic content matching | component.findComponentsByText('Submit') | | xpath | Complex hierarchy | component.findByXPath('//[@text="Confirm"]') |

### 2. Gesture Simulation

``` typescript ```

``` // Swipe Operation Example test('Swipe Test', async () => { await gesture.swipe({ startX: 500, startY: 1500, endX: 500, endY: 500, duration: 800 }); await expect(component).toHaveText('New Content'); }); ```

### 3. Exception Scenarios

Network fluctuation simulation: device.simulateNetwork('3G')

* Memory pressure testing: device.fillMemory(80%)

* Low battery testing: device.setBatteryLevel(15%)

## 4. CI/CD Integration

### 1. Pipeline Configuration

``` yaml ```

``` # devops-ci.yaml stages: - name: unit-test script: - npm run build - npm run test:unit -- --coverage

- name: ui-test device: type: emulator config: phone_2k script: - npm run test:ui -- --headless

```

### 2. Test Reporting

Output formats:

``` bash ```

``` test-results/ ├── junit.xml # CI system integration └── report.html # Visual analysis report ```

##
by pansa2 | 2025-06-01 09:15:03+00:00
Is it common in Julia to use multiple-dispatch on 3 or more arguments, or just double-dispatch?

Julia definitely made the right choice to implement operators in terms of double-dispatch - it’s straightforward to know what happens when you write `a + b`. Whereas in Python, the addition is turned into a complex set of rules to determine whether to call `a.__add__(b)` or `b.__radd__(a)` - and it can still get it wrong in some fairly simple cases, e.g. when `type(a)` and `type(b)` are sibling classes.

I wonder whether Python would have been better off implementing double-dispatch natively (especially for operators) - could it get most of the elegance of Julia without the complexity of full multiple-dispatch?
by esperent | 2025-06-01 09:15:32+00:00
> Blender Cy- cles with 4,096 samples per pixel (matching RenderFormer’s training

This seems like an unfair comparison. It would be a lot more useful to know how long it would take Blender to also reach a 0.9526 Structural Similarity Index Measure to the training data. My guess is that with the de-noiser turned on, something like 128 samples would be enough, or maybe even less on some images. At that point on an A100 GPU Blender would be close, if not beating the times here for these scenes.
by inglor | 2025-06-01 09:15:39+00:00
I am not sure the wheel can be rediscovered many more times but definitely check out Kris's work from around 2010-2012 around q-connection and streaming/rpc of chunks of data. Promises themselves have roots in this and there are better formats for this.

Check our mark miller's E stuff and thesis - this stuff goes all the way back to the 80s.
by rdmuser | 2025-06-01 09:15:51+00:00
Sadly late 2021 the original dev passed away. Someone has taken over stewardship of the project but it is currently moving slowly and they are seeking more contributors (javascript skills are a plus).

He was a bit of a hn user and seemed good natured and pleasant. Though I didn't know him I was sad to hear he'd passed both as a Redirector user and a fan of good people doing good things. I know he'd mentioned being happy to get recognition on here. https://news.ycombinator.com/user?id=einaregilsson

I really enjoyed the original devs write up on creating an easter egg specifically targeting Mark Hamills avatar in game. https://einaregilsson.com/an-easter-egg-for-one-user-luke-sk... https://news.ycombinator.com/item?id=30715746
by ChrisMarshallNY | 2025-06-01 09:17:06+00:00
Nothing, really, but I don’t have the bandwidth to write JSAX. I wonder why it hasn’t already been done by someone more qualified than I am. I suspect that I’d find out, if I started doing it.

You can do that, in a specialized manner, with PHP, and Streaming JSON Parser[0]. I use that, in one of my server projects[1]. It claims to be JSON SAX, but I haven’t really done an objective comparison, and it specializes for file types. It works for my purposes.

[0] https://github.com/salsify/jsonstreamingparser

[1] https://github.com/LittleGreenViper/LGV_TZ_Lookup/blob/main/...
by protocolture | 2025-06-01 09:17:07+00:00
Georgism always struck me as a method to shift homelessness onto the elderly and enrich removalists.

The absolute ideal method of retirement is home ownership. Its cheap and desirable for the home owner, and it requires the least services provided by the state until things seriously deteriorate. I once met a woman who was being forced out of her home. She bought it when it was behind a naval shipyard covered in rusted warships. The city bought the land off the military, turned it into a lovely park and opened views from her front windows directly to the water. This caused her land valued rates to increase (she said her property had reached 200 times what she paid for it. 30,000 to 6 million. But she also owed quite a decade of rates to the council and wasn't sure what she would have left over) to well beyond what she could afford, and ultimately with only pension for income it became untenable.

I really don't mind development, coming to the old lady and offering her a big payday for her to leave that she takes willingly, replacing her inner city house with higher density. But Land value as a mechanism to forcibly move on the elderly and hand their inner city character homes over to richer people who don't increase housing density is completely ass backwards.

You get stuck in a cycle of paying taxes -> improving services -> improved services increase land value -> increased land value increases taxes. Its absurd. It honestly becomes an optimal strategy to elect local officials who ruin the neighborhood and decrease value.