skysight-inc/HackerNews huggingface dataset:
I very much like the idea of Java. A runtime for everything! Wow!

But it feels like the coolest aspects of this idea have been
realized more by .NET than by Java itself. Powershell, for instance, is so cool (in theory) because it lets you dynamically mess around with and script statically compiled components. This could (in practice it's not, since I haven't found good tooling) be so great for debugging.
> ve consistently seen that the younger someone got on the internet the healthier their relationship with it is

I fully believe that, for the previous generation's internet.
Being a "great thinker" doesn't insulate someone from being wrong.

Thinking otherwise is mere idolatry and adulation, something people usually grow out of.
Of course, especially if you want your code to compile within reasonable time.
Add class and for aliases for className and htmlFor
But they're not exactly cheap commodity items like USB cables.
My kid does not have a phone yet but he is still young.

I talk with parents of kids a bit older like 10 and it is very hard to keep these limits when most of their colleagues don't have these limits.

I agree with you that what we do now is that we are trying to educate other parents about this. But it is hard and the years are passing.

I think access to mobile phones for kids is a big problem and indeed there is no simple solution.

I don't say we should do what the article is describing but I empathise with the parents that want a total ban of mobile phones for kids. It is simpler to enforce and explain this rule than explain everyday why my colleague has access why don't I? And try to explain that without also expressing a judgement on those kids or their families.

So here is a situation: the kids that have access to mobile phones and games at home goes to kindergarten and they play there only with other kids that know those games. They talk about levels and characters from those games. They don't have mobile phones at kindergarten but the fact they use it at home already creates two groups of children: those with access to mobile phones and those without access. And this is kindergarten/pre-school (4-5 years old)
I don’t consider template-metaprogramming as official core language feature, is is an side-effect of templates. Generic-Programming itself with templates is great and the superpower of C++.

Readability and maintainability are the key features of good source-code. Therefore - I back off if someone tries to make the code itself “art”. The result shall be reliable craftsmanship. A usual, apply reasonable exceptions ;)
Lol no. Not by a very wide margin. You’d have to have never lived long term anywhere but America or say the G7 to believe that.
Because of the power dynamics involved (and the power bestowed upon cops), it's a common belief that police unions work in a very different way than most labor unions.
I've become somewhat convinced that no one has written a correct nontrivial C or C++ program since 1989.* My go-to example in C++ is examining a floating-point number as an integer:

• Cast a (pointer to a float) to a (pointer to a uint32_t). No; even if you make sure the size of a float on your target platform is 32 bits, this is undefined behavior.

• Make a union of a float and uint32_t. No; this works in C (since C99...?), but in C++ "it is undefined behavior to read from the member of the union that wasn't most recently written." [1]

• Use reinterpret_cast<uint32_t>. No; this violates the type aliasing rules, and the behavior is undefined. [2]

• Use reinterpret_cast<unsigned char> or reinterpret_cast<std::byte> and then reassemble these into a uint32_t. Yes! this works, although slightly laborious.

• Use std::memcpy. Yes! This is perhaps the "right" answer. The compiler should recognize the idiom and elide any actual copy.

I'm not even confident that I have that correct. It's an enormous language to fit into one's head; the language specification runs about 500 pages long and the standard library another 1500. [3]

[1] https://en.cppreference.com/w/cpp/language/union
[2] https://en.cppreference.com/w/cpp/language/reinterpret_cast
[3] https://github.com/cplusplus/draft/releases/tag/n4917

*This is a joke, but only barely so.
I hope Wikipedia suffers similar fate as well given that they had failed in addressing the Poland Holocaust distortions.
In a trait-like system (including Java interface), there can be only one implementation of a trait for a type. That's why it is global, unlike ML module-like systems. Global is another word for anti-modular.

For example, in the real world, there are multiple ways to order strings (called collation), but since there can be only one implementation of (String, Ord) type-trait pair, one ordering is canonical. That may be bearable, but having canonical (String, Hash) implementation is not. What if you want to use (say) faster CityHash instead of canonical MurmurHash? So Rust resorts to things like BuildHasher, to get back multiple implementations.

Because it is global/anti-modular, it interferes with separate compilation, and it is one of reasons why Rust is slow to compile.

Then why would one use trait instead of module? Since there can be multiple implementations in module, you need to specify. So module is more verbose. In my (and Graydon's) opinion, a bit more verbosity is worth it for modularity, but many people disagreed.

This is another theme: Graydon is okay with verbosity, boilerplate, and being bureaucratic. In my (and Graydon's) opinion, programming is work that is secretarial, not artistic, so it is unimportant whether code is ugly or not. You may think current Rust is ugly, but no, it is the way it is because lots of people really cared about Rust code being pretty. If Graydon was a BDFL, Rust would be even more ugly, and in my opinion, as a result, would be a better programming language.
Do you think there is something specifically about HW eng thinking SW eng is easy, or just the classic underestimating a domain you have no understanding of?
Yes, but no one is claiming to have a reliable way to detect AI generated answers. The moderators are asking for the authority to suspend accounts in cases where they DO have evidence it is AI generated.
I don't know of an example but you should talk to a license lawyer and create a new license. Basically it's similar to "normal" Dual-licenses that say the code is GPL but you can buy a MIT license from the maintainer. In this new case either the license would state that the rights are the same as GPL until the company goes out of business (and then it would switch to MIT)
What's your point? That mental health initiatives are only worth discussing if they originate in working class communities?

Also, I grew up in the vicinity of Greystones and painting it as a kind of Irish Beverly Hills is daft. Everyone I knew from the town was regular middle class.
AR won't happen in the mainstream. Not with this tech. I see only investor influencers and nerdy "I can now have a virtual girlfriend" fellas excited about this. The same crowd that was getting psychotic over Web3's potential like a year ago.
I await the people complaining about how they were banned from SO for posting an answer the mods falsely believed was AI-generated.
No, they have the impulse to bully someone and then go find someone to pick on. Much of what teens do is about desperately trying to avoid being the obvious target.
I could just let people use the iPad. We have a couple lying around.
What I'm interested in is how Homekit wasn't flexible enough to do the automations. What kind of automations were you planning to do?

I guess a good trajectory would be to start with Homekit like you did and then have the option of hosting that bridge yourself via Homebridge when you want to expand or go more advanced.
Not having access to the most ubiquitous device to access the web means being able to get less information about tech.
Why waste time type lot char, when few char do trick
I hate the unpaid moderator model, it generally attracts only the most terminally-online busybodies, and they seem completely detached from the core aims of SO, instead only interested in metadrama.

I don't like it on Reddit and I don't like it on SO. They should pay professional moderators just like Twitter and Facebook.
Carry hand sanitiser with you. Using hand sanitiser isn't cleaning your hands, though.
> The offence here is spamming, AI is orthogonal.

You can make broad classifications for an act (it wasn't murder, it was negligent discharge of a firearm), but that doesn't preclude the fact that it is also something else (shooting in the direction of a person without regard to their life and killing them is murder).
Using a phone enables access to information, which can make a person tech savvy.
Don't worry I have a thick skin. It's better for people to tell me what they don't like or if there is a better way to do something than to say they like the product when they really don't. The really nifty thing with my program is you can see what the data would look like. I can't tell if your script does that.
In total I think I have gotten more useful answers from closed posts than non-closed ones. Someone at SO have greatly underestimated the value of having a handful of almost identical questions each with their own answers.

If anything the network might have lost traffic because moderators have been too efficient in closing duplicate questions before they got useful answers.

That said, AI garbage posts do have to be fought with fire.
The title is correct, but I very much doubt that most new C++ programmers (or anyone starting their programming carrier after ca 2005) started with C and the "C++ is just C with classes" mindset. You don't need to know C to have ample opportunities to shoot yourself in the foot for the first few decades of writing C++ code, and the C language really cannot be blamed for any problems that C++ stacked on top of C.
Where is that stored? My beef with NodeRed was that it's not very git/manual-change/file friendly - random IDs and minor change in UI causing a large on-disk shuffle.

Even if I use a UI for making a modification sometimes, I want to be able to commit a clean diff like:

sensorLightBackdoor:
- timeActive: range(sunset - 20min, sunrise + 20min)
+ timeActive: range(sunset, sunrise)

Or whatever. Which obviously I can do with python, as long as it's stored neatly in config in a .py file, or even if embedded in HA yaml or something?
Since C++20 the correct, constexpr-friendly approach to your specific problem is std::bit_cast: https://en.cppreference.com/w/cpp/numeric/bit_cast.
Planting trees is the least-cost and least-impact part of actually cultivating a healthy forest that is not another monoculture patch of land (e.g. firs).

To get your trees to survive their early life and not get eaten by animals (tasty green branches and roots without nasty bark) or die from deer massage (they scratch themselves on the bark and can damage trees to the point of decades old trees dieing), you need people actually maintaining the cultivated area until it becomes a quality mixed forest - otherwise, only the fast growing trees will survive like spruce and beech.

Spruce acidify the ground and cover it with needles, nothing else grows there - so not good for biodiversity. Beech are low-density wood and don't bind much carbon.

Setting up the development of an old-growth forest is lots of work.

(Edit: if someone plants a tree, odds are it'll get eaten - you will not get a tree for 5USD, you'll likely feed the local fauna)
No GPUs have upgradeable memory either.
Not a parent myself but I have 3 nephews.

The problem is that screens are just scarily addicting for kids. They have limited, supervised screen time to less than half an hour a day for the youngest (5) and around an hour a day for the eldest (8), yet despite that it's practically all they care about. The only thing they seem to think about is getting back mum's phone so that they can watch youtube or whatever it is they do, despite it being such a short part of their otherwise eventful days.

Hell, I've got a Steam Deck that I bring with me whenever I come around to visit, yet they don't care about it at all despite my steam library having around 900 games, they'd rather use my phone!
Ridiculous strawman argument, smartphones are the easiest and most convenient way of accessing information. A ban on them is a big block on informational freedom.
It's data is licensed under creative commons, and last I looked into it, you could easily download the entire stackoverflow dump. There was a torrent and it was about 50GB or something.
It's not "management and business". People will always tend to take as much as they can before someone fights back.
> He once single-handedly porting our >1m LOC codebase to Java over a weekend

How do you even physically do that?

Generous estimate:

1M LOC
18hr days * 3 = 54hrs
1,000,000 / 54 ~ 18,500 LOC/hr

There must have been a lot of help from automation here or you had an enormous amount of boilerplate code, because otherwise I don't understand how this is even possible.
OR - keeping highly intelligent and social wild animals in captivity, often in close to "solitary confinement" conditions, is a rather nasty thing to do?
Please let's make a difference between what a parent can do (and what you propose is doable) and what a community can do.

I allow restricted access to my kid: no mobile phone access, limited time to watch cartoon, no tv, limited access to laptop only for scratch for example, limited access to some educational videos about nature... He can use command line or repl to play for example with math questions... While also getting used with keyboard, mouse... Trying to find a good balance.

But unless I plan to keep him at home he goes to community and socialize and I have to explain why we don't do this or why we don't do that and to explain why others are playing games or have phones. And I do explain.

But I am also concerned about the social groups they are all growing. The majority are not like this. So he will live in a society maybe with people hooked on screens. Maybe he will find a bubble maybe not.
I had thought APL style was to specify initial values simply by pre-catenating the desired initial value onto the argument?
Agreed, I don’t think most current-day musicians are amazing or even technically proficient at what they do. Hell, most people can’t even name a non-vocalist instrumentalist who recently appeared on a record they enjoyed.

Not that that’s some kind of mark of shame on anyone, styles and tastes differ. But I know that personally in my own musicianship (semi-pro/bedroom artist) I’m absolutely nowhere near the level of some of my idols, who themselves aren’t as much once-in-a-generation virtuosos as they are masters of feel, production, and atmosphere.
Certainly PC gaming has terrible ergonomics and is very annoying. Sadly, some things you can't play on a console.

Cloud gaming is not even close to being an option, the latency is disastrous. Even streaming locally on gigabit network has poor latency, let alone over the internet.
I've recently come off a 10 week pause in any significant exercise due to injury (and still can't do many strength exercises, though I was already mostly cardio). I made zero effort to change my eating habits, since I still have a job, and doing it is much easier - debatably only possible - if not distracted by hunger. My weight went down and is skyrocketing now that normal service is resumed.

Maybe I break the laws of physics, maybe my brain is lying to me about how much I ate, or maybe my endocrine system is doing things to maintain a setpoint, like it does with temperature, hydrostatic balance, CO2 levels, Na/K balance, anything else I've missed?

Given the above, how the ** do you suggest that CICO works as a predictive model over long terms? I don't know the first number, really don't know the second, and the second changes in response to the first.
Ah, yes, thank you for catching my omission!
Yeah I thought not liking the way of self-hosting it especially was fair enough. And I suppose language is too even if I don't mind in this case - Java certainly puts me off OpenHAB (and anything else it's used for).
The vast majority do, certainly anything from the past decade or so does because it would be impossible to meet the pollution standards otherwise. The problem is what do you do with all the soot once you've collected it? You burn the soot or you toss the filter. Ford and Jaguar had to recall their diesels due to fire risk, and I think back in the 80s Mercedes did too.
it is every business mission and goal to deliver value to its owners.
IME a lot of real-world 'enterprise quality' million-line code bases only have a few thousand lines of actual functionality in them - if at all (take a typical Java or Java-style C++ class which is mostly constructors, setters and getters, and maybe a single method that actually does something).

Then replace some large modules with existing 3rd party libraries, and the whole feat sounds a lot more believable.
I know most of these sort of licenses are just for fun, but on a serious note, if you don't care about licenses, and you don't care what people do with your code, I would recommend you use The Unlicense, instead of one that sounds funny.

The Unlicense is almost like MIT License but without any burden on those using your code.

On the other hand it offers you the same (perhaps handwavy) protections from liability as MIT License does.

If you're familiar with Creative Commons, it is similar to a CC0 license, but for code.

Basically it's a legitimate way of saying "I don't care about licenses, stop bothering me, do whatever".

If you use GitHub, then Unlicense is one of the choices you can select when setting up a repository.
I hadn't slapped anyone with a large trout in a very long time. Thanks for the reminder :-)
> My go-to example in C++ is examining a floating-point number as an integer

Which is something that hardly makes any sense and most professional will never need in their entire career.
I'm a software developer who's led some embedded development projects in the past, and I definitely know where you're coming from. There are hardware developers who are fantastic at some parts of software development, but other parts require totally different skills.

In my projects, where we partly used DSPs and software-defined radio, I found that the hardware guys could be amazing at writing neat modules of DSP assembly, with carefully benchmarked time and space usage. I felt that they thought "hey, software is easy, it's just wiring a bunch of filters together!" But for anything requiring more sophisticated architecture (like interpreting an EPG embedded in the data stream) they wrote spaghetti code.

Often their stuff would be nice and terse, so it could look good at first glance if you didn't really understand software. Some parts would be efficient but buggy; other parts would be correct but with terrible scaling or arbitrary size limits.

Similarly, I'm sure if I tried to get involved in hardware, and confidently thought "this is easy, it's just wiring a bunch of functions together!", I might get some of the small stuff right, but the actual higher-level hardware architecture would be equally terrible.
Actually this concern is exactly why we built Maglev: A very fast JIT that can generate decent enough code very early so it can help even if you're not running tight benchmarks. In fact, the JIT by itself isn't particularly good at the traditional benchmarks yet. It's just very fast, and the code is most often good enough for real browsing usecases.
It's because it is fast. I write small video games, and I have performance metrics I need to hit. Other languages may be nicer to write, but if it is at the cost of performance, it is making my life harder. Up until recently, if you wanted a language which didn't hurt you in performance, your choices were basically C or C++. You can debate whether C++ is better than C, but it has a lot more features, many of which I would miss if I had to use C.

Every language which attempted to compete with C++ did so with automatic memory management or other features which were bad for performance. If the goal is to kill C++, they made the wrong tradeoffs and introduced anti-features from a C++ pov. Only recently have we gotten languages which actually compete with C++ on this level like Rust, Zig, Odin, etc.

It's also because it extend C, and C is the linga-franca of programming.
>classic underestimating a domain you have no understanding of

to be clear I'm not a hw eng myself so I don't have a deep understanding of hw eng, but I have a friend who's studying EE and from what he asks/tells me sometimes, there's a non-trivial amount of coding involved depending on what it is you're working on. So mabye it's because hw engineers may have experience writing lots of code which is non-trivial, but nowhere close to what a sw eng does still, hence giving a wrong impression.
They're not just expecting the business to behave this way they are attempting to force its hand.

Are you familiar with strike tactics?
The decision to ban smartphones generally comes from a weighing of the benefit of the information they provide access to versus the damage phone usage causes to childrens’ psyche.
It's still ugly as hell.
Whenever I hear about a train system outage, I wonder if is related to the Vortex OpenSlice DDS [1,2] they are using. But I think it is quite unlikely. I did some (very little) work on the successor of Vortex OpenSlice: CycloneDDS [3,4]

[1] https://www.adlinktech.com/fr/ProRail

[2] https://github.com/ADLINK-IST/opensplice

[3] https://github.com/eclipse-cyclonedds/cyclonedds

[4] https://cyclonedds.io/docs/cyclonedds/0.10.2/config/cycloned...
This is just prima facie untrue, and sure enough, even the article plainly states that 30 minutes of daily exercise will "probably" lead to 12 lbs of weight loss in a year.
OpenHab,

I'v gone from home assistant to smart things to openhab and its been stable and simple to set & forget.

It's great to setup via the UI, easy to backup and restore as once you actually start to build it into the foundations of your house you start to value the stability of it
Ask HN: Ideas for offering a free trial without users abusing it?
Hi. Hope you guys can help with a conundrum I'm having.

Background:

I have a web app that lets people upload a PDF and then ask it questions (one of those "Chat to a PDF" apps). The answers come from OpenAI's API in the backend. I charge $1.99 per upload.

There is no signup, but they do have to provide an email address during upload. And I don't want to add signups and logins, etc.

The challenge:

I want users to be able to take it for a spin before paying $1.99. So I'm thinking of offering 3 free questions after upload, and then they pay if they want to ask more questions.

However, this opens it up for abuse, where a user can keep uploading the same document and keep getting 3 free questions. Of course, the inconvenience for them is that they don't get all the answers on the same page as each document has its own "chat" page history.

So, what do you think? Is the approach above safe? Am I overthinking it? Is there a better way to provide a trial without asking them to "sign up"?

Thanks for any help!
Same reason we (SW engineers) think X field is easy and can be self-taught: the fundamentals are easy to learn, but figuring out where and how to deal with edge cases when they pop up is something that can only be learned with experience.

I see the same with a certain subset of finance people who learn Python, and start thinking coding is easy. Yeah, fair you can whip some simple Jupyter notebook using Pandas to analyze time-series. Now build out a distributed, fault-tolerant ETL (CRUD++) system that follows all business rules, is maintainable/readable, and can scale to atleast 100 "servers."

Perhaps not the most apt comparison -- but the fundamentals in every field are easy to learn; but working at the edge is something you have no experience in until you do.