Post 9pwGPQvXeqqFFIBfBA by xinayder@fosstodon.org
(DIR) More posts by xinayder@fosstodon.org
(DIR) Post #9pwE7kkV1Qi3bLSoRU by sir@cmpwn.com
2019-12-14T00:00:30Z
2 likes, 0 repeats
What are some modern functional programming languages which are fast (compiled), with a nice syntax and good contact with the surrounding system? Are there any?
(DIR) Post #9pwEjTtw6t3ELwrsO0 by abdelq@cmpwn.com
2019-12-14T00:04:07Z
0 likes, 0 repeats
@sir Have you looked at OCaml?
(DIR) Post #9pwEwSckAccE9k10qm by sir@cmpwn.com
2019-12-14T00:04:26Z
0 likes, 0 repeats
@abdelq very meh on ocaml
(DIR) Post #9pwF2XW2tYGT48mUFc by derle@framapiaf.org
2019-12-14T00:06:50Z
0 likes, 0 repeats
@sir Ocaml qualify for 3 out of 4
(DIR) Post #9pwF7NmkV5seKou3w8 by sir@cmpwn.com
2019-12-14T00:07:31Z
1 likes, 0 repeats
@derle missing an unspoken 5th criterion: performance
(DIR) Post #9pwFapKt9AZWBBub1U by fluffy@freespeechextremist.com
2019-12-14T00:17:38.795080Z
0 likes, 0 repeats
@sir @derle Jane street, a market maker on wall street, run ocaml.
(DIR) Post #9pwFjel1qXV1yfLhD6 by Wolf480pl@niu.moe
2019-12-14T00:19:12Z
0 likes, 0 repeats
@sir Rust?*hides*I guess it fails on "nice syntax", right?
(DIR) Post #9pwFsZmZiGJr9bKEtc by sir@cmpwn.com
2019-12-14T00:20:47Z
0 likes, 0 repeats
@Wolf480pl it also fails on being a functional programming language
(DIR) Post #9pwFu0YpdZCyUka1Ka by shadowfacts@social.shadowfacts.net
2019-12-14T00:21:05.793266Z
0 likes, 0 repeats
@sir I'm not sure what you mean by "good contact with the surrounding system", but I personally love Elixir.
(DIR) Post #9pwFyAUUex2MS0XCO8 by kick@blob.cat
2019-12-14T00:21:51.492562Z
1 likes, 0 repeats
@sir Define "modern"?
(DIR) Post #9pwFyavKNnx0QlHzpA by Wolf480pl@niu.moe
2019-12-14T00:21:52Z
0 likes, 0 repeats
@sir hmm I never tried it, I've only heard that it's somewhat like Haskell, but I don't recall anyone explicitly saying it has 1st class functions so maybe it's not a functional language after all...
(DIR) Post #9pwG5UthBexHldojhY by sir@cmpwn.com
2019-12-14T00:22:03Z
1 likes, 0 repeats
@kick no
(DIR) Post #9pwG6V482y8kZxAwZU by Wolf480pl@niu.moe
2019-12-14T00:23:20Z
0 likes, 0 repeats
@sir @derle is it possible for a garbage-collected language to satisfy your performance requirements?
(DIR) Post #9pwG9gxEIkGmJtTEJ6 by sir@cmpwn.com
2019-12-14T00:23:32Z
0 likes, 0 repeats
@Wolf480pl @derle perhaps
(DIR) Post #9pwGDKg14SmmNx9fqy by kick@blob.cat
2019-12-14T00:24:35.706052Z
1 likes, 0 repeats
@sir co-dfns
(DIR) Post #9pwGIi4JWn5INk5HSS by grainloom@cybre.space
2019-12-14T00:25:25Z
0 likes, 0 repeats
@Wolf480pl @sir in practice, it's not very close to Haskell.it borrows (pun not intended) some ideas from functional languages, but it's not a functional language.
(DIR) Post #9pwGL0WZse4CCWOrE8 by sir@cmpwn.com
2019-12-14T00:25:41Z
2 likes, 0 repeats
@kick okay, let's define modern: not that.
(DIR) Post #9pwGPQvXeqqFFIBfBA by xinayder@fosstodon.org
2019-12-14T00:23:56Z
0 likes, 0 repeats
@sir f#?
(DIR) Post #9pwGUPc3yHrYcMRyDY by sir@cmpwn.com
2019-12-14T00:24:29Z
0 likes, 0 repeats
@xinayder fails compiled and good contact with surrounding system
(DIR) Post #9pwGXkNhDCMltkJv3w by kick@blob.cat
2019-12-14T00:28:17.344814Z
0 likes, 0 repeats
@sir Last commit 18 hours ago!But fine. :blobcatsad:
(DIR) Post #9pwGhSKfAjdcofWzui by sir@cmpwn.com
2019-12-14T00:29:41Z
1 likes, 0 repeats
@kick modern design, not modern code
(DIR) Post #9pwGhao1fRsZ63KYnA by Wolf480pl@niu.moe
2019-12-14T00:30:01Z
0 likes, 0 repeats
@sir @derle two more questions:- is Golang too slow?- if not, on what workload is OCaml slower than Golang?According to benchmarksgame[1] OCaml and Golang have very comparable performance. Obviously those benchmarks are bogus, as are any benchmarks not related to the particular workload you have in mind. So until you specify what you want the program to do, I don't think there's much point trying to guess which language will be fast enough.[1]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fastest.html
(DIR) Post #9pwGtwHvcfLdCKCk6q by grainloom@cybre.space
2019-12-14T00:30:58Z
1 likes, 0 repeats
@sir Just throwing Clean in. Not sure if it qualifies, but AFAIK it's pretty fast and it tends to be overlooked nowadays, so you might have missed it.Syntax is similar to Haskell and it uses linear types instead of the IO monad. Not sure about the FFI story, but AFAIK it's possible to build useful things in it.Currently it's mostly used for researching Task Oriented Programming and powers some incident response stuff at some coastguard in uugh, Norway I think?
(DIR) Post #9pwGzxWLx7W4l4p1sW by kick@blob.cat
2019-12-14T00:33:23.255789Z
1 likes, 0 repeats
@sir I'd argue it presents a lot of substantial and impressive improvements over dfns (a language created post-2000 and is basically the Go to APL's C), but fair enough!
(DIR) Post #9pwH5TjdblLy7JfT4C by kick@blob.cat
2019-12-14T00:34:23.152035Z
0 likes, 0 repeats
@sir Actually, that makes me wonder: do you count Go as a language of modern design?
(DIR) Post #9pwHAtmmBDVcMLiibg by sir@cmpwn.com
2019-12-14T00:34:37Z
1 likes, 0 repeats
@kick yes, more or less
(DIR) Post #9pwHZtkZRujBUMbqMa by ky0ko@cybre.space
2019-12-14T00:39:01Z
0 likes, 0 repeats
@sir how much do you like lisp?chicken scheme is compiled, i like scheme's syntax, and it uses c as an intermediate step so can work with plain c build systems and libraries fairly easily
(DIR) Post #9pwHeZpuupJjAvLCxU by sir@cmpwn.com
2019-12-14T00:39:35Z
0 likes, 0 repeats
@ky0ko I don't want something which uses C as an intermediate step, I think that's a bad idea and I dislike every application of it so far
(DIR) Post #9pwHn0dx8DVKdGlXQ8 by ky0ko@cybre.space
2019-12-14T00:41:27Z
0 likes, 0 repeats
@sir yeah, that's entirely validit's easy to get things very, very, very wrong when doing that and i dislike most things that do itpersonally i've found chicken scheme okay but i also don't use it extensively
(DIR) Post #9pwI3KiuF6mNXgrmds by ky0ko@cybre.space
2019-12-14T00:37:45Z
0 likes, 0 repeats
@shadowfacts @sir elixir is not compiled so kind of fails right off the batit also doesn't integrate well with the host system, opting for its own build tools and dependency management (mix) without providing any view or control into this from the host
(DIR) Post #9pwI3LKTzOpxQERnDE by lanodan@queer.hacktivis.me
2019-12-14T00:45:10.929956Z
0 likes, 0 repeats
@ky0ko @shadowfacts @sir Actually Elixir compiles to bytecode so it's actually quite fast and I think you can get it to native code too.And you can actually use the distro package manager for Elixir/Erlang libs, only issue is packaging them all (Pleroma is unpackageable this way, a simple Phoenix application would be fine).
(DIR) Post #9pwIBfOvFOzDzQUcls by sir@cmpwn.com
2019-12-14T00:45:58Z
0 likes, 0 repeats
@lanodan @ky0ko @shadowfacts compiled to machine code is what we're looking for here.
(DIR) Post #9pwIRN1XLD0vcx2hXs by lanodan@queer.hacktivis.me
2019-12-14T00:49:31.660378Z
0 likes, 0 repeats
@grainloom @sir Got a link for Clean? That's like the least searchable name ever…
(DIR) Post #9pwIZonpwXPI6Cf9wO by bandali@pleroma.site
2019-12-14T00:51:04.626144Z
0 likes, 0 repeats
@sir a few that may fit your criteria:- CHICKEN: https://www.call-cc.org- Fennel: https://fennel-lang.org- Janet: https://janet-lang.org- Chibi: http://synthcode.com/scheme/chibi/note that i haven't really used these much myself (yet), but have heard good things about each of them from others
(DIR) Post #9pwIeYJWfxqoPKk6Vs by technomancy@hi.technomancy.us
2019-12-14T00:50:37.957123Z
0 likes, 0 repeats
@lanodan @ky0ko @shadowfacts @sir I'm guessing "good contact with the surrounding system" refers to FFI, which is a bit of a weak point of the BEAM VM; a lot of the fantastic guarantees that the system offers you just kind of go away once you call C functions.
(DIR) Post #9pwIeYfrKviPWbBwK8 by sir@cmpwn.com
2019-12-14T00:51:13Z
1 likes, 0 repeats
@technomancy @shadowfacts @ky0ko @lanodan refers to FFI, friendliness to packaging, nice build system
(DIR) Post #9pwImV04scE4RmR292 by lanodan@queer.hacktivis.me
2019-12-14T00:53:21.011249Z
0 likes, 0 repeats
@sir @technomancy @shadowfacts @ky0ko > friendliness to packaging> nice build systemThat feels like a sad oxymoron to modern language tbh :/
(DIR) Post #9pwJ3ZJU66OWkLeTHU by kick@blob.cat
2019-12-14T00:56:26.848696Z
1 likes, 0 repeats
@sir Semi-unrelated: How much do you hate the C found in this directory?http://www.kparc.com/b/
(DIR) Post #9pwLZT7eqkIoimSVpA by steph@iscute.moe
2019-12-14T01:24:37.532957Z
0 likes, 0 repeats
@lanodan @sir @ky0ko @shadowfacts @technomancy saddens me too that so many packages neglect this and choose to reinvent the wheel. Badly.
(DIR) Post #9pwRmMXHFYlxmYyQGu by sp6mr@mastodon.radio
2019-12-14T02:33:07Z
0 likes, 0 repeats
@sirScalaNative is a thing, but I don't know how serious it is, as I haven't used it.
(DIR) Post #9pwfghDMqtoXXNqxXc by philipwhite@functional.cafe
2019-12-14T05:09:02Z
0 likes, 0 repeats
@sir@derleOcaml isn't that slow from what i understand. For a while, everything was a pointer, but a recent version of the language got unboxed primitive types, so you can have cheaper lists of integers than before. It comes with a native compiler, so you are not forced to use bytecode VM.You're complaint about haskell packaging is my complaint about all packaging systems except Nix. Everything assumes native dependencies already exist. Nix is annoying because everything has to be in Nix.
(DIR) Post #9px4FIgSRlVQUYUeWm by karroffel@mastodon.gamedev.place
2019-12-14T09:44:02Z
0 likes, 0 repeats
@sir There is [ATS](http://ats-lang.sourceforge.net/) but I think it fails 20x on the "nice syntax" point.Performance is pretty good and in terms of "good contract with surrounding systems" it is like C (because it compiles to C and allows very easy integration with C).
(DIR) Post #9px8aInXcIwokC4o3U by s_ol@merveilles.town
2019-12-14T10:32:50Z
0 likes, 0 repeats
@sircurious about your opinion on Janet? janet-lang.org
(DIR) Post #9pxNXuzSf36fdfyPIm by nwallace@social.librem.one
2019-12-14T13:20:19Z
0 likes, 0 repeats
@sir I've been playing with Carp recently: https://github.com/carp-lang/carpCompiled, borrow-checked LISP. Good FFI to C. Yes please! Still pretty immature, though, but a lot of potential IMO
(DIR) Post #9pxS5k7PzIcdaF4z44 by boreq@chaos.social
2019-12-14T14:10:32Z
0 likes, 0 repeats
@sir I just want to say that I have the same problem but unfortunately my search for a nice compiled functional programming language yielded no results so far.
(DIR) Post #9pxUdbgw1fIRCXy2hU by grainloom@cybre.space
2019-12-14T14:07:23Z
1 likes, 0 repeats
@lanodan @sir https://clean.cs.ru.nl/Clean
(DIR) Post #9pxZ6e3UiR1KkOcaUS by mathew@mastodon.social
2019-12-14T15:30:56Z
0 likes, 0 repeats
@Wolf480pl @sir @derle I like Go, but I roll my eyes at people suggesting that it can be used for functional programming.Kotlin, on the other hand…The obvious answer is some sort of Lisp, so I assume there's a reason why Lisp is not acceptable. (Syntax?)
(DIR) Post #9pxa8KH9KLm9w1NEtU by Wolf480pl@niu.moe
2019-12-14T15:42:27Z
0 likes, 0 repeats
@mathew @sir @derle I never said Go could be used for functional programming, I just wanted to use it as a reference point for what performance is acceptable.Drew said that OCaml satisfies all criteria except being fast enough. But if Golang is fast enough, and OCaml is faster than Golang, then OCaml is fast enough.However, saying that OCaml is slow, or that it's faster than Golang, isn't really meaningful. What is it faster at? Crunching static arrays of numbers? Pointer- and allocation-heavy operations on trees? Event-driven IO? Calling through many layers of ifs and function pointers?
(DIR) Post #9pxaElr5hQbXD2G4oK by mathew@mastodon.social
2019-12-14T15:43:37Z
0 likes, 0 repeats
@Wolf480pl @sir @derle Oh, I see! Yes, Go is pretty good as far as performance and memory usage. It could probably be faster if it used as much RAM as the JVM, but I'm rather glad it doesn't.
(DIR) Post #9pxnsqHjwoMHw4A34C by jauntywunderkind420@cybre.space
2019-12-14T18:14:32Z
0 likes, 0 repeats
@sir I view scopes as meeting those requirements. Very integrable with existing systems code. Also does lovely on the GPU as a shader via webgpu/wgpu.