Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: Christophe de Dinechin Newsgroups: comp.compilers Subject: Tao3D, a new open source language for real-time 3D animation Date: Thu, 30 Oct 2014 15:46:03 -0700 (PDT) Organization: Compilers Central Lines: 81 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-10-021@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: miucha.iecc.com 1414717474 25202 2001:470:1f07:1126:0:676f:7373:6970 (31 Oct 2014 01:04:34 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Fri, 31 Oct 2014 01:04:34 +0000 (UTC) Keywords: available, functional Posted-Date: 30 Oct 2014 21:04:33 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1406 Taodyne just released Tao3D "Libre Edition", a GPLv3 version of Tao3D. http://www.taodyne.com/shop/dev/blog/292-tao3d-libre-edition. WHAT IS TAO3D? Tao3D is a functional reactive programming language designed specifically for real-time 3D animations. It lets you create sophisticated presentations very quickly. WHY IS IT RELEVANT TO COMP.COMPILERS? Tao3D is implemented using a few ideas that might spark some interest on comp.compilers. 1) A homo-iconic source code format that remains readable. Homoiconic languages like Lisp are often relatively hard to read for humans. Tao3D uses a parse tree format that is very simple yet can represent practically any source code in a relatively natural way. Specifically, there are 8 node types: integer, real, text, name, infix, prefix, postfix and block. The first four are terminals as well as leafs in the parse tree. The last four are inner nodes, and represent the way humans perceive a specific operation. "Infix" represents "A+B" or "A and B". "Prefix" represent "+3" or "sin x". "Postfix" represent "3%" or "3km". Finally, "Block" represent (A) or [A] or {A}. Blocks are used to represent indentation. Infix are used to represent line separators. Like in Lisp, the parse tree is also the fundamental data structure at runtime. 2) A compilation strategy based on tree rewrites A single operator, ->, which reads as "transforms into", is used to define functions, operators, variables and macros / syntactic structures. // X transforms into 0: Defines X as a variable X->0 // Define a factorial function 0! -> 1 N! -> N * (N-1)! // Define an 'if-then-else' if true then X else Y -> X if false then X else Y -> Y 3) A reactive approach for dynamic events Tao3D is reactive, meaning that the program automatically reacts to events and updates accordingly. For example, you can have a circle that follows the mouse with the following program: color "red" circle mouse_x, mouse_y, 100 This automatically create a mouse-based animation. More examples are given in the article linked at the beginning of this post. 4) A real-time code generation using LLVM Tao3D uses LLVM to dynamically generate code on the fly as you change its source code. This is not new per se, but if you are interested in this kind of things, this is an example of code that can teach you how to do it. BUILD INSTRUCTIONS git clone https://github.com/c3d/tao-3D.git cd tao-3D git submodule update --init --recursive ./configure make install Fork me on GitHub, and enjoy.