4 ms·
Explore the Capabilities of Broadcasting in Julia Programming
- Joel_Mckay 2y agoThe broadcast operator just sits there like it didn't reduce an entire programming paradigm down to a single character. Julia is the first fun language I've seen in years. =3
- deleted 2y ago[deleted]
- ayhanfuat 2y agoI think implicit broadcasting in numpy made it difficult for a lot of people to grasp the concept. When it works, it works like magic. Sometimes it is intuitive. But then it stops working and because you actually never learned the logic behind it it turns into a mess. I had been (mostly successfully) using broadcasting for years before I started playing around with Julia and only then the concept clicked. I think their choice of being explicit here makes a lot of sense.
- mbauman 2y agoMy only regret is not making it even more explicit!
- Certhas 2y agoI think broadcasting is really one of the points where Julia shines. It's worlds ahead of Python/numpy.
- poulpy123 2y agoI may be too used of python/numpy but I wonder if it would not have been better to broadcast implicitly and use the dot when we want to not broadcast
- npalli 2y agoJulia syntax is so nice and consistent, a welcome relief from the oddball things that are a result of a mishmash in numpy/python/pandas world. Damn shame it hasn't taken off as much. While Multiple dispatch is great, I feel it doesn't scale to large programs. Julia syntax + compile time polymorphism (like C++) + gc + single executable would be a killer language for HPC and Scientific computing.
- Joel_Mckay 2y agoOne may easily compile a standalone Julia program binary (or embed it into C/C++). Keep in mind the overhead of a 124MiB static linked library into your program may take a bit to load. I have a rough script that auto builds such projects, but it is nowhere near ready to inflict on a stranger yet. =3
- ChrisRackauckas 2y agov1.12 already has merged binary trimming, so we have cases with a full ODE solver that's not 10's of MiB (mostly linear algebra BLAS stuff left), and hello world is 900kB. See https://info.juliahub.com/blog/new-ways-to-compile-julia-blog https://info.juliahub.com/blog/new-ways-to-compile-julia-blo.... It should release in like 6 months.
- Joel_Mckay 2y agoNice, that should help with the nonsense relative-performance-test people run that pans Julia due to the load-times. I suspect it scared away a few potential users evaluating the utility of the language. Seasons greetings, and happy coding =3
- ssivark 2y agoJulia hasn't "taken off" but I venture that it might be "getting there" with recent improvements in being able to generate (relatively) compact binaries. More generally, I wonder whether the future of software development will be less enamored with new/upstart languages, and more amenable to languages with truly novel offerings which have also had decades to mature. Beyond Julia, OCaml, Erlang/Elixir, and potentially Scheme / Common Lisp are a few of the others I can think of.
- Certhas 2y agoJulia gets a lot of things right. Going back and forth between Julia and Python, there are things to appreciate about either, but I think it is very clear that Julia has really moved this space forward. Unfortunately, it has also done so by ignoring a lot of hard-earned wisdom. My personal pet peeve is Concepts/Constraints ala C++. C++ added this after years of pain to make templates more manageable. It's a feature of many different languages, from Haskell to Rust/Mojo to C++. So there seems to be a pretty broad consensus that something like this is good to have. Yet, I don't see Julia getting them any time soon...