Live data from Hacker News

Ko – A concurrent, immutable, functional language

github.com

21–30 of 67 posts

Re: Ko – A concurrent, immutable, functional language

#21
post #15

Is this a research language? I don't understand how this offers anything beyond what already exists. I'm also suspicious of the fact that it's implemented in Go. I would think that someone who knew functional programming well enough to create a new language would implement the language in Haskell or OCaml or even Standard ML. Also the type system looks pretty bad. No algebraic data types.

> would implement the language in {foo} If that choice becomes perceivable to anyone but the authors and maintainers of the language itself, I'd say that's a first class failing, isn't it? The quality of a language should be a pure function of the language itself; the interpreter doesn't (or rather, shouldn't ) enter into it.

I think the GP has the following causal diagram in mind:

               +---------------------+
               | Author's competence |
               +-------+-----+-------+
                       |     |
                       |     |
    +--------------+   |     |   +---------+
    |Implementation|  |Product  |
    |  language    |             |language |
    +--------------+             +----+----+
                                      |
                                 +----v----+
                                 |Language |
                                 |quality  |
                                 +---------+

So you are both right; language quality is a function of the language itself, but if we don't yet know much about the language or its author, there is a correlation ("confounding") between language quality and the choice of the implementation language, so if that's the only information we have, might as well take advantage of it.

I am not weighing in here on what specifically the choice of Haskell, OCaml, or Go say about author's competence; I am simply addressing your point that the choice shouldn't matter at all—unless you are convinced that the knowledge of PL theory and design principles is uniformly distributed across all language communities.

Re: Ko – A concurrent, immutable, functional language

#22

I love the generic function aspect of this, where there aren't necessarily specific inputs or outputs. This will make code reusable by factors. A simple use being not needing to define both `toRadians` and `toDegrees`, just definite the relationship. But I believe this can be taken to the point of getting backpropagation for free once forward propagation is defined in neural networks. Not to steal any thunder, but I'…

I could be jumping to an incorrect conclusion, but I think you are misreading the description of Ko's genericity. It doesn't mean that inputs and outputs are not distinguished. It just means that arguments and return values aren't explicitly typed. The kind of Prolog-style unification you are talking about is something different.

Re: Ko – A concurrent, immutable, functional language

#23
post #21

Earlier quoted context omitted.

> would implement the language in {foo} If that choice becomes perceivable to anyone but the authors and maintainers of the language itself, I'd say that's a first class failing, isn't it? The quality of a language should be a pure function of the language itself; the interpreter doesn't (or rather, shouldn't ) enter into it.

I think the GP has the following causal diagram in mind: +---------------------+ | Author's competence | +-------+-----+-------+ | | | | +--------------+ | | +---------+ |Implementation| |Product | | language | |language | +--------------+ +----+----+ | +----v----+ |Language | |quality | +---------+ So you are both right; language quality is a function of the language itself, but if we don't yet know much about the l…

Except that Haskell and OCaml as implementation languages would signal huge academic bias and therefore likely inability to come up with a usable language or at least there exists a negative correlation with those languages.

Re: Ko – A concurrent, immutable, functional language

#24
post #15

Is this a research language? I don't understand how this offers anything beyond what already exists. I'm also suspicious of the fact that it's implemented in Go. I would think that someone who knew functional programming well enough to create a new language would implement the language in Haskell or OCaml or even Standard ML. Also the type system looks pretty bad. No algebraic data types.

What a bizarre criticism. Most of the newer popular functional languages aren't implemented in those, but rather Java, and for the same reason given in the readme for Go.

> Most of the newer popular functional languages aren't implemented in those, but rather Java

Well, that's not entirely correct. I assume you mean they run on the JVM? Language like scala are actually written IN scala. The only thing that is in java is the interpreter but the entire compiler is scala.

Re: Ko – A concurrent, immutable, functional language

#25
Hot takes, as someone else says:

https://github.com/kocircuit/kocircuit/blob/master/lessons/1... : You might want to consider using Go syntax whenever it is not a problem. 'import "package" as foo' rather than 'import foo "package"' is just pointless change, unless there's more to the "as" statement later.

https://github.com/kocircuit/kocircuit/blob/master/lessons/1... : Whoa, I have to type the name of all the arguments I want to use to every function on every invocation? That's a level of noise I'm not interested in. In https://github.com/kocircuit/kocircuit/blob/master/lessons/1... it is claimed this is necessary to support default arguments, but see Python's function argument invocations. (And be sure you see all of it; for instance, it is little known that you can:

    >>> def f(x):
    ...     return x * 2
    ... 
    >>> f(x = 2)
    4
that is, even a positional parameter can be passed by name if you insist.)

Coming back after reading on, I see you let Eq and Sum and such get by without argument names. Generally a language should not reserve privileges for itself that it does not grant to its users without a really good reason.

https://github.com/kocircuit/kocircuit/blob/master/lessons/1... : I literally have no idea how you are using the word "monadic" in this section; it is neither the proper mathematical term, nor the very close Haskell term, nor any subsequent misunderstanding I've ever seen of the Haskell term ported into other languages, nor can I particularly connect it to the philosophical meaning, nor do I (glancing ahead) see any other documentation for it. My search was not exhaustive, but taking such liberties with a term like that sets off a lot of flags for me.

https://github.com/kocircuit/kocircuit/blob/master/lessons/1... : This is, IMHO, a rather dirty hack around trying to copy the way pure Haskell code can implement definitions without much concern for order, while at the same time having side effects in the code. That "DoubleGreeting" on the bottom is getting really ugly (and I mean in terms of the semantics of what is being represented there, not the surface syntax layer), and it's still in the sample code, where things should be looking artifically fake-pretty because the real-world hasn't intruded yet. It's a solution to a problem that shouldn't have been introduced in the first place.

https://github.com/kocircuit/kocircuit/blob/master/lessons/3... : I expect "repeated assignment" will be difficult to follow with nested structures. Also, what happens if I move yearOfBirth below the repeated "occupations"? My point here is not that there isn't an answer; it's that I can come up with 3 or 4, which is the real problem.

https://github.com/kocircuit/kocircuit/blob/master/lessons/3... : Variety is a bad name for this concept. It's too close to the well-defined "variant" term and causes serious concept clash in my head. "Function object" or something, maybe. "Closure" might work, haven't studied it closely enough to be sure.

https://github.com/kocircuit/kocircuit/blob/master/lessons/3... : This appears to mean that the "null" value is forced into all types, which makes this, surprisingly, even worse than Go itself on this front, which at least has a few types of values that can't be null.

https://github.com/kocircuit/kocircuit/blob/master/lessons/3... : At scale, you can't provide a generic hashing function. It's appealing, but it really can't be done. At best you can provide an interface. Don't even provide a default implementation. Java has had a long history of problems with that.

General comment: Using the functions for flow control is OK, but combining that with arbitrarily-reorderable function argument parameters is crazy. Anyone who writes If(else: ..., when: ..., then: ...) is just insane anyhow, so don't even allow it in the syntax/grammar, because it will happen. It seems to me you basically have an imperative language trying to look functional, while I see little to nothing "functional" about it, and you'd be better off just being an imperative language and take advantage of structured programming's implicit control flow source code layout correspondence. You're paying the price for some things you're not successfully taking advantage of.

https://github.com/kocircuit/kocircuit/blob/master/lessons/5... : Re: arg0, arg1, arg2, etc., another solution to a problem that should simply have not been introduced.

My summation is that even in the examples, I'm seeing a lot of little quibbles stack up and become some big problems, and that's before I'm trying to actually code in this. I'd suggest some more thinking about the language's goals, and ensuring that every feature is in harmony with that goal and everything not necessary for it has been cut, because that is not where this language is right now.

Re: Ko – A concurrent, immutable, functional language

#26
post #2

There is not a single example in the README. I checked the step-by-step guide, but it starts with installation and documentation instructions, then imports, and I don't know yet how the language feels like. Ok, let's check that handbook then. Computation model, type system, ... Please, I just want to see a program with a dozen lines of code to see what it looks like. Of course, more extended examples with the intende…

The law for making a new language: always include examples up front.

Unless you want to filter for the most determined only !

Re: Ko – A concurrent, immutable, functional language

#28
post #24

Earlier quoted context omitted.

What a bizarre criticism. Most of the newer popular functional languages aren't implemented in those, but rather Java, and for the same reason given in the readme for Go.

> Most of the newer popular functional languages aren't implemented in those, but rather Java Well, that's not entirely correct. I assume you mean they run on the JVM? Language like scala are actually written IN scala. The only thing that is in java is the interpreter but the entire compiler is scala.

True enough for Scala, but Clojure has plenty of Java code.

Re: Ko – A concurrent, immutable, functional language

#29
This reminds me a lot of a library I wrote called Factfold (https://github.com/notduncansmith/factfold).

Something I noticed while working on it is that the declarative style is not always the most comfortable way to describe things, and well-written imperative code is declarative in its own way. Somewhere in most useful programs, it helps to have the imperative escape hatch until you can support the best declarative expression.

Re: Ko – A concurrent, immutable, functional language

#30
post #24

Earlier quoted context omitted.

> Most of the newer popular functional languages aren't implemented in those, but rather Java Well, that's not entirely correct. I assume you mean they run on the JVM? Language like scala are actually written IN scala. The only thing that is in java is the interpreter but the entire compiler is scala.

True enough for Scala, but Clojure has plenty of Java code.

OTOH clojure script is completely written in clojurescript
Post reply on HN