Live data from Hacker News

Node v8.5.0

nodejs.org

41–50 of 57 posts

Re: Node v8.5.0

#41
post #37
post #34

Earlier quoted context omitted.

> I read that a lot. Why do people don't like the new extensions? Probably because you'll end up with .mts, .mjsx, .mts, .mtsx.

So? If they are different types, it makes sense to have different extensions (e.g. if mts implies typescript module).

> mts implies typescript module

Or mpeg transport stream:

https://en.m.wikipedia.org/wiki/MPEG_transport_stream

Re: Node v8.5.0

#42
post #19

Earlier quoted context omitted.

Do you have a link so I can read about this?

https://www.theregister.co.uk/2017/08/24/nodejs_forks_ayo_co...

So basically social justice warriors tried to start a COC-based witch-hunt to get someone removed from nodejs, they failed, and now they are bitter about the whole affair, and forked node into a irrelevant nonofficial repo?

That's it? I'm happy. The toxic SJWs are out. Sounds good for the project as a whole.

Re: Node v8.5.0

#43
post #37

Earlier quoted context omitted.

So? If they are different types, it makes sense to have different extensions (e.g. if mts implies typescript module).

> mts implies typescript module Or mpeg transport stream: https://en.m.wikipedia.org/wiki/MPEG_transport_stream

They usually use .ts extension, or .tsv, .tsa according to the wiki article you just linked.

.mts is unheard of.

Re: Node v8.5.0

#44
post #14

switching between nodejs and laravel multiple times already, now I need try nodejs again.

What are you looking for that you're not finding?

Laravel borrows a lot from Ruby on Rails, so maybe that might be more your cup of tea. A lot of Rails developers are trying Elixir & Phoenix which is an awesome functional programming setup. PHP has also been trying to become more like C# it seems. So maybe .Net Core & C# are worth a try? If you go the C# route, I suggest using Visual Studio (the full IDE) as I find most of my joy typing C# comes from the IDE. Whereas a language like Elixir the joy is the language itself.

Re: Node v8.5.0

#45

Earlier quoted context omitted.

> mts implies typescript module Or mpeg transport stream: https://en.m.wikipedia.org/wiki/MPEG_transport_stream

They usually use .ts extension, or .tsv, .tsa according to the wiki article you just linked. .mts is unheard of.

Ive seen it in the wild. May not be that common though.

Re: Node v8.5.0

#46

Earlier quoted context omitted.

> mts implies typescript module Or mpeg transport stream: https://en.m.wikipedia.org/wiki/MPEG_transport_stream

They usually use .ts extension, or .tsv, .tsa according to the wiki article you just linked. .mts is unheard of.

my camera (Lumix GH2) produces MTS files

Re: Node v8.5.0

#47

Earlier quoted context omitted.

Wiuldnt implementing those be trivial? They are hardly going to be "too slow" like file copy might be, and with the JS love of small packages this should already be a solved problem.

As Larry Wall said, "Easy things should be easy." When working on a project and you need to copy something for the first time, you shouldn't have to do: * Ok I need to copy... What npm package does that again? * search NPM for copy * figure out which package is "best" * npm i some-copy-package * require("some-copy-packge") * do thing The first 4 steps should be unnecessary.

I'll buy it if you remove just third step.

Re: Node v8.5.0

#48
post #34
post #28

Earlier quoted context omitted.

> I don't like the `.mjs` extension, but I understand the need for it, and I'm just glad that modules are finally here. I read that a lot. Why do people don't like the new extensions? Seems like the most elegant and programmatically more performant and less hassle free, solution to the issue. Everything else looks like a terrible kludge.

> I read that a lot. Why do people don't like the new extensions? Probably because you'll end up with .mts, .mjsx, .mts, .mtsx.

I like that better than having to open a file and read its source to figure out what type of module it exports...

Re: Node v8.5.0

#49
post #28
post #2

> add fs.copyFile and fs.copyFileSync which allows for more efficient copying of files. FINALLY. I don;t know how long we could have come with this still being a thing you need a module for, or you have to code yourself. Hopefully we get `fs.mkdirp` and `fs.remrf` somewhere down the line. > Add support for ESM. This is currently behind the `--experimental-modules` flag and requires the `.mjs` extension. I don't like…

> I don't like the `.mjs` extension, but I understand the need for it, and I'm just glad that modules are finally here. I read that a lot. Why do people don't like the new extensions? Seems like the most elegant and programmatically more performant and less hassle free, solution to the issue. Everything else looks like a terrible kludge.

"Import" was already decided to help the parser performing static analysis versus "require". Now "mjs" is introduced to make detecting if we are in front of a commonjs or module "faster". I'm sure the people who decided this are very bright, but the main goal was how to be nice with v8, and not how to be easy for developers.

Changing from js to ts is an inconvenience sufficiently big enough to adopt flowtype instead.

Re: Node v8.5.0

#50

Earlier quoted context omitted.

Wiuldnt implementing those be trivial? They are hardly going to be "too slow" like file copy might be, and with the JS love of small packages this should already be a solved problem.

As Larry Wall said, "Easy things should be easy." When working on a project and you need to copy something for the first time, you shouldn't have to do: * Ok I need to copy... What npm package does that again? * search NPM for copy * figure out which package is "best" * npm i some-copy-package * require("some-copy-packge") * do thing The first 4 steps should be unnecessary.

or just

fs.createReadStream('file.txt').pipe(fs.createWriteStream('new-file.txt'))

Streams are too slow you say?

fs.writeFileSync('new-file.txt', fs.readFileSync('file.txt'))

I've never had a problem with no explicit copy, but I am very happy it has been added...

Post reply on HN