Slashdot Mirror


Slate is Bootstrapped

aster_ken writes "The latest Slate compiler is finally able to compile itself. To quote the website: "Slate is a prototype-based object-oriented programming language based on Self, CLOS, and Smalltalk. Slate syntax is intended to be as familiar as possible to a Smalltalker, rather than engaging in divergent experiments in that respect.' The beta release is currently being written in Common LISP." The latest version of Slate, 0.3, is now available for download. It was previously mentioned in this Slashdot article."

29 comments

  1. Slate != Slate by XemonerdX · · Score: 1, Funny

    Anyone else mistake this Slate for the M$ Slate when reading the title?

    1. Re:Slate != Slate by Anonymous Coward · · Score: 0

      Yes.

  2. Time to do the by shoppa · · Score: 2, Funny
    rm -rf /usr/bin/gcc*
    1. Re:Time to do the by Anonymous Coward · · Score: 0

      More like rm -rf /usr/local/bin/clisp

      Slate was written in Common Lisp.

    2. Re:Time to do the by 9-bits.tk · · Score: 1
      rm -rf /dev/null
      umount /
  3. Common Lisp? by School_HK · · Score: 2, Interesting

    Is it bootstraped? I think it may be bootstraped by smalltalk or something similar (like Self), but it use Lisp...... quite different language.

    1. Re:Common Lisp? by WolfWithoutAClause · · Score: 4, Informative
      Yeah, it's boostrapped- he used CLisp to write a Slate interpreter, then using the Slate language he wrote a new compiler/interpreter, and then compiled the interpreter/compiler to machine code; then he restarted Slate running on the new compiler/interpreter; and CLisp is gone now. Any future changes to the compiler will be self compiled.

      'Job's a good'un'.

      --

      -WolfWithoutAClause

      "Gravity is only a theory, not a fact!"
    2. Re:Common Lisp? by RevAaron · · Score: 1

      Lisp is not that different from Smalltalk or Slate. Smalltalk itself is derived from Lisp in a lot of ways, sort of a cross between Lisp philosophy and the concept of OO in Simula.

      Smalltalk and Lisp both embody elegent simplicity. Yes, Slate is more like Smalltalk in a lot of ways, but the megaflexibility of Common Lisp- think macros and other features- make it an ideal language for language design and implementation.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
  4. So it complies it's self??!? by wbav · · Score: 4, Funny

    Last time I tried to do that I kept getting a syntax error. Some error about a missing colon.

    My Lord! So that's it! And I thought they took my spleen!

    --

    =================
    Unix is very user friendly, it's just picky about who its friends are.
  5. Re:great! by Anonymous Coward · · Score: 0

    That's his last name? "Schnitzel"?

  6. Cool by jefu · · Score: 3, Informative
    I played around with Self a while back and was very impressed by the potential of prototype languages. There are some problems, but so many possibilities.

    Now there are several such languages available (other than slate). Once they're all a bit more stable (some are stable now) it will be interesting to do a bake-off and see how they compare.

    These seem to be the most influential and active (at least at the moment) :

    Are there other major/active languages in this vein?

    1. Re:Cool by mccoma · · Score: 1

      newtonscript if you feel like visiting eBay for a Newton.

    2. Re:Cool by aero6dof · · Score: 1

      I'm not sure it meets the formal definition of a prototype language, but Ruby seems to come pretty close.

    3. Re:Cool by bmac · · Score: 2, Informative

      Yup, good 'ol Javascript & ECMAScript.

      Have fun.

      Peace & Blessings,
      bmac

    4. Re:Cool by Anonymous Coward · · Score: 3, Interesting

      You can do prototype-based coding in many other languages, actually.

      For instance in Perl you can do (after some setup of course):

      $obj = Object->new; # get started

      $obj->{name} = 'Joe';
      $obj->{shoe_size} = 12;
      $obj->{age} = 21;
      $obj->{is_old_enough_to_drink} = sub {
      shift->{age} >= 21;
      };

      etc.

      Add a little syntactic sugar using AUTOLOAD and they look just like static classes. Add some more scaffolding and you have inheritence, and everything else.

      Actually, many perl objects already let you create new ones by "$obj->new" rather than just "ClassOfObj->new", just because of the way the language works.

      And of course you can do all this and more in Ruby.

      As a Ruby guy who likes Lisp and Perl as well, I always wonder about these new things like Aspect-Oriented Programming or prototypes. People actually have to move from one language to another just to get these features?? I can add AOP to Ruby with half a page of code! Just add a hook before/after every method call.

    5. Re:Cool by RevDobbs · · Score: 3, Funny

      I also played with self... I don't think anyone would be particularly impressed with my results. I mean, I finished quickly enough -- but the output was rather messy.

    6. Re:Cool by RevAaron · · Score: 1

      There are a couple prototype packages for Squeak. Very handy, especially for Morphic programming.

      The most popular proto-based language is Lua. Surprised you didn't mention it. It is used in a lot of games. It has a class system too, but is a lot like NewtonScript. NewtonScript itself is an *awesome* proto language, and it's fun to play with Lua, it being so close in some ways.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    7. Re:Cool by gauchopuro · · Score: 1

      No it doesn't. Ruby uses class based OOP, whereas in true prototype based OO, any object may serve as either an object or a class-like prototype that can be cloned to create new objects.

    8. Re:Cool by aero6dof · · Score: 1

      Hmm, maybe I'm misunderstanding what you mean, but you can modify and clone instances in Ruby:

      ob = Object.new
      class "world"

    9. Re:Cool by aero6dof · · Score: 2, Informative
      Sorry, must remember to preview...

      Hmm, maybe I'm misunderstanding what you mean, but you can modify and clone instances in Ruby:
      ob = Object.new
      class << ob
      def hello
      puts "world"
      end
      end

      o2 = ob.clone
      o2.hello => world
    10. Re:Cool by gauchopuro · · Score: 1

      I stand corrected. Having only dabbled with Ruby, I was not aware that it allowed objects to be cloned. However, it does seem that Ruby's main focus is class based OO.

    11. Re:Cool by aero6dof · · Score: 1

      I would say that's true - especially with newer Ruby users. My feeling is that the most advanced users of Ruby end up using both aspects as circumstances suggest.

  7. From an author - Glad to see the interest now by water451 · · Score: 5, Informative

    So it looks like the original story here wasn't such a fluke after all. I was really kind of shocked that anyone would even look at it or want to use it given that it was written in Common Lisp for experimentation.

    The language we write the system code in is currently not quite Slate, but it's designed to make the C code more consistent and relatively safe. We spent some months debugging the new implementation, so this release is focussed on being debugged. Future releases will have more features, and so forth.

    And, no, I still don't care about the online magazine of the same name. Just think of it as "Clean Slate" Smalltalk or Slate Smalltalk. Too many other things are named Slate or some variation thereof, anyway (see the USPTO's registry).

    My partner on the project plans on full compilation without a C back-end, but also that it will take time, so I can't promise you guys a darned thing yet - don't hold your breath! (He's a talented guy, and great to work with, but things like this take time to develop.)

    1. Re:From an author - Glad to see the interest now by archeopterix · · Score: 1
      My partner on the project plans on full compilation without a C back-end, but also that it will take time, so I can't promise you guys a darned thing yet - don't hold your breath! (He's a talented guy, and great to work with, but things like this take time to develop.)
      Hey, compile it back to Lisp! CMUCL has a very effective lisp compiler! Gee, I'm a genius, wonder why I haven't created my own programming language yet...
    2. Re:From an author - Glad to see the interest now by water451 · · Score: 4, Informative

      I realize you're joking, but that's actually what the original implementation did, up to a point (and it was decently non-abyssmal in performance). We had an inlining semi-compiler (to avoid the fact that Lisp implementations differ, you can't rely on specific ANSI-variable behaviors) with a few critical optimizations applied which we are now applying to the VM-based implementation (some are already present).

      Let me just say that ANSI Common Lisp makes for a really poor virtual machine; that's really not what it excels at. It excels at optimizing Lisp programs, not other languages with a substantial impedance-mismatch. Slate super-heavily relies on polymorphism, and this just isn't something that Lisp compiler implementors focus on optimizing.

  8. And I thought... by leonbrooks · · Score: 1

    ..."my goodness, Bill really didn't like that Slate article recommending a switch to FireFox, did he?" (-:

    I note that Slate was put up for sale recently, and am quietly wondering if that is a real reaction to editorial honesty.

    --
    Got time? Spend some of it coding or testing
  9. Re: Yes, Io is cool by Corvus9 · · Score: 1

    IO Desktop is a source package for the prototype-based language Io, and its web site is www.iolanguage.com, not www.iodesktop.com.

  10. I CREATED MYSELF by andy314159pi · · Score: 1

    This brings to mind the satan character in Time Bandits who blew up one of his minions after it told him that "The Supreme Being couldn't be all bad because he created you, sire." The satan character retorted "Don't ever talk to me that way again, I compiled myself."