MurphyA/hacker-news huggingface dataset:
by shakna | 2025-05-07 08:22:08+00:00
It doesn't allow those operations to occur at the same time. If you can't meet compile time guarantees, then it does not compile.

Pointers aren't the same as in C. A pointer has an explicity type, not just a size. A pointer cannot change where it is located, whilst in scope anywhere else.

If you then make your pointer local, then it will get cloned. As there's no concept of a void pointer, every type supports cloning, and so your thread-local variable will have nothing to do with the parent any longer.

So if you try to grab a local reference, to something in another thread, you'll get a copy, or a compile time error if you don't copy it.

If you try to modify something you're looping over, it won't compile at all.

However, in all of this, there's no extra syntax. The compiler can deal with what is permitted. The programmer can just write.

This is multithreaded (by compiler switch):

module example610a; type Vector = array * of integer; var i, n: integer; a: Vector; begin a := new Vector(n); for i := 0 to len(a) - 1 do write("a[",i:2,"]: "); read(a[i]) end; writeln; for i := 0 to len(a) - 1 do write(a[i]:3); end; writeln; end example610a.
by dinkblam | 2025-05-07 08:22:10+00:00
very nice but:

1.) a "long" story is still only like 20 sentences 2.) a real translation for each sentence is nice but often you are still left wondering what each word means. a "word by word" literal translation would be more useful either as an option or additionally. or the ability to click on any word and see the translation (bonus points for the declinations / conjugations too)
by roenxi | 2025-05-07 08:23:31+00:00
And with the benefit of more context it is pretty clear he wasn't admitting to anything - the interview started with him condemning terrorism and the quotes in question was more him pointing out [0] that everyone has been funding terrorist groups in his part of the world and he thinks Pakistan has suffered for it.

Pakistan might be involved in this one, they might not be. I don't know. But that clip isn't evidence either way. He's quite insistent that Pakistan wasn't involved in the topical attacks. And indeed that the attacks may not have happened at all. He can't be admitting responsibility to something that he doesn't believe has happened done by groups he claims don't exist.

[0] Add some allowance for English apparently not being his native language - he was reiterating points from earlier in the interview.
by jajko | 2025-05-07 08:23:52+00:00
But its far from bottom of how much general russian population is willing to suffer before next bloody revolution happens. I don't talk about wealthy educated people from moscow or st petersburg (at least those that didn't leave), they are on purpose less targeted by whats happening, but rather permanently subjugated populations from poor regions whose lives changed comparatively little compared to cold war.

Prigozhin had a last real chance, you could see how much common folks and most of army immediately aligned with them. But when they took hostages whole families of his mercenary group leaders, they backed down with predictable results. Interestingly not all aligned generals were executed, I expected bigger purge. Maybe he would be much worse though.
by simonask | 2025-05-07 08:24:21+00:00
I think there's a bit of mismanaged expectations, combined with a community that, while generally helpful, suffers from a bit of fatigue from constantly dispelling myths and falsehoods about the language, often presented in bad faith.

My favorite is when Rust gets dragged into weird American "culture wars" - somehow, it's a "woke" language? (And somehow, that's a problem?)

But yeah, the language docs are pretty up front about the fact that the borrow checker sometimes rejects code that is provably fine, so it's a weird criticism. The nontrivial breakthrough was that Rust proved that a huge amount of nontrivial code can be written within the restrictions of the borrow checker, eliminating swaths of risk factors without a resource penalty.
by saagarjha | 2025-05-07 08:26:35+00:00
I don't know if you have looked at LLDB but when it evaluates (non-trivial) expressions it does actually compile and link code into the inferior's address space. One of the major selling points when it came out was that you could write "real code compiled by a a real compiler (LLVM)" rather than whatever ad-hoc thing that GDB knows how to do. In theory this gave better support out of the box for things that can't be represented with pointer dereferences or whatever most debuggers support for their data visualization. The downside is that LLDB is extremely slow, and it still fails a lot when dealing with templated types because it will claim (whether honestly or not) that the specialization it wants is not present. And it doesn't look at your source code to generate a new one, which would be an excellent showcase of the LLVM stack, but I guess a bridge too far for a debugger :/

For your thing: I think you can get pretty far with what you're doing, but I do want to point out that just the standard types will probably work for Rust but in C++ ever nontrivial project has their own standard library. Most also hide their data behind a void *impl or whatever so no debugger knows how to deal with it out of the box. I don't expect you to parse the codebase for operator[] or whatever but I think you'd ideally want a simple DSL for building pretty printers, with maybe memory reads and conditionals, plus some access to debug info (e.g. casts and offsetof). I don't think that would be too awful for complexity or performance.
by 59nadir | 2025-05-07 08:27:06+00:00
I'm sorry, how is this a "senior engineer"? Is this a "they worked in the industry for 6 years and are now senior" type situation or are they an actual senior engineer? Because it seems like they're lacking the basics to work on what you yourself seem to consider senior engineer problems for your project.

Also, what is your history and position in the company? It seems odd that you'd get completely ignored by this supposed senior engineer (something that usually happens more often with overconfident juniors) if you have meaningful experience in the field and domain.
by ArthurStacks | 2025-05-07 08:27:50+00:00
I have no idea why you think you can't test a distributed system. Hopefully you are not in the business of software development. You certainly wouldnt be working at my company.

Secondly, people are not just blindly having AI write code with no idea how it works. The AI is acting as a senior consultant helping the developer to design and build the systems and generating parts of the code as they work together.
by xandrius | 2025-05-07 08:28:14+00:00
The beauty of docker is that it is a reflection of how much someone cares about deployments: do you care about being efficient? You can use `scratch` or `X-alpine`. Do you simply not care and just want things to work? Always go for `ubuntu` and you're good to go!

You can have a full and extensive api backend in golang, having a total image size of 5-6MB.
by JumpCrisscross | 2025-05-07 08:28:18+00:00
> based on potential future events, you've come to this conclusion

No. I'm saying by the goals he set out before the war, he has failed.

> You saw his interview on Croatia TV recently? His statements refute your position

Putin is sort of like Trump in that he messages multiple messages. We cannot know what is in his mind. But Putin has repeatedly made revanchist nonsense statements about Russia's sphere of influence and imperial downfall. He's also said that's not what Russia wants. But that's (a) recent and (b) unsubstantiated by the facts ont the ground.
by nmstoker | 2025-05-07 08:28:19+00:00
It means if you add a tip there's a higher probability of them screwing up the delivery, either not finding my flat (apartment) at all or being severely delayed because they sent someone who cannot read the simple English directions. If you do not add a tip then this tends not to happen. It's the inverse of what you'd expec. It may be some side-effect of Deliveroo asking for the tip in advance - one theory is that the delivery agent thinks I'll give a cash in hand tip and therefore tries harder; or it could be something more obscure, eg perhaps the illiterate delivery agents (of which there are many in London now) generally work faster but cope less well with any modest complexity and they are being rewarded by an algorithm that does not take that into account.
by FirmwareBurner | 2025-05-07 08:28:20+00:00
>Refresh rate only really makes a case for performance in games

Refresh rate really matters for everything in motion, not just games, that's why I said scrolling.

> In everyday tasks, like scrolling, it's more about aesthetics and comfort.

Smooth scrolling IS everyday comfort. Try going from 120Hz to 60Hz and see how you feel.

>their scrolling on 60Hz looks better than scrolling on Android at 60Hz.

Apple beat physics?
by prmoustache | 2025-05-07 08:28:41+00:00
I never understood why these delivery services are popular.

Yes people are lazy. But lazy to the point of paying an additionnal fee to be waiting twice the time it gets to fetch the same food yourself and receive dishes that are cold instead of hot? What is the incentive really? If only those delivery services would use devices that keep food warm and deliver from somewhere far from home, I would maybe understand, but they aren't even available in a wider than a small radius around your house, so it is always more convenient to walk/cycle/drive to wherever you would order that food anyway.

The only ones that do it relatively well are pizza joints and they usually have their own delivery service so you don't even have to use these apps.
by globalnode | 2025-05-07 08:30:20+00:00
My admittedly uninformed impression of Rust is that its a lot like Go (in spirit?), a language invented to shepherd novice programmers into not making mistakes with resource usage.

I imagine faceless shameless mega-corps with thousands of Rust/Go peons coding away on the latest soulless business apps. Designed to funnel the ignorant masses down corridors of dark pattern click bait and confusing UX.

Having exposed my biases, happy to be proven wrong. Why are game studios still using C++? Because that's the language game programmers know and feel comfortable with? Or some other reason?

Embedded is still C, games are C++, scientific and data are Python and R (I'm talking in general here). What is the niche for Rust?
by izacus | 2025-05-07 08:30:20+00:00
> Table saws do not seem to have reduced the demand for good carpenters. Demand is driven by a larger business cycle and comes and goes with the overall housing market.

They absolutely did. Moreover, they tanked the ability for good carpenters to do work because the market is flooded with cheap products which drives prices down. This has happened across multiple industries resulting in enshittification of products in general.
by Arnavion | 2025-05-07 08:30:22+00:00
The allocator we wrote for $dayjob is essentially a buffer pool with a configurable number of "tiers" of buffers. "Static tiers" have N pre-allocated buffers of S bytes each, where N and S are provided by configuration for each tier. The "dynamic" tier malloc's on demand and can provide up to S bytes; it tracks how many bytes it has currently allocated.

Requests are matched against the smallest tier that can satisfy them (static tiers before dynamic). If no tier can satisfy it (static tiers are too small or empty, dynamic tier's "remaining" count is too low), then that's an allocation failure and handled by the caller accordingly. Eg if the request was for the initial buffer for accepting a client connection, the client is disconnected.

When a buffer is returned to the allocator it's matched up to the tier it came from - if it came from a static tier it's placed back in that tier's list, if it came from the dynamic tier it's free()d and the tier's used counter is decremented.

Buffers have a simple API similar to the bytes crate - "owned buffers" allow &mut access, "shared buffers" provide only & access and cloning them just increments a refcount, owned buffers can be split into smaller owned buffers or frozen into shared buffers, etc.

The allocator also has an API to query its usage as an aggregate percentage, which can be used to do things like proactively perform backpressure on new connections (reject them and let them retry later or connect to a different server) when the pool is above a threshold while continuing to service existing connections without a threshold.

The allocator can also be configured to allocate using `mmap(tempfile)` instead of malloc, because some parts of the server store small, infrequently-used data, so they can take the hit of storing their data "on disk", ie paged out of RAM, to leave RAM available for everything else. (We can't rely on the presence of a swapfile so there's no guarantee that regular memory will be able to be paged out.)

As for crates.io, there is no option. We need local allocators because different parts of the server use different instances of the above allocator with different tier configs. Stable Rust only supports replacing GlobalAlloc; everything to do with local allocators is unstable, and we don't intend to switch to nightly just for this. Also FWIW our allocator has both a sync and async API for allocation (some of the allocator instances are expected to run at capacity most of the time, so async allocation with a timeout provides some slack and backpressure as opposed to rejecting requests synchronously and causing churn), so it won't completely line up with std::alloc::Allocator even if/when that does get stabilized. (But the async allocation is used in a localized part of the server so we might consider having both an Allocator impl and the async direct API.)

And so because we need local allocators, we had to write our own replacements of Vec, Queue, Box, Arc, etc because the API for using custom A with them is also unstable.
by Nuzzerino | 2025-05-07 08:30:52+00:00
Fixed the last line for them: “Please be ethical. Also, gaslight your users if they are lonely. Also, to the rest of the world: trust us to be the highest arbiter of ethics in the AI world.”

All kidding aside, with that many tokens, you introduce more flaws and attack surface. I’m not sure why they think that will work out.
by m000 | 2025-05-07 08:32:37+00:00
What are the politics behind this? It is kind of unexpected to see this happen under Trump.

Had this been in plans for years and the administration just failed to take notice and stop it? Is this the FTC trying to undermine Trump?

Maybe it is Trump's friends using the FTC against their competitors? Or, maybe using the FTC to set precedent that will insulate their business?
by subsection1h | 2025-05-07 08:33:00+00:00
My favorite static site generator is Org mode[1] for Emacs. Org files are written using a feature-rich lightweight markup language[2] that is much more powerful than Markdown (e.g., plain text spreadsheets). Org files can be exported to HTML[3].

The reason I prefer Org for static site generation is not because I already use Emacs. I actually started using Emacs about 20 years ago specifically to use Org mode.

[1] https://orgmode.org/

[2] https://orgmode.org/features.html

[3] https://orgmode.org/manual/HTML-Export.html
by auggierose | 2025-05-07 08:33:06+00:00
I fully agree. Platonism isn't a hack, it is the only philosophy of math that makes sense to me. Something is either true, or it isn't. There is no third case. This is because mathematical objects are real, not just something our minds make up. To quote Arnold: Mathematics is the part of physics where experiments are cheap.

That said, I don't have a problem with intuitionistic logic, but I think about it as a platonist, for example via Kripke models. I also don't have a problem thinking about it in terms of a certain restricted class of proofs, that people call constructive proofs.
by aa-jv | 2025-05-07 08:33:25+00:00
>No. I'm saying by the goals he set out before the war, he has failed.

Fine, but what were those goals, where/when did he set them out and what is the current status? I'd like to study this issue myself - so any sources you can provide?

>We cannot know what is in his mind.

Yet you claim to know, which is why I'm interested - if you don't believe his words, what basis do you have to make the assertion that you know his real intentions?

As far as I can tell (and I am merely hours away from the Ukraine border), the land he has occupied is precisely what he set out to achieve, and it doesn't look like that is about to change any time soon.

So please, share your references. I'd quite like to understand how you can make such conclusions with such certainty, while doubting the words of the very individual responsible for it. I remain unconvinced you've observed any of his recent public statements with regards to Russia's position with Europe.
by jajko | 2025-05-07 08:36:06+00:00
You mean his PR which is pretty pathetic but I presume its fine with... say less educated folks downing bottles of vodka like there is no tomorrow for whom its intended?

Bunch of lies, massive ego masturbation, constant feeling of being hurt by various external enemies (thats sort of russian trademark), a massive inferiority complex while expressing grandeur and superiority above others completely ignoring the fact russia as a nation, culture, philosophy, system etc. is the most hated one globally.

They view even rest of slavic megatribe as subhumans variously not worthy of independence, freedom, self-determination. Just look at their actions, his talk or his lapdog peskov' doesn't matter. The important thing you seem to miss to look primarily on actions, not some empty PR for simpler folks. Dude, I've been enslaved by russian/soviet military forces most of my childhood, I know very well what they bring to any society and how they shape it to their liking.

Just a typical sociopathic dictator out of touch with reality, nothing special there. The fact he is smart and put few sentences together doesn't matter at all, he is a vicious mass murderer completely out of touch with reality internally and externally, and a horrible manager of russia, damaging it severely and destroying any respect that nation and culture ever had. This started well before covid but that period cut him off completely.
by plst | 2025-05-07 08:36:34+00:00
> Geez, you're really tilting at windmills here. What makes you think if you had your choice of 100 different security products (as is the ecosystem on Windows and Mac) that you'd be any more secure than "just" relying on Apple's security team (which is surely world-class)?

Why shouldn't I have a choice? I could then depend on more than just Apple's security team.

> Remember that Windows exploits abound, despite the antiviral/antirootkit ecosystem that grew up around it.

Many exploits for iOS and Android, too. Seems that locking down the phone doesnt't help with that... (different security model for apps/userland does, but that's unrelated to my point)

> I have an OS for you: Linux, BSD, maybe Solaris or something exotic.

No, I want what works on phones now, with more user control.
by alganet | 2025-05-07 08:36:37+00:00
You lack attention. It matters for comfort in everything. It matters for performance on games much more. Most users don't even know about refresh rate, they just know their iPhones feels good.

They don't let you scroll as fast as Android does, which makes the flickering disorienting sensation of speed scrolling in a low refresh rate less prominent. It optimizes for comfort given the hardware they opted to use.

Android lets you scroll faster, and it does not adjust the scrolling dynamics according to the refresh rate setting. It's optimized for the high end models with 120Hz or more, so it sucks on low end settings or phones.

Some people take years to understand those things. It requires attention.
by anovikov | 2025-05-07 08:37:14+00:00
It's obvious that they can work. But they are also a lot more expensive to use, by definition single-use, and also uncover the position of their controllers too obviously especially if they launch many drones from one position which they always do. And worst thing - they consume so much of the precious load capacity uselessly. This is a head-on, dumb ass solution. But, Ukrainians don't rely on it nearly as much as Russians do.
by sunrunner | 2025-05-07 08:37:38+00:00
It's not a fair comparison on my part but before reading through the docs some of the initial wording around Deno compile seemed to imply (or I inferred) that a platform native executable would be produced from the process. Wishful thinking on my part I guess.

Other languages like Golang making it relatively easy to build _native_ programs and to cross-compile them makes it a solid choice CLI tools, and I was genuinely hoping that more tooling like that was coming to other ecosystems. Perhaps naive to expect a shift like that for a language that's always been interpreted, but I like when I can run developer tools as native programs instead of ending up with various versions of a runtime installed (npx doesn't _solve_ this problem, merely works around it).
by austinjp | 2025-05-07 08:37:49+00:00
Some detail about the intervention:

Diet:

A whole foods minimally-processed plant-based (vegan) diet, high in complex carbohydrates (predominantly fruits, vegetables, whole grains, legumes, soy products, seeds and nuts) and especially low in harmful fats, sweeteners and refined carbohydrates. It was approximately 14-18% of calories as total fat, 16-18% protein, and 63-68% mostly complex carbohydrates. Calories were unrestricted.

Supplements (explanations in the article):

Omega-3 fatty acids with Curcumin (1680 mg omega-3 & 800 mg Curcumin, Nordic Naturals ProOmega CRP, 4 capsules/day). Multivitamin and Minerals (Solgar VM-75 without iron, 1 tablet/day). Coenzyme Q10 (200 mg, Nordic Naturals, 2 soft gels/day). Vitamin C (1 gram, Solgar, 1 tablet/day). Vitamin B12 (500 mcg, Solgar, 1 tablet/day). Magnesium L-Threonate (Mg) (144 mg, Magtein, 2 tablets/day). Hericium erinaceus (Lion’s Mane, Stamets Host Defense, 2 grams/day). Super Bifido Plus Probiotic (Flora, 1 tablet/day).

Exercise:

Aerobic (e.g., walking) at least 30 minutes/day and mild strength training exercises at least three times per week from an exercise physiologist in person or with virtual sessions.

Stress management:

Meditation, gentle yoga-based poses, stretching, progressive relaxation, breathing exercises, and imagery for a total of one hour per day, supervised by a certified stress management specialist. The purpose of each technique was to increase the patient’s sense of relaxation, concentration, and awareness. They were also given access to online meditations. Patients had the option of using flashing-light glasses at a theta frequency of 7.83 Hz plus soothing music as an aid to meditation and insomnia. They were also encouraged to get adequate sleep.

Group support:

Participants and their spouses/study partners participated in a support group one hour/session, three days/week, supervised by a licensed mental health professional in a supportive, safe environment to increase emotional support and community as well as communication skills and strategies for maintaining adherence to the program.
by freehorse | 2025-05-07 08:38:20+00:00
I was a bit skeptical, so I asked the model through the claude.ai interface "who is the president of the United States" and its answer style is almost identical to the prompt linked

https://claude.ai/share/ea4aa490-e29e-45a1-b157-9acf56eb7f8a

Meanwhile, I also asked the same to sonnet 3.7 through an API-based interface 5 times, and every time it hallucinated that Kamala Harris is the president (as it should not "know" the answer to this).

It is a bit weird because this is very different and larger prompt that the ones they provide [0], though they do say that the prompts are getting updated. In any case, this has nothing to do with the API that I assume many people here use.

[0] https://docs.anthropic.com/en/release-notes/system-prompts