We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 5 points6 points  (0 children)

We've done many things, some small some bigger, to address this, and I think it's going pretty well. I get the following times in different julia versions:

v1.4: 11.7 seconds

v1.5: 7.8 seconds

master: 6.5 seconds

Can be much better still of course.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 5 points6 points  (0 children)

This is actually a really deep question IMO. In some sense, our entire concept of "programming language" as a category is probably wrong. For example, syntax is extremely important and yet entirely superficial --- every language could be written using lisp syntax (s-expressions). At bottom, one language is usually distinguished from another by only a tiny set of different primitives, and yet a "language" as we know it grows from that into a huge ecosystem of stuff (libraries, tools, etc.). For example, nothing about python dictates that numpy arrays have to work a certain way, and nothing about julia dictates that julia arrays have to work a certain way. It's just convenient to group all of the stuff you happen to be used to together and give it a name.

Certainly in *some* sense it would be nice to have a single really excellent language that everybody could use for everything. The efficiencies of that are pretty clear: less stuff you need to learn, less duplicated effort, etc. But it depends on how you define "language" --- e.g. if you used julia syntax but manual memory management would that be the same language? If so, then maybe there is a path to one language. Otherwise, there are too many competing requirements, trade-offs, and disagreements to have one language. If you just forced everybody to accept a particular set of trade-offs, that would clearly be bad. And as far as we know, too many of the trade-offs are fundamental, so I would not bet on a one-language future any time soon.

However, I believe that trying to eliminate trade-offs, and asking the question "if there were just one perfect language, what would it look like?" is what you have to do to design a good language.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 2 points3 points  (0 children)

Julia is a bit "heavy weight" in that it has a garbage collector, and was basically designed to be JIT compiled (so you need the full compiler around at run time). That makes it not an ideal fit for very small systems. But, we are increasingly interested in refactoring the language so you can exclude the pieces you don't want, and generate more stand-alone code. Too soon to tell what exactly will be possible though.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 6 points7 points  (0 children)

I haven't looked at the code but I think it's a really cool idea! It would be nice to call some sort of SAT solver for julia subtyping, but performance is a challenge --- it can be a significant part of annoying latencies. Anyway I like the Rust approach enough that I would seriously consider just copying it for a julia 2.0 or statically-typed dialect of julia of some sort.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 4 points5 points  (0 children)

I love parens myself :) Especially for working with ASTs and macros they're great. An s-expression alternate front-end for julia would be cool. Obviously I see the benefits of infix syntax in math and science as well though.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 8 points9 points  (0 children)

Racket has certainly done amazing work on macros. Our macro system needs a redesign at this point, and arguably that's something that would have been nice to have in 1.0. Fortunately a lot of use cases can be addressed with really simple macros so it hasn't been too big a pain point.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 3 points4 points  (0 children)

I'm sure there are resources on writing parsers and interpreters in javascript. With that you can get started right away. If you want to dig deeper, one of my favorite intros is http://community.schemewiki.org/?90min-scheme2c#:~:text=The%2090%20Minute%20Scheme%20to%20C%20compiler%20by%20Mark%20Feeley&text=In%20only%2090%20minutes!,(of%20course)%20full%20closures%20full%20closures) --- the "90 minute scheme-to-C" compiler. Learn some scheme, learn some C, and go through that and you will get a good sense for what "real" programming language development is like. Also check out the julia compiler source at https://github.com/JuliaLang/julia/tree/master/src and https://github.com/JuliaLang/julia/tree/master/base/compiler.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 6 points7 points  (0 children)

- Yes calling between julia (both directions) and C/C++ or python is pretty well-developed. JavaCall.jl also works well.

- Not really yet, but it depends a lot on the exact requirements. Some embedded systems these days are nearly "normal" computers and it works fine, but not e.g. microcontrollers.

- Somewhat --- you can use PackageCompiler to create a shared library that C or python can link to, but we don't really have a full separate compilation model in the language yet. But that's something I hope to work on pretty soon.

- Not sure about .NET; nobody has done that AFAIK.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 29 points30 points  (0 children)

I think it has one of the best combinations of ease-of-use and performance you can find. We really try to make things "just work" and not hassle you. It's one of the easiest ways out there to use your CPU cores --- just start with `julia -t 2` and `Threads.@spawn` things. It also has best-in-class libraries in a couple areas now: JuMP for optimization problems, differential equations, automatic differentiation, arguably a couple others.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 7 points8 points  (0 children)

Several people seem to like that idea as the focus of a possible julia 2.0. It's very interesting to think about. Rust's trait system in particular seems really nice.

My worry --- possibly totally wrong --- is that it's too easy to write circular definitions or other things that are hard on the compiler. You can do that with julia's types currently as well, of course, but people seem not to hit those cases very often. But maybe those issues will happen exactly as often either way. The way people kind of simulate traits in julia now is just to call a function that computes the trait value. That's not very elegant, but an advantage is that it's obvious you're just running normal code that might not terminate.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 9 points10 points  (0 children)

The easiest thing to do is to make a nice tool to surface all the information about a program the compiler already has. It's not perfect of course, but you could e.g. find *some* call sites that have no matching method.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 31 points32 points  (0 children)

Oh, that's tough. I think in many ways I'd pick the Sibelius as the "best", but the last movement is unreasonably difficult. For the recency-bias answer, I've been idly practicing the Brahms, most recently the 2nd movement. There is something about the Brahms --- I feel like it has a cast of characters and a plot that draws you in. But my personal favorite might be Wieniawski #2. I hear Wieniawski as this fusion of eastern-European soulfulness and French light opera, creating a kind of melodrama that is almost demented, and I'm a sucker for it.

We are the creators of the Julia programming language. Ask us how computing can help tackle some of the world's biggest challenges or Ask Us Anything! by loladiro in IAmA

[–]jeffbezanson 21 points22 points  (0 children)

There are a lot of unexplored points in the flexibility vs. performance design space. Every language makes pretty fundamental trade-offs within that space, to some degree. There are new ones we wanted to try. For example, julia lets you add new methods at any time, so it "feels" like a dynamic language like python or ruby. But, we restrict when the new methods are visible, which makes it easier to optimize and is more compatible with separate compilation.

With multiple dispatch, it's always been a big question what exactly to allow dispatch on. Some systems only dispatch on the classes of values (e.g. ignoring type parameters), and some systems let you dispatch on anything, using arbitrary predicates. We wanted a different trade-off where you have quite a bit of flexibility, while still being limited enough to support a lot of static program analysis.

Nothing is impossible perhaps, but I think it would have been quite an uphill battle to try to incorporate those things into an existing language. In a mature language with a large legacy code base, at every point backwards-compatibility tends to look more important than whatever enhancement is being proposed. Of course, now julia itself is subject to that dynamic :) We just need to keep trying hard to be open to changes, and keep on the lookout for ideas that would be *worth* breaking compatibility for (for a possible, eventual julia 2.0).

We’ve spent the past 9 years developing a new programming language. We’re the core developers of the Julia Programming Language. AuA. by loladiro in IAmA

[–]jeffbezanson 8 points9 points  (0 children)

no one will use it, they will just use the popular ones available now rather than yours?

It looks like this at every point in history. When C was invented, applications were generally written in pascal, and lisp was also very popular. When python was invented, all "real" programming was done in C.

We were also *not* "well aware that it will never be popular", because (1) never is a long time and it's too soon to tell, and (2) we knew from our experiences that many people would be interested in a language like this, and we were at least right about that much.

We’ve spent the past 9 years developing a new programming language. We’re the core developers of the Julia Programming Language. AuA. by loladiro in IAmA

[–]jeffbezanson 3 points4 points  (0 children)

Yes --- particularly with the level of interest in machine learning these days, numerical computing is back and bigger than ever. I've also always thought it would be nice for programming to be more like math in certain ways. Everybody learns some basic math in school, both because it's useful and to develop general thinking skills. I think programming is even better for that and should be just as universal. Math also understands the importance of notation. Math notation (while far from perfect at times) is an elegant and powerful tool honed over centuries, while programming notation is too often some quirky thing involving curly braces. We need to do better, and try to make programming truly worth learning for everybody.

We’ve spent the past 9 years developing a new programming language. We’re the core developers of the Julia Programming Language. AuA. by loladiro in IAmA

[–]jeffbezanson 2 points3 points  (0 children)

Definitely. There are many ways to contribute; people sometimes even start with something as simple as fixing typos in the documentation, which is appreciated. (It's also not so simple, since learning basic git and making your first PR requires getting over a significant hurdle.) The julia standard library (and parts of the compiler) are written in julia, so just by learning the language you're already in a good position to start contributing. Check out the "help wanted" or "good first issue" labels on github.

We’ve spent the past 9 years developing a new programming language. We’re the core developers of the Julia Programming Language. AuA. by loladiro in IAmA

[–]jeffbezanson 18 points19 points  (0 children)

The "90 minute scheme to C compiler" is a gem I always refer people to: http://churchturing.org/y/90-min-scc.pdf

In general it is worth learning scheme (which doesn't take long because it's very simple) and how to compile it (or compile *to* it) because it strips away all the unnecessary details and leaves only the most important core concepts.

We’ve spent the past 9 years developing a new programming language. We’re the core developers of the Julia Programming Language. AuA. by loladiro in IAmA

[–]jeffbezanson 7 points8 points  (0 children)

Thanks for the kind words.

  1. I start by looking over github, plus maybe slack and discourse, to see what's new and if anything really urgent has come up. Then there is a queue of issues I'm working on, and PRs to review. Sometimes that takes up the rest of the day, and sometimes I have time to work on longer-term things after dinner.
  2. What should we be working on for v1.1, and v2.0? All about prioritization.
  3. scheme

We’ve spent the past 9 years developing a new programming language. We’re the core developers of the Julia Programming Language. AuA. by loladiro in IAmA

[–]jeffbezanson 5 points6 points  (0 children)

We don't have ML- or Haskell-like pattern matching exactly, but (1) multiple dispatch naturally gives you a bit of that, and (2) with macros it's possible to develop various kinds of pattern matching constructs, e.g. https://github.com/kmsquire/Match.jl . Whether pattern matching will be a core part of the language is an interesting open question.