Possible up-comming Physics library

I’ve recently finished Rob Conery’s Take Off With Elixir book (buy that book, it’s awesome!) and I’ve realized that working with Physics in Elixir is really awesome and fun.

With the knowledge gained from Rob’s book I started playing around with multiple Physics formulas and I’ve came to the conclusion that a Physics library might be useful for other people as well.

Would you want to see such a library? If so, what formulas do you want to see first and what would you use it for?
I am currently adding some basic common mechanics formulas (such as average speed, average velocity, etc).

I would love to hear your feedback on this idea!

4 Likes

I don’t think someone would use a physics library on Elixir, if you have to do some calculations you would probably end up implementing the formulas yourself.

1 Like

I would love to see some physics implementation in Elixir.
Its nice that more people have a interest in physics calculations.
I might have a few use cases for as well.
Make it and put it up on the wild wild web and I`ll have a go at playing with it.

1 Like

The problem with this idea (which is fine, go ahead do it!) is that any nontrivial project will require a language that is good at number crunching—not Elixir. In general, you don’t want to do a lot of hard number/math with Elixir/Erlang. That said, I’m sure someone will find it useful and you’ll learn a lot from it.

2 Likes

There will exist open source libs in f.e. C++, getting them to work with calls from elixir could be a nice exercise also.

1 Like

@sotojuan I agree, and in the end I am just looking to learn more myself!
@StefanHoutzager the only problem with that is that I am not very good with C++. Do you think Python would be just as good?

I suspect not. Why would you have to be good at C++? You’re a consumer.

Because, most of the time, I like to dive into the source code and get a better understanding of what goes on.
But I guess you’re right.

Still not bad to have a library like this in Elixir, if you need to do few calculations per, say, a phoenix request, then even calling a NIF would be slower than just doing it in-line if simple enough.

c++ is not that bad nowadays. after c++11 and 14 you now have a more modern language. which is no more hard than c# to learn. that said there is a lot of things going on in the language and you do not need to use it all.

TL;DR , c++ isn`t much harder than any other language nowadays.
in fact I find javascript harder to learn due to all the oddities in it.

1 Like

Fifty years of programming language research, and we end up with C++ ???
(Richard O’Keefe)

But in all seriousness I might study c++, although I doubt.
And I agree, JavaScript is very… very odd.

1 Like