The new developments of JSesh

It might have occurred to you that JSesh development has sped up dramatically in the last few months.

Here is the full story:

A bit of history

JSesh is an old software. The first public release was in 2004, but the very first code was written in 2002. My tksesh software had a small community of users, but it wasn't expanding. Basically, tksesh was for me a text database - mostly for philological and grammatical work. I had written some code to allow copy/paste into text editors, but it didn't attract many users. Apparently, what people wanted was a reasonably good looking hieroglyphic editor, and tksesh was quite ugly on the screen. I had started teaching Java, which I had avoided until then, because I found it dead slow. But Java 1.2 and later started to improve dramatically. Plus, Java 1.2 had a great graphical library, Graphics2D. So, in 2002, I translated a bit of the code of tksesh from C to Java, and had a relatively nice rendering of hieroglyphs on screen.

In 2004, I decided to release JSesh. A bit later, M. Serge Paul Thomas, who had been a user of tksesh, volunteered to help me with the fonts. Over the years, he has drawn the whole “extended library” of the Hieroglyphica, and more. Most of his work is available in the hieroglyphic library. Look for instance at his versions of G1, or of G43.

Then, two things happened. First, Jean Winand and Stephane Polis contacted me when I organised a workshop of the ATALA (French scientific society for Natural Language Processing) in 2005. They wanted advice for developing a grammatical database, and this was the beginning of Ramses. Then, in 2007, I was contacted by the Institut Français d'Archéologie Orientale (IFAO). They wanted to use JSesh for their publications, as the existing software tools did not support the latest operating systems - mostly MacOS X.

It was a bit unfair, as Winglyph and MacScribe were otherwise solid tools, but JSesh could unify users both on Mac and Windows, with the advantage of Open Source. I went to Cairo a few times to work with both the Egyptologists, the IFAO IT team (Christian Gaubert), and the IFAO publication team, then directed by Patrick Tillard. I knew the needs of the Egyptological colleagues quite well, but some specificities of writing a tool for publication were new to me, in particular regarding the problems of colour encoding.

A slow development - and procrastination

I kept enhancing JSesh, but the pace slowed. At some point, a software which has been developed for a long time becomes a bit difficult to maintain. Shortcuts in the development process, stuff for which you say “ok, I'll do it this way, but I'll fix it later”, come back with a vengeance.

That's what happened to JSesh. Some parts of the code were difficult to maintain. Changing them would not change what JSesh did, nor even how it did it. It was mostly a question of where it did it in the code. It's the kind of cleanup which is boring as hell, takes a lot of time - in particular because it tends to break everything. It was planned for a long time (I wrote things about it in 2023 in the "developer journal", but other reflections were coming from the code I have written for Ramses earlier on), but the amount of work and the little direct benefit I was expecting tended to make smaller, more rewarding tasks more attractive.

I really started writing code in october 2025, but it was still slow. In the Spring of 2026, I finally decided to do it. By the start of the summer, most of the core code compiled and ran. I still need to link it with the rest of the software.

Enter Claude

Part of my teaching deals with Deep Learning. But, having played with LLMs quite early, I found them too unreliable - at least for long, complex code.

However, as they seemed to be more and more powerful, I tried using Claude. First, I asked it mainly to detect problems in the current code organisation, and to move code around. It was very efficient at that, and the core part of jsesh is pretty clean.

JSesh 8 is basically the result of my long hand-written modification, plus Claude-helped code reorganisation.

After this reorganisation, I made a pause and turned toward the Ramsès project, for which many ideas I had were still to be implemented. I gave Claude sketches of code and model applications, and it produced a very impressive new version of the Ramsès editor. It gave me a lot of confidence for the new JSesh development.

JSesh had a number of long-standing todo functionalities, mainly related to text layout, which were waiting for a better organisation of the core - I didn't want to implement them over brittle foundations.

Among them:

  • a support for the advanced ligature system used by Unicode, which our colleagues from the TLA had been asking for. I could have used JSesh previous system, based on bounding boxes, but it was really a pity not to use Mark-Jan Nederhof's work on RES, which gave a much more flexible solution. I took the idea of using the actual shapes of the signs, and designed a system which is a bit different, but has the same basic principles. Having a proper system to place signs according to their shapes, it was also natural to add the fit operator of RES, as %hkern and %vkern operators, which allow two blocks of signs to move horizontally or vertically, according to the shapes of the signs, keeping a minimal distance between them. I chose to distinguish two different operators, because it's very likely that one will take, for example, a text in columns (in the original document), and put it in lines to comment on it.
  • an improved notion of position in the text. In the original JSesh, the position was a simple index - a number, between two quadrats. In contrast, tksesh had a richer system, which allowed one to specify a position in a quadrat. But it wasn't used to its full potential, and I had left it aside. Now, if I wanted richer layout possibilities, I needed to be able to specify a position inside a complex group;
  • this modification allowed the cursor to move inside cartouches, making them editable;
  • the notion of zones had been planned for a long time (there was already an unused ZoneStart class from 2010 at least); I had indeed added some code for "zones" parsing in the Manuel de Codage, but zones implementation needed both the improved organisation of the core (to avoid adding chaos to chaos) and the improved notion of position, to be able to move in zones. To my surprise, the zone system did not happen to become an ergonomic nightmare.
  • tabs; the original MdC had a notion of hand-placed tabulation, which is not very practical (remember that it had to run on computers from the 1970s and 1980s). Extensions were quite natural, and MacScribe latest versions had a system for tabulations. I was also thinking about LaTeX tabbing and tabulars.
  • text justification: a first version of justification, document-based, had been proposed as the editing team of the IFAO was asking for it. At that time, I had been reluctant to change the Manuel. But with the introduction of %zones, %insert and other new operators, I was adding entirely new functionalities, and there was no reason to be shy.
  • the JavaScript port of JSesh (actually TypeScript). What I did was mainly ask “write a TypeScript port of JSesh,” and by the end of the day, I had it. The port keeps the structure of the Java version, and is kept feature-for-feature compliant with it.

Conclusion

I have perhaps, at times, been a bit too possessive about JSesh code - in any case, I was not able to secure long time collaboration, except with M. Serge Paul Thomas. A few programmers did contribute useful code - especially patches or configuration code, but I had a hard time delegating development of JSesh parts. Claude did that, and much more. I'm impressed and very happy because JSesh have become closer to what I wanted to do in the first place, and that I might start working on more fundamental issues - especially regarding the encoding of the sign catalogue according to the ideas we developed in Polis, S. et Rosmorduc, S. (2013). “Réviser le codage de l'égyptien ancien Vers un répertoire partagé des signes hiéroglyphiques”. Document numérique, 16(3), 45-67.

On the other hand, I'm scared. A big deal of the skills I had developed over the years are now somehow obsolete. I can still think that they help me to ask the LLM the right questions, but still... And, as a computer science teacher, I'm very worried for the future of my students.

Serge Rosmorduc

Article précédent