├── static ├── favicon.png ├── clojure-icon.gif ├── clojure-text.gif ├── space │ ├── left-nav-bottom.gif │ ├── toc-background.gif │ ├── left-nav-divider.gif │ ├── content-background.gif │ ├── left-nav-background.gif │ └── resources-background.gif ├── internal.css ├── wiki.css └── clojure.css ├── README.md └── index.html /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure.github.com/master/static/favicon.png -------------------------------------------------------------------------------- /static/clojure-icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure.github.com/master/static/clojure-icon.gif -------------------------------------------------------------------------------- /static/clojure-text.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure.github.com/master/static/clojure-text.gif -------------------------------------------------------------------------------- /static/space/left-nav-bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure.github.com/master/static/space/left-nav-bottom.gif -------------------------------------------------------------------------------- /static/space/toc-background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure.github.com/master/static/space/toc-background.gif -------------------------------------------------------------------------------- /static/space/left-nav-divider.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure.github.com/master/static/space/left-nav-divider.gif -------------------------------------------------------------------------------- /static/space/content-background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure.github.com/master/static/space/content-background.gif -------------------------------------------------------------------------------- /static/space/left-nav-background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure.github.com/master/static/space/left-nav-background.gif -------------------------------------------------------------------------------- /static/space/resources-background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clojure/clojure.github.com/master/static/space/resources-background.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sources for clojure.github.com # 2 | This repo has the source data for [https://clojure.github.io]() which is generated by the rules of [Github Pages](http://pages.github.com/). 3 | 4 | Currently, the content on this site is completely generated by an autodoc indexer (see [https://github.com/tomfaulhaber/autodoc-index] for the source) that creates an overview and index of all the libraries that have had documentation pushed from autodoc. 5 | 6 | Contact Tom Faulhaber if you have suggestions or want to add new content to this page. Do not directly edit the files here because they will be overwritten the next time the indexer runs. 7 | -------------------------------------------------------------------------------- /static/internal.css: -------------------------------------------------------------------------------- 1 | /* *** MISC STUFF USED ALL OVER *** */ 2 | .nowrap { white-space: nowrap; } 3 | .hidden { display: none; } 4 | tr td .sm { font-size: 90%; } 5 | .grey { color: #666; } 6 | .smgrey { color: #666; font-size: 80%; } 7 | .grey a { color: #666; } 8 | .textentry { font-family: arial, helvetica, sans-serif; border: 1px solid #999; } 9 | .nopad { padding: 0; margin: 0; } 10 | .bblack { color: #000; font-size: 1.1em; font-weight: bold; } 11 | .bblacklight { color: #000; font-size: 1.1em; } 12 | 13 | /* IE6 min-height: http://www.dustindiaz.com/min-height-fast-hack */ 14 | #content_view { display: block; padding-bottom: 2em; width: 100%; min-height: 600px; height: auto !important; height: 600px; } 15 | 16 | /* Used with .innerContentBox and #WikiAds to position the ad column */ 17 | .contentBox { position: relative; min-height: 600px; height: auto !important; height: 600px; } 18 | 19 | -------------------------------------------------------------------------------- /static/wiki.css: -------------------------------------------------------------------------------- 1 | /* Wiki Rendered Styles */ 2 | .wiki { line-height: 150%; font-family: arial, helvetica, sans-serif; font-size: small; } 3 | .wiki h1 { font-weight: bold; padding: 5px 0 0 0; margin: 0; font-size: 1.4em; } 4 | .wiki h2 { font-weight: bold; padding: 5px 0 0 0; margin: 0; font-size: 1.3em; } 5 | .wiki h3 { font-weight: bold; padding: 5px 0 0 0; margin: 0; font-size: 1.1em; } 6 | .wiki h4 { font-weight: normal; padding: 5px 0 0 0; margin: 0; font-size: 1.066em; } 7 | .wiki h4 a { font-weight: bold; padding: 5px 0 0 0; margin: 0; font-size: 1.1em; color: #272727; } 8 | .wiki h5 { font-weight: normal; padding: 5px 0 0 0; margin: 0; font-size: 1.033em; } 9 | .wiki h6 { font-weight: normal; padding: 5px 0 0 0; margin: 0; font-size: 1.0em; } 10 | .wiki table { border-collapse: collapse; margin: 10px 0; font-size: small; } 11 | .wiki p { margin: 0; padding: 0; padding: 5px 0; } 12 | .wiki td { border: 1px solid #DDD; } 13 | .wiki #toc { border: 1px solid #AAA; background: #fff; padding: 5px; margin: 0 0 10px 10px; width: 25%; float: right; clear: right;} 14 | .wiki #toc h1 { font-weight: normal; font-size: 1.2em; padding: 0; } 15 | .wiki #toc a:hover { color: #00D; background: #FFD; } 16 | 17 | .wiki hr { height: 1px; color: #AAA; background-color: #AAA; border: 0; margin: 0 10px; } 18 | .wiki ul { padding: .5em 0 0 3em; margin: 0; } 19 | .wiki ol { padding: .5em 0 0 3em; margin: 0; } 20 | .wiki ul.quotelist { list-style: none; } 21 | .wiki tt { font-size: small; } 22 | .wiki img { border: 0; padding: 4px; } 23 | 24 | -------------------------------------------------------------------------------- /static/clojure.css: -------------------------------------------------------------------------------- 1 | 2 | body {margin: 0;padding: 0;background-color: #e3e3e3;border-top: 4px solid #b3ccfe;color: #272727} 3 | body, .wiki, #Content, .wikipage {font-family: "Lucida Grande","Trebuchet MS","Bitstream Vera Sans",Verdana,Helvetica,sans-serif;font-size: 12px;line-height: 18px;} 4 | #leftcolumn .wiki_link, #toc, #toc a, .toc-header {font-size: 11px;line-height: 18px;text-decoration: none} 5 | img {border: 0;} 6 | #AllContentContainer {max-width: 96em;min-width: 663px;background: #fff url(space/content-background.gif) right repeat-y;padding: 0 40px 18px 0;} 7 | 8 | #Header {position: relative;clear: both;overflow: auto;height: 110px} 9 | #Logo {position: absolute;top: 0;left: 0;padding: 10px 0 0 62px;width: 138px;height: 100px} 10 | #Header h1 {float: left;background:transparent url(clojure-text.gif) no-repeat 8px 36px;border: 0;margin: 0;padding: 0;text-indent:-9999px;position: absolute;top: 0;left: 200px;} 11 | #Header h1 a:link, #Header h1 a:visited, #Header h1 a:hover {border: 0;display: block;margin: 0;padding: 0;text-decoration: none;width: 220px;height: 110px;} 12 | #Resources {min-height: 110px;width: 234px;padding: 5px 0;float: right;border-bottom: 1px solid #abc4e2;background: #e4eaf7 url(space/resources-background.gif) repeat-y;overflow: auto;} 13 | #Resources ul {margin: 0;padding: 0 25px;list-style: none;} 14 | #ResourcesB {float: right;} 15 | #Resources a {text-decoration: none;} 16 | #Resources a:link, #Resources a:visited, #Resources a:hover, #Resources a:active {color: #4c5770;} 17 | #Resources a:hover {text-decoration: underline;} 18 | 19 | #leftcolumn {margin: 0 0 0 22px;float: left;width: 168px;padding-bottom: 18px;background: #c5d2eb url(space/left-nav-bottom.gif) bottom no-repeat;} 20 | 21 | #leftcolumn ul {list-style: none;margin: 0;padding: 0;} 22 | 23 | #leftcolumn .toc-header {font-weight: bold;display: block;background: transparent url(space/left-nav-divider.gif) repeat-x;padding: 6px 0 0 17px;margin: 12px 0 0 0;} 24 | #leftcolumn a {font-weight: bold;display: block;background: transparent url(space/left-nav-divider.gif) repeat-x;padding: 6px 0 0 17px;margin: 12px 0 0 0;} 25 | #leftcolumn li a {font-weight: normal;background:none;margin: 0;padding: 0 0 0 17px;} 26 | #leftcolumn br {display: none;} 27 | #leftcolumn .menu {margin-top: 14px;background: #fff url(space/left-nav-background.gif) repeat-y;} 28 | 29 | #leftcolumn a:link , #leftcolumn a:visited , #leftcolumn a:active, .toc-header {color: #666;} 30 | #leftcolumn a:hover {text-decoration: underline;color: #222;} 31 | 32 | #rightcolumn {margin-left: 220px;} 33 | 34 | .wiki #toc {border: none;margin: 0 0 30px 18px;width: 222px;padding: 0 0 17px 12px;background: transparent url(space/toc-background.gif) repeat-y;border-bottom: 1px solid #d6d6d6;} 35 | .wiki #toc h1, .wiki #toc div {margin: 0;padding: 0;} 36 | .wiki #toc h1 {font-size: 14px;line-height: 18px;font-family: Georgia, "Times New Roman", Times, serif;font-style: italic;font-weight: normal;color: #969696;padding: 10px 0 8px 11px;} 37 | .wiki #toc a:link, .wiki #toc a:visited, .wiki #toc a:active {color: #646464;} 38 | .wiki #toc a:hover {background: none;color: #333333;} 39 | 40 | .wiki pre {font-family: Inconsolata, Monaco, Consolas, "Lucida Console", "Courier New", Courier, monospace;background-color: transparent;border: 0px;color: #000000} 41 | #DesignedBy { clear: both; text-align: right; margin-top: 18px;} 42 | #DesignedBy, #DesignedBy a, #DesignedBy a:link, #DesignedBy a:visited, #DesignedBy a:hover, #DesignedBy a:active { color: #999; } 43 | 44 | #WikiHeaderNavContainer { height: 36px; position: relative; } 45 | #leftcolumn .WikiActions a {display: inline;} 46 | 47 | .comment { color: gray; } 48 | .string { color: teal; } 49 | .function { color: #00c; } 50 | .macro, .specialops { color: #60c; } 51 | .parens { color: #000; } 52 | .keyword { color: #c09; } 53 | .brackets { color: #006; } 54 | .curlybrackets { color: #906; } 55 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |56 | Each project entry has a link to the project's own API documentation page that has complete 57 | documentation for that API. 58 |
59 | The API index has a complete, alphabetized 60 | index of all the functions in the various projects. 61 |
62 | These projects are made available under the 63 | Eclipse Public License (EPL). 64 | They are copyright 2008-2013 by Rich Hickey and the various contributors. 65 |
66 | Note: Not all the projects in Clojure are currently documented on these 67 | pages. Please see https://github.com/clojure 68 | for the full repository of projects under the Clojure umbrella. 69 |
Generic arithmetic interface 81 | This library defines generic versions of + - * / as multimethods 82 | that can be defined for any type. The minimal required 83 | implementations for a type are binary + and * plus unary - and /. 84 | Everything else is derived from these automatically. Explicit 85 | binary definitions for - and / can be provided for 86 | efficiency reasons.87 | 88 | 89 |
Generic collection interface 93 | This library defines generic versions of common 94 | collection-related functions as multimethods that can be 95 | defined for any type.96 | 97 | 98 |
Generic comparison interface 102 | This library defines generic versions of = not= < > <= >= zero? 103 | as multimethods that can be defined for any type. Of the 104 | greater/less-than relations, types must minimally implement >.105 | 106 | 107 |
Generic functor interface (fmap)111 | 112 | 113 |
Generic math function interface 117 | This library defines generic versions of common mathematical 118 | functions such as sqrt or sin as multimethods that can be 119 | defined for any type.120 | 121 | 122 |
Basic graph theory algorithms133 | 134 | 135 |
This library contains the most commonly used monads as well 146 | as macros for defining and using monads and useful monadic 147 | functions.148 | 149 | 150 |
Fundamental library of the Clojure language161 | 162 | 163 |
Non-core data functions.167 | 168 | 169 |
edn reading.173 | 174 | 175 |
Graphical object inspector for Clojure data structures.179 | 180 | 181 |
Start a web browser from Clojure191 | 192 | 193 |
This file defines polymorphic I/O utility functions for Clojure.197 | 198 | 199 |
A repl helper to quickly open javadocs.203 | 204 | 205 |
Conveniently launch a sub-process providing its stdin and 209 | collecting its stdout210 | 211 | 212 |
Top-level main function for Clojure REPL and scripts.216 | 217 | 218 |
A Pretty Printer for Clojure 222 | 223 | clojure.pprint implements a flexible system for printing structured data 224 | in a pleasing, easy-to-understand format. Basic use of the pretty printer is 225 | simple, just call pprint instead of println. More advanced users can use 226 | the building blocks provided to create custom output formats. 227 | 228 | Out of the box, pprint supports a simple structured format for basic data 229 | and a specialized format for Clojure source code. More advanced formats, 230 | including formats that don't look like Clojure data at all like XML and 231 | JSON, can be rendered by creating custom dispatch functions. 232 | 233 | In addition to the pprint function, this module contains cl-format, a text 234 | formatting function which is fully compatible with the format function in 235 | Common Lisp. Because pretty printing directives are directly integrated with 236 | cl-format, it supports very concise custom dispatch. It also provides 237 | a more powerful alternative to Clojure's standard format function. 238 | 239 | See documentation for pprint and cl-format for more information or 240 | complete documentation on the the clojure web site on github.241 | 242 | 243 |
Reflection on Host Types 247 | Alpha - subject to change. 248 | 249 | Two main entry points: 250 | 251 | * type-reflect reflects on something that implements TypeReference. 252 | * reflect (for REPL use) reflects on the class of an instance, or 253 | on a class if passed a class 254 | 255 | Key features: 256 | 257 | * Exposes the read side of reflection as pure data. Reflecting 258 | on a type returns a map with keys :bases, :flags, and :members. 259 | 260 | * Canonicalizes class names as Clojure symbols. Types can extend 261 | to the TypeReference protocol to indicate that they can be 262 | unambiguously resolved as a type name. The canonical format 263 | requires one non-Java-ish convention: array brackets are <> 264 | instead of [] so they can be part of a Clojure symbol. 265 | 266 | * Pluggable Reflectors for different implementations. The default 267 | JavaReflector is good when you have a class in hand, or use 268 | the AsmReflector for "hands off" reflection without forcing 269 | classes to load. 270 | 271 | Platform implementers must: 272 | 273 | * Create an implementation of Reflector. 274 | * Create one or more implementations of TypeReference. 275 | * def default-reflector to be an instance that satisfies Reflector.276 | 277 | 278 |
Utilities meant to be used interactively at the REPL282 | 283 | 284 |
Set operations such as union/intersection.288 | 289 | 290 |
Print stack traces oriented towards Clojure, not Java.300 | 301 | 302 |
Clojure String utilities 306 | 307 | It is poor form to (:use clojure.string). Instead, use require 308 | with :as to specify a prefix, e.g. 309 | 310 | (ns your.namespace.here 311 | (:require [clojure.string :as str])) 312 | 313 | Design notes for clojure.string: 314 | 315 | 1. Strings are objects (as opposed to sequences). As such, the 316 | string being manipulated is the first argument to a function; 317 | passing nil will result in a NullPointerException unless 318 | documented otherwise. If you want sequence-y behavior instead, 319 | use a sequence. 320 | 321 | 2. Functions are generally not lazy, and call straight to host 322 | methods where those are available and efficient. 323 | 324 | 3. Functions take advantage of String implementation details to 325 | write high-performing loop/recurs instead of using higher-order 326 | functions. (This is not idiomatic in general-purpose application 327 | code.) 328 | 329 | 4. When a function is documented to accept a string argument, it 330 | will take any implementation of the correct *interface* on the 331 | host platform. In Java, this is CharSequence, which is more 332 | general than String. In ordinary usage you will almost always 333 | pass concrete strings. If you are doing something unusual, 334 | e.g. passing a mutable implementation of CharSequence, then 335 | thread-safety is your responsibility.336 | 337 | 338 |
Macros that expand to repeated copies of a template expression.342 | 343 | 344 |
A unit testing framework. 349 | 350 | ASSERTIONS 351 | 352 | The core of the library is the "is" macro, which lets you make 353 | assertions of any arbitrary expression: 354 | 355 | (is (= 4 (+ 2 2))) 356 | (is (instance? Integer 256)) 357 | (is (.startsWith "abcde" "ab")) 358 | 359 | You can type an "is" expression directly at the REPL, which will 360 | print a message if it fails. 361 | 362 | user> (is (= 5 (+ 2 2))) 363 | 364 | FAIL in (:1) 365 | expected: (= 5 (+ 2 2)) 366 | actual: (not (= 5 4)) 367 | false 368 | 369 | The "expected:" line shows you the original expression, and the 370 | "actual:" shows you what actually happened. In this case, it 371 | shows that (+ 2 2) returned 4, which is not = to 5. Finally, the 372 | "false" on the last line is the value returned from the 373 | expression. The "is" macro always returns the result of the 374 | inner expression. 375 | 376 | There are two special assertions for testing exceptions. The 377 | "(is (thrown? c ...))" form tests if an exception of class c is 378 | thrown: 379 | 380 | (is (thrown? ArithmeticException (/ 1 0))) 381 | 382 | "(is (thrown-with-msg? c re ...))" does the same thing and also 383 | tests that the message on the exception matches the regular 384 | expression re: 385 | 386 | (is (thrown-with-msg? ArithmeticException #"Divide by zero" 387 | (/ 1 0))) 388 | 389 | DOCUMENTING TESTS 390 | 391 | "is" takes an optional second argument, a string describing the 392 | assertion. This message will be included in the error report. 393 | 394 | (is (= 5 (+ 2 2)) "Crazy arithmetic") 395 | 396 | In addition, you can document groups of assertions with the 397 | "testing" macro, which takes a string followed by any number of 398 | assertions. The string will be included in failure reports. 399 | Calls to "testing" may be nested, and all of the strings will be 400 | joined together with spaces in the final report, in a style 401 | similar to RSpec <http://rspec.info/> 402 | 403 | (testing "Arithmetic" 404 | (testing "with positive integers" 405 | (is (= 4 (+ 2 2))) 406 | (is (= 7 (+ 3 4)))) 407 | (testing "with negative integers" 408 | (is (= -4 (+ -2 -2))) 409 | (is (= -1 (+ 3 -4))))) 410 | 411 | Note that, unlike RSpec, the "testing" macro may only be used 412 | INSIDE a "deftest" or "with-test" form (see below). 413 | 414 | 415 | DEFINING TESTS 416 | 417 | There are two ways to define tests. The "with-test" macro takes 418 | a defn or def form as its first argument, followed by any number 419 | of assertions. The tests will be stored as metadata on the 420 | definition. 421 | 422 | (with-test 423 | (defn my-function [x y] 424 | (+ x y)) 425 | (is (= 4 (my-function 2 2))) 426 | (is (= 7 (my-function 3 4)))) 427 | 428 | As of Clojure SVN rev. 1221, this does not work with defmacro. 429 | See http://code.google.com/p/clojure/issues/detail?id=51 430 | 431 | The other way lets you define tests separately from the rest of 432 | your code, even in a different namespace: 433 | 434 | (deftest addition 435 | (is (= 4 (+ 2 2))) 436 | (is (= 7 (+ 3 4)))) 437 | 438 | (deftest subtraction 439 | (is (= 1 (- 4 3))) 440 | (is (= 3 (- 7 4)))) 441 | 442 | This creates functions named "addition" and "subtraction", which 443 | can be called like any other function. Therefore, tests can be 444 | grouped and composed, in a style similar to the test framework in 445 | Peter Seibel's "Practical Common Lisp" 446 | <http://www.gigamonkeys.com/book/practical-building-a-unit-test-framework.html> 447 | 448 | (deftest arithmetic 449 | (addition) 450 | (subtraction)) 451 | 452 | The names of the nested tests will be joined in a list, like 453 | "(arithmetic addition)", in failure reports. You can use nested 454 | tests to set up a context shared by several tests. 455 | 456 | 457 | RUNNING TESTS 458 | 459 | Run tests with the function "(run-tests namespaces...)": 460 | 461 | (run-tests 'your.namespace 'some.other.namespace) 462 | 463 | If you don't specify any namespaces, the current namespace is 464 | used. To run all tests in all namespaces, use "(run-all-tests)". 465 | 466 | By default, these functions will search for all tests defined in 467 | a namespace and run them in an undefined order. However, if you 468 | are composing tests, as in the "arithmetic" example above, you 469 | probably do not want the "addition" and "subtraction" tests run 470 | separately. In that case, you must define a special function 471 | named "test-ns-hook" that runs your tests in the correct order: 472 | 473 | (defn test-ns-hook [] 474 | (arithmetic)) 475 | 476 | Note: test-ns-hook prevents execution of fixtures (see below). 477 | 478 | 479 | OMITTING TESTS FROM PRODUCTION CODE 480 | 481 | You can bind the variable "*load-tests*" to false when loading or 482 | compiling code in production. This will prevent any tests from 483 | being created by "with-test" or "deftest". 484 | 485 | 486 | FIXTURES 487 | 488 | Fixtures allow you to run code before and after tests, to set up 489 | the context in which tests should be run. 490 | 491 | A fixture is just a function that calls another function passed as 492 | an argument. It looks like this: 493 | 494 | (defn my-fixture [f] 495 | Perform setup, establish bindings, whatever. 496 | (f) Then call the function we were passed. 497 | Tear-down / clean-up code here. 498 | ) 499 | 500 | Fixtures are attached to namespaces in one of two ways. "each" 501 | fixtures are run repeatedly, once for each test function created 502 | with "deftest" or "with-test". "each" fixtures are useful for 503 | establishing a consistent before/after state for each test, like 504 | clearing out database tables. 505 | 506 | "each" fixtures can be attached to the current namespace like this: 507 | (use-fixtures :each fixture1 fixture2 ...) 508 | The fixture1, fixture2 are just functions like the example above. 509 | They can also be anonymous functions, like this: 510 | (use-fixtures :each (fn [f] setup... (f) cleanup...)) 511 | 512 | The other kind of fixture, a "once" fixture, is only run once, 513 | around ALL the tests in the namespace. "once" fixtures are useful 514 | for tasks that only need to be performed once, like establishing 515 | database connections, or for time-consuming tasks. 516 | 517 | Attach "once" fixtures to the current namespace like this: 518 | (use-fixtures :once fixture1 fixture2 ...) 519 | 520 | Note: Fixtures and test-ns-hook are mutually incompatible. If you 521 | are using test-ns-hook, fixture functions will *never* be run. 522 | 523 | 524 | SAVING TEST OUTPUT TO A FILE 525 | 526 | All the test reporting functions write to the var *test-out*. By 527 | default, this is the same as *out*, but you can rebind it to any 528 | PrintWriter. For example, it could be a file opened with 529 | clojure.java.io/writer. 530 | 531 | 532 | EXTENDING TEST-IS (ADVANCED) 533 | 534 | You can extend the behavior of the "is" macro by defining new 535 | methods for the "assert-expr" multimethod. These methods are 536 | called during expansion of the "is" macro, so they should return 537 | quoted forms to be evaluated. 538 | 539 | You can plug in your own test-reporting framework by rebinding 540 | the "report" function: (report event) 541 | 542 | The 'event' argument is a map. It will always have a :type key, 543 | whose value will be a keyword signaling the type of event being 544 | reported. Standard events with :type value of :pass, :fail, and 545 | :error are called when an assertion passes, fails, and throws an 546 | exception, respectively. In that case, the event will also have 547 | the following keys: 548 | 549 | :expected The form that was expected to be true 550 | :actual A form representing what actually occurred 551 | :message The string message given as an argument to 'is' 552 | 553 | The "testing" strings will be a list in "*testing-contexts*", and 554 | the vars being tested will be a list in "*testing-vars*". 555 | 556 | Your "report" function should wrap any printing calls in the 557 | "with-test-out" macro, which rebinds *out* to the current value 558 | of *test-out*. 559 | 560 | For additional event types, see the examples in the code.561 | 562 | 563 |
This file defines a generic tree walker for Clojure data 567 | structures. It takes any data structure (list, vector, map, set, 568 | seq), calls a function on every element, and uses the return value 569 | of the function in place of the original. This makes it fairly 570 | easy to write recursive search-and-replace functions, as shown in 571 | the examples. 572 | 573 | Note: "walk" supports all Clojure data structures EXCEPT maps 574 | created with sorted-map-by. There is no (obvious) way to retrieve 575 | the sorting function.576 | 577 | 578 |
XML reading/writing.582 | 583 | 584 |
Functional hierarchical zipper, with navigation, editing, 588 | and enumeration. See Huet589 | 590 | 591 |
A library for reduction and parallel folding. Alpha and subject 601 | to change. Note that fold and its derivatives require Java 7+ or 602 | Java 6 + jsr166y.jar for fork/join support. See Clojure's pom.xml for the 603 | dependency info.604 | 605 | 606 |
Socket server support610 | 611 | 612 |
clojure.test extension for JUnit-compatible XML output. 628 | 629 | JUnit (http://junit.org/) is the most popular unit-testing library 630 | for Java. As such, tool support for JUnit output formats is 631 | common. By producing compatible output from tests, this tool 632 | support can be exploited. 633 | 634 | To use, wrap any calls to clojure.test/run-tests in the 635 | with-junit-output macro, like this: 636 | 637 | (use 'clojure.test) 638 | (use 'clojure.test.junit) 639 | 640 | (with-junit-output 641 | (run-tests 'my.cool.library)) 642 | 643 | To write the output to a file, rebind clojure.test/*test-out* to 644 | your own PrintWriter (perhaps opened using 645 | clojure.java.io/writer).646 | 647 | 648 |
clojure.test extensions for the Test Anything Protocol (TAP) 652 | 653 | TAP is a simple text-based syntax for reporting test results. TAP 654 | was originally developed for Perl, and now has implementations in 655 | several languages. For more information on TAP, see 656 | http://testanything.org/ and 657 | http://search.cpan.org/~petdance/TAP-1.0.0/TAP.pm 658 | 659 | To use this library, wrap any calls to 660 | clojure.test/run-tests in the with-tap-output macro, 661 | like this: 662 | 663 | (use 'clojure.test) 664 | (use 'clojure.test.tap) 665 | 666 | (with-tap-output 667 | (run-tests 'my.cool.library))668 | 669 | 670 |
Facilities for async programming and communication. 681 | 682 | go blocks are dispatched over an internal thread pool, which 683 | defaults to 8 threads. The size of this pool can be modified using 684 | the Java system property `clojure.core.async.pool-size`.685 | 686 | 687 |
core.async HIGHLY EXPERIMENTAL feature exploration 691 | 692 | Caveats: 693 | 694 | 1. Everything defined in this namespace is experimental, and subject 695 | to change or deletion without warning. 696 | 697 | 2. Many features provided by this namespace are highly coupled to 698 | implementation details of core.async. Potential features which 699 | operate at higher levels of abstraction are suitable for inclusion 700 | in the examples. 701 | 702 | 3. Features provided by this namespace MAY be promoted to 703 | clojure.core.async at a later point in time, but there is no 704 | guarantee any of them will.705 | 706 | 707 |
A caching library for Clojure.718 | 719 | 720 |
The public contracts programming functions and macros for clojure.core.contracts.731 | 732 | 733 |
Functions/macros variants of the ones that can be found in clojure.core 762 | (note to other contrib members: feel free to add to this lib)763 | 764 | 765 |
Compile-time string interpolation for Clojure.769 | 770 | 771 |
core.memoize is a memoization library offering functionality above Clojure's core `memoize` 856 | function in the following ways: 857 | 858 | **Pluggable memoization** 859 | 860 | core.memoize allows for different back-end cache implmentations to be used as appropriate without 861 | changing the memoization modus operandi. 862 | 863 | **Manipulable memoization** 864 | 865 | Because core.memoize allows you to access a function's memoization store, you do interesting things like 866 | clear it, modify it, and save it for later. 867 |868 | 869 | 870 |
An implementation of the confluently persistent vector data 881 | structure introduced in Bagwell, Rompf, "RRB-Trees: Efficient 882 | Immutable Vectors", EPFL-REPORT-169879, September, 2011. 883 | 884 | RRB-Trees build upon Clojure's PersistentVectors, adding logarithmic 885 | time concatenation and slicing. 886 | 887 | The main API entry points are clojure.core.rrb-vector/catvec, 888 | performing vector concatenation, and clojure.core.rrb-vector/subvec, 889 | which produces a new vector containing the appropriate subrange of 890 | the input vector (in contrast to clojure.core/subvec, which returns 891 | a view on the input vector). 892 | 893 | core.rrb-vector's vectors can store objects or unboxed primitives. 894 | The implementation allows for seamless interoperability with 895 | clojure.lang.PersistentVector, clojure.core.Vec (more commonly known 896 | as gvec) and clojure.lang.APersistentVector$SubVector instances: 897 | clojure.core.rrb-vector/catvec and clojure.core.rrb-vector/subvec 898 | convert their inputs to clojure.core.rrb-vector.rrbt.Vector 899 | instances whenever necessary (this is a very fast constant time 900 | operation for PersistentVector and gvec; for SubVector it is O(log 901 | n), where n is the size of the underlying vector). 902 | 903 | clojure.core.rrb-vector also exports its own versions of vector and 904 | vector-of and vec which always produce 905 | clojure.core.rrb-vector.rrbt.Vector instances. Note that vector-of 906 | accepts :object as one of the possible type arguments, in addition 907 | to keywords naming primitive types.908 | 909 | 910 |
This namespace contains typed wrapper macros, type aliases 927 | and functions for type checking Clojure code. check-ns is the interface 928 | for checking namespaces, cf for checking individual forms.929 | 930 | 931 |
This namespace contains annotations and helper macros for type 935 | checking core.async code. Ensure clojure.core.async is require'd 936 | before performing type checking. 937 | 938 | go 939 | use go 940 | 941 | chan 942 | use chan 943 | 944 | buffer 945 | use buffer (similar for other buffer constructors) 946 |947 | 948 | 949 |
Utilities for all implementations of the type checker953 | 954 | 955 |
A contract system a la racket/contract. 1007 | 1008 | Main entry point is the `contract` macro.1009 | 1010 | 1011 |
This namespace contains easy tools for hole driven development1021 | 1022 | 1023 |
Extensible languages in Clojure, a la Racket's #lang.
1027 |
1028 | This is a simple library that monkey patches clojure.core/load
1029 | to be extensible to different backends.
1030 |
1031 | `monkey-patch-extensible-load` does the actual monkey-patching and
1032 | must be called explicitly.
1033 |
1034 | `lang-dispatch` is a map from keywords to alternative `load` functions
1035 | (of type [String -> nil]). The corresponding function will be used to
1036 | load a file according its :lang metadata entry in the `ns` form.
1037 |
1038 | To add a new implementation, use
1039 | (alter-var-root lang-dispatch assoc :new-impl my-load)
1040 |
1041 | eg. A file with a `ns` form
1042 | (ns fancy-ns-form
1043 | {:lang :new-impl})
1044 | will use `my-load` to load the file.
1045 |
1046 |
1047 |
1048 | Front end for actual implementation in clojure.core.typed.load1. 1052 | 1053 | Indirection is necessary to delay loading core.typed as long as possible.1054 | 1055 | 1056 |
Implementation of clojure.core.typed.load.1060 | 1061 | 1062 |
Adds runtime checks where annotations are instead of type checking1072 | 1073 | 1074 |
A unification library for Clojure.1097 | 1098 | 1099 |
An implementation of persistent sorted maps and sets based on AVL 1110 | trees which can be used as drop-in replacements for Clojure's 1111 | built-in sorted maps and sets based on red-black trees. Apart from 1112 | the standard sorted collection API, the provided map and set types 1113 | support the transients API and several additional logarithmic time 1114 | operations: rank queries via clojure.core/nth (select element by 1115 | rank) and clojure.data.avl/rank-of (discover rank of element), 1116 | "nearest key" lookups via clojure.data.avl/nearest, splits by key 1117 | and index via clojure.data.avl/split-key and 1118 | clojure.data.avl/split-at, respectively, and subsets/submaps using 1119 | clojure.data.avl/subrange.1120 | 1121 | 1122 |
Functions for working with base64 encodings.1133 | 1134 | 1135 |
Reading and writing comma separated values.1146 | 1147 | 1148 |
Persistent collections based on 2-3 finger trees.1159 | 1160 | 1161 |
Read/write fressian data. See http://www.edn-format.org/1172 | 1173 | 1174 |
Data generators for Clojure.1185 | 1186 | 1187 |
JavaScript Object Notation (JSON) parser/generator. 1198 | See http://www.json.org/1199 | 1200 | 1201 |
A priority map is very similar to a sorted map, but whereas a sorted map produces a
1212 | sequence of the entries sorted by key, a priority map produces the entries sorted by value.
1213 | In addition to supporting all the functions a sorted map supports, a priority map
1214 | can also be thought of as a queue of [item priority] pairs. To support usage as
1215 | a versatile priority queue, priority maps also support conj/peek/pop operations.
1216 |
1217 | The standard way to construct a priority map is with priority-map:
1218 | user=> (def p (priority-map :a 2 :b 1 :c 3 :d 5 :e 4 :f 3))
1219 | #'user/p
1220 | user=> p
1221 | {:b 1, :a 2, :c 3, :f 3, :e 4, :d 5}
1222 |
1223 | So :b has priority 1, :a has priority 2, and so on.
1224 | Notice how the priority map prints in an order sorted by its priorities (i.e., the map's values)
1225 |
1226 | We can use assoc to assign a priority to a new item:
1227 | user=> (assoc p :g 1)
1228 | {:b 1, :g 1, :a 2, :c 3, :f 3, :e 4, :d 5}
1229 |
1230 | or to assign a new priority to an extant item:
1231 | user=> (assoc p :c 4)
1232 | {:b 1, :a 2, :f 3, :c 4, :e 4, :d 5}
1233 |
1234 | We can remove an item from the priority map:
1235 | user=> (dissoc p :e)
1236 | {:b 1, :a 2, :c 3, :f 3, :d 5}
1237 |
1238 | An alternative way to add to the priority map is to conj a [item priority] pair:
1239 | user=> (conj p [:g 0])
1240 | {:g 0, :b 1, :a 2, :c 3, :f 3, :e 4, :d 5}
1241 |
1242 | or use into:
1243 | user=> (into p [[:g 0] [:h 1] [:i 2]])
1244 | {:g 0, :b 1, :h 1, :a 2, :i 2, :c 3, :f 3, :e 4, :d 5}
1245 |
1246 | Priority maps are countable:
1247 | user=> (count p)
1248 | 6
1249 |
1250 | Like other maps, equivalence is based not on type, but on contents.
1251 | In other words, just as a sorted-map can be equal to a hash-map,
1252 | so can a priority-map.
1253 | user=> (= p {:b 1, :a 2, :c 3, :f 3, :e 4, :d 5})
1254 | true
1255 |
1256 | You can test them for emptiness:
1257 | user=> (empty? (priority-map))
1258 | true
1259 | user=> (empty? p)
1260 | false
1261 |
1262 | You can test whether an item is in the priority map:
1263 | user=> (contains? p :a)
1264 | true
1265 | user=> (contains? p :g)
1266 | false
1267 |
1268 | It is easy to look up the priority of a given item, using any of the standard map mechanisms:
1269 | user=> (get p :a)
1270 | 2
1271 | user=> (get p :g 10)
1272 | 10
1273 | user=> (p :a)
1274 | 2
1275 | user=> (:a p)
1276 | 2
1277 |
1278 | Priority maps derive much of their utility by providing priority-based seq.
1279 | Note that no guarantees are made about the order in which items of the same priority appear.
1280 | user=> (seq p)
1281 | ([:b 1] [:a 2] [:c 3] [:f 3] [:e 4] [:d 5])
1282 | Because no guarantees are made about the order of same-priority items, note that
1283 | rseq might not be an exact reverse of the seq. It is only guaranteed to be in
1284 | descending order.
1285 | user=> (rseq p)
1286 | ([:d 5] [:e 4] [:c 3] [:f 3] [:a 2] [:b 1])
1287 |
1288 | This means first/rest/next/for/map/etc. all operate in priority order.
1289 | user=> (first p)
1290 | [:b 1]
1291 | user=> (rest p)
1292 | ([:a 2] [:c 3] [:f 3] [:e 4] [:d 5])
1293 |
1294 | Priority maps support metadata:
1295 | user=> (meta (with-meta p {:extra :info}))
1296 | {:extra :info}
1297 |
1298 | But perhaps most importantly, priority maps can also function as priority queues.
1299 | peek, like first, gives you the first [item priority] pair in the collection.
1300 | pop removes the first [item priority] from the collection.
1301 | (Note that unlike rest, which returns a seq, pop returns a priority map).
1302 |
1303 | user=> (peek p)
1304 | [:b 1]
1305 | user=> (pop p)
1306 | {:a 2, :c 3, :f 3, :e 4, :d 5}
1307 |
1308 | It is also possible to use a custom comparator:
1309 | user=> (priority-map-by > :a 1 :b 2 :c 3)
1310 | {:c 3, :b 2, :a 1}
1311 |
1312 | Sometimes, it is desirable to have a map where the values contain more information
1313 | than just the priority. For example, let's say you want a map like:
1314 | {:a [2 :apple], :b [1 :banana], :c [3 :carrot]}
1315 | and you want to sort the map by the numeric priority found in the pair.
1316 |
1317 | A common mistake is to try to solve this with a custom comparator:
1318 | (priority-map
1319 | (fn [[priority1 _] [priority2 _]] (< priority1 priority2))
1320 | :a [2 :apple], :b [1 :banana], :c [3 :carrot])
1321 |
1322 | This will not work! In Clojure, like Java, all comparators must be total orders,
1323 | meaning that you can't have a tie unless the objects you are comparing are
1324 | in fact equal. The above comparator breaks that rule because
1325 | [2 :apple] and [2 :apricot] tie, but are not equal.
1326 |
1327 | The correct way to construct such a priority map is by specifying a keyfn, which is used
1328 | to extract the true priority from the priority map's vals. (Note: It might seem a little odd
1329 | that the priority-extraction function is called a *key*fn, even though it is applied to the
1330 | map's values. This terminology is based on the docstring of clojure.core/sort-by, which
1331 | uses `keyfn` for the function which extracts the sort order.)
1332 |
1333 | In the above example,
1334 |
1335 | user=> (priority-map-keyfn first :a [2 :apple], :b [1 :banana], :c [3 :carrot])
1336 | {:b [1 :banana], :a [2 :apple], :c [3 :carrot]}
1337 |
1338 | You can also combine a keyfn with a comparator that operates on the extracted priorities:
1339 |
1340 | user=> (priority-map-keyfn-by
1341 | first >
1342 | :a [2 :apple], :b [1 :banana], :c [3 :carrot])
1343 | {:c [3 :carrot], :a [2 :apple], :b [1 :banana]}
1344 |
1345 |
1346 |
1347 | All of these operations are efficient. Generally speaking, most operations
1348 | are O(log n) where n is the number of distinct priorities. Some operations
1349 | (for example, straightforward lookup of an item's priority, or testing
1350 | whether a given item is in the priority map) are as efficient
1351 | as Clojure's built-in map.
1352 |
1353 | The key to this efficiency is that internally, not only does the priority map store
1354 | an ordinary hash map of items to priority, but it also stores a sorted map that
1355 | maps priorities to sets of items with that priority.
1356 |
1357 | A typical textbook priority queue data structure supports at the ability to add
1358 | a [item priority] pair to the queue, and to pop/peek the next [item priority] pair.
1359 | But many real-world applications of priority queues require more features, such
1360 | as the ability to test whether something is already in the queue, or to reassign
1361 | a priority. For example, a standard formulation of Dijkstra's algorithm requires the
1362 | ability to reduce the priority number associated with a given item. Once you
1363 | throw persistence into the mix with the desire to adjust priorities, the traditional
1364 | structures just don't work that well.
1365 |
1366 | This particular blend of Clojure's built-in hash sets, hash maps, and sorted maps
1367 | proved to be a great way to implement an especially flexible persistent priority queue.
1368 |
1369 | Connoisseurs of algorithms will note that this structure's peek operation is not O(1) as
1370 | it would be if based upon a heap data structure, but I feel this is a small concession for
1371 | the blend of persistence, priority reassignment, and priority-sorted seq, which can be
1372 | quite expensive to achieve with a heap (I did actually try this for comparison). Furthermore,
1373 | this peek's logarithmic behavior is quite good (on my computer I can do a million
1374 | peeks at a priority map with a million items in 750ms). Also, consider that peek and pop
1375 | usually follow one another, and even with a heap, pop is logarithmic. So the net combination
1376 | of peek and pop is not much different between this versatile formulation of a priority map and
1377 | a more limited heap-based one. In a nutshell, peek, although not O(1), is unlikely to be the
1378 | bottleneck in your program.
1379 |
1380 | All in all, I hope you will find priority maps to be an easy-to-use and useful addition
1381 | to Clojure's assortment of built-in maps (hash-map and sorted-map).
1382 |
1383 |
1384 | Functions to parse XML into lazy sequences and lazy trees and 1395 | emit these as text.1396 | 1397 | 1398 |
Data type for xml pull events1402 | 1403 | 1404 |
Shared private code for data.xml namespaces1408 | 1409 | 1410 |
JVM implementation of the emitter details1414 | 1415 | 1416 |
Data types for xml nodes: Element, CData and Comment1432 | 1433 | 1434 |
System for filtering trees and nodes generated by zip.clj in 1469 | general, and xml trees in particular.1470 | 1471 | 1472 |
Utilities for dealing with the JVM's classpath1489 | 1490 | 1491 |
Support for recursively converting Java beans to Clojure and vice versa.1502 | 1503 | 1504 |
A Clojure interface to SQL databases via JDBC 1515 | 1516 | clojure.java.jdbc provides a simple abstraction for CRUD (create, read, 1517 | update, delete) operations on a SQL database, along with basic transaction 1518 | support. Basic DDL operations are also supported (create table, drop table, 1519 | access to table metadata). 1520 | 1521 | Maps are used to represent records, making it easy to store and retrieve 1522 | data. Results can be processed using any standard sequence operations. 1523 | 1524 | For most operations, Java's PreparedStatement is used so your SQL and 1525 | parameters can be represented as simple vectors where the first element 1526 | is the SQL string, with ? for each parameter, and the remaining elements 1527 | are the parameter values to be substituted. In general, operations return 1528 | the number of rows affected, except for a single record insert where any 1529 | generated keys are returned (as a map). 1530 | 1531 | For more documentation, see: 1532 | 1533 | http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html1534 | 1535 | 1536 |
Optional specifications for use with Clojure 1.9 or later.1540 | 1541 | 1542 |
JMX support for Clojure
1553 |
1554 | Usage
1555 | (require '[clojure.java.jmx :as jmx])
1556 |
1557 | What beans do I have?
1558 |
1559 | (jmx/mbean-names "*:*")
1560 | -> #<HashSet [java.lang:type=MemoryPool,name=CMS Old Gen,
1561 | java.lang:type=Memory, ...]
1562 |
1563 | What attributes does a bean have?
1564 |
1565 | (jmx/attribute-names "java.lang:type=Memory")
1566 | -> (:Verbose :ObjectPendingFinalizationCount
1567 | :HeapMemoryUsage :NonHeapMemoryUsage)
1568 |
1569 | What is the value of an attribute?
1570 |
1571 | (jmx/read "java.lang:type=Memory" :ObjectPendingFinalizationCount)
1572 | -> 0
1573 | (jmx/read "java.lang:type=Memory" [:HeapMemoryUsage :NonHeapMemoryUsage])
1574 | ->
1575 | {:NonHeapMemoryUsage
1576 | {:used 16674024, :max 138412032, :init 24317952, :committed 24317952},
1577 | :HeapMemoryUsage
1578 | {:used 18619064, :max 85393408, :init 0, :committed 83230720}}
1579 |
1580 | Can't I just have *all* the attributes in a Clojure map?
1581 |
1582 | (jmx/mbean "java.lang:type=Memory")
1583 | -> {:NonHeapMemoryUsage
1584 | {:used 16674024, :max 138412032, :init 24317952, :committed 24317952},
1585 | :HeapMemoryUsage
1586 | {:used 18619064, :max 85393408, :init 0, :committed 83230720},
1587 | :ObjectPendingFinalizationCount 0,
1588 | :Verbose false}
1589 |
1590 | Can I find and invoke an operation?
1591 |
1592 | (jmx/operation-names "java.lang:type=Memory")
1593 | -> (:gc)
1594 | (jmx/invoke "java.lang:type=Memory" :gc)
1595 | -> nil
1596 |
1597 | What about some other process? Just run *any* of the above code
1598 | inside a with-connection:
1599 |
1600 | (jmx/with-connection {:host "localhost", :port 3000}
1601 | (jmx/mbean "java.lang:type=Memory"))
1602 | -> {:ObjectPendingFinalizationCount 0,
1603 | :HeapMemoryUsage ... etc.}
1604 |
1605 | Can I serve my own beans? Sure, just drop a Clojure ref
1606 | into an instance of clojure.java.jmx.Bean, and the bean
1607 | will expose read-only attributes for every key/value pair
1608 | in the ref:
1609 |
1610 | (jmx/register-mbean
1611 | (create-bean
1612 | (ref {:string-attribute "a-string"}))
1613 | "my.namespace:name=Value")
1614 |
1615 |
1616 | Efficient, functional algorithms for generating lazy 1627 | sequences for common combinatorial functions. (See the source code 1628 | for a longer description.)1629 | 1630 | 1631 |
Math functions that deal intelligently with the various 1642 | types in Clojure's numeric tower, as well as math functions 1643 | commonly found in Scheme implementations. 1644 | 1645 | expt - (expt x y) is x to the yth power, returns an exact number 1646 | if the base is an exact number, and the power is an integer, 1647 | otherwise returns a double. 1648 | abs - (abs n) is the absolute value of n 1649 | gcd - (gcd m n) returns the greatest common divisor of m and n 1650 | lcm - (lcm m n) returns the least common multiple of m and n 1651 | 1652 | When floor, ceil, and round are passed doubles, we just defer to 1653 | the corresponding functions in Java's Math library. Java's 1654 | behavior is somewhat strange (floor and ceil return doubles rather 1655 | than integers, and round on large doubles yields spurious results) 1656 | but it seems best to match Java's semantics. On exact numbers 1657 | (ratios and decimals), we can have cleaner semantics. 1658 | 1659 | floor - (floor n) returns the greatest integer less than or equal to n. 1660 | If n is an exact number, floor returns an integer, 1661 | otherwise a double. 1662 | ceil - (ceil n) returns the least integer greater than or equal to n. 1663 | If n is an exact number, ceil returns an integer, 1664 | otherwise a double. 1665 | round - (round n) rounds to the nearest integer. 1666 | round always returns an integer. round rounds up for values 1667 | exactly in between two integers. 1668 | 1669 | 1670 | sqrt - Implements the sqrt behavior I'm accustomed to from PLT Scheme, 1671 | specifically, if the input is an exact number, and is a square 1672 | of an exact number, the output will be exact. The downside 1673 | is that for the common case (inexact square root), some extra 1674 | computation is done to look for an exact square root first. 1675 | So if you need blazingly fast square root performance, and you 1676 | know you're just going to need a double result, you're better 1677 | off calling java's Math/sqrt, or alternatively, you could just 1678 | convert your input to a double before calling this sqrt function. 1679 | If Clojure ever gets complex numbers, then this function will 1680 | need to be updated (so negative inputs yield complex outputs). 1681 | exact-integer-sqrt - Implements a math function from the R6RS Scheme 1682 | standard. (exact-integer-sqrt k) where k is a non-negative integer, 1683 | returns [s r] where k = s^2+r and k < (s+1)^2. In other words, it 1684 | returns the floor of the square root and the "remainder".1685 | 1686 | 1687 |
Analyzer for clojure code, host agnostic. 1717 | 1718 | Entry point: 1719 | * analyze 1720 | 1721 | Platform implementers must provide dynamic bindings for: 1722 | * macroexpand-1 1723 | * parse 1724 | * create-var 1725 | * var? 1726 | 1727 | Setting up the global env is also required, see clojure.tools.analyzer.env 1728 | 1729 | See clojure.tools.analyzer.core-test for an example on how to setup the analyzer.1730 | 1731 | 1732 |
Utilities for AST walking/updating1736 | 1737 | 1738 |
Utilities for querying tools.analyzer ASTs with Datomic1742 | 1743 | 1744 |
Utilities for pass scheduling1754 | 1755 | 1756 |
Analyzer for clojurescript code, extends tools.analyzer with JS specific passes/forms1833 | 1834 | 1835 |
Analyzer for clojure code, extends tools.analyzer with JVM specific passes/forms1888 | 1889 | 1890 |
Tools for working with command line arguments.1997 | 1998 | 1999 |
Logging macros which delegate to a specific logging implementation. At 2029 | runtime a specific implementation is selected from, in order, slf4j, 2030 | Apache commons-logging, log4j, and finally java.util.logging. 2031 | 2032 | The logging implementation can be expliticly determined by using 2033 | binding or alter-var-root to change the value of *logger-factory* to 2034 | another implementation of clojure.tools.logging.impl/LoggerFactory 2035 | (see also the *-factory functions in the impl namespace).2036 | 2037 | 2038 |
Protocols used to allow access to logging implementations. 2042 | This namespace only need be used by those providing logging 2043 | implementations to be consumed by the core api.2044 | 2045 | 2046 |
Local macros and symbol macros 2057 | 2058 | Local macros are defined by a macrolet form. They are usable only 2059 | inside its body. Symbol macros can be defined globally 2060 | (defsymbolmacro) or locally (symbol-macrolet). A symbol 2061 | macro defines a form that replaces a symbol during macro 2062 | expansion. Function arguments and symbols bound in let 2063 | forms are not subject to symbol macro expansion. 2064 | 2065 | Local macros are most useful in the definition of the expansion 2066 | of another macro, they may be used anywhere. Global symbol 2067 | macros can be used only inside a with-symbol-macros form.2068 | 2069 | 2070 |
This namespace is DEPRECATED; most functions have been moved to 2081 | other namespaces2082 | 2083 | 2084 |
Bidirectional graphs of dependencies and dependent objects.2088 | 2089 | 2090 |
Track namespace dependencies and changes by monitoring 2094 | file-modification timestamps2095 | 2096 | 2097 |
Read and track namespace information from files2101 | 2102 | 2103 |
Search for namespace declarations in directories and JAR files.2107 | 2108 | 2109 |
Refactoring tool to move a Clojure namespace from one name/file to 2113 | another, and update all references to that namespace in your other 2114 | Clojure source files. 2115 | 2116 | WARNING: This code is ALPHA and subject to change. It also modifies 2117 | and deletes your source files! Make sure you have a backup or 2118 | version control.2119 | 2120 | 2121 |
Parse Clojure namespace (ns) declarations and extract 2125 | dependencies.2126 | 2127 | 2128 |
Force reloading namespaces on demand or through a 2132 | dependency tracker2133 | 2134 | 2135 |
REPL utilities for working with namespaces2139 | 2140 | 2141 |
Dependency tracker which can compute which namespaces need to be 2145 | reloaded after files have changed. This is the low-level 2146 | implementation that requires you to find the namespace dependencies 2147 | yourself: most uses will interact with the wrappers in 2148 | clojure.tools.namespace.file and clojure.tools.namespace.dir or the 2149 | public API in clojure.tools.namespace.repl.2150 | 2151 | 2152 |
High level nREPL client support.2163 | 2164 | 2165 |
A netstring and bencode implementation for Clojure.2175 | 2176 | 2177 |
A proof-of-concept command-line client for nREPL. Please see 2181 | e.g. reply for a proper command-line nREPL client @ 2182 | https://github.com/trptcolin/reply/2183 | 2184 | 2185 |
Support for persistent, cross-connection REPL sessions.2219 | 2220 | 2221 |
Misc utilities used in nREPL's implementation (potentially also useful 2225 | for anyone extending it).2226 | 2227 | 2228 |
Default server implementations2232 | 2233 | 2234 |
A clojure reader in clojure2251 | 2252 | 2253 |
An EDN reader in clojure2263 | 2264 | 2265 |
This file defines simple tracing macros to help you see what your code is doing.2294 | 2295 | 2296 |