However, I am curious about the first paragraph of the preface:
> Julia is an open-source programming language with an easy to learn syntax that is well suited for this task.
Why is Julia better suited than any other language?
However, I am curious about the first paragraph of the preface:
> Julia is an open-source programming language with an easy to learn syntax that is well suited for this task.
Why is Julia better suited than any other language?
* Prefixing a variable with a scaler will implicitly multiply, as in standard math notation (e.g. 3x would evaluate to 6 if x is 2)
* Lots of unicode support. Some feel almost gratuitous (∈ and ∉ are operators that work as you would expect) but it's pretty nice to have π predefined (it's even an irrational datatype) and to use √ as an operator (e.g. √2 is a valid expression and evaluates to a float). It's not just that Julia supports these constructions but provides a convenient way to get them to appear.
* This is a little less relevant for calculus but vectors and matrices are fist class types in Julia. Entering and visually parsing matrices is so much easier in Julia than in Python.
m = [1 2 3;
4 5 6;
7 8 9]
vs. m = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
Transposition is a single character operator ('). Dot product can be done with the dot operator (m ⋅ n). A\b works as it does in matlab.* Julia supports broadcasting. It also has comprehensions but with broadcasting I personally find much less need for comprehensions.
* Rationals are built-in with very simple syntax (1//2))
Some things I don't like about Julia:
- array.mean().round(digits=2) is more readable than round(mean(array), digits=2)
- Poor support for OOP (no, pure FP is not the optimal programming approach).
Of course it's not built in, which I understand is annoying if that's your preferred coding style. I personally am sad that really good traits aren't encoded in the language.
array |> mean |> round
For scenarios with named arguments there is a little not so cleaner workaround
array |> mean |> x->round(x, digits=2)
array |> mean |> x->round(x; digits=2)
will do what you want and is arguably more readable than dot notation.Not supporting OOP is very much intentional. It has structs and multiple dispatch (which has proven to be insanely useful in Julia's domain of scientific computing) so about the only thing you lose is the namespacing that dot syntax facilitates.
Any language that has Uniform Function Call Syntax (UFCS) [1] lets you replace wrapped function calls with linear calls like that, it's clearly easier to read, and much easier to write, specially when you consider programmers' tooling (in case it's not obvious why: you can type the name of a symbol and a '.' and the IDE shows you the available functions... this works also for free functions that take the symbol's type as the first argument as well.... that could work for the pipe operator as well, of course, that's why I said that the two things are basically equivalent, just with slightly different notation).
[1] https://en.wikipedia.org/wiki/Uniform_Function_Call_Syntax
is how mathematicians have thought for hundreds of years now. They do so in this way, because it's indeed easier to parse, and philosophically it correctly represents what is happening mathematically.
> array.mean().round(digits=2)
is how a subset of software engineers have thought about computation in the last couple of decades.
Technology should whenever possible adopt already existing conventions, because technology is created to serve the user, and not vice versa.
"Because tradition" is not a good argument. We can and should strive for better.
The modern OOP-derived style of `array.mean().round(digits=2)` is just as exact in its specification, and arguably more semantically precise as well as it organizes the meaningful bits to be together.
Also I think you don't account for how much mathematical notation has changed over the years. The `round(mean(array), digits=2)` structure is relatively recent, early 20th century I believe, and the result of active reforms.
`x.plus(y)` dispatches based on (runtime) type of x (polymorphism) (single dispatch), and might call different functions based on the (compile time) type of y (function overloading).
In Julia, it would be `plus(x, y)`, and it can dispatch based on the runtime type of both x and y (or determine the correct method to call at compile time already, if the types of x and y can be determined then).
Julia's execution model is quite distinctive, and it does take a thorough understanding of how it plays out to get native-code speeds out of it.
I agree. Math notation has changed in response to problems mathematicians have faced, and as their thinking have evolved. It should not change because tool builders for mathematicians - when the tool builders in most cases are not even professional mathematicians - decide some other notation is better.
> array.mean().round(digits=2)
might be good (it is not) when you are operating on one object. As soon as you have a binary operation (say multiplication), this notation completely breaks down. Because the operation is often symmetric, or "near" symmetric, meaning it is not so different as to write something as ridiculous as x.product(y).
But more importantly, (common/dominant) mathematics is functional in nature. It's decidedly not object oriented. Given a matrix, M, doing something like M.eigenvalues() is vomit-inducing because eigenvalues is not a property of a matrix M. For matrices, its a map from a set of linear transformations (of which M is merely one item) onto a set of numbers. It is its own thing, separate from M.
I don't think this subthread is going to be productive and I'm bowing out.
Even though the notation changed over the years, the paradigm of "numbers as immutable entities and pure functions" has been the dominant way that math is presented, compared to something like "encapsulated objects that interact with each other via sending messages".
I don't think this has to be this way, and I do think that "real math" can also be laid out assuming principles of OOP. However, I do suspect it's the way it is because the laws of nature are unchanging, in contrast to the logic of a business application.
Because Julia is a tool with the target audience of mathematicians and scientists, I think it's a sensible decision to embrace the usual way of thinking, as opposed to presenting a relatively different way of thinking which steepens the learning curve. Not because data and functions are fundamentally better than OOP, but because it's more pragmatic for the target audience.
The entire field of theoretical computer science, to which functional programming and type theory is closely tied, is a branch of mathematics. The Church-Turing thesis which gives both to our field equates the two at a very fundamental level. Questions about type theory, programming language design, and programmer ergonomics are fundamentally about math and applied math.
Maybe you and the other poster have in mind specific fields of math, but then you need to make claims for why those fields are sufficiently different as to be exempt from applicability of any of the advances in notation observed in other fields.
Your implicit assumption that you can divide computer science into a different bucket from “real math” is incorrect, and gatekeeping.
As I said though, I don’t think this is a profitable debate to have here on HN.
> Maybe you and the other poster have in mind specific fields of math,
Yes, because this is about Julia, I assumed we are talking about the specific fields of math that happen to be commonly used in mathematical and scientific computing, such as the ones learned in university math and science courses.
> Your implicit assumption that you can divide computer science into a different bucket from “real math” is incorrect, and gatekeeping.
It is regretful that we had a miscommunication. I agree with you that computer science belongs into the same bucket as "real math". The thing is, in the context of Julia it is not easy to read "math" as "math, but not only the domains that Julia is concerned in, but really all fields of math, including theoretical computer science". At least thanks to your comment, I see what you mean more clearly, and I think it'll help some other potential readers as well.
> but then you need to make claims for why those fields are sufficiently different as to be exempt from applicability of any of the advances in notation observed in other fields.
I'm curious to know specifically about the specific advances of notation observed in other fields. By this you mean dot notation for method application? I'm unsure if `a.method(b).anotherMethod(c)` is more advanced than `a |> method(b) |> anotherMethod(c)` (Edit: or `(anotherMethod(c) . method(b))(a)`) notation-wise.
M = [1 2 3; 4 5 6; 7 8 9]
λ = eigvals(M)
Which is much the same.Personally I think of them as a characteristic of the matrix (but I just write numerical software, I’m not a mathematician) and implement them as the result of a process. So I don’t really see any reason to favor either syntax or call one more mathematical.
> The modern OOP-derived style of `array.mean().round(digits=2)` is just as exact in its specification, and arguably more semantically precise as well as it organizes the meaningful bits to be together.
I would have agreed with you if I were developing business applications. However, for the domain of math and science, every piece of material that I have seen assumes the paradigm of numbers as immutable entities and functions, not the paradigm of mutable encapsulated objects and interacting messages. To a mathematician or scientist the semantics of a `Vector` (as data) and a `mean` function that takes the `Vector` as input should be more natural than a black-box `Vector` object that can receive a `mean` method.
It may be philosophically correct per some definition of philosophically correct but this is not what I care about.
For example, writing a function that works on scalars, then mapping or broadcasting it over array input is very good for productivity (and is efficient in Julia). On the other hand, designing an inherently array-based algorithm is often a headache that one must contend with for the sake of performance in numpy.
So, if you design somewhat complex or novel algorithms, I don't think object-dot notation, or the lack thereof, has a significant impact on productivity.
Julia is not really a pure functional programming language, though it does support that style if one desires.
It's actually a "multiple dispatch" language... thinking of OOP as single dispatch, Julia is conceptually OOP on steroids -- but to benefit from the full expressiveness, the programming style looks different from the typical OOP syntax/patterns one is used to.
For example: https://diffsharp.github.io/index.html
But for (entry-level) learning and possibly pivoting to application, Julia is delightful to use and can transit into some symbolics and numerical. Besides, it's free and open source.
They do not.
Unless you're working on undergraduate integrals then it's pretty useless for advanced stuff without writing your own library. By that point you may as well write it in a language that's more performant and cheaper.
But mostly for symbolic algebriac manipulation. I used it during my phd to work with groups. Instead of having to calculate stuff by hand, you can just ask Mathematica to do it. Also lots of stuff with tensors in GR is so easy to do in Mathematica.
The people who would get most out of it are students, but for some god forsaken reason universities don't support them.
I was in a pilot class with Mathematica back in 2006 and the review of the class were _all_ 5 stars and students on average got 10% higher marks in all other subjects they took that year.
They didn't run the course again.
Sagemath is now equally good if a teacher defines a DSL for the students to use in a class.
For the mathematical constructs we care about in symbolic programming, I have found Python's syntax and Sage's menagerie of objects awful to use. Initially you feel comfortable, but when you want to do some real work, it gets horribly in the way. The Wolfram language, a LISP variant, is less familiar and harder for a newbie to learn but it is vastly superior for actual work.
The only "problem" with sagemath is that it is based on Python. The rationale is that Python is easy to start using and widely known. This is the usual "make it easy for newcomers" trap.
For the mathematical constructs we care about in symbolic programming, I have found Python's syntax and Sage's menagerie of objects awful to use. Initially you feel comfortable, but when you want to do some real work, it gets horribly in the way. The Wolfram language, not a LISP variant, is less familiar and harder for a newbie to learn but it is vastly superior for actual work.
Hard disagree. Mathematica's symbolic dexterity makes abstract reasoning (with equations/expressions) very easy. Think of it as the companion tool for anyone doing pages of algebra that would go into a paper, or form the backend for some code.
The numerical capabilities of Mathematica are passable but nothing fancy. Once you have the math figured out, you might even want to reimplement "in a language that's more performant and cheaper." But I haven't see anything come close to Mathematica for convenience of symbolic reasoning -- not just as a technology (lisp is pretty good) but as a ready-for-use product.
> There are many examples of integrating a computer algebra system (such as Mathematica, Maple, or Sage) into the calculus conversation. Computer algebra systems can be magical. The popular WolframAlpha website calls the full power of Mathematica while allowing an informal syntax that is flexible enough to be used as a backend for Apple’s Siri feature. (“Siri what is the graph of x squared minus 4?”) For learning purposes, computer algebra systems model very well the algebraic/symbolic treatment of the material while providing means to illustrate the numeric aspects. These notes are a bit different in that Julia is primarily used for the numeric style of computing and the algebraic/symbolic treatment is added on. Doing the symbolic treatment by hand can be very beneficial while learning, and computer algebra systems make those exercises seem kind of redundant, as the finished product can be produced much easier.
TL;DR: they want the student to actually do some of the work that Mathematic magics away.
m = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]The above example in J:
3 3 $ i.9
0 1 23 4 5
6 7 8
3 3 $ >: i.9
1 2 34 5 6
7 8 9
J is 0-indexed. ">:" is the increment operator. APL allows you to set a parameter to do 1-indexed vs. 0-indexed.
APL:
3 3 ρ ι9
1 2 34 5 6
7 8 9
There is a Calculus text for learning it with J:
I honestly thought apl was extinct
Because it is a language specifically targeted for doing numerical analysis.
Python, which is it's main "competitor" has a notoriously poor syntax for mathematical operations with miniscule standard library support for mathematics, a very limited type system and abysmal runtime performance. Julia addresses all of these issues and gives a relatively simple to read language, which often closely resembles mathematical notation and has quite decent performance.
numpy has similar syntax to MATLAB and Julia
Python's type system is pretty rich and allows overloading all operators
Numpy has absolutely awful syntax compared to Julia or MATLAB. It is fundamentally limited by pythons syntax, which was never meant to support the rich operations you can do in Julia.
I have done quite a bit in both languages and it is extremely clear which language was designed for numerical analysis and which wasn't .
>Python's type system is pretty rich and allows overloading all operators
The language barely has support for type annotations. Duck typing is actually a very bad thing for doing numerical analysis, since you actually care a lot about the data types you are operating on.
Pythons type system is so utterly inadequate that you need an external library to have things like proper float types.
Numpy's syntax is the same as MATLAB's.
Both MATLAB and Julia also use dynamic typing, though it is true Julia does have support for ad-hoc static typing through annotations in a way that is stricter than Python's.
Numpy does provide all the traditional floating-point types.
That is just plain false. Can you try reading the numpy documentation? They have an article about exactly that topic and even say that numpys Syntax is more verbose.
If you read that documentation you would also realize that numpy has a different approach to Arrays than both MATLAB and Julia.
Here: https://numpy.org/doc/stable/user/numpy-for-matlab-users.htm...
"MATLAB’s scripting language was created for linear algebra so the syntax for some array manipulations is more compact than NumPy’s."
There are also many differences between Julia and MATALB, although Julia obviously borrowed a lot from MATALB, for the obvious reason that MATLAB had a similar design goal in it's language.
That doesn't change that python inherently won't overcome the fact that it wasn't designed for numerical analysis, while both MATLAB and Julia were (although those also had somewhat different design objectives themselves, especially when it comes to the role of functions).
The matrix type exists because the operators don't exist.
Any good general-purpose programming language can enable any domain-specific language to be embedded within itself through its type system as a library. Numpy embeds array programming in Python, and arguably that approach is much more flexible than building separate domain-specific languages.
At this point you're just grasping at straws and systematically modding down my posts because facts don't agree with your beliefs.
Seriously please read the article and try to actually use these tools. You would very quickly realize just how different numpys approach is to MATLAB. Again, they don't even operate on the same types. MATLAB only knows the n-dimensional array, that data type doesn't exist in numpy where the array has quite a different fundamental structure, which becomes pretty clear if you read the article.
I get that someone with little experience in both languages might be confused, purely looking from the outside they might seem similar, but if you are familiar with both you realize that they are very different and require you to approach implementations from different directions.
Ultimately numpy was designed to fit into python, which will always limit it compared to a DSL.
All 1D/2D arrays in both Matlab and Julia come endowed with linear algebra semantics, so that `A*B` is a matrix product, while in numpy it is not, you have to create an actual `numpy.matrix`, which is a different class. Matlab is not consistent, though, so exp(A) in matlab will work element-wise, as will numpy (both for array and matrix), while julia returns a matrix exponential. The same difference goes for other functions like sqrt, sin, etc.. In Matlab, reduction functions typically work column-wise, so for example sum(A) returns the sum of each column as a 1xN matrix, while in julia and numpy the sum functions will return a sum over all the elements as a scalar. The same goes for max/min, etc.
Both Python and Julia have actual scalars, and with numpy, both have actual vectors, while Matlab has neither. Numpy's matrices, on the other hand are, conceptually, vectors of vectors (even though they are stored as contiguous memory) meaning that for example iteration behaves very differently in numpy than in Julia. Numpy iterates row-by-row, Julia iterates element-by-element. Matlab iterates column-by-column, though I rarely see that used in the wild.
Indexing, too, is different (and I skip the zero-vs-one-based stuff): indexing (with a single index) into a 2d array in numpy produces a row-vector, indexing into a julia or matlab 2d array produces an element (even though iteration in matlab produces column, as mentioned). Another point is that numpy slices return views, while the other two languages return copies (or, actually, matlab returns views that are copied if you try to modify them...)
Numpy arrays have restrictions on the sort of types they will accept. Elements must either be built-in numpy types, or the catch-all `object`, which is basically an untyped container that holds pointers to `anything`. In contrast, everything is a matrix in Matlab, so even user-class objects are held in homogenously typed matrices. Julia arrays will allow anything you like. Built-in types, user-types, homogenously, abstractly or heterogeneously typed (unions). And bitstypes are stored inline, not as pointers.
There are many differences, both semantic and practical, both between matlab and numpy, matlab and julia, and julia and numpy, this is just off the top of my head.
(Actually, I should have gone more into the syntax stuff, constructor syntax is way different in numpy, as is the way you do operations, with numpy using `obj.method()` to a large extent, unlike matlab and julia, which use regular function call syntax for array operations.)
What else? Matlab indexes with end, while numpy just leaves it open (e.g. 3:). Numpy allows negative indices, not Matlab. n:m is both a standalone range and an indexing expression in Matlab, not in numpy. Also numpy uses open ranges, Matlab closed ranges. And A[2:2:10] has dramatically different meaning in Matlab and numpy.
The type system in Julia is perhaps even better than MATLAB for some linear algebra operations (a Vector is always a Vector, a scalar is always a scalar). But the Python ecosystem is often far superior to both, and MATLAB has toolboxes which don't have equivalents in either other language. Julia has some uniquely strong package ecosystems (autodiff to some extent, differential equations, optimization), but far fewer.
I mean, zero based indexing isn't exclusive to computing. Plenty of times in physics or math we do x_0 for the start of a sequence vs x_1.
Although, fair, our textbook had the definition of a sequence being a mapping of elements to z+, which is zero exclusive
But in most of the literature that I've seen, vectors and matrices tend to number elements starting with 1.
What would you say does the Python ecosystem have that the others are missing? The obvious thing is pytorch/tensorflow/.... I can't think of much else though.
Julia has Flux, which is great. To create a neural network with Flux, you write the forward operation however you want and just auto differentiate the whole thing automatically and get a trainable net.
It is extremely flexible and intuitive.
What Julia lacks is everything which isn't numerical analysis though.
I'm still curious what concrete things you mean that Julia is missing. Maybe I'm so stuck doing numerical analysis, can't think of anything else...
Basically everything not related to numerical analysis. The problem isn't that there isn't an option which does work, but that those options aren't fully developed and mature to actually use for a commercial project.
E.g. look at GUI libraries, the native ones are just wrappers around other libraries and poorly documented. There is a single web framework, but is that supported enough that you would bet your entire company on it being continually supported?
If you are doing anything which isn't related to numerical analysis, Julia isn't your first choice, it also isn't your second or third choice. And I think that is fine, clearly Julia wants to be a good at a particular thing and has achieved that.
Not so simple as it sounds. A lot of speed advantages of Julia comes from doing in place ops on arrays and Zygote does not work with in place updates. So you end up copying and then at that point Python + PyTorch becomes a superior choice as Python is the de facto the universal language.
Pytorch and tensorflow are important and a very good reason to use python or C++, but those two being unavailable is more impactful for the industry, of course your research might need them, but it might very well not.
The comment about crashing due to spelling error really should be addressed by some form of static analysis, not by making name lookups more relaxed, in my opinion.
Incidentally, I find it amusing that in Europe, the ground floor is zero, while in the US, it's one. (A friend of mine arrived at college in the US and was told that her room was on the first floor. She asked whether there was a lift as her suitcase was quite heavy...)
As a mathematician, yes, I do. Pretty much everything becomes simpler if you treat zero as the first natural number.
> Incidentally, I find it amusing that in Europe, the ground floor is zero, while in the US, it's one.
I really think it makes no sense to number the ground floor as 1. This means if you want to know the height of the nth floor, you have to multiply the height of a story by (n-1).
There are a ton of other cases where you have to needlessly subtract 1 when people use 1-based indexing. To name a few
- Dates: why did the 21st century start on 1/1/2001? Why are the 1800s the 19th century? It doesn’t make any sense. If we indexed from zero, today would be 5/0/2023 (5 months, 0 days, 2023 years since the common era), in the 20th century. It all becomes so easy and intuitive. - Mathematical foundations: If we are using set theory to encode mathematics, how is the number 1 defined? As a set containing itself? This leads to paradoxes in many cases. As the set containing a different single element? Then we can call its contents 0. - Musical intervals: why do two thirds (ok, major and minor, but I’ll gloss over that) make a fifth? Does 3+3=5? The fact that musical intervals index from 1 significantly increases the cognitive burden for music theory. It becomes much easier when we index from 0. - Birthdays: Age is correctly indexed from zero, but it may seem counterintuitive that your first birthday is the day you are born. So when is your second birthday? The day you turn 1, of course. The word “third” sounds like 3, so it seems reasonable to me to introduce a new ordinal here (I like “toward”). - Computing: languages that use 1-based indexing are obscuring what is actually going on; they generally just subtract 1 internally from the user’s input. They have to, since indexing from 0 is fundamentally more efficient at the hardware level. 4 bits can only store 15 possible addresses if you throw away 0.
These are just a few examples and by no means an exhaustive list. Conversely, I have yet to know of a single instance where 1-based indexing makes more sense or simplifies things (aside from being more compatible with legacy features of our society).
After a while, when you think deeply about it, you start to feel that 0-based indexing is something closer to a fundamental truth, rather than simply a convention. Indeed, I propose that the only reason people find 0-based indexing counterintuitive is due to social conditioning.
If you look at a textbook for numerical analysis likely the algorithms will be 1-indexed. Julia is a language primarily for writing down mathematics, it would be quite silly not to use mathematical conventions.
Julia being a mostly functional non-systems-programming language, where memory addressing is usually in the background, I think you'd find you rarely use numeric-literal indexing and you were getting upset over nothing.
The typical looping over i from 1 to length(a) is not idiomatic in Julia, where looping over eachindex() or pairs() abstracts away any concern over index type (OffsetArray can have an arbitrary first index). There's firstindex() and lastindex(); bracket indexing syntax has begin and end special keywords. Multidimensional arrays have axes().
"But what about modular arithmetic to calculate 1-based indexes?"
Julia has mod1(), fld1(), etc., which also provide a hint to anyone reading the code that it might be computing things to be used as index-like objects (rather than pure arithmetic or offset computation).
The strict way to handle indexing, I suppose, would be to have distinct 1-indexed (e.g. Ind1) and 0-indexed (e.g. Ind0) Int-based types, and refuse to accept regular Ints as indexes. That would eliminate ambiguity, at the cost of Int-to-Ind[01] conversions all over the place (if one insists on using lots of numeric literals as indexes). And how would one abstract away modular arithmetic differences between the Ind0 and Ind1 types? By redefining regular mod and div for Ind1? That would be hella confusing, so that abstraction probably isn't viable.
I would be happy if unsigned integer UInt would start indexing from 0, whereas for signed integer it would start from 1. Also a module level parameter where preference on whether a literal integer shall be interpreted as Int or UInt would alleviate many usability issues there.
It is trivial to switch between these two conventions, so i dont see why people have such militant positions.
← → ↔ ↚ ↛ ↞ ↠ ↢ ↣ ↦ ↤ ↮ ⇎ ⇍ ⇏ ⇐ ⇒ ⇔ ⇴ ⇶ ⇷ ⇸ ⇹ ⇺ ⇻ ⇼ ⇽ ⇾ ⇿ ⟵ ⟶ ⟷ ⟹ ⟺ ⟻ ⟼ ⟽ ⟾ ⟿ ⤀ ⤁ ⤂ ⤃ ⤄ ⤅ ⤆ ⤇ ⤌ ⤍ ⤎ ⤏ ⤐ ⤑ ⤔ ⤕ ⤖ ⤗ ⤘ ⤝ ⤞ ⤟ ⤠ ⥄ ⥅ ⥆ ⥇ ⥈ ⥊ ⥋ ⥎ ⥐ ⥒ ⥓ ⥖ ⥗ ⥚ ⥛ ⥞ ⥟ ⥢ ⥤ ⥦ ⥧ ⥨ ⥩ ⥪ ⥫ ⥬ ⥭ ⥰ ⧴ ⬱ ⬰ ⬲ ⬳ ⬴ ⬵ ⬶ ⬷ ⬸ ⬹ ⬺ ⬻ ⬼ ⬽ ⬾ ⬿ ⭀ ⭁ ⭂ ⭃ ⥷ ⭄ ⥺ ⭇ ⭈ ⭉ ⭊ ⭋ ⭌ ← → ⇜ ⇝ ↜ ↝ ↩ ↪ ↫ ↬ ↼ ↽ ⇀ ⇁ ⇄ ⇆ ⇇ ⇉ ⇋ ⇌ ⇚ ⇛ ⇠ ⇢ ↷ ↶ ↺ ↻ --> <-- <-->
How about these ones: > < >= ≥ <= ≤ == === ≡ != ≠ !== ≢ ∈ ∉ ∋ ∌ ⊆ ⊈ ⊂ ⊄ ⊊ ∝ ∊ ∍ ∥ ∦ ∷ ∺ ∻ ∽ ∾ ≁ ≃ ≂ ≄ ≅ ≆ ≇ ≈ ≉ ≊ ≋ ≌ ≍ ≎ ≐ ≑ ≒ ≓ ≖ ≗ ≘ ≙ ≚ ≛ ≜ ≝ ≞ ≟ ≣ ≦ ≧ ≨ ≩ ≪ ≫ ≬ ≭ ≮ ≯ ≰ ≱ ≲ ≳ ≴ ≵ ≶ ≷ ≸ ≹ ≺ ≻ ≼ ≽ ≾ ≿ ⊀ ⊁ ⊃ ⊅ ⊇ ⊉ ⊋ ⊏ ⊐ ⊑ ⊒ ⊜ ⊩ ⊬ ⊮ ⊰ ⊱ ⊲ ⊳ ⊴ ⊵ ⊶ ⊷ ⋍ ⋐ ⋑ ⋕ ⋖ ⋗ ⋘ ⋙ ⋚ ⋛ ⋜ ⋝ ⋞ ⋟ ⋠ ⋡ ⋢ ⋣ ⋤ ⋥ ⋦ ⋧ ⋨ ⋩ ⋪ ⋫ ⋬ ⋭ ⋲ ⋳ ⋴ ⋵ ⋶ ⋷ ⋸ ⋹ ⋺ ⋻ ⋼ ⋽ ⋾ ⋿ ⟈ ⟉ ⟒ ⦷ ⧀ ⧁ ⧡ ⧣ ⧤ ⧥ ⩦ ⩧ ⩪ ⩫ ⩬ ⩭ ⩮ ⩯ ⩰ ⩱ ⩲ ⩳ ⩵ ⩶ ⩷ ⩸ ⩹ ⩺ ⩻ ⩼ ⩽ ⩾ ⩿ ⪀ ⪁ ⪂ ⪃ ⪄ ⪅ ⪆ ⪇ ⪈ ⪉ ⪊ ⪋ ⪌ ⪍ ⪎ ⪏ ⪐ ⪑ ⪒ ⪓ ⪔ ⪕ ⪖ ⪗ ⪘ ⪙ ⪚ ⪛ ⪜ ⪝ ⪞ ⪟ ⪠ ⪡ ⪢ ⪣ ⪤ ⪥ ⪦ ⪧ ⪨ ⪩ ⪪ ⪫ ⪬ ⪭ ⪮ ⪯ ⪰ ⪱ ⪲ ⪳ ⪴ ⪵ ⪶ ⪷ ⪸ ⪹ ⪺ ⪻ ⪼ ⪽ ⪾ ⪿ ⫀ ⫁ ⫂ ⫃ ⫄ ⫅ ⫆ ⫇ ⫈ ⫉ ⫊ ⫋ ⫌ ⫍ ⫎ ⫏ ⫐ ⫑ ⫒ ⫓ ⫔ ⫕ ⫖ ⫗ ⫘ ⫙ ⫷ ⫸ ⫹ ⫺ ⊢ ⊣ ⟂ ⫪ ⫫ <: >:
Or these? + - − ¦ |\|| ⊕ ⊖ ⊞ ⊟ |++| ∪ ∨ ⊔ ± ∓ ∔ ∸ ≏ ⊎ ⊻ ⊽ ⋎ ⋓ ⟇ ⧺ ⧻ ⨈ ⨢ ⨣ ⨤ ⨥ ⨦ ⨧ ⨨ ⨩ ⨪ ⨫ ⨬ ⨭ ⨮ ⨹ ⨺ ⩁ ⩂ ⩅ ⩊ ⩌ ⩏ ⩐ ⩒ ⩔ ⩖ ⩗ ⩛ ⩝ ⩡ ⩢ ⩣
These? * / ⌿ ÷ % & · · ⋅ ∘ × |\\| ∩ ∧ ⊗ ⊘ ⊙ ⊚ ⊛ ⊠ ⊡ ⊓ ∗ ∙ ∤ ⅋ ≀ ⊼ ⋄ ⋆ ⋇ ⋉ ⋊ ⋋ ⋌ ⋏ ⋒ ⟑ ⦸ ⦼ ⦾ ⦿ ⧶ ⧷ ⨇ ⨰ ⨱ ⨲ ⨳ ⨴ ⨵ ⨶ ⨷ ⨸ ⨻ ⨼ ⨽ ⩀ ⩃ ⩄ ⩋ ⩍ ⩎ ⩑ ⩓ ⩕ ⩘ ⩚ ⩜ ⩞ ⩟ ⩠ ⫛ ⊍ ▷ ⨝ ⟕ ⟖ ⟗ ⨟
There's a few more, don't worry << >> >>> // ^ ↑ ↓ ⇵ ⟰ ⟱ ⤈ ⤉ ⤊ ⤋ ⤒ ⤓ ⥉ ⥌ ⥍ ⥏ ⥑ ⥔ ⥕ ⥘ ⥙ ⥜ ⥝ ⥠ ⥡ ⥣ ⥥ ⥮ ⥯ ↑ ↓"Python's type system allows a type to overload all operators" means that those must be operators in the Python syntax to begin with.
Those various glyphs are not, while I understand the might have the role of "operators" in some unspecified mathematical syntax.
In contrast, julia provides a nearly endless list of operators to use for whatever you like, allowing you to adopt mathematical operators from your field of study, for example.
Also, I am not aware of any type promotion mechanism in python, which, in Julia, makes e.g. binary operators on different types convenient to implement. The inherent multiple dispatch also seems more natural than the __roperator__ stuff you need to do in python.
You sure about that?
https://github.com/JuliaLang/julia/blob/af545b90c5657e0e210a...
In my opinion, and experience, the best “calculus book” is Learn Physics with Functional Programming which only relies on libraries for plotting, and uses Haskell rather than Julia.
> Why is Julia better suited than any other language?
Julia is known as a “programming language for math” and was designed with that conceit steering a lot of its development.
Explicitly it supports a lot of mathematical notation that matches handwritten or latex symbols.
Implicitly they may be referencing the simplified (see Pythtonic) syntax, combined with broad interoperability (this tutorial uses SymPy for a lot of the heavy lifting), lots of built in parallel computing primitives, and its use of JIT compilation allowing for fast iteration/exploration.
https://computationalthinking.mit.edu/Spring21/
The very short story is that it's a language somewhat similar to Python (and, likewise, easy-to-use), but with much richer syntax for expressing mathematics directly.
It also has richer notebooks. The key property is that in python notebooks, you run cells. In julia notebooks, it handles things like dependencies. If I change x, either as a number or a slider, all the dependencies things update. You can define a plot, add sliders, and it just works.
(Also: I'm not an expert in Julia; most of my work is in Python and JavaScript. I'm sure there are other reasons as well, but the two above come out very clearly in similar courses)
1. Open Source.
2. Easy to learn. (kind of)
3. Robust plotting and visualization capabilities, which are integral (I f*cking swear no pun intended) to understanding calculus, the foundational purpose of calculus being to find the area under the curve. (something I really wish they told me day one of Pre-Calc)
4. This one is just a vague feeling, but the fact that Python's most robust Symbolic Regression package, SymPy, relies on running Julia in the background to do all the real work suggests to me that Julia is somehow just superior when it comes to formulas as opposed to just calculations. IDK how, though.
> Why is Julia better suited than any other language?
Why must it be better suited than ANY other language, for the bit you quoted to be true?