1,898 karma · joined Feb 5, 2018 (8y ago) · 703 submissions
comment 6y ago · link · parent
comment 6y ago · link · parent
For the first example, I don't see how it has anything to do with C#.
For the second example, I assume it works like Matlab? By "discard" it just suspends the print, but if you use something like `a = 1;` it still assign 1 to a? If so, I think it's perfect fine for notebook-like interactive shell.
comment 6y ago · link · parent
comment 6y ago · link · parent
But I think your second point is more to do with the fact `import` by default imports `default` instead of the whole thing.
If you use import * as x from 'x'; then `const {y} = x;` works.
I personally will consider it is `import from` being different from a typical object instead of {x} here being different from typical destructuring assignment (by that I mean they still follow the same pattern; not necessarily say they're the same thing.)
comment 6y ago · link · parent
When converting TypeScript that using `import default xxx` to JS using `tsc`, it would convert it to something like `exports.default = xxx`.
To import it, you have to use `const XXX = require('./mo.js').default` instead of just `const XXX = require('./mo.js')` in plain ES6 JS.
This is fine but Babel used to [1] be able to convert `const XXX = require('./mo.js')` to valid code, which made lots of people wrote it (incorrectly) that way (I was very baffled why people wrote like that since it does not work in plain ES6).
comment 6y ago · link · parent
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
comment 6y ago · link · parent
The varieties are very low, and (therefore) prices are ridiculous.
You can argue their price is the same as Amazon for the ones the have, but there usually are plenty of quality cheap alternatives online (Amazon Basic, monoprice, etc.).
comment 6y ago · link · parent
I agree, Wikipedia indeed does enough to attribute, but I'm still a little bit concerned about the specific "Attribution Requirements" listed on the File page (second block under #Licensing).
Basically it states, modified or not, you need to keep the source "below the map", which some Wikipedia article pages obviously don't.
What's your take about this "requirements" statement? Does it carry any weight, legally speaking?
(By "concerned" i'm not saying UN would have an issue with Wikimedia, just the technicality with such requirement).
comment 6y ago · link · parent
Some of their pictures on Commons, such as https://en.wikipedia.org/wiki/File:Belgium_-_Location_Map_(2... , are from UNOCHA (United Nations Office for the Coordination of Humanitarian Affairs).
UNOCHA specifically asks their work to be 'Credit as follows: "Credit: OCHA"', but obviously Wikipedia don't do it on their article page if you just embed the picture, you have to click on the picture to see the credit.
Actually, they even went further and removed the "OCHA" watermark from the original image (see File History).
To be honest, I wasn't super satisfied with the answers I got there (see ref), but then again I'm not familiar with this topic.
[1] https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(policy...
comment 6y ago · link · parent
Coming from a relatively "homogenous" (for lack of a better word) ethnicity, I think I can see a point to generalize something like "this is how X people teach their children math", but "control anger"? This seems to me a very personalized thing that varies wildly from family to family.