diff --git a/Makefile b/Makefile index f857a332..8dd16e61 100644 --- a/Makefile +++ b/Makefile @@ -95,3 +95,9 @@ clean: clean_pxic rm -rf ./externals rm -f ./pixie-vm rm -f ./*.pyc + +gen_docs: + ./pixie-vm pixie/generate-docs.pxi pixie.stdlib > docs/pixie.stdlib.rst + ./pixie-vm pixie/generate-docs.pxi pixie.io > docs/pixie.io.rst + ./pixie-vm pixie/generate-docs.pxi pixie.streams > docs/pixie.streams.rst + ./pixie-vm pixie/generate-docs.pxi pixie.string > docs/pixie.string.rst diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..ef6b1ac6 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,20 @@ +Pixie API Documentation +======================= + + +Contents: + +.. toctree:: + :maxdepth: 2 + :glob: + + * + + +Indicies and tables +================== + +* :ref:`pixie.stdlib` +* :ref:`pixie.io` +* :ref:`pixie.streams` +* :ref:`pixie.string` diff --git a/docs/pixie.io.rst b/docs/pixie.io.rst new file mode 100644 index 00000000..2d1b6223 --- /dev/null +++ b/docs/pixie.io.rst @@ -0,0 +1,357 @@ +============================================================================ +pixie.io +============================================================================ + + +->BufferedInputStream +---------------------------------------------------------------------------- + + + + + + + +->BufferedOutputStream +---------------------------------------------------------------------------- + + + + + + + +->FileOutputStream +---------------------------------------------------------------------------- + + + + + + + +->FileStream +---------------------------------------------------------------------------- + + + + + + + +BufferedInputStream +---------------------------------------------------------------------------- + + + + + + + +BufferedOutputStream +---------------------------------------------------------------------------- + + + + + + + +FileOutputStream +---------------------------------------------------------------------------- + + + + + + + +FileStream +---------------------------------------------------------------------------- + + + + + + + +IByteInputStream +---------------------------------------------------------------------------- + + + + + + + +IByteOutputStream +---------------------------------------------------------------------------- + + + + + + + +IFlushableStream +---------------------------------------------------------------------------- + + + + + + + +IInputStream +---------------------------------------------------------------------------- + + + + + + + +IOutputStream +---------------------------------------------------------------------------- + + + + + + + +ISeekableStream +---------------------------------------------------------------------------- + + + + + + + +buffered-input-stream +---------------------------------------------------------------------------- + + + + + + + +buffered-output-stream +---------------------------------------------------------------------------- + + + + + + + +buffered-read-line +---------------------------------------------------------------------------- + + + + + + + +flush +---------------------------------------------------------------------------- + + + + + + + +fs_close +---------------------------------------------------------------------------- + + + + + + + +fs_open +---------------------------------------------------------------------------- + + + + + + + +fs_read +---------------------------------------------------------------------------- + + + + + + + +fs_write +---------------------------------------------------------------------------- + + + + + + + +line-seq +---------------------------------------------------------------------------- + + +Returns the lines of text from input-stream as a lazy sequence of strings. + input-stream must implement IInputStream + + + + + +open-read +---------------------------------------------------------------------------- + + +Open a file for reading, returning a IInputStream + + + + + +open-write +---------------------------------------------------------------------------- + + +Open a file for writing, returning a IOutputStream + + + + + +position +---------------------------------------------------------------------------- + + + + + + + +read +---------------------------------------------------------------------------- + + + + + + + +read-byte +---------------------------------------------------------------------------- + + + + + + + +read-line +---------------------------------------------------------------------------- + + +Read one line from input-stream for each invocation. + nil when all lines have been read. + Pass a BufferedInputStream for best performance. + + + + + +rewind +---------------------------------------------------------------------------- + + + + + + + +run-command +---------------------------------------------------------------------------- + + + + + + + +seek +---------------------------------------------------------------------------- + + + + + + + +slurp +---------------------------------------------------------------------------- + + +Reads in the contents of input. Input must be a filename or an IInputStream + + + + + +spit +---------------------------------------------------------------------------- + + +Writes the content to output. Output must be a file or an IOutputStream. + + + + + +throw-on-error +---------------------------------------------------------------------------- + + + + + + + +unbuffered-read-line +---------------------------------------------------------------------------- + + + + + + + +write +---------------------------------------------------------------------------- + + + + + + + +write-byte +---------------------------------------------------------------------------- + + + + + + + + diff --git a/docs/pixie.stdlib.rst b/docs/pixie.stdlib.rst new file mode 100644 index 00000000..683747fd --- /dev/null +++ b/docs/pixie.stdlib.rst @@ -0,0 +1,4794 @@ +============================================================================ +pixie.stdlib +============================================================================ + + + +---------------------------------------------------------------------------- + + + + + + + +* +---------------------------------------------------------------------------- + + + + + + + +*1 +---------------------------------------------------------------------------- + + + + + + + +*2 +---------------------------------------------------------------------------- + + + + + + + +*3 +---------------------------------------------------------------------------- + + + + + + + +*e +---------------------------------------------------------------------------- + + + + + + + +*fn-name* +---------------------------------------------------------------------------- + + + + + + + +*ns* +---------------------------------------------------------------------------- + + + + + + + +*pxic-writer* +---------------------------------------------------------------------------- + + + + + + + +*reading-form* +---------------------------------------------------------------------------- + + + + + + + ++ +---------------------------------------------------------------------------- + + +Adds the arguments, returning 0 if no arguments + + + + + +- +---------------------------------------------------------------------------- + + + + + + + +-> +---------------------------------------------------------------------------- + + +Threads `x` through `forms`, passing the result of one step as the first argument of the next. + + + + + +->> +---------------------------------------------------------------------------- + + +Threads `x` through `forms`, passing the result of one step as the last argument of the next. + + + + + +->MultiMethod +---------------------------------------------------------------------------- + + + + + + + +->Range +---------------------------------------------------------------------------- + + + + + + + +->Unknown +---------------------------------------------------------------------------- + + + + + + + +-acquire-lock +---------------------------------------------------------------------------- + + + + + + + +-acquire-lock-timed +---------------------------------------------------------------------------- + + + + + + + +-add +---------------------------------------------------------------------------- + + + + + + + +-assoc +---------------------------------------------------------------------------- + + + + + + + +-call-method +---------------------------------------------------------------------------- + + + + + + + +-compare +---------------------------------------------------------------------------- + + + + + + + +-conj +---------------------------------------------------------------------------- + + + + + + + +-conj! +---------------------------------------------------------------------------- + + + + + + + +-contains-key +---------------------------------------------------------------------------- + + + + + + + +-count +---------------------------------------------------------------------------- + + + + + + + +-create-lock +---------------------------------------------------------------------------- + + + + + + + +-deref +---------------------------------------------------------------------------- + + + + + + + +-disj +---------------------------------------------------------------------------- + + + + + + + +-dispose! +---------------------------------------------------------------------------- + + + + + + + +-dissoc +---------------------------------------------------------------------------- + + + + + + + +-div +---------------------------------------------------------------------------- + + + + + + + +-doc +---------------------------------------------------------------------------- + + + + + + + +-empty +---------------------------------------------------------------------------- + + + + + + + +-eq +---------------------------------------------------------------------------- + + + + + + + +-finalize! +---------------------------------------------------------------------------- + + + + + + + +-first +---------------------------------------------------------------------------- + + + + + + + +-get-attr +---------------------------------------------------------------------------- + + + + + + + +-get-current-var-frames +---------------------------------------------------------------------------- + + + + + + + +-gt +---------------------------------------------------------------------------- + + + + + + + +-gte +---------------------------------------------------------------------------- + + + + + + + +-hash +---------------------------------------------------------------------------- + + + + + + + +-instance? +---------------------------------------------------------------------------- + + + + + + + +-invoke +---------------------------------------------------------------------------- + + + + + + + +-key +---------------------------------------------------------------------------- + + + + + + + +-lt +---------------------------------------------------------------------------- + + + + + + + +-lte +---------------------------------------------------------------------------- + + + + + + + +-make-record-assoc-body +---------------------------------------------------------------------------- + + + + + + + +-merge-sort-split +---------------------------------------------------------------------------- + + + + + + + +-merge-sort-step +---------------------------------------------------------------------------- + + + + + + + +-meta +---------------------------------------------------------------------------- + + + + + + + +-mul +---------------------------------------------------------------------------- + + + + + + + +-name +---------------------------------------------------------------------------- + + + + + + + +-namespace +---------------------------------------------------------------------------- + + + + + + + +-next +---------------------------------------------------------------------------- + + + + + + + +-nth +---------------------------------------------------------------------------- + + + + + + + +-nth-not-found +---------------------------------------------------------------------------- + + + + + + + +-num-eq +---------------------------------------------------------------------------- + + + + + + + +-persistent! +---------------------------------------------------------------------------- + + + + + + + +-pop +---------------------------------------------------------------------------- + + + + + + + +-pop! +---------------------------------------------------------------------------- + + + + + + + +-push +---------------------------------------------------------------------------- + + + + + + + +-push! +---------------------------------------------------------------------------- + + + + + + + +-push-history +---------------------------------------------------------------------------- + + + + + + + +-quot +---------------------------------------------------------------------------- + + + + + + + +-reduce +---------------------------------------------------------------------------- + + + + + + + +-release-lock +---------------------------------------------------------------------------- + + + + + + + +-rem +---------------------------------------------------------------------------- + + + + + + + +-repr +---------------------------------------------------------------------------- + + + + + + + +-reset! +---------------------------------------------------------------------------- + + + + + + + +-run-finalizers +---------------------------------------------------------------------------- + + + + + + + +-satisfies? +---------------------------------------------------------------------------- + + + + + + + +-seq +---------------------------------------------------------------------------- + + + + + + + +-seq-eq +---------------------------------------------------------------------------- + + + + + + + +-set-*e +---------------------------------------------------------------------------- + + + + + + + +-set-current-var-frames +---------------------------------------------------------------------------- + + + + + + + +-str +---------------------------------------------------------------------------- + + + + + + + +-string-builder +---------------------------------------------------------------------------- + + + + + + + +-sub +---------------------------------------------------------------------------- + + + + + + + +-thread +---------------------------------------------------------------------------- + + + + + + + +-transient +---------------------------------------------------------------------------- + + + + + + + +-try-catch +---------------------------------------------------------------------------- + + + + + + + +-val +---------------------------------------------------------------------------- + + + + + + + +-val-at +---------------------------------------------------------------------------- + + + + + + + +-with-meta +---------------------------------------------------------------------------- + + + + + + + +-yield-thread +---------------------------------------------------------------------------- + + + + + + + +< +---------------------------------------------------------------------------- + + + + + + + +<= +---------------------------------------------------------------------------- + + + + + + + += +---------------------------------------------------------------------------- + + +Returns true if all the arguments are equivalent. Otherwise, returns false. Uses +-eq to perform equality checks. + + + + + +> +---------------------------------------------------------------------------- + + + + + + + +>= +---------------------------------------------------------------------------- + + + + + + + +AbstractMutableCell +---------------------------------------------------------------------------- + + + + + + + +Array +---------------------------------------------------------------------------- + + + + + + + +ArraySeq +---------------------------------------------------------------------------- + + + + + + + +Atom +---------------------------------------------------------------------------- + + + + + + + +BigInteger +---------------------------------------------------------------------------- + + + + + + + +Bool +---------------------------------------------------------------------------- + + + + + + + +Buffer +---------------------------------------------------------------------------- + + + + + + + +ByteArray +---------------------------------------------------------------------------- + + + + + + + +CCharP +---------------------------------------------------------------------------- + + + + + + + +CDouble +---------------------------------------------------------------------------- + + + + + + + +CInt +---------------------------------------------------------------------------- + + + + + + + +CInt16 +---------------------------------------------------------------------------- + + + + + + + +CInt32 +---------------------------------------------------------------------------- + + + + + + + +CInt64 +---------------------------------------------------------------------------- + + + + + + + +CInt8 +---------------------------------------------------------------------------- + + + + + + + +CUInt16 +---------------------------------------------------------------------------- + + + + + + + +CUInt32 +---------------------------------------------------------------------------- + + + + + + + +CUInt64 +---------------------------------------------------------------------------- + + + + + + + +CUInt8 +---------------------------------------------------------------------------- + + + + + + + +CVoid +---------------------------------------------------------------------------- + + + + + + + +CVoidP +---------------------------------------------------------------------------- + + + + + + + +Character +---------------------------------------------------------------------------- + + + + + + + +Closure +---------------------------------------------------------------------------- + + + + + + + +Code +---------------------------------------------------------------------------- + + + + + + + +Cons +---------------------------------------------------------------------------- + + + + + + + +DoublePolymorphicFn +---------------------------------------------------------------------------- + + + + + + + +EmptyList +---------------------------------------------------------------------------- + + + + + + + +Environment +---------------------------------------------------------------------------- + + + + + + + +ErrorInfo +---------------------------------------------------------------------------- + + + + + + + +ExternalLib +---------------------------------------------------------------------------- + + + + + + + +FFIFn +---------------------------------------------------------------------------- + + + + + + + +Float +---------------------------------------------------------------------------- + + + + + + + +Foo +---------------------------------------------------------------------------- + + + + + + + +HashingState +---------------------------------------------------------------------------- + + + + + + + +IAssociative +---------------------------------------------------------------------------- + + + + + + + +IComparable +---------------------------------------------------------------------------- + + + + + + + +ICounted +---------------------------------------------------------------------------- + + + + + + + +IDeref +---------------------------------------------------------------------------- + + + + + + + +IDisposable +---------------------------------------------------------------------------- + + + + + + + +IDoc +---------------------------------------------------------------------------- + + + + + + + +IEmpty +---------------------------------------------------------------------------- + + + + + + + +IFinalize +---------------------------------------------------------------------------- + + + + + + + +IFn +---------------------------------------------------------------------------- + + + + + + + +IIndexed +---------------------------------------------------------------------------- + + + + + + + +ILookup +---------------------------------------------------------------------------- + + + + + + + +IMap +---------------------------------------------------------------------------- + + + + + + + +IMapEntry +---------------------------------------------------------------------------- + + + + + + + +IMath +---------------------------------------------------------------------------- + + + + + + + +IMessageObject +---------------------------------------------------------------------------- + + + + + + + +IMeta +---------------------------------------------------------------------------- + + + + + + + +INamed +---------------------------------------------------------------------------- + + + + + + + +INode +---------------------------------------------------------------------------- + + + + + + + +IObject +---------------------------------------------------------------------------- + + + + + + + +IPersistentCollection +---------------------------------------------------------------------------- + + + + + + + +IReduce +---------------------------------------------------------------------------- + + + + + + + +IReset +---------------------------------------------------------------------------- + + + + + + + +ISeq +---------------------------------------------------------------------------- + + + + + + + +ISeqable +---------------------------------------------------------------------------- + + + + + + + +IStack +---------------------------------------------------------------------------- + + + + + + + +IToTransient +---------------------------------------------------------------------------- + + + + + + + +ITransient +---------------------------------------------------------------------------- + + + + + + + +ITransientCollection +---------------------------------------------------------------------------- + + + + + + + +ITransientStack +---------------------------------------------------------------------------- + + + + + + + +IVector +---------------------------------------------------------------------------- + + + + + + + +Integer +---------------------------------------------------------------------------- + + + + + + + +Keyword +---------------------------------------------------------------------------- + + + + + + + +LazySeq +---------------------------------------------------------------------------- + + + + + + + +LinePromise +---------------------------------------------------------------------------- + + + + + + + +Lock +---------------------------------------------------------------------------- + + + + + + + +MAX-NUMBER +---------------------------------------------------------------------------- + + + + + + + +MapEntry +---------------------------------------------------------------------------- + + + + + + + +MultiArityFn +---------------------------------------------------------------------------- + + + + + + + +MultiMethod +---------------------------------------------------------------------------- + + + + + + + +Namespace +---------------------------------------------------------------------------- + + + + + + + +NativeFn +---------------------------------------------------------------------------- + + + + + + + +Nil +---------------------------------------------------------------------------- + + + + + + + +Number +---------------------------------------------------------------------------- + + + + + + + +Object +---------------------------------------------------------------------------- + + + + + + + +PersistentHashMap +---------------------------------------------------------------------------- + + + + + + + +PersistentHashSet +---------------------------------------------------------------------------- + + + + + + + +PersistentList +---------------------------------------------------------------------------- + + + + + + + +PersistentVector +---------------------------------------------------------------------------- + + + + + + + +PersistentVectorNode +---------------------------------------------------------------------------- + + + + + + + +PolymorphicFn +---------------------------------------------------------------------------- + + + + + + + +Protocol +---------------------------------------------------------------------------- + + + + + + + +Range +---------------------------------------------------------------------------- + + + + + + + +Ratio +---------------------------------------------------------------------------- + + + + + + + +Reduced +---------------------------------------------------------------------------- + + + + + + + +RuntimeException +---------------------------------------------------------------------------- + + + + + + + +ShallowContinuation +---------------------------------------------------------------------------- + + + + + + + +String +---------------------------------------------------------------------------- + + + + + + + +StringBuilder +---------------------------------------------------------------------------- + + + + + + + +StringReader +---------------------------------------------------------------------------- + + + + + + + +Symbol +---------------------------------------------------------------------------- + + + + + + + +TransientVector +---------------------------------------------------------------------------- + + + + + + + +Type +---------------------------------------------------------------------------- + + + + + + + +Undefined +---------------------------------------------------------------------------- + + + + + + + +Unknown +---------------------------------------------------------------------------- + + + + + + + +Var +---------------------------------------------------------------------------- + + + + + + + +VariadicCode +---------------------------------------------------------------------------- + + + + + + + +WriterBox +---------------------------------------------------------------------------- + + + + + + + +abs +---------------------------------------------------------------------------- + + +Returns the absolute value of x. + + + + + +aconcat +---------------------------------------------------------------------------- + + + + + + + +add-exception-info +---------------------------------------------------------------------------- + + + + + + + +add-marshall-handlers +---------------------------------------------------------------------------- + + + + + + + +aget +---------------------------------------------------------------------------- + + + + + + + +alength +---------------------------------------------------------------------------- + + + + + + + +and +---------------------------------------------------------------------------- + + +Check if the given expressions return truthy values, returning the last, or false. + + + + + +apply +---------------------------------------------------------------------------- + + + + + + + +aset +---------------------------------------------------------------------------- + + + + + + + +aslice +---------------------------------------------------------------------------- + + + + + + + +assert +---------------------------------------------------------------------------- + + + + + + + +assoc +---------------------------------------------------------------------------- + + +Associates the key with the value in the collection + + + + + +assoc-in +---------------------------------------------------------------------------- + + +Associate a value in a nested collection given by the path. + +Creates new maps if the keys are not present. + + + + + +atan2 +---------------------------------------------------------------------------- + + + + + + + +atom +---------------------------------------------------------------------------- + + + + + + + +binding +---------------------------------------------------------------------------- + + + + + + + +bit-and +---------------------------------------------------------------------------- + + + + + + + +bit-and-not +---------------------------------------------------------------------------- + + + + + + + +bit-clear +---------------------------------------------------------------------------- + + + + + + + +bit-flip +---------------------------------------------------------------------------- + + + + + + + +bit-not +---------------------------------------------------------------------------- + + + + + + + +bit-or +---------------------------------------------------------------------------- + + + + + + + +bit-set +---------------------------------------------------------------------------- + + + + + + + +bit-shift-left +---------------------------------------------------------------------------- + + + + + + + +bit-shift-right +---------------------------------------------------------------------------- + + + + + + + +bit-str +---------------------------------------------------------------------------- + + + + + + + +bit-test +---------------------------------------------------------------------------- + + + + + + + +bit-xor +---------------------------------------------------------------------------- + + + + + + + +bool? +---------------------------------------------------------------------------- + + + + + + + +buffer +---------------------------------------------------------------------------- + + + + + + + +buffer-capacity +---------------------------------------------------------------------------- + + + + + + + +butlast +---------------------------------------------------------------------------- + + +Returns all elements but the last from the collection. + + + + + +byte-array +---------------------------------------------------------------------------- + + + + + + + +case +---------------------------------------------------------------------------- + + +Takes an expression and a number of two-form clauses. +Checks for each clause if the first part is equal to the expression. +If yes, returns the value of the second part. + +The first part of each clause can also be a set. If that is the case, the clause matches when the result of the expression is in the set. + +If the number of arguments is odd and no clause matches, the last argument is returned. +If the number of arguments is even and no clause matches, throws an exception. + + + + + +cat +---------------------------------------------------------------------------- + + +A transducer that concatenates elements of a collection. + + + + + +char +---------------------------------------------------------------------------- + + + + + + + +char? +---------------------------------------------------------------------------- + + + + + + + +comp +---------------------------------------------------------------------------- + + +Composes the given functions, applying the last function first. + + + + + +compare +---------------------------------------------------------------------------- + + + + + + + +compare-counted +---------------------------------------------------------------------------- + + + + + + + +compare-named +---------------------------------------------------------------------------- + + + + + + + +compare-numbers +---------------------------------------------------------------------------- + + + + + + + +compile-file +---------------------------------------------------------------------------- + + + + + + + +complement +---------------------------------------------------------------------------- + + +Given a function, return a new function which takes the same arguments + but returns the opposite truth value + + + + + +concat +---------------------------------------------------------------------------- + + +Concatenates its arguments. + + + + + +cond +---------------------------------------------------------------------------- + + +Checks if any of the tests is truthy, if so, stops and returns the value of the corresponding body + + + + + +condp +---------------------------------------------------------------------------- + + +Takes a binary predicate, an expression and a number of two-form clauses. +Calls the predicate on the first value of each clause and the expression. +If the result is truthy returns the second value of the clause. + +If the number of arguments is odd and no clause matches, the last argument is returned. +If the number of arguments is even and no clause matches, throws an exception. + + + + + +conj +---------------------------------------------------------------------------- + + +Adds elements to the collection. Elements are added to the end except in the case of Cons lists + + + + + +conj! +---------------------------------------------------------------------------- + + +Adds elements to the transient collection. Elements are added to the end except in the case of Cons lists + + + + + +cons +---------------------------------------------------------------------------- + + + + + + + +constantly +---------------------------------------------------------------------------- + + + + + + + +contains? +---------------------------------------------------------------------------- + + +Checks if there is a value associated with key in the collection. + +Does *not* check for the presence of a value in the collection, only whether +there's a value associated with the key. Use `some` for checking for values. + + + + + +count +---------------------------------------------------------------------------- + + + + + + + +count-rf +---------------------------------------------------------------------------- + + +A Reducing function that counts the items reduced over + + + + + +counted? +---------------------------------------------------------------------------- + + + + + + + +create-type +---------------------------------------------------------------------------- + + + + + + + +dec +---------------------------------------------------------------------------- + + +Decrements x by one + + + + + +declare +---------------------------------------------------------------------------- + + +Forward declare the given variable names, setting them to nil. + + + + + +defmacro +---------------------------------------------------------------------------- + + +Defines a new macro. + + + + + +defmethod +---------------------------------------------------------------------------- + + +Define a method of a multimethod. See `(doc defmulti)` for details. + + + + + +defmulti +---------------------------------------------------------------------------- + + +Define a multimethod, which dispatches to its methods based on dispatch-fn. + + + + + +defn +---------------------------------------------------------------------------- + + +Defines a new function. + + + + + +defn- +---------------------------------------------------------------------------- + + +Define a new non-public function. Otherwise the same as defn + + + + + +defprotocol +---------------------------------------------------------------------------- + + +Define a new protocol. + + + + + +defrecord +---------------------------------------------------------------------------- + + +Define a record type. + +Similar to `deftype`, but supports construction from a map using `map->Type` +and implements IAssociative, ILookup and IObject. + + + + + +deftype +---------------------------------------------------------------------------- + + +Define a custom type. + + + + + +denominator +---------------------------------------------------------------------------- + + + + + + + +deref +---------------------------------------------------------------------------- + + + + + + + +destructure +---------------------------------------------------------------------------- + + + + + + + +destructure-map +---------------------------------------------------------------------------- + + + + + + + +destructure-vector +---------------------------------------------------------------------------- + + + + + + + +disj +---------------------------------------------------------------------------- + + +Removes elements from the collection. + + + + + +dispose! +---------------------------------------------------------------------------- + + +Finalizes use of the object by cleaning up resources used by the object + + + + + +dissoc +---------------------------------------------------------------------------- + + +Removes the value associated with the keys from the collection + + + + + +distinct +---------------------------------------------------------------------------- + + +Returns the distinct elements in the collection. + + + + + +doc +---------------------------------------------------------------------------- + + +Returns the documentation of the given value. + + + + + +doc-ns +---------------------------------------------------------------------------- + + +Prints a summarizing documentation of the symbols in a namespace. + + + + + +doseq +---------------------------------------------------------------------------- + + +Evaluates all elements of the seq, presumably for side effects. Returns nil. + + + + + +dotimes +---------------------------------------------------------------------------- + + +Execute the expressions in the body n times. + + + + + +drop +---------------------------------------------------------------------------- + + +Drops n elements from the start of the collection. + + + + + +drop-while +---------------------------------------------------------------------------- + + +Returns a lazy sequence of the items in coll starting from the + first item for which (pred item) returns logical false. Returns a + stateful transducer when no collection is provided. + + + + + +empty +---------------------------------------------------------------------------- + + +Returns an empty collection of the same type, or nil. + + + + + +empty? +---------------------------------------------------------------------------- + + +returns true if the collection has no items, otherwise false + + + + + +env +---------------------------------------------------------------------------- + + + + + + + +eof +---------------------------------------------------------------------------- + + + + + + + +eq +---------------------------------------------------------------------------- + + + + + + + +eval +---------------------------------------------------------------------------- + + + + + + + +even? +---------------------------------------------------------------------------- + + +Returns true if n is even + + + + + +every? +---------------------------------------------------------------------------- + + +Check if every element of the collection satisfies the predicate. + + + + + +ex-data +---------------------------------------------------------------------------- + + + + + + + +ex-msg +---------------------------------------------------------------------------- + + + + + + + +exit +---------------------------------------------------------------------------- + + + + + + + +extend +---------------------------------------------------------------------------- + + + + + + + +extend-protocol +---------------------------------------------------------------------------- + + +Extend the protocol to the given types. + +Expands to calls to `extend-type`. + + + + + +extend-type +---------------------------------------------------------------------------- + + +Extend the protocols to the given type. + +Expands to calls to `extend`. + + + + + +false? +---------------------------------------------------------------------------- + + + + + + + +ffi-fn +---------------------------------------------------------------------------- + + + + + + + +ffi-library +---------------------------------------------------------------------------- + + + + + + + +ffi-voidp +---------------------------------------------------------------------------- + + + + + + + +filter +---------------------------------------------------------------------------- + + +Filter the collection for elements matching the predicate. + + + + + +finish-hash-state +---------------------------------------------------------------------------- + + + + + + + +first +---------------------------------------------------------------------------- + + +Returns the first item in coll, if coll implements IIndexed nth will be used to retrieve + the item from the collection. + + + + + +flatten +---------------------------------------------------------------------------- + + +Takes any nested combination of ISeqable things, and return their contents as a single, flat sequence. + +Calling this function on something that is not ISeqable returns a seq with that value as its only element. + + + + + +float +---------------------------------------------------------------------------- + + +Converts a number to a float. + + + + + +float? +---------------------------------------------------------------------------- + + + + + + + +floor +---------------------------------------------------------------------------- + + + + + + + +fn +---------------------------------------------------------------------------- + + +Creates a function. + +The following two forms are allowed: + (fn name? [param*] & body) + (fn name? ([param*] & body)+) + +The params can be destructuring bindings, see `(doc let)` for details. + + + + + +fn? +---------------------------------------------------------------------------- + + + + + + + +fnil +---------------------------------------------------------------------------- + + + + + + + +fopen +---------------------------------------------------------------------------- + + + + + + + +for +---------------------------------------------------------------------------- + + +A list comprehension for the bindings. + + + + + +foreach +---------------------------------------------------------------------------- + + + + + + + +fourth +---------------------------------------------------------------------------- + + +Returns the fourth item in coll, if coll implements IIndexed nth will be used to retrieve + the item from the collection. + + + + + +fread +---------------------------------------------------------------------------- + + + + + + + +frequencies +---------------------------------------------------------------------------- + + +Returns a map with distinct elements as keys and the number of occurences as values + + + + + +gensym +---------------------------------------------------------------------------- + + + + + + + +get +---------------------------------------------------------------------------- + + +Get an element from a collection implementing ILookup, return nil or the default value if not found. + + + + + +get-field +---------------------------------------------------------------------------- + + + + + + + +get-in +---------------------------------------------------------------------------- + + +Get a value from a nested collection at the "path" given by the keys. + + + + + +get-val +---------------------------------------------------------------------------- + + + + + + + +getenv +---------------------------------------------------------------------------- + + + + + + + +group-by +---------------------------------------------------------------------------- + + +Groups the collection into a map keyed by the result of applying f on each element. The value at each key is a vector of elements in order of appearance. + + + + + +has-meta? +---------------------------------------------------------------------------- + + + + + + + +hash +---------------------------------------------------------------------------- + + + + + + + +hash-int +---------------------------------------------------------------------------- + + + + + + + +hash-map +---------------------------------------------------------------------------- + + + + + + + +hash-set +---------------------------------------------------------------------------- + + + + + + + +hashmap +---------------------------------------------------------------------------- + + + + + + + +identical? +---------------------------------------------------------------------------- + + + + + + + +identity +---------------------------------------------------------------------------- + + +The identity function. Returns its argument. + + + + + +if-let +---------------------------------------------------------------------------- + + + + + + + +if-not +---------------------------------------------------------------------------- + + + + + + + +in-ns +---------------------------------------------------------------------------- + + + + + + + +inc +---------------------------------------------------------------------------- + + +Increments x by one + + + + + +indexed-reduce +---------------------------------------------------------------------------- + + + + + + + +indexed? +---------------------------------------------------------------------------- + + + + + + + +instance? +---------------------------------------------------------------------------- + + +Checks if x is an instance of t. + + When t is seqable, checks if x is an instance of + any of the types contained therein. + + + + + +int +---------------------------------------------------------------------------- + + +Converts a number to an integer. + + + + + +integer? +---------------------------------------------------------------------------- + + + + + + + +interleave +---------------------------------------------------------------------------- + + +Returns a seq of all the items in the input collections interleaved + + + + + +interpose +---------------------------------------------------------------------------- + + +Returns a transducer that inserts `val` in between elements of a collection. + + + + + +interpreter_code_info +---------------------------------------------------------------------------- + + + + + + + +into +---------------------------------------------------------------------------- + + + + + + + +ith +---------------------------------------------------------------------------- + + +Returns the ith element of the collection, negative values count from the end. + If an index is out of bounds, will throw an Index out of Range exception. + However, if you specify a not-found parameter, it will substitute that instead + + + + + +juxt +---------------------------------------------------------------------------- + + +Returns a function that applies all fns to its arguments, and returns a vector of the results. + + + + + +keep +---------------------------------------------------------------------------- + + + + + + + +key +---------------------------------------------------------------------------- + + + + + + + +keys +---------------------------------------------------------------------------- + + +If called with no arguments returns a transducer that will extract the key from each map entry. If passed + a collection, will assume that it is a hashmap and return a vector of all keys from the collection. + + + + + +keyword +---------------------------------------------------------------------------- + + + + + + + +keyword? +---------------------------------------------------------------------------- + + + + + + + +last +---------------------------------------------------------------------------- + + +Returns the last element of the collection, or nil if none. + + + + + +lazy-seq +---------------------------------------------------------------------------- + + + + + + + +lazy-seq* +---------------------------------------------------------------------------- + + + + + + + +let +---------------------------------------------------------------------------- + + +Makes the bindings availlable in the body. + +The bindings must be a vector of binding-expr pairs. The binding can be a destructuring +binding, as below. + +Vector destructuring: + [x y z] binds the first three elements of the collection to x, y and z + [x y & rest] binds rest to the elements after the first two elements of the collection + [x y :as v] binds the value of the complete collection to v + +Map destructuring: + {a :a, b :b} binds a and b to the values associated with :a and :b + {a :a :as m} binds the value of the complete collection to m + {a :a :or {a 42}} binds a to the value associated with :a, or 42, if not present + {:keys [a b c]} binds a, b and c to the values associated with :a, :b and :c + +All these forms can be combined and nested, in the example below: + +(let [[x y [z :as iv] :as v] [1 2 [3 4 5] 6 7] + {a :a [b c {:keys [d]}] :more :or {a 42}} {:a 1, :more [1 2 {:d 3, :e 4}]}] + ...) + +For more information, see http://clojure.org/special_forms#binding-forms + + + + + +libc +---------------------------------------------------------------------------- + + + + + + + +libedit +---------------------------------------------------------------------------- + + + + + + + +libm +---------------------------------------------------------------------------- + + + + + + + +list +---------------------------------------------------------------------------- + + + + + + + +list? +---------------------------------------------------------------------------- + + + + + + + +load-file +---------------------------------------------------------------------------- + + + + + + + +load-ns +---------------------------------------------------------------------------- + + + + + + + +load-paths +---------------------------------------------------------------------------- + + + + + + + +load-reader +---------------------------------------------------------------------------- + + + + + + + +loop +---------------------------------------------------------------------------- + + + + + + + +lround +---------------------------------------------------------------------------- + + + + + + + +macro? +---------------------------------------------------------------------------- + + + + + + + +macroexpand-1 +---------------------------------------------------------------------------- + + +If form is a macro call, returns the expanded form. Does nothing if not a macro call. + + + + + +make-array +---------------------------------------------------------------------------- + + + + + + + +map +---------------------------------------------------------------------------- + + +map - creates a transducer that applies f to every input element + + + + + +map-entry +---------------------------------------------------------------------------- + + + + + + + +map-invert +---------------------------------------------------------------------------- + + +Returns a map where the vals are mapped to the keys. + + + + + +map? +---------------------------------------------------------------------------- + + + + + + + +mapcat +---------------------------------------------------------------------------- + + +Maps f over the elements of coll and concatenates the result + + + + + +mapv +---------------------------------------------------------------------------- + + + + + + + +max +---------------------------------------------------------------------------- + + +Returns the largest of all the arguments to this function. Assumes arguments are numeric + + + + + +merge +---------------------------------------------------------------------------- + + + + + + + +merge-sort +---------------------------------------------------------------------------- + + + + + + + +merge-with +---------------------------------------------------------------------------- + + + + + + + +meta +---------------------------------------------------------------------------- + + + + + + + +min +---------------------------------------------------------------------------- + + +Returns the smallest of all the arguments to this function. Assumes arguments are numeric + + + + + +name +---------------------------------------------------------------------------- + + + + + + + +namespace +---------------------------------------------------------------------------- + + + + + + + +neg? +---------------------------------------------------------------------------- + + +Returns true if x is less than zero + + + + + +new +---------------------------------------------------------------------------- + + + + + + + +new-hash-state +---------------------------------------------------------------------------- + + + + + + + +new-stacklet +---------------------------------------------------------------------------- + + + + + + + +next +---------------------------------------------------------------------------- + + + + + + + +nil? +---------------------------------------------------------------------------- + + + + + + + +nnext +---------------------------------------------------------------------------- + + +Equivalent to (next (next coll)) + + + + + +not +---------------------------------------------------------------------------- + + +Inverts the input, if a truthy value is supplied, returns false, otherwise +returns true + + + + + +not-empty? +---------------------------------------------------------------------------- + + +returns true if the collection has items, otherwise false + + + + + +not= +---------------------------------------------------------------------------- + + +Returns true if one (or more) of the arguments are not equivalent to the others. Uses +-eq to perform equality checks. + + + + + +ns +---------------------------------------------------------------------------- + + + + + + + +ns-aliases +---------------------------------------------------------------------------- + + + + + + + +ns-map +---------------------------------------------------------------------------- + + + + + + + +nth +---------------------------------------------------------------------------- + + +Returns the element at the idx. If the index is not found it will return an error. + However, if you specify a not-found parameter, it will substitute that instead + + + + + +nth-not-found +---------------------------------------------------------------------------- + + + + + + + +nthnext +---------------------------------------------------------------------------- + + +Returns the result of calling next n times on the collection. + + + + + +number? +---------------------------------------------------------------------------- + + + + + + + +numerator +---------------------------------------------------------------------------- + + + + + + + +odd? +---------------------------------------------------------------------------- + + +Returns true of n is odd + + + + + +or +---------------------------------------------------------------------------- + + +Returns the value of the first expression that returns a truthy value, or false. + + + + + +ordered-hash-reducing-fn +---------------------------------------------------------------------------- + + + + + + + +partial +---------------------------------------------------------------------------- + + + + + + + +partition +---------------------------------------------------------------------------- + + +Separates the collection into collections of size n, starting at the beginning, with an optional step size. + +The last element of the result contains the remaining element, not necessarily of size n if +not enough elements were present. + + + + + +partitionf +---------------------------------------------------------------------------- + + +A generalized version of partition. Instead of taking a constant number of elements, + this function calls f with the remaining collection to determine how many elements to + take. + + + + + +persistent! +---------------------------------------------------------------------------- + + + + + + + +pop +---------------------------------------------------------------------------- + + +Pops elements off a stack. + + + + + +pop! +---------------------------------------------------------------------------- + + +Pops elements off a transient stack. + + + + + +pop-binding-frame! +---------------------------------------------------------------------------- + + + + + + + +pos? +---------------------------------------------------------------------------- + + +Returns true if x is greater than zero + + + + + +pr +---------------------------------------------------------------------------- + + +Prints the arguments using -repr, separated by spaces. + + + + + +pr-str +---------------------------------------------------------------------------- + + +Formats the arguments using -repr, separated by spaces, returning a string. + + + + + +preserving-reduced +---------------------------------------------------------------------------- + + + + + + + +print +---------------------------------------------------------------------------- + + +Prints the arguments, seperated by spaces. + + + + + +printf +---------------------------------------------------------------------------- + + + + + + + +println +---------------------------------------------------------------------------- + + +Prints the arguments, separated by spaces, with a newline at the end. + + + + + +prn +---------------------------------------------------------------------------- + + +Prints the arguments using -repr, separated by spaces, with a newline at the end. + + + + + +program-arguments +---------------------------------------------------------------------------- + + + + + + + +promote +---------------------------------------------------------------------------- + + + + + + + +protocol? +---------------------------------------------------------------------------- + + + + + + + +pst +---------------------------------------------------------------------------- + + +Prints the trace of a Runtime Exception if given, or the last Runtime Exception in *e + + + + + +push +---------------------------------------------------------------------------- + + +Push an element on to a stack. + + + + + +push! +---------------------------------------------------------------------------- + + +Push an element on to a transient stack. + + + + + +push-binding-frame! +---------------------------------------------------------------------------- + + + + + + + +puts +---------------------------------------------------------------------------- + + + + + + + +quot +---------------------------------------------------------------------------- + + + + + + + +rand +---------------------------------------------------------------------------- + + + + + + + +rand-int +---------------------------------------------------------------------------- + + +random integer between 0 (inclusive) and n (exclusive) + + + + + +range +---------------------------------------------------------------------------- + + +Returns a range of numbers. + + + + + +ratio? +---------------------------------------------------------------------------- + + + + + + + +read +---------------------------------------------------------------------------- + + + + + + + +read-string +---------------------------------------------------------------------------- + + + + + + + +reader-fn +---------------------------------------------------------------------------- + + + + + + + +readline +---------------------------------------------------------------------------- + + + + + + + +reduce +---------------------------------------------------------------------------- + + + + + + + +reduced +---------------------------------------------------------------------------- + + + + + + + +reduced? +---------------------------------------------------------------------------- + + + + + + + +refer +---------------------------------------------------------------------------- + + +Refer to the specified vars from a namespace directly. + +Supported filters: + :rename refer to the given vars under a different name + :exclude don't refer the given vars + :refer + :all refer all vars + :refer refer only the given vars + :only same as refer + +user => (refer 'pixie.string :refer :all) +user => (refer 'pixie.string :only '(index-of starts-with? ends-with?)) +user => (refer 'pixie.string :rename '{index-of find}) +user => (refer 'pixie.string :exclude '(substring)) + + + + + +refer-ns +---------------------------------------------------------------------------- + + + + + + + +refer-symbol +---------------------------------------------------------------------------- + + + + + + + +rem +---------------------------------------------------------------------------- + + + + + + + +remove +---------------------------------------------------------------------------- + + +Removes any element from the collection which matches the predicate. The complement of filter. + + + + + +repeat +---------------------------------------------------------------------------- + + + + + + + +repeatedly +---------------------------------------------------------------------------- + + +Returns a lazy seq that contains the return values of repeated calls to f. + + Yields an infinite seq with one argument. + With two arguments n specifies the number of elements. + + + + + +require +---------------------------------------------------------------------------- + + + + + + + +reset! +---------------------------------------------------------------------------- + + + + + + + +resolve +---------------------------------------------------------------------------- + + +Resolve the var associated with the symbol in the current namespace. + + + + + +resolve-in +---------------------------------------------------------------------------- + + + + + + + +rest +---------------------------------------------------------------------------- + + + + + + + +reverse +---------------------------------------------------------------------------- + + + + + + + +satisfies? +---------------------------------------------------------------------------- + + +Checks if x satisfies the protocol p. + + When p is seqable, checks if x satisfies all of + the protocols contained therein. + + + + + +satisfy +---------------------------------------------------------------------------- + + + + + + + +second +---------------------------------------------------------------------------- + + +Returns the second item in coll, if coll implements IIndexed nth will be used to retrieve + the item from the collection. + + + + + +select-keys +---------------------------------------------------------------------------- + + +Produces a map with only the values in m contained in key-seq + + + + + +seq +---------------------------------------------------------------------------- + + + + + + + +seq-reduce +---------------------------------------------------------------------------- + + + + + + + +seq? +---------------------------------------------------------------------------- + + + + + + + +set +---------------------------------------------------------------------------- + + + + + + + +set! +---------------------------------------------------------------------------- + + + + + + + +set-buffer-count! +---------------------------------------------------------------------------- + + + + + + + +set-dynamic! +---------------------------------------------------------------------------- + + + + + + + +set-field! +---------------------------------------------------------------------------- + + + + + + + +set-macro! +---------------------------------------------------------------------------- + + + + + + + +set? +---------------------------------------------------------------------------- + + + + + + + +sh +---------------------------------------------------------------------------- + + + + + + + +some +---------------------------------------------------------------------------- + + +Returns the first true value of the predicate for the elements of the collection. + + + + + +some? +---------------------------------------------------------------------------- + + + + + + + +sort +---------------------------------------------------------------------------- + + + + + + + +sort-by +---------------------------------------------------------------------------- + + + + + + + +split-at +---------------------------------------------------------------------------- + + +Returns a vector of the first n elements of the collection, and the remaining elements. + + + + + +srand +---------------------------------------------------------------------------- + + + + + + + +str +---------------------------------------------------------------------------- + + + + + + + +string-builder +---------------------------------------------------------------------------- + + +Creates a reducing function that builds a string based on calling str on the transduced collection + + + + + +string? +---------------------------------------------------------------------------- + + + + + + + +subs +---------------------------------------------------------------------------- + + + + + + + +swap! +---------------------------------------------------------------------------- + + +Swaps the value in the atom, by applying f to the current value. + +The new value is thus `(apply f current-value-of-atom args)`. + + + + + +symbol +---------------------------------------------------------------------------- + + + + + + + +symbol? +---------------------------------------------------------------------------- + + + + + + + +take +---------------------------------------------------------------------------- + + +Takes n elements from the collection, or fewer, if not enough. + + + + + +take-nth +---------------------------------------------------------------------------- + + +Returns a lazy seq of every nth item in coll. Returns a stateful + transducer when no collection is provided. + + + + + +take-while +---------------------------------------------------------------------------- + + +Returns a lazy sequence of successive items from coll while + (pred item) returns true. pred must be free of side-effects. + Returns a transducer when no collection is provided. + + + + + +the-ns +---------------------------------------------------------------------------- + + + + + + + +third +---------------------------------------------------------------------------- + + +Returns the third item in coll, if coll implements IIndexed nth will be used to retrieve + the item from the collection. + + + + + +throw +---------------------------------------------------------------------------- + + + + + + + +trace +---------------------------------------------------------------------------- + + +Returns a seq of the trace of a Runtime Exception or the last Runtime Exception in *e + + + + + +transduce +---------------------------------------------------------------------------- + + + + + + + +transient +---------------------------------------------------------------------------- + + + + + + + +tree-seq +---------------------------------------------------------------------------- + + +Returns a lazy sequence of the nodes in a tree via a depth-first walk. +branch? - fn of node that should true when node has children +children - fn of node that should return a sequence of children (called if branch? true) +root - root node of the tree + + + + + +true? +---------------------------------------------------------------------------- + + + + + + + +try +---------------------------------------------------------------------------- + + + + + + + +type +---------------------------------------------------------------------------- + + + + + + + +type-by-name +---------------------------------------------------------------------------- + + + + + + + +undefined? +---------------------------------------------------------------------------- + + + + + + + +unknown +---------------------------------------------------------------------------- + + + + + + + +unordered-hash-reducing-fn +---------------------------------------------------------------------------- + + + + + + + +unsigned-bit-shift-right +---------------------------------------------------------------------------- + + + + + + + +update-hash-ordered! +---------------------------------------------------------------------------- + + + + + + + +update-hash-unordered! +---------------------------------------------------------------------------- + + + + + + + +update-in +---------------------------------------------------------------------------- + + +Update a value in a nested collection. + + + + + +use +---------------------------------------------------------------------------- + + + + + + + +using +---------------------------------------------------------------------------- + + + + + + + +val +---------------------------------------------------------------------------- + + + + + + + +vals +---------------------------------------------------------------------------- + + +If called with no arguments returns a transducer that will extract the key from each map entry. If passed + a collection, will assume that it is a hashmap and return a vector of all keys from the collection. + + + + + +vec +---------------------------------------------------------------------------- + + +Converts a reducable collection into a vector using the (optional) transducer. + + + + + +vector +---------------------------------------------------------------------------- + + + + + + + +vector? +---------------------------------------------------------------------------- + + + + + + + +when +---------------------------------------------------------------------------- + + + + + + + +when-let +---------------------------------------------------------------------------- + + + + + + + +when-not +---------------------------------------------------------------------------- + + + + + + + +while +---------------------------------------------------------------------------- + + +Repeatedly executes body while test expression is true. Presumes + some side-effect will cause test to become false/nil. Returns nil + + + + + +with-meta +---------------------------------------------------------------------------- + + + + + + + +zero? +---------------------------------------------------------------------------- + + +Returns true if x is equal to zero + + + + + +zipmap +---------------------------------------------------------------------------- + + + + + + + + diff --git a/docs/pixie.streams.rst b/docs/pixie.streams.rst new file mode 100644 index 00000000..36939b1d --- /dev/null +++ b/docs/pixie.streams.rst @@ -0,0 +1,132 @@ +============================================================================ +pixie.streams +============================================================================ + + +IByteInputStream +---------------------------------------------------------------------------- + + + + + + + +IByteOutputStream +---------------------------------------------------------------------------- + + + + + + + +IFlushableStream +---------------------------------------------------------------------------- + + + + + + + +IInputStream +---------------------------------------------------------------------------- + + + + + + + +IOutputStream +---------------------------------------------------------------------------- + + + + + + + +ISeekableStream +---------------------------------------------------------------------------- + + + + + + + +flush +---------------------------------------------------------------------------- + + + + + + + +position +---------------------------------------------------------------------------- + + + + + + + +read +---------------------------------------------------------------------------- + + + + + + + +read-byte +---------------------------------------------------------------------------- + + + + + + + +rewind +---------------------------------------------------------------------------- + + + + + + + +seek +---------------------------------------------------------------------------- + + + + + + + +write +---------------------------------------------------------------------------- + + + + + + + +write-byte +---------------------------------------------------------------------------- + + + + + + + + diff --git a/docs/pixie.string.rst b/docs/pixie.string.rst new file mode 100644 index 00000000..178cd313 --- /dev/null +++ b/docs/pixie.string.rst @@ -0,0 +1,270 @@ +============================================================================ +pixie.string +============================================================================ + + +blank? +---------------------------------------------------------------------------- + + +True if s is nil, empty, or contains only whitespace. + + + + + +capitalize +---------------------------------------------------------------------------- + + + + + + + +digits +---------------------------------------------------------------------------- + + + + + + + +ends-with? +---------------------------------------------------------------------------- + + + + + + + +escape +---------------------------------------------------------------------------- + + +Return a new string, using cmap to escape each character ch + from s as follows: + + If (cmap ch) is nil, append ch to the new string. + If (cmap ch) is non-nil, append (str (cmap ch)) instead. + + + + + +hexdigits +---------------------------------------------------------------------------- + + + + + + + +index-of +---------------------------------------------------------------------------- + + + + + + + +interp +---------------------------------------------------------------------------- + + +String interpolation. + + + + + +join +---------------------------------------------------------------------------- + + +Join the elements of the collection using an optional separator + + + + + +letters +---------------------------------------------------------------------------- + + + + + + + +lower +---------------------------------------------------------------------------- + + + + + + + +lower-case +---------------------------------------------------------------------------- + + + + + + + +octdigits +---------------------------------------------------------------------------- + + + + + + + +printable +---------------------------------------------------------------------------- + + + + + + + +punctuation +---------------------------------------------------------------------------- + + + + + + + +replace +---------------------------------------------------------------------------- + + +Replace all occurrences of x in s with r. + + + + + +replace-first +---------------------------------------------------------------------------- + + +Replace the first occurrence of x in s with r. + + + + + +reverse +---------------------------------------------------------------------------- + + +Returns s with its characters reversed. + + + + + +split +---------------------------------------------------------------------------- + + + + + + + +split-lines +---------------------------------------------------------------------------- + + +Splits on \n or \r\n, the two typical line breaks. + + + + + +starts-with? +---------------------------------------------------------------------------- + + + + + + + +substring +---------------------------------------------------------------------------- + + + + + + + +trim +---------------------------------------------------------------------------- + + + + + + + +triml +---------------------------------------------------------------------------- + + + + + + + +trimr +---------------------------------------------------------------------------- + + + + + + + +upper +---------------------------------------------------------------------------- + + + + + + + +upper-case +---------------------------------------------------------------------------- + + + + + + + +whitespace +---------------------------------------------------------------------------- + + + + + + + + diff --git a/pixie/generate-docs.pxi b/pixie/generate-docs.pxi new file mode 100644 index 00000000..07a8e6cb --- /dev/null +++ b/pixie/generate-docs.pxi @@ -0,0 +1,49 @@ +(ns pixie.generate-docs + (:require [pixie.io :as io] + [pixie.string :as string])) + +(let [[namespace] program-arguments] + + (println "============================================================================") + (println (name namespace)) + (println "============================================================================") + + (load-ns (symbol namespace)) + (println "\n") + + + (doseq [[k v] (sort-by first (ns-map (the-ns namespace)))] + (let [m (meta @v)] + (println (name k)) + (println "----------------------------------------------------------------------------") + #_(if (and (:line-number m) + (:file m)) + #_(println (str "

" (name k) "

")) + ) + #_(println "