TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

JuliaLang: The Ingredients for a Composable Programming Language

355 pointsby mindBover 5 years ago

16 comments

StefanKarpinskiover 5 years ago
I think the top-level take away here is not that Julia is a great language (although it is) and that they should use it for all the things (although that&#x27;s not the worst idea), but that its design has hit on <i>something</i> that has made a major step forwards in terms of our ability to achieve code reuse. It is actually the case in Julia that you can take generic algorithms that were written by one person and custom types that were written by other people and just use them together efficiently and effectively. This majorly raises the table stakes for code reuse in programming languages. Language designers should not copy all the features of Julia, but they should at the very least understand why this works so well, and be able to accomplish this level of code reuse in future designs.
评论 #22293736 未加载
评论 #22296503 未加载
UncleOxidantover 5 years ago
I really like Julia a lot and actually used it in a work project a few years back.<p>However, there&#x27;s the debugger issue. There are several debugger alternatives. It&#x27;s tough to figure out which debugger is canonical (or is any of them the canonical debugger?). The one that seems to being used most at this point is Debugger.jl. However, it&#x27;s exceedingly slow if you&#x27;re debugging sizeable operations (matrix multiplies, for example) - I&#x27;m talking hitting &#x27;n&#x27; to step to the next line and then waiting several minutes for it to get there. There&#x27;s also Rebugger.jl, MagneticReadHead.jl (IIRC) and Infiltrator.jl among others. I finally found that Infiltrator.jl was a lot faster for that machine learning program I was trying to debug, but it&#x27;s rather limited in features (the only way to set breakpoints it seems is by editing your source, for example).<p>And this isn&#x27;t the only case where there are multiple packages for achieving some task and you&#x27;re not quite sure which one is the one that&#x27;s the most usable. I think what the Julia community needs to do is maybe add some kind of rating system for packages so you can see which packages have the highest rating.
评论 #22295091 未加载
评论 #22291267 未加载
评论 #22293010 未加载
yahyaheeeover 5 years ago
There are parts of Julia I really like but it has some problems.<p>* Multiple dispatch is an odd design pattern that seems to over complicate things. I know there are people that love it and claim it’s better, but after working with it for some time I just want a struct with methods. It’s much easier to reason about.<p>* The packaging is cumbersome. I understand their reasoning behind it but in practice it’s just more of a pain than denoting functions as public one way or another.<p>* The tooling is poor. I work with Go for my day job and it’s toolchain is an absolute pleasure. The Julia toolchain isn’t in the same arena.<p>* The JIT is slowwww to boot. I was amazed the first time running a Julia program how slow it was. You could practically compile it faster.<p>* Editor support has never been great.<p>* As others have mentioned type checks don’t go deep enough<p>I think it has some neat ideas and in certain scientific arenas it will be useful, but IMO they need to focus a bit more on making it a better general purpose language.
评论 #22295787 未加载
fishmasterover 5 years ago
I&#x27;ve been using Julia along with python and Pytorch, not yet for machine learning until flux is more mature but for NLP scripts, and I have to say that I&#x27;m starting to like it. Multiple dispatch, linear algebra and numpy built in, dynamic language but with optional types, user defined types, etc.
xvilkaover 5 years ago
I hope Julia will be more popular in bioinformatics. Personally, I have a high hopes for BioJulia[1][2][3] and the amazing AI framework FluxML[4][5] + Turing.jl[6][7]. Apart from the speed, they offer some interesting concepts too - I recommend to check them out.<p>[1] <a href="https:&#x2F;&#x2F;biojulia.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;biojulia.net&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;BioJulia" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;BioJulia</a><p>[3] <a href="https:&#x2F;&#x2F;github.com&#x2F;BioJulia" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;BioJulia</a><p>[4] <a href="https:&#x2F;&#x2F;fluxml.ai&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fluxml.ai&#x2F;</a><p>[5] <a href="https:&#x2F;&#x2F;github.com&#x2F;FluxML&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;FluxML&#x2F;</a><p>[6] <a href="https:&#x2F;&#x2F;turing.ml&#x2F;dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;turing.ml&#x2F;dev&#x2F;</a><p>[7] <a href="https:&#x2F;&#x2F;github.com&#x2F;TuringLang" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;TuringLang</a>
评论 #22289977 未加载
评论 #22291388 未加载
评论 #22291744 未加载
评论 #22291336 未加载
smabieover 5 years ago
Julia is great. It’s significantly simpler than Python while also being much more expressive. It’s too bad the typing is only for dispatch, but hopefully someone will write a typechecker someday. I’ve found it surprisingly refreshing to not have to think about classes and just add functions on objects wherever I want. Some languages solve this with monkey patching (which is bad), others like Scala with an extension class (reasonable, but you still don’t get access to private properties), but the Julia approach is cleaner.<p>I wouldn’t use Julia for a non-scientific computing app as I don’t think it’s suitable, but for anything data science related, it’s great! And with the Python interop, I don’t really think there’s any reason <i>not</i> to use Julia for your next data science project. I suspect that over the next 5 years Python will no longer be used for these applications at all.
评论 #22289896 未加载
评论 #22290253 未加载
评论 #22291403 未加载
评论 #22289954 未加载
评论 #22289863 未加载
评论 #22290267 未加载
tgflynnover 5 years ago
Julia is a language I really wanted to like, and to a certain extent I do. However after spending some time working with it and hanging out on the Discourse channels (they certainly have a very friendly and open community, which I think is a big plus), I&#x27;ve come to the tentative conclusion that its application domains are going to be more limited than I would have hoped.<p>This article hits on some of the issues that the community tends to see as advantages but that I think will prove limiting in the long run.<p>&gt; Missing features like:<p>&gt; Weak conventions about namespace pollution<p>&gt; Never got around to making it easy to use local modules, outside of packages<p>&gt; A type system that can’t be used to check correctness<p>These are some of my biggest gripes about Julia, especially the last two. To these I would add:<p>* Lack of support for formally defined interfaces.<p>* Lack of support for implementation inheritance.<p>Together with Julia&#x27;s many strengths I think these design choices and community philosophy lead to a language that is very good for small scale and experimental work but will have major issues scaling to very complex systems development projects and will be ill-suited to mission critical applications.<p>In short I think Julia may be a great language for prototyping an object detection algorithm, but I wouldn&#x27;t want to use it to develop the control system for a self-driving car.<p>Unfortunately this means that Julia probably isn&#x27;t really going to solve the &quot;2 language problem&quot; because in most cases you&#x27;re still going to need to rewrite your prototypes in a different language just like you would previously in going from, for example, a Matlab prototype to a C++ system in production.
评论 #22290382 未加载
评论 #22290129 未加载
评论 #22290166 未加载
评论 #22292978 未加载
评论 #22294970 未加载
classifiedover 5 years ago
Is it possible yet to compile ahead-of-time to a stand-alone binary executable?
评论 #22289653 未加载
评论 #22289441 未加载
评论 #22289449 未加载
评论 #22289587 未加载
byt143over 5 years ago
Anyone know how this compares to swift and its protocols etc?
评论 #22289813 未加载
评论 #22290023 未加载
huijzerover 5 years ago
Julia is by far the favorite language I have written code in. It is extremely expressive, while also being easy to read. Most design decisions are spot on. For example, the language has syntactic sugar, but not too much. Everything in the base library makes sense and seems to be there for a purpose.<p>Other niceties are the meta-programming capabilities, which allow for things like inspecting the llvm code and printing a variable name `x` plus output by only typing `@show x`. Then there is the fact that anonymous functions actually look like how you would describe a math function! (That is, `f(x) = 2x` is a valid function, as is `f(x) = 2π`.)<p>However, there is one thing I do not like at all. That is the loading time of packages. When starting julia and running `@time using DataFrames` it takes about 38 seconds when recompiling some stale cache. If all caches are good, the the load times for some common packages still add up to 1.1 + 4.5 + 1.1 seconds according to `@time using Test; @time using CSV; @time using Dates`. Therefore, nowadays I prefer to use R. For most of my use cases R outperforms Julia by a factor 10.
inambercladover 5 years ago
I never was able to get julia to do what I want. If I were a data scientist who developed and maintained large libraries, then it would probably be great, but I&#x27;m not. I just want to quickly visualize and modify data, or maybe see how a model compares. Much more difficult to do simple things like that than in Octave&#x2F;Matlab.
评论 #22297084 未加载
ablekhover 5 years ago
Interesting post and excellent discussion. I have the following question to all Julia and&#x2F;or Python experts here. What strategy for developing a cloud-native {science and engineering}-focused platform would be better, in your opinion, and why: A) develop an MVP and then relevant production platform in Python, spending some saved time and efforts (due to simplicity, [as of now] better tooling and much wider pool of experts) on development of more and&#x2F;or better features; B) develop an MVP in Python, then rewrite it for production in Julia for much better native performance, GPU integration and potential use of macros for an embedded DSL; C) take more time initially to master Julia and develop an MVP and then the corresponding production platform in Julia from scratch?<p>EDIT: Forgot to mention that HPC workloads would represent a significant, albeit non-unique, aspect of the platform in question.
评论 #22294914 未加载
评论 #22296253 未加载
ColanRover 5 years ago
I&#x27;ve been meaning to learn Julia. Is there a recommended text for doing so?
评论 #22291498 未加载
dzongaover 5 years ago
though, Julia is faster than Python. Does anyone mind explaining why Python can&#x27;t have a JIT ?
评论 #22290241 未加载
评论 #22290121 未加载
评论 #22290351 未加载
评论 #22290044 未加载
lightsighterover 5 years ago
Except they have no story for building composable libraries in a distributed setting. The story for distributed execution in Julia today is just use MPI, which is a terrible answer. Anyone who has ever use libraries backed by MPI in any language knows that they are inherently not composable. You can&#x27;t just take an object partitioned across multiple nodes one way by one library and pass it into a second library that expects it to be partitioned a different way. As far as I can tell the Julia language has nothing to say about that, and that makes them a non-starter today for anyone trying to build composable libraries for distributed memory machines.
评论 #22293806 未加载
Iwan-Zotowover 5 years ago
Composable? Julia and composable?!?<p>They decided on sequence range [1...N], instead of [0...N) like Python.<p>Try to compose that.
评论 #22290250 未加载
评论 #22289877 未加载
评论 #22294167 未加载
评论 #22291524 未加载
评论 #22291784 未加载
评论 #22293592 未加载
评论 #22292683 未加载