Announcing: Slashdot Deals - Explore geek apps, games, gadgets and more. (what is this?)

Thank you!

We are sorry to see you leave - Beta is different and we value the time you took to try it out. Before you decide to go, please take a look at some value-adds for Beta and learn more about it. Thank you for reading Slashdot, and for making the site better!



Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Video tutorials (158 comments)

First up, can I suggest adding the word "visualisation" to your standard blurb?

Good idea, done. It was hidden in the middle. Renaming Tao Presentations to Tao3D is similarly an attempt to avoid the misconceptions about "presentations".

I'm talking about a visual confusion. The reason I keep using the word "opaque" is that when I look at the code, the intended (semantic) behaviour is obscured.

Are you sure this has nothing to do with you not being familiar with the language?

You've suggested several times that having effectively only one syntactic structure in the language makes it more consistent, but my object with regards to consistency is precisely the contrary: that the syntactic rule is inconsistent because there is no clear mapping of syntax->semantics.

Maybe the word you are looking for is not "consistency" then. "Consistent" means there are no exceptions to the rule, which is easier to achieve when there are few rules. In C++, f(x,y) may be a macro invocation, a function call, a constructor, and there are different rules in all three cases. In HTML, the "a" tag refers to its URL as "href", but the "img" tag calls it "src". Consistency with the "real world" also matters. In SmallTalk, 2+3*5 is 25, not 17, so SmallTalk is consistent with itself (everything is an object, etc), but not with the rest of the world.

Something helped me immensely in your last post: you put a few code examples. I think that code examples help me figure out what you really mean or what you care about much better.

So ":=" is the assignment operator, but in all your examples you've sugared it over, and basically obscured the logic of your code...?

Why do you call this "sugaring over" now, and not "building an abstraction" (from your previous posts)?

The abstraction for attributes, used consistently, is: each attribute has a name from the real-world, you set the attribute "attr" with "attr value", you get the value of the attribute with "attr", and attributes apply to things that are evaluated later. Not obscure, and consistent, both internally and externally (e.g. with OpenGL).

I don't think it's more practical, because it massively less readable.If I use object.setColor("green"), it's easy to read the intended meaning.

Can't agree on that one. It's totally unreadable (ask any 10 years old kid without a deep training in JavaScript). And for productive programmers, it has the following useless characters: "object.set()".

I would prefer the abstraction object.color = "green" because getter/setter is usually implemented by convention rather than rule (leaving things open to programmer error).

There, you went down three steps down the abstraction ladder. Why not MOV $green.str0, color[object] while you are at it?

But your solution offers less clarity than either.

I have trouble arguing if you tell me that object.color = "green" is a better abstraction than color "green". It's terribly inefficient when you have multiple shapes and multiple attributes, and I have proven with rotation that it does not work for some complex attributes.

You're talking about the computer.

No, I'm talking about the abstraction level, meaning you hide what is irrelevant.

Imperative is superior to declarative only in terms of optimisability

Also in terms of expressive power, in terms of the ability to build abstractions incrementally, in terms of ... well... everything ;-) Imperative can also describe computations, tests, loops, and so on. Remember my question about how you'd represent repeated divs with HTML alone (no JavaScript)?

a declarative language should be easier to code in, because you only have to worry about the behaviour, not the execution.

But behaviour is infinitely more complex than execution. Execution is generally defined as a simple step-by-step sequence of operations. Behaviour, by contrast, is arbitrary. For HTML, is requires understanding how a multi-million lines programs like a browser interprets the data.

A well-written declarative language would be quicker to write in than a similarly well-written imperative language.

Please prove it by showing a well-written declarative language.

Why can't I just declare which functions should be memoised over recursive calls, rather than faffing with (set! ...) everywhere?

Because as the person writing the algorithm, you know when and how to cache data. Fibonacci is an overly simplistic example to decide what to do.

As I say, it's only problematic when it doesn't look like a command.

OK, but why doesn't color "red" look like a command to you?

Sorry, I confused the "with" iteration as a pattern over a discontinuous range of values. This is what I mean by opaque -- there is minimal visual distinction between a function definition and a function call, making it difficult to read and reason about code quickly.

I think that I understand your point. You definitely need to learn what a function definition looks like to understand the language, I'll grant you that.

My point isn't that the DNA functions aren't discontinuous, it's that a discontinuous function is still a single unit, and not comparable to a polymorphic operator.

Not in Tao3D, no. In C++, you have a discontinuity based on the type of the arguments. In XL and Tao3D too, but that type is much finer-grained, i.e. you can have a type that takes only odd integer, or a type that contains only the value 1.

If we start down the LoC line, we get to the point where we're declaring obfuscated Perl code as the best thing since sliced bread. If we use characters as our metric, you're penalising explicit variable and function naming. The characters metric also automatically penalises against things like using explicit assignment operators (which really do add to the understandability and maintainability of code), and LoC automatically tends to favour semantic whitespace (as end-block delimiters are often given their own lines to enhance readability).

And you really think that it's the way I got a 28x factor? I believe that you are ignoring the core of my argument here. We are comparing well-written code against well-written code, and there is a 20+ times code reduction. I used that to highlight that the improvements I see in Tao3D are not just in my imagination or the result of me being the author of the language.

By the way, I wrote an article with the actual code explained for this specific example.

All I'm saying is that for most practical purposes, the idea that the item persists and that redraws are implicit is a useful abstraction.

Yes, and conceptually, that's how you see the code in the DNA example until about 3 minutes into the video, when the abstraction is broken by the use of random numbers that are not identical from draw to draw.

Because there is no existing entity.

That's not the answer -- I said "an", not "the". I was questioning the choice, not the consequences. Yes, I know you went on to justify that choice, but starting off the paragraph this way risks confusing things.

And I really mean there is no existing entity at all, that's the whole point. You don't need to name entities. As a matter of fact, it's only in the second iteration of the Tao3D development that there were any entities at all. In the first prototype, it was direct execution, straight to OpenGL. If there were any entities, they were in the graphic card's memory, inaccessible to the program (at least, at a reasonable cost).

But the real explanation here isn't about ID clashes, is it? It's about keeping memory manageable for massive datasets -- no computer on Earth would be able to maintain persistent objects for every star in the known universe in memory.

It's more about offering a simpler way to describe things. An entity means you need to name the entity. When I draw on a sheet of paper, I don't need to name everything I'm drawing.

As above, that's an objective metric, but it doesn't indicate objective superiority.

If the programs are similar in what they do, in readability, in naming conventions, and if the LOC factor is 20+, then yes, it does.

It's not a fallacy, it's a reality. It's about perception and expectation.

Yes, I agree with that. Visualisation is a good application. But deep inside, it's really a programming language. You can do visualisation, virtual reality, image processing, etc. While your data visualisation comment is very true, Tao3D can equally well do batch processing on a number of images.

But a PowerPoint file is just an XML document, which means that PowerPoint is a language, even if no-one in their right mind would try to edit the source directly.

It's a data-only language. So it's not a true programming language ;-)

I thought this was for quick mockups, and therefore I felt it should abstract away a lot of the 3D stuff.

And it's important for me that it can do quick mockups, where 99% of the 3D stuff is abstracted. When I write a "slide", I happily forget about the hundreds of 3D objects and animations created by the theme behind my back. Now, I talk about a "slide", and that's what I focus on.

(Even "Hello World" examples are usually a terrible start for a coder in a new language, because it's easier to just type echo "Hello world!" at the shell prompt.)

Here is the Hello World in Tao3D. It's not the shorter you can do, though. The shortest one would be text "Hello World". It does abstract quite a bit of 3D stuff in the process, by the way, like creating polygonal outlines and textures to render the characters.

Well, for a start, I wouldn't use the slide format in the introductory video. Seriously, that is extremely misleading. Or maybe use it later on, once there's (eg) a rotating model of a simple product (a bicycle wheel, maybe), so that you're clearly showing the presentation tools as an extension

You mean, like in the DNA strand example? Or in the clock tutorial? Some videos start in presentation mode, others don't. Some start with existing code, others don't.

Data visualisation. "Presentation" implies passivity. This is not fallacy, it's a natural consequence of years of death-by-PowerPoint.

I do not see your stargazing app as a "presentation", because a presentation is not typically an end-product.

OK. It's called Tao3D now, not Tao Presentations, that's a start ;-)

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Video tutorials (158 comments)

Sorry -- I'm tired and angry about various things

Really sorry to hear that. But apology gladly accepted ;-)

You'll probably hate me for saying this, but why not just write text elements in an established format... like HTML?

Now you can. But HTML is not a very good format for dynamic text. How do you represent the following with HTML?

paragraph "It is currently " & hours & ":" & zero minutes & ":" & zero seconds
zero N -> if N < 10 then "0" & N else N

I believe that the typical usage of presentations will see a lot of minor adjustment of the most PowerPoint-like elements

This is true with what Powerpoint can do. With Tao3D, when you discuss a simulation, a lot of time is spent refining the simulation.

For one thing, reusing existing collateral would be more of a cut-and-paste affair

Even without the patch above, you can copy-paste HTML into Tao3D.

the language confuses the two metaphors of series-of-commands vs collection-of-properties.

There is no confusion, there are only series of commands, although with a homoiconic language, they are also data, so you can view them as properties and make them behave like properties if you want to. The fundamental paradigm remains sequential evaluation (using parse tree rewrites in that case).

Ah... what I hadn't noticed was the lack of assignment operator in the language.

There is an assignment operator in the language. The theme getter/setter is define as follows:

theme -> "default"
theme T -> theme := T

If that's what you've done, in theory you have completed the abstraction of objects -- if the caller doesn't need to know how an object works, it shouldn't need to know that it's not changing the properties directly.

I may not have made the abstraction exactly like you wanted, but I've made abstraction more practical than in most languages. The theme "variable" could be a function, I would not know. And the theme T "setter" could do some validation or anything else, same thing, you would not know.

But without an operator, how is it obvious the difference between an assignment, a function passed as argument, a function call and a looked-up value?

The real abstraction is precisely that it is not obvious at the call site. If you have something like do_something theme, it's do_something that decides for example if it evaluates theme or not. If not, it gets the unevaluated name, and it can decide to do something with it, like using it as a prefix for a "function call".

As a developer, you should be avoiding personal taste.

That makes no sense to me. While it's a good thing to be able to fit in an existing environment, when you design from scratch, you have to make choices. And those choices are based on your own taste. Who gets to decide for you if you prefer to write runThing, run_thing(); or (run-thing) or, Knuth forbid, <thing EVALUATION_MODE="run" @ARGS[$nil]>?

That last one, while I don't like it, at least looks consistent

In the Tao3D evaluation model, they are all consistent.

at other times a bag of object properties.

This only shows that imperative is superior to declarative. You can make imperative feel like declarative, not the other way round.

If I edit the attributes of an HTML tag via javascript, it shouldn't really matter which order I edit them in -- the end result is the same.

And this is actually a problem for rotation, because rotate is not commutative. Doing rotate_x 40; rotate_y 30 is not the same as rotate_y 30; rotate_x 40. Worse yet, if attributes are order independent, the "rotation as attribute" model suffers from gimbal lock. So any Three.js code that sets rotation.x and rotation.y on a mesh is conceptually ambiguous, as the effect is not the same if you rotate along X first or along Y first.

So while I'm thinking of the colour as a property of the rectangle, I expect to be able to change the rectangle's colour.

In the real world, I can say "Draw a red rectangle" (property), but also "Take the red pencil. Draw a rectangle, a triangle and a circle". Obviously, the most efficient description depends on the scenario, which is why I'd like ideally to have both at my fingertips.

Even when you have attributes like in HTML, the properties are not with the elements in the source code. They may be accessible in the DOM, but in the source code, the color of an element may come from a variety of sources: attributes in the element, inherited attributes, CSS, JavaScript poking into the element, etc.

OK, fair enough. I consider Processing at the very least problematic in that the abstraction is difficult to use.

What makes the "sequence of instructions" abstraction difficult to use? It's part of all imperative programming languages, you are the first person I hear complaining about it.

If you're using "color" as a manipulable property, why not just do the same with "visibility"? I'm not sure I like it, but it seems to sit with the language logic.

You are right. I'll probably change that.

Much problematic behaviour in many languages is well specified, and yet bugs occur.

Are you asking me to design a language that makes bugs impossible?

I've been watching your video Introducing the Tao language, and I see later definitions override earlier definitions. Fine. Pattern matching usually works on the first match, you're working on the last match. Both are valid models.

No, it's the first match that fits. Where did you see a later match override? What is true is that an imported file can placed its definitions "in the background" (at lower priority) than the definitions of the users. So a library can have a "catch all", its caller have more specialised patterns, and the caller will win even for calls made from within the module. This is how you can override theme definitions.

If you allow one of my colleagues to define one case of the pattern two screens after the majority of cases, and I don't know it's there, I can't predict the behaviour of the code.

How is that different from CSS? How is that different from C? In C, someone can define "malloc" in a different file, and that's a good thing. In JavaScript, code can modify any object, anywhere, override functions, prototypes, anything. And many interesting things have been built with this facility.

But statistics says if if can happen, it almost certainly will happen at some point.

"Almost certainly", it will be possible to write buggy programs with Tao3D. No doubt about that. The question is whether Tao3D makes it easier or harder. Since in general, the code is 5 to 20 times shorter than JavaScript or C++, I think it rather helps. See examples below.

typically polymorphism at the very least conceptually models different functions (adding complex numbers is different from adding non-negative integers)

The functions (and polymorphism) you describe are a well-define subset of parse tree rewrites. The tree rewrites that cannot be modelled as functions are what makes Tao3D interesting. Even if the implementation is not "up to the task" yet, conceptually, Tao3D is, as far as I know, the first language that unifies the notions of variable, function, macro, array, list, hash table, and type, as well as the first language that unifies the notion of compilation, evaluation and computation.

You said you wanted consistency? Here you have it: you can see sin X as a "function", line_width X as a "setter", locally X as a "high order function", render X as a "macro", style X as accessing a hash-array of functions, and so on. It's all a single construct, with a single set of rules to learn. It then becomes a matter of optimisation how each case is implemented. Something that does not work yet is the type system, but in the theoretical XL, a type is a function used during pattern matching to classify trees, and therefore, a function can return a type, and so C++ "template types" are just "functions returning types" in future-XL.

but pattern-matching with different values of an int (for example) is conceptually a single (possibly discontinuous) function. It is easier to understand someone else's code if that one single thing stays in one place, surely.

Then by all means keep it in a single place! But remember, it's often not in a single place today, for good reasons. In C++, the + for int, float or double is in the compiler. The + for complex is in <complex>, the + for text is in <basic_string>, and so on. It makes sense. Yet + is conceptually a "single" function, and you can write a "function template" that uses an addition and will work with all these types.

Furthermore, this whole discussion came from the dna_base_pair function in the DNA demo, and that function is discontinuous, since it returns four different arbitrary values, and is undefined for other values. In C or JavaScript, you can't even express that a function is only defined on values 0, 1, 2 and 3.

I don't know anyone who writes enough presentations to justify learning a new (and quite different) language to proficiency.

Go to any trade show. See how many screens show flash, interactive presentations, and so on. Do you think these things program themselves? Tao3D can do slides, and since I often need slides, I use it for that. But it can also do all these things Powerpoint can't do.

OK, make that a vanishingly small userbase. Very few presentations ever require that level of work.

Just visit Chrome Experiments, and ask yourself: how much work went into this or even this or this nice clock? Someone thought it was worth doing.

Now let's consider the last one is this code. It is 603 lines of code. How much time do you think it took? I can do exactly the same thing in Tao3D in under 10 minutes, and 38 lines of code. And then, I can make it much easier to read with 3 more lines. So in that case, we have a factor of over 15 in terms of line of code. In terms of characters (aka "carpal tunnel syndrome elementary units"), it's 26594 for JavaScript, 922 for Tao3D, so that's a cool 28.84 factor.

I talked about "users", and you called them "customers". Presumably, then, you originally made the software hoping to sell it, but have found your niche using it as a consultant to build up custom presentations for small businesses/projects.

No, in the example, I was the "user". I was simply explaining that the requests I get as a user of Tao3D are not as you suggested. I can't really speak for other "users" (well, I could, but I don't like to), even if I understand you consider me a rather atypical "user" and may not consider my experience as representative.

I don't think your software will ever be accepted in large enterprises. Small companies may be different.

It will certainly take some time to become commonplace. But Tao3D is already in use in a few large companies, a few of which actually even talk about it.

No decisions in a startup should be "personal", they should be a reaction to what users need.

All decisions are personal, including the many reactions that are in response to user requests. My recent decision to implement HTML text in Tao3D was personal. But it was your request. I don't see any contradiction.

It's not the colours that bug me, but the fact that the programmer has to explicitly deal with redraws.

You have been focusing since the beginning on the "surprise" you had that I had to put a "random seed" in my DNA video to have stable colors. When I do this kind of videos, I try to teach a number of things by example. This was a very good illustration of the fact that in Tao3D, things redraw as necessary. When you move the mouse, it redraws what needs to be redrawn. But if what you draw is not "stable", then it does not look good. The same thing exists in JavaScript or any other language. If I had coded the same example in JavaScript, I would have had to put a random seed for the exact same reason. So I really don't understand why you make such a fuss about it.

Your article doesn't show me anything "smarter" -- everything is about explicit redrawing of the item

Not anything "smarter"? I have a 23-lines program that draws a recognisable DNA strand. A 922 characters program that replicates a Chrome Experiment weighting almost 30 times more. That's not high-level enough for you?

I don't see the need to do that -- why not just update the properties of an existing entity?

Because there is no existing entity. That's the whole point. No existing entity means I don't need to lookup the entity to set its properties. I don't need to think about what happens in HTML when two entities share a same ID. The HTML way is more verbose, it leads to duplication, it gives several time more opportunities for error. Even simple replication with rotation/translation, like I did for the DNA strand, is complicated in HTML. In HTML or any attribute-based XML language, tell me how you repeat a <div> N times, translating it and changing its color as you go? Compare with the DNA example. What is your conclusion?

but with all these objects, wouldn't it be much better to treat it like stop-motion, moving physical objects in a 3D space?

The Animate module offers a number of helpers for animation, and more are scheduled.

Didn't you write the language yourself? That means you are intimately acquainted with the logic.

It does not invalidate objective metrics, like the number of characters in programs doing the same thing. It's not because the guy who wrote the Chrome Experiments are dumb. They are super smart. But now, there's a new tool in town that's more efficient than the one they used.

Caching seems a lot less flexible and a lot less intuitive than having a persistent object with manipulable attributes.

Well, to me, it expresses things at exactly the right level. It's an optimisation done by making objects persistent internally (at the expense of fluidity). I express it by talking about a "cache". It cannot be expressed implicitly, because only you can tell whether the cache remains valid or not (this is what the "version number" argument is for). Any case where we can cache implicitly, we try to do it.

There we go -- more personalisation. It enables you to create animations. It's an esoteric tool that fits the workflow that you built for yourself. It's not a general purpose tool.

Programming languages are never general purpose tools. But you happily jump from "not general purpose" (and, I believe, "I don't like the way it's done") to "only useful to its creator". This is remarkably false, both from a logic perspective, and from the conclusion you reach.

It was TFS wot did it. Because the text "interactive, data-rich presentations" was a hyperlink, it was underlined, and apparently led quite a few commenters to focus on the presentations side of things. And of course, multiple of your demos focusing on slides doesn't help either. You may not have mentioned PowerPoint, but you have presented the software in such a way as to evoke it.

This is a fallacy. PowerPoint and Tao3D are two presentation tools. Fighter jets and bicycles are two transportation devices. There are legitimate conclusions you can draw from these observations, but you can't draw the analogies too far, like "there is no market for fighter jets because nobody will spend hours learning how to fly".

As for PowerPoint not being a language, I see that as a side issue. Whether something is a graphical application or a text-mode language, it's still a computer-mediated tool aimed at getting an output. When I choose between a visual editor or a code editor to update a webpage, it doesn't matter that one is "language" and the other isn't -- I pick the tool that gets the job done most efficiently.

It does matter. It's a key design decision.

Have you ever written a Postscript program yourself? Probably not. Many HTML pages are generated. There are several graphical front ends for LaTeX. Tao3D can be programmed directly. But it can also be generated. As I suggested earlier, we have been working on a web-based editor for it. The fact that there is a language does not mean there won't be a GUI some day, but that there can be several GUIs.

Global state is often confusing, and there are lots of bug reports to prove it.

I strongly disagree. All graphics APIs on the market use global state. Where are the lots of bug reports "proving" something as vague as "confusing"?

Your global state is also inconsistent, in that your pen (to use a Logo metaphor) has colour and orientation, but lacks the most basic property: position.

But the "pen" is a Logo metaphor. Tao3D has no pen. So don't ascribe properties (or lack thereof) to a pen Tao3D does not have... So you are mixing metaphors, and then telling me that "my" global state is "inconsistent" with the inadequate metaphore you picked.

Global state leads to funky errors when you refactor and reorder code, and you break dependencies.

Nope. That's long been a tenet of the zealots of "pure functional" languages. But there's very little evidence to back this kind of assertion. In practically all languages, I/Os rely on massive global state. Some languages such as Haskell have used things like "monads" to sort of elude the problem. Now, using monads for I/Os, that's funky.

Going back to what I was saying earlier about properties vs execution steps -- if your colour was a property of the scope, rather than a state, if you were drawing a flower, then within the (repeated) petal component, the stem component etc, there would be a unique colour property, and that would be far easier to conceptualise.

And there are tons of things you could not do. Like rotating any shape globally in a predictable, non-commutative way.

As I said, OpenGL is low level. Tao3D should be aiming at high-level.

But your original objection was that it was "opaque". Seems to me it's more like "unknown" and "new", more than "opaque".

Ah, matrices... now I see what OpenGL is up to -- storing all cumulative operations in a single matrix to apply to all points, to avoid recomputation. And the persistent state is to prevent passing the same matrix back and forth between all procedures. In a high-level tlanguage, this can (and I would say "should") be abstracted out.

This is abstracted out. You never deal with matrices in Tao3D. They are an internal implementation details. As a matter of fact, we have massively refactored all the matrix computations somewhere during the life of the project, and we no longer use OpenGL matrix computations anymore. Yet none of our Tao programs were impacted.

Unless you're trying to make high-performance realtime apps

Yes, Tao3D is designed to let you create real-time apps, notably for presentation purpose. And that requires high performance.

in which case the "presentations" use-case is even more misleading, because you don't write high-performance realtimes apps just for presentations. Either you show the actual application, or you use prerendered video.

The problem is that you wrote you don't want when in reality, all you were entitled to write is I don't want. You can't tell me or others what we want.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Video tutorials (158 comments)

It's not implicit lists. Tao3D, like Lisp, is strongly homoiconic. In other words, it's primary data structure is used both for programs and data. In Lisp, that primary structure is the list. In Tao3D, it's the parse tree. Manipulating parse tree structures is fundamental in Tao3D programming.

Now, conceptually, you can correctly think of 1,2,3 as a list. But you could as well have 1;2;3, which is also a "list", except it's built with a different infix operator.

So when I write something like:
foo X,Y -> bar X; blob Y
I'm really describing is a parse tree transform recognising a prefix foo, which matches only if the right is infix with a comma, and will split that infix into its left and right components, and call bar, then blob with the components.

I could similarly do something like that:
[A..B where C] -> A-B
and that would only match a [ ] block with a child that is an infix "where", when the left child of that infix is an infix "..".

So it's very regular. It does what other languages call function calls, operator overloading, or even macros (because that process also lets you precisely control when arguments are evaluated).

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Point? (158 comments)

Sure. What I'm saying is that, from the numbers you've provided, your product clearly lots of room for improvement. Even with basic Latin, you're averaging 128 triangles/character for flat text!

While it's only 128 edges (not triangles, I had misinterpreted what I was counting), it was still worth investigating. And I modified the way Tao emits polygons to be more aggressive for small sizes. I also added user-controllable parameters in case the defaults are not suited for a specific use case. Code reviews and comments are welcome.

Thank you for your input.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Point? (158 comments)

from the information I had from you, produced 3d extruded text more efficiently.

Then you misinterpreted the information I gave you, because my point was that designer, ideographic or Arabic font have complex outlines. AFAICT, Three.js cannot use such fonts (maybe there's a trick I don't know).

What does Tao3D offer over competing products like these?

These are all great products. What Tao3D offers is:
1. It's notably cheaper, and now there's also a free software version.
2. It's a programming language. That being said, I know Ventuz can at least be scripted, not sure about the other two.
3. Stereoscopy and auto-stereoscopy are just a mouse click away. Ventuz can do some, but it was convoluted last time I checked.
4. Tao3D automatically checks if media, files, sources changed, and reloads them. Great for remote-controlled updates.
5. No need to import media, Tao3D uses media in place (that used to be an issue in Ventuz and Aurora3D, not sure if that's still true).

In a sense, Tao3D is to these tools what a web browser is to Powerpoint: open, extensible, flexible, but harder to get started with. And in this analogy, we see the web-based interface in Tao3D as the equivalent of Wordpress, i.e. a solution to separate concerns between editors, page designers and media content producers.

Does that make sense?

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Point? (158 comments)

Ah, I missed your point completely in the GP. Sorry.

The problem it addresses is the complexity of creating the simplest 2D or 3D scripted animation, and how this process does not scale or compose well.

Here are a few random examples:
* Create Christmas card pictures for all my friends that are automatically tailored for each of them.
* Display fragile objects in a museum, photographed in 3D (or scanned), shown in 2D, in 3D or in glasses-free 3D
* Display complex data or simulations for a scientist, in a way that can be explored interactively or shown at conferences.
* Teach about fractals by showing interactive models of various fractals.

I'm conscious that with enough effort, some of these can be done with other tools. The purpose of Tao3D is to reduce the effort manyfold.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Tried to install on Yosemite - failed: (158 comments)

Sorry about that. Bug in the packaging script. Should be fixed now.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Most uninteresting (158 comments)

I don't see the lambda calculus in your example.

There was none, indeed. In reality, Tao3D is based on tree rewrites, not lambda calculus.

I'm exploring a bit here what the implications are. Quite frankly, the type system as implemented is totally incomplete and still largely broken at the moment. I understood what needed to be done after 5 years of experimentation, and never got the time to actually implement it. Similarly, the language reference describes a runtime environment for functions, how closures and symbol tables are defined, etc. I prototyped this and got a basic compiler half working, so I know it will work. But the symbol table in Tao3D is a more ancient design, in C++, not visible to the program.

That being said, there are "anonymous tree rewrite" notations very similar to lambda calculus. For example, here is how you can draw an almost convincing Christmas tree:

color "darkgreen"
foo with (X -> 3*X^2+7) with 1..8, 2..4

foo R ->
        rectangle 0, 0, R, 18
        translate_y -20

The with operator here implements a map, i.e. we apply foo with the result of an anonymous rewrite (that's the "lambda") with a list made of values 1 through 8 and then 2 through 4.

The filter operation is implemented with another syntactic form:

foo with (X where X mod 2 = 0) with (X -> 3*X^2+7) with 1..8, 2..4

There's also a reduce operation, but it crashes the compiler at the moment, need to see why:

foo (X,Y->X+Y) with (X where X mod 2 = 0) with (X -> 3*X^2+7) with 1..8, 2..4

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Point? (158 comments)

With my computer, a code editor, and the (easily accessible) documentation. It took about 10 minutes.

I meant: you probably have some code that looks like:
var geom = new THREE.TextGeometry(T, { size : S, height: H, curveSegments: CS, font: F });
I was interested in the parameters to that code.

That statement is either completely false or incoherent. Care to give it another go?

Unless you are rendering bitmap fonts, at some points, your glyph outlines are first rendered to the texture. It may be 2D, chances are it's still done by the graphic card on modern systems.

Sure. What I'm saying is that, from the numbers you've provided, your product clearly lots of room for improvement. Even with basic Latin, you're averaging 128 triangles/character for flat text!

Actually, you are right, the code I quickly implemented was counting the array elements, not the polygons. So, roughly, the number of edges, but counting terminating edges in triangle strips multiple times. My bad. I guess I'm getting tired. The point I was trying to make remains valid: some real fonts (as opposed to the toy fonts in Three.js) quickly generate huge amounts of polygons.
As another illustration of my point about WebGL, I can see the Three.js geometry / text example on my iPad, but not on my iPhone 4 or my Android tablet. Maybe you are more lucky with your BlackBerry...

I'm still not convinced the project offers anything over existing solutions.

I'm sorry I did not convince you. But Tao3D does offer a lot over existing solutions.

First, Tao3D is the only practical solution I know for delivering interactive 3D animations, simulations or presentations quickly. What you can do with Tao3D in 25 lines of code is nearly impossible today with Three.js: no support for real TruType fonts, no text layout for 3D meshes, no RTL text support, etc. And I'm just talking about text here. We can do full slides in 3D with 25 lines of code when Three.js is barely capable of doing one line of text in 600+ lines of code at the moment, and then only with relatively serious 3D programming. Tao3D requires 24 times less lines of code. And you say we bring nothing new?

That brings me to the second big contribution. Even if you add text layout features to Three.js, you will still be working at the wrong semantic level, talking about meshes and renderers and such. Again, someone might work this out the way Reveal.js attempted to do for slides. But Tao3D does this today. Today, with Tao3D, you talk about "slides" and "paragraphs" and "color", because that's what you care about.

Finally, a third innovation in Tao3D (though not in the libre edition) is transparent support for practically every stereoscopic or auto-stereoscopic screen under the sun. So you can playback 3D movies without glasses, superimpose 3D text and logos, etc. In the digital signage space, Tao3D brings glasses-free 3D screens at feature parity with 2D screens. And that's also a pretty significant contribution.

I can understand your need to defend it against any and all criticism, real and perceived

Not any criticism. Against uninformed criticism, of which there is a lot on Slashdot, unfortunately.

How is your startup going? What markets have you found the most success? Where do you see the product in the future?

I noticed your "failing" startup comment earlier, don't worry. Like any startup, not enough cash, too many ideas, not enough people, too many things to do, not enough time.

Our current markets include exhibitions, e.g. trade show, museums, etc, high-end presentations, scientific data visualisation and 3D advertising. Others we know we can address include education, point-of-sales, automated image processing and generation, ... And if 4K glasses-free 3D TVs start taking off, we can deliver a 3D GUI for set top boxes today. As far as I know, nobody else is close.

As for where I see the product in the future, please allow me to keep that to myself for the moment.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Point? (158 comments)

Just to clarify, the poly counts I gave were actual triangles processed by the card when disabling texture-based rendering in Tao3D. This is the only case that always works, so it's both the fallback scenario and the worst case scenario. Therefore, that's the one I'm most interested in.

Not extruded? Why not render the text as a texture and slap it on a triangle strip?

Obviously, Tao3D does that when that's possible.

Why not render the glyphs as a large texture and make clever use of UV's?

Tao3D also does that when it makes sense.

(You'd use more triangles, 2 per character

Hmm, how do you draw a glyph with only one triangle per character? Or do you mean that we can use two triangles for multiple characters? We also can store full words in the glyph cache. But currently, we only use that for languages with ligatures such as Arabic.

but that's still way fewer than the approach you're using.

May I suggest that you should study how the Tao3D code works a little more before being so dismissive ;-)

You might also want to look at other, clearly more efficient, solutions. Take a look at three.js's ShapeGeometry. and ExtrudeGeometry -- A quick test shows great quality, with far fewer triangles.

Quick test with what? How did you create a text mesh with Three.js to start with?

Furthermore, as soon as you extrude, you need true polygonal rendering. You can't draw on a texture and render quads or two triangles as you suggested. Or if there's a way, I don't know it. So you end up with roughly the number of polygons in the base glyph x N, where N depends on extrusion parameters, e.g. if you create a bezel or not, if you round the bezel, and so on.

That being said, if you want the text to look any good, you have to emit a large number of triangles for even relatively simple text.

On the basis of my experience, I strongly disagree.

Would you please be kind enough to share your experience? That's a hot topic for me.

First, I'd like to point out that even if you can do texture-based rendering, you still need to first render to a texture with polygons or, alternatively, with triangles and a shader doing the Bezier fill.

Let's deal with two cases here. The first case is when texture-based glyph caching applies. In that case, polygon count is rarely a problem for alphabetic languages. For ideographic languages, or languages with ligatures such as Arabic, the chances of finding what you need in the glyph cache are lower, but you can still assume you will draw the same text several frames in a row, so that's still a net win. The animation may skip a bit when the text changes though... So basically, the glyph polygon count defines the worst case "skip" you can get. And westerners don't care, since they use a Latin alphabet with an appropriately low number of glyphs. So in general, we can reuse entries in the glyph cache.

Second case is when you can't use textures. Extruded 3D text is one scenario, that's hardly the only one. Then, you need true polygonal rendering. And the number of basic triangles you had for the front face is multiplied by N, which depends on the shape of the extrusion path (bezel, rounded bezel, etc). Plus this time, you need to render the polygons at every single frame, so polygon counts start playing a big role in performance.

In all cases, even with an curvature-dependent algorithm, you still need a decent number of polygons per glyph or any non-basic font looks like crap. I think the best you can do is something like one triangle per Bezier curve in the glyph (unless you want your shader to become really something). Without a Bezier shader, you need at least 5 or 6 times more (depending on how sharp the curves are). In the extrusion case, you can't use textures, and you can't use Bezier shaders either.

In short, drawing "Hello World" spinning in 3D Arial font is something that anybody can do. Fetching text from an Arabic or Chinese news site and drawing that on the screen continuously, that's a different challenge entirely, and one I reckon a Blackberry won't be able to deal with too happily. At least, that's my opinion today. You may easily prove me wrong by porting Tao3D to a Blackberry :-)

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Video tutorials (158 comments)

Thought for the day: whenever designing something for other people to use, you should take all feedback from your potential users and prove to yourself why the feedback is correct before attempting to show the giver why it's wrong.

Oh, I got it backwards then. I thought you had been trying to prove me wrong all that time... Sometimes, you were right (e.g. black characters on black background). Sometimes, you've made a good point (e.g. align_vertically). Sometimes, I feel your point is less convincing (glTranslate and glColor). Sometimes, I think you are plain wrong (global state is evil), and I express disagreement. That's how a discussion goes. I enjoyed it, sorry to hear that you did't seem to.

if your default response is to prove to everyone that their feedback is so valueless to you

If it felt so valueless to me, do you think I'd still be watching for your answers and typing this in the middle of the night? I don't claim to be perfect. Please reciprocate.

Exercise for you: go **** yourself. That's just patronising.

No, that's trying to help you become an early contributor. I would not have spent the time locating the exact line to patch otherwise. Remember, open source is about you and others being able to influence Tao3D. But since you obviously don't want to do it this time, I patched it myself. Your name in lights, tadaaa.

If we were just talking about text flow in a 2D page, I would agree with you

Well, text layout is still done in a 2D text box. So align specifies the horizontal alignment and justification within a line (the frequent case), and align_vertically the alignment and justification of the lines and paragraphs vertically.

I understand that, but it's wrong. I know a lot of people laugh at the idea of using setColor and getColor as per so many OO style guides, but really, you either need to use assignments or use verb-based names, or the syntax is broken from a human cognitive perspective

It's an interesting point. Tao3D actually went the other way. A setter and a getter for a property typically have the same name. So to adjust the stereoscopic effect, you can say something like eye_distance 20, and that adjusts the property you get with eye_distance. To get the current theme of a slide, you use theme, and to set it theme "Master". I personally see the 'set' and 'get' in that case as noise. But I will admit it's a matter of personal taste. I hope you will understand that Tao3D reflects my tastes and not yours.

At the limit, we began implementing (but never finished) a system of properties named x, y, width, top and so on for coordinates. You could then use any of the following three, to your liking:

rectangle 10, 20, 30, 40
rectangle { x 10; y 20; width 30; height 40; }
rectangle { left -5; y 20; width 30; bottom 0; }
x 10; y 20; width 30; height 40; rectangle

Much like for color, the last one would also set the properties in a persistent way for following shapes to use, much like color or texture today. This means you would then be able to say something like left 20 to left-align a bunch of shapes. It's not done yet, but still in the plans.

They are broken. If you aren't willing to fix the real problems with languages, why write a new one in the first place? Why not just write a library?

I find your use of bold font and "broken" quite antagonistic to your statement that two people can be correct at the same time. You call this a real problem with languages. I just don't see it. Specifically, I don't see color "red" or glColor as broken. In doing so, I'm not saying that you are wrong, but I am not convinced by your attempt at proving me (or OpenGL) wrong either. I see it more as a taste than as a matter of right or wrong.

"show" changes state? That's not what I would expect from the English word. To "show" is just to display, present or make visible something that already exists.

In Tao3D, there is a global "visibility", a floating point value between 0 and 1, that applies to all drawings. When you use show, you change the visibility. Granted, not the best choice of verb. Find a better one, and I might patch that as well. Or you might submit one if you don't go all ballistic again at the suggestion that the code is open :-)

It's not FUD [...] But if what is conceptually one thing is distributed, you might miss a bit and attempt to define two cases for the same input pattern.

What happens in that case is well specified by the language. You know which pattern wins. Just like if you have a global variable named 'i' and a local variable named 'i' in C, you know which one is selected by the compiler. It might lead to bugs. And in the case of C, it has.

The FUD is using the might as an argument against the feature. If you read the subtext, "Be afraid of the possible consequences" turns into "That feature is evil" turns into "Don't use that language". That's the very definition of FUD in my book. Which does not mean that the fear is unfounded, by the way. But it's on the same level of risk as naming conflicts in any language. Good naming or pattern usage conventions deal with it quite well. I have yet to run into such a conflict myself.

PowerPoint users don't need that much power.

Powerpoint users are not my user base. Tao3D is to Powerpoint what a fighter jet is to a bicycle. It takes more skills and time, you can't use for your everyday shopping/business talk. But if you know how to use it, you can take advantage of the third dimension. So Tao3D was designed for those users who need the power.

in all likelihood users will be writing very, very small programs

Actually, no. One of our first users actually wrote a C++ module to read some scientific data. A typical commercial use of the software is around 5K to 10K lines of code. So not very big, but not "very, very small" either (especially given what you can do in 10K lines of Tao3D).

Your users need something that is simple, straightforward, and tightly constrained. I've worked editing company collateral, and if I'm sent a slide deck at 9:30am to use for a lunch-time meeting at 12:30, I want to be able to go in and change things quickly, without having to debug all the side-effects of persistent-state code. This means I'm not going to be able to reliably adapt and update the slides as things change.

Actually, that's not true. One thing my customers appreciate is that I edit stuff while it's showing on a projector, from a text editor in a window on my laptop. And for common tasks that fit well in a standard template, we have the web-based editor, that generates code for you.

Most of your potential marketplace aren't programmers, I am, but even I wouldn't be able to use your product in a business environment.

I agree. This is why we have the web-based and template-based editor. The idea is that you have samples of code with parameters, and that the web user interface lets you tweak only the parameters that the template designer left open. This is still work in progress, though. Most templates remain to be added.

I am an exceptionally good user to listen to, but instead of taking my input, you're telling me I'm wrong.

Did you make the "Powerpoint" argument before? Did I tell you you were wrong, ever? You write "wrong" all over the place, and "broken" in bold, not me.

Just curious, what do you mean by "exceptionally good user to listen to"? I know very little about you, sorry to ask.

First rule of startups: don't assume you know the answer

Second rule of startups: bring something new. So we don't do a Powerpoint wannabe. For that, there's Keynote, Prezi, and dozens of dead products. And LibreOffice Impress if you want free software.

(in my opinion as a potential expert user of your product, remember)

This is a bit my problem here. You already consider yourself an expert when you have not used Tao3D for one week. You are not an expert at Tao3D, sorry. Yet you insist on telling me everything I did wrong. Not helpful.

So why does the demo redraw the shapes with different colors at every frame? Because that's what my program was requesting, that's why. Now if you want to know more about the execution and drawing model of Tao3D, read this. And you'll see that it's a bit smarter than re-creating everything every frame.

No, that's what makes it hard to use. You're the designer, I'm the (potential) user -- it's not your job to tell me what I find easy or not.

Are you positioning yourself as a user, or as an alternate designer? Apparently, you tell me "this design is not good, you should have done it that way", without even having tried our current design. You think you became an instant expert by watching one video on YouTube? You think you can demand changes in the design because you are a potentialuser?

More to the point, the alternative designs you are referring to are well known. This is the model in WebGL, for example. Why do you think the DNA example would be easier to code in WebGL, Three.js or something similar? Here is a DNA-like structure, without text (that would be harder with WebGL). It's 139 lines of code, not counting the many Javascript libraries required to do it. My DNA example is 42 lines of code, with the text. That's one objective measure of simplicity...

In short, I'm not telling you what you should find easy or not. I'm telling you what I find easy or not, and I don't take at face value your theories when my own experience contradicts them. My experience tells me that Tao3D code is short, easy to write, easy to read, to the point. And that all the alternatives I tried are nowhere as good for the specific things that Tao3D is designed to do.

From the point of view of a non-coder (or even many coders) the idea of recreating the same "artefact" for each frame is confusing.

To me, talking about "frames" or the "creation of shapes" is already pretty confusing. Conceptually, drawing is immediate. The fact that it actually is not is an implementation detail.

But of course, optimising drawings and computations is important. So there are tools like cached or frame_texture to cache 3D or 2D drawings. Here is an example with cached if you are curious.

It's that word "powerful" again -- a long rope is more powerful than a short one, but it means giving the user enough rope to hang themself.

Hmmm, that does not seem to match the quote line just above that sentence. Not sure where this was supposed to go...

Again, the job of a designer is to be better than what has come before

Yes, I agree. Tao3D does something no tool I know ever did before. It enables me to create powerful real-time 3D animations in minutes. That, it does better than what has come before. The rest, I don't care. And even if I generally use Tao3D rather than Powerpoint, that does not mean it's meant to be a replacement. Powerpoint has never been described as a "programming language" that I know of. Yet if you look at the title of that Slashdot story, it says "Programming language". You brought up Powerpoint, not me.

Anyway, the original point in your criticism was that global state was evil (if I understood correctly). I answered: no, it's perfectly fine, and there are tons of industry standards to prove it.

Because the whole system is utterly opaque... Not going to use it.

Well, the source is open, there is a lot of documentation, there are many examples. The drawing logic you criticised is modelled after OpenGL, arguably the leading 3D API in the industry. What else can I do to make it less opaque? Or, by "opaque", do you mean that you are not yet familiar enough with it to understand how it works? If that's really the problem, give it a couple of weeks.
To answer the question about what you rotate: it's the objects, or what OpenGL calls the "model/view matrix". So if you say rotate_z 20; rectangle..., it's the rectangle that you rotate. Just like if you say color "red"; rectangle... you apply the color to the rectangle.
As for not using it, you are a free man! I still hope Tao3D will prove itself useful to you someday.

There's something missing here, but I can't quite put my finger on it....

Of course, you realise that it's by design that we don't force our users to type useless zeroes and to write rectangle 10, 20, 0, 30, 40, 0? For the 3D version, there's cube for example. You can also extrude 2D shapes to give them a 3D look.

You could have achieved consistency by using coordinates and vectors as abstract types

Again, playing the role of the designer here, not the user. There are dozens of other ways this could have been done. Your idea of consistency is different of mine, and your suggestion does not feel like an improvement to me. But again, the code is open. If Tao3D gives you an idea and you want to fork it to create a high-consistency version with abstract types and n-dimensional vectors, you have my blessing. But suggesting I should have done this your way or else it's broken is not helpful.

And yet people don't define PowerPoint slides by a series of command-line directives, and more people write letters in Word than LaTeX... You really need to remember who your audience is.

My audience here is Slashdot. Which last time I checked was "News for Nerds", not "News for Suits". I'm not looking for Powerpoint slide pushers. If you are a good enough coder to be able to use Tao3D instead of Powerpoint, go ahead. If you want your pointy-haired boss to reuse your slides... don't count on me. I described a programming language for 3D animations. If you really want a 3D Powerpoint, check out Aurora 3D.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Video tutorials (158 comments)

I don't like subroutine names that include something that looks like a parameter, so things like rotatex and rotatey set me on edge a bit.

If you prefer, you can use the plain rotate. But rotating along X, Y or Z is frequent enough to deserve a shortcut. Not different from CSS transform, by the way.

It gets worse when this is inconsistent, and you see a subroutine called vertical_align for vertical alignment, where the seeming parameter (vertical) is now before the generic (align), and separated by an underscore instead of run together. Not only is this an internal inconsistency, but it's inconsistent with English, as "align" is a verb, and we would put in an adverb "vertically" after the verb normally. And then it gets worse again, as the command for horizontal alignment is... "align".

You are right, align_vertically would be more sensible. Exercise for you: fix it ;-) As for align, that's the common case, so I'd rather keep it that way.

The grammatical inconsistency continues with other commands/subroutines taking on names with no verb component at all (eg the command color, with no verb or assignment operator.

That derives from OpenGL, which has glRotate and glTranslate, but glColor and not glColorize. BUT it's not inconsistent. It's actually fairly smart. The color is an attribute, and glColor just sets it. So the name is the name of the attribute you set. glRotate and glTranslate modify an attribute (the current model/view matrix), so they are verbs. Unwittingly, I applied the same logic for things that change the color state, e.g. show. Since show changes the color state, it is a verb.

I'm really not happy with the way pattern matching is used as overloading ...because you can get yourself in a mess if you split it up into different parts of the code and accidentally overwrite stuff.

How is this different from overloading? That's a FUD argument. In reality, its distributed nature is exactly what makes the construct powerful. It offers a very flexible dynamic dispatch mechanism.

For example, the Slides module draws a background for slides using theme_background. That function is provided by the default theme. But most themes will override it.

In general, this override happens only on part of the pattern. For example, most slide elements are defined by (theme, master), sometimes (theme, master, style). The "master" is the equivalent of the Powerpoint "slide master", i.e. it defines the layout, etc. If you define a new theme, you'll typically define overrides that catch everything for a given theme (e.g. for "BrightRectangles" in the last link). But you may also want to override for a specific combination.

I'm completely baffled why the whole demo recreates the shapes for every single redraw frame rather than keeping them as persistent objects (which necessitates adding a random seed in order to fake them being persistent by pulling up the same colours each time.

The Tao3D drawing model is a feature, not a bug. If you write rectangle 0, 0, 320, 200, it draws the rectangle once, and that's it. If you write rotate_z 6 * seconds; rectangle 0, 0, 320, 200, it redraws it once per second. If you change the color at every frame, then of course it has to re-create it every frame... That's what makes it dynamic and simple to use.

(The demo also demonstrates the whole potential of doing too much and drowning yourself in flash -- notice how DNA letter codes are added, then promptly disappear in a black-on-black clash and are forgotten about.)

Ah, funny, I had not noticed that... Well, don't count on me to re-record the video just for that ;-)

But the worst part is the way these rotations and coloring statements create a hidden state that affects things below in an opaque manner...

Can you cite an example of a drawing API or language that has no opaque drawing state? Windows GDI, Cocoa, OpenGL or X-Window have a drawing context. The more advanced ones have a current drawing context, because passing a hDC to every single function adds strictly zero value to the code...

and I'm not even sure it might not effect stuff above it.

It doesn't (except if there's a funny bug somewhere). Why would you even imagine that?

There's a remarkable similarity between everything I've just said and the criticisms I've read of processing/processing.js (eg Bret Victor's opinions on Khan Academy's coding tutorials [worrydream.com]), so I'm guessing this was very heavily inspired by Processing's 2D canvasses....

The problem I have with the article you linked (which is very interesting, by the way) is that it only focuses on learning something, not on actually using it. Let me just give an example. The article asks (rhetorically):

That UI is exactly as informative as this line of code:
ellipse 202, 208, 300, 300
Why do we consider the code acceptable and the UI not? Why do we expect programmers to "look up" functions in "documentation", while modern user interfaces are designed so that documentation is typically unnecessary?

The reason is simple: the first time I learn about an ellipse, I might prefer
        horizontal_position_of_center_in_pixels 202
        vertical_position_of_center_in_pixel 208
        width_in_pixels 300
        heigh_in_pixels 300

But if now I have a small example with 4 shapes like this, I go crazy at the third one. Even more so if all graphic shapes have the same parameters in the same order, i.e. always X, Y, W, H. As is the case in Tao3D.

It's OK for a user interface to put explicit labels on dialog boxes because I don't have to type them every single time I use the f...g dialog box...

So why do we use a keyboard to enter programs? Because it's the fastest way we have found so far. There are graphical programming languages, but they are restricted to toy experiments. As long as we have to type programs in, we might as well type as little as necessary...

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Grammar ? (158 comments)

Suddenly you have to look in dozens of different places to verify what the most basic features of the language are.

Not really. The parsing is defined by xl.syntax, a file that currently contains 62 lines, so it's not complicated. The semantics, on the other hand, comes from libraries, including some that are built-in. In the case of base XL, the library components implemented in XL are in builtin.xl, and the components implemented in C++ are in basics.tbl.

But XL and Tao3D put way more in libraries than regular languages. Remember when we moved from BASIC to C? In BASIC, the 'PRINT' statement was a keyword. In C, 'printf' was a library routine. I argue that the C approach is superior. So of course, an exhaustive catalog of C libraries today is a bit difficult. And there are inconsistencies. But it's still superior.

Lisp has a tiny grammar and a small standard, and that leaves us buggering about with a visual confusion of brackets and parentheses.

And XL as a grammar that is just a little bit less tiny, just enough so that you can get rid of the parentheses.

if the basic behaviour of the language is overridable at will, then it is not consistent from day to day, or from job to job.

That's already the case in any language today that has libraries provided by more than one person. Where is the consistency between C's printf, C++'s iostream and Qt's logging facilities?

XL helps you create new notations that are well suited to the task at hand. It does help you make these notations consistent or useful, not any more than a C compiler makes the name of your C functions consistent or useful.

Why on Earth is anyone going to want to override operator precedence for making a presentation?

Because it lets me define operators such as * ** and *** for bullet points, for example, so now I can write slides like this:

slide "Example",
      * "First level bullet"
      ** "Second level bullet"

There are more interesting things you can do with custom notations. Here is an example using the Animate module:

import Slides
import Animate

picture_slide "Page 1",
        page_duration 10
        [0..3, ]
                color "red"
                circle 300 * smooth_ratio, 100, 20
        [0..3, ]
                color "blue"
                circle 300 * ratio, 0, 20

        [0..6, 9..10]
                color "green"
                circle 300 * down_ratio, 0, 20

        mouse_x in [0..1000]
                color "pink", 0.3
                rotate_z 90 * ratio
                rectangle 0, 0, 300, 200

picture_slide "Page 2",
        page_duration 2, "Page 1"
                text "We'll return to page 1 shortly"

Once you have learned that Animate gives you a notation [A..B] to indicate when to do something, that the notation X in [A..B] is the same thing with arbitrary values (not just the page time), and that there are variants such as [A..B, C..D] for back-and-forth motion, it becomes really useful, easy to read and quick to write. I can't voucher for your capability to remember this notation, but it turns out this one I did not invent, yet I use it regularly.

That's technically possible with any language

No. The parse tree of most languages can't be shown in such a simple form. In some cases (C++ comes to mind), you can't even parse without a good deal of semantic analysis.

I'd like to see your response to that.

Will do.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Point? (158 comments)

For the algorithms, I'll let you look at the code :-) It's mostly in path3d.cpp, text_drawing.cpp and glyph_cache.cpp.

There are several algorithms that are activated separately depending on: whether you draw flat text or extruded 3D text; whether there's a texture or not; the size of the font; and more. The primary ones are: render to textures and draw quads, render polygons for the outline and play that back, or extrude the outline with triangle strips. Then there are some tricks to minimize the number of triangles emitted. I also tried an approach where we rendered triangles and there was a fragment shader doing the bezier curve inside each triangle. That was surprisingly very inefficient on many low-end graphic cards, so I stashed it without going through with it.

That being said, if you want the text to look any good, you have to emit a large number of triangles for even relatively simple text. The text of the previous paragraph is 69475 triangles in Arial, 138950 when extruded, 171298 polygons in font "Amaze" not even extruded, 265636 with the font "Be safe", 561930 with font IthornÎt, and ... a whopping 2171202 with Apple's "Chalkduster" font.

That still doesn't answer my question about what you think is lacking in WebGL.

1. Performance (which is getting good on desktop-class devices thanks to improvements in Javascript compilation, but still terrible e.g. on mobile devices).
2. Portability. I gave as an example the fact that using a mere GLSL shader as a background on my tutorial page made it unusable for a good fraction of the readers.
3. At the time we started, Microsoft still had the position that they would never support it. They changed their mind only last year, remember? So anybody using IE before 11 has no WebGL.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Grammar ? (158 comments)

Except when it doesn't just work and you have to debug, because then what you describe as "dynamic" starts to feel like "unpredictable" and it takes far longer to work through than it should. I've only looked at a very small example, but I cannot imagine myself ever trying to teach how to program in this language. How do you teach someone to think like something with very little internal logic or consistency?

The fact that its grammar cannot be expressed as EBNF (like Ada) does not mean that it's not precise and consistent. You look at some input and at the xl.syntax file, and you know exactly what parse tree you are getting out of that input. You look at the various rewrite rules (the things given by the rewrite operator -> and you know exactly what's going to be executed and why.

Overall, the grammar is much more consistent than most other languages, if only because it's so small. As I indicated elsewhere in this discussion, scanner and parser together represent some 1500 lines of C++ code, and a syntax file that is currently 62 lines long. A complete and precise description of the core language in plain english takes about 50 pages. Compare that to the 700 pages for the C++ standard, and tell me which one is easier to teach?

If you want to look at your input in a Lisp-ish syntax, you can, there's an option in the compiler to dump the parse tree in such a format. If you build the command-line compiler for XLR, it will be xlr -parse file.xl -style debug -show. You can also try -style dbghtml to see it create HTML coloured boxes corresponding to the program structure. For example, if you have the default syntax file, input http://pastebin.com/TTbCKshW turns into http://pastebin.com/wxZX2Fc0. It's absolutely deterministic.

The additional grammar rules I mentioned earlier, e.g. the distinction between statement and expression, are there to match the way we humans read code. That's what concept programming is about.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Smalltalk made new keyword creation easy in 198 (158 comments)

So does this mean that Tao3D is call-by-value by default, and this explicitly breaks it to (effectively) call-by-value, rather than leaving the programmer to hack around with statics or constants and individual copies of arguments?

The locally function is conceptually equivalent to running its argument surrounding it with graphics state save/restore code. That's about it. So you can't deduce anything about call-by-value from it.

Now, to address your question in short, XL uses call-by-reference, and lazily evaluates the arguments as required to perform the call. Cases where you need to evaluate include: having to check against a type that is not "tree", comparing against a pattern, comparing for identity between arguments. For more details, see section 3.3. "Evaluation" of https://raw.githubusercontent..... You can also explicitly evaluate something with 'do'. In the 'if-then-else' definition given elsewhere, there is a 'do' for the bodies, to force evaluation of only that argument to if-then-else corresponding to the condition. If the condition is true, you only evaluate the true clause. If it's false, you only evaluate the false clause.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Smalltalk made new keyword creation easy in 198 (158 comments)

Semantic whitespace makes me sad. :-(

Maybe you never had to work in a large project where the project most productive guy did no care about indentation at all. Whitespace has a semantics for our brain, so we might as well make that consistent with the code. It reduces syntactic noise, in concept programming jargon.

about a month and a half ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:More Than 3 Clicks (158 comments)

I put the sample code on http://tao3d.sourceforge.net/ closer to the beginning. Hope that helps.

That being said, people don't seem to like the "Reveal.js" form factor too much overall. I may have to change that.

about 1 month ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Point? (158 comments)

Sorry, my example was confusing. It's not about RTL it's about number of polygons. Writing most non-latin scripts in small font size tends to create zany numbers of polygons. Same thing with a few contorted latin fonts.

about 1 month ago

Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations

descubes Re:Grammar ? (158 comments)

having noted the somewhat high-nosed, arrogant tone of your answer

Too bad you failed to note how high-nosed and arrogant your own "Seriously...!" sounded :-)

Anyone into compiler construction and wanting to / trying to use your language would want a grammar

Let me disappoint then. I don't think you can even write a valid EBNF for XL, it's too dynamic for that. Let me explain why.

First, scanning and parsing are really very simple. The scanner is 747 lines of code with comments. The parser is 659 lines of code with comments. The scanner produces a stream of tokens. The parser produces an abstract syntax tree built with exactly 8 node types: integer, real, text, name, infix, prefix, postfix or block. The abstract syntax tree is used both for code and for data. A list such as 1,2,3,4 is really a sequence of infix "comma" nodes with integers as leafs.

What makes it difficult to produce a valid EBNF for XL is that the precedence rules between operators are dynamic. They are initialised from a file called xl.syntax, but they can be changed at run-time. So, of course, I can write an EBNF for if-then-else that would be something like:

if then else = "if" condition "then" statement "else" statement

But that would be imprecise. In reality, with the default syntax, if X then Y else Z parses as (infix else (infix then (prefix if X) Y) Z) (using a Lisp-like notation). That happens because of the specifications of infix priorities for then and else given in xl.syntax. Furthermore, the meaning of this particular parse tree is only given by a "rewrite", i.e. a definition such as if X then Y else Z -> ifthenelse(X,Y,Z). It is intentionally not given by a grammar of any kind. Definitions like this are even more dynamic than the priorities. They are the XL equivalent of functions, so you use them all the time.

Even writing a valid EBNF for integer literals would be hard. XL accepts 16#FFFF_FFFF as a valid integer, but 12#FFFF is not valid because F is not a valid digit in base 12. Ada has the same problem, and most EBNF descriptions of based literals for Ada are wrong. This one for example over-simplifies things and considers 12#FF# as a valid number when I assume any valid Ada compiler would reject it. Of course, you could enumerate all the 36 cases to have a valid EBNF that actually represents the language, but at some point, you have to ask: "what's the point"? And if the idea is to describe a language that is only approximately XL, taking more space to do so than the valid C++ code describing what XL actually is, then that's another big "what's the point" in my book.

Finally, there are a number of priority-based shenanigans that were introduced to make the language easier to use, but make it even more complicated to describe in EBNF or anything like it. Here are two examples.

When you read write -A, you normally read this as "write(minus(A))". On the other hand, if you write A-B, you probably read this as "minus(A,B)". It's not logical, but that's how we read. That leads XL to pay attention to spaces surrounding operators to decide what you mean. I hear you "yuck", but it just works.

Another scenario is even worse. Consider write sin x, sin y. All the people I tried that with read it as "write(sin(x), sin(y))". Problem is that this reveals a priority inversion in our brain. If the comma has lower precedence than function calls, then it should read as write(sin(x)), sin(y). If it has higher precedence, then it should read as write(sin(x,sin(y)). None of them is right. For this reason, XL and therefore Tao3D have a notion of "expression vs. statement" implemented in the parser. Again, it's "yuck" for formal grammar nazis. But again, I don't care, because it just works.

about 1 month ago



Tao3D: a new open-source programming language for real-time 3D animations

descubes descubes writes  |  about 2 months ago

descubes (35093) writes "Tao3D is a new open-source programming language designed for real-time 3D animations. With it, you can quickly create interactive, data-rich presentations, small applications, proofs of concept, user interface prototypes, and more. The interactivity of the language, combined with its simplicity and graphical aspects, make it ideal to teach programming.

Tao3D also demonstrates a lot of innovation in programming language design. It makes it very easy to create new control structures. Defining if-then-else is literally a couple of lines of code. The syntax to pass pass blocks of code to functions is completely transparent. And it is fully reactive, meaning that it automatically reacts as necessary to external events such as mouse movements or the passage of time.

The source code was just made available under the GNU General Public License v3 on SourceForge, GitHub and Gitorious."

Link to Original Source

Visualize one billion data points in real-time 3D

descubes descubes writes  |  about a year ago

descubes (35093) writes "The Observatoire de la Cote d'Azur uses Tao Presentations to display simulation results that contain over one billion data points. Because they were now able to circle around the data very quickly, researchers could now look at it from a large number of angles. And guess what? Seeing is understanding. Very quickly, new structures emerged from the data, such as a star-shaped pattern in asteroid collisions. Bringing interactivity into data visualization helps research progress faster."

Try real-time GPU-based stereoscopic raytracing at home

descubes descubes writes  |  about 2 years ago

descubes writes "GPUs are powerful enough to do real-time ray-tracing nowadays, at least for simple scenes. Getting a 3D TV is really easy these days. So why not combine the two? In this demo, Taodyne demonstrates a simple real-time ray-traced scene, how you can interact with it, and how you can use it to render real 3D on stereoscopic displays. With sufficient GPU power, this technique even works on glasses-free 3D displays. And of course, you can use a number of other GPU tricks, like shaders from ShaderToy to add a little life to your slide elements. This is all based on freely downloadable software and widely available hardware, so you can try this at home now."
Link to Original Source

Live coding: A 3D DNA strand

descubes descubes writes  |  about 2 years ago

descubes writes "Old timers may remember Logo, an interactive and graphical development environment that made it possible to explore ideas very quickly and made it fun to discover programming. A recently posted live coding tutorial shows the same basic idea applied to interactive 3D. In the video, an animated strand of DNA is constructed step by step simply by typing a simple script and looking at the result in real-time."
Link to Original Source

Create 3D animated slideshows in minutes

descubes descubes writes  |  about 2 years ago

descubes writes "With animated backgrounds, 3D objects, YouTube videos and true stereoscopic 3D, all controlled by a dynamic scripting language, Tao Presentations is not your average presentation software. The latest release includes new easy to use themes to make it easy to create amazing animated slideshows in minutes."
Link to Original Source

French entrepreneurs use pigeons against "Startup Killer" finance law

descubes descubes writes  |  more than 2 years ago

descubes writes "There’s been a recent flurry of activity on twitter around the #geonpi hashtag. What is going on?

The short version is that French entrepreneurs are all up in arms against the French budget law for 2013. On the surface, one aspect of the law is intended to align the taxation of capital on the taxation of other revenues. But the reasons that entrepreneurs react is that, in practice, the new taxation may well make the creation of startups in France completely untenable."

Link to Original Source

Converting RSS feeds to a dynamic 3D scene in 120 lines of code

descubes descubes writes  |  more than 2 years ago

descubes writes "Tao Presentations is a 3D presentation tool based on a 3D dynamic document description language. This makes it very easy for developers to create their own 3D shows, illustrate talks in an innovative way, even build small interactive 3D applications. An example included in the latest release grabs RSS feeds from a variety of sources (including Slashdot) and turns them into a 3D scene, all in real-time and in about 120 lines of code. It fetches the pictures directly from the web site and maps them on 3D shapes. And this is only a starting point. Tao Presentations can display 3D objects, drive the majority of 3D displays (including glasses-free 3D displays from Alioscopy, Philips or Tridelity), use GLSL shaders for advanced effects, and much more.

Tao Presentations is free (as in beer), and the document description language is based on the free (as in speech) XL programming language. If you get bored of Powerpoint and are looking for a more stimulating alternative, Tao Presentations may be what you were looking for."

Link to Original Source

Google News, Slashdot and Twitter in 3D

descubes descubes writes  |  more than 2 years ago

descubes (35093) writes "Looking for a cooler way to create twitter walls or read Slashdot? The latest demo of Taodyne's Tao Presentations renders RSS feeds from Google News, Twitter or Slashdot as a 3D scene in real-time. All it takes is about 120 lines of simple code to break down the data using regular expressions, and then create a dynamic scene containing texts, pictures, animations..."
Link to Original Source

Do you prefer your app blinking or upside down? (video)

descubes descubes writes  |  more than 2 years ago

descubes writes "It looked like a simple bug: an OpenGL application that blinks in full screen. But the rest of the day was an infuriating tale of Kill All Humans installers and Beware of The Leopard DRM restrictions. And at the end of the day, an unanswered question remains. What kind of driver bug could possibly cause an OpenGL application to blink in full screen, unless the display is rotated?"
Link to Original Source

Control avatars and 3D worlds with Kinect

descubes descubes writes  |  more than 3 years ago

descubes (35093) writes "The Kinect is more than just for games. SimplySim, a French startup making it easy to build 3D simulations and applications, has just posted a video showing how you can interact with photorealistic simulations just by moving the body. Is the Minority Report user interface finally becoming a reality?"
Link to Original Source

Stereoscopy: What works, what doesn't

descubes descubes writes  |  more than 4 years ago

descubes (35093) writes "We have been looking for a relatively cheap way to present the output of a 3D application using stereoscopy. Our objective was to see how an OpenGL application could generate stereoscopic output using commercially-available low-cost hardware. Our expectation was that a budget 3D laptop and a budget 3D projector would make for a budget 3D presentation solution. We tried machines with ATI and Nvidia chipsets, internal and external displays, Windows, Linux and MacOSX. The solution that ended up working the best was a total surprise..."
Link to Original Source

The early days of 3D games

descubes descubes writes  |  more than 7 years ago

Christophe de Dinechin writes "What was Infogrames like when they occupied a single floor of a single building? Was Frederick Raynal already such a bright guy long before becoming insanely famous for "Alone in the Dark" (answer: yes)? How do you draw 3D using mostly additions? As the author of one of the earliest 3D videogames, I wrote a personal account of these crazy days, back when real men coded on real CPUs which had no clue about real numbers (aka floating point)."
Link to Original Source


descubes has no journal entries.

Slashdot Login

Need an Account?

Forgot your password?