Hacker Newsnew | past | comments | ask | show | jobs | submit | phrmoy's commentslogin

Consider: https://flet.dev/ + https://coconut-lang.org/

TL;RD; Functional Python on top of Flutter

From https://github.com/flet-dev/flet:

" Deliver to any device Deploy Flet app as a web app and view it in a browser. Package it as a standalone desktop app for Windows, macOS and Linux. Install it on mobile as PWA or view via Flet app for iOS and Android."

From https://coconut.readthedocs.io/en/latest/HELP.html:

"Specifically, Coconut adds to Python built-in, syntactical support for:

pattern-matching

algebraic data types

destructuring assignment

partial application

lazy lists

function composition

prettier lambdas

infix notation

pipeline-style programming

operator functions

tail call optimization

where statements"


Wow! Coconut alone looks impressive.

Is there a state management solution in there? I looked at the Todo app and it looked like manual change propagation.


Would also be curious to understand how this compares. They seem to account for recursion and if-branches as well.


They're not really all that close. For instance that Autograd library requires that you use its own version of numpy instead of the regular version because it can't differentiate C. Because most non-trivial python code is actually written in C, there's almost no performant programs you can just differentiate out of the box unless autograd itself has a fork of that package.

My understanding is that the python Autograd library is also quite slow (though it's been a while since I looked at it).

Zygote will give the same runtime performance as handwritten derivatives in many cases and works across almost the entire julia ecosystem since nearly all julia packages are truly written in julia.


JAX (github.com/google/jax), which is being developed by many of the authors of Autograd, is a probably a better comparison. At the cost of requiring you to rewrite control flow in a functional way, it eliminates Python's overhead by compiling NumPy code into XLA.


thank you.


A great choice of companion language to your Python stack would be Nim: https://nim-lang.org/ (not necessarily ML-inspired) but extremely productive and extremely fast. Bonus, v1.0 is right around the corner for Nim. If you're willing to venture out to a place with an evolving scientific ecosystem, Nim is a great choice to do scientific computing as part of a CPython stack (easy integration both ways since Nim compiles to both C/C++).


Go V! (no pun intended).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: