Slashdot Mirror


SmartEiffel 1.0 Released

Per Wigren writes "Today SmartEiffel, the GNU Eiffel-compiler finally reached 1.0! Eiffel is a very underrated language in the free software community for some strange reason.. Hopefully this will help to gain some interest in this extremely powerful, fast, easy-to-read, easy-to-learn, almost self-debugging language!"

19 of 337 comments (clear)

  1. what's it good for? by brandonfpu · · Score: 5, Interesting

    as perl started out great for scripting stuff and has grown, java started out with the promise of write once, run anywhere, what is eiffel's main strength according to it's developers (any users out here?)

    1. Re:what's it good for? by _Spirit · · Score: 3, Interesting

      Forced OO, at least that's what I remember it by. It's good for teaching OO, as you *have* to do everything in an objectoriented manner.

      --

      beauty is only a light switch away

  2. Nice language by _Spirit · · Score: 5, Interesting

    I learned OO programming in Eiffel. It's nice and structured. Never made anything useful with it though, compiling was cumbersome (Eiffel > C > binary) and it was impossible to do any GUI stuff with the tools I had back then (95 or so).

    --

    beauty is only a light switch away

  3. Holy cow, it's piggy flying time by Johan+Veenstra · · Score: 3, Interesting

    Eifel is simply the best language I ever saw on paper, and I looked at quite a few languages for my study.

    I never imagined I could ever download a free compiler to actually compile the programs I jotted down during exams.

    1. Re:Holy cow, it's piggy flying time by berenddeboer · · Score: 3, Interesting

      You probably are not interested in an answer, but anyway: with SmartEiffel and boost mode, your hello world is probaby around 4-10KB or so. Quite comparable to C.

      ISE Eiffel, a commercial implementation, if you compile hello world in melted code, the binary might be MB's. You can read about the advantages of melted mode on ISEs website. But if you freeze it, it's 160KB.

      Read this post:

      http://groups.google.com/groups?dq=&hl=en&lr=&ie =U TF-8&selm=3DDF4E65.6933E52B%40ifrance.com

      --
      If I had a sig, I would put it here.
  4. Huh? by SuperDuG · · Score: 1, Interesting

    Why is everyone gung ho on creating new programming languages. What the hell is point of all these languages. I'm still learning cobol in college right now. I'm off to Java next, and will barely learn C++. So it's no wonder no one uses these "great" languages, no one teaches them. Let's work on the languages we have instead of making new ones. This is like gnome and kde, and for everyone who's gung ho about replying "these are what gives us choice ", free is free people the only thing different between kde and gnome is the developers, they're all just trying to be another mac os/windows clone.

    --
    Ignore the "p2p is theft" trolls, they're just uninformed
    1. Re:Huh? by Hornsby · · Score: 3, Interesting

      I strongly suggest you spend a few months each on Perl, Python, a functional language like Haskell, and several APIs of some sort, like wxWindows or XML parsing.

      I agree totally. I just wanted to chime in and say that while you're out checking out new languages, give Ruby a try. It's a beautful language that falls in the same family as Perl and Python but has it's own charm all the same. I use it for all of my development in an environmental lab, and it's served me quite well.

      If you want to explore functional programming, you also may want to check out SML.
      There are several free implementations available, and it's easy to learn. It's very fast and quite powerful for a variety of tasks. Last but not least, check out ANSI Lisp or at least Scheme. Everybody serious programmer should know at least one dialect of Lisp because it's the original hackers language.

      I believe ESR did a rant somewhere on how to become a real programmer or something along those lines. Google could probably dig it up rather quickly. It's worth a read as he outlines languages to learn to explore the various development methodologies(functional, OOP, procedural, etc).

      --
      A musician without the RIAA, is like a fish without a bicycle.
  5. helloworld in Eiffel by caternater · · Score: 5, Interesting
    For those, like me, wondering what Eiffel looked like, here is helloworld:
    class HELLO_WORLD


    creation
    make
    feature
    make is
    local
    io:BASIC_IO
    do
    !!io
    io.put_string("%N Hello World!!!!")
    end --make
    end -- class HELLO_WORLD
    This was taken from http://www2.latech.edu/~acm/helloworld/eiffel.html

    Also, this interesting tidbit from the comp.lang.eiffel FAQ:

    QEIF: What is Eiffel?

    Eiffel is an advanced object-oriented programming language that emphasizes the design and construction of high-quality and reusable software.

    Eiffel is not a superset or extension of any other language. Eiffel strongly encourages OO programming and does not allow dangerous practices from previous generation languages although it does interface to other languages such as C and C++. Eiffel supports the concept of "Design by Contract" to improve software correctness.

    Beyond the language aspect Eiffel may be viewed as a method of software construction. Eiffel is an excellent vehicle for software education, including for a first programming course.
    (http://omicron.felk.cvut.cz/FAQ/articles/a511.htm l)
    1. Re:helloworld in Eiffel by boy_of_the_hash · · Score: 3, Interesting
      Based on intrest in Eiffel, wouldn't this be a better example?
      class GOODBYE_WORLD

      creation
      make
      feature
      make is
      local
      io:BASIC_IO
      do
      !!io
      io.put_string("% N Goodbye World!!!!")
      end --make
      end -- class GOODBYE_WORLD
    2. Re:helloworld in Eiffel by HiThere · · Score: 3, Interesting

      That's unfair. For one thing, Eiffel is a compiled language. For another, those don't all need to be on separate lines. And for the third, hello world doesn't represent the operations of any resonable program.

      That said, Eiffel does suffer from name_length_inflation due to it's prohibition against overloading.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    3. Re:helloworld in Eiffel by Per+Wigren · · Score: 3, Interesting

      You can't judge a language from "hello world", that is just plain stupid..

      Eiffel is designed to write large bugfree object-oriented applications, not short "one-timer" scripts...

      --
      My other account has a 3-digit UID.
  6. Eiffel = enormous memory hog still? by myowntrueself · · Score: 3, Interesting

    When I was at Auckland university we used to dread when the guys doing the stage 3 OO programming course got an assignment.

    I once saw 12 of them running the eiffel compiler each instance of which was absorbing over 100M of virtual memory on, as I recall, old DEC unix boxes...

    This was back in 1993 so as you can imagine (with relatively limited amounts of RAM and VM in those days and in a relatively small and underbudgeted department) the whole system came to a grinding halt for everyone else. Heck, I couldn't even read usenet news and opening a smallish text file to edit in emacs took around 10 minutes. Which, for vi devotees, *is* unusually long even for emacs ;)

    I think they went home for the weekend to leave their compile processes running, meaning that the rest of the comp.sci facility could barely use the unix servers for the duration.

    Eventually, as I recall en-masse eiffel compiler processes were *banned* and they were told to spread out their compilation processes over a few days (ie not all 12 students at once).

    Since the assignments were weekly this caused problems. I believe they turned to an alternative OO language. I wasn't doing the paper so I don't know which one.

    --
    In the free world the media isn't government run; the government is media run.
  7. Eiffel is not a new language by Earlybird · · Score: 4, Interesting
    • Why is everyone gung ho on creating new programming languages.
    Eiffel is not a "new programming language". It's nearly twenty years old, invented in 1985 by Betrand Meyer, and a damn well-respected language at that.

    Historically Eiffel has probably had more success in influencing other languages and in teaching software construction principles, than actually being used for commercial software projects, although it has seen some popularity in the finance sector. Lately, like certain other niche languages, it has seen its popularity further eroded through the emergence of Java.

  8. Re:Not another one! by buggered · · Score: 2, Interesting

    In the past 25 years I have programmed in Assembler (for about 2 dozen different architectures), Fortran, Algol, Pascal, Bliss, Ada, Lisp, C, C++, Java, Perl, Python, SmallTalk, and probably some others that I can't think of at the moment. During that time I have always wanted something better. While Eiffel is not perfect, I can say that it comes the closest to my ideal language of any I have ever used.

    I have found that Eiffel programs are very easy to debug (because of the "Design by Contract" the problem usually pops right out). Sometimes I have even had non-trivial programs work correctly the FIRST time!

    When I have been working on C++ programs, it sometimes takes days or even weeks to find some of the problems. Most of the time in Eiffel I can find the problem in seconds or minutes. Rarely have I had bugs that took longer than an hour or two to find.

    If I had to pick one programming language to use from now on it would be Eiffel.

  9. Re:Yikes! an $80 book by berenddeboer · · Score: 2, Interesting

    I found it really good. It's about what an ideal OO programming should look like. It asks and answers lots of questions. Well written.

    --
    If I had a sig, I would put it here.
  10. Price of Eiffel's IDE by majordomo · · Score: 2, Interesting

    According to the main Eiffel website, a major aspect of Eiffel is EiffelStudio, their "more than just an IDE" that really makes everything go. They imply that this product is necessary to reap the major benefits of developing in Eiffel, but unfortunately it is quite pricey (not to mention proprietary): the Windows or Linux version will run you $4799. That price, and hitching your wagon to a proprietary star, are major barriers to wider acceptance.

    If anyone strongly believes that learning Eiffel is worth the trouble even without a good free (as in speech) IDE, please let me know.

  11. Use TinyCC with SmartEiffel! by Per+Wigren · · Score: 5, Interesting

    If you're going to code in SmartEiffel, you should try using TinyCC instead of GCC while developing! TinyCC is an extremly fast and memoryefficient ANSI-C compiler that is 100% compatible with SmartEiffel! TCC generates code which is about as fast as "gcc -O2", but compiles almost 1000 times faster than "gcc -O2"!! I know these figures look unbelievable, but they are authentic! Just try it yourself if you don't believe it!

    oggy gexace # time gcc -O2 -o gexace-gcc gexace.c
    real 10m12.746s
    user 9m33.227s
    sys 0m4.897s
    oggy gexace # time tcc -o gexace-tcc gexace.c
    real 0m1.353s
    user 0m0.472s
    sys 0m0.061s
    oggy gexace # ls -l gexace-*
    -rwxr-xr-x 1 root root 1216938 Nov 29 18:27 gexace-gcc
    -rwxr-xr-x 1 root root 994200 Nov 29 18:27 gexace-tcc


    The gexace.c examplefile is from GOBO, generated by SmartEiffel and is about 2MB...
    When your program is ready to be distributed you can compile it using "gcc -O3 -mcpu=i686 -fomit-frame-pointer -ffast-math" or similar to make it run ~10% faster, but compilation may take hours instead of seconds...

    --
    My other account has a 3-digit UID.
    1. Re:Use TinyCC with SmartEiffel! by Daniel+Phillips · · Score: 3, Interesting

      try using TinyCC [tinycc.org] instead of GCC.

      Thanks for that. I grabbed the source, which fails to build (on linux) with:

      tccelf.c:382: `RTLD_DEFAULT' undeclared

      Supplying the missing definition gets it to build, then I was able to get it to self-compile just by supplying a -I to the gcc headers and a symlink to the build directory for the libraries (I like it when I can evade sudo make install easily). Yes, it's instantaneous.

      It's a recursive-descent one-pass compiler, i.e., inline code generation, as you might expect. There's little or no register optimization and no discernable global optimization, again as you might expect, so it's a slight exaggeration to say it generates code quality near the level of gcc -O2. The compile speed would way more than make up for this in the vast majority of development situations.

      Without inline assembly or support for gcc's weird array of special attributes, you couldn't compile much of the kernel with this, but maybe with a little tweaking you could compile module code.

      I'd like to see somebody take on the challenge of a tiny two-pass C compiler, with an intermediate parse tree. How much bigger would it be? Not much, and the extra time to build+traverse the tree would likely only add 20-30% to compile time, leaving it still several times faster than gcc (ever more so vs gcc 3.x). This design would open up the field for 'tiny global optimization', which would be fun to see.

      time gcc -O2 -g -Wall -m386 -malign-functions=0 -DCONFIG_TCC_PREFIX=\"/usr/local\" -o tcc_g tcc.c -ldl

      real 0m8.833s
      user 0m8.120s
      sys 0m0.140s

      time bin/tcc_g -I/src/tcc-0.9.14 -DCONFIG_TCC_PREFIX=\"/usr/local\" -o tcc_g tcc.c -ldl

      real 0m0.502s
      user 0m0.430s
      sys 0m0.040s

      --
      Have you got your LWN subscription yet?
  12. What about threading? by RockyJSquirel · · Score: 3, Interesting

    Last time I checked (years ago), the Eiffel's garbage collector didn't handle objects shared between different threads.

    Does anyone know whether this was fixed and/or how what SmartEiffel's garbage collector is like?

    Rocky J. Squirrel