Live data from Hacker News

Morloc: Foreign languages unified under common functional type system

github.com

11–20 of 22 posts

Re: Morloc: Foreign languages unified under common functional type system

#11
post #8

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!

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 type system

#12
post #5

Please make a Nix derivation so we don't have to think about those horrible installation instructions.

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.

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 type system

#16
post #9
post #3

Morloc as in "more lines of code"?

From the git repo history it looks like the original name was "Loc", for "Language of Composition".

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 type system

#17

I'm not sure how this works with functions that have side effects. Perhaps they're banned?

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 type system

#18
post #5

Please make a Nix derivation so we don't have to think about those horrible installation instructions.

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.

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 type system

#19

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.

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 type system

#20
post #8

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!

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.

Post reply on HN