| ▲ | stathibus 12 hours ago |
| If you are unwilling to teach through python's warts you should use Matlab, not fortran. |
|
| ▲ | dubya 12 hours ago | parent | next [-] |
| I’d suggest Octave over Matlab, because current Matlab has tons of distracting AI and autocomplete front and center. Probably really helpful for getting a plot just right or implementing an algorithm from a paper, but not so good for learning the basics. |
|
| ▲ | goerz 11 hours ago | parent | prev | next [-] |
| Even better: Julia (although Fortran is pretty good!) |
| |
| ▲ | adgjlsfhk1 11 hours ago | parent | next [-] | | I translated the jacobi example to julia, and it does seem to address every one of his gripes with Python. | | |
| ▲ | cbolton an hour ago | parent [-] | | I think his main point is about strict typing in Fortran. You can add type annotations in Julia but it's almost an anti-pattern if you don't need them e.g. for dispatch. In any case the type annotations in these examples would be quite unnecessary, unlike in Fortran (where as I understand you can at best enable implicit typing but then must use variable names with specific patterns). |
| |
| ▲ | QuadmasterXLII 11 hours ago | parent | prev [-] | | I love julia, but the default workflow is Step 1) Write the function using high level abstractions
Step 2) Glance over the generated assembly and make sure that it vectorized the way you wanted. | | |
| ▲ | mofeing 11 hours ago | parent [-] | | > Glance over the generated assembly and make sure that it vectorized the way you wanted. Isn't that sth you would also need to do in Fortran? IMO Julia makes this so easy with its `@code_*` macros and is one of the main reasons why I use it. | | |
| ▲ | wtcactus 11 hours ago | parent [-] | | In my experience, Fortran compiler is heavily optimized. It competes head to head with C. Julia’s on the other hand, many times puts out very unoptimized code. Mind you, last time I looked at Julia was 2-3 years ago, maybe things have changed. | | |
| ▲ | patagurbon 9 hours ago | parent [-] | | If you write Julia similar to Fortran, with explicit argument types and for loops and avoiding allocations it shouldn’t be too far off. Fortran IIRC has a few semantics which might make it more optimal in a few cases like aliasing But indeed there are almost certainly less performance surprises in Fortran |
|
|
|
|
|
| ▲ | a-dub 11 hours ago | parent | prev | next [-] |
| this is the way. octave or matlab. people like to complain about matlab as a programming language but if you're using it that way you're doing it wrong. matlab (the core language) is awesome for expressing matrices and vectors and their operations as well as visualizing the results. matrix expressions in matlab look almost identical to how they look in mathematical notation (or how one might write them in an email). you shouldn't be using programming language flow control (or any of the other programming language features), you should be learning how to write for loops as vector and matrix operations and learning from the excellent toolboxes. |
| |
| ▲ | OkayPhysicist 8 hours ago | parent [-] | | IMO, the issue is that "Scientific computing" covers several disparate use cases. When you care about the math, Mathematica. It's a replacement for several pages of hand-written math, or a chalkboard. When you care about the result, MatLab. It's a replacement for your calculator, and maybe Excel. When you care about the resulting software? Python/Julia/Fortran. |
|
|
| ▲ | kergonath 11 hours ago | parent | prev [-] |
| Fortran is much more approachable and more regular than Matlab. Really, there’s no contest. |