Re:Coconut: Pythonic functional programming
by weberc2 on Thursday January 03, 2019 @10:25AM
(#18815737)
I'm aware of Cython and RPython. RPython is super cool but it isn't really a general purpose programming language. Cython is superficially similar to what I want, but it's always put me off; not sure why off the top of my head. I do love Go, however. :)
Re:Coconut: Pythonic functional programming
by nerdponx on Thursday January 03, 2019 @12:49PM
(#18817180)
Cython is basically C in Python syntax with some convenience features.
Unless you know C it's not always worth using. Without doing any "C stuff" (i.e. just writing Python and compiling with Cython) you get about a 50% speedup in tight loops; sometimes that's good enough, other times it's not.
To go any faster than that, you basically need to start writing C code, using the CPython API, using Cython's badly under-documented features for doing so.
Re:Coconut: Pythonic functional programming
by baldfat on Tuesday January 08, 2019 @08:20AM
(#18855310)
Learning C to the point where you get Cython is pretty easy. C is much easier to pick up rather than the HUGE C++. Here is a video you can watch in an afternoon that would give you the general gist and covers the basics quickly. https://www.youtube.com/watch?v=KJgsSFOSQv0
Re:Coconut: Pythonic functional programming
by fspeech on Thursday January 03, 2019 @03:43PM
(#18819098)
For me Cython truly shines when interfacing to C++.
Re:Coconut: Pythonic functional programming
by giancarlostoro on Thursday January 03, 2019 @07:39PM
(#18820908)
I hear you on Go. I am a Python dev at work and love Python, have dug into PEP8 and understood the tradeoffs for the sake of simplicity. Now after years of not touching Go I go back to it and it feels soooo familiar. It truly feels like a compliment to any serious Python developer to find Go. Now I got two goto languages for prototyping.
https://en.wikipedia.org/wiki/Cython
There's also RPython which is restrictive and what PyPy is done in.
https://en.wikipedia.org/wiki/PyPy#RPython
Edit: on an unrelated note, sounds like you'd love Go.