From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20090905121128.GA631@polynum.com> References: <422c2c66f1d93f0928ca31b8c1e0c927@hamnavoe.com> <20090905121128.GA631@polynum.com> Date: Sun, 6 Sep 2009 22:04:21 +0200 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [9fans] nice quote Topicbox-Message-UUID: 66ea6a52-ead5-11e9-9d60-3106f5b1d025 >> Considering that Plan 9 has only two inherent languages, >> and its users often push for work to be done in only those, >> what is the Plan 9 perspective of languages and tools in >> relation to each other? I guess rc & C are meant. True, I feel to be pushed to these. On the other hand I really like rc. Compared to bash/sh/ksh/zsh... I like its simplicity as well as that it is the only shell in plan9. I use it in linux too (although I miss some abilities it really should have, like ability to break from a loop). With C, I confess I do not use it often. In my life I found C a good tool to program microcontrollers. But otherwise I prefer python/ruby way unless speed is important---which, either really is (computation; physics) -> I use Fortran, see below, or is not at all. Fortunately, there are some ports of python and ruby to plan9. But it was always so difficult in my eyes, that I backed out from trying to use them (do you also have a feeling that the simples installation is often in windows, even for open-source projects?). There is also limbo, but for that I guess inferno must be installed... (am I right?) > I don't know for "the Plan 9 perspective" and have no authority to talk > "for Plan 9", but since almost all interpreters or compilers are written > in C, whether completely or the bootstapping procedure (a C core that is > able to interpret a subset of the language to generate a binary for the > non optimized version of a complete compiler etc.), there are all the > tools as long as there is a C compiler for the machine. Well, maybe. But it probably can be rather difficult to get some software to work in plan9 even though it is written in C, but 'for another system'... E.g. give me python+numpy+matplotlib... > The only "lack" in C is perhaps defined full control for > arithmetic/calculus. That's probably why FORTRAN is still here and has > still its strength in this area. Here, I must agree. Though I first hated Fortran for what it carries with itself from the times of FORTRAN, for all it's inabilities to work with strings, I must truly confess that I do not know of a better language for doing calculations. There is no way to compare C to Fortran, the latter being by no question superior. E.g. (not in any order of importance) Fortran can be (and usually is) quicker (better pointers). Fortran can have optional parameters to functions. Fortran can easily define/overload operators (not so nice yet, but improving, e.g. the priority of new operators cannot be set) --- this is nice to e.g. multiply matrices like this: C = A .x. B, do inversions like this .I.A, or transpose .T.A, among others. Fortran has elemental functions. Fortran can slice arrays, like a(2:8), similarly to matlab or numpy. Some people claim it is better suited for parallelism, but I can't say much about this point .... It's difficult to find anything where C would be better. Fortran still has some very ugly places, but it has become really powerful. But I guess there is nobody who would plan to put Fortran in plan9.