11 ms·
Introduction to Functional Programming in OCaml
- vegabook 10y agoHas this course changed or evolved in any way from the one that was given last year at this time (which was very good but had a few sizeable discreet jumps in the learning curve at certain points, which could have done with being smoothed out a little).
- sigjuice 10y agoI did this last year and don't remember much. What were the sizable discreet jumps?
- vegabook 10y agoI think some of the "question 3s" in the exercises were quite a challenge about 3 weeks into the course, and for people like me who insist on getting 100%, I remember spending 4-5x the allotted time on them (or maybe I'm just slow). But as per @ocamlmoocs comment here it looks like some of this has been looked at.
- ocamlmooc 10y agoThe overall structure stays the same, but we have made some changes: notably, we reduced the workload by suppressing some exercises which turned out to be too difficult, and quite a few glitches have been fixed. If you have precise suggestions for improvement, please do not hesitate to send them to the course authors, there maight still be time to take them into account.
- 1_listerine_pls 10y agoWhy OCaml instead of other functional languages such as Scala, Haskell, Erlang, etc...? Is there anything unique about OCaml.
- Scarbutt 10y agoBecause they are French ;) and Ocaml is as good as those you mentioned for teaching FP.
- vegabook 10y agoIt is purer than Erlang, has less cruft than Scala, is more practical than Haskell, and in my opinion has a very nice syntax. It is also very fast.
- reddit_clone 10y ago>It is purer than Erlang Not sure what value of 'pure' you are using here. Erlang has (practically) no mutation to speak of. Thus I would consider that purer. Ocaml on the other hand is as mutating as you want it to be.
- vegabook 10y agoYes I guess I was throwing static typing, somewhat incorrectly, into the "pure" catch-all.
- ocamlmooc 10y agoA mother offered his son, on his birthday, two nice designer ties. Naturally, the son quickly took one of the two ties, put it on, and showed it smiling to his mother. The mother, almost crying, asked "You dont like the other tie?"
- hkjgkjy 10y agoSounds like a lot of fun! I'm a Clojure user feeling queasy about leaving s-expressions, but am very interested in the type safety. Signing up now...
- cm3 10y agoRead Real World OCaml and you'll find plenty use of S-Expressions for serialization and configuration due to Core libs by Jane Street :).
- KirinDave 10y agoI founded and help maintain a very large Clojure codebase and to be honest, I am sick to death of not having a real type system to help me. Sure, we can test the crap out of our code watching for npe's. We can lint like crazy. We can write large integration tests to better understand the larger picture better. But ultimately nothing is as pervasive as the compiler relentlessly asking you to be clear. What's more, the benefits of a language like OCaml (where Tagged unions, GADTs, direct modeling of errors via an Either composition, etc. rule the day) on your code leads you to a really good place when the codebase is sufficiently large. Giving up s-expressions and monads is indeed a sad thing. I'd miss it.
- ihodes 10y agoYou don't need to leave monads in OCaml (in fact, I'd be very sad to not be using them regularly). Typically the Lwt, Option, and Error monad. (Also speaking as a former Clojurer).
- jamesthesnake 10y agohey Jane Street!
- dorfsmay 10y agoI got exited about OCaml when I tried to solve my performance issues in Python, but then realised OCaml didn't have a good multi core story either... Any progress in that area? Given that rust has picked up a lot in terms of typing and even syntax from OCaml, is OCaml still worth investigating?
- joshmarlow 10y agoThere's work on multicore doing on right now; IIRC, there was a possibility that it could've shipped in the 2015 December release, but didn't make it. So I think/hope it should be available in the near future.
- cm3 10y agoRust took affine substructural types and integrated them into a language that looks as similar to C and C++ as possible, to make it not seem foreign to your average programmer. You can think of Rust as a focused version of ATS2 with less features for practical reasons. Rust is for building lower-level code which you would have written in C or C++ before. The comfort features and type system plus compiler support make it more amenable to writing application code as well, which would have been written in Java, C++ or Python out of comfort, so it's used for that, too. OCaml is still relevant and they complement each other. Rust is decidedly not a functional programming language, so its type system isn't going to magically support expressing the kind of constraints and abstractions (for more maintainable and less bug-prone code) you're able to in OCaml, Haskell, or even ATS2. It's not Rust vs OCaml but Rust and OCaml. The selling point of Rust over ATS2 or OCaml is the popularity and resulting ecosystem around it, just like the JVM. OCaml's existing multicore story is practical with async and friends, but they're about to land the low-level framework that allows one to build various concurrency abstractions on top. That one's based on KC's research and is pretty cool, actually.
- catnaroek 10y agoasync is for concurrent I/O, not parallel processing.
- 10y ago
- atopuzov 10y agoI'm so excited and I just can't hide it! ;-)
- bad_user 10y agoIs knowledge of French required for following this course?
- cm3 10y agoIt's in English.
- bad_user 10y agoOK, cool. I just registered on fun-mooc.fr and saw they've got courses in French.
- Davidbrcz 10y agoDisclosure : I'm French and know some people who dubbed the course. The course may be taught in English but speakers are mostly French people. So expect crappy English accent. The site itself is an attempt by the French government to build a French mooc platform.
- programLyrique 10y agoThe site was launched by the ministry of higher education and research of France, and there are mainly courses from French universities or research centers on it. Their first target is the countries where French is spoken (for instance, in West Africa) but the courses also try to have an English version.
- agumonkey 10y agoSome note: compared to the Haskell mooc, the FUN ocaml mooc is quite pragmatic, they don't go into faux monadic concurrency through Continuations or Tree Functors. There are some mind bending exercices though. (speaking from the previous run of course)
- cies 10y agoI'm really interested in OCaml, especially now that Reason has reduced the entry barrier for our team, and the BuckleScript OCaml-to-JS compiler has matured. A very pragmatic yet functional stack could show from this, call it the ORBS-stack (OCaml/Reason/BuckleScript). Now I wonder what cool front-end frameworks, possibly binding to JS frameworks, exist. In PureScript I really like Thermite and Halogen.
- learningman 10y agoI'm with you but the F#-Websharper stack already exists for isomorphic ML coding in both the front and backends. Reason/bucklescript is only on the frontend and is an entirely different "dialect" compared to OCaml.
- bad_user 10y agoHaving both Ocaml and F# descending from ML doesn't say much really, other than both implementing Hindley–Milner type inference and sharing some syntax. They are very different languages. For example Ocaml has functors, polymorphic variants and row polymorphism, versus F# which has .NET"s OOP and subtyping. F# as a language feels to me more limiting. I won't comment on the runtimes / environments, as they have pros and cons, but there's something odd about F# to Javascript compilers. There's WebSharper and FunScript and now Fable. I don't understand why the community can't get behind a single one, because neither of them is popular enough to have reached critical mass. Take a look at WebSharper's commit activity for the past year and compare with Scala.js or with ClojureScript. And note I'm not saying anything about its technical merits. Whereas for FunScript and Fable, well FunScript is probably going to die and neither of them seem to cope with "isomorphic" libraries.
- junkyarddog 10y agoThere's more to F# then HM type inference plus ".NET's OOP and subtyping". OOP and subtyping are rarely used. While it lacks some of OCaml's powerful features it shares many core features such as algebraic data types, exhaustive pattern matching, immutability by default, Option types and so on. It's also arguably easier to read with it's white space significance and not needing the rather distracting "in" keyword. Having the vast .NET library is a big plus for the language, of which OCaml has no equivalent. Other great features of F# are type providers, straightforward multi-core programming and units of measure, which I don't believe have OCaml equivalents.
- aldanor 10y agoThe background soundtrack for the intro video sounds hilarious for some reason :) Looks like a good course, will join.