skysight-inc/HackerNews huggingface dataset:
Let's use C and C++ as an example. What does the code look like?

myobj.cool_func(1,2,3); // C++

cool_func(myobj, 1, 2, 3); // C

Is this better?

If you use a vanilla C++ style class then the class definition is in the header. All changes to the class require a recompilation and break the ABI of the class. This means you basically cannot release patch versions of your library because consumers cannot link against it if they have the old headers.

Contrast with C where you would forward declare a struct in the header and pass that around while the definition is hidden in a .c file. This means changes to the size of the structure don't matter because all calling code ever sees is a pointer. (True data hiding!) It's called an opaque pointer and many many libraries use this pattern. e.g. libcairo.

There is then a pattern to do this in C++ called pimpl:

https://en.cppreference.com/w/cpp/language/pimpl

This solves it for C++ but the alleged convenience is gone because now you're coding C++ with the supposed convenience but still your class implementation has to trampoline all the calls to the pimpl which is an extra function call (if you're writing C or C++ this might matter).

But RAII, though. Not having [standardized] RAII sucks.
Drink loads of wine? :-)
There's already a browser engine that reigns in the web. What we need is a browser engine to help rein in the web.
> web browsing, text editing and terminal.

If that’s all you want try an iPad2. I think it would make a better “laptop” than a RPI. RPI doesn’t have a battery.
Yarn or NPM: What is your favorite package manager?
I guess somebody at the White House is reading HN:

https://news.ycombinator.com/item?id=23330463
This antipattern is taken to the extreme with the `DOMParser` [1] class in the Browser.

The constructor takes no arguments and it has a single instance method that takes produces a result without mutating any internal state.

What's worse, the method returns a newly created object of another class, which in my head is an indication that maybe, just MAYBE it should have been a constructor of said other class instead.

[1] https://developer.mozilla.org/en-US/docs/Web/API/DOMParser
It's easy to create an object that pretends to be a function; it's harder to make a function retain state later.

I read that as an argument in favour of functions. Implicit state is pain. Making state explicit is a great advantage of fp-style programming IMHO.
Fork of the Rash QDB: https://github.com/paxed/rash-qdb-fork
Is that true though? You can pass the function itself. If your interface is a function that takes no parameters and returns an int, just wrap this function with another function that takes no arguments and moves the arguments into a closure.

Doing it in a class is forcing these assumptions on your user - that they need this added complexity in all of their uses, and will make for unwieldy code when they don't, or even more unwieldy code when they use a facility that doesn't satisfy the interface you decided on. Let your user be responsible for deciding that and wrapping your code for whatever use they want to do with it - if you write library code (library and not framework), it should be as simple as possible to allow flexibility for the user.
Do python linters catch that? It is not a code error and sometimes not a design error either, but a warning would be useful, and linters may have the tools necessary for that.
Why are you comparing $1000+ laptops to a raspberry pi and a dock?

If the raspberry pi meets your needs, consider a much cheaper laptop
If you use c++ (as the example in the article) you can just use explicit namespaces at least.
Medications should be prescribed by doctors, not the president’
Yes I know you do. I also disable JavaScript by default on my mobile. But we are on Hacker News, we don't represent the average user.
"Brazil’s researchers have a battle on their hands. The country has the world’s third-highest number of confirmed COVID-19 cases, with more than 300,000 infections and 20,000 deaths. Scientists there have to fight not only the coronavirus, but also the government’s anti-science stance."
Often it's the motivating example when the feature gets explained.
You do realize communities can die out as well?
Oops, thanks for catching that! Let me fix it.
Question from a non-technical person.

I've been reading a lot about tiny websites on HN (e.g. https://bearblog.dev). Can we use these Raspberry Pis to host them? Are they performant enough? Is setting things up newbie-friendly?

Having your own little corner on the internet that no one can shut down sounds pretty cool.
> And I'm sorry you find two respected professors, one at NYU and one at Stanford, to be of dubious authenticity.

Obvious straw man. I have no qualms with those professors, just with your claims about their books, which at least one summary contains no trace of. Should I read those books merely to verify your claims? I'm not so sure.

> I've virtually never seen these sorts of dynamics at organizations below 100 people, and they don't become universal until around 1000-10,000 people

So your initial claims don't apply to CEOs of corporations with less than 1000 people? Moving the goalpost much?
Totally anecdotal but LSD made my depression significantly worse than improving it in any way. I had two proper trips and had a seizure kind of thing at the start of the second one due to the overwhelming visuals (not experienced anything like that before or since).

EDIT: to expand, it made me very questioning of my own consciousness and gave me severe and persistent existential dread and fear of death to the point where I felt quite suicidal (which I've _never_ experienced before). I restarted my old anti-depressants which have helped quite a lot but I don't think these feelings will ever truly disappear. Quite honestly it is the one drug I truly regret taking. If you aren't ready to accept what these drugs will show you then it can be a long-lasting and damaging experience, certainly it was for me
I agree with you, but in psychiatry and clinical psychology, a 20% false positive rate is considered "acceptable".

Consider for example the Cochrane review of autism diagnostic instruments in preschoolers [1]. It found that on average (in research contexts), the main diagnostic test used for ASD, the ADOS[2], had a specificity of 0.80 (in other words, a 20% false positive rate). The Cochrane authors considered that acceptable. Now, professionals may consider that acceptable – but how many parents are told that the test used to diagnose their child has a 20% false positive rate? Added to that, there is evidence that the tests are actually less accurate in non-research contexts (the standards for administering them are certainly lower), which may make the false positive rate in non-research contexts even higher (on that topic see [3]).

[1] https://www.cochranelibrary.com/cdsr/doi/10.1002/14651858.CD...

[2] actually the original ADOS has now been superseded by a newer version, the ADOS-2, but the Cochrane reviewers couldn't find any studies of the ADOS-2 that met their inclusion criteria. In any case, I doubt the accuracy of the new version is substantially different from the original one.

[3] https://link.springer.com/article/10.1007/s00787-018-1143-y
Here comes the real deal government-on-server censorship, not the fake stuff that they’re complaining about.

Censorship platforms, even the “good guys” who only censor occasionally or predictably or “according to law” (or whatever), are all vulnerable to this. The state can threaten them with guns and imprisonment, ultimately, and they have no immediate recourse. The content comes down. Maybe it gets restored later, after the election or war is over. Maybe it doesn’t. Either way, it comes down today. Neither Jack nor Sundar are going to jail to protect your hosting account showing videos of war crimes.

This is an inherent danger in all censorship platforms. Whether you like Jack or not, trusting him not to censor arbitrarily (while Twitter always has the technical capability) is not a reasonable choice for the society-wide message bus.

This failure mode is inherent in these censorship-possible systems, and it must be addressed if we are to maintain publishing that cannot be suppressed by the state during emergencies.

https://sneak.berlin/20200421/normalcy-bias/
Superlinear can mean O(n log n) or anything like that, which is smaller than O(n^2).
I bet most bruises are actually caused by shoppers once on a shelf.
What's wrong is psychedelics already work as-is, but due to stigma around "fun" alterations of consciousness possibly being beneficial (along with desire for a patentable compound that can get through FDA regs), most of the focus has been on how we can go about removing the wetness from water while preserving water's essential useful properties. Regardless of how many years go by and self-reporting along with scientific evidence accumulates that water's wetness is mostly the entire point, and all while people are being thrown in jail for water possession.
I think that depends on what we understand by 'state'. Do we count immutable data? Consider faking a 'bind' with something like:

var quadrupler = new ConstantMultiplier(4);
var output = quadrupler.applyTo(42);

The 'quadrupler' instance is stateless in that it's immutable, but it presumably has a (constant) member to store the value 4.
Woah I think this is misinformed on a very fundamental level, and I really would like to clarify where this idea is coming from (is it from a "modern" React or other JS-first bootcamp line of thought by chance? Not trolling, but genuinely interested). The entire point of the original web is that you send HTML to a browser rather than JS snippets or JSON payloads, and that you compose your documents from HTML fragments. "API servers" and RPC were concepts from before HTML, and the web as an app platform was welcomed for leaving granular request/response roundtrips behind and compose accessible and searchable HTML pages with really simple means (like shell scripts) on the server in the first place!
what is the point of an exclusive if you have to keep it secret - I mean if he were TechCrunch for example, if he got the exclusive I guess he should publish, isn't that the point of an exclusive? I find it a very confusing phrase.
Well in the philosophy problem space, ethics and morals are clearly a complex matter haha.

If someone’s ethics is to maximise chaos, then a full disclosure on 4chan is _technically_ the _most_ ethical action for this person.
If the state is threatening the operators of a platform with guns, because the supreme leader does not like the things said about him on it, whether or not that platform of choice is censoring arbitrarily has long stopped being the most pressing problem for speech.
When our dev team was just starting out, we ran the business gitlab instance on a raspberry pi 2 model B. It took a few kernel Params to work with only 1GB of RAM, but it got there.

His name was Boris and he was the company’s MVP for several years running :)
June 2020 Security Releases
AWS offers a cost calculator for just that purpose; they offer 'easier' products if you can't be arsed to dive into AWS costs and technologies yourself.

I think a lot of people make the mistake of assuming AWS is just an easy off-the-shelf thing you can just grab, but if you use it seriously it's a full-time job and its own expertise.

Source: I've done some AWS certifications, never was able to put them into practice though. I've also worked in multiple organizations that migrated to AWS, they all had a full-time team of people managing it.

It's a full-time, specialist job and you can't just palm it off to your engineers as a background thing.
took me reading that twice to get what you did there hehe
I can only hope you're not self-employed.
Not going to happen unless we get property rights to software. As long as software is "licensed", we no longer own our machines.

Battle.net DRM, Steam, EPIC, uplay, origin, are all bids to lock down software.

Without property rights to own software you can't prevent mass privacy invasion that's going on in windows 10. You need to beat back DRM completely and that mean's we need ownership rights and DRM systems need to be destroyed, they only came about because big media companies lobbied away the basic rights and freedoms to own our PC's and the software on it.

Without software property rights for the public, the madness will continue.

I watched for the last 23 years as the game industry client-servered every PC game and got away with it because "software is licensed", not owned, so they can technically sell you incomplete software where pieces of your game live on a remote server and die if it ever shuts off.

Shit is fraud plain and simple, that's why dedicated servers and level editors went away in the AAA space and how we got "software as a service (scam)".

I don't see anything good given the vast majority of people are too stupid politically to even approach the problem of property rights to software for end users.
Yes and that is much better than a one level deep manual.
> The executive order would require the Federal Communications Commission (FCC) to propose and clarify regulations under Section 230 of the Communications Decency Act, a federal law largely exempting online platforms from legal liability for the material their users post. Such changes could expose tech companies to more lawsuits.

> The order asks the FCC to examine whether actions related to the editing of content by social media companies should potentially lead to the platform forfeiting its protections under section 230.

> It requires the agency to look at whether a social media platform uses deceptive policies to moderate content and if its policies are inconsistent with its terms of service.

Is there any merit to this?
As long as the plurality of voters are buying shit someone is going to sell it. The GOP primary had every kinds of people and Trump won because he was the most blatant. So there's that.
Micro is my favorite editor, I use it for everything.
Very good. If the biais was in the other direction the leftists would by crying 24/7 about fascism and dictatorship. They are in power in the medias and corporations and they use that position to bully their political opponents, just like they did, more fiercely, in every country they got power (China, Vietnam, Korea, Russia, etc.) A least this time they don’t kill people directly.
Their not paying for it? That doesn't seem right.
I think a lot of people underestimate how difficult it is to move manufacturing out of China. Manufacturing isn't all unskilled labour that can be moved to whatever the cheapest country is. There is a lot of expertise needed in modern manufacturing and these days China has most of the experts. I'm not saying it won't happen but it will be a more gradual shift over time than a sudden change.
Good luck testing your design in several browsers on an iPad :-/
It's not even only money that gets this reaction. Every time somebody shows off or is lauded for having something that would actually take critics some effort to achieve, such reactions are common. Whether it's muscles (body building is ugly, unhealthy, only possible with horrible drugs...), good looks or many children. People will find some disadvantages and let you know.
One would expect that if this happened Twitter would just cease US operations and move everything outside US Govt. jurisdiction?
My work until recently was working on one of the Delphi apps you're talking about. Not in terms of unoptimised queries but bad separation of business logic and ui. But the product has passed between 4 diffent companies and is over 20 years old now, I just don't see how you prevent these issues. I do see what you're saying, but I think the real issues is humans which hasn't changed.
Unlike you, he owns a repair shop. I’m sure he’s basing his statement on the amount of MacBooks that come his way with a failed T2.
Twice as much RAM as the RPi from the article, to say nothing of the CPU, SSD, battery, screen, and keyboard.
As it says in the HTML Standard[0]:

>The design of `DOMParser`, as a class that needs to be constructed and then have its `parseFromString()` method called, is an unfortunate historical artifact. If we were designing this functionality today it would be a standalone function.

[0]: https://html.spec.whatwg.org/multipage/dynamic-markup-insert...
The author highlights tracking, profiling & targeting. Just yesterday, I Asked HN but none responded: can't we just flood the trackers with random data instead of fight so hard to block them? https://news.ycombinator.com/item?id=23324946
> The order asks the FCC to examine whether actions related to the editing of content by social media companies should potentially lead to the platform forfeiting its protections under section 230.

Honestly, that part seems very reasonable. If a platform curates or modifies content or promotes it beyond what some system thinks the specific user might like, then yes, the platform should be responsible for that content.

The real question would be, should the platform become responsible for all ontent, or just the content it curates / modifies / promotes?

My opinion is that this should work on a per-content basis, where the platform only becomes legally responsible for a unit of content once it associates itself with it by promoting, modifying, etc. this content. Whether it is realistic to enforce it this way is, of course, another question.
I guess this was inevitable in the end, it must have come to this, but I just find what twitter did so silly. At least if they'd have used some sort of impartial looking fact checker, or an independent panel, or something, as facebook is doing, perhaps they would have prolonged this for longer.

But calling CNN a fact checker on the president is so inherently stupid, it's asking for trouble. And of course CNN couldn't get their facts right either, so they are blatantly just representing the other side and not "facts".

Twitter really could have done a better job here.
They never threaten with guns directly. It’s always “regulation”, which is code for “do what we tell you because if you don’t, then the men with guns will show up and shackle you”.

The guns are implicit. The threat rarely needs to be so direct.

Imagine what happens if Twitter continues to do the legal publishing things that Twitter does on twitter.com, and the state arbitrarily changes the liability protections of the CDA out from under them, and Twitter tells them to piss up a rope.

Next, Twitter’s bank accounts will eventually get looted, and if they opt out of the traditional state-controlled no-burden-of-proof banking system[1] to continue operating and paying staff, you can bet your ass that their resulting shutdown will be at the point of a gun, because payments outside of that system are already illegal without a special license.

That’s the only authority the state ultimately has: the claim to legitimately use violence to enforce the law: the law, as we are about to see, that can be changed arbitrarily by corrupt politician edict.

(The last time I recall him doing so was by an EO that overturned decades-old published and written BATFE interpretations of existing federal law (and assurances related to same) regarding bump stocks. The lawsuit proceeds, but good luck to you while you rot in jail for years if you are in possession of a bump stock (which were legal for decades) in the interim.)

[1]: https://sneak.berlin/20191119/your-money-isnt-yours/
Installing packages for your system as a non-root user is fairly broken and Homebrew jumps through a number of questionable hoops to make this work.
It is, but it seems that it's a strange made up polarization: https://fivethirtyeight.com/features/there-is-no-evidence-th...
I meant people that work as UI/UX designers.
The gameplan might be to build a direct connection between the vast financial resources of the republican party and their ability to influence online audiences. This has already worked quite well with the Super PACs which amount to unlimited anonymous donations to parties or candidates. This was declared legal based on the 1st amendment in 2010. The same goal could be pursued here: cite 1st amendment and rule by decree that fact-checking violates 1st amendment principles, fight it out up to the supreme court (which is firmly in republican hands) and then write it into law for the foreseeable future. In the meantime, sue social media providers for ridiculous sums if they provide fact-checking prior to the election. Technically, you still have a democracy, albeit one that is no longer united in its perception of reality.
Looks nice. Being able to use the mouse to select and navigate text is huge for new and old terminal users. Theres a huge gap between nano and vim, and this is a good fit. Good defaults are important for first impressions and keeping users, and micro seems to be fully aware of that.
Anything sufficiently successful will always be consumed by the powerful and will ultimately become their tool
The EU single market has no positive or negative effect here as it's a private purchase not subject to any regulations.

I am free to buy and sell to and from any country in the world, the issues is not everyone is willing to deal and pay for international shipping which ends up quite high for a cheap SFF tower system.
That's a really interesting suggestion I haven't seen before. It makes sense from a completely non legal perspective. If you're halfway between a platform and a publisher, as I believe all these platforms are, then a could compromise on how to solve this massive issue could be that modified, curated, fact checked content (by CNN not an independent fact checker) is what they are responsible for in terms of being a publisher.
Could always use something like https://www.browserstack.com/ if you really want to.
Awesome! Thanks!

That is quite a collection!
What's stopping another company - or Twitter itself - moving somewhere outside the US jurisdiction?

I can't imagine it would be easy to regulate a service that isn't really location dependent.
Define "bad"
Encapsulation's a weird one. It's a cornerstone of OO but most/all OO languages have rubbish support for ABIs so changing your object in one library means you need to recompile your code using the library. This is the opposite situation that encapsulation seems to promise (in my view).
What is the current state of REPLs for Nim? If I remember correctly, Nim had an official REPL a long time ago, but it was abandoned a few years back.
It's not "stigma". People treated from clinical depression hope to be able to function in their normal day lives at work and at home, not just be on a never-ending psychedelic trip.
The browser could be seen as a special case, as it's the most public API around. So classes are in many cases simply for
namespacing and modularisation.

Interestingly, the HTML spec for DOMParser has a note about exactly your comment: https://html.spec.whatwg.org/multipage/dynamic-markup-insert... (scroll up 2 lines)
If it's already explicitly part of an object, do you need to be explicit about the same thing twice?
You could buy a Jetson Nano developer kit which is $99 and has a GPU (I'm not in anyway associated with Nvidia and have never bought a Nano).
MacPorts still has a number of Apple engineers contributing to it, although it is no longer an Apple-sponsored project and I have no idea if they are doing so in any professional capacity.

Homebrew, interestingly, has been moving towards an App Store-esque “binary distribution platform” for a while now.
Taking every single function of a program and splorting them all into one giant chunk of text is not discoverability or anything near it. It's an info dump, which is pretty much the opposite of discoverability.

At this point anyone arguing against GUIs likely doesn't have to actually USE a computer, simply keep them running.
Why past tense for guidelines from Apple? They're here: https://developer.apple.com/design/human-interface-guideline....