هلالtonight’s moonشمسةthe sixteen-petal rosette — how it is drawn

The observatory

Tonight’s moonهلال

Next new moon
Next full moon

The first thin crescent — هلال, the hilal — is the moon a day or two out of conjunction, and it is a beginning. The Hijri calendar is lunar: twelve months of twenty-nine or thirty days, a year some eleven days shorter than the solar one, so its months walk backwards through the seasons. A month opens when the new crescent is seen — and the naked-eye hilal is a hard object, thin and low and lost in the dusk it hangs in, which is why what counts as seeing it has been argued over for centuries.

That is one reason the astronomers of the medieval Islamic world measured the moon as closely as they did. Al-Battani, who spent most of his life at Raqqa and died in 929, left the earliest surviving zīj — a book of astronomical tables — in the Ptolemaic tradition, and tables like it could place the crescent before anyone went out to look for it. The disc above is worked the same way: everything on it follows from ψ, the angle between sun and moon, which fixes both the phase and the lit fraction, (1 − cos ψ) ⁄ 2.

The observatory

The sixteen-petal rosetteشمسة

the compass circle · sixteen points

Everything here is stepped off one circle. Sixteen points around it, each joined to the sixth from it; the {16/6} star polygon that follows then supplies its own measurements — the petal valleys at 0.689 R where consecutive chords meet, the ring at 0.390 R where they cross closest to the centre. Nothing is chosen by eye.

Patterns built on that kind of scaffolding are girih, the interlaced strapwork behind much of Islamic geometric ornament; cut from glazed terracotta and set piece by hand-chiselled piece, the same figures become zellij, the mosaic of Morocco and al-Andalus this page is named for. What craftsmen carried between sites was the construction rather than the finished design: the Topkapı Scroll, 114 patterns from the Timurid workshops, is the one pattern-book of its kind to survive. The eight-pointed star this rosette closes on is the khatam — two squares laid across each other, the octagram the Qur’an uses in its margins as the Rub el Hizb.

Ahmed El Gabri

أحمد الجابري

Two-centred drop arch — the Mosque of Ibn Tulun, Cairo, 876–879

Blog

Making the default gulp task useful

I have been using gulp for a couple of months now & I like how simple it is compared to Grunt also that I’m actually writing code not configurations & it’s easier to understand.

When I was converting the project I’m working on now from Grunt to Gulp I had this idea, why not make the default task as TOC to list all available tasks? instead of using it for a real task. How many times you cloned/forked/collaborated on a project & had to open Gruntfile.js or Gulpfile.js to check which task you should run or open README.md to check this? So I decided to make the default task as TOC of all the tasks available in the Gulpfile.js and this is what I came up with.

gulpfile.js
// This is (optional) if you don't want colored output
// you can ditch this if you are not using it for anything else.
var utils = require('gulp-util')

gulp.task('default', function () {
	var tasks = Object.keys(gulp.tasks).sort()
	utils.log(utils.colors.yellow('You have the following tasks to run:'))
	tasks.forEach(function (t) {
		if (t === 'default') return
		utils.log(utils.colors.yellow('• gulp ' + t))
	})
})

I’m getting the task names as an array using Object.keys(), sorting them alphabetically, then looping through the array & printing out each task name excluding the default task.

Of course this is so raw now, as it currently lists all the tasks available, maybe you don’t want to do this or you want to list just the main/important tasks. I think this is very useful especially in teams & open source projects.

What do you think about this? I’d like to get feedback & ideas on how to improve this.

You can share this post or reach me on @ahmedelgabri.