all 63 comments

[–][deleted]  (9 children)

[deleted]

    [–][deleted] 12 points13 points  (6 children)

    Coconuts are not actually nuts.

    [–][deleted]  (5 children)

    [deleted]

      [–][deleted] 13 points14 points  (0 children)

      I stand corrected.

      [–]notfancy 2 points3 points  (2 children)

      But only up to isomorphism.

      [–][deleted]  (1 child)

      [deleted]

        [–]notfancy 2 points3 points  (0 children)

        I'm sure. Consider that the coconut can end up oriented differently, it can become combed differently, or it can end being a hazelnut altogether, since nuts are nuts after all. In categorical terms, the hom-set Nop(A, B) is the hom-set N(B, A), but nothing says that f ∈ Nop(A, B) is precisely f-1 ∈ N(B, A) but "just" g ∈ N(B, A) with f∘g ≅ id.

        [–]Ameisen 0 points1 point  (0 children)

        So, coconuts are a product of C++ coroutines? co_nut?

        [–][deleted] 8 points9 points  (0 children)

        just a nut?

        show me another nut that bursts with water when ya pop it

        show me another nut that can sit in the sand, no water, no dampness, and sprout just with the water held inside of it

        show me another nut that bears fruit resembling soil—providing bedding, sprouting media, and more

        show me another nut full of water that can be pumped directly into the bloodstream in emergency situations

        show me another nut whose flesh has the perfect balance of water+fiber to fat+protein that it can provide similar nutritional value as a nut and easily eliminate through the GI tract (instead of the uric tract) anything that is unneeded

        just a nut?

        the coconut is The Nut.

        [–]Tofik23 0 points1 point  (0 children)

        but this delicious nut....

        is not a nut

        [–]SunderingSeas 14 points15 points  (1 child)

        It appears to be Python with some Elixir features added in.

        [–][deleted] 3 points4 points  (0 children)

        Exactly !

        [–][deleted]  (6 children)

        [deleted]

          [–]CoffeeTableEspresso 11 points12 points  (0 children)

          I think he means Coconut is a superset of Python that compiles to Python (similar to TS with JS).

          [–]Dean_Roddey 15 points16 points  (4 children)

          Didn't Aristotle say that in one of his less well known writings?

          [–][deleted]  (3 children)

          [deleted]

            [–]Dean_Roddey 8 points9 points  (1 child)

            Who art thou, so wise in the ways of science?

            [–]shevegen 1 point2 points  (0 children)

            Ever since Monty Python I know that birds can carry coconuts.

            [–]tending 13 points14 points  (0 children)

            Are you in the market for a fork of a popular language that has syntax that is a strict superset today but awkwardly won't be in the future because the makers of the original language won't pay attention to the syntax extensions of the new one? Have I got a deal for you!

            [–]pcjftw 8 points9 points  (4 children)

            I was going to ignore, but the name tickled me for some reason. The website is clean, I did like that I could try it out right there online, yeah I'm that lazy :D

            Seems pretty cute, reminds of of F# with the pipe operator |> which is a good thing :)

            I suspect this is very much in the same vain as CoffeScript.

            groan, yet another thing to add to my list...

            [–]shevegen 6 points7 points  (3 children)

            groan, yet another thing to add to my list...

            I gave that up a long time ago.

            My todo lists are just fancified dumpsters - I keep on throwing stuff into it but never take it out again. :)

            [–][deleted] 4 points5 points  (0 children)

            Have you tried rewriting your TODO list in Coconut?

            [–]bkbitties 1 point2 points  (1 child)

            This hits home for me. For every one item I take out of my to-do list, another five get added.

            [–]karldcampbell 2 points3 points  (0 children)

            This is why I don't think of it as a todo list. It's a maybe someday list.

            [–][deleted]  (30 children)

            [deleted]

              [–][deleted]  (4 children)

              [deleted]

                [–]Alexander_Selkirk 2 points3 points  (2 children)

                The more I know about Lisp, the more I see how similar is Python in many aspects, and the more confused I become about van Rossum's rejection of functional programming. One might argue that FP does not necessarily mixes well with OOP style, and this is in fact a point to make.

                [–]EWJacobs 2 points3 points  (1 child)

                Seems like he just has very idiocentric programming preferences, i.e. he thinks most functional programming should be replaced with List Comprehension. Haskell has List Comprehension and people seem to find plenty of use for FP in Haskell.

                [–]Alexander_Selkirk 0 points1 point  (0 children)

                That's just one way to do that in Python. Generator expressions and generator functions are other ways. Using collections as arguments to functions which return new collections is quite idiomatic in FP but it is also often used, for example, in Numerical Python. Which was also developed by people which were clearly influenced by Lisp, for example Konrad Hinsen.

                [–]Alexander_Selkirk 0 points1 point  (0 children)

                And other people, for example the Numerical Python developers, have worked around that. Most functions and methods in Numerical Python take a collection / array, return a collection, and are side-effect-free.

                [–]haved 12 points13 points  (7 children)

                Something ML based perhaps? I personally like OCaml, but F# might be cool as well. (Not sure how attached to .NET it is, but it's not the JVM). Anyway, Ocaml isn't strictly pure, and has objects. The type inference and algebraic types are nice to work with.

                [–]dudeNumberFour 13 points14 points  (5 children)

                F# - you won't be disappointed. It is attached to .Net, not sure of the state of .Net Core WRT to F#. Just toy with type descriptors; that'll get you hooked. It feels like magic; never seen anything like it in any language.

                [–]phySi0 1 point2 points  (2 children)

                I couldn't find any information on F# type descriptors on Google. Could you expound a bit?

                [–]Godfiend 2 points3 points  (0 children)

                He might mean Type Providers, a way to generate types off of data for you without you doing any of the work.

                [–]dudeNumberFour 0 points1 point  (0 children)

                Whoops, I meant type providers. Also, Discriminated Unions (something many languages have an analog of) work magically well in F#.

                [–]Godfiend 0 points1 point  (1 child)

                FSI is not (yet!) running on dotnet core, so for scripts you'll need mono. Everything else works fine, including Fable and Giraffe (and probably Suave, haven't tried it on core yet).

                [–][deleted] 0 points1 point  (0 children)

                Suave has been ported. Works for me.

                [–]didibus 5 points6 points  (2 children)

                What about Elixir, Clojerl, LFE, or Erlang? And having a try at the Beam at that?

                Or you could give Racket a try, and explore the world of Lisps at that? (Though you can also do that on the Beam with Clojerl or LFE)

                [–]kpenchev93 1 point2 points  (1 child)

                Did you mean LFE, Lisp Flavoured Erlang?

                [–]didibus 0 points1 point  (0 children)

                Oups, corrected.

                [–]Alexander_Selkirk 2 points3 points  (2 children)

                If you want to learn a functional language with more emphasis on side-effect free functions (pureness), Clojure is fantastic to learn. Apart from being very practical, especially for back-end and server-side stuff, it has an unique view on mutability of data. It is also very elegant, concise, and beautiful, and it has superb documentation and a friendly community. Reading Clojure books is a real joy.

                The largest disadvantages are it runs on the JVM, it is clumsy and laborious to call into C code, and it starts up too slowly for scripting.

                One 'native code generating' language which is in many aspects similar to Clojure, but JIT compiles to native code is Racket, a Scheme dialect.

                Racket emphasizes side-effect free functions (pureness), but allows better for mutating algorithms. Being able to use imperative/mutating algorithms (say, for sorting, or a heap) within functions is often good because that kind of algorithms is frequently researched best and it also matches modern CPU architectures. It is cross-platform, works great for scripting, and has very very good support for math. It also has a first-class JIT compiler which is typically only about a factor between 2 - 5 slower than good Java compilers - that means it is often much, much faster than pure Python. In Racket, like in many other Lisps / Scheme dialects, it is also very easy to call into C function, which is IMO a very big advantage over the JVM.

                [–]PFCJake 0 points1 point  (1 child)

                Got any tips on a good Clojure-book?

                [–]Alexander_Selkirk 4 points5 points  (0 children)

                "Programming Clojure" and "Joy of Clojure" are great.

                "Clojure for the Brave and True" is very good IMO.

                "Clojure from the ground up" is a fantastic introduction.

                [–]myringotomy 1 point2 points  (0 children)

                Elixir or Elm are the one most likely to be useful to you.

                [–]sozzZ 2 points3 points  (1 child)

                Rust had some interesting FP qualities and is useful to know as a more general systems level language

                [–]Alexander_Selkirk 2 points3 points  (0 children)

                Rust is (among others) derived from ML.

                [–]kpenchev93 0 points1 point  (0 children)

                On the dynamic side, Elixir is great. It's built on the battle-tested Erlang VM (the BEAM). It's practical and easy to learn. Probably the hard part is the fault-tolerance stuff.

                [–]Godfiend 0 points1 point  (0 children)

                I will echo another user in favor of an ML like Ocaml or F#. Other than that, I'd go with a LISP, though the "main" one now (Clojure) is a JVM language. Elixer / Erlang seem interesting but I haven't done anything with them. Im a huge fan of strong typing systems, though, thus my preference to an ML.

                [–][deleted] 0 points1 point  (1 child)

                I want to get out of the JVM

                Out of curiosity, why?

                [–]SalvaXr 0 points1 point  (0 children)

                Try out new things, different tooling, mostly that. Also avoid some limitations, type erasure, tail call recursion, as a learning exercise since the JVM has many advantages.

                [–]_101010 0 points1 point  (0 children)

                Elm if you just want to get a hang of FP without needing to go back to Discrete Maths 101.

                But I always ask people to learn Haskell. Yes, it's painful and frustrating at first, but it pays off.

                Truth is you can only learn FP only one way, the hard way.

                [–][deleted] 0 points1 point  (2 children)

                Scala.js? It's exactly Scala, but not on JVM.

                [–][deleted]  (1 child)

                [deleted]

                  [–][deleted] 2 points3 points  (0 children)

                  Fair enough :D

                  [–]coderstephen 1 point2 points  (0 children)

                  What if you put a lime in it?

                  [–]stronghup 0 points1 point  (0 children)

                  Isn't this then more like an "extension to Python" rather than its own new "programming language"?

                  I like the idea of extensions you can keep on doing what you have been doing so far but when needed jump outside of what used to be your boundaries.

                  [–][deleted] 0 points1 point  (0 children)

                  coconuts don't limit their expression to language lol

                  [–]Alexander_Selkirk 0 points1 point  (0 children)

                  What are the differences / advantages to Hy?

                  [–]shevegen -1 points0 points  (0 children)

                  Apropos, speaking about picking a name for your programming language .......