Live data from Hacker News

Functional Go Programming Language

github.com

11–20 of 36 posts

Re: Functional Go Programming Language

#11

Maybe it would be cool to improve upon flex/bison/jison and make it easier for everyone to create or modify the programming language of their choice with platform plugins that let people connect their own programming language to the platform of their choice (JVM, .Net, straight up compiled into a binary). I'm really mostly thinking about syntax of the language really, but you could go further and customize the typing…

make it easier for everyone to create or modify the programming language of their choice with platform plugins that let people connect their own programming language to the platform of their choice

Clojure is specifically designed to be "hosted" on another programming language. Also, it has facilities that let you create your own control structures and otherwise make it easy to create a DSL. (Domain Specific Language)

This basically gives you: Custom language -> some intermediary form which would probably end up having some restrictions on language design -> to the thing you want it to run on.

Re: Functional Go Programming Language

#12

Glad to see a language taking inspiration from go. Are other targets (ie a cpython style native interpreter) being considered? I'd love to see a scripting language with go's type system (and concise syntax for declaration, type inference and built in collections) but support for operator overloading and the ability to link in external shared libraries. Basically I want python+numpy (ie external C/fortran numerical co…

There's a wealth of numerical code in C++. Calling into C is pretty straightforward, but with C++ it's a complicated choice between Swig, sip, shiboken, BoostPython, ..., or hand-writing your language bindings to C++ code in extern "C".

I'd like it if it also made it easy to tap into C++. It's probably a very complicated problem, which is why it's unsolved.

Re: Functional Go Programming Language

#13

Maybe it would be cool to improve upon flex/bison/jison and make it easier for everyone to create or modify the programming language of their choice with platform plugins that let people connect their own programming language to the platform of their choice (JVM, .Net, straight up compiled into a binary). I'm really mostly thinking about syntax of the language really, but you could go further and customize the typing…

So, javascript?

Scala has been ported to javascript so I think that basically implies most of the languages targeting the JVM could also be.

Re: Functional Go Programming Language

#14
>Why a new language? The goal of Funcgo is to combine the readability of the Go language with the semantics of Clojure [...] Clojure is difficult to read for programmers unfamiliar with Lisp syntax.

So funcgo is really just Lisp without parentheses... again.

Re: Functional Go Programming Language

#16
post #14

>Why a new language? The goal of Funcgo is to combine the readability of the Go language with the semantics of Clojure [...] Clojure is difficult to read for programmers unfamiliar with Lisp syntax. So funcgo is really just Lisp without parentheses... again.

Yep, fundamentally Funcgo is just Lisp without parentheses. Or put it another way, it is Lisp with more syntax. The fact that Lisp has so little syntax is beautifully elegant from a mathematical point of view, but that is I believe at the expense of readability, at least for programmers coming from other programming traditions. Of course readability is somewhat subjective and I understand that for long-time Lisp programmers, Lisp is perfectly readable.

Re: Functional Go Programming Language

#17

Glad to see a language taking inspiration from go. Are other targets (ie a cpython style native interpreter) being considered? I'd love to see a scripting language with go's type system (and concise syntax for declaration, type inference and built in collections) but support for operator overloading and the ability to link in external shared libraries. Basically I want python+numpy (ie external C/fortran numerical co…

I've no immediate plans for another target for now – there is a lot of work still to do just targeting Clojure and making sure the toolchain is easy for programmers, both server-side and client side. As regards typing, Funcgo has type inference using Clojure's type-hinting and it can use all of Clojures immutable collections as well as the standard Java mutable collections. As for operator overloading, it's not there yet, but I just I added a user story (https://github.com/eobrain/funcgo/issues/18) to my backlog to allow function names to be operators (like in Scala). However it won't really be operator overloading because the underlying Clojure only allows overloading by arity, not by type.

Re: Functional Go Programming Language

#18
post #12

Glad to see a language taking inspiration from go. Are other targets (ie a cpython style native interpreter) being considered? I'd love to see a scripting language with go's type system (and concise syntax for declaration, type inference and built in collections) but support for operator overloading and the ability to link in external shared libraries. Basically I want python+numpy (ie external C/fortran numerical co…

There's a wealth of numerical code in C++. Calling into C is pretty straightforward, but with C++ it's a complicated choice between Swig, sip, shiboken, BoostPython, ..., or hand-writing your language bindings to C++ code in extern "C". I'd like it if it also made it easy to tap into C++. It's probably a very complicated problem, which is why it's unsolved.

Funcgo can readily call Java code, so it supports numerical programming or linking in C++ code to the same extent that Java does.

Re: Functional Go Programming Language

#19
post #17

Glad to see a language taking inspiration from go. Are other targets (ie a cpython style native interpreter) being considered? I'd love to see a scripting language with go's type system (and concise syntax for declaration, type inference and built in collections) but support for operator overloading and the ability to link in external shared libraries. Basically I want python+numpy (ie external C/fortran numerical co…

I've no immediate plans for another target for now – there is a lot of work still to do just targeting Clojure and making sure the toolchain is easy for programmers, both server-side and client side. As regards typing, Funcgo has type inference using Clojure's type-hinting and it can use all of Clojures immutable collections as well as the standard Java mutable collections. As for operator overloading, it's not there…

Very cool and thanks for the response! I'll need to experiment with this + a clojure matrix math library at some point.

I'm new to the clojure ecosystem but it looks like https://github.com/mikera/core.matrix could be worth trying.

Re: Functional Go Programming Language

#20

I've toyed with this idea a bit (compiling a more familiar language down to Clojure). This project in particular gives some of the benefits of Clojure (JVM, expressive language, immutability), but I don't see any easy way to add new constructs to the language like macros without modifying the compiler itself. Can you modify the grammar that is fed to Instaparse at runtime? That being said, the current branding and na…

I do not plan to add to Funcgo the ability to easily create macros. Inspired by Go's philosophy, I want to limit the scope of the language to keep it somewhat simple. Funcgo however can use macros, so a sufficiently motivated programmer can write macros in Clojure and use them in Funcgo.

Thanks for the feedback on the impression the name and branding gave. I'll try to change the main pages to make clear that Funcgo is not full Go, and is a fairly thin layer on top of Clojure.

Post reply on HN