Stuart Sierra,
I want to use StringTemplate, could you give me a lead?
Emeka
On Thu, Jun 25, 2009 at 9:31 PM, Stuart Sierra
the.stuart.sie...@gmail.comwrote:
On Jun 25, 3:59 pm, Berlin Brown berlin.br...@gmail.com wrote:
But does anyone have a problem with Lisp/S-Expressions to
On Jun 25, 3:59 pm, Berlin Brown berlin.br...@gmail.com wrote:
On Jun 25, 3:52 pm, Mike Hinchey hinche...@gmail.com wrote:
Instead of eval in the doseq, you could use a macro with a do block,
something like:
user (defmacro deftags [tags]
`(do ~@(map (fn [tag]
Hey guys,
I was a little tired of working on what I am supposed to be working
on, and decided to take a break and create a website. I decided to use
Clojure, and to my surprise, it only took a day and less than 3 pages
of code.
members.shaw.ca/patrickli
It only has a single article right now,
That's cool.
(doseq [[name tag] [['html html]
['head head]
['style style]
['title title]
['body body]
['table table]
['row tr]
['col td]
On Jun 25, 2009, at 11:46 AM, CuppoJava wrote:
Hey guys,
I was a little tired of working on what I am supposed to be working
on, and decided to take a break and create a website. I decided to use
Clojure, and to my surprise, it only took a day and less than 3 pages
of code.
Thanks for the reply.
I use doseq instead of map because I need it to run immediately, and
I'm not interested in the return values of the functions.
I also would love to be able to simply the (eval ...) part, but I
don't know of any other way to dynamically define a function in
Clojure. If you
What server are you running it on ? Tomcat ?
There's a compojure web framework that already has html combinator
library.
Check it out here: http://preview.compojure.org/docs
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Thanks for your opinions Daniel.
Yes I really need to adapt to using hyphens instead of underscores.
I've irked more than a few people already.
So far, defblockfn is serving me well, but it has bitten me a few
times now. If I come up with another alternative I will switch over.
-Patrick
I'm not running off any server. All the pages are static html, which
are generated by a Clojure script.
I looked at Compojure, and it seems very promising, but I decided it
was overkill for my website.
-Patrick
--~--~-~--~~~---~--~~
You received this message
On Jun 25, 2009, at 12:57 PM, CuppoJava wrote:
I'm not running off any server. All the pages are static html, which
are generated by a Clojure script.
Haha, that explains the speed. :) *slaps forehead*
—
Daniel Lyons
--~--~-~--~~~---~--~~
You received this
Yeah. Speed and simplicity were my main reasons to use static HTML
instead of running off a server.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
CuppoJava,
Did you try prxml? May be it can be of help.
Regards,
Emeka
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts
CuppoJava,
I was referring to the map data structure {'html html..} and not the
other map.
Regards,
Emeka
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Instead of eval in the doseq, you could use a macro with a do block,
something like:
user (defmacro deftags [tags]
`(do ~@(map (fn [tag]
`(defn ~(symbol (str tag -with))
[block#] (str ~tag block#)))
tags)))
#'user/deftags
On Jun 25, 3:52 pm, Mike Hinchey hinche...@gmail.com wrote:
Instead of eval in the doseq, you could use a macro with a do block,
something like:
user (defmacro deftags [tags]
`(do ~@(map (fn [tag]
`(defn ~(symbol (str tag -with))
Thanks Mike for that tip.
That seems a bit better, but then I have a left-over macro that I have
no use for.
As to why I didn't use a map. I needed destructuring so Clojure would
have internally turned the map into a seq anyway. Though a map would
save me from a layer of parenthesis. I'll keep
On Jun 25, 2009, at 1:59 PM, Berlin Brown wrote:
But does anyone have a problem with Lisp/S-Expressions to HTML/XHtml,
especially for the entire document. What is wrong with using some
form of templating system. I think that is what Lisp has (see Lisp's
Html-template).
On Jun 25, 3:59 pm, Berlin Brown berlin.br...@gmail.com wrote:
But does anyone have a problem with Lisp/S-Expressions to HTML/XHtml,
especially for the entire document. What is wrong with using some
form of templating system.
Yes, I'm partial to StringTemplate, a Java template framework.
I'm not running off any server. All the pages are static html, which
are generated by a Clojure script.
No kidding! I've done the exact same thing for my first website. It
was using Scheme though and leveraged Oleg's SXML library, it bring me
back fond memories. I'm looking at that old code
That's a good point. Dimming the lines would be a good idea. I
originally tried to make the text actually line up with the lines, but
that was a nightmare, and it didn't contribute much to the final
effect.
Scheme is a great language. If I needed to work on a project that runs
natively (ie. not
20 matches
Mail list logo