News for hackers. Stuff that matters.
Re:Morloc: Foreign languages unified under common functional... by rkangel on Thursday July 29, 2021 @10:07AM (#27996711)
This is fine if all you care about is functions. Very little in Python is just functions though, and the same is true in C++. The issue with FFI is always adapting the different concepts from one language to another. I can't see how (or if they try) to unify other language's OOP with a functional language over the top.

I like the idea though - one functional language to rule them all is a great dream!

Re:Morloc: Foreign languages unified under common functional... by remexre on Thursday July 29, 2021 @11:10AM (#27997458)
Yeah, I've thought a bunch about polyglot environments and the design I keep coming back to is a very generic object representation (almost definitely with a metaobject protocol), of which functions are just one kind of object. GraalVM does this with https://www.graalvm.org/truffle/javadoc/org/graalvm/polyglot...
Re:Morloc: Foreign languages unified under common functional... by arendsee on Friday July 30, 2021 @04:11AM (#28005656)
As the morloc developer, I can tell you OOP support is in the pipeline (and there is some support now).

A proper reply to this comment would fill a very long blog post, and I'm currently on vacation, so I'll have to get back to you later.

Re:Morloc: Foreign languages unified under common functional... by rkangel on Friday July 30, 2021 @05:49AM (#28006248)
It's cool to know that there are plans for it. I look forward to hearing about them when you get there.

Enjoy your vacation!

Re:Morloc: Foreign languages unified under common functional... by Y_Y on Thursday July 29, 2021 @08:41AM (#27995749)
This idea is amazing, and amazingly ambitious.

I wonder if the morloc language (as distinct from the tool) really has to be a new language, or if it could be represented in Haskell or a more flexible variant like Agda or Idris.

Re:Morloc: Foreign languages unified under common functional... by scythmic_waves on Thursday July 29, 2021 @09:50AM (#27996534)
Slightly off topic but the docs are really well formatted.

[0] Link: https://morloc-project.github.io/docs/

[1] Code: https://github.com/morloc-project/docs/

Re:Morloc: Foreign languages unified under common functional... by djoldman on Thursday July 29, 2021 @11:02AM (#27997350)
Asciidoc is great.

<meta name="generator" content="Asciidoctor 2.0.12">

Re:Morloc: Foreign languages unified under common functional... by soco on Thursday July 29, 2021 @08:25AM (#27995601)
Morloc as in "more lines of code"?
Re:Morloc: Foreign languages unified under common functional... by catern on Thursday July 29, 2021 @10:16AM (#27996825)
From the git repo history it looks like the original name was "Loc", for "Language of Composition".
Re:Morloc: Foreign languages unified under common functional... by arendsee on Friday July 30, 2021 @01:50AM (#28004868)
Morlock's are also the creatures that manage the machines under the world in Well's Time Traveler novel. Though I guess they are known more for their dietary preferences.
Re:Morloc: Foreign languages unified under common functional... by otabdeveloper4 on Thursday July 29, 2021 @08:20AM (#27995568)
Please make a Nix derivation so we don't have to think about those horrible installation instructions.
Re:Morloc: Foreign languages unified under common functional... by bradrn on Thursday July 29, 2021 @09:06AM (#27996037)
They look pretty simple: unless I’m missing something, it’s just ‘stack install’, plus a couple more commands for each language you want to use with morloc.
Re:Morloc: Foreign languages unified under common functional... by otabdeveloper4 on Thursday July 29, 2021 @11:48AM (#27997912)
Devops, in general, is never complicated. Still, it's not something I want to do unless I'm paid for it, and especially not for trying out hobby projects.
Re:Morloc: Foreign languages unified under common functional... by arendsee on Friday July 30, 2021 @02:14AM (#28004978)
You can also look at the .travis.yml file. It contains the instructions for installing everything needed to run all tests on Ubuntu.
Re:Morloc: Foreign languages unified under common functional... by butterisgood on Thursday July 29, 2021 @02:32PM (#27999826)
I'm not sure how this works with functions that have side effects. Perhaps they're banned?
Re:Morloc: Foreign languages unified under common functional... by arendsee on Friday July 30, 2021 @01:59AM (#28004903)
That is a very good question. Currently effects are outside the typesystem, but I'm planning on adding an algebraic effect system similar to the one used in Microsoft's Koka language.
Re:Morloc: Foreign languages unified under common functional... by wydfre on Thursday July 29, 2021 @01:46PM (#27999213)
Sounds like someone was finally smart enough to tackle "The Next 700 Libraries"[0] problem.

[0]: https://dl.acm.org/doi/10.1145/1622123.1622147

Re:Morloc: Foreign languages unified under common functional... by skybrian on Thursday July 29, 2021 @06:05PM (#28002055)
From the README it seems that Python, C++, and R are supported. Which others? It seems like the documentation should have the definitive list, and explain what's supported in each language.
Re:Morloc: Foreign languages unified under common functional... by arendsee on Friday July 30, 2021 @03:36AM (#28005412)
At the moment, it is just these three languages (and partial Rust support). I'll start adding new languages once the type system is more stable.
Re:Morloc: Foreign languages unified under common functional... by dlahoda on Thursday July 29, 2021 @09:10AM (#27996078)
rust and haskell will love each other