[HN Gopher] Achieving High-Performance the Functional Way (2020)
___________________________________________________________________
Achieving High-Performance the Functional Way (2020)
Author : andsoitis
Score : 63 points
Date : 2023-03-05 16:05 UTC (6 hours ago)
(HTM) web link (dl.acm.org)
(TXT) w3m dump (dl.acm.org)
| FrustratedMonky wrote:
| Shout out to F#
| jjtheblunt wrote:
| i do wonder what fraction of the audience in HN also thinks of
| F# as a secret weapon
| karmakaze wrote:
| Much smaller than you'd hope. HN is very much mainstream
| these days. I asked how one would represent a pure function
| in a language that didn't support pureness/immutability and
| got `fn f(a, b) { return a + b; }` entirely missing the
| point.
| fvdessen wrote:
| what was the point ?
| andsoitis wrote:
| Abstract: https://dl.acm.org/doi/10.1145/3408974
| agumonkey wrote:
| And a video even
| https://dl.acm.org/action/downloadSupplement?doi=10.1145%2F3...
| Rzor wrote:
| I couldn't open this video on Firefox at first, but when I
| downloaded it and tried to play it on VLC, my open-source AMD
| driver crashed. I'm running Mint kernel 5.15.0-56-generic. Be
| careful.
|
| Got this: [drm:amdgpu_cs_ioctl [amdgpu]] _ERROR_ Failed to
| initialize parser -125!
|
| Had to kill the XServer with CTRL+Alt+Backspace to get it
| back.
| 6451937099 wrote:
| [dead]
| 6451937099 wrote:
| [dead]
| synergy20 wrote:
| They presented two new languages for functional programming, can
| we leverage existing popular languages that can do FP just fine
| for the same goal, e.g. python, javascript, or rust,etc?
| dgb23 wrote:
| The requirements include be high performance processing. That
| would exclude the first two.
| FrustratedMonky wrote:
| Is there a definition for 'high performance'. Does a .NET
| language like F# qualify. Or does it have to simply be
| compiled? I'm just not sure that Python wouldn't qualify.
| dgb23 wrote:
| From the examples they gave it's clear you wouldn't use
| python.
| throwwaway8529 wrote:
| Python can't even do multi line lambdas
| pharmakom wrote:
| Those languages (except maybe Rust) cannot do FP just fine.
| packetlost wrote:
| LOL Python is _not_ functional. We got a crumb of FP with
| `itertools`, `functools` and `lambda`
| synergy20 wrote:
| the reality is, general programming language with FP
| capabilities is what flies in practice, pure FP language
| might be perfect, it's just hard to find coders for them, we
| will have to live with that.
|
| for HPC and ML, Python is dominant, I would expect to enhance
| python somehow with FP instead of anything else, then adding
| c/c++/rust/fortran libraries(e.g numpy) for intensive
| computing needs.
| karmakaze wrote:
| Python isn't popular for data only because it's imperative,
| there's also the vast numerical processing ecosystem.
| Scala/Spark is an example where FP fits well.
| noloblo wrote:
| what about GIL?
| https://wiki.python.org/moin/GlobalInterpreterLock
|
| why python can't thread? impact of GIL on python
| https://pythonspeed.com/articles/python-gil/
| synergy20 wrote:
| My understanding is that even with GIL removed today,
| Python is still not a performant language for cpu-
| intensive tasks, be it single core or multiple-core.
|
| Python is better used as a glue language and leverage
| numpy etc to do the heavy lifting, numpy can work with
| multiple-core just like c/c++/rust languages can.
|
| If you really need launch multiple python processes, the
| multiprocessing module came to rescue.
|
| While not ideal, I don't see a showstopper to use Python
| for HPC's high and parallel computation needs at all.
| nestorD wrote:
| Yes, for example JAX is a strictly functional language,
| designed for high-performance computing and embedded in Python.
| synergy20 wrote:
| I don't think JAX is a new language though, if it is, it's
| still Python?
| _kulang wrote:
| It's not even really a language as much as it is an interop
| layer of sorts. It's a collection of functional operations
| on numpy arrays, and a capable JIT. It's main draw is
| honestly autograd, and if you're using that, you often
| can't use while or for loops effectively, can't index numpy
| arrays without .at[], and should avoid side effects, so
| strangely it's neither it's own language or Python any
| longer
___________________________________________________________________
(page generated 2023-03-05 23:00 UTC)