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. Re:Not very well-explained nor convincing on Concept Programming · · Score: 3, Interesting

    The examples on the site of where Concept Programming results in a better solution, are quite contrived and not very convincing. They make Concept Programming out to be nothing more than a glorified bowl of syntax sugar (hold the types), and that's not always a good thing.

    You missed the point of the examples. They are not about syntactic sugar in the XL or Java++ implementations, but rather in the semantic limitations that non-extensible methodologies or tools impose on us. You prove the point further with your examples, by sticking to reference models even if they don't work very well.

    The first example discusses the concept of "Maximum", and shows how you would implement that concept in Java, followed by the allegedly superior XL way to do it. The Java "class" makes no sense, and really would not be the way to go about it. YOu would never want to model the concept of Maximum in that way, but if you did, you would use the already-existing Comparable interface and creating a static method called "Max" of some class that takes a list of comparable objects.

    In order to implement the concept, you have added a lot of noise in the implementation, which includes not only the Comparable interface, but the need to use methods rather than operators. Your method needs to take a List of objects, so you have added noise at the call site as well. None of this code is actually useful in representing the original concept, it is some artificial complexity to stick to the OO model at any cost.

    Furthermore, in C, you can model it exactly as they have, since C allows multiple arguments.

    But the C vararg interface is not object-oriented, so this doesn't invalidate the point. As an additional note, it is not type safe either, So you need to add more noise to pass the type information, again both in the implementation (ever looked at the code for printf) and at the call sites (beauties like "a=%s b=%d")

    The next example was discussing takinga derivative and how you can translate some incorrect Java syntax that takes a derivative into the Java equivalent. Why not write a method to do this? What is to be gained by using a non-standard syntax? It makes it harder to write (you have to learn something in addition to Java), and harder to read (same reason).

    As another poster noted, this is a meta-operation, which transforms a concept into code. You can't write a method that does that, unless your method is part of the compiler. Please show me how you would code this in Java.

    Ultimately, seems like some typical academic wank-fest that someone can use to get their Ph.D., but not very applicable in the real world.

    Isn't that exactly what they said about OO when it first came out? BTW, I don't have a PhD.

    Is it useful? If you ever wrote a perl script that scans your source code, or ever used some preprocessor, or something like that, then you have hit the limits of your tools, and concept programming tools would have helped you. On the other hand, if you never did, then you are not a Real Programmer (TM)... I can literally list hundreds of examples of such additional "build tools" in common Open Source projects.

  2. Re:Good idea - no need for new tool gimmickry on Concept Programming · · Score: 3, Informative

    Yes, Lisp can do a lot of this, because it has meta-programming (reflective) capabilities built-in. What Lisp or Forth lacks is:

    - A way to adapt the syntax. In Lisp, you write (+ 1 2), not 1 + 2. So if you have the semantic ability to represent concepts, you don't have the syntactic ability.

    - A distinction between the program environment and the meta-program environment. When you create a lambda, its "namespace" is the current program. In Mozart, it needs not be.

  3. Not an hoax, a poorly worded paper on Theoretical Physics Breakthrough or Hoax? · · Score: 2
    I've been following the original thread for a little while. The authors seem to have some trouble being precise enough, in particular when speaking English (not their native language.) Reports on their French works are better. But the reactions of some people are simply inexcusable.

    The future of programming

  4. Re:Other than text representations of programs? on Charles Simonyi leaves Microsoft · · Score: 2

    Simonyi's project used to be called "Intentional Programming". What seems original is

    1/ Multiple representations for one underlying "intention", ie showing a math equation as an equation or as text or as MathML or whatever. And being able to input in any of these forms.

    2/ The ability to create programs that transform intentions as intentions (so you have real reflection, just as in Lisp, but using graphical format)

    In other words, abstraction of the syntax. Lisp never got past the syntax point (you still need all these parentheses to input Lisp code)

    See also Mozart for a Free Software variant of some of these ideas...

  5. Also exists as Free Software on Charles Simonyi leaves Microsoft · · Score: 2

    Don't dismiss Simonyi's ideas too quickly. Believe me, what he's doing is really clever.

    Contrary to what many wrote here, the idea is NOT to create a visual programming tool a la Visual Basic. It is to represent programs visually, to "render" the program tree using various ad-hoc renderers. For instance, the best representation for math notations is not text. It could be something like MathML, or a graphical representation, or TeX. So the idea is that you can have several input representations, several output representations, and one common format underneath it all. You get rid of the whole idea of source code...

    The good news is that there is a Free Software project with the same capabilities: Mozart. It's been there for a long time, and it's quite functional now. This might give you an idea of what can be done with this kind of tools. See in particular the Moka Java-to-Java extensible compiler, which lets you do things with Java you can't do otherwise... I think it's really the future of programming.

  6. And you thought NT 3.51 was bad? on A Rock Moves In Space · · Score: 3, Funny

    It keeps getting worse and worse. NT5 had an estimated 65000 bugs, if I recall correctly, but at a few grams per bug (when they don't fly), nobody cared about such a tiny mass. But now NT7 would be large enough for continental scale devastation? Wow. That must be a serious number of bugs.

    On the other hand, announcing a product 17 years before it hits, come on, that's not really serious, even by NT's standards.

    You think you know about programming?

  7. Re:Remember Fred Brooks? on Why (Most) Software is so Bad · · Score: 2

    As a person who actually tries to do something about it, I can testify that inventing a development environment fostering quality is difficult. What's more, you need to address more than quality at the "low level", as the MSNBC article pointed out. The reason for bad quality is explosive growth in software complexity, and that is where you need to hit.

    My approach is something I call "concept programming." Roughly speaking, it's the idea that code needs to represent your ideas accurately. The main source of bugs is the fact that programmer concepts don't match with what the tools actually do. A typical example is the C array. There are so many buffer overflows just because a C array is *not* an array. It's a pointer plus an offset. An array has a bound, a pointer plus an offset doesn't. Concept programming allows you to realign the two.

    As another illustration of this, consider printf() style function. Isn't that amazing that we have lived for so long with something that allows totally bogus references, and goes out of the way to make it hard to check?

    Form is so important, actually, that it was worth creating a new language, called XL. Consider for instance the code that would be required in C or Java to implement the equivalent of the following XL code:


    // A generic 'Max' and 'Min' function taking an arbitrary number of arguments
    // of any type with a less-than operation

    // Condition for a type to be 'ordered': being able to write A < B
    generic type ordered if
    with ordered A, B
    with boolean Test := A < B

    // The Max and Min of a list with one element are that element
    function Max(ordered X) return ordered is
    return X
    function Min(ordered X) return ordered is
    return X

    // The Max and Min with more than one argument are created from
    // the Max and Min with one less argument
    // 'result' is the implicitly declared result of a function
    function Max(ordered X; other) return ordered is
    result := Max(other)
    if result < X then result := X
    function Min(ordered X; other) return ordered is
    result := Min(other)
    if X < result then result := X

    // Examples of use
    procedure Test() is
    with real R := Max(1.0, 3.0, 5.0)
    with integer I := Min(1, 3, 4, 5, 6, -1)


    What are the chances that your C or Java code would just contain mistakes, or fail in some corner case, simply because you had to workaround the lack of features allowing you to code the concept in the first place? For you C++ users, notice how the generic argument is checked before use, making sure that Max(Z) where Z is a complex actually fails to compile, even though the less-than operator is never used while instantiating this single-argument case...

    XL is not vaporware either, even though it's far from complete. The code above does compile today. Hey, it's even open source. Now, guess how many contributions I received on this project in its two years of existence? (Hint, it's often confused with the letter "o" ;-)

  8. Concept Programming on Conceptual Models of a Program? · · Score: 2

    Take a look at the Mozart web page for a discussion of what this is. The basic idea: Your code should use the very same concepts that you have in your mind when you think about the application. A concept programming language can be extended to incorporate arbitrary forms of abstraction, not just the built-in ones (i.e. "integer", "addition", "objects" are all library things, not built-in)

    I'm currently hard at work on the first concept-programming language, called XL.

  9. Re:printf() on Porting Linux Software to the IA64 Platform · · Score: 2
    The way it *should* work, if I were king of the
    universe, would be:
    printf( "%{pid}\n", pid );
    printf( "%{uid_t}\n", getuid() );
    etc.


    The way it *does* work in the little universe where I am the king is:

    procedure Write(pid_t pid; others) is
    // Write "(pid) 1FEDDE" on output
    Write "(pid) ", HEX, pid as integer
    // Write other arguments
    Write others

    procedure Write(uid_t uid; others) is
    // Write "(uid) 1FEDDE" on output
    Write "(uid) ", HEX, uid as integer
    // Write other arguments
    Write others

    // Let's add a "WriteLn" capability
    procedure WriteLn(others) is
    Write others
    Write NewLineCharacter

    // And use it:
    procedure Main() is
    var pid_t pid := GetPID()
    var uid_t uid := GetUID()
    WriteLn "Hello, PID=", pid, " and UID=", uid


    This way is arguably better, because it's type safe, and easier on the users. Of course, since it's not Compatible With C, it will never be used by anybody :-(
  10. Re:PA-RISC and IA32 Native Execution on Porting Linux Software to the IA64 Platform · · Score: 2

    In the current Itanium, only user-space IA-32 instructions are implemented with hardware assistance. Since this is essentially microcode, this is not too fast. The architecture specifies how the instructions work, which IA-64 registers they use to store IA-32 registers, etc. But the whole thing can be implemented in firmware or software in future revisions of the chip.

    IA-64 machines also offer firmware emulation of IA-32 system instructions. This allows you, in theory, to boot an unmodified IA-32 OS. I've never used it myself, however.

    Last, the PA-RISC support is a piece of software integrated in HP-UX. There's no help from the hardware, except numerous design similarities (IA-64 began its life as HP PA-Wide Word). So you won't be able to run PA-RISC Linux binaries on IA-64 Linux any time soon...

  11. Re:No FP in kernel? on Porting Linux Software to the IA64 Platform · · Score: 4, Informative

    There are two reasons:

    1/ The massive amount of FP state in IA-64 (128 FP registers). So the linux kernel is compiled in such a way that only some FP registers can be used by the compiler. This means that on kernel entry and exit, only those FP registers need to be saved/restored. Also, by software conventions, these FP registers are "scratch" (modified by a call), so the kernel needs not save/restore them on a system call (which is seen as a call by the user code)

    2/ The "software assist" for some FP operations. For instance, the FP divide and square root are not completely implemented in hardware (it's actually dependent on the particular IA-64 implementation, so future chips may implement it). For corner cases such as overflow, underflow, infinites, etc, the processor traps ("floating-point software assist" or FPSWA trap). The IA-64 Linux kernel designers decided to not support FPSWA from the kernel itself, which means that you can't do a FP divide in the kernel. I suspect this is what is more problematic for the application in question (load balancer doing FP computations, probably has some divides in there...)

    XL: Programming in the large

  12. Java code generation on Interview With James Gosling · · Score: 3, Informative

    JDC: I'd like to see more tools that enhance developer productivity, we have Unified Modeling Language (UML) modeling tools, and wizards to help us generate code. Can we tie these together better?

    Another way to enhance productivity is to manipulate the Java source code itself (rather than generate code from the outside.) A good example of tool doing just that is Moka. In short, Moka is a Java-to-Java translator which allows you to extend Java in many interesting ways. For instance, there is a plug-in that allows you to remove any method or class whose name begins with 'debug'. There are other examples on the web page. I believe it's easy to use, and it makes up for various shortcomings of the language itself.

  13. Re:Debugging is the downside on Downsides to the C++ STL? · · Score: 1

    I'm looking forward to somebody starting over some day and coming up with a language that supports generic programming as well as C++, but which doesn't have the terrible syntax of C++ templates. It must be possible.

    It's possible. The language is called LX.

  14. Re:I will never understand... on Interview With Herb Sutter · · Score: 1

    ...What the deal is with C++. It's a terrible language with NO pre-thought design

    Then do something about it! This 55000 lines project has received exactly two (2) outside contributions (to the makefiles :-) in its two years of existence as an open source project. And yet everybody keeps complaining how C++ is bad! I'm keeping it in the >90% percentile at SourceForge, but all by myself. Where is the community when you need it?

  15. C++ compliance: still a dream on Interview With Herb Sutter · · Score: 1

    It's great to see that Microsoft considers people like Herb to improve the quality of their C++ implementation.

    It's sad that after more than 10 years, C++ compilers all over the place still have a lot of trouble compiling C++ code. It's already bad enough that C++ is too difficult for most programmers. It's definitely a severe problem for C++ that most compilers can't deal with advanced C++, and fail compiling things like Loki. And yes, I'm talking about G++ too :-)

    What draws people to Java is not only the simplicity of the language for programmers. It's also the fact that most compilers have no trouble compiling your code on all platform. I think that's a point that most C++ folks (including Herb in the article) fail to understand. But to get this, you give up many handy features, notably templates.

    I personally believe that there is another way, and that new programming languages are still a good idea.

  16. Moore's law and Programming on Trouble Ahead for Java · · Score: 1

    All programming languages have a limited lifespan. There are many reasons, but one of them is that Moore's law impacts the complexity of programs that become possible. After a while, it becomes necessary to create a new language simply to accomodate the growing complexity.

    See Mozart - The Future of Programming for a more in-depth discussion on this topic.

    And if you want to be the first one to use tomorrow's language, check out LX

  17. Fight Back, forget the GPL! on Microsoft Tech Specs Prohibit GPL Implementations · · Score: 1
    There is a better license to fight this kind of nonsense: the Fairly Obvious Open License. See in particular Special Section "A", which states (among other things):


    IMPORTANT - READ CAREFULLY: This Undisputable Corporate License
    Agreement (UCLA) is a legal agreement between you (either an
    individual or a single entity) and the copyright owner or owners of
    the licensed Product (the AUTHORS), which includes computer software or
    data and may include associated media, printed material and online or
    electronic documentation (collectively "PRODUCT"). Special Section "A"
    of this UCLA only applies to you if

    a/ you or the company you work for expressed concerns about the
    "viral" aspects of the GNU General Public License, or

    b/ if you otherwise seek relief from some of said "viral"
    aspects, or

    c/ if you or the company you work for are considered a monopoly by
    the United States Government.

    By installing, copying, listening to, viewing, smelling, hearing
    about, inspiring yourself from, thinking about or otherwise using the
    PRODUCT, you agree to be bound to the terms of this UCLA. If you do
    not agree to the terms of this UCLA, do not install, copy, listen to,
    view, smell, hear about, inpire yourself from, think about or
    otherwise use the PRODUCT.



    Oh, yeah, this initially was an April fool joke. But maybe it should not have been...
  18. Story has high crackpot index on Managing Einsteins · · Score: 1
    The Crackpot Index has the following rule:
    17 - 10 points for each favorable comparison of yourself to Einstein, or claim that special or general relativity are fundamentally misguided (without good evidence).
    Now, given the spelling abilities of most /.ers, I think we can also safely add 5 more points for:
    8 - 5 points for each mention of "Einstien", "Hawkins" or "Feynmann".
    So the story starts with 15 crackpoint points already.
  19. Re:It is not just standing, it's ruining for it on PetsWarehouse vs. Mailing List · · Score: 1

    Justice doesn't have to be free. It simply has to be fair. For instance, the law could mandate that the money paid by both parties be added and then split equally between the lawyers for both parties. That way, a company can put a lot of money into attacking, but it also automatically beefs up the defense. It's no longer Goliath vs. David.

  20. The Jeremiah characters and story line on Jeremiah, a New Series from B5 Creator, Debuts Sunday · · Score: 3, Informative

    More information about the characters and story line can be found there. The original is in French, and the fish doesn't translate pictures yet, but you can find an example of the artwork on the site.

  21. XFree 4.1 needs to be post 1.0a2 on Slashback: Safety, Transmissions, Breakage · · Score: 5, Informative
    I had a similar problem. After upgrading to 1.0a3, the latest build, it worked fine. The web page at http://www.mrcla.com/XonX indicates that 1.0a2 is the first build that starts on 10.1.

    I still have trouble if I lose a connection to a remote X machine, or if I kill XDarwin. In that case, I seem to have trouble starting a new X session, it complains that it cannot connect to a socket and that another XDarwin might be running.

  22. Playing these CD in a DVD or MP3 player? on Still More 'Copy Protected' CDs · · Score: 1

    Does anybody know if this copy protection scheme breaks CD/DVD/MP3 players? Internally, I suspect they're way closer to a computer than to an "old" CD player. What happens? Are these new CD compatible with my player?

  23. Re:oh my dear lord on OS X 10.1 Coming Today (Sorta) · · Score: 1

    > More of a concern with the apple laptops is the lack of page up/down Home/End buttons.

    Well, I use a Mac and a PC laptop regularly. The PC has small page-up page-down keys, located in a corner. Each time I try to use them, I end up deleting something with the backspace or delete key located next to the page-up page-down.

    So I personally do prefer the Mac keyboard layout. On a laptop, both hands are on the keyboard anyways, and the left hand hits "fn", the right hand the up/down arrows, it's really natural.

  24. How do you deal with upgrades? on Microsoft's Vision For Future Operating Systems · · Score: 1

    For instance, if a Microsoft Developer just built the totally untested Millenium ServicePack 729 for the first time, and the rest of the world "assimilated" ServicePack 728, will the next PC say: "Cool, a new patch" and start propagating it around? Until it reaches a room where a BlueTooth equipped cell phone was inadvertently left on. And spreads the good news over the air outside of the Microsoft campus...

    Seriously, there is so much in this nice project description that is not even solved on local systems. Like introspection. Like replicating computations.

    I especially liked the tiny three lines example of pseudo C code. Generally, I get a very bad feeling when people say "The compiler should be able to..." Because it generally means that it's obvious (for humans) on the small toy test case, but that this is a non-computable problem in the general case. So this will result in a dog-slow crap-generating compiler, with comments from its authors like "The virtual machine should be able to..."

    Early Optimization is the Root of All Evil (Knuth)
    Belated Pessimization is the Leaf of No Good (Len)

  25. Apple is bringing their users (and developers) on Can Open Source Escape The Apple Horizon? · · Score: 1

    Apple is contributing its whole installed base. Soon, the pre-installed OS on all iMacs will be a BSD. That's quite a contribution! Imagine Dell pre-installing Linux on all boxes, would people complain "Ah, yes, but you can also run Windows on the machine, so Dell is violating the Open Source spirit"?

    They are even giving away development tools, just in case you'd want to write something cool... How many big shops develop for MacOS, which now will have an incentive to improve this (gcc) compiler, accelerate this (BSD) networking stack, make that PC client (Samba) easier to use?

    And this is in addition to all the contributions other pointed out (Quicktime except Sorenson, Quicktime server, Darwin fixes, NetInfo, etc)