skysight-inc/HackerNews huggingface dataset:
Yo, React fanboy nitpicking missteps in the article here, so keep that in mind while reading this comment.

> All browsers love plain JavaScript or Vanilla JavScript because this highly efficient code can be parsed and executed faster than any other. Because it is plain JavaScript, your code changes the DOM directly. Svelte does not need a virtual DOM to simulate fast updates to the user.

Slow down. We all deploy plain JavaScript, no browser supports any other language.

Improving parsing and execution (at language level) bring very little improvement with Svelte over (for example) React. On the other hand, the absence of library functions to call may indeed flatten the call stack and give the perf boost promised by Svelte, but this requires Svelte to not being a library at all (more on that later).

This is also wording issue. It should have started with «the browser, mostly built around imperative structures, loves direct imperative changes to the DOM, and that’s how you MUST build the most efficient app interactions».

> At deployment, you get vanilla JS, that running in your browser. Fast and plain JavaScript

Again, wording!

> Apps developed are highly compatible. For example, if you develop a timer in Svelte, you can use the compiled version of your widget in any other framework. Why? Take a look at No. 1 it is VanillaJS.

(Point n. 1 being the previous quote)

This is not correct, or at least misleading. Every `.svelte` does indeed export an autonomous class that can be instantiated directly and mounted to a `target` DOM node, but that’s because Svelte is “embedded” inside the class.

In React you _can_ export a function which given a target DOM node mounts the app through `ReactDOM.render()` without the caller needing to have access to ReactDOM, it’s just not how you use components.

I have to admit that having that approach baked-in can be useful.

> The maintainers are free in their choice of the features they want to include in the framework. As Svelte itself is not in the compiled JavaScript output […]

I don’t remeber who said that but I once found this gem: «The most fantastic trick C has ever done is making everyone believe that it has no runtime».

That’s the same topic here, that’s because Svelte has a non-zero amount of shared code. Yes mostly utilities, but yet… it is shipped with yout code!

Listen, we all agree that they smartly moved a considerable amount of logic from the run-time to the build-time and we all rejoyce at this awesome competition, but this article is overlooking at how much is still happening behind the scene and how much code is still placed in the compiled output.

- - -

One final note: I know that Suspense is now a running joke in the JS world and I’m just making fun of myself here, but I really want to see how Vue and Svelte will compare to the ergonomics the new concurrency features when they’ll land in React.
Yep!

The simplest way to get a typescript setup is via https://github.com/sveltejs/template.

$ npx degit sveltejs/template svelte-app
$ cd svelte-app
$ node scripts/setupTypeScript.js
$ npm install
$ npm run dev

Then you're good to go. When you define a <script></script> block in a Svelte file, just be sure to specify the attribute lang="ts". In VSCode with the svelte extension you get intellisense based on types info.

<script lang="ts">
let name: string
</script>

<input bind:value={name} />
Neurotoxic peptides isolated from venom of giant Australian stinging tree
How does collecting donations via PayPal work? Isn't it that everyone who donates is doing something similar to a purchase, so you would have to collect VAT depending on where you are and where the "customer" is?

At least this is how I think it would be in Europe. But I would imagine similar rules for VAT are in place all around the world.
If a CEO can justify such a salary then it is very much for-profit ... your argument is just a play with words.
Some important features such as about:config access has been neutered in the latest firefox mobile. The ability to fully customize the browser is an important feature for the enthusiast folks you mentioned, so by removing access to about:config they effectively alienate their most important and vocal users.
> At any time within Emacs, you can evaluate Lisp code to extend or modify its functionality.

This is also true for VS Code (with JavaScript instead of Emacs Lisp of course). VS Code is just a bit more organized on the surface, giving it significant advantages over emacs in that regard, but also a bit more closed in culture.
We knew that already, did everyone forget the Yahoo fiasco?
>Neurotoxic peptides from the venom of the giant Australian stinging tree [full article]

https://advances.sciencemag.org/content/6/38/eabb8828
Well, poor people who have to choose between Food and Rent i.e. really economically backwards can't afford woodland shoes and a new fancy phone every other month!

Alao for that matter, Sparkx sandals and shoes too last years, much cheaper option..
My First Open-Source Project: Building AmazonPay Gem
Sure, but that's usually a winning scenario. It means whatever they're doing is successful enough that it doesn't require donations.

In this case people were supporting AI research. Well... it worked :) GPT-3 is likely to open the AI chapter in history books.

For another example: you support cancer research and they find a cure. You can't expect everything else (trials, approval process, manufacture, distribution) to work on a donation model as well. I mean, probably there are 15 year olds who'd seriously ask "why not", but leaving them aside - going commercial means you won.
CMake might be the best thing we have in C++, but god does that fact tell you what we have to work with. I've never delved far into CMake, but I regularly make two observations that make my shy away:

1) Every time some "guide" gets posted on the programming communities, there's people pointing out mistakes, deprecated functions or alternatives.

2) If you look at the CMakeLists.txt files of various popular libraries, they all look different. There's some commonality but much less than what you would desire from a more or less standard build system.
Aren’t you describing personalities instead of subsystems?
Yes.
It disables many (all?) mozilla integrations such as password manager and intermediate certificate preload.

I prefer to use the story network with standard Firefox because I value the mozilla features except for Pocket.
The real reason is that CMake became a dramatical better tool just before version 3.0, and it has been improving since.

That's what people call "modern CMake".

The scripting language remains awful, though.
> He didn't bring his views into the office. He had them outside and the alphabet mob lit them as a Molotov cocktail and threw them into the building.

He made a public donation in his own name to a very divisive cause. That is a political statement if there ever was one and set the stage for a confrontation with at least a sizeable fraction of the company he as supposed to want to lead.

> Those employees could have quit and worked somewhere else too.

Yes, they could have. And they might have had Eich stayed on.

> In a lot of ways that would have been great as they could have cut down on a couple of the pointless projects.

Contrary to managements' viewpoint programmers are not fungible, and you can't just drop them into each others projects on a whim. What if the bulk of those that left had worked on FireFox?

> By your standard it's impossible for anyone to both have public views that disagree with your own and be the head of any large organization.

Why do you think CEOs are normally speaking quite careful about such public statements? Precisely because there is the possibility of backlash.

Surely this isn't news.

> Money in politics is the great equalizer. It's as democratic as it gets.

Abject nonsense. Money in politics means that wealthy people get to vote many more times than poor people. An equalizer should make everybody more equal, not less equal.

> Otherwise you end up with a handful of media and tech oligarchs controlling all messaging.

Yes, like Rupert Murdoch for instance. Oh, wait.
I happen to like that though.
Well, C++/CLI support was the biggest feature for the .NET Core 3.0 release, so it does matter.

Although I do concede that most likely Microsoft would happily get rid of it, and have everyone make use of C++ code in .NET via UWP components instead, preferably using C++/WinRT.
> “Technically necessary cookies”

That is a thing under GDPR. In this case, they store if you consent or not.

Of course, this is another example of a non-compliant site as accepting is easier than rejecting. The site owner might as well remove the gate completely.
Mozilla (market) share ;)
This is one of the main reasons why I prefer living in big cities. Compared to other places I've stayed, it makes it a whole lot easier to build and maintain human connections with people whose preferences and interests overlap with mine.

I also do plenty of activities I'm not really interested in for the sake of socializing. But always just adopting to whatever is most popular at a given time would be soulcrushing to me.
Still not as good. With chrome flow tab ui I can rapidly scroll through full width page previews, and I can initiate this by swiping from the top down. In Firefox the tab previews are so small as to be almost useless, and I have to press a button.
One of the reasons PDFs are still so common is they do their job pretty well, i.e. accurately displaying documents.

Any alternative would need some very compelling reason to use it instead. Take Microsoft’s XPS which I think is it’s closest rival. It is an open standard based on XML. It’s built into Windows, Office, and many printers support it natively along with major software vendors, but I can’t think of a single time I’ve come across an XPS file online.
How to set up macOS for Node.js
The IRS would disagree with this.

Mozilla Foundation has a staff of 80 and "manages" about 1000 volunteers. It's unclear how much donations it gets as they published a consolidated report that includes the corporation. I expect that very little.

Mozilla Corporation has a staff of 750 and $400M revenue (I expect most from the Google search deal).

https://en.wikipedia.org/wiki/Mozilla_Corporation

https://en.wikipedia.org/wiki/Mozilla_Foundation
With chrome flow tab ui I can rapidly scroll through full width page previews, and I can initiate this by swiping from the top down. In Firefox the tab previews are so small as to be almost useless, and I have to press a button.
Why did I leave my stable job in the middle of a pandemic?
Meh. I think it's self-evident that sometimes you have no choice but to half-arse things, but my experience is that it's better to full-arse one thing at the expense of not being arsed at all with something else. A hidden advantage is that once full-arsed the first time, the second time a task is done, it doesn't take much more than half-arse effort.
Only partly true - you can install adblocker for safari on iOS and block ads just fine.
Thanks, I was reading too fast and just took the first number I saw.
> the tone at the beginning seems to be in a derisive tone

I am frankly curious of what exactly you perceive as "derisive" in the first part of the article (first paragraph?).

I have to say that I subscribe to every single line of this article, which I find well argued and perfectly aligned with my views and concerns.

And I am frankly surprised that anyone can describe it as "difficult to wade through". I find it very clear, simple, and absolutely reasonable even assuming a point of view different from my own.
Ask HN: How do I get to know if my pattern-matching solution is the fastest?
Greetings! I'm hoping you smart people out here can help me.

For the last week I've been working on an exact-pattern-matching solution, and my code hit the limit to what's possible on my machine. On my win10/7300HQ/2667MHz single channel DDR4, running mostly isolated on a single core, it crunches through 512megs (random [a-z,A-Z]) in 58 milliseconds (faster with actually random data) looking for a Needle the size of 8 bytes, but it's not fixed to that length.

I wanted to compare it to ripgrep, but there's no way of getting the numbers for its comparison algorithm only, so it'd be unfair.

Short of scavenging github for (apparently mostly) C code (which I don't speak, and I really want to avoid installing Visual Studio)
to use for comparing, I don't know what to do. Worse, looking through the code I've found, despite not speaking it,
made it look pretty obvious that all these solutions out there aren't going to beat mine,
because they contain far more instructions, memory accesses and comparisons/branches than my own.

I'm not trying to brag. I'm rather desperate and hoping that someone can help me solving my problem.

Is there a benchmark suite of some sorts (a binary?) I can download and feed with my own haystack/needle?
Is there some "known to be fastest" pattern matching program I'm unaware of, which I could use for comparing?

And what is the gold standard for exact pattern matching anyway?
I know of Rabin-Karp, Boyer-Moore, but I'm not convinced they actually qualify for full range pattern matching,
instead of looking for text strings specifically.

PS: To give you some context about me: When it comes to programming, my friend says:
"[he] isn't happy until the speed of his code approaches the theoretical limits of light."

I've hit the limits on my machine short of running it on multiple cores,
but there's no point in doing so when I can't compare it to anything.

Thank you for any possible help/advice you can give me.

(My apologies for the formatting. I can't seem to get this looking right)
Thanks for the link, wasn't aware of the details. While I 100% disagree with him on marriage equality I don't understand why he was driven from his role that has nothing to do with Proposition 8. Why did his freedom to support a cause with his own money result in him having to resign, seems anti-democratic to me.
If played smart Mozilla could be another. I have some ideas about how this could be achieved but Mozilla in its present day configuration would never be able to make any of them work so I'm curious to see if and how they will get out of their current predicament.

So far what I am seeing and hearing does not make me very hopeful.

FF will be my daily driver until they stop updating it, where FF does not work I very reluctantly use Chrome. I suspect that if and when FF dies Chrome will no longer be available for Linux because the main reason for offering it (as an alternative to FF) will be gone.
US elections by the looks of things.
How did you find out?

What happened after that?

I think somehow somewhere there're real friends for you to find. Possibly simpler to find if you do new unusual things you didn't try before? Or maybe try a different city or country (if work allows)
There's an entire industry built on half-arsing and it's called machine learning.

Instead of understanding the system you are trying to control, you train the machine with some data and hope for the best.
I kinda learned CMake on the fly by trying to (and sometimes failing to) use other external C++ libraries. (I’m still not an expert in it though.) Some of the packages had perfect CMake integration (find_package just works), some had to be manually compiled to a library (via add_library), and some used a custom script for installation such that I needed to write a FindXX.cmake file from scratch. You basically learn by haphazardly throwing yourself against the wall multiple times. “Modern” CMake tutorials will help to a certain extent, but the examples they use only use perfectly modern-CMake-ready libraries; real life is often more cruel than that! (especially when you’re doing 3D graphics and need to deal with all sorts of esoteric legacy systems).
I am frequently impressed with both the level of incompetence that creeps its way into the csuite, and the lack of accountability they can insulate themselves with.

Poor leadership abounds.
I come from a very conservative family, at least among my father's family there have been also religious fanatics. That was hardly part of my life luckily, on the other hand open dissent (from younger ones) was hardly ever accepted. It was either met with ridicule, anger or shock. Actually both my mother and my sister also have been influenced a lot with their job choice. For me it has been quite a struggle to choose the studies and job I want to do involving stopping contact with my father almost completely without being faced constant criticism, persuasion and ridicule. Also showing showing happiness is expected.

For me it's completely counter-intuitive what is acceptable and what not in terms of disagreement or even which opinions are okay to voice. I had to "manually" learn this.
Thanks!

Not sure how to fix that, TBH. That text is configurable (e.g. for other languages) and I don't like "result(s)". I'll think about it though ...

Haha, yeah you could be right about it being hard to sell. We'll see. This was a side-project with a relatively small time investment. A bit of an experiment, really ...
Simplest possible GraphQL+TypeScript back-end as a service
Louisiana voter registration portal mysteriously shuts down on Registration Day
Ranked-choice voting (and its Arrow equivalents) necessarily gives the worst outcome of any voting scheme, specifically it matches the least voting preferences[0][1].

Two-outcome FPTP on the other hand does not fall to Arrow’s impossibility theorem. This is the system most states in the USA effectively have.

Intuitively, the least remarkable candidate will be elected because the opposing sides will reciprocally downgrade the candidates perceived as better. For instance Hitler was a result of an alternate voting scheme [2].

[0] https://plato.stanford.edu/entries/arrows-theorem/#NonDic

[1] https://news.stanford.edu/news/2011/november/devlin-ranked-v...

[2] https://en.m.wikipedia.org/wiki/1932_German_presidential_ele...
Git Commands You Didn't Know
I just wanted to weigh in that I am in the codespaces beta and it's working quite nicely!

The experience is exactly what you'd expect, all the VSCode extensions mostly work and development is pretty smooth.

The only bad part is that I (ironically) wish it felt more like an "App" and not a browser tab.
The leader of a large tech company was the government to ensure his gay and lesbian employees can never legally get married, despite straight employees enjoying all the personal/financial benefits of marriage.

I don't care if it had 50/50 support. It's dead wrong. 50 years ago there were places in the US where interracial marriage had 50/50 support or less. Still dead wrong.
CMake is a hell for medium/large projects.

Builds are not hermetic/reproducible. When doing deep change of CMake files, the only reliable way to verify it is correct is to clean and rebuild everything.

CMake is very very slow. A minor change in CMake file results in CMake re-evaluation which is very slow for large projects.

CMake language is just pain.

And CMake does not have cache. CCache helps a little, but it’s still much worse than cache of proper modern build system.

I would probably recommend Bazel for building C++. Works like magic. Although if you hit Bazel limitations (likely you won’t but still), you don’t have many options how to deal with it. You never need to clean Bazel cache whatever you are doing (unless you are intentionally trying to break it of course).
I also read it as there simply being some domains where Haskell is not well suited.

I like using Haskell for writing compilers, but I would probably not like to use it for numerics code. While I could replace Haskell with Idris, I'm still a bit lukewarm on the cost-benefit of heavy use of dependent types for many programs (although Idris has other nice advantages unrelated to the type system).
Too much, or too little, both can be bad. Also in other areas, like, eating or working out
I always think CMake is so simple, there's nothing to it. It is maybe awkward to write compared to python or whatever, and kinda ugly, but it is very easy to learn, you can do anything with it (eventually), multiplatform, and has several back-ends, like make, ninja or IDEs.

The issue you linked to was changing the environment after running the "configure" step, but the availability of the header that had been newly installed was cached to "not available", so re-running cmake used the cached "not available" instead of checking the system again. Or something like that. Seems like a classic trade off of speed vs correctness. Something like SCons would always check everything and ran super slow, whereas CMake opts for not checking things that are less likely to change and caching the result. That shouldn't be used as a reason to throw away all the other good stuff CMake has :-)
You can also just delete the modal cookie dialog in the inspector toolbar.
To me, Haskell got great at "get things done quickly". With Stack (and Stackage), initiatives like "Simple Haskell", and upcoming RecordDotSyntax, it truly becomes a weapon of pragmatic choice to knock out working software as quickly as possible. And a combination with Elm (and code-generation of Api.elm from Servant types) makes a perfect match for SPAs.
> I would say algebraic data type is the number 1 reason Swift is becoming so popular.

Let's not kid ourselves - iOS is the #1 reason Swift has any popularity at all. Outside of the Apple ecosystem Swift is practically non-existent.
Does your money get distributed equally? Ie if you put in $10/mo but only visit one site once, does it get all of the $10, or is there some sort of price per-view being negotiated somehow?
The CEO of the company spent his personal money so that his gay and lesbian employees could be discriminated against by the government.

THAT IS "bringing it in the office"
> Contrary to managements' viewpoint programmers are not fungible, and you can't just drop them into each others projects on a whim. What if the bulk of those that left had worked on FireFox?

Salaries are paid in dollars and all dollars are fungible. That money could have been saved for a future date, which is coming sooner than they think, when search referrals will no longer pay the bills.

> Abject nonsense. Money in politics means that wealthy people get to vote many more times than poor people. An equalizer should make everybody more equal, not less equal.

Oh but it does. The issue you seem to be having is that you do not want anyone to hear opposing view points. If your ideas are so great they should be able to stay standing when the masses learn about alternatives.

Or are you scared that it might actually change their minds?

>> Otherwise you end up with a handful of media and tech oligarchs controlling all messaging.

> Yes, like Rupert Murdoch for instance. Oh, wait.

Yes exactly. And also like Mark Zuckerberg, Jack Dorsey, Sundar Pichai...

At least with the free flow of money someone working in a non-media industry can channel the fruits of their labors to pay to spread their message.

Without that ability you're limited to whatever your media masters decide to let you hear.
I agree that trust takes a long time to build, but trust can be lost very quickly. Imagine a classic "trust fall" exercise. How many times do I have to drop you to stop trusting me?