skysight-inc/HackerNews huggingface dataset:
Show HN: SSVM – Speed up your Node.js apps with Rust and WebAssembly
Raw performance (the lack of) is always a contentious point for JavaScript, especially in our post-Moore era of computing. Node.js gets around this issue through extensive of use of native libraries and modules written in C, including the V8 JS engine itself.

But as application developers, how do YOU create high performance functions? Write in C and run as a NAPI module? Write in Rust and run as a V8 wasm? Well, there is another (better and faster) way now!

The SSVM is a fully featured WebAssembly VM that is optimized for server-side applications.

https://www.secondstate.io/ssvm/

You can write functions in Rust, compile to WebAssembly and run in SSVM, and access it as if they are JS functions in Node.js. Easy as pie. Give it a try (https://www.secondstate.io/articles/getting-started-with-rust-function/)!

By rewriting computationally intensive functions from JavaScript to Rust, developers could achieve 10x to 100x times performance (https://www.secondstate.io/articles/performance-rust-wasm/) gain in terms of startup and/or execution speed.

BTW, Why not just use v8? For starters, SSVM runs much faster than V8 (https://www.secondstate.io/articles/ssvm-performance/) and it also supports more server-friendly extensions than just WASI.

Any issued and feedback are welcome. Checkout the GitHub link: https://github.com/second-state/SSVM
Bringing VR Training Front and Center
What if you write code that isn't for a business? How does your workflow apply then?
Is R Making a Programming-World Comeback?
I can't be the only one that called it as soon as I read the word "pacemaker". Nice to see that the hospital still went through the troubleshooting flow chart though.
At the project’s inception, there was an agreement that the project would be contributed to the CNCF when it was mature.

If this is true, the authors could be sued for breach of contract (what the damages would be, I'm not sure). However, I suspect that this agreement was verbal or implicit and wasn't actually written anywhere.

As they say, a verbal agreement is worth the paper it's printed on.

Get your promises in writing, folks.
> acts as a mediator, so any decision around trademark takes soo much time and effort because CNCF has to get the blessing of everyone or build something neutral (like the k8s certification)

Sorry, but that's the nature of standardisation, and the price you pay if you want to show you're really vendor-neutral. For me, actions like these make Istio go from the almost de-facto default choice for a service mesh, to suddenly wanting to consider other stuff.

> and it's in their best interest that things are complicated as they can make money out of that.

I don't really see how money would be an issue here? CNCF is a non-profit, Google is not.
Greasemonkey is really great to customize websites for your [weird] usage pattern. (Tampermonkey[0] works in Chrome, Microsoft Edge, Safari, Opera Next, and Firefox)

XHR is a pretty decent api that ignores CORS[1]

GM.xmlHttpRequest({
method: "GET",
url: "http://www.example.com/",
onload: function(response){alert(response.responseText)}
});

[0] - https://www.tampermonkey.net/
[1] - https://wiki.greasespot.net/GM.xmlHttpRequest
Don't use products that are associated with it and let companies know. Paypal, BMW, Mastercard and quite a few others. It does make a difference. Maybe not today or tomorrow, but you can bet these companies will have an image of looking the other way and will feel the consequences. Don't overdo it and call them holocaust enablers or something far fetched, but letting them know how you see it is a first step.

Engaging in the same behavior is the wrong move, you would also hit innocent people. Responding in kind is a strategy that already empowered real fascists and is a bad idea in general.

I don't think we saw real positive examples of cancel culture. Alex Jones for example. Yes, some poor souls believed him and bought his man pills but he is certainly not responsible for the general lack of trust towards government or anything relevant really. He was canceled as a scapegoat.
Is writing tests more than functional code actually a bad thing? Isn’t that just a part of engineering?
Protest anthem banned in Hong Kong schools as new security office opens
> Shrek is an old meme and onions are stinky. Do you think that's a recipe for this to catch on by the next generation?

Yes, older members of Gen Z have already been enjoying Shrek "post-ironically" for years. Younger members of the generation are editing together clips of teenagers from the 00s as though it were some bygone halcyon era. Whether we like it or not the trends of reference and farce seem to be accelerating.
Which has nothing to do with elevating him into martyrdom. Most people just do the time.

He committed suicide because his mental state was not compatible with self preservation.

Not

He committed suicide because of an overzealous district attorney operating under misguided laws.

Yes, have the EFF try to dismantle the CFAA, yes, have the ACLU try to correct injustices. And then get judges to drop cases, or reopen cases, or get people's sentences commuted, etc.

My actual opinion? I honestly find it insulting to elevate his action, compared to all the people that take the plea deals, or go to trial and lose. Since everyone can so readily explain why he is dead, why is Ross Ulbricht not dead? That obvious answer [to me] is because he didn't kill himself and Swartz did! What about all the people railroaded, the disproportionately black Americans imprisoned and serving long sentences, is there a study to be had on how some segment of America has a surprisingly strong self preservation instinct? If thats something we value, then it really could be an answer to mental health for the people that have surprisingly weak self preservation instincts. Let me know if people want to actually have that discussion yet, because suicide talk is surprisingly not nuanced, seemingly out of fear of seeming insensitive.
Right, essentially you have to be aware that you are testing the state space the code might end up in, which is very different from just hitting every line of code or every branch.
> If you've used rsync/robocopy you might think it is ridiculous this product even exists

I mean, only if you also have no understanding of other people having different backgrounds, skillsets and experiences?
> It should be obvious to you, if it isn't, no amount of explanation will make you see it.
This is exactly the kind of logic that's often held by design non-professionals and which leads to an unusable mess of a UX if applied. This is not how design works.
Define data.
Twitter's actually worse I think, there's almost literally nothing nuanced you can write in 140 characters. The very nature of microblogging reduces discourse to "I'm right, you're wrong, shut up about it".

I don't think the world would be worse off if Twitter or even the concept of microblogging had never taken off.
if i got a dollar every time i started testing a piece of code, realized that it was waaaay to complex, refactored the code so the tests were easier to write/understand... i would have a lot of dollars.

100% of the time, it was the right idea and the code became a lot better.
For anyone interested in just consuming pictures/videos from Reddit without clutter, try https://popular.pics
I can't believe I'm wasting my time on another testing debate.

Speaking as a formerly young and arrogant programmer (now I'm simply an arrogant programmer), there's a certain progression I went through upon joining the workforce that I think is common among young, arrogant programmers:

1. Tests waste time. I know how to write code that works. Why would I compromise the design of my program for tests? Here, let me explain to you all the reasons why testing is stupid.

2. Get burned by not having tests. I've built a really complex system that breaks every time I try to update it. I can't bring on help because anyone who doesn't know this code intimately is 10x more likely to break it. I limp to the end of this project and practically burn out.

3. Go overboard on testing. It's the best thing since sliced bread. I'm never going to get burned again. My code works all the time now. TDD has changed my life. Here, let me explain to you all the reasons why you need to test religiously.

4. Programming is pedantic and no fun anymore. Simple toy projects and prototypes take forever now because I spend half of my time writing tests. Maybe I'll go into management?

5. You know what? There are some times when testing is good and some times where testing is more effort than it's worth. There's no hard-set rule for all projects and situations. I'll test where and when it makes the most sense and set expectations appropriately so I don't get burned like I did in the past.
I used to play on an adult only whitelisted minecraft server. It was setup in such a way that day-to-day gameplay was as close to pure vanilla survival as possible. Of course the adult part is really hard to enforce so the owner took a very interesting approach to it. Anyone could join the server but you would be put in spectator mode i.e. be unable to interact with anything but just tour the builds. Then you'd have to make an application that would be manually approved between 24-48h later. Just that delay was enough to weed out the impatient.

See the problem was not about the age specifically but rather childish behavior. So by realizing that we targeted the most obvious one( being impatient) and had great results.

So yea, making something deliberately harder to use might be just enough.
I sometimes wonder the same! The problem was at the time that I dread going to the bank to do anything (and I tend to do a lot of transactions, especially recently due to certain events).

I will definitely repeat the "experiment" in the near future, just as soon as it is feasible.
How to launch when the app directory rejects you
>for some reason the term 'early adopter' comes into my mind

As one who foolishly bought not one, not two, but three first-generation Apple notebooks, you are not wrong.
We asked them to. I was in the room. They said no.

TBF, we asked them to let us use the protocol, or make it part of IMPP, or get actively involved in IMPP.
It’s sociopath (not psychopath), clueless, and loser...
Have you picked which distro yet?
Global temperatures likely to hit at least 1C warming for next five years
Just to clarify, you don't believe anyone including yourself is self-aware?

If you believe you are self-aware then I suspect that it's more a problem of recognition than self-awareness being absent.

If you don't believe that you are self-aware, that's really interesting. Please elaborate!
That's not correct.

All tests protect the programmer against future mistakes. All tests are a protection against regressions.

But yes agreed, integration tests absolutely carry much more value than any unit tests might. Specifically because units tests tend to target things that are essentially implementation details.

The only time I'd say unit tests carry any value is if they're testing some especially important piece of business logic e.g. some critical computation. Otherwise, integration tests rank the highest in the teams I lead.
I assume that isn't free? And more importantly, is that even supported/allowed by VPS services? I'm definitely open to suggestions!

EDIT: As I mentioned in another comment:

> I thought one of the points of the article was the propagation and subsequent democratization of Tor/Onion sites? If I have to rent a VPS to run a node, isn't half the point defeated?
The costs of nuclear phase-out in Germany (2020)
Overton giveth, and Overton taketh away.
After clicking through several more times and ending up in a gitlab wiki, this seems to be how it works:

> It comes bundled with a fair amount of commonly used files, and serves them locally whenever a site tries to fetch them from a delivery network.

The docs, both on the site that is linked to and on the wiki is extremely bare bones, but the gist of it is that a CDN can track you through the `referer` header of the request for (say) jquery, since even if the browser has jquery already cached it will send out a request to check if the resource might have been modified.
Tests are most useful when they provide fast access to a code path for repeated testing during development, when the code path would otherwise be far removed from the normal course of user interaction with the software. This closes the debugging loop while you're developing new features, when it's applicable.

The second time, less often, when tests are useful is when making large changes with broad implications, and quickly verifying that everything still works and that you haven't overlooked some subsystem.

The least frequently useful application of tests is regression tests. 99 out of 100 regressions only happen once. If you add a regression test, it won't happen again (unless you overlooked something), but it was unlikely to happen again anyway.

Generally I write the first category of tests when I feel that it would be useful to solving the problem I'm working on. Then, when I finish the code, I commit the test, because why not? It's written. It'll never fail again, but hey. This creates a reasonably managable collection of tests which, more often than not, test the more complex (and therefore more fragile) parts of the codebase, and are a decent representative sample of all of the subsystems. This provides sufficient test coverage to support the second case. The third case is so rare that it can be addressed on a case-by-case basis.

The most stable software is software which doesn't change. Keep your scope small and your complexity low, and don't be afraid to mark a finish line. This is more effective than exhaustive automated testing.
SP 500 Equal Weight Index is down -11.63% YTD. (every company in SP500 EWI has the same weight).

Most companies in SP500 are down. Stocks hurt because of COVID are losing value, those who are not affected or benefit gain.

High prices in tech sector reduces their expected future ROI. That's completely acceptable because other investments are worse.
wow, I keep reading those "test is overrated" (second article, this week), and I don't see how would I survive, maintaining a 10K LOC rails application, without unit testing my models, services, finders, etc.. I guess Unit Testing is Overrated, Long live to Unit Testing!
Not the OP but I count integration testing as testing integrations /between/ systems - wherever your code depends on something outside your codebase. You can mock this for unit testing.

Don't mock things that are already in your codebase. Use the actual object.

Common argument against this I've heard is "But then when something goes wrong it is harder to figure out where the problem is" - I have never actually experienced this myself, but I have, very often, experienced being reluctant to do any refactoring because I'd have to rip up all the unit tests because they are testing only implementation details
Minimizing SPOFs During Summer Slowdown
> They're tied to the exact implementation.

If unit tests are tied to an exact implementation, they''ll fail on correct behavior and that's definitely wrong. It shouldn't matter whether X calls Z:Y or B:A first, whether it calls them at all, whether it calls them multiple times, whether it calls them differently. All that matters is that it gets the correct answer and/or has the same final effect.

Unit tests should be based on a module's contract, not its implementation. This is in fact exactly what's wrong with most unit tests, that they over-specify what code (and all of its transitive dependencies) must do to pass, while by their nature leaving real problems at module interfaces out of scope.
This is comically bad. Way too long and myopic but the points aren’t even useful points.

> “ unit tests are only useful to verify pure business logic inside of a given function.”

Yep, that’s one of the most important things you need to verify. You should also verify integration test success, and then the unit test allows you to immediately observe where is the failure: is it pure business logic failure when all external factors were mocked? Or is it integration failure? Or is your dependency flaky & untrustworthy?

Without unit tests you can’t (a) develop business logic in isolation from the external resources it will integrate with or (b) easily isolate what is a business logic error vs what is an integration error.

It’s just so dumb to use language like saying unit tests “are only useful” for this. That’s a hugely valuable thing to be useful for!

> “ no practical purpose other than making unit testing possible.“

This is incredibly bad circular reasoning. You must first already agree that unit tests confer no value, only then is this considered a point by the author. But if unit tests do add value (and they really do) then refactoring to facilitate unit tests also adds value!

The point about testing a hidden implementation is mixed. On one hand the example used here is just a bad example. On the other hand, testing a hidden implementation can be a very good thing because it assists the act of development in the first place. The test helps the person writing the business logic to write, by factoring into a test that's proof of correctness. Maybe it’s debatable that it should be removed like scaffolding when they are done if it’s a hidden implementation, but that’s really a local decision for a team to make. Sometimes it’s good leave those tests of hidden implementations because they add extra protection for changes that can have unintended consequences.

> “unit tests are expensive”

yawn.
Same point being made in the blog post. I do recommend others to read the post though - good stuff.
Functional / imperative doesn't exactly map on to these two concepts. "Computational" is often imperative and integration code isnt always imperative (a lot of react code would fit in this box, for instance).
There's no such thing as cancel culture.

The lack of self-examination and self-awareness is stunning in these types of responses of people who may have some problematic aspects in their lives.

>But the cultural revolution has entered its mass-spectacle Reign of Terror phase

The author is another person who is upset because they got called out on some problematic aspects of their work/persona, a lot of people agreed, and it turns out the problematic aspects had an adverse affect on their lives.

Sounds like a good time to self-examine to me.

I've had to eat crow sometimes. I always try take it as an opportunity to grow and reflect.
And yet they had bugs and could lose data.

Which shows 100% unit test coverage is not better than spending that time in other kinds of tests.
Same here, but then again, that article is from 2012 and I am sure I've read it before and connected the dots immediately.
I think you're confusing a relay and an exit node here. Pretty much everyone using Tor runs a node and for virtually everyone it's on IP also used for personal transactions. There are silly services which take every tor node as suspicious. They're wrong, but it doesn't matter if you get banned.
FWIW, the GKE acronym (also?) came about because GCE is GCP's core VM offering, Google Compute Engine.
I guess if animals do it, it’s ok to not hug my mother again.
Install UBlock Origin.
https://en.wikipedia.org/wiki/Margaret_Wente
I think I've heard of a place like this [0]...

[0]: https://news.ycombinator.com

Although hn doesn't have an exact assigned niche (it falls towards science and technology but that's not an enforced rule), it's fairly civil because the site doesn't need to make money and it's well moderated (almost to the point of authoritarianism, albeit that's not necessarily a bad thing in a website). A similar phenomona can be found in a place like r/neutralpolitics (heavily moderated to keep everyone on track, doesn't need to make money since subreddits are free).

This isn't feasible for a site the size of reddit though (they need money for servers and stuff), so federation is the only real alternative since each sub would pay (probably a provider, honestly, but they could selfhost) a little to keep their spot going. The trick is to make the federation invisible to the end user through some kind of reddit-ish frontpage site, which would be much like current reddit's frontpage but be accessing the federated subs, each with it's own moderators/janitors. This may be unfeasible, but it's the only way anything like reddit could keep free speech up. Add an easy to setup ad-network for each sub (they can opt-in to serve ads to the people accessing their sub's page, like Google ads on blogs) and it works. If a sub becomes evil just unsubscribe.
> just aim for 100% test coverage instead (with excluding some categories of files).

That's where the 'gaming' comes in.

The tests start just going through lines without hitting a single expect statement.

The ignore files start becoming battlegrounds in the PRs because people just exclude half the damn project.

We just have a simple rule... if you wrote code, you have to write coverage for it. If it breaks and your test doesn't catch the breakage, the bug fix goes back to you. Some people will ask "but what about what I'm working on now", you'll have to communicate that you feel your previous work was far more important.
If you haven't seen it, you might like Open Borders by Bryan Caplan and Zach Weinersmith[1]. Comic-book form advocating for open borders, with pretty good reasoning.

[1] https://smile.amazon.com/Open-Borders-Science-Ethics-Immigra...
on #1 and expert that can identify other experts is a force enabler and they offer more value by expanding the field of expertise laterally.

While saying that, just because one is an expert does not mean they are an expert at identifying other experts. It is it a skill set in it's own right.
I think it's not terrible - redis itself is just brilant !
But wow a search-redis ? I think they have a lotttt of ground to make up to compete in the search space. The amount of options/analysis/tokenization/other-search features you get out the box from anything Lucene based (solr,elastic) is just staggering.
In May, The Daily Wire was the #7 most-interacted-with publisher on FB. https://www.newswhip.com/2020/06/top-publishers-facebook-may... They have more interactions per article than CNN and Huffington Post combined.
One thing I think is not said often enough is that money might be a store of value on an individual level, but in the level of the whole economy, it is not. It’s just lubricant for making transactions. You can’t take a big pile of money out of the economy one one year and then spend it 10 years later. You would get deflation and unemployment when you took the money out, then inflation when you put it back in. That’s because money has no real value, it’s just paper or numbers in a database. Property and labor power have real value but not money. That’s why claims of there being a “social security trust fund” just seem bizarre to me- the account holding that money is purely imaginary and in reality they spent all the money collected right away. They had to spend it because otherwise it would have decreased the money supply. And whether the money they spend on the program later comes out of the trust fund or whether they just print it makes no difference. On the level of the nation as a whole, money is only lubricant. Not a store of value.