((lisp) LoL: RAD with full ROFL & MAO support (RoR-like MVC in CL)(parens)(acronyms))

mr_luc

Veteran X
((lisp) LoL: RAD with full ROFL & MAO support (RoR-like MVC in CL)(parens)(acronyms))

DISCLAIMER: I doubt that anyone here (even hardcore coders) are interested in this AT ALL. However, a few Comp Sci students here have expressed extreme interest in learning Lisp to help them become better coders in other languages, or to learn to think about problems differently; they asked why I hadn't posted a thread on it yet. Which is a good question. So I'm taking the opportunity presented by the existence of a workable, relatively simple installation method for Lisp On Lines to make a thread for people interested in learning Lisp.

WHAT LISP ON LINES MEANS: if you have a linux box, follow the instructions linked later, and are willing to install sbcl (a free lisp, "apt-get install sbcl" should work for debian users), you can start mucking around with web applications in lisp.

This is harder than mucking with web applications in Ruby, much harder (initially). It's not as well-supported, it's super-alpha. But it's a good way to get started, IF you're already a really good hacker who wants to learn Lisp with support for Ruby On Rails-style development.

If you are able and willing to tinker with Common Lisp, I will help point you towards resources. But it requires big brass hacker-balls and the inclination to learn about Lisp. I do not realistically expect anyone to take me up on this offer.


Lisp On Lines
is a lightweight implementation of a Ruby On Rails-esque framework, built on top of an existing continuations-based web framework (UnCommonWeb) instead of a custom controller a la Ruby.
  • If you don't know what MVC is, you should, but this thread is going to be useless.
  • If you don't know why Ruby On Rails is so powerful for speeding up development, you owe it to yourself to check it out. Full MVC, ORM etc in an amazingly clean package, cleaner than it's possible to get in a language like Java.
  • If you don't know what ORM is or why you should be using it, or strong MVC frameworks, and you code in .NET or Java, learn about Hibernate or nHibernate, respectively, as well as MVC in Spring/Spring.NET. You can realistically expect to reduce the size of webapps by around a third to two-thirds, at least, just by using those two frameworks to handle (respectively) data and UI plumbing. (Ruby On Rails has all of that stuff built in, under the hood, so if you're a Java/.NET coder I reccomend learning about Hibernate, and then going through a Ruby On Rails tutorial and seeing how you can do in RoR in 5 minutes what would take a good Java hacker perhaps days to set up cleanly.


It uses a Relational Object Flow for Lisp (ROFL), like ActiveRecord in Ruby.

As well as a complete implementation of MEWA (see the paper "A Meta-Level Architecture for Generic Web Application Construction"), for Mewa-Attribute Occurrences (MAO).

And the best thing is that there is no "controller" per se; it's like a regular UnCommonWeb application that you can write like a regular app. ;) This is something Ruby doesn't yet have (the RoR framework doesn't have truly efficient continuations available for this sort of thing, where we can write code that looks like a command-line program and yet is interacted with via the web).


It's still pre-pre-pre-pre-pre-alpha, but if you have a debian system around and can successfully apt-get install sbcl, you can now install it with relative ease by following the instructions at http://kevin.casa.cavewallarts.com/LISP/LOL/lol.html

Currently it uses postgresql as a backend; UCW can be set up to run behind Apache with mod_lisp, or you can use one of several free high-performance webservers written in CL.

The page there shows you how to download a tar with a complete, configured site-systems package. The build process is INTENSE and takes a while on the first load, as lisp programs can compile code on the fly and will do so when loading uncompiled systems for the first time. There are a couple of errors that you may encounter, and I'm willing to help with those if you're serious about getting into Common Lisp.

(And, of course, it goes without saying that in this thread I'll help with all and sundry issues involved in getting going in Lisp development).
 
im making my own 3d physics system in java

the rest of the class is learning how to use queries and reports in Access

:(
 
MrMeikel said:
im making my own 3d physics system in java

the rest of the class is learning how to use queries and reports in Access

:(
Heh, rock on. (Btw, what sort of architecture are you using to visualize it/run it? What sort of an API are you writing?)

I was in the same situation when I was 14 -- in the college CS program, the most we were learning was command-line Java stuff with only basic OO concepts, and basic Swing GUIs. And everybody was quitting because it was hard.

Meanwhile, I was learning to REALLY program from Tribes scripting. :lol:
 
MrMeikel said:
im making my own 3d physics system in java

the rest of the class is learning how to use queries and reports in Access

:(

Sad part is with a really good knowledge of Access and reports (Crystal) you could get a job in oh 10 seconds.
 
cs major....intro to c++ is funny...

everyone else is struggling, and one of the guys said "you're just doing well because you know it already" i replied with "i dont know c++".

When you've been writing code since 7 years old, new languages are like driving on a road you've never driven on before. sure, you dont know it, but you'll do just fine if you take it easy.

p.s. i have no fucking clue what you just said.
 
I think it's hilarious that lisp, self-proclaimed mother of genius ideas and code, steals the concept behind rails, essentially a toolkit for simple web development, emphasis on simple.

so basically, lisp needs a way to become more simple.

next?
 
MVC = Model View Controller, right?

I'm using this along with the Spring Framework and Hibernate in my Senior Project. Pretty interesting stuff
 
Pachacutec said:
I think it's hilarious that lisp, self-proclaimed mother of genius ideas and code, steals the concept behind rails, essentially a toolkit for simple web development, emphasis on simple.

so basically, lisp needs a way to become more simple.

next?
First of all, I don't need to defend Lisp. ;) The ideas behind Rails were ideas that were common in SmallTalk for many decades; if you knew what you were talking about you'd have known that, and left out the silly straw-man about lisp having a patent on all good ideas.

Lisp has more powerful language features than Ruby, because of macros; this is well-understood and if you disagree I will point you towards the ruby mailing lists, where that point is frequently acknowledged; it just so happens that if you don't want to deal with macros or any of the list-based-code techniques of Lisp, you'd be daft to use it over Ruby. Many people prefer not to use macros, and so lisp has much less usefulness to them.

And "Lisp" isn't stealing anything; this is the project of a talented hacker named Drew Crampsie. It doesn't borrow a single idea from Ruby except the idea of packaging things up for people; even the MEWA "occurrences" model isn't found in RoR. It lets you use similar development methods.

Lisp doesn't need anything to make it, the language, simple. But on the other hand, there isn't any interest in coddling newbies. It's not easy to solve problems? Too bad. We don't do your thinking for you. All we can promise is that Lisp won't get in the way of your problem-solving, and it will let you express your solutions at least as elegantly as other languages. Moreover, because of the creative tools it gives you (macros), it will eventually improve the way you think about problems.

But the RoR stuff is toolkit stuff. Most Lispers, myself included, HATE needing to develop in SQL and avoid it whenever possible. Ruby On Rails is SQL-only. Thus, people don't tend to use Lisp to write the kinds of inflexibly-typed, static-schema programs they'd write in lesser languages, and those include Ruby (which I use, with RoR, for the easier jobs I undertake). If we have to write a trivial program we'll do it in whatever language has a toolkit and support.

The LoL toolkit is a completely different stack from RoR, but because of the popularity of RoR, a lisper (a single person, over a month or so) decided to create a prototype framework to show how by combining techniques already explored in Lisp, you can roll your own framework for similar kinds of development.

If you aren't interested in improving your abilities as a programmer by learning Lisp, this thread probably isn't for you; I think I mentioned that.
 
Razer said:
MVC = Model View Controller, right?

I'm using this along with the Spring Framework and Hibernate in my Senior Project. Pretty interesting stuff
Yup, which came out of Smalltalk.

You're at exactly the experience level to appreciate Ruby On Rails. This thread is a multiple-evangelism deal, heh; if you are familiar with the level of configuration, relative inflexibility etc that is needed for a Hibernate/Spring program on the one hand, but are already aware of the benefits in reduced complexity from ordinary data access methods, hand-coded/clunky half-assery in the place of MVC, etc, then you will be able to appreciate how much cleaner Ruby On Rails makes it. What you probably won't know is how it can do it so cleanly, without the side-effects that would exist if the same approach were tried in Java/.NET.

ActiveRecord is basically Ruby's version of Hibernate. Except that it simply extends (cleanly! YOU don't have to contaminate your code as you would in Java) your objects to remove the PITA of session management in Hibernate, any of that stuff. You can DO everything Hib will let you do, but the sensible defaults mean that within well under 5 minutes you can have a running app.

The implications of a MEWA-based architecture and MVC framework for LISP built on the powerful continuations-based UCW is then a layering of mind-boggling atop mind-boggling, but only to lispers.
 
the way you tout lisp is how linguists tout latin but in the reality it makes no fuckin difference. the truth is most major languages make you a better programmer:

c: better at low level and memory handling concepts
asm: better at optimizing code
java: better OO programmer (yes, i have to give java some creds for once)
and so on...

the more of these combined the better. a typical java-only programmer writes horridly inefficient code for example.

all this talk of languages, toolkits, etc is bleeding my ears. now tell me, have you ever actually made anything revolutionary and cool?
 
mr_luc said:
No, thank heavens.

It just reroutes to a lisp process.
message passing and shared memory between processes is less efficient... so why does the embedded implementation sound so bad?
 
Khushi said:
message passing and shared memory between processes is less efficient... so why does the embedded implementation sound so bad?
For a lot of reasons, but the easiest one to answer would be that while Lisp CAN be interpreted, normally people native-compile the performance-intensive stuff, so embedding an interpreter is a bad idea.

But the more general answer is that it's ALWAYS more efficient to have a single process waiting in a loop to accept input. You overestimate the cost of message-passing locally between processes (which is blazingly fast and trivial) as compared to starting up a new instance of an interpreter and executing each request in its own unique context. That method is faster than spawning an interpreter in a new thread for a request by a large margin.
 
Back
Top