background preloader



Cog Created 10 February 2004, last updated 27 February 2012 An older version of this document is also available in Russian. Cog is a code generation tool. It lets you use pieces of Python code as generators in your source files to generate whatever code you need. The sections below are: Cog transforms files in a very simple way: it finds chunks of Python code embedded in them, executes the Python code, and inserts its output back into the original file. For example, if you run this file through cog: // This is my C++ file.... it will come out like this: // This is my C++ file.... Lines with triple square brackets are delimiter lines. When cog runs, it discards the last generated Python output, executes the generator Python code, and writes its generated output into the file. The cog marker lines can contain any text in addition to the triple square bracket tokens. Cog is designed to be easy to run. Cog requires Python 2.6, 2.7, 3.2, or Jython 2.5. Download Cog from the Python Package Index. License WebGL Water Loading... Made by Evan Wallace This demo requires a decent graphics card and up-to-date drivers. If you can't run the demo, you can still see it on YouTube. Interactions: Draw on the water to make ripples Drag the background to rotate the camera Press SPACEBAR to pause and unpause Drag the sphere to move it around Press the L key to set the light direction Press the G key to toggle gravity Features: Raytraced reflections and refractions Analytic ambient occlusion Heightfield water simulation * Soft shadows Caustics (see this for details) ** * requires the OES_texture_float extension** requires the OES_standard_derivatives extension Tile texture from zooboing on Flickr

Codes - GENERATIVE GESTALTUNG 2016-03-15RT @bndktgrs: 幸せなコーディング! Launched: Our #GenerativeDesign book has also a 🇯🇵 website now!👍 [Link] Cheers @BugNews! @Proce… 2016-03-05RT @bndktgrs: Our #GenerativeDesign book made it to 🇯🇵 #Japan! C++ Inline Functions In this C++ tutorial, you will learn about the Inline function, what is an inline function, reason for the need of inline functions, what happens when an inline function is written, general format of inline function explained with example. What is Inline Function? Inline functions are functions where the call is made to inline functions. The actual code then gets placed in the calling program. Reason for the need of Inline Function: Normally, a function call transfers the control from the calling program to the function and after the execution of the program returns the control back to the calling program after the function call. The extra time needed and the process of saving is valid for larger functions. What happens when an inline function is written? The inline function takes the format as a normal function but when it is compiled it is compiled as inline code. General Format of inline Function: The general format of inline function is as follows: inline datatype function_name(arguments)

Python - Kivy Monad (functional programming) Formally, a monad consists of a type constructor M and two operations, bind and return (where return is often also called unit). The operations must fulfill several properties to allow the correct composition of monadic functions (i.e. functions that use values from the monad as their arguments or return value). The return operation takes a value from a plain type and puts it into a monadic container using the constructor, creating a monadic value. The bind operation performs the reverse process, extracting the original value from the container and passing it to the associated next function in the pipeline, possibly with additional checks and transformations. The concept of monad programming appeared in the 1980s in the programming language Opal even though it was called "commands" and never formally specified. We demonstrate two common examples given when introducing monads: the Maybe monad and the I/O monad. data Maybe t = Just t | Nothing return :: a -> Maybe a return x = Just x

SuperCollider » SuperCollider haXe Features This is a non-exhaustive list of haXe features - use it as a quick overview of the kind of things you can do with haXe. On the client-side, many platforms are supported. Can compile to JavaScript by generating a single .js fileinteractive debugging directly in Haxe source files with JS Source-Mapping (-debug with Haxe 2.09+)reduce the script output size with --dead-code-eliminationCan compile to C++ source code, which can be compiled to native binariestarget iOS, Android, and other mobile targetssee NME for a good exampleCan compile to Flash by generating a .swf file - haXe compiled swf files usually run faster than AS3 due to advanced optimizationsuse interactive debugger if your IDE supports it with -debug -D fdbcan compile to SWC and import SWF libraries (produced by IDE or 3rd party libraries)can compile to AS3 source code On the server-side, you can use Haxe as well, enabling code-sharing and better team communication : Here's a list of some of the Haxe language features.

Qwt - Qt Widgets for Technical Applications Functional Reactive Programming Functional Reactive Programming (FRP) integrates time flow and compositional events into functional programming. This provides an elegant way to express computation in domains such as interactive animations, robotics, computer vision, user interfaces, and simulation. 1 Introduction The original formulation of Functional Reactive Programming can be found in the ICFP 97 paper Functional Reactive Animation by Conal Elliott and Paul Hudak. 1.1 Behaviors Traditionally a widget-based user interface is created by a series of imperative actions. A better way to represent an edit widget's content is a time-varying value, called a behavior. This is only a theoretical model, because a time-varying value can represent something impure like the content of an edit widget, the current value of a database entry as well as the system clock's current time. myEditWidget :: Behavior Text In most frameworks there is an applicative interface for behaviors, such that you can combine them easily: 1.2 Events To do

Choreographic Coding Labs | Choreographic Coding Labs Choosing between Java and Python