444 karma · joined September 28, 2020
Hmm, what? Do you mean like max 4 participants in Teams calls? No I don't think there's a restriction like that, it should work exactly the same as the Electron version. Our team also has more than 4 people. Maybe you are thinking some restrictions on the free version of Teams? If you or your company is paying for Teams/Office, then you get the same "premium" features on the PWA as you would with the Electron app when you login.
If you go to teams.microsoft.com with Chrome or Edge and login, it should suggest installing the PWA [1].
1: https://www.omglinux.com/microsoft-teams-pwa-now-available-o...
I mean it's still Teams so faster here means still not fast at all, and it still suffers from many other UX problems, but definitely worth trying if you are forced to use some form of Teams.
Yes, versions aren't usually pinned at the package-level, so if you install a new dependency that introduces the trojan to the project, then yeah your are compromised. Not sure if that happens to "millions of servers" in a few weeks tho, it'd have to be a pretty popular package at least and remain undetected when these millions of developers presumably test the new code that their new dependencies introduce.
Having versions tightly pinned in the package-level isn't a free gift. It'll lead in lots of duplicated versions of a practically same package being installed and ran when two higher level dependencies have a transitive dependency to sligthly different (but in practice compatible) versions of the same package.
Edit: I agree with the points about sandboxing and permission configuration, etc, though. That's hopefully also coming to Node at some point.
Nor does their message come across as "why don't people do this" to me.
> Until recently though, I wasn’t sure how to make this step feel incremental.
Seems like they genuinely just found a neat way to do a thing and wanted to share it.
Hoping they'll get more content out soon.
})();
With this way of invoking, `this` will be `undefined` in "strict mode" (i.e. if the file or parent function has 'use strict' or if we are in an ES module), and Window in "sloppy mode". foo = function() { console.log(this.n); };
You cannot possibly know what "this" refers to when the function is eventually called. Is it some object? Is it the surrounding class or function? Is it window? Is it undefined? Is it the function itself?There's no way to know, because it hasn't been decided yet. Deciding what `this` refers to in the "normal"/non-arrow functions is up to the caller.
o1.foo();
Here, `this` will be o1. o2.foo();
here, `this` will be o2. o1.foo.call("hello")
here, `this` will be `new String("hello")`.That's what the parent commenter meant by "binding this at the call site".
Classes are still very common out there, despite the popularity of e.g. React function components etc, and `this` is pretty essential with classes.
import { map, takeWhile, forEach } from "iterlib";
getPlayers()
|> map(%, x => x.character())
|> takeWhile(%, x => x.strength > 100)
|> forEach(%, x => console.log(x));
1: https://github.com/tc39/proposal-pipeline-operatorAt least in the array grouping proposal, they did evaluate amount and popularity of possibly breaking sites, before eventually renaming the method from .groupBy to .group
I guess having data center inside EU could be a plus for EU citizens?
It should be an AF/MF toggle in the lens.
One reason I've heard is that enums allow you to do rename symbol refactoring in all use sites, but like what How often do you need to do that? Once in a lifetime? Twice? And with string unions you can ofcourse also just rename it, TS will tell all the places that need fixing, and it'll take couple hours to go though 1000+ usages of it.
I guess my point was more about the reasons behind these weird rules. AFAIK interop with existing JavaScript was not the primary reason for doing them this way, if that's any consolation.
FWIW your example wouldn't fly in Flow
https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVBjGBDAzrsAQQDsBL...
FWIW the lack of explicit variance annotations (and probably many other TS unsound design choices) are not so much related to supporting old untyped JS, but rather language design decisions that have to do with pragmatism and type system complexity.
I can't find it now but I have a vague recollection Hejlsberg talking about the explcit variance annotations explicitly, how those were a huge can of worms in C# and they didn't want to bring them to TS. Unlike Flow, by the way, which does have explicit variance handling and doesn't suffer from the beforementioned foot gun (but does have its own foot guns of course).
Here's what I use with yarn, install.sh:
#!/usr/bin/env bash
yarn
function run_install() {
local dependency="node_modules/$1"
if [[ -d "$dependency" ]]; then
yarn --cwd "$dependency" run postinstall
fi
}
run_install 'esbuild'
run_install 'other_package'
...Personal system-wide config:
npm/yarn config set ignore-scripts true -g
and add & commit a .npmrc/.yarnrc file with ignore-scripts true
Yes, this will cause headaches in some (increasingly rare) cases where some package actually needs those scripts. You can fix this with custom install scripts that take care of running install for those specific packages.And yes yes, as people love to point out, this isn't exactly a bulletproof solution either. The attacker could just put the malicious code inside the package's code and wait for it to be actually executed. But again and again, they don't, they choose to use the package's install scripts as the place to do their dirty work.
So in practice this policy would've alrady protected you from who knows how many of these attacks, and my guess is that it'll continue to do so.