News for hackers. Stuff that matters.
Re:Windows 10 and .NET Native by GermainSmith on Saturday October 03, 2015 @09:28AM (#10323803)
I don't see why anybody should be surprised about the swing back to Ahead-of-Time compiled native code. I'm actually surprised it has taken as long as it has.

Although interpretation and Just-in-Time compilation were not new ideas at the time, Java first brought them to a wide audience around 20 years ago with its use of the JVM.

Anyone who remembers those times, and even many years beyond then, will remember how slow JVM-based applications were compared to native apps.

Even today, there's still a noticeable difference between JVM-based software and native software, although the exceptionally massive increase in computation power have rendered the differences easier to overlook in many cases.

Since then we've seen similar techniques used by a variety of other platforms.

Despite many years of effort and research, and much investment, we've yet to see Just-in-Time compilation rival Ahead-of-Time compilation in terms of the performance.

While Just-in-Time's supporters will claim that it allows for better optimization or better portability, or they can show some contrived benchmarks where it has a slight edge, we haven't seen such techniques stand up in the real world.

Ahead-of-Time C and C++ compilers have consistently compiled software that's very fast, lean, and the best performer in real-world scenarios.

For years, we've had people pointing out this very obvious reality regarding how Ahead-of-Time compilation proves to be superior to Just-in-Time compilation in realistic scenarios. Yet we've seen their claims very forcefully denied by the Just-in-Time advocates.

Maybe after 20 years, it has finally become clear that the Just-in-Time supporters were wrong, and that Ahead-of-Time compilation is the better approach.

With battery-powered devices more prevalent than ever, the need for high-performing and efficient binaries is greater than it has ever been. Returning to Ahead-of-Time compilation is just what we need given these circumstances. It's just a real shame it has taken so long for this important reality to be recognized.

Re:Windows 10 and .NET Native by pjmlp on Saturday October 03, 2015 @09:53AM (#10323885)
There have been AOT compilers from third party JVM vendors almost since the begining. Used mostly by companies that didn't want to expose their bytecode.

However Sun decided to bet the farm on JIT and was against having AOT compilation on the reference JDK. Meaning anyone that wanted a AOT toolchain for Java had to go shopping.

Now, it appears Oracle is of a different opinion.

"Java Goes AOT" at JVM Language Summit 2015

https://www.youtube.com/watch?v=Xybzyv8qbOc&list=PLX8CzqL3Ar...

Being used to memory safe languages with AOT compilation like Turbo Pascal, Modula-2, Modula-3, Oberon, Delphi, Ada among many others, I also would have prefer that Java and .NET had offered the same type of toolchain from the beginning.

Now almost 20 years later, we need to teach young generations that their default implementations were just that, implementations. As they got used to the (wrong) idea that memory safe languages imply a VM.

Re:Windows 10 and .NET Native by pilif on Saturday October 03, 2015 @10:28AM (#10324005)
Delphi and pascal are memory safe? That's news to me. I have created my fair share of buffer overruns and memory corruption in both of them (they were my first languages I programmed in)
Re:Windows 10 and .NET Native by pjmlp on Saturday October 03, 2015 @10:54AM (#10324084)
Compared to C they are.

You surely were using unsafe constructs explicitly, like taking the address of a variable wiht Addr or @, using pointer manipulation functions.

With C they just happen, given the lack of bounds checking, implicit conversions, automatic decay of arrays into pointers (specially bad as arguments), null terminated strings and undefined behaviours across compilers.

Re:Windows 10 and .NET Native by Roboprog on Saturday October 03, 2015 @01:09PM (#10324525)
Alas, the Swiss version of Algol lost out to the New Jersey version :-(

Bounds checking and non-nullable references are for wussies, after all. That, and a worse-is-better C compiler is easier to implement and thus more "available". (like Joel Spolsky said "Go ugly early")

Re:Windows 10 and .NET Native by thaumasiotes on Saturday October 03, 2015 @03:37PM (#10325071)
Joel didn't say that. You're probably thinking of this piece by Steve Yegge: http://steve-yegge.blogspot.com/2007/02/next-big-language.ht...

But I wouldn't exactly characterize that as advice Steve Yegge wants people to follow, either.

> Back when I was in the Navy, just out of boot camp, an otherwise entirely forgettable petty officer first class instructor of ours offered us, unasked and free of charge, his sage advice on how to pick up women at a bar: "Go ugly early." With this declaration, he had made it clear that he and I thought rather differently about certain things in life.

> If you want to spare yourself a lot of angst in deciding which programming language to use, then I recommend this simple rule: Go ugly early. C++ will go out with you in a heartbeat.

> For my part, I want to encourage people to make their own languages

Re:Windows 10 and .NET Native by Roboprog on Monday October 05, 2015 @11:26AM (#10332400)
Oops. Right. "Worse/ugly is better" was meant as bitter sarcasm, though.
Re:Windows 10 and .NET Native by jksmith on Saturday October 03, 2015 @02:30PM (#10324874)
Haha wussy or not, damn did I get a lot of bullet proof shit done with M2. Now I have to work with the modern version of PL1. The more keywords the better the language, right?
Re:Windows 10 and .NET Native by Roboprog on Saturday October 03, 2015 @03:37PM (#10325070)
Not sure how to interpret the "more keywords" comment. Words do have the advantage that they force people to put a space around them (usually), though, rather than jamming a bunch of operators together, "C/Unix Hoax" style.

  for(;P("\n"),R--;P("|"))for(e=C;e--;P("_"+(*u++/8)%2))P("| "+(*u/4)%2);
http://www.gnu.org/fun/jokes/unix-hoax.html
Re:Windows 10 and .NET Native by lmm on Saturday October 03, 2015 @01:23PM (#10324576)
> Being used to memory safe languages with AOT compilation like Turbo Pascal, Modula-2, Modula-3, Oberon, Delphi, Ada among many others, I also would have prefer that Java and .NET had offered the same type of toolchain from the beginning.

Do those languages offer consistent, defined behaviour on all platforms (e.g. for integer overflow)? Particularly in the context of multithreading - do they have a crossplatform memory model? That to me was the big advantage of the JVM.

Re:Windows 10 and .NET Native by pjmlp on Saturday October 03, 2015 @02:15PM (#10324810)
They had their own set of issues, but not even close to the anything goes of undefined behaviour across C compilers.

That was actually a reason why many of us embraced Java.

C compilers were between K&R and C89.

C++ compilers were even worse with the standard still ongoing.

These other languages suffered from not being adopted by OS vendors and as you remember, back then we used to pay for compilers. So not being part of the official OS compilers was a burden to adoption.

Java being C++ like, more consistent behaviour and free (as beer) won the hearts of many.

Re:Windows 10 and .NET Native by amaranth on Saturday October 03, 2015 @02:18PM (#10324828)
But those have almost nothing to do with using a VM. You can achieve them with your compiler by emitting overflow checks and fences where appropriate to match the defined model.
Re:Windows 10 and .NET Native by Roboprog on Saturday October 03, 2015 @01:12PM (#10324533)
Eiffel is probably another "other" Pascal/Modula descendent.

Java beans uber class invariants :-(

Re:Windows 10 and .NET Native by AshleysBrain on Saturday October 03, 2015 @11:19AM (#10324181)
Whenever I read posts like this I feel like two technologies are being portrayed as combatants in an epic war over the years, with engineers taking sides and firing shots at each other.

In reality I think technologies are just tools which have their appropriate and inappropriate uses. Both AOT and JIT have their strengths and weaknesses, and engineers make their choices based on those tradeoffs. With the linked article, it sounds like the startup time tradeoff is being used as the main motivation for making a change, probably because mobile users are more sensitive to this. That doesn't mean JIT fundamentally sucks - it's worked pretty well on the web with Javascript, for example.

Re:Windows 10 and .NET Native by eloff on Saturday October 03, 2015 @09:29PM (#10326033)
This is a kind of wishy washy liberal attitude that is found all over. An attempt to say both sides of an argument have a point. Which is always true, otherwise there wouldn't be an argument. The part I take umbrage at is that it implies both sides have an equally valid argument. That is rarely true. Here JIT has been claiming superiority for twenty years. It has clearly failed. It's slower to start, slower to run, and uses more memory. That will very probably never change. It still has some advantages in some areas and some niches, but AOT has won. The war, if you really must use that term, is over. We see this in the resurgence of interest in C++ and in the move in mobile ecosystems to AOT.
Re:Windows 10 and .NET Native by JustSomeNobody on Saturday October 03, 2015 @12:47PM (#10324447)
You're wrong. It is a battle. Look at how quickly the swords come out when anyone brings up C# and Java or Python and Ruby or Backbone and Angular. Any discussion involving developers and the tech they use quickly devolves into all out verbal conflict. People LOVE to argue about this stuff because it gives them something to do besides actually doing anything productive.

It's all rather sickening, really.

Re:Windows 10 and .NET Native by AshleysBrain on Saturday October 03, 2015 @01:10PM (#10324528)
Well, technologies don't battle (except in the marketplace, which often shows the success of both), but some engineers battle over them. Meanwhile, wiser engineers are calmly choosing their technologies based on their suitability to the task at hand, instead of starting arguments over an all-or-nothing mentality.
Re:Windows 10 and .NET Native by bunderbunder on Saturday October 03, 2015 @03:01PM (#10324966)
There's the rub, I think.

Historically the big managed platforms have offered some real advantages. JIT compilation has been a part of that, since it helps to some of the reflective features that have in turn supported some useful tools for increasing developer productivity such as aspect-oriented programming, object-relational mapping and mocking.

These gains may have come at the cost of raw execution times, but most of the core consumers of the technology measure their success in terms of dollars, and are in the privileged position of being able to offset the performance losses by upgrading their servers. For them this is a perfectly sensible decision. Developers are much more expensive than computers, so they were simply being pound wise and penny foolish.

In other environments the calculus has been different. Console games have always had constrained resources, a homogeneous target environment, and high performance demands. Correspondingly, AOT's always been how things are done int hat domain.

Sometimes it's even changed over time. Bytecode made a lot of sense for mobile development a decade ago, back when there were relatively many competing hardware platforms and people interacted with their phones differently. Nowadays there are fewer more homogeneous platforms and do more task switching, so the cost of AOT compilation has gone down and the potential benefits have gone up. Hence this shift in .NET, which perhaps seems even more sudden since .NET itself was primarily targeted at enterprise development until relatively recently.

Re:Windows 10 and .NET Native by fyolnish on Saturday October 03, 2015 @11:27PM (#10326316)
Console games use interpreted (not even JITed) Lua quite a lot for the areas where iteration time is of most importance. As the parent said, wiser engineers just choose the best tech for the task.
Re:Windows 10 and .NET Native by Roboprog on Saturday October 03, 2015 @01:03PM (#10324500)
Java: the expressiveness of an Algol subset with the performance of a Lisp. :-)

C#/.NET being a slightly improved Java and all.

I love interpreters with automatic memory management. I love assembler (sort of). It's painful when the wrong one gets put in the wrong place, though.

Re:Windows 10 and .NET Native by Echoic on Saturday October 03, 2015 @01:00PM (#10324488)
With your comment, I would think the correct course of action would be not commenting at all in the discussion. But, I guess you don't have anything 'productive' to do.
Re:Windows 10 and .NET Native by JustSomeNobody on Saturday October 03, 2015 @01:06PM (#10324510)
Being able to have an objective discussion of the appropriate uses of one technology over another is very productive. I, in no way, said anything contrary to that. But meaningful discussions are rare because they devolve so quickly.
Re:Windows 10 and .NET Native by mahouse on Saturday October 03, 2015 @12:57PM (#10324479)
How do you dare living your life doing something entertaining rather than doing something productive? To the gas chamber with you!
Re:Windows 10 and .NET Native by JustSomeNobody on Saturday October 03, 2015 @01:06PM (#10324515)
HAHA! I see what you did there! But you missed my point.
Re:Windows 10 and .NET Native by 0xFFC on Saturday October 03, 2015 @01:09PM (#10324526)
The things you are talking is correct, Two technology should be just technology , but in real world I don't think so , companies tend to sell their technology as some kind of magical power and revivals wants to show other companies technology is just crap .

But what you are saying is mostly true in academia or ideal world , but not in reality .

Re:Windows 10 and .NET Native by gaius on Saturday October 03, 2015 @03:44PM (#10325093)
See also CISC vs RISC.
Re:Windows 10 and .NET Native by brianwawok on Saturday October 03, 2015 @09:34AM (#10323824)
I mean, it's almost a moot point. Each year the number of native apps I run goes down by a couple, and the number of webapps I use go up by a few.

Native apps I use right now?

Chrome - Already native compiled

IntelliJ - Full JIT mode, but due to the fact I start it once and run it for a month, not a huge deal.

Command line unixy stuff - Already native compiled

(On gaming computer) Games - Already native compiled

I mean desktop apps DO exist, but just not that many to use day to day... from what I have seen of the windows app store, I can find 20 colors of calculator apps, but nothing that impressive.

Re:Windows 10 and .NET Native by pjmlp on Saturday October 03, 2015 @09:56AM (#10323897)
For me it goes the opposite direction.

On mobile only apps. The Web is for reading stuff.

On the desktop the same thing, except for all those forums and travel booking websites that don't offer me a choice.

Messaging, email, productive software, work related stuff all native software.

Exception being when some customers do require web projects.

Re:Windows 10 and .NET Native by mwcampbell on Saturday October 03, 2015 @10:57AM (#10324098)
> all those forums and travel booking websites that don't offer me a choice.

So you would prefer to have the friction of an app store, or even just a platform-specific native executable, for every little service? And of course there's also the friction on the developer side, especially when submitting to app stores which act as gatekeepers.

Sure, native apps have better performance and often a better user experience all around, especially mobile apps. But your comment about forums and travel booking websites has got me thinking that we should really try to solve the performance and UX issues of the web platform rather than retreat to native apps.

Edit: Yes, I've taken both sides on the web versus native debate. I recently posted that JavaScript-based mobile web apps are second-class compared to AOT-compiled native mobile apps. I attribute my latest flip-flop to the fact that just last night I went through the tedious process of submitting a new app to the iOS App Store -- an app that could probably have been a web app. So now I want the web to win.

Re:Windows 10 and .NET Native by pdkl95 on Saturday October 03, 2015 @12:08PM (#10324336)
> So you would prefer to have the friction of an app store, or even just a platform-specific native executable

What friction?

    apt-get install $PACKAGE_NAME
Native apps will always be far superior to the web, because the web browser (at least, any with that claims to care about security) is required to maintain a separation between the "page" and the browser that frames the page, or you trivially enable "phishing" and other UI-impersonation attacks. Native has far more flexibility.

Personally, I absolutely hate the jitter every time Javascript (or most other VMs) decides to GC for 50ms or more, and will go out of my way to avoid it.

> app stores which act as gatekeepers

So stop supporting those gatekeepers, both as a developer and as a user. As long as people keep giving them money and market share, they will continue to gain power as gatekeeprs.

> try to solve the performance and UX issues of the web platform

That would require defining a new platform that isn't the web. The web is a document-based design, and while a lot of clever tricks have been found that let people pretend it's something else, all of the core components of the web (HTML, etc) are designed for documents. This is good - we need a way to freely exchange documents.

If you want a way to develop applications that can be distributed as easily as documents are on the web, it would probably be a good idea to create some VM base portable application format that was actually free of stuff like HTML/CSS. An HTML replacement that worked more like a GUI toolkit would be much nicer for app development.

Re:Windows 10 and .NET Native by pcwalton on Saturday October 03, 2015 @12:39PM (#10324422)
> because the web browser (at least, any with that claims to care about security) is required to maintain a separation between the "page" and the browser that frames the page, or you trivially enable "phishing" and other UI-impersonation attacks. Native has far more flexibility.

I'm not going to deny that native apps have more power to interact with hardware resources—though I would question whether that's a good thing for most applications I use—but this isn't a good place to draw a distinction. Window managers have to maintain the same security guarantees (look at the trickiness behind the impersonation protection in Windows Vista's UAC for example), and that's all the browser is in this context: a compositing window manager.

> If you want a way to develop applications that can be distributed as easily as documents are on the web, it would probably be a good idea to create some VM base portable application format that was actually free of stuff like HTML/CSS. An HTML replacement that worked more like a GUI toolkit would be much nicer for app development.

Besides the fact that this is unrealistic, I don't see how this would end up significantly better than the modern Web platform. JS is already faster than Objective-C in method dispatch. Use flexbox and the "document-oriented" layout goes away. Use simple graphics and your painting will be quick.

Honestly, speaking as someone who's measured this stuff a lot, the main thing that's slow in the Web that native doesn't have is style recalculation and layout. This is not insignificant, but I think any portable application delivery platform needs both of these. Native often gets by with hardcoded style and pixel layouts, but that obviously doesn't work on anything that has to run on arbitrarily many devices. Add in restyling and you pay a performance penalty, but redesigning the system from scratch isn't going to eliminate that penalty.

It's a common meme that "just reinvent the Web around applications and it'll be faster", but I have yet to see specific suggestions that would both preserve portability and aren't implementable in the existing Web platform. That's not to say browsers of today are optimally architected, of course.

Re:Windows 10 and .NET Native by millstone on Saturday October 03, 2015 @06:25PM (#10325632)
> Window managers have to maintain the same security guarantees (look at the trickiness behind the impersonation protection in Windows Vista's UAC for example), and that's all the browser is in this context: a compositing window manager

Browsers supply a lot more than that window management: menus, key event handling, find, scrollbars, etc. You don't have the ability to hook into these with enough flexibility, which is why Gmail has 1998-era pagination (which is still better than Yahoo Mail's janktastic infinite-scroll).

The web simply doesn't let you show lots of email in a table like Mail.app, or even Google's native gmail app.

> It's a common meme that "just reinvent the Web around applications and it'll be faster"

Faster isn't really the point. Gmail is definitely not slow. Where it (and all web apps) fall short is in their lame UI, attempting to recreate desktop metaphors under the limitations of the web. Examples are its mystery meat keyboard shortcuts, almost-but-not-really context menus, its fixed-size non-draggable "windows" (chat, compose, etc).

Re:Windows 10 and .NET Native by mwcampbell on Saturday October 03, 2015 @01:12PM (#10324535)
> What friction?

> apt-get install $PACKAGE_NAME

Desktop Linux is a lost cause, except for hackers' workstations. For any application targeting the general population, these days we should probably assume a mobile device, which means either the app stores or the web (or both, if you can manage that).

Re:Windows 10 and .NET Native by discreteevent on Saturday October 03, 2015 @03:17PM (#10325015)
" it would probably be a good idea to create some VM base portable application format that was actually free of stuff like HTML/CSS. An HTML replacement that worked more like a GUI toolkit would be much nicer for app development."

People are working on it. Have a look at flutter.io or Qt and QML

Re:Windows 10 and .NET Native by pjmlp on Sunday October 04, 2015 @04:19AM (#10326886)
Actually this was one of the goals of XHTML, but then the HTML 5 movement killed it.

Had it worked out we could have gotten something like XAML, instead of the current Frankenstein model filled with workarounds and still failing short of a native experience.

Re:Windows 10 and .NET Native by lewisl9029 on Saturday October 03, 2015 @08:38PM (#10325968)
> What friction?

    apt-get install $PACKAGE_NAME
This friction.

Both on the side of the user who would need to go through an install process that is often an order of magnitude longer than loading a web page, and on the side of the developer who needs to go through the tedious process of developing and packaging their apps for every single native platform they want to support.

Re:Windows 10 and .NET Native by pjmlp on Sunday October 04, 2015 @04:20AM (#10326892)
Everything in life worth having requires some effort.
Re:Windows 10 and .NET Native by SyneRyder on Saturday October 03, 2015 @11:33AM (#10324225)
I'd prefer this in many cases as well. I can use web versions of Evernote, Pocket, OneDrive, Email, but I would much rather use their platform specific native executables. It's a better, faster experience that integrates better with the device I'm using. I could watch Netflix in my web browser, but the Windows 10 app is faster & smoother. It even irritates me when the Kindle Android App drops me out to a web browser to browse the store & buy more books, instead of just letting me do it all from within the app.
Re:Windows 10 and .NET Native by pjmlp on Saturday October 03, 2015 @11:00AM (#10324114)
> So you would prefer to have the friction of an app store, or even just a platform-specific native executable, for every little service?

Yes, every time I have the option to do so.

Re:Windows 10 and .NET Native by mwcampbell on Saturday October 03, 2015 @11:19AM (#10324182)
Why exactly do you prefer a native app whenever you have the option?
Re:Windows 10 and .NET Native by pjmlp on Saturday October 03, 2015 @11:34AM (#10324227)
Execution speed and integration with OS features.
Re:Windows 10 and .NET Native by MereInterest on Saturday October 03, 2015 @10:41PM (#10326205)
If I have an executable that is running on my system, I know that it will continue to run tomorrow. If I am using a web service, I don't know whether it will continue to exist. If it is running locally, I can manage my own backups, my own settings.
Re:Windows 10 and .NET Native by izacus on Saturday October 03, 2015 @12:41PM (#10324431)
Huh? Do you really think that a closed app store is the only way of distributing applications?

Did you sleep through last 30 years of computing?

Re:Windows 10 and .NET Native by mwcampbell on Saturday October 03, 2015 @12:58PM (#10324481)
> Did you sleep through last 30 years of computing?

No, but mobile devices are overtaking PCs for a lot of computing activities, and on the popular mobile platforms, the only choices are a closed app store or the web.

Re:Windows 10 and .NET Native by acdha on Saturday October 03, 2015 @11:10AM (#10324150)
Web Assembly is going to add an interesting hybrid: the actual native compilation will happen on the client but the app developer will have the ability to put significant AOT resources into optimizing the byte-code sent over the network.
Re:Windows 10 and .NET Native by mwcampbell on Saturday October 03, 2015 @10:37AM (#10324030)
I gather that you don't run many apps on a mobile device. The shift toward mobile apps seems to be what's motivating the current trend toward AOT compilation.
Re:Windows 10 and .NET Native by brianwawok on Saturday October 03, 2015 @02:52PM (#10324943)
running chrome on android right now. One of the 3 of 4 mobile apps I use.
Re:Windows 10 and .NET Native by legulere on Saturday October 03, 2015 @01:34PM (#10324620)
The JVM was very slow in the beginning because it was just an interpreter and had no JIT compilation. Then there also was the issue with 80bit floats on x86 making float computations slow, as the results of each operation needed to be saved back to memory to truncate them to 32/64 bit.

The speed difference since those problems have been overcome has been relatively low. The biggest performance problem is garbage collection, which you can't overcome just with implementing ahead of time compilation. Another issue is the lack of SIMD support of JIT VMs.

Re:Windows 10 and .NET Native by redcalx on Saturday October 03, 2015 @04:49PM (#10325303)
.NET has SIMD support as of version 4.5.2.
Re:Windows 10 and .NET Native by pcwalton on Saturday October 03, 2015 @11:30AM (#10324210)
> While Just-in-Time's supporters will claim that it allows for better optimization or better portability, or they can show some contrived benchmarks where it has a slight edge, we haven't seen such techniques stand up in the real world.

Other than JavaScript, which you're executing right now to post this comment?

Web app usage is huge, and there isn't going to be any shift to native code there anytime soon. NaCl (not PNaCl) has been dead as a proposal for Web content for a long time. That's because JITs actually do allow for better portability.

Edit: OK, HN doesn't actually use JS, so mea culpa on that rhetorical flourish. Still, the point stands that you're using the Web a lot, and that's a testament to the success of JITs.

Re:Windows 10 and .NET Native by pjmlp on Saturday October 03, 2015 @11:37AM (#10324242)
Just because they took Usenet away from us, native guys.

A am yet to use any forum online that is as comfortable to use.

> Web app usage is huge, and there isn't going to be any shift to native code there anytime soon.

I am betting on mobile to change the wave.

Re:Windows 10 and .NET Native by mwcampbell on Saturday October 03, 2015 @12:43PM (#10324435)
I didn't even think about Usenet when responding to your comment about forums on the other thread. Still, users of modern web forums would probably view Usenet as archaic. The web platform provides a lot more room for experimentation, because a hundred thousand forums can run a hundred different forum packages with a thousand plugins. The user doesn't have to install an app, because any client-side code is automatically downloaded and run in a sandbox. Even without JavaScript, one can do a lot with HTML forms. If we returned to a standardized application-level protocol (in this case, something like NNTP) accessed by native apps, I think the result would be stagnation like what happened with Usenet. And how many apps for specific forums would a user be willing to install?
Re:Windows 10 and .NET Native by pcwalton on Saturday October 03, 2015 @12:54PM (#10324473)
Yeah, Usenet isn't exactly the example I would use as a paragon of usability. Even in 1996, I remember it was hard to set up. It's actually a classic example of how the Web won: the frictionless nature of typing the URL of your forum over NNTP configuration dominated all other considerations, even if the Web forum ran a bit slower when you got there.
Re:Windows 10 and .NET Native by GFK_of_xmaspast on Saturday October 03, 2015 @04:45PM (#10325286)
Nobody took usenet away, people just stopped using it because it became so terrible.
Re:Windows 10 and .NET Native by ben0x539 on Saturday October 03, 2015 @02:58PM (#10324959)
> Edit: OK, HN doesn't actually use JS, so mea culpa on that rhetorical flourish.

Hey now, I'm probably using JS to post this comment because apparently Firefox is made with it!

Re:Windows 10 and .NET Native by rymate1234 on Saturday October 03, 2015 @11:35AM (#10324233)
does HN even use that much JavaScript?
Re:Windows 10 and .NET Native by mrec on Saturday October 03, 2015 @11:45AM (#10324267)
No, AFAICS there's no JS at all in either this page or the "Add Comment" page. One HTML file, one CSS file and a couple of tiny GIFs; that's it.

EDIT: oops, tell a lie, there's a tiny inline snippet to do voting.

Re:Windows 10 and .NET Native by pdkl95 on Saturday October 03, 2015 @12:17PM (#10324364)
That simplicity (both the lack of client-side dynamics and the lack of unnecessary images) renders nice and fast, too. Too many sites waste time with "shiny" javascript tricks, way too many images and other bloat.
Re:Windows 10 and .NET Native by eslaught on Saturday October 03, 2015 @05:58PM (#10325543)
The issue is not AOT vs JIT, but one of language semantics and levels of abstraction.

You could prove this point in a trivial way by JIT compiling C with LLVM. The binary would have an increased startup cost, but would otherwise run identically to an AOT compiled C program. It might even run faster, since the LLVM JIT could run with the equivalent of the -march=native to the AOT compiler. (In an AOT environment, you can only do this if you can guarantee that the binary will only run on the machine it was compiled on, or otherwise know the exact specs of the target machine.)

A much more interesting example is Terra[1], a language with C-like semantics embedded inside Lua. The Terra-Lua combination allows you to use Lua as a sort of C++ templates replacement, giving you much better metaprogramming than traditional C/C++. This allows you to do cool things like implement a version of matrix-multiply which is specialized to the target hardware, allowing you to match or almost match the performance of ATLAS and Intel MKL. Mind you: these are not your usual C/C++ programs, they are mostly written in manually hand-tuned (or auto-tuned) assembly.

What we're really looking at here is a difference in abstraction levels. It's not that the JVM JIT is incapable of getting C-like performance. Obviously it can, in certain cases. The issue is that the Java semantics prevent the JVM from getting C-like performance in a predictable and dependable way from idiomatic Java programs. This should not really be a surprise, given how far Java is from C.

What we really need to do is take a step back and reconsider our assumptions. Our modern programming languages lock us into certain assumptions about language design and semantics that can be blinding at times. Consider that even C doesn't get optimal performance in all cases---this is why Fortran still exists. What would it take to get to programming language with nice semantics and truly optimal performance? I don't have a closed form answer, but I'm confident that the solution will require revisiting some of the assumptions baked into not just our compiler infrastructures, but also our languages.

[1]: http://terralang.org/

Re:Windows 10 and .NET Native by ygra on Saturday October 03, 2015 @09:34AM (#10323826)
Java was interpreted initially. The JIT compiler came later (around 2000, IIRC).
Re:Windows 10 and .NET Native by chrisseaton on Saturday October 03, 2015 @10:57AM (#10324097)
> Maybe after 20 years, it has finally become clear that the Just-in-Time supporters were wrong, and that Ahead-of-Time compilation is the better approach.

I think your argument is only correct for one subset of languages - C, C++, Haskell - languages like that. For languages like JavaScript, Ruby, Python, JIT compilation is proving to be massively more successful, and it's really easy to understand. As soon as you have features like eval, AOT compilation is never going to be effective.

Re:Windows 10 and .NET Native by BigChiefSmokem on Saturday October 03, 2015 @11:05AM (#10324137)
Agree with you but I have to call something out about JS. The thing I most hate about JavaScript is how slow JIT is and I think we have wasted tons of industry resources trying to write better engines instead of pushing for lower level access to the client metal from the web server.
Re:Windows 10 and .NET Native by pcwalton on Saturday October 03, 2015 @12:36PM (#10324415)
> The thing I most hate about JavaScript is how slow JIT is and I think we have wasted tons of industry resources trying to write better engines instead of pushing for lower level access to the client metal from the web server.

Like Web Assembly?

Re:Windows 10 and .NET Native by lovemetender on Saturday October 03, 2015 @02:17PM (#10324821)
>> Even today, there's still a noticeable difference between JVM-based software and native software, although the exceptionally massive increase in computation power have rendered the differences easier to overlook in many cases.

Measurable I'd agree with, noticeable no, not really unless you mean startup time; otherwise the JVM is very fast once it's started, that isn't disputable.

Re:Windows 10 and .NET Native by acconsta on Saturday October 03, 2015 @06:14PM (#10325580)
Unmanaged native code definitely has an edge, even in I/O-heavy applications like databases.

http://www.scylladb.com/technology/cassandra-vs-scylla-bench...

Not to mention low-memory environments like mobile.

Re:Windows 10 and .NET Native by 7952 on Saturday October 03, 2015 @10:06AM (#10323927)
A lot of change in computing seems to be moving the location of a cache to be closer or further from the user in a cyclical manner. Maybe the same observation can be applied to source code?
Re:Windows 10 and .NET Native by bad_user on Saturday October 03, 2015 @11:15AM (#10324166)
> Despite many years of effort and research, and much investment, we've yet to see Just-in-Time compilation rival Ahead-of-Time compilation in terms of the performance.

I see this repeated ad nauseam, but it's false.

Other platforms are not rivaling C/C++ in terms of performance and not AOT compilation. But the reason for why C/C++ is still winning in terms of performance has little to do with it being compiled ahead of time and more to do with manual memory management and not using a garbage collector. C++ compilers are also very mature, being themselves the subject of research. But compare Java's performance to Go, or to Objective-C for that matter and the situation changes completely.

Re:Windows 10 and .NET Native by mkup on Saturday October 03, 2015 @12:49PM (#10324456)
You are talking about high advancements in the compiler research. But is there any statistically significant performance difference between the code compiled via latest GCC vs. OpenWatcom (which is unmaintained for a few decades)?