Re: [haml] Re: Cross Language HAML Unit Test Set

2 views
Skip to first unread message

Norman Clarke

unread,
Aug 9, 2009, 11:43:21 AM8/9/09
to haml...@googlegroups.com
Hi all,

I'm working on Haml for Lua (http://github.com/norman/lua-haml), and
am currently about 25% or so done. This would be *extremely* helpful
for me to have right now.

I think ideally it would mostly be just a long list of very simple key
value pairs like:

# simple tag
"%p" = "<p></p>",
# simple tag with css class
"%p.class1" = "<p class='class1'></p>"

that indicate how various inputs are supposed to be rendered. I have a
lot of free time right now - I'm taking a year off to work only on
open source, and Haml for Lua is my first "big" project. So I would be
happy to help develop this.

Regards,

Norman

On Sat, Aug 8, 2009 at 4:52 AM, Nathan Weizenbaum<nex...@gmail.com> wrote:
> Hi David,
>
> This is the sort of thing that belongs on the haml-dev mailing list
> (http://groups.google.com/group/haml-dev). Please bring it up there - it's
> an important thing to talk about!
>
> - Nathan
>
> On Fri, Aug 7, 2009 at 5:46 PM, Chris Eppstein <ch...@eppsteins.net> wrote:
>>
>> I think it would be great if haml provides tests and a language spec.
>> These things are a lot of work, but they pave the way for greater
>> adoption.
>>
>> Hunt & pecked on my iPhone... Sorry if it's brief!
>>
>> On Aug 7, 2009, at 5:15 PM, David Moring <da...@appliedautonomics.com>
>> wrote:
>>
>> >
>> > Y'all,
>> >
>> > Spent some time working on pHAML, which is a php version of HAML,
>> > updating the code set, developing the unit tests.  We have used this
>> > since 2006 in production, no issues, DRY is the way to go.
>> >
>> > So here is my question:
>> >
>> > Is it an idea to develop a cross-language subset of the HAML unit
>> > tests,
>> > something that the community can agree upon as a cross language
>> > standard?  So that we agree that if a code set passes all of the
>> > tests,
>> > we can call the library "standard" HAML.
>> >
>> > I have an active proposal to add this port to the Zend Framework, but
>> > would like to get everyone's thoughts before locking stuff in stone.
>> >
>> > Ruby is a great language, but PHP has few followers too.
>> >
>> > Thanks,
>> >
>> > --David
>> >
>> > >
>>
>>
>
>
> >
>

Nathan Weizenbaum

unread,
Aug 9, 2009, 2:38:46 PM8/9/09
to haml...@googlegroups.com
I'm up for this idea. I've thought a little about creating some sort of Haml standard before, and I think one thing we should try to do is create a somewhat modular standard. There should be a core containing the most basic aspects of Haml - tags, comments, that sort of thing. There should be a module defining basic things about how to integrate the host language into Haml, left sufficiently general to allow for the use of each host language's idioms. Then there should be modules for various features that aren't necessary for the core, but might still be useful, such as filters, HTML escaping, and whitespace removal.

I don't know how familiar you are with Ruby, Norman, but it might be worthwhile for you to go through the Ruby Haml tests (especially test/haml/engine_test.rb) and extract the non-Ruby-specific tests from there.

Norman Clarke

unread,
Aug 9, 2009, 8:17:21 PM8/9/09
to haml...@googlegroups.com
On Sun, Aug 9, 2009 at 3:38 PM, Nathan Weizenbaum<nex...@gmail.com> wrote:
> I'm up for this idea. I've thought a little about creating some sort of Haml
> standard before, and I think one thing we should try to do is create a
> somewhat modular standard. There should be a core containing the most basic
> aspects of Haml - tags, comments, that sort of thing. There should be a
> module defining basic things about how to integrate the host language into
> Haml, left sufficiently general to allow for the use of each host language's
> idioms. Then there should be modules for various features that aren't
> necessary for the core, but might still be useful, such as filters, HTML
> escaping, and whitespace removal.

I agree 100%, this is what would be the most useful to the largest
number of people.

> I don't know how familiar you are with Ruby, Norman, but it might be
> worthwhile for you to go through the Ruby Haml tests (especially
> test/haml/engine_test.rb) and extract the non-Ruby-specific tests from
> there.

I'm actually much more familiar with Ruby than Lua. I've been cherry
picking pieces of the tests from your Haml as I need them; I'll see if
I can go through them this week and pull out some more to give this
idea little momentum. If you take a look at my project on Github
(http://github.com/norman/lua-haml) you can see I've already started
to put together some simple specs, but for now it's only a small
subset of what we'll all eventually want to have.

I haven't sent many message to the list so let me take this
opportunity to say thanks to Hamptonn and Nathan for all the work on
Haml so far. Your work has brought much joy to my life as a developer.
:-)

Regards,

Norm

Hampton

unread,
Aug 9, 2009, 10:39:09 PM8/9/09
to haml...@googlegroups.com
Lua Haml might be of interest to Wikimedia actually....

Norman Clarke

unread,
Aug 9, 2009, 11:19:42 PM8/9/09
to haml...@googlegroups.com
That would be very cool - I've been working on it assuming almost
nobody would ever use it except me. If there's any serious interest
let me know and I'd be happy to work on any features that might make
it more useful for you.
Reply all
Reply to author
Forward
0 new messages