News for hackers. Stuff that matters.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by acemarke on Tuesday April 18, 2017 @05:14PM (#14142991)
Your comment seems to be a bit of a non-sequitur.

Application development is complex, period. Posix development is complicated. Qt is big and complicated. Makefiles are complicated. Autotools is complicated. Big Java server apps are complicated. C++ is complicated. We've just hit the point where people are trying to do the same thing in a browser.

Would you prefer to build your application using Make, Scons, Waf, CMake, QMake, Tup, Bash scripts, Maven, Gradle, Ant, Buck, or something else? The build tool question is _totally_ solved, right? :)

Yes, the JS community has been reinventing a number of wheels. Yes, the browser environment and JS standard lib have weaknesses. On the other hand, it's also allowed developers to build useful applications that are immediately distributable to pretty much anyone who has an internet connection.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by nightski on Tuesday April 18, 2017 @05:28PM (#14143095)
The benefits you acknowledge (distribution) are not because of the tech but in spite of it.

At the end of the day all it would take is one of the 3 major browser vendors to offer an alternative. That alternative could be distributed to a large percentage of desktops in a relatively quick manner saving billions if not trillions of dollars in wasted productivity.

It will never happen though.

* EDIT: This comes from someone who uses React, Redux, webpack, etc.. daily

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by julian_1 on Tuesday April 18, 2017 @08:27PM (#14144388)
No-one could even agree on making HTML5 valid XML - in order to leverage all the tools and knowledge that exist in that space.

Not that I even like XML. But having another XML dialect that's not actual XML shows that the only hope is to build valid tools and abstractions on top of all the crud.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by tannhaeuser on Wednesday April 19, 2017 @01:52AM (#14145755)
There's nothing "not actual XMLish" about HTML. HTML is formally describable in its entirety using SGML (see my project at http://sgmljs.net/blog/blog1701.html), just not by the XML fragment of SGML.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by julian_1 on Wednesday April 19, 2017 @03:31AM (#14146108)
Is it possible to scrape random html5 pages off of the internet and transform them with xslt 2?

Or write content/metadata schemas (distinct from a DTD schema that simply describes html5) using XSD?

Unlike xhtml, my understanding, was that the current tooling around XML won't just work out-of-the-box for html5.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by cwyers on Wednesday April 19, 2017 @03:55AM (#14146179)
You're missing the point. HTML wasn't XML because XML didn't exist then. SGML did. XML is a "an SGML dialect that's not actual SGML," not the other way around. The people who designed XML knew the SGML spec, as they wrote XML as a subset of it, and they knew what was in HTML. They could have written XML so that HTML conformed. They chose not to. But the HTML spec at the time was absolutely conformant SGML.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by tannhaeuser on Wednesday April 19, 2017 @05:28AM (#14146522)
What cwyers said. Plus, XML was designed to replace HTML as XHTML, but it didn't happen. Doesn't mean you need to give up markup processing alltogether. Just use full SGML, which has additional features such as tag omission/inference and other markup minimization features for text authoring not in the XML profile of full SGML such as markdown and custom Wiki syntax support. You might actually like it.

You can parse HTML 5 into XML using my HTML 5 DTD [1] and eg. OpenSP's osx tool or my upcoming sgmljs.net tool.

What do you have against DTDs? They do the same as XSD, and then some.

[1]: http://sgmljs.net/docs/html5.html

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by kyrias on Tuesday April 18, 2017 @10:31PM (#14145019)
> But having another XML dialect that's not actual XML…

HTML is based on SGML, it was never an XML dialect.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by ZenoArrow on Tuesday April 18, 2017 @06:01PM (#14143388)
>"At the end of the day all it would take is one of the 3 major browser vendors to offer an alternative."

You mean like Dart?

Besides, languages that target WebAssembly are almost certainly going to evolve to fit that space.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by cubano on Tuesday April 18, 2017 @07:44PM (#14144146)
I have serious doubts that WebAssembly is really going to come to dominate the web the way many people here seem to believe it will.

The idea that all of sudden there is going to be a rush to push compiled/closed sites after so many very successful years of using free-and-open stacks seems rather non-logical to me.

Time will tell.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by azernik on Tuesday April 18, 2017 @08:55PM (#14144546)
The success of the JavaScript stack was not dependent on source being shipped to the browser, and the push for WebAssembly​ is not motivated by keeping source away from the browser.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by toyg on Wednesday April 19, 2017 @01:10AM (#14145571)
What? It absolutely was. Whole generations of today's JS people trained themselves with View Source.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by nine_k on Wednesday April 19, 2017 @01:39AM (#14145696)
....decompiling minified Javascript?

Sorry, this ship has sailed.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by mathw on Wednesday April 19, 2017 @04:19AM (#14146267)
That was before minification. I think that ship already sailed.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by jerryszczerry on Wednesday April 19, 2017 @06:24AM (#14146720)
> The idea that all of sudden there is going to be a rush to push compiled/closed sites after so many very successful years of using free-and-open stacks seems rather non-logical to me.

Well, then we have minified JS that isn't exactly readable. Similarly with multiple-compiled JSX-to-ES6-to-ES5/JS code.

Also, there's a number of JS obfuscators, whose main purpose is to smuggle a piece of closed code into those theoretically “free-and-open” stacks.

Thus, I think, after wasm becomes generally supported, there will be more incentive to write code in your language of choice and compile it to a common platform, than to write code in JS or one of its derivatives and minify/compile it anyway.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by finchisko on Wednesday April 19, 2017 @01:15AM (#14145599)
I see your point. But I'm more optimistic. We devs like to jump on hype trains. We only need one good reason to do so.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by ZenoArrow on Wednesday April 19, 2017 @01:15PM (#14149517)
>"compiled/closed sites"

It's worth noting WebAssembly isn't compiled into a form only computers can understand. There are plans to offer 'View Source'-style functionality for WebAssembly. WASM is a compressed AST rather than hardware-specific bytecode.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by cies on Tuesday April 18, 2017 @06:47PM (#14143729)
> Besides, languages that target WebAssembly are almost certainly going to evolve to fit that space.

And are already but now targeting JS. Like PureScript, ReasonML, Elm and even TypeScipt to some extend.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by goldbeck on Tuesday April 18, 2017 @05:37PM (#14143176)
If this is such a good and valuable idea, why will it never happen? Seems the major internet-interface makers (Google via Chrome, FB via their app, for ex), are vying for control over the way people develop web applications too. Making an alternative that gets adopted would be invaluable to them.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by jpk on Tuesday April 18, 2017 @06:07PM (#14143436)
It won't happen because none of them will implement the other guy's new thing. Chrome would do the Google thing, Edge would do the Microsoft thing, and Firefox would sit back and balk that none of that junk is standardized. Then webdevs would just stick with Javascript and friends because it's the only thing that mostly works everywhere. That's exactly what happened to Dart, right? It had aspirations of hopping into Chrome along side JS but who else was going to put it in their browser? Now it's just another thing that compiles to Javascript because that's the only way you'd get anybody to adopt it.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by tannhaeuser on Tuesday April 18, 2017 @06:20PM (#14143535)
You could also see it the other way around. That we've come pretty far with standardization based on JavaScript and HTML5 (and CSS and SQL and POSIX and IP ...). What do you expect exactly?
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by jfoutz on Tuesday April 18, 2017 @06:27PM (#14143590)
Mozilla is probably in the best position to do something. If it's good enough to get developers to switch and rave about it, ms and google will follow to keep mindshare.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by tannhaeuser on Wednesday April 19, 2017 @01:45AM (#14145722)
JavaScript was invented by Netscape, the predecessor of Mozilla. Also Firefox came out in a phase of browser stagnation, but Chrome in particular and the other browsers are so powerful today that I'm more worried we're going to loose web standards to "whatever WebKit does". So I wouln't hold my breath.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by bigato on Wednesday April 19, 2017 @07:43AM (#14147020)
Not true, see webassembly.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by jpk on Friday April 21, 2017 @05:39PM (#14169632)
The parent and grandparent were talking about unilaterally developed tech, "At the end of the day all it would take is one of the 3 major browser vendors to offer an alternative." etc

The correct comparison there is Dart. WebAssembly is a joint effort being developed by a team comprised of folks from every major browser vendor, so it isn't really an example of what they're talking about.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by bigato on Wednesday April 19, 2017 @07:42AM (#14147017)
That already happened and is called webassembly. And it is backed by not one, but all of the major browsers.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by Bombthecat on Wednesday April 19, 2017 @06:14AM (#14146694)
Dart is shipped with chrome, or not? I don't see any huge success :)
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by bigato on Wednesday April 19, 2017 @07:41AM (#14147015)
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by kuschku on Tuesday April 18, 2017 @07:09PM (#14143876)
> Would you prefer to build your application using Make, Scons, Waf, CMake, QMake, Tup, Bash scripts, Maven, Gradle, Ant, Buck, or something else? The build tool question is _totally_ solved, right? :)

Yes.

I've worked with CMake, Gradle, Maven, Ant, with webpack, makefiles, and the entire rest. And you know what? I went back to ES5, just because it's easier than fighting the JS environment. Comparing your average build.gradle with a webpack config is downright insane.

Why does the web environment have to be so much more complicated than the native world? The web could be so much more powerful if they'd study history, and learn from it.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by BigJono on Wednesday April 19, 2017 @01:20AM (#14145622)
With what webpack config though?

Half the problem with the web stack is inexperienced people making things way more complicated than they need to be. A minimal webpack.config is pretty damn simple.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by _pmf_ on Wednesday April 19, 2017 @05:03AM (#14146421)
> Qt is big and complicated.

I'd encourage every developer considering Electron to give Qt/QML a try. It merges the declarative nature of WPF with a nicer syntax and the ability to use JS directly in the QML file, obliterating the need for converters of formatters (that plague XAML/WPF and JavaFX). Writing custom components is trivial and intuitive, with zero syntactic overhead (if a QML file "MyCompX" is present, you can instantiate its contents with "MyCompX" without any additional setup).

For Android, it has the advantage of being able to hot-reload the UI without jumping through hoops (simply serve them over HTTP and install a small reload handler in your app that can be triggered either from the app of by something like a UDP message from the host). (Change one like in the app's main and you are able to pull the QML files from a local directory so you can modify them on the tablet without a PC or internet connection ...)

I'm actually reluctant to mention Qt/QML because I consider it to be my secret magic silver bullet for portable (non-web) UI development.

Regarding the license (there's a lot of misinformation, including Qt's main site trying to coerce you into using the commercial license): if you link dynamically, commercial usage is not a problem (LGPL). (This is usually only an issue on iOS.)

The recent Electron situation (needed on one hand, loathed on the other hand) is a unique opportunity for Qt to gain (back) some developer mind share, but to avoid alienating web developers with scary C++ stuff it would help to decouple QtCreator from the Qt C++ API: offering a version that only exposes the QML editor and interface generator, and ships qmlscene as execution runtime and an option to deploy the QML-only application with a rebranded qmlscene (embedding the QML resources and a custom icon). To be clear: this all exists right now, but with the C++ part enabled (which will scare off some developers even if they can create applications without it).

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by fauigerzigerk on Wednesday April 19, 2017 @10:33AM (#14147945)
>The recent Electron situation (needed on one hand, loathed on the other hand) is a unique opportunity for Qt to gain (back) some developer mind share, but to avoid alienating web developers with scary C++ stuff it would help to decouple QtCreator from the Qt C++ API

For me it's exactly the other way around. If I'm using Qt it's because I want to use C++ to make my app as efficient as possible in terms of CPU and memory usage. Now that JavaScript is in the picture, I'm less likely to consider Qt for a cross platform app because I can just as well use any of the other more popular options like Electron or ReactNative.

Qt used to be a C++ GUI framework. Rebranding it as something else won't work. They won't get the web crowd and they will alienate people who want to avoid web technology.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by camus2 on Tuesday April 18, 2017 @05:34PM (#14143153)
> Application development is complex, period. Posix development is complicated. Qt is big and complicated. Makefiles are complicated. Autotools is complicated. Big Java server apps are complicated. C++ is complicated. We've just hit the point where people are trying to do the same thing in a browser.

Actually, Java, C++,QT and co are going through great length to make development simpler and all the compilation pipelines easier. Let's take Java for instance, groovy, maven and war packaging considerably made Java server development easier. Java frameworks like Spring are trying very hard to make servlet development easier, by making complexity opt-in. Java is getting constructs like modules which will help with library development, C++ too, QT is streamlining its API ... So I'd totally disagree about your statement. The success of Go yet another proof of this. People are tired with unnecessary complexity and are ready to give up on "elegance" for the sake of simplicity.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by acemarke on Tuesday April 18, 2017 @05:42PM (#14143219)
And the Javascript world has gotten a defined syntax for modules, package managers, and build tools that implement build pipelines, compilation, and linking. Same concepts, new language and environment.

My point is that building complex software inherently involves _some_ amount of complexity on the development side, which is reflected in the language syntax and tooling used with that language. Now that people are building complex apps in Javascript, we're seeing catch-up in the tools used to build Javascript apps to match the tools that have existed for years on the desktop/native side.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by tannhaeuser on Tuesday April 18, 2017 @06:42PM (#14143688)
I don't know about Java frameworks and build tools really making things easier. They just shift problems around so that instead of having to deal with the Servlet API (say) you have to deal with Spring idiosyncrasies, IDE integration troubles, cognitive overload by too much tooling, and endless discussions about the "right" way to use a particular frameworks or design pattern. Saying this from 20 years of Java experience.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by mentat on Tuesday April 18, 2017 @06:16PM (#14143502)
The word Java and "simple development" is just absurd for any real application much less most enterprise applications.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by pdpi on Tuesday April 18, 2017 @06:41PM (#14143685)
Is it that absurd?

Building Java applications using Undertow with a build setup in gradle is not _that_ different from a node.js service using Express and package.json for dependencies, or a Ruby, Sinatra and Rake stack. After having tried all three, I ended up going back to the JVM. It's not a perfect ecosystem, but it's damned good one.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by chillacy on Tuesday April 18, 2017 @08:56PM (#14144548)
If you're on gradle you're already pretty cutting edge compared to most enterprise java setups. Probably most projects are still using maven.

Also there's definitely been some cross pollination of ideas from at least the Ruby world to the Java (Rails inspiring Grails and probably Play too), so it's getting better. Add java8 lambdas, and it's quite nice.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by jsmthrowaway on Wednesday April 19, 2017 @12:47AM (#14145489)
> Probably most projects are still using maven.

Aren't you optimistic.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by chillacy on Wednesday April 19, 2017 @01:15PM (#14149527)
Maven's pretty big still.

https://github.com/search?l=Maven+POM&q=pom.xml&type=Code&ut...

https://github.com/search?l=Gradle&q=build.gradle&type=Code&...

And that's public github, which is supposed to be more cutting edge than the legacy code that powers most companies. I started a project with gradle on my last team and everyone complained because they had never used it before.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by chjh on Wednesday April 19, 2017 @01:51AM (#14145748)
Yeah, I would love me some maven...
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by ake1 on Wednesday April 19, 2017 @03:27AM (#14146093)
just got rid of a project using a 10 year old custom patched ant.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by EugeneOZ on Tuesday April 18, 2017 @05:40PM (#14143200)
Rust, PHP had simple af builds/packaging. So no, not everything is complex, just old dinosaurs AND web.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by mattnewton on Tuesday April 18, 2017 @06:05PM (#14143414)
I would never want to use php's "just recompile it with the new dependencies" approach ever again. It's a complete mess as soon as you go off the rails of what's included by default.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by EugeneOZ on Wednesday April 19, 2017 @05:57AM (#14146618)
I will never believe people recompile PHP binaries every day.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by eropple on Tuesday April 18, 2017 @06:00PM (#14143374)
PHP's packaging was only "simple af" until you had a binary dependency that wasn't part of your operating system.

Complicated things exist.

Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by objectified on Wednesday April 19, 2017 @01:15AM (#14145602)
But now you're hitting on one of the main points that was always criticized in PHP: the fact that it came with a lot of batteries included. The upside of this is that it makes PHP applications very easy to deploy, because often, you either don't need to resort to binary dependencies outside the realms of your OS's packaging system, or there will be a `php[major-version]-[library_binding]` package for your OS probably already in your OS's official package mirrors. Say all you want about PHP, but of all the application stacks I've had to deploy, PHP was and is probably still the simplest. The advantage of that shouldn't be underestimated. The only serious competitor in that space that I've ever touched is probably Go.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by EugeneOZ on Wednesday April 19, 2017 @05:59AM (#14146631)
Yeah, you can recompile PHP 2-3 times per year, and it's just long line of args, nothing more. And you can compare it with every-time compilation of modern js apps. What an equation! And you forgot to mention Rust, but let's pretend it's normal way of arguing.
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by fredsted on Wednesday April 19, 2017 @01:31AM (#14145666)
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by austincheney on Wednesday April 19, 2017 @09:45AM (#14147627)
The most disappointing part of all of this is that in the JS environment no build step is required, but it is often there anyways...
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by oatmealsnap on Wednesday April 19, 2017 @09:52AM (#14147683)
What do you mean? Are you referring to gulp and other similar tools?
Re:Facebook Announces React Fiber, a Rewrite of Its React Fr... by austincheney on Wednesday April 19, 2017 @10:22AM (#14147882)
I am referring to any build step. Do you need a build step to execute JS?