Threads for peterson

  1. 1

    RIP. I very much enjoyed reading Society of Mind many years ago, and I think many of the ideas presented are still quite untapped and may play out in AI systems of the future.

    For those who may be interested, I should mention there was a recent interview with Minsky in MIT Technology Review (October 2015).

    1. 6

      Question for you Lobsters. Which should I learn next (after Erlang)… OCaml or Haskell? I can’t decide… I’ve heard good things about both.

      1. 18

        Five years ago, I tried to tackle Haskell first, and found it way too weird. OCaml was a lovely way of getting used to a lot of concepts in the space while being able to be quickly productive in it (which is kinda necessary if you want to really learn the thing).

        Learning OCaml then motivated some issues that Haskell addressed, so I was quite ready and enthused to learn about Haskell’s take.

        You may find this route works for you.

        1. 15

          I’ve used both in significant anger and Haskell in production. Both are good next steps and both will take some serious getting used to over Erlang. Your personal goals will dictate the right next moves, so it’s worth noting that Haskell will introduce you much more forcefully to ideas of “purity” which can be very useful. OCaml is made somewhat simpler to understand by avoiding this issue. OCaml will introduce you instead to the idea of “modularity"—which is not precisely what you might think it is based on prior experience—and I’d say you should take a detour though learning that concept regardless of which one you end up investing more time into.

          If your goals are more project-oriented then either can work, but Haskell’s library ecosystem is vastly better developed today. Haskell in production is tricky due to laziness—you will have to learn new techniques to deal with it. OCaml I’ve not used in production, but the challenges there seem more likely to be around getting the right initial momentum as you may have to write some significant portion of library code and work around a bit of ecosystem incompatibility.

          Speaking of ecosystem again, OCaml has a standard library problem in that its genuine standard library is often not what the doctor ordered and there’s a choice of “extended” standard libraries. This choice sometimes feels a little forced which is slightly ironic due to the aforementioned modularity goals of OCaml, but c'est la vie.

          The Haskell community has issues or benefits in that you will undoubtedly run into someone sooner or later who will happily try to explain the solution to a problem as a mere application of recognizing your algorithm as being a catamorphism over an implicit data type or will suggest refactoring your effect stack according to mtl or a Free monad. It might even be me that does this. Jargon aside there’s some significant insight that Haskell can be a gateway drug to. On the other hand, this can be the absolute last thing you want to hear when trying to get your project working. Mileage varies here.

          The OCaml community has issues in that it’s small and sometimes speaks a lot of French.

          Both communities are great in that they’re full of passionate and damn smart folks, though.

          1. 8

            I’ll throw my hat in for Haskell since you’ve gotten mostly “OCaml then Haskell”, “OCaml”, and “Both” answers.

            Learn Haskell. It can be easier and less noisy than OCaml too. The ability to do ad-hoc polymorphism with typeclasses in a way that is more conventionally what people want out of polymorphism without giving up type-safety is pretty nice. If your goal is to learn new things, the overlap-but-different bits between Haskell and OCaml won’t do a lot of good either. Haskell’s built on a simpler core semantically as well.

            tl;dr I got tired of writing .mli files, I prefer my types to be next to my code, and I found modules tedious for everyday work. YMMV.

            You won’t harm yourself by learning both, but you’ve got to make a choice of where to start. I think there’s a lot to be said for learning Haskell first, hitting some limitations of typeclasses, then playing with modules in OCaml or SML.

            Disclosure: I am quite biased, but this is stuff I actually use in my day to day, not night-time kicking around of pet projects. Haskell is my 9-5 and I wouldn’t replace it with OCaml. That said, if Haskell disappears tomorrow the first thing I am doing is writing a Haskell compiler in OCaml and I can’t say I wouldn’t enjoy it :)

            1. 4

              I think these points are totally spot on. I learned Haskell first then learned OCaml for a university compilers course. OCaml was trivial to learn if you’ve already learned Haskell. That sentiment is expressed in the introduction to Haskell for OCaml programmers. The OCaml for Haskell programmers really only covers syntactic differences.

              Haskell is not really much more difficult to learn than OCaml, I estimate, but I don’t really know because I learned Haskell first.

            2. 5

              Why not dip your toes into both and see which you prefer? You’ll only be better for it.

              1. 5

                I’ve programmed a bit in both, and I would say either one would do. Personally I’m doing a bit more with Haskell lately, and typeclasses are a nice feature (as others have mentioned). On the other hand, perhaps the very rigid way in which Haskell deals with effects can be a little overwhelming at times, and OCaml would be a little less rigid on this front. Two other things I can think of which might also push you towards OCaml may be the recent excellent O'Reilly book Real World OCaml by Minsky et al (the same author as the blog post), and the similarity between OCaml and other ML'ish languages such as F#. F# is a fully open-source project and Visual F# is a first-class citizen within the .NET ecosystem, if that happens to be of interest to you. In short I would say you are choosing between two excellent and well-designed languages and really can’t go too wrong. You’ll probably want to check out the “other one” (as I have) irrespective of which way you step now. Good luck!

                1. 4

                  I personally prefer Ocaml, although I wish it had haskell style typeclasses.

                  1. 5

                    The good news is that there is experimental work ongoing by Leo White, Frédéric Bour and Jeremy Yallop to provide something like that – more like modular implicits.

                    1. 1

                      This is relevant to my interests. I’ve been exploring some similar ideas for my pet language, and while I don’t think I’d take this exact approach, it looks like a very good read.

                  2. 4

                    Coming from Erlang, getting used to either one will require a bit of mental rewiring. Haskell more than OCaml, since with OCaml you’re allowed to throw printfs (not literally) around. OCaml’s type system is not as expressive than Haskell’s but it is certainly very advanced in its own right and it probably is easier to learn.

                    Fundamentally, both belong to the ML family, so learning either one first will help in learning the other. If I could choose I would learn Haskell first, because it is stricter in the type system sense. Moving to OCaml will feel like loosening a belt, so to speak. That said, OCaml isn’t a simpler language by any means: it has a powerful OOP system, module functors (think parametrized static classes) and a great record system. Recent versions added GADTs. Concurrent and parallel programming on OCaml is a sadder story, but work is being done on it.

                    1. 3

                      Both, but start with OCaml.

                      Both haskell and ocaml are very similar in many ways. Type signatures, HM-like type inference, etc. However, in Haskell, many things are more “magic”, whereas in OCaml, code is typically more explicit.

                      1. 2

                        It depends on what you want to accomplish. I would feel much more comfortable deploying Ocaml to production than Haskell. Ocaml (currently) is very easy to reason about how it will perform, as it does not do any super interesting optimizations. The computation model is also much closer to how I feel comfortable thinking (eager evaluation). Haskell on the other hand can be deployed to production (Facebook is doing it), but they also have Simon Marlow on the team so I’m not sure if that is an unfair advantage. That being said, if you want to expand your world of how computation can be, Haskell is well worth diving into.

                        1. 1

                          Haskell, or F# instead of OCaml. You’ll find that F# is more widely used because of Microsoft’s backing.

                        1. 1

                          This is really great. I used to own the three-volume set, until I decided to give it to someone who was currently enrolled as a grad student in Physics. But since then I’ve often missed not having it, so to have full text access to all three volumes online is terrific. I would thoroughly recommend the series, especially for the accessibility of its explanations and very easy-going and readable style.

                          1. -10

                            LOL at the title. +1.

                            1. 5

                              Hi, I’m the one that invited you to lobsters so I’m at least fractionally responsible for what you post. Please don’t post/comment stuff like this, it adds nothing. When you do get downvoted, don’t complain about getting downvoted. If they didn’t reply to you to explain the downvote, commenting again to add more noise to the original noise that merited getting downvoted-without-reply is counter-productive. I’ve found it’s better to delete the comment and move on from the thread.

                              1. -9

                                To the down-voter … I laughed, and decided to share, and … you decided to down-vote. Gee thanks, idiot. Please kindly rack off to Stack overflow where you clearly belong … Apparently there a few duplicate / off-topic questions over there still waiting to be closed. Or so I last heard.

                              1. 21

                                I think we all need to exercise a large amount of sympathy for the person who sent the message. While they go about things the wrong way, people do not understand the way that software is put together, and so come to unreasonable (to us) conclusions.

                                Perhaps we need to be developing some well written explanations that can serve as templates for responses to mail like this.

                                1. 12

                                  I mean, I’m sympathetic - she sounds desperate, and for good reason. That doesn’t mean indulging her patiently is a productive course of action - that will just encourage more of the behavior, from her and others. And the author here has already tried that, it appears.

                                  1. 3

                                    You are always a voice of reason Irene. My thoughts exactly.

                                    1. 1

                                      Well, thank you! :)

                                1. 1

                                  You see that key labelled “delete” on the top-right of your keyboard. This is what it’s for.

                                  1. 21

                                    The biggest issue with Datomic isn’t technical .. it’s the licence model. Our space is currently flooded with open-source databases of various kinds ~ conventional SQL, NoSQL / document stores, K-Vs, graph, and so on. I’ve always felt Datomic implemented some interesting ideas, but the lack of an open-source version allowing unconstrained commercial use has deterred me from spending any time on it. They really should consider a more proven commercial model such as open-source base edition / enterprise edition / paid commercial support. This seems to be the sweet-spot for many other vendors. Otherwise I fear Datomic will languish in obscurity, irrespective of its technical merit, or lack thereof.

                                    1. 17

                                      Another problem with the Datomic license is that it prohibits benchmarking, so you can’t see other people’s benchmarks to see where it does well and where it falls down.

                                      1. 4

                                        That unfortunately seems to be “industry standard” in the proprietary DB world, e.g. the DB licenses from Oracle, IBM, and Microsoft have similar clauses against publishing performance data.

                                        1. 7

                                          Yes, but DB2 doesn’t have multiple talks on Strange Loop’s lineup or gushing articles on the lobsters front page.

                                          1. 4

                                            It has its share of gushing articles in other places.

                                      2. 4

                                        I’d love it if more people used Datomic just so they understand the inane bullshit I dealt with.

                                      1. 1

                                        A nice little slide deck. It’s kind of like a one-deck overview of the content of (say) Udacity’s UD120 course, but without being afraid of using a little math. Worth a look for those getting into ML.

                                        Online ML courses (and tutorials) are funny; they either eschew the use of equations and take an exposition-led approach that leads to surface “understanding” but no depth, or they take a math-heavy approach that frequently obscures the actual simplicity of many of the methods under a layer of equations that many people find impenetrable on first look. I’m yet to find the “Goldilocks” ML course (“just right”!) but if anyone has a suggestion, I’d be happy to hear it! :)

                                        (FYI I’ve reviewed both Andrew Ng’s coursera course and Seb Thrun’s UD120, and I’ve read plenty of Murphy, Bishop, Hastie et al, and MacKay … Either too hot or too cold it seems!)

                                        1. -1

                                          Uh oh. I smell WAT!

                                          1. 9

                                            I am really excited to see how Swift evolves as a future systems language, particularly for the non-Apple (i.e. Linux / BSD) space. Until now, Golang has been (IMO) the only other mainstream contender and I have been underwhelmed by the language design. (Please don’t down-vote me here simply for expressing my personal opinion - that’s why we’re here right?) Whilst Swift isn’t perfect by a long shot, a functional-imperative language with good type inference targeting a first-rate toolchain in LLVM could open some very interesting new doors. Agree? Disagree?

                                            1. 2

                                              What’s your opinion on Rust? I have written a whole lot more Swift than Rust, but I must admit, I kinda feel that Swift is a poor mans Rust. That’s my initial view of Rust anyways. The languages are very similar in syntax and features, and though I like Swift, Rust is done completely in the open by Mozilla and the rest of the community, and their main target is “multiple platforms” like Linux, BSD, OS X, whereas Swift is foremost iOS and OS X, and it will probably be like that for a long time. Swift is also more high-level than Rust, but I don’t really see that much difference in writing Swift vs. Rust, so how much higher level when it comes to writing Swift over Rust, I don’t know, but it surely means that you can do lower level stuff with Rust while still using similar features that the higher level Swift has. It’s a lot easier when you have to choose between, say, Rust and Python, because the difference is greater.

                                              What I’m going at is: why would anyone choose Swift over Rust for the server backend for a iOS+OS X app instead of Rust? And if OS X and iOS is not at all in the mix, why would anybody choose Swift over Rust? I don’t acknowledge the “it’s better to use the same language for all parts of a system” as a good reason. Anything else?

                                            1. 1

                                              This was really cool - anyone have some good references to where I can learn more about SBV in particular and solving problems using SMT in general? (I did review the examples in the repo, and they were helpful, but I’m looking for more of a tutorial-style exposition if one exists.)

                                              1. 1

                                                The Calculus of Computation by Bradley and Manna is pretty good overview of logic, program verification, and how a SAT/SMT solver works.

                                                1. 1

                                                  Thanks. Appreciated.

                                              1. 4

                                                A great book which is my ‘goto" guide for understanding FP, the lambda calculus and type inference. The equally awesome (and practical!) stuff at the back on spineless tagless G machines is a bonus. And because it’s written by the inimitable SLPJ, the clarity of exposition and pedagogical style is second to none. TL;DR - it’s great, read it! :)

                                                1. 3

                                                  The NYT has published a nice obituary for those interested to read more.

                                                  1. 2

                                                    I was just explaining Amdahl’s law to a junior colleague (“never heard of it”) on Wednesday. Ideas that stand the test of time, and all that … :)

                                                    Truly one of the greats of computer engineering. RIP.

                                                    1. 11

                                                      For my part, I’d like to see a community where we spend a lot more time and energy up-voting things that matter / we agree with, rather than down-voting things that don’t. Whilst I don’t like to see rudeness or ad hominem attacks any more than the next guy/gal, I also don’t like the negativist mindset that constant clobbering / down-voting / de-karma'ing / closing (SO anyone?!) seemingly creates. Let’s focus on the positive and let the negative take care of itself. Then again maybe I’m just showing my age.

                                                      1. 8

                                                        Lobsters is an excellent, highly civil community, where I feel the position you’re espousing is practical and a good idea on at least 95% of threads. :) I really like that a downvote is several clicks, here, and requires some thought about what justified it - I vaguely think jcs has talked about that explicitly being intended to discourage downvotes, and if he hasn’t, it has that effect anyway and it’s a good thing.

                                                      1. 5

                                                        I’m sure this will be a great talk … just need to find the time to watch it :)

                                                        1. 2

                                                          Ooh! Same! Typed assembly language is a topic that deserves far more attention. :)

                                                          1. 2

                                                            Typed assembly language

                                                            This sounds intriguing - is there any entry-level stuff discussing this? (Maybe this talk, but as a non-Haskeller, the Haskell tag is not a good omen)

                                                            1. 4

                                                              There’s a chapter on it in the second of Benjamin C. Pierce’s two books surveying topics in type theory. I’d be surprised if there are introductions to it other than that and the original papers.

                                                              I was kind of looking forward to that reading group to motivate me to actually study this material in more detail, I hope it actually happens. :)

                                                        1. 2

                                                          Stunnel’s author might do well to consider the lessons of history in order to see how this kind of thing has played out in the past. The case of XFree86 comes to mind, and I’m sure there are plenty of more recent examples.

                                                          1. 7

                                                            Computer Science Without a Computer

                                                            Also known as, math.

                                                            1. 10

                                                              That’s only kind of true. CS is an applied, algorithmic, iterative branch of mathematics. It has its own valuable contributions and unique approach that is semi-independant of mathematics.

                                                              1. 3

                                                                Not necessarily true, most of my CS classes are completely without a computer, even the labs. I’d argue that it’s even more effective (if you have some basic experience with programming) than sitting at a computer.

                                                                For example, analyzing algorithms in assembly which you had to hand-code on a blackboard was one of my favorite things.

                                                                1. 2

                                                                  Or, computer science!

                                                                1. -3

                                                                  Stop? :)

                                                                  1. 3

                                                                    I took a good look at the source for this some months back. It is indeed an awesome piece of work. Muen makes use of the intel VT virtualisation extensions to ensure separate kernel instances are mapped to different processors. Under the hood the code is extremely clean and well-written, and a great example of Ada’s many advantages as as embedded software language.