I prefer Java rather than Python because it is concise. Conceptually, it is clearer than Python. Python is confuse regarding OOP.
@silverdemon101Ай бұрын
So nobody knew about Groovy being the Python for the JVM ecosystem? I believe Groovy has a lot of potential in AI and data science.
@NiranjanNandaАй бұрын
@@silverdemon101why not kotlin? For that matter any jvm language designed like a scripting language
@silverdemon101Ай бұрын
Groovy has already existed since 2004 way longer than Kotlin and has improved quite a lot in terms of tooling. Go look at Paul King's presentation and you'll understand more.
@whatever-kn9ucАй бұрын
Do you have any documentation that i can refer to learn ai with java
@RickGladwinАй бұрын
Thanks for taking such a measured approach to this topic (as opposed to coming out like a Java-only cheerleader). I respect and trust your information much more because of that. I’m currently a Java developer starting a Masters in AI (mostly Python), so I’m interested to see how the two are integrated over the next couple of years.
@nipafxАй бұрын
Thank you, Rick! 🧡💙
@YuanBo63Ай бұрын
I waited for this topic for quite some time😀
@nipafxАй бұрын
I hope the video delivers. 😊
@SergiuszRoszczykАй бұрын
Visualization tools in Java reminds me my JavaFX 8 project, where you couldn’t assign color to particular colors in own order. There was a bug that the color was assigned to Id and removing and adding new dataset to plot rearranged them in the order of adding. The Id was private and the color was derived from it, so it was pretty annoying to get colors consistent without reaching out to reflection and accessing private properties of adding virtual items and removing them to increase Id to expected color value
@DavidDLeeАй бұрын
Project Valhalla is 10 years old. Many of us gave up on it long ago. Project Panama is still in preview or not delivered (vector API) and Babylon does not even have a JEP to follow. In the mean time, Python is gathering momentum which will be difficult to match
@nipafxАй бұрын
Valhalla is taking a long time, but it's also a deeply invasive change and I think we can agree that siphoning some of the effort into more short-term gains (~> Amber) is a good compromise. Panama finalized the FFM API (in JDK 22) and the vector API is ready for use in production if it's important enough for you that you're willing to rewrite some code. You'Re right on Babylon, but it's just a month old, so... Honestly, I don't think Python is gathering momentum. I think it _has_ momentum but looking over the list of PEPs, I don't see anything groundbreaking (then again, I don't know the ecosystem, so I may very well be missing something) - what's there that compares to the efforts made in Valhalla, Panama, _or_ Babylon, let alone all of OpenJDK combined?
@ingframinАй бұрын
@@nipafx The strength of Python is interoperability and interactive development. Calling a C DLL from Java is still a miserable experience and jShell is a joke compared to the Python REPL. For academics, AI researchers, and data scientists, it's a lot easier to develop AI models in Python and build up from there. The deployment in production than follows that: why rewrite something that already works? Java is more focused on top down design/development, which is not very suited to experimental research. Once your classes and hierarchies are finalised, it's difficult to change them. The dynamic nature of Python is so much better for this. To be clear: Java is a very good language. But I think it's too deep into the "Enterprise development" model to breach into experimental stuff. It's like the early days of the web: Perl, Ruby, Python, PHP were the kings. Only when the field consolidated a bit, Java and the others gained a substantial foothold. EDIT: One final remark: Valhalla and Panama are the 2 feature sets that would have allowed me to use Java for our new 6G testbed. Now it's all C++ and Python, because those 2 JEPs are late.
@DavidDLeeАй бұрын
@@nipafx Python is slow and a Valhalla is not even on their radar. But, even in college they today teach Numpy and many use PyTorch and other libraries that don't exist for Java. Startups that do ML/AI today use Python from the get go, including for the training portion, and they don't need to wait for projects that are not yet available or maybe never will.
@user-ij9vi6sn8gАй бұрын
Other helpful properties you mention are very much important for any data scientist to pick java as their first choice, particularly visualization tools. hopefully amber can do something about it.
@nipafxАй бұрын
I don't think Amber is the right project for that - it is focused on improving the language to "right-size ceremony", not to provide a better library, let alone JavaFX. I also think it makes sense to focus on where Java is strongest in the AI space and that's definitely AI feature/product development, not model development. Maybe some resources free up in the future and issues like visualization get tackled, but I don't think that'll happen any time soon.
@forKotlinskyАй бұрын
I prefer Java rather than Python because I am waiting for Valhalla
@driveDosesАй бұрын
Great video.
@Nick-yd3rcАй бұрын
And regarding Nikolai’s list, in my opinion, what’s most important for data science workflows and UX is a perfect data frame library, on par with Pandas, Polars, R data.table, etc., and close in efficiency, also to DuckDB. Easy integrations with SQL databases and Spark. Kotlin also offers a new data frame library, though I can’t tell much to its efficiency and feature parity. There’s a recent JetBrains talk specifically on their DataFrame library. It would be great if the community could focus on just one implementation and make it shine instead of a myriad incomplete, half-baked attempts. In addition, it will be hard to convince data science folks to move over to Java for that kind of work. Spark jobs are mostly for data engineers with some experience in Scala. That doesn’t always immediately translate to actual data science workflows. It might be easier to just run Python workloads by FFI. If that integration becomes truly seamless, 80% of issues will be solved outright.
@alcar32sharifАй бұрын
I am a Java Fanboy and I admit that Java lacks essential features to be effectively useful in AI/ ML/Datascience projects. Doing matrix or tensor operations in Java is extremely hard and painful. Working with high dimensional data as well.
@farkarfАй бұрын
Thanks for the video. Q: Why is operator overloading a desired feature in ML/AI? In my experience (c++/scala) operator overloading obfuscates logic. As a colleague used to say, "Operator overloading is syntactic sugar that brings cancer of the semi-colon" 😂
@nipafxАй бұрын
ML/AI and data science in general is very heavy on arithmetic and doing that with method calls instead of operators is no fun.
@SourabhBhatАй бұрын
@farkarf Do you have experience working on linear algebra using Java versus any other language with operator overloading? I for one have moved away from Java for this reason. My code with operator overloading looks close to what I write on paper, making it less obfuscated in Python.
@farkarfАй бұрын
@@SourabhBhat yes, (linear algebra in java). Our team then transitioned to Scala. I think operator overloading is fine for DSLs and such, but more often than not, it obfuscates logic (especially if your team is in the habit of wanton operator overload). Once a language supports a feature, it gets hard to tell others to eschew it. That was circa 2013. Java hardly had any functional support.. what made Scala so attractive to us back then. Re operator overloading and verbosity: most of the interesting stuff happens at higher levels of abstraction.. matrix operations for eg don't need operator representations. Just because we use super-script T to write the transpose of a matrix doesn't mean it should be represented that way in code, imo. If you ask me, Python is convenient, but also, you keep having to look at the mess under its hood, cuz it super obfuscated.
@CliqueSpace24 күн бұрын
I wish for a Java that solved the problem of dealing with checked exceptions across libraries.
@vinterskugge907Ай бұрын
8:21 Nice to see an acknowledgement from an Oracle employee of the downsides of checked exceptions. Any chance of Project Amber developing an opt-out feature for checked exceptions?
@nipafxАй бұрын
There's a long way from "a feature has downsides under certain circumstances" to "there'll be a feature flag", so I wouldn't hold my breath on that one. Then again, it's not _just_ beginners that struggle with it, so maybe something will get done. Personally, I think the better solution would be variadic generics (at least for exception types), so functional APIs can work better with checked exceptions.
@sjzaraАй бұрын
There are also great benefits to checked exceptions, especially when security and stability is important.
@jay_senszАй бұрын
It seems like Babylon and Valhalla won't be enough to make a half float implementation palatable to developers due to the lack of operator overloading. You'd still end up writing code like `hf1.mult(hf2).add(hf3.mult(hf4))` instead of `hf1*hf2 + hf3*hf4` or am I wrong?
@nipafxАй бұрын
You're right - see 4:51.
@badpotatoАй бұрын
what's wrong with writing like this?
@jay_senszАй бұрын
@@badpotato It's a lot harder to read
@user-md2fk3jj1eАй бұрын
worth to mention 'mukel/llama3.java', a java implementation of llama.cpp, that work's only 10-20% of pure c implementation.
@andreadelbene730Ай бұрын
Unlike c-like languages Python support tuples and multiple return values, that's why it fits better AI code. There's no magic behind this.
@sjzaraАй бұрын
Java can return multiple return values in records.
@andriespretorius553424 күн бұрын
M$ use to make videos like this all the time... java ecosystem has got a real problem it needs to resolve asap
@VuLinhAssassinАй бұрын
I can't wait for another ten years before all projects are made reality 💀
@nipafxАй бұрын
Come on, that's not fair. Babylon is just a year old and Panama already delivered FFM and (basically) the vector API. But, yeah, Valhalla is taking its time.
@VuLinhAssassinАй бұрын
@@nipafx Valhalla was a bit too ambitious, I guess.
@nipafxАй бұрын
@@VuLinhAssassin It's definitely ambitious, but I don't think _too_ ambitious. Work on it is progressing and I'm convinced we'll see results eventually.
@quintesseАй бұрын
Wait "maybe operator overloading"? WHere can I read about that, I googled for it but couldn't find anything :-)
@nipafxАй бұрын
You forgot two "maybe"s there. 😉There were some Ask the Architect sessions at past conferences (somewhere in this list: kzbin.info/aero/PL_-IO8LOLuNrVRv3eEVGk8LhH8PiEirnp ) where Brian mentioned that once value types and universal generics are done, this could be looked into. But that's very speculative and AFAIK not written down anywhere.
@quintesseАй бұрын
@@nipafx no no Brian can't talk about ideas without writing them down! 😛 (NB: the link doesn't seem to work for me, it just takes me to a generic KZbin page)
@nipafxАй бұрын
@@quintesse 😂 (KZbin included the closing parentheses in the URL. Fixed now.)
@rtorello75Ай бұрын
This topic, in my opinion, is becoming the next run-a-way "Hype Train" of the USA (bigger than a "Pet Rock" from the 1970's). I have used ChatGPT, and it clearly does some pretty amazing things in its ability to speak grammatically correct English. In fact, in my wildest dreams, I never thought I'd be able to ask programming questions about Java, and have code shot back out at me by AI! However, ChatGPT's models took months to train and it has been said multi-millions of dollars of hardware. When Nicolai says "Java can do AI", it sounds like an extremely over-simplified statement to me. What part of A.I. is Java going to do? Right now I could write a Java-based App to communicate with Open-AI's system and ask it questions, right? Open-AI didn't even use GPU's, they used something called TPU's, and they are very expensive. Project Panama's Vector-API is supposed to be something that allows for programming GPU's, correct? It seems to me like a series of hour-long videos from expert programmers about this topic would be the right attitude.
@PeterVerhasАй бұрын
Is Java good for SQL databases? No. Do we care? No. Why would I want the AI engine written in Java? AI services like embedding, vector db, and llm are services I can quickly call from Java.
@nipafxАй бұрын
An SQL database is a separate service that is set up for remote communication - an AI engine isn't. You can build such a service around it but why go through the trouble if you don't have to? With AI engines in Java you get better observability and debugging, seamless integration, uniform resource management, etc.
@Denimy0Ай бұрын
Why wouldnt Java be good for SQL db’s? Wierdest take i’ve heard.