skysight-inc/HackerNews huggingface dataset:
> And yet my high-end Android phone is slower and jankier where it counts most to me: UI stuff.

Has no relation to SoC. My Pixel 4 is noticeably smoother than iPhone 11 I tried.

> It's the same reason why I still willing to pay the Apple premium for laptops (although more and more begrudgingly so). I don't care about better raw specs when sleep mode still doesn't quite work, or the fans are unreasonably loud, or the trackpad sucks, and I haven't really cared about these things since I switched from my custom-built tower PC back in the day.

I am typing this on a $2000 i7 Macbook Pro 2017 running hot as a pipe. The same workload works a lot cooler on my $500 Ryzen 3500u laptop. The plastic is much comfortable to hold even when things get hotter compared to unbearable metal of Macbook. And don't even get me started on the Keyboard.
To me it seems a 3-post blog of a mentally tired person. Hope he recovered and started enjoying life
> Chromium doesn't even do hardware decoding on x86 desktops

Which is a ridiculous waste of energy... :( you notice it too now using Microsoft Teams (Electron) and Google Meet versus Facetime. Eats your battery in no time.
Have a look at the beaker browser suggested in the parent post. It uses the hypercore protocol (new name for the dat protocol), which allows one to build collections of data, update them, and have them mirrored over a DHT, kind of like IPFS does. You can choose to contribute to mirroring some content you like, if you want to :)

Of course, ideally, the websites themselves would publish articles on the hypercore network, and be the source of trust here, but I don't see why you couldn't do it from RSS feeds.

I am not sure whether the data is content-addressed on hypercore? If so, multiple people could archive the same content to make sure it is identical, and still enjoy the benefits of distributed hosting :)

More about hyperdrive/hypercore: https://news.ycombinator.com/item?id=23180572
Which "yank" package are you using? I came across one [0], which copies the file selected to the clipboard instead of outputting it to stdout.
I managed to get it to print to stdout, though:

alias -g Y="| yank -- cat "

[0] https://github.com/mptre/yank
To me the original sin of the example is not to perform the calculation in the constructor. The third version, the one with the "int count() const" method and without the h and w members, is perfectly valid and (correct me if I'm wrong) thread-safe. It is a bit longer than the 'functional' implementation but does handle memoization. This is basically the C++ way to make a 'closure'.

The point is certainly valid, but the example could have been more carefully chosen.
It's not my area but, surely concurrency can be added, and why does it need to be native? Surely a library is fine.

(I chose not to learn go because of it's lack of generics and exceptions. It seemed like a huge step backwards)
Archers of Nand: fight orcs using SQL (solo/competitive)
Twitter Head of Site Integrity, on Fighting Election Disinformation (Mar 2020)
Why would I use this instead of Emacs?
I did pretty much the same with the Ikea LED lights, which aren't too pricey.
In my opinion, "Maxwell's equations of software" ought to be based on the simplest possible computational framework, which one could argue is the lambda calculus.

A meta circular interpreter working on a simple binary encoding of lambda calculus (where abstraction is 00, application is 01, and a variable is 1^{n}0) is only 206 bits long [1][2], over 20 times smaller than the article's equations.

[1] https://tromp.github.io/cl/cl.html

[2] https://tromp.github.io/cl/LC.pdf
Is he that guy who said Facebook and US Government are the best for managing/storing personal data?
I hope that was some kind of meta-comment.
Isn't https://docs.microsoft.com/en-us/windows/iot-core/tutorials/... IOT-Core for that purpose, or am I missing it?
Is there any real harm though? Free functions pollute the global namespace, which is something I tend to avoid (at least in Ruby where everything shares the same namespace).
It's really shameful how a prestigious service like AppGet for neglected Windows users got screwed by Microsoft. My sincere thoughts are with kayone and AppGet.
Trump's executive order targets political bias at Twitter and Facebook: draft
Now we'll get 20 articles from legacy media feigning surprise and acting like they don't do the exact same thing.
I feel bad for the OP for getting ghosted by the Microsoft hiring process, I'd at least want a prompt response of _some_ kind; but the package manager features OP says are "copied" are common to cocoapods, homebrew, and others... Winget is certainly not the first, and probably won't be the last package manager to take that tack, so I don't find that appeal terribly compelling (The bad hiring process though... That's annoying). If winget is a "copy" of appget, it doesn't look like a very _good_ or _complete_ one at a glance, so the author could probably keep at appget, what with the publicity; winget doesn't even uninstall or upgrade packages (yet, at least), so it's just a glorified search bar strapped to msiexec (not to lessen anyone's effort or plans, software takes a lot of time and effort to build).

If the JS package manager scene has taught me anything, it's that so long as one another's manifests/registries are readable, developers will happily try multiple programs which actually do the managing, and, to some degree, a little competition is what actually makes things gradually improve. I, at least, hadn't heard of appget prior to today. (Just chocolatey and oneget, both of which I'd used, both of which are likewise "invalidated" by winget, but persist regardless.) But I can only reasonably consider it if its primary maintainer reconsiders its "dead" status.
I've been thinking about writing a new webbrowser with very limited functionality which could be used on secure networks, such as Tor. It would only support a limited subset of HTTP and HTML / CSS and HTML Video. No Javascript / frames or anything else that could impart the safety.

I've been meaning to pitch it to the Tor Project, but haven't gotten around to it yet.
In many languages, it is an explicit parameter though.

For instance, in Python, one would define a function with `def fun(state)` or a class method with `def fun(self)`. In the function body, one would use respectively `state.var` or `self.var` to refer to a variable `var` in the state object. Running it is then done using `fun(state)` or `state.fun()`.

There are some minor syntactic differences between the two, but I find both these examples to be just as explicit...
Nitpicking Machine Learning Technical Debt
No, it's done inverted in functional languages!

In a FPL your graph will be an ADT. The advantage is clients can pick it apart, but there is no easy way to extend it. If you wanted to "use the same object for computing distances to multiple vertices", you're screwed: the ADT is laid bare, and there is no data hiding.

In an OO language, your graph will be an opaque object, and you can write things like CachingDijkstra or ParallelDijkstra and make these work transparently for your clients. The price is that you are bound to your APIs: a client cannot pick apart your data structure, because it's opaque.
Ask HN: Why is PostgreSQL so popular now?
In the past year or so it seems like everyone is recommending PostgreSQL and building products with it.

It's been around since 1996 according to wikipedia, so why is there a resurgence now?

Are there new features? advances in tooling? Sharding?
What's the difference between polluting the global namespace with a class name, or with a function name?

I get it, I also experience some reticience when adding free/bare functions in Swift. But maybe it's because of 15 years of OOP programming.
Currently they can amount to the same thing. Courts defer to agency interpretation when the law is ambiguous or open ended.

However there is a scotus case now which might change that.
I use the free wxFormBuilder designer, which works great.
I find the idea very interesting. But what if people leaning on one side of the argument stars a debate because the outcome ended up favoring their side?
"everything in C# must be in a class"

As an aside, C# also has structure types which have value semantics - one example being DateTime:

https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...
I think that the original poster use of "I built" to mean sticking bits they bought together in a way that works is pretty much layman usage of the phrase.

I suppose you might want a more stringent usage on HN, but I personally find it reasonable.
And if you have many methods, but only one 'public' method, use a closure.
Like I said, those were extensions made by compiler vendors, and not part of the original language.

Borland enabled adding Assembler to almost every language for which they made a compiler.
I don't know where you are in the EU but UK refurbishers constantly sell post-lease desktops and laptops on ebay for around £50, shipping to any EU country is usually £10-20 on top of that, if anything.

Like this kind of stuff:
https://www.ebay.co.uk/itm/HP-Lenovo-Intel-i3-Dual-Core-i5-Q...

Is plentiful and easy to buy, again - ships anywhere in the EU.

As for the power consumption - I have to disagree again, I have an SFF like this and in idle it uses about 10W of power, 40W under load.

Rpi4 4GB uses 1-3W in idle, and up to 15W under full load. Yes, the numbers for the Pi are lower, but I wouldn't say "it's not even close". It's close enough that I would absolutely consider getting the larger PC instead.
Laptops urgently need to have a hardware switch for the microphone. A mobile phone should have one too - but that will never happen. At least the laptop is large enough that one little switch is not a problem (unless you are Apple and even essential peripherals are a problem).
Wait! apt-get is not Microsoft's invention https://en.wikipedia.org/wiki/APT_(software)
You can manipulate f.__name__ to improve the debugging experience, since presumably you actually care for what is in f(), not greeter.
For some reason people seem to really want to use their $75 Macbook USB chargers instead of just buying the official power supply.
Exactly. Since twitter is de facto a public forum where anyone can say what they think, it’s important for free speech they also follow the 1st amendment and have a legal like process to restrict what people can say.
Wow. I know that folks prefer better looking produce, but I hadn't realized it was quite that dramatic.
Ok so to clarify the same question:

If/When Twitter is classified as a publisher do you believe they will be able to comment on the validity of things they publish? Like, for instance, a newspaper would?
We use Gatsby preview. It frustrates me that we are paying a lot of money for a substandard solution to a problem that shouldn't exist.

The same goes for Gatsby incremental builds. We don't want to run a web server, so instead we should pay to run a build server 24/7 so we can have a warm cache available when we need to build!?

The annoying part is that there is not reason a static site generator should have these limitations. Gatsby's entire revenue model is based on solving problems that only exist because of the bad architectural decisions in their open source product.
This, for sure. For my work I wrote a dynamic library in Nim. The library is loaded by an application written in C, and I needed it to work on both Windows and Linux (Windows for customers, Linux for myself and the server back-end). Setting up a Docker container that runs the entire build and integrates well into the existing build-system we had was fairly straight forward. All Nim needs to cross-compile is a C compiler that can do it (in my case that was MinGW). So now I'm happily running the same Nim dynamic library compiled to both a DLL and a .so.
OP is asking for full version not just IOT-Core
I agree. I think of this as a functor pattern: object that supports some params being bound at constructor time, and other params set when the function is called later.

In languages that let you operator overload function call syntax, you end up with an object that, once constructed, supports being called like with same syntax as a function call. This works easily in python (define __init__ and __call__ ), and you don't have to fight the typesystem to structure code that will accept both a callable object or a function.

Another perspective of the whole thing is that you have a function with many arguments, then you curry to bind some arguments, then pass the resulting function with remaining free arguments to be called.

I prefer structuring code as functor objects as it lets you access the bound parameters as attributes (if you want to expose them) which can also sometimes be useful in code or in test
Understanding Covid-19 pandemic impact on Zimbabwe's startups
How much liability can you claim against AWS if there's an issue with their RDS backups?
> This seems like an argument for buying SDEs needed software.

It depends on what the company values. This is what I meant when I wrote: "What does a company truly value? Are they mindful and realistic about their costs and benefits?"

> ALittleLight: It doesn't seem like an argument against the idea that you can work somewhere where they refuse to buy things like this, and still have it be a good job.

Correct, I made no such argument. You are free to make that value judgment.

It depends where you sit. Maybe you want to dig into ways an organization can improve? If so, that gets into questions about organizational values as well as costs and benefits of various options.

> ALittleLight: If your job pays well, work is interesting, good commute, good benefits, good manager, good coworkers, important mission, or a net positive combination of these things, that seems way more important than whether or not they'll buy you arbitrary software.

Again, feel free to make such a value judgement.

However, I would not use the word 'arbitrary' here, since in employment situations, there will be some understanding around expenses, often set out in policies and conversations. Even in organizations that are more flexible with expenses, employees are expected to use good judgment for business expenses.
That’s not their purpose and they’re not really private. Leading double underscore methods cause name mangling (the class name gets added to the method name) and they’re used for solving specific problems with inheritance. Don’t use them just to make something private. You’re screwing up your inheritance if you don’t realize what you’re doing.

Leading single underscore is private by convention. Still should generally be avoided, but it’s the proper use.
Somewhat related: it's curious that Netflix are so coy about their catalogue. Without signing in, they refuse to show what they offer in your region. You have to make do with a third-party listing site like JustWatch.com
CDA § 230 just protects a website from liability for user content and moderation
Why not? Insurance companies will skim some profit off, is all
Seems interesting how he predicted how social media would turn users into commodities.
Microsoft is a public traded company. You can safely assume that anything they do is really about generating value for shareholders. Of course they don't "love open source". But they probably love what it does for them (e.g. enable them to run Azure).
Nim has thread support natively. And an async implementation in it's standard library which is made entirely as a library, so you're free to write your own, in fact there exists alternative implementations of async/await in Nim. Just the fact that a feature like this _can_ be implemented as a library is a testament to how powerful of a language Nim is.
Reddit is that way --------------------->
Author makes some valid points, but jumps to conclusions too quickly. Most importantly, code in examples that actually solves problem is omitted (`[...recursive solution omitted...]`) - and that code can be potentially very long. If you have very long function, you should break it into smaller functions. But, those functions need to operate on shared state. In some languages (Python) you can have nested functions that can operate on variables defined in parent function, but in some other languages you can't, so you can pass shared state in other ways, like function parameters or, wait for it, what can you use when you have bunch of functions operating on some shared state? Use classes! You can even wrap it simple function to have cleaner interface.

Other counter examples might be Template Method pattern etc.
Just put the function in a namespace?
Then, count could be a static method, and you wouldn’t need to construct the DominoTilingCounter, yielding

std::cout << DominoTilingCounter.count(4, 7) << '\n';

That’s close to a free function, using the class only for grouping (say of private helper functions, or for memoization data structures)
RIP Mark Zuckerberg.
Traditionally, I don't really like classes, as I started with a mostly functional language (R).

However, when writing Python (for a poker simulator), I came to the conclusion that objects can actually be really useful for the following reasons:
1) managing state: this is the big one, if you need data with your functions, a class is an obvious way of doing it.

2) documentation: a class with methods is a higher-level structure than a bunch of functions and you are more likely not to forget the existence of a method on a class relative to a function somewhere in your code base (this second idea shamelessly stolen from Martin Fowler).
Creationism, Unchallenged
I like using it as a prettier version of nano
general rule of thumb here is: to use classes if there are some invariants that can be checked/maintained. or, in other words, invariants exist to justify the existence of classes. ofcourse, the constructor establishes the invariants, and everyone else maintains it.

if you have to do things like 'get_name(...)' and 'set_name(...)' then it is kind of silly (imho). just stick to more canonical means.
You are a small Team in a big company.

Your job is to create an App Manager.

There is already a code base under a MIT license.

You use it.

I'm not seeing the issue.
Ever done store inventory? It's one of life's little joys.
I wouldn’t say utility but the courts ruled recently it’s a public forum; the same logic applies.
Multi-protocol Minecraft-compatible client written in Rust
FastComet Review #1 Managed Hosting – Advanced Speed and Security‎
I'm curious: were you expecting that my comment offer "an argument against the idea that you can work somewhere where they refuse to buy things like this, and still have it be a good job."?

If so, why?
Social media sites shouldn't fact check posts
The main criteria to qualify for that is that your turnover is less than $250,000 per year.
What part of the article is wrong, though?
If you're at the point where you'd rather pass a state argument around rather than use an object you've thrown out OO categorically and there's no point to even discuss anything. The article in question talks about when it makes sense to use functions within the OO paradigm instead of classes.

Generally using classes when modelling persistent state is not an anti-pattern, because that's what classes are for.
His cppcon talks are very insightful and interesting.
But it does have class scoping rules. You can have public and private static members.
I am strongly hoping that the 8GB Rpi + NexDock would be a good low cost laptop for web browsing, text editing and terminal.

I've been turned off from investing in a new laptop for a variety of reasons:

- Apple has made questionable hardware design decisions lately. If Louis Rossmann is to be believed, the T2 chip + secureboot situation is just as bad as the old keyboard situation. It sucks having no say over the hardware.

- Apple's newest Catalina OS has been strangely unstable for many (including me) and is headed in a strange direction. It sucks having no say over the software.

- Intel's chip vulnerabilities are too many and too confusing to keep track of. While their chips are advertised as "Quad core @ 2.4Ghz", I wonder what the actual performance is when all the kernel protections are enabled.

- AMD's Ryzen 4000 products look amazing, but (almost?) none of the laptops are 13" with high quality screens.

A "laptop" composed of 8GB Rpi + NexDock would allow me much greater control of the hardware and software.
Interesting, first I heard that NY copied Italy. I thought it was winter HVAC and overzealous ventilator use, but yeah, that would do it.

SF didn't really do anything, including testing, until very late, so we never needed more patient space, ironically. (We actually gave away 500 ventilators early on.)

I believe that's due to many Bay Area residents shuttling between SF and China, essentially starting a very early herd immunity in Dec. The Santa Clara dashboard makes corona look like a seasonal flu - there's numbers, but nothing of concern yet.

It was reported that at the end of NAMM on Jan. 24, planeloads of Chinese travellers disembarked at LAX, all wearing masks, so they knew what was up. (That was also the day Disney closed their Shanghai property due to corona.)

https://www.cnbc.com/2020/01/24/shanghai-disney-shuts-to-pre...

You would think closing a Disney theme park would catch the attention of the CDC or somebody in our government, yet here we are.
If you are feeling tired while reading this short article, it’s already
-er classes! (shakes fists at the sky)
Thank you. This is what I meant.
Previous discussion: https://news.ycombinator.com/item?id=15360509
Of course: they'd be a publisher in that case. However, I don't think they would last long as a company without platform protections.
This is why I personally am very reluctant to the sharing of well founded ideas on platforms such as github, in hackathons, in competitions, in recorded speeches etc. How unlikely it may seem, this is a great example that ideas with traction do get picked up and copied, and the originator screwed over. I honestly sometimes feel as if the openness is pushed and saluted, but with the ulterior motive to skim for ideas.

Edit: corrected autocorrect
UK is generally an outlier when it comes to the second hand market for some reason.

Our used cars go for peanuts compared to used cars in the mainland for example.

I am often trawling the UK ebay for tech stuff because it's so much cheaper than Blocket (a craigslist-like) here in Sweden.

PS: very very pedantically and technically, UK isn't an EU member any longer. Although there is some limbo period.
Nice job, this is great.
There's one big difference in terms of convenience in many common implementations of classes and methods. There are essentially three different pieces involved:

In OO notation, we have A.B(C)

In almost all languages, you can store C in a variable and supply it "later":

z = C
A.B(z)

You can also store A in a variable and supply it "later":

x = A
x.B(C)

However, it is much more rare to be able to store B in a variable and supply it "later". Often, you must store A.B:

xy = A.B
xy(C)

This means that at the time you select which method to call, you must also have at your disposal the instance on which you want to call it!

With functions, things get easier. If you have B(A, C), you can generally just store B in a variable on its own:

y = B
y(A, C)

Some OO languages allow you to store plain methods that aren't yet bound to a particular instance (JavaScript, modern Java) but far from all do, without resorting to inconveniences like

y = lambda o: o.B

Please note that what this workaround accomplishes is effectively to turn the method into a function!

I suspect the main argument here is that it just doesn't make sense notationally to treat the first argument to a function specially. It only introduces wierd edge cases that have to be worked around. Plain old function notation has stood the test of time for good reason: it's flexible and handles most of the common cases we want.