Bonsai 2.3 New Year Release

558 views
Skip to first unread message

goncaloclopes

unread,
Jan 25, 2017, 3:45:16 PM1/25/17
to Bonsai Users
Hi everyone,

TL;DR:
  • The "New Year" release of Bonsai has officially launched.
  • The editor will display a notification for new updates, but you will need to go to the package manager to install them.
  • Many new features and core improvements to language and editor (see below).
  • The new example Gallery is now available from the Tools menu.
  • Workflow snippets can now be saved and later reused directly from the toolbox.
  • Examples and packages created by users can now be shared directly via the community MyGet repository.
  • Workflows that are designed in Bonsai 2.3 will not run in Bonsai 2.2 (but existing workflows should update flawlessly).
  • If anything breaks, let us know by using the forums or the issue tracker.

The new Bonsai 2.3 release is finally out just in time for the Chinese New Year! This release has been overdue for many months now and I believe it completes a cycle of rounding up all major language and editor features we have been working on since last year.

Most importantly, we have created a community feed so that any Bonsai user can now directly contribute and share examples and packages with all other users. We hope this will accelerate the dissemination of existing Bonsai applications and support most of the learning material that we will be publishing over the next few months (more details below).

Bonsai 2.3 also introduces the "Bonsai Gallery", a new concept for sharing Bonsai applications. The idea is you can take any workflow you have been working on and export it into a NuGet package automatically from the File -> Export -> To Gallery... menu. When you do this, Bonsai will figure out for you all the dependencies that are needed to get the workflow running, as well as any content (images, videos, sounds, etc) that are part of the application and will generate a Gallery package. Once this package is generated, you can install it in other computers or share it with other users, and Bonsai will take care of installing any missing dependencies on the new computer which may be required to run the package. Basically the workflow will become a plug-and-play Bonsai application that can self-install on any computer that can run the Bonsai editor.

On the same vein, we are expanding the set of available Bonsai examples to cover many missing areas, including computer graphics, tracking and other closed-loop interactive setups, GPU processing, generative sound, etc. Because of this, we would like to invite all of you to submit examples (or suggestions of examples) that you would like to see distributed with Bonsai. Think of any useful application you have already done (or seen being done) with Bonsai, or an idea for a new application that you would really like to see developed in Bonsai. This is your chance to see them implemented and they will become available in the Gallery for easy redistribution.

Another new code sharing concept introduced in Bonsai 2.3 are workflow "Snippets". You create a snippet by selecting a collection of nodes, right-clicking on them and choosing "Save Snippet As...". This will save the workflow snippet into the snippets folder with any name that you like. Once that is done, your snippet will be automatically loaded into the toolbox such that you can place it in other parts of the workflow where you need to perform similar operations, or even in entirely new workflows. Basically these snippets become reusable Bonsai code patterns.

Many other features and enhancements are listed below. In the following weeks I hope to post more announcements regarding new learning documentation and examples, so keep tuning in regularly. Also let us know if you are curious about any one particular enhancement by asking questions in the forums.

Release highlights

Updates to the editor:
  - Support for high DPI displays.
  - Improvements to the visual layout algorithm: workflows should now in general look nicer, with less kinks and bends.
  - Export a workflow to several different bitmap formats in addition to SVG.
  - Support for exporting a workflow and related content as a self-contained redistributable package.
  - Support for exporting bits of workflow as "code snippets" which are then immediately searchable in the toolbox.
  - Added the new Bonsai Gallery to the Tools menu. Any published packages containing the tags "Bonsai" and "Gallery" will be listed.
Language updates:
  - New observable-sharing operators: BehaviorSubjectAsyncSubject.
  - New reactive operators: DistinctBy, DistinctUntilChangedBy.
  - Generalized Zip and CombineLatest to support higher-order sequences.
  - Updated SelectMany to avoid automatically unrolling enumerable sequences.
Package updates:
  - New and improved shader package with support for compute shaders and full-screen viewport effects.
  - Updated the shader resource and GLSL editor from modal to modeless so you can keep them open while doing other things.
  - New Audio modules: UpdateSource, UpdateListener for generating 3D positional sound.
  - New Dsp modules: Shift, BitBuffer.
  - New Vision packages: HoughCircles, HoughLines, SparseOpticalFlow, Centroid.
  - Dsp updates: Rescale now supports clamping of output values.
  - Vision updates: GoodFeaturesToTrack now supports specifying a region of interest in which to search for features.
  - Many bug-fixes and performance improvements.

Cheers,
Gonçalo

Charles Latchoumane

unread,
Jan 31, 2017, 3:43:20 AM1/31/17
to Bonsai Users
This is really impressive! Thanks for all the great work and efforts!

Charles

Bassam Atallah

unread,
Jan 31, 2017, 6:18:12 AM1/31/17
to Bonsai Users
Thank you Goncalo for the fantastic new release!

Please remember to explicitly credit and support Goncalo and Bonsai by citing him when we publish (https://doi.org/10.3389/fninf.2015.00007). It really makes a difference!

~b

Eirinn Mackay

unread,
Feb 2, 2017, 12:36:43 PM2/2/17
to Bonsai Users
Hi Goncalo, congrats on your PhD defense and the new release of Bonsai! So far it's working great except I can't find the PythonTextWriter node anymore. I see it was deprecated in a recent commit. Why is that?

Gonçalo Lopes

unread,
Feb 2, 2017, 1:02:28 PM2/2/17
to Eirinn Mackay, Bonsai Users
Hi Eirinn,

I was wondering how long it would take until someone noticed that particular deprecation ;-)

What happened is that we found significant performance issues with PythonSink, PythonTextWriter and PythonCondition on some scenarios which have led us to want to reimplement these nodes in a different way for future releases. Specifically, the PythonEngine was being initialized differently from the PythonSource and PythonTransform variants, which meant some optimizations could not be applied.

However, if you find you still need to use them, there are 3 possible workarounds:

1) Actually, the PythonTextWriter node itself is still around. We need it to ensure backwards-compatibility with old workflows who have not migrated yet. If you have an old workflow laying around that still has one of these, you will notice it opens, although the node will now show up with some stripes and a deprecation message description detailing its new status. You should even be able to copy and paste the node from the old workflow to a new workflow with no problem. Deprecation will hide nodes from the toolbox in order to discourage their use, but otherwise they should work normally.

2) A different approach to the PythonTextWriter would be to use a PythonTransform to convert the input to the desired string and then a CsvWriter to write it to a file. If you need to continue the workflow past this node, you can encapsulate the transformation in a Sink group.

3) Yet another option is to do the writing directly inside a PythonTransform. Indeed, a "PythonSink" can be implemented directly by a PythonTransform by simply taking care to return the unmodified input as the result of the process function. You can also use the load() and unload() functions to open and close files, etc.

We hope to bring back these nodes (or ones that behave very similarly) around the time when we release Bonsai 3.0. However, do let us know if you find that PythonTextWriter would be absolutely fundamental to you (and why it is in form of a use case) and we may consider bringing online other (more urgent) alternatives.

Hope this helps.


--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/bonsai-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/c3cd41ed-ed48-4b89-8459-f0009627eefe%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Eirinn Mackay

unread,
Feb 2, 2017, 1:30:47 PM2/2/17
to Bonsai Users, eirinn...@gmail.com
That makes sense, good to know I'm not going mad. I noticed the striped node in my older workflow. It's not an urgent issue at all. Thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.

Bogdan

unread,
Mar 28, 2017, 1:31:06 PM3/28/17
to Bonsai Users
Amazing Work !!

Good Job !!

Thanks for taking my previous comments into account!

This is an amazing project ! Hope to see it get big in the near future!

Cheers


On Wednesday, January 25, 2017 at 8:45:16 PM UTC, goncaloclopes wrote:
Reply all
Reply to author
Forward
0 new messages