Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mark_and_sweep
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
91.
▲
by
mark_and_sweep
5y ago
Why would GitHub integrate DocC output? GitHub Pages doesn't have any other integrations, it's just a webspace for static content.
92.
▲
by
mark_and_sweep
5y ago
Seems like an unnecessary layer of abstraction to me. If I'm in a webbrowser anyway, it's much easier to open the console, write decodeURIComponent(`<your_encoded_query_here>`) and look at the decoded query rather than havin
93.
▲
by
mark_and_sweep
5y ago
Deno is still quite a young project. I'm sure it will be added in the future.
94.
▲
by
mark_and_sweep
5y ago
Agreed. As I said, it would be convenient, faster, and most importantly, guaranteed to be error-free.
95.
▲
by
mark_and_sweep
5y ago
I think part of the reason that we don't have such a function yet is that it is essentially a one-liner if you use decimal notation for entities: function escape_html(s) { return s.replace(/[&<>"']/g, m =&
96.
▲
by
mark_and_sweep
5y ago
As always, depends on your use case. I'd say it has lower friction in general since Deno is using Web APIs, e.g. the fetch API is built-in (see https://deno.land/manual@v1.9.1/runtime/web_platform_apis ).
97.
▲
by
mark_and_sweep
5y ago
Any JS that runs in the browser runs in Deno, too - so that's quite a few libraries... If there is a Node-specific library, i.e. a lib that uses the require global, the fs module, etc., then you can, in many cases, use the Node compat
98.
▲
by
mark_and_sweep
5y ago
In 2021, I think it's safe to start a TypeScript project with Deno.
99.
▲
by
mark_and_sweep
5y ago
It's sort of opt-in. For websites, FLoC cohort computation only triggers if you call the document.interestCohort API or load ads - these actions are considered an opt-in. ( https://github.com/WICG/floc/issues&#
100.
▲
by
mark_and_sweep
5y ago
You may have to audit third-party scripts before using them (which is not a bad idea regardless of FLoC). If you load Google Analytics on your site, I feel like you have no right to complain that it may track users...
101.
▲
by
mark_and_sweep
5y ago
FLoC cohort computation only triggers on websites which call the document.interestCohort API or load ads. So your average website does not have to opt-out. It's not opted-in in the first place.
102.
▲
by
mark_and_sweep
5y ago
I think you can enable/disable FLoC via chrome://settings/privacy or chrome://flags. See: https://github.com/WICG/floc/issues/103#issuecomment-8218146... Then again, FLoC is only
103.
▲
by
mark_and_sweep
5y ago
Yes. Take a look at this issue: https://github.com/WICG/floc/issues/103 Then again: "final design is still subject to change based on [Origin Trial] feedback".
104.
▲
by
mark_and_sweep
5y ago
FLoC cohort computation only triggers on websites which call the document.interestCohort API or load ads. This is not quite an opt-in. But a blanket opt-out isn't necessary either.
105.
▲
by
mark_and_sweep
5y ago
Weird question: What if a user actually wants to opt-in but the site has opted-out? Should user opt-in override site opt-out?
106.
▲
by
mark_and_sweep
5y ago
I believe so. Recently Deno started running a subset of the Web Platform Tests to test compatibility. See: https://deno.land/manual/contributing/web_platform_tests
107.
▲
by
mark_and_sweep
6y ago
If you want to do this on Windows, I'd recommend giving https://scoop.sh a try.
108.
▲
by
mark_and_sweep
6y ago
At first, I wanted to read the article. But having to wait more than one minute to submit my cookie preferences, I closed the tab and left. If anyone at Docker is reading this: Please reconsider your cookie banner implementation.
109.
▲
by
mark_and_sweep
6y ago
There were 5 arrests for firearm offences, a cooler full of molotov cocktails and 2 pipebombs. https://www.theguardian.com/us-news/2021/jan/07/ashli-babbit...
110.
▲
by
mark_and_sweep
6y ago
Agreed. winget is lacking most features I absolutely need from a package manager, including listing installed packages, uninstalling packages, and updating packages. These are all on the v1 roadmap [1], but for the foreseeable future I'
111.
▲
by
mark_and_sweep
6y ago
Here's a quick example of how to use import maps to get Node-like imports for ES modules distributed on NPM like lodash-es: https://gist.github.com/MarkTiedemann/4ac5837195f52d24bb1dec...
112.
▲
by
mark_and_sweep
6y ago
If Deno was only "Add TypeScript support", "Add security capabilities", and "Add URL imports", etc. it would simply be a new version (or multiple new versions) of Node. These (and other) disruptive breaking cha
113.
▲
by
mark_and_sweep
6y ago
Sorry, jQuery was a bad example - I remember jQuery not working in Node at all, but that was roughly 10 years ago. Things have improved. The fact remains that the most popular JS env is the browser. It has APIs such as window which are not
114.
▲
by
mark_and_sweep
6y ago
Last time I checked jQuery was used on 9 out of 10 websites using JS with 8 out of 10 websites being powered by PHP. How dare Node not be compatible with the market dominating jQuery! Silly server-runtime not having a browser window object!
115.
▲
by
mark_and_sweep
6y ago
I have no data to prove this, but I feel like TS is far more widely used than CoffeeScript and Dart have ever been. Support for Dart in Chrome was added before Dart was popular (if you can even consider it popular at all). Since TypeScript
116.
▲
by
mark_and_sweep
6y ago
> Deno as great as it sounds doesn't offer enough benefits (...) Deno feels just like an opinionated node/Typescript distribution with too little improvements Node is 11 years old. In the beginning, it was rough around the edge
117.
▲
by
mark_and_sweep
6y ago
> Not everyone wants to use TypeScript. You don't have to use TS. Deno runs plain JS, too. > [TypeScript] will probably become obsolete once optional type annotations gets added to JavaScript. What makes you think that type annot
118.
▲
by
mark_and_sweep
6y ago
> Personally I appreciate being able to choose my linter, compiler, dialect etc. (...) Deno running the entire environment is a negative for me, at least for now. Nobody forces you to use the deno dev tools. You can still run eslint, pre
119.
▲
by
mark_and_sweep
6y ago
> Also, it seems as though ./node_modules/ being the default could be assumed automatically though, no? No, there is no magic node_modules directory in any other JS environment, other than Node. Deno aims to be compatible with
120.
▲
by
mark_and_sweep
6y ago
> I just wish they also supported importing from local npm packages installed in node_modules without needing to specify a URL/full path. Import maps allow you to do that, see: https://deno.land/manual/linking_t
More ›