Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Lisp and Ruby 336

sdelmont writes "The developers of Rubinius, an experimental Ruby interpreter inspired by SmallTalk, have been discussing the possibility of adding a Lisp dialect to their VM. Pat Eyler collected some ideas and opinions from the people involved and it makes for some interesting reading. For many, Ruby already is an acceptable Lisp, and the language itself started as a 'perlification' of Lisp (even Matz says so) so it is perhaps fitting and might help explain why the whole idea feels right. Now, if someone added support for VB and gave it the respect it deserves, the world would be a better place."
This discussion has been archived. No new comments can be posted.

Lisp and Ruby

Comments Filter:
  • by Lucas.Langa ( 922843 ) on Sunday January 14, 2007 @09:30AM (#17601906) Homepage

    Yeah, it's cool to virtualize, introduce dialects, interpret, etc. etc. Now, for the first time ever, we have cheap mainstream computer hardware that's capable of handling all these ideas in an acceptable way. But, isn't it a huge waste of resources? What about performance?

    I mean, take Lisp and its performance. Compare it to Ruby's. Matz said himself that Ruby started as a kind of Lisp reconsideration. And you call this progress?

    The thing is that you can implement a dynamic language that isn't painfully slow. Take Lua for instance. Eh, if only it had Unicode support.

  • by Timesprout ( 579035 ) on Sunday January 14, 2007 @09:37AM (#17601932)
    Yeah, how dare MS make it easy for developers and even non developers to quickly create applications to fulfil their requirements.
  • by Anonymous Coward on Sunday January 14, 2007 @09:37AM (#17601934)
    Thousands (millions?) of "I can't code my way out of a wet paper bag" programmers would disagree with you.

    From a technical perspective it might suck but it works a lot of people (especially non-programmers) to get real work done.
  • by Anonymous Coward on Sunday January 14, 2007 @09:39AM (#17601936)
    It's horrible if you don't use it as it should be used. Just like C gets horrible if 50% of your lines of code start with # .
    VB (and even more VB.NET) is a language where you clearly see the difference between a rookie programmer and a pro. The sad part is that they market it as targeted to the rookie which has unlimited potential for damage (starting from the option strict off).
  • by S.O.B. ( 136083 ) on Sunday January 14, 2007 @10:15AM (#17602088)
    From a technical perspective it might suck but it works a lot of people (especially non-programmers) to get real work done.


    And when that program gets too big for them to maintain (or they just don't feel like it anymore) they dump it on their IT area and we're stuck maintaining or converting an app in a technology we wouldn't have chosen that looks like it was designed by a pack of drunken monkeys.

    Build a tool even an idiot can use and only an idiot will want to use it.
  • That is notthe problem. How dare Microsoft makes it so HARD to write good, clear and maintanable code on their language?
  • by JanneM ( 7445 ) on Sunday January 14, 2007 @10:18AM (#17602114) Homepage
    To me, as an old Perl programmer, Ruby basically feels like what Perl 6 should have become: keeping with the idea of making things discoverable for the programmer and not having to work around syntax, but greatly cleaned up and with objects as an integrated part of the language, not so tacked-on as in Perl 5.

    Ruby still has some pretty significant drawbacks, of course; it's slow, and has little support for Unicode (not that surprising, seeing it's from Japan). The libraries aren't as mature yet either; Perl has many year's headstart there so again no surprise. All of these are improving, though.
  • by Anonymous Coward on Sunday January 14, 2007 @10:38AM (#17602226)
    What most people don't realize is that Lisp is the inherent representation of virtually all programming languages. This is even true for languages like C, Java, Smalltalk, and Ruby. We can plainly see this by the very fact that basically every compiler or interpreter for those languages parses the language into an abstract syntax tree. And that's exactly what Lisp is: a textual representation of an AST. It is so powerful because it directly allows the programmer to access and modify what amounts to the AST of his or her program. This is something that a language like C isolates to the compiler, or at best the preprocessor.

    What fewer people realize is that Smalltalk is Lisp with a slightly different syntax. The concepts are basically identical, however. So suppose the Ruby developers do all the hard work needed to switch their language over to a Smalltalk-like syntax. Do you know what will happen next? They'll ask themselves what could be improved next. And the first thing that'll happen is a consideration of making the syntax and semantics of the language more Lisp-like. And that's just because Lisp represents the most inherent aspects of what a programming language is.

  • That says far more about your circle of friends/co-workers than it does about the language.
  • by Flodis ( 998453 ) on Sunday January 14, 2007 @10:50AM (#17602282)
    Build a tool even an idiot can use and only an idiot will want to use it.
    I'd like to change that to "Build a tool even an idiot can use and expect idiots will try to use it."

    I've been on the receiving end of many a poorly designed VB app, but is that the language's fault?

    Assume we collect a random number of 3rd graders' essays. We can safely assume they will be pretty badly written. Do you automatically blame 'english' for the essays being bad? Maybe you also tout another language as superior just because the only ones you know speaking that other language are all 20+, and have picked up a bit or two about telling a story.

    Btw, english is not my first language, and I think the VB slamming that is so fashionable around slashdot is just stupid. Not that I think there's any doubt about either after this.
  • by ravenlock ( 693538 ) on Sunday January 14, 2007 @10:51AM (#17602292)
    If I build a new and presumably better (in my own opinion) programming language starting off with Lisp, and my implementation turns out to be less powerful and slower than an average CL implementation, is that progress?

    It is if it helps introduce the concepts behind Lisp to a lot of people who never would have dared to venture into Lisp otherwise. Ruby was the first language with functional constructs I tried (very much due to the excitement around Rails). Now I'm reading up on Lambda Calculus and learning Haskell, and I'm not at all sure it would have happened, were it not for Ruby.

  • by hclyff ( 925743 ) on Sunday January 14, 2007 @11:02AM (#17602368)
    This is exactly the kind of reply I would expect from a VB developer or "non developer". By "quickly create applications to fulfil their requirements" you probably mean "create a horrible unmaintenable mess which not even the original author will touch, and which has is almost certainly going to be rewritten by a developer at some point in future". Enabling non developers make production code is *NOT* a good thing, I think most people with some experience in the industry will agree with this.
  • by TheRaven64 ( 641858 ) on Sunday January 14, 2007 @11:13AM (#17602438) Journal
    Before VB, NeXT released a Rapid Application Development environment. It used Objective-C, which can be used as a language almost as high-level as VB in some ways, and higher-level in others. It also allows programmers who know what they are doing to do all the sorts of evil things that give C such a bad reputation. The language, however, is largely irrelevant. The frameworks are the important thing (these days you can use Smalltalk, Java, Ruby, Python or IO with descendants of the frameworks).

    When you write code using the OpenStep frameworks, designed by NeXT and tidied up by NeXT and Sun, the path of least resistance is a clear model-view-controller separation. Someone asked me last week 'do you always follow strict MVC separation in your code?' I hadn't really thought about it, but I tend to because the framework just makes that the obvious way of working. In contrast, VB encourages you to keep model information in the view objects.

    This is just one example. A good framework means that you implement good design patterns without thinking. If you do this, then your application will be more flexible and maintainable when you come to make changes to it in the future (or, more importantly, when someone else does). Developing with OpenStep is slightly harder than developing with VB. Maintaining an OpenStep application is far easier than maintaining a VB application.

  • by Anonymous Coward on Sunday January 14, 2007 @11:13AM (#17602444)
    Superiority complex much?

    I guess I could be considered a real programmer as I have been programming various systems for about 25 years. I program in practically every language there is depending on the project. Yes, I write VB code. I have written huge VB applications in fact. While most of my code is other languages and dispite its shortcomings, VB suits its role very well.

    Ignorance is bliss?
  • MOD PARENT UP (Score:4, Insightful)

    by TheRaven64 ( 641858 ) on Sunday January 14, 2007 @11:22AM (#17602514) Journal
    I have noticed a lot of interest in more interesting languages, like Lisp, Smalltalk, Haskell and Erlang recently from people who a few years ago would have been C, maybe Python programmers. I think a lot of this is due to the fact that people have been introduced (finally) to a relatively mainstream language that goes beyond the slightly-higher-level-than-assembly pure-imperative (with maybe a hint of OO) style that has been common for the last few generations of 'new' languages.

    I don't think I'd use Ruby for anything (except maybe as a teaching language), but I can't deny that it has done a superb job of introducing a new generation of programmers to the benefits of a true high-level language.

  • by tacocat ( 527354 ) <tallison1&twmi,rr,com> on Sunday January 14, 2007 @11:39AM (#17602660)

    Actually there is a good reason to look at Perl given Ruby. Regular Expressions. Ruby has a object and method for doing regular expressions but compared to Perl it's very combersome and is even lacking some of the properties that Perl's regex has. Since I tend to use a lot of my programming time dealing with text of some kind, regular expression are important to me.

    Ruby is a nice language. It's easy to work with. But it's got some maturing to do and I do hope they spend at least a version working on speed and documentation.

  • by X=X+0 ( 142003 ) on Sunday January 14, 2007 @12:02PM (#17602868)
    The fact that you've never met a VB.NET developer who understands those programming concepts is a result of the glut of bad programers put out there by businesses and recruiting companies training anyone they can find off the street to code when the developer population ran short. I've seen plenty of Java projects implemented by idiots that ran 3 times slower then a VB 6 program my team had written 3 years earlier.

    The difference was not and never is the language. It's the developers that come into the business b/c of the good pay ($$$) and never made it through a Computer Science degree at a 4 year school. I've been interviewing and hiring developers over the past 5 years and the story is always the same. There are those who went to school and understand the concepts, and there are those who were taught the basics at some training course and then figure out the rest by blindly stabbing at the problem until it kind of works. The sad part is that I've had interviewees actually tell me that they were a person that got into programming when some company pulled them off the street and trained them for 4 weeks, then threw them into a contract that they needed bodies in to rack up billable hours. The sad part is that those same people come out at the end of the contract thinking that they can really build something! :-(

    There's always going to be a (large) group of unprofessional idiots in any profession that requires no certification or licences and makes good money. Look how the booming real-estate market suddenly created so many "investors". All of the sudden everyone's a real-estate expert. ;-)

  • by Not_Wiggins ( 686627 ) on Sunday January 14, 2007 @12:10PM (#17602916) Journal
    The problem is that Ruby has very poor runtime performance.

    Not so much in response to the post, but to add to it...
    I'm not that old, but I remember the same being said for:
    • C++ compared to C
    • Interpreted compared to Compiled
    • Java compared to C++
    • Servlets compared to CGI
    The list could continue. Just wanted to highlight that "performance" is a short-lived reason to avoid a language. 8)
  • by Anonymous Coward on Sunday January 14, 2007 @01:20PM (#17603498)
    Pragmatic programmer loyalists and newbies picking up the "hot" language are the same thing, just people following fads. They will move on to the next fad when it comes along just like they always have. The fact that rails has so many PHPisms in it and most of the ruby community points to it as a shining example of what ruby can do would indicate that you're right, very few of them are experienced or educated programmers.

    There's also the group being tricked into thinking development speed and the number of characters in your source code are the same thing. This is where the answer to your "how does this help me..." question comes it. It doesn't help you, obviously. But it creates an illusion of faster development, which is what draws people in. Who cares that 90% of your time is spent maintaining the code, not writing it. You can wow people with an upfront display of seemingly fast coding, and ignore the fact that in the long run, that code is useless and needs to be re-written correctly. Its just a cheezy magic trick, but as long as people are jizzing over "criss angel" (why would you pick a porn name for chicks to be a "badass" magician?) they will be jizzing over ruby.
  • karma (Score:3, Insightful)

    by namekuseijin ( 604504 ) on Sunday January 14, 2007 @02:23PM (#17604158)
    "VB is programming for people who don't really want to program."

    Well, they better do want to program, because that's what they'll be doing most by going for the "ease" of VB: writing patches and more patches to correct bugs, doing excessive maintanence due to lots of improper, parameterless copy-pasting code and lots of rewrites from scratch once the whole thing eventually collapses under its own weight...

    that, or hire real programmers with real tools from the get-go...
  • by killjoe ( 766577 ) on Sunday January 14, 2007 @03:54PM (#17605066)
    The problem is that MS concentrates on the part of the software lifecycle that is the easiest and shortest. They make is easy to CREATE applications. Alas the rest of the software lifecycle (debugging, refactoring, maintenance, deployment etc) suffers horribly due to VB encouraging spaghetti code.

    In the long run VB is a hinderance and not a help. It's better to have a clean separation then a flashy IDE if you intent to keep your application alive for more then a few days.
  • by calambrac ( 722059 ) on Sunday January 14, 2007 @05:02PM (#17605710)
    I would have to disagree with your statement that Lisp doesn't let you group things. Not only does it let you group things, it lets you write entire languages built specifically for the things you want to group. Macros in Lisp are effectively little compilers that are very easy to write, that let you make whatever language is most useful for working with the concepts you want to "collect, isolate, and distinguish". Combine this with CLOS and generic and functional programming techniques, and you have one of the best languages around for dealing with concepts at a very high level.

    Lisp has its weaknesses, but expressiveness and abstraction are not among them.
  • by hclyff ( 925743 ) on Sunday January 14, 2007 @05:22PM (#17605938)
    I will say again and again that VB simply doesn't encourage good practice. Abominations like "On Error Resume Next" should have never seen day light. There are languages and frameworks better and worse in that, and VB is in my opinion one of the latter. That doesn't mean I think it's a really bad language, there aren't any, there are only bad 'tools for the job'. And in some people's hands any tool is bad for the job, shame for VB that it's pretty commonly tool of choice for them.

    here are a number of interesting, unproven, and contradictory assumptions built-in to your statement: 1) All VB code is a mess 2) VB applications are successful enough to justify being maintained 3) Despite the success of the application implemented in VB, it makes sense to rewrite it in another language 4) The orginal developer isn't willing revise it, but somehow some other developer is willing to rewrite it.
    Not quite. You should read my reply in the context of what I was replying to.
    1. I never said all code in VB is mess, I was refering to "quickly create applications to fulfil their requirements" which screams "hack it quickly, nevermind that nobody will be able to understand it or alter it later".
    2. That they often are. If something is somewhat functional but with an horrid codebase, is it successful? In bussiness setting, it is.
    3. Not rewritten because of being unsuccessful, rewritten because of being unmaintanable. What good is working application if nobody is going to touch it with 3 feet pole to add even the simplest feature?
    4. How is that contradictory with anything I said?
    If by "non developers" you mean VB programmers, and given that a fairly large percentage of people in the industry with some experience are VB programmers than your statement is incorrect.
    How much percent of actual professional VB developers is out there? (that is what I meant by "in the industry")
  • by S.O.B. ( 136083 ) on Sunday January 14, 2007 @05:39PM (#17606114)
    And yet it performs a useful function for the business... If you don't like it, you could always move to a different job or business.


    Nice bit of flamebait. Moving right along...

    Or.

    Perhaps you might want to extend your remit to advocating the technologies you would choose, to the business management. Perhaps you might even want to create a development environment for personnel to produce adhoc applications in the technologies you prefer. Or shock, horror, you could even provide that service within the IT department and actively go looking for opportunities to improve productivity.


    My company does all of that. We have a list of technologies that are approved, in containment and being retired. The department I work for is the likely place for these types of requests to be handled and we have a triage process that takes any request that comes in to well publicized email address and discusses it with the client to determine their needs and estimate the effort. If the client wants to go ahead it is prioritized and put in the schedule. Most times when they realize how much thought and effort it really takes to do it right they let us do it for them.

    Even with all that there's always a guy (surprisingly never a woman) who read VB for dummies over the weekend and now thinks he knows as much as the entire IT department of a multi-billion dollar company. Unfortunately, what he doesn't realize is that writing a program is only a small piece of the problem. Once it's there you have to support and maintain it and that takes time. Then people begin asking for enhancements that he starts bolting on anywhere he can but it's getting harder and harder because he has no concept of design. Now his boss is telling him that he's spending too much time on it and it's not what he's getting paid for anyway. Then it gets dumped on IT and now we have to maintain it.

    And anyone who says why don't you tell them that they'll have to keep maintaining it themselves or pay to have us migrate it to an approved technology has never worked in a large shop where politics often wins out over reality.

    Besides, IT areas do a lot more than write programs. Coding is maybe 15-25% of the actual effort. There is analysis, design, integration (with other internal/external apps), regression testing and deployment to name a few. That's not to mention on-call support, enhancements and regulatory compliance not the least of which is SOX [wikipedia.org].

    I don't have a problem with trained VB developers it's just that the simplicity of the tool and Microsoft's marketing give untrained people a false sense of ability.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...