System/ReleaseNotes/J904

From J Wiki
Jump to navigation Jump to search

>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help 


Work on J904 started in December 2021. J904 beta-a was released 20220409.

Changes to the J engine

Summary of Changes to the J Language in the release

  • language change: sentences in explicit definitions with unassigned non-noun results are flagged as errors when they are executed (except when they may become the result of an explicit modifier).
  • New foreign 15!:12 y returns the address of the internal header of y
  • New verb x T. y creates threads and queries tasks; new conjunction [x] u t. v y runs [x] u y asynchronously in a thread, as a task
  • New primitive: x u/.. y is like x u/. y except that u is executed as a dyad, with the left argument being the key value for the partition
  • 9!:30 '' returns name of the executing entity, as a byte string (empty if no entity is running)


j904 beta-a

  • 0: y supports IRS and can run inplace. (also other constant functions _9: to 9: and _:) 0:"0 is a good way to zero the atoms of an existing noun inplace.
  • Functions that repeat short values into a result (such as (x $ y) and (0:"0 y) use non-temporal stores if the result exceeds the size of L3 cache
  • (0. comparison y) and (x comparison 0.) use intolerant comparison on float arguments, faster
  • Bugs fixed in time accounting for Performance Manager: named explicit modifiers are now correctly accounted for, and unnamed explicit definitions are counted in a nameless verb.
  • language change: sentences in explicit definitions with unassigned non-noun results are flagged as errors when they are executed (except when they may become the result of an explicit modifier).
    Such sentences are usually typographical errors that are syntactically valid only because undefined names are treated as verbs. Example sentences that were valid, but will now be detected as errors, are:
    • a totally meaningless sentence
    • NB ******************************************
    • if(NOAVX){
      This change is incompatible if you have such garbage code in your definitions. For a few months, a message will be typed. For now, you must enable the message with 9!:55 (1e6). Eventually, the sentence will raise an error. To raise an error on the failing sentence now, execute 9!:55(_1) before running the code.
      If you need to refer to an argument (one of mnuvxy) to cause generation of the proper type of modifier, put the reference where it will not be executed, for example after return. at the end of the definition.
  • < y, <"n y, and x <;.0 y produce virtual blocks if the result will immediately be opened
  • (integer # y) recoded, faster, especially for float/integer y
  • x +. y on integers recoded, faster (thanks to Elijah Stone)
  • New foreign 15!:12 y returns the address of the internal header of y
  • New verb x T. y creates threads and queries tasks; new conjunction [x] u t. v y runs [x] u y asynchronously in a thread, as a task

j904 beta-b

  • Given: func_z_ =: entrypoint_loc_ . When func appears in a sentence, a reference to entrypoint_loc_ is pushed rather than a reference to func
  • named locale addresses in references are cached rather than being looked up every time

j904 beta-c

  • 5 T. timeout creates a user pyx, 6 T. pyx,<value sets the value of a user pyx, 7 T. pyx,<value sets error status in a user pyx
  • x 13!:11 y sets error number(s) y in thread(s) x. Error code of _1 means 'terminate task'.
  • 10-14 T. y creates and uses mutexes

j904 beta-d

  • incompatible change: 2 T.'' gives thread statistics rather than a list of idle threads.
  • x +/ . * y can run in parallel given large x,y, provided the user has created threads.
  • u t. 'worker' forces the job to run in a worker thread even if none is idle

j904 beta-e

  • 55 T. '' deletes the most-recently-created thread
  • futexes used for the implementation, reducing locking overhead
  • Faster, more robust mutexes and user pyxes
  • Mutexes and user pyxes can respond to attention interrupt (5 T._ no longer locks up the session!)
  • 8 T. '' shows # cores in system, max # threads
  • Result of Fold fixed when there is only one item between x and y
  • threadpools added to the task system. 0 T. pool# assigns the created thread to threadpool pool#; u t. pool# creates a verb that executes on the threads in threadpool pool#
  • 7!:0 redefined to give memory usage of the current thread

j904 beta-f (the current beta)

  • 14 T. pool# lingertime causes threads in threadpool pool# to stay active, waiting for jobs, for lingertime seconds after they complete a task
  • 15 T. pool# causes threads in threadpool pool# to wake up, waiting for jobs
  • 7!:8 added to give total memory usage of all threads
  • x (compare |) y and x (compare!.n |) y supported by special code on floating-point arguments
  • New primitive: x u/.. y is like x u/. y except that u is executed as a dyad, with the left argument being the key value for the partition
  • __: added

unreleased work in progress

  • 16 17 18 T. allow atomic fetch-and-add, and compare-and-swap
  • valence error signaled on attempts to execute an undefined valence of a verb (previously gave domain error)
  • 9!:30 '' returns name of the executing entity, as a byte string (empty if no entity is running)
  • GMP is now used as the math library for extended and rational numbers, much faster
  • New addon: dev/eformat gives more-detailed error messages. If you have this addon installed, the base library will load it automatically.

Changes to the base system

  • foldr.ijs replaced with fixes for Fold

Changes to the Qt IDE

  • none yet

>> << Pri JfC LJ Phr Dic Voc !: Rel NuVoc wd Help