- Clojure, the core data structures aren't mutable
Clojure has two types of expressions atoms and collections
Atoms represent Primitive Types in other languages, like:
Numbers, Strings, Boolean, Nil, Symbols, Keywords
| ; as clojure is built on top of Java, many of its types are old java types | |
| (class 3) | |
| => java.lang.Long |
| ; Comments start with semicolons. | |
| ; Clojure is written in "forms", which are just | |
| ; lists of things inside parentheses, separated by whitespace. | |
| ; | |
| ; The clojure reader assumes that the first thing is a | |
| ; function or macro to call, and the rest are arguments. | |
| ; | |
| ; Here's a function that sets the current namespace: | |
| (ns test) |
| ; Comments start with semicolons. | |
| ; Clojure is written in "forms", which are just | |
| ; lists of things inside parentheses, separated by whitespace. | |
| ; | |
| ; The clojure reader assumes that the first thing is a | |
| ; function or macro to call, and the rest are arguments. | |
| ; | |
| ; Here's a function that sets the current namespace: | |
| (ns test) |
| ;; eg: symbols in clojure, points to a verb or other values | |
| ;; when clojure evaluates a symbol it looks up that symbols meaning | |
| inc | |
| ;; refer to symbols without evaluating its meaning | |
| ;; ' escapes a expression. Quote anything and get it back exactly | |
| ;; the same | |
| 'inc |
| Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
| /Users/manoj/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb | |
| creating Makefile | |
| Compiling v8 for x64 | |
| Using python 2.7.6 | |
| Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 | |
| Unable to find a compiler officially supported by v8. | |
| It is recommended to use GCC v4.4 or higher |
| Start of Heisenbug logging ====================================== | |
| # Logfile created on 2013-10-27 21:17:25 +0530 by logger.rb/31641 | |
| Started GET "/users/user_273" for 127.0.0.1 at 2013-10-27 21:17:25 +0530 | |
| Processing by UsersController#show as HTML | |
| Parameters: {"id"=>"user_273"} | |
| Rendered shared/sidebar/_gravatar.haml (0.1ms) | |
| Rendered shared/_pagination.haml (0.0ms) | |
| Rendered updates/_list.html.haml (0.3ms) | |
| Rendered users/show.haml within layouts/application (5.7ms) | |
| Rendered shared/_head.html.haml (0.9ms) |
| 1) PYTHON | |
| 2) CLOJURE | |
| 3) SCALA | |
| 4) HASKELL | |
| 5) Node.js |
| ###In order to use ruby-debug with ruby-1.9.3 you need to download the following from http://rubyforge.org/frs/?group_id=8883 ### | |
| linecache19-0.5.13.gem | |
| ruby_core_source-0.1.5.gem | |
| ruby-debug19-0.11.6.gem | |
| ruby-debug-base19-0.11.26.gem | |
| ###then from the terminal run,### | |
| gem install ruby_core_source-0.1.5.gem -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p0 |
| # in Gemfile | |
| gem "fastercsv", :platforms => [:mri_18, :ruby_18] | |
| # in app/config/environment.rb | |
| require "csv" | |
| unless !CSV.const_defined? :Reader | |
| require "fastercsv" |