Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This document is a work in progress! Please feel free to edit it.

= TODO =

Cleanup the organization of this file.

Move performance enhancements to their own section

Changes to Clojure in Version 1.3 Beta

= CONTENTS =

0 Still In Process

1 Deprecated and Removed Features
1.1 Earmuffed Vars Are No Longer Automatically Considered Dynamic.
1.2 ISeq No Longer Inherits From Sequential
1.3 Disallow recur across try
1.4 Removed Bit Operation support for boxed numbers ==



1.5 Ancillary Namespaces No Longer Auto-Load on Startup:

2 New/Improved Features in clojure.core
2.1 Enhanced Primitive Support
2.2 Better Exception Reporting
2.3 ancillary namespaces no longer auto-load on startup:clojure.reflect/reflect
2.4 Code Path for Using Vars is Now Much Faster for the Common Caseclojure.data/diff
2.5 clojure.reflect/reflectcore/every-pred and clojure.core/some-fn Combinators
2.6 clojure.datacore/diffrealized?
2.7 clojure.core/with-redefs macro (useful for stubbing)-fn & with-redefs
2.8 print-tableclojure.core/find-keyword
2.9 normalized unchecked-* fn namesclojure.repl/pst
2.10 added unchecked-math supportclojure.pprint/print-table
2.11 fixes to binding conveyance (and agent)

2.12 pprint respects print-length
2.13 into-array now coerces numeric types

2.14 Java's line.separator property for newline

2.15 12 compilation and deployment via Maven
2.16 improved startup time

2.17 13 internal keyword map uses weak refs
2.18 fix perf on some numeric overloads

2.19 14 ^:const defs
2.20 15 Message Bearing Assert
2.21 16 Error Checking for defmulti Options
2.22 Promises are Lock Free

2.23 17 Removed Checked Exceptions
2.24 18 vector-of Takes Multiple Arguments
2.25 every-pred and some-fn Combinators

2.26 19 deref with timeout
2.27 realized?

2.28 Functions Only Get Metadata Support Code When Metadata Explicitly Supplied When Defined

2.29 Allow definterface/gen-interface to Accept Array Type Hints

2.30 20 Walk Support for sorted-by Collections
2.31 21 string.join Enhanced to Work with Sets
2.32 22 clojure.test-helper
2.33 23 Newline outputs platform-specific newline sequence
2.34 nil? inlined

2.35 24 init-proxy and update-proxy return proxy
2.36 25 doc & find-doc moved to REPL
2.37 26 clojure.java.shell/sh accepts as input anything that clojure.java.io/copy does
2.38 print-table

2.39 27 Interrupte Handler Promoted to clojure.repl
2.40 with-redefs-fn & with-redefs

2.41 Make PersistentQueue Count O(1)

2.42 28 Add support for running -main namespaces from clojure.main
2.43 29 Set thread names on agent thread pools
2.44 30 Add docstring support to def
2.45 find-keyword

2.46 31 Comp function returns identity when called with zero arity
2.47 pst

3 Functions with Improved Performance Enhancements
4 Bug Fixes 5 JIRA issues

= 0 Still In Process =

  • CLJ-184 n-ary bit functions, also inlining of n-ary bit and math operations
  • CLJ-374 print/read syntax for defrecords
  • CLJ-671 Recur mismatch causes infinite loop in compiler

= 1 Deprecated and Removed Features =

...

Bit Operations map directly to primitive operations
Replicate has been deprecated in favor of repeat

== 1.5 Ancillary Namespaces No Longer Auto-Load on Startup ==

The following namespaces are no longer loaded on startup: clojure.set, clojure.xml, clojure.zip

= 2 New/Improved Features in clojure.core =

== 2.1 Enhanced Primitive Support ==

Full details here: http://dev.clojure.org/display/doc/Enhanced+Primitive+Support) and http://dev.clojure.org/display/doc/Documentation+for+1.3+Numerics

== 2.2 Better Exception Reporting ==

Full details Details here: http://dev.clojure.org/display/design/Error+Handling

...

  • When calling macros with arity
  • For Invalid Map Literals
  • For alias function if using unknown namespace
  • In the REPL
  • Add "starting at <line>" to EOF while reading exceptions
  • Better compilation error reporting

== 2.3 Ancillary Namespaces No Longer Auto-Load on Startup ==The following namespaces are no longer loaded on startup: clojure.set, clojure.xml, clojure.zip

== 2.4 Code Path for Using Vars is Now Much Faster for the Common Case ==

== 2.5 clojure.reflect/reflect ==

Full details here: http://dev.clojure.org/display/design/Reflection+API

== 2.6 4 clojure.data/diff ==

Optimization for diffing equal objects

Short-circuit return when a and b are equal; performance optimizationRecursively compares a and b, returning a tuple of things-only-in-a things-only-in-b things-in-both

(diff {:fred :ethel} {:fred :ethel})
=> fred :ethel}

  • CLJ-448 structural diff

== 2.7 with-redefs macro ==

Useful for stubbing

== 2.8 print-table ==

== 2.9 normalized unchecked-* fn names ==

== 2.10 added unchecked-math support ==

  • CLJ-441 Add unchecked coercions

== 2.11 fixes to binding conveyance (and agent) ==

== 2.12 pprint respects print-length ==

== 2.13 into-array now coerces numeric types ==

== 2.14 Java's line.separator property for newline ==

== 2.15 compilation and deployment via Maven ==

== 2.16 improved startup time ==

== 2.17 5 clojure.core/every-pred and clojure.core/some-fn Combinators ==

every-pred takes a set of predicates and returns a function f that returns true if all of its composing predicates return a logical true value against all of its arguments, else it returns false.

((every-pred even?) 2 4 6)

=> true

((every-pred even?) 2 4 5)

=>false

some-fn takes a set of predicates and returns a function f that returns the first logical true value returned by one of its composing predicates against any of its arguments, else it returns logical false.

((some-fn even?) 2 4 5)

=> true

((some-fn odd?) 2 4 6)

=> false

== 2.6 clojure.core/realized? ==

Returns true if a value has been produced for a promise, delay, future or lazy sequence.

(let x (range 5)

(println (realized? x))

(first x)

(println (realized? x)))

=> false

=> true

== 2.7 clojure.core/with-redefs-fn & clojure.core/with-redefs ==

with-redefs-fn temporarily redefines Vars during a call to func. with-redefs temporarily redefines Vars while executing the body.

(with-redefs temp (println nil?))

=> :temp

== 2.8 clojure.core/find-keyword ==

Returns a Keyword with the given namespace and name if one already exists.

(find-keyword "def")

=> :def

(find-keyword "fred")

=> nil

== 2.9 clojure.repl/pst ==

Prints a stack trace of the exception

pst

=> (pst (IllegalArgumentException.))

IllegalArgumentException

user/eval27 (NO_SOURCE_FILE:18)

clojure.lang.Compiler.eval (Compiler.java:6355)

clojure.lang.Compiler.eval (Compiler.java:6322)

clojure.core/eval (core.clj:2699)

clojure.main/repl/read-eval-print--5906 (main.clj:244)

clojure.main/repl/fn--5911 (main.clj:265)

clojure.main/repl (main.clj:265)

clojure.main/repl-opt (main.clj:331)

clojure.main/main (main.clj:427)

clojure.lang.Var.invoke (Var.java:397)

clojure.lang.Var.applyTo (Var.java:518)

clojure.main.main (main.java:37)

== 2.10 clojure.pprint/print-table

Prints a collection of maps in a textual table.

(print-table fred :barney fred "ethel"} {:fred "wilma" :barney "betty"})

=> ===============

:fred | :barney

===============

ethel |

wilma | betty

===============

== 2.11 pprint respects print-length ==

Assigning print-length now effects output of pprint

== 2.12 compilation and deployment via Maven ==

See the following pages for more information http://dev.clojure.org/display/doc/Maven+Settings+and+Repositories http://dev.clojure.org/pages/viewpage.action?pageId=950842 http://dev.clojure.org/display/design/Common+Contrib+Build http://dev.clojure.org/display/design/How+to+Make+Releases

== 2.13 internal keyword map uses weak refs ==

== 2.18 fix perf on some numeric overloads ==

CLJ-380

== 2.19 14 ^:const defs ==

^:const lets you name primitive values with speedier reference.

...

The overhead of looking up :e and :pi in the map happens at compile time, as (:pi constants) and (:e constants) are evaluated when their parent def forms are evaluated.

== 2.20 15 Message Bearing Assert ==

...

(assert (= 1 2) "1 is not equal to 2")
=> AssertionError Assert failed: 1 is not equal to 2

== 2.21 16 Error Checking for defmulti Options ==

...

(defmulti fred :ethel :lucy :ricky)
=> IllegalArgumentException

== 2.22 Promises are Lock Free ==

This is a performance enhancement by using compare-and-set! instead of locking.

== 2.23 17 Removed Checked Exceptions ==

Clojure does not throw checked exceptions

== 2.24 18 vector-of Takes Multiple Args ==

...

(vector-of :int 1 2 3)
=> 1 2 3

== 2.25 every-pred and some-fn Combinators ==

every-pred takes a set of predicates and returns a function f that returns true if all of its composing predicates return a logical true value against all of its arguments, else it returns false.

((every-pred even?) 2 4 6)

=> true

((every-pred even?) 2 4 5)

=>false

some-fn takes a set of predicates and returns a function f that returns the first logical true value returned by one of its composing predicates against any of its arguments, else it returns logical false.

((some-fn even?) 2 4 5)

=> true

((some-fn odd?) 2 4 6)

=> false

== 2.26 19 deref with timeout ==

deref now takes a timeout option - when given with a blocking reference, will return the timeout-val if the timeout (in milliseconds) is reached before value is available.

(deref (promise) 10 :ethel)
=> :ethel

== 2.27 realized? ==

Returns true if a value has been produced for a promise, delay, future or lazy sequence.

(let x (range 5)

(println (realized? x))

(first x)

(println (realized? x)))

=> false

=> true

== 2.28 Functions Only Get Metadata Support Code When Metadata Explicitly Supplied When Defined ==

Optimization to not include metadata support code on functions that don't need it.

== 2.29 Allow definterface/gen-interface to Accept Array Type Hints ==

Performance optimization to allow type hinting on interfaces.

== 2.30 20 Walk Support for sorted-by Collections

...

let x (sorted-set-by > 1 2 3) (walk inc reverse x))
=> (2 3 4)

== 2.31 21 string.join Enhanced to Work with Sets ==

...

(join " and " #{:fred :ethel :lucy})
=> ":lucy and :fred and :ethel"

== 2.32 22 clojure.test-helper ==

All test helpers moved into clojure.test-helper

== 2.33 23 Newline outputs platform-specific newline sequence ==

Newline sequence is output as \r\n on Windows now.

== 2.34 nil? inlined ==

Performance optimization

== 2.35 24 init-proxy and update-proxy return proxy ==

Now you can chain calls on the proxy

== 2.36 25 doc & find-doc moved to REPL ==

Adds special form docs to the REPL

== 2.37 26 clojure.java.shell/sh accepts as input anything that clojure.java.io/copy does

This adds InputStream, Reader, File, byte[] to the list of inputs for clojure.java.shell/sh

== 2.38 print-table

Prints a collection of maps in a textual table.

(print-table fred :barney fred "ethel"} {:fred "wilma" :barney "betty"})

=> ===============

:fred | :barney

===============

ethel |

wilma | betty

===============

== 2.39 27 Interrupte Handler Promoted to clojure.repl ==

Promoting this library eliminates the need for a dependency on old contrib.

== 2.40 with-redefs-fn & with-redefs ==

with-redefs-fn temporarily redefines Vars during a call to func. with-redefs temporarily redefines Vars while executing the body.

(with-redefs temp (println nil?))

=> :temp

== 2.41 Make PersistentQueue Count O(1) ==

This is a performance optimization for calling count() on PersistantQueue. It now implements the Counted interface and provides constant time counting by maintaining a count of the number of elements internally.

== 2.42 28 Add support for running -main namespaces from clojure.main

This patch allows clojure.main to accept an argument pointing to a namespace to look for a -main function in. This allows users to write -main functions that will work the same whether the code is AOT-compiled for use in an executable jar or just run from source.

== 2.43 29 Set thread names on agent thread pools ==

...

clojure-agent-send-pool-%d ��� should be fixed # of threads
clojure-agent-send-off-pool-%d ��� will be added and removed over time

== 2.44 30 Add docstring support to def ==

defs can now have docstrings

== 2.45 find-keyword ==

Returns a Keyword with the given namespace and name if one already exists.

(find-keyword "def")

=> :def

(find-keyword "fred")

=> nil

== 2.46 31 Comp function returns identity when called with zero arity ==

(= (comp) identity)
=> true

= = 2.47 pst ==

Prints a stack trace of the exception

pst

=> (pst (IllegalArgumentException.))

IllegalArgumentException

user/eval27 (NO_SOURCE_FILE:18)

clojure.lang.Compiler.eval (Compiler.java:6355)

clojure.lang.Compiler.eval (Compiler.java:6322)

clojure.core/eval (core.clj:2699)

clojure.main/repl/read-eval-print--5906 (main.clj:244)

clojure.main/repl/fn--5911 (main.clj:265)

clojure.main/repl (main.clj:265)

clojure.main/repl-opt (main.clj:331)

clojure.main/main (main.clj:427)

clojure.lang.Var.invoke (Var.java:397)

clojure.lang.Var.applyTo (Var.java:518)

clojure.main.main (main.java:37)

= 3 Functions with Improved Performance =

TBD

= 4 Bug Fixes =

3 Performance Enhancements =

  • Code path for using vars is now much faster for the common case
  • Improved startup time
  • Fix performance on some numeric overloads
    • See CLJ-380 for more information
  • Promises are lock free
  • Functions only get metadata support code when metadata explicitly supplied
  • definterface/gen-interface accepts array type hints
  • nil? inlined
  • PersistentQueue count is now O(1)

= 4 Bug Fixes =

The complete list of JIRA issues is here: http://dev.clojure.org/jira/secure/IssueNavigator.jspa?mode=hide&requestId=10052

  • CLJ-8 detect and report cyclic load dependencies
    • Patch restore detection of cyclic load dependencies

...

  • several "holding onto head" fixes
  • Stop top-level defs from hanging onto the head of an expression that uses a lazy seq
  • Stop multimethods from holding onto heads of their arguments

= 5 JIRA Issues =

The complete list of JIRA issues is here: http://dev.clojure.org/jira/secure/IssueNavigator.jspa?mode=hide&requestId=10052