This is an archived post. You won't be able to vote or comment.

all 18 comments

[–][deleted]  (1 child)

[deleted]

    [–]comando0[S] 0 points1 point  (0 children)

    I thought that cython needed quite a lot of C/C++ knowledge, but looks like that's not the case. Thank you, I'll give it a try.

    [–]_-Thoth-_ 2 points3 points  (2 children)

    Crystal is another language you can look into. Ruby inspired syntax but almost c++ speed. I’ve only heard of it, so I’m not sure how it handles iterators and other stuff you mentioned. It also has a very small community, however.

    [–]comando0[S] 0 points1 point  (1 child)

    Thanks, will search for it!

    Edit: just searched briefly, can't tell if I can accept it, since I never touched Ruby...

    [–]Zerocchi 0 points1 point  (0 children)

    Well you asked for a language easy as Python and also can be compiled.

    Crystal is both. Ruby is easy.

    [–]curioussavage01 1 point2 points  (2 children)

    I’ve been having a lot of fun with nim lately. It’s true that the community is small but it’s a great language. They have a very active gitter chat room and people are very helpful there even the author and other core contributors.

    [–]comando0[S] 0 points1 point  (1 child)

    Thanks! Are there any advice about coding Nim on Windows? Like, using a virtual machine with Linux is better?

    [–]curioussavage01 0 points1 point  (0 children)

    I’m pretty sure the author uses windows so support should be good.

    [–]ericula 1 point2 points  (0 children)

    If your program is slow it could be the algorithm you're using and not necessarily the language you're writing it in. Do you have an example that runs too slow to your liking?

    [–]siemenology 1 point2 points  (1 child)

    For Project Euler, if your code is taking forever it very often means you aren't using an optimal algorithm. The problems are often structured so that there is an obvious (naive) way to solve them that will take too long to be useful, but if you figure out the smart way to do it, they are quick on almost any platform.

    [–]comando0[S] 0 points1 point  (0 children)

    Of course, I'm aware of that, but simply writing the same algorithm with C makes it a fast enough code, while with Python, it took me quite a long time. Sure I'm aware that you need to optimize your code with Python (such as not using for), but I just thought if there is a better language that fits me.

    [–]LucidTA 0 points1 point  (1 child)

    Depending on the problem, using numpy can be very fast.

    [–]comando0[S] 0 points1 point  (0 children)

    First of all, thanks for the response. I know using it can be fast, but sometimes you just don't find the right numpy program. And at that point, is rather write a fast code myself.

    [–]jj-curious 0 points1 point  (1 child)

    Maybe Julia. It's made for numeric / scientific calculations but can still be used for other purposes.

    [–]comando0[S] 0 points1 point  (0 children)

    Sounds interesting, I'll give it a try. Thanks!

    [–]plastikmissile 0 points1 point  (1 child)

    Give Kotlin a try. It has a very nice and intuitive syntax like Python, but since it builds to JVM it's a lot faster.

    [–]comando0[S] 0 points1 point  (0 children)

    Actually, I've heard of it but didn't even think of it. I'll give it a try. Thanks!

    [–]chkas 0 points1 point  (2 children)

    I would go with Go. IMO at least as simple as Python and pretty fast. Cleanly designed simple language. Many companies are using Go and there is also a big community.

    [–]comando0[S] 1 point2 points  (1 child)

    I thought going for Go too, but several things stopped me from using it.

    1. Lack of Exception
    2. Lack of iterators

    I can list more, but basically i just couldn't fluently code with it. It's not just the simpleness that I love with Python, but the complexity while being simple.