Live data from Hacker News

Why Julia

ucidatascienceinitiative.github.io

191–200 of 257 posts

Re: Why Julia

#191
post #106

Earlier quoted context omitted.

I might be wrong, but my understanding is things happened backwards from that. OOP tried to solve the problem of how to get tons of devs working on huge projects at the same time; java came along to try to be an awesome OOP environment, so Java became the standard.

What is or is not OOP is actually fuzzy. When it boils down to it erlang's actor model is basically an implementation of smalltalk objects (but don't tell joe Armstrong that). Elixir's module/struct/protocol looks awfully like OO in the post bjarne soustrop era. Conversely, python's objects feel anti-object since you're passing self all the time (aka dot notation is a weaksauce syntactic sugar)... You could easily mo…

Joe already knows. He and Alan Kay had a talk about it. It was great.

Re: Why Julia

#192
post #68

Earlier quoted context omitted.

> I do not have this mindset then. I prefer tools who are mindset oblivious. They are really useful! Yet you picked a specialized tool "imagemagick" (made for working with images), and want to drive it by another specialized tool (the shell, made for file and process management). Since you want "mindset oblivious" tools why not write everything from scratch, in C?

> Since you want "mindset oblivious" tools why not write everything from scratch, in C? Because imagemagick, julia and other specialized programs already provide the advanced algorithms that I need. Unfortunately, julia is not a good team player.

>Unfortunately, julia is not a good team player.

Or, you know, Julia is not specialized for your use case.

Re: Why Julia

#193

Earlier quoted context omitted.

If you're going to give a counterexample, please give it. I thought about my post after I read it and came to this- given Djikstra's (only system which can describe an empty interval and interval with first element without "unnaturals" ) and (?)'s argument that it creates a nice homomorphism between real-number intervals and integer slices then it's inarguable to me that 0-based is more mathematically elegant. Where…

Since @zimablue seems serious about this, and for those who care as much about the array indexing question and why Julia's "arbitrary" indexing might be useful, here are links to a couple of my previous comments [1,2] on HN: [1]: https://news.ycombinator.com/item?id=15473169 [2]: https://news.ycombinator.com/item?id=15472933 -- The idea is that the interface to the data structure should ideally closely match the sema…

THanks for a serious reply. The cached function computation argument is an interesting one, which resembles the answer by evanb here https://mathematica.stackexchange.com/questions/86189/why-do...

I hadn't seen it before, basically if I understand it right treating all vectors as lisp s-exps which are themselves 0-indexed (0th element is 'list' , because you're doing a lot of symbolic manipulation. It's the best argument I've seen for 1-indexing, I'd say two criticisms - 1: I don't know how homoiconic Julia is, if it's not very then the actual use of this seems very low relative to slicing. 2: It seems to be mixing up indexing a vector itself, and indexing the expression that the vector is (like macro-quoted vs unquoted). I can see how it would smooth things in some way but it feels like a fudge that might cause more pain somehow later.

Re: Why Julia

#194
post #97

Earlier quoted context omitted.

I even had to write python once, so I built a class where none of the functions were passed self (so it was basically a functional module)

In python you’d normally just use module level functions for that. Using a class without having instances and all static functions doesn’t really buy you anything.

The only problem I found with this approach is to manage state and dependencies: say, if the functions need to work with database, it is not convinient to send it as a parameter. A class instance initialised with a database looks more feasible in my opinion.

Re: Why Julia

#195

Earlier quoted context omitted.

honest question, not a serious SDE here. In what ways is julia not supportive of OOP?

It doesn't have interfaces for example. It doesn't have access modifiers. Also, not sure if this belongs to OOP but working with optionals is cumbersome.

[deleted]

Re: Why Julia

#196

I didn't know about the Unicode tab completion. I gave it a whirl on the cli and loved it. Then I tried it out in julia-mode in Emacs, and it works there too! What other editors support this?

Works in VSCode with the Julia extension too.

Re: Why Julia

#197

Earlier quoted context omitted.

I'm pretty sure that they just copied Fortan, which was written most of a century ago. That's the second time you've ridiculously misrepresented my statements: "anyone disagreeing with you is an idiot" "deep faith will lead you to the conclusion" (and not deep faith + thinking about the actual problem, several convincing arguments and some ability)

One based indexing is used in tons of domains within mathematics. Fortran chose 1-based indexing for a very obvious reason...it was the best translation from the mathematics literature that they were trying to implement. Because matrix notation uses 1-based indexing ! MatLab, a language designed specifically as a high level language for matrix mathematics, chose it for the same reason. R, a language for statistics, c…

Maths on your side != mathematical convention on your side.

Re: Why Julia

#198
post #97

Earlier quoted context omitted.

In python you’d normally just use module level functions for that. Using a class without having instances and all static functions doesn’t really buy you anything.

The only problem I found with this approach is to manage state and dependencies: say, if the functions need to work with database, it is not convinient to send it as a parameter. A class instance initialised with a database looks more feasible in my opinion.

Your alternative is dependency injection. What you seem to be describing is class factories (I.e. the use of meta classes) which /is/ OOP.

That said, I think OOP is fine. And so is FP. They’re just tools, and I would prefer to model nouns in the former, and model verbs with the latter.

Re: Why Julia

#199
post #159
post #138

Earlier quoted context omitted.

Julia n-D arrays are stored contiguously in memory. So, you can access the memory by reshaping the array into whatever dimension you want and then access it using the A[i,j,k] syntax.

What does reshape actually do? Create a 1-D array from a 2-D one or vice versa, or just make appear to be so?

It alters the descriptor of the data layout, not how the data is actually stored.

Re: Why Julia

#200

I recently began learning Julia and initially everything was amazing, except for 1 based indexing but with everything else I could overlook that. Then I attempted building something medium sized and it all fell apart. I feel like it needs some serious work on tooling, the module system, packages, etc. Has anyone built something medium-large sized in Julia? Maybe I'm missing something. When I was trying to use modules…

Yeah, I built several libraries that replace IEEE floating points with alternatives. You should really be using modules to organize your code. I don't know who told you that they are more trouble than they are worth. I would also suggest aggressively unit testing all the parts. Numerical developers are not often in that habit, which is a shame. https://github.com/REX-Computing/unumjl https://github.com/interplanetary…

> Numerical developers are not often in that habit, which is a shame.

For certain! I don't know how anyone can do any serious numerical development without a whole lot of test cases, including esoteric PhD-level numerical analysis stuff.

I remember working with the IMSL libraries back in the 1970's and being in awe of the huge set of numerical tests they had in the test suite which gave them, from my point of view, an unbeatable lead in development. These were tests that were often about highly esoteric aspects of numerical stability in floating-point algorithms and were written by extremely well educated mathematicians with tons of numerical experience.

For those who aren't greybeards IMSL (the International Mathematical Subroutine [now Statistical] Library) was one of the first uses of re-usable software in application programming. It started as decks of punch cards that you would put in a request for and the computing facility would punch a copy of the appropriate routines for you to include in your program deck.

Post reply on HN