Slashdot Mirror


User: descubes

descubes's activity in the archive.

Stories
0
Comments
283
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 283

  1. 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.

  2. Re:Grammar ? on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 1

    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

  3. Re:Smalltalk made new keyword creation easy in 198 on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 2

    Your post is long, so I'll only address a few snippets by lack of time.

    Also, why do people keep making new languages with new syntax (generally with poor to missing error messages, debuggers, IDEs, documentation, and libraries) when we would so much more benefit from improved FOSS libraries for existing ones? I'd be a lot more excited about Tao if it was a JavaScript library that just supported some special format INI files.

    The answer is complex. I try to address it in this article. It's not just for the sake of inventing a new language, it's because what I wanted to do I could not do with JavaScript.

    Looking at a bit of the Tao overview video on SourceForge, it looks like variables don't need to be declared (ick!).

    Variables need to be declared, but an assignment does declare a variable in that scope.

    Also, requiring "locally" seems to imply that it has one of the worst "features/bugs" of JavaScript design for default globals? Or maybe I did not understand "locally".

    The 'locally' function does not concern variables, but graphic state. It's a way to say "I don't want this rotation to escape this block". In OpenGL terminology, you can think of it as a PushMatrix/PopMatrix pair (and same for other attributes).

    The main aspects of the language (like what is a code block, what is an argument) don't seem clear at first glance to me, perhaps because of various keywords being defined or seeing commas some places and not others?

    I find the use of a comma without inner parentheses interesting for functions and arguments, where the comma in a sense is doing what Smalltalk keyword colons are doing. Still, it misses labelling arguments like Smalltalk, and why not drop the commas and just have all arguments separated by spaces and instead require nested expressions to be surrounded by parentheses if you are going in that direction? For example: "translate -500 100 (10 + x)"

    If you define something like:

            translate X Y Z -> translate X, Y, Z

    then you probably are close to what you want. In practice, this forced me to add many parentheses (as you just did), and I found using a low-priority comma to separate arguments was much more practical.

    I like the clean looking syntax without semicolons at the end of lines. I'm assuming it uses indentation after a comma to define code blocks?

    Yes.

    It it ran on JavaScript, maybe I'd try it today...

    If someone wants to give Emscripten a try ;-)

    If you're the author, despite any criticism above (just half-baked opinions from watching the video for a few minutes on-and-off while writing this), I'd still encourage you to keep moving forwards with it. Looks like a lot of fun! And it is exploring some new ideas and the library looks amazing. There is no question popular computer languages (Java, JavaScript, C++) have many warts and someday it would be great to have better languages (again though, Smalltalk and message passing is my favorite, even as I move to JavaScript now for various reasons).

    Thanks for the encouragements.

    Still, if you haven't already, you might want to make an ANTLR ( http://www.antlr.org/ ) grammar for Tao3D and generate JavaScript for a backend to the animations which uses asm.js for speed and so it can run easily in a web browser. Then people with a compatible recent browser could just click on a link and be up and running with Tao.

    I have other plans to achieve that same effect. What out for Buddda ;-)

  4. Re:Most uninteresting on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 1

    Common Lisp macros allow you to create complex language extensions which are not library functions. They perform as though they are built in. Before anyone writes a "new" language they should at least survey the already existing solutions.

    Yes. You can actually see XLR as a Lisp without the parentheses.

  5. Re:Most uninteresting on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 1

    OK, game on. Give me the syntax for the following in Lisp, Scheme, OCaml, whatever:


    import Slides
    slide "Example",
            * "First bullet point, with seconds: " & seconds
            * "Second bullet point"
            ** "Second level bullet point"
            blink
                    * "Third level bullet point"
            anchor
                    translate mouse_x, mouse_y, 200 * sin time
                    color "white"
                    texture "http://www.planetaryvisions.com/images_new/4128.jpg"
                    rotate_y 20 * time
                    sphere 200

    Things like blink, anchor or slide are all functions, of course.

  6. The project actually started in 2009. And I'm not even sure that WebGL is mature enough today for some of the things we do. It's not so long ago that Microsoft adopted it. And hey, it can't even display the background shaders on http://tao3d.sourceforge.net..... Enough people started complaining that I had to remove them.

    So if WebGL is not good enough for a web page, I doubt it would be good enough for many of the features in Tao3D. But one benefit of open source is that you can try and transcode it in JavaScript and see how well it works. I'm really interested to see you display 3D extruded arabic text on your 2011 Blackberry ;-)

  7. Re:Grammar ? on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 1

    It's a recursive descent parser, which is technical jargon for "I know enough about parsing to drop Lex and Yacc".

    There is a for XLR, work in progress (both the language and the doc).

  8. Re:Things you need to fix if you want users on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 1

    What are the objections of the people you know to GPLv3 for a new project? I know of the objections for Linux. I also know why I like GPLv3.

    The website uses Reveal.js, a presentation framework for the web. I find it useful for tutorials and such. You don't have to like it any more than you have to like the GPL v3.

    I am the author of XL. So I guess I don't get it twice then ;-)

  9. Re:Not the right way, descubes on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 1

    By the way, what I'm looking for is contributors to the project. So yes, I steer. I don't care about the whiners on Slashdot. Their numbers increased steadily over the past few years. It's too bad. I still remember when it was not hard to find interesting comments on Slashdot.

  10. Re:Not the right way, descubes on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 1

    I try to answer questions to be helpful. Sorry if that bugs you.

    BTW, some people see 'descubes' where he isn't ;-)

  11. Re:Where is IF-THEN-ELSE more verbose than that? on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 1
  12. Re:Most uninteresting on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 4, Interesting

    Where did you see an example of the language? The links went to sourceforge (I didn't want to install the package just to see the language) and a marketing video.

    There are a few code examples in the marketing video. There are several additional examples on the Taodyne web site, but I'm pretty sure it can't take a slashdotting.

    I'm curious how anyone thought that if/then/else was a difficult enough construct in popular languages such that it needed improving. I mean, it's a couple of lines of code in *any* language, isn't it? Anyone know how this language supposedly improved on the concept?

    The idea is that in other languages, if-then-else is a built-in construct. You can't do something similar yourself without hacking the compiler. In Tao3D, if-then-else is a library element like printf in C. So you can change it.

    Let's say you often use a specific kind of for loop. In Tao3D, you simply add the notation you need, and now your code is shorter and more concise. Once you decide that one of the language objectives is that you can extend it yourself and create your own domain-specific languages, it's obvious that a good test for that feature is to use the basic programming language constructs found in other languages, like if-then-else or for loops.

    So, functions are first class data members? Is it weakly typed then, like Lua? In that language, defining a function is just syntactic sugar for assigning a chunk of code to a variable of the assigned name, so you can use it just like any other variable.

    The part that is always verbose in existing functional languages (except maybe Lisp) is how you pass code to another function. For example, in Javascript, you'd pass a callback with 'function() { ... }'. In Tao3D, I got rid of everything but ..., and the language is smart enough to figure things out. This means that you can define a slide by passing bullet points, and it almost looks like Markdown, whereas if I was in JavaScript, I would need layers and layers of code. This particular aspect is detailed in an article called "Storytelling, the web is doing it wrong"

    In Tao3D, you define the notations you want first, you design the (domain-specific) language around your notations second. In existing languages, it's the other way round, the notation is imposed by the language you chose.

    I'm also curious what this particular brings to the table that a library couldn't have accomplished. Learning a new language is a fairly big hurdle for someone to take to develop for a particular platform. Part of the reason I think we have so many computer languages is that programmers simply love writing new languages, not that it really solved any new problem. Nothing wrong with that, but then again, don't expect us to care unless there was a good reason for the new language.

    That's a very good point. The reason for XLR (the language underlying Tao3D) was that we have to invent new languages all the time, not because we like to, but because existing languages are very bad at accepting something that is not already in their DNA. You could not get lambda functions in C++ until the language committee sat around a table, standardized it, and then all compiler vendors had to implement it. But if what you need is for example a notation for symbolic derivative, or a notation for slides, or a notation for a specific kind of for-loop, you are stuck. So progress in programming languages is very slow, because each language adds its own little features, but drops tons of other features that already exist in other languages.

    The idea with XLR was to create a language where the fundamental process was extending the language. And Tao3D is an example of a relatively large scale domain-specific language (specifically around 3D and animations). Most of it is precisely in a library. But you wouldn't know from using it. It feels "native".

  13. Porting to a web platform is something I'd like to see happen. When we started Tao3D, WebGL and even Javascript were not mature enough, and it would have been unreasonable to do so. Today, I don't know. There are still a few things in Tao3D I think Javascript would have a hard time doing. Feel free to try. That's one of the reasons we opened the code.

  14. Re:Where is IF-THEN-ELSE more verbose than that? on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 1

    Yes, of course, I have a vested interest. But I'm not inquisitive, I want to know if there is a (real or perceived) inconsistency in the indentation.

  15. Re:Video tutorials on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 2

    Here are a few links:

    Tao3D documents on Gitorious

    Taodyne tutorials usually have the code corresponding to the videos. But I'm pretty sure our small server won't take a slashdotting. Use it while it lasts.

    There are also a few examples in the source tree itself.

  16. Re:Where is IF-THEN-ELSE more verbose than that? on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 3, Informative

    The actual definition of if-then-else can be found here. It looks like this:

    // If-then-else statement
    if true then TrueBody else FalseBody -> do TrueBody
    if false then TrueBody else FalseBody -> do FalseBody

    if true then TrueBody -> do TrueBody
    if false then TrueBody -> false

    The definition of the 'for' loop is more convoluted and is actually found in C++ code. It looks like this:


    FORM(IntegerForLoop, tree,
              "for Var in Low:integer..High:integer loop Body",
              PARM(Var, tree, "")
              PARM(Low, integer, "")
              PARM(High, integer, "")
              PARM(Body, source, ""),
              return xl_integer_for_loop(context,self, &Var, Low, High, 1, &Body), )
    FORM(IntegerForLoopStep, tree,
              "for Var in Low:integer..High:integer by Step:integer loop Body",
              PARM(Var, tree, "")
              PARM(Low, integer, "")
              PARM(High, integer, "")
              PARM(Step, integer, "")
              PARM(Body, source, ""),
              return xl_integer_for_loop(context,self, &Var, Low,High,Step, &Body), )
    FORM(RealForLoop, tree,
              "for Var in Low:real..High:real loop Body",
              PARM(Var, tree, "")
              PARM(Low, real, "")
              PARM(High, real, "")
              PARM(Body, source, ""),
              return xl_real_for_loop(context,self, &Var, Low, High, 1.0, &Body), )

  17. Re:Where is IF-THEN-ELSE more verbose than that? on Tao3D: a New Open-Source Programming Language For Real-Time 3D Animations · · Score: 1

    I'm curious, when is the definition of a content-free if-then-else statement more than a couple of lines?

    The point is that you define the if-then-else control structures. If you wish, if-then-else is a macro in Tao3D, not a built-in.

    (though in the sample I linked the indenting doesn't seem to be very consistent at the end)

    Can you tell me where you think it's not consistent?

  18. Re:Lightweight Entry Missing on Building All the Major Open-Source Web Browsers · · Score: 1

    Interesting. Actually, the Qt web browser is small too (but Qt itself is big). Same thing here, it uses WebKit behind the scene.

    Unfortunately, does not build on OSX:

    surf.c:9:10: fatal error: 'gtk/gtk.h' file not found
      #include
                        ^
      1 error generated.

  19. Re:Build on Building All the Major Open-Source Web Browsers · · Score: 1

    You are not building the latest, only whatever patched version exists in your ports. And did you actually run the commands and verify that your machine is powerful enough to do it?

  20. Re:What is the significance here? on Building All the Major Open-Source Web Browsers · · Score: 1

    Well, as the author of the blog post, I did not intend this post to go on Slashdot. It was just a note-to-self about the various commands and build steps involved. Because they are, well, complicated.

    In the grand scheme of things, the significance behind this is that I plan to open-source Tao, the 3D document description language invented by Taodyne, with the intent to be able to integrate it into at least one web browser. More details about why Tao would make a difference for the web here: http://www.taodyne.com/shop/de... (and in the follow up article). More details about how it works for a developer here: https://www.youtube.com/watch?....

  21. Focus, focus on Digia Spins Off Qt As Subsidiary · · Score: 1

    This move increases the focus of the Qt team. Most developers know what Qt is, but who can tell off the top of their head what Digia does, and why Qt is strategically important to them?

  22. A language with only one operator on Ask Slashdot: What Are the Strangest Features of Various Programming Languages? · · Score: 1

    XLR (http://xlr.sf.net) has essentially a single operator, -> which reads as "transforms into". The rest is defined in the library.

    (OK, to be honest, that's the theory. In practice, the current language implementations take many shortcuts).

  23. Software complexity also follows Moore's law on Normal Humans Effectively Excluded From Developing Software · · Score: 1

    Software complexity follows Moore's law, an exponential law. So with a fixed set of tools, you are bound to reach a point where you can't code effectively. That's why we need either new sets of tools on a regular basis (e.g. C -> C++ -> Java -> ...) or tools that evolve over time (e.g. Lisp).

    See http://xlr.sourceforge.net/Con... for another take at tools that evolve over time.

  24. Internet confirms my faith on How the Internet Is Taking Away America's Religion · · Score: 1

    I will go against the crowd here, and say that Internet helps me with my faith. It gives me free access to the life and writings of saints. It gives me access to the original words of people like the pope, and lets me contrast them with the reporting often given in the media. It gives me a connexion to a community of Christian people. And it lets me realise that most of the counter arguments to religion are nothing new, and have been debunked by great minds centuries ago. I recently came across a site dedicated to Fatima that had me entirely revisit the (very low) standards I had for my own faith and life.

    Information on the net about religion is a little like information on sex and love. Good luck trying to understand what true love is by going to porn sites! Same thing trying to understand what the true love of God is The first post I see here equates knowledge to the antichrist. It's funny, because it's typical of the derisive "information" you can find on the net, which combines some familiarity with basic concepts and utter ignorance of what's really behind them. Yes, the original sin derived from knowledge of good and evil. No, this does not mean at all that the catholic church condemns knowledge! A good lie has to be believable, and you know who the master of all lies is

    I'm really sorry to hear that the original poster became an atheist by reading about religion on the Internet. He was already away from faith, since he said that he would have identified himself as religious without attending service (aka not really religious). If you don't attend service, chances are you did not personally meet God yet. For most christians, faith means a personal encounter of some sort. Trying to use internet arguments against my faith is a bit like trying to use porn as a proof that my wife's love is not real

  25. Yes, unless it's Emacs on Does Relying On an IDE Make You a Bad Programmer? · · Score: 1

    Emacs is complicated enough that it makes you a better programmer just to use it.