Re:Why ML/OCaml are good for writing compilers (1998)
by throwaway7645 on Saturday April 15, 2017 @06:45PM
(#14123253)
Crappy windows support for OCaml. F# is similar to OCaml, but is very difficult for beginners and those not familiar with .NET. I also don't see a lot of beginner material for OCaml.
[ Parent
| on HN ]
Re:Why ML/OCaml are good for writing compilers (1998)
by batmansmk on Sunday April 16, 2017 @02:19AM
(#14124633)
In France, my two first years of CS were taught in OCaml. 20k+ students are learning that way every year over there. We learn about recursions, complexity, types, compilers, language theory, graph theory ... without leaving the confort of one expressive language.
I terribly missed OCaml when I had to realign with the technologies promoted in job offers and expected within the industry.
Re:Why ML/OCaml are good for writing compilers (1998)
by throwaway7645 on Sunday April 16, 2017 @04:33AM
(#14124966)
I imagine Inria has some influence there as well as FP is good to teach in college. It's always a tough balance choosing between what is more relevant as computer science (Lisp, Prolog, OCaml...etc) versus what will get students paid money (Java, JavaScript, C++, or Python). I'm glad you had a positive experience and as i asked below, do you have the course material? And outside of the basic things you learn in school/mention above, could you use it in your daily job? Is there enough library support?
Re:Why ML/OCaml are good for writing compilers (1998)
by poizan42 on Saturday April 15, 2017 @07:04PM
(#14123347)
At computer science at the University of Copenhagen F# has been used for the introduction courses the past couple of years, which as far as I know has been a big success, so I'm doubtful of it not being beginner friendly
Re:Why ML/OCaml are good for writing compilers (1998)
by throwaway7645 on Saturday April 15, 2017 @07:13PM
(#14123381)
Mileage is probably not representative when you're in a university setting being taught by professors in an intro course versus a professional trying to use a multitude of the data science libraries and having trouble tying it together. Python has a zillion books published and a large percentage of them are beginner oriented. F# has only a few books and they are almost all for experts.
Re:Why ML/OCaml are good for writing compilers (1998)
by jackfoxy on Saturday April 15, 2017 @07:55PM
(#14123532)
The community surrounding F# today is very supportive and helpful with people of all experience levels. Compared to when I learned F# in 2010 it is orders of magnitude easier and more social. So many resources: the F# Foundation website http://fsharp.org/ is a good place to start. http://fsharpforfunandprofit.com/ and the book form of the site's articles on github https://swlaschin.gitbooks.io/fsharpforfunandprofit/content/... has great information for people at all levels. And finally just get on twitter #fsharp to start meeting people in the community.
Re:Why ML/OCaml are good for writing compilers (1998)
by throwaway7645 on Saturday April 15, 2017 @08:12PM
(#14123621)
I've gone through all of those and although it's nice, it is not what I'd call beginner friendly at all. Python has books teaching you to program in Python which is a really good way to learn a programming language. Scott's tutorial using Frankenstein to explain Monads is interesting, but I need to see how to build simple programs and modules first. How does one organize a program using pure FP, or what's the best way to mix in OOP and it is really confusing to learn all the pragmas and compiler directives. I'm not sure if I'm using the right terminology, but a lot of example code uses FSI which has to call the modules differently than if you make an executable. I really would love nothing more than F# to be my go to language, but I need a little more help getting there. I realize not all users have this problem though.
Re:Why ML/OCaml are good for writing compilers (1998)
by jackmott on Saturday April 15, 2017 @08:26PM
(#14123658)
i am an expert and Scott's website is usually bananas to me. For some people his approach doesn't seem to click.
A good beginner book for F# is a good idea.
Re:Why ML/OCaml are good for writing compilers (1998)
by throwaway7645 on Saturday April 15, 2017 @08:44PM
(#14123721)
Glad to hear I'm not the only one lol. I'd spend top dollar for a beginner's book focusing on creating short 1/2 page programs like guess my number, hangman, plotting graphs...etc and only mix in things like currying and monads later in the book along with C# interop.
Re:Why ML/OCaml are good for writing compilers (1998)
by dogfishbar on Saturday April 15, 2017 @08:36PM
(#14123689)
I have been teaching OCaml in CS1 at Boston College for 4 years now. Of hundreds of students who went on to learn Java in our CS2 course (joining Python-trained students from other sections of CS1), nearly unanimous happy campers. When OCaml is their first programming language, they're good to go.
Re:Why ML/OCaml are good for writing compilers (1998)
by throwaway7645 on Saturday April 15, 2017 @09:49PM
(#14123919)
Is the course material online?
Re:Why ML/OCaml are good for writing compilers (1998)
by ms013 on Saturday April 15, 2017 @07:26PM
(#14123421)
I've moved to doing ocaml development on my windows 10 machine under the windows subsystem for Linux. The Linux ocaml tool chain works pretty seamlessly there. Works very smoothly relative to past experiences with native ocaml compilers on windows.
Re:Why ML/OCaml are good for writing compilers (1998)
by nv-vn on Saturday April 15, 2017 @06:57PM
(#14123304)
True, but at least for compilers Windows support shouldn't be a big deal. This is because the Windows support is mostly only an issue when using certain libraries, and since compilers rarely have many dependencies it's often a non-issue.
The beginner material is kind of true as well, although I do believe that the little beginner material that exists for OCaml (pretty much just the official documentation/Learn OCaml and Real World OCaml) are much easier to get started with than the tutorials of many other languages. OCaml's learning material is pretty short and to-the-point, and I found it to be a good set of boot-strap knowledge: I pretty much learned the core language in 3-4 days or so and then went on to explore the various libraries, tools, and language features not covered by the basic tutorials at my own pace.
Re:Why ML/OCaml are good for writing compilers (1998)
by haskellandchill on Saturday April 15, 2017 @08:51PM
(#14123754)
OCaml from the Very Beginning is amazing beginner material.
Re:Why ML/OCaml are good for writing compilers (1998)
by throwaway7645 on Sunday April 16, 2017 @04:35AM
(#14124972)
Thanks, I'll take a look again. He has some sample chapters posted that look really short(3 pages), but I'm guessing that is just a chapter snippet as the book itself is 200 pages?
Re:Why ML/OCaml are good for writing compilers (1998)
by haskellandchill on Sunday April 16, 2017 @02:37PM
(#14126840)
The book is short, but there are plenty of exercises and worked solutions in the back. Do the exercises and you will get your money's worth. I suggest buying it with the bundle because More OCaml is good also.