PureWriter for Haiku BETA

Haiku native word processing app and engine, MIT license. Very much BETA but should be good to use on most live documents.

Underlying engine and UI handling as well as rendering is separate from the app - so can be reused by anyone headless or for own apps. The single DOM engine is shared with PureMail attachment / HTML views, so whatever changes for one, changes for both apps.

PureWriter / headless engine handles following so far in its native format (ODT with private extensions, which should survive opening and resaving in LibreOffice) and in DOCX, among others :

  1. Styles for pages, paragraphs, selections, TOC, Indexes (standard and custom), character styles
  2. Headers, footers, footnotes, end notes, section end notes
  3. Indexes, Bibliography, cross-references
  4. Graphs with data editing
  5. Basic bitmap image manipulation
  6. Basic vector drawing with diagram elements (like connectors), transparency
  7. Full table functionality and formatting including basic formulas supported by Word and OO
  8. Per page settings (mixed landscape / portrait modes, custom page sizes, custom margins)
  9. MathML / OpenOffice math formulas display
  10. Indic and Asian languages, in the document and navigators, RTL/LTR scripts
  11. Comments and replies
  12. Changes Tracking
  13. RTF 1.91 export (as RTF does not support many features, some like Math are replaces with images, custom Index/Biography will be saved as visually matching text)
  14. OLE2 Objects / Attachments
  15. Plenty of small functionality - from Signature Lines to basic form controls (check boxes, date fields)
  16. Non database fields, (usual Page, words, pages, IF-THEN fields, variables etc.) including header fields with levels of subsections (LibreOffice will not display multi levelled headers - it will stop at first level)
  17. Soft-hyphens, non breaking spaces for French speaking people.
  18. Built-in own hyphenation patterns for around 20 mostly European languages
  19. Spelling of multi-language documents with hunspell with each section, page, header, paragraph or selection may have a different language

Binary and Sample documents for testing (sources will be shortly on Codeberg):
https://pureemail.net/haiku.html

Some Images:

Cheers!

15 Likes

@pamen

Awesome stuff! Congratulations on the release!

2 Likes

Thanks ilfelice.
Try it out. until someone uses it with real documents, it cannot be distinguished from rubbish or unusable mock-up just by a picture.

2 Likes

Neat; it looks nice.

Has this codebase also gone through Claude, as PureMail has? (I’m guessing that at least part of it has, since you say it shares code with PureMail?)

To reiterate: this is for forum categorization only and is not any judgement on you or your code; it is merely to inform users so they can make their own decision about that.

https://discuss.haiku-os.org/t/how-much-llm-counts/20062

1 Like

I like the app name “PureWriter”.

Hi us3r1d

No.
PureMail code was not “poison-touched and ostracized by LLM usage” because of testing it or letting Claude do the commit.
The app contains the same DOM engine. Most of the important code (in both apps) is my 10-15 years old stuff, just put together differently and adjusted for Haiku.

But I intend to in the future, as I did not do any volume testing with this yet.

This forum needs 2 categories, which are light years apart:

  1. Non programmers using LLM tooling to produce stuff, nice.

  2. Programmers using LLMs to automate tasks

    For your better classification of program-tools here is a short list of actual tools used for both projects, maybe this will help to classify this post better.

  • A brain, using programming since 1989, professionally since 1992
  • Plenty of O’Reilly and Ziff Davis Books, C’t, Chip and other periodicals
  • Compuserve and AOL (sic!)
  • Colleagues at work, friends at different software companies and active in open source
  • Family academics working in the field (math, HP computing and also ML)
  • Stack Overflow
  • Google search
  • Copy and paste from forums
  • Local tools VisualStudio, Delphi, zig, rust, masm even Purebasic … code prettifies, parser tools
  • some 200 GB of own toolbox code from system level drivers and networking code to business and office apps.
  • Weirdly programming, quality assurance, project management and support as my daily job
  • Claude code used just fine for minor tasks and mass automation like executing 10K unit tests

Cheers and true thanks for your moderation on this forum - voluntary work is appreciated, even if we disagree.

4 Likes

Thanks ablyss

It is meant to say that this is only what it is, nothing more - writer helps writing. email client is to read and send emails.

2 Likes

The feature set and the screenshots look really nice,especially for a native text processing application (I don’t think we had a good one after GoBe Productive).
I only waited for clarification if it’s slop before commenting.
Seeing that it’s handwritten code from a time where computers were still fun,I now can’t wait to give it a try!
Will absolutely do so once the source code is on Codeberg.

2 Likes

As a user of software I’d very quickly stop using a software and search for alternatives once LLMs are used for any coding tasks, even if it is just source re-organization or something. The non-deteministic nature is enough to warrant this, seeing as you cannot catch in review everything you would not normally write yourself in the first place.

If you’ve not touched that codebase with LLMs that is great news. But if you intend to so in the future that pretty much kills any interest I’d have for working on it (I assume you also released it as open source for this purpose).

Don’t get me wrong, machine learning has good uses. But a gigantic machine learning model built on obscure sources to non-deteministically re-organize code? eh I’d rather not.

What minor tasks? above you said you’d not used an LLM, but here you write you used it…?

5 Likes

If he hasn’t used LLMs for it at the point he releases the source code but plans to do so in the future,we can fork the code when that happens and maintain a no-LLM fork of it.
I still think that the codebase is very valuable for Haiku in that scenario,as there is no other fully-featured and fully-native word processor available yet.

3 Likes

I used it for volume testing in PureMail as clearly stated in my post on PureMail, I also used it to do initial commit to Codeberg as I’m an avid SVN user and had no real idea about how git works until now.

After a total backlash from some of you - I used manual “deterministic tools” (which Claude also uses if you check what actually gets executed when you ask the machine for something) to do the same in fear not of breaking my code but of continued overload of views.

I’m tired of both:
true AI slop by naive first-time developers which is already propagated in the Haiku Depot and nobody seems to care and also of witch hunt, when a senior dev is making use of coding systems involving LLMs to do what is daunting to do by hand.

Reminds me very much of Linus T. and quite a few other devs with much better skills than mine who is using the same tools just fine .

Because a real programmer:

  • can maintain the code
  • knows the pitfalls and is skeptical about any outcome of any code (human or machine)
  • Can ask questions a newbie will not ask (human or machine)
  • Can read and understand code
  • Understands broad context of the code
  • Knows both - own limitations and limitations of tools used.

Please nephele - be so kind and let’s move this section to either separate place - (this one is meant for a word processor) and maybe exchange some actual evidence to what you and I are saying - I don’t have the strength to regurgitate endlessly the same for the sake of confirming own biases.

2 Likes

Thanks nipos - quite exactly the point:
Check the code (the engine is fully there with odt,docx,xlsx,ebub,pdf,pptp in /engine - only app is not yet on Codeberg - I made a mistake in combining two projects, have to untangle them first).
I wrote both (reusing my own code bases from many years) as I was frustrated with ports’ issues (try to resize a linked text frame in LibreOffice - you will see what I mean) and out of sentiment for be Productive.

The app and the (stability, quality of ) code should ALWAYS be judged, not the creator’s opinion or moderators’ one - that is my opinion (so nothing to judge :slight_smile: ).

1 Like

If LLMs are only used for testing and the initial Git commit in PuraMail,is there a chance to also get a completely no-LLM version of the code?
Maybe the original SVN repo if that isn’t tainted yet,or something like that?
I think Haiku really needs a fully-featured native email client as well,and the screenshots of your software look quite promising,but I won’t make any compromises on using LLM-generated software.
I don’t mind that non-LLM version being slightly broken or something like that,I could likely fix that using my human brain,but undoing LLM changes that already happened before the first Git commit in a repository is impossible.

1 Like

I tried it briefly, and I like what I see. I was surprised to see that it even supports vertical writing in Japanese.

One thing that would be really nice is if you could add inline input (which does not seem to be supported yet).

Anyway, keep up the good work! Haiku needs software like yours. In spite of what a few reluctant people may say here, many of us are rooting for you. :wink:

3 Likes

Nipos - none of code is LLM generated! I have around 12,000 unit and pixel comparison tests OUTSIDE the code - and those are written by LLM
For goodness sake - I wanted to help Haiku with some solid applications (as this is my daily job and 35 years of experience) but I’m reconsidering now - it takes more time to discuss LLM/not LLM than coding.

2 Likes

If you mean combined input methods which are not present in Haiku (I do not write or understand Kanji, Hiragana or Katakana - only romanji :slight_smile: )- I think this may be a bit over my skills and / or my schedule. If you mean something else - let me know.

Thanks for that clarification!
I’m sure many people enjoy solid applications on Haiku (I absolutely do),but in a time where the whole world turns into slop,you have to be sceptical if a massive feature-rich native Haiku application appears out of nowhere.
If something looks too good to be true,most times it is.
I’ll try to review the code if I find some time at the weekend.

2 Likes

Have fun. It is not too good to be true at all.
I was simply working for companies and writing a lot of stuff for others since 1992.
But as I really like Haiku concepts since its inception (and by now I also use Haiku) I decided to contribute, expecting a little “thanks it is useful” rather than so much talking.

Any review is appreciated - as said the bulk is in the /engine - which can be compiled into your own app statically or as a lib without dependencies on Mail/Writer (both use it) and has the “UI” / Canvas ready. Dependencies:
libcrypto (PureMail, will be used for document signing though)
libfreetype (obvious - no Hindi, Nepali and others without it and rendering is better)
libhpdf (writing pdf)
libhunspell_1.7 (major version, so should not break on minor version upgrades)
libicui18n (soo many languages :slight_smile: )
lib:libicuuc
lib:libjpeg
lib:libopenjp2
lib:libpng16
lib:libsqlite3 (PureMail only)
lib:libssl (PureMail, but will be used for digital signing in documents later)
lib:libz
noto_emoji_color (retired, but I still did not remove it - some code uses it)

TIFF, SVG and basic conversion from epub, xlsx, ods, pptx, old OLE2 doc - handled internally (doc has some limitations, docx is quite extensive)

There are many small issues in the writer part - word processing is complex and user interaction is a nightmare with no ready components, but with some (negative or positive) feedback I hope to get it right.

I do intend to maintain it and for now I do not invite anyone to contribute - when I’m done (possibly 3-5 months) - it can be considered good to be used, extended or whatever.
The stability is tested and fine in PureMail, but only manually tested with some profiling code on PureWriter (so yes, at some point I will have another set of unit tests, security, memory protection, stack/heap usage and more done by LLM as external code - nobody can afford to do that without a big team).

I do have a lot of spreadsheet code at hand (we want Be Productive of sorts, right ? ) but it needs work - 5000+ functions to cover basics is not exactly a walk in the park.

Thanks again nipos.

P.S. That is why it is not a recipe - I would not like to add either to already slightly polluted Depot without some people using it first and stating that it belongs there.

And “old” PureMail for windows/MacOS/Linux predates all this by many years.

1 Like

While I understand the frustration, please keep in mind that more people actually appreciate are grateful of your work and would want you to continue contributing to the Haiku application ecosystem.

By inline input (which is supported by Haiku), I mean the ability to enter text that requires conversion directly into the text view. Something like this…

I believe it has to do something with the B_INPUT_METHOD_AWARE flag (but don’t take my word for it).

Keep up the great work!

B_INPUT_METHOD_AWARE works only for Haiku controls, the renderer/editor is not one - it is a painting canvas.

But thanks - we are talking about the same thing.
I put the input methods it in my ToDo for later, but I will have to learn a bit more about it and understand the differences from Win/Lin/Mac where it is relatively simple.
Additional completion popups alone may mess with correct cursor and focus behavior, not talking about a simple thing like - “well this script input method and dictionary is not installed on this system”