Arancaytar's picture

XBBCode available for 6.x

My pet module XBBCode is finally available for Drupal 6 - at least the core engine and the basic tags. It has undergone a lot of clean-up, including the user interface.

The module will only be packaged as a public release when all sub-modules are converted, but for now, the trunk is available here:

http://svn.ermarian.net/drupal/modules/xbbcode/trunk
Arancaytar's picture

How to clean a CVS working copy

"cvs unedit" does not seem to work on my client for some reason. To copy this behavior, I therefore need to do something else to avoid having to track down all changed files. Hence,

cvs diff|grep ^Index|awk '{print $2}'|xargs rm; cvs update
Arancaytar's picture

Casting big collections to String

A word of warning: If you are working with Collections in Java that are over 5000 records, do not implement a toString that aggregates them all as text. String concatenation is obscenely slow in that context, which means you will wait several minutes for data sets that are larger. Presumably this is dependent on String length as well as record count, so it also matters how big the text of each record is.

Workaround? Use void print() instead of String toString(). Admittedly, it's not as flexible, but it's orders of magnitude faster.

And that's what I have learned for today.
Arancaytar's picture

XBBCode ported to Drupal 6!

Drupal 6.x is looming. A few months ago, I wouldn't have chosen that particular word, but as it's getting closer and closer, I see past the smoothness and shiny new features and remember what a major Drupal version upgrade actually means for me as a site developer: Endless hours of coding to get my modules compatible with the new API.

DHTML menu, now, was easy. I pretty much spent half a day on getting it to work in D6 - after being stumped for several days regarding the new menu system, of course.

XBBCode, on the other hand, I set off to the side. This is not because its structure has to undergo some major refactoring - in fact the filter API hasn't changed at all (or at least not in a way that broke my module). Rather, it uses a few high-level menu items and configuration forms - and as always, the new Drupal version completely revamped the menu system and Form API. Forgive me for waxing cynical for a bit. Form API is a thing of beauty once you understand it - and hopefully that will be the case before it is rewritten again and gets even more beautiful.

Still, after some reading and bothering the other developers on IRC, I finally pushed XBBCode into a shape where it works in Drupal 6. The engine with all its settings forms and custom tags is functional - though not E_NOTICE-free, because of a strange behavior of the new menu system that I still have to figure out. The basic tags package required practically no updating.

I am expecting more trouble with the other sub-modules that implement their own settings forms, but none of them are as bad as the engine itself.

The new version of XBBCode 6.x-dev is not yet on SVN. I still have to split off the DRUPAL-5 branch before I commit the 6.x version into the repository. So this is little more than a hype topic. I expect to have the version done in another week, however.
Arancaytar's picture

The Song of the Mad Minstrel


2:14 minutes (2.05 MB)The third poem in this particular series. Creepy, quite a bit dark and certainly fitting the magazine it was published in back in 1931: Weird Tales, a truly legendary periodical that featured also the first works by H.P. Lovecraft, as well as his most famous short story, The Call of Cthulhu.

Robert E. Howard, on the other hand, is known more for his heroic fantasy than his horror: The tales of Conan the Barbarian of Cimmeria, the adventures of Solomon Kane (which, though occasionally terrifying, never cast their main character as anything but a staunch protagonist, an enemy of evil). So this poem, narrated by one who travelled to hell and back in his quest for forbidden knowledge, stands out a bit.

Anyway, ramble over - without further ado, I give you:

The Song Of A Mad Minstrel
by Robert E. Howard

I am the thorn in the foot, I am the blur in the sight;
I am the worm at the root, I am the thief in the night.
I am the rat in the wall, the leper that leers at the gate;
I am the ghost in the hall, herald of horror and hate.

I am the rust on the corn, I am the smut on the wheat,
Laughing man's labor to scorn, weaving a web for his feet.
I am canker and mildew and blight, danger and death and decay;
The rot of the rain by night, the blast of the sun by day.

I warp and wither with drouth, I work in the swamp's foul yeast;
I bring the black plague from the south and the leprosy in from the east.
I rend from the hemlock boughs wine steeped in the petals of dooms;
Where the fat black serpents drowse I gather the Upas blooms.

I have plumbed the northern ice for a spell like Frozen lead;
In lost grey fields of rice, I learned from Mongol dead.
Where a bleak black mountain stands I have looted grisly caves;
I have digged in the desert sands to plunder terrible graves.

Never the sun goes forth, never the moon glows red,
But out of the south or the north, I come with the slavering dead.
I come with hideous spells, black charms and ghastly tunes;
I have looted the hidden hells and plundered the lost black moons.

There was never a king or priest to cheer me by word or look,
There was never a man or beast in the blood-black ways I took.
There were crimson gulfs unplumbed, there were black wings over a sea;
There were pits where mad things drummed, and foaming blasphemy.

There were vast ungodly tombs where slimy monsters dreamed,
There were clouds like blood-drenched plumes where unborn demons screamed.
There were ages dead to Time, and lands lost out of Space;
There were adders in the slime, and a dim unholy Face.

Oh, the heart in my breast turned stone, and the brain froze in my skull-
But I won through, I alone, and I poured my chalice full
Of horrors and dooms and spells, black buds and bitter roots-
From the hells beneath the hells, I bring you my deathly fruits.
Arancaytar's picture

Earendil the Mariner by Arancaytar


4:16 minutes (1.96 MB)Here comes the next installment: I read a very long ballad about Eärendil the mariner, who travelled from Middle-Earth over the West even to Valinor itself, where he beseeched the Valar to aid the mortal lands in their struggle against the dark lord Morgoth. His request was granted, but his journey to the undying lands came at a high price: Having once walked on this hallowed ground as a mortal, he could never return to the lands he had left, and was instead to roam forever across the sky, burning with the light of one of the Silmarilli - the one Beren had cut from the crown of Morgoth himself.

Eärendil the Mariner
by John Ronald Reuel Tolkien

Eärendil was a mariner
that tarried in Arvernien;
he built a boat of timber felled
in Nimbrethil to journey in;
her sails he wove of silver fair,
of silver were her lanterns made,
her prow was fashioned like a swan,
and light upon her banners laid.

In panoply of ancient kings,
in chained rings he armoured him;
his shining shield was scored with runes
to ward all wounds and harm from him;
his bow was made of dragon-horn,
his arrows shorn of ebony;
of silver was his habergeon,
his scabbard of chalcedony;
his sword of steel was valiant,
of adamant his helmet tall,
an eagle-plume upon his crest,
upon his breast an emerald.

Beneath the Moon and under star
he wandered far from northern strands,
bewildered on enchanted ways
beyond the days of mortal lands.
From gnashing of the Narrow Ice
where shadow lies on frozen hills,
from nether heats and burning waste
he turned in haste, and roving still
on starless waters far astray
at last he came to Night of Naught,
and passed, and never sight he saw
of shining shore nor light he sought.

The winds of wrath came driving him,
and blindly in the foam he fled
from west to east and errandless,
unheralded he homeward sped.
There flying Elwing came to him,
and flame was in the darkness lit;
more bright than light of diamond
the fire upon her carcanet.
The Silmaril she bound on him
and crowned him with the living light,
and dauntless then with burning brow
he turned his prow; and in the night
from otherworld beyond the Sea
there strong and free a storm arose,
a wind of power in Tarmenel;
by paths that seldom mortal goes
his boat it bore with biting breath
as might of death across the grey
and long-forsaken seas distressed:
from east to west he passed away.

Through Evernight he back was borne
on black and roaring waves that ran
o'er leagues unlit and foundered shores
that drowned before the Days began,
until he hears on strands of pearl
where ends the world the music long,
where ever-foaming billows roll
the yellow gold and jewels wan.
He saw the Mountain silent rise
where twilight lies upon the knees
of Valinor, and Eldamar
beheld afar beyond the seas.
A wanderer escaped from night
to haven white he came at last,
to Elvenhome the green and fair
where keen the air, where pale as glass
beneath the Hill of Ilmarin
a-glimmer in a valley sheer
the lamplit towers of Tirion
are mirrored on the Shadowmere.

He tarried there from errantry,
and melodies they taught to him,
and sages old him marvels told,
and harps of gold they brought to him.
They clothed him then in elven-white,
and seven lights before him sent,
as through the Calacirian
to hidden land forlorn he went.
He came unto the timeless halls
where shining fall the countless years,
and endless reigns the Elder King
in Ilmarin on Mountain sheer;
and words unheard were spoken then
of folk of Men and Elven-kin,
beyond the world were visions showed
forbid to those that dwell therein.

A ship then new they built for him
of mithril and of elven-glass
with shining prow; no shaven oar
nor sail she bore on silver mast:
the Silmaril as lantern light
and banner bright with living flame
to gleam thereon by Elbereth
herself was set, who thither came
and wings immortal made for him,
and laid on him undying doom,
to sail the shoreless skies and come
behind the Sun and light of Moon.

From Evereven's lofty hills
where softly silver fountains fall
his wings him bore, a wandering light,
beyond the might Mountain Wall.
From World's End then he turned away,
and yearned again to find afar
his home through shadows journeying,
and burning as an island star
on high above the mists he came,
a distant flame before the Sun,
a wonder ere the waking dawn
where grey the Norland waters run.

And over Middle-earth he passed
and heard at last the weeping sore
of women and of elven-maids
In Elder Days, in years of yore.
But on him mighty doom was laid,
till Moon should fade, an orbéd star
to pass, and tarry never more
on Hither Shores where mortals are;
or ever still a herald on
an errand that should never rest
to bear his shining lamp afar,
the Flammifer of Westernesse.
Arancaytar's picture

Kublah Khan by Arancaytar


1:57 minutes (1.79 MB)A while ago, I began to record a few pieces of my favorite poetry (encouraged to do so by someone awesome. Hi! Smile ), and am now uploading them here. This is the first installment of a series.

Here is the complete poem in text:

Kublah Khan, or: A Vision in a Dream. A fragment.
by Samuel Taylor Coleridge

In Xanadu did Kubla Khan
A stately pleasure-dome decree :
Where Alph, the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
So twice five miles of fertile ground
With walls and towers were girdled round :
And there were gardens bright with sinuous rills,
Where blossomed many an incense-bearing tree ;
And here were forests ancient as the hills,
Enfolding sunny spots of greenery.

But oh ! that deep romantic chasm which slanted
Down the green hill athwart a cedarn cover !
A savage place ! as holy and enchanted
As e'er beneath a waning moon was haunted
By woman wailing for her demon-lover !
And from this chasm, with ceaseless turmoil seething,
As if this earth in fast thick pants were breathing,
A mighty fountain momently was forced :
Amid whose swift half-intermitted burst
Huge fragments vaulted like rebounding hail,
Or chaffy grain beneath the thresher's flail :
And 'mid these dancing rocks at once and ever
It flung up momently the sacred river.
Five miles meandering with a mazy motion
Through wood and dale the sacred river ran,
Then reached the caverns measureless to man,
And sank in tumult to a lifeless ocean :
And 'mid this tumult Kubla heard from far
Ancestral voices prophesying war !
The shadow of the dome of pleasure
Floated midway on the waves ;
Where was heard the mingled measure
From the fountain and the caves.
It was a miracle of rare device,
A sunny pleasure-dome with caves of ice !
A damsel with a dulcimer
In a vision once I saw :
It was an Abyssinian maid,
And on her dulcimer she played,
Singing of Mount Abora.
Could I revive within me
Her symphony and song,
To such a deep delight 'twould win me,
That with music loud and long,
I would build that dome in air,
That sunny dome ! those caves of ice !
And all who heard should see them there,
And all should cry, Beware ! Beware !
His flashing eyes, his floating hair !
Weave a circle round him thrice,
And close your eyes with holy dread,
For he on honey-dew hath fed,
And drunk the milk of Paradise.
Arancaytar's picture

Mi estas lernante Esperanton

Tiu estas cxiom.

Ankarau, mia scio de la lingvo estas tre primitiva, sed mi lernas rapide! Smile
Arancaytar's picture

Reading again

Childhood's End arrived yesterday (I got it after an emphatic recommendation, which I haven't regretted taking to heart), and I spent most of today reading. This is powerful stuff.

I'm not through yet, though the end is not far off. So far, the most moving quote was this:

What you will have brought into the world may be utterly alien, it may share none of your desires or hopes, it may look upon your greatest achievements as childish toys - yet it is something wonderful, and you will have created it.
Arancaytar's picture

Math Camp - Part 1

It has been an exceptionally busy week. Last Monday, I went to Bavaria to take a course in statistical mathematics (specifically, statistical methods for quality analysis). It is now Friday afternoon, and I am sitting in the train home, so I have some time to write.

Well, I say I am sitting, which is true in the loosest sense of the word. The train is packed as a can of sardines, as we say in German, and there are no seats left. Instead, I picked one of the entrances, put my backpack down on the floor and sat down on it. My laptop is now fulfilling its nominal function while I am hoping it won't sterilize me (or worse, run out of power before I'm done writing).

Sunday

So anyway, let's start on Sunday afternoon, when my dad and I went down to Frankfurt by car. We had to stop by Aachen first to get my laptop's power cord (this statistical course is based as much on computer calculation as paper, if not more), and then we were on our way.

Around Koblenz, we put in a stop at a way station along the autobahn to get dinner. It was here that I also saw the most futuristic and sanitary lavatory ever. Seriously, this was Sci-Fi stuff - have you ever read Asimov's Caves of Steel? This thing put me in mind of the Spacer facilities. The toilets are self-cleaning: They flush when you get up, and a robotic arm extends to wipe the rim that you sat on. None of the devices - foam dispenser, water tap, towel dispenser - required physical contact; all had sensor plates. When we left the station, the sun had already gone down and we drove on until we arrived in Frankfurt late in the night.

[img=http://lh3.google.com/arancaytar.ilyaran/RuuobCkrQ-I/AAAAAAAABVU/8ohLVRoOwws/CAM_5139.JPG?imgmax=512]

I had only a short time to go online and have some dinner, then write in my diary: After that it was time to sleep - I had to get up at six in the morning.

Monday

The journey down to Niedernberg was much shorter than the one to Frankfurt, but it still took us over another state border: We had now entered Bavaria - home of Beer, Weisswurst and Lederhosen. As if obeying an unwritten rule, the brisk early fall weather cleared up as we passed the border and gave way to summer.

But enough of the journey. Very soon, we arrived at the Seehotel Niedernberg, the hotel that the course was taking place at. I was half an hour early, so I had first pick of the seats (front row for me; my bad eyes have no chance of reading the flipchart and the projection screen otherwise). The view was utterly awesome. I should have expected something like this from the conference room of a luxurious hotel (this was the sort of room where I imagine companies might have gone into merger talks), but it was still surprising. Through the window, we saw this:

[img=http://lh5.google.com/arancaytar.ilyaran/Ruun2ikrQrI/AAAAAAAABS0/VceEWpeKHhA/CAM_5116.JPG?imgmax=512]

Over the next twenty minutes, the other participants came in one by one. I was in for a pretty big shock, although I had known what to expect of course. Just by being in the room, I must have lowered the mean age of the occupants by a year, perhaps two, and we were about fifteen people in total. The culture shock continued after the instructor came in and introduced himself, kicking off a round of introductions. Quality assistant this, manager that, chief engineer the other. All of them work in big technical companies, from producing nuclear fuel rods to surgical dressings: All of them industries in which quality standards are of utmost importance. Needless to say, I am the only college student in the room, but thankfully, no eyebrows were raised. I still felt quite isolated though, and when I had finished my introduction, I was relieved.

The next hours were spent passing information about the structure and form of the course that would follow. Our course is organized by the German Association for Quality (DGQ e.V.). It actually consists of five modules mixed into a single one; these are:

  • Basic Statistics
  • Statistical Process Analysis
  • Data Aggregation
  • Measuring Technology
  • Design of Experiments


All of these modules are normally taught over several months; altogether the material we are going to learn used to cover over two years. We are going to cram it into our heads in the next two weeks.

His words stayed with me, which I am only wildly misquoting and paraphrasing : "Do you know Six Sigma? After you're through with this course, you will know twice as much about statistics as the Six Sigma Black Belts."

And so, wasting no time at all of the approximately 200-240 hours that the course will last in total, we delved right into the subject matter. A brief summary of what role statistics play in quality control, and what properties they are used on ("continuous, discrete, ordinal and nominal").

What amazed me most were the relative levels of mathematical understanding. I'd entered into the course fully expecting to be outshone in all things from age to work experience to mathematical brilliance. Yet, while we were still in the basics of the first days (when the material was still old news for me after the statistics course in college), I had many opportunities for being helpful with explanations. Take stochastics and boolean: de Morgan stated that "not (A and B)" is the same as "(not A) or (not B)" - the Distributive law of boolean operands. With this stuff fresh in my mind after only a year, it seems obvious - but evidently such theoretical things don't hold up well under long times of disuse in the industry.

I'm very lucky that this is the case, for there is nothing that breaks ice as well as mathematical explanations - especially when your colleagues are between 15-30 years older than you and you have very little in common. The first coffee break was spent very self-consciously in isolation, but by the afternoon of the next day, I was actually asked by some participants to explain a stochastical problem to them! To be sure, it is nothing like being called cute by a girl, but being asked about math by a group of engineers does give a good boost to the old self-esteem.

Lunch break rolled around, and a very pretty problem presented itself, promising to stay around for the next four weeks: Four-star Hotels are ****ing expensive, pun fully intended. Non-guests pay 22€ per day for lunch (which comes to 31$ in these days of turmoil). For reference, that is what this starving college student lives on for nearly two weeks. This meant nothing to my colleagues, who could probably put all of that on their expenses bill to their company that was paying for their qualification, but I was finding myself having to answer, with rumbling stomach, the last of those delicate philosophical questions the late Douglas Adams posed to humanity:

Where shall we have lunch?

On the first day, with no time to think the problem through and fortunately a spot of cash handy, I shelled out my two-week-sustenance and was allowed to take part in the all-you-can-eat buffet: The first time I've ever seen the economy of overselling (so common in web-hosting) applied to gastronomy, and I was among the 99% of people who only use up 1% of what they pay for, because I eat like a bird (a diabetic, anorexic bird).

The day ended several hours later, and I was anxious to get to a bed after my brain had spent about 10 hours soaking up information. And uncertain: Today had been easy if grueling. The next day was going to be tougher. And the third tougher still. I needed to be well-rested to confront them.

Location(s)

Seehotel Niedernberg
Leerweg
63843 Niedernberg
Germany
Syndicate content