News for hackers. Stuff that matters.
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by Drup on Monday February 20, 2017 @05:34PM (#13691631)
Nim always looked to me as a modern version of OCaml made by someone who has no idea how to do static type systems properly. The language as a whole might have a nice feeling and convenient features, but the type system is really not good ... D's type system, at least, is better designed.

On the other hand, I always considered Rust as the result of an ML programmer looking at C++ and thinking "this is bullshit, I can do it cleaner".

I might have a very ML view of the programming world, but that's ok, most other people have an ALGOL/C view of it. ;)

Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by mirekrusin on Monday February 20, 2017 @06:04PM (#13691834)
Crystal [1] seems to be nice-shaping language with good (algebraic) type system.

[1] https://crystal-lang.org/

Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by srean on Tuesday February 21, 2017 @03:43AM (#13694240)
The Felix language may fit your taste then http://felix-lang.org/ Its related to C++ somewhat in the way say Scala is related to Java.

Its been around for a while. Felix has an ML like type system (stronger in fact), has pattern matching, has coroutines / fibers, and was designed to have a FFI less interop with C++ libraries. Very fast too.

Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by dom96 on Tuesday February 21, 2017 @05:24AM (#13694607)
Can you explain what about Nim's type system is not good?
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by feduzi on Tuesday February 21, 2017 @05:39AM (#13694658)
It is more an expression of confusion rather than type system quality evaluation, but why does JSON parser's implementation returns its own types like JsonNode? Why doesn't it just return core types like:

* JSON String -> NIM String

* JSON Object -> NIM Hash

* and so on...

I've also had the same question when looking at https://crystal-lang.org.

PS: I do not claim Nim's type system to be bad as I do not have an exact counterexample of a "better" type system.

Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by dom96 on Tuesday February 21, 2017 @07:17AM (#13694938)
Because the type of a JSON object's fields is not known at compile-time.

    let s = parseJson("{'A': 'foo'}")
    s["A"] # What type is this? We don't know until we parse the JSON.
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by jackmott on Monday February 20, 2017 @06:02PM (#13691820)
yeah i have fever dreams of C and ML having some sort of super baby. rust and nim are close but not quite
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by yawaramin on Monday February 20, 2017 @06:04PM (#13691836)
I dream of something like https://github.com/pikatchu/LinearML one day coming into the scene.
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by zem on Tuesday February 21, 2017 @04:26AM (#13694396)
mezzo looks promising: http://protz.github.io/mezzo/
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by yawaramin on Tuesday February 21, 2017 @01:34PM (#13698087)
Interesting, thank you. It looks a bit complex at first sight.
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by zem on Tuesday February 21, 2017 @04:20AM (#13694377)
some others worth checking out (all largely single-developer efforts):

http://www.ats-lang.org/ [ml + c + everything dialled up to eleven. linear and dependent types. comes out of academia, but under active development and slowly beginning to gather a community.]

https://eigenstate.org/myrddin/ [not really familiar with this one but it looks interetsing. close to the metal, has pattern matching over algebraic datatypes but seems more towards the c than the ml end of the spectrum from the brief glance i took.]

http://mythryl.org/ [never took off, sadly; i really liked the looks of this one and its ambitious goals. strong sml influence, with better posix integration and some c-like surface features. developer is currently battling cancer: http://mythryl.org/pipermail/mythryl/2016-April/000942.html]

http://felix-lang.org/ [spawn of ml + c++ rather than ml + c. under enthusiastic if haphazard development.]

there have been a few others i've seen pop up over the years; i keep meaning to make a website or at least a github awesome-style list cataloguing and tracking them.

Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by Drup on Tuesday February 21, 2017 @05:11AM (#13694564)
For all those propositions, I have only one question: Why would I use that instead of OCaml ?

OCaml is far from being perfect, but it has lot's of features and a decent community (especially compared to all those hobby/research languages).

OCaml can do pretty much anything except things like image processing and video game programming. I mostly don't care about those things, and if I did, I would use Rust.

Now, from a research point of view, sure, those languages are interesting.

Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by zem on Tuesday February 21, 2017 @06:03AM (#13694738)
i'm in the same boat - i keep an interested eye on developments in the ML-cross-C space, but so far none of them seems compelling to use over ocaml. however, if one of them had a cross-compiler as good as go's, that would be a killer feature. i would really like an ml-like language i could use to develop desktop apps and trivially deliver binaries for multiple platforms.
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by elechi on Tuesday February 21, 2017 @01:01PM (#13697725)
I've tried to use ATS, but I constantly run into installation problems. I wish I could try it, though, because it sounds super fast.
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by zem on Tuesday February 21, 2017 @02:46PM (#13699105)
check out this new tutorial series: http://ryanking.com/blog/Joy-of-ATS-1-Installing-ATS/
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by elechi on Wednesday February 22, 2017 @04:41PM (#13709423)
Can't wait to try it out. Thank you for your response.
Re:Nim Language Draws from Best of Python, Rust, Go, and Lisp by zzzcpan on Monday February 20, 2017 @06:14PM (#13691886)
> most other people have an ALGOL/C view

Maybe in the past, but not today. Today the perspective is from the very high level dynamically typed languages. Encoding things into types is out of the question.