Qore Programming Language

  • Increase font size
  • Default font size
  • Decrease font size

Qore 0.7.0 RELEASE-NOTES

E-mail Print PDF

RELEASE NOTES for qore v0.7.0

release summary: qore 0.7.0 is a major release with major new features - please see compatibility warnings beflow.

NOTE: modules are now delivered separately from the qore library, see the file README-MODULES in the source distribution for more information (or click here)

release overview:
  • COMPATIBILITY WARNING: local variables declared with my at the top-level are now global thread-local variables
  • COMPATIBILITY WARNING: qore command-line options changed, 3 seldomly-used short options removed
  • all modules are delivered separately now from the library, see README-MODULES for more information (or click here)
  • stable ABI and API, cleaned-up public header files, development packages
  • library may be used under the GPL or LGPL (enforced with license tagging on library and module initialization)
  • documented public API (with doxygen), documentation packages
  • complete reimplementation of the type and operator subsystems
  • reimplemented variable and object locking, no more possibility of nested locks and deadlocks
  • major performance and memory usage improvements
  • support for closures and encapsulating the state of local variables in the closure
  • some (quasi) functional programming support: new operators: map, foldr, foldl, select
  • new implicit argument references: $$ (entire argument list), $1, $2, ...
  • new special object method: "memberNotification()", called when members are updated externally to the class
  • "static" class methods are now supported
  • dereference string characters and binary bytes with [] operator
  • new qt-core, qt-gui, qt-opengl, qt-svg, opengl, glut, asn1, and xmlsec modules (delivered separately, see the file README-MODULES for more information -- or click here)
  • bz2 compressed data support (compression and decompression)
  • file locking support in the File class (based on fcntl())
  • support for SHA224, SHA256, SHA384, and SHA512 digest algorithms
  • 64-bit builds are the default on x86_64 CPUs on Linux
  • module dependencies
  • XML improvements, some XSD support
  • thread stack overrun protection on some platforms
  • build option support and constants
  • initial SOAP support included as user code
  • lots of bug fixes, new functions, new clases, class improvements, etc

 

COMPATIBILITY WARNING: local variables declared with "my" at the top-level are now global thread-local variables


This can be considered a bug fix as Qore was updated to match documented behavior.  However, in order to implement this, a new restriction was added to declaring local variables at the top-level: they can only be declared in the first parsing call in a Program object.  That is; if you try to declare a new top-level local variable with "my" in a Program object that already contains code, a parse exception will be raised.

 

COMPATIBILITY WARNING: qore command-line options changed, 3 seldomly-used short options removed


The following short options were removed:
 -C: corresponding to "--no-class-defs"
 -J: corresponding to "--no-constant-defs"
 -X: corresponding to "--no-thread-classes" (this short option was reused for a new option: --eval=arg)

The respective long options are still available.

Some new command-line options were added:
 --module-dir
 --module-api
 -X, --eval=arg

Also the -V, --version output gives much more information about the qore build.


all modules are delivered separately now from the library, see README-MODULES for more information


due to the fact that Qore now has a stable and documented API, and that the number of qore modules is growing, modules have been separated from the qore library and are now delivered separately. 

See the file README-MODULES for more information (or click here).

 

stable ABI and API, cleaned-up public header files, development packages


Finally Qore is useful for what it was designed to be in the first place: for embedding code in arbitrary applications.  

With a public, stable, and documented API, qore can be used by anyone that wants to support logic embedding in their application (here is a link).

Relevant classes exported by the Qore API now have private implementations, separating the interface from the implementation.  "const correctness" has been liberally applied to the API as well.  Modules may now be packaged and delivered separately from Qore.

Development packages (rpms) are now available as well.

library may be used under the GPL or LGPL


With this release, the qore library may be used under either the GPL or LGPL licenses.  

When calling qore_init() to initialize the library, you have to pass a license rgument.

When the qore library is initialized with the LGPL license, no licenses tagged as requiring the GPL license can be loaded.

 

documented public API (with doxygen), documentation packages


The Qore API documentation is generated with doxygen directly from the Qore header files.

Documentation packages (rpms) are now available as well.

 

complete reimplementation of the type and operator subsystems


The internal type and operator subsystems have been streamlined and improved for this release.

 

reimplemented variable and object locking, no more possibility of nested locks and deadlocks


Internal locking in Qore was simplified by eliminating nested locks and the possibility of deadlocking based on internal locks.

 

major performance and memory usage improvements


Performance of Qore code has been significantly improved for this release.  Additionally, the qore library uses less memory than in previous versions.

 

support for closures and encapsulating the state of local variables in the closure


Closures are now supported, ex:

my $a = sub () { return $x + $y * 3; };

the local variable $a can be returned as a return value of a function or called like a call reference.  If the closure references local variables from outside the closure's scope, when the closure is created the values of those variables are encapsulated in the closure and can be used normally.  Such encapsulated local variables can also be used in other threads (normally Qore local variables are local to the thread they are declared in).

 

some (quasi) functional programming support: new operators: map, foldr, foldl, select


These operators provide advanced and efficient list processing functionality to Qore.
  • map: "maps" an expression onto a list and returns a list of the results of evaluting the expression on each element of the list
  • foldr and foldl: "fold" an expression on a list, evaluting each new element of the list with the result of the last evaluation and the new element
  • select: creates a new list from a list

 

new implicit argument references: $$ (entire argument list), $1, $2, ...


Implicit arguments are used primary with the new list operators (map, foldr, foldl, and select), but can also be used in functions now as well.

 

new special object method: "memberNotification()", called when members are updated externally to the class


Objects can now be notified if public members are modified from outside the object's scope by declaring a new special method: "memberNotification()"

 

"static" class methods are now supported


Static class methods are not associated with an object; they are like regular functions attached to a class.  Static methods may also be private.

This allows programmers to write more efficient object-oriented programs and also addresses some Qore programmers' desire to put functions in namespaces (functions cannot be declared in a Qore namespace).

 

dereference string characters and binary bytes with [] operator


To get a single character of a string, the [] operator may be used, similar to how it's used with lists.
To get the value of a byte, the [] operator may be used as well.
Note that the [] operator when used in an lvalue expression will always convert its argument to a list

In other words, assignments using these new features of the [] operator will not work; the following is illegal:

$string[1] = "a"
$binary[1] = 0x1f 

the examples above will convert the value of the variables on the left-hand side to a list and assign the value on the right-hand side to the second position in the new lists.

 

new modules: qt-core, qt-gui, qt-opengl, qt-svg, opengl, glut, asn1, and xmlsec


QT modules are based on QT4
all modules are now delivered separately from the qore library, see the file README-MODULES for more information (or click here)

 

bz2 compressed data support (compression and decompression)


libbz2 is now required to run qore, and bz2 includes are required to build qore new functions provided:

  • bzip2()
  • bunzip2_to_binary()
  • bunzip2_to_string()

 

improvements to the File class


file locking support in the File class (based on fcntl()), more new File class members:

  • File::lock()
  • File::lockBlocking()
  • File::getLockInfo()
  • File::chown()

support for SHA224, SHA256, SHA384, and SHA512 digest algorithms


if Qore is built with an appropriate version of openssl, support for these new digest algorithms is supplied through the following functions:

  • SHA224()
  • SHA224_bin()
  • SHA256()
  • SHA256_bin()
  • SHA384()
  • SHA384_bin()
  • SHA512()
  • SHA512_bin()

64-bit builds are the default on x86_64 CPUs on Linux


the configure script will automatically set the build to a 64-bit target if the CPU is detected to be x86_64 on Linux note that on Solaris x86_64 you still have to manually add --enable-64bit to configure

 

XML improvements, XSD support


  • parseXMLWithSchema() - new function supports parsing an XML string based on an XSD schema
  • improved XML generation, top-level elements may now have attributes
  • improved XML parse error reporting, more details are included and context is now reported in the exception strings

thread stack overrun protection on some platforms


there is a new "stack guard" implementation that will cause an exception to be thrown when a thread runs out of stack space (instead of crashing the entire process, which is what happened previously).

The "stack guard" implementation simply determines the stack size for the thread and then checks the stack pointer before each Qore statement is executed to see if if passes a threshold.  

If the threshold has been breached, the statement is not executed and an exception is raised instead.

See the new test in test/stack-test.q for an example.

Stack guard availability depends on the compiler and CPU used to build qore; so
far there are tested implementations on:

  • i386 (gcc, SunPro CC)
  • x86_64 (gcc, SunPro CC)
  • 32-bit powerpc (gcc)
  • 32-bit sparc (gcc, SunPro CC)
  • 32-bit pa-risc (gcc, HP aCC)

Other platforms will still crash when the thread's stack is overrun.

 

build option support


now qore has constants that will tell you which options are available in the library.

Furthermore all functions are now available for parsing; but functions without an implementation will throw an exception (in previous versions of qore parse xceptions would be raised due to missing functions, which meant that it was not possible to build portable programs that could optionally use these functions if available).

You can check the option constants before running the function.
Optional functions are:

function infoconstantnotes
round()
HAVE_ROUNDdepends on C library support, missing on Solaris 8 for example
timegm()HAVE_TIMEGMdepends on C library support, missing on Solaris for example
setegid()HAVE_SETGUID
depends on C library support
seteuid()HAVE_SETEUIDdepends on C library support
parseXMLWithSchema()HAVE_PARSEXMLWITHSCHEMAdepends on libxml2 support
all SHA224*(), SHA256*(), SHA384*(), SHA512*() functionsHAVE_SHA224, HAVE_SHA256,
HAVE_SHA384,
HAVE_SHA512
depends on openssl support
all MDC2*() functionsHAVE_MDC2depends on openssl support
all RC5*() functionsHAVE_RC5depends on openssl support

The new constants are all in the Option namespaace:

  • HAVE_ATOMIC_OPERATIONS
  • HAVE_STACK_GUARD
  • HAVE_RUNTIME_THREAD_STACK_TRACE
  • HAVE_ROUND
  • HAVE_TIMEGM
  • HAVE_SETEUID
  • HAVE_SETEGID
  • HAVE_PARSEXMLWITHSCHEMA
  • HAVE_SHA224
  • HAVE_SHA256
  • HAVE_SHA384
  • HAVE_SHA512
  • HAVE_MDC2
  • HAVE_RC5

you can see what options qore has now by typing qore -V as well from the command-line.

 

initial SOAP support included as user code


see new files: examples/WSDL.qc examples/SoapClient.qc examples/SoapHandler.qc

 

bug fixes, new functions, class improvements


  • Qore revision tag now reflects the svn version used to make the build (instead of a meaningless private build number that was different on each machine).
  • new "Dir" class for manipulating and traversing directories (by Wolfgang Ritzinger)
  • inlist() and inlist_hard() functions for checking if a value is in a list
  • HTTPClient now understand bzip content encoding
  • miscellaneous new functions (besides the functions mentioned above):
    • chown()
    • lchown()
    • call_builtin_function()
    • call_builtin_function_args()
    • force_encoding()
    • get_script_dir()
    • get_script_path()
    • get_script_name()
  • parseURL() fixes and improvements
  • new Program restrictions: PO_NO_TERMINAL_IO and PO_NO_GUI
  • "-" operator updated: hash - list and hash -= list now work to delete multiple hash keys in a single (atomic) expression
  • SSLCertificate::getPublicKey() now returns the public key in DER format (before it returned an unusable binary object)
  • major updates to internal object and class code to allow for c++ class hierarchies to be properly reflected as Qore class hierarchies (used extensively by the qt modules, for example)
  • qore -V now gives verbose information about the build and library options

 

Last Updated on Wednesday, 08 October 2008 17:49