Changes between Version 66 and Version 67 of Clojure Client Tutorial


Ignore:
Timestamp:
Aug 22, 2011 12:06:54 PM (13 years ago)
Author:
kedwar10
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Clojure Client Tutorial

    v66 v67  
    2828* Pattern Matching and Predicate Dispatch [https://github.com/swannodette/match]
    2929* Logic Programming [https://github.com/clojure/core.logic]
     30* Thread Scheduling [https://github.com/overtone/at-at]
    3031
    3132Lisp and Scheme resources:
     
    5657Once you have lieningen setup, cd to the client directory and type "tree" into the shell.
    5758
    58 This organization is the default for the leiningen projects created with the "lein new <myprojectname>" command.
     59This organization is the default for the leiningen projects created with the "lein new" command.
    5960
    6061docs contains and html file that provides a sort of annotated presentation of the code.  Read this file first to familiarize yourself with the organization of the project. Once you have made your own changes to the client and wish to update the documentation, run "lein marg" in the top level directory.  This invokes the marginalia jar in the lib directory and generates a new html file.
     
    6263In the top level directory there is a file called "project.clj". This file tells leiningen how your project is organized.  For details, consult the tutorial, but know that if you wish to add additional clojure libraries to your project, you will need to specify them here, and run "lein deps" to download them.  Specific directions for leiningen are provided nearly universally for clojure project, so just look them up as needed.
    6364
    64 src contains all of the clj files in your project.  The organization of the directory must correspond to the namespaces of your project so edit with care (more on this later, but one thing to note is that if you have a namespace with dash in it, "client.my-ns", for example, the actual filename must be "my_ns.clj" and it must be located in the client directory).
     65{{{
     66(defproject client "1.0.0-SNAPSHOT"
     67            :description "Quagents client"
     68            :url "http://www.cs.rochester.edu/trac/quagents/wiki/WikiStart"
     69            :dependencies [[org.clojure/clojure "1.2.1"]
     70                           [org.clojure/clojure-contrib "1.2.0"]
     71                           [org.clojars.automata/rosado.processing "1.1.0"]
     72                           [overtone/at-at "0.0.1"]
     73                           [org.clojure/core.logic "0.6.2"]
     74                           [match "0.1.0-SNAPSHOT"]]
     75            :dev-dependencies [[lein-marginalia "0.6.0"]]
     76            :main client.core)
     77}}}
     78
     79src contains all of the .clj files in your project.  The organization of the directory must correspond to the namespaces of your project so edit with care (more on this later, but one thing to note is that if you have a namespace with dash in it, "client.my-ns", for example, the actual filename must be "my_ns.clj" and it must be located in the client directory).
    6580
    6681test contains files that leiningen will use for testing your functions via the "lein test" command.  This functionality is not critical in clojure since you can debug easily from the REPL, but if you want to batch test functions then you can look into this.
     
    7388
    7489=== Basic Functionality ===
    75 Now it is time to learn to use the client.  cd to the top level directory and typu "lein repl". If everything went smoothly you'll see something about no rlwrap and the prompt.
     90Now it is time to learn to use the client.  cd to the top level directory and typu "lein repl". If everything went smoothly you'll see something about no rlwrap (if you are working on one of the lab machines) and the prompt.
    7691
    7792{{{
     
    103118}}}
    104119
    105 Since I already have the path predefined, however, this will also work:
     120If you already have the path predefined, however, this will also work:
    106121
    107122{{{
     
    126141}}}
    127142
    128 Let's load a quagent into the map (note that if there is only one spawnpoint on the map, you'll want to move forward a bit in order to avoid getting telefragged).
     143Note that if there is only one spawnpoint on the map, you'll want to move forward a bit in order to avoid getting telefragged.
    129144
    130145{{{