Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
hamlet and #
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bulat Ziganshin  
View profile  
 More options Jun 13 2012, 12:46 pm
From: Bulat Ziganshin <bulat.zigans...@gmail.com>
Date: Wed, 13 Jun 2012 20:46:38 +0400
Local: Wed, Jun 13 2012 12:46 pm
Subject: hamlet and #
Hello yesodweb,

i'd rather easily converted my html files to hamlet format. the most
problematic thing both for conversion and probably further
maintenance was the handling of multiline contols - i mean than
something like

<p>text
   text</p>

should be converted to

<p>text #
   text

probably it was very motivated decision, but afair most html
templating systems i've learned don't require #'s, and for conversion
of typical, already structured html file it's the most time-consuming
and bug-prone part - the rest is just to remove all those </...> tags
and it's very fast and easy

so, the question is obvious - may be this decision need to be reversed?

--
Best regards,
 Bulat                          mailto:Bulat.Zigans...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Greg Weber  
View profile  
 More options Jun 13 2012, 2:00 pm
From: Greg Weber <g...@gregweber.info>
Date: Wed, 13 Jun 2012 11:00:19 -0700
Local: Wed, Jun 13 2012 2:00 pm
Subject: Re: [Yesod] hamlet and #
I don't think the current haskell hamlet implementation has the most
natural defaults, but it is easy to explain what the rules are.
For my other implementations [1] it defaults to adding new lines or a
space and I rarely need to point out spacing to hamlet.

[1] https://github.com/gregwebs/hamlet.rb

On Wed, Jun 13, 2012 at 9:46 AM, Bulat Ziganshin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Snoyman  
View profile  
 More options Jun 14 2012, 12:11 am
From: Michael Snoyman <mich...@snoyman.com>
Date: Thu, 14 Jun 2012 07:11:13 +0300
Local: Thurs, Jun 14 2012 12:11 am
Subject: Re: [Yesod] hamlet and #
There are two things I was trying to avoid in designing the current setup:

* A bunch of special case rules about when to add whitespace. I like
the fact that we can explain things with one sentence: there's no
extra whitespace added.
* It's possible to express anything. If whitespace is *always* added,
it's impossible to use Hamlet tag syntax for, e.g. <i>Michael</i>'s
car.

But we can probably still hit both of those requirements if we (1)
switch the default to *always* adding whitespace after a tag and (2)
having some escape mechanism (e.g., a backslash at the end of the
line) to disable auto-whitespace.

Personally, I don't mind the current setup, but if people want to make
the change, I'm open to it. What's general consensus?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Felipe Almeida Lessa  
View profile  
 More options Jun 14 2012, 6:42 am
From: Felipe Almeida Lessa <felipe.le...@gmail.com>
Date: Thu, 14 Jun 2012 07:42:41 -0300
Local: Thurs, Jun 14 2012 6:42 am
Subject: Re: [Yesod] hamlet and #

I'd prefer using backslashes, but it would be a PITA to upgrade all
templates by hand. Perhaps it would be sufficient to have a "transition
knob" which printed a warning every time Hamlet assumed a space where it
previously wouldn't (assuming that a tool to automagically upgrade would be
too expensive to build).

--
Felipe – enviado do meu Galaxy Tab.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bulat Ziganshin  
View profile  
 More options Jun 14 2012, 8:13 am
From: Bulat Ziganshin <bulat.zigans...@gmail.com>
Date: Thu, 14 Jun 2012 16:13:10 +0400
Local: Thurs, Jun 14 2012 8:13 am
Subject: Re[2]: [Yesod] hamlet and #
Hello Greg,

Wednesday, June 13, 2012, 10:00:19 PM, you wrote:

btw, you forgot to close the last ``` html tag in README.rd:

``` html
<b>no space</b>none after bold.  Two spaces after a period is bad!

## I18n support

You can hook up i18n support the same way you would for other templating lanugages.
[https://github.com/grosser/gettext_i18n_rails](This rails plugin) works out of the box.

--
Best regards,
 Bulat                            mailto:Bulat.Zigans...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bulat Ziganshin  
View profile  
 More options Jun 14 2012, 8:23 am
From: Bulat Ziganshin <bulat.zigans...@gmail.com>
Date: Thu, 14 Jun 2012 16:23:05 +0400
Local: Thurs, Jun 14 2012 8:23 am
Subject: Re[2]: [Yesod] hamlet and #
Hello Greg,

Wednesday, June 13, 2012, 10:00:19 PM, you wrote:

also this line has 2 broken links plus word "langauge"

You can see the [original hamlet templating langauge](http://www.yesodweb.com/book/templates) and the
[javascript port](hamlet: https://github.com/gregwebs/hamlet.js).

--
Best regards,
 Bulat                            mailto:Bulat.Zigans...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bulat Ziganshin  
View profile  
 More options Jun 14 2012, 4:36 pm
From: Bulat Ziganshin <bulat.zigans...@gmail.com>
Date: Fri, 15 Jun 2012 00:36:19 +0400
Local: Thurs, Jun 14 2012 4:36 pm
Subject: Re[2]: [Yesod] hamlet and #
Hello Michael,

Thursday, June 14, 2012, 8:11:13 AM, you wrote:

> There are two things I was trying to avoid in designing the current setup:

IMVHO, these rules looks like the good fit for quick&dirty proof-of-concept
implementation, but for long-running "production-grade" framework it has
the following disadvantages (repeating and extending myself):

- it's unexpected. at least, plain English, html and most templating
systems are doing opposite
- it makes (much?) harder to convert manually from html to hamlet.
automatic html2hamlet conversion tool generates unreadable hamlet
files, so i prefer to convert by hand. although now i think that it may
be solved by making smarter conversion tool
- it makes it harder to further maintain hamlet templates

so, i believe that it's the problem that's better to be solved earlier than
later, when hamlet will have larger userbase

> * A bunch of special case rules about when to add whitespace. I like
> the fact that we can explain things with one sentence: there's no
> extra whitespace added.

i think that the best thing is to copy existing rules either from html
or popular indent-based templating systems. whitespacing rules isn't
the field where users demand more diversity

> * It's possible to express anything. If whitespace is *always* added,
> it's impossible to use Hamlet tag syntax for, e.g. <i>Michael</i>'s
> car.

even without any special whitespacing rule, one can just explicitly close
the tag and continue text on the same line waiting till the next space

--
Best regards,
 Bulat                            mailto:Bulat.Zigans...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »