Second, you will download the appliance itself.This is CS50. VMWare Fusion/ Player and VirtualBox are two such tools. 19 of the appliance. A quick rundown follows:įirst, you will need to download a software hypervisor, a piece of software that lets you run a virtual machine on your computer. Here are CS50’s instructions for downloading Ver. All that is required to get a functioning OS in which to learn OCaml is some disk space and some waiting time. The CS50 appliance is the distro of Linux that is used to teach CS50, the first semester introductory programming course at Harvard. Method 1 (Using the CS50 Appliance): For anyone without a Mac or Linux OS that they feel comfortable developing on, the easiest (in terms of the course) route to setting up a Linux virtual machine and the OCaml installation is to simply set up the CS50 linux distro (ver. We can test individual parts of code immediately, instead of needing to compileĪnd test each time we want to run our code. It is recommended to use utop in conjunction with tuareg in emacs, that way Using a REPL is different than compiling a program and then running Line shell, where you enter commands and the shell executes them and prints (Read-evaluate-print loop), is a programming language environment that takes (reads) single commands,Įvaluates the commands and prints the result. Utop is the interactive toplevel for OCaml. We’ll also be using the core_extended, async, among other libraries. Because this resource assumes the use of the Core library (to get you hired at Jane Street), anyone not using the Core Library will need to adjust the code to work with the standard library. Instead, the Core library acts as a replacement for the standard library. List.fold_right) are defined and implemented differently. The Core library is not compatible with the standard library released with OCaml, which means that some functions (e.g. The Core library is an open source library built by the folks at Jane Street. (Because I am writing and testing the code used in this resource using the first installation method listed below, if the code written here does not work because you do not have the same libraries I have installed, you can use OPAM to install the needed libraries.)Ĭore Library: The course assumes the installation of the Core library, a popular library (set of predefined functions) for OCaml. Almost a dependency issue, OPAM is built using OCaml, which means that the instructions for Fedora distros of Linux, OCaml must be installed before installing OPAM. For instance, on the Ubuntu distribution of Linux, apt-get is the package manager that we’d use to install OPAM. Package managers are included in most GNU/Linux OS. This is opposed to Windows machines, where installation requires downloading an. Package managers are simply a group of tools that take care of installing, updating, and deleting software packages on an OS. Coming from a Windows background, package managers were foreign to me. OPAM is the OCaml package manager we’ll be using to install OCaml and related libraries. A relatively new language (1996), OCaml sees some use in industry. Most importantly, at least pedagogically, to the course is that OCaml is said to bring functional, imperative, and object-oriented programming together. This resource dives further into some its features, such as a static type system, later on. It was originally known as Objective Caml and is derived from the ml family of languages. OCaml is the programming language of choice. Skip to the next section for the links to installation instructions. This is in order to be thorough and for anyone’s edification. Before diving into the instructions, I want to briefly touch on what each of the pieces are/do.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |