I want a blog
When I first designed this blog’s Wordpress theme, Lispy, I was very happy with how the end result turned out.
Now I hate it.
I want a blog with:
- No administrative debris
- No sidebars
- No categories
- No tags
- No “blogrolls”
- No Ajax or useless Javascripts
- No RSS feeds
- No authentication mechanisms other than HTTP’s
I want a blog that is:
- Fully RESTful, cacheable, cache-aware
- Fully W3C-compliant
- Able to do content negotiation for language and media-type
- Knowledgeable about APP, and of course with Atom feeds for everything
- Implemented in a proper language. That is, no PHP, no Java, no JSP, no ASP.
What, there’s none with all those unfeatures? Damn. Why can’t the world just write software like I want? Oh well, out to be unsatisfied until Tomayko release his Rack + Sinatra thing. Or until I build one myself…
no rss means I wouldn’t be able to read it :(
Comment by ark — 2008-04-18 22:31:44
what, is there a feed reader in this day and age that’s still not able to read Atom? out of curiosity, what is that?
your feed software sucks, switch to something better :) I suggest Google Reader ;)
Comment by leoboiko — 2008-04-18 22:50:45
You know, you can just remove the administrative debris, the sidebar and tags and 1/3 of the problem will be solved XD
You talk about this issue often… It would be a very interesting post if you would explain these stuff and why they are important (or not).
And just for curiosity… if you would implement it, which language would you choose? :)
Comment by Conrado — 2008-04-18 22:54:07
Conrado: it’s true, I can just remove the cruft… But then why not go the whole way and unbloat the underneath system as well? I’m a hopeless perfectionist completionist minimalist aesthete, forever doomed to look under the hood and to get no satisfaction. (When MIPS processors will be cheap enough that we can ditch the ugly barbaric x86 architecture?)
I don’t write about the ‘why’ of this stuff because I feel that it was already well explained by people much better than I. Check out Fielding’s dissertation, Tomayko’s writings, or the “RESTful Web Services” book, for example. But my short answer is: things could be way more elegant than they are. Another attempt at a short answer: Content should be king.
As for what language… Scheme! Scheme scheme scheme, nothing’s as beautiful and powerful as scheme (er, with CL-like macros). But in the Real World where I can’t run my own webserver, I’d probably use Ruby; it’s the lispiest language that’s easily available for web work at dreamhost etc.
Comment by Leonardo Boiko — 2008-04-18 23:44:17
Don’t worry, I think I understand your point (Indeed, I’ve thinking about that in my comp architecture class: MIPS is so elegant, and x86 is such a gory pile of… stuff… that amazes me it actually works. But when you throw in all the ILP etc for improving speed, all architectures become something like that - not as much as x86, though :) )
Thanks for pointing out those, I guess I was just being lazy to find them… For Fielding’s dissertation you mean this?
I understand your “things could be way more elegant than they are” philosophy, but don’t you think that sometimes thinking like that leads you to doing… nothing at all? I always struggle with my code thinking that it’s fugly and could be better, but if I keep thinking like that, I end up coding nothing at all… Just wondering what are your thoughts about this ^^’
So… Scheme, huh. I’ve been wanting to learning either Scheme or Haskell.. since I know a little bit of Lisp I was thinking in learning something more different (Haskell) but everyone talks about Scheme and I’m curious about it. I’d like to learn Ruby too but right now I’m messing more with Python…
Comment by Conrado — 2008-04-19 02:13:34
Dude, regardless of which one of the two you learn first, do learn Haskell. It’s so expressive and concise that it will blow your mind. I kid you not. I found that exploring Haskell is way more rewarding than exploring any other language. I recommend “Yet Another Haskell Tutorial” as a good introduction. Sorry for the unrequested opinion, but I felt I had to say something :D
Comment by Rafael Meira — 2008-04-19 02:51:34
Exactly. The practical stuff is at sections 5 and 6.
Yes =(
Scheme is elegant Lisp. If you want to learn something different, by all means try Haskell; it’s probably the best way of learning about functional languages. But if you only knows a bit of Lisp, chances are you’re missing the meaty part – the stuff that makes Lisp unique, namely, syntactic abstraction. Try reading some of Paul Graham’s On Lisp to see how interesting these techniques are (if you find it too advanced and/or boring, read a few of his articles first). There are many implementations of Scheme, but my particular favourite is Gauche: it’s Unicode-oriented from the ground up, supports most SRFIs (Scheme extensions), and has a standard library intended to make it practical in an Unix environment.
As for ruby vs. python, they’re much the same thing feature-wise. The difference is all in the community approach. Python is like Pascal and Java and Ada: it wants to find the One Correct Way of doing things (aka “pythonic”) and convince everyone to do it; it wants to protect programmers from their own mistakes. Ruby is like Perl and C and Lisp: it wants to give the programmer as much power as possible, and if he misuses that power, that’s his problem—the language won’t be made less powerful to accommodate that. Python is “explicit is better than implicit”, ruby is the “principle of the least surprise”; these are mutually exclusive. Some people prefer the first approach, but I find the later to be much better (despite the fact that Python was my first language).
Also, if you really want to play with Lisp, Ruby will quickly teach you to think in terms of lambdas and closures (they call it “code blocks”); they’re used extensively in the core library for everything, and therefore in the third-party libraries as well. You’ll still be missing metaprogramming though (it’s mathematically impossible to create a non-Lisp language featuring lispy macros; or, in other words, “Lisp” is a word describing algorithmic languages with syntactic abstraction).
Comment by leoboiko — 2008-04-19 03:03:15
I’ve started to learn Haskell, but stoped after a little bit… I’ve also started do read On Lisp, but also stoped after a little bit. Definitely a pattern there :)
But thanks Leonardo and Rafael for the insightful comments and tips. My To Do and To Read lists just got (even more) bigger.
Comment by Conrado — 2008-04-19 03:40:52
Haskell is so unbelievably cool and powerful, and the ability to load your module and play with it in the interpreter: even better than python… until you try to do something non-functional (like IO or random numbers) with it. Monads may be a nice THEORETICAL concept, but in practise aktually not so great…
YAHT is good, there are some other good tutorials, but I hit a brick wall with the monad thing (and there are some symplifying syntaxes that are a bit confusing)…
GHC is fast and powerful, Hugs is a bit easier, not many libraries, slower (since it’s interpreted) but bearable
Comment by Tabgal — 2008-04-19 13:17:45
Since we’re on topic: the nice thing about metaprogramming is that we can just write any new fancy paradigm on Lisp. Check out Qi for some exceedingly fun stuff with pattern matching and other haskell-like abilities.
Comment by leoboiko — 2008-04-19 13:50:02
Tabgal, have you read “All About Monads”? http://www.haskell.org/allaboutmonads/html/index.html
I only read the section about monad transformers, but I’ve been told that the whole tutorial is good.
I began to understand monads when I read the YAHT chapter about them, especially the part where they changed the names of the basic monad functions to further clarify that monads are computations, and also the part where they showed the meaning of the do notation.
Comment by Rafael Meira — 2008-04-19 14:11:46
Syntactic abstraction is great and all, but the Qi author is right: a language that allows you to do lots of stuff, or just cool stuff, right out of the box is too enticing. Even if “cool stuff” is just something like the following ghci session:
Prelude> let (*$) = flip (map . flip ($)) Prelude> [(+2), (*3)] *$ 2 [4,6] Prelude>It might be silly, but I love that you can do stuff like that in Haskell.
Comment by Rafael Meira — 2008-04-20 14:24:10
Oops.
Prelude> let (*$) = flip (map . flip ($))Prelude> [(+2), (*3)] *$ 2[4,6]Prelude>Comment by Rafael Meira — 2008-04-20 14:26:10
LOL, I suck at markdown.
Comment by Rafael Meira — 2008-04-20 14:27:01
Hope it works now.
Comment by Rafael Meira — 2008-04-20 14:31:01
Yeah, that’s cool! Aren’t we lucky that lisp is so powerful that we can do that same thing on it too (as proved by the existence of Qi and the like)? And we can do real object orientation and logic and nondeterminism and continuations etc. etc. too, all in the same program if we want? Strong or weak typing, dynamic or lexical scoping, imperative or functional at will?
I don’t see myself learning Haskell anytime soon because I see no reason to tie myself to a single paradigm, and on practical grounds I see no benefit in switching, while the functionality I’d lose are many. Macros most notably; I’m convinced that macros are the ultimate tool to maximize code reuse.
If I wanted to criticize what lisp cannot do, I’d look to another direction — say, Erlang; while I’m sure that one can do Erlang in lisp, I don’t know if anyone have already done so in a widespread manner. But Haskell, Prolog, Smalltalk are done in Lisp like several times in several places.
But I’m talking out of my ass here and will stop before real computer scientists find this discussion and humiliate me =) In these c++/php/java/python wastelands, if you do Haskell I love you anyway.
Comment by Leonardo Boiko — 2008-04-20 17:05:36
Ehh… you don’t sound like you love me at all. I wasn’t bashing Lisp or anything like that, I was just trying to illustrate what the Qi author said. Sorry if I upset you :(
Comment by Rafael Meira — 2008-04-20 17:50:12
I’m not upset at all, and I’m not bashing Haskell either. I was just commenting on the evident superiority of lisp over everything else 8)
Comment by leoboiko — 2008-04-20 18:30:11
I don’t know about that… I think it’s a tie between Forth and Lisp.
Comment by Rafael Meira — 2008-04-20 18:49:43
Forth is awesome! FACT: Japanese is actually valid Forth! This is totally TRUE!
Comment by leoboiko — 2008-04-20 18:53:49
Yeah, man! Forth is awesome! PostScript is awesome too, but lacks macros. I love stack languages! :D
Comment by Rafael Meira — 2008-04-20 19:07:22
Hey, that’s a pretty good article! I wish they had posted the final lesson.
Comment by Rafael Meira — 2008-04-20 20:55:56
Isn’t it? I love to point it to ethnocentric people who say SVO is the ”natural” sentence order.
Comment by leoboiko — 2008-04-20 20:57:21
By all means, create something yourself. I only hope you can find a Scheme + PostgreSQL host.
Comment by Leandro GFC DUTRA — 2008-04-22 10:25:42
By the way, there is a Qi Emacs. Wasn’t that what you were looking for, an Emacs based on a good Lisp?
Comment by Leandro GFC DUTRA — 2008-04-22 10:29:24
There are plenty of emacsen based in good languages. The problem is compatibility with GNU Emacs applications. I won’t give up on nxml-mode, erc, the language modes, etc.
Comment by leoboiko — 2008-04-22 10:33:49