#HAML

洪 民憙 (Hong Minhee)hongminhee@hackers.pub
2025-07-06
Braden Douglassbraidn@ruby.social
2024-12-02

This image is one thing that's mostly impossible with #haml and the silly 2010's rise of white space indented #html

Seriously, open and closing tags are really a good thing for 'scannability’. Which in-turn becomse just great #devex

Ana Tudor 🐯anatudor
2024-09-26

As someone hearted ❤️ a 2015 demo of mine, I decided that since got better (and hopefully I did too), I should go for a quick 2024 remake.

Here it is on @codepen
codepen.io/thebabydino/pen/wKo

It's mindblowing 🤯 how much I could reduce the (esp. compiled) code - check it out!

HTML by 73%!
CSS by 70%!

I repeat: I shaved off at least 70% from each! ‼️

<!-- 🚨 2015 code: HAML
.grid
	- 16.times do
		.cube
			.squisher
				- 3.times do
					.cube__face
-->
<!-- Generated HTML -->
<div class='grid'>
  <div class='cube'>
    <div class='squisher'>
      <div class='cube__face'></div>
      <div class='cube__face'></div>
      <div class='cube__face'></div>
    </div>
  </div>
  <!-- and so on, 16 times the cube block -->
</div><!-- 😍 2024 code: Pug
 - let n = 4, m = Math.pow(n, 2);

style
	- for(let i = 0; i < n; i++)
		| .cube:nth-child(#{n}n + #{i + 1}) { --i: #{i} }
		| .cube:nth-child(n + #{n*i + 1}) { --j: #{i} }
.grid(style=`--n: ${n}`)
	while m--
		.cube
-->
<!-- Generated HTML -->
<style>
  .cube:nth-child(4n + 1) { --i: 0 }
  .cube:nth-child(n + 1) { --j: 0 }
  /* and so on, for each of the 4 rows and columns */
</style>
<div class="grid" style="--n: 4">
  <div class="cube"></div>
  <!-- and so on, 16 cube elements in total -->
</div>
Todd A. Jacobs | Rubyisttodd_a_jacobs@ruby.social
2024-06-27

#RubyOnRails #template #cagematch! Do you prefer #HAML or #Slim for new Rail 7.1+ apps? Either way, why?

I have a lot of experience with HAML, but historical benchmarks say its slower than Slim or #ERB. Linting HAML used to be painful, but more modern linters probably make that less of an issue.

What's the killer feature of your choice? How does the performance scale? What's the ease-of-use benefit over the others?

Maybe it's like #vim vs. #emacs, and YMMV. Hands-on POVs welcome!

Todd A. Jacobs | Rubyisttodd_a_jacobs@ruby.social
2023-11-15

I actually prefer #HAML for markup because it essentially (although annoyingly) validates structure, but #ERB & #Slim are both much faster to render. ERB is generally the fastest, but is verbose and ugly IMHO.

What do other people prefer for #RubyLang, #RoR, or #SinatraRb templates, and why? Please comment; I'm interested in the "wisdom of the crowd" on this one!

2023-10-13

What do you even do when presented with this situation? Bug in #haml? Bug in #viewcomponent? Bug in my brain?? #ruby

Haml (HTML abstraction markup language) is based on one primary principle: markup should be beautiful. It’s not just beauty for beauty’s sake either; Haml accelerates and simplifies template creation down to veritable haiku.

haml.info/

#haml

Todd A. Jacobs | Rubyisttodd_a_jacobs@ruby.social
2023-08-01

I occasionally try #RubyMine for refactoring or #CoPilot integration, and generally regret it. What are some #vim friendly tools for refactoring, #AI integration (esp. for #TDD or #HAML automation), and so forth? ALE by itself doesn't quite do it for me, but that could just be user error or lack of knowledge. 😇

2023-03-24

Which Ruby templating engine do you think (or know) would be more accessible to new Rubyists or drive-by contributors?
#ruby #erb #haml #slim #phlex

Andrew FranceOdaeus@vivaldi.net
2023-01-26

@davetron5000 true about ORMs, ActiveRecord was really bad with undocumented Arel functions that are actually quite powerful for complex queries.

Not sure #HAML is in this category as it's a direct translation, just a better syntax than verbose #HTML. At least I'm not aware of anything that can't be represented by it.

2021-03-11

Just a loose web-dev question:

I have never used Haml or SCSS. They are becoming more common in guides online. Is it worth it? Aside from efficient code (which is definitely a bonus), are there other benefits to these, or other options?

I'm not a designer and don't write more than about 15-20 pages in a year. I achieve what I want with plain old HTML/CSS so far. But I'm making more web-art and see there are tidy ways to do things with SCSS/Haml.

#webDevelopment #html #haml #css #scss

Matijs van Zuijlenmvz
2019-09-19

One thing I'm glad of is getting rid of in my projects (and too). Now I have only one file format left with complex string literal wrapping indicators.

2018-01-25

我在考虑 #Haml + #Ruby + #YAML 自动编写+生成大家的 #FOAF 档案😊😀

2017-11-26

pew #hugo confuses me af, i may just use #rails instead, wanted to play around with #haml anyway.

milouse 🐱‍🚀milouse
2017-05-31

Je découvre également le dialecte de (slim-lang.com/). Va falloir que je me penche un peu dessus. Moins cabalistique que mais en conservant le côté dépouillé. Ça semble chouette

2017-05-14

I ran into this interesting read about the use of #haml and #markdown

chriseppstein.github.io/blog/2

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst