require 'transducers' class GameOfLife < Processing::App T = Transducers def random_data T.transduce(T.map{ rand(1000) < ALIVE_START }, :<<, [], 0..row * column) end end
Experiments with ruby-processing (processing-2.2.1) and JRubyArt for processing-3.0
Sunday, 12 October 2014
Transducers in ruby-processing
Transducers may be useful in ruby-processing for dealing with all sorts of algorithmic stuff. but in many cases if your brain can take it map, might be equally good. Here is example substituting a regular map with a transducer, I will have to see if I can find a more useful example:-
Labels:
map,
ruby-processing,
Transducers
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
-
▼
2014
(79)
-
▼
October
(10)
- Toxiclibs (or any other processing library) as a r...
- For the next version of ruby-processing examples w...
- Sketch featuring Vec2D to_curve_vertex (JRubyArt)
- More progress with JRubyArt (Alternative ruby-proc...
- Transducers in ruby-processing
- Vec3D to shape vertex in JRubyArt
- JRubyArt shader sketch running from netbeans
- Simple ArcBall in JRubyArt running from netbeans
- Rubygems with latest JRubyArt
- Alternative Ruby-Processing implementation
-
▼
October
(10)
About Me
- monkstone
- I have developed JRubyArt and propane new versions of ruby-processing for JRuby-9.1.5.0 and processing-3.2.2
No comments:
Post a Comment