Hacker Newsnew | past | comments | ask | show | jobs | submit | voodooranger's commentslogin

here’s a different article that’s not paywalled: https://www.freightwaves.com/news/breaking-news-trevor-milto...

(btw when i cancelled my wsj subscription i had to call and be put on hold. there’s no way to cancel online. should be illegal imo. never again.)


> Removal of Nashorn JavaScript Engine

anybody know why a javascript engine was ever included in core java in the first place? seems... niche. and yet core java never included a simple web server (officially).


It's been replaced by GraalVM JavaScript which has Node.js built in. Performance is supposedly on par or better than the V8 version of Node.js. There's also support for ECMAScript modules directly from Java (without Node.js).

GraalVM offers interop between JavaScript, Python, Ruby, R, C/C++ and of course Java and other JVM languages.

I think GraalVM has the potential to make the JVM something of a universal platform. I guess that was the goal with Nashorn as well, but now it seems much closer to fruition.


It’s great for web development when I want the same code to run client side and server side.


I mostly don't work on web stuff, so maybe this is a dumb question, but can you give an example of what benefits that gives you? What code do you want to run in both places?

In my limited experience writing web code, the client side concerns itself with rendering and user interaction, the server side concerns itself with efficiently supplying dynamic data to the client, and other than request payload definitions the two have no logic in common.


The most straightforward example I can offer is my custom mark-up parser for formatting text. I wrote this parser in Javascript where it runs live in the browser, but when the final text is submitted it's parsed on the server side for security and replicability reasons.

Of course I could rewrite it in another language, but with Nashorn I don't need to. I can execute many hundreds of lines of Javascript with around four lines of utterly boilerplate Java. And it works perfectly. I don't need to worry about edge cases or dealing with subtle variations in regular expressions (don't at me) and other string parsing nuances.

I'm just a sole developer; I don't have minions. If I had to rewrite it today I'd probably look at a transpiling approach, but even then, defensive text manipulation tends to be edge-casey at the best of times.

(Also note that my priority here is browser performance, where it's running continuously on hundreds of clients simultaneously—often budget smartphones with limited CPU power. On the server it only has to run once per submit and the CPU cost on the server is beyond trivial.)


Makes sense. Thanks for the example!


This is the 3rd JS engine with its replacement. The idea I think is that it would be embedded in for scripting like uses, like many C++ games used Lua or Flash.


com.net.sun.httpserver looks like standard enough for practical purposes: https://stackoverflow.com/questions/58764710/is-package-com-...


I once used it for an embedded expression evaluation language in a Java application.


I used it quite a bit for simple scripting before I learned python.



There's no magic required here, people. Batteries, engines, just tiny changes on existing Teslas. This car is dooable by Tesla and by third parties like Lucid Air just replicating some of the things Tesla has done and making small improvements.

1. Battery capacity: Tesla had 100kw cars 4 years ago. 13% increase - easy, even within Tesla's grasp, they just have not bothered.

2. Efficiency and range - this is just a small improvement on what the Tesla model S has, add more batteries. The Lucid Air is bigger than a model 3 and closer to an S. The S already has 400 miles. Tesla improved on the original 2012 (yes, those are 8 years old!) model S' range by using the more efficient model 3 engines on the S. The S has 100kwh currently.

3. The model 3 has different batteries than the S, apparently they have a bit higher capacity in the 3 than in the S. All Tesla has to do to give the S another boost is switch to using the model 3 batteries, add a few more. The one downside of the 3 batteries is supposed to be they have less max power, so less acceleration? Tesla is going to have 'battery day' soon when they will talk about their next generation batteries, and perhaps talk about S improvements.

4. Manufacturing, and especially getting enough batteries - this is where Tesla is likely really ahead. It's hard to make cars in volume, even expensive ones. But getting enough batteries for a large fleet of cars is the early 21st century unobtanium. Every other car company that ones to make large volume EVs can't do it. Where everyone is at least Japan and Europe and the US. China might be able to pull this off, too soon to say.


Nobody is saying Tesla can't match this, and given Elon's personality, I guarantee Tesla will have a Taycan style reaction and seek to reclaim the crown in short order.

However, that competitors are nipping at Tesla's heels is an absolute sea change compared to a few short years ago. They used to not only be ahead in every metric, but also improving faster than their competition further solidifying the lead.

Tesla sets a very high bar, but genuine effort is being made now to compete. It's fantastic, and great news for the EV movement. Reading EV news is finally fun again.


Yup, 4 is the key. Lucid Air is being marketed as high end luxury car, so 113kwh is totally believable. But Tesla's first-mover advantage in this case is having locked down the battery supply chain necessary to scale. It seems that most of Tesla's competition is stalling for time while they wait for their battery suppliers/partners to catch up. I don't doubt at least some of them will get there eventually, but it should take a few years.


I don't think Tesla has so much, if any advantage. Open market cell prices are very good.


Then why does every company say that they have production limitations based on availability? VW was saying that just a few months ago, and so was porsche. That's give as the reason why Audi and Jaguar have low volumes.


double click the edge of a window to expand it to the edge of the screen. hold alt while double clicking to get the opposite edge to also expand.


username checks out :-)

seriously though, i’m glad they were able to tie their profession in by sharing their story, i really enjoyed it. if i were to embark on this kind of thing i’d probably end up writing some software to help with the effort.


I will continue to use Apple but I pulled both of my apps from their app store years ago due to maltreatment. I don’t use their app store as a consumer either. IMO it’s a wasteland.

Unpopular opinion but I also think it should be completely up to them to set their revenue share. Let their app store wither away as developers create platform-independent web applications instead.


maybe. but they’re getting better at building the machine that builds the machine that builds the machine.


Chinese labor? That's the machine that built their most recent machine that builds the machine.

Over-indexing on fancy production automation is part of what made the Model 3 launch so painful for them, as admitted by Elon himself. They probably could have had a much happier path spending less capital on a slower, more traditional production ramp-up.


That’s the scale most don’t realize he’s operating at. With a goal of settling 100,000 on Mars, he has to reach a point of practically commoditizing production of factories.


Maybe he should get better at building cars.


> If you want to detect how someone fares at a task, say loan sharking, tennis playing, or random matrix theory, make him/her do that task; we don’t need theoretical exams for a real world function by probability-challenged psychologists.

^ horrible job interviews in a nutshell


i don’t know what the automakers’ stance was or is but i believe the organizations that have fought direct sales have been the national and state dealership associations.


if the sun, which is huge compared to the earth, were the size of a pea, the nearest star would be ~120 miles away to scale. this is a typical distance between stars and it’s why when andromeda collides with the milky way there is little chance of stars colliding.


I’ve heard, I think many years ago, this fact there is not much risk or star collisions when galaxies collide. But I wonder, given more recent knowledge of how common exoplanets are, if there is a more significant risk of disruptions to the planetary systems that surround the stars. These planetary systems are much larger than the stars themselves.


Stars are still sparse enough in both galaxies that most stars still wont have much effect on most other stars' planetary systems. On the scales of the galaxies a star system isn't much bigger than that system's star. A star affecting another's planetary system would pass so close it and the host star would likely form a gravitational relationship and would be considered a "collision". Space is stupid big and stupid empty.


I really like this demo to show how empty our solar system is: https://joshworth.com/dev/pixelspace/pixelspace_solarsystem....

Or the RL version in Sweden: http://www.swedensolarsystem.se/en/


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: