Hacker News new | past | comments | ask | show | jobs | submit login
Clojure Linear Algebra Refresher: 1 – Vector Spaces (dragan.rocks)
142 points by tosh on June 4, 2017 | hide | past | favorite | 29 comments



The author states the problem clearly: programmer rusty at linear algebra, needs some background.

But at some point, the disdain for pure math / theory becomes a hindrance IMHO. If being human calculator on paper back in college left you unprepared now, won't getting proficient with a linear algebra library, ignoring theory whenever possible do the same?

I recommend at least pairing use case focused tutorials like this with

Essence of linear algebra: http://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xV...


The author (me) also states that the tutorial should be used with a linear algebra textbook and not on its own, and even recommends the specific (math) textbook.

I do not get how you see disdain for math there?


Maybe this line

>It is application oriented; it has more theorem proofs than I need, but it at least does not skip application examples

And that it focuses entirely on library use cases. But I see now that's the explicit goal, and I'm projecting my needs for more articles providing clarity on the theory onto your article :)


In my opinion, there is no shortage of good math textbooks of all levels providing clarity on theory. There is also no (or not too much) shortage of good numerical software for LA. What's missing is the time to be both good at theory, and have mastery of numerical software, and general software engineering.

As I am not a mathematician, I can not write even a passably good theoretical LA tutorial, yet alone one that is better what is currently available. The goal of these articles is: You've read the math text -> here's how you can try this in Clojure. Nothing more than that.


Yeah that's totally fair


Completely off topic, but Belgrade looks beautiful. Can you recommend any non touristy places to see while visiting?


Most places are still non-touristy compared to more well-known European capitals, so that won't be a problem.


Just be prepared that it may be really hard to find a resturant with a (real) non-smoking section.


Cool, thanks. Any good night spots and places to eat?


Most visitors would like to try nightclubs on the river bank, and try local restaurants at Skadarlija, but that is really a matter of taste. Belgrade has a population of 1.5 million, and it lives 24/7/365 so you won't be bored whatever you like. Cafes are full during the day, and nightclubs during the night practically every day of the week.


Incredible. With a city life like that you should be commended for taking the time out to extend clojure. Salute.


I was there doing that around two years ago.

Very nice experience.


Wow thank you for sharing that youtube link. I did take Calc 3 in school. Or is Eigenvalues and stuff... calc 3.5? I don't know, but thanks a lot, I did not really know that there were geometric insights involved! My teacher was amazing and distilled the equations in a way that let me know there were connective tissues, but I did not know that one can visually understand linear algebra. That makes me very happy, as I am always looking for ways to more intuitively and visually understand the universe. Thanks again sir.


I am glad to hear Clojure is slowly getting its act together WRT numerics. I reluctantly dropped the language several years ago because the ecosystem for any kind of math/ML was just nonexistent, unless you consider a "call the terribly verbose Java libraries for everything" approach viable.

Especially nice in this Neanderthal lib is the GPU stuff.


Yeah, the foundation is there (hold arbitrary fractions, 64-bit decimals... other good things). What's the go-to tool for Mathematics? MatLab?


Eh, the simplified version is:

- Engineers (like electrical etc) use Matlab

- Statisticians use R

- Rich people sometimes use Mathematica

- People with some CS background use Python/numpy/sklearn

For "purer" math, like symbolic differentiation and such, I don't really know any of those people, but I think Mathematica has a lot in that area. The others have stuff, but less developed. But pretty much every major language has linear algebra at this point.


I would sort of expect Julia to be on the list for "good math language for people not quite happy with clojure". But it's much younger than the others listed, obviously.


Sadists use sas


Who, other than students forced to do so, uses Minitab?


You can run Mathematica functions within Clojure. https://github.com/gasc/Clojuratica


Does that still work?


Talking about HN effect, the price of a second-hand copy of the linear algebra textbook that I recommended doubled on Amazon as the number of available copies dwindles...


> The following two sections, Subspaces and Linear Combinations are theoretical.

My personal take: learning and making proofs is important because you get to understand the point of the more abstract topics (such as vector subspaces, orthogonal complements, direct sums, etc.)

And then you have new tools for thinking.


Yes, and the reader should do that following the textbook. There was nothing special that I could add to that.


Yes, but the tutorial isn't suggesting the reader go do proofs. Instead he says these more advanced topics are unnecessary. I said: their necessity is not apparent until you try doing proofs; but then you see them everywhere like a man with a hammer sees nails.

Mind, his approach may well be the correct one for the context, but you're saying he's doing things my way, which he's not.


The mistake is in the almost first sentence:

Eigenvalues aren't defined for rectangular matrices!


SVD seems like a tough way to get rank; can't you just reduce and count pivots?


SVD seems to be most safe and stable, and it is available. I see that people suggest some forms of rank-revealing QR factorization, but they are less stable, and I am not sure how to access that from LAPACK. Any practical suggestions are appreciated in that regard.


Yep, apparently this is what MATLAB does too. Learn something new every day I guess.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: